From fbde29a9ea2c1fa9fc261a9d304a8e366cda4d03 Mon Sep 17 00:00:00 2001 From: James Garner Date: Fri, 27 Sep 2024 18:54:40 +1200 Subject: [PATCH] feat(schemas): replace existing schemas with latest client schemas Replace existing `3.1.X` and `3.3.X` schemas with the latest client only schemas for versions `3.1.9` and `3.3.6`. Regenerate code by removing `juju/client/_client*.py` and running `make client`. Update `juju/client/connection.py` with facades from `juju` `3.3.6` `api/facadeversions.go` (a superset of the facades from `3.1.9`). --- juju/client/_client.py | 351 +- juju/client/_client1.py | 13165 +------ juju/client/_client11.py | 2297 -- juju/client/_client18.py | 6393 --- juju/client/_client19.py | 4491 --- juju/client/_client2.py | 6776 +--- juju/client/_client3.py | 3299 +- juju/client/_client4.py | 2978 +- juju/client/_client5.py | 564 - juju/client/_client7.py | 1175 - juju/client/_definitions.py | 28686 ++++---------- juju/client/connection.py | 103 +- juju/client/schemas-juju-3.1.0.json | 50534 ------------------------ juju/client/schemas-juju-3.1.1.json | 51231 ------------------------ juju/client/schemas-juju-3.1.2.json | 50873 ------------------------ juju/client/schemas-juju-3.1.9.json | 17406 +++++++++ juju/client/schemas-juju-3.3.0.json | 53568 -------------------------- juju/client/schemas-juju-3.3.6.json | 18230 +++++++++ 18 files changed, 46168 insertions(+), 265952 deletions(-) delete mode 100644 juju/client/_client18.py delete mode 100644 juju/client/schemas-juju-3.1.0.json delete mode 100644 juju/client/schemas-juju-3.1.1.json delete mode 100644 juju/client/schemas-juju-3.1.2.json create mode 100644 juju/client/schemas-juju-3.1.9.json delete mode 100644 juju/client/schemas-juju-3.3.0.json create mode 100644 juju/client/schemas-juju-3.3.6.json diff --git a/juju/client/_client.py b/juju/client/_client.py index 4bfc5720..4db39849 100644 --- a/juju/client/_client.py +++ b/juju/client/_client.py @@ -4,22 +4,21 @@ from juju.client._definitions import * -from juju.client import _client7, _client1, _client3, _client4, _client2, _client17, _client6, _client11, _client10, _client5, _client9, _client18, _client19 +from juju.client import _client7, _client3, _client4, _client2, _client17, _client6, _client11, _client1, _client10, _client9, _client5, _client19 CLIENTS = { "7": _client7, - "1": _client1, "3": _client3, "4": _client4, "2": _client2, "17": _client17, "6": _client6, "11": _client11, + "1": _client1, "10": _client10, - "5": _client5, "9": _client9, - "18": _client18, + "5": _client5, "19": _client19 } @@ -86,26 +85,10 @@ class ActionFacade(TypeFactory): pass -class ActionPrunerFacade(TypeFactory): - pass - - class AdminFacade(TypeFactory): pass -class AgentFacade(TypeFactory): - pass - - -class AgentLifeFlagFacade(TypeFactory): - pass - - -class AgentToolsFacade(TypeFactory): - pass - - class AllModelWatcherFacade(TypeFactory): pass @@ -126,10 +109,6 @@ class ApplicationOffersFacade(TypeFactory): pass -class ApplicationScalerFacade(TypeFactory): - pass - - class BackupsFacade(TypeFactory): pass @@ -142,70 +121,10 @@ class BundleFacade(TypeFactory): pass -class CAASAdmissionFacade(TypeFactory): - pass - - -class CAASAgentFacade(TypeFactory): - pass - - -class CAASApplicationFacade(TypeFactory): - pass - - -class CAASApplicationProvisionerFacade(TypeFactory): - pass - - -class CAASFirewallerFacade(TypeFactory): - pass - - -class CAASFirewallerSidecarFacade(TypeFactory): - pass - - -class CAASModelConfigManagerFacade(TypeFactory): - pass - - -class CAASModelOperatorFacade(TypeFactory): - pass - - -class CAASOperatorFacade(TypeFactory): - pass - - -class CAASOperatorProvisionerFacade(TypeFactory): - pass - - -class CAASOperatorUpgraderFacade(TypeFactory): - pass - - -class CAASUnitProvisionerFacade(TypeFactory): - pass - - -class CharmDownloaderFacade(TypeFactory): - pass - - -class CharmRevisionUpdaterFacade(TypeFactory): - pass - - class CharmsFacade(TypeFactory): pass -class CleanerFacade(TypeFactory): - pass - - class ClientFacade(TypeFactory): pass @@ -222,162 +141,34 @@ class CredentialManagerFacade(TypeFactory): pass -class CredentialValidatorFacade(TypeFactory): - pass - - -class CrossControllerFacade(TypeFactory): - pass - - -class CrossModelRelationsFacade(TypeFactory): - pass - - -class CrossModelSecretsFacade(TypeFactory): - pass - - -class DeployerFacade(TypeFactory): - pass - - -class DiskManagerFacade(TypeFactory): - pass - - -class EntityWatcherFacade(TypeFactory): - pass - - -class EnvironUpgraderFacade(TypeFactory): - pass - - -class ExternalControllerUpdaterFacade(TypeFactory): - pass - - class FacadeVersions(TypeFactory): pass -class FanConfigurerFacade(TypeFactory): - pass - - -class FilesystemAttachmentsWatcherFacade(TypeFactory): - pass - - class FirewallRulesFacade(TypeFactory): pass -class FirewallerFacade(TypeFactory): - pass - - class HighAvailabilityFacade(TypeFactory): pass -class HostKeyReporterFacade(TypeFactory): - pass - - -class ImageMetadataFacade(TypeFactory): - pass - - class ImageMetadataManagerFacade(TypeFactory): pass -class InstanceMutaterFacade(TypeFactory): - pass - - -class InstancePollerFacade(TypeFactory): - pass - - class KeyManagerFacade(TypeFactory): pass -class KeyUpdaterFacade(TypeFactory): - pass - - -class LeadershipServiceFacade(TypeFactory): - pass - - -class LifeFlagFacade(TypeFactory): - pass - - -class LogForwardingFacade(TypeFactory): - pass - - -class LoggerFacade(TypeFactory): - pass - - -class MachineActionsFacade(TypeFactory): - pass - - class MachineManagerFacade(TypeFactory): pass -class MachineUndertakerFacade(TypeFactory): - pass - - -class MachinerFacade(TypeFactory): - pass - - -class MeterStatusFacade(TypeFactory): - pass - - -class MetricsAdderFacade(TypeFactory): - pass - - class MetricsDebugFacade(TypeFactory): pass -class MetricsManagerFacade(TypeFactory): - pass - - -class MigrationFlagFacade(TypeFactory): - pass - - -class MigrationMasterFacade(TypeFactory): - pass - - -class MigrationMinionFacade(TypeFactory): - pass - - -class MigrationStatusWatcherFacade(TypeFactory): - pass - - -class MigrationTargetFacade(TypeFactory): - pass - - class ModelConfigFacade(TypeFactory): pass @@ -390,78 +181,22 @@ class ModelManagerFacade(TypeFactory): pass -class ModelSummaryWatcherFacade(TypeFactory): - pass - - class ModelUpgraderFacade(TypeFactory): pass -class NotifyWatcherFacade(TypeFactory): - pass - - -class OfferStatusWatcherFacade(TypeFactory): - pass - - class PayloadsFacade(TypeFactory): pass -class PayloadsHookContextFacade(TypeFactory): - pass - - class PingerFacade(TypeFactory): pass -class ProvisionerFacade(TypeFactory): - pass - - -class ProxyUpdaterFacade(TypeFactory): - pass - - -class RaftLeaseFacade(TypeFactory): - pass - - -class RebootFacade(TypeFactory): - pass - - -class RelationStatusWatcherFacade(TypeFactory): - pass - - -class RelationUnitsWatcherFacade(TypeFactory): - pass - - -class RemoteRelationWatcherFacade(TypeFactory): - pass - - -class RemoteRelationsFacade(TypeFactory): - pass - - class ResourcesFacade(TypeFactory): pass -class ResourcesHookContextFacade(TypeFactory): - pass - - -class RetryStrategyFacade(TypeFactory): - pass - - class SSHClientFacade(TypeFactory): pass @@ -470,103 +205,23 @@ class SecretBackendsFacade(TypeFactory): pass -class SecretBackendsManagerFacade(TypeFactory): - pass - - -class SecretBackendsRotateWatcherFacade(TypeFactory): - pass - - -class SecretsDrainFacade(TypeFactory): - pass - - class SecretsFacade(TypeFactory): pass -class SecretsManagerFacade(TypeFactory): - pass - - -class SecretsRevisionWatcherFacade(TypeFactory): - pass - - -class SecretsTriggerWatcherFacade(TypeFactory): - pass - - -class SingularFacade(TypeFactory): - pass - - class SpacesFacade(TypeFactory): pass -class StatusHistoryFacade(TypeFactory): - pass - - class StorageFacade(TypeFactory): pass -class StorageProvisionerFacade(TypeFactory): - pass - - -class StringsWatcherFacade(TypeFactory): - pass - - class SubnetsFacade(TypeFactory): pass -class UndertakerFacade(TypeFactory): - pass - - -class UnitAssignerFacade(TypeFactory): - pass - - -class UniterFacade(TypeFactory): - pass - - -class UpgradeSeriesFacade(TypeFactory): - pass - - -class UpgradeStepsFacade(TypeFactory): - pass - - -class UpgraderFacade(TypeFactory): - pass - - class UserManagerFacade(TypeFactory): pass -class UserSecretsDrainFacade(TypeFactory): - pass - - -class UserSecretsManagerFacade(TypeFactory): - pass - - -class VolumeAttachmentPlansWatcherFacade(TypeFactory): - pass - - -class VolumeAttachmentsWatcherFacade(TypeFactory): - pass - - diff --git a/juju/client/_client1.py b/juju/client/_client1.py index d7a4cca6..0bd3060f 100644 --- a/juju/client/_client1.py +++ b/juju/client/_client1.py @@ -5,16 +5,10 @@ from juju.client._definitions import * -class ActionPrunerFacade(Type): - name = 'ActionPruner' +class CredentialManagerFacade(Type): + name = 'CredentialManager' version = 1 - schema = {'definitions': {'ActionPruneArgs': {'additionalProperties': False, - 'properties': {'max-history-mb': {'type': 'integer'}, - 'max-history-time': {'type': 'integer'}}, - 'required': ['max-history-time', - 'max-history-mb'], - 'type': 'object'}, - 'Error': {'additionalProperties': False, + schema = {'definitions': {'Error': {'additionalProperties': False, 'properties': {'code': {'type': 'string'}, 'info': {'patternProperties': {'.*': {'additionalProperties': True, 'type': 'object'}}, @@ -22,143 +16,50 @@ class ActionPrunerFacade(Type): 'message': {'type': 'string'}}, 'required': ['message', 'code'], 'type': 'object'}, - 'ModelConfigResult': {'additionalProperties': False, - 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}}, - 'required': ['config'], - 'type': 'object'}, - 'NotifyWatchResult': {'additionalProperties': False, - 'properties': {'NotifyWatcherId': {'type': 'string'}, - 'error': {'$ref': '#/definitions/Error'}}, - 'required': ['NotifyWatcherId'], - 'type': 'object'}}, - 'properties': {'ModelConfig': {'description': 'ModelConfig returns the ' - "current model's configuration.", - 'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}}, - 'type': 'object'}, - 'Prune': {'description': 'Prune endpoint removes action ' - 'entries until\n' - 'only the ones newer than now - ' - 'p.MaxHistoryTime remain and\n' - 'the history is smaller than ' - 'p.MaxHistoryMB.', - 'properties': {'Params': {'$ref': '#/definitions/ActionPruneArgs'}}, - 'type': 'object'}, - 'WatchForModelConfigChanges': {'description': 'WatchForModelConfigChanges ' - 'returns a ' - 'NotifyWatcher ' - 'that observes\n' - 'changes to the ' - 'model ' - 'configuration.\n' - 'Note that ' - 'although the ' - 'NotifyWatchResult ' - 'contains an ' - 'Error field,\n' - "it's not used " - 'because we are ' - 'only returning ' - 'a single ' - 'watcher,\n' - 'so we use the ' - 'regular error ' - 'return.', - 'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}}, - 'type': 'object'}}, + 'ErrorResult': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}}, + 'type': 'object'}, + 'InvalidateCredentialArg': {'additionalProperties': False, + 'properties': {'reason': {'type': 'string'}}, + 'type': 'object'}}, + 'properties': {'InvalidateModelCredential': {'description': 'InvalidateModelCredential ' + 'marks the cloud ' + 'credential for ' + 'this model as ' + 'invalid.', + 'properties': {'Params': {'$ref': '#/definitions/InvalidateCredentialArg'}, + 'Result': {'$ref': '#/definitions/ErrorResult'}}, + 'type': 'object'}}, 'type': 'object'} - @ReturnMapping(ModelConfigResult) - async def ModelConfig(self): - ''' - ModelConfig returns the current model's configuration. - - - Returns -> ModelConfigResult - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='ActionPruner', - request='ModelConfig', - version=1, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(None) - async def Prune(self, max_history_mb=None, max_history_time=None): - ''' - Prune endpoint removes action entries until - only the ones newer than now - p.MaxHistoryTime remain and - the history is smaller than p.MaxHistoryMB. - - max_history_mb : int - max_history_time : int - Returns -> None - ''' - if max_history_mb is not None and not isinstance(max_history_mb, int): - raise Exception("Expected max_history_mb to be a int, received: {}".format(type(max_history_mb))) - - if max_history_time is not None and not isinstance(max_history_time, int): - raise Exception("Expected max_history_time to be a int, received: {}".format(type(max_history_time))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='ActionPruner', - request='Prune', - version=1, - params=_params) - _params['max-history-mb'] = max_history_mb - _params['max-history-time'] = max_history_time - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(NotifyWatchResult) - async def WatchForModelConfigChanges(self): + @ReturnMapping(ErrorResult) + async def InvalidateModelCredential(self, reason=None): ''' - WatchForModelConfigChanges returns a NotifyWatcher that observes - changes to the model configuration. - Note that although the NotifyWatchResult contains an Error field, - it's not used because we are only returning a single watcher, - so we use the regular error return. - + InvalidateModelCredential marks the cloud credential for this model as invalid. - Returns -> NotifyWatchResult + reason : str + Returns -> ErrorResult ''' + if reason is not None and not isinstance(reason, (bytes, str)): + raise Exception("Expected reason to be a str, received: {}".format(type(reason))) # map input types to rpc msg _params = dict() - msg = dict(type='ActionPruner', - request='WatchForModelConfigChanges', + msg = dict(type='CredentialManager', + request='InvalidateModelCredential', version=1, params=_params) - + _params['reason'] = reason reply = await self.rpc(msg) return reply -class AgentLifeFlagFacade(Type): - name = 'AgentLifeFlag' +class FirewallRulesFacade(Type): + name = 'FirewallRules' 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, + schema = {'definitions': {'Error': {'additionalProperties': False, 'properties': {'code': {'type': 'string'}, 'info': {'patternProperties': {'.*': {'additionalProperties': True, 'type': 'object'}}, @@ -166,133 +67,113 @@ class AgentLifeFlagFacade(Type): 'message': {'type': 'string'}}, 'required': ['message', 'code'], 'type': 'object'}, - 'LifeResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'life': {'type': 'string'}}, - 'required': ['life'], - 'type': 'object'}, - 'LifeResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'}, - 'type': 'array'}}, - 'required': ['results'], + 'ErrorResult': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}}, 'type': 'object'}, - 'NotifyWatchResult': {'additionalProperties': False, - 'properties': {'NotifyWatcherId': {'type': 'string'}, - 'error': {'$ref': '#/definitions/Error'}}, - 'required': ['NotifyWatcherId'], - 'type': 'object'}, - 'NotifyWatchResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}}, - 'properties': {'Life': {'description': 'Life returns the life status of every ' - 'supplied entity, where available.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/LifeResults'}}, - 'type': 'object'}, - 'Watch': {'description': 'Watch starts an NotifyWatcher for ' - 'each given entity.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/NotifyWatchResults'}}, - 'type': 'object'}}, + 'ErrorResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, + 'type': 'array'}}, + 'required': ['results'], + 'type': 'object'}, + 'FirewallRule': {'additionalProperties': False, + 'properties': {'known-service': {'type': 'string'}, + 'whitelist-cidrs': {'items': {'type': 'string'}, + 'type': 'array'}}, + 'required': ['known-service'], + 'type': 'object'}, + 'FirewallRuleArgs': {'additionalProperties': False, + 'properties': {'args': {'items': {'$ref': '#/definitions/FirewallRule'}, + 'type': 'array'}}, + 'required': ['args'], + 'type': 'object'}, + 'ListFirewallRulesResults': {'additionalProperties': False, + 'properties': {'Rules': {'items': {'$ref': '#/definitions/FirewallRule'}, + 'type': 'array'}}, + 'required': ['Rules'], + 'type': 'object'}}, + 'properties': {'ListFirewallRules': {'description': 'ListFirewallRules ' + 'returns all the firewall ' + 'rules.', + 'properties': {'Result': {'$ref': '#/definitions/ListFirewallRulesResults'}}, + 'type': 'object'}, + 'SetFirewallRules': {'description': 'SetFirewallRules creates ' + 'or updates the specified ' + 'firewall rules.', + 'properties': {'Params': {'$ref': '#/definitions/FirewallRuleArgs'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}}, 'type': 'object'} - @ReturnMapping(LifeResults) - async def Life(self, entities=None): - ''' - Life returns the life status of every supplied entity, where available. - - entities : typing.Sequence[~Entity] - Returns -> LifeResults + @ReturnMapping(ListFirewallRulesResults) + async def ListFirewallRules(self): ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='AgentLifeFlag', - request='Life', - version=1, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - + ListFirewallRules returns all the firewall rules. - @ReturnMapping(NotifyWatchResults) - async def Watch(self, entities=None): - ''' - Watch starts an NotifyWatcher for each given entity. - entities : typing.Sequence[~Entity] - Returns -> NotifyWatchResults + Returns -> ListFirewallRulesResults ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) # map input types to rpc msg _params = dict() - msg = dict(type='AgentLifeFlag', - request='Watch', + msg = dict(type='FirewallRules', + request='ListFirewallRules', version=1, params=_params) - _params['entities'] = entities + reply = await self.rpc(msg) return reply -class AgentToolsFacade(Type): - name = 'AgentTools' - version = 1 - schema = {'properties': {'UpdateToolsAvailable': {'description': 'UpdateToolsAvailable ' - 'invokes a lookup and ' - 'further update in ' - 'environ\n' - 'for new patches of ' - 'the current tool ' - 'versions.', - 'type': 'object'}}, - 'type': 'object'} - - - @ReturnMapping(None) - async def UpdateToolsAvailable(self): + @ReturnMapping(ErrorResults) + async def SetFirewallRules(self, args=None): ''' - UpdateToolsAvailable invokes a lookup and further update in environ - for new patches of the current tool versions. - + SetFirewallRules creates or updates the specified firewall rules. - Returns -> None + args : typing.Sequence[~FirewallRule] + Returns -> ErrorResults ''' + if args is not None and not isinstance(args, (bytes, str, list)): + raise Exception("Expected args to be a Sequence, received: {}".format(type(args))) # map input types to rpc msg _params = dict() - msg = dict(type='AgentTools', - request='UpdateToolsAvailable', + msg = dict(type='FirewallRules', + request='SetFirewallRules', version=1, params=_params) - + _params['args'] = args reply = await self.rpc(msg) return reply -class ApplicationScalerFacade(Type): - name = 'ApplicationScaler' +class ImageMetadataManagerFacade(Type): + name = 'ImageMetadataManager' 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'}, + 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'}, + 'source': {'type': 'string'}, + 'stream': {'type': 'string'}, + 'version': {'type': 'string'}, + 'virt-type': {'type': 'string'}}, + 'required': ['image-id', + 'region', + 'version', + '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': {'patternProperties': {'.*': {'additionalProperties': True, @@ -309,97 +190,155 @@ class ApplicationScalerFacade(Type): 'type': 'array'}}, 'required': ['results'], 'type': 'object'}, - 'StringsWatchResult': {'additionalProperties': False, - 'properties': {'changes': {'items': {'type': 'string'}, + 'ImageMetadataFilter': {'additionalProperties': False, + 'properties': {'arches': {'items': {'type': 'string'}, 'type': 'array'}, - 'error': {'$ref': '#/definitions/Error'}, - 'watcher-id': {'type': 'string'}}, - 'required': ['watcher-id'], + 'region': {'type': 'string'}, + 'root-storage-type': {'type': 'string'}, + 'stream': {'type': 'string'}, + 'versions': {'items': {'type': 'string'}, + 'type': 'array'}, + 'virt-type': {'type': 'string'}}, + 'type': 'object'}, + 'ListCloudImageMetadataResult': {'additionalProperties': False, + 'properties': {'result': {'items': {'$ref': '#/definitions/CloudImageMetadata'}, + 'type': 'array'}}, + 'required': ['result'], + 'type': 'object'}, + 'MetadataImageIds': {'additionalProperties': False, + 'properties': {'image-ids': {'items': {'type': 'string'}, + 'type': 'array'}}, + 'required': ['image-ids'], + 'type': 'object'}, + 'MetadataSaveParams': {'additionalProperties': False, + 'properties': {'metadata': {'items': {'$ref': '#/definitions/CloudImageMetadataList'}, + 'type': 'array'}}, 'type': 'object'}}, - 'properties': {'Rescale': {'description': 'Rescale causes any supplied ' - 'services to be scaled up to their\n' - 'minimum size.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'Watch': {'description': 'Watch returns a watcher that sends ' - 'the names of services whose\n' - 'unit count may be below their ' - 'configured minimum.', - 'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}}, - 'type': 'object'}}, + 'properties': {'Delete': {'description': 'Delete deletes cloud image metadata ' + 'for given image ids.\n' + 'It supports bulk calls.', + 'properties': {'Params': {'$ref': '#/definitions/MetadataImageIds'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}, + 'List': {'description': 'List returns all found cloud image ' + 'metadata that satisfy\n' + 'given filter.\n' + 'Returned list contains metadata ' + 'ordered by priority.', + 'properties': {'Params': {'$ref': '#/definitions/ImageMetadataFilter'}, + 'Result': {'$ref': '#/definitions/ListCloudImageMetadataResult'}}, + 'type': 'object'}, + 'Save': {'description': 'Save stores given cloud image ' + 'metadata.\n' + 'It supports bulk calls.', + 'properties': {'Params': {'$ref': '#/definitions/MetadataSaveParams'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}}, 'type': 'object'} @ReturnMapping(ErrorResults) - async def Rescale(self, entities=None): + async def Delete(self, image_ids=None): ''' - Rescale causes any supplied services to be scaled up to their - minimum size. + Delete deletes cloud image metadata for given image ids. + It supports bulk calls. - entities : typing.Sequence[~Entity] + image_ids : typing.Sequence[str] Returns -> ErrorResults ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) + if image_ids is not None and not isinstance(image_ids, (bytes, str, list)): + raise Exception("Expected image_ids to be a Sequence, received: {}".format(type(image_ids))) # map input types to rpc msg _params = dict() - msg = dict(type='ApplicationScaler', - request='Rescale', + msg = dict(type='ImageMetadataManager', + request='Delete', version=1, params=_params) - _params['entities'] = entities + _params['image-ids'] = image_ids reply = await self.rpc(msg) return reply - @ReturnMapping(StringsWatchResult) - async def Watch(self): - ''' - Watch returns a watcher that sends the names of services whose - unit count may be below their configured minimum. - - - Returns -> StringsWatchResult + @ReturnMapping(ListCloudImageMetadataResult) + async def List(self, arches=None, region=None, root_storage_type=None, stream=None, versions=None, virt_type=None): ''' + List returns all found cloud image metadata that satisfy + given filter. + Returned list contains metadata ordered by priority. - # map input types to rpc msg - _params = dict() - msg = dict(type='ApplicationScaler', - request='Watch', + arches : typing.Sequence[str] + region : str + root_storage_type : str + stream : str + versions : typing.Sequence[str] + virt_type : str + Returns -> ListCloudImageMetadataResult + ''' + if arches is not None and not isinstance(arches, (bytes, str, list)): + raise Exception("Expected arches to be a Sequence, received: {}".format(type(arches))) + + if region is not None and not isinstance(region, (bytes, str)): + raise Exception("Expected region to be a str, received: {}".format(type(region))) + + if root_storage_type is not None and not isinstance(root_storage_type, (bytes, str)): + raise Exception("Expected root_storage_type to be a str, received: {}".format(type(root_storage_type))) + + if stream is not None and not isinstance(stream, (bytes, str)): + raise Exception("Expected stream to be a str, received: {}".format(type(stream))) + + if versions is not None and not isinstance(versions, (bytes, str, list)): + raise Exception("Expected versions to be a Sequence, received: {}".format(type(versions))) + + if virt_type is not None and not isinstance(virt_type, (bytes, str)): + raise Exception("Expected virt_type to be a str, received: {}".format(type(virt_type))) + + # map input types to rpc msg + _params = dict() + msg = dict(type='ImageMetadataManager', + request='List', version=1, params=_params) + _params['arches'] = arches + _params['region'] = region + _params['root-storage-type'] = root_storage_type + _params['stream'] = stream + _params['versions'] = versions + _params['virt-type'] = virt_type + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ErrorResults) + async def Save(self, metadata=None): + ''' + Save stores given cloud image metadata. + It supports bulk calls. + + metadata : typing.Sequence[~CloudImageMetadataList] + Returns -> ErrorResults + ''' + if metadata is not None and not isinstance(metadata, (bytes, str, list)): + raise Exception("Expected metadata to be a Sequence, received: {}".format(type(metadata))) + # map input types to rpc msg + _params = dict() + msg = dict(type='ImageMetadataManager', + request='Save', + version=1, + params=_params) + _params['metadata'] = metadata reply = await self.rpc(msg) return reply -class CAASAdmissionFacade(Type): - name = 'CAASAdmission' +class KeyManagerFacade(Type): + name = 'KeyManager' version = 1 - schema = {'definitions': {'ControllerAPIInfoResult': {'additionalProperties': False, - 'properties': {'addresses': {'items': {'type': 'string'}, - 'type': 'array'}, - 'cacert': {'type': 'string'}, - 'error': {'$ref': '#/definitions/Error'}}, - 'required': ['addresses', - 'cacert'], - 'type': 'object'}, - 'ControllerAPIInfoResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/ControllerAPIInfoResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'ControllerConfigResult': {'additionalProperties': False, - 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}}, - 'required': ['config'], - 'type': 'object'}, - 'Entities': {'additionalProperties': False, + schema = {'definitions': {'Entities': {'additionalProperties': False, 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'}, 'type': 'array'}}, 'required': ['entities'], @@ -415,715 +354,189 @@ class CAASAdmissionFacade(Type): 'type': 'object'}, 'message': {'type': 'string'}}, 'required': ['message', 'code'], - 'type': 'object'}}, - 'properties': {'ControllerAPIInfoForModels': {'description': 'ControllerAPIInfoForModels ' - 'returns the ' - 'controller api ' - 'connection ' - 'details for the ' - 'specified ' - 'models.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ControllerAPIInfoResults'}}, - 'type': 'object'}, - 'ControllerConfig': {'description': 'ControllerConfig returns ' - "the controller's " - 'configuration.', - 'properties': {'Result': {'$ref': '#/definitions/ControllerConfigResult'}}, - 'type': 'object'}}, + 'type': 'object'}, + 'ErrorResult': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}}, + 'type': 'object'}, + 'ErrorResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, + 'type': 'array'}}, + 'required': ['results'], + 'type': 'object'}, + 'ListSSHKeys': {'additionalProperties': False, + 'properties': {'entities': {'$ref': '#/definitions/Entities'}, + 'mode': {'type': 'boolean'}}, + 'required': ['entities', 'mode'], + 'type': 'object'}, + 'ModifyUserSSHKeys': {'additionalProperties': False, + 'properties': {'ssh-keys': {'items': {'type': 'string'}, + 'type': 'array'}, + 'user': {'type': 'string'}}, + 'required': ['user', 'ssh-keys'], + 'type': 'object'}, + 'StringsResult': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}, + 'result': {'items': {'type': 'string'}, + 'type': 'array'}}, + 'type': 'object'}, + 'StringsResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/StringsResult'}, + 'type': 'array'}}, + 'required': ['results'], + 'type': 'object'}}, + 'properties': {'AddKeys': {'description': 'AddKeys adds new authorised ssh ' + 'keys for the specified user.', + 'properties': {'Params': {'$ref': '#/definitions/ModifyUserSSHKeys'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}, + 'DeleteKeys': {'description': 'DeleteKeys deletes the ' + 'authorised ssh keys for the ' + 'specified user.', + 'properties': {'Params': {'$ref': '#/definitions/ModifyUserSSHKeys'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}, + 'ImportKeys': {'description': 'ImportKeys imports new ' + 'authorised ssh keys from the ' + 'specified key ids for the ' + 'specified user.', + 'properties': {'Params': {'$ref': '#/definitions/ModifyUserSSHKeys'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}, + 'ListKeys': {'description': 'ListKeys returns the authorised ' + 'ssh keys for the specified users.', + 'properties': {'Params': {'$ref': '#/definitions/ListSSHKeys'}, + 'Result': {'$ref': '#/definitions/StringsResults'}}, + 'type': 'object'}}, 'type': 'object'} - @ReturnMapping(ControllerAPIInfoResults) - async def ControllerAPIInfoForModels(self, entities=None): + @ReturnMapping(ErrorResults) + async def AddKeys(self, ssh_keys=None, user=None): ''' - ControllerAPIInfoForModels returns the controller api connection details for the specified models. + AddKeys adds new authorised ssh keys for the specified user. - entities : typing.Sequence[~Entity] - Returns -> ControllerAPIInfoResults + ssh_keys : typing.Sequence[str] + user : str + Returns -> ErrorResults ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) + if ssh_keys is not None and not isinstance(ssh_keys, (bytes, str, list)): + raise Exception("Expected ssh_keys to be a Sequence, received: {}".format(type(ssh_keys))) + + if user is not None and not isinstance(user, (bytes, str)): + raise Exception("Expected user to be a str, received: {}".format(type(user))) # map input types to rpc msg _params = dict() - msg = dict(type='CAASAdmission', - request='ControllerAPIInfoForModels', + msg = dict(type='KeyManager', + request='AddKeys', version=1, params=_params) - _params['entities'] = entities + _params['ssh-keys'] = ssh_keys + _params['user'] = user reply = await self.rpc(msg) return reply - @ReturnMapping(ControllerConfigResult) - async def ControllerConfig(self): + @ReturnMapping(ErrorResults) + async def DeleteKeys(self, ssh_keys=None, user=None): ''' - ControllerConfig returns the controller's configuration. - + DeleteKeys deletes the authorised ssh keys for the specified user. - Returns -> ControllerConfigResult + ssh_keys : typing.Sequence[str] + user : str + Returns -> ErrorResults ''' + if ssh_keys is not None and not isinstance(ssh_keys, (bytes, str, list)): + raise Exception("Expected ssh_keys to be a Sequence, received: {}".format(type(ssh_keys))) + + if user is not None and not isinstance(user, (bytes, str)): + raise Exception("Expected user to be a str, received: {}".format(type(user))) # map input types to rpc msg _params = dict() - msg = dict(type='CAASAdmission', - request='ControllerConfig', + msg = dict(type='KeyManager', + request='DeleteKeys', version=1, params=_params) - + _params['ssh-keys'] = ssh_keys + _params['user'] = user reply = await self.rpc(msg) return reply -class CAASApplicationFacade(Type): - name = 'CAASApplication' - version = 1 - schema = {'definitions': {'CAASUnitIntroduction': {'additionalProperties': False, - 'properties': {'agent-conf': {'items': {'type': 'integer'}, - 'type': 'array'}, - 'unit-name': {'type': 'string'}}, - 'required': ['unit-name', - 'agent-conf'], - 'type': 'object'}, - 'CAASUnitIntroductionArgs': {'additionalProperties': False, - 'properties': {'pod-name': {'type': 'string'}, - 'pod-uuid': {'type': 'string'}}, - 'required': ['pod-name', - 'pod-uuid'], - 'type': 'object'}, - 'CAASUnitIntroductionResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'result': {'$ref': '#/definitions/CAASUnitIntroduction'}}, - 'type': 'object'}, - 'CAASUnitTerminationResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}, - 'WillRestart': {'type': 'boolean'}}, - 'required': ['WillRestart', - 'Error'], - 'type': 'object'}, - 'Entity': {'additionalProperties': False, - 'properties': {'tag': {'type': 'string'}}, - 'required': ['tag'], - 'type': 'object'}, - 'Error': {'additionalProperties': False, - 'properties': {'code': {'type': 'string'}, - 'info': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'message': {'type': 'string'}}, - 'required': ['message', 'code'], - 'type': 'object'}}, - 'properties': {'UnitIntroduction': {'description': 'UnitIntroduction sets the ' - 'status of each given ' - 'entity.', - 'properties': {'Params': {'$ref': '#/definitions/CAASUnitIntroductionArgs'}, - 'Result': {'$ref': '#/definitions/CAASUnitIntroductionResult'}}, - 'type': 'object'}, - 'UnitTerminating': {'description': 'UnitTerminating should be ' - 'called by the ' - 'CAASUnitTerminationWorker ' - 'when\n' - 'the agent receives a ' - 'signal to exit. ' - 'UnitTerminating will ' - 'return how\n' - 'the agent should shutdown.', - 'properties': {'Params': {'$ref': '#/definitions/Entity'}, - 'Result': {'$ref': '#/definitions/CAASUnitTerminationResult'}}, - 'type': 'object'}}, - 'type': 'object'} - - - @ReturnMapping(CAASUnitIntroductionResult) - async def UnitIntroduction(self, pod_name=None, pod_uuid=None): + @ReturnMapping(ErrorResults) + async def ImportKeys(self, ssh_keys=None, user=None): ''' - UnitIntroduction sets the status of each given entity. + ImportKeys imports new authorised ssh keys from the specified key ids for the specified user. - pod_name : str - pod_uuid : str - Returns -> CAASUnitIntroductionResult + ssh_keys : typing.Sequence[str] + user : str + Returns -> ErrorResults ''' - if pod_name is not None and not isinstance(pod_name, (bytes, str)): - raise Exception("Expected pod_name to be a str, received: {}".format(type(pod_name))) + if ssh_keys is not None and not isinstance(ssh_keys, (bytes, str, list)): + raise Exception("Expected ssh_keys to be a Sequence, received: {}".format(type(ssh_keys))) - if pod_uuid is not None and not isinstance(pod_uuid, (bytes, str)): - raise Exception("Expected pod_uuid to be a str, received: {}".format(type(pod_uuid))) + if user is not None and not isinstance(user, (bytes, str)): + raise Exception("Expected user to be a str, received: {}".format(type(user))) # map input types to rpc msg _params = dict() - msg = dict(type='CAASApplication', - request='UnitIntroduction', + msg = dict(type='KeyManager', + request='ImportKeys', version=1, params=_params) - _params['pod-name'] = pod_name - _params['pod-uuid'] = pod_uuid + _params['ssh-keys'] = ssh_keys + _params['user'] = user reply = await self.rpc(msg) return reply - @ReturnMapping(CAASUnitTerminationResult) - async def UnitTerminating(self, tag=None): + @ReturnMapping(StringsResults) + async def ListKeys(self, entities=None, mode=None): ''' - UnitTerminating should be called by the CAASUnitTerminationWorker when - the agent receives a signal to exit. UnitTerminating will return how - the agent should shutdown. + ListKeys returns the authorised ssh keys for the specified users. - tag : str - Returns -> CAASUnitTerminationResult + entities : Entities + mode : bool + Returns -> StringsResults ''' - if tag is not None and not isinstance(tag, (bytes, str)): - raise Exception("Expected tag to be a str, received: {}".format(type(tag))) + if entities is not None and not isinstance(entities, (dict, Entities)): + raise Exception("Expected entities to be a Entities, received: {}".format(type(entities))) + + if mode is not None and not isinstance(mode, bool): + raise Exception("Expected mode to be a bool, received: {}".format(type(mode))) # map input types to rpc msg _params = dict() - msg = dict(type='CAASApplication', - request='UnitTerminating', + msg = dict(type='KeyManager', + request='ListKeys', version=1, params=_params) - _params['tag'] = tag + _params['entities'] = entities + _params['mode'] = mode reply = await self.rpc(msg) return reply -class CAASApplicationProvisionerFacade(Type): - name = 'CAASApplicationProvisioner' +class ModelUpgraderFacade(Type): + name = 'ModelUpgrader' version = 1 - schema = {'definitions': {'ApplicationUnitInfo': {'additionalProperties': False, - 'properties': {'provider-id': {'type': 'string'}, - 'unit-tag': {'type': 'string'}}, - 'required': ['provider-id', - 'unit-tag'], - 'type': 'object'}, - 'ApplicationUnitParams': {'additionalProperties': False, - 'properties': {'address': {'type': 'string'}, - 'data': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'filesystem-info': {'items': {'$ref': '#/definitions/KubernetesFilesystemInfo'}, - 'type': 'array'}, - 'info': {'type': 'string'}, - 'ports': {'items': {'type': 'string'}, - 'type': 'array'}, - 'provider-id': {'type': 'string'}, - 'stateful': {'type': 'boolean'}, - 'status': {'type': 'string'}, - 'unit-tag': {'type': 'string'}}, - 'required': ['provider-id', - 'unit-tag', - 'address', - 'ports', - 'status', - 'info'], - 'type': 'object'}, - 'Base': {'additionalProperties': False, - 'properties': {'channel': {'type': 'string'}, - 'name': {'type': 'string'}}, - 'required': ['name', 'channel'], - 'type': 'object'}, - 'CAASApplicationOCIResourceResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'result': {'$ref': '#/definitions/CAASApplicationOCIResources'}}, - 'type': 'object'}, - 'CAASApplicationOCIResourceResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/CAASApplicationOCIResourceResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'CAASApplicationOCIResources': {'additionalProperties': False, - 'properties': {'images': {'patternProperties': {'.*': {'$ref': '#/definitions/DockerImageInfo'}}, - 'type': 'object'}}, - 'required': ['images'], - 'type': 'object'}, - 'CAASApplicationProvisionerConfig': {'additionalProperties': False, - 'properties': {'unmanaged-applications': {'$ref': '#/definitions/Entities'}}, - 'type': 'object'}, - 'CAASApplicationProvisionerConfigResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'provisioner-config': {'$ref': '#/definitions/CAASApplicationProvisionerConfig'}}, - 'type': 'object'}, - 'CAASApplicationProvisioningInfo': {'additionalProperties': False, - 'properties': {'api-addresses': {'items': {'type': 'string'}, - 'type': 'array'}, - 'base': {'$ref': '#/definitions/Base'}, - 'ca-cert': {'type': 'string'}, - 'charm-modified-version': {'type': 'integer'}, - 'charm-url': {'type': 'string'}, - 'constraints': {'$ref': '#/definitions/Value'}, - 'devices': {'items': {'$ref': '#/definitions/KubernetesDeviceParams'}, - 'type': 'array'}, - 'error': {'$ref': '#/definitions/Error'}, - 'filesystems': {'items': {'$ref': '#/definitions/KubernetesFilesystemParams'}, - 'type': 'array'}, - 'image-repo': {'$ref': '#/definitions/DockerImageInfo'}, - 'scale': {'type': 'integer'}, - 'tags': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}, - 'trust': {'type': 'boolean'}, - 'version': {'$ref': '#/definitions/Number'}, - 'volumes': {'items': {'$ref': '#/definitions/KubernetesVolumeParams'}, - 'type': 'array'}}, - 'required': ['version', - 'api-addresses', - 'ca-cert', - 'constraints'], - 'type': 'object'}, - 'CAASApplicationProvisioningInfoResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/CAASApplicationProvisioningInfo'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'CAASApplicationProvisioningState': {'additionalProperties': False, - 'properties': {'scale-target': {'type': 'integer'}, - 'scaling': {'type': 'boolean'}}, - 'required': ['scaling', - 'scale-target'], - 'type': 'object'}, - 'CAASApplicationProvisioningStateArg': {'additionalProperties': False, - 'properties': {'application': {'$ref': '#/definitions/Entity'}, - 'provisioning-state': {'$ref': '#/definitions/CAASApplicationProvisioningState'}}, - 'required': ['application', - 'provisioning-state'], - 'type': 'object'}, - 'CAASApplicationProvisioningStateResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'provisioning-state': {'$ref': '#/definitions/CAASApplicationProvisioningState'}}, - 'type': 'object'}, - 'CAASUnitInfo': {'additionalProperties': False, - 'properties': {'tag': {'type': 'string'}, - 'unit-status': {'$ref': '#/definitions/UnitStatus'}}, - 'required': ['tag'], - 'type': 'object'}, - 'CAASUnitsResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'units': {'items': {'$ref': '#/definitions/CAASUnitInfo'}, - 'type': 'array'}}, - 'type': 'object'}, - 'CAASUnitsResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/CAASUnitsResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'Charm': {'additionalProperties': False, - 'properties': {'actions': {'$ref': '#/definitions/CharmActions'}, - 'config': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmOption'}}, - 'type': 'object'}, - 'lxd-profile': {'$ref': '#/definitions/CharmLXDProfile'}, - 'manifest': {'$ref': '#/definitions/CharmManifest'}, - 'meta': {'$ref': '#/definitions/CharmMeta'}, - 'metrics': {'$ref': '#/definitions/CharmMetrics'}, - 'revision': {'type': 'integer'}, - 'url': {'type': 'string'}}, - 'required': ['revision', 'url', 'config'], + schema = {'definitions': {'Error': {'additionalProperties': False, + 'properties': {'code': {'type': 'string'}, + 'info': {'patternProperties': {'.*': {'additionalProperties': True, + 'type': 'object'}}, + 'type': 'object'}, + 'message': {'type': 'string'}}, + 'required': ['message', 'code'], 'type': 'object'}, - 'CharmActionSpec': {'additionalProperties': False, - 'properties': {'description': {'type': 'string'}, - 'params': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}}, - 'required': ['description', 'params'], - 'type': 'object'}, - 'CharmActions': {'additionalProperties': False, - 'properties': {'specs': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmActionSpec'}}, - 'type': 'object'}}, - 'type': 'object'}, - 'CharmBase': {'additionalProperties': False, - 'properties': {'architectures': {'items': {'type': 'string'}, - 'type': 'array'}, - 'channel': {'type': 'string'}, - 'name': {'type': 'string'}}, - 'type': 'object'}, - 'CharmContainer': {'additionalProperties': False, - 'properties': {'mounts': {'items': {'$ref': '#/definitions/CharmMount'}, - 'type': 'array'}, - 'resource': {'type': 'string'}}, - 'type': 'object'}, - 'CharmDeployment': {'additionalProperties': False, - 'properties': {'min-version': {'type': 'string'}, - 'mode': {'type': 'string'}, - 'service': {'type': 'string'}, - 'type': {'type': 'string'}}, - 'required': ['type', - 'mode', - 'service', - 'min-version'], - 'type': 'object'}, - 'CharmDevice': {'additionalProperties': False, - 'properties': {'CountMax': {'type': 'integer'}, - 'CountMin': {'type': 'integer'}, - 'Description': {'type': 'string'}, - 'Name': {'type': 'string'}, - 'Type': {'type': 'string'}}, - 'required': ['Name', - 'Description', - 'Type', - 'CountMin', - 'CountMax'], - 'type': 'object'}, - 'CharmLXDProfile': {'additionalProperties': False, - 'properties': {'config': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}, - 'description': {'type': 'string'}, - 'devices': {'patternProperties': {'.*': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}}, - 'type': 'object'}}, - 'required': ['config', - 'description', - 'devices'], - 'type': 'object'}, - 'CharmManifest': {'additionalProperties': False, - 'properties': {'bases': {'items': {'$ref': '#/definitions/CharmBase'}, - 'type': 'array'}}, - 'type': 'object'}, - 'CharmMeta': {'additionalProperties': False, - 'properties': {'assumes-expr': {'$ref': '#/definitions/ExpressionTree'}, - 'categories': {'items': {'type': 'string'}, - 'type': 'array'}, - 'containers': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmContainer'}}, - 'type': 'object'}, - 'deployment': {'$ref': '#/definitions/CharmDeployment'}, - 'description': {'type': 'string'}, - 'devices': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmDevice'}}, - 'type': 'object'}, - 'extra-bindings': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}, - 'min-juju-version': {'type': 'string'}, - 'name': {'type': 'string'}, - 'payload-classes': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmPayloadClass'}}, - 'type': 'object'}, - 'peers': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmRelation'}}, - 'type': 'object'}, - 'provides': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmRelation'}}, - 'type': 'object'}, - 'requires': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmRelation'}}, - 'type': 'object'}, - 'resources': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmResourceMeta'}}, - 'type': 'object'}, - 'series': {'items': {'type': 'string'}, - 'type': 'array'}, - 'storage': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmStorage'}}, - 'type': 'object'}, - 'subordinate': {'type': 'boolean'}, - 'summary': {'type': 'string'}, - 'tags': {'items': {'type': 'string'}, - 'type': 'array'}, - 'terms': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'required': ['name', - 'summary', - 'description', - 'subordinate'], - 'type': 'object'}, - 'CharmMetric': {'additionalProperties': False, - 'properties': {'description': {'type': 'string'}, - 'type': {'type': 'string'}}, - 'required': ['type', 'description'], - 'type': 'object'}, - 'CharmMetrics': {'additionalProperties': False, - 'properties': {'metrics': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmMetric'}}, - 'type': 'object'}, - 'plan': {'$ref': '#/definitions/CharmPlan'}}, - 'required': ['metrics', 'plan'], - 'type': 'object'}, - 'CharmMount': {'additionalProperties': False, - 'properties': {'location': {'type': 'string'}, - 'storage': {'type': 'string'}}, + 'ModelParam': {'additionalProperties': False, + 'properties': {'model-tag': {'type': 'string'}}, + 'required': ['model-tag'], 'type': 'object'}, - 'CharmOption': {'additionalProperties': False, - 'properties': {'default': {'additionalProperties': True, - 'type': 'object'}, - 'description': {'type': 'string'}, - 'type': {'type': 'string'}}, - 'required': ['type'], - 'type': 'object'}, - 'CharmPayloadClass': {'additionalProperties': False, - 'properties': {'name': {'type': 'string'}, - 'type': {'type': 'string'}}, - 'required': ['name', 'type'], - 'type': 'object'}, - 'CharmPlan': {'additionalProperties': False, - 'properties': {'required': {'type': 'boolean'}}, - 'required': ['required'], - 'type': 'object'}, - 'CharmRelation': {'additionalProperties': False, - 'properties': {'interface': {'type': 'string'}, - 'limit': {'type': 'integer'}, - 'name': {'type': 'string'}, - 'optional': {'type': 'boolean'}, - 'role': {'type': 'string'}, - 'scope': {'type': 'string'}}, - 'required': ['name', - 'role', - 'interface', - 'optional', - 'limit', - 'scope'], - 'type': 'object'}, - 'CharmResourceMeta': {'additionalProperties': False, - 'properties': {'description': {'type': 'string'}, - 'name': {'type': 'string'}, - 'path': {'type': 'string'}, - 'type': {'type': 'string'}}, - 'required': ['name', - 'type', - 'path', - 'description'], - 'type': 'object'}, - 'CharmStorage': {'additionalProperties': False, - 'properties': {'count-max': {'type': 'integer'}, - 'count-min': {'type': 'integer'}, - 'description': {'type': 'string'}, - 'location': {'type': 'string'}, - 'minimum-size': {'type': 'integer'}, - 'name': {'type': 'string'}, - 'properties': {'items': {'type': 'string'}, - 'type': 'array'}, - 'read-only': {'type': 'boolean'}, - 'shared': {'type': 'boolean'}, - 'type': {'type': 'string'}}, - 'required': ['name', - 'description', - 'type', - 'shared', - 'read-only', - 'count-min', - 'count-max', - 'minimum-size'], - 'type': 'object'}, - 'CharmURL': {'additionalProperties': False, - 'properties': {'url': {'type': 'string'}}, - 'required': ['url'], - 'type': 'object'}, - 'DestroyUnitInfo': {'additionalProperties': False, - 'properties': {'destroyed-storage': {'items': {'$ref': '#/definitions/Entity'}, - 'type': 'array'}, - 'detached-storage': {'items': {'$ref': '#/definitions/Entity'}, - 'type': 'array'}}, - 'type': 'object'}, - 'DestroyUnitParams': {'additionalProperties': False, - 'properties': {'destroy-storage': {'type': 'boolean'}, - 'dry-run': {'type': 'boolean'}, - 'force': {'type': 'boolean'}, - 'max-wait': {'type': 'integer'}, - 'unit-tag': {'type': 'string'}}, - 'required': ['unit-tag'], - 'type': 'object'}, - 'DestroyUnitResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'info': {'$ref': '#/definitions/DestroyUnitInfo'}}, - 'type': 'object'}, - 'DestroyUnitResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/DestroyUnitResult'}, - 'type': 'array'}}, - 'type': 'object'}, - 'DestroyUnitsParams': {'additionalProperties': False, - 'properties': {'units': {'items': {'$ref': '#/definitions/DestroyUnitParams'}, - 'type': 'array'}}, - 'required': ['units'], - 'type': 'object'}, - 'DetailedStatus': {'additionalProperties': False, - 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'err': {'$ref': '#/definitions/Error'}, - 'info': {'type': 'string'}, - 'kind': {'type': 'string'}, - 'life': {'type': 'string'}, - 'since': {'format': 'date-time', - 'type': 'string'}, - 'status': {'type': 'string'}, - 'version': {'type': 'string'}}, - 'required': ['status', - 'info', - 'data', - 'since', - 'kind', - 'version', - 'life'], - 'type': 'object'}, - 'DockerImageInfo': {'additionalProperties': False, - 'properties': {'auth': {'type': 'string'}, - 'email': {'type': 'string'}, - 'identitytoken': {'type': 'string'}, - 'image-name': {'type': 'string'}, - 'password': {'type': 'string'}, - 'registrytoken': {'type': 'string'}, - 'repository': {'type': 'string'}, - 'serveraddress': {'type': 'string'}, - 'username': {'type': 'string'}}, - 'required': ['image-name'], - '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'}, - 'EntityStatus': {'additionalProperties': False, - 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'info': {'type': 'string'}, - 'since': {'format': 'date-time', - 'type': 'string'}, - 'status': {'type': 'string'}}, - 'required': ['status', 'info', 'since'], - 'type': 'object'}, - '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': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'message': {'type': 'string'}}, - 'required': ['message', 'code'], - 'type': 'object'}, - 'ErrorResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}}, - 'type': 'object'}, - 'ErrorResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'ExpressionTree': {'additionalProperties': False, - 'properties': {'Expression': {'additionalProperties': True, - 'type': 'object'}}, - 'required': ['Expression'], - 'type': 'object'}, - 'KubernetesDeviceParams': {'additionalProperties': False, - 'properties': {'Attributes': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}, - 'Count': {'type': 'integer'}, - 'Type': {'type': 'string'}}, - 'required': ['Type', - 'Count', - 'Attributes'], - 'type': 'object'}, - 'KubernetesFilesystemAttachmentParams': {'additionalProperties': False, - 'properties': {'mount-point': {'type': 'string'}, - 'provider': {'type': 'string'}, - 'read-only': {'type': 'boolean'}}, - 'required': ['provider'], - 'type': 'object'}, - 'KubernetesFilesystemInfo': {'additionalProperties': False, - 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'filesystem-id': {'type': 'string'}, - 'info': {'type': 'string'}, - 'mount-point': {'type': 'string'}, - 'pool': {'type': 'string'}, - 'read-only': {'type': 'boolean'}, - 'size': {'type': 'integer'}, - 'status': {'type': 'string'}, - 'storagename': {'type': 'string'}, - 'volume': {'$ref': '#/definitions/KubernetesVolumeInfo'}}, - 'required': ['storagename', - 'pool', - 'size', - 'filesystem-id', - 'status', - 'info', - 'volume'], - 'type': 'object'}, - 'KubernetesFilesystemParams': {'additionalProperties': False, - 'properties': {'attachment': {'$ref': '#/definitions/KubernetesFilesystemAttachmentParams'}, - 'attributes': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'provider': {'type': 'string'}, - 'size': {'type': 'integer'}, - 'storagename': {'type': 'string'}, - 'tags': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}}, - 'required': ['storagename', - 'size', - 'provider'], - 'type': 'object'}, - 'KubernetesVolumeAttachmentParams': {'additionalProperties': False, - 'properties': {'provider': {'type': 'string'}, - 'read-only': {'type': 'boolean'}}, - 'required': ['provider'], - 'type': 'object'}, - 'KubernetesVolumeInfo': {'additionalProperties': False, - 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'info': {'type': 'string'}, - 'persistent': {'type': 'boolean'}, - 'pool': {'type': 'string'}, - 'size': {'type': 'integer'}, - 'status': {'type': 'string'}, - 'volume-id': {'type': 'string'}}, - 'required': ['volume-id', - 'size', - 'persistent', - 'status', - 'info'], - 'type': 'object'}, - 'KubernetesVolumeParams': {'additionalProperties': False, - 'properties': {'attachment': {'$ref': '#/definitions/KubernetesVolumeAttachmentParams'}, - 'attributes': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'provider': {'type': 'string'}, - 'size': {'type': 'integer'}, - 'storagename': {'type': 'string'}, - 'tags': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}}, - 'required': ['storagename', - 'size', - 'provider'], - 'type': 'object'}, - 'LifeResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'life': {'type': 'string'}}, - 'required': ['life'], - 'type': 'object'}, - 'LifeResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'NotifyWatchResult': {'additionalProperties': False, - 'properties': {'NotifyWatcherId': {'type': 'string'}, - 'error': {'$ref': '#/definitions/Error'}}, - 'required': ['NotifyWatcherId'], - 'type': 'object'}, - 'NotifyWatchResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, 'Number': {'additionalProperties': False, 'properties': {'Build': {'type': 'integer'}, 'Major': {'type': 'integer'}, @@ -1136,388 +549,186 @@ class CAASApplicationProvisionerFacade(Type): 'Patch', 'Build'], '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'}, - 'watcher-id': {'type': 'string'}}, - 'required': ['watcher-id'], + 'UpgradeModelParams': {'additionalProperties': False, + 'properties': {'agent-stream': {'type': 'string'}, + 'dry-run': {'type': 'boolean'}, + 'ignore-agent-versions': {'type': 'boolean'}, + 'model-tag': {'type': 'string'}, + 'target-version': {'$ref': '#/definitions/Number'}}, + 'required': ['model-tag', + 'target-version'], 'type': 'object'}, - 'StringsWatchResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'UnitStatus': {'additionalProperties': False, - 'properties': {'address': {'type': 'string'}, - 'agent-status': {'$ref': '#/definitions/DetailedStatus'}, - 'charm': {'type': 'string'}, - 'leader': {'type': 'boolean'}, - 'machine': {'type': 'string'}, - 'opened-ports': {'items': {'type': 'string'}, - 'type': 'array'}, - 'provider-id': {'type': 'string'}, - 'public-address': {'type': 'string'}, - 'subordinates': {'patternProperties': {'.*': {'$ref': '#/definitions/UnitStatus'}}, - 'type': 'object'}, - 'workload-status': {'$ref': '#/definitions/DetailedStatus'}, - 'workload-version': {'type': 'string'}}, - 'required': ['agent-status', - 'workload-status', - 'workload-version', - 'machine', - 'opened-ports', - 'public-address', - 'charm', - 'subordinates'], - 'type': 'object'}, - 'UpdateApplicationUnitArgs': {'additionalProperties': False, - 'properties': {'args': {'items': {'$ref': '#/definitions/UpdateApplicationUnits'}, - 'type': 'array'}}, - 'required': ['args'], - 'type': 'object'}, - 'UpdateApplicationUnitResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'info': {'$ref': '#/definitions/UpdateApplicationUnitsInfo'}}, - 'type': 'object'}, - 'UpdateApplicationUnitResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/UpdateApplicationUnitResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'UpdateApplicationUnits': {'additionalProperties': False, - 'properties': {'application-tag': {'type': 'string'}, - 'generation': {'type': 'integer'}, - 'scale': {'type': 'integer'}, - 'status': {'$ref': '#/definitions/EntityStatus'}, - 'units': {'items': {'$ref': '#/definitions/ApplicationUnitParams'}, - 'type': 'array'}}, - 'required': ['application-tag', - 'units'], - 'type': 'object'}, - 'UpdateApplicationUnitsInfo': {'additionalProperties': False, - 'properties': {'units': {'items': {'$ref': '#/definitions/ApplicationUnitInfo'}, - 'type': 'array'}}, - 'required': ['units'], - 'type': 'object'}, - 'Value': {'additionalProperties': False, - 'properties': {'allocate-public-ip': {'type': 'boolean'}, - 'arch': {'type': 'string'}, - 'container': {'type': 'string'}, - 'cores': {'type': 'integer'}, - 'cpu-power': {'type': 'integer'}, - 'image-id': {'type': 'string'}, - 'instance-role': {'type': 'string'}, - 'instance-type': {'type': 'string'}, - 'mem': {'type': 'integer'}, - 'root-disk': {'type': 'integer'}, - 'root-disk-source': {'type': 'string'}, - 'spaces': {'items': {'type': 'string'}, - 'type': 'array'}, - 'tags': {'items': {'type': 'string'}, - 'type': 'array'}, - 'virt-type': {'type': 'string'}, - 'zones': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'type': 'object'}}, - 'properties': {'ApplicationCharmInfo': {'description': 'ApplicationCharmInfo ' - 'returns information ' - 'about an ' - "application's charm.", - 'properties': {'Params': {'$ref': '#/definitions/Entity'}, - 'Result': {'$ref': '#/definitions/Charm'}}, - 'type': 'object'}, - 'ApplicationOCIResources': {'description': 'ApplicationOCIResources ' - 'returns the OCI ' - 'image resources ' - 'for an ' - 'application.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/CAASApplicationOCIResourceResults'}}, - 'type': 'object'}, - 'CharmInfo': {'description': 'CharmInfo returns information ' - 'about the requested charm.', - 'properties': {'Params': {'$ref': '#/definitions/CharmURL'}, - 'Result': {'$ref': '#/definitions/Charm'}}, - 'type': 'object'}, - 'ClearApplicationsResources': {'description': 'ClearApplicationsResources ' - 'clears the ' - 'flags which ' - 'indicate\n' - 'applications ' - 'still have ' - 'resources in ' - 'the cluster.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'DestroyUnits': {'description': 'DestroyUnits is responsible ' - 'for scaling down a set of ' - 'units on the this\n' - 'Application.', - 'properties': {'Params': {'$ref': '#/definitions/DestroyUnitsParams'}, - 'Result': {'$ref': '#/definitions/DestroyUnitResults'}}, - 'type': 'object'}, - 'Life': {'description': 'Life returns the life status of every ' - 'supplied entity, where available.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/LifeResults'}}, - 'type': 'object'}, - 'ProvisionerConfig': {'description': 'ProvisionerConfig ' - 'returns the ' - "provisioner's " - 'configuration.', - 'properties': {'Result': {'$ref': '#/definitions/CAASApplicationProvisionerConfigResult'}}, - 'type': 'object'}, - 'ProvisioningInfo': {'description': 'ProvisioningInfo returns ' - 'the info needed to ' - 'provision a caas ' - 'application.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/CAASApplicationProvisioningInfoResults'}}, - 'type': 'object'}, - 'ProvisioningState': {'description': 'ProvisioningState ' - 'returns the provisioning ' - 'state for the ' - 'application.', - 'properties': {'Params': {'$ref': '#/definitions/Entity'}, - 'Result': {'$ref': '#/definitions/CAASApplicationProvisioningStateResult'}}, - 'type': 'object'}, - 'Remove': {'description': 'Remove removes every given entity ' - 'from state, calling EnsureDead\n' - 'first, then Remove. It will fail if ' - 'the entity is not present.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'SetOperatorStatus': {'description': 'SetOperatorStatus sets ' - 'the status of each given ' - 'entity.', - 'properties': {'Params': {'$ref': '#/definitions/SetStatus'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'SetPasswords': {'description': 'SetPasswords sets the given ' - 'password for each supplied ' - 'entity, if possible.', - 'properties': {'Params': {'$ref': '#/definitions/EntityPasswords'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'SetProvisioningState': {'description': 'SetProvisioningState ' - 'sets the provisioning ' - 'state for the ' - 'application.', - 'properties': {'Params': {'$ref': '#/definitions/CAASApplicationProvisioningStateArg'}, - 'Result': {'$ref': '#/definitions/ErrorResult'}}, - 'type': 'object'}, - 'Units': {'description': 'Units returns all the units for each ' - 'application specified.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/CAASUnitsResults'}}, - 'type': 'object'}, - 'UpdateApplicationsUnits': {'description': 'UpdateApplicationsUnits ' - 'updates the Juju ' - 'data model to ' - 'reflect the given\n' - 'units of the ' - 'specified ' - 'application.', - 'properties': {'Params': {'$ref': '#/definitions/UpdateApplicationUnitArgs'}, - 'Result': {'$ref': '#/definitions/UpdateApplicationUnitResults'}}, - 'type': 'object'}, - 'Watch': {'description': 'Watch starts an NotifyWatcher for ' - 'each given entity.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/NotifyWatchResults'}}, - 'type': 'object'}, - 'WatchApplications': {'description': 'WatchApplications starts ' - 'a StringsWatcher to ' - 'watch applications\n' - 'deployed to this model.', - 'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}}, + 'UpgradeModelResult': {'additionalProperties': False, + 'properties': {'chosen-version': {'$ref': '#/definitions/Number'}, + 'error': {'$ref': '#/definitions/Error'}}, + 'required': ['chosen-version'], + 'type': 'object'}}, + 'properties': {'AbortModelUpgrade': {'description': 'AbortModelUpgrade aborts ' + 'and archives the model ' + 'upgrade\n' + 'synchronisation record, ' + 'if any.', + 'properties': {'Params': {'$ref': '#/definitions/ModelParam'}}, 'type': 'object'}, - 'WatchProvisioningInfo': {'description': 'WatchProvisioningInfo ' - 'provides a watcher ' - 'for changes that ' - 'affect the\n' - 'information returned ' - 'by ProvisioningInfo. ' - 'This is useful for ' - 'ensuring the\n' - 'latest application ' - 'stated is ensured.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/NotifyWatchResults'}}, - 'type': 'object'}, - 'WatchUnits': {'description': 'WatchUnits starts a ' - 'StringsWatcher to watch changes ' - 'to the\n' - 'lifecycle states of units for ' - 'the specified applications in\n' - 'this model.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/StringsWatchResults'}}, - 'type': 'object'}}, + 'UpgradeModel': {'description': 'UpgradeModel upgrades a ' + 'model.', + 'properties': {'Params': {'$ref': '#/definitions/UpgradeModelParams'}, + 'Result': {'$ref': '#/definitions/UpgradeModelResult'}}, + 'type': 'object'}}, 'type': 'object'} - @ReturnMapping(Charm) - async def ApplicationCharmInfo(self, tag=None): + @ReturnMapping(None) + async def AbortModelUpgrade(self, model_tag=None): ''' - ApplicationCharmInfo returns information about an application's charm. + AbortModelUpgrade aborts and archives the model upgrade + synchronisation record, if any. - tag : str - Returns -> Charm + model_tag : str + Returns -> None ''' - if tag is not None and not isinstance(tag, (bytes, str)): - raise Exception("Expected tag to be a str, received: {}".format(type(tag))) + if model_tag is not None and not isinstance(model_tag, (bytes, str)): + raise Exception("Expected model_tag to be a str, received: {}".format(type(model_tag))) # map input types to rpc msg _params = dict() - msg = dict(type='CAASApplicationProvisioner', - request='ApplicationCharmInfo', + msg = dict(type='ModelUpgrader', + request='AbortModelUpgrade', version=1, params=_params) - _params['tag'] = tag + _params['model-tag'] = model_tag reply = await self.rpc(msg) return reply - @ReturnMapping(CAASApplicationOCIResourceResults) - async def ApplicationOCIResources(self, entities=None): + @ReturnMapping(UpgradeModelResult) + async def UpgradeModel(self, agent_stream=None, dry_run=None, ignore_agent_versions=None, model_tag=None, target_version=None): ''' - ApplicationOCIResources returns the OCI image resources for an application. + UpgradeModel upgrades a model. - entities : typing.Sequence[~Entity] - Returns -> CAASApplicationOCIResourceResults + agent_stream : str + dry_run : bool + ignore_agent_versions : bool + model_tag : str + target_version : Number + Returns -> UpgradeModelResult ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='CAASApplicationProvisioner', - request='ApplicationOCIResources', - version=1, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply + if agent_stream is not None and not isinstance(agent_stream, (bytes, str)): + raise Exception("Expected agent_stream to be a str, received: {}".format(type(agent_stream))) + if dry_run is not None and not isinstance(dry_run, bool): + raise Exception("Expected dry_run to be a bool, received: {}".format(type(dry_run))) + if ignore_agent_versions is not None and not isinstance(ignore_agent_versions, bool): + raise Exception("Expected ignore_agent_versions to be a bool, received: {}".format(type(ignore_agent_versions))) - @ReturnMapping(Charm) - async def CharmInfo(self, url=None): - ''' - CharmInfo returns information about the requested charm. + if model_tag is not None and not isinstance(model_tag, (bytes, str)): + raise Exception("Expected model_tag to be a str, received: {}".format(type(model_tag))) - url : str - Returns -> Charm - ''' - if url is not None and not isinstance(url, (bytes, str)): - raise Exception("Expected url to be a str, received: {}".format(type(url))) + if target_version is not None and not isinstance(target_version, (dict, Number)): + raise Exception("Expected target_version to be a Number, received: {}".format(type(target_version))) # map input types to rpc msg _params = dict() - msg = dict(type='CAASApplicationProvisioner', - request='CharmInfo', + msg = dict(type='ModelUpgrader', + request='UpgradeModel', version=1, params=_params) - _params['url'] = url + _params['agent-stream'] = agent_stream + _params['dry-run'] = dry_run + _params['ignore-agent-versions'] = ignore_agent_versions + _params['model-tag'] = model_tag + _params['target-version'] = target_version reply = await self.rpc(msg) return reply - @ReturnMapping(ErrorResults) - async def ClearApplicationsResources(self, entities=None): - ''' - ClearApplicationsResources clears the flags which indicate - applications still have resources in the cluster. - - entities : typing.Sequence[~Entity] - Returns -> ErrorResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='CAASApplicationProvisioner', - request='ClearApplicationsResources', - version=1, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - +class PayloadsFacade(Type): + name = 'Payloads' + version = 1 + schema = {'definitions': {'Payload': {'additionalProperties': False, + 'properties': {'class': {'type': 'string'}, + 'id': {'type': 'string'}, + 'labels': {'items': {'type': 'string'}, + 'type': 'array'}, + 'machine': {'type': 'string'}, + 'status': {'type': 'string'}, + 'type': {'type': 'string'}, + 'unit': {'type': 'string'}}, + 'required': ['class', + 'type', + 'id', + 'status', + 'labels', + 'unit', + 'machine'], + 'type': 'object'}, + 'PayloadListArgs': {'additionalProperties': False, + 'properties': {'patterns': {'items': {'type': 'string'}, + 'type': 'array'}}, + 'required': ['patterns'], + 'type': 'object'}, + 'PayloadListResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/Payload'}, + 'type': 'array'}}, + 'required': ['results'], + 'type': 'object'}}, + 'properties': {'List': {'description': 'List builds the list of payloads ' + 'being tracked for\n' + 'the given unit and IDs. If no IDs are ' + 'provided then all tracked\n' + 'payloads for the unit are returned.', + 'properties': {'Params': {'$ref': '#/definitions/PayloadListArgs'}, + 'Result': {'$ref': '#/definitions/PayloadListResults'}}, + 'type': 'object'}}, + 'type': 'object'} + - @ReturnMapping(DestroyUnitResults) - async def DestroyUnits(self, units=None): + @ReturnMapping(PayloadListResults) + async def List(self, patterns=None): ''' - DestroyUnits is responsible for scaling down a set of units on the this - Application. + List builds the list of payloads being tracked for + the given unit and IDs. If no IDs are provided then all tracked + payloads for the unit are returned. - units : typing.Sequence[~DestroyUnitParams] - Returns -> DestroyUnitResults + patterns : typing.Sequence[str] + Returns -> PayloadListResults ''' - if units is not None and not isinstance(units, (bytes, str, list)): - raise Exception("Expected units to be a Sequence, received: {}".format(type(units))) + if patterns is not None and not isinstance(patterns, (bytes, str, list)): + raise Exception("Expected patterns to be a Sequence, received: {}".format(type(patterns))) # map input types to rpc msg _params = dict() - msg = dict(type='CAASApplicationProvisioner', - request='DestroyUnits', + msg = dict(type='Payloads', + request='List', version=1, params=_params) - _params['units'] = units + _params['patterns'] = patterns reply = await self.rpc(msg) return reply - @ReturnMapping(LifeResults) - async def Life(self, entities=None): - ''' - Life returns the life status of every supplied entity, where available. - - entities : typing.Sequence[~Entity] - Returns -> LifeResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='CAASApplicationProvisioner', - request='Life', - version=1, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - +class PingerFacade(Type): + name = 'Pinger' + version = 1 + schema = {'properties': {'Ping': {'type': 'object'}, 'Stop': {'type': 'object'}}, + 'type': 'object'} + - @ReturnMapping(CAASApplicationProvisionerConfigResult) - async def ProvisionerConfig(self): + @ReturnMapping(None) + async def Ping(self): ''' - ProvisionerConfig returns the provisioner's configuration. - - Returns -> CAASApplicationProvisionerConfigResult + Returns -> None ''' # map input types to rpc msg _params = dict() - msg = dict(type='CAASApplicationProvisioner', - request='ProvisionerConfig', + msg = dict(type='Pinger', + request='Ping', version=1, params=_params) @@ -1526,10626 +737,47 @@ async def ProvisionerConfig(self): - @ReturnMapping(CAASApplicationProvisioningInfoResults) - async def ProvisioningInfo(self, entities=None): + @ReturnMapping(None) + async def Stop(self): ''' - ProvisioningInfo returns the info needed to provision a caas application. - entities : typing.Sequence[~Entity] - Returns -> CAASApplicationProvisioningInfoResults + Returns -> None ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) # map input types to rpc msg _params = dict() - msg = dict(type='CAASApplicationProvisioner', - request='ProvisioningInfo', + msg = dict(type='Pinger', + request='Stop', version=1, params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - @ReturnMapping(CAASApplicationProvisioningStateResult) - async def ProvisioningState(self, tag=None): - ''' - ProvisioningState returns the provisioning state for the application. - - tag : str - Returns -> CAASApplicationProvisioningStateResult - ''' - if tag is not None and not isinstance(tag, (bytes, str)): - raise Exception("Expected tag to be a str, received: {}".format(type(tag))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='CAASApplicationProvisioner', - request='ProvisioningState', - version=1, - params=_params) - _params['tag'] = tag reply = await self.rpc(msg) return reply - @ReturnMapping(ErrorResults) - async def Remove(self, entities=None): - ''' - Remove removes every given entity from state, calling EnsureDead - first, then Remove. It will fail if the entity is not present. - - entities : typing.Sequence[~Entity] - Returns -> ErrorResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='CAASApplicationProvisioner', - request='Remove', - version=1, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def SetOperatorStatus(self, entities=None): - ''' - SetOperatorStatus sets the status of each given entity. - - entities : typing.Sequence[~EntityStatusArgs] - Returns -> ErrorResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='CAASApplicationProvisioner', - request='SetOperatorStatus', - version=1, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def SetPasswords(self, changes=None): - ''' - SetPasswords sets the given password for each supplied entity, if possible. - - changes : typing.Sequence[~EntityPassword] - Returns -> ErrorResults - ''' - if changes is not None and not isinstance(changes, (bytes, str, list)): - raise Exception("Expected changes to be a Sequence, received: {}".format(type(changes))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='CAASApplicationProvisioner', - request='SetPasswords', - version=1, - params=_params) - _params['changes'] = changes - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResult) - async def SetProvisioningState(self, application=None, provisioning_state=None): - ''' - SetProvisioningState sets the provisioning state for the application. - - application : Entity - provisioning_state : CAASApplicationProvisioningState - Returns -> ErrorResult - ''' - if application is not None and not isinstance(application, (dict, Entity)): - raise Exception("Expected application to be a Entity, received: {}".format(type(application))) - - if provisioning_state is not None and not isinstance(provisioning_state, (dict, CAASApplicationProvisioningState)): - raise Exception("Expected provisioning_state to be a CAASApplicationProvisioningState, received: {}".format(type(provisioning_state))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='CAASApplicationProvisioner', - request='SetProvisioningState', - version=1, - params=_params) - _params['application'] = application - _params['provisioning-state'] = provisioning_state - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(CAASUnitsResults) - async def Units(self, entities=None): - ''' - Units returns all the units for each application specified. - - entities : typing.Sequence[~Entity] - Returns -> CAASUnitsResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='CAASApplicationProvisioner', - request='Units', - version=1, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(UpdateApplicationUnitResults) - async def UpdateApplicationsUnits(self, args=None): - ''' - UpdateApplicationsUnits updates the Juju data model to reflect the given - units of the specified application. - - args : typing.Sequence[~UpdateApplicationUnits] - Returns -> UpdateApplicationUnitResults - ''' - if args is not None and not isinstance(args, (bytes, str, list)): - raise Exception("Expected args to be a Sequence, received: {}".format(type(args))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='CAASApplicationProvisioner', - request='UpdateApplicationsUnits', - version=1, - params=_params) - _params['args'] = args - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(NotifyWatchResults) - async def Watch(self, entities=None): - ''' - Watch starts an NotifyWatcher for each given entity. - - entities : typing.Sequence[~Entity] - Returns -> NotifyWatchResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='CAASApplicationProvisioner', - request='Watch', - version=1, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringsWatchResult) - async def WatchApplications(self): - ''' - WatchApplications starts a StringsWatcher to watch applications - deployed to this model. - - - Returns -> StringsWatchResult - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='CAASApplicationProvisioner', - request='WatchApplications', - version=1, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(NotifyWatchResults) - async def WatchProvisioningInfo(self, entities=None): - ''' - WatchProvisioningInfo provides a watcher for changes that affect the - information returned by ProvisioningInfo. This is useful for ensuring the - latest application stated is ensured. - - entities : typing.Sequence[~Entity] - Returns -> NotifyWatchResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='CAASApplicationProvisioner', - request='WatchProvisioningInfo', - version=1, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringsWatchResults) - async def WatchUnits(self, entities=None): - ''' - WatchUnits starts a StringsWatcher to watch changes to the - lifecycle states of units for the specified applications in - this model. - - entities : typing.Sequence[~Entity] - Returns -> StringsWatchResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='CAASApplicationProvisioner', - request='WatchUnits', - version=1, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - -class CAASFirewallerFacade(Type): - name = 'CAASFirewaller' - version = 1 - schema = {'definitions': {'ApplicationGetConfigResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/ConfigResult'}, - 'type': 'array'}}, - 'required': ['Results'], - 'type': 'object'}, - 'BoolResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'result': {'type': 'boolean'}}, - 'required': ['result'], - 'type': 'object'}, - 'BoolResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/BoolResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'Charm': {'additionalProperties': False, - 'properties': {'actions': {'$ref': '#/definitions/CharmActions'}, - 'config': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmOption'}}, - 'type': 'object'}, - 'lxd-profile': {'$ref': '#/definitions/CharmLXDProfile'}, - 'manifest': {'$ref': '#/definitions/CharmManifest'}, - 'meta': {'$ref': '#/definitions/CharmMeta'}, - 'metrics': {'$ref': '#/definitions/CharmMetrics'}, - 'revision': {'type': 'integer'}, - 'url': {'type': 'string'}}, - 'required': ['revision', 'url', 'config'], - 'type': 'object'}, - 'CharmActionSpec': {'additionalProperties': False, - 'properties': {'description': {'type': 'string'}, - 'params': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}}, - 'required': ['description', 'params'], - 'type': 'object'}, - 'CharmActions': {'additionalProperties': False, - 'properties': {'specs': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmActionSpec'}}, - 'type': 'object'}}, - 'type': 'object'}, - 'CharmBase': {'additionalProperties': False, - 'properties': {'architectures': {'items': {'type': 'string'}, - 'type': 'array'}, - 'channel': {'type': 'string'}, - 'name': {'type': 'string'}}, - 'type': 'object'}, - 'CharmContainer': {'additionalProperties': False, - 'properties': {'mounts': {'items': {'$ref': '#/definitions/CharmMount'}, - 'type': 'array'}, - 'resource': {'type': 'string'}}, - 'type': 'object'}, - 'CharmDeployment': {'additionalProperties': False, - 'properties': {'min-version': {'type': 'string'}, - 'mode': {'type': 'string'}, - 'service': {'type': 'string'}, - 'type': {'type': 'string'}}, - 'required': ['type', - 'mode', - 'service', - 'min-version'], - 'type': 'object'}, - 'CharmDevice': {'additionalProperties': False, - 'properties': {'CountMax': {'type': 'integer'}, - 'CountMin': {'type': 'integer'}, - 'Description': {'type': 'string'}, - 'Name': {'type': 'string'}, - 'Type': {'type': 'string'}}, - 'required': ['Name', - 'Description', - 'Type', - 'CountMin', - 'CountMax'], - 'type': 'object'}, - 'CharmLXDProfile': {'additionalProperties': False, - 'properties': {'config': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}, - 'description': {'type': 'string'}, - 'devices': {'patternProperties': {'.*': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}}, - 'type': 'object'}}, - 'required': ['config', - 'description', - 'devices'], - 'type': 'object'}, - 'CharmManifest': {'additionalProperties': False, - 'properties': {'bases': {'items': {'$ref': '#/definitions/CharmBase'}, - 'type': 'array'}}, - 'type': 'object'}, - 'CharmMeta': {'additionalProperties': False, - 'properties': {'assumes-expr': {'$ref': '#/definitions/ExpressionTree'}, - 'categories': {'items': {'type': 'string'}, - 'type': 'array'}, - 'containers': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmContainer'}}, - 'type': 'object'}, - 'deployment': {'$ref': '#/definitions/CharmDeployment'}, - 'description': {'type': 'string'}, - 'devices': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmDevice'}}, - 'type': 'object'}, - 'extra-bindings': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}, - 'min-juju-version': {'type': 'string'}, - 'name': {'type': 'string'}, - 'payload-classes': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmPayloadClass'}}, - 'type': 'object'}, - 'peers': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmRelation'}}, - 'type': 'object'}, - 'provides': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmRelation'}}, - 'type': 'object'}, - 'requires': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmRelation'}}, - 'type': 'object'}, - 'resources': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmResourceMeta'}}, - 'type': 'object'}, - 'series': {'items': {'type': 'string'}, - 'type': 'array'}, - 'storage': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmStorage'}}, - 'type': 'object'}, - 'subordinate': {'type': 'boolean'}, - 'summary': {'type': 'string'}, - 'tags': {'items': {'type': 'string'}, - 'type': 'array'}, - 'terms': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'required': ['name', - 'summary', - 'description', - 'subordinate'], - 'type': 'object'}, - 'CharmMetric': {'additionalProperties': False, - 'properties': {'description': {'type': 'string'}, - 'type': {'type': 'string'}}, - 'required': ['type', 'description'], - 'type': 'object'}, - 'CharmMetrics': {'additionalProperties': False, - 'properties': {'metrics': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmMetric'}}, - 'type': 'object'}, - 'plan': {'$ref': '#/definitions/CharmPlan'}}, - 'required': ['metrics', 'plan'], - 'type': 'object'}, - 'CharmMount': {'additionalProperties': False, - 'properties': {'location': {'type': 'string'}, - 'storage': {'type': 'string'}}, - 'type': 'object'}, - 'CharmOption': {'additionalProperties': False, - 'properties': {'default': {'additionalProperties': True, - 'type': 'object'}, - 'description': {'type': 'string'}, - 'type': {'type': 'string'}}, - 'required': ['type'], - 'type': 'object'}, - 'CharmPayloadClass': {'additionalProperties': False, - 'properties': {'name': {'type': 'string'}, - 'type': {'type': 'string'}}, - 'required': ['name', 'type'], - 'type': 'object'}, - 'CharmPlan': {'additionalProperties': False, - 'properties': {'required': {'type': 'boolean'}}, - 'required': ['required'], - 'type': 'object'}, - 'CharmRelation': {'additionalProperties': False, - 'properties': {'interface': {'type': 'string'}, - 'limit': {'type': 'integer'}, - 'name': {'type': 'string'}, - 'optional': {'type': 'boolean'}, - 'role': {'type': 'string'}, - 'scope': {'type': 'string'}}, - 'required': ['name', - 'role', - 'interface', - 'optional', - 'limit', - 'scope'], - 'type': 'object'}, - 'CharmResourceMeta': {'additionalProperties': False, - 'properties': {'description': {'type': 'string'}, - 'name': {'type': 'string'}, - 'path': {'type': 'string'}, - 'type': {'type': 'string'}}, - 'required': ['name', - 'type', - 'path', - 'description'], - 'type': 'object'}, - 'CharmStorage': {'additionalProperties': False, - 'properties': {'count-max': {'type': 'integer'}, - 'count-min': {'type': 'integer'}, - 'description': {'type': 'string'}, - 'location': {'type': 'string'}, - 'minimum-size': {'type': 'integer'}, - 'name': {'type': 'string'}, - 'properties': {'items': {'type': 'string'}, - 'type': 'array'}, - 'read-only': {'type': 'boolean'}, - 'shared': {'type': 'boolean'}, - 'type': {'type': 'string'}}, - 'required': ['name', - 'description', - 'type', - 'shared', - 'read-only', - 'count-min', - 'count-max', - 'minimum-size'], - 'type': 'object'}, - 'CharmURL': {'additionalProperties': False, - 'properties': {'url': {'type': 'string'}}, - 'required': ['url'], - 'type': 'object'}, - 'ConfigResult': {'additionalProperties': False, - 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'error': {'$ref': '#/definitions/Error'}}, - 'required': ['config'], - 'type': 'object'}, - 'Entities': {'additionalProperties': False, - 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'}, - 'type': 'array'}}, - 'required': ['entities'], - 'type': 'object'}, - 'Entity': {'additionalProperties': False, - 'properties': {'tag': {'type': 'string'}}, - 'required': ['tag'], - 'type': 'object'}, - 'Error': {'additionalProperties': False, - 'properties': {'code': {'type': 'string'}, - 'info': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'message': {'type': 'string'}}, - 'required': ['message', 'code'], - 'type': 'object'}, - 'ExpressionTree': {'additionalProperties': False, - 'properties': {'Expression': {'additionalProperties': True, - 'type': 'object'}}, - 'required': ['Expression'], - 'type': 'object'}, - 'LifeResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'life': {'type': 'string'}}, - 'required': ['life'], - 'type': 'object'}, - 'LifeResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'NotifyWatchResult': {'additionalProperties': False, - 'properties': {'NotifyWatcherId': {'type': 'string'}, - 'error': {'$ref': '#/definitions/Error'}}, - 'required': ['NotifyWatcherId'], - 'type': 'object'}, - 'NotifyWatchResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'StringsWatchResult': {'additionalProperties': False, - 'properties': {'changes': {'items': {'type': 'string'}, - 'type': 'array'}, - 'error': {'$ref': '#/definitions/Error'}, - 'watcher-id': {'type': 'string'}}, - 'required': ['watcher-id'], - 'type': 'object'}}, - 'properties': {'ApplicationCharmInfo': {'description': 'ApplicationCharmInfo ' - 'returns information ' - 'about an ' - "application's charm.", - 'properties': {'Params': {'$ref': '#/definitions/Entity'}, - 'Result': {'$ref': '#/definitions/Charm'}}, - 'type': 'object'}, - 'ApplicationsConfig': {'description': 'ApplicationsConfig ' - 'returns the config for ' - 'the specified ' - 'applications.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ApplicationGetConfigResults'}}, - 'type': 'object'}, - 'CharmInfo': {'description': 'CharmInfo returns information ' - 'about the requested charm.', - 'properties': {'Params': {'$ref': '#/definitions/CharmURL'}, - 'Result': {'$ref': '#/definitions/Charm'}}, - 'type': 'object'}, - 'IsExposed': {'description': 'IsExposed returns whether the ' - 'specified applications are ' - 'exposed.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/BoolResults'}}, - 'type': 'object'}, - 'Life': {'description': 'Life returns the life status of every ' - 'supplied entity, where available.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/LifeResults'}}, - 'type': 'object'}, - 'Watch': {'description': 'Watch starts an NotifyWatcher for ' - 'each given entity.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/NotifyWatchResults'}}, - 'type': 'object'}, - 'WatchApplications': {'description': 'WatchApplications starts ' - 'a StringsWatcher to ' - 'watch applications\n' - 'deployed to this model.', - 'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}}, - 'type': 'object'}}, - 'type': 'object'} - - - @ReturnMapping(Charm) - async def ApplicationCharmInfo(self, tag=None): - ''' - ApplicationCharmInfo returns information about an application's charm. - - tag : str - Returns -> Charm - ''' - if tag is not None and not isinstance(tag, (bytes, str)): - raise Exception("Expected tag to be a str, received: {}".format(type(tag))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='CAASFirewaller', - request='ApplicationCharmInfo', - version=1, - params=_params) - _params['tag'] = tag - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ApplicationGetConfigResults) - async def ApplicationsConfig(self, entities=None): - ''' - ApplicationsConfig returns the config for the specified applications. - - entities : typing.Sequence[~Entity] - Returns -> ApplicationGetConfigResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='CAASFirewaller', - request='ApplicationsConfig', - version=1, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(Charm) - async def CharmInfo(self, url=None): - ''' - CharmInfo returns information about the requested charm. - - url : str - Returns -> Charm - ''' - if url is not None and not isinstance(url, (bytes, str)): - raise Exception("Expected url to be a str, received: {}".format(type(url))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='CAASFirewaller', - request='CharmInfo', - version=1, - params=_params) - _params['url'] = url - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(BoolResults) - async def IsExposed(self, entities=None): - ''' - IsExposed returns whether the specified applications are exposed. - - entities : typing.Sequence[~Entity] - Returns -> BoolResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='CAASFirewaller', - request='IsExposed', - version=1, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(LifeResults) - async def Life(self, entities=None): - ''' - Life returns the life status of every supplied entity, where available. - - entities : typing.Sequence[~Entity] - Returns -> LifeResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='CAASFirewaller', - request='Life', - version=1, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(NotifyWatchResults) - async def Watch(self, entities=None): - ''' - Watch starts an NotifyWatcher for each given entity. - - entities : typing.Sequence[~Entity] - Returns -> NotifyWatchResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='CAASFirewaller', - request='Watch', - version=1, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringsWatchResult) - async def WatchApplications(self): - ''' - WatchApplications starts a StringsWatcher to watch applications - deployed to this model. - - - Returns -> StringsWatchResult - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='CAASFirewaller', - request='WatchApplications', - version=1, - params=_params) - - reply = await self.rpc(msg) - return reply - - - -class CAASFirewallerSidecarFacade(Type): - name = 'CAASFirewallerSidecar' - version = 1 - schema = {'definitions': {'ApplicationGetConfigResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/ConfigResult'}, - 'type': 'array'}}, - 'required': ['Results'], - 'type': 'object'}, - 'ApplicationOpenedPorts': {'additionalProperties': False, - 'properties': {'endpoint': {'type': 'string'}, - 'port-ranges': {'items': {'$ref': '#/definitions/PortRange'}, - 'type': 'array'}}, - 'required': ['endpoint', - 'port-ranges'], - 'type': 'object'}, - 'ApplicationOpenedPortsResult': {'additionalProperties': False, - 'properties': {'application-port-ranges': {'items': {'$ref': '#/definitions/ApplicationOpenedPorts'}, - 'type': 'array'}, - 'error': {'$ref': '#/definitions/Error'}}, - 'required': ['application-port-ranges'], - 'type': 'object'}, - 'ApplicationOpenedPortsResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/ApplicationOpenedPortsResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'BoolResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'result': {'type': 'boolean'}}, - 'required': ['result'], - 'type': 'object'}, - 'BoolResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/BoolResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'Charm': {'additionalProperties': False, - 'properties': {'actions': {'$ref': '#/definitions/CharmActions'}, - 'config': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmOption'}}, - 'type': 'object'}, - 'lxd-profile': {'$ref': '#/definitions/CharmLXDProfile'}, - 'manifest': {'$ref': '#/definitions/CharmManifest'}, - 'meta': {'$ref': '#/definitions/CharmMeta'}, - 'metrics': {'$ref': '#/definitions/CharmMetrics'}, - 'revision': {'type': 'integer'}, - 'url': {'type': 'string'}}, - 'required': ['revision', 'url', 'config'], - 'type': 'object'}, - 'CharmActionSpec': {'additionalProperties': False, - 'properties': {'description': {'type': 'string'}, - 'params': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}}, - 'required': ['description', 'params'], - 'type': 'object'}, - 'CharmActions': {'additionalProperties': False, - 'properties': {'specs': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmActionSpec'}}, - 'type': 'object'}}, - 'type': 'object'}, - 'CharmBase': {'additionalProperties': False, - 'properties': {'architectures': {'items': {'type': 'string'}, - 'type': 'array'}, - 'channel': {'type': 'string'}, - 'name': {'type': 'string'}}, - 'type': 'object'}, - 'CharmContainer': {'additionalProperties': False, - 'properties': {'mounts': {'items': {'$ref': '#/definitions/CharmMount'}, - 'type': 'array'}, - 'resource': {'type': 'string'}}, - 'type': 'object'}, - 'CharmDeployment': {'additionalProperties': False, - 'properties': {'min-version': {'type': 'string'}, - 'mode': {'type': 'string'}, - 'service': {'type': 'string'}, - 'type': {'type': 'string'}}, - 'required': ['type', - 'mode', - 'service', - 'min-version'], - 'type': 'object'}, - 'CharmDevice': {'additionalProperties': False, - 'properties': {'CountMax': {'type': 'integer'}, - 'CountMin': {'type': 'integer'}, - 'Description': {'type': 'string'}, - 'Name': {'type': 'string'}, - 'Type': {'type': 'string'}}, - 'required': ['Name', - 'Description', - 'Type', - 'CountMin', - 'CountMax'], - 'type': 'object'}, - 'CharmLXDProfile': {'additionalProperties': False, - 'properties': {'config': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}, - 'description': {'type': 'string'}, - 'devices': {'patternProperties': {'.*': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}}, - 'type': 'object'}}, - 'required': ['config', - 'description', - 'devices'], - 'type': 'object'}, - 'CharmManifest': {'additionalProperties': False, - 'properties': {'bases': {'items': {'$ref': '#/definitions/CharmBase'}, - 'type': 'array'}}, - 'type': 'object'}, - 'CharmMeta': {'additionalProperties': False, - 'properties': {'assumes-expr': {'$ref': '#/definitions/ExpressionTree'}, - 'categories': {'items': {'type': 'string'}, - 'type': 'array'}, - 'containers': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmContainer'}}, - 'type': 'object'}, - 'deployment': {'$ref': '#/definitions/CharmDeployment'}, - 'description': {'type': 'string'}, - 'devices': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmDevice'}}, - 'type': 'object'}, - 'extra-bindings': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}, - 'min-juju-version': {'type': 'string'}, - 'name': {'type': 'string'}, - 'payload-classes': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmPayloadClass'}}, - 'type': 'object'}, - 'peers': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmRelation'}}, - 'type': 'object'}, - 'provides': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmRelation'}}, - 'type': 'object'}, - 'requires': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmRelation'}}, - 'type': 'object'}, - 'resources': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmResourceMeta'}}, - 'type': 'object'}, - 'series': {'items': {'type': 'string'}, - 'type': 'array'}, - 'storage': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmStorage'}}, - 'type': 'object'}, - 'subordinate': {'type': 'boolean'}, - 'summary': {'type': 'string'}, - 'tags': {'items': {'type': 'string'}, - 'type': 'array'}, - 'terms': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'required': ['name', - 'summary', - 'description', - 'subordinate'], - 'type': 'object'}, - 'CharmMetric': {'additionalProperties': False, - 'properties': {'description': {'type': 'string'}, - 'type': {'type': 'string'}}, - 'required': ['type', 'description'], - 'type': 'object'}, - 'CharmMetrics': {'additionalProperties': False, - 'properties': {'metrics': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmMetric'}}, - 'type': 'object'}, - 'plan': {'$ref': '#/definitions/CharmPlan'}}, - 'required': ['metrics', 'plan'], - 'type': 'object'}, - 'CharmMount': {'additionalProperties': False, - 'properties': {'location': {'type': 'string'}, - 'storage': {'type': 'string'}}, - 'type': 'object'}, - 'CharmOption': {'additionalProperties': False, - 'properties': {'default': {'additionalProperties': True, - 'type': 'object'}, - 'description': {'type': 'string'}, - 'type': {'type': 'string'}}, - 'required': ['type'], - 'type': 'object'}, - 'CharmPayloadClass': {'additionalProperties': False, - 'properties': {'name': {'type': 'string'}, - 'type': {'type': 'string'}}, - 'required': ['name', 'type'], - 'type': 'object'}, - 'CharmPlan': {'additionalProperties': False, - 'properties': {'required': {'type': 'boolean'}}, - 'required': ['required'], - 'type': 'object'}, - 'CharmRelation': {'additionalProperties': False, - 'properties': {'interface': {'type': 'string'}, - 'limit': {'type': 'integer'}, - 'name': {'type': 'string'}, - 'optional': {'type': 'boolean'}, - 'role': {'type': 'string'}, - 'scope': {'type': 'string'}}, - 'required': ['name', - 'role', - 'interface', - 'optional', - 'limit', - 'scope'], - 'type': 'object'}, - 'CharmResourceMeta': {'additionalProperties': False, - 'properties': {'description': {'type': 'string'}, - 'name': {'type': 'string'}, - 'path': {'type': 'string'}, - 'type': {'type': 'string'}}, - 'required': ['name', - 'type', - 'path', - 'description'], - 'type': 'object'}, - 'CharmStorage': {'additionalProperties': False, - 'properties': {'count-max': {'type': 'integer'}, - 'count-min': {'type': 'integer'}, - 'description': {'type': 'string'}, - 'location': {'type': 'string'}, - 'minimum-size': {'type': 'integer'}, - 'name': {'type': 'string'}, - 'properties': {'items': {'type': 'string'}, - 'type': 'array'}, - 'read-only': {'type': 'boolean'}, - 'shared': {'type': 'boolean'}, - 'type': {'type': 'string'}}, - 'required': ['name', - 'description', - 'type', - 'shared', - 'read-only', - 'count-min', - 'count-max', - 'minimum-size'], - 'type': 'object'}, - 'CharmURL': {'additionalProperties': False, - 'properties': {'url': {'type': 'string'}}, - 'required': ['url'], - 'type': 'object'}, - 'ConfigResult': {'additionalProperties': False, - 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'error': {'$ref': '#/definitions/Error'}}, - 'required': ['config'], - 'type': 'object'}, - 'Entities': {'additionalProperties': False, - 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'}, - 'type': 'array'}}, - 'required': ['entities'], - 'type': 'object'}, - 'Entity': {'additionalProperties': False, - 'properties': {'tag': {'type': 'string'}}, - 'required': ['tag'], - 'type': 'object'}, - 'Error': {'additionalProperties': False, - 'properties': {'code': {'type': 'string'}, - 'info': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'message': {'type': 'string'}}, - 'required': ['message', 'code'], - 'type': 'object'}, - 'ExpressionTree': {'additionalProperties': False, - 'properties': {'Expression': {'additionalProperties': True, - 'type': 'object'}}, - 'required': ['Expression'], - 'type': 'object'}, - 'LifeResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'life': {'type': 'string'}}, - 'required': ['life'], - 'type': 'object'}, - 'LifeResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'NotifyWatchResult': {'additionalProperties': False, - 'properties': {'NotifyWatcherId': {'type': 'string'}, - 'error': {'$ref': '#/definitions/Error'}}, - 'required': ['NotifyWatcherId'], - 'type': 'object'}, - 'NotifyWatchResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'PortRange': {'additionalProperties': False, - 'properties': {'from-port': {'type': 'integer'}, - 'protocol': {'type': 'string'}, - 'to-port': {'type': 'integer'}}, - 'required': ['from-port', 'to-port', 'protocol'], - 'type': 'object'}, - 'StringsWatchResult': {'additionalProperties': False, - 'properties': {'changes': {'items': {'type': 'string'}, - 'type': 'array'}, - 'error': {'$ref': '#/definitions/Error'}, - 'watcher-id': {'type': 'string'}}, - 'required': ['watcher-id'], - 'type': 'object'}, - 'StringsWatchResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}}, - 'properties': {'ApplicationCharmInfo': {'description': 'ApplicationCharmInfo ' - 'returns information ' - 'about an ' - "application's charm.", - 'properties': {'Params': {'$ref': '#/definitions/Entity'}, - 'Result': {'$ref': '#/definitions/Charm'}}, - 'type': 'object'}, - 'ApplicationsConfig': {'description': 'ApplicationsConfig ' - 'returns the config for ' - 'the specified ' - 'applications.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ApplicationGetConfigResults'}}, - 'type': 'object'}, - 'CharmInfo': {'description': 'CharmInfo returns information ' - 'about the requested charm.', - 'properties': {'Params': {'$ref': '#/definitions/CharmURL'}, - 'Result': {'$ref': '#/definitions/Charm'}}, - 'type': 'object'}, - 'GetOpenedPorts': {'description': 'GetOpenedPorts returns all ' - 'the opened ports for each ' - 'given application tag.', - 'properties': {'Params': {'$ref': '#/definitions/Entity'}, - 'Result': {'$ref': '#/definitions/ApplicationOpenedPortsResults'}}, - 'type': 'object'}, - 'IsExposed': {'description': 'IsExposed returns whether the ' - 'specified applications are ' - 'exposed.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/BoolResults'}}, - 'type': 'object'}, - 'Life': {'description': 'Life returns the life status of every ' - 'supplied entity, where available.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/LifeResults'}}, - 'type': 'object'}, - 'Watch': {'description': 'Watch starts an NotifyWatcher for ' - 'each given entity.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/NotifyWatchResults'}}, - 'type': 'object'}, - 'WatchApplications': {'description': 'WatchApplications starts ' - 'a StringsWatcher to ' - 'watch applications\n' - 'deployed to this model.', - 'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}}, - 'type': 'object'}, - 'WatchOpenedPorts': {'description': 'WatchOpenedPorts returns ' - 'a new StringsWatcher for ' - 'each given\n' - 'model tag.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/StringsWatchResults'}}, - 'type': 'object'}}, - 'type': 'object'} - - - @ReturnMapping(Charm) - async def ApplicationCharmInfo(self, tag=None): - ''' - ApplicationCharmInfo returns information about an application's charm. - - tag : str - Returns -> Charm - ''' - if tag is not None and not isinstance(tag, (bytes, str)): - raise Exception("Expected tag to be a str, received: {}".format(type(tag))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='CAASFirewallerSidecar', - request='ApplicationCharmInfo', - version=1, - params=_params) - _params['tag'] = tag - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ApplicationGetConfigResults) - async def ApplicationsConfig(self, entities=None): - ''' - ApplicationsConfig returns the config for the specified applications. - - entities : typing.Sequence[~Entity] - Returns -> ApplicationGetConfigResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='CAASFirewallerSidecar', - request='ApplicationsConfig', - version=1, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(Charm) - async def CharmInfo(self, url=None): - ''' - CharmInfo returns information about the requested charm. - - url : str - Returns -> Charm - ''' - if url is not None and not isinstance(url, (bytes, str)): - raise Exception("Expected url to be a str, received: {}".format(type(url))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='CAASFirewallerSidecar', - request='CharmInfo', - version=1, - params=_params) - _params['url'] = url - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ApplicationOpenedPortsResults) - async def GetOpenedPorts(self, tag=None): - ''' - GetOpenedPorts returns all the opened ports for each given application tag. - - tag : str - Returns -> ApplicationOpenedPortsResults - ''' - if tag is not None and not isinstance(tag, (bytes, str)): - raise Exception("Expected tag to be a str, received: {}".format(type(tag))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='CAASFirewallerSidecar', - request='GetOpenedPorts', - version=1, - params=_params) - _params['tag'] = tag - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(BoolResults) - async def IsExposed(self, entities=None): - ''' - IsExposed returns whether the specified applications are exposed. - - entities : typing.Sequence[~Entity] - Returns -> BoolResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='CAASFirewallerSidecar', - request='IsExposed', - version=1, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(LifeResults) - async def Life(self, entities=None): - ''' - Life returns the life status of every supplied entity, where available. - - entities : typing.Sequence[~Entity] - Returns -> LifeResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='CAASFirewallerSidecar', - request='Life', - version=1, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(NotifyWatchResults) - async def Watch(self, entities=None): - ''' - Watch starts an NotifyWatcher for each given entity. - - entities : typing.Sequence[~Entity] - Returns -> NotifyWatchResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='CAASFirewallerSidecar', - request='Watch', - version=1, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringsWatchResult) - async def WatchApplications(self): - ''' - WatchApplications starts a StringsWatcher to watch applications - deployed to this model. - - - Returns -> StringsWatchResult - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='CAASFirewallerSidecar', - request='WatchApplications', - version=1, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringsWatchResults) - async def WatchOpenedPorts(self, entities=None): - ''' - WatchOpenedPorts returns a new StringsWatcher for each given - model tag. - - entities : typing.Sequence[~Entity] - Returns -> StringsWatchResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='CAASFirewallerSidecar', - request='WatchOpenedPorts', - version=1, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - -class CAASModelConfigManagerFacade(Type): - name = 'CAASModelConfigManager' - version = 1 - schema = {'definitions': {'ControllerConfigResult': {'additionalProperties': False, - 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}}, - 'required': ['config'], - 'type': 'object'}, - 'Error': {'additionalProperties': False, - 'properties': {'code': {'type': 'string'}, - 'info': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'message': {'type': 'string'}}, - 'required': ['message', 'code'], - 'type': 'object'}, - 'NotifyWatchResult': {'additionalProperties': False, - 'properties': {'NotifyWatcherId': {'type': 'string'}, - 'error': {'$ref': '#/definitions/Error'}}, - 'required': ['NotifyWatcherId'], - 'type': 'object'}}, - 'properties': {'ControllerConfig': {'properties': {'Result': {'$ref': '#/definitions/ControllerConfigResult'}}, - 'type': 'object'}, - 'WatchControllerConfig': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}}, - 'type': 'object'}}, - 'type': 'object'} - - - @ReturnMapping(ControllerConfigResult) - async def ControllerConfig(self): - ''' - - Returns -> ControllerConfigResult - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='CAASModelConfigManager', - request='ControllerConfig', - version=1, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(NotifyWatchResult) - async def WatchControllerConfig(self): - ''' - - Returns -> NotifyWatchResult - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='CAASModelConfigManager', - request='WatchControllerConfig', - version=1, - params=_params) - - reply = await self.rpc(msg) - return reply - - - -class CAASModelOperatorFacade(Type): - name = 'CAASModelOperator' - 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': {'cidr': {'type': 'string'}, - 'config-type': {'type': 'string'}, - 'is-secondary': {'type': 'boolean'}, - 'scope': {'type': 'string'}, - 'space-id': {'type': 'string'}, - 'space-name': {'type': 'string'}, - 'type': {'type': 'string'}, - 'value': {'type': 'string'}}, - 'required': ['value', 'type', 'scope'], - 'type': 'object'}, - 'DockerImageInfo': {'additionalProperties': False, - 'properties': {'auth': {'type': 'string'}, - 'email': {'type': 'string'}, - 'identitytoken': {'type': 'string'}, - 'image-name': {'type': 'string'}, - 'password': {'type': 'string'}, - 'registrytoken': {'type': 'string'}, - 'repository': {'type': 'string'}, - 'serveraddress': {'type': 'string'}, - 'username': {'type': 'string'}}, - 'required': ['image-name'], - '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': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'message': {'type': 'string'}}, - 'required': ['message', 'code'], - 'type': 'object'}, - 'ErrorResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}}, - 'type': 'object'}, - 'ErrorResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'HostPort': {'additionalProperties': False, - 'properties': {'Address': {'$ref': '#/definitions/Address'}, - 'cidr': {'type': 'string'}, - 'config-type': {'type': 'string'}, - 'is-secondary': {'type': 'boolean'}, - 'port': {'type': 'integer'}, - 'scope': {'type': 'string'}, - 'space-id': {'type': 'string'}, - 'space-name': {'type': 'string'}, - 'type': {'type': 'string'}, - 'value': {'type': 'string'}}, - 'required': ['value', - 'type', - 'scope', - 'Address', - 'port'], - 'type': 'object'}, - 'ModelOperatorInfo': {'additionalProperties': False, - 'properties': {'api-addresses': {'items': {'type': 'string'}, - 'type': 'array'}, - 'image-details': {'$ref': '#/definitions/DockerImageInfo'}, - 'version': {'$ref': '#/definitions/Number'}}, - 'required': ['api-addresses', - 'image-details', - 'version'], - 'type': 'object'}, - 'NotifyWatchResult': {'additionalProperties': False, - 'properties': {'NotifyWatcherId': {'type': 'string'}, - 'error': {'$ref': '#/definitions/Error'}}, - 'required': ['NotifyWatcherId'], - 'type': 'object'}, - 'Number': {'additionalProperties': False, - 'properties': {'Build': {'type': 'integer'}, - 'Major': {'type': 'integer'}, - 'Minor': {'type': 'integer'}, - 'Patch': {'type': 'integer'}, - 'Tag': {'type': 'string'}}, - 'required': ['Major', - 'Minor', - 'Tag', - 'Patch', - 'Build'], - 'type': 'object'}, - 'StringResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'result': {'type': 'string'}}, - 'required': ['result'], - 'type': 'object'}, - 'StringsResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'result': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'type': 'object'}}, - 'properties': {'APIAddresses': {'description': 'APIAddresses returns the list ' - 'of addresses used to connect ' - 'to the API.', - 'properties': {'Result': {'$ref': '#/definitions/StringsResult'}}, - 'type': 'object'}, - 'APIHostPorts': {'description': 'APIHostPorts returns the API ' - 'server addresses.', - 'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}}, - 'type': 'object'}, - 'ModelOperatorProvisioningInfo': {'description': 'ModelOperatorProvisioningInfo ' - 'returns the ' - 'information ' - 'needed for ' - 'provisioning\n' - 'a new model ' - 'operator ' - 'into a caas ' - 'cluster.', - 'properties': {'Result': {'$ref': '#/definitions/ModelOperatorInfo'}}, - 'type': 'object'}, - 'ModelUUID': {'description': 'ModelUUID returns the model UUID ' - 'that this facade is used to ' - 'operate.\n' - 'It is implemented here directly ' - 'as a result of removing it from\n' - 'embedded APIAddresser *without* ' - 'bumping the facade version.\n' - 'It should be blanked when this ' - 'facade version is next ' - 'incremented.', - 'properties': {'Result': {'$ref': '#/definitions/StringResult'}}, - 'type': 'object'}, - 'SetPasswords': {'description': 'SetPasswords sets the given ' - 'password for each supplied ' - 'entity, if possible.', - 'properties': {'Params': {'$ref': '#/definitions/EntityPasswords'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'WatchAPIHostPorts': {'description': 'WatchAPIHostPorts ' - 'watches the API server ' - 'addresses.', - 'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}}, - 'type': 'object'}, - 'WatchModelOperatorProvisioningInfo': {'description': 'WatchModelOperatorProvisioningInfo ' - 'provides ' - 'a ' - 'watcher ' - 'for ' - 'changes ' - 'that ' - 'affect ' - 'the\n' - 'information ' - 'returned ' - 'by ' - 'ModelOperatorProvisioningInfo.', - 'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}}, - 'type': 'object'}}, - 'type': 'object'} - - - @ReturnMapping(StringsResult) - async def APIAddresses(self): - ''' - APIAddresses returns the list of addresses used to connect to the API. - - - Returns -> StringsResult - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='CAASModelOperator', - request='APIAddresses', - version=1, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(APIHostPortsResult) - async def APIHostPorts(self): - ''' - APIHostPorts returns the API server addresses. - - - Returns -> APIHostPortsResult - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='CAASModelOperator', - request='APIHostPorts', - version=1, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ModelOperatorInfo) - async def ModelOperatorProvisioningInfo(self): - ''' - ModelOperatorProvisioningInfo returns the information needed for provisioning - a new model operator into a caas cluster. - - - Returns -> ModelOperatorInfo - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='CAASModelOperator', - request='ModelOperatorProvisioningInfo', - version=1, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringResult) - async def ModelUUID(self): - ''' - ModelUUID returns the model UUID that this facade is used to operate. - It is implemented here directly as a result of removing it from - embedded APIAddresser *without* bumping the facade version. - It should be blanked when this facade version is next incremented. - - - Returns -> StringResult - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='CAASModelOperator', - request='ModelUUID', - version=1, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def SetPasswords(self, changes=None): - ''' - SetPasswords sets the given password for each supplied entity, if possible. - - changes : typing.Sequence[~EntityPassword] - Returns -> ErrorResults - ''' - if changes is not None and not isinstance(changes, (bytes, str, list)): - raise Exception("Expected changes to be a Sequence, received: {}".format(type(changes))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='CAASModelOperator', - request='SetPasswords', - version=1, - params=_params) - _params['changes'] = changes - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(NotifyWatchResult) - async def WatchAPIHostPorts(self): - ''' - WatchAPIHostPorts watches the API server addresses. - - - Returns -> NotifyWatchResult - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='CAASModelOperator', - request='WatchAPIHostPorts', - version=1, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(NotifyWatchResult) - async def WatchModelOperatorProvisioningInfo(self): - ''' - WatchModelOperatorProvisioningInfo provides a watcher for changes that affect the - information returned by ModelOperatorProvisioningInfo. - - - Returns -> NotifyWatchResult - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='CAASModelOperator', - request='WatchModelOperatorProvisioningInfo', - version=1, - params=_params) - - reply = await self.rpc(msg) - return reply - - - -class CAASOperatorFacade(Type): - name = 'CAASOperator' - 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': {'cidr': {'type': 'string'}, - 'config-type': {'type': 'string'}, - 'is-secondary': {'type': 'boolean'}, - 'scope': {'type': 'string'}, - 'space-id': {'type': 'string'}, - 'space-name': {'type': 'string'}, - 'type': {'type': 'string'}, - 'value': {'type': 'string'}}, - 'required': ['value', 'type', 'scope'], - 'type': 'object'}, - 'ApplicationCharm': {'additionalProperties': False, - 'properties': {'charm-modified-version': {'type': 'integer'}, - 'deployment-mode': {'type': 'string'}, - 'force-upgrade': {'type': 'boolean'}, - 'sha256': {'type': 'string'}, - 'url': {'type': 'string'}}, - 'required': ['url', - 'sha256', - 'charm-modified-version'], - 'type': 'object'}, - 'ApplicationCharmResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'result': {'$ref': '#/definitions/ApplicationCharm'}}, - 'type': 'object'}, - 'ApplicationCharmResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/ApplicationCharmResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'Binary': {'additionalProperties': False, - 'properties': {'Arch': {'type': 'string'}, - 'Build': {'type': 'integer'}, - 'Major': {'type': 'integer'}, - 'Minor': {'type': 'integer'}, - 'Number': {'$ref': '#/definitions/Number'}, - 'Patch': {'type': 'integer'}, - 'Release': {'type': 'string'}, - 'Tag': {'type': 'string'}}, - 'required': ['Major', - 'Minor', - 'Tag', - 'Patch', - 'Build', - 'Number', - 'Release', - 'Arch'], - 'type': 'object'}, - 'Entities': {'additionalProperties': False, - 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'}, - 'type': 'array'}}, - 'required': ['entities'], - 'type': 'object'}, - 'EntitiesVersion': {'additionalProperties': False, - 'properties': {'agent-tools': {'items': {'$ref': '#/definitions/EntityVersion'}, - 'type': 'array'}}, - 'required': ['agent-tools'], - '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'}, - 'EntityString': {'additionalProperties': False, - 'properties': {'tag': {'type': 'string'}, - 'value': {'type': 'string'}}, - 'required': ['tag', 'value'], - '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': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'message': {'type': 'string'}}, - 'required': ['message', 'code'], - 'type': 'object'}, - 'ErrorResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}}, - 'type': 'object'}, - 'ErrorResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'HostPort': {'additionalProperties': False, - 'properties': {'Address': {'$ref': '#/definitions/Address'}, - 'cidr': {'type': 'string'}, - 'config-type': {'type': 'string'}, - 'is-secondary': {'type': 'boolean'}, - 'port': {'type': 'integer'}, - 'scope': {'type': 'string'}, - 'space-id': {'type': 'string'}, - 'space-name': {'type': 'string'}, - 'type': {'type': 'string'}, - 'value': {'type': 'string'}}, - 'required': ['value', - 'type', - 'scope', - 'Address', - 'port'], - 'type': 'object'}, - 'LifeResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'life': {'type': 'string'}}, - 'required': ['life'], - 'type': 'object'}, - 'LifeResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'ModelResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'name': {'type': 'string'}, - 'type': {'type': 'string'}, - 'uuid': {'type': 'string'}}, - 'required': ['name', 'uuid', 'type'], - 'type': 'object'}, - 'NotifyWatchResult': {'additionalProperties': False, - 'properties': {'NotifyWatcherId': {'type': 'string'}, - 'error': {'$ref': '#/definitions/Error'}}, - 'required': ['NotifyWatcherId'], - 'type': 'object'}, - 'NotifyWatchResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - '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'}, - 'SetPodSpecParams': {'additionalProperties': False, - 'properties': {'specs': {'items': {'$ref': '#/definitions/EntityString'}, - 'type': 'array'}}, - 'required': ['specs'], - 'type': 'object'}, - 'SetStatus': {'additionalProperties': False, - 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'}, - 'type': 'array'}}, - 'required': ['entities'], - 'type': 'object'}, - 'StringResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'result': {'type': 'string'}}, - 'required': ['result'], - 'type': 'object'}, - 'StringsResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'result': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'type': 'object'}, - 'StringsWatchResult': {'additionalProperties': False, - 'properties': {'changes': {'items': {'type': 'string'}, - 'type': 'array'}, - 'error': {'$ref': '#/definitions/Error'}, - 'watcher-id': {'type': 'string'}}, - 'required': ['watcher-id'], - 'type': 'object'}, - 'StringsWatchResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'Version': {'additionalProperties': False, - 'properties': {'version': {'$ref': '#/definitions/Binary'}}, - 'required': ['version'], - 'type': 'object'}, - 'WatchContainerStartArg': {'additionalProperties': False, - 'properties': {'container': {'type': 'string'}, - 'entity': {'$ref': '#/definitions/Entity'}}, - 'required': ['entity'], - 'type': 'object'}, - 'WatchContainerStartArgs': {'additionalProperties': False, - 'properties': {'args': {'items': {'$ref': '#/definitions/WatchContainerStartArg'}, - 'type': 'array'}}, - 'required': ['args'], - 'type': 'object'}}, - 'properties': {'APIAddresses': {'description': 'APIAddresses returns the list ' - 'of addresses used to connect ' - 'to the API.', - 'properties': {'Result': {'$ref': '#/definitions/StringsResult'}}, - 'type': 'object'}, - 'APIHostPorts': {'description': 'APIHostPorts returns the API ' - 'server addresses.', - 'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}}, - 'type': 'object'}, - 'Charm': {'description': 'Charm returns the charm info for all ' - 'given applications.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ApplicationCharmResults'}}, - 'type': 'object'}, - 'CurrentModel': {'description': 'CurrentModel returns the name ' - 'and UUID for the current juju ' - 'model.', - 'properties': {'Result': {'$ref': '#/definitions/ModelResult'}}, - 'type': 'object'}, - 'Life': {'description': 'Life returns the life status of every ' - 'supplied entity, where available.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/LifeResults'}}, - 'type': 'object'}, - 'ModelUUID': {'description': 'ModelUUID returns the model UUID ' - 'that this facade is used to ' - 'operate.\n' - 'It is implemented here directly ' - 'as a result of removing it from\n' - 'embedded APIAddresser *without* ' - 'bumping the facade version.\n' - 'It should be blanked when this ' - 'facade version is next ' - 'incremented.', - 'properties': {'Result': {'$ref': '#/definitions/StringResult'}}, - 'type': 'object'}, - 'Remove': {'description': 'Remove removes every given entity ' - 'from state, calling EnsureDead\n' - 'first, then Remove. It will fail if ' - 'the entity is not present.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'SetPodSpec': {'description': 'SetPodSpec sets the container ' - 'specs for a set of ' - 'applications.\n' - 'TODO(juju3) - remove', - 'properties': {'Params': {'$ref': '#/definitions/SetPodSpecParams'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'SetStatus': {'description': 'SetStatus sets the status of ' - 'each given entity.', - 'properties': {'Params': {'$ref': '#/definitions/SetStatus'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'SetTools': {'description': 'SetTools updates the recorded ' - 'tools version for the agents.', - 'properties': {'Params': {'$ref': '#/definitions/EntitiesVersion'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'Watch': {'description': 'Watch starts an NotifyWatcher for ' - 'each given entity.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/NotifyWatchResults'}}, - 'type': 'object'}, - 'WatchAPIHostPorts': {'description': 'WatchAPIHostPorts ' - 'watches the API server ' - 'addresses.', - 'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}}, - 'type': 'object'}, - 'WatchContainerStart': {'description': 'WatchContainerStart ' - 'starts a StringWatcher ' - 'to watch for container ' - 'start events\n' - 'on the CAAS api for a ' - 'specific application ' - 'and container.', - 'properties': {'Params': {'$ref': '#/definitions/WatchContainerStartArgs'}, - 'Result': {'$ref': '#/definitions/StringsWatchResults'}}, - 'type': 'object'}, - 'WatchUnits': {'description': 'WatchUnits starts a ' - 'StringsWatcher to watch changes ' - 'to the\n' - 'lifecycle states of units for ' - 'the specified applications in\n' - 'this model.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/StringsWatchResults'}}, - 'type': 'object'}}, - 'type': 'object'} - - - @ReturnMapping(StringsResult) - async def APIAddresses(self): - ''' - APIAddresses returns the list of addresses used to connect to the API. - - - Returns -> StringsResult - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='CAASOperator', - request='APIAddresses', - version=1, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(APIHostPortsResult) - async def APIHostPorts(self): - ''' - APIHostPorts returns the API server addresses. - - - Returns -> APIHostPortsResult - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='CAASOperator', - request='APIHostPorts', - version=1, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ApplicationCharmResults) - async def Charm(self, entities=None): - ''' - Charm returns the charm info for all given applications. - - entities : typing.Sequence[~Entity] - Returns -> ApplicationCharmResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='CAASOperator', - request='Charm', - version=1, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ModelResult) - async def CurrentModel(self): - ''' - CurrentModel returns the name and UUID for the current juju model. - - - Returns -> ModelResult - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='CAASOperator', - request='CurrentModel', - version=1, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(LifeResults) - async def Life(self, entities=None): - ''' - Life returns the life status of every supplied entity, where available. - - entities : typing.Sequence[~Entity] - Returns -> LifeResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='CAASOperator', - request='Life', - version=1, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringResult) - async def ModelUUID(self): - ''' - ModelUUID returns the model UUID that this facade is used to operate. - It is implemented here directly as a result of removing it from - embedded APIAddresser *without* bumping the facade version. - It should be blanked when this facade version is next incremented. - - - Returns -> StringResult - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='CAASOperator', - request='ModelUUID', - version=1, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def Remove(self, entities=None): - ''' - Remove removes every given entity from state, calling EnsureDead - first, then Remove. It will fail if the entity is not present. - - entities : typing.Sequence[~Entity] - Returns -> ErrorResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='CAASOperator', - request='Remove', - version=1, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def SetPodSpec(self, specs=None): - ''' - SetPodSpec sets the container specs for a set of applications. - TODO(juju3) - remove - - specs : typing.Sequence[~EntityString] - Returns -> ErrorResults - ''' - if specs is not None and not isinstance(specs, (bytes, str, list)): - raise Exception("Expected specs to be a Sequence, received: {}".format(type(specs))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='CAASOperator', - request='SetPodSpec', - version=1, - params=_params) - _params['specs'] = specs - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def SetStatus(self, entities=None): - ''' - SetStatus sets the status of each given entity. - - entities : typing.Sequence[~EntityStatusArgs] - Returns -> ErrorResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='CAASOperator', - request='SetStatus', - version=1, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def SetTools(self, agent_tools=None): - ''' - SetTools updates the recorded tools version for the agents. - - agent_tools : typing.Sequence[~EntityVersion] - Returns -> ErrorResults - ''' - if agent_tools is not None and not isinstance(agent_tools, (bytes, str, list)): - raise Exception("Expected agent_tools to be a Sequence, received: {}".format(type(agent_tools))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='CAASOperator', - request='SetTools', - version=1, - params=_params) - _params['agent-tools'] = agent_tools - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(NotifyWatchResults) - async def Watch(self, entities=None): - ''' - Watch starts an NotifyWatcher for each given entity. - - entities : typing.Sequence[~Entity] - Returns -> NotifyWatchResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='CAASOperator', - request='Watch', - version=1, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(NotifyWatchResult) - async def WatchAPIHostPorts(self): - ''' - WatchAPIHostPorts watches the API server addresses. - - - Returns -> NotifyWatchResult - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='CAASOperator', - request='WatchAPIHostPorts', - version=1, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringsWatchResults) - async def WatchContainerStart(self, args=None): - ''' - WatchContainerStart starts a StringWatcher to watch for container start events - on the CAAS api for a specific application and container. - - args : typing.Sequence[~WatchContainerStartArg] - Returns -> StringsWatchResults - ''' - if args is not None and not isinstance(args, (bytes, str, list)): - raise Exception("Expected args to be a Sequence, received: {}".format(type(args))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='CAASOperator', - request='WatchContainerStart', - version=1, - params=_params) - _params['args'] = args - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringsWatchResults) - async def WatchUnits(self, entities=None): - ''' - WatchUnits starts a StringsWatcher to watch changes to the - lifecycle states of units for the specified applications in - this model. - - entities : typing.Sequence[~Entity] - Returns -> StringsWatchResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='CAASOperator', - request='WatchUnits', - version=1, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - -class CAASOperatorProvisionerFacade(Type): - name = 'CAASOperatorProvisioner' - 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': {'cidr': {'type': 'string'}, - 'config-type': {'type': 'string'}, - 'is-secondary': {'type': 'boolean'}, - 'scope': {'type': 'string'}, - 'space-id': {'type': 'string'}, - 'space-name': {'type': 'string'}, - 'type': {'type': 'string'}, - 'value': {'type': 'string'}}, - 'required': ['value', 'type', 'scope'], - 'type': 'object'}, - 'Charm': {'additionalProperties': False, - 'properties': {'actions': {'$ref': '#/definitions/CharmActions'}, - 'config': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmOption'}}, - 'type': 'object'}, - 'lxd-profile': {'$ref': '#/definitions/CharmLXDProfile'}, - 'manifest': {'$ref': '#/definitions/CharmManifest'}, - 'meta': {'$ref': '#/definitions/CharmMeta'}, - 'metrics': {'$ref': '#/definitions/CharmMetrics'}, - 'revision': {'type': 'integer'}, - 'url': {'type': 'string'}}, - 'required': ['revision', 'url', 'config'], - 'type': 'object'}, - 'CharmActionSpec': {'additionalProperties': False, - 'properties': {'description': {'type': 'string'}, - 'params': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}}, - 'required': ['description', 'params'], - 'type': 'object'}, - 'CharmActions': {'additionalProperties': False, - 'properties': {'specs': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmActionSpec'}}, - 'type': 'object'}}, - 'type': 'object'}, - 'CharmBase': {'additionalProperties': False, - 'properties': {'architectures': {'items': {'type': 'string'}, - 'type': 'array'}, - 'channel': {'type': 'string'}, - 'name': {'type': 'string'}}, - 'type': 'object'}, - 'CharmContainer': {'additionalProperties': False, - 'properties': {'mounts': {'items': {'$ref': '#/definitions/CharmMount'}, - 'type': 'array'}, - 'resource': {'type': 'string'}}, - 'type': 'object'}, - 'CharmDeployment': {'additionalProperties': False, - 'properties': {'min-version': {'type': 'string'}, - 'mode': {'type': 'string'}, - 'service': {'type': 'string'}, - 'type': {'type': 'string'}}, - 'required': ['type', - 'mode', - 'service', - 'min-version'], - 'type': 'object'}, - 'CharmDevice': {'additionalProperties': False, - 'properties': {'CountMax': {'type': 'integer'}, - 'CountMin': {'type': 'integer'}, - 'Description': {'type': 'string'}, - 'Name': {'type': 'string'}, - 'Type': {'type': 'string'}}, - 'required': ['Name', - 'Description', - 'Type', - 'CountMin', - 'CountMax'], - 'type': 'object'}, - 'CharmLXDProfile': {'additionalProperties': False, - 'properties': {'config': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}, - 'description': {'type': 'string'}, - 'devices': {'patternProperties': {'.*': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}}, - 'type': 'object'}}, - 'required': ['config', - 'description', - 'devices'], - 'type': 'object'}, - 'CharmManifest': {'additionalProperties': False, - 'properties': {'bases': {'items': {'$ref': '#/definitions/CharmBase'}, - 'type': 'array'}}, - 'type': 'object'}, - 'CharmMeta': {'additionalProperties': False, - 'properties': {'assumes-expr': {'$ref': '#/definitions/ExpressionTree'}, - 'categories': {'items': {'type': 'string'}, - 'type': 'array'}, - 'containers': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmContainer'}}, - 'type': 'object'}, - 'deployment': {'$ref': '#/definitions/CharmDeployment'}, - 'description': {'type': 'string'}, - 'devices': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmDevice'}}, - 'type': 'object'}, - 'extra-bindings': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}, - 'min-juju-version': {'type': 'string'}, - 'name': {'type': 'string'}, - 'payload-classes': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmPayloadClass'}}, - 'type': 'object'}, - 'peers': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmRelation'}}, - 'type': 'object'}, - 'provides': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmRelation'}}, - 'type': 'object'}, - 'requires': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmRelation'}}, - 'type': 'object'}, - 'resources': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmResourceMeta'}}, - 'type': 'object'}, - 'series': {'items': {'type': 'string'}, - 'type': 'array'}, - 'storage': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmStorage'}}, - 'type': 'object'}, - 'subordinate': {'type': 'boolean'}, - 'summary': {'type': 'string'}, - 'tags': {'items': {'type': 'string'}, - 'type': 'array'}, - 'terms': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'required': ['name', - 'summary', - 'description', - 'subordinate'], - 'type': 'object'}, - 'CharmMetric': {'additionalProperties': False, - 'properties': {'description': {'type': 'string'}, - 'type': {'type': 'string'}}, - 'required': ['type', 'description'], - 'type': 'object'}, - 'CharmMetrics': {'additionalProperties': False, - 'properties': {'metrics': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmMetric'}}, - 'type': 'object'}, - 'plan': {'$ref': '#/definitions/CharmPlan'}}, - 'required': ['metrics', 'plan'], - 'type': 'object'}, - 'CharmMount': {'additionalProperties': False, - 'properties': {'location': {'type': 'string'}, - 'storage': {'type': 'string'}}, - 'type': 'object'}, - 'CharmOption': {'additionalProperties': False, - 'properties': {'default': {'additionalProperties': True, - 'type': 'object'}, - 'description': {'type': 'string'}, - 'type': {'type': 'string'}}, - 'required': ['type'], - 'type': 'object'}, - 'CharmPayloadClass': {'additionalProperties': False, - 'properties': {'name': {'type': 'string'}, - 'type': {'type': 'string'}}, - 'required': ['name', 'type'], - 'type': 'object'}, - 'CharmPlan': {'additionalProperties': False, - 'properties': {'required': {'type': 'boolean'}}, - 'required': ['required'], - 'type': 'object'}, - 'CharmRelation': {'additionalProperties': False, - 'properties': {'interface': {'type': 'string'}, - 'limit': {'type': 'integer'}, - 'name': {'type': 'string'}, - 'optional': {'type': 'boolean'}, - 'role': {'type': 'string'}, - 'scope': {'type': 'string'}}, - 'required': ['name', - 'role', - 'interface', - 'optional', - 'limit', - 'scope'], - 'type': 'object'}, - 'CharmResourceMeta': {'additionalProperties': False, - 'properties': {'description': {'type': 'string'}, - 'name': {'type': 'string'}, - 'path': {'type': 'string'}, - 'type': {'type': 'string'}}, - 'required': ['name', - 'type', - 'path', - 'description'], - 'type': 'object'}, - 'CharmStorage': {'additionalProperties': False, - 'properties': {'count-max': {'type': 'integer'}, - 'count-min': {'type': 'integer'}, - 'description': {'type': 'string'}, - 'location': {'type': 'string'}, - 'minimum-size': {'type': 'integer'}, - 'name': {'type': 'string'}, - 'properties': {'items': {'type': 'string'}, - 'type': 'array'}, - 'read-only': {'type': 'boolean'}, - 'shared': {'type': 'boolean'}, - 'type': {'type': 'string'}}, - 'required': ['name', - 'description', - 'type', - 'shared', - 'read-only', - 'count-min', - 'count-max', - 'minimum-size'], - 'type': 'object'}, - 'CharmURL': {'additionalProperties': False, - 'properties': {'url': {'type': 'string'}}, - 'required': ['url'], - 'type': 'object'}, - 'DockerImageInfo': {'additionalProperties': False, - 'properties': {'auth': {'type': 'string'}, - 'email': {'type': 'string'}, - 'identitytoken': {'type': 'string'}, - 'image-name': {'type': 'string'}, - 'password': {'type': 'string'}, - 'registrytoken': {'type': 'string'}, - 'repository': {'type': 'string'}, - 'serveraddress': {'type': 'string'}, - 'username': {'type': 'string'}}, - 'required': ['image-name'], - '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': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'message': {'type': 'string'}}, - 'required': ['message', 'code'], - 'type': 'object'}, - 'ErrorResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}}, - 'type': 'object'}, - 'ErrorResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'ExpressionTree': {'additionalProperties': False, - 'properties': {'Expression': {'additionalProperties': True, - 'type': 'object'}}, - 'required': ['Expression'], - 'type': 'object'}, - 'HostPort': {'additionalProperties': False, - 'properties': {'Address': {'$ref': '#/definitions/Address'}, - 'cidr': {'type': 'string'}, - 'config-type': {'type': 'string'}, - 'is-secondary': {'type': 'boolean'}, - 'port': {'type': 'integer'}, - 'scope': {'type': 'string'}, - 'space-id': {'type': 'string'}, - 'space-name': {'type': 'string'}, - 'type': {'type': 'string'}, - 'value': {'type': 'string'}}, - 'required': ['value', - 'type', - 'scope', - 'Address', - 'port'], - 'type': 'object'}, - 'IssueOperatorCertificateResult': {'additionalProperties': False, - 'properties': {'ca-cert': {'type': 'string'}, - 'cert': {'type': 'string'}, - 'error': {'$ref': '#/definitions/Error'}, - 'private-key': {'type': 'string'}}, - 'required': ['ca-cert', - 'cert', - 'private-key'], - 'type': 'object'}, - 'IssueOperatorCertificateResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/IssueOperatorCertificateResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'KubernetesFilesystemAttachmentParams': {'additionalProperties': False, - 'properties': {'mount-point': {'type': 'string'}, - 'provider': {'type': 'string'}, - 'read-only': {'type': 'boolean'}}, - 'required': ['provider'], - 'type': 'object'}, - 'KubernetesFilesystemParams': {'additionalProperties': False, - 'properties': {'attachment': {'$ref': '#/definitions/KubernetesFilesystemAttachmentParams'}, - 'attributes': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'provider': {'type': 'string'}, - 'size': {'type': 'integer'}, - 'storagename': {'type': 'string'}, - 'tags': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}}, - 'required': ['storagename', - 'size', - 'provider'], - 'type': 'object'}, - 'LifeResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'life': {'type': 'string'}}, - 'required': ['life'], - 'type': 'object'}, - 'LifeResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'NotifyWatchResult': {'additionalProperties': False, - 'properties': {'NotifyWatcherId': {'type': 'string'}, - 'error': {'$ref': '#/definitions/Error'}}, - 'required': ['NotifyWatcherId'], - 'type': 'object'}, - 'Number': {'additionalProperties': False, - 'properties': {'Build': {'type': 'integer'}, - 'Major': {'type': 'integer'}, - 'Minor': {'type': 'integer'}, - 'Patch': {'type': 'integer'}, - 'Tag': {'type': 'string'}}, - 'required': ['Major', - 'Minor', - 'Tag', - 'Patch', - 'Build'], - 'type': 'object'}, - 'OperatorProvisioningInfo': {'additionalProperties': False, - 'properties': {'api-addresses': {'items': {'type': 'string'}, - 'type': 'array'}, - 'base-image-details': {'$ref': '#/definitions/DockerImageInfo'}, - 'charm-storage': {'$ref': '#/definitions/KubernetesFilesystemParams'}, - 'error': {'$ref': '#/definitions/Error'}, - 'image-details': {'$ref': '#/definitions/DockerImageInfo'}, - 'tags': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}, - 'version': {'$ref': '#/definitions/Number'}}, - 'required': ['image-details', - 'base-image-details', - 'version', - 'api-addresses'], - 'type': 'object'}, - 'OperatorProvisioningInfoResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/OperatorProvisioningInfo'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'StringResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'result': {'type': 'string'}}, - 'required': ['result'], - 'type': 'object'}, - 'StringsResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'result': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'type': 'object'}, - 'StringsWatchResult': {'additionalProperties': False, - 'properties': {'changes': {'items': {'type': 'string'}, - 'type': 'array'}, - 'error': {'$ref': '#/definitions/Error'}, - 'watcher-id': {'type': 'string'}}, - 'required': ['watcher-id'], - 'type': 'object'}}, - 'properties': {'APIAddresses': {'description': 'APIAddresses returns the list ' - 'of addresses used to connect ' - 'to the API.', - 'properties': {'Result': {'$ref': '#/definitions/StringsResult'}}, - 'type': 'object'}, - 'APIHostPorts': {'description': 'APIHostPorts returns the API ' - 'server addresses.', - 'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}}, - 'type': 'object'}, - 'ApplicationCharmInfo': {'description': 'ApplicationCharmInfo ' - 'returns information ' - 'about an ' - "application's charm.", - 'properties': {'Params': {'$ref': '#/definitions/Entity'}, - 'Result': {'$ref': '#/definitions/Charm'}}, - 'type': 'object'}, - 'CharmInfo': {'description': 'CharmInfo returns information ' - 'about the requested charm.', - 'properties': {'Params': {'$ref': '#/definitions/CharmURL'}, - 'Result': {'$ref': '#/definitions/Charm'}}, - 'type': 'object'}, - 'IssueOperatorCertificate': {'description': 'IssueOperatorCertificate ' - 'issues an x509 ' - 'certificate for ' - 'use by the ' - 'specified ' - 'application ' - 'operator.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/IssueOperatorCertificateResults'}}, - 'type': 'object'}, - 'Life': {'description': 'Life returns the life status of every ' - 'supplied entity, where available.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/LifeResults'}}, - 'type': 'object'}, - 'ModelUUID': {'description': 'ModelUUID returns the model UUID ' - 'that this facade is used to ' - 'operate.\n' - 'It is implemented here directly ' - 'as a result of removing it from\n' - 'embedded APIAddresser *without* ' - 'bumping the facade version.\n' - 'It should be blanked when this ' - 'facade version is next ' - 'incremented.', - 'properties': {'Result': {'$ref': '#/definitions/StringResult'}}, - 'type': 'object'}, - 'OperatorProvisioningInfo': {'description': 'OperatorProvisioningInfo ' - 'returns the info ' - 'needed to ' - 'provision an ' - 'operator.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/OperatorProvisioningInfoResults'}}, - 'type': 'object'}, - 'SetPasswords': {'description': 'SetPasswords sets the given ' - 'password for each supplied ' - 'entity, if possible.', - 'properties': {'Params': {'$ref': '#/definitions/EntityPasswords'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'WatchAPIHostPorts': {'description': 'WatchAPIHostPorts ' - 'watches the API server ' - 'addresses.', - 'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}}, - 'type': 'object'}, - 'WatchApplications': {'description': 'WatchApplications starts ' - 'a StringsWatcher to ' - 'watch applications\n' - 'deployed to this model.', - 'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}}, - 'type': 'object'}}, - 'type': 'object'} - - - @ReturnMapping(StringsResult) - async def APIAddresses(self): - ''' - APIAddresses returns the list of addresses used to connect to the API. - - - Returns -> StringsResult - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='CAASOperatorProvisioner', - request='APIAddresses', - version=1, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(APIHostPortsResult) - async def APIHostPorts(self): - ''' - APIHostPorts returns the API server addresses. - - - Returns -> APIHostPortsResult - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='CAASOperatorProvisioner', - request='APIHostPorts', - version=1, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(Charm) - async def ApplicationCharmInfo(self, tag=None): - ''' - ApplicationCharmInfo returns information about an application's charm. - - tag : str - Returns -> Charm - ''' - if tag is not None and not isinstance(tag, (bytes, str)): - raise Exception("Expected tag to be a str, received: {}".format(type(tag))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='CAASOperatorProvisioner', - request='ApplicationCharmInfo', - version=1, - params=_params) - _params['tag'] = tag - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(Charm) - async def CharmInfo(self, url=None): - ''' - CharmInfo returns information about the requested charm. - - url : str - Returns -> Charm - ''' - if url is not None and not isinstance(url, (bytes, str)): - raise Exception("Expected url to be a str, received: {}".format(type(url))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='CAASOperatorProvisioner', - request='CharmInfo', - version=1, - params=_params) - _params['url'] = url - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(IssueOperatorCertificateResults) - async def IssueOperatorCertificate(self, entities=None): - ''' - IssueOperatorCertificate issues an x509 certificate for use by the specified application operator. - - entities : typing.Sequence[~Entity] - Returns -> IssueOperatorCertificateResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='CAASOperatorProvisioner', - request='IssueOperatorCertificate', - version=1, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(LifeResults) - async def Life(self, entities=None): - ''' - Life returns the life status of every supplied entity, where available. - - entities : typing.Sequence[~Entity] - Returns -> LifeResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='CAASOperatorProvisioner', - request='Life', - version=1, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringResult) - async def ModelUUID(self): - ''' - ModelUUID returns the model UUID that this facade is used to operate. - It is implemented here directly as a result of removing it from - embedded APIAddresser *without* bumping the facade version. - It should be blanked when this facade version is next incremented. - - - Returns -> StringResult - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='CAASOperatorProvisioner', - request='ModelUUID', - version=1, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(OperatorProvisioningInfoResults) - async def OperatorProvisioningInfo(self, entities=None): - ''' - OperatorProvisioningInfo returns the info needed to provision an operator. - - entities : typing.Sequence[~Entity] - Returns -> OperatorProvisioningInfoResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='CAASOperatorProvisioner', - request='OperatorProvisioningInfo', - version=1, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def SetPasswords(self, changes=None): - ''' - SetPasswords sets the given password for each supplied entity, if possible. - - changes : typing.Sequence[~EntityPassword] - Returns -> ErrorResults - ''' - if changes is not None and not isinstance(changes, (bytes, str, list)): - raise Exception("Expected changes to be a Sequence, received: {}".format(type(changes))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='CAASOperatorProvisioner', - request='SetPasswords', - version=1, - params=_params) - _params['changes'] = changes - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(NotifyWatchResult) - async def WatchAPIHostPorts(self): - ''' - WatchAPIHostPorts watches the API server addresses. - - - Returns -> NotifyWatchResult - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='CAASOperatorProvisioner', - request='WatchAPIHostPorts', - version=1, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringsWatchResult) - async def WatchApplications(self): - ''' - WatchApplications starts a StringsWatcher to watch applications - deployed to this model. - - - Returns -> StringsWatchResult - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='CAASOperatorProvisioner', - request='WatchApplications', - version=1, - params=_params) - - reply = await self.rpc(msg) - return reply - - - -class CAASOperatorUpgraderFacade(Type): - name = 'CAASOperatorUpgrader' - version = 1 - schema = {'definitions': {'Error': {'additionalProperties': False, - 'properties': {'code': {'type': 'string'}, - 'info': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'message': {'type': 'string'}}, - 'required': ['message', 'code'], - 'type': 'object'}, - 'ErrorResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}}, - 'type': 'object'}, - 'KubernetesUpgradeArg': {'additionalProperties': False, - 'properties': {'agent-tag': {'type': 'string'}, - 'version': {'$ref': '#/definitions/Number'}}, - 'required': ['agent-tag', 'version'], - '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'}}, - 'properties': {'UpgradeOperator': {'description': 'UpgradeOperator upgrades ' - 'the operator for the ' - 'specified agents.', - 'properties': {'Params': {'$ref': '#/definitions/KubernetesUpgradeArg'}, - 'Result': {'$ref': '#/definitions/ErrorResult'}}, - 'type': 'object'}}, - 'type': 'object'} - - - @ReturnMapping(ErrorResult) - async def UpgradeOperator(self, agent_tag=None, version=None): - ''' - UpgradeOperator upgrades the operator for the specified agents. - - agent_tag : str - version : Number - Returns -> ErrorResult - ''' - if agent_tag is not None and not isinstance(agent_tag, (bytes, str)): - raise Exception("Expected agent_tag to be a str, received: {}".format(type(agent_tag))) - - if version is not None and not isinstance(version, (dict, Number)): - raise Exception("Expected version to be a Number, received: {}".format(type(version))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='CAASOperatorUpgrader', - request='UpgradeOperator', - version=1, - params=_params) - _params['agent-tag'] = agent_tag - _params['version'] = version - reply = await self.rpc(msg) - return reply - - - -class CharmDownloaderFacade(Type): - name = 'CharmDownloader' - 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': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'message': {'type': 'string'}}, - 'required': ['message', 'code'], - 'type': 'object'}, - 'ErrorResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}}, - 'type': 'object'}, - 'ErrorResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'StringsWatchResult': {'additionalProperties': False, - 'properties': {'changes': {'items': {'type': 'string'}, - 'type': 'array'}, - 'error': {'$ref': '#/definitions/Error'}, - 'watcher-id': {'type': 'string'}}, - 'required': ['watcher-id'], - 'type': 'object'}}, - 'properties': {'DownloadApplicationCharms': {'description': 'DownloadApplicationCharms ' - 'iterates the ' - 'list of provided ' - 'applications ' - 'and\n' - 'downloads any ' - 'referenced ' - 'charms that have ' - 'not yet been ' - 'persisted to ' - 'the\n' - 'blob store.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'WatchApplicationsWithPendingCharms': {'description': 'WatchApplicationsWithPendingCharms ' - 'registers ' - 'and ' - 'returns ' - 'a ' - 'watcher ' - 'instance\n' - 'that ' - 'reports ' - 'the ID ' - 'of ' - 'applications ' - 'that ' - 'reference ' - 'a charm ' - 'which ' - 'has not ' - 'yet\n' - 'been ' - 'downloaded.', - 'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}}, - 'type': 'object'}}, - 'type': 'object'} - - - @ReturnMapping(ErrorResults) - async def DownloadApplicationCharms(self, entities=None): - ''' - DownloadApplicationCharms iterates the list of provided applications and - downloads any referenced charms that have not yet been persisted to the - blob store. - - entities : typing.Sequence[~Entity] - Returns -> ErrorResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='CharmDownloader', - request='DownloadApplicationCharms', - version=1, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringsWatchResult) - async def WatchApplicationsWithPendingCharms(self): - ''' - WatchApplicationsWithPendingCharms registers and returns a watcher instance - that reports the ID of applications that reference a charm which has not yet - been downloaded. - - - Returns -> StringsWatchResult - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='CharmDownloader', - request='WatchApplicationsWithPendingCharms', - version=1, - params=_params) - - reply = await self.rpc(msg) - return reply - - - -class CredentialManagerFacade(Type): - name = 'CredentialManager' - version = 1 - schema = {'definitions': {'Error': {'additionalProperties': False, - 'properties': {'code': {'type': 'string'}, - 'info': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'message': {'type': 'string'}}, - 'required': ['message', 'code'], - 'type': 'object'}, - 'ErrorResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}}, - 'type': 'object'}, - 'InvalidateCredentialArg': {'additionalProperties': False, - 'properties': {'reason': {'type': 'string'}}, - 'type': 'object'}}, - 'properties': {'InvalidateModelCredential': {'description': 'InvalidateModelCredential ' - 'marks the cloud ' - 'credential for ' - 'this model as ' - 'invalid.', - 'properties': {'Params': {'$ref': '#/definitions/InvalidateCredentialArg'}, - 'Result': {'$ref': '#/definitions/ErrorResult'}}, - 'type': 'object'}}, - 'type': 'object'} - - - @ReturnMapping(ErrorResult) - async def InvalidateModelCredential(self, reason=None): - ''' - InvalidateModelCredential marks the cloud credential for this model as invalid. - - reason : str - Returns -> ErrorResult - ''' - if reason is not None and not isinstance(reason, (bytes, str)): - raise Exception("Expected reason to be a str, received: {}".format(type(reason))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='CredentialManager', - request='InvalidateModelCredential', - version=1, - params=_params) - _params['reason'] = reason - reply = await self.rpc(msg) - return reply - - - -class CrossControllerFacade(Type): - name = 'CrossController' - version = 1 - schema = {'definitions': {'ControllerAPIInfoResult': {'additionalProperties': False, - 'properties': {'addresses': {'items': {'type': 'string'}, - 'type': 'array'}, - 'cacert': {'type': 'string'}, - 'error': {'$ref': '#/definitions/Error'}}, - 'required': ['addresses', - 'cacert'], - 'type': 'object'}, - 'ControllerAPIInfoResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/ControllerAPIInfoResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'Error': {'additionalProperties': False, - 'properties': {'code': {'type': 'string'}, - 'info': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'message': {'type': 'string'}}, - 'required': ['message', 'code'], - 'type': 'object'}, - 'NotifyWatchResult': {'additionalProperties': False, - 'properties': {'NotifyWatcherId': {'type': 'string'}, - 'error': {'$ref': '#/definitions/Error'}}, - 'required': ['NotifyWatcherId'], - 'type': 'object'}, - 'NotifyWatchResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}}, - 'properties': {'ControllerInfo': {'description': 'ControllerInfo returns the ' - 'API info for the ' - 'controller.', - 'properties': {'Result': {'$ref': '#/definitions/ControllerAPIInfoResults'}}, - 'type': 'object'}, - 'WatchControllerInfo': {'description': 'WatchControllerInfo ' - 'creates a watcher that ' - 'notifies when the API ' - 'info\n' - 'for the controller ' - 'changes.', - 'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResults'}}, - 'type': 'object'}}, - 'type': 'object'} - - - @ReturnMapping(ControllerAPIInfoResults) - async def ControllerInfo(self): - ''' - ControllerInfo returns the API info for the controller. - - - Returns -> ControllerAPIInfoResults - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='CrossController', - request='ControllerInfo', - version=1, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(NotifyWatchResults) - async def WatchControllerInfo(self): - ''' - WatchControllerInfo creates a watcher that notifies when the API info - for the controller changes. - - - Returns -> NotifyWatchResults - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='CrossController', - request='WatchControllerInfo', - version=1, - params=_params) - - reply = await self.rpc(msg) - return reply - - - -class CrossModelSecretsFacade(Type): - name = 'CrossModelSecrets' - version = 1 - schema = {'definitions': {'Error': {'additionalProperties': False, - 'properties': {'code': {'type': 'string'}, - 'info': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'message': {'type': 'string'}}, - 'required': ['message', 'code'], - 'type': 'object'}, - 'GetRemoteSecretAccessArg': {'additionalProperties': False, - 'properties': {'application-token': {'type': 'string'}, - 'unit-id': {'type': 'integer'}, - 'uri': {'type': 'string'}}, - 'required': ['application-token', - 'unit-id', - 'uri'], - 'type': 'object'}, - 'GetRemoteSecretAccessArgs': {'additionalProperties': False, - 'properties': {'relations': {'items': {'$ref': '#/definitions/GetRemoteSecretAccessArg'}, - 'type': 'array'}}, - 'required': ['relations'], - 'type': 'object'}, - 'GetRemoteSecretContentArg': {'additionalProperties': False, - 'properties': {'application-token': {'type': 'string'}, - 'bakery-version': {'type': 'integer'}, - 'macaroons': {'items': {'$ref': '#/definitions/Macaroon'}, - 'type': 'array'}, - 'peek': {'type': 'boolean'}, - 'refresh': {'type': 'boolean'}, - 'revision': {'type': 'integer'}, - 'unit-id': {'type': 'integer'}, - 'uri': {'type': 'string'}}, - 'required': ['application-token', - 'unit-id', - 'uri'], - 'type': 'object'}, - 'GetRemoteSecretContentArgs': {'additionalProperties': False, - 'properties': {'relations': {'items': {'$ref': '#/definitions/GetRemoteSecretContentArg'}, - 'type': 'array'}}, - 'required': ['relations'], - 'type': 'object'}, - 'Macaroon': {'additionalProperties': False, 'type': 'object'}, - 'SecretBackendConfig': {'additionalProperties': False, - 'properties': {'params': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'type': {'type': 'string'}}, - 'required': ['type'], - 'type': 'object'}, - 'SecretBackendConfigResult': {'additionalProperties': False, - 'properties': {'config': {'$ref': '#/definitions/SecretBackendConfig'}, - 'draining': {'type': 'boolean'}, - 'model-controller': {'type': 'string'}, - 'model-name': {'type': 'string'}, - 'model-uuid': {'type': 'string'}}, - 'required': ['model-controller', - 'model-uuid', - 'model-name', - 'draining'], - 'type': 'object'}, - 'SecretContentParams': {'additionalProperties': False, - 'properties': {'data': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}, - 'value-ref': {'$ref': '#/definitions/SecretValueRef'}}, - 'type': 'object'}, - 'SecretContentResult': {'additionalProperties': False, - 'properties': {'backend-config': {'$ref': '#/definitions/SecretBackendConfigResult'}, - 'content': {'$ref': '#/definitions/SecretContentParams'}, - 'error': {'$ref': '#/definitions/Error'}, - 'latest-revision': {'type': 'integer'}}, - 'required': ['content'], - 'type': 'object'}, - 'SecretContentResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/SecretContentResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'SecretValueRef': {'additionalProperties': False, - 'properties': {'backend-id': {'type': 'string'}, - 'revision-id': {'type': 'string'}}, - 'required': ['backend-id', 'revision-id'], - 'type': 'object'}, - 'StringResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'result': {'type': 'string'}}, - 'required': ['result'], - 'type': 'object'}, - 'StringResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}}, - 'properties': {'GetSecretAccessScope': {'description': 'GetSecretAccessScope ' - 'returns the tokens ' - 'for the access scope ' - 'of the specified ' - 'secrets and ' - 'consumers.', - 'properties': {'Params': {'$ref': '#/definitions/GetRemoteSecretAccessArgs'}, - 'Result': {'$ref': '#/definitions/StringResults'}}, - 'type': 'object'}, - 'GetSecretContentInfo': {'description': 'GetSecretContentInfo ' - 'returns the secret ' - 'values for the ' - 'specified secrets.', - 'properties': {'Params': {'$ref': '#/definitions/GetRemoteSecretContentArgs'}, - 'Result': {'$ref': '#/definitions/SecretContentResults'}}, - 'type': 'object'}}, - 'type': 'object'} - - - @ReturnMapping(StringResults) - async def GetSecretAccessScope(self, relations=None): - ''' - GetSecretAccessScope returns the tokens for the access scope of the specified secrets and consumers. - - relations : typing.Sequence[~GetRemoteSecretAccessArg] - Returns -> StringResults - ''' - if relations is not None and not isinstance(relations, (bytes, str, list)): - raise Exception("Expected relations to be a Sequence, received: {}".format(type(relations))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='CrossModelSecrets', - request='GetSecretAccessScope', - version=1, - params=_params) - _params['relations'] = relations - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(SecretContentResults) - async def GetSecretContentInfo(self, relations=None): - ''' - GetSecretContentInfo returns the secret values for the specified secrets. - - relations : typing.Sequence[~GetRemoteSecretContentArg] - Returns -> SecretContentResults - ''' - if relations is not None and not isinstance(relations, (bytes, str, list)): - raise Exception("Expected relations to be a Sequence, received: {}".format(type(relations))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='CrossModelSecrets', - request='GetSecretContentInfo', - version=1, - params=_params) - _params['relations'] = relations - reply = await self.rpc(msg) - return reply - - - -class DeployerFacade(Type): - name = 'Deployer' - version = 1 - schema = {'definitions': {'APIHostPortsResult': {'additionalProperties': False, - 'properties': {'servers': {'items': {'items': {'$ref': '#/definitions/HostPort'}, - 'type': 'array'}, - 'type': 'array'}}, - 'required': ['servers'], - 'type': 'object'}, - 'Address': {'additionalProperties': False, - 'properties': {'cidr': {'type': 'string'}, - 'config-type': {'type': 'string'}, - 'is-secondary': {'type': 'boolean'}, - 'scope': {'type': 'string'}, - 'space-id': {'type': 'string'}, - 'space-name': {'type': 'string'}, - 'type': {'type': 'string'}, - 'value': {'type': 'string'}}, - 'required': ['value', 'type', 'scope'], - 'type': 'object'}, - 'DeployerConnectionValues': {'additionalProperties': False, - 'properties': {'api-addresses': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'required': ['api-addresses'], - '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': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'message': {'type': 'string'}}, - 'required': ['message', 'code'], - 'type': 'object'}, - 'ErrorResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}}, - 'type': 'object'}, - 'ErrorResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'HostPort': {'additionalProperties': False, - 'properties': {'Address': {'$ref': '#/definitions/Address'}, - 'cidr': {'type': 'string'}, - 'config-type': {'type': 'string'}, - 'is-secondary': {'type': 'boolean'}, - 'port': {'type': 'integer'}, - 'scope': {'type': 'string'}, - 'space-id': {'type': 'string'}, - 'space-name': {'type': 'string'}, - 'type': {'type': 'string'}, - 'value': {'type': 'string'}}, - 'required': ['value', - 'type', - 'scope', - 'Address', - 'port'], - 'type': 'object'}, - 'LifeResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'life': {'type': 'string'}}, - 'required': ['life'], - 'type': 'object'}, - 'LifeResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'NotifyWatchResult': {'additionalProperties': False, - 'properties': {'NotifyWatcherId': {'type': 'string'}, - 'error': {'$ref': '#/definitions/Error'}}, - 'required': ['NotifyWatcherId'], - 'type': 'object'}, - 'SetStatus': {'additionalProperties': False, - 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'}, - 'type': 'array'}}, - 'required': ['entities'], - 'type': 'object'}, - 'StringResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'result': {'type': 'string'}}, - 'required': ['result'], - 'type': 'object'}, - 'StringsResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'result': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'type': 'object'}, - 'StringsWatchResult': {'additionalProperties': False, - 'properties': {'changes': {'items': {'type': 'string'}, - 'type': 'array'}, - 'error': {'$ref': '#/definitions/Error'}, - 'watcher-id': {'type': 'string'}}, - 'required': ['watcher-id'], - 'type': 'object'}, - 'StringsWatchResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}}, - 'properties': {'APIAddresses': {'description': 'APIAddresses returns the list ' - 'of addresses used to connect ' - 'to the API.', - 'properties': {'Result': {'$ref': '#/definitions/StringsResult'}}, - 'type': 'object'}, - 'APIHostPorts': {'description': 'APIHostPorts returns the API ' - 'server addresses.', - 'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}}, - 'type': 'object'}, - 'ConnectionInfo': {'description': 'ConnectionInfo returns all ' - 'the address information ' - 'that the\n' - 'deployer task needs in one ' - 'call.', - 'properties': {'Result': {'$ref': '#/definitions/DeployerConnectionValues'}}, - 'type': 'object'}, - 'Life': {'description': 'Life returns the life status of every ' - 'supplied entity, where available.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/LifeResults'}}, - 'type': 'object'}, - 'ModelUUID': {'description': 'ModelUUID returns the model UUID ' - 'that this facade is deploying ' - 'into.\n' - 'It is implemented here directly ' - 'as a result of removing it from\n' - 'embedded APIAddresser *without* ' - 'bumping the facade version.\n' - 'It should be blanked when this ' - 'facade version is next ' - 'incremented.', - 'properties': {'Result': {'$ref': '#/definitions/StringResult'}}, - 'type': 'object'}, - 'Remove': {'description': 'Remove removes every given entity ' - 'from state, calling EnsureDead\n' - 'first, then Remove. It will fail if ' - 'the entity is not present.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'SetPasswords': {'description': 'SetPasswords sets the given ' - 'password for each supplied ' - 'entity, if possible.', - 'properties': {'Params': {'$ref': '#/definitions/EntityPasswords'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'SetStatus': {'description': 'SetStatus sets the status of the ' - 'specified entities.', - 'properties': {'Params': {'$ref': '#/definitions/SetStatus'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'WatchAPIHostPorts': {'description': 'WatchAPIHostPorts ' - 'watches the API server ' - 'addresses.', - 'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}}, - 'type': 'object'}, - 'WatchUnits': {'description': 'WatchUnits starts a ' - 'StringsWatcher to watch all ' - 'units belonging to\n' - 'to any entity (machine or ' - 'service) passed in args.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/StringsWatchResults'}}, - 'type': 'object'}}, - 'type': 'object'} - - - @ReturnMapping(StringsResult) - async def APIAddresses(self): - ''' - APIAddresses returns the list of addresses used to connect to the API. - - - Returns -> StringsResult - ''' - - # 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): - ''' - APIHostPorts returns the API server addresses. - - - Returns -> APIHostPortsResult - ''' - - # 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(DeployerConnectionValues) - async def ConnectionInfo(self): - ''' - ConnectionInfo returns all the address information that the - deployer task needs in one call. - - - Returns -> DeployerConnectionValues - ''' - - # 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=None): - ''' - Life returns the life status of every supplied entity, where available. - - entities : typing.Sequence[~Entity] - Returns -> LifeResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # 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): - ''' - ModelUUID returns the model UUID that this facade is deploying into. - It is implemented here directly as a result of removing it from - embedded APIAddresser *without* bumping the facade version. - It should be blanked when this facade version is next incremented. - - - Returns -> StringResult - ''' - - # 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=None): - ''' - Remove removes every given entity from state, calling EnsureDead - first, then Remove. It will fail if the entity is not present. - - entities : typing.Sequence[~Entity] - Returns -> ErrorResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # 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=None): - ''' - SetPasswords sets the given password for each supplied entity, if possible. - - changes : typing.Sequence[~EntityPassword] - Returns -> ErrorResults - ''' - if changes is not None and not isinstance(changes, (bytes, str, list)): - raise Exception("Expected changes to be a Sequence, received: {}".format(type(changes))) - - # 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(ErrorResults) - async def SetStatus(self, entities=None): - ''' - SetStatus sets the status of the specified entities. - - entities : typing.Sequence[~EntityStatusArgs] - Returns -> ErrorResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Deployer', - request='SetStatus', - version=1, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(NotifyWatchResult) - async def WatchAPIHostPorts(self): - ''' - WatchAPIHostPorts watches the API server addresses. - - - Returns -> NotifyWatchResult - ''' - - # 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=None): - ''' - WatchUnits starts a StringsWatcher to watch all units belonging to - to any entity (machine or service) passed in args. - - entities : typing.Sequence[~Entity] - Returns -> StringsWatchResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # 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 EnvironUpgraderFacade(Type): - name = 'EnvironUpgrader' - 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': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'message': {'type': 'string'}}, - 'required': ['message', 'code'], - 'type': 'object'}, - 'ErrorResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}}, - 'type': 'object'}, - 'ErrorResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'IntResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'result': {'type': 'integer'}}, - 'required': ['result'], - 'type': 'object'}, - 'IntResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/IntResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'NotifyWatchResult': {'additionalProperties': False, - 'properties': {'NotifyWatcherId': {'type': 'string'}, - 'error': {'$ref': '#/definitions/Error'}}, - 'required': ['NotifyWatcherId'], - 'type': 'object'}, - 'NotifyWatchResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'SetModelEnvironVersion': {'additionalProperties': False, - 'properties': {'model-tag': {'type': 'string'}, - 'version': {'type': 'integer'}}, - 'required': ['model-tag', - 'version'], - 'type': 'object'}, - 'SetModelEnvironVersions': {'additionalProperties': False, - 'properties': {'models': {'items': {'$ref': '#/definitions/SetModelEnvironVersion'}, - 'type': 'array'}}, - 'type': 'object'}, - 'SetStatus': {'additionalProperties': False, - 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'}, - 'type': 'array'}}, - 'required': ['entities'], - 'type': 'object'}}, - 'properties': {'ModelEnvironVersion': {'description': 'ModelEnvironVersion ' - 'returns the current ' - 'version of the environ ' - 'corresponding\n' - 'to each specified ' - 'model.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/IntResults'}}, - 'type': 'object'}, - 'ModelTargetEnvironVersion': {'description': 'ModelTargetEnvironVersion ' - 'returns the ' - 'target version ' - 'of the environ\n' - 'corresponding to ' - 'each specified ' - 'model. The ' - 'target version ' - 'is the\n' - 'environ ' - "provider's " - 'version.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/IntResults'}}, - 'type': 'object'}, - 'SetModelEnvironVersion': {'description': 'SetModelEnvironVersion ' - 'sets the current ' - 'version of the ' - 'environ ' - 'corresponding\n' - 'to each specified ' - 'model.', - 'properties': {'Params': {'$ref': '#/definitions/SetModelEnvironVersions'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'SetModelStatus': {'description': 'SetModelStatus sets the ' - 'status of each given model.', - 'properties': {'Params': {'$ref': '#/definitions/SetStatus'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'WatchModelEnvironVersion': {'description': 'WatchModelEnvironVersion ' - 'watches for ' - 'changes to the ' - 'environ version ' - 'of the\n' - 'specified ' - 'models.\n' - '\n' - 'NOTE(axw) this is ' - 'currently ' - 'implemented in ' - 'terms of ' - 'state.Model.Watch, ' - 'so\n' - 'the client may be ' - 'notified of ' - 'changes unrelated ' - 'to the environ ' - 'version.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/NotifyWatchResults'}}, - 'type': 'object'}}, - 'type': 'object'} - - - @ReturnMapping(IntResults) - async def ModelEnvironVersion(self, entities=None): - ''' - ModelEnvironVersion returns the current version of the environ corresponding - to each specified model. - - entities : typing.Sequence[~Entity] - Returns -> IntResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='EnvironUpgrader', - request='ModelEnvironVersion', - version=1, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(IntResults) - async def ModelTargetEnvironVersion(self, entities=None): - ''' - ModelTargetEnvironVersion returns the target version of the environ - corresponding to each specified model. The target version is the - environ provider's version. - - entities : typing.Sequence[~Entity] - Returns -> IntResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='EnvironUpgrader', - request='ModelTargetEnvironVersion', - version=1, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def SetModelEnvironVersion(self, models=None): - ''' - SetModelEnvironVersion sets the current version of the environ corresponding - to each specified model. - - models : typing.Sequence[~SetModelEnvironVersion] - Returns -> ErrorResults - ''' - if models is not None and not isinstance(models, (bytes, str, list)): - raise Exception("Expected models to be a Sequence, received: {}".format(type(models))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='EnvironUpgrader', - request='SetModelEnvironVersion', - version=1, - params=_params) - _params['models'] = models - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def SetModelStatus(self, entities=None): - ''' - SetModelStatus sets the status of each given model. - - entities : typing.Sequence[~EntityStatusArgs] - Returns -> ErrorResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='EnvironUpgrader', - request='SetModelStatus', - version=1, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(NotifyWatchResults) - async def WatchModelEnvironVersion(self, entities=None): - ''' - WatchModelEnvironVersion watches for changes to the environ version of the - specified models. - - NOTE(axw) this is currently implemented in terms of state.Model.Watch, so - the client may be notified of changes unrelated to the environ version. - - entities : typing.Sequence[~Entity] - Returns -> NotifyWatchResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='EnvironUpgrader', - request='WatchModelEnvironVersion', - version=1, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - -class ExternalControllerUpdaterFacade(Type): - name = 'ExternalControllerUpdater' - 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': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'message': {'type': 'string'}}, - 'required': ['message', 'code'], - 'type': 'object'}, - 'ErrorResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}}, - 'type': 'object'}, - 'ErrorResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'ExternalControllerInfo': {'additionalProperties': False, - 'properties': {'addrs': {'items': {'type': 'string'}, - 'type': 'array'}, - 'ca-cert': {'type': 'string'}, - 'controller-alias': {'type': 'string'}, - 'controller-tag': {'type': 'string'}}, - 'required': ['controller-tag', - 'controller-alias', - 'addrs', - 'ca-cert'], - 'type': 'object'}, - 'ExternalControllerInfoResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'result': {'$ref': '#/definitions/ExternalControllerInfo'}}, - 'required': ['result', - 'error'], - 'type': 'object'}, - 'ExternalControllerInfoResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/ExternalControllerInfoResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'SetExternalControllerInfoParams': {'additionalProperties': False, - 'properties': {'info': {'$ref': '#/definitions/ExternalControllerInfo'}}, - 'required': ['info'], - 'type': 'object'}, - 'SetExternalControllersInfoParams': {'additionalProperties': False, - 'properties': {'controllers': {'items': {'$ref': '#/definitions/SetExternalControllerInfoParams'}, - 'type': 'array'}}, - 'required': ['controllers'], - 'type': 'object'}, - 'StringsWatchResult': {'additionalProperties': False, - 'properties': {'changes': {'items': {'type': 'string'}, - 'type': 'array'}, - 'error': {'$ref': '#/definitions/Error'}, - 'watcher-id': {'type': 'string'}}, - 'required': ['watcher-id'], - 'type': 'object'}, - 'StringsWatchResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}}, - 'properties': {'ExternalControllerInfo': {'description': 'ExternalControllerInfo ' - 'returns the info ' - 'for the specified ' - 'external ' - 'controllers.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ExternalControllerInfoResults'}}, - 'type': 'object'}, - 'SetExternalControllerInfo': {'description': 'SetExternalControllerInfo ' - 'saves the info ' - 'for the ' - 'specified ' - 'external ' - 'controllers.', - 'properties': {'Params': {'$ref': '#/definitions/SetExternalControllersInfoParams'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'WatchExternalControllers': {'description': 'WatchExternalControllers ' - 'watches for the ' - 'addition and ' - 'removal of ' - 'external\n' - 'controller ' - 'records to the ' - 'local ' - "controller's " - 'database.', - 'properties': {'Result': {'$ref': '#/definitions/StringsWatchResults'}}, - 'type': 'object'}}, - 'type': 'object'} - - - @ReturnMapping(ExternalControllerInfoResults) - async def ExternalControllerInfo(self, entities=None): - ''' - ExternalControllerInfo returns the info for the specified external controllers. - - entities : typing.Sequence[~Entity] - Returns -> ExternalControllerInfoResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='ExternalControllerUpdater', - request='ExternalControllerInfo', - version=1, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def SetExternalControllerInfo(self, controllers=None): - ''' - SetExternalControllerInfo saves the info for the specified external controllers. - - controllers : typing.Sequence[~SetExternalControllerInfoParams] - Returns -> ErrorResults - ''' - if controllers is not None and not isinstance(controllers, (bytes, str, list)): - raise Exception("Expected controllers to be a Sequence, received: {}".format(type(controllers))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='ExternalControllerUpdater', - request='SetExternalControllerInfo', - version=1, - params=_params) - _params['controllers'] = controllers - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringsWatchResults) - async def WatchExternalControllers(self): - ''' - WatchExternalControllers watches for the addition and removal of external - controller records to the local controller's database. - - - Returns -> StringsWatchResults - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='ExternalControllerUpdater', - request='WatchExternalControllers', - version=1, - params=_params) - - reply = await self.rpc(msg) - return reply - - - -class FanConfigurerFacade(Type): - name = 'FanConfigurer' - version = 1 - schema = {'definitions': {'Error': {'additionalProperties': False, - 'properties': {'code': {'type': 'string'}, - 'info': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'message': {'type': 'string'}}, - 'required': ['message', 'code'], - 'type': 'object'}, - 'FanConfigEntry': {'additionalProperties': False, - 'properties': {'overlay': {'type': 'string'}, - 'underlay': {'type': 'string'}}, - 'required': ['underlay', 'overlay'], - 'type': 'object'}, - 'FanConfigResult': {'additionalProperties': False, - 'properties': {'fans': {'items': {'$ref': '#/definitions/FanConfigEntry'}, - 'type': 'array'}}, - 'required': ['fans'], - 'type': 'object'}, - 'NotifyWatchResult': {'additionalProperties': False, - 'properties': {'NotifyWatcherId': {'type': 'string'}, - 'error': {'$ref': '#/definitions/Error'}}, - 'required': ['NotifyWatcherId'], - 'type': 'object'}}, - 'properties': {'FanConfig': {'description': 'FanConfig returns current FAN ' - 'configuration.', - 'properties': {'Result': {'$ref': '#/definitions/FanConfigResult'}}, - 'type': 'object'}, - 'WatchForFanConfigChanges': {'description': 'WatchForFanConfigChanges ' - 'returns a ' - 'NotifyWatcher ' - 'that observes\n' - 'changes to the ' - 'FAN ' - 'configuration.\n' - 'so we use the ' - 'regular error ' - 'return.\n' - 'TODO(wpk) ' - '2017-09-21 We ' - 'should use Model ' - 'directly, and ' - 'watch only for ' - 'FanConfig ' - 'changes.', - 'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}}, - 'type': 'object'}}, - 'type': 'object'} - - - @ReturnMapping(FanConfigResult) - async def FanConfig(self): - ''' - FanConfig returns current FAN configuration. - - - Returns -> FanConfigResult - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='FanConfigurer', - request='FanConfig', - version=1, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(NotifyWatchResult) - async def WatchForFanConfigChanges(self): - ''' - WatchForFanConfigChanges returns a NotifyWatcher that observes - changes to the FAN configuration. - so we use the regular error return. - TODO(wpk) 2017-09-21 We should use Model directly, and watch only for FanConfig changes. - - - Returns -> NotifyWatchResult - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='FanConfigurer', - request='WatchForFanConfigChanges', - version=1, - params=_params) - - reply = await self.rpc(msg) - return reply - - - -class FirewallRulesFacade(Type): - name = 'FirewallRules' - version = 1 - schema = {'definitions': {'Error': {'additionalProperties': False, - 'properties': {'code': {'type': 'string'}, - 'info': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'message': {'type': 'string'}}, - 'required': ['message', 'code'], - 'type': 'object'}, - 'ErrorResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}}, - 'type': 'object'}, - 'ErrorResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'FirewallRule': {'additionalProperties': False, - 'properties': {'known-service': {'type': 'string'}, - 'whitelist-cidrs': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'required': ['known-service'], - 'type': 'object'}, - 'FirewallRuleArgs': {'additionalProperties': False, - 'properties': {'args': {'items': {'$ref': '#/definitions/FirewallRule'}, - 'type': 'array'}}, - 'required': ['args'], - 'type': 'object'}, - 'ListFirewallRulesResults': {'additionalProperties': False, - 'properties': {'Rules': {'items': {'$ref': '#/definitions/FirewallRule'}, - 'type': 'array'}}, - 'required': ['Rules'], - 'type': 'object'}}, - 'properties': {'ListFirewallRules': {'description': 'ListFirewallRules ' - 'returns all the firewall ' - 'rules.', - 'properties': {'Result': {'$ref': '#/definitions/ListFirewallRulesResults'}}, - 'type': 'object'}, - 'SetFirewallRules': {'description': 'SetFirewallRules creates ' - 'or updates the specified ' - 'firewall rules.', - 'properties': {'Params': {'$ref': '#/definitions/FirewallRuleArgs'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}}, - 'type': 'object'} - - - @ReturnMapping(ListFirewallRulesResults) - async def ListFirewallRules(self): - ''' - ListFirewallRules returns all the firewall rules. - - - Returns -> ListFirewallRulesResults - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='FirewallRules', - request='ListFirewallRules', - version=1, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def SetFirewallRules(self, args=None): - ''' - SetFirewallRules creates or updates the specified firewall rules. - - args : typing.Sequence[~FirewallRule] - Returns -> ErrorResults - ''' - if args is not None and not isinstance(args, (bytes, str, list)): - raise Exception("Expected args to be a Sequence, received: {}".format(type(args))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='FirewallRules', - request='SetFirewallRules', - version=1, - params=_params) - _params['args'] = args - reply = await self.rpc(msg) - return reply - - - -class HostKeyReporterFacade(Type): - name = 'HostKeyReporter' - version = 1 - schema = {'definitions': {'Error': {'additionalProperties': False, - 'properties': {'code': {'type': 'string'}, - 'info': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'message': {'type': 'string'}}, - 'required': ['message', 'code'], - 'type': 'object'}, - 'ErrorResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}}, - 'type': 'object'}, - 'ErrorResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'SSHHostKeySet': {'additionalProperties': False, - 'properties': {'entity-keys': {'items': {'$ref': '#/definitions/SSHHostKeys'}, - 'type': 'array'}}, - 'required': ['entity-keys'], - 'type': 'object'}, - 'SSHHostKeys': {'additionalProperties': False, - 'properties': {'public-keys': {'items': {'type': 'string'}, - 'type': 'array'}, - 'tag': {'type': 'string'}}, - 'required': ['tag', 'public-keys'], - 'type': 'object'}}, - 'properties': {'ReportKeys': {'description': 'ReportKeys sets the SSH host ' - 'keys for one or more entities.', - 'properties': {'Params': {'$ref': '#/definitions/SSHHostKeySet'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}}, - 'type': 'object'} - - - @ReturnMapping(ErrorResults) - async def ReportKeys(self, entity_keys=None): - ''' - ReportKeys sets the SSH host keys for one or more entities. - - entity_keys : typing.Sequence[~SSHHostKeys] - Returns -> ErrorResults - ''' - if entity_keys is not None and not isinstance(entity_keys, (bytes, str, list)): - raise Exception("Expected entity_keys to be a Sequence, received: {}".format(type(entity_keys))) - - # 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 ImageMetadataManagerFacade(Type): - name = 'ImageMetadataManager' - version = 1 - 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'}, - 'source': {'type': 'string'}, - 'stream': {'type': 'string'}, - 'version': {'type': 'string'}, - 'virt-type': {'type': 'string'}}, - 'required': ['image-id', - 'region', - 'version', - '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': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'message': {'type': 'string'}}, - 'required': ['message', 'code'], - 'type': 'object'}, - 'ErrorResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}}, - 'type': 'object'}, - 'ErrorResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'ImageMetadataFilter': {'additionalProperties': False, - 'properties': {'arches': {'items': {'type': 'string'}, - 'type': 'array'}, - 'region': {'type': 'string'}, - 'root-storage-type': {'type': 'string'}, - 'stream': {'type': 'string'}, - 'versions': {'items': {'type': 'string'}, - 'type': 'array'}, - 'virt-type': {'type': 'string'}}, - 'type': 'object'}, - 'ListCloudImageMetadataResult': {'additionalProperties': False, - 'properties': {'result': {'items': {'$ref': '#/definitions/CloudImageMetadata'}, - 'type': 'array'}}, - 'required': ['result'], - 'type': 'object'}, - 'MetadataImageIds': {'additionalProperties': False, - 'properties': {'image-ids': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'required': ['image-ids'], - 'type': 'object'}, - 'MetadataSaveParams': {'additionalProperties': False, - 'properties': {'metadata': {'items': {'$ref': '#/definitions/CloudImageMetadataList'}, - 'type': 'array'}}, - 'type': 'object'}}, - 'properties': {'Delete': {'description': 'Delete deletes cloud image metadata ' - 'for given image ids.\n' - 'It supports bulk calls.', - 'properties': {'Params': {'$ref': '#/definitions/MetadataImageIds'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'List': {'description': 'List returns all found cloud image ' - 'metadata that satisfy\n' - 'given filter.\n' - 'Returned list contains metadata ' - 'ordered by priority.', - 'properties': {'Params': {'$ref': '#/definitions/ImageMetadataFilter'}, - 'Result': {'$ref': '#/definitions/ListCloudImageMetadataResult'}}, - 'type': 'object'}, - 'Save': {'description': 'Save stores given cloud image ' - 'metadata.\n' - 'It supports bulk calls.', - 'properties': {'Params': {'$ref': '#/definitions/MetadataSaveParams'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}}, - 'type': 'object'} - - - @ReturnMapping(ErrorResults) - async def Delete(self, image_ids=None): - ''' - Delete deletes cloud image metadata for given image ids. - It supports bulk calls. - - image_ids : typing.Sequence[str] - Returns -> ErrorResults - ''' - if image_ids is not None and not isinstance(image_ids, (bytes, str, list)): - raise Exception("Expected image_ids to be a Sequence, received: {}".format(type(image_ids))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='ImageMetadataManager', - request='Delete', - version=1, - params=_params) - _params['image-ids'] = image_ids - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ListCloudImageMetadataResult) - async def List(self, arches=None, region=None, root_storage_type=None, stream=None, versions=None, virt_type=None): - ''' - List returns all found cloud image metadata that satisfy - given filter. - Returned list contains metadata ordered by priority. - - arches : typing.Sequence[str] - region : str - root_storage_type : str - stream : str - versions : typing.Sequence[str] - virt_type : str - Returns -> ListCloudImageMetadataResult - ''' - if arches is not None and not isinstance(arches, (bytes, str, list)): - raise Exception("Expected arches to be a Sequence, received: {}".format(type(arches))) - - if region is not None and not isinstance(region, (bytes, str)): - raise Exception("Expected region to be a str, received: {}".format(type(region))) - - if root_storage_type is not None and not isinstance(root_storage_type, (bytes, str)): - raise Exception("Expected root_storage_type to be a str, received: {}".format(type(root_storage_type))) - - if stream is not None and not isinstance(stream, (bytes, str)): - raise Exception("Expected stream to be a str, received: {}".format(type(stream))) - - if versions is not None and not isinstance(versions, (bytes, str, list)): - raise Exception("Expected versions to be a Sequence, received: {}".format(type(versions))) - - if virt_type is not None and not isinstance(virt_type, (bytes, str)): - raise Exception("Expected virt_type to be a str, received: {}".format(type(virt_type))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='ImageMetadataManager', - request='List', - version=1, - params=_params) - _params['arches'] = arches - _params['region'] = region - _params['root-storage-type'] = root_storage_type - _params['stream'] = stream - _params['versions'] = versions - _params['virt-type'] = virt_type - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def Save(self, metadata=None): - ''' - Save stores given cloud image metadata. - It supports bulk calls. - - metadata : typing.Sequence[~CloudImageMetadataList] - Returns -> ErrorResults - ''' - if metadata is not None and not isinstance(metadata, (bytes, str, list)): - raise Exception("Expected metadata to be a Sequence, received: {}".format(type(metadata))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='ImageMetadataManager', - request='Save', - version=1, - params=_params) - _params['metadata'] = metadata - reply = await self.rpc(msg) - return reply - - - -class KeyManagerFacade(Type): - name = 'KeyManager' - version = 1 - schema = {'definitions': {'Entities': {'additionalProperties': False, - 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'}, - 'type': 'array'}}, - 'required': ['entities'], - 'type': 'object'}, - 'Entity': {'additionalProperties': False, - 'properties': {'tag': {'type': 'string'}}, - 'required': ['tag'], - 'type': 'object'}, - 'Error': {'additionalProperties': False, - 'properties': {'code': {'type': 'string'}, - 'info': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'message': {'type': 'string'}}, - 'required': ['message', 'code'], - 'type': 'object'}, - 'ErrorResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}}, - 'type': 'object'}, - 'ErrorResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'ListSSHKeys': {'additionalProperties': False, - 'properties': {'entities': {'$ref': '#/definitions/Entities'}, - 'mode': {'type': 'boolean'}}, - 'required': ['entities', 'mode'], - 'type': 'object'}, - 'ModifyUserSSHKeys': {'additionalProperties': False, - 'properties': {'ssh-keys': {'items': {'type': 'string'}, - 'type': 'array'}, - 'user': {'type': 'string'}}, - 'required': ['user', 'ssh-keys'], - 'type': 'object'}, - 'StringsResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'result': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'type': 'object'}, - 'StringsResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/StringsResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}}, - 'properties': {'AddKeys': {'description': 'AddKeys adds new authorised ssh ' - 'keys for the specified user.', - 'properties': {'Params': {'$ref': '#/definitions/ModifyUserSSHKeys'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'DeleteKeys': {'description': 'DeleteKeys deletes the ' - 'authorised ssh keys for the ' - 'specified user.', - 'properties': {'Params': {'$ref': '#/definitions/ModifyUserSSHKeys'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'ImportKeys': {'description': 'ImportKeys imports new ' - 'authorised ssh keys from the ' - 'specified key ids for the ' - 'specified user.', - 'properties': {'Params': {'$ref': '#/definitions/ModifyUserSSHKeys'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'ListKeys': {'description': 'ListKeys returns the authorised ' - 'ssh keys for the specified users.', - 'properties': {'Params': {'$ref': '#/definitions/ListSSHKeys'}, - 'Result': {'$ref': '#/definitions/StringsResults'}}, - 'type': 'object'}}, - 'type': 'object'} - - - @ReturnMapping(ErrorResults) - async def AddKeys(self, ssh_keys=None, user=None): - ''' - AddKeys adds new authorised ssh keys for the specified user. - - ssh_keys : typing.Sequence[str] - user : str - Returns -> ErrorResults - ''' - if ssh_keys is not None and not isinstance(ssh_keys, (bytes, str, list)): - raise Exception("Expected ssh_keys to be a Sequence, received: {}".format(type(ssh_keys))) - - if user is not None and not isinstance(user, (bytes, str)): - raise Exception("Expected user to be a str, received: {}".format(type(user))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='KeyManager', - request='AddKeys', - version=1, - params=_params) - _params['ssh-keys'] = ssh_keys - _params['user'] = user - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def DeleteKeys(self, ssh_keys=None, user=None): - ''' - DeleteKeys deletes the authorised ssh keys for the specified user. - - ssh_keys : typing.Sequence[str] - user : str - Returns -> ErrorResults - ''' - if ssh_keys is not None and not isinstance(ssh_keys, (bytes, str, list)): - raise Exception("Expected ssh_keys to be a Sequence, received: {}".format(type(ssh_keys))) - - if user is not None and not isinstance(user, (bytes, str)): - raise Exception("Expected user to be a str, received: {}".format(type(user))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='KeyManager', - request='DeleteKeys', - version=1, - params=_params) - _params['ssh-keys'] = ssh_keys - _params['user'] = user - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def ImportKeys(self, ssh_keys=None, user=None): - ''' - ImportKeys imports new authorised ssh keys from the specified key ids for the specified user. - - ssh_keys : typing.Sequence[str] - user : str - Returns -> ErrorResults - ''' - if ssh_keys is not None and not isinstance(ssh_keys, (bytes, str, list)): - raise Exception("Expected ssh_keys to be a Sequence, received: {}".format(type(ssh_keys))) - - if user is not None and not isinstance(user, (bytes, str)): - raise Exception("Expected user to be a str, received: {}".format(type(user))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='KeyManager', - request='ImportKeys', - version=1, - params=_params) - _params['ssh-keys'] = ssh_keys - _params['user'] = user - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringsResults) - async def ListKeys(self, entities=None, mode=None): - ''' - ListKeys returns the authorised ssh keys for the specified users. - - entities : Entities - mode : bool - Returns -> StringsResults - ''' - if entities is not None and not isinstance(entities, (dict, Entities)): - raise Exception("Expected entities to be a Entities, received: {}".format(type(entities))) - - if mode is not None and not isinstance(mode, bool): - raise Exception("Expected mode to be a bool, received: {}".format(type(mode))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='KeyManager', - request='ListKeys', - version=1, - params=_params) - _params['entities'] = entities - _params['mode'] = mode - reply = await self.rpc(msg) - return reply - - - -class KeyUpdaterFacade(Type): - name = 'KeyUpdater' - version = 1 - schema = {'definitions': {'Entities': {'additionalProperties': False, - 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'}, - 'type': 'array'}}, - 'required': ['entities'], - 'type': 'object'}, - 'Entity': {'additionalProperties': False, - 'properties': {'tag': {'type': 'string'}}, - 'required': ['tag'], - 'type': 'object'}, - 'Error': {'additionalProperties': False, - 'properties': {'code': {'type': 'string'}, - 'info': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'message': {'type': 'string'}}, - 'required': ['message', 'code'], - 'type': 'object'}, - 'NotifyWatchResult': {'additionalProperties': False, - 'properties': {'NotifyWatcherId': {'type': 'string'}, - 'error': {'$ref': '#/definitions/Error'}}, - 'required': ['NotifyWatcherId'], - 'type': 'object'}, - 'NotifyWatchResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'StringsResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'result': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'type': 'object'}, - 'StringsResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/StringsResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}}, - 'properties': {'AuthorisedKeys': {'description': 'AuthorisedKeys reports the ' - 'authorised ssh keys for the ' - 'specified machines.\n' - 'The current implementation ' - 'relies on global authorised ' - 'keys being stored in the ' - 'model config.\n' - 'This will change as new ' - 'user management and ' - 'authorisation functionality ' - 'is added.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/StringsResults'}}, - 'type': 'object'}, - 'WatchAuthorisedKeys': {'description': 'WatchAuthorisedKeys ' - 'starts a watcher to ' - 'track changes to the ' - 'authorised ssh keys\n' - 'for the specified ' - 'machines.\n' - 'The current ' - 'implementation relies ' - 'on global authorised ' - 'keys being stored in ' - 'the model config.\n' - 'This will change as ' - 'new user management ' - 'and authorisation ' - 'functionality is ' - 'added.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/NotifyWatchResults'}}, - 'type': 'object'}}, - 'type': 'object'} - - - @ReturnMapping(StringsResults) - async def AuthorisedKeys(self, entities=None): - ''' - AuthorisedKeys reports the authorised ssh keys for the specified machines. - The current implementation relies on global authorised keys being stored in the model config. - This will change as new user management and authorisation functionality is added. - - entities : typing.Sequence[~Entity] - Returns -> StringsResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # 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=None): - ''' - WatchAuthorisedKeys starts a watcher to track changes to the authorised ssh keys - for the specified machines. - The current implementation relies on global authorised keys being stored in the model config. - This will change as new user management and authorisation functionality is added. - - entities : typing.Sequence[~Entity] - Returns -> NotifyWatchResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # 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 LifeFlagFacade(Type): - name = 'LifeFlag' - version = 1 - schema = {'definitions': {'Entities': {'additionalProperties': False, - 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'}, - 'type': 'array'}}, - 'required': ['entities'], - 'type': 'object'}, - 'Entity': {'additionalProperties': False, - 'properties': {'tag': {'type': 'string'}}, - 'required': ['tag'], - 'type': 'object'}, - 'Error': {'additionalProperties': False, - 'properties': {'code': {'type': 'string'}, - 'info': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'message': {'type': 'string'}}, - 'required': ['message', 'code'], - 'type': 'object'}, - 'LifeResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'life': {'type': 'string'}}, - 'required': ['life'], - 'type': 'object'}, - 'LifeResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'NotifyWatchResult': {'additionalProperties': False, - 'properties': {'NotifyWatcherId': {'type': 'string'}, - 'error': {'$ref': '#/definitions/Error'}}, - 'required': ['NotifyWatcherId'], - 'type': 'object'}, - 'NotifyWatchResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}}, - 'properties': {'Life': {'description': 'Life returns the life status of every ' - 'supplied entity, where available.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/LifeResults'}}, - 'type': 'object'}, - 'Watch': {'description': 'Watch starts an NotifyWatcher for ' - 'each given entity.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/NotifyWatchResults'}}, - 'type': 'object'}}, - 'type': 'object'} - - - @ReturnMapping(LifeResults) - async def Life(self, entities=None): - ''' - Life returns the life status of every supplied entity, where available. - - entities : typing.Sequence[~Entity] - Returns -> LifeResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # 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=None): - ''' - Watch starts an NotifyWatcher for each given entity. - - entities : typing.Sequence[~Entity] - Returns -> NotifyWatchResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='LifeFlag', - request='Watch', - version=1, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - -class LogForwardingFacade(Type): - name = 'LogForwarding' - version = 1 - schema = {'definitions': {'Error': {'additionalProperties': False, - 'properties': {'code': {'type': 'string'}, - 'info': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'message': {'type': 'string'}}, - 'required': ['message', 'code'], - 'type': 'object'}, - 'ErrorResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}}, - 'type': 'object'}, - 'ErrorResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'LogForwardingGetLastSentParams': {'additionalProperties': False, - 'properties': {'ids': {'items': {'$ref': '#/definitions/LogForwardingID'}, - 'type': 'array'}}, - 'required': ['ids'], - 'type': 'object'}, - 'LogForwardingGetLastSentResult': {'additionalProperties': False, - 'properties': {'err': {'$ref': '#/definitions/Error'}, - 'record-id': {'type': 'integer'}, - 'record-timestamp': {'type': 'integer'}}, - 'required': ['record-id', - 'record-timestamp', - 'err'], - 'type': 'object'}, - 'LogForwardingGetLastSentResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/LogForwardingGetLastSentResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'LogForwardingID': {'additionalProperties': False, - 'properties': {'model': {'type': 'string'}, - 'sink': {'type': 'string'}}, - 'required': ['model', 'sink'], - 'type': 'object'}, - 'LogForwardingSetLastSentParam': {'additionalProperties': False, - 'properties': {'LogForwardingID': {'$ref': '#/definitions/LogForwardingID'}, - 'model': {'type': 'string'}, - 'record-id': {'type': 'integer'}, - 'record-timestamp': {'type': 'integer'}, - 'sink': {'type': 'string'}}, - 'required': ['model', - 'sink', - 'LogForwardingID', - 'record-id', - 'record-timestamp'], - 'type': 'object'}, - 'LogForwardingSetLastSentParams': {'additionalProperties': False, - 'properties': {'params': {'items': {'$ref': '#/definitions/LogForwardingSetLastSentParam'}, - 'type': 'array'}}, - 'required': ['params'], - 'type': 'object'}}, - 'properties': {'GetLastSent': {'description': 'GetLastSent is a bulk call ' - 'that gets the log forwarding ' - '"last sent"\n' - 'record ID for each requested ' - 'target.', - 'properties': {'Params': {'$ref': '#/definitions/LogForwardingGetLastSentParams'}, - 'Result': {'$ref': '#/definitions/LogForwardingGetLastSentResults'}}, - 'type': 'object'}, - 'SetLastSent': {'description': 'SetLastSent is a bulk call ' - 'that sets the log forwarding ' - '"last sent"\n' - 'record ID for each requested ' - 'target.', - 'properties': {'Params': {'$ref': '#/definitions/LogForwardingSetLastSentParams'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}}, - 'type': 'object'} - - - @ReturnMapping(LogForwardingGetLastSentResults) - async def GetLastSent(self, ids=None): - ''' - GetLastSent is a bulk call that gets the log forwarding "last sent" - record ID for each requested target. - - ids : typing.Sequence[~LogForwardingID] - Returns -> LogForwardingGetLastSentResults - ''' - if ids is not None and not isinstance(ids, (bytes, str, list)): - raise Exception("Expected ids to be a Sequence, received: {}".format(type(ids))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='LogForwarding', - request='GetLastSent', - version=1, - params=_params) - _params['ids'] = ids - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def SetLastSent(self, params=None): - ''' - SetLastSent is a bulk call that sets the log forwarding "last sent" - record ID for each requested target. - - params : typing.Sequence[~LogForwardingSetLastSentParam] - Returns -> ErrorResults - ''' - if params is not None and not isinstance(params, (bytes, str, list)): - raise Exception("Expected params to be a Sequence, received: {}".format(type(params))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='LogForwarding', - request='SetLastSent', - version=1, - params=_params) - _params['params'] = params - reply = await self.rpc(msg) - return reply - - - -class LoggerFacade(Type): - name = 'Logger' - version = 1 - schema = {'definitions': {'Entities': {'additionalProperties': False, - 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'}, - 'type': 'array'}}, - 'required': ['entities'], - 'type': 'object'}, - 'Entity': {'additionalProperties': False, - 'properties': {'tag': {'type': 'string'}}, - 'required': ['tag'], - 'type': 'object'}, - 'Error': {'additionalProperties': False, - 'properties': {'code': {'type': 'string'}, - 'info': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'message': {'type': 'string'}}, - 'required': ['message', 'code'], - 'type': 'object'}, - 'NotifyWatchResult': {'additionalProperties': False, - 'properties': {'NotifyWatcherId': {'type': 'string'}, - 'error': {'$ref': '#/definitions/Error'}}, - 'required': ['NotifyWatcherId'], - 'type': 'object'}, - 'NotifyWatchResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'StringResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'result': {'type': 'string'}}, - 'required': ['result'], - 'type': 'object'}, - 'StringResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}}, - 'properties': {'LoggingConfig': {'description': 'LoggingConfig reports the ' - 'logging configuration for ' - 'the agents specified.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/StringResults'}}, - 'type': 'object'}, - 'WatchLoggingConfig': {'description': 'WatchLoggingConfig ' - 'starts a watcher to ' - 'track changes to the ' - 'logging config\n' - 'for the agents ' - 'specified.. ' - 'Unfortunately the ' - 'current infrastructure ' - 'makes\n' - 'watching parts of the ' - 'config non-trivial, so ' - 'currently any change to ' - 'the\n' - 'config will cause the ' - 'watcher to notify the ' - 'client.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/NotifyWatchResults'}}, - 'type': 'object'}}, - 'type': 'object'} - - - @ReturnMapping(StringResults) - async def LoggingConfig(self, entities=None): - ''' - LoggingConfig reports the logging configuration for the agents specified. - - entities : typing.Sequence[~Entity] - Returns -> StringResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # 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=None): - ''' - WatchLoggingConfig starts a watcher to track changes to the logging config - for the agents specified.. Unfortunately the current infrastructure makes - watching parts of the config non-trivial, so currently any change to the - config will cause the watcher to notify the client. - - entities : typing.Sequence[~Entity] - Returns -> NotifyWatchResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Logger', - request='WatchLoggingConfig', - version=1, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - -class MachineActionsFacade(Type): - name = 'MachineActions' - version = 1 - schema = {'definitions': {'Action': {'additionalProperties': False, - 'properties': {'execution-group': {'type': 'string'}, - 'name': {'type': 'string'}, - 'parallel': {'type': 'boolean'}, - 'parameters': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'receiver': {'type': 'string'}, - 'tag': {'type': 'string'}}, - 'required': ['tag', 'receiver', 'name'], - 'type': 'object'}, - 'ActionExecutionResult': {'additionalProperties': False, - 'properties': {'action-tag': {'type': 'string'}, - 'message': {'type': 'string'}, - 'results': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'status': {'type': 'string'}}, - 'required': ['action-tag', 'status'], - 'type': 'object'}, - 'ActionExecutionResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/ActionExecutionResult'}, - 'type': 'array'}}, - 'type': 'object'}, - 'ActionMessage': {'additionalProperties': False, - 'properties': {'message': {'type': 'string'}, - 'timestamp': {'format': 'date-time', - 'type': 'string'}}, - 'required': ['timestamp', 'message'], - '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'}, - 'log': {'items': {'$ref': '#/definitions/ActionMessage'}, - 'type': 'array'}, - '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': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'message': {'type': 'string'}}, - 'required': ['message', 'code'], - 'type': 'object'}, - 'ErrorResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}}, - 'type': 'object'}, - 'ErrorResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'StringsWatchResult': {'additionalProperties': False, - 'properties': {'changes': {'items': {'type': 'string'}, - 'type': 'array'}, - 'error': {'$ref': '#/definitions/Error'}, - 'watcher-id': {'type': 'string'}}, - 'required': ['watcher-id'], - 'type': 'object'}, - 'StringsWatchResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}}, - 'properties': {'Actions': {'description': 'Actions returns the Actions by ' - 'Tags passed and ensures that the ' - 'machine asking\n' - 'for them is the machine that has ' - 'the actions', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ActionResults'}}, - 'type': 'object'}, - 'BeginActions': {'description': 'BeginActions marks the ' - 'actions represented by the ' - 'passed in Tags as running.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'FinishActions': {'description': 'FinishActions saves the ' - 'result of a completed Action', - 'properties': {'Params': {'$ref': '#/definitions/ActionExecutionResults'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'RunningActions': {'description': 'RunningActions lists the ' - 'actions running for the ' - 'entities passed in.\n' - 'If we end up needing more ' - 'than ListRunning at some ' - 'point we could ' - 'follow/abstract\n' - "what's done in the client " - 'actions package.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ActionsByReceivers'}}, - 'type': 'object'}, - 'WatchActionNotifications': {'description': 'WatchActionNotifications ' - 'returns a ' - 'StringsWatcher ' - 'for observing\n' - 'incoming action ' - 'calls to a ' - 'machine.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/StringsWatchResults'}}, - 'type': 'object'}}, - 'type': 'object'} - - - @ReturnMapping(ActionResults) - async def Actions(self, entities=None): - ''' - Actions returns the Actions by Tags passed and ensures that the machine asking - for them is the machine that has the actions - - entities : typing.Sequence[~Entity] - Returns -> ActionResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # 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=None): - ''' - BeginActions marks the actions represented by the passed in Tags as running. - - entities : typing.Sequence[~Entity] - Returns -> ErrorResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # 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=None): - ''' - FinishActions saves the result of a completed Action - - results : typing.Sequence[~ActionExecutionResult] - Returns -> ErrorResults - ''' - if results is not None and not isinstance(results, (bytes, str, list)): - raise Exception("Expected results to be a Sequence, received: {}".format(type(results))) - - # 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=None): - ''' - RunningActions lists the actions running for the entities passed in. - If we end up needing more than ListRunning at some point we could follow/abstract - what's done in the client actions package. - - entities : typing.Sequence[~Entity] - Returns -> ActionsByReceivers - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # 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=None): - ''' - WatchActionNotifications returns a StringsWatcher for observing - incoming action calls to a machine. - - entities : typing.Sequence[~Entity] - Returns -> StringsWatchResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # 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 MachineUndertakerFacade(Type): - name = 'MachineUndertaker' - version = 1 - schema = {'definitions': {'Entities': {'additionalProperties': False, - 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'}, - 'type': 'array'}}, - 'required': ['entities'], - 'type': 'object'}, - 'EntitiesResult': {'additionalProperties': False, - 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'}, - 'type': 'array'}, - 'error': {'$ref': '#/definitions/Error'}}, - 'required': ['entities'], - 'type': 'object'}, - 'EntitiesResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/EntitiesResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'Entity': {'additionalProperties': False, - 'properties': {'tag': {'type': 'string'}}, - 'required': ['tag'], - 'type': 'object'}, - 'Error': {'additionalProperties': False, - 'properties': {'code': {'type': 'string'}, - 'info': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'message': {'type': 'string'}}, - 'required': ['message', 'code'], - 'type': 'object'}, - 'NotifyWatchResult': {'additionalProperties': False, - 'properties': {'NotifyWatcherId': {'type': 'string'}, - 'error': {'$ref': '#/definitions/Error'}}, - 'required': ['NotifyWatcherId'], - 'type': 'object'}, - 'NotifyWatchResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'ProviderInterfaceInfo': {'additionalProperties': False, - 'properties': {'interface-name': {'type': 'string'}, - 'mac-address': {'type': 'string'}, - 'provider-id': {'type': 'string'}}, - 'required': ['interface-name', - 'mac-address', - 'provider-id'], - 'type': 'object'}, - 'ProviderInterfaceInfoResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'interfaces': {'items': {'$ref': '#/definitions/ProviderInterfaceInfo'}, - 'type': 'array'}, - 'machine-tag': {'type': 'string'}}, - 'required': ['machine-tag', - 'interfaces'], - 'type': 'object'}, - 'ProviderInterfaceInfoResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/ProviderInterfaceInfoResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}}, - 'properties': {'AllMachineRemovals': {'description': 'AllMachineRemovals ' - 'returns tags for all of ' - 'the machines that have\n' - 'been marked for removal ' - 'in the requested model.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/EntitiesResults'}}, - 'type': 'object'}, - 'CompleteMachineRemovals': {'description': 'CompleteMachineRemovals ' - 'removes the ' - 'specified machines ' - 'from the\n' - 'model database. It ' - 'should only be ' - 'called once any ' - 'provider-level\n' - 'cleanup has been ' - 'done for those ' - 'machines.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}}, - 'type': 'object'}, - 'GetMachineProviderInterfaceInfo': {'description': 'GetMachineProviderInterfaceInfo ' - 'returns ' - 'the ' - 'provider ' - 'details ' - 'for\n' - 'all ' - 'network ' - 'interfaces ' - 'attached ' - 'to the ' - 'machines ' - 'requested.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ProviderInterfaceInfoResults'}}, - 'type': 'object'}, - 'WatchMachineRemovals': {'description': 'WatchMachineRemovals ' - 'returns a watcher ' - 'that will signal each ' - 'time a\n' - 'machine is marked for ' - 'removal.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/NotifyWatchResults'}}, - 'type': 'object'}}, - 'type': 'object'} - - - @ReturnMapping(EntitiesResults) - async def AllMachineRemovals(self, entities=None): - ''' - AllMachineRemovals returns tags for all of the machines that have - been marked for removal in the requested model. - - entities : typing.Sequence[~Entity] - Returns -> EntitiesResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='MachineUndertaker', - request='AllMachineRemovals', - version=1, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(None) - async def CompleteMachineRemovals(self, entities=None): - ''' - CompleteMachineRemovals removes the specified machines from the - model database. It should only be called once any provider-level - cleanup has been done for those machines. - - entities : typing.Sequence[~Entity] - Returns -> None - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='MachineUndertaker', - request='CompleteMachineRemovals', - version=1, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ProviderInterfaceInfoResults) - async def GetMachineProviderInterfaceInfo(self, entities=None): - ''' - GetMachineProviderInterfaceInfo returns the provider details for - all network interfaces attached to the machines requested. - - entities : typing.Sequence[~Entity] - Returns -> ProviderInterfaceInfoResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='MachineUndertaker', - request='GetMachineProviderInterfaceInfo', - version=1, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(NotifyWatchResults) - async def WatchMachineRemovals(self, entities=None): - ''' - WatchMachineRemovals returns a watcher that will signal each time a - machine is marked for removal. - - entities : typing.Sequence[~Entity] - Returns -> NotifyWatchResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='MachineUndertaker', - request='WatchMachineRemovals', - version=1, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - -class MetricsManagerFacade(Type): - name = 'MetricsManager' - version = 1 - schema = {'definitions': {'Entities': {'additionalProperties': False, - 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'}, - 'type': 'array'}}, - 'required': ['entities'], - 'type': 'object'}, - 'Entity': {'additionalProperties': False, - 'properties': {'tag': {'type': 'string'}}, - 'required': ['tag'], - 'type': 'object'}, - 'Error': {'additionalProperties': False, - 'properties': {'code': {'type': 'string'}, - 'info': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'message': {'type': 'string'}}, - 'required': ['message', 'code'], - 'type': 'object'}, - 'ErrorResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}}, - 'type': 'object'}, - 'ErrorResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}}, - 'properties': {'AddJujuMachineMetrics': {'description': 'AddJujuMachineMetrics ' - 'adds a metric that ' - 'counts the number ' - 'of\n' - 'non-container ' - 'machines in the ' - 'current model.', - 'type': 'object'}, - 'CleanupOldMetrics': {'description': 'CleanupOldMetrics ' - 'removes old metrics from ' - 'the collection.\n' - 'The single arg params is ' - 'expected to contain and ' - 'model uuid.\n' - 'Even though the call ' - 'will delete all metrics ' - 'across models\n' - 'it serves to validate ' - 'that the connection has ' - 'access to at least one ' - 'model.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'SendMetrics': {'description': 'SendMetrics will send any ' - 'unsent metrics onto the metric ' - 'collection service.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}}, - 'type': 'object'} - - - @ReturnMapping(None) - async def AddJujuMachineMetrics(self): - ''' - AddJujuMachineMetrics adds a metric that counts the number of - non-container machines in the current model. - - - Returns -> None - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='MetricsManager', - request='AddJujuMachineMetrics', - version=1, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def CleanupOldMetrics(self, entities=None): - ''' - CleanupOldMetrics removes old metrics from the collection. - The single arg params is expected to contain and model uuid. - Even though the call will delete all metrics across models - it serves to validate that the connection has access to at least one model. - - entities : typing.Sequence[~Entity] - Returns -> ErrorResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # 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=None): - ''' - SendMetrics will send any unsent metrics onto the metric collection service. - - entities : typing.Sequence[~Entity] - Returns -> ErrorResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='MetricsManager', - request='SendMetrics', - version=1, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - -class MigrationFlagFacade(Type): - name = 'MigrationFlag' - version = 1 - schema = {'definitions': {'Entities': {'additionalProperties': False, - 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'}, - 'type': 'array'}}, - 'required': ['entities'], - 'type': 'object'}, - 'Entity': {'additionalProperties': False, - 'properties': {'tag': {'type': 'string'}}, - 'required': ['tag'], - 'type': 'object'}, - 'Error': {'additionalProperties': False, - 'properties': {'code': {'type': 'string'}, - 'info': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'message': {'type': 'string'}}, - 'required': ['message', 'code'], - 'type': 'object'}, - 'NotifyWatchResult': {'additionalProperties': False, - 'properties': {'NotifyWatcherId': {'type': 'string'}, - 'error': {'$ref': '#/definitions/Error'}}, - 'required': ['NotifyWatcherId'], - 'type': 'object'}, - 'NotifyWatchResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'PhaseResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'phase': {'type': 'string'}}, - 'type': 'object'}, - 'PhaseResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/PhaseResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}}, - 'properties': {'Phase': {'description': 'Phase returns the current migration ' - 'phase or an error for every\n' - 'supplied entity.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/PhaseResults'}}, - 'type': 'object'}, - 'Watch': {'description': 'Watch returns an id for use with the ' - 'NotifyWatcher facade, or an\n' - 'error, for every supplied entity.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/NotifyWatchResults'}}, - 'type': 'object'}}, - 'type': 'object'} - - - @ReturnMapping(PhaseResults) - async def Phase(self, entities=None): - ''' - Phase returns the current migration phase or an error for every - supplied entity. - - entities : typing.Sequence[~Entity] - Returns -> PhaseResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # 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=None): - ''' - Watch returns an id for use with the NotifyWatcher facade, or an - error, for every supplied entity. - - entities : typing.Sequence[~Entity] - Returns -> NotifyWatchResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # 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 MigrationMinionFacade(Type): - name = 'MigrationMinion' - version = 1 - schema = {'definitions': {'Error': {'additionalProperties': False, - 'properties': {'code': {'type': 'string'}, - 'info': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'message': {'type': 'string'}}, - 'required': ['message', 'code'], - 'type': 'object'}, - 'MinionReport': {'additionalProperties': False, - 'properties': {'migration-id': {'type': 'string'}, - 'phase': {'type': 'string'}, - 'success': {'type': 'boolean'}}, - 'required': ['migration-id', - 'phase', - 'success'], - 'type': 'object'}, - 'NotifyWatchResult': {'additionalProperties': False, - 'properties': {'NotifyWatcherId': {'type': 'string'}, - 'error': {'$ref': '#/definitions/Error'}}, - 'required': ['NotifyWatcherId'], - 'type': 'object'}}, - 'properties': {'Report': {'description': 'Report allows a migration minion to ' - 'submit whether it succeeded or\n' - 'failed for a specific migration ' - 'phase.', - 'properties': {'Params': {'$ref': '#/definitions/MinionReport'}}, - 'type': 'object'}, - 'Watch': {'description': 'Watch starts watching for status ' - 'updates for a migration attempt\n' - 'for the model. It will report when a ' - 'migration starts and when its\n' - 'status changes (including when it ' - 'finishes). An initial event will\n' - 'be fired if there has ever been a ' - 'migration attempt for the model.\n' - '\n' - 'The MigrationStatusWatcher facade ' - 'must be used to receive events\n' - 'from the watcher.', - 'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}}, - 'type': 'object'}}, - 'type': 'object'} - - - @ReturnMapping(None) - async def Report(self, migration_id=None, phase=None, success=None): - ''' - Report allows a migration minion to submit whether it succeeded or - failed for a specific migration phase. - - migration_id : str - phase : str - success : bool - Returns -> None - ''' - if migration_id is not None and not isinstance(migration_id, (bytes, str)): - raise Exception("Expected migration_id to be a str, received: {}".format(type(migration_id))) - - if phase is not None and not isinstance(phase, (bytes, str)): - raise Exception("Expected phase to be a str, received: {}".format(type(phase))) - - if success is not None and not isinstance(success, bool): - raise Exception("Expected success to be a bool, received: {}".format(type(success))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='MigrationMinion', - request='Report', - version=1, - params=_params) - _params['migration-id'] = migration_id - _params['phase'] = phase - _params['success'] = success - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(NotifyWatchResult) - async def Watch(self): - ''' - Watch starts watching for status updates for a migration attempt - for the model. It will report when a migration starts and when its - status changes (including when it finishes). An initial event will - be fired if there has ever been a migration attempt for the model. - - The MigrationStatusWatcher facade must be used to receive events - from the watcher. - - - Returns -> NotifyWatchResult - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='MigrationMinion', - request='Watch', - version=1, - params=_params) - - reply = await self.rpc(msg) - return reply - - - -class MigrationStatusWatcherFacade(Type): - name = 'MigrationStatusWatcher' - version = 1 - schema = {'definitions': {'MigrationStatus': {'additionalProperties': False, - 'properties': {'attempt': {'type': 'integer'}, - 'migration-id': {'type': 'string'}, - 'phase': {'type': 'string'}, - 'source-api-addrs': {'items': {'type': 'string'}, - 'type': 'array'}, - 'source-ca-cert': {'type': 'string'}, - 'target-api-addrs': {'items': {'type': 'string'}, - 'type': 'array'}, - 'target-ca-cert': {'type': 'string'}}, - 'required': ['migration-id', - 'attempt', - 'phase', - 'source-api-addrs', - 'source-ca-cert', - 'target-api-addrs', - 'target-ca-cert'], - 'type': 'object'}}, - 'properties': {'Next': {'description': 'Next returns when the status for a ' - 'model migration for the\n' - 'associated model changes. The current ' - 'details for the active\n' - 'migration are returned.', - 'properties': {'Result': {'$ref': '#/definitions/MigrationStatus'}}, - 'type': 'object'}, - 'Stop': {'description': 'Stop stops the watcher.', - 'type': 'object'}}, - 'type': 'object'} - - - @ReturnMapping(MigrationStatus) - async def Next(self): - ''' - Next returns when the status for a model migration for the - associated model changes. The current details for the active - migration are returned. - - - Returns -> MigrationStatus - ''' - - # 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): - ''' - Stop stops the watcher. - - - 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 - - - - async def rpc(self, msg): - ''' - Patch rpc method to add Id. - ''' - if not hasattr(self, 'Id'): - raise RuntimeError('Missing "Id" field') - msg['Id'] = id - - from .facade import TypeEncoder - reply = await self.connection.rpc(msg, encoder=TypeEncoder) - return reply - - - -class MigrationTargetFacade(Type): - name = 'MigrationTarget' - version = 1 - schema = {'definitions': {'AdoptResourcesArgs': {'additionalProperties': False, - 'properties': {'model-tag': {'type': 'string'}, - 'source-controller-version': {'$ref': '#/definitions/Number'}}, - 'required': ['model-tag', - 'source-controller-version'], - 'type': 'object'}, - 'BytesResult': {'additionalProperties': False, - 'properties': {'result': {'items': {'type': 'integer'}, - 'type': 'array'}}, - 'required': ['result'], - 'type': 'object'}, - 'Error': {'additionalProperties': False, - 'properties': {'code': {'type': 'string'}, - 'info': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'message': {'type': 'string'}}, - 'required': ['message', 'code'], - 'type': 'object'}, - 'ErrorResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}}, - 'type': 'object'}, - 'ErrorResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'MigrationModelInfo': {'additionalProperties': False, - 'properties': {'agent-version': {'$ref': '#/definitions/Number'}, - 'controller-agent-version': {'$ref': '#/definitions/Number'}, - 'name': {'type': 'string'}, - 'owner-tag': {'type': 'string'}, - 'uuid': {'type': 'string'}}, - 'required': ['uuid', - 'name', - 'owner-tag', - 'agent-version', - 'controller-agent-version'], - 'type': 'object'}, - 'ModelArgs': {'additionalProperties': False, - 'properties': {'model-tag': {'type': 'string'}}, - 'required': ['model-tag'], - 'type': 'object'}, - 'Number': {'additionalProperties': False, - 'properties': {'Build': {'type': 'integer'}, - 'Major': {'type': 'integer'}, - 'Minor': {'type': 'integer'}, - 'Patch': {'type': 'integer'}, - 'Tag': {'type': 'string'}}, - 'required': ['Major', - 'Minor', - 'Tag', - 'Patch', - 'Build'], - 'type': 'object'}, - 'SerializedModel': {'additionalProperties': False, - 'properties': {'bytes': {'items': {'type': 'integer'}, - 'type': 'array'}, - 'charms': {'items': {'type': 'string'}, - 'type': 'array'}, - 'resources': {'items': {'$ref': '#/definitions/SerializedModelResource'}, - 'type': 'array'}, - 'tools': {'items': {'$ref': '#/definitions/SerializedModelTools'}, - 'type': 'array'}}, - 'required': ['bytes', - 'charms', - 'tools', - 'resources'], - 'type': 'object'}, - 'SerializedModelResource': {'additionalProperties': False, - 'properties': {'application': {'type': 'string'}, - 'application-revision': {'$ref': '#/definitions/SerializedModelResourceRevision'}, - 'charmstore-revision': {'$ref': '#/definitions/SerializedModelResourceRevision'}, - 'name': {'type': 'string'}, - 'unit-revisions': {'patternProperties': {'.*': {'$ref': '#/definitions/SerializedModelResourceRevision'}}, - 'type': 'object'}}, - 'required': ['application', - 'name', - 'application-revision', - 'charmstore-revision', - 'unit-revisions'], - 'type': 'object'}, - 'SerializedModelResourceRevision': {'additionalProperties': False, - 'properties': {'description': {'type': 'string'}, - 'fingerprint': {'type': 'string'}, - 'origin': {'type': 'string'}, - 'path': {'type': 'string'}, - 'revision': {'type': 'integer'}, - 'size': {'type': 'integer'}, - 'timestamp': {'format': 'date-time', - 'type': 'string'}, - 'type': {'type': 'string'}, - 'username': {'type': 'string'}}, - 'required': ['revision', - 'type', - 'path', - 'description', - 'origin', - 'fingerprint', - 'size', - 'timestamp'], - 'type': 'object'}, - 'SerializedModelTools': {'additionalProperties': False, - 'properties': {'uri': {'type': 'string'}, - 'version': {'type': 'string'}}, - 'required': ['version', 'uri'], - 'type': 'object'}}, - 'properties': {'Abort': {'description': 'Abort removes the specified model ' - 'from the database. It is an error ' - 'to\n' - 'attempt to Abort a model that has a ' - 'migration mode other than importing.', - 'properties': {'Params': {'$ref': '#/definitions/ModelArgs'}}, - 'type': 'object'}, - 'Activate': {'description': 'Activate sets the migration mode ' - 'of the model to "none", meaning ' - 'it\n' - 'is ready for use. It is an error ' - 'to attempt to Abort a model that\n' - 'has a migration mode other than ' - 'importing.', - 'properties': {'Params': {'$ref': '#/definitions/ModelArgs'}}, - 'type': 'object'}, - 'AdoptResources': {'description': 'AdoptResources asks the ' - 'cloud provider to update ' - 'the controller\n' - "tags for a model's " - 'resources. This prevents ' - 'the resources from\n' - 'being destroyed if the ' - 'source controller is ' - 'destroyed after the\n' - 'model is migrated away.', - 'properties': {'Params': {'$ref': '#/definitions/AdoptResourcesArgs'}}, - 'type': 'object'}, - 'CACert': {'description': 'CACert returns the certificate used ' - 'to validate the state connection.', - 'properties': {'Result': {'$ref': '#/definitions/BytesResult'}}, - 'type': 'object'}, - 'CheckMachines': {'description': 'CheckMachines compares the ' - 'machines in state with the ' - 'ones reported\n' - 'by the provider and reports ' - 'any discrepancies.', - 'properties': {'Params': {'$ref': '#/definitions/ModelArgs'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'Import': {'description': 'Import takes a serialized Juju ' - 'model, deserializes it, and\n' - 'recreates it in the receiving ' - 'controller.', - 'properties': {'Params': {'$ref': '#/definitions/SerializedModel'}}, - 'type': 'object'}, - 'LatestLogTime': {'description': 'LatestLogTime returns the ' - 'time of the most recent log ' - 'record\n' - 'received by the logtransfer ' - 'endpoint. This can be used ' - 'as the start\n' - 'point for streaming logs ' - 'from the source if the ' - 'transfer was\n' - 'interrupted.\n' - '\n' - 'For performance reasons, not ' - 'every time is tracked, so if ' - 'the\n' - 'target controller died ' - 'during the transfer the ' - 'latest log time\n' - 'might be up to 2 minutes ' - 'earlier. If the transfer was ' - 'interrupted\n' - 'in some other way (like the ' - 'source controller going away ' - 'or a\n' - 'network partition) the time ' - 'will be up-to-date.\n' - '\n' - 'Log messages are assumed to ' - 'be sent in time order (which ' - 'is how\n' - 'debug-log emits them). If ' - "that isn't the case then " - 'this mechanism\n' - "can't be used to avoid " - 'duplicates when logtransfer ' - 'is restarted.\n' - '\n' - 'Returns the zero time if no ' - 'logs have been transferred.', - 'properties': {'Params': {'$ref': '#/definitions/ModelArgs'}, - 'Result': {'format': 'date-time', - 'type': 'string'}}, - 'type': 'object'}, - 'Prechecks': {'description': 'Prechecks ensure that the target ' - 'controller is ready to accept a\n' - 'model migration.', - 'properties': {'Params': {'$ref': '#/definitions/MigrationModelInfo'}}, - 'type': 'object'}}, - 'type': 'object'} - - - @ReturnMapping(None) - async def Abort(self, model_tag=None): - ''' - Abort removes the specified model from the database. It is an error to - attempt to Abort a model that has a migration mode other than importing. - - model_tag : str - Returns -> None - ''' - if model_tag is not None and not isinstance(model_tag, (bytes, str)): - raise Exception("Expected model_tag to be a str, received: {}".format(type(model_tag))) - - # 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=None): - ''' - Activate sets the migration mode of the model to "none", meaning it - is ready for use. It is an error to attempt to Abort a model that - has a migration mode other than importing. - - model_tag : str - Returns -> None - ''' - if model_tag is not None and not isinstance(model_tag, (bytes, str)): - raise Exception("Expected model_tag to be a str, received: {}".format(type(model_tag))) - - # 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 AdoptResources(self, model_tag=None, source_controller_version=None): - ''' - AdoptResources asks the cloud provider to update the controller - tags for a model's resources. This prevents the resources from - being destroyed if the source controller is destroyed after the - model is migrated away. - - model_tag : str - source_controller_version : Number - Returns -> None - ''' - if model_tag is not None and not isinstance(model_tag, (bytes, str)): - raise Exception("Expected model_tag to be a str, received: {}".format(type(model_tag))) - - if source_controller_version is not None and not isinstance(source_controller_version, (dict, Number)): - raise Exception("Expected source_controller_version to be a Number, received: {}".format(type(source_controller_version))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='MigrationTarget', - request='AdoptResources', - version=1, - params=_params) - _params['model-tag'] = model_tag - _params['source-controller-version'] = source_controller_version - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(BytesResult) - async def CACert(self): - ''' - CACert returns the certificate used to validate the state connection. - - - Returns -> BytesResult - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='MigrationTarget', - request='CACert', - version=1, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def CheckMachines(self, model_tag=None): - ''' - CheckMachines compares the machines in state with the ones reported - by the provider and reports any discrepancies. - - model_tag : str - Returns -> ErrorResults - ''' - if model_tag is not None and not isinstance(model_tag, (bytes, str)): - raise Exception("Expected model_tag to be a str, received: {}".format(type(model_tag))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='MigrationTarget', - request='CheckMachines', - version=1, - params=_params) - _params['model-tag'] = model_tag - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(None) - async def Import(self, bytes_=None, charms=None, resources=None, tools=None): - ''' - Import takes a serialized Juju model, deserializes it, and - recreates it in the receiving controller. - - bytes_ : typing.Sequence[int] - charms : typing.Sequence[str] - resources : typing.Sequence[~SerializedModelResource] - tools : typing.Sequence[~SerializedModelTools] - Returns -> None - ''' - if bytes_ is not None and not isinstance(bytes_, (bytes, str, list)): - raise Exception("Expected bytes_ to be a Sequence, received: {}".format(type(bytes_))) - - if charms is not None and not isinstance(charms, (bytes, str, list)): - raise Exception("Expected charms to be a Sequence, received: {}".format(type(charms))) - - if resources is not None and not isinstance(resources, (bytes, str, list)): - raise Exception("Expected resources to be a Sequence, received: {}".format(type(resources))) - - if tools is not None and not isinstance(tools, (bytes, str, list)): - raise Exception("Expected tools to be a Sequence, received: {}".format(type(tools))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='MigrationTarget', - request='Import', - version=1, - params=_params) - _params['bytes'] = bytes_ - _params['charms'] = charms - _params['resources'] = resources - _params['tools'] = tools - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(str) - async def LatestLogTime(self, model_tag=None): - ''' - LatestLogTime returns the time of the most recent log record - received by the logtransfer endpoint. This can be used as the start - point for streaming logs from the source if the transfer was - interrupted. - - For performance reasons, not every time is tracked, so if the - target controller died during the transfer the latest log time - might be up to 2 minutes earlier. If the transfer was interrupted - in some other way (like the source controller going away or a - network partition) the time will be up-to-date. - - Log messages are assumed to be sent in time order (which is how - debug-log emits them). If that isn't the case then this mechanism - can't be used to avoid duplicates when logtransfer is restarted. - - Returns the zero time if no logs have been transferred. - - model_tag : str - Returns -> str - ''' - if model_tag is not None and not isinstance(model_tag, (bytes, str)): - raise Exception("Expected model_tag to be a str, received: {}".format(type(model_tag))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='MigrationTarget', - request='LatestLogTime', - version=1, - params=_params) - _params['model-tag'] = model_tag - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(None) - async def Prechecks(self, agent_version=None, controller_agent_version=None, name=None, owner_tag=None, uuid=None): - ''' - Prechecks ensure that the target controller is ready to accept a - model migration. - - agent_version : Number - controller_agent_version : Number - name : str - owner_tag : str - uuid : str - Returns -> None - ''' - if agent_version is not None and not isinstance(agent_version, (dict, Number)): - raise Exception("Expected agent_version to be a Number, received: {}".format(type(agent_version))) - - if controller_agent_version is not None and not isinstance(controller_agent_version, (dict, Number)): - raise Exception("Expected controller_agent_version to be a Number, received: {}".format(type(controller_agent_version))) - - if name is not None and not isinstance(name, (bytes, str)): - raise Exception("Expected name to be a str, received: {}".format(type(name))) - - if owner_tag is not None and not isinstance(owner_tag, (bytes, str)): - raise Exception("Expected owner_tag to be a str, received: {}".format(type(owner_tag))) - - if uuid is not None and not isinstance(uuid, (bytes, str)): - raise Exception("Expected uuid to be a str, received: {}".format(type(uuid))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='MigrationTarget', - request='Prechecks', - version=1, - params=_params) - _params['agent-version'] = agent_version - _params['controller-agent-version'] = controller_agent_version - _params['name'] = name - _params['owner-tag'] = owner_tag - _params['uuid'] = uuid - reply = await self.rpc(msg) - return reply - - - -class ModelSummaryWatcherFacade(Type): - name = 'ModelSummaryWatcher' - version = 1 - schema = {'definitions': {'ModelAbstract': {'additionalProperties': False, - 'properties': {'admins': {'items': {'type': 'string'}, - 'type': 'array'}, - 'annotations': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}, - 'cloud': {'type': 'string'}, - 'controller': {'type': 'string'}, - 'credential': {'type': 'string'}, - 'messages': {'items': {'$ref': '#/definitions/ModelSummaryMessage'}, - 'type': 'array'}, - 'name': {'type': 'string'}, - 'region': {'type': 'string'}, - 'removed': {'type': 'boolean'}, - 'size': {'$ref': '#/definitions/ModelSummarySize'}, - 'status': {'type': 'string'}, - 'uuid': {'type': 'string'}}, - 'required': ['uuid'], - 'type': 'object'}, - 'ModelSummaryMessage': {'additionalProperties': False, - 'properties': {'agent': {'type': 'string'}, - 'message': {'type': 'string'}}, - 'required': ['agent', 'message'], - 'type': 'object'}, - 'ModelSummarySize': {'additionalProperties': False, - 'properties': {'applications': {'type': 'integer'}, - 'containers': {'type': 'integer'}, - 'machines': {'type': 'integer'}, - 'relations': {'type': 'integer'}, - 'units': {'type': 'integer'}}, - 'type': 'object'}, - 'SummaryWatcherNextResults': {'additionalProperties': False, - 'properties': {'models': {'items': {'$ref': '#/definitions/ModelAbstract'}, - 'type': 'array'}}, - 'required': ['models'], - 'type': 'object'}}, - 'properties': {'Next': {'description': 'Next will return the current state of ' - 'everything on the first call\n' - 'and subsequent calls will return just ' - 'those model summaries that have\n' - 'changed.', - 'properties': {'Result': {'$ref': '#/definitions/SummaryWatcherNextResults'}}, - 'type': 'object'}, - 'Stop': {'description': 'Stop stops the watcher.', - 'type': 'object'}}, - 'type': 'object'} - - - @ReturnMapping(SummaryWatcherNextResults) - async def Next(self): - ''' - Next will return the current state of everything on the first call - and subsequent calls will return just those model summaries that have - changed. - - - Returns -> SummaryWatcherNextResults - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='ModelSummaryWatcher', - request='Next', - version=1, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(None) - async def Stop(self): - ''' - Stop stops the watcher. - - - Returns -> None - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='ModelSummaryWatcher', - request='Stop', - version=1, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - async def rpc(self, msg): - ''' - Patch rpc method to add Id. - ''' - if not hasattr(self, 'Id'): - raise RuntimeError('Missing "Id" field') - msg['Id'] = id - - from .facade import TypeEncoder - reply = await self.connection.rpc(msg, encoder=TypeEncoder) - return reply - - - -class ModelUpgraderFacade(Type): - name = 'ModelUpgrader' - version = 1 - schema = {'definitions': {'Error': {'additionalProperties': False, - 'properties': {'code': {'type': 'string'}, - 'info': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'message': {'type': 'string'}}, - 'required': ['message', 'code'], - 'type': 'object'}, - 'ModelParam': {'additionalProperties': False, - 'properties': {'model-tag': {'type': 'string'}}, - 'required': ['model-tag'], - 'type': 'object'}, - 'Number': {'additionalProperties': False, - 'properties': {'Build': {'type': 'integer'}, - 'Major': {'type': 'integer'}, - 'Minor': {'type': 'integer'}, - 'Patch': {'type': 'integer'}, - 'Tag': {'type': 'string'}}, - 'required': ['Major', - 'Minor', - 'Tag', - 'Patch', - 'Build'], - 'type': 'object'}, - 'UpgradeModelParams': {'additionalProperties': False, - 'properties': {'agent-stream': {'type': 'string'}, - 'dry-run': {'type': 'boolean'}, - 'ignore-agent-versions': {'type': 'boolean'}, - 'model-tag': {'type': 'string'}, - 'target-version': {'$ref': '#/definitions/Number'}}, - 'required': ['model-tag', - 'target-version'], - 'type': 'object'}, - 'UpgradeModelResult': {'additionalProperties': False, - 'properties': {'chosen-version': {'$ref': '#/definitions/Number'}, - 'error': {'$ref': '#/definitions/Error'}}, - 'required': ['chosen-version'], - 'type': 'object'}}, - 'properties': {'AbortModelUpgrade': {'description': 'AbortModelUpgrade aborts ' - 'and archives the model ' - 'upgrade\n' - 'synchronisation record, ' - 'if any.', - 'properties': {'Params': {'$ref': '#/definitions/ModelParam'}}, - 'type': 'object'}, - 'UpgradeModel': {'description': 'UpgradeModel upgrades a ' - 'model.', - 'properties': {'Params': {'$ref': '#/definitions/UpgradeModelParams'}, - 'Result': {'$ref': '#/definitions/UpgradeModelResult'}}, - 'type': 'object'}}, - 'type': 'object'} - - - @ReturnMapping(None) - async def AbortModelUpgrade(self, model_tag=None): - ''' - AbortModelUpgrade aborts and archives the model upgrade - synchronisation record, if any. - - model_tag : str - Returns -> None - ''' - if model_tag is not None and not isinstance(model_tag, (bytes, str)): - raise Exception("Expected model_tag to be a str, received: {}".format(type(model_tag))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='ModelUpgrader', - request='AbortModelUpgrade', - version=1, - params=_params) - _params['model-tag'] = model_tag - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(UpgradeModelResult) - async def UpgradeModel(self, agent_stream=None, dry_run=None, ignore_agent_versions=None, model_tag=None, target_version=None): - ''' - UpgradeModel upgrades a model. - - agent_stream : str - dry_run : bool - ignore_agent_versions : bool - model_tag : str - target_version : Number - Returns -> UpgradeModelResult - ''' - if agent_stream is not None and not isinstance(agent_stream, (bytes, str)): - raise Exception("Expected agent_stream to be a str, received: {}".format(type(agent_stream))) - - if dry_run is not None and not isinstance(dry_run, bool): - raise Exception("Expected dry_run to be a bool, received: {}".format(type(dry_run))) - - if ignore_agent_versions is not None and not isinstance(ignore_agent_versions, bool): - raise Exception("Expected ignore_agent_versions to be a bool, received: {}".format(type(ignore_agent_versions))) - - if model_tag is not None and not isinstance(model_tag, (bytes, str)): - raise Exception("Expected model_tag to be a str, received: {}".format(type(model_tag))) - - if target_version is not None and not isinstance(target_version, (dict, Number)): - raise Exception("Expected target_version to be a Number, received: {}".format(type(target_version))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='ModelUpgrader', - request='UpgradeModel', - version=1, - params=_params) - _params['agent-stream'] = agent_stream - _params['dry-run'] = dry_run - _params['ignore-agent-versions'] = ignore_agent_versions - _params['model-tag'] = model_tag - _params['target-version'] = target_version - reply = await self.rpc(msg) - return reply - - - -class NotifyWatcherFacade(Type): - name = 'NotifyWatcher' - version = 1 - schema = {'properties': {'Next': {'description': 'Next returns when a change has ' - 'occurred to the\n' - 'entity being watched since the most ' - 'recent call to Next\n' - 'or the Watch call that created the ' - 'NotifyWatcher.', - 'type': 'object'}, - 'Stop': {'description': 'Stop stops the watcher.', - 'type': 'object'}}, - 'type': 'object'} - - - @ReturnMapping(None) - async def Next(self): - ''' - Next returns when a change has occurred to the - entity being watched since the most recent call to Next - or the Watch call that created the NotifyWatcher. - - - 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): - ''' - Stop stops the watcher. - - - 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 - - - - async def rpc(self, msg): - ''' - Patch rpc method to add Id. - ''' - if not hasattr(self, 'Id'): - raise RuntimeError('Missing "Id" field') - msg['Id'] = id - - from .facade import TypeEncoder - reply = await self.connection.rpc(msg, encoder=TypeEncoder) - return reply - - - -class OfferStatusWatcherFacade(Type): - name = 'OfferStatusWatcher' - version = 1 - schema = {'definitions': {'EntityStatus': {'additionalProperties': False, - 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'info': {'type': 'string'}, - 'since': {'format': 'date-time', - 'type': 'string'}, - 'status': {'type': 'string'}}, - 'required': ['status', 'info', 'since'], - 'type': 'object'}, - 'Error': {'additionalProperties': False, - 'properties': {'code': {'type': 'string'}, - 'info': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'message': {'type': 'string'}}, - 'required': ['message', 'code'], - 'type': 'object'}, - 'OfferStatusChange': {'additionalProperties': False, - 'properties': {'offer-name': {'type': 'string'}, - 'status': {'$ref': '#/definitions/EntityStatus'}}, - 'required': ['offer-name', 'status'], - 'type': 'object'}, - 'OfferStatusWatchResult': {'additionalProperties': False, - 'properties': {'changes': {'items': {'$ref': '#/definitions/OfferStatusChange'}, - 'type': 'array'}, - 'error': {'$ref': '#/definitions/Error'}, - 'watcher-id': {'type': 'string'}}, - 'required': ['watcher-id', - 'changes'], - 'type': 'object'}}, - 'properties': {'Next': {'description': 'Next returns when a change has ' - 'occurred to an entity of the\n' - 'collection being watched since the ' - 'most recent call to Next\n' - 'or the Watch call that created the ' - 'srvOfferStatusWatcher.', - 'properties': {'Result': {'$ref': '#/definitions/OfferStatusWatchResult'}}, - 'type': 'object'}, - 'Stop': {'description': 'Stop stops the watcher.', - 'type': 'object'}}, - 'type': 'object'} - - - @ReturnMapping(OfferStatusWatchResult) - async def Next(self): - ''' - Next returns when a change has occurred to an entity of the - collection being watched since the most recent call to Next - or the Watch call that created the srvOfferStatusWatcher. - - - Returns -> OfferStatusWatchResult - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='OfferStatusWatcher', - request='Next', - version=1, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(None) - async def Stop(self): - ''' - Stop stops the watcher. - - - Returns -> None - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='OfferStatusWatcher', - request='Stop', - version=1, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - async def rpc(self, msg): - ''' - Patch rpc method to add Id. - ''' - if not hasattr(self, 'Id'): - raise RuntimeError('Missing "Id" field') - msg['Id'] = id - - from .facade import TypeEncoder - reply = await self.connection.rpc(msg, encoder=TypeEncoder) - return reply - - - -class PayloadsFacade(Type): - name = 'Payloads' - version = 1 - schema = {'definitions': {'Payload': {'additionalProperties': False, - 'properties': {'class': {'type': 'string'}, - 'id': {'type': 'string'}, - 'labels': {'items': {'type': 'string'}, - 'type': 'array'}, - 'machine': {'type': 'string'}, - 'status': {'type': 'string'}, - 'type': {'type': 'string'}, - 'unit': {'type': 'string'}}, - 'required': ['class', - 'type', - 'id', - 'status', - 'labels', - 'unit', - 'machine'], - 'type': 'object'}, - 'PayloadListArgs': {'additionalProperties': False, - 'properties': {'patterns': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'required': ['patterns'], - 'type': 'object'}, - 'PayloadListResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/Payload'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}}, - 'properties': {'List': {'description': 'List builds the list of payloads ' - 'being tracked for\n' - 'the given unit and IDs. If no IDs are ' - 'provided then all tracked\n' - 'payloads for the unit are returned.', - 'properties': {'Params': {'$ref': '#/definitions/PayloadListArgs'}, - 'Result': {'$ref': '#/definitions/PayloadListResults'}}, - 'type': 'object'}}, - 'type': 'object'} - - - @ReturnMapping(PayloadListResults) - async def List(self, patterns=None): - ''' - List builds the list of payloads being tracked for - the given unit and IDs. If no IDs are provided then all tracked - payloads for the unit are returned. - - patterns : typing.Sequence[str] - Returns -> PayloadListResults - ''' - if patterns is not None and not isinstance(patterns, (bytes, str, list)): - raise Exception("Expected patterns to be a Sequence, received: {}".format(type(patterns))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Payloads', - request='List', - version=1, - params=_params) - _params['patterns'] = patterns - reply = await self.rpc(msg) - return reply - - - -class PayloadsHookContextFacade(Type): - name = 'PayloadsHookContext' - 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': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'message': {'type': 'string'}}, - 'required': ['message', 'code'], - 'type': 'object'}, - 'LookUpPayloadArg': {'additionalProperties': False, - 'properties': {'id': {'type': 'string'}, - 'name': {'type': 'string'}}, - 'required': ['name', 'id'], - 'type': 'object'}, - 'LookUpPayloadArgs': {'additionalProperties': False, - 'properties': {'args': {'items': {'$ref': '#/definitions/LookUpPayloadArg'}, - 'type': 'array'}}, - 'required': ['args'], - 'type': 'object'}, - 'Payload': {'additionalProperties': False, - 'properties': {'class': {'type': 'string'}, - 'id': {'type': 'string'}, - 'labels': {'items': {'type': 'string'}, - 'type': 'array'}, - 'machine': {'type': 'string'}, - 'status': {'type': 'string'}, - 'type': {'type': 'string'}, - 'unit': {'type': 'string'}}, - 'required': ['class', - 'type', - 'id', - 'status', - 'labels', - 'unit', - 'machine'], - 'type': 'object'}, - 'PayloadResult': {'additionalProperties': False, - 'properties': {'Entity': {'$ref': '#/definitions/Entity'}, - 'error': {'$ref': '#/definitions/Error'}, - 'not-found': {'type': 'boolean'}, - 'payload': {'$ref': '#/definitions/Payload'}, - 'tag': {'type': 'string'}}, - 'required': ['tag', - 'Entity', - 'payload', - 'not-found'], - 'type': 'object'}, - 'PayloadResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/PayloadResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'SetPayloadStatusArg': {'additionalProperties': False, - 'properties': {'Entity': {'$ref': '#/definitions/Entity'}, - 'status': {'type': 'string'}, - 'tag': {'type': 'string'}}, - 'required': ['tag', - 'Entity', - 'status'], - 'type': 'object'}, - 'SetPayloadStatusArgs': {'additionalProperties': False, - 'properties': {'args': {'items': {'$ref': '#/definitions/SetPayloadStatusArg'}, - 'type': 'array'}}, - 'required': ['args'], - 'type': 'object'}, - 'TrackPayloadArgs': {'additionalProperties': False, - 'properties': {'payloads': {'items': {'$ref': '#/definitions/Payload'}, - 'type': 'array'}}, - 'required': ['payloads'], - 'type': 'object'}}, - 'properties': {'List': {'description': 'List builds the list of payload being ' - 'tracked for\n' - 'the given unit and IDs. If no IDs are ' - 'provided then all tracked\n' - 'payloads for the unit are returned.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/PayloadResults'}}, - 'type': 'object'}, - 'LookUp': {'description': 'LookUp identifies the payload with ' - 'the provided name and raw ID.', - 'properties': {'Params': {'$ref': '#/definitions/LookUpPayloadArgs'}, - 'Result': {'$ref': '#/definitions/PayloadResults'}}, - 'type': 'object'}, - 'SetStatus': {'description': 'SetStatus sets the raw status of ' - 'a payload.', - 'properties': {'Params': {'$ref': '#/definitions/SetPayloadStatusArgs'}, - 'Result': {'$ref': '#/definitions/PayloadResults'}}, - 'type': 'object'}, - 'Track': {'description': 'Track stores a payload to be tracked ' - 'in state.', - 'properties': {'Params': {'$ref': '#/definitions/TrackPayloadArgs'}, - 'Result': {'$ref': '#/definitions/PayloadResults'}}, - 'type': 'object'}, - 'Untrack': {'description': 'Untrack marks the identified ' - 'payload as no longer being ' - 'tracked.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/PayloadResults'}}, - 'type': 'object'}}, - 'type': 'object'} - - - @ReturnMapping(PayloadResults) - async def List(self, entities=None): - ''' - List builds the list of payload being tracked for - the given unit and IDs. If no IDs are provided then all tracked - payloads for the unit are returned. - - entities : typing.Sequence[~Entity] - Returns -> PayloadResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='PayloadsHookContext', - request='List', - version=1, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(PayloadResults) - async def LookUp(self, args=None): - ''' - LookUp identifies the payload with the provided name and raw ID. - - args : typing.Sequence[~LookUpPayloadArg] - Returns -> PayloadResults - ''' - if args is not None and not isinstance(args, (bytes, str, list)): - raise Exception("Expected args to be a Sequence, received: {}".format(type(args))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='PayloadsHookContext', - request='LookUp', - version=1, - params=_params) - _params['args'] = args - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(PayloadResults) - async def SetStatus(self, args=None): - ''' - SetStatus sets the raw status of a payload. - - args : typing.Sequence[~SetPayloadStatusArg] - Returns -> PayloadResults - ''' - if args is not None and not isinstance(args, (bytes, str, list)): - raise Exception("Expected args to be a Sequence, received: {}".format(type(args))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='PayloadsHookContext', - request='SetStatus', - version=1, - params=_params) - _params['args'] = args - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(PayloadResults) - async def Track(self, payloads=None): - ''' - Track stores a payload to be tracked in state. - - payloads : typing.Sequence[~Payload] - Returns -> PayloadResults - ''' - if payloads is not None and not isinstance(payloads, (bytes, str, list)): - raise Exception("Expected payloads to be a Sequence, received: {}".format(type(payloads))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='PayloadsHookContext', - request='Track', - version=1, - params=_params) - _params['payloads'] = payloads - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(PayloadResults) - async def Untrack(self, entities=None): - ''' - Untrack marks the identified payload as no longer being tracked. - - entities : typing.Sequence[~Entity] - Returns -> PayloadResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='PayloadsHookContext', - request='Untrack', - version=1, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - -class PingerFacade(Type): - name = 'Pinger' - version = 1 - schema = {'properties': {'Ping': {'type': 'object'}, 'Stop': {'type': 'object'}}, - 'type': 'object'} - - - @ReturnMapping(None) - async def Ping(self): - ''' - - Returns -> None - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='Pinger', - request='Ping', - version=1, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(None) - async def Stop(self): - ''' - - Returns -> None - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='Pinger', - request='Stop', - version=1, - params=_params) - - reply = await self.rpc(msg) - return reply - - - -class RelationStatusWatcherFacade(Type): - name = 'RelationStatusWatcher' - version = 1 - schema = {'definitions': {'Error': {'additionalProperties': False, - 'properties': {'code': {'type': 'string'}, - 'info': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'message': {'type': 'string'}}, - 'required': ['message', 'code'], - 'type': 'object'}, - 'RelationLifeSuspendedStatusChange': {'additionalProperties': False, - 'properties': {'key': {'type': 'string'}, - 'life': {'type': 'string'}, - 'suspended': {'type': 'boolean'}, - 'suspended-reason': {'type': 'string'}}, - 'required': ['key', - 'life', - 'suspended', - 'suspended-reason'], - 'type': 'object'}, - 'RelationLifeSuspendedStatusWatchResult': {'additionalProperties': False, - 'properties': {'changes': {'items': {'$ref': '#/definitions/RelationLifeSuspendedStatusChange'}, - 'type': 'array'}, - 'error': {'$ref': '#/definitions/Error'}, - 'watcher-id': {'type': 'string'}}, - 'required': ['watcher-id', - 'changes'], - 'type': 'object'}}, - 'properties': {'Next': {'description': 'Next returns when a change has ' - 'occurred to an entity of the\n' - 'collection being watched since the ' - 'most recent call to Next\n' - 'or the Watch call that created the ' - 'srvRelationStatusWatcher.', - 'properties': {'Result': {'$ref': '#/definitions/RelationLifeSuspendedStatusWatchResult'}}, - 'type': 'object'}, - 'Stop': {'description': 'Stop stops the watcher.', - 'type': 'object'}}, - 'type': 'object'} - - - @ReturnMapping(RelationLifeSuspendedStatusWatchResult) - async def Next(self): - ''' - Next returns when a change has occurred to an entity of the - collection being watched since the most recent call to Next - or the Watch call that created the srvRelationStatusWatcher. - - - Returns -> RelationLifeSuspendedStatusWatchResult - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='RelationStatusWatcher', - request='Next', - version=1, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(None) - async def Stop(self): - ''' - Stop stops the watcher. - - - Returns -> None - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='RelationStatusWatcher', - request='Stop', - version=1, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - async def rpc(self, msg): - ''' - Patch rpc method to add Id. - ''' - if not hasattr(self, 'Id'): - raise RuntimeError('Missing "Id" field') - msg['Id'] = id - - from .facade import TypeEncoder - reply = await self.connection.rpc(msg, encoder=TypeEncoder) - return reply - - - -class RelationUnitsWatcherFacade(Type): - name = 'RelationUnitsWatcher' - version = 1 - schema = {'definitions': {'Error': {'additionalProperties': False, - 'properties': {'code': {'type': 'string'}, - 'info': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'message': {'type': 'string'}}, - 'required': ['message', 'code'], - 'type': 'object'}, - 'RelationUnitsChange': {'additionalProperties': False, - 'properties': {'app-changed': {'patternProperties': {'.*': {'type': 'integer'}}, - 'type': 'object'}, - 'changed': {'patternProperties': {'.*': {'$ref': '#/definitions/UnitSettings'}}, - 'type': 'object'}, - 'departed': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'required': ['changed'], - 'type': 'object'}, - 'RelationUnitsWatchResult': {'additionalProperties': False, - 'properties': {'changes': {'$ref': '#/definitions/RelationUnitsChange'}, - 'error': {'$ref': '#/definitions/Error'}, - 'watcher-id': {'type': 'string'}}, - 'required': ['watcher-id', - 'changes'], - 'type': 'object'}, - 'UnitSettings': {'additionalProperties': False, - 'properties': {'version': {'type': 'integer'}}, - 'required': ['version'], - 'type': 'object'}}, - 'properties': {'Next': {'description': 'Next returns when a change has ' - 'occurred to an entity of the\n' - 'collection being watched since the ' - 'most recent call to Next\n' - 'or the Watch call that created the ' - 'srvRelationUnitsWatcher.', - 'properties': {'Result': {'$ref': '#/definitions/RelationUnitsWatchResult'}}, - 'type': 'object'}, - 'Stop': {'description': 'Stop stops the watcher.', - 'type': 'object'}}, - 'type': 'object'} - - - @ReturnMapping(RelationUnitsWatchResult) - async def Next(self): - ''' - Next returns when a change has occurred to an entity of the - collection being watched since the most recent call to Next - or the Watch call that created the srvRelationUnitsWatcher. - - - Returns -> RelationUnitsWatchResult - ''' - - # 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): - ''' - Stop stops the watcher. - - - 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 - - - - async def rpc(self, msg): - ''' - Patch rpc method to add Id. - ''' - if not hasattr(self, 'Id'): - raise RuntimeError('Missing "Id" field') - msg['Id'] = id - - from .facade import TypeEncoder - reply = await self.connection.rpc(msg, encoder=TypeEncoder) - return reply - - - -class RemoteRelationWatcherFacade(Type): - name = 'RemoteRelationWatcher' - version = 1 - schema = {'definitions': {'Error': {'additionalProperties': False, - 'properties': {'code': {'type': 'string'}, - 'info': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'message': {'type': 'string'}}, - 'required': ['message', 'code'], - 'type': 'object'}, - 'Macaroon': {'additionalProperties': False, 'type': 'object'}, - 'RemoteRelationChangeEvent': {'additionalProperties': False, - 'properties': {'application-settings': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'application-token': {'type': 'string'}, - 'bakery-version': {'type': 'integer'}, - 'changed-units': {'items': {'$ref': '#/definitions/RemoteRelationUnitChange'}, - 'type': 'array'}, - 'departed-units': {'items': {'type': 'integer'}, - 'type': 'array'}, - 'force-cleanup': {'type': 'boolean'}, - 'life': {'type': 'string'}, - 'macaroons': {'items': {'$ref': '#/definitions/Macaroon'}, - 'type': 'array'}, - 'relation-token': {'type': 'string'}, - 'suspended': {'type': 'boolean'}, - 'suspended-reason': {'type': 'string'}, - 'unit-count': {'type': 'integer'}}, - 'required': ['relation-token', - 'application-token', - 'life', - 'unit-count'], - 'type': 'object'}, - 'RemoteRelationUnitChange': {'additionalProperties': False, - 'properties': {'settings': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'unit-id': {'type': 'integer'}}, - 'required': ['unit-id'], - 'type': 'object'}, - 'RemoteRelationWatchResult': {'additionalProperties': False, - 'properties': {'changes': {'$ref': '#/definitions/RemoteRelationChangeEvent'}, - 'error': {'$ref': '#/definitions/Error'}, - 'watcher-id': {'type': 'string'}}, - 'required': ['watcher-id', - 'changes'], - 'type': 'object'}}, - 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/RemoteRelationWatchResult'}}, - 'type': 'object'}, - 'Stop': {'description': 'Stop stops the watcher.', - 'type': 'object'}}, - 'type': 'object'} - - - @ReturnMapping(RemoteRelationWatchResult) - async def Next(self): - ''' - - Returns -> RemoteRelationWatchResult - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='RemoteRelationWatcher', - request='Next', - version=1, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(None) - async def Stop(self): - ''' - Stop stops the watcher. - - - Returns -> None - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='RemoteRelationWatcher', - request='Stop', - version=1, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - async def rpc(self, msg): - ''' - Patch rpc method to add Id. - ''' - if not hasattr(self, 'Id'): - raise RuntimeError('Missing "Id" field') - msg['Id'] = id - - from .facade import TypeEncoder - reply = await self.connection.rpc(msg, encoder=TypeEncoder) - return reply - - - -class ResourcesHookContextFacade(Type): - name = 'ResourcesHookContext' - version = 1 - schema = {'definitions': {'CharmResource': {'additionalProperties': False, - 'properties': {'description': {'type': 'string'}, - 'fingerprint': {'items': {'type': 'integer'}, - 'type': 'array'}, - 'name': {'type': 'string'}, - 'origin': {'type': 'string'}, - 'path': {'type': 'string'}, - 'revision': {'type': 'integer'}, - 'size': {'type': 'integer'}, - 'type': {'type': 'string'}}, - 'required': ['name', - 'type', - 'path', - 'origin', - 'revision', - 'fingerprint', - 'size'], - 'type': 'object'}, - 'Error': {'additionalProperties': False, - 'properties': {'code': {'type': 'string'}, - 'info': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'message': {'type': 'string'}}, - 'required': ['message', 'code'], - 'type': 'object'}, - 'ErrorResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}}, - 'type': 'object'}, - 'ListUnitResourcesArgs': {'additionalProperties': False, - 'properties': {'resource-names': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'required': ['resource-names'], - 'type': 'object'}, - 'Resource': {'additionalProperties': False, - 'properties': {'CharmResource': {'$ref': '#/definitions/CharmResource'}, - 'application': {'type': 'string'}, - 'description': {'type': 'string'}, - 'fingerprint': {'items': {'type': 'integer'}, - 'type': 'array'}, - 'id': {'type': 'string'}, - 'name': {'type': 'string'}, - 'origin': {'type': 'string'}, - 'path': {'type': 'string'}, - 'pending-id': {'type': 'string'}, - 'revision': {'type': 'integer'}, - 'size': {'type': 'integer'}, - 'timestamp': {'format': 'date-time', - 'type': 'string'}, - 'type': {'type': 'string'}, - 'username': {'type': 'string'}}, - 'required': ['name', - 'type', - 'path', - 'origin', - 'revision', - 'fingerprint', - 'size', - 'CharmResource', - 'id', - 'pending-id', - 'application', - 'username', - 'timestamp'], - 'type': 'object'}, - 'UnitResourceResult': {'additionalProperties': False, - 'properties': {'ErrorResult': {'$ref': '#/definitions/ErrorResult'}, - 'error': {'$ref': '#/definitions/Error'}, - 'resource': {'$ref': '#/definitions/Resource'}}, - 'required': ['ErrorResult', 'resource'], - 'type': 'object'}, - 'UnitResourcesResult': {'additionalProperties': False, - 'properties': {'ErrorResult': {'$ref': '#/definitions/ErrorResult'}, - 'error': {'$ref': '#/definitions/Error'}, - 'resources': {'items': {'$ref': '#/definitions/UnitResourceResult'}, - 'type': 'array'}}, - 'required': ['ErrorResult', - 'resources'], - 'type': 'object'}}, - 'properties': {'GetResourceInfo': {'description': 'GetResourceInfo returns ' - 'the resource info for each ' - 'of the given\n' - 'resource names (for the ' - 'implicit application). If ' - 'any one is missing then\n' - 'the corresponding result ' - 'is set with ' - 'errors.NotFound.', - 'properties': {'Params': {'$ref': '#/definitions/ListUnitResourcesArgs'}, - 'Result': {'$ref': '#/definitions/UnitResourcesResult'}}, - 'type': 'object'}}, - 'type': 'object'} - - - @ReturnMapping(UnitResourcesResult) - async def GetResourceInfo(self, resource_names=None): - ''' - GetResourceInfo returns the resource info for each of the given - resource names (for the implicit application). If any one is missing then - the corresponding result is set with errors.NotFound. - - resource_names : typing.Sequence[str] - Returns -> UnitResourcesResult - ''' - if resource_names is not None and not isinstance(resource_names, (bytes, str, list)): - raise Exception("Expected resource_names to be a Sequence, received: {}".format(type(resource_names))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='ResourcesHookContext', - request='GetResourceInfo', - version=1, - params=_params) - _params['resource-names'] = resource_names - reply = await self.rpc(msg) - return reply - - - -class RetryStrategyFacade(Type): - name = 'RetryStrategy' - version = 1 - schema = {'definitions': {'Entities': {'additionalProperties': False, - 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'}, - 'type': 'array'}}, - 'required': ['entities'], - 'type': 'object'}, - 'Entity': {'additionalProperties': False, - 'properties': {'tag': {'type': 'string'}}, - 'required': ['tag'], - 'type': 'object'}, - 'Error': {'additionalProperties': False, - 'properties': {'code': {'type': 'string'}, - 'info': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'message': {'type': 'string'}}, - 'required': ['message', 'code'], - 'type': 'object'}, - 'NotifyWatchResult': {'additionalProperties': False, - 'properties': {'NotifyWatcherId': {'type': 'string'}, - 'error': {'$ref': '#/definitions/Error'}}, - 'required': ['NotifyWatcherId'], - 'type': 'object'}, - 'NotifyWatchResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'RetryStrategy': {'additionalProperties': False, - 'properties': {'jitter-retry-time': {'type': 'boolean'}, - 'max-retry-time': {'type': 'integer'}, - 'min-retry-time': {'type': 'integer'}, - 'retry-time-factor': {'type': 'integer'}, - 'should-retry': {'type': 'boolean'}}, - 'required': ['should-retry', - 'min-retry-time', - 'max-retry-time', - 'jitter-retry-time', - 'retry-time-factor'], - 'type': 'object'}, - 'RetryStrategyResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'result': {'$ref': '#/definitions/RetryStrategy'}}, - 'type': 'object'}, - 'RetryStrategyResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/RetryStrategyResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}}, - 'properties': {'RetryStrategy': {'description': 'RetryStrategy returns ' - 'RetryStrategyResults that ' - 'can be used by any code that ' - 'uses\n' - 'to configure the retry timer ' - "that's currently in juju " - 'utils.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/RetryStrategyResults'}}, - 'type': 'object'}, - 'WatchRetryStrategy': {'description': 'WatchRetryStrategy ' - 'watches for changes to ' - 'the model. Currently we ' - 'only allow\n' - 'changes to the boolean ' - 'that determines whether ' - 'retries should be ' - 'attempted or not.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/NotifyWatchResults'}}, - 'type': 'object'}}, - 'type': 'object'} - - - @ReturnMapping(RetryStrategyResults) - async def RetryStrategy(self, entities=None): - ''' - RetryStrategy returns RetryStrategyResults that can be used by any code that uses - to configure the retry timer that's currently in juju utils. - - entities : typing.Sequence[~Entity] - Returns -> RetryStrategyResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # 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=None): - ''' - WatchRetryStrategy watches for changes to the model. Currently we only allow - changes to the boolean that determines whether retries should be attempted or not. - - entities : typing.Sequence[~Entity] - Returns -> NotifyWatchResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # 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 SecretBackendsFacade(Type): - name = 'SecretBackends' - version = 1 - schema = {'definitions': {'AddSecretBackendArg': {'additionalProperties': False, - 'properties': {'SecretBackend': {'$ref': '#/definitions/SecretBackend'}, - 'backend-type': {'type': 'string'}, - 'config': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'id': {'type': 'string'}, - 'name': {'type': 'string'}, - 'token-rotate-interval': {'type': 'integer'}}, - 'required': ['name', - 'backend-type', - 'config', - 'SecretBackend'], - 'type': 'object'}, - 'AddSecretBackendArgs': {'additionalProperties': False, - 'properties': {'args': {'items': {'$ref': '#/definitions/AddSecretBackendArg'}, - 'type': 'array'}}, - 'required': ['args'], - 'type': 'object'}, - 'Error': {'additionalProperties': False, - 'properties': {'code': {'type': 'string'}, - 'info': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'message': {'type': 'string'}}, - 'required': ['message', 'code'], - 'type': 'object'}, - 'ErrorResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}}, - 'type': 'object'}, - 'ErrorResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'ListSecretBackendsArgs': {'additionalProperties': False, - 'properties': {'names': {'items': {'type': 'string'}, - 'type': 'array'}, - 'reveal': {'type': 'boolean'}}, - 'required': ['names', 'reveal'], - 'type': 'object'}, - 'ListSecretBackendsResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/SecretBackendResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'RemoveSecretBackendArg': {'additionalProperties': False, - 'properties': {'force': {'type': 'boolean'}, - 'name': {'type': 'string'}}, - 'required': ['name'], - 'type': 'object'}, - 'RemoveSecretBackendArgs': {'additionalProperties': False, - 'properties': {'args': {'items': {'$ref': '#/definitions/RemoveSecretBackendArg'}, - 'type': 'array'}}, - 'required': ['args'], - 'type': 'object'}, - 'SecretBackend': {'additionalProperties': False, - 'properties': {'backend-type': {'type': 'string'}, - 'config': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'name': {'type': 'string'}, - 'token-rotate-interval': {'type': 'integer'}}, - 'required': ['name', - 'backend-type', - 'config'], - 'type': 'object'}, - 'SecretBackendResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'id': {'type': 'string'}, - 'message': {'type': 'string'}, - 'num-secrets': {'type': 'integer'}, - 'result': {'$ref': '#/definitions/SecretBackend'}, - 'status': {'type': 'string'}}, - 'required': ['result', - 'id', - 'num-secrets', - 'status'], - 'type': 'object'}, - 'UpdateSecretBackendArg': {'additionalProperties': False, - 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'force': {'type': 'boolean'}, - 'name': {'type': 'string'}, - 'name-change': {'type': 'string'}, - 'reset': {'items': {'type': 'string'}, - 'type': 'array'}, - 'token-rotate-interval': {'type': 'integer'}}, - 'required': ['name', - 'token-rotate-interval', - 'config', - 'reset'], - 'type': 'object'}, - 'UpdateSecretBackendArgs': {'additionalProperties': False, - 'properties': {'args': {'items': {'$ref': '#/definitions/UpdateSecretBackendArg'}, - 'type': 'array'}}, - 'required': ['args'], - 'type': 'object'}}, - 'properties': {'AddSecretBackends': {'description': 'AddSecretBackends adds ' - 'new secret backends.', - 'properties': {'Params': {'$ref': '#/definitions/AddSecretBackendArgs'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'ListSecretBackends': {'description': 'ListSecretBackends ' - 'lists available secret ' - 'backends.', - 'properties': {'Params': {'$ref': '#/definitions/ListSecretBackendsArgs'}, - 'Result': {'$ref': '#/definitions/ListSecretBackendsResults'}}, - 'type': 'object'}, - 'RemoveSecretBackends': {'description': 'RemoveSecretBackends ' - 'removes secret ' - 'backends.', - 'properties': {'Params': {'$ref': '#/definitions/RemoveSecretBackendArgs'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'UpdateSecretBackends': {'description': 'UpdateSecretBackends ' - 'updates secret ' - 'backends.', - 'properties': {'Params': {'$ref': '#/definitions/UpdateSecretBackendArgs'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}}, - 'type': 'object'} - - - @ReturnMapping(ErrorResults) - async def AddSecretBackends(self, args=None): - ''' - AddSecretBackends adds new secret backends. - - args : typing.Sequence[~AddSecretBackendArg] - Returns -> ErrorResults - ''' - if args is not None and not isinstance(args, (bytes, str, list)): - raise Exception("Expected args to be a Sequence, received: {}".format(type(args))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='SecretBackends', - request='AddSecretBackends', - version=1, - params=_params) - _params['args'] = args - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ListSecretBackendsResults) - async def ListSecretBackends(self, names=None, reveal=None): - ''' - ListSecretBackends lists available secret backends. - - names : typing.Sequence[str] - reveal : bool - Returns -> ListSecretBackendsResults - ''' - if names is not None and not isinstance(names, (bytes, str, list)): - raise Exception("Expected names to be a Sequence, received: {}".format(type(names))) - - if reveal is not None and not isinstance(reveal, bool): - raise Exception("Expected reveal to be a bool, received: {}".format(type(reveal))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='SecretBackends', - request='ListSecretBackends', - version=1, - params=_params) - _params['names'] = names - _params['reveal'] = reveal - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def RemoveSecretBackends(self, args=None): - ''' - RemoveSecretBackends removes secret backends. - - args : typing.Sequence[~RemoveSecretBackendArg] - Returns -> ErrorResults - ''' - if args is not None and not isinstance(args, (bytes, str, list)): - raise Exception("Expected args to be a Sequence, received: {}".format(type(args))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='SecretBackends', - request='RemoveSecretBackends', - version=1, - params=_params) - _params['args'] = args - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def UpdateSecretBackends(self, args=None): - ''' - UpdateSecretBackends updates secret backends. - - args : typing.Sequence[~UpdateSecretBackendArg] - Returns -> ErrorResults - ''' - if args is not None and not isinstance(args, (bytes, str, list)): - raise Exception("Expected args to be a Sequence, received: {}".format(type(args))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='SecretBackends', - request='UpdateSecretBackends', - version=1, - params=_params) - _params['args'] = args - reply = await self.rpc(msg) - return reply - - - -class SecretBackendsManagerFacade(Type): - name = 'SecretBackendsManager' - version = 1 - schema = {'definitions': {'Error': {'additionalProperties': False, - 'properties': {'code': {'type': 'string'}, - 'info': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'message': {'type': 'string'}}, - 'required': ['message', 'code'], - 'type': 'object'}, - 'ErrorResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}}, - 'type': 'object'}, - 'ErrorResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'RotateSecretBackendArgs': {'additionalProperties': False, - 'properties': {'backend-ids': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'required': ['backend-ids'], - 'type': 'object'}, - 'SecretBackendRotateChange': {'additionalProperties': False, - 'properties': {'backend-name': {'type': 'string'}, - 'id': {'type': 'string'}, - 'next-trigger-time': {'format': 'date-time', - 'type': 'string'}}, - 'required': ['id', - 'backend-name', - 'next-trigger-time'], - 'type': 'object'}, - 'SecretBackendRotateWatchResult': {'additionalProperties': False, - 'properties': {'changes': {'items': {'$ref': '#/definitions/SecretBackendRotateChange'}, - 'type': 'array'}, - 'error': {'$ref': '#/definitions/Error'}, - 'watcher-id': {'type': 'string'}}, - 'required': ['watcher-id', - 'changes'], - 'type': 'object'}}, - 'properties': {'RotateBackendTokens': {'description': 'RotateBackendTokens ' - 'rotates the tokens for ' - 'the specified ' - 'backends.', - 'properties': {'Params': {'$ref': '#/definitions/RotateSecretBackendArgs'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'WatchSecretBackendsRotateChanges': {'description': 'WatchSecretBackendsRotateChanges ' - 'sets up a ' - 'watcher ' - 'to notify ' - 'of ' - 'changes ' - 'to secret ' - 'backend ' - 'rotations.', - 'properties': {'Result': {'$ref': '#/definitions/SecretBackendRotateWatchResult'}}, - 'type': 'object'}}, - 'type': 'object'} - - - @ReturnMapping(ErrorResults) - async def RotateBackendTokens(self, backend_ids=None): - ''' - RotateBackendTokens rotates the tokens for the specified backends. - - backend_ids : typing.Sequence[str] - Returns -> ErrorResults - ''' - if backend_ids is not None and not isinstance(backend_ids, (bytes, str, list)): - raise Exception("Expected backend_ids to be a Sequence, received: {}".format(type(backend_ids))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='SecretBackendsManager', - request='RotateBackendTokens', - version=1, - params=_params) - _params['backend-ids'] = backend_ids - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(SecretBackendRotateWatchResult) - async def WatchSecretBackendsRotateChanges(self): - ''' - WatchSecretBackendsRotateChanges sets up a watcher to notify of changes to secret backend rotations. - - - Returns -> SecretBackendRotateWatchResult - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='SecretBackendsManager', - request='WatchSecretBackendsRotateChanges', - version=1, - params=_params) - - reply = await self.rpc(msg) - return reply - - - -class SecretBackendsRotateWatcherFacade(Type): - name = 'SecretBackendsRotateWatcher' - version = 1 - schema = {'definitions': {'Error': {'additionalProperties': False, - 'properties': {'code': {'type': 'string'}, - 'info': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'message': {'type': 'string'}}, - 'required': ['message', 'code'], - 'type': 'object'}, - 'SecretBackendRotateChange': {'additionalProperties': False, - 'properties': {'backend-name': {'type': 'string'}, - 'id': {'type': 'string'}, - 'next-trigger-time': {'format': 'date-time', - 'type': 'string'}}, - 'required': ['id', - 'backend-name', - 'next-trigger-time'], - 'type': 'object'}, - 'SecretBackendRotateWatchResult': {'additionalProperties': False, - 'properties': {'changes': {'items': {'$ref': '#/definitions/SecretBackendRotateChange'}, - 'type': 'array'}, - 'error': {'$ref': '#/definitions/Error'}, - 'watcher-id': {'type': 'string'}}, - 'required': ['watcher-id', - 'changes'], - 'type': 'object'}}, - 'properties': {'Next': {'description': 'Next returns when a change has ' - 'occurred to an entity of the\n' - 'collection being watched since the ' - 'most recent call to Next\n' - 'or the Watch call that created the ' - 'srvSecretRotationWatcher.', - 'properties': {'Result': {'$ref': '#/definitions/SecretBackendRotateWatchResult'}}, - 'type': 'object'}, - 'Stop': {'description': 'Stop stops the watcher.', - 'type': 'object'}}, - 'type': 'object'} - - - @ReturnMapping(SecretBackendRotateWatchResult) - async def Next(self): - ''' - Next returns when a change has occurred to an entity of the - collection being watched since the most recent call to Next - or the Watch call that created the srvSecretRotationWatcher. - - - Returns -> SecretBackendRotateWatchResult - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='SecretBackendsRotateWatcher', - request='Next', - version=1, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(None) - async def Stop(self): - ''' - Stop stops the watcher. - - - Returns -> None - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='SecretBackendsRotateWatcher', - request='Stop', - version=1, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - async def rpc(self, msg): - ''' - Patch rpc method to add Id. - ''' - if not hasattr(self, 'Id'): - raise RuntimeError('Missing "Id" field') - msg['Id'] = id - - from .facade import TypeEncoder - reply = await self.connection.rpc(msg, encoder=TypeEncoder) - return reply - - - -class SecretsDrainFacade(Type): - name = 'SecretsDrain' - version = 1 - schema = {'definitions': {'ChangeSecretBackendArg': {'additionalProperties': False, - 'properties': {'content': {'$ref': '#/definitions/SecretContentParams'}, - 'revision': {'type': 'integer'}, - 'uri': {'type': 'string'}}, - 'required': ['uri', 'revision'], - 'type': 'object'}, - 'ChangeSecretBackendArgs': {'additionalProperties': False, - 'properties': {'args': {'items': {'$ref': '#/definitions/ChangeSecretBackendArg'}, - 'type': 'array'}}, - 'required': ['args'], - 'type': 'object'}, - 'Error': {'additionalProperties': False, - 'properties': {'code': {'type': 'string'}, - 'info': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'message': {'type': 'string'}}, - 'required': ['message', 'code'], - 'type': 'object'}, - 'ErrorResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}}, - 'type': 'object'}, - 'ErrorResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'ListSecretResult': {'additionalProperties': False, - 'properties': {'create-time': {'format': 'date-time', - 'type': 'string'}, - 'description': {'type': 'string'}, - 'label': {'type': 'string'}, - 'latest-expire-time': {'format': 'date-time', - 'type': 'string'}, - 'latest-revision': {'type': 'integer'}, - 'next-rotate-time': {'format': 'date-time', - 'type': 'string'}, - 'owner-tag': {'type': 'string'}, - 'revisions': {'items': {'$ref': '#/definitions/SecretRevision'}, - 'type': 'array'}, - 'rotate-policy': {'type': 'string'}, - 'update-time': {'format': 'date-time', - 'type': 'string'}, - 'uri': {'type': 'string'}, - 'value': {'$ref': '#/definitions/SecretValueResult'}, - 'version': {'type': 'integer'}}, - 'required': ['uri', - 'version', - 'owner-tag', - 'latest-revision', - 'create-time', - 'update-time', - 'revisions'], - 'type': 'object'}, - 'ListSecretResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/ListSecretResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'NotifyWatchResult': {'additionalProperties': False, - 'properties': {'NotifyWatcherId': {'type': 'string'}, - 'error': {'$ref': '#/definitions/Error'}}, - 'required': ['NotifyWatcherId'], - 'type': 'object'}, - 'SecretContentParams': {'additionalProperties': False, - 'properties': {'data': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}, - 'value-ref': {'$ref': '#/definitions/SecretValueRef'}}, - 'type': 'object'}, - 'SecretRevision': {'additionalProperties': False, - 'properties': {'backend-name': {'type': 'string'}, - 'create-time': {'format': 'date-time', - 'type': 'string'}, - 'expire-time': {'format': 'date-time', - 'type': 'string'}, - 'revision': {'type': 'integer'}, - 'update-time': {'format': 'date-time', - 'type': 'string'}, - 'value-ref': {'$ref': '#/definitions/SecretValueRef'}}, - 'required': ['revision'], - 'type': 'object'}, - 'SecretValueRef': {'additionalProperties': False, - 'properties': {'backend-id': {'type': 'string'}, - 'revision-id': {'type': 'string'}}, - 'required': ['backend-id', 'revision-id'], - 'type': 'object'}, - 'SecretValueResult': {'additionalProperties': False, - 'properties': {'data': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}, - 'error': {'$ref': '#/definitions/Error'}}, - 'type': 'object'}}, - 'properties': {'ChangeSecretBackend': {'description': 'ChangeSecretBackend ' - 'updates the backend ' - 'for the specified ' - 'secret after migration ' - 'done.', - 'properties': {'Params': {'$ref': '#/definitions/ChangeSecretBackendArgs'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'GetSecretsToDrain': {'description': 'GetSecretsToDrain ' - 'returns metadata for the ' - 'secrets that need to be ' - 'drained.', - 'properties': {'Result': {'$ref': '#/definitions/ListSecretResults'}}, - 'type': 'object'}, - 'WatchSecretBackendChanged': {'description': 'WatchSecretBackendChanged ' - 'sets up a ' - 'watcher to ' - 'notify of ' - 'changes to the ' - 'secret backend.', - 'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}}, - 'type': 'object'}}, - 'type': 'object'} - - - @ReturnMapping(ErrorResults) - async def ChangeSecretBackend(self, args=None): - ''' - ChangeSecretBackend updates the backend for the specified secret after migration done. - - args : typing.Sequence[~ChangeSecretBackendArg] - Returns -> ErrorResults - ''' - if args is not None and not isinstance(args, (bytes, str, list)): - raise Exception("Expected args to be a Sequence, received: {}".format(type(args))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='SecretsDrain', - request='ChangeSecretBackend', - version=1, - params=_params) - _params['args'] = args - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ListSecretResults) - async def GetSecretsToDrain(self): - ''' - GetSecretsToDrain returns metadata for the secrets that need to be drained. - - - Returns -> ListSecretResults - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='SecretsDrain', - request='GetSecretsToDrain', - version=1, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(NotifyWatchResult) - async def WatchSecretBackendChanged(self): - ''' - WatchSecretBackendChanged sets up a watcher to notify of changes to the secret backend. - - - Returns -> NotifyWatchResult - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='SecretsDrain', - request='WatchSecretBackendChanged', - version=1, - params=_params) - - reply = await self.rpc(msg) - return reply - - - -class SecretsFacade(Type): - name = 'Secrets' - version = 1 - schema = {'definitions': {'Error': {'additionalProperties': False, - 'properties': {'code': {'type': 'string'}, - 'info': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'message': {'type': 'string'}}, - 'required': ['message', 'code'], - 'type': 'object'}, - 'ListSecretResult': {'additionalProperties': False, - 'properties': {'create-time': {'format': 'date-time', - 'type': 'string'}, - 'description': {'type': 'string'}, - 'label': {'type': 'string'}, - 'latest-expire-time': {'format': 'date-time', - 'type': 'string'}, - 'latest-revision': {'type': 'integer'}, - 'next-rotate-time': {'format': 'date-time', - 'type': 'string'}, - 'owner-tag': {'type': 'string'}, - 'revisions': {'items': {'$ref': '#/definitions/SecretRevision'}, - 'type': 'array'}, - 'rotate-policy': {'type': 'string'}, - 'update-time': {'format': 'date-time', - 'type': 'string'}, - 'uri': {'type': 'string'}, - 'value': {'$ref': '#/definitions/SecretValueResult'}, - 'version': {'type': 'integer'}}, - 'required': ['uri', - 'version', - 'owner-tag', - 'latest-revision', - 'create-time', - 'update-time', - 'revisions'], - 'type': 'object'}, - 'ListSecretResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/ListSecretResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'ListSecretsArgs': {'additionalProperties': False, - 'properties': {'filter': {'$ref': '#/definitions/SecretsFilter'}, - 'show-secrets': {'type': 'boolean'}}, - 'required': ['show-secrets', 'filter'], - 'type': 'object'}, - 'SecretRevision': {'additionalProperties': False, - 'properties': {'backend-name': {'type': 'string'}, - 'create-time': {'format': 'date-time', - 'type': 'string'}, - 'expire-time': {'format': 'date-time', - 'type': 'string'}, - 'revision': {'type': 'integer'}, - 'update-time': {'format': 'date-time', - 'type': 'string'}, - 'value-ref': {'$ref': '#/definitions/SecretValueRef'}}, - 'required': ['revision'], - 'type': 'object'}, - 'SecretValueRef': {'additionalProperties': False, - 'properties': {'backend-id': {'type': 'string'}, - 'revision-id': {'type': 'string'}}, - 'required': ['backend-id', 'revision-id'], - 'type': 'object'}, - 'SecretValueResult': {'additionalProperties': False, - 'properties': {'data': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}, - 'error': {'$ref': '#/definitions/Error'}}, - 'type': 'object'}, - 'SecretsFilter': {'additionalProperties': False, - 'properties': {'owner-tag': {'type': 'string'}, - 'revision': {'type': 'integer'}, - 'uri': {'type': 'string'}}, - 'type': 'object'}}, - 'properties': {'ListSecrets': {'description': 'ListSecrets lists available ' - 'secrets.', - 'properties': {'Params': {'$ref': '#/definitions/ListSecretsArgs'}, - 'Result': {'$ref': '#/definitions/ListSecretResults'}}, - 'type': 'object'}}, - 'type': 'object'} - - - @ReturnMapping(ListSecretResults) - async def ListSecrets(self, filter_=None, show_secrets=None): - ''' - ListSecrets lists available secrets. - - filter_ : SecretsFilter - show_secrets : bool - Returns -> ListSecretResults - ''' - if filter_ is not None and not isinstance(filter_, (dict, SecretsFilter)): - raise Exception("Expected filter_ to be a SecretsFilter, received: {}".format(type(filter_))) - - if show_secrets is not None and not isinstance(show_secrets, bool): - raise Exception("Expected show_secrets to be a bool, received: {}".format(type(show_secrets))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Secrets', - request='ListSecrets', - version=1, - params=_params) - _params['filter'] = filter_ - _params['show-secrets'] = show_secrets - reply = await self.rpc(msg) - return reply - - - -class SecretsManagerFacade(Type): - name = 'SecretsManager' - version = 1 - schema = {'definitions': {'CreateSecretArg': {'additionalProperties': False, - 'properties': {'UpsertSecretArg': {'$ref': '#/definitions/UpsertSecretArg'}, - 'content': {'$ref': '#/definitions/SecretContentParams'}, - 'description': {'type': 'string'}, - 'expire-time': {'format': 'date-time', - 'type': 'string'}, - 'label': {'type': 'string'}, - 'owner-tag': {'type': 'string'}, - 'params': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'rotate-policy': {'type': 'string'}, - 'uri': {'type': 'string'}}, - 'required': ['UpsertSecretArg', - 'owner-tag'], - 'type': 'object'}, - 'CreateSecretArgs': {'additionalProperties': False, - 'properties': {'args': {'items': {'$ref': '#/definitions/CreateSecretArg'}, - 'type': 'array'}}, - 'required': ['args'], - 'type': 'object'}, - 'CreateSecretURIsArg': {'additionalProperties': False, - 'properties': {'count': {'type': 'integer'}}, - 'required': ['count'], - 'type': 'object'}, - 'DeleteSecretArg': {'additionalProperties': False, - 'properties': {'revisions': {'items': {'type': 'integer'}, - 'type': 'array'}, - 'uri': {'type': 'string'}}, - 'required': ['uri'], - 'type': 'object'}, - 'DeleteSecretArgs': {'additionalProperties': False, - 'properties': {'args': {'items': {'$ref': '#/definitions/DeleteSecretArg'}, - 'type': 'array'}}, - 'required': ['args'], - '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': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'message': {'type': 'string'}}, - 'required': ['message', 'code'], - 'type': 'object'}, - 'ErrorResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}}, - 'type': 'object'}, - 'ErrorResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'GetSecretConsumerInfoArgs': {'additionalProperties': False, - 'properties': {'consumer-tag': {'type': 'string'}, - 'uris': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'required': ['consumer-tag', - 'uris'], - 'type': 'object'}, - 'GetSecretContentArg': {'additionalProperties': False, - 'properties': {'label': {'type': 'string'}, - 'peek': {'type': 'boolean'}, - 'refresh': {'type': 'boolean'}, - 'uri': {'type': 'string'}}, - 'required': ['uri'], - 'type': 'object'}, - 'GetSecretContentArgs': {'additionalProperties': False, - 'properties': {'args': {'items': {'$ref': '#/definitions/GetSecretContentArg'}, - 'type': 'array'}}, - 'required': ['args'], - 'type': 'object'}, - 'GrantRevokeSecretArg': {'additionalProperties': False, - 'properties': {'role': {'type': 'string'}, - 'scope-tag': {'type': 'string'}, - 'subject-tags': {'items': {'type': 'string'}, - 'type': 'array'}, - 'uri': {'type': 'string'}}, - 'required': ['uri', - 'scope-tag', - 'subject-tags', - 'role'], - 'type': 'object'}, - 'GrantRevokeSecretArgs': {'additionalProperties': False, - 'properties': {'args': {'items': {'$ref': '#/definitions/GrantRevokeSecretArg'}, - 'type': 'array'}}, - 'required': ['args'], - 'type': 'object'}, - 'ListSecretResult': {'additionalProperties': False, - 'properties': {'create-time': {'format': 'date-time', - 'type': 'string'}, - 'description': {'type': 'string'}, - 'label': {'type': 'string'}, - 'latest-expire-time': {'format': 'date-time', - 'type': 'string'}, - 'latest-revision': {'type': 'integer'}, - 'next-rotate-time': {'format': 'date-time', - 'type': 'string'}, - 'owner-tag': {'type': 'string'}, - 'revisions': {'items': {'$ref': '#/definitions/SecretRevision'}, - 'type': 'array'}, - 'rotate-policy': {'type': 'string'}, - 'update-time': {'format': 'date-time', - 'type': 'string'}, - 'uri': {'type': 'string'}, - 'value': {'$ref': '#/definitions/SecretValueResult'}, - 'version': {'type': 'integer'}}, - 'required': ['uri', - 'version', - 'owner-tag', - 'latest-revision', - 'create-time', - 'update-time', - 'revisions'], - 'type': 'object'}, - 'ListSecretResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/ListSecretResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'SecretBackendConfig': {'additionalProperties': False, - 'properties': {'params': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'type': {'type': 'string'}}, - 'required': ['type'], - 'type': 'object'}, - 'SecretBackendConfigResults': {'additionalProperties': False, - 'properties': {'active-id': {'type': 'string'}, - 'configs': {'patternProperties': {'.*': {'$ref': '#/definitions/SecretBackendConfig'}}, - 'type': 'object'}, - 'model-controller': {'type': 'string'}, - 'model-name': {'type': 'string'}, - 'model-uuid': {'type': 'string'}}, - 'required': ['model-controller', - 'model-uuid', - 'model-name', - 'active-id'], - 'type': 'object'}, - 'SecretConsumerInfoResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'label': {'type': 'string'}, - 'revision': {'type': 'integer'}}, - 'required': ['revision', 'label'], - 'type': 'object'}, - 'SecretConsumerInfoResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/SecretConsumerInfoResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'SecretContentParams': {'additionalProperties': False, - 'properties': {'data': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}, - 'value-ref': {'$ref': '#/definitions/SecretValueRef'}}, - 'type': 'object'}, - 'SecretContentResult': {'additionalProperties': False, - 'properties': {'content': {'$ref': '#/definitions/SecretContentParams'}, - 'error': {'$ref': '#/definitions/Error'}}, - 'required': ['content'], - 'type': 'object'}, - 'SecretContentResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/SecretContentResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'SecretRevision': {'additionalProperties': False, - 'properties': {'backend-name': {'type': 'string'}, - 'create-time': {'format': 'date-time', - 'type': 'string'}, - 'expire-time': {'format': 'date-time', - 'type': 'string'}, - 'revision': {'type': 'integer'}, - 'update-time': {'format': 'date-time', - 'type': 'string'}, - 'value-ref': {'$ref': '#/definitions/SecretValueRef'}}, - 'required': ['revision'], - 'type': 'object'}, - 'SecretRevisionArg': {'additionalProperties': False, - 'properties': {'pending-delete': {'type': 'boolean'}, - 'revisions': {'items': {'type': 'integer'}, - 'type': 'array'}, - 'uri': {'type': 'string'}}, - 'required': ['uri', - 'revisions', - 'pending-delete'], - 'type': 'object'}, - 'SecretRotatedArg': {'additionalProperties': False, - 'properties': {'original-revision': {'type': 'integer'}, - 'skip': {'type': 'boolean'}, - 'uri': {'type': 'string'}}, - 'required': ['uri', - 'original-revision', - 'skip'], - 'type': 'object'}, - 'SecretRotatedArgs': {'additionalProperties': False, - 'properties': {'args': {'items': {'$ref': '#/definitions/SecretRotatedArg'}, - 'type': 'array'}}, - 'required': ['args'], - 'type': 'object'}, - 'SecretTriggerChange': {'additionalProperties': False, - 'properties': {'next-trigger-time': {'format': 'date-time', - 'type': 'string'}, - 'revision': {'type': 'integer'}, - 'uri': {'type': 'string'}}, - 'required': ['uri', - 'next-trigger-time'], - 'type': 'object'}, - 'SecretTriggerWatchResult': {'additionalProperties': False, - 'properties': {'changes': {'items': {'$ref': '#/definitions/SecretTriggerChange'}, - 'type': 'array'}, - 'error': {'$ref': '#/definitions/Error'}, - 'watcher-id': {'type': 'string'}}, - 'required': ['watcher-id', - 'changes'], - 'type': 'object'}, - 'SecretValueRef': {'additionalProperties': False, - 'properties': {'backend-id': {'type': 'string'}, - 'revision-id': {'type': 'string'}}, - 'required': ['backend-id', 'revision-id'], - 'type': 'object'}, - 'SecretValueResult': {'additionalProperties': False, - 'properties': {'data': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}, - 'error': {'$ref': '#/definitions/Error'}}, - 'type': 'object'}, - 'StringResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'result': {'type': 'string'}}, - 'required': ['result'], - 'type': 'object'}, - 'StringResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'StringsWatchResult': {'additionalProperties': False, - 'properties': {'changes': {'items': {'type': 'string'}, - 'type': 'array'}, - 'error': {'$ref': '#/definitions/Error'}, - 'watcher-id': {'type': 'string'}}, - 'required': ['watcher-id'], - 'type': 'object'}, - 'StringsWatchResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'UpdateSecretArg': {'additionalProperties': False, - 'properties': {'UpsertSecretArg': {'$ref': '#/definitions/UpsertSecretArg'}, - 'content': {'$ref': '#/definitions/SecretContentParams'}, - 'description': {'type': 'string'}, - 'expire-time': {'format': 'date-time', - 'type': 'string'}, - 'label': {'type': 'string'}, - 'params': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'rotate-policy': {'type': 'string'}, - 'uri': {'type': 'string'}}, - 'required': ['UpsertSecretArg', 'uri'], - 'type': 'object'}, - 'UpdateSecretArgs': {'additionalProperties': False, - 'properties': {'args': {'items': {'$ref': '#/definitions/UpdateSecretArg'}, - 'type': 'array'}}, - 'required': ['args'], - 'type': 'object'}, - 'UpsertSecretArg': {'additionalProperties': False, - 'properties': {'content': {'$ref': '#/definitions/SecretContentParams'}, - 'description': {'type': 'string'}, - 'expire-time': {'format': 'date-time', - 'type': 'string'}, - 'label': {'type': 'string'}, - 'params': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'rotate-policy': {'type': 'string'}}, - 'type': 'object'}}, - 'properties': {'CreateSecretURIs': {'description': 'CreateSecretURIs creates ' - 'new secret URIs.', - 'properties': {'Params': {'$ref': '#/definitions/CreateSecretURIsArg'}, - 'Result': {'$ref': '#/definitions/StringResults'}}, - 'type': 'object'}, - 'CreateSecrets': {'description': 'CreateSecrets creates new ' - 'secrets.', - 'properties': {'Params': {'$ref': '#/definitions/CreateSecretArgs'}, - 'Result': {'$ref': '#/definitions/StringResults'}}, - 'type': 'object'}, - 'GetConsumerSecretsRevisionInfo': {'description': 'GetConsumerSecretsRevisionInfo ' - 'returns the ' - 'latest ' - 'secret ' - 'revisions ' - 'for the ' - 'specified ' - 'secrets.\n' - 'This facade ' - 'method is ' - 'used for ' - 'remote ' - 'watcher to ' - 'get the ' - 'latest ' - 'secret ' - 'revisions ' - 'and labels ' - 'for a ' - 'secret ' - 'changed ' - 'hook.', - 'properties': {'Params': {'$ref': '#/definitions/GetSecretConsumerInfoArgs'}, - 'Result': {'$ref': '#/definitions/SecretConsumerInfoResults'}}, - 'type': 'object'}, - 'GetSecretBackendConfig': {'description': 'GetSecretBackendConfig ' - 'gets the config ' - 'needed to create a ' - 'client to secret ' - 'backends.', - 'properties': {'Result': {'$ref': '#/definitions/SecretBackendConfigResults'}}, - 'type': 'object'}, - 'GetSecretContentInfo': {'description': 'GetSecretContentInfo ' - 'returns the secret ' - 'values for the ' - 'specified secrets.', - 'properties': {'Params': {'$ref': '#/definitions/GetSecretContentArgs'}, - 'Result': {'$ref': '#/definitions/SecretContentResults'}}, - 'type': 'object'}, - 'GetSecretMetadata': {'description': 'GetSecretMetadata ' - 'returns metadata for the ' - "caller's secrets.", - 'properties': {'Result': {'$ref': '#/definitions/ListSecretResults'}}, - 'type': 'object'}, - 'GetSecretRevisionContentInfo': {'description': 'GetSecretRevisionContentInfo ' - 'returns the ' - 'secret values ' - 'for the ' - 'specified ' - 'secret ' - 'revisions.', - 'properties': {'Params': {'$ref': '#/definitions/SecretRevisionArg'}, - 'Result': {'$ref': '#/definitions/SecretContentResults'}}, - 'type': 'object'}, - 'GetSecretStoreConfig': {'description': 'GetSecretStoreConfig ' - 'is for 3.0.x agents.\n' - 'TODO(wallyworld) - ' - 'remove when we auto ' - 'upgrade migrated ' - 'models.', - 'properties': {'Result': {'$ref': '#/definitions/SecretBackendConfig'}}, - 'type': 'object'}, - 'RemoveSecrets': {'description': 'RemoveSecrets removes the ' - 'specified secrets.', - 'properties': {'Params': {'$ref': '#/definitions/DeleteSecretArgs'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'SecretsGrant': {'description': 'SecretsGrant grants access to ' - 'a secret for the specified ' - 'subjects.', - 'properties': {'Params': {'$ref': '#/definitions/GrantRevokeSecretArgs'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'SecretsRevoke': {'description': 'SecretsRevoke revokes access ' - 'to a secret for the ' - 'specified subjects.', - 'properties': {'Params': {'$ref': '#/definitions/GrantRevokeSecretArgs'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'SecretsRotated': {'description': 'SecretsRotated records when ' - 'secrets were last rotated.', - 'properties': {'Params': {'$ref': '#/definitions/SecretRotatedArgs'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'UpdateSecrets': {'description': 'UpdateSecrets updates the ' - 'specified secrets.', - 'properties': {'Params': {'$ref': '#/definitions/UpdateSecretArgs'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'WatchConsumedSecretsChanges': {'description': 'WatchConsumedSecretsChanges ' - 'sets up a ' - 'watcher to ' - 'notify of ' - 'changes to ' - 'secret ' - 'revisions for ' - 'the specified ' - 'consumers.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/StringsWatchResults'}}, - 'type': 'object'}, - 'WatchObsolete': {'description': 'WatchObsolete returns a ' - 'watcher for notifying when:\n' - ' - a secret owned by the ' - 'entity is deleted\n' - ' - a secret revision owed ' - 'by the entity no longer\n' - ' has any consumers\n' - '\n' - 'Obsolete revisions results ' - 'are "uri/revno" and deleted\n' - 'secret results are "uri".', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/StringsWatchResult'}}, - 'type': 'object'}, - 'WatchSecretRevisionsExpiryChanges': {'description': 'WatchSecretRevisionsExpiryChanges ' - 'sets up ' - 'a ' - 'watcher ' - 'to ' - 'notify ' - 'of ' - 'changes ' - 'to ' - 'secret ' - 'revision ' - 'expiry ' - 'config.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/SecretTriggerWatchResult'}}, - 'type': 'object'}, - 'WatchSecretsRotationChanges': {'description': 'WatchSecretsRotationChanges ' - 'sets up a ' - 'watcher to ' - 'notify of ' - 'changes to ' - 'secret ' - 'rotation ' - 'config.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/SecretTriggerWatchResult'}}, - 'type': 'object'}}, - 'type': 'object'} - - - @ReturnMapping(StringResults) - async def CreateSecretURIs(self, count=None): - ''' - CreateSecretURIs creates new secret URIs. - - count : int - Returns -> StringResults - ''' - if count is not None and not isinstance(count, int): - raise Exception("Expected count to be a int, received: {}".format(type(count))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='SecretsManager', - request='CreateSecretURIs', - version=1, - params=_params) - _params['count'] = count - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringResults) - async def CreateSecrets(self, args=None): - ''' - CreateSecrets creates new secrets. - - args : typing.Sequence[~CreateSecretArg] - Returns -> StringResults - ''' - if args is not None and not isinstance(args, (bytes, str, list)): - raise Exception("Expected args to be a Sequence, received: {}".format(type(args))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='SecretsManager', - request='CreateSecrets', - version=1, - params=_params) - _params['args'] = args - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(SecretConsumerInfoResults) - async def GetConsumerSecretsRevisionInfo(self, consumer_tag=None, uris=None): - ''' - GetConsumerSecretsRevisionInfo returns the latest secret revisions for the specified secrets. - This facade method is used for remote watcher to get the latest secret revisions and labels for a secret changed hook. - - consumer_tag : str - uris : typing.Sequence[str] - Returns -> SecretConsumerInfoResults - ''' - if consumer_tag is not None and not isinstance(consumer_tag, (bytes, str)): - raise Exception("Expected consumer_tag to be a str, received: {}".format(type(consumer_tag))) - - if uris is not None and not isinstance(uris, (bytes, str, list)): - raise Exception("Expected uris to be a Sequence, received: {}".format(type(uris))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='SecretsManager', - request='GetConsumerSecretsRevisionInfo', - version=1, - params=_params) - _params['consumer-tag'] = consumer_tag - _params['uris'] = uris - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(SecretBackendConfigResults) - async def GetSecretBackendConfig(self): - ''' - GetSecretBackendConfig gets the config needed to create a client to secret backends. - - - Returns -> SecretBackendConfigResults - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='SecretsManager', - request='GetSecretBackendConfig', - version=1, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(SecretContentResults) - async def GetSecretContentInfo(self, args=None): - ''' - GetSecretContentInfo returns the secret values for the specified secrets. - - args : typing.Sequence[~GetSecretContentArg] - Returns -> SecretContentResults - ''' - if args is not None and not isinstance(args, (bytes, str, list)): - raise Exception("Expected args to be a Sequence, received: {}".format(type(args))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='SecretsManager', - request='GetSecretContentInfo', - version=1, - params=_params) - _params['args'] = args - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ListSecretResults) - async def GetSecretMetadata(self): - ''' - GetSecretMetadata returns metadata for the caller's secrets. - - - Returns -> ListSecretResults - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='SecretsManager', - request='GetSecretMetadata', - version=1, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(SecretContentResults) - async def GetSecretRevisionContentInfo(self, pending_delete=None, revisions=None, uri=None): - ''' - GetSecretRevisionContentInfo returns the secret values for the specified secret revisions. - - pending_delete : bool - revisions : typing.Sequence[int] - uri : str - Returns -> SecretContentResults - ''' - if pending_delete is not None and not isinstance(pending_delete, bool): - raise Exception("Expected pending_delete to be a bool, received: {}".format(type(pending_delete))) - - if revisions is not None and not isinstance(revisions, (bytes, str, list)): - raise Exception("Expected revisions to be a Sequence, received: {}".format(type(revisions))) - - if uri is not None and not isinstance(uri, (bytes, str)): - raise Exception("Expected uri to be a str, received: {}".format(type(uri))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='SecretsManager', - request='GetSecretRevisionContentInfo', - version=1, - params=_params) - _params['pending-delete'] = pending_delete - _params['revisions'] = revisions - _params['uri'] = uri - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(SecretBackendConfig) - async def GetSecretStoreConfig(self): - ''' - GetSecretStoreConfig is for 3.0.x agents. - TODO(wallyworld) - remove when we auto upgrade migrated models. - - - Returns -> SecretBackendConfig - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='SecretsManager', - request='GetSecretStoreConfig', - version=1, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def RemoveSecrets(self, args=None): - ''' - RemoveSecrets removes the specified secrets. - - args : typing.Sequence[~DeleteSecretArg] - Returns -> ErrorResults - ''' - if args is not None and not isinstance(args, (bytes, str, list)): - raise Exception("Expected args to be a Sequence, received: {}".format(type(args))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='SecretsManager', - request='RemoveSecrets', - version=1, - params=_params) - _params['args'] = args - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def SecretsGrant(self, args=None): - ''' - SecretsGrant grants access to a secret for the specified subjects. - - args : typing.Sequence[~GrantRevokeSecretArg] - Returns -> ErrorResults - ''' - if args is not None and not isinstance(args, (bytes, str, list)): - raise Exception("Expected args to be a Sequence, received: {}".format(type(args))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='SecretsManager', - request='SecretsGrant', - version=1, - params=_params) - _params['args'] = args - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def SecretsRevoke(self, args=None): - ''' - SecretsRevoke revokes access to a secret for the specified subjects. - - args : typing.Sequence[~GrantRevokeSecretArg] - Returns -> ErrorResults - ''' - if args is not None and not isinstance(args, (bytes, str, list)): - raise Exception("Expected args to be a Sequence, received: {}".format(type(args))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='SecretsManager', - request='SecretsRevoke', - version=1, - params=_params) - _params['args'] = args - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def SecretsRotated(self, args=None): - ''' - SecretsRotated records when secrets were last rotated. - - args : typing.Sequence[~SecretRotatedArg] - Returns -> ErrorResults - ''' - if args is not None and not isinstance(args, (bytes, str, list)): - raise Exception("Expected args to be a Sequence, received: {}".format(type(args))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='SecretsManager', - request='SecretsRotated', - version=1, - params=_params) - _params['args'] = args - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def UpdateSecrets(self, args=None): - ''' - UpdateSecrets updates the specified secrets. - - args : typing.Sequence[~UpdateSecretArg] - Returns -> ErrorResults - ''' - if args is not None and not isinstance(args, (bytes, str, list)): - raise Exception("Expected args to be a Sequence, received: {}".format(type(args))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='SecretsManager', - request='UpdateSecrets', - version=1, - params=_params) - _params['args'] = args - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringsWatchResults) - async def WatchConsumedSecretsChanges(self, entities=None): - ''' - WatchConsumedSecretsChanges sets up a watcher to notify of changes to secret revisions for the specified consumers. - - entities : typing.Sequence[~Entity] - Returns -> StringsWatchResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='SecretsManager', - request='WatchConsumedSecretsChanges', - version=1, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringsWatchResult) - async def WatchObsolete(self, entities=None): - ''' - WatchObsolete returns a watcher for notifying when: - - a secret owned by the entity is deleted - - a secret revision owed by the entity no longer - has any consumers - - Obsolete revisions results are "uri/revno" and deleted - secret results are "uri". - - entities : typing.Sequence[~Entity] - Returns -> StringsWatchResult - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='SecretsManager', - request='WatchObsolete', - version=1, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(SecretTriggerWatchResult) - async def WatchSecretRevisionsExpiryChanges(self, entities=None): - ''' - WatchSecretRevisionsExpiryChanges sets up a watcher to notify of changes to secret revision expiry config. - - entities : typing.Sequence[~Entity] - Returns -> SecretTriggerWatchResult - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='SecretsManager', - request='WatchSecretRevisionsExpiryChanges', - version=1, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(SecretTriggerWatchResult) - async def WatchSecretsRotationChanges(self, entities=None): - ''' - WatchSecretsRotationChanges sets up a watcher to notify of changes to secret rotation config. - - entities : typing.Sequence[~Entity] - Returns -> SecretTriggerWatchResult - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='SecretsManager', - request='WatchSecretsRotationChanges', - version=1, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - -class SecretsRevisionWatcherFacade(Type): - name = 'SecretsRevisionWatcher' - version = 1 - schema = {'definitions': {'Error': {'additionalProperties': False, - 'properties': {'code': {'type': 'string'}, - 'info': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'message': {'type': 'string'}}, - 'required': ['message', 'code'], - 'type': 'object'}, - 'SecretRevisionChange': {'additionalProperties': False, - 'properties': {'revision': {'type': 'integer'}, - 'uri': {'type': 'string'}}, - 'required': ['uri', 'revision'], - 'type': 'object'}, - 'SecretRevisionWatchResult': {'additionalProperties': False, - 'properties': {'changes': {'items': {'$ref': '#/definitions/SecretRevisionChange'}, - 'type': 'array'}, - 'error': {'$ref': '#/definitions/Error'}, - 'watcher-id': {'type': 'string'}}, - 'required': ['watcher-id', - 'changes'], - 'type': 'object'}}, - 'properties': {'Next': {'description': 'Next returns when a change has ' - 'occurred to an entity of the\n' - 'collection being watched since the ' - 'most recent call to Next\n' - 'or the Watch call that created the ' - 'srvSecretRotationWatcher.', - 'properties': {'Result': {'$ref': '#/definitions/SecretRevisionWatchResult'}}, - 'type': 'object'}, - 'Stop': {'description': 'Stop stops the watcher.', - 'type': 'object'}}, - 'type': 'object'} - - - @ReturnMapping(SecretRevisionWatchResult) - async def Next(self): - ''' - Next returns when a change has occurred to an entity of the - collection being watched since the most recent call to Next - or the Watch call that created the srvSecretRotationWatcher. - - - Returns -> SecretRevisionWatchResult - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='SecretsRevisionWatcher', - request='Next', - version=1, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(None) - async def Stop(self): - ''' - Stop stops the watcher. - - - Returns -> None - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='SecretsRevisionWatcher', - request='Stop', - version=1, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - async def rpc(self, msg): - ''' - Patch rpc method to add Id. - ''' - if not hasattr(self, 'Id'): - raise RuntimeError('Missing "Id" field') - msg['Id'] = id - - from .facade import TypeEncoder - reply = await self.connection.rpc(msg, encoder=TypeEncoder) - return reply - - - -class SecretsTriggerWatcherFacade(Type): - name = 'SecretsTriggerWatcher' - version = 1 - schema = {'definitions': {'Error': {'additionalProperties': False, - 'properties': {'code': {'type': 'string'}, - 'info': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'message': {'type': 'string'}}, - 'required': ['message', 'code'], - 'type': 'object'}, - 'SecretTriggerChange': {'additionalProperties': False, - 'properties': {'next-trigger-time': {'format': 'date-time', - 'type': 'string'}, - 'revision': {'type': 'integer'}, - 'uri': {'type': 'string'}}, - 'required': ['uri', - 'next-trigger-time'], - 'type': 'object'}, - 'SecretTriggerWatchResult': {'additionalProperties': False, - 'properties': {'changes': {'items': {'$ref': '#/definitions/SecretTriggerChange'}, - 'type': 'array'}, - 'error': {'$ref': '#/definitions/Error'}, - 'watcher-id': {'type': 'string'}}, - 'required': ['watcher-id', - 'changes'], - 'type': 'object'}}, - 'properties': {'Next': {'description': 'Next returns when a change has ' - 'occurred to an entity of the\n' - 'collection being watched since the ' - 'most recent call to Next\n' - 'or the Watch call that created the ' - 'srvSecretRotationWatcher.', - 'properties': {'Result': {'$ref': '#/definitions/SecretTriggerWatchResult'}}, - 'type': 'object'}, - 'Stop': {'description': 'Stop stops the watcher.', - 'type': 'object'}}, - 'type': 'object'} - - - @ReturnMapping(SecretTriggerWatchResult) - async def Next(self): - ''' - Next returns when a change has occurred to an entity of the - collection being watched since the most recent call to Next - or the Watch call that created the srvSecretRotationWatcher. - - - Returns -> SecretTriggerWatchResult - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='SecretsTriggerWatcher', - request='Next', - version=1, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(None) - async def Stop(self): - ''' - Stop stops the watcher. - - - Returns -> None - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='SecretsTriggerWatcher', - request='Stop', - version=1, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - async def rpc(self, msg): - ''' - Patch rpc method to add Id. - ''' - if not hasattr(self, 'Id'): - raise RuntimeError('Missing "Id" field') - msg['Id'] = id - - from .facade import TypeEncoder - reply = await self.connection.rpc(msg, encoder=TypeEncoder) - return reply - - - -class StringsWatcherFacade(Type): - name = 'StringsWatcher' - version = 1 - schema = {'definitions': {'Error': {'additionalProperties': False, - 'properties': {'code': {'type': 'string'}, - 'info': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'message': {'type': 'string'}}, - 'required': ['message', 'code'], - 'type': 'object'}, - 'StringsWatchResult': {'additionalProperties': False, - 'properties': {'changes': {'items': {'type': 'string'}, - 'type': 'array'}, - 'error': {'$ref': '#/definitions/Error'}, - 'watcher-id': {'type': 'string'}}, - 'required': ['watcher-id'], - 'type': 'object'}}, - 'properties': {'Next': {'description': 'Next returns when a change has ' - 'occurred to an entity of the\n' - 'collection being watched since the ' - 'most recent call to Next\n' - 'or the Watch call that created the ' - 'srvStringsWatcher.', - 'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}}, - 'type': 'object'}, - 'Stop': {'description': 'Stop stops the watcher.', - 'type': 'object'}}, - 'type': 'object'} - - - @ReturnMapping(StringsWatchResult) - async def Next(self): - ''' - Next returns when a change has occurred to an entity of the - collection being watched since the most recent call to Next - or the Watch call that created the srvStringsWatcher. - - - Returns -> StringsWatchResult - ''' - - # 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): - ''' - Stop stops the watcher. - - - 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 - - - - async def rpc(self, msg): - ''' - Patch rpc method to add Id. - ''' - if not hasattr(self, 'Id'): - raise RuntimeError('Missing "Id" field') - msg['Id'] = id - - from .facade import TypeEncoder - reply = await self.connection.rpc(msg, encoder=TypeEncoder) - return reply - - - -class UndertakerFacade(Type): - name = 'Undertaker' - version = 1 - schema = {'definitions': {'CloudCredential': {'additionalProperties': False, - 'properties': {'attrs': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}, - 'auth-type': {'type': 'string'}, - 'redacted': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'required': ['auth-type'], - 'type': 'object'}, - 'CloudSpec': {'additionalProperties': False, - 'properties': {'cacertificates': {'items': {'type': 'string'}, - 'type': 'array'}, - 'credential': {'$ref': '#/definitions/CloudCredential'}, - 'endpoint': {'type': 'string'}, - 'identity-endpoint': {'type': 'string'}, - 'is-controller-cloud': {'type': 'boolean'}, - 'name': {'type': 'string'}, - 'region': {'type': 'string'}, - 'skip-tls-verify': {'type': 'boolean'}, - 'storage-endpoint': {'type': 'string'}, - 'type': {'type': 'string'}}, - 'required': ['type', 'name'], - 'type': 'object'}, - 'CloudSpecResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'result': {'$ref': '#/definitions/CloudSpec'}}, - 'type': 'object'}, - 'CloudSpecResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/CloudSpecResult'}, - 'type': 'array'}}, - 'type': 'object'}, - 'Entities': {'additionalProperties': False, - 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'}, - 'type': 'array'}}, - 'required': ['entities'], - 'type': 'object'}, - 'Entity': {'additionalProperties': False, - 'properties': {'tag': {'type': 'string'}}, - 'required': ['tag'], - 'type': 'object'}, - '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': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'message': {'type': 'string'}}, - 'required': ['message', 'code'], - 'type': 'object'}, - 'ErrorResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}}, - 'type': 'object'}, - 'ErrorResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'ModelConfigResult': {'additionalProperties': False, - 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}}, - 'required': ['config'], - 'type': 'object'}, - 'ModelTag': {'additionalProperties': False, 'type': 'object'}, - 'NotifyWatchResult': {'additionalProperties': False, - 'properties': {'NotifyWatcherId': {'type': 'string'}, - 'error': {'$ref': '#/definitions/Error'}}, - 'required': ['NotifyWatcherId'], - 'type': 'object'}, - 'NotifyWatchResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'SetStatus': {'additionalProperties': False, - 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'}, - 'type': 'array'}}, - 'required': ['entities'], - 'type': 'object'}, - 'UndertakerModelInfo': {'additionalProperties': False, - 'properties': {'destroy-timeout': {'type': 'integer'}, - 'force-destroyed': {'type': 'boolean'}, - 'global-name': {'type': 'string'}, - 'is-system': {'type': 'boolean'}, - 'life': {'type': 'string'}, - 'name': {'type': 'string'}, - 'uuid': {'type': 'string'}}, - 'required': ['uuid', - 'name', - 'global-name', - 'is-system', - 'life'], - 'type': 'object'}, - 'UndertakerModelInfoResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'result': {'$ref': '#/definitions/UndertakerModelInfo'}}, - 'required': ['result'], - 'type': 'object'}}, - 'properties': {'CloudSpec': {'description': "CloudSpec returns the model's " - 'cloud spec.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/CloudSpecResults'}}, - 'type': 'object'}, - 'GetCloudSpec': {'description': 'GetCloudSpec constructs the ' - 'CloudSpec for a validated and ' - 'authorized model.', - 'properties': {'Params': {'$ref': '#/definitions/ModelTag'}, - 'Result': {'$ref': '#/definitions/CloudSpecResult'}}, - 'type': 'object'}, - 'ModelConfig': {'description': 'ModelConfig returns the ' - "current model's configuration.", - 'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}}, - 'type': 'object'}, - 'ModelInfo': {'description': 'ModelInfo returns information on ' - 'the model needed by the ' - 'undertaker worker.', - 'properties': {'Result': {'$ref': '#/definitions/UndertakerModelInfoResult'}}, - 'type': 'object'}, - 'ProcessDyingModel': {'description': 'ProcessDyingModel checks ' - 'if a dying model has any ' - 'machines or ' - 'applications.\n' - 'If there are none, the ' - "model's life is changed " - 'from dying to dead.', - 'type': 'object'}, - 'RemoveModel': {'description': 'RemoveModel removes any ' - 'records of this model from ' - 'Juju.', - 'type': 'object'}, - 'SetStatus': {'description': 'SetStatus sets the status of ' - 'each given entity.', - 'properties': {'Params': {'$ref': '#/definitions/SetStatus'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'WatchCloudSpecsChanges': {'description': 'WatchCloudSpecsChanges ' - 'returns a watcher ' - 'for cloud spec ' - 'changes.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/NotifyWatchResults'}}, - 'type': 'object'}, - 'WatchForModelConfigChanges': {'description': 'WatchForModelConfigChanges ' - 'returns a ' - 'NotifyWatcher ' - 'that observes\n' - 'changes to the ' - 'model ' - 'configuration.\n' - 'Note that ' - 'although the ' - 'NotifyWatchResult ' - 'contains an ' - 'Error field,\n' - "it's not used " - 'because we are ' - 'only returning ' - 'a single ' - 'watcher,\n' - 'so we use the ' - 'regular error ' - 'return.', - 'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}}, - 'type': 'object'}, - 'WatchModel': {'description': 'WatchModel creates a watcher ' - 'for the current model.', - 'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResults'}}, - 'type': 'object'}, - 'WatchModelResources': {'description': 'WatchModelResources ' - 'creates watchers for ' - 'changes to the ' - 'lifecycle of an\n' - "model's machines and " - 'applications and ' - 'storage.', - 'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResults'}}, - 'type': 'object'}}, - 'type': 'object'} - - - @ReturnMapping(CloudSpecResults) - async def CloudSpec(self, entities=None): - ''' - CloudSpec returns the model's cloud spec. - - entities : typing.Sequence[~Entity] - Returns -> CloudSpecResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Undertaker', - request='CloudSpec', - version=1, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(CloudSpecResult) - async def GetCloudSpec(self): - ''' - GetCloudSpec constructs the CloudSpec for a validated and authorized model. - - - Returns -> CloudSpecResult - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='Undertaker', - request='GetCloudSpec', - version=1, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ModelConfigResult) - async def ModelConfig(self): - ''' - ModelConfig returns the current model's configuration. - - - Returns -> ModelConfigResult - ''' - - # 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): - ''' - ModelInfo returns information on the model needed by the undertaker worker. - - - Returns -> UndertakerModelInfoResult - ''' - - # 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): - ''' - ProcessDyingModel checks if a dying model has any machines or applications. - If there are none, the model's life is changed from dying to dead. - - - 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): - ''' - RemoveModel removes any records of this model from Juju. - - - 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=None): - ''' - SetStatus sets the status of each given entity. - - entities : typing.Sequence[~EntityStatusArgs] - Returns -> ErrorResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # 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(NotifyWatchResults) - async def WatchCloudSpecsChanges(self, entities=None): - ''' - WatchCloudSpecsChanges returns a watcher for cloud spec changes. - - entities : typing.Sequence[~Entity] - Returns -> NotifyWatchResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Undertaker', - request='WatchCloudSpecsChanges', - version=1, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(NotifyWatchResult) - async def WatchForModelConfigChanges(self): - ''' - WatchForModelConfigChanges returns a NotifyWatcher that observes - changes to the model configuration. - Note that although the NotifyWatchResult contains an Error field, - it's not used because we are only returning a single watcher, - so we use the regular error return. - - - Returns -> NotifyWatchResult - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='Undertaker', - request='WatchForModelConfigChanges', - version=1, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(NotifyWatchResults) - async def WatchModel(self): - ''' - WatchModel creates a watcher for the current model. - - - Returns -> NotifyWatchResults - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='Undertaker', - request='WatchModel', - version=1, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(NotifyWatchResults) - async def WatchModelResources(self): - ''' - WatchModelResources creates watchers for changes to the lifecycle of an - model's machines and applications and storage. - - - Returns -> NotifyWatchResults - ''' - - # 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 UnitAssignerFacade(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': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'message': {'type': 'string'}}, - 'required': ['message', 'code'], - 'type': 'object'}, - 'ErrorResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}}, - 'type': 'object'}, - 'ErrorResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - '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'}, - 'watcher-id': {'type': 'string'}}, - 'required': ['watcher-id'], - 'type': 'object'}}, - 'properties': {'AssignUnits': {'description': 'AssignUnits assigns the units ' - 'with the given ids to the ' - 'correct machine. The\n' - 'error results are returned in ' - 'the same order as the given ' - 'entities.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'SetAgentStatus': {'description': 'SetAgentStatus will set ' - 'status for agents of Units ' - 'passed in args, if one\n' - 'of the args is not an Unit ' - 'it will fail.', - 'properties': {'Params': {'$ref': '#/definitions/SetStatus'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'WatchUnitAssignments': {'description': 'WatchUnitAssignments ' - 'returns a strings ' - 'watcher that is ' - 'notified when new ' - 'unit\n' - 'assignments are added ' - 'to the db.', - 'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}}, - 'type': 'object'}}, - 'type': 'object'} - - - @ReturnMapping(ErrorResults) - async def AssignUnits(self, entities=None): - ''' - AssignUnits assigns the units with the given ids to the correct machine. The - error results are returned in the same order as the given entities. - - entities : typing.Sequence[~Entity] - Returns -> ErrorResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # 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=None): - ''' - SetAgentStatus will set status for agents of Units passed in args, if one - of the args is not an Unit it will fail. - - entities : typing.Sequence[~EntityStatusArgs] - Returns -> ErrorResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # 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): - ''' - WatchUnitAssignments returns a strings watcher that is notified when new unit - assignments are added to the db. - - - Returns -> StringsWatchResult - ''' - - # 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 UpgraderFacade(Type): - name = 'Upgrader' - version = 1 - schema = {'definitions': {'Binary': {'additionalProperties': False, - 'properties': {'Arch': {'type': 'string'}, - 'Build': {'type': 'integer'}, - 'Major': {'type': 'integer'}, - 'Minor': {'type': 'integer'}, - 'Number': {'$ref': '#/definitions/Number'}, - 'Patch': {'type': 'integer'}, - 'Release': {'type': 'string'}, - 'Tag': {'type': 'string'}}, - 'required': ['Major', - 'Minor', - 'Tag', - 'Patch', - 'Build', - 'Number', - 'Release', - 'Arch'], - 'type': 'object'}, - 'Entities': {'additionalProperties': False, - 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'}, - 'type': 'array'}}, - 'required': ['entities'], - 'type': 'object'}, - 'EntitiesVersion': {'additionalProperties': False, - 'properties': {'agent-tools': {'items': {'$ref': '#/definitions/EntityVersion'}, - 'type': 'array'}}, - 'required': ['agent-tools'], - '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'}, +class SecretBackendsFacade(Type): + name = 'SecretBackends' + version = 1 + schema = {'definitions': {'AddSecretBackendArg': {'additionalProperties': False, + 'properties': {'SecretBackend': {'$ref': '#/definitions/SecretBackend'}, + 'backend-type': {'type': 'string'}, + 'config': {'patternProperties': {'.*': {'additionalProperties': True, + 'type': 'object'}}, + 'type': 'object'}, + 'id': {'type': 'string'}, + 'name': {'type': 'string'}, + 'token-rotate-interval': {'type': 'integer'}}, + 'required': ['name', + 'backend-type', + 'config', + 'SecretBackend'], + 'type': 'object'}, + 'AddSecretBackendArgs': {'additionalProperties': False, + 'properties': {'args': {'items': {'$ref': '#/definitions/AddSecretBackendArg'}, + 'type': 'array'}}, + 'required': ['args'], + 'type': 'object'}, 'Error': {'additionalProperties': False, 'properties': {'code': {'type': 'string'}, 'info': {'patternProperties': {'.*': {'additionalProperties': True, @@ -12162,372 +794,102 @@ class UpgraderFacade(Type): 'type': 'array'}}, 'required': ['results'], 'type': 'object'}, - 'NotifyWatchResult': {'additionalProperties': False, - 'properties': {'NotifyWatcherId': {'type': 'string'}, - 'error': {'$ref': '#/definitions/Error'}}, - 'required': ['NotifyWatcherId'], - 'type': 'object'}, - 'NotifyWatchResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - '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': {'error': {'$ref': '#/definitions/Error'}, - 'tools': {'items': {'$ref': '#/definitions/Tools'}, - 'type': 'array'}}, - 'required': ['tools'], - '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'}}, - 'type': 'object'}, - 'VersionResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/VersionResult'}, - 'type': 'array'}}, - 'required': ['results'], - '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=None): - ''' - entities : typing.Sequence[~Entity] - Returns -> VersionResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # 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, agent_tools=None): - ''' - agent_tools : typing.Sequence[~EntityVersion] - Returns -> ErrorResults - ''' - if agent_tools is not None and not isinstance(agent_tools, (bytes, str, list)): - raise Exception("Expected agent_tools to be a Sequence, received: {}".format(type(agent_tools))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Upgrader', - request='SetTools', - version=1, - params=_params) - _params['agent-tools'] = agent_tools - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ToolsResults) - async def Tools(self, entities=None): - ''' - entities : typing.Sequence[~Entity] - Returns -> ToolsResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # 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=None): - ''' - entities : typing.Sequence[~Entity] - Returns -> NotifyWatchResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # 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 UserSecretsDrainFacade(Type): - name = 'UserSecretsDrain' - version = 1 - schema = {'definitions': {'ChangeSecretBackendArg': {'additionalProperties': False, - 'properties': {'content': {'$ref': '#/definitions/SecretContentParams'}, - 'revision': {'type': 'integer'}, - 'uri': {'type': 'string'}}, - 'required': ['uri', 'revision'], + 'ListSecretBackendsArgs': {'additionalProperties': False, + 'properties': {'names': {'items': {'type': 'string'}, + 'type': 'array'}, + 'reveal': {'type': 'boolean'}}, + 'required': ['names', 'reveal'], + 'type': 'object'}, + 'ListSecretBackendsResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/SecretBackendResult'}, + 'type': 'array'}}, + 'required': ['results'], + 'type': 'object'}, + 'RemoveSecretBackendArg': {'additionalProperties': False, + 'properties': {'force': {'type': 'boolean'}, + 'name': {'type': 'string'}}, + 'required': ['name'], 'type': 'object'}, - 'ChangeSecretBackendArgs': {'additionalProperties': False, - 'properties': {'args': {'items': {'$ref': '#/definitions/ChangeSecretBackendArg'}, + 'RemoveSecretBackendArgs': {'additionalProperties': False, + 'properties': {'args': {'items': {'$ref': '#/definitions/RemoveSecretBackendArg'}, 'type': 'array'}}, 'required': ['args'], 'type': 'object'}, - 'Error': {'additionalProperties': False, - 'properties': {'code': {'type': 'string'}, - 'info': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'message': {'type': 'string'}}, - 'required': ['message', 'code'], - 'type': 'object'}, - 'ErrorResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}}, - 'type': 'object'}, - 'ErrorResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'GetSecretContentArg': {'additionalProperties': False, - 'properties': {'label': {'type': 'string'}, - 'peek': {'type': 'boolean'}, - 'refresh': {'type': 'boolean'}, - 'uri': {'type': 'string'}}, - 'required': ['uri'], - 'type': 'object'}, - 'GetSecretContentArgs': {'additionalProperties': False, - 'properties': {'args': {'items': {'$ref': '#/definitions/GetSecretContentArg'}, - 'type': 'array'}}, - 'required': ['args'], - 'type': 'object'}, - 'ListSecretResult': {'additionalProperties': False, - 'properties': {'create-time': {'format': 'date-time', - 'type': 'string'}, - 'description': {'type': 'string'}, - 'label': {'type': 'string'}, - 'latest-expire-time': {'format': 'date-time', - 'type': 'string'}, - 'latest-revision': {'type': 'integer'}, - 'next-rotate-time': {'format': 'date-time', - 'type': 'string'}, - 'owner-tag': {'type': 'string'}, - 'revisions': {'items': {'$ref': '#/definitions/SecretRevision'}, - 'type': 'array'}, - 'rotate-policy': {'type': 'string'}, - 'update-time': {'format': 'date-time', - 'type': 'string'}, - 'uri': {'type': 'string'}, - 'value': {'$ref': '#/definitions/SecretValueResult'}, - 'version': {'type': 'integer'}}, - 'required': ['uri', - 'version', - 'owner-tag', - 'latest-revision', - 'create-time', - 'update-time', - 'revisions'], - 'type': 'object'}, - 'ListSecretResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/ListSecretResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'NotifyWatchResult': {'additionalProperties': False, - 'properties': {'NotifyWatcherId': {'type': 'string'}, - 'error': {'$ref': '#/definitions/Error'}}, - 'required': ['NotifyWatcherId'], - 'type': 'object'}, - 'SecretBackendArgs': {'additionalProperties': False, - 'properties': {'backend-ids': {'items': {'type': 'string'}, - 'type': 'array'}, - 'for-drain': {'type': 'boolean'}}, - 'required': ['for-drain', 'backend-ids'], - 'type': 'object'}, - 'SecretBackendConfig': {'additionalProperties': False, - 'properties': {'params': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'type': {'type': 'string'}}, - 'required': ['type'], - 'type': 'object'}, - 'SecretBackendConfigResult': {'additionalProperties': False, - 'properties': {'config': {'$ref': '#/definitions/SecretBackendConfig'}, - 'draining': {'type': 'boolean'}, - 'model-controller': {'type': 'string'}, - 'model-name': {'type': 'string'}, - 'model-uuid': {'type': 'string'}}, - 'required': ['model-controller', - 'model-uuid', - 'model-name', - 'draining'], - 'type': 'object'}, - 'SecretBackendConfigResults': {'additionalProperties': False, - 'properties': {'active-id': {'type': 'string'}, - 'results': {'patternProperties': {'.*': {'$ref': '#/definitions/SecretBackendConfigResult'}}, - 'type': 'object'}}, - 'required': ['active-id'], - 'type': 'object'}, - 'SecretContentParams': {'additionalProperties': False, - 'properties': {'data': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}, - 'value-ref': {'$ref': '#/definitions/SecretValueRef'}}, - 'type': 'object'}, - 'SecretContentResult': {'additionalProperties': False, - 'properties': {'backend-config': {'$ref': '#/definitions/SecretBackendConfigResult'}, - 'content': {'$ref': '#/definitions/SecretContentParams'}, - 'error': {'$ref': '#/definitions/Error'}, - 'latest-revision': {'type': 'integer'}}, - 'required': ['content'], + 'SecretBackend': {'additionalProperties': False, + 'properties': {'backend-type': {'type': 'string'}, + 'config': {'patternProperties': {'.*': {'additionalProperties': True, + 'type': 'object'}}, + 'type': 'object'}, + 'name': {'type': 'string'}, + 'token-rotate-interval': {'type': 'integer'}}, + 'required': ['name', + 'backend-type', + 'config'], + 'type': 'object'}, + 'SecretBackendResult': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}, + 'id': {'type': 'string'}, + 'message': {'type': 'string'}, + 'num-secrets': {'type': 'integer'}, + 'result': {'$ref': '#/definitions/SecretBackend'}, + 'status': {'type': 'string'}}, + 'required': ['result', + 'id', + 'num-secrets', + 'status'], 'type': 'object'}, - 'SecretContentResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/SecretContentResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'SecretRevision': {'additionalProperties': False, - 'properties': {'backend-name': {'type': 'string'}, - 'create-time': {'format': 'date-time', - 'type': 'string'}, - 'expire-time': {'format': 'date-time', - 'type': 'string'}, - 'revision': {'type': 'integer'}, - 'update-time': {'format': 'date-time', - 'type': 'string'}, - 'value-ref': {'$ref': '#/definitions/SecretValueRef'}}, - 'required': ['revision'], - 'type': 'object'}, - 'SecretRevisionArg': {'additionalProperties': False, - 'properties': {'pending-delete': {'type': 'boolean'}, - 'revisions': {'items': {'type': 'integer'}, - 'type': 'array'}, - 'uri': {'type': 'string'}}, - 'required': ['uri', - 'revisions', - 'pending-delete'], - 'type': 'object'}, - 'SecretValueRef': {'additionalProperties': False, - 'properties': {'backend-id': {'type': 'string'}, - 'revision-id': {'type': 'string'}}, - 'required': ['backend-id', 'revision-id'], - 'type': 'object'}, - 'SecretValueResult': {'additionalProperties': False, - 'properties': {'data': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}, - 'error': {'$ref': '#/definitions/Error'}}, - 'type': 'object'}}, - 'properties': {'ChangeSecretBackend': {'description': 'ChangeSecretBackend ' - 'updates the backend ' - 'for the specified ' - 'secret after migration ' - 'done.', - 'properties': {'Params': {'$ref': '#/definitions/ChangeSecretBackendArgs'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'GetSecretBackendConfigs': {'description': 'GetSecretBackendConfigs ' - 'gets the config ' - 'needed to create a ' - 'client to secret ' - 'backends for the ' - 'drain worker.', - 'properties': {'Params': {'$ref': '#/definitions/SecretBackendArgs'}, - 'Result': {'$ref': '#/definitions/SecretBackendConfigResults'}}, + 'UpdateSecretBackendArg': {'additionalProperties': False, + 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True, + 'type': 'object'}}, + 'type': 'object'}, + 'force': {'type': 'boolean'}, + 'name': {'type': 'string'}, + 'name-change': {'type': 'string'}, + 'reset': {'items': {'type': 'string'}, + 'type': 'array'}, + 'token-rotate-interval': {'type': 'integer'}}, + 'required': ['name', + 'token-rotate-interval', + 'config', + 'reset'], 'type': 'object'}, - 'GetSecretContentInfo': {'description': 'GetSecretContentInfo ' - 'returns the secret ' - 'values for the ' - 'specified secrets.', - 'properties': {'Params': {'$ref': '#/definitions/GetSecretContentArgs'}, - 'Result': {'$ref': '#/definitions/SecretContentResults'}}, - 'type': 'object'}, - 'GetSecretRevisionContentInfo': {'description': 'GetSecretRevisionContentInfo ' - 'returns the ' - 'secret values ' - 'for the ' - 'specified ' - 'secret ' - 'revisions.', - 'properties': {'Params': {'$ref': '#/definitions/SecretRevisionArg'}, - 'Result': {'$ref': '#/definitions/SecretContentResults'}}, - 'type': 'object'}, - 'GetSecretsToDrain': {'description': 'GetSecretsToDrain ' - 'returns metadata for the ' - 'secrets that need to be ' - 'drained.', - 'properties': {'Result': {'$ref': '#/definitions/ListSecretResults'}}, + 'UpdateSecretBackendArgs': {'additionalProperties': False, + 'properties': {'args': {'items': {'$ref': '#/definitions/UpdateSecretBackendArg'}, + 'type': 'array'}}, + 'required': ['args'], + 'type': 'object'}}, + 'properties': {'AddSecretBackends': {'description': 'AddSecretBackends adds ' + 'new secret backends.', + 'properties': {'Params': {'$ref': '#/definitions/AddSecretBackendArgs'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, 'type': 'object'}, - 'WatchSecretBackendChanged': {'description': 'WatchSecretBackendChanged ' - 'sets up a ' - 'watcher to ' - 'notify of ' - 'changes to the ' - 'secret backend.', - 'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}}, - 'type': 'object'}}, + 'ListSecretBackends': {'description': 'ListSecretBackends ' + 'lists available secret ' + 'backends.', + 'properties': {'Params': {'$ref': '#/definitions/ListSecretBackendsArgs'}, + 'Result': {'$ref': '#/definitions/ListSecretBackendsResults'}}, + 'type': 'object'}, + 'RemoveSecretBackends': {'description': 'RemoveSecretBackends ' + 'removes secret ' + 'backends.', + 'properties': {'Params': {'$ref': '#/definitions/RemoveSecretBackendArgs'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}, + 'UpdateSecretBackends': {'description': 'UpdateSecretBackends ' + 'updates secret ' + 'backends.', + 'properties': {'Params': {'$ref': '#/definitions/UpdateSecretBackendArgs'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}}, 'type': 'object'} @ReturnMapping(ErrorResults) - async def ChangeSecretBackend(self, args=None): + async def AddSecretBackends(self, args=None): ''' - ChangeSecretBackend updates the backend for the specified secret after migration done. + AddSecretBackends adds new secret backends. - args : typing.Sequence[~ChangeSecretBackendArg] + args : typing.Sequence[~AddSecretBackendArg] Returns -> ErrorResults ''' if args is not None and not isinstance(args, (bytes, str, list)): @@ -12535,8 +897,8 @@ async def ChangeSecretBackend(self, args=None): # map input types to rpc msg _params = dict() - msg = dict(type='UserSecretsDrain', - request='ChangeSecretBackend', + msg = dict(type='SecretBackends', + request='AddSecretBackends', version=1, params=_params) _params['args'] = args @@ -12545,49 +907,49 @@ async def ChangeSecretBackend(self, args=None): - @ReturnMapping(SecretBackendConfigResults) - async def GetSecretBackendConfigs(self, backend_ids=None, for_drain=None): + @ReturnMapping(ListSecretBackendsResults) + async def ListSecretBackends(self, names=None, reveal=None): ''' - GetSecretBackendConfigs gets the config needed to create a client to secret backends for the drain worker. + ListSecretBackends lists available secret backends. - backend_ids : typing.Sequence[str] - for_drain : bool - Returns -> SecretBackendConfigResults + names : typing.Sequence[str] + reveal : bool + Returns -> ListSecretBackendsResults ''' - if backend_ids is not None and not isinstance(backend_ids, (bytes, str, list)): - raise Exception("Expected backend_ids to be a Sequence, received: {}".format(type(backend_ids))) + if names is not None and not isinstance(names, (bytes, str, list)): + raise Exception("Expected names to be a Sequence, received: {}".format(type(names))) - if for_drain is not None and not isinstance(for_drain, bool): - raise Exception("Expected for_drain to be a bool, received: {}".format(type(for_drain))) + if reveal is not None and not isinstance(reveal, bool): + raise Exception("Expected reveal to be a bool, received: {}".format(type(reveal))) # map input types to rpc msg _params = dict() - msg = dict(type='UserSecretsDrain', - request='GetSecretBackendConfigs', + msg = dict(type='SecretBackends', + request='ListSecretBackends', version=1, params=_params) - _params['backend-ids'] = backend_ids - _params['for-drain'] = for_drain + _params['names'] = names + _params['reveal'] = reveal reply = await self.rpc(msg) return reply - @ReturnMapping(SecretContentResults) - async def GetSecretContentInfo(self, args=None): + @ReturnMapping(ErrorResults) + async def RemoveSecretBackends(self, args=None): ''' - GetSecretContentInfo returns the secret values for the specified secrets. + RemoveSecretBackends removes secret backends. - args : typing.Sequence[~GetSecretContentArg] - Returns -> SecretContentResults + args : typing.Sequence[~RemoveSecretBackendArg] + Returns -> ErrorResults ''' if args is not None and not isinstance(args, (bytes, str, list)): raise Exception("Expected args to be a Sequence, received: {}".format(type(args))) # map input types to rpc msg _params = dict() - msg = dict(type='UserSecretsDrain', - request='GetSecretContentInfo', + msg = dict(type='SecretBackends', + request='RemoveSecretBackends', version=1, params=_params) _params['args'] = args @@ -12596,145 +958,12 @@ async def GetSecretContentInfo(self, args=None): - @ReturnMapping(SecretContentResults) - async def GetSecretRevisionContentInfo(self, pending_delete=None, revisions=None, uri=None): - ''' - GetSecretRevisionContentInfo returns the secret values for the specified secret revisions. - - pending_delete : bool - revisions : typing.Sequence[int] - uri : str - Returns -> SecretContentResults - ''' - if pending_delete is not None and not isinstance(pending_delete, bool): - raise Exception("Expected pending_delete to be a bool, received: {}".format(type(pending_delete))) - - if revisions is not None and not isinstance(revisions, (bytes, str, list)): - raise Exception("Expected revisions to be a Sequence, received: {}".format(type(revisions))) - - if uri is not None and not isinstance(uri, (bytes, str)): - raise Exception("Expected uri to be a str, received: {}".format(type(uri))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='UserSecretsDrain', - request='GetSecretRevisionContentInfo', - version=1, - params=_params) - _params['pending-delete'] = pending_delete - _params['revisions'] = revisions - _params['uri'] = uri - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ListSecretResults) - async def GetSecretsToDrain(self): - ''' - GetSecretsToDrain returns metadata for the secrets that need to be drained. - - - Returns -> ListSecretResults - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='UserSecretsDrain', - request='GetSecretsToDrain', - version=1, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(NotifyWatchResult) - async def WatchSecretBackendChanged(self): - ''' - WatchSecretBackendChanged sets up a watcher to notify of changes to the secret backend. - - - Returns -> NotifyWatchResult - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='UserSecretsDrain', - request='WatchSecretBackendChanged', - version=1, - params=_params) - - reply = await self.rpc(msg) - return reply - - - -class UserSecretsManagerFacade(Type): - name = 'UserSecretsManager' - version = 1 - schema = {'definitions': {'DeleteSecretArg': {'additionalProperties': False, - 'properties': {'label': {'type': 'string'}, - 'revisions': {'items': {'type': 'integer'}, - 'type': 'array'}, - 'uri': {'type': 'string'}}, - 'required': ['uri', 'label'], - 'type': 'object'}, - 'DeleteSecretArgs': {'additionalProperties': False, - 'properties': {'args': {'items': {'$ref': '#/definitions/DeleteSecretArg'}, - 'type': 'array'}}, - 'required': ['args'], - 'type': 'object'}, - 'Error': {'additionalProperties': False, - 'properties': {'code': {'type': 'string'}, - 'info': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'message': {'type': 'string'}}, - 'required': ['message', 'code'], - 'type': 'object'}, - 'ErrorResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}}, - 'type': 'object'}, - 'ErrorResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'StringsWatchResult': {'additionalProperties': False, - 'properties': {'changes': {'items': {'type': 'string'}, - 'type': 'array'}, - 'error': {'$ref': '#/definitions/Error'}, - 'watcher-id': {'type': 'string'}}, - 'required': ['watcher-id'], - 'type': 'object'}}, - 'properties': {'DeleteRevisions': {'description': 'DeleteRevisions deletes ' - 'the specified revisions of ' - 'the specified secret.', - 'properties': {'Params': {'$ref': '#/definitions/DeleteSecretArgs'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'WatchRevisionsToPrune': {'description': 'WatchRevisionsToPrune ' - 'returns a watcher ' - 'for notifying when:\n' - ' - a secret ' - 'revision owned by ' - 'the model no longer\n' - ' has any ' - 'consumers and should ' - 'be pruned.', - 'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}}, - 'type': 'object'}}, - 'type': 'object'} - - @ReturnMapping(ErrorResults) - async def DeleteRevisions(self, args=None): + async def UpdateSecretBackends(self, args=None): ''' - DeleteRevisions deletes the specified revisions of the specified secret. + UpdateSecretBackends updates secret backends. - args : typing.Sequence[~DeleteSecretArg] + args : typing.Sequence[~UpdateSecretBackendArg] Returns -> ErrorResults ''' if args is not None and not isinstance(args, (bytes, str, list)): @@ -12742,8 +971,8 @@ async def DeleteRevisions(self, args=None): # map input types to rpc msg _params = dict() - msg = dict(type='UserSecretsManager', - request='DeleteRevisions', + msg = dict(type='SecretBackends', + request='UpdateSecretBackends', version=1, params=_params) _params['args'] = args @@ -12752,31 +981,8 @@ async def DeleteRevisions(self, args=None): - @ReturnMapping(StringsWatchResult) - async def WatchRevisionsToPrune(self): - ''' - WatchRevisionsToPrune returns a watcher for notifying when: - - a secret revision owned by the model no longer - has any consumers and should be pruned. - - - Returns -> StringsWatchResult - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='UserSecretsManager', - request='WatchRevisionsToPrune', - version=1, - params=_params) - - reply = await self.rpc(msg) - return reply - - - -class VolumeAttachmentPlansWatcherFacade(Type): - name = 'VolumeAttachmentPlansWatcher' +class SecretsFacade(Type): + name = 'Secrets' version = 1 schema = {'definitions': {'Error': {'additionalProperties': False, 'properties': {'code': {'type': 'string'}, @@ -12786,87 +992,102 @@ class VolumeAttachmentPlansWatcherFacade(Type): 'message': {'type': 'string'}}, 'required': ['message', 'code'], 'type': 'object'}, - 'MachineStorageId': {'additionalProperties': False, - 'properties': {'attachment-tag': {'type': 'string'}, - 'machine-tag': {'type': 'string'}}, - 'required': ['machine-tag', - 'attachment-tag'], + 'ListSecretResult': {'additionalProperties': False, + 'properties': {'create-time': {'format': 'date-time', + 'type': 'string'}, + 'description': {'type': 'string'}, + 'label': {'type': 'string'}, + 'latest-expire-time': {'format': 'date-time', + 'type': 'string'}, + 'latest-revision': {'type': 'integer'}, + 'next-rotate-time': {'format': 'date-time', + 'type': 'string'}, + 'owner-tag': {'type': 'string'}, + 'revisions': {'items': {'$ref': '#/definitions/SecretRevision'}, + 'type': 'array'}, + 'rotate-policy': {'type': 'string'}, + 'update-time': {'format': 'date-time', + 'type': 'string'}, + 'uri': {'type': 'string'}, + 'value': {'$ref': '#/definitions/SecretValueResult'}, + 'version': {'type': 'integer'}}, + 'required': ['uri', + 'version', + 'owner-tag', + 'latest-revision', + 'create-time', + 'update-time', + 'revisions'], 'type': 'object'}, - 'MachineStorageIdsWatchResult': {'additionalProperties': False, - 'properties': {'changes': {'items': {'$ref': '#/definitions/MachineStorageId'}, - 'type': 'array'}, - 'error': {'$ref': '#/definitions/Error'}, - 'watcher-id': {'type': 'string'}}, - 'required': ['watcher-id', - 'changes'], - 'type': 'object'}}, - 'properties': {'Next': {'description': 'Next returns when a change has ' - 'occurred to an entity of the\n' - 'collection being watched since the ' - 'most recent call to Next\n' - 'or the Watch call that created the ' - 'srvMachineStorageIdsWatcher.', - 'properties': {'Result': {'$ref': '#/definitions/MachineStorageIdsWatchResult'}}, - 'type': 'object'}, - 'Stop': {'description': 'Stop stops the watcher.', - 'type': 'object'}}, + 'ListSecretResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/ListSecretResult'}, + 'type': 'array'}}, + 'required': ['results'], + 'type': 'object'}, + 'ListSecretsArgs': {'additionalProperties': False, + 'properties': {'filter': {'$ref': '#/definitions/SecretsFilter'}, + 'show-secrets': {'type': 'boolean'}}, + 'required': ['show-secrets', 'filter'], + 'type': 'object'}, + 'SecretRevision': {'additionalProperties': False, + 'properties': {'backend-name': {'type': 'string'}, + 'create-time': {'format': 'date-time', + 'type': 'string'}, + 'expire-time': {'format': 'date-time', + 'type': 'string'}, + 'revision': {'type': 'integer'}, + 'update-time': {'format': 'date-time', + 'type': 'string'}, + 'value-ref': {'$ref': '#/definitions/SecretValueRef'}}, + 'required': ['revision'], + 'type': 'object'}, + 'SecretValueRef': {'additionalProperties': False, + 'properties': {'backend-id': {'type': 'string'}, + 'revision-id': {'type': 'string'}}, + 'required': ['backend-id', 'revision-id'], + 'type': 'object'}, + 'SecretValueResult': {'additionalProperties': False, + 'properties': {'data': {'patternProperties': {'.*': {'type': 'string'}}, + 'type': 'object'}, + 'error': {'$ref': '#/definitions/Error'}}, + 'type': 'object'}, + 'SecretsFilter': {'additionalProperties': False, + 'properties': {'owner-tag': {'type': 'string'}, + 'revision': {'type': 'integer'}, + 'uri': {'type': 'string'}}, + 'type': 'object'}}, + 'properties': {'ListSecrets': {'description': 'ListSecrets lists available ' + 'secrets.', + 'properties': {'Params': {'$ref': '#/definitions/ListSecretsArgs'}, + 'Result': {'$ref': '#/definitions/ListSecretResults'}}, + 'type': 'object'}}, 'type': 'object'} - @ReturnMapping(MachineStorageIdsWatchResult) - async def Next(self): - ''' - Next returns when a change has occurred to an entity of the - collection being watched since the most recent call to Next - or the Watch call that created the srvMachineStorageIdsWatcher. - - - Returns -> MachineStorageIdsWatchResult + @ReturnMapping(ListSecretResults) + async def ListSecrets(self, filter_=None, show_secrets=None): ''' + ListSecrets lists available secrets. - # map input types to rpc msg - _params = dict() - msg = dict(type='VolumeAttachmentPlansWatcher', - request='Next', - version=1, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(None) - async def Stop(self): + filter_ : SecretsFilter + show_secrets : bool + Returns -> ListSecretResults ''' - Stop stops the watcher. - + if filter_ is not None and not isinstance(filter_, (dict, SecretsFilter)): + raise Exception("Expected filter_ to be a SecretsFilter, received: {}".format(type(filter_))) - Returns -> None - ''' + if show_secrets is not None and not isinstance(show_secrets, bool): + raise Exception("Expected show_secrets to be a bool, received: {}".format(type(show_secrets))) # map input types to rpc msg _params = dict() - msg = dict(type='VolumeAttachmentPlansWatcher', - request='Stop', + msg = dict(type='Secrets', + request='ListSecrets', version=1, params=_params) - + _params['filter'] = filter_ + _params['show-secrets'] = show_secrets reply = await self.rpc(msg) return reply - - async def rpc(self, msg): - ''' - Patch rpc method to add Id. - ''' - if not hasattr(self, 'Id'): - raise RuntimeError('Missing "Id" field') - msg['Id'] = id - - from .facade import TypeEncoder - reply = await self.connection.rpc(msg, encoder=TypeEncoder) - return reply - - diff --git a/juju/client/_client11.py b/juju/client/_client11.py index bdc5317b..a3c7ea0e 100644 --- a/juju/client/_client11.py +++ b/juju/client/_client11.py @@ -1122,2300 +1122,3 @@ async def WatchModelSummaries(self): return reply - -class ProvisionerFacade(Type): - name = 'Provisioner' - version = 11 - schema = {'definitions': {'APIHostPortsResult': {'additionalProperties': False, - 'properties': {'servers': {'items': {'items': {'$ref': '#/definitions/HostPort'}, - 'type': 'array'}, - 'type': 'array'}}, - 'required': ['servers'], - 'type': 'object'}, - 'Address': {'additionalProperties': False, - 'properties': {'cidr': {'type': 'string'}, - 'config-type': {'type': 'string'}, - 'is-secondary': {'type': 'boolean'}, - 'scope': {'type': 'string'}, - 'space-id': {'type': 'string'}, - 'space-name': {'type': 'string'}, - 'type': {'type': 'string'}, - 'value': {'type': 'string'}}, - 'required': ['value', 'type', 'scope'], - 'type': 'object'}, - 'Base': {'additionalProperties': False, - 'properties': {'channel': {'type': 'string'}, - 'name': {'type': 'string'}}, - 'required': ['name', 'channel'], - 'type': 'object'}, - 'Binary': {'additionalProperties': False, - 'properties': {'Arch': {'type': 'string'}, - 'Build': {'type': 'integer'}, - 'Major': {'type': 'integer'}, - 'Minor': {'type': 'integer'}, - 'Number': {'$ref': '#/definitions/Number'}, - 'Patch': {'type': 'integer'}, - 'Release': {'type': 'string'}, - 'Tag': {'type': 'string'}}, - 'required': ['Major', - 'Minor', - 'Tag', - 'Patch', - 'Build', - 'Number', - 'Release', - 'Arch'], - 'type': 'object'}, - 'BoolResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'result': {'type': 'boolean'}}, - 'required': ['result'], - 'type': 'object'}, - 'BoolResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/BoolResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'BytesResult': {'additionalProperties': False, - 'properties': {'result': {'items': {'type': 'integer'}, - 'type': 'array'}}, - 'required': ['result'], - 'type': 'object'}, - 'CharmLXDProfile': {'additionalProperties': False, - 'properties': {'config': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}, - 'description': {'type': 'string'}, - 'devices': {'patternProperties': {'.*': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}}, - 'type': 'object'}}, - 'required': ['config', - 'description', - 'devices'], - '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'}, - 'source': {'type': 'string'}, - 'stream': {'type': 'string'}, - 'version': {'type': 'string'}, - 'virt-type': {'type': 'string'}}, - 'required': ['image-id', - 'region', - 'version', - 'arch', - 'source', - 'priority'], - 'type': 'object'}, - 'ConstraintsResult': {'additionalProperties': False, - 'properties': {'constraints': {'$ref': '#/definitions/Value'}, - 'error': {'$ref': '#/definitions/Error'}}, - 'required': ['constraints'], - 'type': 'object'}, - 'ConstraintsResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/ConstraintsResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'ContainerConfig': {'additionalProperties': False, - 'properties': {'UpdateBehavior': {'$ref': '#/definitions/UpdateBehavior'}, - 'apt-mirror': {'type': 'string'}, - 'apt-proxy': {'$ref': '#/definitions/Settings'}, - 'authorized-keys': {'type': 'string'}, - 'cloudinit-userdata': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'container-inherit-properties': {'type': 'string'}, - 'juju-proxy': {'$ref': '#/definitions/Settings'}, - 'legacy-proxy': {'$ref': '#/definitions/Settings'}, - 'provider-type': {'type': 'string'}, - 'snap-proxy': {'$ref': '#/definitions/Settings'}, - 'snap-store-assertions': {'type': 'string'}, - 'snap-store-proxy-id': {'type': 'string'}, - 'snap-store-proxy-url': {'type': 'string'}, - 'ssl-hostname-verification': {'type': 'boolean'}}, - 'required': ['provider-type', - 'authorized-keys', - 'ssl-hostname-verification', - 'legacy-proxy', - 'juju-proxy', - 'apt-proxy', - 'snap-proxy', - 'snap-store-assertions', - 'snap-store-proxy-id', - 'snap-store-proxy-url', - 'UpdateBehavior'], - 'type': 'object'}, - 'ContainerLXDProfile': {'additionalProperties': False, - 'properties': {'name': {'type': 'string'}, - 'profile': {'$ref': '#/definitions/CharmLXDProfile'}}, - 'required': ['profile', 'name'], - 'type': 'object'}, - 'ContainerManagerConfig': {'additionalProperties': False, - 'properties': {'config': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}}, - 'required': ['config'], - 'type': 'object'}, - 'ContainerManagerConfigParams': {'additionalProperties': False, - 'properties': {'type': {'type': 'string'}}, - 'required': ['type'], - 'type': 'object'}, - 'ContainerProfileResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'lxd-profiles': {'items': {'$ref': '#/definitions/ContainerLXDProfile'}, - 'type': 'array'}}, - 'type': 'object'}, - 'ContainerProfileResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/ContainerProfileResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'ControllerAPIInfoResult': {'additionalProperties': False, - 'properties': {'addresses': {'items': {'type': 'string'}, - 'type': 'array'}, - 'cacert': {'type': 'string'}, - 'error': {'$ref': '#/definitions/Error'}}, - 'required': ['addresses', - 'cacert'], - 'type': 'object'}, - 'ControllerAPIInfoResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/ControllerAPIInfoResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'ControllerConfigResult': {'additionalProperties': False, - 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}}, - 'required': ['config'], - 'type': 'object'}, - 'DeviceBridgeInfo': {'additionalProperties': False, - 'properties': {'bridge-name': {'type': 'string'}, - 'host-device-name': {'type': 'string'}, - 'mac-address': {'type': 'string'}}, - 'required': ['host-device-name', - 'bridge-name', - 'mac-address'], - 'type': 'object'}, - 'DistributionGroupResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'result': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'required': ['result'], - 'type': 'object'}, - 'DistributionGroupResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/DistributionGroupResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'Entities': {'additionalProperties': False, - 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'}, - 'type': 'array'}}, - 'required': ['entities'], - 'type': 'object'}, - 'Entity': {'additionalProperties': False, - 'properties': {'tag': {'type': 'string'}}, - 'required': ['tag'], - 'type': 'object'}, - 'EntityPassword': {'additionalProperties': False, - 'properties': {'password': {'type': 'string'}, - 'tag': {'type': 'string'}}, - 'required': ['tag', 'password'], - 'type': 'object'}, - 'EntityPasswords': {'additionalProperties': False, - 'properties': {'changes': {'items': {'$ref': '#/definitions/EntityPassword'}, - 'type': 'array'}}, - 'required': ['changes'], - 'type': 'object'}, - 'EntityStatusArgs': {'additionalProperties': False, - 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'info': {'type': 'string'}, - 'status': {'type': 'string'}, - 'tag': {'type': 'string'}}, - 'required': ['tag', - 'status', - 'info', - 'data'], - 'type': 'object'}, - 'Error': {'additionalProperties': False, - 'properties': {'code': {'type': 'string'}, - 'info': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'message': {'type': 'string'}}, - 'required': ['message', 'code'], - 'type': 'object'}, - 'ErrorResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}}, - 'type': 'object'}, - 'ErrorResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'FindToolsParams': {'additionalProperties': False, - 'properties': {'agentstream': {'type': 'string'}, - 'arch': {'type': 'string'}, - 'major': {'type': 'integer'}, - 'number': {'$ref': '#/definitions/Number'}, - 'os-type': {'type': 'string'}}, - 'required': ['number', - 'major', - 'arch', - 'os-type', - 'agentstream'], - 'type': 'object'}, - 'FindToolsResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'list': {'items': {'$ref': '#/definitions/Tools'}, - 'type': 'array'}}, - 'required': ['list'], - 'type': 'object'}, - 'HardwareCharacteristics': {'additionalProperties': False, - 'properties': {'arch': {'type': 'string'}, - 'availability-zone': {'type': 'string'}, - 'cpu-cores': {'type': 'integer'}, - 'cpu-power': {'type': 'integer'}, - 'mem': {'type': 'integer'}, - 'root-disk': {'type': 'integer'}, - 'root-disk-source': {'type': 'string'}, - 'tags': {'items': {'type': 'string'}, - 'type': 'array'}, - 'virt-type': {'type': 'string'}}, - 'type': 'object'}, - 'HostNetworkChange': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'new-bridges': {'items': {'$ref': '#/definitions/DeviceBridgeInfo'}, - 'type': 'array'}, - 'reconfigure-delay': {'type': 'integer'}}, - 'required': ['new-bridges', - 'reconfigure-delay'], - 'type': 'object'}, - 'HostNetworkChangeResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/HostNetworkChange'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'HostPort': {'additionalProperties': False, - 'properties': {'Address': {'$ref': '#/definitions/Address'}, - 'cidr': {'type': 'string'}, - 'config-type': {'type': 'string'}, - 'is-secondary': {'type': 'boolean'}, - 'port': {'type': 'integer'}, - 'scope': {'type': 'string'}, - 'space-id': {'type': 'string'}, - 'space-name': {'type': 'string'}, - 'type': {'type': 'string'}, - 'value': {'type': 'string'}}, - 'required': ['value', - 'type', - 'scope', - 'Address', - 'port'], - 'type': 'object'}, - 'InstanceInfo': {'additionalProperties': False, - 'properties': {'characteristics': {'$ref': '#/definitions/HardwareCharacteristics'}, - 'charm-profiles': {'items': {'type': 'string'}, - 'type': 'array'}, - 'display-name': {'type': 'string'}, - 'instance-id': {'type': 'string'}, - 'network-config': {'items': {'$ref': '#/definitions/NetworkConfig'}, - 'type': 'array'}, - 'nonce': {'type': 'string'}, - 'tag': {'type': 'string'}, - 'volume-attachments': {'patternProperties': {'.*': {'$ref': '#/definitions/VolumeAttachmentInfo'}}, - 'type': 'object'}, - 'volumes': {'items': {'$ref': '#/definitions/Volume'}, - 'type': 'array'}}, - 'required': ['tag', - 'instance-id', - 'display-name', - 'nonce', - 'characteristics', - 'volumes', - 'volume-attachments', - 'network-config', - 'charm-profiles'], - 'type': 'object'}, - 'InstancesInfo': {'additionalProperties': False, - 'properties': {'machines': {'items': {'$ref': '#/definitions/InstanceInfo'}, - 'type': 'array'}}, - 'required': ['machines'], - 'type': 'object'}, - 'LifeResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'life': {'type': 'string'}}, - 'required': ['life'], - 'type': 'object'}, - 'LifeResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'MachineContainerResult': {'additionalProperties': False, - 'properties': {'container-types': {'items': {'type': 'string'}, - 'type': 'array'}, - 'determined': {'type': 'boolean'}, - 'error': {'$ref': '#/definitions/Error'}}, - 'required': ['container-types', - 'determined'], - 'type': 'object'}, - 'MachineContainerResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/MachineContainerResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'MachineContainers': {'additionalProperties': False, - 'properties': {'container-types': {'items': {'type': 'string'}, - 'type': 'array'}, - 'machine-tag': {'type': 'string'}}, - 'required': ['machine-tag', - 'container-types'], - 'type': 'object'}, - 'MachineContainersParams': {'additionalProperties': False, - 'properties': {'params': {'items': {'$ref': '#/definitions/MachineContainers'}, - 'type': 'array'}}, - 'required': ['params'], - 'type': 'object'}, - 'MachineNetworkConfigResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'info': {'items': {'$ref': '#/definitions/NetworkConfig'}, - 'type': 'array'}}, - 'required': ['info'], - 'type': 'object'}, - 'MachineNetworkConfigResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/MachineNetworkConfigResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'ModelConfigResult': {'additionalProperties': False, - 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}}, - 'required': ['config'], - 'type': 'object'}, - 'NetworkConfig': {'additionalProperties': False, - 'properties': {'address': {'type': 'string'}, - 'addresses': {'items': {'$ref': '#/definitions/Address'}, - 'type': 'array'}, - 'cidr': {'type': 'string'}, - 'config-type': {'type': 'string'}, - 'device-index': {'type': 'integer'}, - 'disabled': {'type': 'boolean'}, - 'dns-search-domains': {'items': {'type': 'string'}, - 'type': 'array'}, - 'dns-servers': {'items': {'type': 'string'}, - 'type': 'array'}, - 'gateway-address': {'type': 'string'}, - 'interface-name': {'type': 'string'}, - 'interface-type': {'type': 'string'}, - 'is-default-gateway': {'type': 'boolean'}, - 'mac-address': {'type': 'string'}, - 'mtu': {'type': 'integer'}, - 'no-auto-start': {'type': 'boolean'}, - 'origin': {'type': 'string'}, - 'parent-interface-name': {'type': 'string'}, - 'provider-address-id': {'type': 'string'}, - 'provider-id': {'type': 'string'}, - 'provider-network-id': {'type': 'string'}, - 'provider-space-id': {'type': 'string'}, - 'provider-subnet-id': {'type': 'string'}, - 'provider-vlan-id': {'type': 'string'}, - 'routes': {'items': {'$ref': '#/definitions/NetworkRoute'}, - 'type': 'array'}, - 'shadow-addresses': {'items': {'$ref': '#/definitions/Address'}, - 'type': 'array'}, - 'virtual-port-type': {'type': 'string'}, - 'vlan-tag': {'type': 'integer'}}, - 'required': ['device-index', - 'mac-address', - 'cidr', - 'mtu', - 'provider-id', - 'provider-network-id', - 'provider-subnet-id', - 'provider-space-id', - 'provider-address-id', - 'provider-vlan-id', - 'vlan-tag', - 'interface-name', - 'parent-interface-name', - 'interface-type', - 'disabled'], - 'type': 'object'}, - 'NetworkRoute': {'additionalProperties': False, - 'properties': {'destination-cidr': {'type': 'string'}, - 'gateway-ip': {'type': 'string'}, - 'metric': {'type': 'integer'}}, - 'required': ['destination-cidr', - 'gateway-ip', - 'metric'], - 'type': 'object'}, - 'NotifyWatchResult': {'additionalProperties': False, - 'properties': {'NotifyWatcherId': {'type': 'string'}, - 'error': {'$ref': '#/definitions/Error'}}, - 'required': ['NotifyWatcherId'], - 'type': 'object'}, - 'Number': {'additionalProperties': False, - 'properties': {'Build': {'type': 'integer'}, - 'Major': {'type': 'integer'}, - 'Minor': {'type': 'integer'}, - 'Patch': {'type': 'integer'}, - 'Tag': {'type': 'string'}}, - 'required': ['Major', - 'Minor', - 'Tag', - 'Patch', - 'Build'], - 'type': 'object'}, - 'ProvisioningInfo': {'additionalProperties': False, - 'properties': {'ProvisioningNetworkTopology': {'$ref': '#/definitions/ProvisioningNetworkTopology'}, - 'base': {'$ref': '#/definitions/Base'}, - 'charm-lxd-profiles': {'items': {'type': 'string'}, - 'type': 'array'}, - 'cloudinit-userdata': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'constraints': {'$ref': '#/definitions/Value'}, - 'controller-config': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'endpoint-bindings': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}, - 'image-metadata': {'items': {'$ref': '#/definitions/CloudImageMetadata'}, - 'type': 'array'}, - 'jobs': {'items': {'type': 'string'}, - 'type': 'array'}, - 'placement': {'type': 'string'}, - 'root-disk': {'$ref': '#/definitions/VolumeParams'}, - 'space-subnets': {'patternProperties': {'.*': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'type': 'object'}, - 'subnet-zones': {'patternProperties': {'.*': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'type': 'object'}, - 'tags': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}, - 'volume-attachments': {'items': {'$ref': '#/definitions/VolumeAttachmentParams'}, - 'type': 'array'}, - 'volumes': {'items': {'$ref': '#/definitions/VolumeParams'}, - 'type': 'array'}}, - 'required': ['constraints', - 'base', - 'placement', - 'jobs', - 'subnet-zones', - 'space-subnets', - 'ProvisioningNetworkTopology'], - 'type': 'object'}, - 'ProvisioningInfoResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'result': {'$ref': '#/definitions/ProvisioningInfo'}}, - 'required': ['result'], - 'type': 'object'}, - 'ProvisioningInfoResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/ProvisioningInfoResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'ProvisioningNetworkTopology': {'additionalProperties': False, - 'properties': {'space-subnets': {'patternProperties': {'.*': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'type': 'object'}, - 'subnet-zones': {'patternProperties': {'.*': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'type': 'object'}}, - 'required': ['subnet-zones', - 'space-subnets'], - 'type': 'object'}, - 'SetMachineNetworkConfig': {'additionalProperties': False, - 'properties': {'config': {'items': {'$ref': '#/definitions/NetworkConfig'}, - 'type': 'array'}, - 'tag': {'type': 'string'}}, - 'required': ['tag', 'config'], - 'type': 'object'}, - 'SetProfileArg': {'additionalProperties': False, - 'properties': {'entity': {'$ref': '#/definitions/Entity'}, - 'profiles': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'required': ['entity', 'profiles'], - 'type': 'object'}, - 'SetProfileArgs': {'additionalProperties': False, - 'properties': {'args': {'items': {'$ref': '#/definitions/SetProfileArg'}, - 'type': 'array'}}, - 'required': ['args'], - 'type': 'object'}, - 'SetStatus': {'additionalProperties': False, - 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'}, - 'type': 'array'}}, - 'required': ['entities'], - 'type': 'object'}, - 'Settings': {'additionalProperties': False, - 'properties': {'AutoNoProxy': {'type': 'string'}, - 'Ftp': {'type': 'string'}, - 'Http': {'type': 'string'}, - 'Https': {'type': 'string'}, - 'NoProxy': {'type': 'string'}}, - 'required': ['Http', - 'Https', - 'Ftp', - 'NoProxy', - 'AutoNoProxy'], - 'type': 'object'}, - 'StatusResult': {'additionalProperties': False, - 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'error': {'$ref': '#/definitions/Error'}, - 'id': {'type': 'string'}, - 'info': {'type': 'string'}, - 'life': {'type': 'string'}, - 'since': {'format': 'date-time', - 'type': 'string'}, - 'status': {'type': 'string'}}, - 'required': ['id', - 'life', - 'status', - 'info', - 'data', - 'since'], - 'type': 'object'}, - 'StatusResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/StatusResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'StringResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'result': {'type': 'string'}}, - 'required': ['result'], - 'type': 'object'}, - 'StringResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'StringsResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'result': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'type': 'object'}, - 'StringsResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/StringsResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'StringsWatchResult': {'additionalProperties': False, - 'properties': {'changes': {'items': {'type': 'string'}, - 'type': 'array'}, - 'error': {'$ref': '#/definitions/Error'}, - 'watcher-id': {'type': 'string'}}, - 'required': ['watcher-id'], - 'type': 'object'}, - 'StringsWatchResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - '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': {'error': {'$ref': '#/definitions/Error'}, - 'tools': {'items': {'$ref': '#/definitions/Tools'}, - 'type': 'array'}}, - 'required': ['tools'], - 'type': 'object'}, - 'ToolsResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/ToolsResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'UpdateBehavior': {'additionalProperties': False, - 'properties': {'enable-os-refresh-update': {'type': 'boolean'}, - 'enable-os-upgrade': {'type': 'boolean'}}, - 'required': ['enable-os-refresh-update', - 'enable-os-upgrade'], - 'type': 'object'}, - 'Value': {'additionalProperties': False, - 'properties': {'allocate-public-ip': {'type': 'boolean'}, - 'arch': {'type': 'string'}, - 'container': {'type': 'string'}, - 'cores': {'type': 'integer'}, - 'cpu-power': {'type': 'integer'}, - 'image-id': {'type': 'string'}, - 'instance-role': {'type': 'string'}, - 'instance-type': {'type': 'string'}, - 'mem': {'type': 'integer'}, - 'root-disk': {'type': 'integer'}, - 'root-disk-source': {'type': 'string'}, - 'spaces': {'items': {'type': 'string'}, - 'type': 'array'}, - 'tags': {'items': {'type': 'string'}, - 'type': 'array'}, - 'virt-type': {'type': 'string'}, - 'zones': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'type': 'object'}, - 'Volume': {'additionalProperties': False, - 'properties': {'info': {'$ref': '#/definitions/VolumeInfo'}, - 'volume-tag': {'type': 'string'}}, - 'required': ['volume-tag', 'info'], - 'type': 'object'}, - 'VolumeAttachmentInfo': {'additionalProperties': False, - 'properties': {'bus-address': {'type': 'string'}, - 'device-link': {'type': 'string'}, - 'device-name': {'type': 'string'}, - 'plan-info': {'$ref': '#/definitions/VolumeAttachmentPlanInfo'}, - 'read-only': {'type': 'boolean'}}, - 'type': 'object'}, - 'VolumeAttachmentParams': {'additionalProperties': False, - 'properties': {'instance-id': {'type': 'string'}, - 'machine-tag': {'type': 'string'}, - 'provider': {'type': 'string'}, - 'read-only': {'type': 'boolean'}, - 'volume-id': {'type': 'string'}, - 'volume-tag': {'type': 'string'}}, - 'required': ['volume-tag', - 'machine-tag', - 'provider'], - 'type': 'object'}, - 'VolumeAttachmentPlanInfo': {'additionalProperties': False, - 'properties': {'device-attributes': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}, - 'device-type': {'type': 'string'}}, - 'type': 'object'}, - 'VolumeInfo': {'additionalProperties': False, - 'properties': {'hardware-id': {'type': 'string'}, - 'persistent': {'type': 'boolean'}, - 'pool': {'type': 'string'}, - 'size': {'type': 'integer'}, - 'volume-id': {'type': 'string'}, - 'wwn': {'type': 'string'}}, - 'required': ['volume-id', 'size', 'persistent'], - 'type': 'object'}, - 'VolumeParams': {'additionalProperties': False, - 'properties': {'attachment': {'$ref': '#/definitions/VolumeAttachmentParams'}, - 'attributes': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'provider': {'type': 'string'}, - 'size': {'type': 'integer'}, - 'tags': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}, - 'volume-tag': {'type': 'string'}}, - 'required': ['volume-tag', - 'size', - 'provider'], - 'type': 'object'}, - 'WatchContainer': {'additionalProperties': False, - 'properties': {'container-type': {'type': 'string'}, - 'machine-tag': {'type': 'string'}}, - 'required': ['machine-tag', - 'container-type'], - 'type': 'object'}, - 'WatchContainers': {'additionalProperties': False, - 'properties': {'params': {'items': {'$ref': '#/definitions/WatchContainer'}, - 'type': 'array'}}, - 'required': ['params'], - 'type': 'object'}}, - 'properties': {'APIAddresses': {'description': 'APIAddresses returns the list ' - 'of addresses used to connect ' - 'to the API.', - 'properties': {'Result': {'$ref': '#/definitions/StringsResult'}}, - 'type': 'object'}, - 'APIHostPorts': {'description': 'APIHostPorts returns the API ' - 'server addresses.', - 'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}}, - 'type': 'object'}, - 'AvailabilityZone': {'description': 'AvailabilityZone returns ' - 'a provider-specific ' - 'availability zone for ' - 'each given machine entity', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/StringResults'}}, - 'type': 'object'}, - 'CACert': {'description': 'CACert returns the certificate used ' - 'to validate the state connection.', - 'properties': {'Result': {'$ref': '#/definitions/BytesResult'}}, - 'type': 'object'}, - 'Constraints': {'description': 'Constraints returns the ' - 'constraints for each given ' - 'machine entity.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ConstraintsResults'}}, - 'type': 'object'}, - 'ContainerConfig': {'description': 'ContainerConfig returns ' - 'information from the model ' - 'config that is\n' - 'needed for container ' - 'cloud-init.', - 'properties': {'Result': {'$ref': '#/definitions/ContainerConfig'}}, - 'type': 'object'}, - 'ContainerManagerConfig': {'description': 'ContainerManagerConfig ' - 'returns information ' - 'from the model ' - 'config that is\n' - 'needed for ' - 'configuring the ' - 'container manager.', - 'properties': {'Params': {'$ref': '#/definitions/ContainerManagerConfigParams'}, - 'Result': {'$ref': '#/definitions/ContainerManagerConfig'}}, - 'type': 'object'}, - 'ControllerAPIInfoForModels': {'description': 'ControllerAPIInfoForModels ' - 'returns the ' - 'controller api ' - 'connection ' - 'details for the ' - 'specified ' - 'models.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ControllerAPIInfoResults'}}, - 'type': 'object'}, - 'ControllerConfig': {'description': 'ControllerConfig returns ' - "the controller's " - 'configuration.', - 'properties': {'Result': {'$ref': '#/definitions/ControllerConfigResult'}}, - 'type': 'object'}, - 'DistributionGroup': {'description': 'DistributionGroup ' - 'returns, for each given ' - 'machine entity,\n' - 'a slice of instance.Ids ' - 'that belong to the same ' - 'distribution\n' - 'group as that machine. ' - 'This information may be ' - 'used to\n' - 'distribute instances for ' - 'high availability.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/DistributionGroupResults'}}, - 'type': 'object'}, - 'DistributionGroupByMachineId': {'description': 'DistributionGroupByMachineId ' - 'returns, for ' - 'each given ' - 'machine ' - 'entity,\n' - 'a slice of ' - 'machine.Ids ' - 'that belong ' - 'to the same ' - 'distribution\n' - 'group as that ' - 'machine. This ' - 'information ' - 'may be used ' - 'to\n' - 'distribute ' - 'instances for ' - 'high ' - 'availability.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/StringsResults'}}, - 'type': 'object'}, - 'EnsureDead': {'description': 'EnsureDead calls EnsureDead on ' - 'each given entity from state. ' - 'It\n' - 'will fail if the entity is not ' - "present. If it's Alive, nothing " - 'will\n' - 'happen (see state/EnsureDead() ' - 'for units or machines).', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'FindTools': {'description': 'FindTools returns a List ' - 'containing all tools matching ' - 'the given parameters.', - 'properties': {'Params': {'$ref': '#/definitions/FindToolsParams'}, - 'Result': {'$ref': '#/definitions/FindToolsResult'}}, - 'type': 'object'}, - 'GetContainerInterfaceInfo': {'description': 'GetContainerInterfaceInfo ' - 'returns ' - 'information to ' - 'configure ' - 'networking for ' - 'a\n' - 'container. It ' - 'accepts ' - 'container tags ' - 'as arguments.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/MachineNetworkConfigResults'}}, - 'type': 'object'}, - 'GetContainerProfileInfo': {'description': 'GetContainerProfileInfo ' - 'returns ' - 'information to ' - 'configure a lxd ' - 'profile(s) for a\n' - 'container based on ' - 'the charms ' - 'deployed to the ' - 'container. It ' - 'accepts container\n' - 'tags as arguments. ' - 'Unlike ' - 'machineLXDProfileNames ' - 'which has the ' - 'environ\n' - 'write the lxd ' - 'profiles and ' - 'returns the names ' - 'of profiles ' - 'already written.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ContainerProfileResults'}}, - 'type': 'object'}, - 'HostChangesForContainers': {'description': 'HostChangesForContainers ' - 'returns the set ' - 'of changes that ' - 'need to be done\n' - 'to the host ' - 'machine to ' - 'prepare it for ' - 'the containers to ' - 'be created.\n' - 'Pass in a list of ' - 'the containers ' - 'that you want the ' - 'changes for.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/HostNetworkChangeResults'}}, - 'type': 'object'}, - 'InstanceId': {'description': 'InstanceId returns the provider ' - 'specific instance id for each ' - 'given\n' - 'machine or an ' - 'CodeNotProvisioned error, if ' - 'not set.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/StringResults'}}, - 'type': 'object'}, - 'InstanceStatus': {'description': 'InstanceStatus returns the ' - 'instance status for each ' - 'given entity.\n' - 'Only machine tags are ' - 'accepted.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/StatusResults'}}, - 'type': 'object'}, - 'KeepInstance': {'description': 'KeepInstance returns the ' - 'keep-instance value for each ' - 'given machine entity.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/BoolResults'}}, - 'type': 'object'}, - 'Life': {'description': 'Life returns the life status of every ' - 'supplied entity, where available.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/LifeResults'}}, - 'type': 'object'}, - 'MachinesWithTransientErrors': {'description': 'MachinesWithTransientErrors ' - 'returns status ' - 'data for ' - 'machines with ' - 'provisioning\n' - 'errors which ' - 'are transient.', - 'properties': {'Result': {'$ref': '#/definitions/StatusResults'}}, - 'type': 'object'}, - 'MarkMachinesForRemoval': {'description': 'MarkMachinesForRemoval ' - 'indicates that the ' - 'specified machines ' - 'are\n' - 'ready to have any ' - 'provider-level ' - 'resources cleaned ' - 'up and then be\n' - 'removed.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'ModelConfig': {'description': 'ModelConfig returns the ' - "current model's configuration.", - 'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}}, - 'type': 'object'}, - 'ModelUUID': {'description': 'ModelUUID returns the model UUID ' - 'that the current connection is ' - 'for.', - 'properties': {'Result': {'$ref': '#/definitions/StringResult'}}, - 'type': 'object'}, - 'PrepareContainerInterfaceInfo': {'description': 'PrepareContainerInterfaceInfo ' - 'allocates an ' - 'address and ' - 'returns ' - 'information ' - 'to\n' - 'configure ' - 'networking ' - 'for a ' - 'container. ' - 'It accepts ' - 'container ' - 'tags as ' - 'arguments.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/MachineNetworkConfigResults'}}, - 'type': 'object'}, - 'ProvisioningInfo': {'description': 'ProvisioningInfo returns ' - 'the provisioning ' - 'information for each ' - 'given machine entity.\n' - 'It supports all positive ' - 'space constraints.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ProvisioningInfoResults'}}, - 'type': 'object'}, - 'ReleaseContainerAddresses': {'description': 'ReleaseContainerAddresses ' - 'finds addresses ' - 'allocated to a ' - 'container and ' - 'marks\n' - 'them as Dead, to ' - 'be released and ' - 'removed. It ' - 'accepts ' - 'container tags ' - 'as\n' - 'arguments.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'Remove': {'description': 'Remove removes every given entity ' - 'from state, calling EnsureDead\n' - 'first, then Remove. It will fail if ' - 'the entity is not present.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'SetCharmProfiles': {'description': 'SetCharmProfiles records ' - 'the given slice of charm ' - 'profile names.', - 'properties': {'Params': {'$ref': '#/definitions/SetProfileArgs'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'SetHostMachineNetworkConfig': {'properties': {'Params': {'$ref': '#/definitions/SetMachineNetworkConfig'}}, - 'type': 'object'}, - 'SetInstanceInfo': {'description': 'SetInstanceInfo sets the ' - 'provider specific machine ' - 'id, nonce,\n' - 'metadata and network info ' - 'for each given machine. ' - 'Once set, the\n' - 'instance id cannot be ' - 'changed.', - 'properties': {'Params': {'$ref': '#/definitions/InstancesInfo'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'SetInstanceStatus': {'description': 'SetInstanceStatus ' - 'updates the instance ' - 'status for each given\n' - 'entity. Only machine ' - 'tags are accepted.', - 'properties': {'Params': {'$ref': '#/definitions/SetStatus'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'SetModificationStatus': {'description': 'SetModificationStatus ' - 'updates the instance ' - 'whilst changes are ' - 'occurring. This\n' - 'is different from ' - 'SetStatus and ' - 'SetInstanceStatus, ' - 'by the fact this ' - 'holds\n' - 'information about ' - 'the ongoing changes ' - 'that are happening ' - 'to instances.\n' - 'Consider LXD Profile ' - 'updates that can ' - 'modify a instance, ' - 'but may not cause\n' - 'the instance to be ' - 'placed into a error ' - 'state. This ' - 'modification status\n' - 'serves the purpose ' - 'of highlighting that ' - 'to the operator.\n' - 'Only machine tags ' - 'are accepted.', - 'properties': {'Params': {'$ref': '#/definitions/SetStatus'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'SetObservedNetworkConfig': {'description': 'SetObservedNetworkConfig ' - 'reads the network ' - 'config for the ' - 'machine\n' - 'identified by the ' - 'input args.\n' - 'This config is ' - 'merged with the ' - 'new network ' - 'config supplied ' - 'in the\n' - 'same args and ' - 'updated if it has ' - 'changed.', - 'properties': {'Params': {'$ref': '#/definitions/SetMachineNetworkConfig'}}, - 'type': 'object'}, - 'SetPasswords': {'description': 'SetPasswords sets the given ' - 'password for each supplied ' - 'entity, if possible.', - 'properties': {'Params': {'$ref': '#/definitions/EntityPasswords'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'SetStatus': {'description': 'SetStatus sets the status of ' - 'each given entity.', - 'properties': {'Params': {'$ref': '#/definitions/SetStatus'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'SetSupportedContainers': {'description': 'SetSupportedContainers ' - 'updates the list of ' - 'containers ' - 'supported by the ' - 'machines passed in ' - 'args.', - 'properties': {'Params': {'$ref': '#/definitions/MachineContainersParams'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'Status': {'description': 'Status returns the status of each ' - 'given entity.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/StatusResults'}}, - 'type': 'object'}, - 'SupportedContainers': {'description': 'SupportedContainers ' - 'returns the list of ' - 'containers supported ' - 'by the machines passed ' - 'in args.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/MachineContainerResults'}}, - 'type': 'object'}, - 'Tools': {'description': 'Tools finds the tools necessary for ' - 'the given agents.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ToolsResults'}}, - 'type': 'object'}, - 'WatchAPIHostPorts': {'description': 'WatchAPIHostPorts ' - 'watches the API server ' - 'addresses.', - 'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}}, - 'type': 'object'}, - 'WatchAllContainers': {'description': 'WatchAllContainers ' - 'starts a StringsWatcher ' - 'to watch all containers ' - 'deployed to\n' - 'any machine passed in ' - 'args.', - 'properties': {'Params': {'$ref': '#/definitions/WatchContainers'}, - 'Result': {'$ref': '#/definitions/StringsWatchResults'}}, - 'type': 'object'}, - 'WatchContainers': {'description': 'WatchContainers starts a ' - 'StringsWatcher to watch ' - 'containers deployed to\n' - 'any machine passed in ' - 'args.', - 'properties': {'Params': {'$ref': '#/definitions/WatchContainers'}, - 'Result': {'$ref': '#/definitions/StringsWatchResults'}}, - 'type': 'object'}, - 'WatchForModelConfigChanges': {'description': 'WatchForModelConfigChanges ' - 'returns a ' - 'NotifyWatcher ' - 'that observes\n' - 'changes to the ' - 'model ' - 'configuration.\n' - 'Note that ' - 'although the ' - 'NotifyWatchResult ' - 'contains an ' - 'Error field,\n' - "it's not used " - 'because we are ' - 'only returning ' - 'a single ' - 'watcher,\n' - 'so we use the ' - 'regular error ' - 'return.', - 'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}}, - 'type': 'object'}, - 'WatchMachineErrorRetry': {'description': 'WatchMachineErrorRetry ' - 'returns a ' - 'NotifyWatcher that ' - 'notifies when\n' - 'the provisioner ' - 'should retry ' - 'provisioning ' - 'machines with ' - 'transient errors.', - 'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}}, - 'type': 'object'}, - 'WatchModelMachineStartTimes': {'description': 'WatchModelMachineStartTimes ' - 'watches the ' - 'non-container ' - 'machines in ' - 'the model\n' - 'for changes to ' - 'the Life or ' - 'AgentStartTime ' - 'fields and ' - 'reports them ' - 'as a batch.', - 'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}}, - 'type': 'object'}, - 'WatchModelMachines': {'description': 'WatchModelMachines ' - 'returns a ' - 'StringsWatcher that ' - 'notifies of\n' - 'changes to the life ' - 'cycles of the top level ' - 'machines in the ' - 'current\n' - 'model.', - 'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}}, - 'type': 'object'}}, - 'type': 'object'} - - - @ReturnMapping(StringsResult) - async def APIAddresses(self): - ''' - APIAddresses returns the list of addresses used to connect to the API. - - - Returns -> StringsResult - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='Provisioner', - request='APIAddresses', - version=11, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(APIHostPortsResult) - async def APIHostPorts(self): - ''' - APIHostPorts returns the API server addresses. - - - Returns -> APIHostPortsResult - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='Provisioner', - request='APIHostPorts', - version=11, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringResults) - async def AvailabilityZone(self, entities=None): - ''' - AvailabilityZone returns a provider-specific availability zone for each given machine entity - - entities : typing.Sequence[~Entity] - Returns -> StringResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Provisioner', - request='AvailabilityZone', - version=11, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(BytesResult) - async def CACert(self): - ''' - CACert returns the certificate used to validate the state connection. - - - Returns -> BytesResult - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='Provisioner', - request='CACert', - version=11, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ConstraintsResults) - async def Constraints(self, entities=None): - ''' - Constraints returns the constraints for each given machine entity. - - entities : typing.Sequence[~Entity] - Returns -> ConstraintsResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Provisioner', - request='Constraints', - version=11, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ContainerConfig) - async def ContainerConfig(self): - ''' - ContainerConfig returns information from the model config that is - needed for container cloud-init. - - - Returns -> ContainerConfig - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='Provisioner', - request='ContainerConfig', - version=11, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ContainerManagerConfig) - async def ContainerManagerConfig(self, type_=None): - ''' - ContainerManagerConfig returns information from the model config that is - needed for configuring the container manager. - - type_ : str - Returns -> ContainerManagerConfig - ''' - if type_ is not None and not isinstance(type_, (bytes, str)): - raise Exception("Expected type_ to be a str, received: {}".format(type(type_))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Provisioner', - request='ContainerManagerConfig', - version=11, - params=_params) - _params['type'] = type_ - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ControllerAPIInfoResults) - async def ControllerAPIInfoForModels(self, entities=None): - ''' - ControllerAPIInfoForModels returns the controller api connection details for the specified models. - - entities : typing.Sequence[~Entity] - Returns -> ControllerAPIInfoResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Provisioner', - request='ControllerAPIInfoForModels', - version=11, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ControllerConfigResult) - async def ControllerConfig(self): - ''' - ControllerConfig returns the controller's configuration. - - - Returns -> ControllerConfigResult - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='Provisioner', - request='ControllerConfig', - version=11, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(DistributionGroupResults) - async def DistributionGroup(self, entities=None): - ''' - DistributionGroup returns, for each given machine entity, - a slice of instance.Ids that belong to the same distribution - group as that machine. This information may be used to - distribute instances for high availability. - - entities : typing.Sequence[~Entity] - Returns -> DistributionGroupResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Provisioner', - request='DistributionGroup', - version=11, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringsResults) - async def DistributionGroupByMachineId(self, entities=None): - ''' - DistributionGroupByMachineId returns, for each given machine entity, - a slice of machine.Ids that belong to the same distribution - group as that machine. This information may be used to - distribute instances for high availability. - - entities : typing.Sequence[~Entity] - Returns -> StringsResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Provisioner', - request='DistributionGroupByMachineId', - version=11, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def EnsureDead(self, entities=None): - ''' - EnsureDead calls EnsureDead on each given entity from state. It - will fail if the entity is not present. If it's Alive, nothing will - happen (see state/EnsureDead() for units or machines). - - entities : typing.Sequence[~Entity] - Returns -> ErrorResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Provisioner', - request='EnsureDead', - version=11, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(FindToolsResult) - async def FindTools(self, agentstream=None, arch=None, major=None, number=None, os_type=None): - ''' - FindTools returns a List containing all tools matching the given parameters. - - agentstream : str - arch : str - major : int - number : Number - os_type : str - Returns -> FindToolsResult - ''' - if agentstream is not None and not isinstance(agentstream, (bytes, str)): - raise Exception("Expected agentstream to be a str, received: {}".format(type(agentstream))) - - if arch is not None and not isinstance(arch, (bytes, str)): - raise Exception("Expected arch to be a str, received: {}".format(type(arch))) - - if major is not None and not isinstance(major, int): - raise Exception("Expected major to be a int, received: {}".format(type(major))) - - if number is not None and not isinstance(number, (dict, Number)): - raise Exception("Expected number to be a Number, received: {}".format(type(number))) - - if os_type is not None and not isinstance(os_type, (bytes, str)): - raise Exception("Expected os_type to be a str, received: {}".format(type(os_type))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Provisioner', - request='FindTools', - version=11, - params=_params) - _params['agentstream'] = agentstream - _params['arch'] = arch - _params['major'] = major - _params['number'] = number - _params['os-type'] = os_type - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(MachineNetworkConfigResults) - async def GetContainerInterfaceInfo(self, entities=None): - ''' - GetContainerInterfaceInfo returns information to configure networking for a - container. It accepts container tags as arguments. - - entities : typing.Sequence[~Entity] - Returns -> MachineNetworkConfigResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Provisioner', - request='GetContainerInterfaceInfo', - version=11, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ContainerProfileResults) - async def GetContainerProfileInfo(self, entities=None): - ''' - GetContainerProfileInfo returns information to configure a lxd profile(s) for a - container based on the charms deployed to the container. It accepts container - tags as arguments. Unlike machineLXDProfileNames which has the environ - write the lxd profiles and returns the names of profiles already written. - - entities : typing.Sequence[~Entity] - Returns -> ContainerProfileResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Provisioner', - request='GetContainerProfileInfo', - version=11, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(HostNetworkChangeResults) - async def HostChangesForContainers(self, entities=None): - ''' - HostChangesForContainers returns the set of changes that need to be done - to the host machine to prepare it for the containers to be created. - Pass in a list of the containers that you want the changes for. - - entities : typing.Sequence[~Entity] - Returns -> HostNetworkChangeResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Provisioner', - request='HostChangesForContainers', - version=11, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringResults) - async def InstanceId(self, entities=None): - ''' - InstanceId returns the provider specific instance id for each given - machine or an CodeNotProvisioned error, if not set. - - entities : typing.Sequence[~Entity] - Returns -> StringResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Provisioner', - request='InstanceId', - version=11, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StatusResults) - async def InstanceStatus(self, entities=None): - ''' - InstanceStatus returns the instance status for each given entity. - Only machine tags are accepted. - - entities : typing.Sequence[~Entity] - Returns -> StatusResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Provisioner', - request='InstanceStatus', - version=11, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(BoolResults) - async def KeepInstance(self, entities=None): - ''' - KeepInstance returns the keep-instance value for each given machine entity. - - entities : typing.Sequence[~Entity] - Returns -> BoolResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Provisioner', - request='KeepInstance', - version=11, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(LifeResults) - async def Life(self, entities=None): - ''' - Life returns the life status of every supplied entity, where available. - - entities : typing.Sequence[~Entity] - Returns -> LifeResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Provisioner', - request='Life', - version=11, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StatusResults) - async def MachinesWithTransientErrors(self): - ''' - MachinesWithTransientErrors returns status data for machines with provisioning - errors which are transient. - - - Returns -> StatusResults - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='Provisioner', - request='MachinesWithTransientErrors', - version=11, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def MarkMachinesForRemoval(self, entities=None): - ''' - MarkMachinesForRemoval indicates that the specified machines are - ready to have any provider-level resources cleaned up and then be - removed. - - entities : typing.Sequence[~Entity] - Returns -> ErrorResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Provisioner', - request='MarkMachinesForRemoval', - version=11, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ModelConfigResult) - async def ModelConfig(self): - ''' - ModelConfig returns the current model's configuration. - - - Returns -> ModelConfigResult - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='Provisioner', - request='ModelConfig', - version=11, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringResult) - async def ModelUUID(self): - ''' - ModelUUID returns the model UUID that the current connection is for. - - - Returns -> StringResult - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='Provisioner', - request='ModelUUID', - version=11, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(MachineNetworkConfigResults) - async def PrepareContainerInterfaceInfo(self, entities=None): - ''' - PrepareContainerInterfaceInfo allocates an address and returns information to - configure networking for a container. It accepts container tags as arguments. - - entities : typing.Sequence[~Entity] - Returns -> MachineNetworkConfigResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Provisioner', - request='PrepareContainerInterfaceInfo', - version=11, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ProvisioningInfoResults) - async def ProvisioningInfo(self, entities=None): - ''' - ProvisioningInfo returns the provisioning information for each given machine entity. - It supports all positive space constraints. - - entities : typing.Sequence[~Entity] - Returns -> ProvisioningInfoResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Provisioner', - request='ProvisioningInfo', - version=11, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def ReleaseContainerAddresses(self, entities=None): - ''' - ReleaseContainerAddresses finds addresses allocated to a container and marks - them as Dead, to be released and removed. It accepts container tags as - arguments. - - entities : typing.Sequence[~Entity] - Returns -> ErrorResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Provisioner', - request='ReleaseContainerAddresses', - version=11, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def Remove(self, entities=None): - ''' - Remove removes every given entity from state, calling EnsureDead - first, then Remove. It will fail if the entity is not present. - - entities : typing.Sequence[~Entity] - Returns -> ErrorResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Provisioner', - request='Remove', - version=11, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def SetCharmProfiles(self, args=None): - ''' - SetCharmProfiles records the given slice of charm profile names. - - args : typing.Sequence[~SetProfileArg] - Returns -> ErrorResults - ''' - if args is not None and not isinstance(args, (bytes, str, list)): - raise Exception("Expected args to be a Sequence, received: {}".format(type(args))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Provisioner', - request='SetCharmProfiles', - version=11, - params=_params) - _params['args'] = args - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(None) - async def SetHostMachineNetworkConfig(self, config=None, tag=None): - ''' - config : typing.Sequence[~NetworkConfig] - tag : str - Returns -> None - ''' - if config is not None and not isinstance(config, (bytes, str, list)): - raise Exception("Expected config to be a Sequence, received: {}".format(type(config))) - - if tag is not None and not isinstance(tag, (bytes, str)): - raise Exception("Expected tag to be a str, received: {}".format(type(tag))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Provisioner', - request='SetHostMachineNetworkConfig', - version=11, - params=_params) - _params['config'] = config - _params['tag'] = tag - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def SetInstanceInfo(self, machines=None): - ''' - SetInstanceInfo sets the provider specific machine id, nonce, - metadata and network info for each given machine. Once set, the - instance id cannot be changed. - - machines : typing.Sequence[~InstanceInfo] - Returns -> ErrorResults - ''' - if machines is not None and not isinstance(machines, (bytes, str, list)): - raise Exception("Expected machines to be a Sequence, received: {}".format(type(machines))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Provisioner', - request='SetInstanceInfo', - version=11, - params=_params) - _params['machines'] = machines - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def SetInstanceStatus(self, entities=None): - ''' - SetInstanceStatus updates the instance status for each given - entity. Only machine tags are accepted. - - entities : typing.Sequence[~EntityStatusArgs] - Returns -> ErrorResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Provisioner', - request='SetInstanceStatus', - version=11, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def SetModificationStatus(self, entities=None): - ''' - SetModificationStatus updates the instance whilst changes are occurring. This - is different from SetStatus and SetInstanceStatus, by the fact this holds - information about the ongoing changes that are happening to instances. - Consider LXD Profile updates that can modify a instance, but may not cause - the instance to be placed into a error state. This modification status - serves the purpose of highlighting that to the operator. - Only machine tags are accepted. - - entities : typing.Sequence[~EntityStatusArgs] - Returns -> ErrorResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Provisioner', - request='SetModificationStatus', - version=11, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(None) - async def SetObservedNetworkConfig(self, config=None, tag=None): - ''' - SetObservedNetworkConfig reads the network config for the machine - identified by the input args. - This config is merged with the new network config supplied in the - same args and updated if it has changed. - - config : typing.Sequence[~NetworkConfig] - tag : str - Returns -> None - ''' - if config is not None and not isinstance(config, (bytes, str, list)): - raise Exception("Expected config to be a Sequence, received: {}".format(type(config))) - - if tag is not None and not isinstance(tag, (bytes, str)): - raise Exception("Expected tag to be a str, received: {}".format(type(tag))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Provisioner', - request='SetObservedNetworkConfig', - version=11, - params=_params) - _params['config'] = config - _params['tag'] = tag - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def SetPasswords(self, changes=None): - ''' - SetPasswords sets the given password for each supplied entity, if possible. - - changes : typing.Sequence[~EntityPassword] - Returns -> ErrorResults - ''' - if changes is not None and not isinstance(changes, (bytes, str, list)): - raise Exception("Expected changes to be a Sequence, received: {}".format(type(changes))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Provisioner', - request='SetPasswords', - version=11, - params=_params) - _params['changes'] = changes - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def SetStatus(self, entities=None): - ''' - SetStatus sets the status of each given entity. - - entities : typing.Sequence[~EntityStatusArgs] - Returns -> ErrorResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Provisioner', - request='SetStatus', - version=11, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def SetSupportedContainers(self, params=None): - ''' - SetSupportedContainers updates the list of containers supported by the machines passed in args. - - params : typing.Sequence[~MachineContainers] - Returns -> ErrorResults - ''' - if params is not None and not isinstance(params, (bytes, str, list)): - raise Exception("Expected params to be a Sequence, received: {}".format(type(params))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Provisioner', - request='SetSupportedContainers', - version=11, - params=_params) - _params['params'] = params - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StatusResults) - async def Status(self, entities=None): - ''' - Status returns the status of each given entity. - - entities : typing.Sequence[~Entity] - Returns -> StatusResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Provisioner', - request='Status', - version=11, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(MachineContainerResults) - async def SupportedContainers(self, entities=None): - ''' - SupportedContainers returns the list of containers supported by the machines passed in args. - - entities : typing.Sequence[~Entity] - Returns -> MachineContainerResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Provisioner', - request='SupportedContainers', - version=11, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ToolsResults) - async def Tools(self, entities=None): - ''' - Tools finds the tools necessary for the given agents. - - entities : typing.Sequence[~Entity] - Returns -> ToolsResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Provisioner', - request='Tools', - version=11, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(NotifyWatchResult) - async def WatchAPIHostPorts(self): - ''' - WatchAPIHostPorts watches the API server addresses. - - - Returns -> NotifyWatchResult - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='Provisioner', - request='WatchAPIHostPorts', - version=11, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringsWatchResults) - async def WatchAllContainers(self, params=None): - ''' - WatchAllContainers starts a StringsWatcher to watch all containers deployed to - any machine passed in args. - - params : typing.Sequence[~WatchContainer] - Returns -> StringsWatchResults - ''' - if params is not None and not isinstance(params, (bytes, str, list)): - raise Exception("Expected params to be a Sequence, received: {}".format(type(params))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Provisioner', - request='WatchAllContainers', - version=11, - params=_params) - _params['params'] = params - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringsWatchResults) - async def WatchContainers(self, params=None): - ''' - WatchContainers starts a StringsWatcher to watch containers deployed to - any machine passed in args. - - params : typing.Sequence[~WatchContainer] - Returns -> StringsWatchResults - ''' - if params is not None and not isinstance(params, (bytes, str, list)): - raise Exception("Expected params to be a Sequence, received: {}".format(type(params))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Provisioner', - request='WatchContainers', - version=11, - params=_params) - _params['params'] = params - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(NotifyWatchResult) - async def WatchForModelConfigChanges(self): - ''' - WatchForModelConfigChanges returns a NotifyWatcher that observes - changes to the model configuration. - Note that although the NotifyWatchResult contains an Error field, - it's not used because we are only returning a single watcher, - so we use the regular error return. - - - Returns -> NotifyWatchResult - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='Provisioner', - request='WatchForModelConfigChanges', - version=11, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(NotifyWatchResult) - async def WatchMachineErrorRetry(self): - ''' - WatchMachineErrorRetry returns a NotifyWatcher that notifies when - the provisioner should retry provisioning machines with transient errors. - - - Returns -> NotifyWatchResult - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='Provisioner', - request='WatchMachineErrorRetry', - version=11, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringsWatchResult) - async def WatchModelMachineStartTimes(self): - ''' - WatchModelMachineStartTimes watches the non-container machines in the model - for changes to the Life or AgentStartTime fields and reports them as a batch. - - - Returns -> StringsWatchResult - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='Provisioner', - request='WatchModelMachineStartTimes', - version=11, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringsWatchResult) - async def WatchModelMachines(self): - ''' - WatchModelMachines returns a StringsWatcher that notifies of - changes to the life cycles of the top level machines in the current - model. - - - Returns -> StringsWatchResult - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='Provisioner', - request='WatchModelMachines', - version=11, - params=_params) - - reply = await self.rpc(msg) - return reply - - diff --git a/juju/client/_client18.py b/juju/client/_client18.py deleted file mode 100644 index b76c7060..00000000 --- a/juju/client/_client18.py +++ /dev/null @@ -1,6393 +0,0 @@ -# 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 -from juju.client._definitions import * - - -class ApplicationFacade(Type): - name = 'Application' - version = 18 - schema = {'definitions': {'AddApplicationUnits': {'additionalProperties': False, - 'properties': {'application': {'type': 'string'}, - 'attach-storage': {'items': {'type': 'string'}, - 'type': 'array'}, - 'num-units': {'type': 'integer'}, - 'placement': {'items': {'$ref': '#/definitions/Placement'}, - 'type': 'array'}, - 'policy': {'type': 'string'}}, - 'required': ['application', - 'num-units', - 'placement'], - 'type': 'object'}, - 'AddApplicationUnitsResults': {'additionalProperties': False, - 'properties': {'units': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'required': ['units'], - 'type': 'object'}, - 'AddRelation': {'additionalProperties': False, - 'properties': {'endpoints': {'items': {'type': 'string'}, - 'type': 'array'}, - 'via-cidrs': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'required': ['endpoints'], - 'type': 'object'}, - 'AddRelationResults': {'additionalProperties': False, - 'properties': {'endpoints': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmRelation'}}, - 'type': 'object'}}, - 'required': ['endpoints'], - 'type': 'object'}, - 'ApplicationCharmRelations': {'additionalProperties': False, - 'properties': {'application': {'type': 'string'}}, - 'required': ['application'], - 'type': 'object'}, - 'ApplicationCharmRelationsResults': {'additionalProperties': False, - 'properties': {'charm-relations': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'required': ['charm-relations'], - 'type': 'object'}, - 'ApplicationConfigUnsetArgs': {'additionalProperties': False, - 'properties': {'Args': {'items': {'$ref': '#/definitions/ApplicationUnset'}, - 'type': 'array'}}, - 'required': ['Args'], - 'type': 'object'}, - 'ApplicationConstraint': {'additionalProperties': False, - 'properties': {'constraints': {'$ref': '#/definitions/Value'}, - 'error': {'$ref': '#/definitions/Error'}}, - 'required': ['constraints'], - 'type': 'object'}, - 'ApplicationDeploy': {'additionalProperties': False, - 'properties': {'Force': {'type': 'boolean'}, - 'application': {'type': 'string'}, - 'attach-storage': {'items': {'type': 'string'}, - 'type': 'array'}, - 'channel': {'type': 'string'}, - 'charm-origin': {'$ref': '#/definitions/CharmOrigin'}, - 'charm-url': {'type': 'string'}, - 'config': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}, - 'config-yaml': {'type': 'string'}, - 'constraints': {'$ref': '#/definitions/Value'}, - 'devices': {'patternProperties': {'.*': {'$ref': '#/definitions/Constraints'}}, - 'type': 'object'}, - 'endpoint-bindings': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}, - 'num-units': {'type': 'integer'}, - 'placement': {'items': {'$ref': '#/definitions/Placement'}, - 'type': 'array'}, - 'policy': {'type': 'string'}, - 'resources': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}, - 'storage': {'patternProperties': {'.*': {'$ref': '#/definitions/Constraints'}}, - 'type': 'object'}}, - 'required': ['application', - 'charm-url', - 'channel', - 'num-units', - 'config-yaml', - 'constraints', - 'Force'], - 'type': 'object'}, - 'ApplicationExpose': {'additionalProperties': False, - 'properties': {'application': {'type': 'string'}, - 'exposed-endpoints': {'patternProperties': {'.*': {'$ref': '#/definitions/ExposedEndpoint'}}, - 'type': 'object'}}, - 'required': ['application'], - 'type': 'object'}, - 'ApplicationGet': {'additionalProperties': False, - 'properties': {'application': {'type': 'string'}, - 'branch': {'type': 'string'}}, - 'required': ['application', 'branch'], - 'type': 'object'}, - 'ApplicationGetArgs': {'additionalProperties': False, - 'properties': {'args': {'items': {'$ref': '#/definitions/ApplicationGet'}, - 'type': 'array'}}, - 'required': ['args'], - 'type': 'object'}, - 'ApplicationGetConfigResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/ConfigResult'}, - 'type': 'array'}}, - 'required': ['Results'], - 'type': 'object'}, - 'ApplicationGetConstraintsResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/ApplicationConstraint'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'ApplicationGetResults': {'additionalProperties': False, - 'properties': {'application': {'type': 'string'}, - 'application-config': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'base': {'$ref': '#/definitions/Base'}, - 'channel': {'type': 'string'}, - 'charm': {'type': 'string'}, - 'config': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'constraints': {'$ref': '#/definitions/Value'}, - 'endpoint-bindings': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}}, - 'required': ['application', - 'charm', - 'config', - 'constraints', - 'base', - 'channel'], - 'type': 'object'}, - 'ApplicationInfoResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'result': {'$ref': '#/definitions/ApplicationResult'}}, - 'type': 'object'}, - 'ApplicationInfoResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/ApplicationInfoResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'ApplicationMergeBindings': {'additionalProperties': False, - 'properties': {'application-tag': {'type': 'string'}, - 'bindings': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}, - 'force': {'type': 'boolean'}}, - 'required': ['application-tag', - 'bindings', - 'force'], - 'type': 'object'}, - 'ApplicationMergeBindingsArgs': {'additionalProperties': False, - 'properties': {'args': {'items': {'$ref': '#/definitions/ApplicationMergeBindings'}, - 'type': 'array'}}, - 'required': ['args'], - 'type': 'object'}, - 'ApplicationMetricCredential': {'additionalProperties': False, - 'properties': {'application': {'type': 'string'}, - 'metrics-credentials': {'items': {'type': 'integer'}, - 'type': 'array'}}, - 'required': ['application', - 'metrics-credentials'], - 'type': 'object'}, - 'ApplicationMetricCredentials': {'additionalProperties': False, - 'properties': {'creds': {'items': {'$ref': '#/definitions/ApplicationMetricCredential'}, - 'type': 'array'}}, - 'required': ['creds'], - 'type': 'object'}, - 'ApplicationOfferDetails': {'additionalProperties': False, - 'properties': {'application-description': {'type': 'string'}, - 'bindings': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}, - 'endpoints': {'items': {'$ref': '#/definitions/RemoteEndpoint'}, - 'type': 'array'}, - 'offer-name': {'type': 'string'}, - 'offer-url': {'type': 'string'}, - 'offer-uuid': {'type': 'string'}, - 'source-model-tag': {'type': 'string'}, - 'spaces': {'items': {'$ref': '#/definitions/RemoteSpace'}, - 'type': 'array'}, - 'users': {'items': {'$ref': '#/definitions/OfferUserDetails'}, - 'type': 'array'}}, - 'required': ['source-model-tag', - 'offer-uuid', - 'offer-url', - 'offer-name', - 'application-description'], - 'type': 'object'}, - 'ApplicationResult': {'additionalProperties': False, - 'properties': {'base': {'$ref': '#/definitions/Base'}, - 'channel': {'type': 'string'}, - 'charm': {'type': 'string'}, - 'constraints': {'$ref': '#/definitions/Value'}, - 'endpoint-bindings': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}, - 'exposed': {'type': 'boolean'}, - 'exposed-endpoints': {'patternProperties': {'.*': {'$ref': '#/definitions/ExposedEndpoint'}}, - 'type': 'object'}, - 'life': {'type': 'string'}, - 'principal': {'type': 'boolean'}, - 'remote': {'type': 'boolean'}, - 'tag': {'type': 'string'}}, - 'required': ['tag', - 'principal', - 'exposed', - 'remote', - 'life'], - 'type': 'object'}, - 'ApplicationSetCharm': {'additionalProperties': False, - 'properties': {'application': {'type': 'string'}, - 'channel': {'type': 'string'}, - 'charm-origin': {'$ref': '#/definitions/CharmOrigin'}, - 'charm-url': {'type': 'string'}, - 'config-settings': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}, - 'config-settings-yaml': {'type': 'string'}, - 'endpoint-bindings': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}, - 'force': {'type': 'boolean'}, - 'force-base': {'type': 'boolean'}, - 'force-units': {'type': 'boolean'}, - 'generation': {'type': 'string'}, - 'resource-ids': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}, - 'storage-constraints': {'patternProperties': {'.*': {'$ref': '#/definitions/StorageConstraints'}}, - 'type': 'object'}}, - 'required': ['application', - 'generation', - 'charm-url', - 'channel', - 'force', - 'force-units', - 'force-base'], - 'type': 'object'}, - 'ApplicationUnexpose': {'additionalProperties': False, - 'properties': {'application': {'type': 'string'}, - 'exposed-endpoints': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'required': ['application', - 'exposed-endpoints'], - 'type': 'object'}, - 'ApplicationUnset': {'additionalProperties': False, - 'properties': {'application': {'type': 'string'}, - 'branch': {'type': 'string'}, - 'options': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'required': ['application', - 'branch', - 'options'], - 'type': 'object'}, - 'ApplicationsDeploy': {'additionalProperties': False, - 'properties': {'applications': {'items': {'$ref': '#/definitions/ApplicationDeploy'}, - 'type': 'array'}}, - 'required': ['applications'], - 'type': 'object'}, - 'Base': {'additionalProperties': False, - 'properties': {'channel': {'type': 'string'}, - 'name': {'type': 'string'}}, - 'required': ['name', 'channel'], - 'type': 'object'}, - 'Channel': {'additionalProperties': False, - 'properties': {'branch': {'type': 'string'}, - 'risk': {'type': 'string'}, - 'track': {'type': 'string'}}, - 'type': 'object'}, - 'CharmOrigin': {'additionalProperties': False, - 'properties': {'architecture': {'type': 'string'}, - 'base': {'$ref': '#/definitions/Base'}, - 'branch': {'type': 'string'}, - 'hash': {'type': 'string'}, - 'id': {'type': 'string'}, - 'instance-key': {'type': 'string'}, - 'revision': {'type': 'integer'}, - 'risk': {'type': 'string'}, - 'source': {'type': 'string'}, - 'track': {'type': 'string'}, - 'type': {'type': 'string'}}, - 'required': ['source', 'type', 'id'], - 'type': 'object'}, - 'CharmRelation': {'additionalProperties': False, - 'properties': {'interface': {'type': 'string'}, - 'limit': {'type': 'integer'}, - 'name': {'type': 'string'}, - 'optional': {'type': 'boolean'}, - 'role': {'type': 'string'}, - 'scope': {'type': 'string'}}, - 'required': ['name', - 'role', - 'interface', - 'optional', - 'limit', - 'scope'], - 'type': 'object'}, - 'CharmURLOriginResult': {'additionalProperties': False, - 'properties': {'charm-origin': {'$ref': '#/definitions/CharmOrigin'}, - 'error': {'$ref': '#/definitions/Error'}, - 'url': {'type': 'string'}}, - 'required': ['url', 'charm-origin'], - 'type': 'object'}, - 'ConfigResult': {'additionalProperties': False, - 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'error': {'$ref': '#/definitions/Error'}}, - 'required': ['config'], - 'type': 'object'}, - 'ConfigSet': {'additionalProperties': False, - 'properties': {'application': {'type': 'string'}, - 'config': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}, - 'config-yaml': {'type': 'string'}, - 'generation': {'type': 'string'}}, - 'required': ['application', - 'generation', - 'config', - 'config-yaml'], - 'type': 'object'}, - 'ConfigSetArgs': {'additionalProperties': False, - 'properties': {'Args': {'items': {'$ref': '#/definitions/ConfigSet'}, - 'type': 'array'}}, - 'required': ['Args'], - 'type': 'object'}, - 'Constraints': {'additionalProperties': False, - 'properties': {'Count': {'type': 'integer'}, - 'Pool': {'type': 'string'}, - 'Size': {'type': 'integer'}}, - 'required': ['Pool', 'Size', 'Count'], - 'type': 'object'}, - 'ConsumeApplicationArg': {'additionalProperties': False, - 'properties': {'ApplicationOfferDetails': {'$ref': '#/definitions/ApplicationOfferDetails'}, - 'application-alias': {'type': 'string'}, - 'application-description': {'type': 'string'}, - 'bindings': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}, - 'endpoints': {'items': {'$ref': '#/definitions/RemoteEndpoint'}, - 'type': 'array'}, - 'external-controller': {'$ref': '#/definitions/ExternalControllerInfo'}, - 'macaroon': {'$ref': '#/definitions/Macaroon'}, - 'offer-name': {'type': 'string'}, - 'offer-url': {'type': 'string'}, - 'offer-uuid': {'type': 'string'}, - 'source-model-tag': {'type': 'string'}, - 'spaces': {'items': {'$ref': '#/definitions/RemoteSpace'}, - 'type': 'array'}, - 'users': {'items': {'$ref': '#/definitions/OfferUserDetails'}, - 'type': 'array'}}, - 'required': ['source-model-tag', - 'offer-uuid', - 'offer-url', - 'offer-name', - 'application-description', - 'ApplicationOfferDetails'], - 'type': 'object'}, - 'ConsumeApplicationArgs': {'additionalProperties': False, - 'properties': {'args': {'items': {'$ref': '#/definitions/ConsumeApplicationArg'}, - 'type': 'array'}}, - 'type': 'object'}, - 'DeployFromRepositoryArg': {'additionalProperties': False, - 'properties': {'ApplicationName': {'type': 'string'}, - 'AttachStorage': {'items': {'type': 'string'}, - 'type': 'array'}, - 'Base': {'$ref': '#/definitions/Base'}, - 'Channel': {'$ref': '#/definitions/Channel'}, - 'CharmName': {'type': 'string'}, - 'ConfigYAML': {'type': 'string'}, - 'Cons': {'$ref': '#/definitions/Value'}, - 'Devices': {'patternProperties': {'.*': {'$ref': '#/definitions/Constraints'}}, - 'type': 'object'}, - 'DryRun': {'type': 'boolean'}, - 'EndpointBindings': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}, - 'Force': {'type': 'boolean'}, - 'NumUnits': {'type': 'integer'}, - 'Placement': {'items': {'$ref': '#/definitions/Placement'}, - 'type': 'array'}, - 'Resources': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}, - 'Revision': {'type': 'integer'}, - 'Storage': {'patternProperties': {'.*': {'$ref': '#/definitions/Constraints'}}, - 'type': 'object'}, - 'Trust': {'type': 'boolean'}}, - 'required': ['CharmName', - 'ApplicationName', - 'AttachStorage', - 'Base', - 'Channel', - 'ConfigYAML', - 'Cons', - 'Devices', - 'DryRun', - 'EndpointBindings', - 'Force', - 'NumUnits', - 'Placement', - 'Revision', - 'Resources', - 'Storage', - 'Trust'], - 'type': 'object'}, - 'DeployFromRepositoryArgs': {'additionalProperties': False, - 'properties': {'Args': {'items': {'$ref': '#/definitions/DeployFromRepositoryArg'}, - 'type': 'array'}}, - 'required': ['Args'], - 'type': 'object'}, - 'DeployFromRepositoryResult': {'additionalProperties': False, - 'properties': {'Errors': {'items': {'$ref': '#/definitions/Error'}, - 'type': 'array'}, - 'Info': {'items': {'type': 'string'}, - 'type': 'array'}, - 'PendingResourceUploads': {'items': {'$ref': '#/definitions/PendingResourceUpload'}, - 'type': 'array'}}, - 'required': ['Errors', - 'Info', - 'PendingResourceUploads'], - 'type': 'object'}, - 'DeployFromRepositoryResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/DeployFromRepositoryResult'}, - 'type': 'array'}}, - 'required': ['Results'], - 'type': 'object'}, - 'DestroyApplicationInfo': {'additionalProperties': False, - 'properties': {'destroyed-storage': {'items': {'$ref': '#/definitions/Entity'}, - 'type': 'array'}, - 'destroyed-units': {'items': {'$ref': '#/definitions/Entity'}, - 'type': 'array'}, - 'detached-storage': {'items': {'$ref': '#/definitions/Entity'}, - 'type': 'array'}}, - 'type': 'object'}, - 'DestroyApplicationParams': {'additionalProperties': False, - 'properties': {'application-tag': {'type': 'string'}, - 'destroy-storage': {'type': 'boolean'}, - 'dry-run': {'type': 'boolean'}, - 'force': {'type': 'boolean'}, - 'max-wait': {'type': 'integer'}}, - 'required': ['application-tag', - 'force'], - 'type': 'object'}, - 'DestroyApplicationResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'info': {'$ref': '#/definitions/DestroyApplicationInfo'}}, - 'type': 'object'}, - 'DestroyApplicationResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/DestroyApplicationResult'}, - 'type': 'array'}}, - 'type': 'object'}, - 'DestroyApplicationsParams': {'additionalProperties': False, - 'properties': {'applications': {'items': {'$ref': '#/definitions/DestroyApplicationParams'}, - 'type': 'array'}}, - 'required': ['applications'], - 'type': 'object'}, - 'DestroyConsumedApplicationParams': {'additionalProperties': False, - 'properties': {'application-tag': {'type': 'string'}, - 'force': {'type': 'boolean'}, - 'max-wait': {'type': 'integer'}}, - 'required': ['application-tag'], - 'type': 'object'}, - 'DestroyConsumedApplicationsParams': {'additionalProperties': False, - 'properties': {'applications': {'items': {'$ref': '#/definitions/DestroyConsumedApplicationParams'}, - 'type': 'array'}}, - 'required': ['applications'], - 'type': 'object'}, - 'DestroyRelation': {'additionalProperties': False, - 'properties': {'endpoints': {'items': {'type': 'string'}, - 'type': 'array'}, - 'force': {'type': 'boolean'}, - 'max-wait': {'type': 'integer'}, - 'relation-id': {'type': 'integer'}}, - 'required': ['relation-id'], - 'type': 'object'}, - 'DestroyUnitInfo': {'additionalProperties': False, - 'properties': {'destroyed-storage': {'items': {'$ref': '#/definitions/Entity'}, - 'type': 'array'}, - 'detached-storage': {'items': {'$ref': '#/definitions/Entity'}, - 'type': 'array'}}, - 'type': 'object'}, - 'DestroyUnitParams': {'additionalProperties': False, - 'properties': {'destroy-storage': {'type': 'boolean'}, - 'dry-run': {'type': 'boolean'}, - 'force': {'type': 'boolean'}, - 'max-wait': {'type': 'integer'}, - 'unit-tag': {'type': 'string'}}, - 'required': ['unit-tag'], - 'type': 'object'}, - 'DestroyUnitResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'info': {'$ref': '#/definitions/DestroyUnitInfo'}}, - 'type': 'object'}, - 'DestroyUnitResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/DestroyUnitResult'}, - 'type': 'array'}}, - 'type': 'object'}, - 'DestroyUnitsParams': {'additionalProperties': False, - 'properties': {'units': {'items': {'$ref': '#/definitions/DestroyUnitParams'}, - 'type': 'array'}}, - 'required': ['units'], - 'type': 'object'}, - 'EndpointRelationData': {'additionalProperties': False, - 'properties': {'ApplicationData': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'cross-model': {'type': 'boolean'}, - 'endpoint': {'type': 'string'}, - 'related-endpoint': {'type': 'string'}, - 'relation-id': {'type': 'integer'}, - 'unit-relation-data': {'patternProperties': {'.*': {'$ref': '#/definitions/RelationData'}}, - 'type': 'object'}}, - 'required': ['relation-id', - 'endpoint', - 'cross-model', - 'related-endpoint', - 'ApplicationData', - 'unit-relation-data'], - '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': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'message': {'type': 'string'}}, - 'required': ['message', 'code'], - 'type': 'object'}, - 'ErrorResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}}, - 'type': 'object'}, - 'ErrorResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'ExposedEndpoint': {'additionalProperties': False, - 'properties': {'expose-to-cidrs': {'items': {'type': 'string'}, - 'type': 'array'}, - 'expose-to-spaces': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'type': 'object'}, - 'ExternalControllerInfo': {'additionalProperties': False, - 'properties': {'addrs': {'items': {'type': 'string'}, - 'type': 'array'}, - 'ca-cert': {'type': 'string'}, - 'controller-alias': {'type': 'string'}, - 'controller-tag': {'type': 'string'}}, - 'required': ['controller-tag', - 'controller-alias', - 'addrs', - 'ca-cert'], - 'type': 'object'}, - 'Macaroon': {'additionalProperties': False, 'type': 'object'}, - 'OfferUserDetails': {'additionalProperties': False, - 'properties': {'access': {'type': 'string'}, - 'display-name': {'type': 'string'}, - 'user': {'type': 'string'}}, - 'required': ['user', - 'display-name', - 'access'], - 'type': 'object'}, - 'PendingResourceUpload': {'additionalProperties': False, - 'properties': {'Filename': {'type': 'string'}, - 'Name': {'type': 'string'}, - 'PendingID': {'type': 'string'}, - 'Type': {'type': 'string'}}, - 'required': ['Name', - 'Filename', - 'PendingID', - 'Type'], - 'type': 'object'}, - 'Placement': {'additionalProperties': False, - 'properties': {'directive': {'type': 'string'}, - 'scope': {'type': 'string'}}, - 'required': ['scope', 'directive'], - 'type': 'object'}, - 'RelationData': {'additionalProperties': False, - 'properties': {'InScope': {'type': 'boolean'}, - 'UnitData': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}}, - 'required': ['InScope', 'UnitData'], - 'type': 'object'}, - 'RelationSuspendedArg': {'additionalProperties': False, - 'properties': {'message': {'type': 'string'}, - 'relation-id': {'type': 'integer'}, - 'suspended': {'type': 'boolean'}}, - 'required': ['relation-id', - 'message', - 'suspended'], - 'type': 'object'}, - 'RelationSuspendedArgs': {'additionalProperties': False, - 'properties': {'args': {'items': {'$ref': '#/definitions/RelationSuspendedArg'}, - 'type': 'array'}}, - 'required': ['args'], - 'type': 'object'}, - 'RemoteEndpoint': {'additionalProperties': False, - 'properties': {'interface': {'type': 'string'}, - 'limit': {'type': 'integer'}, - 'name': {'type': 'string'}, - 'role': {'type': 'string'}}, - 'required': ['name', - 'role', - 'interface', - 'limit'], - 'type': 'object'}, - 'RemoteSpace': {'additionalProperties': False, - 'properties': {'cloud-type': {'type': 'string'}, - 'name': {'type': 'string'}, - 'provider-attributes': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'provider-id': {'type': 'string'}, - 'subnets': {'items': {'$ref': '#/definitions/Subnet'}, - 'type': 'array'}}, - 'required': ['cloud-type', - 'name', - 'provider-id', - 'provider-attributes', - 'subnets'], - 'type': 'object'}, - 'ScaleApplicationInfo': {'additionalProperties': False, - 'properties': {'num-units': {'type': 'integer'}}, - 'required': ['num-units'], - 'type': 'object'}, - 'ScaleApplicationParams': {'additionalProperties': False, - 'properties': {'application-tag': {'type': 'string'}, - 'force': {'type': 'boolean'}, - 'scale': {'type': 'integer'}, - 'scale-change': {'type': 'integer'}}, - 'required': ['application-tag', - 'scale', - 'force'], - 'type': 'object'}, - 'ScaleApplicationResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'info': {'$ref': '#/definitions/ScaleApplicationInfo'}}, - 'type': 'object'}, - 'ScaleApplicationResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/ScaleApplicationResult'}, - 'type': 'array'}}, - 'type': 'object'}, - 'ScaleApplicationsParams': {'additionalProperties': False, - 'properties': {'applications': {'items': {'$ref': '#/definitions/ScaleApplicationParams'}, - 'type': 'array'}}, - 'required': ['applications'], - 'type': 'object'}, - 'SetConstraints': {'additionalProperties': False, - 'properties': {'application': {'type': 'string'}, - 'constraints': {'$ref': '#/definitions/Value'}}, - 'required': ['application', 'constraints'], - 'type': 'object'}, - 'StorageConstraints': {'additionalProperties': False, - 'properties': {'count': {'type': 'integer'}, - 'pool': {'type': 'string'}, - 'size': {'type': 'integer'}}, - 'type': 'object'}, - 'StringResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'result': {'type': 'string'}}, - 'required': ['result'], - 'type': 'object'}, - 'Subnet': {'additionalProperties': False, - 'properties': {'cidr': {'type': 'string'}, - 'life': {'type': 'string'}, - 'provider-id': {'type': 'string'}, - 'provider-network-id': {'type': 'string'}, - 'provider-space-id': {'type': 'string'}, - 'space-tag': {'type': 'string'}, - 'status': {'type': 'string'}, - 'vlan-tag': {'type': 'integer'}, - 'zones': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'required': ['cidr', - 'vlan-tag', - 'life', - 'space-tag', - 'zones'], - 'type': 'object'}, - 'UnitInfoResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'result': {'$ref': '#/definitions/UnitResult'}}, - 'type': 'object'}, - 'UnitInfoResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/UnitInfoResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'UnitResult': {'additionalProperties': False, - 'properties': {'address': {'type': 'string'}, - 'charm': {'type': 'string'}, - 'leader': {'type': 'boolean'}, - 'life': {'type': 'string'}, - 'machine': {'type': 'string'}, - 'opened-ports': {'items': {'type': 'string'}, - 'type': 'array'}, - 'provider-id': {'type': 'string'}, - 'public-address': {'type': 'string'}, - 'relation-data': {'items': {'$ref': '#/definitions/EndpointRelationData'}, - 'type': 'array'}, - 'tag': {'type': 'string'}, - 'workload-version': {'type': 'string'}}, - 'required': ['tag', - 'workload-version', - 'opened-ports', - 'charm'], - 'type': 'object'}, - 'UnitsResolved': {'additionalProperties': False, - 'properties': {'all': {'type': 'boolean'}, - 'retry': {'type': 'boolean'}, - 'tags': {'$ref': '#/definitions/Entities'}}, - 'type': 'object'}, - 'UpdateChannelArg': {'additionalProperties': False, - 'properties': {'channel': {'type': 'string'}, - 'force': {'type': 'boolean'}, - 'tag': {'$ref': '#/definitions/Entity'}}, - 'required': ['tag', 'force', 'channel'], - 'type': 'object'}, - 'UpdateChannelArgs': {'additionalProperties': False, - 'properties': {'args': {'items': {'$ref': '#/definitions/UpdateChannelArg'}, - 'type': 'array'}}, - 'required': ['args'], - 'type': 'object'}, - 'Value': {'additionalProperties': False, - 'properties': {'allocate-public-ip': {'type': 'boolean'}, - 'arch': {'type': 'string'}, - 'container': {'type': 'string'}, - 'cores': {'type': 'integer'}, - 'cpu-power': {'type': 'integer'}, - 'instance-role': {'type': 'string'}, - 'instance-type': {'type': 'string'}, - 'mem': {'type': 'integer'}, - 'root-disk': {'type': 'integer'}, - 'root-disk-source': {'type': 'string'}, - 'spaces': {'items': {'type': 'string'}, - 'type': 'array'}, - 'tags': {'items': {'type': 'string'}, - 'type': 'array'}, - 'virt-type': {'type': 'string'}, - 'zones': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'type': 'object'}}, - 'properties': {'AddRelation': {'description': 'AddRelation adds a relation ' - 'between the specified ' - 'endpoints and returns the ' - 'relation info.', - 'properties': {'Params': {'$ref': '#/definitions/AddRelation'}, - 'Result': {'$ref': '#/definitions/AddRelationResults'}}, - 'type': 'object'}, - 'AddUnits': {'description': 'AddUnits adds a given number of ' - 'units to an application.', - 'properties': {'Params': {'$ref': '#/definitions/AddApplicationUnits'}, - 'Result': {'$ref': '#/definitions/AddApplicationUnitsResults'}}, - 'type': 'object'}, - 'ApplicationsInfo': {'description': 'ApplicationsInfo returns ' - 'applications information.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ApplicationInfoResults'}}, - 'type': 'object'}, - 'CharmConfig': {'description': 'CharmConfig returns charm ' - 'config for the input list of ' - 'applications and\n' - 'model generations.', - 'properties': {'Params': {'$ref': '#/definitions/ApplicationGetArgs'}, - 'Result': {'$ref': '#/definitions/ApplicationGetConfigResults'}}, - 'type': 'object'}, - 'CharmRelations': {'description': 'CharmRelations implements ' - 'the server side of ' - 'Application.CharmRelations.', - 'properties': {'Params': {'$ref': '#/definitions/ApplicationCharmRelations'}, - 'Result': {'$ref': '#/definitions/ApplicationCharmRelationsResults'}}, - 'type': 'object'}, - 'Consume': {'description': 'Consume adds remote applications ' - 'to the model without creating any\n' - 'relations.', - 'properties': {'Params': {'$ref': '#/definitions/ConsumeApplicationArgs'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'Deploy': {'description': 'Deploy fetches the charms from the ' - 'charm store and deploys them\n' - 'using the specified placement ' - 'directives.', - 'properties': {'Params': {'$ref': '#/definitions/ApplicationsDeploy'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'DeployFromRepository': {'description': 'DeployFromRepository ' - 'is a one-stop ' - 'deployment method for ' - 'repository\n' - 'charms. Only a charm ' - 'name is required to ' - 'deploy. If argument ' - 'validation\n' - 'fails, a list of all ' - 'errors found in ' - 'validation will be ' - 'returned. If a\n' - 'local resource is ' - 'provided, details ' - 'required for ' - 'uploading the ' - 'validated\n' - 'resource will be ' - 'returned.', - 'properties': {'Params': {'$ref': '#/definitions/DeployFromRepositoryArgs'}, - 'Result': {'$ref': '#/definitions/DeployFromRepositoryResults'}}, - 'type': 'object'}, - 'DestroyApplication': {'description': 'DestroyApplication ' - 'removes a given set of ' - 'applications.', - 'properties': {'Params': {'$ref': '#/definitions/DestroyApplicationsParams'}, - 'Result': {'$ref': '#/definitions/DestroyApplicationResults'}}, - 'type': 'object'}, - 'DestroyConsumedApplications': {'description': 'DestroyConsumedApplications ' - 'removes a ' - 'given set of ' - 'consumed ' - '(remote) ' - 'applications.', - 'properties': {'Params': {'$ref': '#/definitions/DestroyConsumedApplicationsParams'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'DestroyRelation': {'description': 'DestroyRelation removes ' - 'the relation between the\n' - 'specified endpoints or an ' - 'id.', - 'properties': {'Params': {'$ref': '#/definitions/DestroyRelation'}}, - 'type': 'object'}, - 'DestroyUnit': {'description': 'DestroyUnit removes a given ' - 'set of application units.', - 'properties': {'Params': {'$ref': '#/definitions/DestroyUnitsParams'}, - 'Result': {'$ref': '#/definitions/DestroyUnitResults'}}, - 'type': 'object'}, - 'Expose': {'description': 'Expose changes the juju-managed ' - 'firewall to expose any ports that\n' - 'were also explicitly marked by ' - 'units as open.', - 'properties': {'Params': {'$ref': '#/definitions/ApplicationExpose'}}, - 'type': 'object'}, - 'Get': {'description': 'Get returns the charm configuration ' - 'for an application.', - 'properties': {'Params': {'$ref': '#/definitions/ApplicationGet'}, - 'Result': {'$ref': '#/definitions/ApplicationGetResults'}}, - 'type': 'object'}, - 'GetCharmURLOrigin': {'description': 'GetCharmURLOrigin ' - 'returns the charm URL ' - 'and charm origin the ' - 'given\n' - 'application is running ' - 'at present.', - 'properties': {'Params': {'$ref': '#/definitions/ApplicationGet'}, - 'Result': {'$ref': '#/definitions/CharmURLOriginResult'}}, - 'type': 'object'}, - 'GetConfig': {'description': 'GetConfig returns the charm ' - 'config for each of the input ' - 'applications.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ApplicationGetConfigResults'}}, - 'type': 'object'}, - 'GetConstraints': {'description': 'GetConstraints returns the ' - 'constraints for a given ' - 'application.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ApplicationGetConstraintsResults'}}, - 'type': 'object'}, - 'Leader': {'description': 'Leader returns the unit name of the ' - 'leader for the given application.', - 'properties': {'Params': {'$ref': '#/definitions/Entity'}, - 'Result': {'$ref': '#/definitions/StringResult'}}, - 'type': 'object'}, - 'MergeBindings': {'description': 'MergeBindings merges ' - 'operator-defined bindings ' - 'with the current bindings ' - 'for\n' - 'one or more applications.', - 'properties': {'Params': {'$ref': '#/definitions/ApplicationMergeBindingsArgs'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'ResolveUnitErrors': {'description': 'ResolveUnitErrors marks ' - 'errors on the specified ' - 'units as resolved.', - 'properties': {'Params': {'$ref': '#/definitions/UnitsResolved'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'ScaleApplications': {'description': 'ScaleApplications scales ' - 'the specified ' - 'application to the ' - 'requested number of ' - 'units.', - 'properties': {'Params': {'$ref': '#/definitions/ScaleApplicationsParams'}, - 'Result': {'$ref': '#/definitions/ScaleApplicationResults'}}, - 'type': 'object'}, - 'SetCharm': {'description': 'SetCharm sets the charm for a ' - 'given for the application.', - 'properties': {'Params': {'$ref': '#/definitions/ApplicationSetCharm'}}, - 'type': 'object'}, - 'SetConfigs': {'description': 'SetConfigs implements the ' - 'server side of ' - 'Application.SetConfig. Both\n' - 'application and charm config ' - 'are set. It does not unset ' - 'values in\n' - 'Config map that are set to an ' - 'empty string. Unset should be ' - 'used for that.', - 'properties': {'Params': {'$ref': '#/definitions/ConfigSetArgs'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'SetConstraints': {'description': 'SetConstraints sets the ' - 'constraints for a given ' - 'application.', - 'properties': {'Params': {'$ref': '#/definitions/SetConstraints'}}, - 'type': 'object'}, - 'SetMetricCredentials': {'description': 'SetMetricCredentials ' - 'sets credentials on ' - 'the application.', - 'properties': {'Params': {'$ref': '#/definitions/ApplicationMetricCredentials'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'SetRelationsSuspended': {'description': 'SetRelationsSuspended ' - 'sets the suspended ' - 'status of the ' - 'specified relations.', - 'properties': {'Params': {'$ref': '#/definitions/RelationSuspendedArgs'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'Unexpose': {'description': 'Unexpose changes the juju-managed ' - 'firewall to unexpose any ports ' - 'that\n' - 'were also explicitly marked by ' - 'units as open.', - 'properties': {'Params': {'$ref': '#/definitions/ApplicationUnexpose'}}, - 'type': 'object'}, - 'UnitsInfo': {'description': 'UnitsInfo returns unit ' - 'information for the given ' - 'entities (units or\n' - 'applications).', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/UnitInfoResults'}}, - 'type': 'object'}, - 'UnsetApplicationsConfig': {'description': 'UnsetApplicationsConfig ' - 'implements the ' - 'server side of ' - 'Application.UnsetApplicationsConfig.', - 'properties': {'Params': {'$ref': '#/definitions/ApplicationConfigUnsetArgs'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'UpdateApplicationBase': {'description': 'UpdateApplicationBase ' - 'updates the ' - 'application base.\n' - 'Base for ' - 'subordinates is ' - 'updated too.', - 'properties': {'Params': {'$ref': '#/definitions/UpdateChannelArgs'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}}, - 'type': 'object'} - - - @ReturnMapping(AddRelationResults) - async def AddRelation(self, endpoints=None, via_cidrs=None): - ''' - AddRelation adds a relation between the specified endpoints and returns the relation info. - - endpoints : typing.Sequence[str] - via_cidrs : typing.Sequence[str] - Returns -> AddRelationResults - ''' - if endpoints is not None and not isinstance(endpoints, (bytes, str, list)): - raise Exception("Expected endpoints to be a Sequence, received: {}".format(type(endpoints))) - - if via_cidrs is not None and not isinstance(via_cidrs, (bytes, str, list)): - raise Exception("Expected via_cidrs to be a Sequence, received: {}".format(type(via_cidrs))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Application', - request='AddRelation', - version=18, - params=_params) - _params['endpoints'] = endpoints - _params['via-cidrs'] = via_cidrs - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(AddApplicationUnitsResults) - async def AddUnits(self, application=None, attach_storage=None, num_units=None, placement=None, policy=None): - ''' - AddUnits adds a given number of units to an application. - - application : str - attach_storage : typing.Sequence[str] - num_units : int - placement : typing.Sequence[~Placement] - policy : str - Returns -> AddApplicationUnitsResults - ''' - if application is not None and not isinstance(application, (bytes, str)): - raise Exception("Expected application to be a str, received: {}".format(type(application))) - - if attach_storage is not None and not isinstance(attach_storage, (bytes, str, list)): - raise Exception("Expected attach_storage to be a Sequence, received: {}".format(type(attach_storage))) - - if num_units is not None and not isinstance(num_units, int): - raise Exception("Expected num_units to be a int, received: {}".format(type(num_units))) - - if placement is not None and not isinstance(placement, (bytes, str, list)): - raise Exception("Expected placement to be a Sequence, received: {}".format(type(placement))) - - if policy is not None and not isinstance(policy, (bytes, str)): - raise Exception("Expected policy to be a str, received: {}".format(type(policy))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Application', - request='AddUnits', - version=18, - params=_params) - _params['application'] = application - _params['attach-storage'] = attach_storage - _params['num-units'] = num_units - _params['placement'] = placement - _params['policy'] = policy - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ApplicationInfoResults) - async def ApplicationsInfo(self, entities=None): - ''' - ApplicationsInfo returns applications information. - - entities : typing.Sequence[~Entity] - Returns -> ApplicationInfoResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Application', - request='ApplicationsInfo', - version=18, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ApplicationGetConfigResults) - async def CharmConfig(self, args=None): - ''' - CharmConfig returns charm config for the input list of applications and - model generations. - - args : typing.Sequence[~ApplicationGet] - Returns -> ApplicationGetConfigResults - ''' - if args is not None and not isinstance(args, (bytes, str, list)): - raise Exception("Expected args to be a Sequence, received: {}".format(type(args))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Application', - request='CharmConfig', - version=18, - params=_params) - _params['args'] = args - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ApplicationCharmRelationsResults) - async def CharmRelations(self, application=None): - ''' - CharmRelations implements the server side of Application.CharmRelations. - - application : str - Returns -> ApplicationCharmRelationsResults - ''' - if application is not None and not isinstance(application, (bytes, str)): - raise Exception("Expected application to be a str, received: {}".format(type(application))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Application', - request='CharmRelations', - version=18, - params=_params) - _params['application'] = application - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def Consume(self, args=None): - ''' - Consume adds remote applications to the model without creating any - relations. - - args : typing.Sequence[~ConsumeApplicationArg] - Returns -> ErrorResults - ''' - if args is not None and not isinstance(args, (bytes, str, list)): - raise Exception("Expected args to be a Sequence, received: {}".format(type(args))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Application', - request='Consume', - version=18, - params=_params) - _params['args'] = args - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def Deploy(self, applications=None): - ''' - Deploy fetches the charms from the charm store and deploys them - using the specified placement directives. - - applications : typing.Sequence[~ApplicationDeploy] - Returns -> ErrorResults - ''' - if applications is not None and not isinstance(applications, (bytes, str, list)): - raise Exception("Expected applications to be a Sequence, received: {}".format(type(applications))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Application', - request='Deploy', - version=18, - params=_params) - _params['applications'] = applications - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(DeployFromRepositoryResults) - async def DeployFromRepository(self, args=None): - ''' - DeployFromRepository is a one-stop deployment method for repository - charms. Only a charm name is required to deploy. If argument validation - fails, a list of all errors found in validation will be returned. If a - local resource is provided, details required for uploading the validated - resource will be returned. - - args : typing.Sequence[~DeployFromRepositoryArg] - Returns -> DeployFromRepositoryResults - ''' - if args is not None and not isinstance(args, (bytes, str, list)): - raise Exception("Expected args to be a Sequence, received: {}".format(type(args))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Application', - request='DeployFromRepository', - version=18, - params=_params) - _params['Args'] = args - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(DestroyApplicationResults) - async def DestroyApplication(self, applications=None): - ''' - DestroyApplication removes a given set of applications. - - applications : typing.Sequence[~DestroyApplicationParams] - Returns -> DestroyApplicationResults - ''' - if applications is not None and not isinstance(applications, (bytes, str, list)): - raise Exception("Expected applications to be a Sequence, received: {}".format(type(applications))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Application', - request='DestroyApplication', - version=18, - params=_params) - _params['applications'] = applications - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def DestroyConsumedApplications(self, applications=None): - ''' - DestroyConsumedApplications removes a given set of consumed (remote) applications. - - applications : typing.Sequence[~DestroyConsumedApplicationParams] - Returns -> ErrorResults - ''' - if applications is not None and not isinstance(applications, (bytes, str, list)): - raise Exception("Expected applications to be a Sequence, received: {}".format(type(applications))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Application', - request='DestroyConsumedApplications', - version=18, - params=_params) - _params['applications'] = applications - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(None) - async def DestroyRelation(self, endpoints=None, force=None, max_wait=None, relation_id=None): - ''' - DestroyRelation removes the relation between the - specified endpoints or an id. - - endpoints : typing.Sequence[str] - force : bool - max_wait : int - relation_id : int - Returns -> None - ''' - if endpoints is not None and not isinstance(endpoints, (bytes, str, list)): - raise Exception("Expected endpoints to be a Sequence, received: {}".format(type(endpoints))) - - if force is not None and not isinstance(force, bool): - raise Exception("Expected force to be a bool, received: {}".format(type(force))) - - if max_wait is not None and not isinstance(max_wait, int): - raise Exception("Expected max_wait to be a int, received: {}".format(type(max_wait))) - - if relation_id is not None and not isinstance(relation_id, int): - raise Exception("Expected relation_id to be a int, received: {}".format(type(relation_id))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Application', - request='DestroyRelation', - version=18, - params=_params) - _params['endpoints'] = endpoints - _params['force'] = force - _params['max-wait'] = max_wait - _params['relation-id'] = relation_id - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(DestroyUnitResults) - async def DestroyUnit(self, units=None): - ''' - DestroyUnit removes a given set of application units. - - units : typing.Sequence[~DestroyUnitParams] - Returns -> DestroyUnitResults - ''' - if units is not None and not isinstance(units, (bytes, str, list)): - raise Exception("Expected units to be a Sequence, received: {}".format(type(units))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Application', - request='DestroyUnit', - version=18, - params=_params) - _params['units'] = units - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(None) - async def Expose(self, application=None, exposed_endpoints=None): - ''' - Expose changes the juju-managed firewall to expose any ports that - were also explicitly marked by units as open. - - application : str - exposed_endpoints : typing.Mapping[str, ~ExposedEndpoint] - Returns -> None - ''' - if application is not None and not isinstance(application, (bytes, str)): - raise Exception("Expected application to be a str, received: {}".format(type(application))) - - if exposed_endpoints is not None and not isinstance(exposed_endpoints, dict): - raise Exception("Expected exposed_endpoints to be a Mapping, received: {}".format(type(exposed_endpoints))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Application', - request='Expose', - version=18, - params=_params) - _params['application'] = application - _params['exposed-endpoints'] = exposed_endpoints - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ApplicationGetResults) - async def Get(self, application=None, branch=None): - ''' - Get returns the charm configuration for an application. - - application : str - branch : str - Returns -> ApplicationGetResults - ''' - if application is not None and not isinstance(application, (bytes, str)): - raise Exception("Expected application to be a str, received: {}".format(type(application))) - - if branch is not None and not isinstance(branch, (bytes, str)): - raise Exception("Expected branch to be a str, received: {}".format(type(branch))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Application', - request='Get', - version=18, - params=_params) - _params['application'] = application - _params['branch'] = branch - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(CharmURLOriginResult) - async def GetCharmURLOrigin(self, application=None, branch=None): - ''' - GetCharmURLOrigin returns the charm URL and charm origin the given - application is running at present. - - application : str - branch : str - Returns -> CharmURLOriginResult - ''' - if application is not None and not isinstance(application, (bytes, str)): - raise Exception("Expected application to be a str, received: {}".format(type(application))) - - if branch is not None and not isinstance(branch, (bytes, str)): - raise Exception("Expected branch to be a str, received: {}".format(type(branch))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Application', - request='GetCharmURLOrigin', - version=18, - params=_params) - _params['application'] = application - _params['branch'] = branch - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ApplicationGetConfigResults) - async def GetConfig(self, entities=None): - ''' - GetConfig returns the charm config for each of the input applications. - - entities : typing.Sequence[~Entity] - Returns -> ApplicationGetConfigResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Application', - request='GetConfig', - version=18, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ApplicationGetConstraintsResults) - async def GetConstraints(self, entities=None): - ''' - GetConstraints returns the constraints for a given application. - - entities : typing.Sequence[~Entity] - Returns -> ApplicationGetConstraintsResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Application', - request='GetConstraints', - version=18, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringResult) - async def Leader(self, tag=None): - ''' - Leader returns the unit name of the leader for the given application. - - tag : str - Returns -> StringResult - ''' - if tag is not None and not isinstance(tag, (bytes, str)): - raise Exception("Expected tag to be a str, received: {}".format(type(tag))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Application', - request='Leader', - version=18, - params=_params) - _params['tag'] = tag - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def MergeBindings(self, args=None): - ''' - MergeBindings merges operator-defined bindings with the current bindings for - one or more applications. - - args : typing.Sequence[~ApplicationMergeBindings] - Returns -> ErrorResults - ''' - if args is not None and not isinstance(args, (bytes, str, list)): - raise Exception("Expected args to be a Sequence, received: {}".format(type(args))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Application', - request='MergeBindings', - version=18, - params=_params) - _params['args'] = args - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def ResolveUnitErrors(self, all_=None, retry=None, tags=None): - ''' - ResolveUnitErrors marks errors on the specified units as resolved. - - all_ : bool - retry : bool - tags : Entities - Returns -> ErrorResults - ''' - if all_ is not None and not isinstance(all_, bool): - raise Exception("Expected all_ to be a bool, received: {}".format(type(all_))) - - if retry is not None and not isinstance(retry, bool): - raise Exception("Expected retry to be a bool, received: {}".format(type(retry))) - - if tags is not None and not isinstance(tags, (dict, Entities)): - raise Exception("Expected tags to be a Entities, received: {}".format(type(tags))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Application', - request='ResolveUnitErrors', - version=18, - params=_params) - _params['all'] = all_ - _params['retry'] = retry - _params['tags'] = tags - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ScaleApplicationResults) - async def ScaleApplications(self, applications=None): - ''' - ScaleApplications scales the specified application to the requested number of units. - - applications : typing.Sequence[~ScaleApplicationParams] - Returns -> ScaleApplicationResults - ''' - if applications is not None and not isinstance(applications, (bytes, str, list)): - raise Exception("Expected applications to be a Sequence, received: {}".format(type(applications))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Application', - request='ScaleApplications', - version=18, - params=_params) - _params['applications'] = applications - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(None) - async def SetCharm(self, application=None, channel=None, charm_origin=None, charm_url=None, config_settings=None, config_settings_yaml=None, endpoint_bindings=None, force=None, force_base=None, force_units=None, generation=None, resource_ids=None, storage_constraints=None): - ''' - SetCharm sets the charm for a given for the application. - - application : str - channel : str - charm_origin : CharmOrigin - charm_url : str - config_settings : typing.Mapping[str, str] - config_settings_yaml : str - endpoint_bindings : typing.Mapping[str, str] - force : bool - force_base : bool - force_units : bool - generation : str - resource_ids : typing.Mapping[str, str] - storage_constraints : typing.Mapping[str, ~StorageConstraints] - Returns -> None - ''' - if application is not None and not isinstance(application, (bytes, str)): - raise Exception("Expected application to be a str, received: {}".format(type(application))) - - if channel is not None and not isinstance(channel, (bytes, str)): - raise Exception("Expected channel to be a str, received: {}".format(type(channel))) - - if charm_origin is not None and not isinstance(charm_origin, (dict, CharmOrigin)): - raise Exception("Expected charm_origin to be a CharmOrigin, received: {}".format(type(charm_origin))) - - if charm_url is not None and not isinstance(charm_url, (bytes, str)): - raise Exception("Expected charm_url to be a str, received: {}".format(type(charm_url))) - - if config_settings is not None and not isinstance(config_settings, dict): - raise Exception("Expected config_settings to be a Mapping, received: {}".format(type(config_settings))) - - if config_settings_yaml is not None and not isinstance(config_settings_yaml, (bytes, str)): - raise Exception("Expected config_settings_yaml to be a str, received: {}".format(type(config_settings_yaml))) - - if endpoint_bindings is not None and not isinstance(endpoint_bindings, dict): - raise Exception("Expected endpoint_bindings to be a Mapping, received: {}".format(type(endpoint_bindings))) - - if force is not None and not isinstance(force, bool): - raise Exception("Expected force to be a bool, received: {}".format(type(force))) - - if force_base is not None and not isinstance(force_base, bool): - raise Exception("Expected force_base to be a bool, received: {}".format(type(force_base))) - - if force_units is not None and not isinstance(force_units, bool): - raise Exception("Expected force_units to be a bool, received: {}".format(type(force_units))) - - if generation is not None and not isinstance(generation, (bytes, str)): - raise Exception("Expected generation to be a str, received: {}".format(type(generation))) - - if resource_ids is not None and not isinstance(resource_ids, dict): - raise Exception("Expected resource_ids to be a Mapping, received: {}".format(type(resource_ids))) - - if storage_constraints is not None and not isinstance(storage_constraints, dict): - raise Exception("Expected storage_constraints to be a Mapping, received: {}".format(type(storage_constraints))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Application', - request='SetCharm', - version=18, - params=_params) - _params['application'] = application - _params['channel'] = channel - _params['charm-origin'] = charm_origin - _params['charm-url'] = charm_url - _params['config-settings'] = config_settings - _params['config-settings-yaml'] = config_settings_yaml - _params['endpoint-bindings'] = endpoint_bindings - _params['force'] = force - _params['force-base'] = force_base - _params['force-units'] = force_units - _params['generation'] = generation - _params['resource-ids'] = resource_ids - _params['storage-constraints'] = storage_constraints - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def SetConfigs(self, args=None): - ''' - SetConfigs implements the server side of Application.SetConfig. Both - application and charm config are set. It does not unset values in - Config map that are set to an empty string. Unset should be used for that. - - args : typing.Sequence[~ConfigSet] - Returns -> ErrorResults - ''' - if args is not None and not isinstance(args, (bytes, str, list)): - raise Exception("Expected args to be a Sequence, received: {}".format(type(args))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Application', - request='SetConfigs', - version=18, - params=_params) - _params['Args'] = args - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(None) - async def SetConstraints(self, application=None, constraints=None): - ''' - SetConstraints sets the constraints for a given application. - - application : str - constraints : Value - Returns -> None - ''' - if application is not None and not isinstance(application, (bytes, str)): - raise Exception("Expected application to be a str, received: {}".format(type(application))) - - if constraints is not None and not isinstance(constraints, (dict, Value)): - raise Exception("Expected constraints to be a Value, received: {}".format(type(constraints))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Application', - request='SetConstraints', - version=18, - params=_params) - _params['application'] = application - _params['constraints'] = constraints - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def SetMetricCredentials(self, creds=None): - ''' - SetMetricCredentials sets credentials on the application. - - creds : typing.Sequence[~ApplicationMetricCredential] - Returns -> ErrorResults - ''' - if creds is not None and not isinstance(creds, (bytes, str, list)): - raise Exception("Expected creds to be a Sequence, received: {}".format(type(creds))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Application', - request='SetMetricCredentials', - version=18, - params=_params) - _params['creds'] = creds - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def SetRelationsSuspended(self, args=None): - ''' - SetRelationsSuspended sets the suspended status of the specified relations. - - args : typing.Sequence[~RelationSuspendedArg] - Returns -> ErrorResults - ''' - if args is not None and not isinstance(args, (bytes, str, list)): - raise Exception("Expected args to be a Sequence, received: {}".format(type(args))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Application', - request='SetRelationsSuspended', - version=18, - params=_params) - _params['args'] = args - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(None) - async def Unexpose(self, application=None, exposed_endpoints=None): - ''' - Unexpose changes the juju-managed firewall to unexpose any ports that - were also explicitly marked by units as open. - - application : str - exposed_endpoints : typing.Sequence[str] - Returns -> None - ''' - if application is not None and not isinstance(application, (bytes, str)): - raise Exception("Expected application to be a str, received: {}".format(type(application))) - - if exposed_endpoints is not None and not isinstance(exposed_endpoints, (bytes, str, list)): - raise Exception("Expected exposed_endpoints to be a Sequence, received: {}".format(type(exposed_endpoints))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Application', - request='Unexpose', - version=18, - params=_params) - _params['application'] = application - _params['exposed-endpoints'] = exposed_endpoints - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(UnitInfoResults) - async def UnitsInfo(self, entities=None): - ''' - UnitsInfo returns unit information for the given entities (units or - applications). - - entities : typing.Sequence[~Entity] - Returns -> UnitInfoResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Application', - request='UnitsInfo', - version=18, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def UnsetApplicationsConfig(self, args=None): - ''' - UnsetApplicationsConfig implements the server side of Application.UnsetApplicationsConfig. - - args : typing.Sequence[~ApplicationUnset] - Returns -> ErrorResults - ''' - if args is not None and not isinstance(args, (bytes, str, list)): - raise Exception("Expected args to be a Sequence, received: {}".format(type(args))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Application', - request='UnsetApplicationsConfig', - version=18, - params=_params) - _params['Args'] = args - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def UpdateApplicationBase(self, args=None): - ''' - UpdateApplicationBase updates the application base. - Base for subordinates is updated too. - - args : typing.Sequence[~UpdateChannelArg] - Returns -> ErrorResults - ''' - if args is not None and not isinstance(args, (bytes, str, list)): - raise Exception("Expected args to be a Sequence, received: {}".format(type(args))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Application', - request='UpdateApplicationBase', - version=18, - params=_params) - _params['args'] = args - reply = await self.rpc(msg) - return reply - - - -class UniterFacade(Type): - name = 'Uniter' - version = 18 - schema = {'definitions': {'APIHostPortsResult': {'additionalProperties': False, - 'properties': {'servers': {'items': {'items': {'$ref': '#/definitions/HostPort'}, - 'type': 'array'}, - 'type': 'array'}}, - 'required': ['servers'], - 'type': 'object'}, - 'Action': {'additionalProperties': False, - 'properties': {'execution-group': {'type': 'string'}, - 'name': {'type': 'string'}, - 'parallel': {'type': 'boolean'}, - 'parameters': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'receiver': {'type': 'string'}, - 'tag': {'type': 'string'}}, - 'required': ['tag', 'receiver', 'name'], - 'type': 'object'}, - 'ActionExecutionResult': {'additionalProperties': False, - 'properties': {'action-tag': {'type': 'string'}, - 'message': {'type': 'string'}, - 'results': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'status': {'type': 'string'}}, - 'required': ['action-tag', 'status'], - 'type': 'object'}, - 'ActionExecutionResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/ActionExecutionResult'}, - 'type': 'array'}}, - 'type': 'object'}, - 'ActionMessage': {'additionalProperties': False, - 'properties': {'message': {'type': 'string'}, - 'timestamp': {'format': 'date-time', - 'type': 'string'}}, - 'required': ['timestamp', 'message'], - 'type': 'object'}, - 'ActionMessageParams': {'additionalProperties': False, - 'properties': {'messages': {'items': {'$ref': '#/definitions/EntityString'}, - 'type': 'array'}}, - 'required': ['messages'], - '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'}, - 'log': {'items': {'$ref': '#/definitions/ActionMessage'}, - 'type': 'array'}, - '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': {'cidr': {'type': 'string'}, - 'config-type': {'type': 'string'}, - 'is-secondary': {'type': 'boolean'}, - 'scope': {'type': 'string'}, - 'space-id': {'type': 'string'}, - 'space-name': {'type': 'string'}, - 'type': {'type': 'string'}, - 'value': {'type': 'string'}}, - 'required': ['value', 'type', 'scope'], - 'type': 'object'}, - 'ApplicationOpenedPorts': {'additionalProperties': False, - 'properties': {'endpoint': {'type': 'string'}, - 'port-ranges': {'items': {'$ref': '#/definitions/PortRange'}, - 'type': 'array'}}, - 'required': ['endpoint', - 'port-ranges'], - 'type': 'object'}, - 'ApplicationOpenedPortsResult': {'additionalProperties': False, - 'properties': {'application-port-ranges': {'items': {'$ref': '#/definitions/ApplicationOpenedPorts'}, - 'type': 'array'}, - 'error': {'$ref': '#/definitions/Error'}}, - 'required': ['application-port-ranges'], - 'type': 'object'}, - 'ApplicationOpenedPortsResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/ApplicationOpenedPortsResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'ApplicationStatusResult': {'additionalProperties': False, - 'properties': {'application': {'$ref': '#/definitions/StatusResult'}, - 'error': {'$ref': '#/definitions/Error'}, - 'units': {'patternProperties': {'.*': {'$ref': '#/definitions/StatusResult'}}, - 'type': 'object'}}, - 'required': ['application', - 'units'], - 'type': 'object'}, - 'ApplicationStatusResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/ApplicationStatusResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'BoolResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'result': {'type': 'boolean'}}, - 'required': ['result'], - 'type': 'object'}, - 'BoolResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/BoolResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'CharmRelation': {'additionalProperties': False, - 'properties': {'interface': {'type': 'string'}, - 'limit': {'type': 'integer'}, - 'name': {'type': 'string'}, - 'optional': {'type': 'boolean'}, - 'role': {'type': 'string'}, - 'scope': {'type': 'string'}}, - 'required': ['name', - 'role', - 'interface', - 'optional', - 'limit', - 'scope'], - 'type': 'object'}, - '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'}, - 'CloudCredential': {'additionalProperties': False, - 'properties': {'attrs': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}, - 'auth-type': {'type': 'string'}, - 'redacted': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'required': ['auth-type'], - 'type': 'object'}, - 'CloudSpec': {'additionalProperties': False, - 'properties': {'cacertificates': {'items': {'type': 'string'}, - 'type': 'array'}, - 'credential': {'$ref': '#/definitions/CloudCredential'}, - 'endpoint': {'type': 'string'}, - 'identity-endpoint': {'type': 'string'}, - 'is-controller-cloud': {'type': 'boolean'}, - 'name': {'type': 'string'}, - 'region': {'type': 'string'}, - 'skip-tls-verify': {'type': 'boolean'}, - 'storage-endpoint': {'type': 'string'}, - 'type': {'type': 'string'}}, - 'required': ['type', 'name'], - 'type': 'object'}, - 'CloudSpecResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'result': {'$ref': '#/definitions/CloudSpec'}}, - 'type': 'object'}, - 'CommitHookChangesArg': {'additionalProperties': False, - 'properties': {'add-storage': {'items': {'$ref': '#/definitions/StorageAddParams'}, - 'type': 'array'}, - 'close-ports': {'items': {'$ref': '#/definitions/EntityPortRange'}, - 'type': 'array'}, - 'open-ports': {'items': {'$ref': '#/definitions/EntityPortRange'}, - 'type': 'array'}, - 'pod-spec': {'$ref': '#/definitions/PodSpec'}, - 'relation-unit-settings': {'items': {'$ref': '#/definitions/RelationUnitSettings'}, - 'type': 'array'}, - 'secret-creates': {'items': {'$ref': '#/definitions/CreateSecretArg'}, - 'type': 'array'}, - 'secret-deletes': {'items': {'$ref': '#/definitions/DeleteSecretArg'}, - 'type': 'array'}, - 'secret-grants': {'items': {'$ref': '#/definitions/GrantRevokeSecretArg'}, - 'type': 'array'}, - 'secret-revokes': {'items': {'$ref': '#/definitions/GrantRevokeSecretArg'}, - 'type': 'array'}, - 'secret-updates': {'items': {'$ref': '#/definitions/UpdateSecretArg'}, - 'type': 'array'}, - 'set-raw-k8s-spec': {'$ref': '#/definitions/PodSpec'}, - 'tag': {'type': 'string'}, - 'unit-state': {'$ref': '#/definitions/SetUnitStateArg'}, - 'update-network-info': {'type': 'boolean'}}, - 'required': ['tag', - 'update-network-info'], - 'type': 'object'}, - 'CommitHookChangesArgs': {'additionalProperties': False, - 'properties': {'args': {'items': {'$ref': '#/definitions/CommitHookChangesArg'}, - 'type': 'array'}}, - 'required': ['args'], - 'type': 'object'}, - 'ConfigSettingsResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'settings': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}}, - 'required': ['settings'], - 'type': 'object'}, - 'ConfigSettingsResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/ConfigSettingsResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'CreateSecretArg': {'additionalProperties': False, - 'properties': {'UpsertSecretArg': {'$ref': '#/definitions/UpsertSecretArg'}, - 'content': {'$ref': '#/definitions/SecretContentParams'}, - 'description': {'type': 'string'}, - 'expire-time': {'format': 'date-time', - 'type': 'string'}, - 'label': {'type': 'string'}, - 'owner-tag': {'type': 'string'}, - 'params': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'rotate-policy': {'type': 'string'}, - 'uri': {'type': 'string'}}, - 'required': ['UpsertSecretArg', - 'owner-tag'], - 'type': 'object'}, - 'CreateSecretArgs': {'additionalProperties': False, - 'properties': {'args': {'items': {'$ref': '#/definitions/CreateSecretArg'}, - 'type': 'array'}}, - 'required': ['args'], - 'type': 'object'}, - 'CreateSecretURIsArg': {'additionalProperties': False, - 'properties': {'count': {'type': 'integer'}}, - 'required': ['count'], - 'type': 'object'}, - 'DeleteSecretArg': {'additionalProperties': False, - 'properties': {'revisions': {'items': {'type': 'integer'}, - 'type': 'array'}, - 'uri': {'type': 'string'}}, - 'required': ['uri'], - 'type': 'object'}, - 'DeleteSecretArgs': {'additionalProperties': False, - 'properties': {'args': {'items': {'$ref': '#/definitions/DeleteSecretArg'}, - 'type': 'array'}}, - 'required': ['args'], - 'type': 'object'}, - 'Endpoint': {'additionalProperties': False, - 'properties': {'application-name': {'type': 'string'}, - 'relation': {'$ref': '#/definitions/CharmRelation'}}, - 'required': ['application-name', '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'}, - 'Entity': {'additionalProperties': False, - 'properties': {'tag': {'type': 'string'}}, - 'required': ['tag'], - 'type': 'object'}, - 'EntityCharmURL': {'additionalProperties': False, - 'properties': {'charm-url': {'type': 'string'}, - 'tag': {'type': 'string'}}, - 'required': ['tag', 'charm-url'], - 'type': 'object'}, - 'EntityPortRange': {'additionalProperties': False, - 'properties': {'endpoint': {'type': 'string'}, - 'from-port': {'type': 'integer'}, - 'protocol': {'type': 'string'}, - 'tag': {'type': 'string'}, - 'to-port': {'type': 'integer'}}, - 'required': ['tag', - 'protocol', - 'from-port', - 'to-port', - 'endpoint'], - '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'}, - 'EntityString': {'additionalProperties': False, - 'properties': {'tag': {'type': 'string'}, - 'value': {'type': 'string'}}, - 'required': ['tag', 'value'], - 'type': 'object'}, - 'EntityWorkloadVersion': {'additionalProperties': False, - 'properties': {'tag': {'type': 'string'}, - 'workload-version': {'type': 'string'}}, - 'required': ['tag', - 'workload-version'], - 'type': 'object'}, - 'EntityWorkloadVersions': {'additionalProperties': False, - 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityWorkloadVersion'}, - 'type': 'array'}}, - 'required': ['entities'], - 'type': 'object'}, - 'Error': {'additionalProperties': False, - 'properties': {'code': {'type': 'string'}, - 'info': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'message': {'type': 'string'}}, - 'required': ['message', 'code'], - 'type': 'object'}, - 'ErrorResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}}, - 'type': 'object'}, - 'ErrorResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - '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'], - 'type': 'object'}, - 'GetSecretConsumerInfoArgs': {'additionalProperties': False, - 'properties': {'consumer-tag': {'type': 'string'}, - 'uris': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'required': ['consumer-tag', - 'uris'], - 'type': 'object'}, - 'GetSecretContentArg': {'additionalProperties': False, - 'properties': {'label': {'type': 'string'}, - 'peek': {'type': 'boolean'}, - 'refresh': {'type': 'boolean'}, - 'uri': {'type': 'string'}}, - 'required': ['uri'], - 'type': 'object'}, - 'GetSecretContentArgs': {'additionalProperties': False, - 'properties': {'args': {'items': {'$ref': '#/definitions/GetSecretContentArg'}, - 'type': 'array'}}, - 'required': ['args'], - 'type': 'object'}, - 'GoalState': {'additionalProperties': False, - 'properties': {'relations': {'patternProperties': {'.*': {'patternProperties': {'.*': {'$ref': '#/definitions/GoalStateStatus'}}, - 'type': 'object'}}, - 'type': 'object'}, - 'units': {'patternProperties': {'.*': {'$ref': '#/definitions/GoalStateStatus'}}, - 'type': 'object'}}, - 'required': ['units', 'relations'], - 'type': 'object'}, - 'GoalStateResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'result': {'$ref': '#/definitions/GoalState'}}, - 'required': ['result', 'error'], - 'type': 'object'}, - 'GoalStateResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/GoalStateResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'GoalStateStatus': {'additionalProperties': False, - 'properties': {'since': {'format': 'date-time', - 'type': 'string'}, - 'status': {'type': 'string'}}, - 'required': ['status', 'since'], - 'type': 'object'}, - 'GrantRevokeSecretArg': {'additionalProperties': False, - 'properties': {'role': {'type': 'string'}, - 'scope-tag': {'type': 'string'}, - 'subject-tags': {'items': {'type': 'string'}, - 'type': 'array'}, - 'uri': {'type': 'string'}}, - 'required': ['uri', - 'scope-tag', - 'subject-tags', - 'role'], - 'type': 'object'}, - 'GrantRevokeSecretArgs': {'additionalProperties': False, - 'properties': {'args': {'items': {'$ref': '#/definitions/GrantRevokeSecretArg'}, - 'type': 'array'}}, - 'required': ['args'], - 'type': 'object'}, - 'HostPort': {'additionalProperties': False, - 'properties': {'Address': {'$ref': '#/definitions/Address'}, - 'cidr': {'type': 'string'}, - 'config-type': {'type': 'string'}, - 'is-secondary': {'type': 'boolean'}, - 'port': {'type': 'integer'}, - 'scope': {'type': 'string'}, - 'space-id': {'type': 'string'}, - 'space-name': {'type': 'string'}, - 'type': {'type': 'string'}, - 'value': {'type': 'string'}}, - 'required': ['value', - 'type', - 'scope', - 'Address', - 'port'], - 'type': 'object'}, - 'IntResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'result': {'type': 'integer'}}, - 'required': ['result'], - 'type': 'object'}, - 'IntResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/IntResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'InterfaceAddress': {'additionalProperties': False, - 'properties': {'cidr': {'type': 'string'}, - 'hostname': {'type': 'string'}, - 'value': {'type': 'string'}}, - 'required': ['hostname', 'value', 'cidr'], - 'type': 'object'}, - 'LifeResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'life': {'type': 'string'}}, - 'required': ['life'], - 'type': 'object'}, - 'LifeResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'ListSecretResult': {'additionalProperties': False, - 'properties': {'create-time': {'format': 'date-time', - 'type': 'string'}, - 'description': {'type': 'string'}, - 'label': {'type': 'string'}, - 'latest-expire-time': {'format': 'date-time', - 'type': 'string'}, - 'latest-revision': {'type': 'integer'}, - 'next-rotate-time': {'format': 'date-time', - 'type': 'string'}, - 'owner-tag': {'type': 'string'}, - 'revisions': {'items': {'$ref': '#/definitions/SecretRevision'}, - 'type': 'array'}, - 'rotate-policy': {'type': 'string'}, - 'update-time': {'format': 'date-time', - 'type': 'string'}, - 'uri': {'type': 'string'}, - 'value': {'$ref': '#/definitions/SecretValueResult'}, - 'version': {'type': 'integer'}}, - 'required': ['uri', - 'version', - 'owner-tag', - 'latest-revision', - 'create-time', - 'update-time', - 'revisions'], - 'type': 'object'}, - 'ListSecretResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/ListSecretResult'}, - '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': {'application-tag': {'type': 'string'}, - 'settings': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}, - 'unit-tag': {'type': 'string'}}, - 'required': ['settings'], - 'type': 'object'}, - 'MeterStatusResult': {'additionalProperties': False, - 'properties': {'code': {'type': 'string'}, - 'error': {'$ref': '#/definitions/Error'}, - 'info': {'type': 'string'}}, - 'required': ['code', 'info'], - 'type': 'object'}, - 'MeterStatusResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/MeterStatusResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'Metric': {'additionalProperties': False, - 'properties': {'key': {'type': 'string'}, - 'labels': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}, - 'time': {'format': 'date-time', - 'type': 'string'}, - 'value': {'type': 'string'}}, - 'required': ['key', 'value', 'time'], - 'type': 'object'}, - 'MetricBatch': {'additionalProperties': False, - 'properties': {'charm-url': {'type': 'string'}, - 'created': {'format': 'date-time', - 'type': 'string'}, - 'metrics': {'items': {'$ref': '#/definitions/Metric'}, - 'type': 'array'}, - 'uuid': {'type': 'string'}}, - 'required': ['uuid', - 'charm-url', - 'created', - 'metrics'], - 'type': 'object'}, - 'MetricBatchParam': {'additionalProperties': False, - 'properties': {'batch': {'$ref': '#/definitions/MetricBatch'}, - 'tag': {'type': 'string'}}, - 'required': ['tag', 'batch'], - 'type': 'object'}, - 'MetricBatchParams': {'additionalProperties': False, - 'properties': {'batches': {'items': {'$ref': '#/definitions/MetricBatchParam'}, - 'type': 'array'}}, - 'required': ['batches'], - 'type': 'object'}, - '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'}, - 'type': {'type': 'string'}, - 'uuid': {'type': 'string'}}, - 'required': ['name', 'uuid', 'type'], - 'type': 'object'}, - 'NetworkInfo': {'additionalProperties': False, - 'properties': {'addresses': {'items': {'$ref': '#/definitions/InterfaceAddress'}, - 'type': 'array'}, - 'interface-name': {'type': 'string'}, - 'mac-address': {'type': 'string'}}, - 'required': ['mac-address', - 'interface-name', - 'addresses'], - 'type': 'object'}, - 'NetworkInfoParams': {'additionalProperties': False, - 'properties': {'bindings': {'items': {'type': 'string'}, - 'type': 'array'}, - 'relation-id': {'type': 'integer'}, - 'unit': {'type': 'string'}}, - 'required': ['unit', 'bindings'], - 'type': 'object'}, - 'NetworkInfoResult': {'additionalProperties': False, - 'properties': {'bind-addresses': {'items': {'$ref': '#/definitions/NetworkInfo'}, - 'type': 'array'}, - 'egress-subnets': {'items': {'type': 'string'}, - 'type': 'array'}, - 'error': {'$ref': '#/definitions/Error'}, - 'ingress-addresses': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'type': 'object'}, - 'NetworkInfoResults': {'additionalProperties': False, - 'properties': {'results': {'patternProperties': {'.*': {'$ref': '#/definitions/NetworkInfoResult'}}, - 'type': 'object'}}, - 'required': ['results'], - 'type': 'object'}, - 'NotifyWatchResult': {'additionalProperties': False, - 'properties': {'NotifyWatcherId': {'type': 'string'}, - 'error': {'$ref': '#/definitions/Error'}}, - 'required': ['NotifyWatcherId'], - 'type': 'object'}, - 'NotifyWatchResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'OpenPortRangesByEndpointResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'unit-port-ranges': {'patternProperties': {'.*': {'items': {'$ref': '#/definitions/OpenUnitPortRangesByEndpoint'}, - 'type': 'array'}}, - 'type': 'object'}}, - 'required': ['unit-port-ranges'], - 'type': 'object'}, - 'OpenPortRangesByEndpointResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/OpenPortRangesByEndpointResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'OpenUnitPortRangesByEndpoint': {'additionalProperties': False, - 'properties': {'endpoint': {'type': 'string'}, - 'port-ranges': {'items': {'$ref': '#/definitions/PortRange'}, - 'type': 'array'}}, - 'required': ['endpoint', - 'port-ranges'], - 'type': 'object'}, - 'PodSpec': {'additionalProperties': False, - 'properties': {'spec': {'type': 'string'}, - 'tag': {'type': 'string'}}, - 'required': ['tag'], - 'type': 'object'}, - 'PortRange': {'additionalProperties': False, - 'properties': {'from-port': {'type': 'integer'}, - 'protocol': {'type': 'string'}, - 'to-port': {'type': 'integer'}}, - 'required': ['from-port', 'to-port', 'protocol'], - 'type': 'object'}, - 'RelationIds': {'additionalProperties': False, - 'properties': {'relation-ids': {'items': {'type': 'integer'}, - 'type': 'array'}}, - 'required': ['relation-ids'], - 'type': 'object'}, - 'RelationResult': {'additionalProperties': False, - 'properties': {'bool': {'type': 'boolean'}, - 'endpoint': {'$ref': '#/definitions/Endpoint'}, - 'error': {'$ref': '#/definitions/Error'}, - 'id': {'type': 'integer'}, - 'key': {'type': 'string'}, - 'life': {'type': 'string'}, - 'other-application': {'type': 'string'}}, - 'required': ['life', - 'id', - 'key', - 'endpoint'], - 'type': 'object'}, - 'RelationResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/RelationResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'RelationStatusArg': {'additionalProperties': False, - 'properties': {'message': {'type': 'string'}, - 'relation-id': {'type': 'integer'}, - 'status': {'type': 'string'}, - 'unit-tag': {'type': 'string'}}, - 'required': ['unit-tag', - 'relation-id', - 'status', - 'message'], - 'type': 'object'}, - 'RelationStatusArgs': {'additionalProperties': False, - 'properties': {'args': {'items': {'$ref': '#/definitions/RelationStatusArg'}, - 'type': 'array'}}, - 'required': ['args'], - 'type': 'object'}, - 'RelationUnit': {'additionalProperties': False, - 'properties': {'relation': {'type': 'string'}, - 'unit': {'type': 'string'}}, - 'required': ['relation', 'unit'], - 'type': 'object'}, - 'RelationUnitPair': {'additionalProperties': False, - 'properties': {'local-unit': {'type': 'string'}, - 'relation': {'type': 'string'}, - 'remote-unit': {'type': 'string'}}, - 'required': ['relation', - 'local-unit', - 'remote-unit'], - 'type': 'object'}, - 'RelationUnitPairs': {'additionalProperties': False, - 'properties': {'relation-unit-pairs': {'items': {'$ref': '#/definitions/RelationUnitPair'}, - 'type': 'array'}}, - 'required': ['relation-unit-pairs'], - 'type': 'object'}, - 'RelationUnitSettings': {'additionalProperties': False, - 'properties': {'application-settings': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}, - 'relation': {'type': 'string'}, - 'settings': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}, - 'unit': {'type': 'string'}}, - 'required': ['relation', - 'unit', - 'settings', - 'application-settings'], - 'type': 'object'}, - 'RelationUnitStatus': {'additionalProperties': False, - 'properties': {'in-scope': {'type': 'boolean'}, - 'relation-tag': {'type': 'string'}, - 'suspended': {'type': 'boolean'}}, - 'required': ['relation-tag', - 'in-scope', - 'suspended'], - 'type': 'object'}, - 'RelationUnitStatusResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'results': {'items': {'$ref': '#/definitions/RelationUnitStatus'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'RelationUnitStatusResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/RelationUnitStatusResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'RelationUnits': {'additionalProperties': False, - 'properties': {'relation-units': {'items': {'$ref': '#/definitions/RelationUnit'}, - 'type': 'array'}}, - 'required': ['relation-units'], - 'type': 'object'}, - 'RelationUnitsChange': {'additionalProperties': False, - 'properties': {'app-changed': {'patternProperties': {'.*': {'type': 'integer'}}, - 'type': 'object'}, - 'changed': {'patternProperties': {'.*': {'$ref': '#/definitions/UnitSettings'}}, - 'type': 'object'}, - 'departed': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'required': ['changed'], - 'type': 'object'}, - 'RelationUnitsWatchResult': {'additionalProperties': False, - 'properties': {'changes': {'$ref': '#/definitions/RelationUnitsChange'}, - 'error': {'$ref': '#/definitions/Error'}, - 'watcher-id': {'type': 'string'}}, - 'required': ['watcher-id', - 'changes'], - 'type': 'object'}, - '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': ['mode'], - 'type': 'object'}, - 'ResolvedModeResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/ResolvedModeResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'SecretBackendConfig': {'additionalProperties': False, - 'properties': {'params': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'type': {'type': 'string'}}, - 'required': ['type'], - 'type': 'object'}, - 'SecretBackendConfigResults': {'additionalProperties': False, - 'properties': {'active-id': {'type': 'string'}, - 'configs': {'patternProperties': {'.*': {'$ref': '#/definitions/SecretBackendConfig'}}, - 'type': 'object'}, - 'model-controller': {'type': 'string'}, - 'model-name': {'type': 'string'}, - 'model-uuid': {'type': 'string'}}, - 'required': ['model-controller', - 'model-uuid', - 'model-name', - 'active-id'], - 'type': 'object'}, - 'SecretConsumerInfoResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'label': {'type': 'string'}, - 'revision': {'type': 'integer'}}, - 'required': ['revision', 'label'], - 'type': 'object'}, - 'SecretConsumerInfoResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/SecretConsumerInfoResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'SecretContentParams': {'additionalProperties': False, - 'properties': {'data': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}, - 'value-ref': {'$ref': '#/definitions/SecretValueRef'}}, - 'type': 'object'}, - 'SecretContentResult': {'additionalProperties': False, - 'properties': {'content': {'$ref': '#/definitions/SecretContentParams'}, - 'error': {'$ref': '#/definitions/Error'}}, - 'required': ['content'], - 'type': 'object'}, - 'SecretContentResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/SecretContentResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'SecretRevision': {'additionalProperties': False, - 'properties': {'backend-name': {'type': 'string'}, - 'create-time': {'format': 'date-time', - 'type': 'string'}, - 'expire-time': {'format': 'date-time', - 'type': 'string'}, - 'revision': {'type': 'integer'}, - 'update-time': {'format': 'date-time', - 'type': 'string'}, - 'value-ref': {'$ref': '#/definitions/SecretValueRef'}}, - 'required': ['revision'], - 'type': 'object'}, - 'SecretRevisionArg': {'additionalProperties': False, - 'properties': {'pending-delete': {'type': 'boolean'}, - 'revisions': {'items': {'type': 'integer'}, - 'type': 'array'}, - 'uri': {'type': 'string'}}, - 'required': ['uri', - 'revisions', - 'pending-delete'], - 'type': 'object'}, - 'SecretRotatedArg': {'additionalProperties': False, - 'properties': {'original-revision': {'type': 'integer'}, - 'skip': {'type': 'boolean'}, - 'uri': {'type': 'string'}}, - 'required': ['uri', - 'original-revision', - 'skip'], - 'type': 'object'}, - 'SecretRotatedArgs': {'additionalProperties': False, - 'properties': {'args': {'items': {'$ref': '#/definitions/SecretRotatedArg'}, - 'type': 'array'}}, - 'required': ['args'], - 'type': 'object'}, - 'SecretTriggerChange': {'additionalProperties': False, - 'properties': {'next-trigger-time': {'format': 'date-time', - 'type': 'string'}, - 'revision': {'type': 'integer'}, - 'uri': {'type': 'string'}}, - 'required': ['uri', - 'next-trigger-time'], - 'type': 'object'}, - 'SecretTriggerWatchResult': {'additionalProperties': False, - 'properties': {'changes': {'items': {'$ref': '#/definitions/SecretTriggerChange'}, - 'type': 'array'}, - 'error': {'$ref': '#/definitions/Error'}, - 'watcher-id': {'type': 'string'}}, - 'required': ['watcher-id', - 'changes'], - 'type': 'object'}, - 'SecretValueRef': {'additionalProperties': False, - 'properties': {'backend-id': {'type': 'string'}, - 'revision-id': {'type': 'string'}}, - 'required': ['backend-id', 'revision-id'], - 'type': 'object'}, - 'SecretValueResult': {'additionalProperties': False, - 'properties': {'data': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}, - 'error': {'$ref': '#/definitions/Error'}}, - 'type': 'object'}, - 'SetStatus': {'additionalProperties': False, - 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'}, - 'type': 'array'}}, - 'required': ['entities'], - 'type': 'object'}, - 'SetUnitStateArg': {'additionalProperties': False, - 'properties': {'charm-state': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}, - 'meter-status-state': {'type': 'string'}, - 'relation-state': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}, - 'secret-state': {'type': 'string'}, - 'storage-state': {'type': 'string'}, - 'tag': {'type': 'string'}, - 'uniter-state': {'type': 'string'}}, - 'required': ['tag'], - 'type': 'object'}, - 'SetUnitStateArgs': {'additionalProperties': False, - 'properties': {'args': {'items': {'$ref': '#/definitions/SetUnitStateArg'}, - 'type': 'array'}}, - 'required': ['args'], - 'type': 'object'}, - 'SettingsResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'settings': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}}, - 'required': ['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': ['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': {'name': {'type': 'string'}, - 'storage': {'$ref': '#/definitions/StorageConstraints'}, - 'unit': {'type': 'string'}}, - 'required': ['unit', 'name', 'storage'], - 'type': 'object'}, - 'StorageAttachment': {'additionalProperties': False, - 'properties': {'kind': {'type': 'integer'}, - 'life': {'type': 'string'}, - 'location': {'type': 'string'}, - 'owner-tag': {'type': 'string'}, - 'storage-tag': {'type': 'string'}, - 'unit-tag': {'type': 'string'}}, - 'required': ['storage-tag', - 'owner-tag', - 'unit-tag', - 'kind', - 'location', - 'life'], - 'type': 'object'}, - 'StorageAttachmentId': {'additionalProperties': False, - 'properties': {'storage-tag': {'type': 'string'}, - 'unit-tag': {'type': 'string'}}, - 'required': ['storage-tag', - 'unit-tag'], - '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'}}, - 'type': 'object'}, - 'StringBoolResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'ok': {'type': 'boolean'}, - 'result': {'type': 'string'}}, - 'required': ['result', 'ok'], - 'type': 'object'}, - 'StringBoolResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/StringBoolResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'StringResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'result': {'type': 'string'}}, - 'required': ['result'], - 'type': 'object'}, - 'StringResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'StringsResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'result': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'type': 'object'}, - 'StringsWatchResult': {'additionalProperties': False, - 'properties': {'changes': {'items': {'type': 'string'}, - 'type': 'array'}, - 'error': {'$ref': '#/definitions/Error'}, - 'watcher-id': {'type': 'string'}}, - 'required': ['watcher-id'], - 'type': 'object'}, - 'StringsWatchResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'UnitRefreshResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}, - 'Life': {'type': 'string'}, - 'Resolved': {'type': 'string'}, - 'provider-id': {'type': 'string'}}, - 'required': ['Life', - 'Resolved', - 'Error'], - 'type': 'object'}, - 'UnitRefreshResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/UnitRefreshResult'}, - 'type': 'array'}}, - 'required': ['Results'], - 'type': 'object'}, - 'UnitSettings': {'additionalProperties': False, - 'properties': {'version': {'type': 'integer'}}, - 'required': ['version'], - 'type': 'object'}, - 'UnitStateResult': {'additionalProperties': False, - 'properties': {'charm-state': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}, - 'error': {'$ref': '#/definitions/Error'}, - 'meter-status-state': {'type': 'string'}, - 'relation-state': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}, - 'secret-state': {'type': 'string'}, - 'storage-state': {'type': 'string'}, - 'uniter-state': {'type': 'string'}}, - 'type': 'object'}, - 'UnitStateResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/UnitStateResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'UpdateSecretArg': {'additionalProperties': False, - 'properties': {'UpsertSecretArg': {'$ref': '#/definitions/UpsertSecretArg'}, - 'content': {'$ref': '#/definitions/SecretContentParams'}, - 'description': {'type': 'string'}, - 'expire-time': {'format': 'date-time', - 'type': 'string'}, - 'label': {'type': 'string'}, - 'params': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'rotate-policy': {'type': 'string'}, - 'uri': {'type': 'string'}}, - 'required': ['UpsertSecretArg', 'uri'], - 'type': 'object'}, - 'UpdateSecretArgs': {'additionalProperties': False, - 'properties': {'args': {'items': {'$ref': '#/definitions/UpdateSecretArg'}, - 'type': 'array'}}, - 'required': ['args'], - 'type': 'object'}, - 'UpgradeSeriesStatusParam': {'additionalProperties': False, - 'properties': {'entity': {'$ref': '#/definitions/Entity'}, - 'message': {'type': 'string'}, - 'status': {'type': 'string'}}, - 'required': ['entity', - 'status', - 'message'], - 'type': 'object'}, - 'UpgradeSeriesStatusParams': {'additionalProperties': False, - 'properties': {'params': {'items': {'$ref': '#/definitions/UpgradeSeriesStatusParam'}, - 'type': 'array'}}, - 'required': ['params'], - 'type': 'object'}, - 'UpgradeSeriesStatusResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'status': {'type': 'string'}, - 'target': {'type': 'string'}}, - 'type': 'object'}, - 'UpgradeSeriesStatusResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/UpgradeSeriesStatusResult'}, - 'type': 'array'}}, - 'type': 'object'}, - 'UpsertSecretArg': {'additionalProperties': False, - 'properties': {'content': {'$ref': '#/definitions/SecretContentParams'}, - 'description': {'type': 'string'}, - 'expire-time': {'format': 'date-time', - 'type': 'string'}, - 'label': {'type': 'string'}, - 'params': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'rotate-policy': {'type': 'string'}}, - 'type': 'object'}}, - 'properties': {'APIAddresses': {'description': 'APIAddresses returns the list ' - 'of addresses used to connect ' - 'to the API.', - 'properties': {'Result': {'$ref': '#/definitions/StringsResult'}}, - 'type': 'object'}, - 'APIHostPorts': {'description': 'APIHostPorts returns the API ' - 'server addresses.', - 'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}}, - 'type': 'object'}, - 'ActionStatus': {'description': 'ActionStatus returns the ' - 'status of Actions by Tags ' - 'passed in.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/StringResults'}}, - 'type': 'object'}, - 'Actions': {'description': 'Actions returns the Actions by ' - 'Tags passed and ensures that the ' - 'Unit asking\n' - 'for them is the same Unit that has ' - 'the Actions.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ActionResults'}}, - 'type': 'object'}, - 'AddMetricBatches': {'description': 'AddMetricBatches adds the ' - 'metrics for the specified ' - 'unit.', - 'properties': {'Params': {'$ref': '#/definitions/MetricBatchParams'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'ApplicationStatus': {'description': 'ApplicationStatus ' - 'returns the status of ' - 'the Applications and its ' - 'workloads\n' - 'if the given unit is the ' - 'leader.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ApplicationStatusResults'}}, - 'type': 'object'}, - 'AssignedMachine': {'description': 'AssignedMachine returns ' - 'the machine tag for each ' - 'given unit tag, or\n' - 'an error satisfying ' - 'params.IsCodeNotAssigned ' - 'when a unit has no\n' - 'assigned machine.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/StringResults'}}, - 'type': 'object'}, - 'AvailabilityZone': {'description': 'AvailabilityZone returns ' - 'the availability zone for ' - 'each given unit, if ' - 'applicable.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/StringResults'}}, - 'type': 'object'}, - 'BeginActions': {'description': 'BeginActions marks the ' - 'actions represented by the ' - 'passed in Tags as running.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'CanApplyLXDProfile': {'description': 'CanApplyLXDProfile is a ' - 'shim to call the ' - 'LXDProfileAPIv2 version ' - 'of this method.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/BoolResults'}}, - 'type': 'object'}, - 'CharmArchiveSha256': {'description': 'CharmArchiveSha256 ' - 'returns the SHA256 ' - 'digest of the charm ' - 'archive\n' - '(bundle) data for each ' - 'charm url in the given ' - 'parameters.', - 'properties': {'Params': {'$ref': '#/definitions/CharmURLs'}, - 'Result': {'$ref': '#/definitions/StringResults'}}, - 'type': 'object'}, - 'CharmModifiedVersion': {'description': 'CharmModifiedVersion ' - 'returns the most ' - 'CharmModifiedVersion ' - 'for all given\n' - 'units or ' - 'applications.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/IntResults'}}, - 'type': 'object'}, - 'CharmURL': {'description': 'CharmURL returns the charm URL ' - 'for all given units or ' - 'applications.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/StringBoolResults'}}, - 'type': 'object'}, - 'ClearResolved': {'description': 'ClearResolved removes any ' - 'resolved setting from each ' - 'given unit.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'CloudAPIVersion': {'description': 'CloudAPIVersion returns ' - 'the cloud API version, if ' - 'available.', - 'properties': {'Result': {'$ref': '#/definitions/StringResult'}}, - 'type': 'object'}, - 'CloudSpec': {'description': 'CloudSpec returns the cloud spec ' - 'used by the model in which the\n' - 'authenticated unit or ' - 'application resides.\n' - 'A check is made beforehand to ' - 'ensure that the request is made ' - 'by an entity\n' - 'that has been granted the ' - 'appropriate trust.', - 'properties': {'Result': {'$ref': '#/definitions/CloudSpecResult'}}, - 'type': 'object'}, - 'CommitHookChanges': {'description': 'CommitHookChanges ' - 'batches together all ' - 'required API calls for ' - 'applying\n' - 'a set of changes after a ' - 'hook successfully ' - 'completes and executes ' - 'them in a\n' - 'single transaction.', - 'properties': {'Params': {'$ref': '#/definitions/CommitHookChangesArgs'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'ConfigSettings': {'description': 'ConfigSettings returns the ' - 'complete set of application ' - 'charm config\n' - 'settings available to each ' - 'given unit.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ConfigSettingsResults'}}, - 'type': 'object'}, - 'CreateSecretURIs': {'description': 'CreateSecretURIs creates ' - 'new secret URIs.', - 'properties': {'Params': {'$ref': '#/definitions/CreateSecretURIsArg'}, - 'Result': {'$ref': '#/definitions/StringResults'}}, - 'type': 'object'}, - 'CreateSecrets': {'description': 'CreateSecrets creates new ' - 'secrets.', - 'properties': {'Params': {'$ref': '#/definitions/CreateSecretArgs'}, - 'Result': {'$ref': '#/definitions/StringResults'}}, - 'type': 'object'}, - 'CurrentModel': {'description': 'CurrentModel returns the name ' - 'and UUID for the current juju ' - 'model.', - 'properties': {'Result': {'$ref': '#/definitions/ModelResult'}}, - 'type': 'object'}, - 'Destroy': {'description': 'Destroy advances all given Alive ' - "units' lifecycles as far as\n" - 'possible. See ' - 'state/Unit.Destroy().', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'DestroyAllSubordinates': {'description': 'DestroyAllSubordinates ' - 'destroys all ' - 'subordinates of ' - 'each given unit.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'DestroyUnitStorageAttachments': {'description': 'DestroyUnitStorageAttachments ' - 'marks each ' - 'storage ' - 'attachment ' - 'of the\n' - 'specified ' - 'units as ' - 'Dying.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'EnsureDead': {'description': 'EnsureDead calls EnsureDead on ' - 'each given entity from state. ' - 'It\n' - 'will fail if the entity is not ' - "present. If it's Alive, nothing " - 'will\n' - 'happen (see state/EnsureDead() ' - 'for units or machines).', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'EnterScope': {'description': 'EnterScope ensures each unit ' - 'has entered its scope in the ' - 'relation,\n' - 'for all of the given ' - 'relation/unit pairs. See also\n' - 'state.RelationUnit.EnterScope().', - 'properties': {'Params': {'$ref': '#/definitions/RelationUnits'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'FinishActions': {'description': 'FinishActions saves the ' - 'result of a completed Action', - 'properties': {'Params': {'$ref': '#/definitions/ActionExecutionResults'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'GetConsumerSecretsRevisionInfo': {'description': 'GetConsumerSecretsRevisionInfo ' - 'returns the ' - 'latest ' - 'secret ' - 'revisions ' - 'for the ' - 'specified ' - 'secrets.\n' - 'This facade ' - 'method is ' - 'used for ' - 'remote ' - 'watcher to ' - 'get the ' - 'latest ' - 'secret ' - 'revisions ' - 'and labels ' - 'for a ' - 'secret ' - 'changed ' - 'hook.', - 'properties': {'Params': {'$ref': '#/definitions/GetSecretConsumerInfoArgs'}, - 'Result': {'$ref': '#/definitions/SecretConsumerInfoResults'}}, - 'type': 'object'}, - 'GetMeterStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/MeterStatusResults'}}, - 'type': 'object'}, - 'GetPodSpec': {'description': 'GetPodSpec gets the pod specs ' - 'for a set of applications.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/StringResults'}}, - 'type': 'object'}, - 'GetPrincipal': {'description': 'GetPrincipal returns the ' - 'result of calling ' - 'PrincipalName() and\n' - 'converting it to a tag, on ' - 'each given unit.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/StringBoolResults'}}, - 'type': 'object'}, - 'GetRawK8sSpec': {'description': 'GetRawK8sSpec gets the raw ' - 'k8s specs for a set of ' - 'applications.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/StringResults'}}, - 'type': 'object'}, - 'GetSecretBackendConfig': {'description': 'GetSecretBackendConfig ' - 'gets the config ' - 'needed to create a ' - 'client to secret ' - 'backends.', - 'properties': {'Result': {'$ref': '#/definitions/SecretBackendConfigResults'}}, - 'type': 'object'}, - 'GetSecretContentInfo': {'description': 'GetSecretContentInfo ' - 'returns the secret ' - 'values for the ' - 'specified secrets.', - 'properties': {'Params': {'$ref': '#/definitions/GetSecretContentArgs'}, - 'Result': {'$ref': '#/definitions/SecretContentResults'}}, - 'type': 'object'}, - 'GetSecretMetadata': {'description': 'GetSecretMetadata ' - 'returns metadata for the ' - "caller's secrets.", - 'properties': {'Result': {'$ref': '#/definitions/ListSecretResults'}}, - 'type': 'object'}, - 'GetSecretRevisionContentInfo': {'description': 'GetSecretRevisionContentInfo ' - 'returns the ' - 'secret values ' - 'for the ' - 'specified ' - 'secret ' - 'revisions.', - 'properties': {'Params': {'$ref': '#/definitions/SecretRevisionArg'}, - 'Result': {'$ref': '#/definitions/SecretContentResults'}}, - 'type': 'object'}, - 'GetSecretStoreConfig': {'description': 'GetSecretStoreConfig ' - 'is for 3.0.x agents.\n' - 'TODO(wallyworld) - ' - 'remove when we auto ' - 'upgrade migrated ' - 'models.', - 'properties': {'Result': {'$ref': '#/definitions/SecretBackendConfig'}}, - 'type': 'object'}, - 'GoalStates': {'description': 'GoalStates returns information ' - 'of charm units and relations.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/GoalStateResults'}}, - 'type': 'object'}, - 'HasSubordinates': {'description': 'HasSubordinates returns ' - 'the whether each given ' - 'unit has any subordinates.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/BoolResults'}}, - 'type': 'object'}, - 'LXDProfileName': {'description': 'LXDProfileName is a shim to ' - 'call the LXDProfileAPIv2 ' - 'version of this method.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/StringResults'}}, - 'type': 'object'}, - 'LXDProfileRequired': {'description': 'LXDProfileRequired is a ' - 'shim to call the ' - 'LXDProfileAPIv2 version ' - 'of this method.', - 'properties': {'Params': {'$ref': '#/definitions/CharmURLs'}, - 'Result': {'$ref': '#/definitions/BoolResults'}}, - 'type': 'object'}, - 'LeaveScope': {'description': 'LeaveScope signals each unit ' - 'has left its scope in the ' - 'relation,\n' - 'for all of the given ' - 'relation/unit pairs. See also\n' - 'state.RelationUnit.LeaveScope().', - 'properties': {'Params': {'$ref': '#/definitions/RelationUnits'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'Life': {'description': 'Life returns the life status of every ' - 'supplied entity, where available.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/LifeResults'}}, - 'type': 'object'}, - 'LogActionsMessages': {'description': 'LogActionsMessages ' - 'records the log ' - 'messages against the ' - 'specified actions.', - 'properties': {'Params': {'$ref': '#/definitions/ActionMessageParams'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'Merge': {'description': 'Merge merges in the provided ' - 'leadership settings. Only leaders ' - 'for\n' - 'the given service may perform this ' - 'operation.', - 'properties': {'Params': {'$ref': '#/definitions/MergeLeadershipSettingsBulkParams'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'ModelConfig': {'description': 'ModelConfig returns the ' - "current model's configuration.", - 'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}}, - 'type': 'object'}, - 'ModelUUID': {'description': 'ModelUUID returns the model UUID ' - 'that this unit resides in.\n' - 'It is implemented here directly ' - 'as a result of removing it from\n' - 'embedded APIAddresser *without* ' - 'bumping the facade version.\n' - 'It should be blanked when this ' - 'facade version is next ' - 'incremented.', - 'properties': {'Result': {'$ref': '#/definitions/StringResult'}}, - 'type': 'object'}, - 'NetworkInfo': {'description': 'NetworkInfo returns network ' - 'interfaces/addresses for ' - 'specified bindings.', - 'properties': {'Params': {'$ref': '#/definitions/NetworkInfoParams'}, - 'Result': {'$ref': '#/definitions/NetworkInfoResults'}}, - 'type': 'object'}, - 'OpenedApplicationPortRangesByEndpoint': {'description': 'OpenedApplicationPortRangesByEndpoint ' - 'returns ' - 'the ' - 'port ' - 'ranges ' - 'opened ' - 'by ' - 'each ' - 'application.', - 'properties': {'Params': {'$ref': '#/definitions/Entity'}, - 'Result': {'$ref': '#/definitions/ApplicationOpenedPortsResults'}}, - 'type': 'object'}, - 'OpenedMachinePortRangesByEndpoint': {'description': 'OpenedMachinePortRangesByEndpoint ' - 'returns ' - 'the port ' - 'ranges ' - 'opened ' - 'by each\n' - 'unit on ' - 'the ' - 'provided ' - 'machines ' - 'grouped ' - 'by ' - 'application ' - 'endpoint.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/OpenPortRangesByEndpointResults'}}, - 'type': 'object'}, - 'OpenedPortRangesByEndpoint': {'description': 'OpenedPortRangesByEndpoint ' - 'returns the ' - 'port ranges ' - 'opened by the ' - 'unit.', - 'properties': {'Result': {'$ref': '#/definitions/OpenPortRangesByEndpointResults'}}, - 'type': 'object'}, - 'PrivateAddress': {'description': 'PrivateAddress returns the ' - 'private address for each ' - 'given unit, if set.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/StringResults'}}, - 'type': 'object'}, - 'ProviderType': {'description': 'ProviderType returns the ' - 'provider type used by the ' - 'current juju\n' - 'model.\n' - '\n' - 'TODO(dimitern): Refactor the ' - 'uniter to call this instead ' - 'of calling\n' - 'ModelConfig() just to get the ' - 'provider type. Once we have ' - 'machine\n' - 'addresses, this might be ' - 'completely unnecessary ' - 'though.', - 'properties': {'Result': {'$ref': '#/definitions/StringResult'}}, - 'type': 'object'}, - 'PublicAddress': {'description': 'PublicAddress returns the ' - 'public address for each ' - 'given unit, if set.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/StringResults'}}, - 'type': 'object'}, - 'Read': {'description': 'Read reads leadership settings for ' - 'the provided service ID. Any\n' - 'unit of the service may perform this ' - 'operation.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/GetLeadershipSettingsBulkResults'}}, - 'type': 'object'}, - 'ReadLocalApplicationSettings': {'description': 'ReadLocalApplicationSettings ' - 'returns the ' - 'local ' - 'application ' - 'settings for ' - 'a\n' - 'particular ' - 'relation when ' - 'invoked by ' - 'the leader ' - 'unit.', - 'properties': {'Params': {'$ref': '#/definitions/RelationUnit'}, - 'Result': {'$ref': '#/definitions/SettingsResult'}}, - 'type': 'object'}, - 'ReadRemoteSettings': {'description': 'ReadRemoteSettings ' - 'returns the remote ' - 'settings of each given ' - 'set of\n' - 'relation/local ' - 'unit/remote unit.', - 'properties': {'Params': {'$ref': '#/definitions/RelationUnitPairs'}, - 'Result': {'$ref': '#/definitions/SettingsResults'}}, - 'type': 'object'}, - 'ReadSettings': {'description': 'ReadSettings returns the ' - 'local settings of each given ' - 'set of\n' - 'relation/unit.\n' - '\n' - 'NOTE(achilleasa): Using this ' - 'call to read application data ' - 'is deprecated\n' - 'and will not work for k8s ' - 'charms (see LP1876097). ' - 'Instead, clients should\n' - 'use ' - 'ReadLocalApplicationSettings.', - 'properties': {'Params': {'$ref': '#/definitions/RelationUnits'}, - 'Result': {'$ref': '#/definitions/SettingsResults'}}, - 'type': 'object'}, - 'Refresh': {'description': 'Refresh retrieves the latest ' - 'values for attributes on this ' - 'unit.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/UnitRefreshResults'}}, - 'type': 'object'}, - 'Relation': {'description': 'Relation returns information ' - 'about all given relation/unit ' - 'pairs,\n' - 'including their id, key and the ' - 'local endpoint.', - 'properties': {'Params': {'$ref': '#/definitions/RelationUnits'}, - 'Result': {'$ref': '#/definitions/RelationResults'}}, - 'type': 'object'}, - 'RelationById': {'description': 'RelationById returns ' - 'information about all given ' - 'relations,\n' - 'specified by their ids, ' - 'including their key and the ' - 'local\n' - 'endpoint.', - 'properties': {'Params': {'$ref': '#/definitions/RelationIds'}, - 'Result': {'$ref': '#/definitions/RelationResults'}}, - 'type': 'object'}, - 'RelationsStatus': {'description': 'RelationsStatus returns ' - 'for each unit the ' - 'corresponding relation and ' - 'status information.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/RelationUnitStatusResults'}}, - 'type': 'object'}, - 'RemoveSecrets': {'description': 'RemoveSecrets removes the ' - 'specified secrets.', - 'properties': {'Params': {'$ref': '#/definitions/DeleteSecretArgs'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'RemoveStorageAttachments': {'description': 'RemoveStorageAttachments ' - 'removes the ' - 'specified ' - 'storage\n' - 'attachments from ' - 'state.', - 'properties': {'Params': {'$ref': '#/definitions/StorageAttachmentIds'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'RequestReboot': {'description': 'RequestReboot sets the ' - 'reboot flag on the provided ' - 'machines', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'Resolved': {'description': 'Resolved returns the current ' - 'resolved setting for each given ' - 'unit.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ResolvedModeResults'}}, - 'type': 'object'}, - 'SLALevel': {'description': "SLALevel returns the model's SLA " - 'level.', - 'properties': {'Result': {'$ref': '#/definitions/StringResult'}}, - 'type': 'object'}, - 'SecretsGrant': {'description': 'SecretsGrant grants access to ' - 'a secret for the specified ' - 'subjects.', - 'properties': {'Params': {'$ref': '#/definitions/GrantRevokeSecretArgs'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'SecretsRevoke': {'description': 'SecretsRevoke revokes access ' - 'to a secret for the ' - 'specified subjects.', - 'properties': {'Params': {'$ref': '#/definitions/GrantRevokeSecretArgs'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'SecretsRotated': {'description': 'SecretsRotated records when ' - 'secrets were last rotated.', - 'properties': {'Params': {'$ref': '#/definitions/SecretRotatedArgs'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'SetAgentStatus': {'description': 'SetAgentStatus will set ' - 'status for agents of Units ' - 'passed in args, if one\n' - 'of the args is not an Unit ' - 'it will fail.', - 'properties': {'Params': {'$ref': '#/definitions/SetStatus'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'SetApplicationStatus': {'description': 'SetApplicationStatus ' - 'sets the status for ' - 'all the Applications ' - 'in args if the given ' - 'Unit is\n' - 'the leader.', - 'properties': {'Params': {'$ref': '#/definitions/SetStatus'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'SetCharmURL': {'description': 'SetCharmURL sets the charm URL ' - 'for each given unit. An error ' - 'will\n' - 'be returned if a unit is dead, ' - 'or the charm URL is not known.', - 'properties': {'Params': {'$ref': '#/definitions/EntitiesCharmURL'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'SetRelationStatus': {'description': 'SetRelationStatus ' - 'updates the status of ' - 'the specified relations.', - 'properties': {'Params': {'$ref': '#/definitions/RelationStatusArgs'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'SetState': {'description': 'SetState sets the state persisted ' - 'by the charm running in this ' - 'unit\n' - 'and the state internal to the ' - 'uniter for this unit.', - 'properties': {'Params': {'$ref': '#/definitions/SetUnitStateArgs'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'SetStatus': {'description': 'SetStatus will set status for a ' - 'entities passed in args. If the ' - 'entity is\n' - 'a Unit it will instead set ' - 'status to its agent, to emulate ' - 'backwards\n' - 'compatibility.', - 'properties': {'Params': {'$ref': '#/definitions/SetStatus'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'SetUnitStatus': {'description': 'SetUnitStatus sets status ' - 'for all elements passed in ' - 'args, the difference\n' - 'with SetStatus is that if an ' - 'entity is a Unit it will set ' - 'its status instead\n' - 'of its agent.', - 'properties': {'Params': {'$ref': '#/definitions/SetStatus'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'SetUpgradeSeriesUnitStatus': {'description': 'SetUpgradeSeriesUnitStatus ' - 'sets the ' - 'upgrade series ' - 'status of the ' - 'unit.\n' - 'If no upgrade ' - 'is in progress ' - 'an error is ' - 'returned ' - 'instead.', - 'properties': {'Params': {'$ref': '#/definitions/UpgradeSeriesStatusParams'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'SetWorkloadVersion': {'description': 'SetWorkloadVersion sets ' - 'the workload version ' - 'for each given unit. An ' - 'error will\n' - 'be returned if a unit ' - 'is dead.', - 'properties': {'Params': {'$ref': '#/definitions/EntityWorkloadVersions'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'State': {'description': 'State returns the state persisted by ' - 'the charm running in this unit\n' - 'and the state internal to the uniter ' - 'for this unit.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/UnitStateResults'}}, - 'type': 'object'}, - 'StorageAttachmentLife': {'description': 'StorageAttachmentLife ' - 'returns the ' - 'lifecycle state of ' - 'the storage ' - 'attachments\n' - 'with the specified ' - 'tags.', - 'properties': {'Params': {'$ref': '#/definitions/StorageAttachmentIds'}, - 'Result': {'$ref': '#/definitions/LifeResults'}}, - 'type': 'object'}, - 'StorageAttachments': {'description': 'StorageAttachments ' - 'returns the storage ' - 'attachments with the ' - 'specified tags.', - 'properties': {'Params': {'$ref': '#/definitions/StorageAttachmentIds'}, - 'Result': {'$ref': '#/definitions/StorageAttachmentResults'}}, - 'type': 'object'}, - 'UnitStatus': {'description': 'UnitStatus returns the workload ' - 'status information for the ' - 'unit.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/StatusResults'}}, - 'type': 'object'}, - 'UnitStorageAttachments': {'description': 'UnitStorageAttachments ' - 'returns the IDs of ' - 'storage attachments ' - 'for a collection of ' - 'units.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/StorageAttachmentIdsResults'}}, - 'type': 'object'}, - 'UpdateNetworkInfo': {'description': 'UpdateNetworkInfo ' - 'refreshes the network ' - "settings for a unit's " - 'bound\n' - 'endpoints.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'UpdateSecrets': {'description': 'UpdateSecrets updates the ' - 'specified secrets.', - 'properties': {'Params': {'$ref': '#/definitions/UpdateSecretArgs'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'UpgradeSeriesUnitStatus': {'description': 'UpgradeSeriesUnitStatus ' - 'returns the ' - 'current ' - 'preparation status ' - 'of an\n' - 'upgrading unit.\n' - 'If no series ' - 'upgrade is in ' - 'progress an error ' - 'is returned ' - 'instead.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/UpgradeSeriesStatusResults'}}, - 'type': 'object'}, - 'Watch': {'description': 'Watch starts an NotifyWatcher for ' - 'each given entity.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/NotifyWatchResults'}}, - 'type': 'object'}, - 'WatchAPIHostPorts': {'description': 'WatchAPIHostPorts ' - 'watches the API server ' - 'addresses.', - 'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}}, - 'type': 'object'}, - 'WatchActionNotifications': {'description': 'WatchActionNotifications ' - 'returns a ' - 'StringsWatcher ' - 'for observing\n' - 'incoming action ' - 'calls to a unit. ' - 'See also ' - 'state/watcher.go\n' - 'Unit.WatchActionNotifications(). ' - 'This method is ' - 'called from\n' - 'api/uniter/uniter.go ' - 'WatchActionNotifications().', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/StringsWatchResults'}}, - 'type': 'object'}, - 'WatchConfigSettingsHash': {'description': 'WatchConfigSettingsHash ' - 'returns a ' - 'StringsWatcher ' - 'that yields a ' - 'hash\n' - 'of the config ' - 'values every time ' - 'the config ' - 'changes. The ' - 'uniter can\n' - 'save this hash and ' - 'use it to decide ' - 'whether the ' - 'config-changed ' - 'hook\n' - 'needs to be run ' - '(or whether this ' - 'was just an agent ' - 'restart with no\n' - 'substantive config ' - 'change).', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/StringsWatchResults'}}, - 'type': 'object'}, - 'WatchConsumedSecretsChanges': {'description': 'WatchConsumedSecretsChanges ' - 'sets up a ' - 'watcher to ' - 'notify of ' - 'changes to ' - 'secret ' - 'revisions for ' - 'the specified ' - 'consumers.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/StringsWatchResults'}}, - 'type': 'object'}, - 'WatchForModelConfigChanges': {'description': 'WatchForModelConfigChanges ' - 'returns a ' - 'NotifyWatcher ' - 'that observes\n' - 'changes to the ' - 'model ' - 'configuration.\n' - 'Note that ' - 'although the ' - 'NotifyWatchResult ' - 'contains an ' - 'Error field,\n' - "it's not used " - 'because we are ' - 'only returning ' - 'a single ' - 'watcher,\n' - 'so we use the ' - 'regular error ' - 'return.', - 'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}}, - 'type': 'object'}, - 'WatchInstanceData': {'description': 'WatchInstanceData is a ' - 'shim to call the ' - 'LXDProfileAPIv2 version ' - 'of this method.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/NotifyWatchResults'}}, - 'type': 'object'}, - 'WatchLeadershipSettings': {'description': 'WatchLeadershipSettings ' - 'will block the ' - 'caller until ' - 'leadership ' - 'settings\n' - 'for the given ' - 'service ID change.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/NotifyWatchResults'}}, - 'type': 'object'}, - 'WatchMeterStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/NotifyWatchResults'}}, - 'type': 'object'}, - 'WatchObsolete': {'description': 'WatchObsolete returns a ' - 'watcher for notifying when:\n' - ' - a secret owned by the ' - 'entity is deleted\n' - ' - a secret revision owed ' - 'by the entity no longer\n' - ' has any consumers\n' - '\n' - 'Obsolete revisions results ' - 'are "uri/revno" and deleted\n' - 'secret results are "uri".', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/StringsWatchResult'}}, - 'type': 'object'}, - 'WatchRelationUnits': {'description': 'WatchRelationUnits ' - 'returns a ' - 'RelationUnitsWatcher ' - 'for observing\n' - 'changes to every unit ' - 'in the supplied ' - 'relation that is ' - 'visible to\n' - 'the supplied unit. See ' - 'also ' - 'state/watcher.go:RelationUnit.Watch().', - 'properties': {'Params': {'$ref': '#/definitions/RelationUnits'}, - 'Result': {'$ref': '#/definitions/RelationUnitsWatchResults'}}, - 'type': 'object'}, - 'WatchSecretRevisionsExpiryChanges': {'description': 'WatchSecretRevisionsExpiryChanges ' - 'sets up ' - 'a ' - 'watcher ' - 'to ' - 'notify ' - 'of ' - 'changes ' - 'to ' - 'secret ' - 'revision ' - 'expiry ' - 'config.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/SecretTriggerWatchResult'}}, - 'type': 'object'}, - 'WatchSecretsRotationChanges': {'description': 'WatchSecretsRotationChanges ' - 'sets up a ' - 'watcher to ' - 'notify of ' - 'changes to ' - 'secret ' - 'rotation ' - 'config.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/SecretTriggerWatchResult'}}, - 'type': 'object'}, - 'WatchStorageAttachments': {'description': 'WatchStorageAttachments ' - 'creates watchers ' - 'for a collection ' - 'of storage\n' - 'attachments, each ' - 'of which can be ' - 'used to watch ' - 'changes to ' - 'storage\n' - 'attachment info.', - 'properties': {'Params': {'$ref': '#/definitions/StorageAttachmentIds'}, - 'Result': {'$ref': '#/definitions/NotifyWatchResults'}}, - 'type': 'object'}, - 'WatchTrustConfigSettingsHash': {'description': 'WatchTrustConfigSettingsHash ' - 'returns a ' - 'StringsWatcher ' - 'that yields ' - 'a\n' - 'hash of the ' - 'application ' - 'config values ' - 'whenever they ' - 'change. The\n' - 'uniter can ' - 'use the hash ' - 'to determine ' - 'whether the ' - 'actual values ' - 'have\n' - 'changed since ' - 'it last saw ' - 'the config.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/StringsWatchResults'}}, - 'type': 'object'}, - 'WatchUnitAddressesHash': {'description': 'WatchUnitAddressesHash ' - 'returns a ' - 'StringsWatcher that ' - 'yields the\n' - 'hashes of the ' - 'addresses for the ' - 'unit whenever the ' - 'addresses\n' - 'change. The uniter ' - 'can use the hash to ' - 'determine whether ' - 'the actual\n' - 'address values have ' - 'changed since it ' - 'last saw the ' - 'config.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/StringsWatchResults'}}, - 'type': 'object'}, - 'WatchUnitRelations': {'description': 'WatchUnitRelations ' - 'returns a ' - 'StringsWatcher, for ' - 'each given\n' - 'unit, that notifies of ' - 'changes to the ' - 'lifecycles of ' - 'relations\n' - 'relevant to that unit. ' - 'For principal units, ' - 'this will be all of ' - 'the\n' - 'relations for the ' - 'application. For ' - 'subordinate units, ' - 'only\n' - 'relations with the ' - "principal unit's " - 'application will be ' - 'monitored.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/StringsWatchResults'}}, - 'type': 'object'}, - 'WatchUnitStorageAttachments': {'description': 'WatchUnitStorageAttachments ' - 'creates ' - 'watchers for a ' - 'collection of ' - 'units,\n' - 'each of which ' - 'can be used to ' - 'watch for ' - 'lifecycle ' - 'changes to the ' - 'corresponding\n' - "unit's storage " - 'attachments.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/StringsWatchResults'}}, - 'type': 'object'}, - 'WatchUpgradeSeriesNotifications': {'description': 'WatchUpgradeSeriesNotifications ' - 'returns a ' - 'NotifyWatcher ' - 'for ' - 'observing ' - 'changes to ' - 'upgrade ' - 'series ' - 'locks.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/NotifyWatchResults'}}, - 'type': 'object'}, - 'WorkloadVersion': {'description': 'WorkloadVersion returns ' - 'the workload version for ' - 'all given units or ' - 'applications.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/StringResults'}}, - 'type': 'object'}}, - 'type': 'object'} - - - @ReturnMapping(StringsResult) - async def APIAddresses(self): - ''' - APIAddresses returns the list of addresses used to connect to the API. - - - Returns -> StringsResult - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='APIAddresses', - version=18, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(APIHostPortsResult) - async def APIHostPorts(self): - ''' - APIHostPorts returns the API server addresses. - - - Returns -> APIHostPortsResult - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='APIHostPorts', - version=18, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringResults) - async def ActionStatus(self, entities=None): - ''' - ActionStatus returns the status of Actions by Tags passed in. - - entities : typing.Sequence[~Entity] - Returns -> StringResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='ActionStatus', - version=18, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ActionResults) - async def Actions(self, entities=None): - ''' - Actions returns the Actions by Tags passed and ensures that the Unit asking - for them is the same Unit that has the Actions. - - entities : typing.Sequence[~Entity] - Returns -> ActionResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='Actions', - version=18, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def AddMetricBatches(self, batches=None): - ''' - AddMetricBatches adds the metrics for the specified unit. - - batches : typing.Sequence[~MetricBatchParam] - Returns -> ErrorResults - ''' - if batches is not None and not isinstance(batches, (bytes, str, list)): - raise Exception("Expected batches to be a Sequence, received: {}".format(type(batches))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='AddMetricBatches', - version=18, - params=_params) - _params['batches'] = batches - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ApplicationStatusResults) - async def ApplicationStatus(self, entities=None): - ''' - ApplicationStatus returns the status of the Applications and its workloads - if the given unit is the leader. - - entities : typing.Sequence[~Entity] - Returns -> ApplicationStatusResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='ApplicationStatus', - version=18, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringResults) - async def AssignedMachine(self, entities=None): - ''' - AssignedMachine returns the machine tag for each given unit tag, or - an error satisfying params.IsCodeNotAssigned when a unit has no - assigned machine. - - entities : typing.Sequence[~Entity] - Returns -> StringResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='AssignedMachine', - version=18, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringResults) - async def AvailabilityZone(self, entities=None): - ''' - AvailabilityZone returns the availability zone for each given unit, if applicable. - - entities : typing.Sequence[~Entity] - Returns -> StringResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='AvailabilityZone', - version=18, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def BeginActions(self, entities=None): - ''' - BeginActions marks the actions represented by the passed in Tags as running. - - entities : typing.Sequence[~Entity] - Returns -> ErrorResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='BeginActions', - version=18, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(BoolResults) - async def CanApplyLXDProfile(self, entities=None): - ''' - CanApplyLXDProfile is a shim to call the LXDProfileAPIv2 version of this method. - - entities : typing.Sequence[~Entity] - Returns -> BoolResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='CanApplyLXDProfile', - version=18, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringResults) - async def CharmArchiveSha256(self, urls=None): - ''' - CharmArchiveSha256 returns the SHA256 digest of the charm archive - (bundle) data for each charm url in the given parameters. - - urls : typing.Sequence[~CharmURL] - Returns -> StringResults - ''' - if urls is not None and not isinstance(urls, (bytes, str, list)): - raise Exception("Expected urls to be a Sequence, received: {}".format(type(urls))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='CharmArchiveSha256', - version=18, - params=_params) - _params['urls'] = urls - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(IntResults) - async def CharmModifiedVersion(self, entities=None): - ''' - CharmModifiedVersion returns the most CharmModifiedVersion for all given - units or applications. - - entities : typing.Sequence[~Entity] - Returns -> IntResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='CharmModifiedVersion', - version=18, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringBoolResults) - async def CharmURL(self, entities=None): - ''' - CharmURL returns the charm URL for all given units or applications. - - entities : typing.Sequence[~Entity] - Returns -> StringBoolResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='CharmURL', - version=18, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def ClearResolved(self, entities=None): - ''' - ClearResolved removes any resolved setting from each given unit. - - entities : typing.Sequence[~Entity] - Returns -> ErrorResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='ClearResolved', - version=18, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringResult) - async def CloudAPIVersion(self): - ''' - CloudAPIVersion returns the cloud API version, if available. - - - Returns -> StringResult - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='CloudAPIVersion', - version=18, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(CloudSpecResult) - async def CloudSpec(self): - ''' - CloudSpec returns the cloud spec used by the model in which the - authenticated unit or application resides. - A check is made beforehand to ensure that the request is made by an entity - that has been granted the appropriate trust. - - - Returns -> CloudSpecResult - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='CloudSpec', - version=18, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def CommitHookChanges(self, args=None): - ''' - CommitHookChanges batches together all required API calls for applying - a set of changes after a hook successfully completes and executes them in a - single transaction. - - args : typing.Sequence[~CommitHookChangesArg] - Returns -> ErrorResults - ''' - if args is not None and not isinstance(args, (bytes, str, list)): - raise Exception("Expected args to be a Sequence, received: {}".format(type(args))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='CommitHookChanges', - version=18, - params=_params) - _params['args'] = args - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ConfigSettingsResults) - async def ConfigSettings(self, entities=None): - ''' - ConfigSettings returns the complete set of application charm config - settings available to each given unit. - - entities : typing.Sequence[~Entity] - Returns -> ConfigSettingsResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='ConfigSettings', - version=18, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringResults) - async def CreateSecretURIs(self, count=None): - ''' - CreateSecretURIs creates new secret URIs. - - count : int - Returns -> StringResults - ''' - if count is not None and not isinstance(count, int): - raise Exception("Expected count to be a int, received: {}".format(type(count))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='CreateSecretURIs', - version=18, - params=_params) - _params['count'] = count - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringResults) - async def CreateSecrets(self, args=None): - ''' - CreateSecrets creates new secrets. - - args : typing.Sequence[~CreateSecretArg] - Returns -> StringResults - ''' - if args is not None and not isinstance(args, (bytes, str, list)): - raise Exception("Expected args to be a Sequence, received: {}".format(type(args))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='CreateSecrets', - version=18, - params=_params) - _params['args'] = args - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ModelResult) - async def CurrentModel(self): - ''' - CurrentModel returns the name and UUID for the current juju model. - - - Returns -> ModelResult - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='CurrentModel', - version=18, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def Destroy(self, entities=None): - ''' - Destroy advances all given Alive units' lifecycles as far as - possible. See state/Unit.Destroy(). - - entities : typing.Sequence[~Entity] - Returns -> ErrorResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='Destroy', - version=18, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def DestroyAllSubordinates(self, entities=None): - ''' - DestroyAllSubordinates destroys all subordinates of each given unit. - - entities : typing.Sequence[~Entity] - Returns -> ErrorResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='DestroyAllSubordinates', - version=18, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def DestroyUnitStorageAttachments(self, entities=None): - ''' - DestroyUnitStorageAttachments marks each storage attachment of the - specified units as Dying. - - entities : typing.Sequence[~Entity] - Returns -> ErrorResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='DestroyUnitStorageAttachments', - version=18, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def EnsureDead(self, entities=None): - ''' - EnsureDead calls EnsureDead on each given entity from state. It - will fail if the entity is not present. If it's Alive, nothing will - happen (see state/EnsureDead() for units or machines). - - entities : typing.Sequence[~Entity] - Returns -> ErrorResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='EnsureDead', - version=18, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def EnterScope(self, relation_units=None): - ''' - EnterScope ensures each unit has entered its scope in the relation, - for all of the given relation/unit pairs. See also - state.RelationUnit.EnterScope(). - - relation_units : typing.Sequence[~RelationUnit] - Returns -> ErrorResults - ''' - if relation_units is not None and not isinstance(relation_units, (bytes, str, list)): - raise Exception("Expected relation_units to be a Sequence, received: {}".format(type(relation_units))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='EnterScope', - version=18, - params=_params) - _params['relation-units'] = relation_units - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def FinishActions(self, results=None): - ''' - FinishActions saves the result of a completed Action - - results : typing.Sequence[~ActionExecutionResult] - Returns -> ErrorResults - ''' - if results is not None and not isinstance(results, (bytes, str, list)): - raise Exception("Expected results to be a Sequence, received: {}".format(type(results))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='FinishActions', - version=18, - params=_params) - _params['results'] = results - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(SecretConsumerInfoResults) - async def GetConsumerSecretsRevisionInfo(self, consumer_tag=None, uris=None): - ''' - GetConsumerSecretsRevisionInfo returns the latest secret revisions for the specified secrets. - This facade method is used for remote watcher to get the latest secret revisions and labels for a secret changed hook. - - consumer_tag : str - uris : typing.Sequence[str] - Returns -> SecretConsumerInfoResults - ''' - if consumer_tag is not None and not isinstance(consumer_tag, (bytes, str)): - raise Exception("Expected consumer_tag to be a str, received: {}".format(type(consumer_tag))) - - if uris is not None and not isinstance(uris, (bytes, str, list)): - raise Exception("Expected uris to be a Sequence, received: {}".format(type(uris))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='GetConsumerSecretsRevisionInfo', - version=18, - params=_params) - _params['consumer-tag'] = consumer_tag - _params['uris'] = uris - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(MeterStatusResults) - async def GetMeterStatus(self, entities=None): - ''' - entities : typing.Sequence[~Entity] - Returns -> MeterStatusResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='GetMeterStatus', - version=18, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringResults) - async def GetPodSpec(self, entities=None): - ''' - GetPodSpec gets the pod specs for a set of applications. - - entities : typing.Sequence[~Entity] - Returns -> StringResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='GetPodSpec', - version=18, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringBoolResults) - async def GetPrincipal(self, entities=None): - ''' - GetPrincipal returns the result of calling PrincipalName() and - converting it to a tag, on each given unit. - - entities : typing.Sequence[~Entity] - Returns -> StringBoolResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='GetPrincipal', - version=18, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringResults) - async def GetRawK8sSpec(self, entities=None): - ''' - GetRawK8sSpec gets the raw k8s specs for a set of applications. - - entities : typing.Sequence[~Entity] - Returns -> StringResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='GetRawK8sSpec', - version=18, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(SecretBackendConfigResults) - async def GetSecretBackendConfig(self): - ''' - GetSecretBackendConfig gets the config needed to create a client to secret backends. - - - Returns -> SecretBackendConfigResults - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='GetSecretBackendConfig', - version=18, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(SecretContentResults) - async def GetSecretContentInfo(self, args=None): - ''' - GetSecretContentInfo returns the secret values for the specified secrets. - - args : typing.Sequence[~GetSecretContentArg] - Returns -> SecretContentResults - ''' - if args is not None and not isinstance(args, (bytes, str, list)): - raise Exception("Expected args to be a Sequence, received: {}".format(type(args))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='GetSecretContentInfo', - version=18, - params=_params) - _params['args'] = args - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ListSecretResults) - async def GetSecretMetadata(self): - ''' - GetSecretMetadata returns metadata for the caller's secrets. - - - Returns -> ListSecretResults - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='GetSecretMetadata', - version=18, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(SecretContentResults) - async def GetSecretRevisionContentInfo(self, pending_delete=None, revisions=None, uri=None): - ''' - GetSecretRevisionContentInfo returns the secret values for the specified secret revisions. - - pending_delete : bool - revisions : typing.Sequence[int] - uri : str - Returns -> SecretContentResults - ''' - if pending_delete is not None and not isinstance(pending_delete, bool): - raise Exception("Expected pending_delete to be a bool, received: {}".format(type(pending_delete))) - - if revisions is not None and not isinstance(revisions, (bytes, str, list)): - raise Exception("Expected revisions to be a Sequence, received: {}".format(type(revisions))) - - if uri is not None and not isinstance(uri, (bytes, str)): - raise Exception("Expected uri to be a str, received: {}".format(type(uri))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='GetSecretRevisionContentInfo', - version=18, - params=_params) - _params['pending-delete'] = pending_delete - _params['revisions'] = revisions - _params['uri'] = uri - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(SecretBackendConfig) - async def GetSecretStoreConfig(self): - ''' - GetSecretStoreConfig is for 3.0.x agents. - TODO(wallyworld) - remove when we auto upgrade migrated models. - - - Returns -> SecretBackendConfig - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='GetSecretStoreConfig', - version=18, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(GoalStateResults) - async def GoalStates(self, entities=None): - ''' - GoalStates returns information of charm units and relations. - - entities : typing.Sequence[~Entity] - Returns -> GoalStateResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='GoalStates', - version=18, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(BoolResults) - async def HasSubordinates(self, entities=None): - ''' - HasSubordinates returns the whether each given unit has any subordinates. - - entities : typing.Sequence[~Entity] - Returns -> BoolResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='HasSubordinates', - version=18, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringResults) - async def LXDProfileName(self, entities=None): - ''' - LXDProfileName is a shim to call the LXDProfileAPIv2 version of this method. - - entities : typing.Sequence[~Entity] - Returns -> StringResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='LXDProfileName', - version=18, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(BoolResults) - async def LXDProfileRequired(self, urls=None): - ''' - LXDProfileRequired is a shim to call the LXDProfileAPIv2 version of this method. - - urls : typing.Sequence[~CharmURL] - Returns -> BoolResults - ''' - if urls is not None and not isinstance(urls, (bytes, str, list)): - raise Exception("Expected urls to be a Sequence, received: {}".format(type(urls))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='LXDProfileRequired', - version=18, - params=_params) - _params['urls'] = urls - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def LeaveScope(self, relation_units=None): - ''' - LeaveScope signals each unit has left its scope in the relation, - for all of the given relation/unit pairs. See also - state.RelationUnit.LeaveScope(). - - relation_units : typing.Sequence[~RelationUnit] - Returns -> ErrorResults - ''' - if relation_units is not None and not isinstance(relation_units, (bytes, str, list)): - raise Exception("Expected relation_units to be a Sequence, received: {}".format(type(relation_units))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='LeaveScope', - version=18, - params=_params) - _params['relation-units'] = relation_units - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(LifeResults) - async def Life(self, entities=None): - ''' - Life returns the life status of every supplied entity, where available. - - entities : typing.Sequence[~Entity] - Returns -> LifeResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='Life', - version=18, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def LogActionsMessages(self, messages=None): - ''' - LogActionsMessages records the log messages against the specified actions. - - messages : typing.Sequence[~EntityString] - Returns -> ErrorResults - ''' - if messages is not None and not isinstance(messages, (bytes, str, list)): - raise Exception("Expected messages to be a Sequence, received: {}".format(type(messages))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='LogActionsMessages', - version=18, - params=_params) - _params['messages'] = messages - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def Merge(self, params=None): - ''' - Merge merges in the provided leadership settings. Only leaders for - the given service may perform this operation. - - params : typing.Sequence[~MergeLeadershipSettingsParam] - Returns -> ErrorResults - ''' - if params is not None and not isinstance(params, (bytes, str, list)): - raise Exception("Expected params to be a Sequence, received: {}".format(type(params))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='Merge', - version=18, - params=_params) - _params['params'] = params - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ModelConfigResult) - async def ModelConfig(self): - ''' - ModelConfig returns the current model's configuration. - - - Returns -> ModelConfigResult - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='ModelConfig', - version=18, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringResult) - async def ModelUUID(self): - ''' - ModelUUID returns the model UUID that this unit resides in. - It is implemented here directly as a result of removing it from - embedded APIAddresser *without* bumping the facade version. - It should be blanked when this facade version is next incremented. - - - Returns -> StringResult - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='ModelUUID', - version=18, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(NetworkInfoResults) - async def NetworkInfo(self, bindings=None, relation_id=None, unit=None): - ''' - NetworkInfo returns network interfaces/addresses for specified bindings. - - bindings : typing.Sequence[str] - relation_id : int - unit : str - Returns -> NetworkInfoResults - ''' - if bindings is not None and not isinstance(bindings, (bytes, str, list)): - raise Exception("Expected bindings to be a Sequence, received: {}".format(type(bindings))) - - if relation_id is not None and not isinstance(relation_id, int): - raise Exception("Expected relation_id to be a int, received: {}".format(type(relation_id))) - - if unit is not None and not isinstance(unit, (bytes, str)): - raise Exception("Expected unit to be a str, received: {}".format(type(unit))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='NetworkInfo', - version=18, - params=_params) - _params['bindings'] = bindings - _params['relation-id'] = relation_id - _params['unit'] = unit - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ApplicationOpenedPortsResults) - async def OpenedApplicationPortRangesByEndpoint(self, tag=None): - ''' - OpenedApplicationPortRangesByEndpoint returns the port ranges opened by each application. - - tag : str - Returns -> ApplicationOpenedPortsResults - ''' - if tag is not None and not isinstance(tag, (bytes, str)): - raise Exception("Expected tag to be a str, received: {}".format(type(tag))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='OpenedApplicationPortRangesByEndpoint', - version=18, - params=_params) - _params['tag'] = tag - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(OpenPortRangesByEndpointResults) - async def OpenedMachinePortRangesByEndpoint(self, entities=None): - ''' - OpenedMachinePortRangesByEndpoint returns the port ranges opened by each - unit on the provided machines grouped by application endpoint. - - entities : typing.Sequence[~Entity] - Returns -> OpenPortRangesByEndpointResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='OpenedMachinePortRangesByEndpoint', - version=18, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(OpenPortRangesByEndpointResults) - async def OpenedPortRangesByEndpoint(self): - ''' - OpenedPortRangesByEndpoint returns the port ranges opened by the unit. - - - Returns -> OpenPortRangesByEndpointResults - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='OpenedPortRangesByEndpoint', - version=18, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringResults) - async def PrivateAddress(self, entities=None): - ''' - PrivateAddress returns the private address for each given unit, if set. - - entities : typing.Sequence[~Entity] - Returns -> StringResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='PrivateAddress', - version=18, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringResult) - async def ProviderType(self): - ''' - ProviderType returns the provider type used by the current juju - model. - - TODO(dimitern): Refactor the uniter to call this instead of calling - ModelConfig() just to get the provider type. Once we have machine - addresses, this might be completely unnecessary though. - - - Returns -> StringResult - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='ProviderType', - version=18, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringResults) - async def PublicAddress(self, entities=None): - ''' - PublicAddress returns the public address for each given unit, if set. - - entities : typing.Sequence[~Entity] - Returns -> StringResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='PublicAddress', - version=18, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(GetLeadershipSettingsBulkResults) - async def Read(self, entities=None): - ''' - Read reads leadership settings for the provided service ID. Any - unit of the service may perform this operation. - - entities : typing.Sequence[~Entity] - Returns -> GetLeadershipSettingsBulkResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='Read', - version=18, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(SettingsResult) - async def ReadLocalApplicationSettings(self, relation=None, unit=None): - ''' - ReadLocalApplicationSettings returns the local application settings for a - particular relation when invoked by the leader unit. - - relation : str - unit : str - Returns -> SettingsResult - ''' - if relation is not None and not isinstance(relation, (bytes, str)): - raise Exception("Expected relation to be a str, received: {}".format(type(relation))) - - if unit is not None and not isinstance(unit, (bytes, str)): - raise Exception("Expected unit to be a str, received: {}".format(type(unit))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='ReadLocalApplicationSettings', - version=18, - params=_params) - _params['relation'] = relation - _params['unit'] = unit - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(SettingsResults) - async def ReadRemoteSettings(self, relation_unit_pairs=None): - ''' - ReadRemoteSettings returns the remote settings of each given set of - relation/local unit/remote unit. - - relation_unit_pairs : typing.Sequence[~RelationUnitPair] - Returns -> SettingsResults - ''' - if relation_unit_pairs is not None and not isinstance(relation_unit_pairs, (bytes, str, list)): - raise Exception("Expected relation_unit_pairs to be a Sequence, received: {}".format(type(relation_unit_pairs))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='ReadRemoteSettings', - version=18, - params=_params) - _params['relation-unit-pairs'] = relation_unit_pairs - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(SettingsResults) - async def ReadSettings(self, relation_units=None): - ''' - ReadSettings returns the local settings of each given set of - relation/unit. - - NOTE(achilleasa): Using this call to read application data is deprecated - and will not work for k8s charms (see LP1876097). Instead, clients should - use ReadLocalApplicationSettings. - - relation_units : typing.Sequence[~RelationUnit] - Returns -> SettingsResults - ''' - if relation_units is not None and not isinstance(relation_units, (bytes, str, list)): - raise Exception("Expected relation_units to be a Sequence, received: {}".format(type(relation_units))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='ReadSettings', - version=18, - params=_params) - _params['relation-units'] = relation_units - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(UnitRefreshResults) - async def Refresh(self, entities=None): - ''' - Refresh retrieves the latest values for attributes on this unit. - - entities : typing.Sequence[~Entity] - Returns -> UnitRefreshResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='Refresh', - version=18, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(RelationResults) - async def Relation(self, relation_units=None): - ''' - Relation returns information about all given relation/unit pairs, - including their id, key and the local endpoint. - - relation_units : typing.Sequence[~RelationUnit] - Returns -> RelationResults - ''' - if relation_units is not None and not isinstance(relation_units, (bytes, str, list)): - raise Exception("Expected relation_units to be a Sequence, received: {}".format(type(relation_units))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='Relation', - version=18, - params=_params) - _params['relation-units'] = relation_units - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(RelationResults) - async def RelationById(self, relation_ids=None): - ''' - RelationById returns information about all given relations, - specified by their ids, including their key and the local - endpoint. - - relation_ids : typing.Sequence[int] - Returns -> RelationResults - ''' - if relation_ids is not None and not isinstance(relation_ids, (bytes, str, list)): - raise Exception("Expected relation_ids to be a Sequence, received: {}".format(type(relation_ids))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='RelationById', - version=18, - params=_params) - _params['relation-ids'] = relation_ids - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(RelationUnitStatusResults) - async def RelationsStatus(self, entities=None): - ''' - RelationsStatus returns for each unit the corresponding relation and status information. - - entities : typing.Sequence[~Entity] - Returns -> RelationUnitStatusResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='RelationsStatus', - version=18, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def RemoveSecrets(self, args=None): - ''' - RemoveSecrets removes the specified secrets. - - args : typing.Sequence[~DeleteSecretArg] - Returns -> ErrorResults - ''' - if args is not None and not isinstance(args, (bytes, str, list)): - raise Exception("Expected args to be a Sequence, received: {}".format(type(args))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='RemoveSecrets', - version=18, - params=_params) - _params['args'] = args - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def RemoveStorageAttachments(self, ids=None): - ''' - RemoveStorageAttachments removes the specified storage - attachments from state. - - ids : typing.Sequence[~StorageAttachmentId] - Returns -> ErrorResults - ''' - if ids is not None and not isinstance(ids, (bytes, str, list)): - raise Exception("Expected ids to be a Sequence, received: {}".format(type(ids))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='RemoveStorageAttachments', - version=18, - params=_params) - _params['ids'] = ids - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def RequestReboot(self, entities=None): - ''' - RequestReboot sets the reboot flag on the provided machines - - entities : typing.Sequence[~Entity] - Returns -> ErrorResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='RequestReboot', - version=18, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ResolvedModeResults) - async def Resolved(self, entities=None): - ''' - Resolved returns the current resolved setting for each given unit. - - entities : typing.Sequence[~Entity] - Returns -> ResolvedModeResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='Resolved', - version=18, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringResult) - async def SLALevel(self): - ''' - SLALevel returns the model's SLA level. - - - Returns -> StringResult - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='SLALevel', - version=18, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def SecretsGrant(self, args=None): - ''' - SecretsGrant grants access to a secret for the specified subjects. - - args : typing.Sequence[~GrantRevokeSecretArg] - Returns -> ErrorResults - ''' - if args is not None and not isinstance(args, (bytes, str, list)): - raise Exception("Expected args to be a Sequence, received: {}".format(type(args))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='SecretsGrant', - version=18, - params=_params) - _params['args'] = args - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def SecretsRevoke(self, args=None): - ''' - SecretsRevoke revokes access to a secret for the specified subjects. - - args : typing.Sequence[~GrantRevokeSecretArg] - Returns -> ErrorResults - ''' - if args is not None and not isinstance(args, (bytes, str, list)): - raise Exception("Expected args to be a Sequence, received: {}".format(type(args))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='SecretsRevoke', - version=18, - params=_params) - _params['args'] = args - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def SecretsRotated(self, args=None): - ''' - SecretsRotated records when secrets were last rotated. - - args : typing.Sequence[~SecretRotatedArg] - Returns -> ErrorResults - ''' - if args is not None and not isinstance(args, (bytes, str, list)): - raise Exception("Expected args to be a Sequence, received: {}".format(type(args))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='SecretsRotated', - version=18, - params=_params) - _params['args'] = args - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def SetAgentStatus(self, entities=None): - ''' - SetAgentStatus will set status for agents of Units passed in args, if one - of the args is not an Unit it will fail. - - entities : typing.Sequence[~EntityStatusArgs] - Returns -> ErrorResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='SetAgentStatus', - version=18, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def SetApplicationStatus(self, entities=None): - ''' - SetApplicationStatus sets the status for all the Applications in args if the given Unit is - the leader. - - entities : typing.Sequence[~EntityStatusArgs] - Returns -> ErrorResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='SetApplicationStatus', - version=18, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def SetCharmURL(self, entities=None): - ''' - SetCharmURL sets the charm URL for each given unit. An error will - be returned if a unit is dead, or the charm URL is not known. - - entities : typing.Sequence[~EntityCharmURL] - Returns -> ErrorResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='SetCharmURL', - version=18, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def SetRelationStatus(self, args=None): - ''' - SetRelationStatus updates the status of the specified relations. - - args : typing.Sequence[~RelationStatusArg] - Returns -> ErrorResults - ''' - if args is not None and not isinstance(args, (bytes, str, list)): - raise Exception("Expected args to be a Sequence, received: {}".format(type(args))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='SetRelationStatus', - version=18, - params=_params) - _params['args'] = args - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def SetState(self, args=None): - ''' - SetState sets the state persisted by the charm running in this unit - and the state internal to the uniter for this unit. - - args : typing.Sequence[~SetUnitStateArg] - Returns -> ErrorResults - ''' - if args is not None and not isinstance(args, (bytes, str, list)): - raise Exception("Expected args to be a Sequence, received: {}".format(type(args))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='SetState', - version=18, - params=_params) - _params['args'] = args - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def SetStatus(self, entities=None): - ''' - SetStatus will set status for a entities passed in args. If the entity is - a Unit it will instead set status to its agent, to emulate backwards - compatibility. - - entities : typing.Sequence[~EntityStatusArgs] - Returns -> ErrorResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='SetStatus', - version=18, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def SetUnitStatus(self, entities=None): - ''' - SetUnitStatus sets status for all elements passed in args, the difference - with SetStatus is that if an entity is a Unit it will set its status instead - of its agent. - - entities : typing.Sequence[~EntityStatusArgs] - Returns -> ErrorResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='SetUnitStatus', - version=18, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def SetUpgradeSeriesUnitStatus(self, params=None): - ''' - SetUpgradeSeriesUnitStatus sets the upgrade series status of the unit. - If no upgrade is in progress an error is returned instead. - - params : typing.Sequence[~UpgradeSeriesStatusParam] - Returns -> ErrorResults - ''' - if params is not None and not isinstance(params, (bytes, str, list)): - raise Exception("Expected params to be a Sequence, received: {}".format(type(params))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='SetUpgradeSeriesUnitStatus', - version=18, - params=_params) - _params['params'] = params - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def SetWorkloadVersion(self, entities=None): - ''' - SetWorkloadVersion sets the workload version for each given unit. An error will - be returned if a unit is dead. - - entities : typing.Sequence[~EntityWorkloadVersion] - Returns -> ErrorResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='SetWorkloadVersion', - version=18, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(UnitStateResults) - async def State(self, entities=None): - ''' - State returns the state persisted by the charm running in this unit - and the state internal to the uniter for this unit. - - entities : typing.Sequence[~Entity] - Returns -> UnitStateResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='State', - version=18, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(LifeResults) - async def StorageAttachmentLife(self, ids=None): - ''' - StorageAttachmentLife returns the lifecycle state of the storage attachments - with the specified tags. - - ids : typing.Sequence[~StorageAttachmentId] - Returns -> LifeResults - ''' - if ids is not None and not isinstance(ids, (bytes, str, list)): - raise Exception("Expected ids to be a Sequence, received: {}".format(type(ids))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='StorageAttachmentLife', - version=18, - params=_params) - _params['ids'] = ids - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StorageAttachmentResults) - async def StorageAttachments(self, ids=None): - ''' - StorageAttachments returns the storage attachments with the specified tags. - - ids : typing.Sequence[~StorageAttachmentId] - Returns -> StorageAttachmentResults - ''' - if ids is not None and not isinstance(ids, (bytes, str, list)): - raise Exception("Expected ids to be a Sequence, received: {}".format(type(ids))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='StorageAttachments', - version=18, - params=_params) - _params['ids'] = ids - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StatusResults) - async def UnitStatus(self, entities=None): - ''' - UnitStatus returns the workload status information for the unit. - - entities : typing.Sequence[~Entity] - Returns -> StatusResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='UnitStatus', - version=18, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StorageAttachmentIdsResults) - async def UnitStorageAttachments(self, entities=None): - ''' - UnitStorageAttachments returns the IDs of storage attachments for a collection of units. - - entities : typing.Sequence[~Entity] - Returns -> StorageAttachmentIdsResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='UnitStorageAttachments', - version=18, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def UpdateNetworkInfo(self, entities=None): - ''' - UpdateNetworkInfo refreshes the network settings for a unit's bound - endpoints. - - entities : typing.Sequence[~Entity] - Returns -> ErrorResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='UpdateNetworkInfo', - version=18, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def UpdateSecrets(self, args=None): - ''' - UpdateSecrets updates the specified secrets. - - args : typing.Sequence[~UpdateSecretArg] - Returns -> ErrorResults - ''' - if args is not None and not isinstance(args, (bytes, str, list)): - raise Exception("Expected args to be a Sequence, received: {}".format(type(args))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='UpdateSecrets', - version=18, - params=_params) - _params['args'] = args - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(UpgradeSeriesStatusResults) - async def UpgradeSeriesUnitStatus(self, entities=None): - ''' - UpgradeSeriesUnitStatus returns the current preparation status of an - upgrading unit. - If no series upgrade is in progress an error is returned instead. - - entities : typing.Sequence[~Entity] - Returns -> UpgradeSeriesStatusResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='UpgradeSeriesUnitStatus', - version=18, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(NotifyWatchResults) - async def Watch(self, entities=None): - ''' - Watch starts an NotifyWatcher for each given entity. - - entities : typing.Sequence[~Entity] - Returns -> NotifyWatchResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='Watch', - version=18, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(NotifyWatchResult) - async def WatchAPIHostPorts(self): - ''' - WatchAPIHostPorts watches the API server addresses. - - - Returns -> NotifyWatchResult - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='WatchAPIHostPorts', - version=18, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringsWatchResults) - async def WatchActionNotifications(self, entities=None): - ''' - WatchActionNotifications returns a StringsWatcher for observing - incoming action calls to a unit. See also state/watcher.go - Unit.WatchActionNotifications(). This method is called from - api/uniter/uniter.go WatchActionNotifications(). - - entities : typing.Sequence[~Entity] - Returns -> StringsWatchResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='WatchActionNotifications', - version=18, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringsWatchResults) - async def WatchConfigSettingsHash(self, entities=None): - ''' - WatchConfigSettingsHash returns a StringsWatcher that yields a hash - of the config values every time the config changes. The uniter can - save this hash and use it to decide whether the config-changed hook - needs to be run (or whether this was just an agent restart with no - substantive config change). - - entities : typing.Sequence[~Entity] - Returns -> StringsWatchResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='WatchConfigSettingsHash', - version=18, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringsWatchResults) - async def WatchConsumedSecretsChanges(self, entities=None): - ''' - WatchConsumedSecretsChanges sets up a watcher to notify of changes to secret revisions for the specified consumers. - - entities : typing.Sequence[~Entity] - Returns -> StringsWatchResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='WatchConsumedSecretsChanges', - version=18, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(NotifyWatchResult) - async def WatchForModelConfigChanges(self): - ''' - WatchForModelConfigChanges returns a NotifyWatcher that observes - changes to the model configuration. - Note that although the NotifyWatchResult contains an Error field, - it's not used because we are only returning a single watcher, - so we use the regular error return. - - - Returns -> NotifyWatchResult - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='WatchForModelConfigChanges', - version=18, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(NotifyWatchResults) - async def WatchInstanceData(self, entities=None): - ''' - WatchInstanceData is a shim to call the LXDProfileAPIv2 version of this method. - - entities : typing.Sequence[~Entity] - Returns -> NotifyWatchResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='WatchInstanceData', - version=18, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(NotifyWatchResults) - async def WatchLeadershipSettings(self, entities=None): - ''' - WatchLeadershipSettings will block the caller until leadership settings - for the given service ID change. - - entities : typing.Sequence[~Entity] - Returns -> NotifyWatchResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='WatchLeadershipSettings', - version=18, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(NotifyWatchResults) - async def WatchMeterStatus(self, entities=None): - ''' - entities : typing.Sequence[~Entity] - Returns -> NotifyWatchResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='WatchMeterStatus', - version=18, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringsWatchResult) - async def WatchObsolete(self, entities=None): - ''' - WatchObsolete returns a watcher for notifying when: - - a secret owned by the entity is deleted - - a secret revision owed by the entity no longer - has any consumers - - Obsolete revisions results are "uri/revno" and deleted - secret results are "uri". - - entities : typing.Sequence[~Entity] - Returns -> StringsWatchResult - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='WatchObsolete', - version=18, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(RelationUnitsWatchResults) - async def WatchRelationUnits(self, relation_units=None): - ''' - WatchRelationUnits returns a RelationUnitsWatcher for observing - changes to every unit in the supplied relation that is visible to - the supplied unit. See also state/watcher.go:RelationUnit.Watch(). - - relation_units : typing.Sequence[~RelationUnit] - Returns -> RelationUnitsWatchResults - ''' - if relation_units is not None and not isinstance(relation_units, (bytes, str, list)): - raise Exception("Expected relation_units to be a Sequence, received: {}".format(type(relation_units))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='WatchRelationUnits', - version=18, - params=_params) - _params['relation-units'] = relation_units - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(SecretTriggerWatchResult) - async def WatchSecretRevisionsExpiryChanges(self, entities=None): - ''' - WatchSecretRevisionsExpiryChanges sets up a watcher to notify of changes to secret revision expiry config. - - entities : typing.Sequence[~Entity] - Returns -> SecretTriggerWatchResult - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='WatchSecretRevisionsExpiryChanges', - version=18, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(SecretTriggerWatchResult) - async def WatchSecretsRotationChanges(self, entities=None): - ''' - WatchSecretsRotationChanges sets up a watcher to notify of changes to secret rotation config. - - entities : typing.Sequence[~Entity] - Returns -> SecretTriggerWatchResult - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='WatchSecretsRotationChanges', - version=18, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(NotifyWatchResults) - async def WatchStorageAttachments(self, ids=None): - ''' - WatchStorageAttachments creates watchers for a collection of storage - attachments, each of which can be used to watch changes to storage - attachment info. - - ids : typing.Sequence[~StorageAttachmentId] - Returns -> NotifyWatchResults - ''' - if ids is not None and not isinstance(ids, (bytes, str, list)): - raise Exception("Expected ids to be a Sequence, received: {}".format(type(ids))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='WatchStorageAttachments', - version=18, - params=_params) - _params['ids'] = ids - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringsWatchResults) - async def WatchTrustConfigSettingsHash(self, entities=None): - ''' - WatchTrustConfigSettingsHash returns a StringsWatcher that yields a - hash of the application config values whenever they change. The - uniter can use the hash to determine whether the actual values have - changed since it last saw the config. - - entities : typing.Sequence[~Entity] - Returns -> StringsWatchResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='WatchTrustConfigSettingsHash', - version=18, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringsWatchResults) - async def WatchUnitAddressesHash(self, entities=None): - ''' - WatchUnitAddressesHash returns a StringsWatcher that yields the - hashes of the addresses for the unit whenever the addresses - change. The uniter can use the hash to determine whether the actual - address values have changed since it last saw the config. - - entities : typing.Sequence[~Entity] - Returns -> StringsWatchResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='WatchUnitAddressesHash', - version=18, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringsWatchResults) - async def WatchUnitRelations(self, entities=None): - ''' - WatchUnitRelations returns a StringsWatcher, for each given - unit, that notifies of changes to the lifecycles of relations - relevant to that unit. For principal units, this will be all of the - relations for the application. For subordinate units, only - relations with the principal unit's application will be monitored. - - entities : typing.Sequence[~Entity] - Returns -> StringsWatchResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='WatchUnitRelations', - version=18, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringsWatchResults) - async def WatchUnitStorageAttachments(self, entities=None): - ''' - WatchUnitStorageAttachments creates watchers for a collection of units, - each of which can be used to watch for lifecycle changes to the corresponding - unit's storage attachments. - - entities : typing.Sequence[~Entity] - Returns -> StringsWatchResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='WatchUnitStorageAttachments', - version=18, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(NotifyWatchResults) - async def WatchUpgradeSeriesNotifications(self, entities=None): - ''' - WatchUpgradeSeriesNotifications returns a NotifyWatcher for observing changes to upgrade series locks. - - entities : typing.Sequence[~Entity] - Returns -> NotifyWatchResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='WatchUpgradeSeriesNotifications', - version=18, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringResults) - async def WorkloadVersion(self, entities=None): - ''' - WorkloadVersion returns the workload version for all given units or applications. - - entities : typing.Sequence[~Entity] - Returns -> StringResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='WorkloadVersion', - version=18, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - diff --git a/juju/client/_client19.py b/juju/client/_client19.py index 476ed112..897e95da 100644 --- a/juju/client/_client19.py +++ b/juju/client/_client19.py @@ -1811,4494 +1811,3 @@ async def UpdateApplicationBase(self, args=None): return reply - -class UniterFacade(Type): - name = 'Uniter' - version = 19 - schema = {'definitions': {'APIHostPortsResult': {'additionalProperties': False, - 'properties': {'servers': {'items': {'items': {'$ref': '#/definitions/HostPort'}, - 'type': 'array'}, - 'type': 'array'}}, - 'required': ['servers'], - 'type': 'object'}, - 'Action': {'additionalProperties': False, - 'properties': {'execution-group': {'type': 'string'}, - 'name': {'type': 'string'}, - 'parallel': {'type': 'boolean'}, - 'parameters': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'receiver': {'type': 'string'}, - 'tag': {'type': 'string'}}, - 'required': ['tag', 'receiver', 'name'], - 'type': 'object'}, - 'ActionExecutionResult': {'additionalProperties': False, - 'properties': {'action-tag': {'type': 'string'}, - 'message': {'type': 'string'}, - 'results': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'status': {'type': 'string'}}, - 'required': ['action-tag', 'status'], - 'type': 'object'}, - 'ActionExecutionResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/ActionExecutionResult'}, - 'type': 'array'}}, - 'type': 'object'}, - 'ActionMessage': {'additionalProperties': False, - 'properties': {'message': {'type': 'string'}, - 'timestamp': {'format': 'date-time', - 'type': 'string'}}, - 'required': ['timestamp', 'message'], - 'type': 'object'}, - 'ActionMessageParams': {'additionalProperties': False, - 'properties': {'messages': {'items': {'$ref': '#/definitions/EntityString'}, - 'type': 'array'}}, - 'required': ['messages'], - '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'}, - 'log': {'items': {'$ref': '#/definitions/ActionMessage'}, - 'type': 'array'}, - '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': {'cidr': {'type': 'string'}, - 'config-type': {'type': 'string'}, - 'is-secondary': {'type': 'boolean'}, - 'scope': {'type': 'string'}, - 'space-id': {'type': 'string'}, - 'space-name': {'type': 'string'}, - 'type': {'type': 'string'}, - 'value': {'type': 'string'}}, - 'required': ['value', 'type', 'scope'], - 'type': 'object'}, - 'ApplicationStatusResult': {'additionalProperties': False, - 'properties': {'application': {'$ref': '#/definitions/StatusResult'}, - 'error': {'$ref': '#/definitions/Error'}, - 'units': {'patternProperties': {'.*': {'$ref': '#/definitions/StatusResult'}}, - 'type': 'object'}}, - 'required': ['application', - 'units'], - 'type': 'object'}, - 'ApplicationStatusResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/ApplicationStatusResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'BoolResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'result': {'type': 'boolean'}}, - 'required': ['result'], - 'type': 'object'}, - 'BoolResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/BoolResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'CharmRelation': {'additionalProperties': False, - 'properties': {'interface': {'type': 'string'}, - 'limit': {'type': 'integer'}, - 'name': {'type': 'string'}, - 'optional': {'type': 'boolean'}, - 'role': {'type': 'string'}, - 'scope': {'type': 'string'}}, - 'required': ['name', - 'role', - 'interface', - 'optional', - 'limit', - 'scope'], - 'type': 'object'}, - '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'}, - 'CloudCredential': {'additionalProperties': False, - 'properties': {'attrs': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}, - 'auth-type': {'type': 'string'}, - 'redacted': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'required': ['auth-type'], - 'type': 'object'}, - 'CloudSpec': {'additionalProperties': False, - 'properties': {'cacertificates': {'items': {'type': 'string'}, - 'type': 'array'}, - 'credential': {'$ref': '#/definitions/CloudCredential'}, - 'endpoint': {'type': 'string'}, - 'identity-endpoint': {'type': 'string'}, - 'is-controller-cloud': {'type': 'boolean'}, - 'name': {'type': 'string'}, - 'region': {'type': 'string'}, - 'skip-tls-verify': {'type': 'boolean'}, - 'storage-endpoint': {'type': 'string'}, - 'type': {'type': 'string'}}, - 'required': ['type', 'name'], - 'type': 'object'}, - 'CloudSpecResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'result': {'$ref': '#/definitions/CloudSpec'}}, - 'type': 'object'}, - 'CommitHookChangesArg': {'additionalProperties': False, - 'properties': {'add-storage': {'items': {'$ref': '#/definitions/StorageAddParams'}, - 'type': 'array'}, - 'close-ports': {'items': {'$ref': '#/definitions/EntityPortRange'}, - 'type': 'array'}, - 'open-ports': {'items': {'$ref': '#/definitions/EntityPortRange'}, - 'type': 'array'}, - 'pod-spec': {'$ref': '#/definitions/PodSpec'}, - 'relation-unit-settings': {'items': {'$ref': '#/definitions/RelationUnitSettings'}, - 'type': 'array'}, - 'secret-creates': {'items': {'$ref': '#/definitions/CreateSecretArg'}, - 'type': 'array'}, - 'secret-deletes': {'items': {'$ref': '#/definitions/DeleteSecretArg'}, - 'type': 'array'}, - 'secret-grants': {'items': {'$ref': '#/definitions/GrantRevokeSecretArg'}, - 'type': 'array'}, - 'secret-revokes': {'items': {'$ref': '#/definitions/GrantRevokeSecretArg'}, - 'type': 'array'}, - 'secret-updates': {'items': {'$ref': '#/definitions/UpdateSecretArg'}, - 'type': 'array'}, - 'set-raw-k8s-spec': {'$ref': '#/definitions/PodSpec'}, - 'tag': {'type': 'string'}, - 'unit-state': {'$ref': '#/definitions/SetUnitStateArg'}, - 'update-network-info': {'type': 'boolean'}}, - 'required': ['tag', - 'update-network-info'], - 'type': 'object'}, - 'CommitHookChangesArgs': {'additionalProperties': False, - 'properties': {'args': {'items': {'$ref': '#/definitions/CommitHookChangesArg'}, - 'type': 'array'}}, - 'required': ['args'], - 'type': 'object'}, - 'ConfigSettingsResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'settings': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}}, - 'required': ['settings'], - 'type': 'object'}, - 'ConfigSettingsResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/ConfigSettingsResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'CreateSecretArg': {'additionalProperties': False, - 'properties': {'UpsertSecretArg': {'$ref': '#/definitions/UpsertSecretArg'}, - 'content': {'$ref': '#/definitions/SecretContentParams'}, - 'description': {'type': 'string'}, - 'expire-time': {'format': 'date-time', - 'type': 'string'}, - 'label': {'type': 'string'}, - 'owner-tag': {'type': 'string'}, - 'params': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'rotate-policy': {'type': 'string'}, - 'uri': {'type': 'string'}}, - 'required': ['UpsertSecretArg', - 'owner-tag'], - 'type': 'object'}, - 'CreateSecretArgs': {'additionalProperties': False, - 'properties': {'args': {'items': {'$ref': '#/definitions/CreateSecretArg'}, - 'type': 'array'}}, - 'required': ['args'], - 'type': 'object'}, - 'CreateSecretURIsArg': {'additionalProperties': False, - 'properties': {'count': {'type': 'integer'}}, - 'required': ['count'], - 'type': 'object'}, - 'DeleteSecretArg': {'additionalProperties': False, - 'properties': {'label': {'type': 'string'}, - 'revisions': {'items': {'type': 'integer'}, - 'type': 'array'}, - 'uri': {'type': 'string'}}, - 'required': ['uri', 'label'], - 'type': 'object'}, - 'DeleteSecretArgs': {'additionalProperties': False, - 'properties': {'args': {'items': {'$ref': '#/definitions/DeleteSecretArg'}, - 'type': 'array'}}, - 'required': ['args'], - 'type': 'object'}, - 'Endpoint': {'additionalProperties': False, - 'properties': {'application-name': {'type': 'string'}, - 'relation': {'$ref': '#/definitions/CharmRelation'}}, - 'required': ['application-name', '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'}, - 'Entity': {'additionalProperties': False, - 'properties': {'tag': {'type': 'string'}}, - 'required': ['tag'], - 'type': 'object'}, - 'EntityCharmURL': {'additionalProperties': False, - 'properties': {'charm-url': {'type': 'string'}, - 'tag': {'type': 'string'}}, - 'required': ['tag', 'charm-url'], - 'type': 'object'}, - 'EntityPortRange': {'additionalProperties': False, - 'properties': {'endpoint': {'type': 'string'}, - 'from-port': {'type': 'integer'}, - 'protocol': {'type': 'string'}, - 'tag': {'type': 'string'}, - 'to-port': {'type': 'integer'}}, - 'required': ['tag', - 'protocol', - 'from-port', - 'to-port', - 'endpoint'], - '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'}, - 'EntityString': {'additionalProperties': False, - 'properties': {'tag': {'type': 'string'}, - 'value': {'type': 'string'}}, - 'required': ['tag', 'value'], - 'type': 'object'}, - 'EntityWorkloadVersion': {'additionalProperties': False, - 'properties': {'tag': {'type': 'string'}, - 'workload-version': {'type': 'string'}}, - 'required': ['tag', - 'workload-version'], - 'type': 'object'}, - 'EntityWorkloadVersions': {'additionalProperties': False, - 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityWorkloadVersion'}, - 'type': 'array'}}, - 'required': ['entities'], - 'type': 'object'}, - 'Error': {'additionalProperties': False, - 'properties': {'code': {'type': 'string'}, - 'info': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'message': {'type': 'string'}}, - 'required': ['message', 'code'], - 'type': 'object'}, - 'ErrorResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}}, - 'type': 'object'}, - 'ErrorResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - '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'], - 'type': 'object'}, - 'GetSecretConsumerInfoArgs': {'additionalProperties': False, - 'properties': {'consumer-tag': {'type': 'string'}, - 'uris': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'required': ['consumer-tag', - 'uris'], - 'type': 'object'}, - 'GetSecretContentArg': {'additionalProperties': False, - 'properties': {'label': {'type': 'string'}, - 'peek': {'type': 'boolean'}, - 'refresh': {'type': 'boolean'}, - 'uri': {'type': 'string'}}, - 'required': ['uri'], - 'type': 'object'}, - 'GetSecretContentArgs': {'additionalProperties': False, - 'properties': {'args': {'items': {'$ref': '#/definitions/GetSecretContentArg'}, - 'type': 'array'}}, - 'required': ['args'], - 'type': 'object'}, - 'GoalState': {'additionalProperties': False, - 'properties': {'relations': {'patternProperties': {'.*': {'patternProperties': {'.*': {'$ref': '#/definitions/GoalStateStatus'}}, - 'type': 'object'}}, - 'type': 'object'}, - 'units': {'patternProperties': {'.*': {'$ref': '#/definitions/GoalStateStatus'}}, - 'type': 'object'}}, - 'required': ['units', 'relations'], - 'type': 'object'}, - 'GoalStateResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'result': {'$ref': '#/definitions/GoalState'}}, - 'required': ['result', 'error'], - 'type': 'object'}, - 'GoalStateResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/GoalStateResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'GoalStateStatus': {'additionalProperties': False, - 'properties': {'since': {'format': 'date-time', - 'type': 'string'}, - 'status': {'type': 'string'}}, - 'required': ['status', 'since'], - 'type': 'object'}, - 'GrantRevokeSecretArg': {'additionalProperties': False, - 'properties': {'role': {'type': 'string'}, - 'scope-tag': {'type': 'string'}, - 'subject-tags': {'items': {'type': 'string'}, - 'type': 'array'}, - 'uri': {'type': 'string'}}, - 'required': ['uri', - 'scope-tag', - 'subject-tags', - 'role'], - 'type': 'object'}, - 'GrantRevokeSecretArgs': {'additionalProperties': False, - 'properties': {'args': {'items': {'$ref': '#/definitions/GrantRevokeSecretArg'}, - 'type': 'array'}}, - 'required': ['args'], - 'type': 'object'}, - 'HostPort': {'additionalProperties': False, - 'properties': {'Address': {'$ref': '#/definitions/Address'}, - 'cidr': {'type': 'string'}, - 'config-type': {'type': 'string'}, - 'is-secondary': {'type': 'boolean'}, - 'port': {'type': 'integer'}, - 'scope': {'type': 'string'}, - 'space-id': {'type': 'string'}, - 'space-name': {'type': 'string'}, - 'type': {'type': 'string'}, - 'value': {'type': 'string'}}, - 'required': ['value', - 'type', - 'scope', - 'Address', - 'port'], - 'type': 'object'}, - 'IntResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'result': {'type': 'integer'}}, - 'required': ['result'], - 'type': 'object'}, - 'IntResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/IntResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'InterfaceAddress': {'additionalProperties': False, - 'properties': {'cidr': {'type': 'string'}, - 'hostname': {'type': 'string'}, - 'value': {'type': 'string'}}, - 'required': ['hostname', 'value', 'cidr'], - 'type': 'object'}, - 'LifeResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'life': {'type': 'string'}}, - 'required': ['life'], - 'type': 'object'}, - 'LifeResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'ListSecretResult': {'additionalProperties': False, - 'properties': {'create-time': {'format': 'date-time', - 'type': 'string'}, - 'description': {'type': 'string'}, - 'label': {'type': 'string'}, - 'latest-expire-time': {'format': 'date-time', - 'type': 'string'}, - 'latest-revision': {'type': 'integer'}, - 'next-rotate-time': {'format': 'date-time', - 'type': 'string'}, - 'owner-tag': {'type': 'string'}, - 'revisions': {'items': {'$ref': '#/definitions/SecretRevision'}, - 'type': 'array'}, - 'rotate-policy': {'type': 'string'}, - 'update-time': {'format': 'date-time', - 'type': 'string'}, - 'uri': {'type': 'string'}, - 'value': {'$ref': '#/definitions/SecretValueResult'}, - 'version': {'type': 'integer'}}, - 'required': ['uri', - 'version', - 'owner-tag', - 'latest-revision', - 'create-time', - 'update-time', - 'revisions'], - 'type': 'object'}, - 'ListSecretResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/ListSecretResult'}, - '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': {'application-tag': {'type': 'string'}, - 'settings': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}, - 'unit-tag': {'type': 'string'}}, - 'required': ['settings'], - 'type': 'object'}, - 'MeterStatusResult': {'additionalProperties': False, - 'properties': {'code': {'type': 'string'}, - 'error': {'$ref': '#/definitions/Error'}, - 'info': {'type': 'string'}}, - 'required': ['code', 'info'], - 'type': 'object'}, - 'MeterStatusResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/MeterStatusResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'Metric': {'additionalProperties': False, - 'properties': {'key': {'type': 'string'}, - 'labels': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}, - 'time': {'format': 'date-time', - 'type': 'string'}, - 'value': {'type': 'string'}}, - 'required': ['key', 'value', 'time'], - 'type': 'object'}, - 'MetricBatch': {'additionalProperties': False, - 'properties': {'charm-url': {'type': 'string'}, - 'created': {'format': 'date-time', - 'type': 'string'}, - 'metrics': {'items': {'$ref': '#/definitions/Metric'}, - 'type': 'array'}, - 'uuid': {'type': 'string'}}, - 'required': ['uuid', - 'charm-url', - 'created', - 'metrics'], - 'type': 'object'}, - 'MetricBatchParam': {'additionalProperties': False, - 'properties': {'batch': {'$ref': '#/definitions/MetricBatch'}, - 'tag': {'type': 'string'}}, - 'required': ['tag', 'batch'], - 'type': 'object'}, - 'MetricBatchParams': {'additionalProperties': False, - 'properties': {'batches': {'items': {'$ref': '#/definitions/MetricBatchParam'}, - 'type': 'array'}}, - 'required': ['batches'], - 'type': 'object'}, - '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'}, - 'type': {'type': 'string'}, - 'uuid': {'type': 'string'}}, - 'required': ['name', 'uuid', 'type'], - 'type': 'object'}, - 'NetworkInfo': {'additionalProperties': False, - 'properties': {'addresses': {'items': {'$ref': '#/definitions/InterfaceAddress'}, - 'type': 'array'}, - 'interface-name': {'type': 'string'}, - 'mac-address': {'type': 'string'}}, - 'required': ['mac-address', - 'interface-name', - 'addresses'], - 'type': 'object'}, - 'NetworkInfoParams': {'additionalProperties': False, - 'properties': {'bindings': {'items': {'type': 'string'}, - 'type': 'array'}, - 'relation-id': {'type': 'integer'}, - 'unit': {'type': 'string'}}, - 'required': ['unit', 'bindings'], - 'type': 'object'}, - 'NetworkInfoResult': {'additionalProperties': False, - 'properties': {'bind-addresses': {'items': {'$ref': '#/definitions/NetworkInfo'}, - 'type': 'array'}, - 'egress-subnets': {'items': {'type': 'string'}, - 'type': 'array'}, - 'error': {'$ref': '#/definitions/Error'}, - 'ingress-addresses': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'type': 'object'}, - 'NetworkInfoResults': {'additionalProperties': False, - 'properties': {'results': {'patternProperties': {'.*': {'$ref': '#/definitions/NetworkInfoResult'}}, - 'type': 'object'}}, - 'required': ['results'], - 'type': 'object'}, - 'NotifyWatchResult': {'additionalProperties': False, - 'properties': {'NotifyWatcherId': {'type': 'string'}, - 'error': {'$ref': '#/definitions/Error'}}, - 'required': ['NotifyWatcherId'], - 'type': 'object'}, - 'NotifyWatchResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'OpenPortRangesByEndpointResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'unit-port-ranges': {'patternProperties': {'.*': {'items': {'$ref': '#/definitions/OpenUnitPortRangesByEndpoint'}, - 'type': 'array'}}, - 'type': 'object'}}, - 'required': ['unit-port-ranges'], - 'type': 'object'}, - 'OpenPortRangesByEndpointResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/OpenPortRangesByEndpointResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'OpenUnitPortRangesByEndpoint': {'additionalProperties': False, - 'properties': {'endpoint': {'type': 'string'}, - 'port-ranges': {'items': {'$ref': '#/definitions/PortRange'}, - 'type': 'array'}}, - 'required': ['endpoint', - 'port-ranges'], - 'type': 'object'}, - 'PodSpec': {'additionalProperties': False, - 'properties': {'spec': {'type': 'string'}, - 'tag': {'type': 'string'}}, - 'required': ['tag'], - 'type': 'object'}, - 'PortRange': {'additionalProperties': False, - 'properties': {'from-port': {'type': 'integer'}, - 'protocol': {'type': 'string'}, - 'to-port': {'type': 'integer'}}, - 'required': ['from-port', 'to-port', 'protocol'], - 'type': 'object'}, - 'RelationIds': {'additionalProperties': False, - 'properties': {'relation-ids': {'items': {'type': 'integer'}, - 'type': 'array'}}, - 'required': ['relation-ids'], - 'type': 'object'}, - 'RelationResult': {'additionalProperties': False, - 'properties': {'bool': {'type': 'boolean'}, - 'endpoint': {'$ref': '#/definitions/Endpoint'}, - 'error': {'$ref': '#/definitions/Error'}, - 'id': {'type': 'integer'}, - 'key': {'type': 'string'}, - 'life': {'type': 'string'}, - 'other-application': {'type': 'string'}}, - 'required': ['life', - 'id', - 'key', - 'endpoint'], - 'type': 'object'}, - 'RelationResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/RelationResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'RelationStatusArg': {'additionalProperties': False, - 'properties': {'message': {'type': 'string'}, - 'relation-id': {'type': 'integer'}, - 'status': {'type': 'string'}, - 'unit-tag': {'type': 'string'}}, - 'required': ['unit-tag', - 'relation-id', - 'status', - 'message'], - 'type': 'object'}, - 'RelationStatusArgs': {'additionalProperties': False, - 'properties': {'args': {'items': {'$ref': '#/definitions/RelationStatusArg'}, - 'type': 'array'}}, - 'required': ['args'], - 'type': 'object'}, - 'RelationUnit': {'additionalProperties': False, - 'properties': {'relation': {'type': 'string'}, - 'unit': {'type': 'string'}}, - 'required': ['relation', 'unit'], - 'type': 'object'}, - 'RelationUnitPair': {'additionalProperties': False, - 'properties': {'local-unit': {'type': 'string'}, - 'relation': {'type': 'string'}, - 'remote-unit': {'type': 'string'}}, - 'required': ['relation', - 'local-unit', - 'remote-unit'], - 'type': 'object'}, - 'RelationUnitPairs': {'additionalProperties': False, - 'properties': {'relation-unit-pairs': {'items': {'$ref': '#/definitions/RelationUnitPair'}, - 'type': 'array'}}, - 'required': ['relation-unit-pairs'], - 'type': 'object'}, - 'RelationUnitSettings': {'additionalProperties': False, - 'properties': {'application-settings': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}, - 'relation': {'type': 'string'}, - 'settings': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}, - 'unit': {'type': 'string'}}, - 'required': ['relation', - 'unit', - 'settings', - 'application-settings'], - 'type': 'object'}, - 'RelationUnitStatus': {'additionalProperties': False, - 'properties': {'in-scope': {'type': 'boolean'}, - 'relation-tag': {'type': 'string'}, - 'suspended': {'type': 'boolean'}}, - 'required': ['relation-tag', - 'in-scope', - 'suspended'], - 'type': 'object'}, - 'RelationUnitStatusResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'results': {'items': {'$ref': '#/definitions/RelationUnitStatus'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'RelationUnitStatusResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/RelationUnitStatusResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'RelationUnits': {'additionalProperties': False, - 'properties': {'relation-units': {'items': {'$ref': '#/definitions/RelationUnit'}, - 'type': 'array'}}, - 'required': ['relation-units'], - 'type': 'object'}, - 'RelationUnitsChange': {'additionalProperties': False, - 'properties': {'app-changed': {'patternProperties': {'.*': {'type': 'integer'}}, - 'type': 'object'}, - 'changed': {'patternProperties': {'.*': {'$ref': '#/definitions/UnitSettings'}}, - 'type': 'object'}, - 'departed': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'required': ['changed'], - 'type': 'object'}, - 'RelationUnitsWatchResult': {'additionalProperties': False, - 'properties': {'changes': {'$ref': '#/definitions/RelationUnitsChange'}, - 'error': {'$ref': '#/definitions/Error'}, - 'watcher-id': {'type': 'string'}}, - 'required': ['watcher-id', - 'changes'], - 'type': 'object'}, - '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': ['mode'], - 'type': 'object'}, - 'ResolvedModeResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/ResolvedModeResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'SecretBackendArgs': {'additionalProperties': False, - 'properties': {'backend-ids': {'items': {'type': 'string'}, - 'type': 'array'}, - 'for-drain': {'type': 'boolean'}}, - 'required': ['for-drain', 'backend-ids'], - 'type': 'object'}, - 'SecretBackendConfig': {'additionalProperties': False, - 'properties': {'params': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'type': {'type': 'string'}}, - 'required': ['type'], - 'type': 'object'}, - 'SecretBackendConfigResult': {'additionalProperties': False, - 'properties': {'config': {'$ref': '#/definitions/SecretBackendConfig'}, - 'draining': {'type': 'boolean'}, - 'model-controller': {'type': 'string'}, - 'model-name': {'type': 'string'}, - 'model-uuid': {'type': 'string'}}, - 'required': ['model-controller', - 'model-uuid', - 'model-name', - 'draining'], - 'type': 'object'}, - 'SecretBackendConfigResults': {'additionalProperties': False, - 'properties': {'active-id': {'type': 'string'}, - 'results': {'patternProperties': {'.*': {'$ref': '#/definitions/SecretBackendConfigResult'}}, - 'type': 'object'}}, - 'required': ['active-id'], - 'type': 'object'}, - 'SecretConsumerInfoResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'label': {'type': 'string'}, - 'revision': {'type': 'integer'}}, - 'required': ['revision', 'label'], - 'type': 'object'}, - 'SecretConsumerInfoResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/SecretConsumerInfoResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'SecretContentParams': {'additionalProperties': False, - 'properties': {'data': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}, - 'value-ref': {'$ref': '#/definitions/SecretValueRef'}}, - 'type': 'object'}, - 'SecretContentResult': {'additionalProperties': False, - 'properties': {'backend-config': {'$ref': '#/definitions/SecretBackendConfigResult'}, - 'content': {'$ref': '#/definitions/SecretContentParams'}, - 'error': {'$ref': '#/definitions/Error'}, - 'latest-revision': {'type': 'integer'}}, - 'required': ['content'], - 'type': 'object'}, - 'SecretContentResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/SecretContentResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'SecretRevision': {'additionalProperties': False, - 'properties': {'backend-name': {'type': 'string'}, - 'create-time': {'format': 'date-time', - 'type': 'string'}, - 'expire-time': {'format': 'date-time', - 'type': 'string'}, - 'revision': {'type': 'integer'}, - 'update-time': {'format': 'date-time', - 'type': 'string'}, - 'value-ref': {'$ref': '#/definitions/SecretValueRef'}}, - 'required': ['revision'], - 'type': 'object'}, - 'SecretRevisionArg': {'additionalProperties': False, - 'properties': {'pending-delete': {'type': 'boolean'}, - 'revisions': {'items': {'type': 'integer'}, - 'type': 'array'}, - 'uri': {'type': 'string'}}, - 'required': ['uri', - 'revisions', - 'pending-delete'], - 'type': 'object'}, - 'SecretRotatedArg': {'additionalProperties': False, - 'properties': {'original-revision': {'type': 'integer'}, - 'skip': {'type': 'boolean'}, - 'uri': {'type': 'string'}}, - 'required': ['uri', - 'original-revision', - 'skip'], - 'type': 'object'}, - 'SecretRotatedArgs': {'additionalProperties': False, - 'properties': {'args': {'items': {'$ref': '#/definitions/SecretRotatedArg'}, - 'type': 'array'}}, - 'required': ['args'], - 'type': 'object'}, - 'SecretTriggerChange': {'additionalProperties': False, - 'properties': {'next-trigger-time': {'format': 'date-time', - 'type': 'string'}, - 'revision': {'type': 'integer'}, - 'uri': {'type': 'string'}}, - 'required': ['uri', - 'next-trigger-time'], - 'type': 'object'}, - 'SecretTriggerWatchResult': {'additionalProperties': False, - 'properties': {'changes': {'items': {'$ref': '#/definitions/SecretTriggerChange'}, - 'type': 'array'}, - 'error': {'$ref': '#/definitions/Error'}, - 'watcher-id': {'type': 'string'}}, - 'required': ['watcher-id', - 'changes'], - 'type': 'object'}, - 'SecretValueRef': {'additionalProperties': False, - 'properties': {'backend-id': {'type': 'string'}, - 'revision-id': {'type': 'string'}}, - 'required': ['backend-id', 'revision-id'], - 'type': 'object'}, - 'SecretValueResult': {'additionalProperties': False, - 'properties': {'data': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}, - 'error': {'$ref': '#/definitions/Error'}}, - 'type': 'object'}, - 'SetStatus': {'additionalProperties': False, - 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'}, - 'type': 'array'}}, - 'required': ['entities'], - 'type': 'object'}, - 'SetUnitStateArg': {'additionalProperties': False, - 'properties': {'charm-state': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}, - 'meter-status-state': {'type': 'string'}, - 'relation-state': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}, - 'secret-state': {'type': 'string'}, - 'storage-state': {'type': 'string'}, - 'tag': {'type': 'string'}, - 'uniter-state': {'type': 'string'}}, - 'required': ['tag'], - 'type': 'object'}, - 'SetUnitStateArgs': {'additionalProperties': False, - 'properties': {'args': {'items': {'$ref': '#/definitions/SetUnitStateArg'}, - 'type': 'array'}}, - 'required': ['args'], - 'type': 'object'}, - 'SettingsResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'settings': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}}, - 'required': ['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': ['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': {'name': {'type': 'string'}, - 'storage': {'$ref': '#/definitions/StorageConstraints'}, - 'unit': {'type': 'string'}}, - 'required': ['unit', 'name', 'storage'], - 'type': 'object'}, - 'StorageAttachment': {'additionalProperties': False, - 'properties': {'kind': {'type': 'integer'}, - 'life': {'type': 'string'}, - 'location': {'type': 'string'}, - 'owner-tag': {'type': 'string'}, - 'storage-tag': {'type': 'string'}, - 'unit-tag': {'type': 'string'}}, - 'required': ['storage-tag', - 'owner-tag', - 'unit-tag', - 'kind', - 'location', - 'life'], - 'type': 'object'}, - 'StorageAttachmentId': {'additionalProperties': False, - 'properties': {'storage-tag': {'type': 'string'}, - 'unit-tag': {'type': 'string'}}, - 'required': ['storage-tag', - 'unit-tag'], - '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'}}, - 'type': 'object'}, - 'StringBoolResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'ok': {'type': 'boolean'}, - 'result': {'type': 'string'}}, - 'required': ['result', 'ok'], - 'type': 'object'}, - 'StringBoolResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/StringBoolResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'StringResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'result': {'type': 'string'}}, - 'required': ['result'], - 'type': 'object'}, - 'StringResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'StringsResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'result': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'type': 'object'}, - 'StringsWatchResult': {'additionalProperties': False, - 'properties': {'changes': {'items': {'type': 'string'}, - 'type': 'array'}, - 'error': {'$ref': '#/definitions/Error'}, - 'watcher-id': {'type': 'string'}}, - 'required': ['watcher-id'], - 'type': 'object'}, - 'StringsWatchResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'UnitRefreshResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}, - 'Life': {'type': 'string'}, - 'Resolved': {'type': 'string'}, - 'provider-id': {'type': 'string'}}, - 'required': ['Life', - 'Resolved', - 'Error'], - 'type': 'object'}, - 'UnitRefreshResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/UnitRefreshResult'}, - 'type': 'array'}}, - 'required': ['Results'], - 'type': 'object'}, - 'UnitSettings': {'additionalProperties': False, - 'properties': {'version': {'type': 'integer'}}, - 'required': ['version'], - 'type': 'object'}, - 'UnitStateResult': {'additionalProperties': False, - 'properties': {'charm-state': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}, - 'error': {'$ref': '#/definitions/Error'}, - 'meter-status-state': {'type': 'string'}, - 'relation-state': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}, - 'secret-state': {'type': 'string'}, - 'storage-state': {'type': 'string'}, - 'uniter-state': {'type': 'string'}}, - 'type': 'object'}, - 'UnitStateResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/UnitStateResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'UpdateSecretArg': {'additionalProperties': False, - 'properties': {'UpsertSecretArg': {'$ref': '#/definitions/UpsertSecretArg'}, - 'content': {'$ref': '#/definitions/SecretContentParams'}, - 'description': {'type': 'string'}, - 'expire-time': {'format': 'date-time', - 'type': 'string'}, - 'label': {'type': 'string'}, - 'params': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'rotate-policy': {'type': 'string'}, - 'uri': {'type': 'string'}}, - 'required': ['UpsertSecretArg', 'uri'], - 'type': 'object'}, - 'UpdateSecretArgs': {'additionalProperties': False, - 'properties': {'args': {'items': {'$ref': '#/definitions/UpdateSecretArg'}, - 'type': 'array'}}, - 'required': ['args'], - 'type': 'object'}, - 'UpgradeSeriesStatusParam': {'additionalProperties': False, - 'properties': {'entity': {'$ref': '#/definitions/Entity'}, - 'message': {'type': 'string'}, - 'status': {'type': 'string'}}, - 'required': ['entity', - 'status', - 'message'], - 'type': 'object'}, - 'UpgradeSeriesStatusParams': {'additionalProperties': False, - 'properties': {'params': {'items': {'$ref': '#/definitions/UpgradeSeriesStatusParam'}, - 'type': 'array'}}, - 'required': ['params'], - 'type': 'object'}, - 'UpgradeSeriesStatusResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'status': {'type': 'string'}, - 'target': {'type': 'string'}}, - 'type': 'object'}, - 'UpgradeSeriesStatusResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/UpgradeSeriesStatusResult'}, - 'type': 'array'}}, - 'type': 'object'}, - 'UpsertSecretArg': {'additionalProperties': False, - 'properties': {'content': {'$ref': '#/definitions/SecretContentParams'}, - 'description': {'type': 'string'}, - 'expire-time': {'format': 'date-time', - 'type': 'string'}, - 'label': {'type': 'string'}, - 'params': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'rotate-policy': {'type': 'string'}}, - 'type': 'object'}}, - 'properties': {'APIAddresses': {'description': 'APIAddresses returns the list ' - 'of addresses used to connect ' - 'to the API.', - 'properties': {'Result': {'$ref': '#/definitions/StringsResult'}}, - 'type': 'object'}, - 'APIHostPorts': {'description': 'APIHostPorts returns the API ' - 'server addresses.', - 'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}}, - 'type': 'object'}, - 'ActionStatus': {'description': 'ActionStatus returns the ' - 'status of Actions by Tags ' - 'passed in.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/StringResults'}}, - 'type': 'object'}, - 'Actions': {'description': 'Actions returns the Actions by ' - 'Tags passed and ensures that the ' - 'Unit asking\n' - 'for them is the same Unit that has ' - 'the Actions.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ActionResults'}}, - 'type': 'object'}, - 'AddMetricBatches': {'description': 'AddMetricBatches adds the ' - 'metrics for the specified ' - 'unit.', - 'properties': {'Params': {'$ref': '#/definitions/MetricBatchParams'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'ApplicationStatus': {'description': 'ApplicationStatus ' - 'returns the status of ' - 'the Applications and its ' - 'workloads\n' - 'if the given unit is the ' - 'leader.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ApplicationStatusResults'}}, - 'type': 'object'}, - 'AssignedMachine': {'description': 'AssignedMachine returns ' - 'the machine tag for each ' - 'given unit tag, or\n' - 'an error satisfying ' - 'params.IsCodeNotAssigned ' - 'when a unit has no\n' - 'assigned machine.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/StringResults'}}, - 'type': 'object'}, - 'AvailabilityZone': {'description': 'AvailabilityZone returns ' - 'the availability zone for ' - 'each given unit, if ' - 'applicable.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/StringResults'}}, - 'type': 'object'}, - 'BeginActions': {'description': 'BeginActions marks the ' - 'actions represented by the ' - 'passed in Tags as running.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'CanApplyLXDProfile': {'description': 'CanApplyLXDProfile is a ' - 'shim to call the ' - 'LXDProfileAPIv2 version ' - 'of this method.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/BoolResults'}}, - 'type': 'object'}, - 'CharmArchiveSha256': {'description': 'CharmArchiveSha256 ' - 'returns the SHA256 ' - 'digest of the charm ' - 'archive\n' - '(bundle) data for each ' - 'charm url in the given ' - 'parameters.', - 'properties': {'Params': {'$ref': '#/definitions/CharmURLs'}, - 'Result': {'$ref': '#/definitions/StringResults'}}, - 'type': 'object'}, - 'CharmModifiedVersion': {'description': 'CharmModifiedVersion ' - 'returns the most ' - 'CharmModifiedVersion ' - 'for all given\n' - 'units or ' - 'applications.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/IntResults'}}, - 'type': 'object'}, - 'CharmURL': {'description': 'CharmURL returns the charm URL ' - 'for all given units or ' - 'applications.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/StringBoolResults'}}, - 'type': 'object'}, - 'ClearResolved': {'description': 'ClearResolved removes any ' - 'resolved setting from each ' - 'given unit.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'CloudAPIVersion': {'description': 'CloudAPIVersion returns ' - 'the cloud API version, if ' - 'available.', - 'properties': {'Result': {'$ref': '#/definitions/StringResult'}}, - 'type': 'object'}, - 'CloudSpec': {'description': 'CloudSpec returns the cloud spec ' - 'used by the model in which the\n' - 'authenticated unit or ' - 'application resides.\n' - 'A check is made beforehand to ' - 'ensure that the request is made ' - 'by an entity\n' - 'that has been granted the ' - 'appropriate trust.', - 'properties': {'Result': {'$ref': '#/definitions/CloudSpecResult'}}, - 'type': 'object'}, - 'CommitHookChanges': {'description': 'CommitHookChanges ' - 'batches together all ' - 'required API calls for ' - 'applying\n' - 'a set of changes after a ' - 'hook successfully ' - 'completes and executes ' - 'them in a\n' - 'single transaction.', - 'properties': {'Params': {'$ref': '#/definitions/CommitHookChangesArgs'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'ConfigSettings': {'description': 'ConfigSettings returns the ' - 'complete set of application ' - 'charm config\n' - 'settings available to each ' - 'given unit.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ConfigSettingsResults'}}, - 'type': 'object'}, - 'CreateSecretURIs': {'description': 'CreateSecretURIs creates ' - 'new secret URIs.', - 'properties': {'Params': {'$ref': '#/definitions/CreateSecretURIsArg'}, - 'Result': {'$ref': '#/definitions/StringResults'}}, - 'type': 'object'}, - 'CreateSecrets': {'description': 'CreateSecrets creates new ' - 'secrets.', - 'properties': {'Params': {'$ref': '#/definitions/CreateSecretArgs'}, - 'Result': {'$ref': '#/definitions/StringResults'}}, - 'type': 'object'}, - 'CurrentModel': {'description': 'CurrentModel returns the name ' - 'and UUID for the current juju ' - 'model.', - 'properties': {'Result': {'$ref': '#/definitions/ModelResult'}}, - 'type': 'object'}, - 'Destroy': {'description': 'Destroy advances all given Alive ' - "units' lifecycles as far as\n" - 'possible. See ' - 'state/Unit.Destroy().', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'DestroyAllSubordinates': {'description': 'DestroyAllSubordinates ' - 'destroys all ' - 'subordinates of ' - 'each given unit.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'DestroyUnitStorageAttachments': {'description': 'DestroyUnitStorageAttachments ' - 'marks each ' - 'storage ' - 'attachment ' - 'of the\n' - 'specified ' - 'units as ' - 'Dying.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'EnsureDead': {'description': 'EnsureDead calls EnsureDead on ' - 'each given entity from state. ' - 'It\n' - 'will fail if the entity is not ' - "present. If it's Alive, nothing " - 'will\n' - 'happen (see state/EnsureDead() ' - 'for units or machines).', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'EnterScope': {'description': 'EnterScope ensures each unit ' - 'has entered its scope in the ' - 'relation,\n' - 'for all of the given ' - 'relation/unit pairs. See also\n' - 'state.RelationUnit.EnterScope().', - 'properties': {'Params': {'$ref': '#/definitions/RelationUnits'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'FinishActions': {'description': 'FinishActions saves the ' - 'result of a completed Action', - 'properties': {'Params': {'$ref': '#/definitions/ActionExecutionResults'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'GetConsumerSecretsRevisionInfo': {'description': 'GetConsumerSecretsRevisionInfo ' - 'returns the ' - 'latest ' - 'secret ' - 'revisions ' - 'for the ' - 'specified ' - 'secrets.\n' - 'This facade ' - 'method is ' - 'used for ' - 'remote ' - 'watcher to ' - 'get the ' - 'latest ' - 'secret ' - 'revisions ' - 'and labels ' - 'for a ' - 'secret ' - 'changed ' - 'hook.', - 'properties': {'Params': {'$ref': '#/definitions/GetSecretConsumerInfoArgs'}, - 'Result': {'$ref': '#/definitions/SecretConsumerInfoResults'}}, - 'type': 'object'}, - 'GetMeterStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/MeterStatusResults'}}, - 'type': 'object'}, - 'GetPodSpec': {'description': 'GetPodSpec gets the pod specs ' - 'for a set of applications.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/StringResults'}}, - 'type': 'object'}, - 'GetPrincipal': {'description': 'GetPrincipal returns the ' - 'result of calling ' - 'PrincipalName() and\n' - 'converting it to a tag, on ' - 'each given unit.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/StringBoolResults'}}, - 'type': 'object'}, - 'GetRawK8sSpec': {'description': 'GetRawK8sSpec gets the raw ' - 'k8s specs for a set of ' - 'applications.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/StringResults'}}, - 'type': 'object'}, - 'GetSecretBackendConfigs': {'description': 'GetSecretBackendConfigs ' - 'gets the config ' - 'needed to create a ' - 'client to secret ' - 'backends.', - 'properties': {'Params': {'$ref': '#/definitions/SecretBackendArgs'}, - 'Result': {'$ref': '#/definitions/SecretBackendConfigResults'}}, - 'type': 'object'}, - 'GetSecretContentInfo': {'description': 'GetSecretContentInfo ' - 'returns the secret ' - 'values for the ' - 'specified secrets.', - 'properties': {'Params': {'$ref': '#/definitions/GetSecretContentArgs'}, - 'Result': {'$ref': '#/definitions/SecretContentResults'}}, - 'type': 'object'}, - 'GetSecretMetadata': {'description': 'GetSecretMetadata ' - 'returns metadata for the ' - "caller's secrets.", - 'properties': {'Result': {'$ref': '#/definitions/ListSecretResults'}}, - 'type': 'object'}, - 'GetSecretRevisionContentInfo': {'description': 'GetSecretRevisionContentInfo ' - 'returns the ' - 'secret values ' - 'for the ' - 'specified ' - 'secret ' - 'revisions.', - 'properties': {'Params': {'$ref': '#/definitions/SecretRevisionArg'}, - 'Result': {'$ref': '#/definitions/SecretContentResults'}}, - 'type': 'object'}, - 'GoalStates': {'description': 'GoalStates returns information ' - 'of charm units and relations.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/GoalStateResults'}}, - 'type': 'object'}, - 'HasSubordinates': {'description': 'HasSubordinates returns ' - 'the whether each given ' - 'unit has any subordinates.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/BoolResults'}}, - 'type': 'object'}, - 'LXDProfileName': {'description': 'LXDProfileName is a shim to ' - 'call the LXDProfileAPIv2 ' - 'version of this method.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/StringResults'}}, - 'type': 'object'}, - 'LXDProfileRequired': {'description': 'LXDProfileRequired is a ' - 'shim to call the ' - 'LXDProfileAPIv2 version ' - 'of this method.', - 'properties': {'Params': {'$ref': '#/definitions/CharmURLs'}, - 'Result': {'$ref': '#/definitions/BoolResults'}}, - 'type': 'object'}, - 'LeaveScope': {'description': 'LeaveScope signals each unit ' - 'has left its scope in the ' - 'relation,\n' - 'for all of the given ' - 'relation/unit pairs. See also\n' - 'state.RelationUnit.LeaveScope().', - 'properties': {'Params': {'$ref': '#/definitions/RelationUnits'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'Life': {'description': 'Life returns the life status of every ' - 'supplied entity, where available.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/LifeResults'}}, - 'type': 'object'}, - 'LogActionsMessages': {'description': 'LogActionsMessages ' - 'records the log ' - 'messages against the ' - 'specified actions.', - 'properties': {'Params': {'$ref': '#/definitions/ActionMessageParams'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'Merge': {'description': 'Merge merges in the provided ' - 'leadership settings. Only leaders ' - 'for\n' - 'the given service may perform this ' - 'operation.', - 'properties': {'Params': {'$ref': '#/definitions/MergeLeadershipSettingsBulkParams'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'ModelConfig': {'description': 'ModelConfig returns the ' - "current model's configuration.", - 'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}}, - 'type': 'object'}, - 'NetworkInfo': {'description': 'NetworkInfo returns network ' - 'interfaces/addresses for ' - 'specified bindings.', - 'properties': {'Params': {'$ref': '#/definitions/NetworkInfoParams'}, - 'Result': {'$ref': '#/definitions/NetworkInfoResults'}}, - 'type': 'object'}, - 'OpenedMachinePortRangesByEndpoint': {'description': 'OpenedMachinePortRangesByEndpoint ' - 'returns ' - 'the port ' - 'ranges ' - 'opened ' - 'by each\n' - 'unit on ' - 'the ' - 'provided ' - 'machines ' - 'grouped ' - 'by ' - 'application ' - 'endpoint.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/OpenPortRangesByEndpointResults'}}, - 'type': 'object'}, - 'OpenedPortRangesByEndpoint': {'description': 'OpenedPortRangesByEndpoint ' - 'returns the ' - 'port ranges ' - 'opened by the ' - 'unit.', - 'properties': {'Result': {'$ref': '#/definitions/OpenPortRangesByEndpointResults'}}, - 'type': 'object'}, - 'PrivateAddress': {'description': 'PrivateAddress returns the ' - 'private address for each ' - 'given unit, if set.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/StringResults'}}, - 'type': 'object'}, - 'ProviderType': {'description': 'ProviderType returns the ' - 'provider type used by the ' - 'current juju\n' - 'model.\n' - '\n' - 'TODO(dimitern): Refactor the ' - 'uniter to call this instead ' - 'of calling\n' - 'ModelConfig() just to get the ' - 'provider type. Once we have ' - 'machine\n' - 'addresses, this might be ' - 'completely unnecessary ' - 'though.', - 'properties': {'Result': {'$ref': '#/definitions/StringResult'}}, - 'type': 'object'}, - 'PublicAddress': {'description': 'PublicAddress returns the ' - 'public address for each ' - 'given unit, if set.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/StringResults'}}, - 'type': 'object'}, - 'Read': {'description': 'Read reads leadership settings for ' - 'the provided service ID. Any\n' - 'unit of the service may perform this ' - 'operation.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/GetLeadershipSettingsBulkResults'}}, - 'type': 'object'}, - 'ReadLocalApplicationSettings': {'description': 'ReadLocalApplicationSettings ' - 'returns the ' - 'local ' - 'application ' - 'settings for ' - 'a\n' - 'particular ' - 'relation when ' - 'invoked by ' - 'the leader ' - 'unit.', - 'properties': {'Params': {'$ref': '#/definitions/RelationUnit'}, - 'Result': {'$ref': '#/definitions/SettingsResult'}}, - 'type': 'object'}, - 'ReadRemoteSettings': {'description': 'ReadRemoteSettings ' - 'returns the remote ' - 'settings of each given ' - 'set of\n' - 'relation/local ' - 'unit/remote unit.', - 'properties': {'Params': {'$ref': '#/definitions/RelationUnitPairs'}, - 'Result': {'$ref': '#/definitions/SettingsResults'}}, - 'type': 'object'}, - 'ReadSettings': {'description': 'ReadSettings returns the ' - 'local settings of each given ' - 'set of\n' - 'relation/unit.\n' - '\n' - 'NOTE(achilleasa): Using this ' - 'call to read application data ' - 'is deprecated\n' - 'and will not work for k8s ' - 'charms (see LP1876097). ' - 'Instead, clients should\n' - 'use ' - 'ReadLocalApplicationSettings.', - 'properties': {'Params': {'$ref': '#/definitions/RelationUnits'}, - 'Result': {'$ref': '#/definitions/SettingsResults'}}, - 'type': 'object'}, - 'Refresh': {'description': 'Refresh retrieves the latest ' - 'values for attributes on this ' - 'unit.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/UnitRefreshResults'}}, - 'type': 'object'}, - 'Relation': {'description': 'Relation returns information ' - 'about all given relation/unit ' - 'pairs,\n' - 'including their id, key and the ' - 'local endpoint.', - 'properties': {'Params': {'$ref': '#/definitions/RelationUnits'}, - 'Result': {'$ref': '#/definitions/RelationResults'}}, - 'type': 'object'}, - 'RelationById': {'description': 'RelationById returns ' - 'information about all given ' - 'relations,\n' - 'specified by their ids, ' - 'including their key and the ' - 'local\n' - 'endpoint.', - 'properties': {'Params': {'$ref': '#/definitions/RelationIds'}, - 'Result': {'$ref': '#/definitions/RelationResults'}}, - 'type': 'object'}, - 'RelationsStatus': {'description': 'RelationsStatus returns ' - 'for each unit the ' - 'corresponding relation and ' - 'status information.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/RelationUnitStatusResults'}}, - 'type': 'object'}, - 'RemoveSecrets': {'description': 'RemoveSecrets removes the ' - 'specified secrets.', - 'properties': {'Params': {'$ref': '#/definitions/DeleteSecretArgs'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'RemoveStorageAttachments': {'description': 'RemoveStorageAttachments ' - 'removes the ' - 'specified ' - 'storage\n' - 'attachments from ' - 'state.', - 'properties': {'Params': {'$ref': '#/definitions/StorageAttachmentIds'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'RequestReboot': {'description': 'RequestReboot sets the ' - 'reboot flag on the provided ' - 'machines', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'Resolved': {'description': 'Resolved returns the current ' - 'resolved setting for each given ' - 'unit.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ResolvedModeResults'}}, - 'type': 'object'}, - 'SLALevel': {'description': "SLALevel returns the model's SLA " - 'level.', - 'properties': {'Result': {'$ref': '#/definitions/StringResult'}}, - 'type': 'object'}, - 'SecretsGrant': {'description': 'SecretsGrant grants access to ' - 'a secret for the specified ' - 'subjects.', - 'properties': {'Params': {'$ref': '#/definitions/GrantRevokeSecretArgs'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'SecretsRevoke': {'description': 'SecretsRevoke revokes access ' - 'to a secret for the ' - 'specified subjects.', - 'properties': {'Params': {'$ref': '#/definitions/GrantRevokeSecretArgs'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'SecretsRotated': {'description': 'SecretsRotated records when ' - 'secrets were last rotated.', - 'properties': {'Params': {'$ref': '#/definitions/SecretRotatedArgs'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'SetAgentStatus': {'description': 'SetAgentStatus will set ' - 'status for agents of Units ' - 'passed in args, if one\n' - 'of the args is not an Unit ' - 'it will fail.', - 'properties': {'Params': {'$ref': '#/definitions/SetStatus'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'SetApplicationStatus': {'description': 'SetApplicationStatus ' - 'sets the status for ' - 'all the Applications ' - 'in args if the given ' - 'Unit is\n' - 'the leader.', - 'properties': {'Params': {'$ref': '#/definitions/SetStatus'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'SetCharmURL': {'description': 'SetCharmURL sets the charm URL ' - 'for each given unit. An error ' - 'will\n' - 'be returned if a unit is dead, ' - 'or the charm URL is not known.', - 'properties': {'Params': {'$ref': '#/definitions/EntitiesCharmURL'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'SetRelationStatus': {'description': 'SetRelationStatus ' - 'updates the status of ' - 'the specified relations.', - 'properties': {'Params': {'$ref': '#/definitions/RelationStatusArgs'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'SetState': {'description': 'SetState sets the state persisted ' - 'by the charm running in this ' - 'unit\n' - 'and the state internal to the ' - 'uniter for this unit.', - 'properties': {'Params': {'$ref': '#/definitions/SetUnitStateArgs'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'SetStatus': {'description': 'SetStatus will set status for a ' - 'entities passed in args. If the ' - 'entity is\n' - 'a Unit it will instead set ' - 'status to its agent, to emulate ' - 'backwards\n' - 'compatibility.', - 'properties': {'Params': {'$ref': '#/definitions/SetStatus'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'SetUnitStatus': {'description': 'SetUnitStatus sets status ' - 'for all elements passed in ' - 'args, the difference\n' - 'with SetStatus is that if an ' - 'entity is a Unit it will set ' - 'its status instead\n' - 'of its agent.', - 'properties': {'Params': {'$ref': '#/definitions/SetStatus'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'SetUpgradeSeriesUnitStatus': {'description': 'SetUpgradeSeriesUnitStatus ' - 'sets the ' - 'upgrade series ' - 'status of the ' - 'unit.\n' - 'If no upgrade ' - 'is in progress ' - 'an error is ' - 'returned ' - 'instead.', - 'properties': {'Params': {'$ref': '#/definitions/UpgradeSeriesStatusParams'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'SetWorkloadVersion': {'description': 'SetWorkloadVersion sets ' - 'the workload version ' - 'for each given unit. An ' - 'error will\n' - 'be returned if a unit ' - 'is dead.', - 'properties': {'Params': {'$ref': '#/definitions/EntityWorkloadVersions'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'State': {'description': 'State returns the state persisted by ' - 'the charm running in this unit\n' - 'and the state internal to the uniter ' - 'for this unit.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/UnitStateResults'}}, - 'type': 'object'}, - 'StorageAttachmentLife': {'description': 'StorageAttachmentLife ' - 'returns the ' - 'lifecycle state of ' - 'the storage ' - 'attachments\n' - 'with the specified ' - 'tags.', - 'properties': {'Params': {'$ref': '#/definitions/StorageAttachmentIds'}, - 'Result': {'$ref': '#/definitions/LifeResults'}}, - 'type': 'object'}, - 'StorageAttachments': {'description': 'StorageAttachments ' - 'returns the storage ' - 'attachments with the ' - 'specified tags.', - 'properties': {'Params': {'$ref': '#/definitions/StorageAttachmentIds'}, - 'Result': {'$ref': '#/definitions/StorageAttachmentResults'}}, - 'type': 'object'}, - 'UnitStatus': {'description': 'UnitStatus returns the workload ' - 'status information for the ' - 'unit.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/StatusResults'}}, - 'type': 'object'}, - 'UnitStorageAttachments': {'description': 'UnitStorageAttachments ' - 'returns the IDs of ' - 'storage attachments ' - 'for a collection of ' - 'units.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/StorageAttachmentIdsResults'}}, - 'type': 'object'}, - 'UpdateNetworkInfo': {'description': 'UpdateNetworkInfo ' - 'refreshes the network ' - "settings for a unit's " - 'bound\n' - 'endpoints.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'UpdateSecrets': {'description': 'UpdateSecrets updates the ' - 'specified secrets.', - 'properties': {'Params': {'$ref': '#/definitions/UpdateSecretArgs'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'UpgradeSeriesUnitStatus': {'description': 'UpgradeSeriesUnitStatus ' - 'returns the ' - 'current ' - 'preparation status ' - 'of an\n' - 'upgrading unit.\n' - 'If no series ' - 'upgrade is in ' - 'progress an error ' - 'is returned ' - 'instead.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/UpgradeSeriesStatusResults'}}, - 'type': 'object'}, - 'Watch': {'description': 'Watch starts an NotifyWatcher for ' - 'each given entity.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/NotifyWatchResults'}}, - 'type': 'object'}, - 'WatchAPIHostPorts': {'description': 'WatchAPIHostPorts ' - 'watches the API server ' - 'addresses.', - 'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}}, - 'type': 'object'}, - 'WatchActionNotifications': {'description': 'WatchActionNotifications ' - 'returns a ' - 'StringsWatcher ' - 'for observing\n' - 'incoming action ' - 'calls to a unit. ' - 'See also ' - 'state/watcher.go\n' - 'Unit.WatchActionNotifications(). ' - 'This method is ' - 'called from\n' - 'api/uniter/uniter.go ' - 'WatchActionNotifications().', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/StringsWatchResults'}}, - 'type': 'object'}, - 'WatchConfigSettingsHash': {'description': 'WatchConfigSettingsHash ' - 'returns a ' - 'StringsWatcher ' - 'that yields a ' - 'hash\n' - 'of the config ' - 'values every time ' - 'the config ' - 'changes. The ' - 'uniter can\n' - 'save this hash and ' - 'use it to decide ' - 'whether the ' - 'config-changed ' - 'hook\n' - 'needs to be run ' - '(or whether this ' - 'was just an agent ' - 'restart with no\n' - 'substantive config ' - 'change).', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/StringsWatchResults'}}, - 'type': 'object'}, - 'WatchConsumedSecretsChanges': {'description': 'WatchConsumedSecretsChanges ' - 'sets up a ' - 'watcher to ' - 'notify of ' - 'changes to ' - 'secret ' - 'revisions for ' - 'the specified ' - 'consumers.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/StringsWatchResults'}}, - 'type': 'object'}, - 'WatchForModelConfigChanges': {'description': 'WatchForModelConfigChanges ' - 'returns a ' - 'NotifyWatcher ' - 'that observes\n' - 'changes to the ' - 'model ' - 'configuration.\n' - 'Note that ' - 'although the ' - 'NotifyWatchResult ' - 'contains an ' - 'Error field,\n' - "it's not used " - 'because we are ' - 'only returning ' - 'a single ' - 'watcher,\n' - 'so we use the ' - 'regular error ' - 'return.', - 'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}}, - 'type': 'object'}, - 'WatchInstanceData': {'description': 'WatchInstanceData is a ' - 'shim to call the ' - 'LXDProfileAPIv2 version ' - 'of this method.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/NotifyWatchResults'}}, - 'type': 'object'}, - 'WatchLeadershipSettings': {'description': 'WatchLeadershipSettings ' - 'will block the ' - 'caller until ' - 'leadership ' - 'settings\n' - 'for the given ' - 'service ID change.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/NotifyWatchResults'}}, - 'type': 'object'}, - 'WatchMeterStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/NotifyWatchResults'}}, - 'type': 'object'}, - 'WatchObsolete': {'description': 'WatchObsolete returns a ' - 'watcher for notifying when:\n' - ' - a secret owned by the ' - 'entity is deleted\n' - ' - a secret revision owed ' - 'by the entity no longer\n' - ' has any consumers\n' - '\n' - 'Obsolete revisions results ' - 'are "uri/revno" and deleted\n' - 'secret results are "uri".', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/StringsWatchResult'}}, - 'type': 'object'}, - 'WatchRelationUnits': {'description': 'WatchRelationUnits ' - 'returns a ' - 'RelationUnitsWatcher ' - 'for observing\n' - 'changes to every unit ' - 'in the supplied ' - 'relation that is ' - 'visible to\n' - 'the supplied unit. See ' - 'also ' - 'state/watcher.go:RelationUnit.Watch().', - 'properties': {'Params': {'$ref': '#/definitions/RelationUnits'}, - 'Result': {'$ref': '#/definitions/RelationUnitsWatchResults'}}, - 'type': 'object'}, - 'WatchSecretRevisionsExpiryChanges': {'description': 'WatchSecretRevisionsExpiryChanges ' - 'sets up ' - 'a ' - 'watcher ' - 'to ' - 'notify ' - 'of ' - 'changes ' - 'to ' - 'secret ' - 'revision ' - 'expiry ' - 'config.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/SecretTriggerWatchResult'}}, - 'type': 'object'}, - 'WatchSecretsRotationChanges': {'description': 'WatchSecretsRotationChanges ' - 'sets up a ' - 'watcher to ' - 'notify of ' - 'changes to ' - 'secret ' - 'rotation ' - 'config.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/SecretTriggerWatchResult'}}, - 'type': 'object'}, - 'WatchStorageAttachments': {'description': 'WatchStorageAttachments ' - 'creates watchers ' - 'for a collection ' - 'of storage\n' - 'attachments, each ' - 'of which can be ' - 'used to watch ' - 'changes to ' - 'storage\n' - 'attachment info.', - 'properties': {'Params': {'$ref': '#/definitions/StorageAttachmentIds'}, - 'Result': {'$ref': '#/definitions/NotifyWatchResults'}}, - 'type': 'object'}, - 'WatchTrustConfigSettingsHash': {'description': 'WatchTrustConfigSettingsHash ' - 'returns a ' - 'StringsWatcher ' - 'that yields ' - 'a\n' - 'hash of the ' - 'application ' - 'config values ' - 'whenever they ' - 'change. The\n' - 'uniter can ' - 'use the hash ' - 'to determine ' - 'whether the ' - 'actual values ' - 'have\n' - 'changed since ' - 'it last saw ' - 'the config.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/StringsWatchResults'}}, - 'type': 'object'}, - 'WatchUnitAddressesHash': {'description': 'WatchUnitAddressesHash ' - 'returns a ' - 'StringsWatcher that ' - 'yields the\n' - 'hashes of the ' - 'addresses for the ' - 'unit whenever the ' - 'addresses\n' - 'change. The uniter ' - 'can use the hash to ' - 'determine whether ' - 'the actual\n' - 'address values have ' - 'changed since it ' - 'last saw the ' - 'config.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/StringsWatchResults'}}, - 'type': 'object'}, - 'WatchUnitRelations': {'description': 'WatchUnitRelations ' - 'returns a ' - 'StringsWatcher, for ' - 'each given\n' - 'unit, that notifies of ' - 'changes to the ' - 'lifecycles of ' - 'relations\n' - 'relevant to that unit. ' - 'For principal units, ' - 'this will be all of ' - 'the\n' - 'relations for the ' - 'application. For ' - 'subordinate units, ' - 'only\n' - 'relations with the ' - "principal unit's " - 'application will be ' - 'monitored.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/StringsWatchResults'}}, - 'type': 'object'}, - 'WatchUnitStorageAttachments': {'description': 'WatchUnitStorageAttachments ' - 'creates ' - 'watchers for a ' - 'collection of ' - 'units,\n' - 'each of which ' - 'can be used to ' - 'watch for ' - 'lifecycle ' - 'changes to the ' - 'corresponding\n' - "unit's storage " - 'attachments.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/StringsWatchResults'}}, - 'type': 'object'}, - 'WatchUpgradeSeriesNotifications': {'description': 'WatchUpgradeSeriesNotifications ' - 'returns a ' - 'NotifyWatcher ' - 'for ' - 'observing ' - 'changes to ' - 'upgrade ' - 'series ' - 'locks.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/NotifyWatchResults'}}, - 'type': 'object'}, - 'WorkloadVersion': {'description': 'WorkloadVersion returns ' - 'the workload version for ' - 'all given units or ' - 'applications.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/StringResults'}}, - 'type': 'object'}}, - 'type': 'object'} - - - @ReturnMapping(StringsResult) - async def APIAddresses(self): - ''' - APIAddresses returns the list of addresses used to connect to the API. - - - Returns -> StringsResult - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='APIAddresses', - version=19, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(APIHostPortsResult) - async def APIHostPorts(self): - ''' - APIHostPorts returns the API server addresses. - - - Returns -> APIHostPortsResult - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='APIHostPorts', - version=19, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringResults) - async def ActionStatus(self, entities=None): - ''' - ActionStatus returns the status of Actions by Tags passed in. - - entities : typing.Sequence[~Entity] - Returns -> StringResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='ActionStatus', - version=19, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ActionResults) - async def Actions(self, entities=None): - ''' - Actions returns the Actions by Tags passed and ensures that the Unit asking - for them is the same Unit that has the Actions. - - entities : typing.Sequence[~Entity] - Returns -> ActionResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='Actions', - version=19, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def AddMetricBatches(self, batches=None): - ''' - AddMetricBatches adds the metrics for the specified unit. - - batches : typing.Sequence[~MetricBatchParam] - Returns -> ErrorResults - ''' - if batches is not None and not isinstance(batches, (bytes, str, list)): - raise Exception("Expected batches to be a Sequence, received: {}".format(type(batches))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='AddMetricBatches', - version=19, - params=_params) - _params['batches'] = batches - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ApplicationStatusResults) - async def ApplicationStatus(self, entities=None): - ''' - ApplicationStatus returns the status of the Applications and its workloads - if the given unit is the leader. - - entities : typing.Sequence[~Entity] - Returns -> ApplicationStatusResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='ApplicationStatus', - version=19, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringResults) - async def AssignedMachine(self, entities=None): - ''' - AssignedMachine returns the machine tag for each given unit tag, or - an error satisfying params.IsCodeNotAssigned when a unit has no - assigned machine. - - entities : typing.Sequence[~Entity] - Returns -> StringResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='AssignedMachine', - version=19, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringResults) - async def AvailabilityZone(self, entities=None): - ''' - AvailabilityZone returns the availability zone for each given unit, if applicable. - - entities : typing.Sequence[~Entity] - Returns -> StringResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='AvailabilityZone', - version=19, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def BeginActions(self, entities=None): - ''' - BeginActions marks the actions represented by the passed in Tags as running. - - entities : typing.Sequence[~Entity] - Returns -> ErrorResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='BeginActions', - version=19, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(BoolResults) - async def CanApplyLXDProfile(self, entities=None): - ''' - CanApplyLXDProfile is a shim to call the LXDProfileAPIv2 version of this method. - - entities : typing.Sequence[~Entity] - Returns -> BoolResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='CanApplyLXDProfile', - version=19, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringResults) - async def CharmArchiveSha256(self, urls=None): - ''' - CharmArchiveSha256 returns the SHA256 digest of the charm archive - (bundle) data for each charm url in the given parameters. - - urls : typing.Sequence[~CharmURL] - Returns -> StringResults - ''' - if urls is not None and not isinstance(urls, (bytes, str, list)): - raise Exception("Expected urls to be a Sequence, received: {}".format(type(urls))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='CharmArchiveSha256', - version=19, - params=_params) - _params['urls'] = urls - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(IntResults) - async def CharmModifiedVersion(self, entities=None): - ''' - CharmModifiedVersion returns the most CharmModifiedVersion for all given - units or applications. - - entities : typing.Sequence[~Entity] - Returns -> IntResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='CharmModifiedVersion', - version=19, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringBoolResults) - async def CharmURL(self, entities=None): - ''' - CharmURL returns the charm URL for all given units or applications. - - entities : typing.Sequence[~Entity] - Returns -> StringBoolResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='CharmURL', - version=19, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def ClearResolved(self, entities=None): - ''' - ClearResolved removes any resolved setting from each given unit. - - entities : typing.Sequence[~Entity] - Returns -> ErrorResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='ClearResolved', - version=19, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringResult) - async def CloudAPIVersion(self): - ''' - CloudAPIVersion returns the cloud API version, if available. - - - Returns -> StringResult - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='CloudAPIVersion', - version=19, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(CloudSpecResult) - async def CloudSpec(self): - ''' - CloudSpec returns the cloud spec used by the model in which the - authenticated unit or application resides. - A check is made beforehand to ensure that the request is made by an entity - that has been granted the appropriate trust. - - - Returns -> CloudSpecResult - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='CloudSpec', - version=19, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def CommitHookChanges(self, args=None): - ''' - CommitHookChanges batches together all required API calls for applying - a set of changes after a hook successfully completes and executes them in a - single transaction. - - args : typing.Sequence[~CommitHookChangesArg] - Returns -> ErrorResults - ''' - if args is not None and not isinstance(args, (bytes, str, list)): - raise Exception("Expected args to be a Sequence, received: {}".format(type(args))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='CommitHookChanges', - version=19, - params=_params) - _params['args'] = args - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ConfigSettingsResults) - async def ConfigSettings(self, entities=None): - ''' - ConfigSettings returns the complete set of application charm config - settings available to each given unit. - - entities : typing.Sequence[~Entity] - Returns -> ConfigSettingsResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='ConfigSettings', - version=19, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringResults) - async def CreateSecretURIs(self, count=None): - ''' - CreateSecretURIs creates new secret URIs. - - count : int - Returns -> StringResults - ''' - if count is not None and not isinstance(count, int): - raise Exception("Expected count to be a int, received: {}".format(type(count))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='CreateSecretURIs', - version=19, - params=_params) - _params['count'] = count - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringResults) - async def CreateSecrets(self, args=None): - ''' - CreateSecrets creates new secrets. - - args : typing.Sequence[~CreateSecretArg] - Returns -> StringResults - ''' - if args is not None and not isinstance(args, (bytes, str, list)): - raise Exception("Expected args to be a Sequence, received: {}".format(type(args))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='CreateSecrets', - version=19, - params=_params) - _params['args'] = args - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ModelResult) - async def CurrentModel(self): - ''' - CurrentModel returns the name and UUID for the current juju model. - - - Returns -> ModelResult - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='CurrentModel', - version=19, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def Destroy(self, entities=None): - ''' - Destroy advances all given Alive units' lifecycles as far as - possible. See state/Unit.Destroy(). - - entities : typing.Sequence[~Entity] - Returns -> ErrorResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='Destroy', - version=19, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def DestroyAllSubordinates(self, entities=None): - ''' - DestroyAllSubordinates destroys all subordinates of each given unit. - - entities : typing.Sequence[~Entity] - Returns -> ErrorResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='DestroyAllSubordinates', - version=19, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def DestroyUnitStorageAttachments(self, entities=None): - ''' - DestroyUnitStorageAttachments marks each storage attachment of the - specified units as Dying. - - entities : typing.Sequence[~Entity] - Returns -> ErrorResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='DestroyUnitStorageAttachments', - version=19, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def EnsureDead(self, entities=None): - ''' - EnsureDead calls EnsureDead on each given entity from state. It - will fail if the entity is not present. If it's Alive, nothing will - happen (see state/EnsureDead() for units or machines). - - entities : typing.Sequence[~Entity] - Returns -> ErrorResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='EnsureDead', - version=19, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def EnterScope(self, relation_units=None): - ''' - EnterScope ensures each unit has entered its scope in the relation, - for all of the given relation/unit pairs. See also - state.RelationUnit.EnterScope(). - - relation_units : typing.Sequence[~RelationUnit] - Returns -> ErrorResults - ''' - if relation_units is not None and not isinstance(relation_units, (bytes, str, list)): - raise Exception("Expected relation_units to be a Sequence, received: {}".format(type(relation_units))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='EnterScope', - version=19, - params=_params) - _params['relation-units'] = relation_units - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def FinishActions(self, results=None): - ''' - FinishActions saves the result of a completed Action - - results : typing.Sequence[~ActionExecutionResult] - Returns -> ErrorResults - ''' - if results is not None and not isinstance(results, (bytes, str, list)): - raise Exception("Expected results to be a Sequence, received: {}".format(type(results))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='FinishActions', - version=19, - params=_params) - _params['results'] = results - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(SecretConsumerInfoResults) - async def GetConsumerSecretsRevisionInfo(self, consumer_tag=None, uris=None): - ''' - GetConsumerSecretsRevisionInfo returns the latest secret revisions for the specified secrets. - This facade method is used for remote watcher to get the latest secret revisions and labels for a secret changed hook. - - consumer_tag : str - uris : typing.Sequence[str] - Returns -> SecretConsumerInfoResults - ''' - if consumer_tag is not None and not isinstance(consumer_tag, (bytes, str)): - raise Exception("Expected consumer_tag to be a str, received: {}".format(type(consumer_tag))) - - if uris is not None and not isinstance(uris, (bytes, str, list)): - raise Exception("Expected uris to be a Sequence, received: {}".format(type(uris))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='GetConsumerSecretsRevisionInfo', - version=19, - params=_params) - _params['consumer-tag'] = consumer_tag - _params['uris'] = uris - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(MeterStatusResults) - async def GetMeterStatus(self, entities=None): - ''' - entities : typing.Sequence[~Entity] - Returns -> MeterStatusResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='GetMeterStatus', - version=19, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringResults) - async def GetPodSpec(self, entities=None): - ''' - GetPodSpec gets the pod specs for a set of applications. - - entities : typing.Sequence[~Entity] - Returns -> StringResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='GetPodSpec', - version=19, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringBoolResults) - async def GetPrincipal(self, entities=None): - ''' - GetPrincipal returns the result of calling PrincipalName() and - converting it to a tag, on each given unit. - - entities : typing.Sequence[~Entity] - Returns -> StringBoolResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='GetPrincipal', - version=19, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringResults) - async def GetRawK8sSpec(self, entities=None): - ''' - GetRawK8sSpec gets the raw k8s specs for a set of applications. - - entities : typing.Sequence[~Entity] - Returns -> StringResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='GetRawK8sSpec', - version=19, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(SecretBackendConfigResults) - async def GetSecretBackendConfigs(self, backend_ids=None, for_drain=None): - ''' - GetSecretBackendConfigs gets the config needed to create a client to secret backends. - - backend_ids : typing.Sequence[str] - for_drain : bool - Returns -> SecretBackendConfigResults - ''' - if backend_ids is not None and not isinstance(backend_ids, (bytes, str, list)): - raise Exception("Expected backend_ids to be a Sequence, received: {}".format(type(backend_ids))) - - if for_drain is not None and not isinstance(for_drain, bool): - raise Exception("Expected for_drain to be a bool, received: {}".format(type(for_drain))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='GetSecretBackendConfigs', - version=19, - params=_params) - _params['backend-ids'] = backend_ids - _params['for-drain'] = for_drain - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(SecretContentResults) - async def GetSecretContentInfo(self, args=None): - ''' - GetSecretContentInfo returns the secret values for the specified secrets. - - args : typing.Sequence[~GetSecretContentArg] - Returns -> SecretContentResults - ''' - if args is not None and not isinstance(args, (bytes, str, list)): - raise Exception("Expected args to be a Sequence, received: {}".format(type(args))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='GetSecretContentInfo', - version=19, - params=_params) - _params['args'] = args - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ListSecretResults) - async def GetSecretMetadata(self): - ''' - GetSecretMetadata returns metadata for the caller's secrets. - - - Returns -> ListSecretResults - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='GetSecretMetadata', - version=19, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(SecretContentResults) - async def GetSecretRevisionContentInfo(self, pending_delete=None, revisions=None, uri=None): - ''' - GetSecretRevisionContentInfo returns the secret values for the specified secret revisions. - - pending_delete : bool - revisions : typing.Sequence[int] - uri : str - Returns -> SecretContentResults - ''' - if pending_delete is not None and not isinstance(pending_delete, bool): - raise Exception("Expected pending_delete to be a bool, received: {}".format(type(pending_delete))) - - if revisions is not None and not isinstance(revisions, (bytes, str, list)): - raise Exception("Expected revisions to be a Sequence, received: {}".format(type(revisions))) - - if uri is not None and not isinstance(uri, (bytes, str)): - raise Exception("Expected uri to be a str, received: {}".format(type(uri))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='GetSecretRevisionContentInfo', - version=19, - params=_params) - _params['pending-delete'] = pending_delete - _params['revisions'] = revisions - _params['uri'] = uri - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(GoalStateResults) - async def GoalStates(self, entities=None): - ''' - GoalStates returns information of charm units and relations. - - entities : typing.Sequence[~Entity] - Returns -> GoalStateResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='GoalStates', - version=19, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(BoolResults) - async def HasSubordinates(self, entities=None): - ''' - HasSubordinates returns the whether each given unit has any subordinates. - - entities : typing.Sequence[~Entity] - Returns -> BoolResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='HasSubordinates', - version=19, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringResults) - async def LXDProfileName(self, entities=None): - ''' - LXDProfileName is a shim to call the LXDProfileAPIv2 version of this method. - - entities : typing.Sequence[~Entity] - Returns -> StringResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='LXDProfileName', - version=19, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(BoolResults) - async def LXDProfileRequired(self, urls=None): - ''' - LXDProfileRequired is a shim to call the LXDProfileAPIv2 version of this method. - - urls : typing.Sequence[~CharmURL] - Returns -> BoolResults - ''' - if urls is not None and not isinstance(urls, (bytes, str, list)): - raise Exception("Expected urls to be a Sequence, received: {}".format(type(urls))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='LXDProfileRequired', - version=19, - params=_params) - _params['urls'] = urls - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def LeaveScope(self, relation_units=None): - ''' - LeaveScope signals each unit has left its scope in the relation, - for all of the given relation/unit pairs. See also - state.RelationUnit.LeaveScope(). - - relation_units : typing.Sequence[~RelationUnit] - Returns -> ErrorResults - ''' - if relation_units is not None and not isinstance(relation_units, (bytes, str, list)): - raise Exception("Expected relation_units to be a Sequence, received: {}".format(type(relation_units))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='LeaveScope', - version=19, - params=_params) - _params['relation-units'] = relation_units - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(LifeResults) - async def Life(self, entities=None): - ''' - Life returns the life status of every supplied entity, where available. - - entities : typing.Sequence[~Entity] - Returns -> LifeResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='Life', - version=19, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def LogActionsMessages(self, messages=None): - ''' - LogActionsMessages records the log messages against the specified actions. - - messages : typing.Sequence[~EntityString] - Returns -> ErrorResults - ''' - if messages is not None and not isinstance(messages, (bytes, str, list)): - raise Exception("Expected messages to be a Sequence, received: {}".format(type(messages))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='LogActionsMessages', - version=19, - params=_params) - _params['messages'] = messages - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def Merge(self, params=None): - ''' - Merge merges in the provided leadership settings. Only leaders for - the given service may perform this operation. - - params : typing.Sequence[~MergeLeadershipSettingsParam] - Returns -> ErrorResults - ''' - if params is not None and not isinstance(params, (bytes, str, list)): - raise Exception("Expected params to be a Sequence, received: {}".format(type(params))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='Merge', - version=19, - params=_params) - _params['params'] = params - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ModelConfigResult) - async def ModelConfig(self): - ''' - ModelConfig returns the current model's configuration. - - - Returns -> ModelConfigResult - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='ModelConfig', - version=19, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(NetworkInfoResults) - async def NetworkInfo(self, bindings=None, relation_id=None, unit=None): - ''' - NetworkInfo returns network interfaces/addresses for specified bindings. - - bindings : typing.Sequence[str] - relation_id : int - unit : str - Returns -> NetworkInfoResults - ''' - if bindings is not None and not isinstance(bindings, (bytes, str, list)): - raise Exception("Expected bindings to be a Sequence, received: {}".format(type(bindings))) - - if relation_id is not None and not isinstance(relation_id, int): - raise Exception("Expected relation_id to be a int, received: {}".format(type(relation_id))) - - if unit is not None and not isinstance(unit, (bytes, str)): - raise Exception("Expected unit to be a str, received: {}".format(type(unit))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='NetworkInfo', - version=19, - params=_params) - _params['bindings'] = bindings - _params['relation-id'] = relation_id - _params['unit'] = unit - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(OpenPortRangesByEndpointResults) - async def OpenedMachinePortRangesByEndpoint(self, entities=None): - ''' - OpenedMachinePortRangesByEndpoint returns the port ranges opened by each - unit on the provided machines grouped by application endpoint. - - entities : typing.Sequence[~Entity] - Returns -> OpenPortRangesByEndpointResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='OpenedMachinePortRangesByEndpoint', - version=19, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(OpenPortRangesByEndpointResults) - async def OpenedPortRangesByEndpoint(self): - ''' - OpenedPortRangesByEndpoint returns the port ranges opened by the unit. - - - Returns -> OpenPortRangesByEndpointResults - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='OpenedPortRangesByEndpoint', - version=19, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringResults) - async def PrivateAddress(self, entities=None): - ''' - PrivateAddress returns the private address for each given unit, if set. - - entities : typing.Sequence[~Entity] - Returns -> StringResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='PrivateAddress', - version=19, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringResult) - async def ProviderType(self): - ''' - ProviderType returns the provider type used by the current juju - model. - - TODO(dimitern): Refactor the uniter to call this instead of calling - ModelConfig() just to get the provider type. Once we have machine - addresses, this might be completely unnecessary though. - - - Returns -> StringResult - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='ProviderType', - version=19, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringResults) - async def PublicAddress(self, entities=None): - ''' - PublicAddress returns the public address for each given unit, if set. - - entities : typing.Sequence[~Entity] - Returns -> StringResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='PublicAddress', - version=19, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(GetLeadershipSettingsBulkResults) - async def Read(self, entities=None): - ''' - Read reads leadership settings for the provided service ID. Any - unit of the service may perform this operation. - - entities : typing.Sequence[~Entity] - Returns -> GetLeadershipSettingsBulkResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='Read', - version=19, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(SettingsResult) - async def ReadLocalApplicationSettings(self, relation=None, unit=None): - ''' - ReadLocalApplicationSettings returns the local application settings for a - particular relation when invoked by the leader unit. - - relation : str - unit : str - Returns -> SettingsResult - ''' - if relation is not None and not isinstance(relation, (bytes, str)): - raise Exception("Expected relation to be a str, received: {}".format(type(relation))) - - if unit is not None and not isinstance(unit, (bytes, str)): - raise Exception("Expected unit to be a str, received: {}".format(type(unit))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='ReadLocalApplicationSettings', - version=19, - params=_params) - _params['relation'] = relation - _params['unit'] = unit - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(SettingsResults) - async def ReadRemoteSettings(self, relation_unit_pairs=None): - ''' - ReadRemoteSettings returns the remote settings of each given set of - relation/local unit/remote unit. - - relation_unit_pairs : typing.Sequence[~RelationUnitPair] - Returns -> SettingsResults - ''' - if relation_unit_pairs is not None and not isinstance(relation_unit_pairs, (bytes, str, list)): - raise Exception("Expected relation_unit_pairs to be a Sequence, received: {}".format(type(relation_unit_pairs))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='ReadRemoteSettings', - version=19, - params=_params) - _params['relation-unit-pairs'] = relation_unit_pairs - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(SettingsResults) - async def ReadSettings(self, relation_units=None): - ''' - ReadSettings returns the local settings of each given set of - relation/unit. - - NOTE(achilleasa): Using this call to read application data is deprecated - and will not work for k8s charms (see LP1876097). Instead, clients should - use ReadLocalApplicationSettings. - - relation_units : typing.Sequence[~RelationUnit] - Returns -> SettingsResults - ''' - if relation_units is not None and not isinstance(relation_units, (bytes, str, list)): - raise Exception("Expected relation_units to be a Sequence, received: {}".format(type(relation_units))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='ReadSettings', - version=19, - params=_params) - _params['relation-units'] = relation_units - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(UnitRefreshResults) - async def Refresh(self, entities=None): - ''' - Refresh retrieves the latest values for attributes on this unit. - - entities : typing.Sequence[~Entity] - Returns -> UnitRefreshResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='Refresh', - version=19, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(RelationResults) - async def Relation(self, relation_units=None): - ''' - Relation returns information about all given relation/unit pairs, - including their id, key and the local endpoint. - - relation_units : typing.Sequence[~RelationUnit] - Returns -> RelationResults - ''' - if relation_units is not None and not isinstance(relation_units, (bytes, str, list)): - raise Exception("Expected relation_units to be a Sequence, received: {}".format(type(relation_units))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='Relation', - version=19, - params=_params) - _params['relation-units'] = relation_units - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(RelationResults) - async def RelationById(self, relation_ids=None): - ''' - RelationById returns information about all given relations, - specified by their ids, including their key and the local - endpoint. - - relation_ids : typing.Sequence[int] - Returns -> RelationResults - ''' - if relation_ids is not None and not isinstance(relation_ids, (bytes, str, list)): - raise Exception("Expected relation_ids to be a Sequence, received: {}".format(type(relation_ids))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='RelationById', - version=19, - params=_params) - _params['relation-ids'] = relation_ids - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(RelationUnitStatusResults) - async def RelationsStatus(self, entities=None): - ''' - RelationsStatus returns for each unit the corresponding relation and status information. - - entities : typing.Sequence[~Entity] - Returns -> RelationUnitStatusResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='RelationsStatus', - version=19, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def RemoveSecrets(self, args=None): - ''' - RemoveSecrets removes the specified secrets. - - args : typing.Sequence[~DeleteSecretArg] - Returns -> ErrorResults - ''' - if args is not None and not isinstance(args, (bytes, str, list)): - raise Exception("Expected args to be a Sequence, received: {}".format(type(args))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='RemoveSecrets', - version=19, - params=_params) - _params['args'] = args - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def RemoveStorageAttachments(self, ids=None): - ''' - RemoveStorageAttachments removes the specified storage - attachments from state. - - ids : typing.Sequence[~StorageAttachmentId] - Returns -> ErrorResults - ''' - if ids is not None and not isinstance(ids, (bytes, str, list)): - raise Exception("Expected ids to be a Sequence, received: {}".format(type(ids))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='RemoveStorageAttachments', - version=19, - params=_params) - _params['ids'] = ids - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def RequestReboot(self, entities=None): - ''' - RequestReboot sets the reboot flag on the provided machines - - entities : typing.Sequence[~Entity] - Returns -> ErrorResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='RequestReboot', - version=19, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ResolvedModeResults) - async def Resolved(self, entities=None): - ''' - Resolved returns the current resolved setting for each given unit. - - entities : typing.Sequence[~Entity] - Returns -> ResolvedModeResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='Resolved', - version=19, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringResult) - async def SLALevel(self): - ''' - SLALevel returns the model's SLA level. - - - Returns -> StringResult - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='SLALevel', - version=19, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def SecretsGrant(self, args=None): - ''' - SecretsGrant grants access to a secret for the specified subjects. - - args : typing.Sequence[~GrantRevokeSecretArg] - Returns -> ErrorResults - ''' - if args is not None and not isinstance(args, (bytes, str, list)): - raise Exception("Expected args to be a Sequence, received: {}".format(type(args))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='SecretsGrant', - version=19, - params=_params) - _params['args'] = args - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def SecretsRevoke(self, args=None): - ''' - SecretsRevoke revokes access to a secret for the specified subjects. - - args : typing.Sequence[~GrantRevokeSecretArg] - Returns -> ErrorResults - ''' - if args is not None and not isinstance(args, (bytes, str, list)): - raise Exception("Expected args to be a Sequence, received: {}".format(type(args))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='SecretsRevoke', - version=19, - params=_params) - _params['args'] = args - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def SecretsRotated(self, args=None): - ''' - SecretsRotated records when secrets were last rotated. - - args : typing.Sequence[~SecretRotatedArg] - Returns -> ErrorResults - ''' - if args is not None and not isinstance(args, (bytes, str, list)): - raise Exception("Expected args to be a Sequence, received: {}".format(type(args))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='SecretsRotated', - version=19, - params=_params) - _params['args'] = args - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def SetAgentStatus(self, entities=None): - ''' - SetAgentStatus will set status for agents of Units passed in args, if one - of the args is not an Unit it will fail. - - entities : typing.Sequence[~EntityStatusArgs] - Returns -> ErrorResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='SetAgentStatus', - version=19, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def SetApplicationStatus(self, entities=None): - ''' - SetApplicationStatus sets the status for all the Applications in args if the given Unit is - the leader. - - entities : typing.Sequence[~EntityStatusArgs] - Returns -> ErrorResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='SetApplicationStatus', - version=19, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def SetCharmURL(self, entities=None): - ''' - SetCharmURL sets the charm URL for each given unit. An error will - be returned if a unit is dead, or the charm URL is not known. - - entities : typing.Sequence[~EntityCharmURL] - Returns -> ErrorResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='SetCharmURL', - version=19, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def SetRelationStatus(self, args=None): - ''' - SetRelationStatus updates the status of the specified relations. - - args : typing.Sequence[~RelationStatusArg] - Returns -> ErrorResults - ''' - if args is not None and not isinstance(args, (bytes, str, list)): - raise Exception("Expected args to be a Sequence, received: {}".format(type(args))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='SetRelationStatus', - version=19, - params=_params) - _params['args'] = args - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def SetState(self, args=None): - ''' - SetState sets the state persisted by the charm running in this unit - and the state internal to the uniter for this unit. - - args : typing.Sequence[~SetUnitStateArg] - Returns -> ErrorResults - ''' - if args is not None and not isinstance(args, (bytes, str, list)): - raise Exception("Expected args to be a Sequence, received: {}".format(type(args))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='SetState', - version=19, - params=_params) - _params['args'] = args - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def SetStatus(self, entities=None): - ''' - SetStatus will set status for a entities passed in args. If the entity is - a Unit it will instead set status to its agent, to emulate backwards - compatibility. - - entities : typing.Sequence[~EntityStatusArgs] - Returns -> ErrorResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='SetStatus', - version=19, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def SetUnitStatus(self, entities=None): - ''' - SetUnitStatus sets status for all elements passed in args, the difference - with SetStatus is that if an entity is a Unit it will set its status instead - of its agent. - - entities : typing.Sequence[~EntityStatusArgs] - Returns -> ErrorResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='SetUnitStatus', - version=19, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def SetUpgradeSeriesUnitStatus(self, params=None): - ''' - SetUpgradeSeriesUnitStatus sets the upgrade series status of the unit. - If no upgrade is in progress an error is returned instead. - - params : typing.Sequence[~UpgradeSeriesStatusParam] - Returns -> ErrorResults - ''' - if params is not None and not isinstance(params, (bytes, str, list)): - raise Exception("Expected params to be a Sequence, received: {}".format(type(params))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='SetUpgradeSeriesUnitStatus', - version=19, - params=_params) - _params['params'] = params - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def SetWorkloadVersion(self, entities=None): - ''' - SetWorkloadVersion sets the workload version for each given unit. An error will - be returned if a unit is dead. - - entities : typing.Sequence[~EntityWorkloadVersion] - Returns -> ErrorResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='SetWorkloadVersion', - version=19, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(UnitStateResults) - async def State(self, entities=None): - ''' - State returns the state persisted by the charm running in this unit - and the state internal to the uniter for this unit. - - entities : typing.Sequence[~Entity] - Returns -> UnitStateResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='State', - version=19, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(LifeResults) - async def StorageAttachmentLife(self, ids=None): - ''' - StorageAttachmentLife returns the lifecycle state of the storage attachments - with the specified tags. - - ids : typing.Sequence[~StorageAttachmentId] - Returns -> LifeResults - ''' - if ids is not None and not isinstance(ids, (bytes, str, list)): - raise Exception("Expected ids to be a Sequence, received: {}".format(type(ids))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='StorageAttachmentLife', - version=19, - params=_params) - _params['ids'] = ids - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StorageAttachmentResults) - async def StorageAttachments(self, ids=None): - ''' - StorageAttachments returns the storage attachments with the specified tags. - - ids : typing.Sequence[~StorageAttachmentId] - Returns -> StorageAttachmentResults - ''' - if ids is not None and not isinstance(ids, (bytes, str, list)): - raise Exception("Expected ids to be a Sequence, received: {}".format(type(ids))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='StorageAttachments', - version=19, - params=_params) - _params['ids'] = ids - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StatusResults) - async def UnitStatus(self, entities=None): - ''' - UnitStatus returns the workload status information for the unit. - - entities : typing.Sequence[~Entity] - Returns -> StatusResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='UnitStatus', - version=19, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StorageAttachmentIdsResults) - async def UnitStorageAttachments(self, entities=None): - ''' - UnitStorageAttachments returns the IDs of storage attachments for a collection of units. - - entities : typing.Sequence[~Entity] - Returns -> StorageAttachmentIdsResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='UnitStorageAttachments', - version=19, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def UpdateNetworkInfo(self, entities=None): - ''' - UpdateNetworkInfo refreshes the network settings for a unit's bound - endpoints. - - entities : typing.Sequence[~Entity] - Returns -> ErrorResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='UpdateNetworkInfo', - version=19, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def UpdateSecrets(self, args=None): - ''' - UpdateSecrets updates the specified secrets. - - args : typing.Sequence[~UpdateSecretArg] - Returns -> ErrorResults - ''' - if args is not None and not isinstance(args, (bytes, str, list)): - raise Exception("Expected args to be a Sequence, received: {}".format(type(args))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='UpdateSecrets', - version=19, - params=_params) - _params['args'] = args - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(UpgradeSeriesStatusResults) - async def UpgradeSeriesUnitStatus(self, entities=None): - ''' - UpgradeSeriesUnitStatus returns the current preparation status of an - upgrading unit. - If no series upgrade is in progress an error is returned instead. - - entities : typing.Sequence[~Entity] - Returns -> UpgradeSeriesStatusResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='UpgradeSeriesUnitStatus', - version=19, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(NotifyWatchResults) - async def Watch(self, entities=None): - ''' - Watch starts an NotifyWatcher for each given entity. - - entities : typing.Sequence[~Entity] - Returns -> NotifyWatchResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='Watch', - version=19, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(NotifyWatchResult) - async def WatchAPIHostPorts(self): - ''' - WatchAPIHostPorts watches the API server addresses. - - - Returns -> NotifyWatchResult - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='WatchAPIHostPorts', - version=19, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringsWatchResults) - async def WatchActionNotifications(self, entities=None): - ''' - WatchActionNotifications returns a StringsWatcher for observing - incoming action calls to a unit. See also state/watcher.go - Unit.WatchActionNotifications(). This method is called from - api/uniter/uniter.go WatchActionNotifications(). - - entities : typing.Sequence[~Entity] - Returns -> StringsWatchResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='WatchActionNotifications', - version=19, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringsWatchResults) - async def WatchConfigSettingsHash(self, entities=None): - ''' - WatchConfigSettingsHash returns a StringsWatcher that yields a hash - of the config values every time the config changes. The uniter can - save this hash and use it to decide whether the config-changed hook - needs to be run (or whether this was just an agent restart with no - substantive config change). - - entities : typing.Sequence[~Entity] - Returns -> StringsWatchResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='WatchConfigSettingsHash', - version=19, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringsWatchResults) - async def WatchConsumedSecretsChanges(self, entities=None): - ''' - WatchConsumedSecretsChanges sets up a watcher to notify of changes to secret revisions for the specified consumers. - - entities : typing.Sequence[~Entity] - Returns -> StringsWatchResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='WatchConsumedSecretsChanges', - version=19, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(NotifyWatchResult) - async def WatchForModelConfigChanges(self): - ''' - WatchForModelConfigChanges returns a NotifyWatcher that observes - changes to the model configuration. - Note that although the NotifyWatchResult contains an Error field, - it's not used because we are only returning a single watcher, - so we use the regular error return. - - - Returns -> NotifyWatchResult - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='WatchForModelConfigChanges', - version=19, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(NotifyWatchResults) - async def WatchInstanceData(self, entities=None): - ''' - WatchInstanceData is a shim to call the LXDProfileAPIv2 version of this method. - - entities : typing.Sequence[~Entity] - Returns -> NotifyWatchResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='WatchInstanceData', - version=19, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(NotifyWatchResults) - async def WatchLeadershipSettings(self, entities=None): - ''' - WatchLeadershipSettings will block the caller until leadership settings - for the given service ID change. - - entities : typing.Sequence[~Entity] - Returns -> NotifyWatchResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='WatchLeadershipSettings', - version=19, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(NotifyWatchResults) - async def WatchMeterStatus(self, entities=None): - ''' - entities : typing.Sequence[~Entity] - Returns -> NotifyWatchResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='WatchMeterStatus', - version=19, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringsWatchResult) - async def WatchObsolete(self, entities=None): - ''' - WatchObsolete returns a watcher for notifying when: - - a secret owned by the entity is deleted - - a secret revision owed by the entity no longer - has any consumers - - Obsolete revisions results are "uri/revno" and deleted - secret results are "uri". - - entities : typing.Sequence[~Entity] - Returns -> StringsWatchResult - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='WatchObsolete', - version=19, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(RelationUnitsWatchResults) - async def WatchRelationUnits(self, relation_units=None): - ''' - WatchRelationUnits returns a RelationUnitsWatcher for observing - changes to every unit in the supplied relation that is visible to - the supplied unit. See also state/watcher.go:RelationUnit.Watch(). - - relation_units : typing.Sequence[~RelationUnit] - Returns -> RelationUnitsWatchResults - ''' - if relation_units is not None and not isinstance(relation_units, (bytes, str, list)): - raise Exception("Expected relation_units to be a Sequence, received: {}".format(type(relation_units))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='WatchRelationUnits', - version=19, - params=_params) - _params['relation-units'] = relation_units - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(SecretTriggerWatchResult) - async def WatchSecretRevisionsExpiryChanges(self, entities=None): - ''' - WatchSecretRevisionsExpiryChanges sets up a watcher to notify of changes to secret revision expiry config. - - entities : typing.Sequence[~Entity] - Returns -> SecretTriggerWatchResult - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='WatchSecretRevisionsExpiryChanges', - version=19, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(SecretTriggerWatchResult) - async def WatchSecretsRotationChanges(self, entities=None): - ''' - WatchSecretsRotationChanges sets up a watcher to notify of changes to secret rotation config. - - entities : typing.Sequence[~Entity] - Returns -> SecretTriggerWatchResult - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='WatchSecretsRotationChanges', - version=19, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(NotifyWatchResults) - async def WatchStorageAttachments(self, ids=None): - ''' - WatchStorageAttachments creates watchers for a collection of storage - attachments, each of which can be used to watch changes to storage - attachment info. - - ids : typing.Sequence[~StorageAttachmentId] - Returns -> NotifyWatchResults - ''' - if ids is not None and not isinstance(ids, (bytes, str, list)): - raise Exception("Expected ids to be a Sequence, received: {}".format(type(ids))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='WatchStorageAttachments', - version=19, - params=_params) - _params['ids'] = ids - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringsWatchResults) - async def WatchTrustConfigSettingsHash(self, entities=None): - ''' - WatchTrustConfigSettingsHash returns a StringsWatcher that yields a - hash of the application config values whenever they change. The - uniter can use the hash to determine whether the actual values have - changed since it last saw the config. - - entities : typing.Sequence[~Entity] - Returns -> StringsWatchResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='WatchTrustConfigSettingsHash', - version=19, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringsWatchResults) - async def WatchUnitAddressesHash(self, entities=None): - ''' - WatchUnitAddressesHash returns a StringsWatcher that yields the - hashes of the addresses for the unit whenever the addresses - change. The uniter can use the hash to determine whether the actual - address values have changed since it last saw the config. - - entities : typing.Sequence[~Entity] - Returns -> StringsWatchResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='WatchUnitAddressesHash', - version=19, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringsWatchResults) - async def WatchUnitRelations(self, entities=None): - ''' - WatchUnitRelations returns a StringsWatcher, for each given - unit, that notifies of changes to the lifecycles of relations - relevant to that unit. For principal units, this will be all of the - relations for the application. For subordinate units, only - relations with the principal unit's application will be monitored. - - entities : typing.Sequence[~Entity] - Returns -> StringsWatchResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='WatchUnitRelations', - version=19, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringsWatchResults) - async def WatchUnitStorageAttachments(self, entities=None): - ''' - WatchUnitStorageAttachments creates watchers for a collection of units, - each of which can be used to watch for lifecycle changes to the corresponding - unit's storage attachments. - - entities : typing.Sequence[~Entity] - Returns -> StringsWatchResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='WatchUnitStorageAttachments', - version=19, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(NotifyWatchResults) - async def WatchUpgradeSeriesNotifications(self, entities=None): - ''' - WatchUpgradeSeriesNotifications returns a NotifyWatcher for observing changes to upgrade series locks. - - entities : typing.Sequence[~Entity] - Returns -> NotifyWatchResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='WatchUpgradeSeriesNotifications', - version=19, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringResults) - async def WorkloadVersion(self, entities=None): - ''' - WorkloadVersion returns the workload version for all given units or applications. - - entities : typing.Sequence[~Entity] - Returns -> StringResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Uniter', - request='WorkloadVersion', - version=19, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - diff --git a/juju/client/_client2.py b/juju/client/_client2.py index a62430c0..c8e5ed59 100644 --- a/juju/client/_client2.py +++ b/juju/client/_client2.py @@ -250,67 +250,41 @@ async def SwitchBlockOn(self, message=None, type_=None): -class CAASAgentFacade(Type): - name = 'CAASAgent' +class HighAvailabilityFacade(Type): + name = 'HighAvailability' version = 2 - schema = {'definitions': {'CloudCredential': {'additionalProperties': False, - 'properties': {'attrs': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}, - 'auth-type': {'type': 'string'}, - 'redacted': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'required': ['auth-type'], - 'type': 'object'}, - 'CloudSpec': {'additionalProperties': False, - 'properties': {'cacertificates': {'items': {'type': 'string'}, - 'type': 'array'}, - 'credential': {'$ref': '#/definitions/CloudCredential'}, - 'endpoint': {'type': 'string'}, - 'identity-endpoint': {'type': 'string'}, - 'is-controller-cloud': {'type': 'boolean'}, - 'name': {'type': 'string'}, - 'region': {'type': 'string'}, - 'skip-tls-verify': {'type': 'boolean'}, - 'storage-endpoint': {'type': 'string'}, - 'type': {'type': 'string'}}, - 'required': ['type', 'name'], - 'type': 'object'}, - 'CloudSpecResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'result': {'$ref': '#/definitions/CloudSpec'}}, - 'type': 'object'}, - 'CloudSpecResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/CloudSpecResult'}, - 'type': 'array'}}, - 'type': 'object'}, - 'ControllerAPIInfoResult': {'additionalProperties': False, - 'properties': {'addresses': {'items': {'type': 'string'}, - 'type': 'array'}, - 'cacert': {'type': 'string'}, - 'error': {'$ref': '#/definitions/Error'}}, - 'required': ['addresses', - 'cacert'], + schema = {'definitions': {'ControllersChangeResult': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}, + 'result': {'$ref': '#/definitions/ControllersChanges'}}, + 'required': ['result'], 'type': 'object'}, - 'ControllerAPIInfoResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/ControllerAPIInfoResult'}, + 'ControllersChangeResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/ControllersChangeResult'}, 'type': 'array'}}, 'required': ['results'], 'type': 'object'}, - 'ControllerConfigResult': {'additionalProperties': False, - 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}}, - 'required': ['config'], - 'type': 'object'}, - 'Entities': {'additionalProperties': False, - 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'}, - 'type': 'array'}}, - 'required': ['entities'], - 'type': 'object'}, - 'Entity': {'additionalProperties': False, - 'properties': {'tag': {'type': 'string'}}, - 'required': ['tag'], - 'type': 'object'}, + 'ControllersChanges': {'additionalProperties': False, + 'properties': {'added': {'items': {'type': 'string'}, + 'type': 'array'}, + 'converted': {'items': {'type': 'string'}, + 'type': 'array'}, + 'maintained': {'items': {'type': 'string'}, + 'type': 'array'}, + 'removed': {'items': {'type': 'string'}, + 'type': 'array'}}, + 'type': 'object'}, + 'ControllersSpec': {'additionalProperties': False, + 'properties': {'constraints': {'$ref': '#/definitions/Value'}, + 'num-controllers': {'type': 'integer'}, + 'placement': {'items': {'type': 'string'}, + 'type': 'array'}}, + 'required': ['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': {'patternProperties': {'.*': {'additionalProperties': True, @@ -319,209 +293,151 @@ class CAASAgentFacade(Type): 'message': {'type': 'string'}}, 'required': ['message', 'code'], 'type': 'object'}, - 'ModelConfigResult': {'additionalProperties': False, - 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}}, - 'required': ['config'], - 'type': 'object'}, - 'ModelTag': {'additionalProperties': False, 'type': 'object'}, - 'NotifyWatchResult': {'additionalProperties': False, - 'properties': {'NotifyWatcherId': {'type': 'string'}, - 'error': {'$ref': '#/definitions/Error'}}, - 'required': ['NotifyWatcherId'], - 'type': 'object'}, - 'NotifyWatchResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}}, - 'properties': {'CloudSpec': {'description': "CloudSpec returns the model's " - 'cloud spec.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/CloudSpecResults'}}, - 'type': 'object'}, - 'ControllerAPIInfoForModels': {'description': 'ControllerAPIInfoForModels ' - 'returns the ' - 'controller api ' - 'connection ' - 'details for the ' - 'specified ' - 'models.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ControllerAPIInfoResults'}}, - 'type': 'object'}, - 'ControllerConfig': {'description': 'ControllerConfig returns ' - "the controller's " - 'configuration.', - 'properties': {'Result': {'$ref': '#/definitions/ControllerConfigResult'}}, - 'type': 'object'}, - 'GetCloudSpec': {'description': 'GetCloudSpec constructs the ' - 'CloudSpec for a validated and ' - 'authorized model.', - 'properties': {'Params': {'$ref': '#/definitions/ModelTag'}, - 'Result': {'$ref': '#/definitions/CloudSpecResult'}}, - 'type': 'object'}, - 'ModelConfig': {'description': 'ModelConfig returns the ' - "current model's configuration.", - 'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}}, - 'type': 'object'}, - 'WatchCloudSpecsChanges': {'description': 'WatchCloudSpecsChanges ' - 'returns a watcher ' - 'for cloud spec ' - 'changes.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/NotifyWatchResults'}}, - 'type': 'object'}, - 'WatchForModelConfigChanges': {'description': 'WatchForModelConfigChanges ' - 'returns a ' - 'NotifyWatcher ' - 'that observes\n' - 'changes to the ' - 'model ' - 'configuration.\n' - 'Note that ' - 'although the ' - 'NotifyWatchResult ' - 'contains an ' - 'Error field,\n' - "it's not used " - 'because we are ' - 'only returning ' - 'a single ' - 'watcher,\n' - 'so we use the ' - 'regular error ' - 'return.', - 'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}}, - 'type': 'object'}}, + 'Value': {'additionalProperties': False, + 'properties': {'allocate-public-ip': {'type': 'boolean'}, + 'arch': {'type': 'string'}, + 'container': {'type': 'string'}, + 'cores': {'type': 'integer'}, + 'cpu-power': {'type': 'integer'}, + 'image-id': {'type': 'string'}, + 'instance-role': {'type': 'string'}, + 'instance-type': {'type': 'string'}, + 'mem': {'type': 'integer'}, + 'root-disk': {'type': 'integer'}, + 'root-disk-source': {'type': 'string'}, + 'spaces': {'items': {'type': 'string'}, + 'type': 'array'}, + 'tags': {'items': {'type': 'string'}, + 'type': 'array'}, + 'virt-type': {'type': 'string'}, + 'zones': {'items': {'type': 'string'}, + 'type': 'array'}}, + 'type': 'object'}}, + 'properties': {'EnableHA': {'description': 'EnableHA adds controller machines ' + 'as necessary to ensure the\n' + 'controller has the number of ' + 'machines specified.', + 'properties': {'Params': {'$ref': '#/definitions/ControllersSpecs'}, + 'Result': {'$ref': '#/definitions/ControllersChangeResults'}}, + 'type': 'object'}}, 'type': 'object'} - @ReturnMapping(CloudSpecResults) - async def CloudSpec(self, entities=None): - ''' - CloudSpec returns the model's cloud spec. - - entities : typing.Sequence[~Entity] - Returns -> CloudSpecResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='CAASAgent', - request='CloudSpec', - version=2, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ControllerAPIInfoResults) - async def ControllerAPIInfoForModels(self, entities=None): - ''' - ControllerAPIInfoForModels returns the controller api connection details for the specified models. - - entities : typing.Sequence[~Entity] - Returns -> ControllerAPIInfoResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='CAASAgent', - request='ControllerAPIInfoForModels', - version=2, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ControllerConfigResult) - async def ControllerConfig(self): - ''' - ControllerConfig returns the controller's configuration. - - - Returns -> ControllerConfigResult - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='CAASAgent', - request='ControllerConfig', - version=2, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(CloudSpecResult) - async def GetCloudSpec(self): + @ReturnMapping(ControllersChangeResults) + async def EnableHA(self, specs=None): ''' - GetCloudSpec constructs the CloudSpec for a validated and authorized model. - + EnableHA adds controller machines as necessary to ensure the + controller has the number of machines specified. - Returns -> CloudSpecResult + specs : typing.Sequence[~ControllersSpec] + Returns -> ControllersChangeResults ''' + if specs is not None and not isinstance(specs, (bytes, str, list)): + raise Exception("Expected specs to be a Sequence, received: {}".format(type(specs))) # map input types to rpc msg _params = dict() - msg = dict(type='CAASAgent', - request='GetCloudSpec', + msg = dict(type='HighAvailability', + request='EnableHA', version=2, params=_params) - + _params['specs'] = specs reply = await self.rpc(msg) return reply - @ReturnMapping(ModelConfigResult) - async def ModelConfig(self): - ''' - ModelConfig returns the current model's configuration. - - - Returns -> ModelConfigResult - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='CAASAgent', - request='ModelConfig', - version=2, - params=_params) - - reply = await self.rpc(msg) - return reply - - +class MetricsDebugFacade(Type): + name = 'MetricsDebug' + version = 2 + schema = {'definitions': {'Entities': {'additionalProperties': False, + 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'}, + 'type': 'array'}}, + 'required': ['entities'], + 'type': 'object'}, + 'Entity': {'additionalProperties': False, + 'properties': {'tag': {'type': 'string'}}, + 'required': ['tag'], + 'type': 'object'}, + 'EntityMetrics': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}, + 'metrics': {'items': {'$ref': '#/definitions/MetricResult'}, + 'type': 'array'}}, + 'type': 'object'}, + 'Error': {'additionalProperties': False, + 'properties': {'code': {'type': 'string'}, + 'info': {'patternProperties': {'.*': {'additionalProperties': True, + 'type': 'object'}}, + 'type': 'object'}, + 'message': {'type': 'string'}}, + 'required': ['message', 'code'], + 'type': 'object'}, + 'ErrorResult': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}}, + 'type': 'object'}, + 'ErrorResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, + 'type': 'array'}}, + 'required': ['results'], + 'type': 'object'}, + 'MeterStatusParam': {'additionalProperties': False, + 'properties': {'code': {'type': 'string'}, + 'info': {'type': 'string'}, + 'tag': {'type': 'string'}}, + 'required': ['tag', 'code'], + 'type': 'object'}, + 'MeterStatusParams': {'additionalProperties': False, + 'properties': {'statues': {'items': {'$ref': '#/definitions/MeterStatusParam'}, + 'type': 'array'}}, + 'required': ['statues'], + 'type': 'object'}, + 'MetricResult': {'additionalProperties': False, + 'properties': {'key': {'type': 'string'}, + 'labels': {'patternProperties': {'.*': {'type': 'string'}}, + 'type': 'object'}, + 'time': {'format': 'date-time', + 'type': 'string'}, + 'unit': {'type': 'string'}, + 'value': {'type': 'string'}}, + 'required': ['time', + 'key', + 'value', + 'unit', + 'labels'], + 'type': 'object'}, + 'MetricResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/EntityMetrics'}, + 'type': 'array'}}, + 'required': ['results'], + 'type': 'object'}}, + 'properties': {'GetMetrics': {'description': 'GetMetrics returns all metrics ' + 'stored by the state server.', + 'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/MetricResults'}}, + 'type': 'object'}, + 'SetMeterStatus': {'description': 'SetMeterStatus sets meter ' + 'statuses for entities.', + 'properties': {'Params': {'$ref': '#/definitions/MeterStatusParams'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}}, + 'type': 'object'} + - @ReturnMapping(NotifyWatchResults) - async def WatchCloudSpecsChanges(self, entities=None): + @ReturnMapping(MetricResults) + async def GetMetrics(self, entities=None): ''' - WatchCloudSpecsChanges returns a watcher for cloud spec changes. + GetMetrics returns all metrics stored by the state server. entities : typing.Sequence[~Entity] - Returns -> NotifyWatchResults + Returns -> MetricResults ''' if entities is not None and not isinstance(entities, (bytes, str, list)): raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) # map input types to rpc msg _params = dict() - msg = dict(type='CAASAgent', - request='WatchCloudSpecsChanges', + msg = dict(type='MetricsDebug', + request='GetMetrics', version=2, params=_params) _params['entities'] = entities @@ -530,326 +446,70 @@ async def WatchCloudSpecsChanges(self, entities=None): - @ReturnMapping(NotifyWatchResult) - async def WatchForModelConfigChanges(self): + @ReturnMapping(ErrorResults) + async def SetMeterStatus(self, statues=None): ''' - WatchForModelConfigChanges returns a NotifyWatcher that observes - changes to the model configuration. - Note that although the NotifyWatchResult contains an Error field, - it's not used because we are only returning a single watcher, - so we use the regular error return. - + SetMeterStatus sets meter statuses for entities. - Returns -> NotifyWatchResult + statues : typing.Sequence[~MeterStatusParam] + Returns -> ErrorResults ''' + if statues is not None and not isinstance(statues, (bytes, str, list)): + raise Exception("Expected statues to be a Sequence, received: {}".format(type(statues))) # map input types to rpc msg _params = dict() - msg = dict(type='CAASAgent', - request='WatchForModelConfigChanges', + msg = dict(type='MetricsDebug', + request='SetMeterStatus', version=2, params=_params) - + _params['statues'] = statues reply = await self.rpc(msg) return reply -class CAASUnitProvisionerFacade(Type): - name = 'CAASUnitProvisioner' +class SecretsFacade(Type): + name = 'Secrets' version = 2 - schema = {'definitions': {'Address': {'additionalProperties': False, - 'properties': {'cidr': {'type': 'string'}, - 'config-type': {'type': 'string'}, - 'is-secondary': {'type': 'boolean'}, - 'scope': {'type': 'string'}, - 'space-id': {'type': 'string'}, - 'space-name': {'type': 'string'}, - 'type': {'type': 'string'}, - 'value': {'type': 'string'}}, - 'required': ['value', 'type', 'scope'], - 'type': 'object'}, - 'ApplicationGetConfigResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/ConfigResult'}, - 'type': 'array'}}, - 'required': ['Results'], - 'type': 'object'}, - 'ApplicationUnitInfo': {'additionalProperties': False, - 'properties': {'provider-id': {'type': 'string'}, - 'unit-tag': {'type': 'string'}}, - 'required': ['provider-id', - 'unit-tag'], - 'type': 'object'}, - 'ApplicationUnitParams': {'additionalProperties': False, - 'properties': {'address': {'type': 'string'}, - 'data': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'filesystem-info': {'items': {'$ref': '#/definitions/KubernetesFilesystemInfo'}, - 'type': 'array'}, - 'info': {'type': 'string'}, - 'ports': {'items': {'type': 'string'}, - 'type': 'array'}, - 'provider-id': {'type': 'string'}, - 'stateful': {'type': 'boolean'}, - 'status': {'type': 'string'}, - 'unit-tag': {'type': 'string'}}, - 'required': ['provider-id', - 'unit-tag', - 'address', - 'ports', - 'status', - 'info'], - 'type': 'object'}, - 'BoolResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'result': {'type': 'boolean'}}, - 'required': ['result'], + schema = {'definitions': {'AccessInfo': {'additionalProperties': False, + 'properties': {'role': {'type': 'string'}, + 'scope-tag': {'type': 'string'}, + 'target-tag': {'type': 'string'}}, + 'required': ['target-tag', 'scope-tag', 'role'], 'type': 'object'}, - 'BoolResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/BoolResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'Charm': {'additionalProperties': False, - 'properties': {'actions': {'$ref': '#/definitions/CharmActions'}, - 'config': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmOption'}}, - 'type': 'object'}, - 'lxd-profile': {'$ref': '#/definitions/CharmLXDProfile'}, - 'manifest': {'$ref': '#/definitions/CharmManifest'}, - 'meta': {'$ref': '#/definitions/CharmMeta'}, - 'metrics': {'$ref': '#/definitions/CharmMetrics'}, - 'revision': {'type': 'integer'}, - 'url': {'type': 'string'}}, - 'required': ['revision', 'url', 'config'], - 'type': 'object'}, - 'CharmActionSpec': {'additionalProperties': False, - 'properties': {'description': {'type': 'string'}, + 'CreateSecretArg': {'additionalProperties': False, + 'properties': {'UpsertSecretArg': {'$ref': '#/definitions/UpsertSecretArg'}, + 'content': {'$ref': '#/definitions/SecretContentParams'}, + 'description': {'type': 'string'}, + 'expire-time': {'format': 'date-time', + 'type': 'string'}, + 'label': {'type': 'string'}, + 'owner-tag': {'type': 'string'}, 'params': {'patternProperties': {'.*': {'additionalProperties': True, 'type': 'object'}}, - 'type': 'object'}}, - 'required': ['description', 'params'], - 'type': 'object'}, - 'CharmActions': {'additionalProperties': False, - 'properties': {'specs': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmActionSpec'}}, - 'type': 'object'}}, - 'type': 'object'}, - 'CharmBase': {'additionalProperties': False, - 'properties': {'architectures': {'items': {'type': 'string'}, - 'type': 'array'}, - 'channel': {'type': 'string'}, - 'name': {'type': 'string'}}, - 'type': 'object'}, - 'CharmContainer': {'additionalProperties': False, - 'properties': {'mounts': {'items': {'$ref': '#/definitions/CharmMount'}, - 'type': 'array'}, - 'resource': {'type': 'string'}}, - 'type': 'object'}, - 'CharmDeployment': {'additionalProperties': False, - 'properties': {'min-version': {'type': 'string'}, - 'mode': {'type': 'string'}, - 'service': {'type': 'string'}, - 'type': {'type': 'string'}}, - 'required': ['type', - 'mode', - 'service', - 'min-version'], - 'type': 'object'}, - 'CharmDevice': {'additionalProperties': False, - 'properties': {'CountMax': {'type': 'integer'}, - 'CountMin': {'type': 'integer'}, - 'Description': {'type': 'string'}, - 'Name': {'type': 'string'}, - 'Type': {'type': 'string'}}, - 'required': ['Name', - 'Description', - 'Type', - 'CountMin', - 'CountMax'], - 'type': 'object'}, - 'CharmLXDProfile': {'additionalProperties': False, - 'properties': {'config': {'patternProperties': {'.*': {'type': 'string'}}, 'type': 'object'}, - 'description': {'type': 'string'}, - 'devices': {'patternProperties': {'.*': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}}, - 'type': 'object'}}, - 'required': ['config', - 'description', - 'devices'], + 'rotate-policy': {'type': 'string'}, + 'uri': {'type': 'string'}}, + 'required': ['UpsertSecretArg', + 'owner-tag'], 'type': 'object'}, - 'CharmManifest': {'additionalProperties': False, - 'properties': {'bases': {'items': {'$ref': '#/definitions/CharmBase'}, - 'type': 'array'}}, - 'type': 'object'}, - 'CharmMeta': {'additionalProperties': False, - 'properties': {'assumes-expr': {'$ref': '#/definitions/ExpressionTree'}, - 'categories': {'items': {'type': 'string'}, - 'type': 'array'}, - 'containers': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmContainer'}}, - 'type': 'object'}, - 'deployment': {'$ref': '#/definitions/CharmDeployment'}, - 'description': {'type': 'string'}, - 'devices': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmDevice'}}, - 'type': 'object'}, - 'extra-bindings': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}, - 'min-juju-version': {'type': 'string'}, - 'name': {'type': 'string'}, - 'payload-classes': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmPayloadClass'}}, - 'type': 'object'}, - 'peers': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmRelation'}}, - 'type': 'object'}, - 'provides': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmRelation'}}, - 'type': 'object'}, - 'requires': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmRelation'}}, - 'type': 'object'}, - 'resources': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmResourceMeta'}}, - 'type': 'object'}, - 'series': {'items': {'type': 'string'}, - 'type': 'array'}, - 'storage': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmStorage'}}, - 'type': 'object'}, - 'subordinate': {'type': 'boolean'}, - 'summary': {'type': 'string'}, - 'tags': {'items': {'type': 'string'}, - 'type': 'array'}, - 'terms': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'required': ['name', - 'summary', - 'description', - 'subordinate'], - 'type': 'object'}, - 'CharmMetric': {'additionalProperties': False, - 'properties': {'description': {'type': 'string'}, - 'type': {'type': 'string'}}, - 'required': ['type', 'description'], - 'type': 'object'}, - 'CharmMetrics': {'additionalProperties': False, - 'properties': {'metrics': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmMetric'}}, - 'type': 'object'}, - 'plan': {'$ref': '#/definitions/CharmPlan'}}, - 'required': ['metrics', 'plan'], - 'type': 'object'}, - 'CharmMount': {'additionalProperties': False, - 'properties': {'location': {'type': 'string'}, - 'storage': {'type': 'string'}}, - 'type': 'object'}, - 'CharmOption': {'additionalProperties': False, - 'properties': {'default': {'additionalProperties': True, - 'type': 'object'}, - 'description': {'type': 'string'}, - 'type': {'type': 'string'}}, - 'required': ['type'], - 'type': 'object'}, - 'CharmPayloadClass': {'additionalProperties': False, - 'properties': {'name': {'type': 'string'}, - 'type': {'type': 'string'}}, - 'required': ['name', 'type'], - 'type': 'object'}, - 'CharmPlan': {'additionalProperties': False, - 'properties': {'required': {'type': 'boolean'}}, - 'required': ['required'], - 'type': 'object'}, - 'CharmRelation': {'additionalProperties': False, - 'properties': {'interface': {'type': 'string'}, - 'limit': {'type': 'integer'}, - 'name': {'type': 'string'}, - 'optional': {'type': 'boolean'}, - 'role': {'type': 'string'}, - 'scope': {'type': 'string'}}, - 'required': ['name', - 'role', - 'interface', - 'optional', - 'limit', - 'scope'], - 'type': 'object'}, - 'CharmResourceMeta': {'additionalProperties': False, - 'properties': {'description': {'type': 'string'}, - 'name': {'type': 'string'}, - 'path': {'type': 'string'}, - 'type': {'type': 'string'}}, - 'required': ['name', - 'type', - 'path', - 'description'], - 'type': 'object'}, - 'CharmStorage': {'additionalProperties': False, - 'properties': {'count-max': {'type': 'integer'}, - 'count-min': {'type': 'integer'}, - 'description': {'type': 'string'}, - 'location': {'type': 'string'}, - 'minimum-size': {'type': 'integer'}, - 'name': {'type': 'string'}, - 'properties': {'items': {'type': 'string'}, - 'type': 'array'}, - 'read-only': {'type': 'boolean'}, - 'shared': {'type': 'boolean'}, - 'type': {'type': 'string'}}, - 'required': ['name', - 'description', - 'type', - 'shared', - 'read-only', - 'count-min', - 'count-max', - 'minimum-size'], - 'type': 'object'}, - 'CharmURL': {'additionalProperties': False, - 'properties': {'url': {'type': 'string'}}, - 'required': ['url'], - 'type': 'object'}, - 'ConfigResult': {'additionalProperties': False, - 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'error': {'$ref': '#/definitions/Error'}}, - 'required': ['config'], - 'type': 'object'}, - 'DockerImageInfo': {'additionalProperties': False, - 'properties': {'auth': {'type': 'string'}, - 'email': {'type': 'string'}, - 'identitytoken': {'type': 'string'}, - 'image-name': {'type': 'string'}, - 'password': {'type': 'string'}, - 'registrytoken': {'type': 'string'}, - 'repository': {'type': 'string'}, - 'serveraddress': {'type': 'string'}, - 'username': {'type': 'string'}}, - 'required': ['image-name'], + 'CreateSecretArgs': {'additionalProperties': False, + 'properties': {'args': {'items': {'$ref': '#/definitions/CreateSecretArg'}, + 'type': 'array'}}, + 'required': ['args'], + 'type': 'object'}, + 'DeleteSecretArg': {'additionalProperties': False, + 'properties': {'label': {'type': 'string'}, + 'revisions': {'items': {'type': 'integer'}, + 'type': 'array'}, + 'uri': {'type': 'string'}}, + 'required': ['uri', 'label'], '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', 'since'], - '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'], + 'DeleteSecretArgs': {'additionalProperties': False, + 'properties': {'args': {'items': {'$ref': '#/definitions/DeleteSecretArg'}, + 'type': 'array'}}, + 'required': ['args'], 'type': 'object'}, 'Error': {'additionalProperties': False, 'properties': {'code': {'type': 'string'}, @@ -867,5824 +527,254 @@ class CAASUnitProvisionerFacade(Type): 'type': 'array'}}, 'required': ['results'], 'type': 'object'}, - 'ExpressionTree': {'additionalProperties': False, - 'properties': {'Expression': {'additionalProperties': True, - 'type': 'object'}}, - 'required': ['Expression'], - 'type': 'object'}, - 'IntResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'result': {'type': 'integer'}}, - 'required': ['result'], - 'type': 'object'}, - 'IntResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/IntResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'KubernetesDeploymentInfo': {'additionalProperties': False, - 'properties': {'deployment-type': {'type': 'string'}, - 'service-type': {'type': 'string'}}, - 'required': ['deployment-type', - 'service-type'], - 'type': 'object'}, - 'KubernetesDeviceParams': {'additionalProperties': False, - 'properties': {'Attributes': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}, - 'Count': {'type': 'integer'}, - 'Type': {'type': 'string'}}, - 'required': ['Type', - 'Count', - 'Attributes'], - 'type': 'object'}, - 'KubernetesFilesystemAttachmentParams': {'additionalProperties': False, - 'properties': {'mount-point': {'type': 'string'}, - 'provider': {'type': 'string'}, - 'read-only': {'type': 'boolean'}}, - 'required': ['provider'], - 'type': 'object'}, - 'KubernetesFilesystemInfo': {'additionalProperties': False, - 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'filesystem-id': {'type': 'string'}, - 'info': {'type': 'string'}, - 'mount-point': {'type': 'string'}, - 'pool': {'type': 'string'}, - 'read-only': {'type': 'boolean'}, - 'size': {'type': 'integer'}, - 'status': {'type': 'string'}, - 'storagename': {'type': 'string'}, - 'volume': {'$ref': '#/definitions/KubernetesVolumeInfo'}}, - 'required': ['storagename', - 'pool', - 'size', - 'filesystem-id', - 'status', - 'info', - 'volume'], + 'GrantRevokeUserSecretArg': {'additionalProperties': False, + 'properties': {'applications': {'items': {'type': 'string'}, + 'type': 'array'}, + 'label': {'type': 'string'}, + 'uri': {'type': 'string'}}, + 'required': ['uri', + 'label', + 'applications'], 'type': 'object'}, - 'KubernetesFilesystemParams': {'additionalProperties': False, - 'properties': {'attachment': {'$ref': '#/definitions/KubernetesFilesystemAttachmentParams'}, - 'attributes': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'provider': {'type': 'string'}, - 'size': {'type': 'integer'}, - 'storagename': {'type': 'string'}, - 'tags': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}}, - 'required': ['storagename', - 'size', - 'provider'], - 'type': 'object'}, - 'KubernetesProvisioningInfo': {'additionalProperties': False, - 'properties': {'charm-modified-version': {'type': 'integer'}, - 'constraints': {'$ref': '#/definitions/Value'}, - 'deployment-info': {'$ref': '#/definitions/KubernetesDeploymentInfo'}, - 'devices': {'items': {'$ref': '#/definitions/KubernetesDeviceParams'}, - 'type': 'array'}, - 'filesystems': {'items': {'$ref': '#/definitions/KubernetesFilesystemParams'}, - 'type': 'array'}, - 'image-repo': {'$ref': '#/definitions/DockerImageInfo'}, - 'pod-spec': {'type': 'string'}, - 'raw-k8s-spec': {'type': 'string'}, - 'tags': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}, - 'volumes': {'items': {'$ref': '#/definitions/KubernetesVolumeParams'}, - 'type': 'array'}}, - 'required': ['pod-spec', - 'constraints'], - 'type': 'object'}, - 'KubernetesProvisioningInfoResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'result': {'$ref': '#/definitions/KubernetesProvisioningInfo'}}, - 'required': ['result'], - 'type': 'object'}, - 'KubernetesProvisioningInfoResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/KubernetesProvisioningInfoResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'KubernetesVolumeAttachmentParams': {'additionalProperties': False, - 'properties': {'provider': {'type': 'string'}, - 'read-only': {'type': 'boolean'}}, - 'required': ['provider'], - 'type': 'object'}, - 'KubernetesVolumeInfo': {'additionalProperties': False, - 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'info': {'type': 'string'}, - 'persistent': {'type': 'boolean'}, - 'pool': {'type': 'string'}, - 'size': {'type': 'integer'}, - 'status': {'type': 'string'}, - 'volume-id': {'type': 'string'}}, - 'required': ['volume-id', - 'size', - 'persistent', - 'status', - 'info'], - 'type': 'object'}, - 'KubernetesVolumeParams': {'additionalProperties': False, - 'properties': {'attachment': {'$ref': '#/definitions/KubernetesVolumeAttachmentParams'}, - 'attributes': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'provider': {'type': 'string'}, - 'size': {'type': 'integer'}, - 'storagename': {'type': 'string'}, - 'tags': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}}, - 'required': ['storagename', - 'size', - 'provider'], - 'type': 'object'}, - 'LifeResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'life': {'type': 'string'}}, - 'required': ['life'], - 'type': 'object'}, - 'LifeResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'NotifyWatchResult': {'additionalProperties': False, - 'properties': {'NotifyWatcherId': {'type': 'string'}, + 'ListSecretResult': {'additionalProperties': False, + 'properties': {'access': {'items': {'$ref': '#/definitions/AccessInfo'}, + 'type': 'array'}, + 'create-time': {'format': 'date-time', + 'type': 'string'}, + 'description': {'type': 'string'}, + 'label': {'type': 'string'}, + 'latest-expire-time': {'format': 'date-time', + 'type': 'string'}, + 'latest-revision': {'type': 'integer'}, + 'next-rotate-time': {'format': 'date-time', + 'type': 'string'}, + 'owner-tag': {'type': 'string'}, + 'revisions': {'items': {'$ref': '#/definitions/SecretRevision'}, + 'type': 'array'}, + 'rotate-policy': {'type': 'string'}, + 'update-time': {'format': 'date-time', + 'type': 'string'}, + 'uri': {'type': 'string'}, + 'value': {'$ref': '#/definitions/SecretValueResult'}, + 'version': {'type': 'integer'}}, + 'required': ['uri', + 'version', + 'owner-tag', + 'latest-revision', + 'create-time', + 'update-time', + 'revisions'], + 'type': 'object'}, + 'ListSecretResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/ListSecretResult'}, + 'type': 'array'}}, + 'required': ['results'], + 'type': 'object'}, + 'ListSecretsArgs': {'additionalProperties': False, + 'properties': {'filter': {'$ref': '#/definitions/SecretsFilter'}, + 'show-secrets': {'type': 'boolean'}}, + 'required': ['show-secrets', 'filter'], + 'type': 'object'}, + 'SecretContentParams': {'additionalProperties': False, + 'properties': {'data': {'patternProperties': {'.*': {'type': 'string'}}, + 'type': 'object'}, + 'value-ref': {'$ref': '#/definitions/SecretValueRef'}}, + 'type': 'object'}, + 'SecretRevision': {'additionalProperties': False, + 'properties': {'backend-name': {'type': 'string'}, + 'create-time': {'format': 'date-time', + 'type': 'string'}, + 'expire-time': {'format': 'date-time', + 'type': 'string'}, + 'revision': {'type': 'integer'}, + 'update-time': {'format': 'date-time', + 'type': 'string'}, + 'value-ref': {'$ref': '#/definitions/SecretValueRef'}}, + 'required': ['revision'], + 'type': 'object'}, + 'SecretValueRef': {'additionalProperties': False, + 'properties': {'backend-id': {'type': 'string'}, + 'revision-id': {'type': 'string'}}, + 'required': ['backend-id', 'revision-id'], + 'type': 'object'}, + 'SecretValueResult': {'additionalProperties': False, + 'properties': {'data': {'patternProperties': {'.*': {'type': 'string'}}, + 'type': 'object'}, 'error': {'$ref': '#/definitions/Error'}}, - 'required': ['NotifyWatcherId'], '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'}, + 'SecretsFilter': {'additionalProperties': False, + 'properties': {'label': {'type': 'string'}, + 'owner-tag': {'type': 'string'}, + 'revision': {'type': 'integer'}, + 'uri': {'type': 'string'}}, + 'type': 'object'}, 'StringResult': {'additionalProperties': False, 'properties': {'error': {'$ref': '#/definitions/Error'}, 'result': {'type': 'string'}}, 'required': ['result'], 'type': 'object'}, - 'StringResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'StringsWatchResult': {'additionalProperties': False, - 'properties': {'changes': {'items': {'type': 'string'}, - 'type': 'array'}, - 'error': {'$ref': '#/definitions/Error'}, - 'watcher-id': {'type': 'string'}}, - 'required': ['watcher-id'], - 'type': 'object'}, - 'StringsWatchResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'UpdateApplicationServiceArg': {'additionalProperties': False, - 'properties': {'addresses': {'items': {'$ref': '#/definitions/Address'}, - 'type': 'array'}, - 'application-tag': {'type': 'string'}, - 'generation': {'type': 'integer'}, - 'provider-id': {'type': 'string'}, - 'scale': {'type': 'integer'}}, - 'required': ['application-tag', - 'provider-id', - 'addresses'], - 'type': 'object'}, - 'UpdateApplicationServiceArgs': {'additionalProperties': False, - 'properties': {'args': {'items': {'$ref': '#/definitions/UpdateApplicationServiceArg'}, - 'type': 'array'}}, - 'required': ['args'], - 'type': 'object'}, - 'UpdateApplicationUnitArgs': {'additionalProperties': False, - 'properties': {'args': {'items': {'$ref': '#/definitions/UpdateApplicationUnits'}, - 'type': 'array'}}, - 'required': ['args'], - 'type': 'object'}, - 'UpdateApplicationUnitResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'info': {'$ref': '#/definitions/UpdateApplicationUnitsInfo'}}, - 'type': 'object'}, - 'UpdateApplicationUnitResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/UpdateApplicationUnitResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'UpdateApplicationUnits': {'additionalProperties': False, - 'properties': {'application-tag': {'type': 'string'}, - 'generation': {'type': 'integer'}, - 'scale': {'type': 'integer'}, - 'status': {'$ref': '#/definitions/EntityStatus'}, - 'units': {'items': {'$ref': '#/definitions/ApplicationUnitParams'}, - 'type': 'array'}}, - 'required': ['application-tag', - 'units'], - 'type': 'object'}, - 'UpdateApplicationUnitsInfo': {'additionalProperties': False, - 'properties': {'units': {'items': {'$ref': '#/definitions/ApplicationUnitInfo'}, - 'type': 'array'}}, - 'required': ['units'], - 'type': 'object'}, - 'Value': {'additionalProperties': False, - 'properties': {'allocate-public-ip': {'type': 'boolean'}, - 'arch': {'type': 'string'}, - 'container': {'type': 'string'}, - 'cores': {'type': 'integer'}, - 'cpu-power': {'type': 'integer'}, - 'image-id': {'type': 'string'}, - 'instance-role': {'type': 'string'}, - 'instance-type': {'type': 'string'}, - 'mem': {'type': 'integer'}, - 'root-disk': {'type': 'integer'}, - 'root-disk-source': {'type': 'string'}, - 'spaces': {'items': {'type': 'string'}, - 'type': 'array'}, - 'tags': {'items': {'type': 'string'}, - 'type': 'array'}, - 'virt-type': {'type': 'string'}, - 'zones': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'type': 'object'}}, - 'properties': {'ApplicationCharmInfo': {'description': 'ApplicationCharmInfo ' - 'returns information ' - 'about an ' - "application's charm.", - 'properties': {'Params': {'$ref': '#/definitions/Entity'}, - 'Result': {'$ref': '#/definitions/Charm'}}, - 'type': 'object'}, - 'ApplicationsConfig': {'description': 'ApplicationsConfig ' - 'returns the config for ' - 'the specified ' - 'applications.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ApplicationGetConfigResults'}}, - 'type': 'object'}, - 'ApplicationsScale': {'description': 'ApplicationsScale ' - 'returns the scaling info ' - 'for specified ' - 'applications in this ' - 'model.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/IntResults'}}, - 'type': 'object'}, - 'ApplicationsTrust': {'description': 'ApplicationsTrust ' - 'returns the trust status ' - 'for specified ' - 'applications in this ' - 'model.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/BoolResults'}}, - 'type': 'object'}, - 'CharmInfo': {'description': 'CharmInfo returns information ' - 'about the requested charm.', - 'properties': {'Params': {'$ref': '#/definitions/CharmURL'}, - 'Result': {'$ref': '#/definitions/Charm'}}, - 'type': 'object'}, - 'ClearApplicationsResources': {'description': 'ClearApplicationsResources ' - 'clears the ' - 'flags which ' - 'indicate\n' - 'applications ' - 'still have ' - 'resources in ' - 'the cluster.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'DeploymentMode': {'description': 'DeploymentMode returns the ' - 'deployment mode of the ' - "given applications' charms.", - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/StringResults'}}, - 'type': 'object'}, - 'Life': {'description': 'Life returns the life status of every ' - 'supplied entity, where available.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/LifeResults'}}, - 'type': 'object'}, - 'ProvisioningInfo': {'description': 'ProvisioningInfo returns ' - 'the provisioning info for ' - 'specified applications in ' - 'this model.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/KubernetesProvisioningInfoResults'}}, - 'type': 'object'}, - 'SetOperatorStatus': {'description': 'SetOperatorStatus ' - 'updates the operator ' - 'status for each given ' - 'application.', - 'properties': {'Params': {'$ref': '#/definitions/SetStatus'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'UpdateApplicationsService': {'description': 'UpdateApplicationsService ' - 'updates the Juju ' - 'data model to ' - 'reflect the ' - 'given\n' - 'service details ' - 'of the specified ' - 'application.', - 'properties': {'Params': {'$ref': '#/definitions/UpdateApplicationServiceArgs'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'UpdateApplicationsUnits': {'description': 'UpdateApplicationsUnits ' - 'updates the Juju ' - 'data model to ' - 'reflect the given\n' - 'units of the ' - 'specified ' - 'application.', - 'properties': {'Params': {'$ref': '#/definitions/UpdateApplicationUnitArgs'}, - 'Result': {'$ref': '#/definitions/UpdateApplicationUnitResults'}}, - 'type': 'object'}, - 'Watch': {'description': 'Watch starts a NotifyWatcher for ' - 'each entity given.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/NotifyWatchResults'}}, - 'type': 'object'}, - 'WatchApplications': {'description': 'WatchApplications starts ' - 'a StringsWatcher to ' - 'watch applications\n' - 'deployed to this model.', - 'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}}, - 'type': 'object'}, - 'WatchApplicationsScale': {'description': 'WatchApplicationsScale ' - 'starts a ' - 'NotifyWatcher to ' - 'watch changes\n' - 'to the ' - "applications' " - 'scale.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/NotifyWatchResults'}}, - 'type': 'object'}, - 'WatchApplicationsTrustHash': {'description': 'WatchApplicationsTrustHash ' - 'starts a ' - 'StringsWatcher ' - 'to watch ' - 'changes\n' - 'to the ' - "applications' " - 'trust status.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/StringsWatchResults'}}, - 'type': 'object'}, - 'WatchPodSpec': {'description': 'WatchPodSpec starts a ' - 'NotifyWatcher to watch ' - 'changes to the\n' - 'pod spec for specified units ' - 'in this model.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/NotifyWatchResults'}}, - 'type': 'object'}}, - 'type': 'object'} - - - @ReturnMapping(Charm) - async def ApplicationCharmInfo(self, tag=None): - ''' - ApplicationCharmInfo returns information about an application's charm. - - tag : str - Returns -> Charm - ''' - if tag is not None and not isinstance(tag, (bytes, str)): - raise Exception("Expected tag to be a str, received: {}".format(type(tag))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='CAASUnitProvisioner', - request='ApplicationCharmInfo', - version=2, - params=_params) - _params['tag'] = tag - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ApplicationGetConfigResults) - async def ApplicationsConfig(self, entities=None): - ''' - ApplicationsConfig returns the config for the specified applications. - - entities : typing.Sequence[~Entity] - Returns -> ApplicationGetConfigResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='CAASUnitProvisioner', - request='ApplicationsConfig', - version=2, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(IntResults) - async def ApplicationsScale(self, entities=None): - ''' - ApplicationsScale returns the scaling info for specified applications in this model. - - entities : typing.Sequence[~Entity] - Returns -> IntResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='CAASUnitProvisioner', - request='ApplicationsScale', - version=2, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(BoolResults) - async def ApplicationsTrust(self, entities=None): - ''' - ApplicationsTrust returns the trust status for specified applications in this model. - - entities : typing.Sequence[~Entity] - Returns -> BoolResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='CAASUnitProvisioner', - request='ApplicationsTrust', - version=2, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(Charm) - async def CharmInfo(self, url=None): - ''' - CharmInfo returns information about the requested charm. - - url : str - Returns -> Charm - ''' - if url is not None and not isinstance(url, (bytes, str)): - raise Exception("Expected url to be a str, received: {}".format(type(url))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='CAASUnitProvisioner', - request='CharmInfo', - version=2, - params=_params) - _params['url'] = url - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def ClearApplicationsResources(self, entities=None): - ''' - ClearApplicationsResources clears the flags which indicate - applications still have resources in the cluster. - - entities : typing.Sequence[~Entity] - Returns -> ErrorResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='CAASUnitProvisioner', - request='ClearApplicationsResources', - version=2, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringResults) - async def DeploymentMode(self, entities=None): - ''' - DeploymentMode returns the deployment mode of the given applications' charms. - - entities : typing.Sequence[~Entity] - Returns -> StringResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='CAASUnitProvisioner', - request='DeploymentMode', - version=2, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(LifeResults) - async def Life(self, entities=None): - ''' - Life returns the life status of every supplied entity, where available. - - entities : typing.Sequence[~Entity] - Returns -> LifeResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='CAASUnitProvisioner', - request='Life', - version=2, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(KubernetesProvisioningInfoResults) - async def ProvisioningInfo(self, entities=None): - ''' - ProvisioningInfo returns the provisioning info for specified applications in this model. - - entities : typing.Sequence[~Entity] - Returns -> KubernetesProvisioningInfoResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='CAASUnitProvisioner', - request='ProvisioningInfo', - version=2, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def SetOperatorStatus(self, entities=None): - ''' - SetOperatorStatus updates the operator status for each given application. - - entities : typing.Sequence[~EntityStatusArgs] - Returns -> ErrorResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='CAASUnitProvisioner', - request='SetOperatorStatus', - version=2, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def UpdateApplicationsService(self, args=None): - ''' - UpdateApplicationsService updates the Juju data model to reflect the given - service details of the specified application. - - args : typing.Sequence[~UpdateApplicationServiceArg] - Returns -> ErrorResults - ''' - if args is not None and not isinstance(args, (bytes, str, list)): - raise Exception("Expected args to be a Sequence, received: {}".format(type(args))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='CAASUnitProvisioner', - request='UpdateApplicationsService', - version=2, - params=_params) - _params['args'] = args - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(UpdateApplicationUnitResults) - async def UpdateApplicationsUnits(self, args=None): - ''' - UpdateApplicationsUnits updates the Juju data model to reflect the given - units of the specified application. - - args : typing.Sequence[~UpdateApplicationUnits] - Returns -> UpdateApplicationUnitResults - ''' - if args is not None and not isinstance(args, (bytes, str, list)): - raise Exception("Expected args to be a Sequence, received: {}".format(type(args))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='CAASUnitProvisioner', - request='UpdateApplicationsUnits', - version=2, - params=_params) - _params['args'] = args - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(NotifyWatchResults) - async def Watch(self, entities=None): - ''' - Watch starts a NotifyWatcher for each entity given. - - entities : typing.Sequence[~Entity] - Returns -> NotifyWatchResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='CAASUnitProvisioner', - request='Watch', - version=2, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringsWatchResult) - async def WatchApplications(self): - ''' - WatchApplications starts a StringsWatcher to watch applications - deployed to this model. - - - Returns -> StringsWatchResult - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='CAASUnitProvisioner', - request='WatchApplications', - version=2, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(NotifyWatchResults) - async def WatchApplicationsScale(self, entities=None): - ''' - WatchApplicationsScale starts a NotifyWatcher to watch changes - to the applications' scale. - - entities : typing.Sequence[~Entity] - Returns -> NotifyWatchResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='CAASUnitProvisioner', - request='WatchApplicationsScale', - version=2, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringsWatchResults) - async def WatchApplicationsTrustHash(self, entities=None): - ''' - WatchApplicationsTrustHash starts a StringsWatcher to watch changes - to the applications' trust status. - - entities : typing.Sequence[~Entity] - Returns -> StringsWatchResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='CAASUnitProvisioner', - request='WatchApplicationsTrustHash', - version=2, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(NotifyWatchResults) - async def WatchPodSpec(self, entities=None): - ''' - WatchPodSpec starts a NotifyWatcher to watch changes to the - pod spec for specified units in this model. - - entities : typing.Sequence[~Entity] - Returns -> NotifyWatchResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='CAASUnitProvisioner', - request='WatchPodSpec', - version=2, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - -class CharmRevisionUpdaterFacade(Type): - name = 'CharmRevisionUpdater' - version = 2 - schema = {'definitions': {'Error': {'additionalProperties': False, - 'properties': {'code': {'type': 'string'}, - 'info': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'message': {'type': 'string'}}, - 'required': ['message', 'code'], - 'type': 'object'}, - 'ErrorResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}}, - 'type': 'object'}}, - 'properties': {'UpdateLatestRevisions': {'description': 'UpdateLatestRevisions ' - 'retrieves the latest ' - 'revision information ' - 'from the charm store ' - 'for all deployed ' - 'charms\n' - 'and records this ' - 'information in ' - 'state.', - 'properties': {'Result': {'$ref': '#/definitions/ErrorResult'}}, - 'type': 'object'}}, - 'type': 'object'} - - - @ReturnMapping(ErrorResult) - async def UpdateLatestRevisions(self): - ''' - UpdateLatestRevisions retrieves the latest revision information from the charm store for all deployed charms - and records this information in state. - - - Returns -> ErrorResult - ''' - - # 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 CleanerFacade(Type): - name = 'Cleaner' - version = 2 - schema = {'definitions': {'Error': {'additionalProperties': False, - 'properties': {'code': {'type': 'string'}, - 'info': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'message': {'type': 'string'}}, - 'required': ['message', 'code'], - 'type': 'object'}, - 'NotifyWatchResult': {'additionalProperties': False, - 'properties': {'NotifyWatcherId': {'type': 'string'}, - 'error': {'$ref': '#/definitions/Error'}}, - 'required': ['NotifyWatcherId'], - 'type': 'object'}}, - 'properties': {'Cleanup': {'description': 'Cleanup triggers a state cleanup', - 'type': 'object'}, - 'WatchCleanups': {'description': 'WatchCleanups watches for ' - 'cleanups to be performed in ' - 'state.', - 'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}}, - 'type': 'object'}}, - 'type': 'object'} - - - @ReturnMapping(None) - async def Cleanup(self): - ''' - Cleanup triggers a state cleanup - - - 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): - ''' - WatchCleanups watches for cleanups to be performed in state. - - - Returns -> NotifyWatchResult - ''' - - # 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 CredentialValidatorFacade(Type): - name = 'CredentialValidator' - version = 2 - schema = {'definitions': {'Entity': {'additionalProperties': False, - 'properties': {'tag': {'type': 'string'}}, - 'required': ['tag'], - 'type': 'object'}, - 'Error': {'additionalProperties': False, - 'properties': {'code': {'type': 'string'}, - 'info': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'message': {'type': 'string'}}, - 'required': ['message', 'code'], - 'type': 'object'}, - 'ErrorResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}}, - 'type': 'object'}, - 'InvalidateCredentialArg': {'additionalProperties': False, - 'properties': {'reason': {'type': 'string'}}, - 'type': 'object'}, - 'ModelCredential': {'additionalProperties': False, - 'properties': {'credential-tag': {'type': 'string'}, - 'exists': {'type': 'boolean'}, - 'model-tag': {'type': 'string'}, - 'valid': {'type': 'boolean'}}, - 'required': ['model-tag', - 'credential-tag'], - 'type': 'object'}, - 'NotifyWatchResult': {'additionalProperties': False, - 'properties': {'NotifyWatcherId': {'type': 'string'}, - 'error': {'$ref': '#/definitions/Error'}}, - 'required': ['NotifyWatcherId'], - 'type': 'object'}}, - 'properties': {'InvalidateModelCredential': {'description': 'InvalidateModelCredential ' - 'marks the cloud ' - 'credential for ' - 'this model as ' - 'invalid.', - 'properties': {'Params': {'$ref': '#/definitions/InvalidateCredentialArg'}, - 'Result': {'$ref': '#/definitions/ErrorResult'}}, - 'type': 'object'}, - 'ModelCredential': {'description': 'ModelCredential returns ' - 'cloud credential ' - 'information for a model.', - 'properties': {'Result': {'$ref': '#/definitions/ModelCredential'}}, - 'type': 'object'}, - 'WatchCredential': {'description': 'WatchCredential returns a ' - 'NotifyWatcher that ' - 'observes\n' - 'changes to a given cloud ' - 'credential.', - 'properties': {'Params': {'$ref': '#/definitions/Entity'}, - 'Result': {'$ref': '#/definitions/NotifyWatchResult'}}, - 'type': 'object'}, - 'WatchModelCredential': {'description': 'WatchModelCredential ' - 'returns a ' - 'NotifyWatcher that ' - 'watches what cloud ' - 'credential a model ' - 'uses.', - 'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}}, - 'type': 'object'}}, - 'type': 'object'} - - - @ReturnMapping(ErrorResult) - async def InvalidateModelCredential(self, reason=None): - ''' - InvalidateModelCredential marks the cloud credential for this model as invalid. - - reason : str - Returns -> ErrorResult - ''' - if reason is not None and not isinstance(reason, (bytes, str)): - raise Exception("Expected reason to be a str, received: {}".format(type(reason))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='CredentialValidator', - request='InvalidateModelCredential', - version=2, - params=_params) - _params['reason'] = reason - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ModelCredential) - async def ModelCredential(self): - ''' - ModelCredential returns cloud credential information for a model. - - - Returns -> ModelCredential - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='CredentialValidator', - request='ModelCredential', - version=2, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(NotifyWatchResult) - async def WatchCredential(self, tag=None): - ''' - WatchCredential returns a NotifyWatcher that observes - changes to a given cloud credential. - - tag : str - Returns -> NotifyWatchResult - ''' - if tag is not None and not isinstance(tag, (bytes, str)): - raise Exception("Expected tag to be a str, received: {}".format(type(tag))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='CredentialValidator', - request='WatchCredential', - version=2, - params=_params) - _params['tag'] = tag - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(NotifyWatchResult) - async def WatchModelCredential(self): - ''' - WatchModelCredential returns a NotifyWatcher that watches what cloud credential a model uses. - - - Returns -> NotifyWatchResult - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='CredentialValidator', - request='WatchModelCredential', - version=2, - params=_params) - - reply = await self.rpc(msg) - return reply - - - -class CrossModelRelationsFacade(Type): - name = 'CrossModelRelations' - version = 2 - schema = {'definitions': {'EntityStatus': {'additionalProperties': False, - 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'info': {'type': 'string'}, - 'since': {'format': 'date-time', - 'type': 'string'}, - 'status': {'type': 'string'}}, - 'required': ['status', 'info', 'since'], - 'type': 'object'}, - 'Error': {'additionalProperties': False, - 'properties': {'code': {'type': 'string'}, - 'info': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'message': {'type': 'string'}}, - 'required': ['message', 'code'], - 'type': 'object'}, - 'ErrorResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}}, - 'type': 'object'}, - 'ErrorResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'IngressNetworksChangeEvent': {'additionalProperties': False, - 'properties': {'bakery-version': {'type': 'integer'}, - 'ingress-required': {'type': 'boolean'}, - 'macaroons': {'items': {'$ref': '#/definitions/Macaroon'}, - 'type': 'array'}, - 'networks': {'items': {'type': 'string'}, - 'type': 'array'}, - 'relation-token': {'type': 'string'}}, - 'required': ['relation-token', - 'ingress-required'], - 'type': 'object'}, - 'IngressNetworksChanges': {'additionalProperties': False, - 'properties': {'changes': {'items': {'$ref': '#/definitions/IngressNetworksChangeEvent'}, - 'type': 'array'}}, - 'type': 'object'}, - 'Macaroon': {'additionalProperties': False, 'type': 'object'}, - 'OfferArg': {'additionalProperties': False, - 'properties': {'bakery-version': {'type': 'integer'}, - 'macaroons': {'items': {'$ref': '#/definitions/Macaroon'}, - 'type': 'array'}, - 'offer-uuid': {'type': 'string'}}, - 'required': ['offer-uuid'], - 'type': 'object'}, - 'OfferArgs': {'additionalProperties': False, - 'properties': {'args': {'items': {'$ref': '#/definitions/OfferArg'}, - 'type': 'array'}}, - 'required': ['args'], - 'type': 'object'}, - 'OfferStatusChange': {'additionalProperties': False, - 'properties': {'offer-name': {'type': 'string'}, - 'status': {'$ref': '#/definitions/EntityStatus'}}, - 'required': ['offer-name', 'status'], - 'type': 'object'}, - 'OfferStatusWatchResult': {'additionalProperties': False, - 'properties': {'changes': {'items': {'$ref': '#/definitions/OfferStatusChange'}, - 'type': 'array'}, - 'error': {'$ref': '#/definitions/Error'}, - 'watcher-id': {'type': 'string'}}, - 'required': ['watcher-id', - 'changes'], - 'type': 'object'}, - 'OfferStatusWatchResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/OfferStatusWatchResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'RegisterRemoteRelationArg': {'additionalProperties': False, - 'properties': {'application-token': {'type': 'string'}, - 'bakery-version': {'type': 'integer'}, - 'consume-version': {'type': 'integer'}, - 'local-endpoint-name': {'type': 'string'}, - 'macaroons': {'items': {'$ref': '#/definitions/Macaroon'}, - 'type': 'array'}, - 'offer-uuid': {'type': 'string'}, - 'relation-token': {'type': 'string'}, - 'remote-endpoint': {'$ref': '#/definitions/RemoteEndpoint'}, - 'remote-space': {'$ref': '#/definitions/RemoteSpace'}, - 'source-model-tag': {'type': 'string'}}, - 'required': ['application-token', - 'source-model-tag', - 'relation-token', - 'remote-endpoint', - 'remote-space', - 'offer-uuid', - 'local-endpoint-name'], - 'type': 'object'}, - 'RegisterRemoteRelationArgs': {'additionalProperties': False, - 'properties': {'relations': {'items': {'$ref': '#/definitions/RegisterRemoteRelationArg'}, - 'type': 'array'}}, - 'required': ['relations'], - 'type': 'object'}, - 'RegisterRemoteRelationResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'result': {'$ref': '#/definitions/RemoteRelationDetails'}}, - 'type': 'object'}, - 'RegisterRemoteRelationResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/RegisterRemoteRelationResult'}, - 'type': 'array'}}, - 'type': 'object'}, - 'RelationLifeSuspendedStatusChange': {'additionalProperties': False, - 'properties': {'key': {'type': 'string'}, - 'life': {'type': 'string'}, - 'suspended': {'type': 'boolean'}, - 'suspended-reason': {'type': 'string'}}, - 'required': ['key', - 'life', - 'suspended', - 'suspended-reason'], - 'type': 'object'}, - 'RelationLifeSuspendedStatusWatchResult': {'additionalProperties': False, - 'properties': {'changes': {'items': {'$ref': '#/definitions/RelationLifeSuspendedStatusChange'}, - 'type': 'array'}, - 'error': {'$ref': '#/definitions/Error'}, - 'watcher-id': {'type': 'string'}}, - 'required': ['watcher-id', - 'changes'], - 'type': 'object'}, - 'RelationStatusWatchResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/RelationLifeSuspendedStatusWatchResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'RemoteEndpoint': {'additionalProperties': False, - 'properties': {'interface': {'type': 'string'}, - 'limit': {'type': 'integer'}, - 'name': {'type': 'string'}, - 'role': {'type': 'string'}}, - 'required': ['name', - 'role', - 'interface', - 'limit'], - 'type': 'object'}, - 'RemoteEntityArg': {'additionalProperties': False, - 'properties': {'bakery-version': {'type': 'integer'}, - 'macaroons': {'items': {'$ref': '#/definitions/Macaroon'}, - 'type': 'array'}, - 'relation-token': {'type': 'string'}}, - 'required': ['relation-token'], - 'type': 'object'}, - 'RemoteEntityArgs': {'additionalProperties': False, - 'properties': {'args': {'items': {'$ref': '#/definitions/RemoteEntityArg'}, - 'type': 'array'}}, - 'required': ['args'], - 'type': 'object'}, - 'RemoteRelationChangeEvent': {'additionalProperties': False, - 'properties': {'application-settings': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'application-token': {'type': 'string'}, - 'bakery-version': {'type': 'integer'}, - 'changed-units': {'items': {'$ref': '#/definitions/RemoteRelationUnitChange'}, - 'type': 'array'}, - 'departed-units': {'items': {'type': 'integer'}, - 'type': 'array'}, - 'force-cleanup': {'type': 'boolean'}, - 'life': {'type': 'string'}, - 'macaroons': {'items': {'$ref': '#/definitions/Macaroon'}, - 'type': 'array'}, - 'relation-token': {'type': 'string'}, - 'suspended': {'type': 'boolean'}, - 'suspended-reason': {'type': 'string'}, - 'unit-count': {'type': 'integer'}}, - 'required': ['relation-token', - 'application-token', - 'life', - 'unit-count'], - 'type': 'object'}, - 'RemoteRelationDetails': {'additionalProperties': False, - 'properties': {'bakery-version': {'type': 'integer'}, - 'macaroon': {'$ref': '#/definitions/Macaroon'}, - 'relation-token': {'type': 'string'}}, - 'required': ['relation-token'], - 'type': 'object'}, - 'RemoteRelationUnitChange': {'additionalProperties': False, - 'properties': {'settings': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'unit-id': {'type': 'integer'}}, - 'required': ['unit-id'], - 'type': 'object'}, - 'RemoteRelationWatchResult': {'additionalProperties': False, - 'properties': {'changes': {'$ref': '#/definitions/RemoteRelationChangeEvent'}, - 'error': {'$ref': '#/definitions/Error'}, - 'watcher-id': {'type': 'string'}}, - 'required': ['watcher-id', - 'changes'], - 'type': 'object'}, - 'RemoteRelationWatchResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/RemoteRelationWatchResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'RemoteRelationsChanges': {'additionalProperties': False, - 'properties': {'changes': {'items': {'$ref': '#/definitions/RemoteRelationChangeEvent'}, - 'type': 'array'}}, - 'type': 'object'}, - 'RemoteSpace': {'additionalProperties': False, - 'properties': {'cloud-type': {'type': 'string'}, - 'name': {'type': 'string'}, - 'provider-attributes': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'provider-id': {'type': 'string'}, - 'subnets': {'items': {'$ref': '#/definitions/Subnet'}, - 'type': 'array'}}, - 'required': ['cloud-type', - 'name', - 'provider-id', - 'provider-attributes', - 'subnets'], - 'type': 'object'}, - 'SecretRevisionChange': {'additionalProperties': False, - 'properties': {'revision': {'type': 'integer'}, - 'uri': {'type': 'string'}}, - 'required': ['uri', 'revision'], - 'type': 'object'}, - 'SecretRevisionWatchResult': {'additionalProperties': False, - 'properties': {'changes': {'items': {'$ref': '#/definitions/SecretRevisionChange'}, - 'type': 'array'}, - 'error': {'$ref': '#/definitions/Error'}, - 'watcher-id': {'type': 'string'}}, - 'required': ['watcher-id', - 'changes'], - 'type': 'object'}, - 'SecretRevisionWatchResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/SecretRevisionWatchResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'StringsWatchResult': {'additionalProperties': False, - 'properties': {'changes': {'items': {'type': 'string'}, - 'type': 'array'}, - 'error': {'$ref': '#/definitions/Error'}, - 'watcher-id': {'type': 'string'}}, - 'required': ['watcher-id'], - 'type': 'object'}, - 'StringsWatchResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'Subnet': {'additionalProperties': False, - 'properties': {'cidr': {'type': 'string'}, - 'life': {'type': 'string'}, - 'provider-id': {'type': 'string'}, - 'provider-network-id': {'type': 'string'}, - 'provider-space-id': {'type': 'string'}, - 'space-tag': {'type': 'string'}, - 'status': {'type': 'string'}, - 'vlan-tag': {'type': 'integer'}, - 'zones': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'required': ['cidr', - 'vlan-tag', - 'life', - 'space-tag', - 'zones'], - 'type': 'object'}, - 'WatchRemoteSecretChangesArg': {'additionalProperties': False, - 'properties': {'application-token': {'type': 'string'}, - 'bakery-version': {'type': 'integer'}, - 'macaroons': {'items': {'$ref': '#/definitions/Macaroon'}, - 'type': 'array'}, - 'relation-token': {'type': 'string'}}, - 'required': ['application-token', - 'relation-token'], - 'type': 'object'}, - 'WatchRemoteSecretChangesArgs': {'additionalProperties': False, - 'properties': {'relations': {'items': {'$ref': '#/definitions/WatchRemoteSecretChangesArg'}, - 'type': 'array'}}, - 'required': ['relations'], - 'type': 'object'}}, - 'properties': {'PublishIngressNetworkChanges': {'description': 'PublishIngressNetworkChanges ' - 'publishes ' - 'changes to ' - 'the required\n' - 'ingress ' - 'addresses to ' - 'the model ' - 'hosting the ' - 'offer in the ' - 'relation.', - 'properties': {'Params': {'$ref': '#/definitions/IngressNetworksChanges'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'PublishRelationChanges': {'description': 'PublishRelationChanges ' - 'publishes relation ' - 'changes to the\n' - 'model hosting the ' - 'remote application ' - 'involved in the ' - 'relation.', - 'properties': {'Params': {'$ref': '#/definitions/RemoteRelationsChanges'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'RegisterRemoteRelations': {'description': 'RegisterRemoteRelations ' - 'sets up the model ' - 'to participate\n' - 'in the specified ' - 'relations. This ' - 'operation is ' - 'idempotent.', - 'properties': {'Params': {'$ref': '#/definitions/RegisterRemoteRelationArgs'}, - 'Result': {'$ref': '#/definitions/RegisterRemoteRelationResults'}}, - 'type': 'object'}, - 'WatchConsumedSecretsChanges': {'description': 'WatchConsumedSecretsChanges ' - 'returns a ' - 'watcher which ' - 'notifies of ' - 'changes to any ' - 'secrets\n' - 'for the ' - 'specified ' - 'remote ' - 'consumers.', - 'properties': {'Params': {'$ref': '#/definitions/WatchRemoteSecretChangesArgs'}, - 'Result': {'$ref': '#/definitions/SecretRevisionWatchResults'}}, - 'type': 'object'}, - 'WatchEgressAddressesForRelations': {'description': 'WatchEgressAddressesForRelations ' - 'creates a ' - 'watcher ' - 'that ' - 'notifies ' - 'when ' - 'addresses, ' - 'from ' - 'which\n' - 'connections ' - 'will ' - 'originate ' - 'for the ' - 'relation, ' - 'change.\n' - 'Each ' - 'event ' - 'contains ' - 'the ' - 'entire ' - 'set of ' - 'addresses ' - 'which are ' - 'required ' - 'for ' - 'ingress ' - 'for the ' - 'relation.', - 'properties': {'Params': {'$ref': '#/definitions/RemoteEntityArgs'}, - 'Result': {'$ref': '#/definitions/StringsWatchResults'}}, - 'type': 'object'}, - 'WatchOfferStatus': {'description': 'WatchOfferStatus starts ' - 'an OfferStatusWatcher ' - 'for\n' - 'watching the status of an ' - 'offer.', - 'properties': {'Params': {'$ref': '#/definitions/OfferArgs'}, - 'Result': {'$ref': '#/definitions/OfferStatusWatchResults'}}, - 'type': 'object'}, - 'WatchRelationChanges': {'description': 'WatchRelationChanges ' - 'starts a ' - 'RemoteRelationChangesWatcher ' - 'for each\n' - 'specified relation, ' - 'returning the watcher ' - 'IDs and initial ' - 'values,\n' - 'or an error if the ' - 'remote relations ' - "couldn't be watched.", - 'properties': {'Params': {'$ref': '#/definitions/RemoteEntityArgs'}, - 'Result': {'$ref': '#/definitions/RemoteRelationWatchResults'}}, - 'type': 'object'}, - 'WatchRelationsSuspendedStatus': {'description': 'WatchRelationsSuspendedStatus ' - 'starts a ' - 'RelationStatusWatcher ' - 'for\n' - 'watching the ' - 'life and ' - 'suspended ' - 'status of a ' - 'relation.', - 'properties': {'Params': {'$ref': '#/definitions/RemoteEntityArgs'}, - 'Result': {'$ref': '#/definitions/RelationStatusWatchResults'}}, - 'type': 'object'}}, - 'type': 'object'} - - - @ReturnMapping(ErrorResults) - async def PublishIngressNetworkChanges(self, changes=None): - ''' - PublishIngressNetworkChanges publishes changes to the required - ingress addresses to the model hosting the offer in the relation. - - changes : typing.Sequence[~IngressNetworksChangeEvent] - Returns -> ErrorResults - ''' - if changes is not None and not isinstance(changes, (bytes, str, list)): - raise Exception("Expected changes to be a Sequence, received: {}".format(type(changes))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='CrossModelRelations', - request='PublishIngressNetworkChanges', - version=2, - params=_params) - _params['changes'] = changes - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def PublishRelationChanges(self, changes=None): - ''' - PublishRelationChanges publishes relation changes to the - model hosting the remote application involved in the relation. - - changes : typing.Sequence[~RemoteRelationChangeEvent] - Returns -> ErrorResults - ''' - if changes is not None and not isinstance(changes, (bytes, str, list)): - raise Exception("Expected changes to be a Sequence, received: {}".format(type(changes))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='CrossModelRelations', - request='PublishRelationChanges', - version=2, - params=_params) - _params['changes'] = changes - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(RegisterRemoteRelationResults) - async def RegisterRemoteRelations(self, relations=None): - ''' - RegisterRemoteRelations sets up the model to participate - in the specified relations. This operation is idempotent. - - relations : typing.Sequence[~RegisterRemoteRelationArg] - Returns -> RegisterRemoteRelationResults - ''' - if relations is not None and not isinstance(relations, (bytes, str, list)): - raise Exception("Expected relations to be a Sequence, received: {}".format(type(relations))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='CrossModelRelations', - request='RegisterRemoteRelations', - version=2, - params=_params) - _params['relations'] = relations - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(SecretRevisionWatchResults) - async def WatchConsumedSecretsChanges(self, relations=None): - ''' - WatchConsumedSecretsChanges returns a watcher which notifies of changes to any secrets - for the specified remote consumers. - - relations : typing.Sequence[~WatchRemoteSecretChangesArg] - Returns -> SecretRevisionWatchResults - ''' - if relations is not None and not isinstance(relations, (bytes, str, list)): - raise Exception("Expected relations to be a Sequence, received: {}".format(type(relations))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='CrossModelRelations', - request='WatchConsumedSecretsChanges', - version=2, - params=_params) - _params['relations'] = relations - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringsWatchResults) - async def WatchEgressAddressesForRelations(self, args=None): - ''' - WatchEgressAddressesForRelations creates a watcher that notifies when addresses, from which - connections will originate for the relation, change. - Each event contains the entire set of addresses which are required for ingress for the relation. - - args : typing.Sequence[~RemoteEntityArg] - Returns -> StringsWatchResults - ''' - if args is not None and not isinstance(args, (bytes, str, list)): - raise Exception("Expected args to be a Sequence, received: {}".format(type(args))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='CrossModelRelations', - request='WatchEgressAddressesForRelations', - version=2, - params=_params) - _params['args'] = args - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(OfferStatusWatchResults) - async def WatchOfferStatus(self, args=None): - ''' - WatchOfferStatus starts an OfferStatusWatcher for - watching the status of an offer. - - args : typing.Sequence[~OfferArg] - Returns -> OfferStatusWatchResults - ''' - if args is not None and not isinstance(args, (bytes, str, list)): - raise Exception("Expected args to be a Sequence, received: {}".format(type(args))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='CrossModelRelations', - request='WatchOfferStatus', - version=2, - params=_params) - _params['args'] = args - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(RemoteRelationWatchResults) - async def WatchRelationChanges(self, args=None): - ''' - WatchRelationChanges starts a RemoteRelationChangesWatcher for each - specified relation, returning the watcher IDs and initial values, - or an error if the remote relations couldn't be watched. - - args : typing.Sequence[~RemoteEntityArg] - Returns -> RemoteRelationWatchResults - ''' - if args is not None and not isinstance(args, (bytes, str, list)): - raise Exception("Expected args to be a Sequence, received: {}".format(type(args))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='CrossModelRelations', - request='WatchRelationChanges', - version=2, - params=_params) - _params['args'] = args - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(RelationStatusWatchResults) - async def WatchRelationsSuspendedStatus(self, args=None): - ''' - WatchRelationsSuspendedStatus starts a RelationStatusWatcher for - watching the life and suspended status of a relation. - - args : typing.Sequence[~RemoteEntityArg] - Returns -> RelationStatusWatchResults - ''' - if args is not None and not isinstance(args, (bytes, str, list)): - raise Exception("Expected args to be a Sequence, received: {}".format(type(args))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='CrossModelRelations', - request='WatchRelationsSuspendedStatus', - version=2, - params=_params) - _params['args'] = args - reply = await self.rpc(msg) - return reply - - - -class DiskManagerFacade(Type): - name = 'DiskManager' - version = 2 - schema = {'definitions': {'BlockDevice': {'additionalProperties': False, - 'properties': {'BusAddress': {'type': 'string'}, - 'DeviceLinks': {'items': {'type': 'string'}, - 'type': 'array'}, - 'DeviceName': {'type': 'string'}, - 'FilesystemType': {'type': 'string'}, - 'HardwareId': {'type': 'string'}, - 'InUse': {'type': 'boolean'}, - 'Label': {'type': 'string'}, - 'MountPoint': {'type': 'string'}, - 'SerialId': {'type': 'string'}, - 'Size': {'type': 'integer'}, - 'UUID': {'type': 'string'}, - 'WWN': {'type': 'string'}}, - 'required': ['DeviceName', - 'DeviceLinks', - 'Label', - 'UUID', - 'HardwareId', - 'WWN', - 'BusAddress', - 'Size', - 'FilesystemType', - 'InUse', - 'MountPoint', - 'SerialId'], - 'type': 'object'}, - 'Error': {'additionalProperties': False, - 'properties': {'code': {'type': 'string'}, - 'info': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'message': {'type': 'string'}}, - 'required': ['message', 'code'], - 'type': 'object'}, - 'ErrorResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}}, - 'type': 'object'}, - 'ErrorResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'MachineBlockDevices': {'additionalProperties': False, - 'properties': {'block-devices': {'items': {'$ref': '#/definitions/BlockDevice'}, - 'type': 'array'}, - 'machine': {'type': 'string'}}, - 'required': ['machine'], - 'type': 'object'}, - 'SetMachineBlockDevices': {'additionalProperties': False, - 'properties': {'machine-block-devices': {'items': {'$ref': '#/definitions/MachineBlockDevices'}, - 'type': 'array'}}, - 'required': ['machine-block-devices'], - 'type': 'object'}}, - 'properties': {'SetMachineBlockDevices': {'properties': {'Params': {'$ref': '#/definitions/SetMachineBlockDevices'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}}, - 'type': 'object'} - - - @ReturnMapping(ErrorResults) - async def SetMachineBlockDevices(self, machine_block_devices=None): - ''' - machine_block_devices : typing.Sequence[~MachineBlockDevices] - Returns -> ErrorResults - ''' - if machine_block_devices is not None and not isinstance(machine_block_devices, (bytes, str, list)): - raise Exception("Expected machine_block_devices to be a Sequence, received: {}".format(type(machine_block_devices))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='DiskManager', - request='SetMachineBlockDevices', - version=2, - params=_params) - _params['machine-block-devices'] = machine_block_devices - reply = await self.rpc(msg) - return reply - - - -class EntityWatcherFacade(Type): - name = 'EntityWatcher' - version = 2 - schema = {'definitions': {'EntitiesWatchResult': {'additionalProperties': False, - 'properties': {'changes': {'items': {'type': 'string'}, - 'type': 'array'}, - 'error': {'$ref': '#/definitions/Error'}, - 'watcher-id': {'type': 'string'}}, - 'required': ['watcher-id'], - 'type': 'object'}, - 'Error': {'additionalProperties': False, - 'properties': {'code': {'type': 'string'}, - 'info': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'message': {'type': 'string'}}, - 'required': ['message', 'code'], - 'type': 'object'}}, - 'properties': {'Next': {'description': 'Next returns when a change has ' - 'occurred to an entity of the\n' - 'collection being watched since the ' - 'most recent call to Next\n' - 'or the Watch call that created the ' - 'srvEntitiesWatcher.', - 'properties': {'Result': {'$ref': '#/definitions/EntitiesWatchResult'}}, - 'type': 'object'}, - 'Stop': {'description': 'Stop stops the watcher.', - 'type': 'object'}}, - 'type': 'object'} - - - @ReturnMapping(EntitiesWatchResult) - async def Next(self): - ''' - Next returns when a change has occurred to an entity of the - collection being watched since the most recent call to Next - or the Watch call that created the srvEntitiesWatcher. - - - Returns -> EntitiesWatchResult - ''' - - # 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): - ''' - Stop stops the watcher. - - - 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 - - - - async def rpc(self, msg): - ''' - Patch rpc method to add Id. - ''' - if not hasattr(self, 'Id'): - raise RuntimeError('Missing "Id" field') - msg['Id'] = id - - from .facade import TypeEncoder - reply = await self.connection.rpc(msg, encoder=TypeEncoder) - return reply - - - -class FilesystemAttachmentsWatcherFacade(Type): - name = 'FilesystemAttachmentsWatcher' - version = 2 - schema = {'definitions': {'Error': {'additionalProperties': False, - 'properties': {'code': {'type': 'string'}, - 'info': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'message': {'type': 'string'}}, - 'required': ['message', 'code'], - 'type': 'object'}, - 'MachineStorageId': {'additionalProperties': False, - 'properties': {'attachment-tag': {'type': 'string'}, - 'machine-tag': {'type': 'string'}}, - 'required': ['machine-tag', - 'attachment-tag'], - 'type': 'object'}, - 'MachineStorageIdsWatchResult': {'additionalProperties': False, - 'properties': {'changes': {'items': {'$ref': '#/definitions/MachineStorageId'}, - 'type': 'array'}, - 'error': {'$ref': '#/definitions/Error'}, - 'watcher-id': {'type': 'string'}}, - 'required': ['watcher-id', - 'changes'], - 'type': 'object'}}, - 'properties': {'Next': {'description': 'Next returns when a change has ' - 'occurred to an entity of the\n' - 'collection being watched since the ' - 'most recent call to Next\n' - 'or the Watch call that created the ' - 'srvMachineStorageIdsWatcher.', - 'properties': {'Result': {'$ref': '#/definitions/MachineStorageIdsWatchResult'}}, - 'type': 'object'}, - 'Stop': {'description': 'Stop stops the watcher.', - 'type': 'object'}}, - 'type': 'object'} - - - @ReturnMapping(MachineStorageIdsWatchResult) - async def Next(self): - ''' - Next returns when a change has occurred to an entity of the - collection being watched since the most recent call to Next - or the Watch call that created the srvMachineStorageIdsWatcher. - - - Returns -> MachineStorageIdsWatchResult - ''' - - # 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): - ''' - Stop stops the watcher. - - - 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 - - - - async def rpc(self, msg): - ''' - Patch rpc method to add Id. - ''' - if not hasattr(self, 'Id'): - raise RuntimeError('Missing "Id" field') - msg['Id'] = id - - from .facade import TypeEncoder - reply = await self.connection.rpc(msg, encoder=TypeEncoder) - return reply - - - -class HighAvailabilityFacade(Type): - name = 'HighAvailability' - version = 2 - schema = {'definitions': {'ControllersChangeResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'result': {'$ref': '#/definitions/ControllersChanges'}}, - 'required': ['result'], - 'type': 'object'}, - 'ControllersChangeResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/ControllersChangeResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'ControllersChanges': {'additionalProperties': False, - 'properties': {'added': {'items': {'type': 'string'}, - 'type': 'array'}, - 'converted': {'items': {'type': 'string'}, - 'type': 'array'}, - 'maintained': {'items': {'type': 'string'}, - 'type': 'array'}, - 'removed': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'type': 'object'}, - 'ControllersSpec': {'additionalProperties': False, - 'properties': {'constraints': {'$ref': '#/definitions/Value'}, - 'num-controllers': {'type': 'integer'}, - 'placement': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'required': ['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': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'message': {'type': 'string'}}, - 'required': ['message', 'code'], - 'type': 'object'}, - 'Value': {'additionalProperties': False, - 'properties': {'allocate-public-ip': {'type': 'boolean'}, - 'arch': {'type': 'string'}, - 'container': {'type': 'string'}, - 'cores': {'type': 'integer'}, - 'cpu-power': {'type': 'integer'}, - 'image-id': {'type': 'string'}, - 'instance-role': {'type': 'string'}, - 'instance-type': {'type': 'string'}, - 'mem': {'type': 'integer'}, - 'root-disk': {'type': 'integer'}, - 'root-disk-source': {'type': 'string'}, - 'spaces': {'items': {'type': 'string'}, - 'type': 'array'}, - 'tags': {'items': {'type': 'string'}, - 'type': 'array'}, - 'virt-type': {'type': 'string'}, - 'zones': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'type': 'object'}}, - 'properties': {'EnableHA': {'description': 'EnableHA adds controller machines ' - 'as necessary to ensure the\n' - 'controller has the number of ' - 'machines specified.', - 'properties': {'Params': {'$ref': '#/definitions/ControllersSpecs'}, - 'Result': {'$ref': '#/definitions/ControllersChangeResults'}}, - 'type': 'object'}}, - 'type': 'object'} - - - @ReturnMapping(ControllersChangeResults) - async def EnableHA(self, specs=None): - ''' - EnableHA adds controller machines as necessary to ensure the - controller has the number of machines specified. - - specs : typing.Sequence[~ControllersSpec] - Returns -> ControllersChangeResults - ''' - if specs is not None and not isinstance(specs, (bytes, str, list)): - raise Exception("Expected specs to be a Sequence, received: {}".format(type(specs))) - - # 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 - - - -class LeadershipServiceFacade(Type): - name = 'LeadershipService' - version = 2 - schema = {'definitions': {'ApplicationTag': {'additionalProperties': False, - 'properties': {'Name': {'type': 'string'}}, - 'required': ['Name'], - 'type': 'object'}, - 'ClaimLeadershipBulkParams': {'additionalProperties': False, - 'properties': {'params': {'items': {'$ref': '#/definitions/ClaimLeadershipParams'}, - 'type': 'array'}}, - 'required': ['params'], - 'type': 'object'}, - 'ClaimLeadershipBulkResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'ClaimLeadershipParams': {'additionalProperties': False, - 'properties': {'application-tag': {'type': 'string'}, - 'duration': {'type': 'number'}, - 'unit-tag': {'type': 'string'}}, - 'required': ['application-tag', - 'unit-tag', - 'duration'], - 'type': 'object'}, - 'Error': {'additionalProperties': False, - 'properties': {'code': {'type': 'string'}, - 'info': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'message': {'type': 'string'}}, - 'required': ['message', 'code'], - 'type': 'object'}, - 'ErrorResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}}, - 'type': 'object'}}, - 'properties': {'BlockUntilLeadershipReleased': {'description': 'BlockUntilLeadershipReleased ' - 'blocks the ' - 'caller until ' - 'leadership ' - 'is\n' - 'released for ' - 'the given ' - 'service.', - 'properties': {'Params': {'$ref': '#/definitions/ApplicationTag'}, - 'Result': {'$ref': '#/definitions/ErrorResult'}}, - 'type': 'object'}, - 'ClaimLeadership': {'description': 'ClaimLeadership makes a ' - 'leadership claim with the ' - 'given parameters.', - 'properties': {'Params': {'$ref': '#/definitions/ClaimLeadershipBulkParams'}, - 'Result': {'$ref': '#/definitions/ClaimLeadershipBulkResults'}}, - 'type': 'object'}}, - 'type': 'object'} - - - @ReturnMapping(ErrorResult) - async def BlockUntilLeadershipReleased(self, name=None): - ''' - BlockUntilLeadershipReleased blocks the caller until leadership is - released for the given service. - - name : str - Returns -> ErrorResult - ''' - if name is not None and not isinstance(name, (bytes, str)): - raise Exception("Expected name to be a str, received: {}".format(type(name))) - - # 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=None): - ''' - ClaimLeadership makes a leadership claim with the given parameters. - - params : typing.Sequence[~ClaimLeadershipParams] - Returns -> ClaimLeadershipBulkResults - ''' - if params is not None and not isinstance(params, (bytes, str, list)): - raise Exception("Expected params to be a Sequence, received: {}".format(type(params))) - - # 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 MeterStatusFacade(Type): - name = 'MeterStatus' - 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': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'message': {'type': 'string'}}, - 'required': ['message', 'code'], - 'type': 'object'}, - 'ErrorResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}}, - 'type': 'object'}, - 'ErrorResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'MeterStatusResult': {'additionalProperties': False, - 'properties': {'code': {'type': 'string'}, - 'error': {'$ref': '#/definitions/Error'}, - 'info': {'type': 'string'}}, - 'required': ['code', 'info'], - 'type': 'object'}, - 'MeterStatusResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/MeterStatusResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'NotifyWatchResult': {'additionalProperties': False, - 'properties': {'NotifyWatcherId': {'type': 'string'}, - 'error': {'$ref': '#/definitions/Error'}}, - 'required': ['NotifyWatcherId'], - 'type': 'object'}, - 'NotifyWatchResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'SetUnitStateArg': {'additionalProperties': False, - 'properties': {'charm-state': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}, - 'meter-status-state': {'type': 'string'}, - 'relation-state': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}, - 'secret-state': {'type': 'string'}, - 'storage-state': {'type': 'string'}, - 'tag': {'type': 'string'}, - 'uniter-state': {'type': 'string'}}, - 'required': ['tag'], - 'type': 'object'}, - 'SetUnitStateArgs': {'additionalProperties': False, - 'properties': {'args': {'items': {'$ref': '#/definitions/SetUnitStateArg'}, - 'type': 'array'}}, - 'required': ['args'], - 'type': 'object'}, - 'UnitStateResult': {'additionalProperties': False, - 'properties': {'charm-state': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}, - 'error': {'$ref': '#/definitions/Error'}, - 'meter-status-state': {'type': 'string'}, - 'relation-state': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}, - 'secret-state': {'type': 'string'}, - 'storage-state': {'type': 'string'}, - 'uniter-state': {'type': 'string'}}, - 'type': 'object'}, - 'UnitStateResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/UnitStateResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}}, - 'properties': {'GetMeterStatus': {'description': 'GetMeterStatus returns ' - 'meter status information ' - 'for each unit.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/MeterStatusResults'}}, - 'type': 'object'}, - 'SetState': {'description': 'SetState sets the state persisted ' - 'by the charm running in this ' - 'unit\n' - 'and the state internal to the ' - 'uniter for this unit.', - 'properties': {'Params': {'$ref': '#/definitions/SetUnitStateArgs'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'State': {'description': 'State returns the state persisted by ' - 'the charm running in this unit\n' - 'and the state internal to the uniter ' - 'for this unit.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/UnitStateResults'}}, - 'type': 'object'}, - 'WatchMeterStatus': {'description': 'WatchMeterStatus returns ' - 'a NotifyWatcher for ' - 'observing changes\n' - "to each unit's meter " - 'status.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/NotifyWatchResults'}}, - 'type': 'object'}}, - 'type': 'object'} - - - @ReturnMapping(MeterStatusResults) - async def GetMeterStatus(self, entities=None): - ''' - GetMeterStatus returns meter status information for each unit. - - entities : typing.Sequence[~Entity] - Returns -> MeterStatusResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='MeterStatus', - request='GetMeterStatus', - version=2, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def SetState(self, args=None): - ''' - SetState sets the state persisted by the charm running in this unit - and the state internal to the uniter for this unit. - - args : typing.Sequence[~SetUnitStateArg] - Returns -> ErrorResults - ''' - if args is not None and not isinstance(args, (bytes, str, list)): - raise Exception("Expected args to be a Sequence, received: {}".format(type(args))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='MeterStatus', - request='SetState', - version=2, - params=_params) - _params['args'] = args - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(UnitStateResults) - async def State(self, entities=None): - ''' - State returns the state persisted by the charm running in this unit - and the state internal to the uniter for this unit. - - entities : typing.Sequence[~Entity] - Returns -> UnitStateResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='MeterStatus', - request='State', - version=2, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(NotifyWatchResults) - async def WatchMeterStatus(self, entities=None): - ''' - WatchMeterStatus returns a NotifyWatcher for observing changes - to each unit's meter status. - - entities : typing.Sequence[~Entity] - Returns -> NotifyWatchResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='MeterStatus', - request='WatchMeterStatus', - version=2, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - -class MetricsAdderFacade(Type): - name = 'MetricsAdder' - version = 2 - schema = {'definitions': {'Error': {'additionalProperties': False, - 'properties': {'code': {'type': 'string'}, - 'info': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'message': {'type': 'string'}}, - 'required': ['message', 'code'], - 'type': 'object'}, - 'ErrorResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}}, - 'type': 'object'}, - 'ErrorResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'Metric': {'additionalProperties': False, - 'properties': {'key': {'type': 'string'}, - 'labels': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}, - 'time': {'format': 'date-time', - 'type': 'string'}, - 'value': {'type': 'string'}}, - 'required': ['key', 'value', 'time'], - 'type': 'object'}, - 'MetricBatch': {'additionalProperties': False, - 'properties': {'charm-url': {'type': 'string'}, - 'created': {'format': 'date-time', - 'type': 'string'}, - 'metrics': {'items': {'$ref': '#/definitions/Metric'}, - 'type': 'array'}, - 'uuid': {'type': 'string'}}, - 'required': ['uuid', - 'charm-url', - 'created', - 'metrics'], - 'type': 'object'}, - 'MetricBatchParam': {'additionalProperties': False, - 'properties': {'batch': {'$ref': '#/definitions/MetricBatch'}, - 'tag': {'type': 'string'}}, - 'required': ['tag', 'batch'], - 'type': 'object'}, - 'MetricBatchParams': {'additionalProperties': False, - 'properties': {'batches': {'items': {'$ref': '#/definitions/MetricBatchParam'}, - 'type': 'array'}}, - 'required': ['batches'], - 'type': 'object'}}, - 'properties': {'AddMetricBatches': {'description': 'AddMetricBatches ' - 'implements the ' - 'MetricsAdder interface.', - 'properties': {'Params': {'$ref': '#/definitions/MetricBatchParams'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}}, - 'type': 'object'} - - - @ReturnMapping(ErrorResults) - async def AddMetricBatches(self, batches=None): - ''' - AddMetricBatches implements the MetricsAdder interface. - - batches : typing.Sequence[~MetricBatchParam] - Returns -> ErrorResults - ''' - if batches is not None and not isinstance(batches, (bytes, str, list)): - raise Exception("Expected batches to be a Sequence, received: {}".format(type(batches))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='MetricsAdder', - request='AddMetricBatches', - version=2, - params=_params) - _params['batches'] = batches - reply = await self.rpc(msg) - return reply - - - -class MetricsDebugFacade(Type): - name = 'MetricsDebug' - version = 2 - schema = {'definitions': {'Entities': {'additionalProperties': False, - 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'}, - 'type': 'array'}}, - 'required': ['entities'], - 'type': 'object'}, - 'Entity': {'additionalProperties': False, - 'properties': {'tag': {'type': 'string'}}, - 'required': ['tag'], - 'type': 'object'}, - 'EntityMetrics': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'metrics': {'items': {'$ref': '#/definitions/MetricResult'}, - 'type': 'array'}}, - 'type': 'object'}, - 'Error': {'additionalProperties': False, - 'properties': {'code': {'type': 'string'}, - 'info': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'message': {'type': 'string'}}, - 'required': ['message', 'code'], - 'type': 'object'}, - 'ErrorResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}}, - 'type': 'object'}, - 'ErrorResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'MeterStatusParam': {'additionalProperties': False, - 'properties': {'code': {'type': 'string'}, - 'info': {'type': 'string'}, - 'tag': {'type': 'string'}}, - 'required': ['tag', 'code'], - 'type': 'object'}, - 'MeterStatusParams': {'additionalProperties': False, - 'properties': {'statues': {'items': {'$ref': '#/definitions/MeterStatusParam'}, - 'type': 'array'}}, - 'required': ['statues'], - 'type': 'object'}, - 'MetricResult': {'additionalProperties': False, - 'properties': {'key': {'type': 'string'}, - 'labels': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}, - 'time': {'format': 'date-time', - 'type': 'string'}, - 'unit': {'type': 'string'}, - 'value': {'type': 'string'}}, - 'required': ['time', - 'key', - 'value', - 'unit', - 'labels'], - 'type': 'object'}, - 'MetricResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/EntityMetrics'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}}, - 'properties': {'GetMetrics': {'description': 'GetMetrics returns all metrics ' - 'stored by the state server.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/MetricResults'}}, - 'type': 'object'}, - 'SetMeterStatus': {'description': 'SetMeterStatus sets meter ' - 'statuses for entities.', - 'properties': {'Params': {'$ref': '#/definitions/MeterStatusParams'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}}, - 'type': 'object'} - - - @ReturnMapping(MetricResults) - async def GetMetrics(self, entities=None): - ''' - GetMetrics returns all metrics stored by the state server. - - entities : typing.Sequence[~Entity] - Returns -> MetricResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # 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=None): - ''' - SetMeterStatus sets meter statuses for entities. - - statues : typing.Sequence[~MeterStatusParam] - Returns -> ErrorResults - ''' - if statues is not None and not isinstance(statues, (bytes, str, list)): - raise Exception("Expected statues to be a Sequence, received: {}".format(type(statues))) - - # 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 MigrationTargetFacade(Type): - name = 'MigrationTarget' - version = 2 - schema = {'definitions': {'ActivateModelArgs': {'additionalProperties': False, - 'properties': {'controller-alias': {'type': 'string'}, - 'controller-tag': {'type': 'string'}, - 'cross-model-uuids': {'items': {'type': 'string'}, - 'type': 'array'}, - 'model-tag': {'type': 'string'}, - 'source-api-addrs': {'items': {'type': 'string'}, - 'type': 'array'}, - 'source-ca-cert': {'type': 'string'}}, - 'required': ['model-tag', - 'controller-tag', - 'source-api-addrs', - 'source-ca-cert', - 'cross-model-uuids'], - 'type': 'object'}, - 'AdoptResourcesArgs': {'additionalProperties': False, - 'properties': {'model-tag': {'type': 'string'}, - 'source-controller-version': {'$ref': '#/definitions/Number'}}, - 'required': ['model-tag', - 'source-controller-version'], - 'type': 'object'}, - 'BytesResult': {'additionalProperties': False, - 'properties': {'result': {'items': {'type': 'integer'}, - 'type': 'array'}}, - 'required': ['result'], - 'type': 'object'}, - 'Error': {'additionalProperties': False, - 'properties': {'code': {'type': 'string'}, - 'info': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'message': {'type': 'string'}}, - 'required': ['message', 'code'], - 'type': 'object'}, - 'ErrorResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}}, - 'type': 'object'}, - 'ErrorResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'MigrationModelInfo': {'additionalProperties': False, - 'properties': {'agent-version': {'$ref': '#/definitions/Number'}, - 'controller-agent-version': {'$ref': '#/definitions/Number'}, - 'name': {'type': 'string'}, - 'owner-tag': {'type': 'string'}, - 'uuid': {'type': 'string'}}, - 'required': ['uuid', - 'name', - 'owner-tag', - 'agent-version', - 'controller-agent-version'], - 'type': 'object'}, - 'ModelArgs': {'additionalProperties': False, - 'properties': {'model-tag': {'type': 'string'}}, - 'required': ['model-tag'], - 'type': 'object'}, - 'Number': {'additionalProperties': False, - 'properties': {'Build': {'type': 'integer'}, - 'Major': {'type': 'integer'}, - 'Minor': {'type': 'integer'}, - 'Patch': {'type': 'integer'}, - 'Tag': {'type': 'string'}}, - 'required': ['Major', - 'Minor', - 'Tag', - 'Patch', - 'Build'], - 'type': 'object'}, - 'SerializedModel': {'additionalProperties': False, - 'properties': {'bytes': {'items': {'type': 'integer'}, - 'type': 'array'}, - 'charms': {'items': {'type': 'string'}, - 'type': 'array'}, - 'resources': {'items': {'$ref': '#/definitions/SerializedModelResource'}, - 'type': 'array'}, - 'tools': {'items': {'$ref': '#/definitions/SerializedModelTools'}, - 'type': 'array'}}, - 'required': ['bytes', - 'charms', - 'tools', - 'resources'], - 'type': 'object'}, - 'SerializedModelResource': {'additionalProperties': False, - 'properties': {'application': {'type': 'string'}, - 'application-revision': {'$ref': '#/definitions/SerializedModelResourceRevision'}, - 'charmstore-revision': {'$ref': '#/definitions/SerializedModelResourceRevision'}, - 'name': {'type': 'string'}, - 'unit-revisions': {'patternProperties': {'.*': {'$ref': '#/definitions/SerializedModelResourceRevision'}}, - 'type': 'object'}}, - 'required': ['application', - 'name', - 'application-revision', - 'charmstore-revision', - 'unit-revisions'], - 'type': 'object'}, - 'SerializedModelResourceRevision': {'additionalProperties': False, - 'properties': {'description': {'type': 'string'}, - 'fingerprint': {'type': 'string'}, - 'origin': {'type': 'string'}, - 'path': {'type': 'string'}, - 'revision': {'type': 'integer'}, - 'size': {'type': 'integer'}, - 'timestamp': {'format': 'date-time', - 'type': 'string'}, - 'type': {'type': 'string'}, - 'username': {'type': 'string'}}, - 'required': ['revision', - 'type', - 'path', - 'description', - 'origin', - 'fingerprint', - 'size', - 'timestamp'], - 'type': 'object'}, - 'SerializedModelTools': {'additionalProperties': False, - 'properties': {'uri': {'type': 'string'}, - 'version': {'type': 'string'}}, - 'required': ['version', 'uri'], - 'type': 'object'}}, - 'properties': {'Abort': {'description': 'Abort removes the specified model ' - 'from the database. It is an error ' - 'to\n' - 'attempt to Abort a model that has a ' - 'migration mode other than importing.', - 'properties': {'Params': {'$ref': '#/definitions/ModelArgs'}}, - 'type': 'object'}, - 'Activate': {'description': 'Activate sets the migration mode ' - 'of the model to "none", meaning ' - 'it\n' - 'is ready for use. It is an error ' - 'to attempt to Abort a model that\n' - 'has a migration mode other than ' - 'importing. It also adds any ' - 'required\n' - 'external controller records for ' - 'those controllers hosting offers ' - 'used\n' - 'by the model.', - 'properties': {'Params': {'$ref': '#/definitions/ActivateModelArgs'}}, - 'type': 'object'}, - 'AdoptResources': {'description': 'AdoptResources asks the ' - 'cloud provider to update ' - 'the controller\n' - "tags for a model's " - 'resources. This prevents ' - 'the resources from\n' - 'being destroyed if the ' - 'source controller is ' - 'destroyed after the\n' - 'model is migrated away.', - 'properties': {'Params': {'$ref': '#/definitions/AdoptResourcesArgs'}}, - 'type': 'object'}, - 'CACert': {'description': 'CACert returns the certificate used ' - 'to validate the state connection.', - 'properties': {'Result': {'$ref': '#/definitions/BytesResult'}}, - 'type': 'object'}, - 'CheckMachines': {'description': 'CheckMachines compares the ' - 'machines in state with the ' - 'ones reported\n' - 'by the provider and reports ' - 'any discrepancies.', - 'properties': {'Params': {'$ref': '#/definitions/ModelArgs'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'Import': {'description': 'Import takes a serialized Juju ' - 'model, deserializes it, and\n' - 'recreates it in the receiving ' - 'controller.', - 'properties': {'Params': {'$ref': '#/definitions/SerializedModel'}}, - 'type': 'object'}, - 'LatestLogTime': {'description': 'LatestLogTime returns the ' - 'time of the most recent log ' - 'record\n' - 'received by the logtransfer ' - 'endpoint. This can be used ' - 'as the start\n' - 'point for streaming logs ' - 'from the source if the ' - 'transfer was\n' - 'interrupted.\n' - '\n' - 'For performance reasons, not ' - 'every time is tracked, so if ' - 'the\n' - 'target controller died ' - 'during the transfer the ' - 'latest log time\n' - 'might be up to 2 minutes ' - 'earlier. If the transfer was ' - 'interrupted\n' - 'in some other way (like the ' - 'source controller going away ' - 'or a\n' - 'network partition) the time ' - 'will be up-to-date.\n' - '\n' - 'Log messages are assumed to ' - 'be sent in time order (which ' - 'is how\n' - 'debug-log emits them). If ' - "that isn't the case then " - 'this mechanism\n' - "can't be used to avoid " - 'duplicates when logtransfer ' - 'is restarted.\n' - '\n' - 'Returns the zero time if no ' - 'logs have been transferred.', - 'properties': {'Params': {'$ref': '#/definitions/ModelArgs'}, - 'Result': {'format': 'date-time', - 'type': 'string'}}, - 'type': 'object'}, - 'Prechecks': {'description': 'Prechecks ensure that the target ' - 'controller is ready to accept a\n' - 'model migration.', - 'properties': {'Params': {'$ref': '#/definitions/MigrationModelInfo'}}, - 'type': 'object'}}, - 'type': 'object'} - - - @ReturnMapping(None) - async def Abort(self, model_tag=None): - ''' - Abort removes the specified model from the database. It is an error to - attempt to Abort a model that has a migration mode other than importing. - - model_tag : str - Returns -> None - ''' - if model_tag is not None and not isinstance(model_tag, (bytes, str)): - raise Exception("Expected model_tag to be a str, received: {}".format(type(model_tag))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='MigrationTarget', - request='Abort', - version=2, - params=_params) - _params['model-tag'] = model_tag - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(None) - async def Activate(self, controller_alias=None, controller_tag=None, cross_model_uuids=None, model_tag=None, source_api_addrs=None, source_ca_cert=None): - ''' - Activate sets the migration mode of the model to "none", meaning it - is ready for use. It is an error to attempt to Abort a model that - has a migration mode other than importing. It also adds any required - external controller records for those controllers hosting offers used - by the model. - - controller_alias : str - controller_tag : str - cross_model_uuids : typing.Sequence[str] - model_tag : str - source_api_addrs : typing.Sequence[str] - source_ca_cert : str - Returns -> None - ''' - if controller_alias is not None and not isinstance(controller_alias, (bytes, str)): - raise Exception("Expected controller_alias to be a str, received: {}".format(type(controller_alias))) - - if controller_tag is not None and not isinstance(controller_tag, (bytes, str)): - raise Exception("Expected controller_tag to be a str, received: {}".format(type(controller_tag))) - - if cross_model_uuids is not None and not isinstance(cross_model_uuids, (bytes, str, list)): - raise Exception("Expected cross_model_uuids to be a Sequence, received: {}".format(type(cross_model_uuids))) - - if model_tag is not None and not isinstance(model_tag, (bytes, str)): - raise Exception("Expected model_tag to be a str, received: {}".format(type(model_tag))) - - if source_api_addrs is not None and not isinstance(source_api_addrs, (bytes, str, list)): - raise Exception("Expected source_api_addrs to be a Sequence, received: {}".format(type(source_api_addrs))) - - if source_ca_cert is not None and not isinstance(source_ca_cert, (bytes, str)): - raise Exception("Expected source_ca_cert to be a str, received: {}".format(type(source_ca_cert))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='MigrationTarget', - request='Activate', - version=2, - params=_params) - _params['controller-alias'] = controller_alias - _params['controller-tag'] = controller_tag - _params['cross-model-uuids'] = cross_model_uuids - _params['model-tag'] = model_tag - _params['source-api-addrs'] = source_api_addrs - _params['source-ca-cert'] = source_ca_cert - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(None) - async def AdoptResources(self, model_tag=None, source_controller_version=None): - ''' - AdoptResources asks the cloud provider to update the controller - tags for a model's resources. This prevents the resources from - being destroyed if the source controller is destroyed after the - model is migrated away. - - model_tag : str - source_controller_version : Number - Returns -> None - ''' - if model_tag is not None and not isinstance(model_tag, (bytes, str)): - raise Exception("Expected model_tag to be a str, received: {}".format(type(model_tag))) - - if source_controller_version is not None and not isinstance(source_controller_version, (dict, Number)): - raise Exception("Expected source_controller_version to be a Number, received: {}".format(type(source_controller_version))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='MigrationTarget', - request='AdoptResources', - version=2, - params=_params) - _params['model-tag'] = model_tag - _params['source-controller-version'] = source_controller_version - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(BytesResult) - async def CACert(self): - ''' - CACert returns the certificate used to validate the state connection. - - - Returns -> BytesResult - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='MigrationTarget', - request='CACert', - version=2, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def CheckMachines(self, model_tag=None): - ''' - CheckMachines compares the machines in state with the ones reported - by the provider and reports any discrepancies. - - model_tag : str - Returns -> ErrorResults - ''' - if model_tag is not None and not isinstance(model_tag, (bytes, str)): - raise Exception("Expected model_tag to be a str, received: {}".format(type(model_tag))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='MigrationTarget', - request='CheckMachines', - version=2, - params=_params) - _params['model-tag'] = model_tag - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(None) - async def Import(self, bytes_=None, charms=None, resources=None, tools=None): - ''' - Import takes a serialized Juju model, deserializes it, and - recreates it in the receiving controller. - - bytes_ : typing.Sequence[int] - charms : typing.Sequence[str] - resources : typing.Sequence[~SerializedModelResource] - tools : typing.Sequence[~SerializedModelTools] - Returns -> None - ''' - if bytes_ is not None and not isinstance(bytes_, (bytes, str, list)): - raise Exception("Expected bytes_ to be a Sequence, received: {}".format(type(bytes_))) - - if charms is not None and not isinstance(charms, (bytes, str, list)): - raise Exception("Expected charms to be a Sequence, received: {}".format(type(charms))) - - if resources is not None and not isinstance(resources, (bytes, str, list)): - raise Exception("Expected resources to be a Sequence, received: {}".format(type(resources))) - - if tools is not None and not isinstance(tools, (bytes, str, list)): - raise Exception("Expected tools to be a Sequence, received: {}".format(type(tools))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='MigrationTarget', - request='Import', - version=2, - params=_params) - _params['bytes'] = bytes_ - _params['charms'] = charms - _params['resources'] = resources - _params['tools'] = tools - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(str) - async def LatestLogTime(self, model_tag=None): - ''' - LatestLogTime returns the time of the most recent log record - received by the logtransfer endpoint. This can be used as the start - point for streaming logs from the source if the transfer was - interrupted. - - For performance reasons, not every time is tracked, so if the - target controller died during the transfer the latest log time - might be up to 2 minutes earlier. If the transfer was interrupted - in some other way (like the source controller going away or a - network partition) the time will be up-to-date. - - Log messages are assumed to be sent in time order (which is how - debug-log emits them). If that isn't the case then this mechanism - can't be used to avoid duplicates when logtransfer is restarted. - - Returns the zero time if no logs have been transferred. - - model_tag : str - Returns -> str - ''' - if model_tag is not None and not isinstance(model_tag, (bytes, str)): - raise Exception("Expected model_tag to be a str, received: {}".format(type(model_tag))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='MigrationTarget', - request='LatestLogTime', - version=2, - params=_params) - _params['model-tag'] = model_tag - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(None) - async def Prechecks(self, agent_version=None, controller_agent_version=None, name=None, owner_tag=None, uuid=None): - ''' - Prechecks ensure that the target controller is ready to accept a - model migration. - - agent_version : Number - controller_agent_version : Number - name : str - owner_tag : str - uuid : str - Returns -> None - ''' - if agent_version is not None and not isinstance(agent_version, (dict, Number)): - raise Exception("Expected agent_version to be a Number, received: {}".format(type(agent_version))) - - if controller_agent_version is not None and not isinstance(controller_agent_version, (dict, Number)): - raise Exception("Expected controller_agent_version to be a Number, received: {}".format(type(controller_agent_version))) - - if name is not None and not isinstance(name, (bytes, str)): - raise Exception("Expected name to be a str, received: {}".format(type(name))) - - if owner_tag is not None and not isinstance(owner_tag, (bytes, str)): - raise Exception("Expected owner_tag to be a str, received: {}".format(type(owner_tag))) - - if uuid is not None and not isinstance(uuid, (bytes, str)): - raise Exception("Expected uuid to be a str, received: {}".format(type(uuid))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='MigrationTarget', - request='Prechecks', - version=2, - params=_params) - _params['agent-version'] = agent_version - _params['controller-agent-version'] = controller_agent_version - _params['name'] = name - _params['owner-tag'] = owner_tag - _params['uuid'] = uuid - reply = await self.rpc(msg) - return reply - - - -class ProxyUpdaterFacade(Type): - name = 'ProxyUpdater' - 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': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'message': {'type': 'string'}}, - 'required': ['message', 'code'], - 'type': 'object'}, - 'NotifyWatchResult': {'additionalProperties': False, - 'properties': {'NotifyWatcherId': {'type': 'string'}, - 'error': {'$ref': '#/definitions/Error'}}, - 'required': ['NotifyWatcherId'], - 'type': 'object'}, - 'NotifyWatchResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'ProxyConfig': {'additionalProperties': False, - 'properties': {'ftp': {'type': 'string'}, - 'http': {'type': 'string'}, - 'https': {'type': 'string'}, - 'no-proxy': {'type': 'string'}}, - 'required': ['http', - 'https', - 'ftp', - 'no-proxy'], - 'type': 'object'}, - 'ProxyConfigResult': {'additionalProperties': False, - 'properties': {'apt-mirror': {'type': 'string'}, - 'apt-proxy-settings': {'$ref': '#/definitions/ProxyConfig'}, - 'error': {'$ref': '#/definitions/Error'}, - 'juju-proxy-settings': {'$ref': '#/definitions/ProxyConfig'}, - 'legacy-proxy-settings': {'$ref': '#/definitions/ProxyConfig'}, - 'snap-proxy-settings': {'$ref': '#/definitions/ProxyConfig'}, - 'snap-store-assertions': {'type': 'string'}, - 'snap-store-id': {'type': 'string'}, - 'snap-store-proxy-url': {'type': 'string'}}, - 'required': ['legacy-proxy-settings', - 'juju-proxy-settings'], - 'type': 'object'}, - 'ProxyConfigResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/ProxyConfigResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}}, - 'properties': {'ProxyConfig': {'description': 'ProxyConfig returns the proxy ' - 'settings for the current ' - 'model.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ProxyConfigResults'}}, - 'type': 'object'}, - 'WatchForProxyConfigAndAPIHostPortChanges': {'description': 'WatchForProxyConfigAndAPIHostPortChanges ' - 'watches ' - 'for ' - 'changes ' - 'to ' - 'the ' - 'proxy ' - 'and ' - 'api ' - 'host ' - 'port ' - 'settings.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/NotifyWatchResults'}}, - 'type': 'object'}}, - 'type': 'object'} - - - @ReturnMapping(ProxyConfigResults) - async def ProxyConfig(self, entities=None): - ''' - ProxyConfig returns the proxy settings for the current model. - - entities : typing.Sequence[~Entity] - Returns -> ProxyConfigResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='ProxyUpdater', - request='ProxyConfig', - version=2, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(NotifyWatchResults) - async def WatchForProxyConfigAndAPIHostPortChanges(self, entities=None): - ''' - WatchForProxyConfigAndAPIHostPortChanges watches for changes to the proxy and api host port settings. - - entities : typing.Sequence[~Entity] - Returns -> NotifyWatchResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='ProxyUpdater', - request='WatchForProxyConfigAndAPIHostPortChanges', - version=2, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - -class RaftLeaseFacade(Type): - name = 'RaftLease' - version = 2 - schema = {'definitions': {'Error': {'additionalProperties': False, - 'properties': {'code': {'type': 'string'}, - 'info': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'message': {'type': 'string'}}, - 'required': ['message', 'code'], - 'type': 'object'}, - 'ErrorResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}}, - 'type': 'object'}, - 'ErrorResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'LeaseOperationCommand': {'additionalProperties': False, - 'properties': {'duration': {'type': 'integer'}, - 'holder': {'type': 'string'}, - 'lease': {'type': 'string'}, - 'model-uuid': {'type': 'string'}, - 'namespace': {'type': 'string'}, - 'new-time': {'format': 'date-time', - 'type': 'string'}, - 'old-time': {'format': 'date-time', - 'type': 'string'}, - 'operation': {'type': 'string'}, - 'pin-entity': {'type': 'string'}, - 'version': {'type': 'integer'}}, - 'required': ['version', 'operation'], - 'type': 'object'}, - 'LeaseOperationsV2': {'additionalProperties': False, - 'properties': {'commands': {'items': {'$ref': '#/definitions/LeaseOperationCommand'}, - 'type': 'array'}}, - 'required': ['commands'], - 'type': 'object'}}, - 'properties': {'ApplyLease': {'properties': {'Params': {'$ref': '#/definitions/LeaseOperationsV2'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}}, - 'type': 'object'} - - - @ReturnMapping(ErrorResults) - async def ApplyLease(self, commands=None): - ''' - commands : typing.Sequence[~LeaseOperationCommand] - Returns -> ErrorResults - ''' - if commands is not None and not isinstance(commands, (bytes, str, list)): - raise Exception("Expected commands to be a Sequence, received: {}".format(type(commands))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='RaftLease', - request='ApplyLease', - version=2, - params=_params) - _params['commands'] = commands - reply = await self.rpc(msg) - return reply - - - -class RebootFacade(Type): - name = 'Reboot' - version = 2 - schema = {'definitions': {'Entities': {'additionalProperties': False, - 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'}, - 'type': 'array'}}, - 'required': ['entities'], - 'type': 'object'}, - 'Entity': {'additionalProperties': False, - 'properties': {'tag': {'type': 'string'}}, - 'required': ['tag'], - 'type': 'object'}, - 'Error': {'additionalProperties': False, - 'properties': {'code': {'type': 'string'}, - 'info': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'message': {'type': 'string'}}, - 'required': ['message', 'code'], - 'type': 'object'}, - 'ErrorResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}}, - 'type': 'object'}, - 'ErrorResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'NotifyWatchResult': {'additionalProperties': False, - 'properties': {'NotifyWatcherId': {'type': 'string'}, - 'error': {'$ref': '#/definitions/Error'}}, - 'required': ['NotifyWatcherId'], - 'type': 'object'}, - 'RebootActionResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'result': {'type': 'string'}}, - 'type': 'object'}, - 'RebootActionResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/RebootActionResult'}, - 'type': 'array'}}, - 'type': 'object'}}, - 'properties': {'ClearReboot': {'description': 'ClearReboot will clear the ' - 'reboot flag on provided ' - 'machines, if it exists.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'GetRebootAction': {'description': 'GetRebootAction returns ' - 'the action a machine agent ' - 'should take.\n' - 'If a reboot flag is set on ' - 'the machine, then that ' - 'machine is\n' - 'expected to reboot ' - '(params.ShouldReboot).\n' - 'a reboot flag set on the ' - 'machine parent or ' - 'grandparent, will\n' - 'cause the machine to ' - 'shutdown ' - '(params.ShouldShutdown).\n' - 'If no reboot flag is set, ' - 'the machine should do ' - 'nothing ' - '(params.ShouldDoNothing).', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/RebootActionResults'}}, - 'type': 'object'}, - 'RequestReboot': {'description': 'RequestReboot sets the ' - 'reboot flag on the provided ' - 'machines', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'WatchForRebootEvent': {'description': 'WatchForRebootEvent ' - 'starts a watcher to ' - 'track if there is a ' - 'new\n' - 'reboot request on the ' - 'machines ID or any of ' - 'its parents (in case ' - 'we are a container).', - 'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}}, - 'type': 'object'}}, - 'type': 'object'} - - - @ReturnMapping(ErrorResults) - async def ClearReboot(self, entities=None): - ''' - ClearReboot will clear the reboot flag on provided machines, if it exists. - - entities : typing.Sequence[~Entity] - Returns -> ErrorResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # 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=None): - ''' - GetRebootAction returns the action a machine agent should take. - If a reboot flag is set on the machine, then that machine is - expected to reboot (params.ShouldReboot). - a reboot flag set on the machine parent or grandparent, will - cause the machine to shutdown (params.ShouldShutdown). - If no reboot flag is set, the machine should do nothing (params.ShouldDoNothing). - - entities : typing.Sequence[~Entity] - Returns -> RebootActionResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # 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=None): - ''' - RequestReboot sets the reboot flag on the provided machines - - entities : typing.Sequence[~Entity] - Returns -> ErrorResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # 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): - ''' - WatchForRebootEvent starts a watcher to track if there is a new - reboot request on the machines ID or any of its parents (in case we are a container). - - - Returns -> NotifyWatchResult - ''' - - # 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 RemoteRelationsFacade(Type): - name = 'RemoteRelations' - version = 2 - schema = {'definitions': {'ControllerAPIInfoResult': {'additionalProperties': False, - 'properties': {'addresses': {'items': {'type': 'string'}, - 'type': 'array'}, - 'cacert': {'type': 'string'}, - 'error': {'$ref': '#/definitions/Error'}}, - 'required': ['addresses', - 'cacert'], - 'type': 'object'}, - 'ControllerAPIInfoResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/ControllerAPIInfoResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'ControllerConfigResult': {'additionalProperties': False, - 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}}, - 'required': ['config'], - 'type': 'object'}, - 'Entities': {'additionalProperties': False, - 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'}, - 'type': 'array'}}, - 'required': ['entities'], - 'type': 'object'}, - 'Entity': {'additionalProperties': False, - 'properties': {'tag': {'type': 'string'}}, - 'required': ['tag'], - 'type': 'object'}, - 'EntityMacaroonArg': {'additionalProperties': False, - 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'}, - 'tag': {'type': 'string'}}, - 'required': ['macaroon', 'tag'], - 'type': 'object'}, - 'EntityMacaroonArgs': {'additionalProperties': False, - 'properties': {'Args': {'items': {'$ref': '#/definitions/EntityMacaroonArg'}, - 'type': 'array'}}, - 'required': ['Args'], - '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': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'message': {'type': 'string'}}, - 'required': ['message', 'code'], - 'type': 'object'}, - 'ErrorResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}}, - 'type': 'object'}, - 'ErrorResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'ExternalControllerInfo': {'additionalProperties': False, - 'properties': {'addrs': {'items': {'type': 'string'}, - 'type': 'array'}, - 'ca-cert': {'type': 'string'}, - 'controller-alias': {'type': 'string'}, - 'controller-tag': {'type': 'string'}}, - 'required': ['controller-tag', - 'controller-alias', - 'addrs', - 'ca-cert'], - 'type': 'object'}, - 'GetTokenArg': {'additionalProperties': False, - 'properties': {'tag': {'type': 'string'}}, - 'required': ['tag'], - 'type': 'object'}, - 'GetTokenArgs': {'additionalProperties': False, - 'properties': {'Args': {'items': {'$ref': '#/definitions/GetTokenArg'}, - 'type': 'array'}}, - 'required': ['Args'], - 'type': 'object'}, - 'LatestSecretRevisionChanges': {'additionalProperties': False, - 'properties': {'changes': {'items': {'$ref': '#/definitions/SecretRevisionChange'}, - 'type': 'array'}}, - 'required': ['changes'], - 'type': 'object'}, - 'Macaroon': {'additionalProperties': False, 'type': 'object'}, - 'RemoteApplication': {'additionalProperties': False, - 'properties': {'consume-version': {'type': 'integer'}, - 'is-consumer-proxy': {'type': 'boolean'}, - 'life': {'type': 'string'}, - 'macaroon': {'$ref': '#/definitions/Macaroon'}, - 'model-uuid': {'type': 'string'}, - 'name': {'type': 'string'}, - 'offer-uuid': {'type': 'string'}, - 'status': {'type': 'string'}}, - 'required': ['name', - 'offer-uuid', - 'model-uuid', - 'is-consumer-proxy'], - 'type': 'object'}, - 'RemoteApplicationResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'result': {'$ref': '#/definitions/RemoteApplication'}}, - 'type': 'object'}, - 'RemoteApplicationResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/RemoteApplicationResult'}, - 'type': 'array'}}, - 'type': 'object'}, - 'RemoteEndpoint': {'additionalProperties': False, - 'properties': {'interface': {'type': 'string'}, - 'limit': {'type': 'integer'}, - 'name': {'type': 'string'}, - 'role': {'type': 'string'}}, - 'required': ['name', - 'role', - 'interface', - 'limit'], - 'type': 'object'}, - 'RemoteEntityTokenArg': {'additionalProperties': False, - 'properties': {'tag': {'type': 'string'}, - 'token': {'type': 'string'}}, - 'required': ['tag'], - 'type': 'object'}, - 'RemoteEntityTokenArgs': {'additionalProperties': False, - 'properties': {'Args': {'items': {'$ref': '#/definitions/RemoteEntityTokenArg'}, - 'type': 'array'}}, - 'required': ['Args'], - 'type': 'object'}, - 'RemoteRelation': {'additionalProperties': False, - 'properties': {'application-name': {'type': 'string'}, - 'endpoint': {'$ref': '#/definitions/RemoteEndpoint'}, - 'id': {'type': 'integer'}, - 'key': {'type': 'string'}, - 'life': {'type': 'string'}, - 'remote-application-name': {'type': 'string'}, - 'remote-endpoint-name': {'type': 'string'}, - 'source-model-uuid': {'type': 'string'}, - 'suspended': {'type': 'boolean'}, - 'unit-count': {'type': 'integer'}}, - 'required': ['life', - 'suspended', - 'id', - 'key', - 'application-name', - 'endpoint', - 'unit-count', - 'remote-application-name', - 'remote-endpoint-name', - 'source-model-uuid'], - 'type': 'object'}, - 'RemoteRelationChangeEvent': {'additionalProperties': False, - 'properties': {'application-settings': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'application-token': {'type': 'string'}, - 'bakery-version': {'type': 'integer'}, - 'changed-units': {'items': {'$ref': '#/definitions/RemoteRelationUnitChange'}, - 'type': 'array'}, - 'departed-units': {'items': {'type': 'integer'}, - 'type': 'array'}, - 'force-cleanup': {'type': 'boolean'}, - 'life': {'type': 'string'}, - 'macaroons': {'items': {'$ref': '#/definitions/Macaroon'}, - 'type': 'array'}, - 'relation-token': {'type': 'string'}, - 'suspended': {'type': 'boolean'}, - 'suspended-reason': {'type': 'string'}, - 'unit-count': {'type': 'integer'}}, - 'required': ['relation-token', - 'application-token', - 'life', - 'unit-count'], - 'type': 'object'}, - 'RemoteRelationResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'result': {'$ref': '#/definitions/RemoteRelation'}}, - 'type': 'object'}, - 'RemoteRelationResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/RemoteRelationResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'RemoteRelationUnitChange': {'additionalProperties': False, - 'properties': {'settings': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'unit-id': {'type': 'integer'}}, - 'required': ['unit-id'], - 'type': 'object'}, - 'RemoteRelationWatchResult': {'additionalProperties': False, - 'properties': {'changes': {'$ref': '#/definitions/RemoteRelationChangeEvent'}, - 'error': {'$ref': '#/definitions/Error'}, - 'watcher-id': {'type': 'string'}}, - 'required': ['watcher-id', - 'changes'], - 'type': 'object'}, - 'RemoteRelationWatchResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/RemoteRelationWatchResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'RemoteRelationsChanges': {'additionalProperties': False, - 'properties': {'changes': {'items': {'$ref': '#/definitions/RemoteRelationChangeEvent'}, - 'type': 'array'}}, - 'type': 'object'}, - 'SecretRevisionChange': {'additionalProperties': False, - 'properties': {'revision': {'type': 'integer'}, - 'uri': {'type': 'string'}}, - 'required': ['uri', 'revision'], - 'type': 'object'}, - 'SetStatus': {'additionalProperties': False, - 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'}, - 'type': 'array'}}, - 'required': ['entities'], - 'type': 'object'}, - 'StringResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'result': {'type': 'string'}}, - 'required': ['result'], - 'type': 'object'}, - 'StringResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'StringsWatchResult': {'additionalProperties': False, - 'properties': {'changes': {'items': {'type': 'string'}, - 'type': 'array'}, - 'error': {'$ref': '#/definitions/Error'}, - 'watcher-id': {'type': 'string'}}, - 'required': ['watcher-id'], - 'type': 'object'}, - 'StringsWatchResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'TokenResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'token': {'type': 'string'}}, - 'type': 'object'}, - 'TokenResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/TokenResult'}, - 'type': 'array'}}, - 'type': 'object'}, - 'UpdateControllerForModel': {'additionalProperties': False, - 'properties': {'info': {'$ref': '#/definitions/ExternalControllerInfo'}, - 'model-tag': {'type': 'string'}}, - 'required': ['model-tag', 'info'], - 'type': 'object'}, - 'UpdateControllersForModelsParams': {'additionalProperties': False, - 'properties': {'changes': {'items': {'$ref': '#/definitions/UpdateControllerForModel'}, - 'type': 'array'}}, - 'required': ['changes'], - 'type': 'object'}}, - 'properties': {'ConsumeRemoteRelationChanges': {'description': 'ConsumeRemoteRelationChanges ' - 'consumes ' - 'changes to ' - 'settings ' - 'originating\n' - 'from the ' - 'remote/offering ' - 'side of ' - 'relations.', - 'properties': {'Params': {'$ref': '#/definitions/RemoteRelationsChanges'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'ConsumeRemoteSecretChanges': {'description': 'ConsumeRemoteSecretChanges ' - 'updates the ' - 'local model ' - 'with secret ' - 'revision ' - 'changes\n' - 'originating ' - 'from the ' - 'remote/offering ' - 'model.', - 'properties': {'Params': {'$ref': '#/definitions/LatestSecretRevisionChanges'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'ControllerAPIInfoForModels': {'description': 'ControllerAPIInfoForModels ' - 'returns the ' - 'controller api ' - 'connection ' - 'details for the ' - 'specified ' - 'models.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ControllerAPIInfoResults'}}, - 'type': 'object'}, - 'ControllerConfig': {'description': 'ControllerConfig returns ' - "the controller's " - 'configuration.', - 'properties': {'Result': {'$ref': '#/definitions/ControllerConfigResult'}}, - 'type': 'object'}, - 'ExportEntities': {'description': 'ExportEntities allocates ' - 'unique, remote entity IDs ' - 'for the given entities in ' - 'the local model.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/TokenResults'}}, - 'type': 'object'}, - 'GetTokens': {'description': 'GetTokens returns the token ' - 'associated with the entities ' - 'with the given tags for the ' - 'given models.', - 'properties': {'Params': {'$ref': '#/definitions/GetTokenArgs'}, - 'Result': {'$ref': '#/definitions/StringResults'}}, - 'type': 'object'}, - 'ImportRemoteEntities': {'description': 'ImportRemoteEntities ' - 'adds entities to the ' - 'remote entities ' - 'collection with the ' - 'specified opaque ' - 'tokens.', - 'properties': {'Params': {'$ref': '#/definitions/RemoteEntityTokenArgs'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'Relations': {'description': 'Relations returns information ' - 'about the cross-model relations ' - 'with the specified keys\n' - 'in the local model.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/RemoteRelationResults'}}, - 'type': 'object'}, - 'RemoteApplications': {'description': 'RemoteApplications ' - 'returns the current ' - 'state of the remote ' - 'applications with\n' - 'the specified names in ' - 'the local model.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/RemoteApplicationResults'}}, - 'type': 'object'}, - 'SaveMacaroons': {'description': 'SaveMacaroons saves the ' - 'macaroons for the given ' - 'entities.', - 'properties': {'Params': {'$ref': '#/definitions/EntityMacaroonArgs'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'SetRemoteApplicationsStatus': {'description': 'SetRemoteApplicationsStatus ' - 'sets the ' - 'status for the ' - 'specified ' - 'remote ' - 'applications.', - 'properties': {'Params': {'$ref': '#/definitions/SetStatus'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'UpdateControllersForModels': {'description': 'UpdateControllersForModels ' - 'changes the ' - 'external ' - 'controller ' - 'records for ' - 'the\n' - 'associated ' - 'model entities. ' - 'This is used ' - 'when the remote ' - 'relations ' - 'worker gets\n' - 'redirected ' - 'following ' - 'migration of an ' - 'offering model.', - 'properties': {'Params': {'$ref': '#/definitions/UpdateControllersForModelsParams'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'WatchLocalRelationChanges': {'description': 'WatchLocalRelationChanges ' - 'starts a ' - 'RemoteRelationWatcher ' - 'for each\n' - 'specified ' - 'relation, ' - 'returning the ' - 'watcher IDs and ' - 'initial values,\n' - 'or an error if ' - 'the remote ' - 'relations ' - "couldn't be " - 'watched.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/RemoteRelationWatchResults'}}, - 'type': 'object'}, - 'WatchRemoteApplicationRelations': {'description': 'WatchRemoteApplicationRelations ' - 'starts a ' - 'StringsWatcher ' - 'for ' - 'watching ' - 'the ' - 'relations ' - 'of\n' - 'each ' - 'specified ' - 'application ' - 'in the ' - 'local ' - 'model, and ' - 'returns ' - 'the ' - 'watcher ' - 'IDs\n' - 'and ' - 'initial ' - 'values, or ' - 'an error ' - 'if the ' - "services' " - 'relations ' - 'could not ' - 'be\n' - 'watched.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/StringsWatchResults'}}, - 'type': 'object'}, - 'WatchRemoteApplications': {'description': 'WatchRemoteApplications ' - 'starts a strings ' - 'watcher that ' - 'notifies of the ' - 'addition,\n' - 'removal, and ' - 'lifecycle changes ' - 'of remote ' - 'applications in ' - 'the model; and\n' - 'returns the ' - 'watcher ID and ' - 'initial IDs of ' - 'remote ' - 'applications, or ' - 'an error if\n' - 'watching failed.', - 'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}}, - 'type': 'object'}, - 'WatchRemoteRelations': {'description': 'WatchRemoteRelations ' - 'starts a strings ' - 'watcher that notifies ' - 'of the addition,\n' - 'removal, and ' - 'lifecycle changes of ' - 'remote relations in ' - 'the model; and\n' - 'returns the watcher ' - 'ID and initial IDs of ' - 'remote relations, or ' - 'an error if\n' - 'watching failed.', - 'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}}, - 'type': 'object'}}, - 'type': 'object'} - - - @ReturnMapping(ErrorResults) - async def ConsumeRemoteRelationChanges(self, changes=None): - ''' - ConsumeRemoteRelationChanges consumes changes to settings originating - from the remote/offering side of relations. - - changes : typing.Sequence[~RemoteRelationChangeEvent] - Returns -> ErrorResults - ''' - if changes is not None and not isinstance(changes, (bytes, str, list)): - raise Exception("Expected changes to be a Sequence, received: {}".format(type(changes))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='RemoteRelations', - request='ConsumeRemoteRelationChanges', - version=2, - params=_params) - _params['changes'] = changes - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def ConsumeRemoteSecretChanges(self, changes=None): - ''' - ConsumeRemoteSecretChanges updates the local model with secret revision changes - originating from the remote/offering model. - - changes : typing.Sequence[~SecretRevisionChange] - Returns -> ErrorResults - ''' - if changes is not None and not isinstance(changes, (bytes, str, list)): - raise Exception("Expected changes to be a Sequence, received: {}".format(type(changes))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='RemoteRelations', - request='ConsumeRemoteSecretChanges', - version=2, - params=_params) - _params['changes'] = changes - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ControllerAPIInfoResults) - async def ControllerAPIInfoForModels(self, entities=None): - ''' - ControllerAPIInfoForModels returns the controller api connection details for the specified models. - - entities : typing.Sequence[~Entity] - Returns -> ControllerAPIInfoResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='RemoteRelations', - request='ControllerAPIInfoForModels', - version=2, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ControllerConfigResult) - async def ControllerConfig(self): - ''' - ControllerConfig returns the controller's configuration. - - - Returns -> ControllerConfigResult - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='RemoteRelations', - request='ControllerConfig', - version=2, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(TokenResults) - async def ExportEntities(self, entities=None): - ''' - ExportEntities allocates unique, remote entity IDs for the given entities in the local model. - - entities : typing.Sequence[~Entity] - Returns -> TokenResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='RemoteRelations', - request='ExportEntities', - version=2, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringResults) - async def GetTokens(self, args=None): - ''' - GetTokens returns the token associated with the entities with the given tags for the given models. - - args : typing.Sequence[~GetTokenArg] - Returns -> StringResults - ''' - if args is not None and not isinstance(args, (bytes, str, list)): - raise Exception("Expected args to be a Sequence, received: {}".format(type(args))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='RemoteRelations', - request='GetTokens', - version=2, - params=_params) - _params['Args'] = args - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def ImportRemoteEntities(self, args=None): - ''' - ImportRemoteEntities adds entities to the remote entities collection with the specified opaque tokens. - - args : typing.Sequence[~RemoteEntityTokenArg] - Returns -> ErrorResults - ''' - if args is not None and not isinstance(args, (bytes, str, list)): - raise Exception("Expected args to be a Sequence, received: {}".format(type(args))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='RemoteRelations', - request='ImportRemoteEntities', - version=2, - params=_params) - _params['Args'] = args - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(RemoteRelationResults) - async def Relations(self, entities=None): - ''' - Relations returns information about the cross-model relations with the specified keys - in the local model. - - entities : typing.Sequence[~Entity] - Returns -> RemoteRelationResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='RemoteRelations', - request='Relations', - version=2, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(RemoteApplicationResults) - async def RemoteApplications(self, entities=None): - ''' - RemoteApplications returns the current state of the remote applications with - the specified names in the local model. - - entities : typing.Sequence[~Entity] - Returns -> RemoteApplicationResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='RemoteRelations', - request='RemoteApplications', - version=2, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def SaveMacaroons(self, args=None): - ''' - SaveMacaroons saves the macaroons for the given entities. - - args : typing.Sequence[~EntityMacaroonArg] - Returns -> ErrorResults - ''' - if args is not None and not isinstance(args, (bytes, str, list)): - raise Exception("Expected args to be a Sequence, received: {}".format(type(args))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='RemoteRelations', - request='SaveMacaroons', - version=2, - params=_params) - _params['Args'] = args - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def SetRemoteApplicationsStatus(self, entities=None): - ''' - SetRemoteApplicationsStatus sets the status for the specified remote applications. - - entities : typing.Sequence[~EntityStatusArgs] - Returns -> ErrorResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='RemoteRelations', - request='SetRemoteApplicationsStatus', - version=2, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def UpdateControllersForModels(self, changes=None): - ''' - UpdateControllersForModels changes the external controller records for the - associated model entities. This is used when the remote relations worker gets - redirected following migration of an offering model. - - changes : typing.Sequence[~UpdateControllerForModel] - Returns -> ErrorResults - ''' - if changes is not None and not isinstance(changes, (bytes, str, list)): - raise Exception("Expected changes to be a Sequence, received: {}".format(type(changes))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='RemoteRelations', - request='UpdateControllersForModels', - version=2, - params=_params) - _params['changes'] = changes - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(RemoteRelationWatchResults) - async def WatchLocalRelationChanges(self, entities=None): - ''' - WatchLocalRelationChanges starts a RemoteRelationWatcher for each - specified relation, returning the watcher IDs and initial values, - or an error if the remote relations couldn't be watched. - - entities : typing.Sequence[~Entity] - Returns -> RemoteRelationWatchResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='RemoteRelations', - request='WatchLocalRelationChanges', - version=2, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringsWatchResults) - async def WatchRemoteApplicationRelations(self, entities=None): - ''' - WatchRemoteApplicationRelations starts a StringsWatcher for watching the relations of - each specified application in the local model, and returns the watcher IDs - and initial values, or an error if the services' relations could not be - watched. - - entities : typing.Sequence[~Entity] - Returns -> StringsWatchResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='RemoteRelations', - request='WatchRemoteApplicationRelations', - version=2, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringsWatchResult) - async def WatchRemoteApplications(self): - ''' - WatchRemoteApplications starts a strings watcher that notifies of the addition, - removal, and lifecycle changes of remote applications in the model; and - returns the watcher ID and initial IDs of remote applications, or an error if - watching failed. - - - Returns -> StringsWatchResult - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='RemoteRelations', - request='WatchRemoteApplications', - version=2, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringsWatchResult) - async def WatchRemoteRelations(self): - ''' - WatchRemoteRelations starts a strings watcher that notifies of the addition, - removal, and lifecycle changes of remote relations in the model; and - returns the watcher ID and initial IDs of remote relations, or an error if - watching failed. - - - Returns -> StringsWatchResult - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='RemoteRelations', - request='WatchRemoteRelations', - version=2, - params=_params) - - reply = await self.rpc(msg) - return reply - - - -class SecretsFacade(Type): - name = 'Secrets' - version = 2 - schema = {'definitions': {'CreateSecretArg': {'additionalProperties': False, - 'properties': {'UpsertSecretArg': {'$ref': '#/definitions/UpsertSecretArg'}, - 'content': {'$ref': '#/definitions/SecretContentParams'}, - 'description': {'type': 'string'}, - 'expire-time': {'format': 'date-time', - 'type': 'string'}, - 'label': {'type': 'string'}, - 'owner-tag': {'type': 'string'}, - 'params': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'rotate-policy': {'type': 'string'}, - 'uri': {'type': 'string'}}, - 'required': ['UpsertSecretArg', - 'owner-tag'], - 'type': 'object'}, - 'CreateSecretArgs': {'additionalProperties': False, - 'properties': {'args': {'items': {'$ref': '#/definitions/CreateSecretArg'}, - 'type': 'array'}}, - 'required': ['args'], - 'type': 'object'}, - 'DeleteSecretArg': {'additionalProperties': False, - 'properties': {'label': {'type': 'string'}, - 'revisions': {'items': {'type': 'integer'}, - 'type': 'array'}, - 'uri': {'type': 'string'}}, - 'required': ['uri', 'label'], - 'type': 'object'}, - 'DeleteSecretArgs': {'additionalProperties': False, - 'properties': {'args': {'items': {'$ref': '#/definitions/DeleteSecretArg'}, - 'type': 'array'}}, - 'required': ['args'], - 'type': 'object'}, - 'Error': {'additionalProperties': False, - 'properties': {'code': {'type': 'string'}, - 'info': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'message': {'type': 'string'}}, - 'required': ['message', 'code'], - 'type': 'object'}, - 'ErrorResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}}, - 'type': 'object'}, - 'ErrorResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'GrantRevokeUserSecretArg': {'additionalProperties': False, - 'properties': {'applications': {'items': {'type': 'string'}, - 'type': 'array'}, - 'label': {'type': 'string'}, - 'uri': {'type': 'string'}}, - 'required': ['uri', - 'label', - 'applications'], - 'type': 'object'}, - 'ListSecretResult': {'additionalProperties': False, - 'properties': {'create-time': {'format': 'date-time', - 'type': 'string'}, - 'description': {'type': 'string'}, - 'label': {'type': 'string'}, - 'latest-expire-time': {'format': 'date-time', - 'type': 'string'}, - 'latest-revision': {'type': 'integer'}, - 'next-rotate-time': {'format': 'date-time', - 'type': 'string'}, - 'owner-tag': {'type': 'string'}, - 'revisions': {'items': {'$ref': '#/definitions/SecretRevision'}, - 'type': 'array'}, - 'rotate-policy': {'type': 'string'}, - 'update-time': {'format': 'date-time', - 'type': 'string'}, - 'uri': {'type': 'string'}, - 'value': {'$ref': '#/definitions/SecretValueResult'}, - 'version': {'type': 'integer'}}, - 'required': ['uri', - 'version', - 'owner-tag', - 'latest-revision', - 'create-time', - 'update-time', - 'revisions'], - 'type': 'object'}, - 'ListSecretResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/ListSecretResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'ListSecretsArgs': {'additionalProperties': False, - 'properties': {'filter': {'$ref': '#/definitions/SecretsFilter'}, - 'show-secrets': {'type': 'boolean'}}, - 'required': ['show-secrets', 'filter'], - 'type': 'object'}, - 'SecretContentParams': {'additionalProperties': False, - 'properties': {'data': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}, - 'value-ref': {'$ref': '#/definitions/SecretValueRef'}}, - 'type': 'object'}, - 'SecretRevision': {'additionalProperties': False, - 'properties': {'backend-name': {'type': 'string'}, - 'create-time': {'format': 'date-time', - 'type': 'string'}, - 'expire-time': {'format': 'date-time', - 'type': 'string'}, - 'revision': {'type': 'integer'}, - 'update-time': {'format': 'date-time', - 'type': 'string'}, - 'value-ref': {'$ref': '#/definitions/SecretValueRef'}}, - 'required': ['revision'], - 'type': 'object'}, - 'SecretValueRef': {'additionalProperties': False, - 'properties': {'backend-id': {'type': 'string'}, - 'revision-id': {'type': 'string'}}, - 'required': ['backend-id', 'revision-id'], - 'type': 'object'}, - 'SecretValueResult': {'additionalProperties': False, - 'properties': {'data': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}, - 'error': {'$ref': '#/definitions/Error'}}, - 'type': 'object'}, - 'SecretsFilter': {'additionalProperties': False, - 'properties': {'label': {'type': 'string'}, - 'owner-tag': {'type': 'string'}, - 'revision': {'type': 'integer'}, - 'uri': {'type': 'string'}}, - 'type': 'object'}, - 'StringResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'result': {'type': 'string'}}, - 'required': ['result'], - 'type': 'object'}, - 'StringResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'UpdateUserSecretArg': {'additionalProperties': False, - 'properties': {'UpsertSecretArg': {'$ref': '#/definitions/UpsertSecretArg'}, - 'auto-prune': {'type': 'boolean'}, - 'content': {'$ref': '#/definitions/SecretContentParams'}, - 'description': {'type': 'string'}, - 'existing-label': {'type': 'string'}, - 'expire-time': {'format': 'date-time', - 'type': 'string'}, - 'label': {'type': 'string'}, - 'params': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'rotate-policy': {'type': 'string'}, - 'uri': {'type': 'string'}}, - 'required': ['UpsertSecretArg', - 'uri', - 'existing-label'], - 'type': 'object'}, - 'UpdateUserSecretArgs': {'additionalProperties': False, - 'properties': {'args': {'items': {'$ref': '#/definitions/UpdateUserSecretArg'}, - 'type': 'array'}}, - 'required': ['args'], - 'type': 'object'}, - 'UpsertSecretArg': {'additionalProperties': False, - 'properties': {'content': {'$ref': '#/definitions/SecretContentParams'}, - 'description': {'type': 'string'}, - 'expire-time': {'format': 'date-time', - 'type': 'string'}, - 'label': {'type': 'string'}, - 'params': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'rotate-policy': {'type': 'string'}}, - 'type': 'object'}}, - 'properties': {'CreateSecrets': {'description': 'CreateSecrets creates new ' - 'secrets.', - 'properties': {'Params': {'$ref': '#/definitions/CreateSecretArgs'}, - 'Result': {'$ref': '#/definitions/StringResults'}}, - 'type': 'object'}, - 'GrantSecret': {'description': 'GrantSecret grants access to a ' - 'user secret.', - 'properties': {'Params': {'$ref': '#/definitions/GrantRevokeUserSecretArg'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'ListSecrets': {'description': 'ListSecrets lists available ' - 'secrets.', - 'properties': {'Params': {'$ref': '#/definitions/ListSecretsArgs'}, - 'Result': {'$ref': '#/definitions/ListSecretResults'}}, - 'type': 'object'}, - 'RemoveSecrets': {'description': 'RemoveSecrets remove user ' - 'secret.', - 'properties': {'Params': {'$ref': '#/definitions/DeleteSecretArgs'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'RevokeSecret': {'description': 'RevokeSecret revokes access ' - 'to a user secret.', - 'properties': {'Params': {'$ref': '#/definitions/GrantRevokeUserSecretArg'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'UpdateSecrets': {'description': 'UpdateSecrets creates new ' - 'secrets.', - 'properties': {'Params': {'$ref': '#/definitions/UpdateUserSecretArgs'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}}, - 'type': 'object'} - - - @ReturnMapping(StringResults) - async def CreateSecrets(self, args=None): - ''' - CreateSecrets creates new secrets. - - args : typing.Sequence[~CreateSecretArg] - Returns -> StringResults - ''' - if args is not None and not isinstance(args, (bytes, str, list)): - raise Exception("Expected args to be a Sequence, received: {}".format(type(args))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Secrets', - request='CreateSecrets', - version=2, - params=_params) - _params['args'] = args - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def GrantSecret(self, applications=None, label=None, uri=None): - ''' - GrantSecret grants access to a user secret. - - applications : typing.Sequence[str] - label : str - uri : str - Returns -> ErrorResults - ''' - if applications is not None and not isinstance(applications, (bytes, str, list)): - raise Exception("Expected applications to be a Sequence, received: {}".format(type(applications))) - - if label is not None and not isinstance(label, (bytes, str)): - raise Exception("Expected label to be a str, received: {}".format(type(label))) - - if uri is not None and not isinstance(uri, (bytes, str)): - raise Exception("Expected uri to be a str, received: {}".format(type(uri))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Secrets', - request='GrantSecret', - version=2, - params=_params) - _params['applications'] = applications - _params['label'] = label - _params['uri'] = uri - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ListSecretResults) - async def ListSecrets(self, filter_=None, show_secrets=None): - ''' - ListSecrets lists available secrets. - - filter_ : SecretsFilter - show_secrets : bool - Returns -> ListSecretResults - ''' - if filter_ is not None and not isinstance(filter_, (dict, SecretsFilter)): - raise Exception("Expected filter_ to be a SecretsFilter, received: {}".format(type(filter_))) - - if show_secrets is not None and not isinstance(show_secrets, bool): - raise Exception("Expected show_secrets to be a bool, received: {}".format(type(show_secrets))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Secrets', - request='ListSecrets', - version=2, - params=_params) - _params['filter'] = filter_ - _params['show-secrets'] = show_secrets - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def RemoveSecrets(self, args=None): - ''' - RemoveSecrets remove user secret. - - args : typing.Sequence[~DeleteSecretArg] - Returns -> ErrorResults - ''' - if args is not None and not isinstance(args, (bytes, str, list)): - raise Exception("Expected args to be a Sequence, received: {}".format(type(args))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Secrets', - request='RemoveSecrets', - version=2, - params=_params) - _params['args'] = args - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def RevokeSecret(self, applications=None, label=None, uri=None): - ''' - RevokeSecret revokes access to a user secret. - - applications : typing.Sequence[str] - label : str - uri : str - Returns -> ErrorResults - ''' - if applications is not None and not isinstance(applications, (bytes, str, list)): - raise Exception("Expected applications to be a Sequence, received: {}".format(type(applications))) - - if label is not None and not isinstance(label, (bytes, str)): - raise Exception("Expected label to be a str, received: {}".format(type(label))) - - if uri is not None and not isinstance(uri, (bytes, str)): - raise Exception("Expected uri to be a str, received: {}".format(type(uri))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Secrets', - request='RevokeSecret', - version=2, - params=_params) - _params['applications'] = applications - _params['label'] = label - _params['uri'] = uri - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def UpdateSecrets(self, args=None): - ''' - UpdateSecrets creates new secrets. - - args : typing.Sequence[~UpdateUserSecretArg] - Returns -> ErrorResults - ''' - if args is not None and not isinstance(args, (bytes, str, list)): - raise Exception("Expected args to be a Sequence, received: {}".format(type(args))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Secrets', - request='UpdateSecrets', - version=2, - params=_params) - _params['args'] = args - reply = await self.rpc(msg) - return reply - - - -class SecretsManagerFacade(Type): - name = 'SecretsManager' - version = 2 - schema = {'definitions': {'CreateSecretArg': {'additionalProperties': False, - 'properties': {'UpsertSecretArg': {'$ref': '#/definitions/UpsertSecretArg'}, - 'content': {'$ref': '#/definitions/SecretContentParams'}, - 'description': {'type': 'string'}, - 'expire-time': {'format': 'date-time', - 'type': 'string'}, - 'label': {'type': 'string'}, - 'owner-tag': {'type': 'string'}, - 'params': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'rotate-policy': {'type': 'string'}, - 'uri': {'type': 'string'}}, - 'required': ['UpsertSecretArg', - 'owner-tag'], - 'type': 'object'}, - 'CreateSecretArgs': {'additionalProperties': False, - 'properties': {'args': {'items': {'$ref': '#/definitions/CreateSecretArg'}, - 'type': 'array'}}, - 'required': ['args'], - 'type': 'object'}, - 'CreateSecretURIsArg': {'additionalProperties': False, - 'properties': {'count': {'type': 'integer'}}, - 'required': ['count'], - 'type': 'object'}, - 'DeleteSecretArg': {'additionalProperties': False, - 'properties': {'label': {'type': 'string'}, - 'revisions': {'items': {'type': 'integer'}, - 'type': 'array'}, - 'uri': {'type': 'string'}}, - 'required': ['uri', 'label'], - 'type': 'object'}, - 'DeleteSecretArgs': {'additionalProperties': False, - 'properties': {'args': {'items': {'$ref': '#/definitions/DeleteSecretArg'}, - 'type': 'array'}}, - 'required': ['args'], - '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': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'message': {'type': 'string'}}, - 'required': ['message', 'code'], - 'type': 'object'}, - 'ErrorResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}}, - 'type': 'object'}, - 'ErrorResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'GetSecretConsumerInfoArgs': {'additionalProperties': False, - 'properties': {'consumer-tag': {'type': 'string'}, - 'uris': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'required': ['consumer-tag', - 'uris'], - 'type': 'object'}, - 'GetSecretContentArg': {'additionalProperties': False, - 'properties': {'label': {'type': 'string'}, - 'peek': {'type': 'boolean'}, - 'refresh': {'type': 'boolean'}, - 'uri': {'type': 'string'}}, - 'required': ['uri'], - 'type': 'object'}, - 'GetSecretContentArgs': {'additionalProperties': False, - 'properties': {'args': {'items': {'$ref': '#/definitions/GetSecretContentArg'}, - 'type': 'array'}}, - 'required': ['args'], - 'type': 'object'}, - 'GrantRevokeSecretArg': {'additionalProperties': False, - 'properties': {'role': {'type': 'string'}, - 'scope-tag': {'type': 'string'}, - 'subject-tags': {'items': {'type': 'string'}, - 'type': 'array'}, - 'uri': {'type': 'string'}}, - 'required': ['uri', - 'scope-tag', - 'subject-tags', - 'role'], - 'type': 'object'}, - 'GrantRevokeSecretArgs': {'additionalProperties': False, - 'properties': {'args': {'items': {'$ref': '#/definitions/GrantRevokeSecretArg'}, - 'type': 'array'}}, - 'required': ['args'], - 'type': 'object'}, - 'ListSecretResult': {'additionalProperties': False, - 'properties': {'create-time': {'format': 'date-time', - 'type': 'string'}, - 'description': {'type': 'string'}, - 'label': {'type': 'string'}, - 'latest-expire-time': {'format': 'date-time', - 'type': 'string'}, - 'latest-revision': {'type': 'integer'}, - 'next-rotate-time': {'format': 'date-time', - 'type': 'string'}, - 'owner-tag': {'type': 'string'}, - 'revisions': {'items': {'$ref': '#/definitions/SecretRevision'}, - 'type': 'array'}, - 'rotate-policy': {'type': 'string'}, - 'update-time': {'format': 'date-time', - 'type': 'string'}, - 'uri': {'type': 'string'}, - 'value': {'$ref': '#/definitions/SecretValueResult'}, - 'version': {'type': 'integer'}}, - 'required': ['uri', - 'version', - 'owner-tag', - 'latest-revision', - 'create-time', - 'update-time', - 'revisions'], - 'type': 'object'}, - 'ListSecretResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/ListSecretResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'SecretBackendArgs': {'additionalProperties': False, - 'properties': {'backend-ids': {'items': {'type': 'string'}, - 'type': 'array'}, - 'for-drain': {'type': 'boolean'}}, - 'required': ['for-drain', 'backend-ids'], - 'type': 'object'}, - 'SecretBackendConfig': {'additionalProperties': False, - 'properties': {'params': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'type': {'type': 'string'}}, - 'required': ['type'], - 'type': 'object'}, - 'SecretBackendConfigResult': {'additionalProperties': False, - 'properties': {'config': {'$ref': '#/definitions/SecretBackendConfig'}, - 'draining': {'type': 'boolean'}, - 'model-controller': {'type': 'string'}, - 'model-name': {'type': 'string'}, - 'model-uuid': {'type': 'string'}}, - 'required': ['model-controller', - 'model-uuid', - 'model-name', - 'draining'], - 'type': 'object'}, - 'SecretBackendConfigResults': {'additionalProperties': False, - 'properties': {'active-id': {'type': 'string'}, - 'results': {'patternProperties': {'.*': {'$ref': '#/definitions/SecretBackendConfigResult'}}, - 'type': 'object'}}, - 'required': ['active-id'], - 'type': 'object'}, - 'SecretConsumerInfoResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'label': {'type': 'string'}, - 'revision': {'type': 'integer'}}, - 'required': ['revision', 'label'], - 'type': 'object'}, - 'SecretConsumerInfoResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/SecretConsumerInfoResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'SecretContentParams': {'additionalProperties': False, - 'properties': {'data': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}, - 'value-ref': {'$ref': '#/definitions/SecretValueRef'}}, - 'type': 'object'}, - 'SecretContentResult': {'additionalProperties': False, - 'properties': {'backend-config': {'$ref': '#/definitions/SecretBackendConfigResult'}, - 'content': {'$ref': '#/definitions/SecretContentParams'}, - 'error': {'$ref': '#/definitions/Error'}, - 'latest-revision': {'type': 'integer'}}, - 'required': ['content'], - 'type': 'object'}, - 'SecretContentResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/SecretContentResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'SecretRevision': {'additionalProperties': False, - 'properties': {'backend-name': {'type': 'string'}, - 'create-time': {'format': 'date-time', - 'type': 'string'}, - 'expire-time': {'format': 'date-time', - 'type': 'string'}, - 'revision': {'type': 'integer'}, - 'update-time': {'format': 'date-time', - 'type': 'string'}, - 'value-ref': {'$ref': '#/definitions/SecretValueRef'}}, - 'required': ['revision'], - 'type': 'object'}, - 'SecretRevisionArg': {'additionalProperties': False, - 'properties': {'pending-delete': {'type': 'boolean'}, - 'revisions': {'items': {'type': 'integer'}, - 'type': 'array'}, - 'uri': {'type': 'string'}}, - 'required': ['uri', - 'revisions', - 'pending-delete'], - 'type': 'object'}, - 'SecretRotatedArg': {'additionalProperties': False, - 'properties': {'original-revision': {'type': 'integer'}, - 'skip': {'type': 'boolean'}, - 'uri': {'type': 'string'}}, - 'required': ['uri', - 'original-revision', - 'skip'], - 'type': 'object'}, - 'SecretRotatedArgs': {'additionalProperties': False, - 'properties': {'args': {'items': {'$ref': '#/definitions/SecretRotatedArg'}, - 'type': 'array'}}, - 'required': ['args'], - 'type': 'object'}, - 'SecretTriggerChange': {'additionalProperties': False, - 'properties': {'next-trigger-time': {'format': 'date-time', - 'type': 'string'}, - 'revision': {'type': 'integer'}, - 'uri': {'type': 'string'}}, - 'required': ['uri', - 'next-trigger-time'], - 'type': 'object'}, - 'SecretTriggerWatchResult': {'additionalProperties': False, - 'properties': {'changes': {'items': {'$ref': '#/definitions/SecretTriggerChange'}, - 'type': 'array'}, - 'error': {'$ref': '#/definitions/Error'}, - 'watcher-id': {'type': 'string'}}, - 'required': ['watcher-id', - 'changes'], - 'type': 'object'}, - 'SecretValueRef': {'additionalProperties': False, - 'properties': {'backend-id': {'type': 'string'}, - 'revision-id': {'type': 'string'}}, - 'required': ['backend-id', 'revision-id'], - 'type': 'object'}, - 'SecretValueResult': {'additionalProperties': False, - 'properties': {'data': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}, - 'error': {'$ref': '#/definitions/Error'}}, - 'type': 'object'}, - 'StringResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'result': {'type': 'string'}}, - 'required': ['result'], - 'type': 'object'}, - 'StringResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'StringsWatchResult': {'additionalProperties': False, - 'properties': {'changes': {'items': {'type': 'string'}, - 'type': 'array'}, - 'error': {'$ref': '#/definitions/Error'}, - 'watcher-id': {'type': 'string'}}, - 'required': ['watcher-id'], - 'type': 'object'}, - 'StringsWatchResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'UpdateSecretArg': {'additionalProperties': False, - 'properties': {'UpsertSecretArg': {'$ref': '#/definitions/UpsertSecretArg'}, - 'content': {'$ref': '#/definitions/SecretContentParams'}, - 'description': {'type': 'string'}, - 'expire-time': {'format': 'date-time', - 'type': 'string'}, - 'label': {'type': 'string'}, - 'params': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'rotate-policy': {'type': 'string'}, - 'uri': {'type': 'string'}}, - 'required': ['UpsertSecretArg', 'uri'], - 'type': 'object'}, - 'UpdateSecretArgs': {'additionalProperties': False, - 'properties': {'args': {'items': {'$ref': '#/definitions/UpdateSecretArg'}, - 'type': 'array'}}, - 'required': ['args'], - 'type': 'object'}, - 'UpsertSecretArg': {'additionalProperties': False, - 'properties': {'content': {'$ref': '#/definitions/SecretContentParams'}, - 'description': {'type': 'string'}, - 'expire-time': {'format': 'date-time', - 'type': 'string'}, - 'label': {'type': 'string'}, - 'params': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'rotate-policy': {'type': 'string'}}, - 'type': 'object'}}, - 'properties': {'CreateSecretURIs': {'description': 'CreateSecretURIs creates ' - 'new secret URIs.', - 'properties': {'Params': {'$ref': '#/definitions/CreateSecretURIsArg'}, - 'Result': {'$ref': '#/definitions/StringResults'}}, - 'type': 'object'}, - 'CreateSecrets': {'description': 'CreateSecrets creates new ' - 'secrets.', - 'properties': {'Params': {'$ref': '#/definitions/CreateSecretArgs'}, - 'Result': {'$ref': '#/definitions/StringResults'}}, - 'type': 'object'}, - 'GetConsumerSecretsRevisionInfo': {'description': 'GetConsumerSecretsRevisionInfo ' - 'returns the ' - 'latest ' - 'secret ' - 'revisions ' - 'for the ' - 'specified ' - 'secrets.\n' - 'This facade ' - 'method is ' - 'used for ' - 'remote ' - 'watcher to ' - 'get the ' - 'latest ' - 'secret ' - 'revisions ' - 'and labels ' - 'for a ' - 'secret ' - 'changed ' - 'hook.', - 'properties': {'Params': {'$ref': '#/definitions/GetSecretConsumerInfoArgs'}, - 'Result': {'$ref': '#/definitions/SecretConsumerInfoResults'}}, - 'type': 'object'}, - 'GetSecretBackendConfigs': {'description': 'GetSecretBackendConfigs ' - 'gets the config ' - 'needed to create a ' - 'client to secret ' - 'backends.', - 'properties': {'Params': {'$ref': '#/definitions/SecretBackendArgs'}, - 'Result': {'$ref': '#/definitions/SecretBackendConfigResults'}}, - 'type': 'object'}, - 'GetSecretContentInfo': {'description': 'GetSecretContentInfo ' - 'returns the secret ' - 'values for the ' - 'specified secrets.', - 'properties': {'Params': {'$ref': '#/definitions/GetSecretContentArgs'}, - 'Result': {'$ref': '#/definitions/SecretContentResults'}}, - 'type': 'object'}, - 'GetSecretMetadata': {'description': 'GetSecretMetadata ' - 'returns metadata for the ' - "caller's secrets.", - 'properties': {'Result': {'$ref': '#/definitions/ListSecretResults'}}, - 'type': 'object'}, - 'GetSecretRevisionContentInfo': {'description': 'GetSecretRevisionContentInfo ' - 'returns the ' - 'secret values ' - 'for the ' - 'specified ' - 'secret ' - 'revisions.', - 'properties': {'Params': {'$ref': '#/definitions/SecretRevisionArg'}, - 'Result': {'$ref': '#/definitions/SecretContentResults'}}, - 'type': 'object'}, - 'RemoveSecrets': {'description': 'RemoveSecrets removes the ' - 'specified secrets.', - 'properties': {'Params': {'$ref': '#/definitions/DeleteSecretArgs'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'SecretsGrant': {'description': 'SecretsGrant grants access to ' - 'a secret for the specified ' - 'subjects.', - 'properties': {'Params': {'$ref': '#/definitions/GrantRevokeSecretArgs'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'SecretsRevoke': {'description': 'SecretsRevoke revokes access ' - 'to a secret for the ' - 'specified subjects.', - 'properties': {'Params': {'$ref': '#/definitions/GrantRevokeSecretArgs'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'SecretsRotated': {'description': 'SecretsRotated records when ' - 'secrets were last rotated.', - 'properties': {'Params': {'$ref': '#/definitions/SecretRotatedArgs'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'UpdateSecrets': {'description': 'UpdateSecrets updates the ' - 'specified secrets.', - 'properties': {'Params': {'$ref': '#/definitions/UpdateSecretArgs'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'WatchConsumedSecretsChanges': {'description': 'WatchConsumedSecretsChanges ' - 'sets up a ' - 'watcher to ' - 'notify of ' - 'changes to ' - 'secret ' - 'revisions for ' - 'the specified ' - 'consumers.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/StringsWatchResults'}}, - 'type': 'object'}, - 'WatchObsolete': {'description': 'WatchObsolete returns a ' - 'watcher for notifying when:\n' - ' - a secret owned by the ' - 'entity is deleted\n' - ' - a secret revision owed ' - 'by the entity no longer\n' - ' has any consumers\n' - '\n' - 'Obsolete revisions results ' - 'are "uri/revno" and deleted\n' - 'secret results are "uri".', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/StringsWatchResult'}}, - 'type': 'object'}, - 'WatchSecretRevisionsExpiryChanges': {'description': 'WatchSecretRevisionsExpiryChanges ' - 'sets up ' - 'a ' - 'watcher ' - 'to ' - 'notify ' - 'of ' - 'changes ' - 'to ' - 'secret ' - 'revision ' - 'expiry ' - 'config.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/SecretTriggerWatchResult'}}, - 'type': 'object'}, - 'WatchSecretsRotationChanges': {'description': 'WatchSecretsRotationChanges ' - 'sets up a ' - 'watcher to ' - 'notify of ' - 'changes to ' - 'secret ' - 'rotation ' - 'config.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/SecretTriggerWatchResult'}}, - 'type': 'object'}}, - 'type': 'object'} - - - @ReturnMapping(StringResults) - async def CreateSecretURIs(self, count=None): - ''' - CreateSecretURIs creates new secret URIs. - - count : int - Returns -> StringResults - ''' - if count is not None and not isinstance(count, int): - raise Exception("Expected count to be a int, received: {}".format(type(count))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='SecretsManager', - request='CreateSecretURIs', - version=2, - params=_params) - _params['count'] = count - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringResults) - async def CreateSecrets(self, args=None): - ''' - CreateSecrets creates new secrets. - - args : typing.Sequence[~CreateSecretArg] - Returns -> StringResults - ''' - if args is not None and not isinstance(args, (bytes, str, list)): - raise Exception("Expected args to be a Sequence, received: {}".format(type(args))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='SecretsManager', - request='CreateSecrets', - version=2, - params=_params) - _params['args'] = args - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(SecretConsumerInfoResults) - async def GetConsumerSecretsRevisionInfo(self, consumer_tag=None, uris=None): - ''' - GetConsumerSecretsRevisionInfo returns the latest secret revisions for the specified secrets. - This facade method is used for remote watcher to get the latest secret revisions and labels for a secret changed hook. - - consumer_tag : str - uris : typing.Sequence[str] - Returns -> SecretConsumerInfoResults - ''' - if consumer_tag is not None and not isinstance(consumer_tag, (bytes, str)): - raise Exception("Expected consumer_tag to be a str, received: {}".format(type(consumer_tag))) - - if uris is not None and not isinstance(uris, (bytes, str, list)): - raise Exception("Expected uris to be a Sequence, received: {}".format(type(uris))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='SecretsManager', - request='GetConsumerSecretsRevisionInfo', - version=2, - params=_params) - _params['consumer-tag'] = consumer_tag - _params['uris'] = uris - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(SecretBackendConfigResults) - async def GetSecretBackendConfigs(self, backend_ids=None, for_drain=None): - ''' - GetSecretBackendConfigs gets the config needed to create a client to secret backends. - - backend_ids : typing.Sequence[str] - for_drain : bool - Returns -> SecretBackendConfigResults - ''' - if backend_ids is not None and not isinstance(backend_ids, (bytes, str, list)): - raise Exception("Expected backend_ids to be a Sequence, received: {}".format(type(backend_ids))) - - if for_drain is not None and not isinstance(for_drain, bool): - raise Exception("Expected for_drain to be a bool, received: {}".format(type(for_drain))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='SecretsManager', - request='GetSecretBackendConfigs', - version=2, - params=_params) - _params['backend-ids'] = backend_ids - _params['for-drain'] = for_drain - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(SecretContentResults) - async def GetSecretContentInfo(self, args=None): - ''' - GetSecretContentInfo returns the secret values for the specified secrets. - - args : typing.Sequence[~GetSecretContentArg] - Returns -> SecretContentResults - ''' - if args is not None and not isinstance(args, (bytes, str, list)): - raise Exception("Expected args to be a Sequence, received: {}".format(type(args))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='SecretsManager', - request='GetSecretContentInfo', - version=2, - params=_params) - _params['args'] = args - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ListSecretResults) - async def GetSecretMetadata(self): - ''' - GetSecretMetadata returns metadata for the caller's secrets. - - - Returns -> ListSecretResults - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='SecretsManager', - request='GetSecretMetadata', - version=2, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(SecretContentResults) - async def GetSecretRevisionContentInfo(self, pending_delete=None, revisions=None, uri=None): - ''' - GetSecretRevisionContentInfo returns the secret values for the specified secret revisions. - - pending_delete : bool - revisions : typing.Sequence[int] - uri : str - Returns -> SecretContentResults - ''' - if pending_delete is not None and not isinstance(pending_delete, bool): - raise Exception("Expected pending_delete to be a bool, received: {}".format(type(pending_delete))) - - if revisions is not None and not isinstance(revisions, (bytes, str, list)): - raise Exception("Expected revisions to be a Sequence, received: {}".format(type(revisions))) - - if uri is not None and not isinstance(uri, (bytes, str)): - raise Exception("Expected uri to be a str, received: {}".format(type(uri))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='SecretsManager', - request='GetSecretRevisionContentInfo', - version=2, - params=_params) - _params['pending-delete'] = pending_delete - _params['revisions'] = revisions - _params['uri'] = uri - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def RemoveSecrets(self, args=None): - ''' - RemoveSecrets removes the specified secrets. - - args : typing.Sequence[~DeleteSecretArg] - Returns -> ErrorResults - ''' - if args is not None and not isinstance(args, (bytes, str, list)): - raise Exception("Expected args to be a Sequence, received: {}".format(type(args))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='SecretsManager', - request='RemoveSecrets', - version=2, - params=_params) - _params['args'] = args - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def SecretsGrant(self, args=None): - ''' - SecretsGrant grants access to a secret for the specified subjects. - - args : typing.Sequence[~GrantRevokeSecretArg] - Returns -> ErrorResults - ''' - if args is not None and not isinstance(args, (bytes, str, list)): - raise Exception("Expected args to be a Sequence, received: {}".format(type(args))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='SecretsManager', - request='SecretsGrant', - version=2, - params=_params) - _params['args'] = args - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def SecretsRevoke(self, args=None): - ''' - SecretsRevoke revokes access to a secret for the specified subjects. - - args : typing.Sequence[~GrantRevokeSecretArg] - Returns -> ErrorResults - ''' - if args is not None and not isinstance(args, (bytes, str, list)): - raise Exception("Expected args to be a Sequence, received: {}".format(type(args))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='SecretsManager', - request='SecretsRevoke', - version=2, - params=_params) - _params['args'] = args - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def SecretsRotated(self, args=None): - ''' - SecretsRotated records when secrets were last rotated. - - args : typing.Sequence[~SecretRotatedArg] - Returns -> ErrorResults - ''' - if args is not None and not isinstance(args, (bytes, str, list)): - raise Exception("Expected args to be a Sequence, received: {}".format(type(args))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='SecretsManager', - request='SecretsRotated', - version=2, - params=_params) - _params['args'] = args - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def UpdateSecrets(self, args=None): - ''' - UpdateSecrets updates the specified secrets. - - args : typing.Sequence[~UpdateSecretArg] - Returns -> ErrorResults - ''' - if args is not None and not isinstance(args, (bytes, str, list)): - raise Exception("Expected args to be a Sequence, received: {}".format(type(args))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='SecretsManager', - request='UpdateSecrets', - version=2, - params=_params) - _params['args'] = args - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringsWatchResults) - async def WatchConsumedSecretsChanges(self, entities=None): - ''' - WatchConsumedSecretsChanges sets up a watcher to notify of changes to secret revisions for the specified consumers. - - entities : typing.Sequence[~Entity] - Returns -> StringsWatchResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='SecretsManager', - request='WatchConsumedSecretsChanges', - version=2, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringsWatchResult) - async def WatchObsolete(self, entities=None): - ''' - WatchObsolete returns a watcher for notifying when: - - a secret owned by the entity is deleted - - a secret revision owed by the entity no longer - has any consumers - - Obsolete revisions results are "uri/revno" and deleted - secret results are "uri". - - entities : typing.Sequence[~Entity] - Returns -> StringsWatchResult - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='SecretsManager', - request='WatchObsolete', - version=2, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(SecretTriggerWatchResult) - async def WatchSecretRevisionsExpiryChanges(self, entities=None): - ''' - WatchSecretRevisionsExpiryChanges sets up a watcher to notify of changes to secret revision expiry config. - - entities : typing.Sequence[~Entity] - Returns -> SecretTriggerWatchResult - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='SecretsManager', - request='WatchSecretRevisionsExpiryChanges', - version=2, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(SecretTriggerWatchResult) - async def WatchSecretsRotationChanges(self, entities=None): - ''' - WatchSecretsRotationChanges sets up a watcher to notify of changes to secret rotation config. - - entities : typing.Sequence[~Entity] - Returns -> SecretTriggerWatchResult - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='SecretsManager', - request='WatchSecretsRotationChanges', - version=2, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - -class SingularFacade(Type): - name = 'Singular' - 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': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'message': {'type': 'string'}}, - 'required': ['message', 'code'], - 'type': 'object'}, - 'ErrorResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}}, - 'type': 'object'}, - 'ErrorResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'SingularClaim': {'additionalProperties': False, - 'properties': {'claimant-tag': {'type': 'string'}, - 'duration': {'type': 'integer'}, - 'entity-tag': {'type': 'string'}}, - 'required': ['entity-tag', - 'claimant-tag', - 'duration'], - 'type': 'object'}, - 'SingularClaims': {'additionalProperties': False, - 'properties': {'claims': {'items': {'$ref': '#/definitions/SingularClaim'}, + 'StringResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'}, 'type': 'array'}}, - 'required': ['claims'], - 'type': 'object'}}, - 'properties': {'Claim': {'description': 'Claim makes the supplied ' - 'singular-controller lease requests. ' - '(In practice,\n' - 'any requests not for the ' - "connection's model or controller, or " - 'not on behalf\n' - 'of the connected ModelManager ' - 'machine, will be rejected.)', - 'properties': {'Params': {'$ref': '#/definitions/SingularClaims'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'Wait': {'description': 'Wait waits for the ' - 'singular-controller lease to expire ' - 'for all supplied\n' - 'entities. (In practice, any requests ' - 'that do not refer to the ' - "connection's\n" - 'model or controller will be ' - 'rejected.)', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}}, + 'required': ['results'], + 'type': 'object'}, + 'UpdateUserSecretArg': {'additionalProperties': False, + 'properties': {'UpsertSecretArg': {'$ref': '#/definitions/UpsertSecretArg'}, + 'auto-prune': {'type': 'boolean'}, + 'content': {'$ref': '#/definitions/SecretContentParams'}, + 'description': {'type': 'string'}, + 'existing-label': {'type': 'string'}, + 'expire-time': {'format': 'date-time', + 'type': 'string'}, + 'label': {'type': 'string'}, + 'params': {'patternProperties': {'.*': {'additionalProperties': True, + 'type': 'object'}}, + 'type': 'object'}, + 'rotate-policy': {'type': 'string'}, + 'uri': {'type': 'string'}}, + 'required': ['UpsertSecretArg', + 'uri', + 'existing-label'], + 'type': 'object'}, + 'UpdateUserSecretArgs': {'additionalProperties': False, + 'properties': {'args': {'items': {'$ref': '#/definitions/UpdateUserSecretArg'}, + 'type': 'array'}}, + 'required': ['args'], + 'type': 'object'}, + 'UpsertSecretArg': {'additionalProperties': False, + 'properties': {'content': {'$ref': '#/definitions/SecretContentParams'}, + 'description': {'type': 'string'}, + 'expire-time': {'format': 'date-time', + 'type': 'string'}, + 'label': {'type': 'string'}, + 'params': {'patternProperties': {'.*': {'additionalProperties': True, + 'type': 'object'}}, + 'type': 'object'}, + 'rotate-policy': {'type': 'string'}}, + 'type': 'object'}}, + 'properties': {'CreateSecrets': {'description': 'CreateSecrets creates new ' + 'secrets.', + 'properties': {'Params': {'$ref': '#/definitions/CreateSecretArgs'}, + 'Result': {'$ref': '#/definitions/StringResults'}}, + 'type': 'object'}, + 'GrantSecret': {'description': 'GrantSecret grants access to a ' + 'user secret.', + 'properties': {'Params': {'$ref': '#/definitions/GrantRevokeUserSecretArg'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}, + 'ListSecrets': {'description': 'ListSecrets lists available ' + 'secrets.', + 'properties': {'Params': {'$ref': '#/definitions/ListSecretsArgs'}, + 'Result': {'$ref': '#/definitions/ListSecretResults'}}, + 'type': 'object'}, + 'RemoveSecrets': {'description': 'RemoveSecrets remove user ' + 'secret.', + 'properties': {'Params': {'$ref': '#/definitions/DeleteSecretArgs'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}, + 'RevokeSecret': {'description': 'RevokeSecret revokes access ' + 'to a user secret.', + 'properties': {'Params': {'$ref': '#/definitions/GrantRevokeUserSecretArg'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}, + 'UpdateSecrets': {'description': 'UpdateSecrets creates new ' + 'secrets.', + 'properties': {'Params': {'$ref': '#/definitions/UpdateUserSecretArgs'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}}, 'type': 'object'} - @ReturnMapping(ErrorResults) - async def Claim(self, claims=None): + @ReturnMapping(StringResults) + async def CreateSecrets(self, args=None): ''' - Claim makes the supplied singular-controller lease requests. (In practice, - any requests not for the connection's model or controller, or not on behalf - of the connected ModelManager machine, will be rejected.) + CreateSecrets creates new secrets. - claims : typing.Sequence[~SingularClaim] - Returns -> ErrorResults + args : typing.Sequence[~CreateSecretArg] + Returns -> StringResults ''' - if claims is not None and not isinstance(claims, (bytes, str, list)): - raise Exception("Expected claims to be a Sequence, received: {}".format(type(claims))) + if args is not None and not isinstance(args, (bytes, str, list)): + raise Exception("Expected args to be a Sequence, received: {}".format(type(args))) # map input types to rpc msg _params = dict() - msg = dict(type='Singular', - request='Claim', + msg = dict(type='Secrets', + request='CreateSecrets', version=2, params=_params) - _params['claims'] = claims + _params['args'] = args reply = await self.rpc(msg) return reply @ReturnMapping(ErrorResults) - async def Wait(self, entities=None): + async def GrantSecret(self, applications=None, label=None, uri=None): ''' - Wait waits for the singular-controller lease to expire for all supplied - entities. (In practice, any requests that do not refer to the connection's - model or controller will be rejected.) + GrantSecret grants access to a user secret. - entities : typing.Sequence[~Entity] + applications : typing.Sequence[str] + label : str + uri : str Returns -> ErrorResults ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Singular', - request='Wait', - version=2, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - -class StatusHistoryFacade(Type): - name = 'StatusHistory' - version = 2 - schema = {'definitions': {'Error': {'additionalProperties': False, - 'properties': {'code': {'type': 'string'}, - 'info': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'message': {'type': 'string'}}, - 'required': ['message', 'code'], - 'type': 'object'}, - 'ModelConfigResult': {'additionalProperties': False, - 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}}, - 'required': ['config'], - 'type': 'object'}, - 'NotifyWatchResult': {'additionalProperties': False, - 'properties': {'NotifyWatcherId': {'type': 'string'}, - 'error': {'$ref': '#/definitions/Error'}}, - 'required': ['NotifyWatcherId'], - 'type': 'object'}, - 'StatusHistoryPruneArgs': {'additionalProperties': False, - 'properties': {'max-history-mb': {'type': 'integer'}, - 'max-history-time': {'type': 'integer'}}, - 'required': ['max-history-time', - 'max-history-mb'], - 'type': 'object'}}, - 'properties': {'ModelConfig': {'description': 'ModelConfig returns the ' - "current model's configuration.", - 'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}}, - 'type': 'object'}, - 'Prune': {'description': 'Prune endpoint removes status ' - 'history entries until\n' - 'only the ones newer than now - ' - 'p.MaxHistoryTime remain and\n' - 'the history is smaller than ' - 'p.MaxHistoryMB.', - 'properties': {'Params': {'$ref': '#/definitions/StatusHistoryPruneArgs'}}, - 'type': 'object'}, - 'WatchForModelConfigChanges': {'description': 'WatchForModelConfigChanges ' - 'returns a ' - 'NotifyWatcher ' - 'that observes\n' - 'changes to the ' - 'model ' - 'configuration.\n' - 'Note that ' - 'although the ' - 'NotifyWatchResult ' - 'contains an ' - 'Error field,\n' - "it's not used " - 'because we are ' - 'only returning ' - 'a single ' - 'watcher,\n' - 'so we use the ' - 'regular error ' - 'return.', - 'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}}, - 'type': 'object'}}, - 'type': 'object'} - - - @ReturnMapping(ModelConfigResult) - async def ModelConfig(self): - ''' - ModelConfig returns the current model's configuration. - - - Returns -> ModelConfigResult - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='StatusHistory', - request='ModelConfig', - version=2, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(None) - async def Prune(self, max_history_mb=None, max_history_time=None): - ''' - Prune endpoint removes status history entries until - only the ones newer than now - p.MaxHistoryTime remain and - the history is smaller than p.MaxHistoryMB. + if applications is not None and not isinstance(applications, (bytes, str, list)): + raise Exception("Expected applications to be a Sequence, received: {}".format(type(applications))) - max_history_mb : int - max_history_time : int - Returns -> None - ''' - if max_history_mb is not None and not isinstance(max_history_mb, int): - raise Exception("Expected max_history_mb to be a int, received: {}".format(type(max_history_mb))) + if label is not None and not isinstance(label, (bytes, str)): + raise Exception("Expected label to be a str, received: {}".format(type(label))) - if max_history_time is not None and not isinstance(max_history_time, int): - raise Exception("Expected max_history_time to be a int, received: {}".format(type(max_history_time))) + if uri is not None and not isinstance(uri, (bytes, str)): + raise Exception("Expected uri to be a str, received: {}".format(type(uri))) # map input types to rpc msg _params = dict() - msg = dict(type='StatusHistory', - request='Prune', + msg = dict(type='Secrets', + request='GrantSecret', version=2, params=_params) - _params['max-history-mb'] = max_history_mb - _params['max-history-time'] = max_history_time + _params['applications'] = applications + _params['label'] = label + _params['uri'] = uri reply = await self.rpc(msg) return reply - @ReturnMapping(NotifyWatchResult) - async def WatchForModelConfigChanges(self): - ''' - WatchForModelConfigChanges returns a NotifyWatcher that observes - changes to the model configuration. - Note that although the NotifyWatchResult contains an Error field, - it's not used because we are only returning a single watcher, - so we use the regular error return. - - - Returns -> NotifyWatchResult + @ReturnMapping(ListSecretResults) + async def ListSecrets(self, filter_=None, show_secrets=None): ''' + ListSecrets lists available secrets. - # map input types to rpc msg - _params = dict() - msg = dict(type='StatusHistory', - request='WatchForModelConfigChanges', - version=2, - params=_params) - - reply = await self.rpc(msg) - return reply - - - -class UpgradeStepsFacade(Type): - name = 'UpgradeSteps' - version = 2 - schema = {'definitions': {'Entity': {'additionalProperties': False, - 'properties': {'tag': {'type': 'string'}}, - 'required': ['tag'], - 'type': 'object'}, - 'Error': {'additionalProperties': False, - 'properties': {'code': {'type': 'string'}, - 'info': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'message': {'type': 'string'}}, - 'required': ['message', 'code'], - 'type': 'object'}, - 'ErrorResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}}, - 'type': 'object'}, - 'ErrorResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'SetUnitStateArg': {'additionalProperties': False, - 'properties': {'charm-state': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}, - 'meter-status-state': {'type': 'string'}, - 'relation-state': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}, - 'secret-state': {'type': 'string'}, - 'storage-state': {'type': 'string'}, - 'tag': {'type': 'string'}, - 'uniter-state': {'type': 'string'}}, - 'required': ['tag'], - 'type': 'object'}, - 'SetUnitStateArgs': {'additionalProperties': False, - 'properties': {'args': {'items': {'$ref': '#/definitions/SetUnitStateArg'}, - 'type': 'array'}}, - 'required': ['args'], - 'type': 'object'}}, - 'properties': {'ResetKVMMachineModificationStatusIdle': {'description': 'ResetKVMMachineModificationStatusIdle ' - 'sets ' - 'the ' - 'modification ' - 'status\n' - 'of a ' - 'kvm ' - 'machine ' - 'to ' - 'idle ' - 'if ' - 'it ' - 'is ' - 'in ' - 'an ' - 'error ' - 'state ' - 'before ' - 'upgrade.\n' - 'Related ' - 'to ' - 'lp:1829393.', - 'properties': {'Params': {'$ref': '#/definitions/Entity'}, - 'Result': {'$ref': '#/definitions/ErrorResult'}}, - 'type': 'object'}, - 'WriteAgentState': {'description': 'WriteAgentState writes the ' - 'agent state for the set of ' - 'units provided. This\n' - 'call presently deals with ' - 'the state for the unit ' - 'agent.', - 'properties': {'Params': {'$ref': '#/definitions/SetUnitStateArgs'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}}, - 'type': 'object'} - - - @ReturnMapping(ErrorResult) - async def ResetKVMMachineModificationStatusIdle(self, tag=None): + filter_ : SecretsFilter + show_secrets : bool + Returns -> ListSecretResults ''' - ResetKVMMachineModificationStatusIdle sets the modification status - of a kvm machine to idle if it is in an error state before upgrade. - Related to lp:1829393. + if filter_ is not None and not isinstance(filter_, (dict, SecretsFilter)): + raise Exception("Expected filter_ to be a SecretsFilter, received: {}".format(type(filter_))) - tag : str - Returns -> ErrorResult - ''' - if tag is not None and not isinstance(tag, (bytes, str)): - raise Exception("Expected tag to be a str, received: {}".format(type(tag))) + if show_secrets is not None and not isinstance(show_secrets, bool): + raise Exception("Expected show_secrets to be a bool, received: {}".format(type(show_secrets))) # map input types to rpc msg _params = dict() - msg = dict(type='UpgradeSteps', - request='ResetKVMMachineModificationStatusIdle', + msg = dict(type='Secrets', + request='ListSecrets', version=2, params=_params) - _params['tag'] = tag + _params['filter'] = filter_ + _params['show-secrets'] = show_secrets reply = await self.rpc(msg) return reply @ReturnMapping(ErrorResults) - async def WriteAgentState(self, args=None): + async def RemoveSecrets(self, args=None): ''' - WriteAgentState writes the agent state for the set of units provided. This - call presently deals with the state for the unit agent. + RemoveSecrets remove user secret. - args : typing.Sequence[~SetUnitStateArg] + args : typing.Sequence[~DeleteSecretArg] Returns -> ErrorResults ''' if args is not None and not isinstance(args, (bytes, str, list)): @@ -6692,8 +782,8 @@ async def WriteAgentState(self, args=None): # map input types to rpc msg _params = dict() - msg = dict(type='UpgradeSteps', - request='WriteAgentState', + msg = dict(type='Secrets', + request='RemoveSecrets', version=2, params=_params) _params['args'] = args @@ -6702,98 +792,58 @@ async def WriteAgentState(self, args=None): -class VolumeAttachmentsWatcherFacade(Type): - name = 'VolumeAttachmentsWatcher' - version = 2 - schema = {'definitions': {'Error': {'additionalProperties': False, - 'properties': {'code': {'type': 'string'}, - 'info': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'message': {'type': 'string'}}, - 'required': ['message', 'code'], - 'type': 'object'}, - 'MachineStorageId': {'additionalProperties': False, - 'properties': {'attachment-tag': {'type': 'string'}, - 'machine-tag': {'type': 'string'}}, - 'required': ['machine-tag', - 'attachment-tag'], - 'type': 'object'}, - 'MachineStorageIdsWatchResult': {'additionalProperties': False, - 'properties': {'changes': {'items': {'$ref': '#/definitions/MachineStorageId'}, - 'type': 'array'}, - 'error': {'$ref': '#/definitions/Error'}, - 'watcher-id': {'type': 'string'}}, - 'required': ['watcher-id', - 'changes'], - 'type': 'object'}}, - 'properties': {'Next': {'description': 'Next returns when a change has ' - 'occurred to an entity of the\n' - 'collection being watched since the ' - 'most recent call to Next\n' - 'or the Watch call that created the ' - 'srvMachineStorageIdsWatcher.', - 'properties': {'Result': {'$ref': '#/definitions/MachineStorageIdsWatchResult'}}, - 'type': 'object'}, - 'Stop': {'description': 'Stop stops the watcher.', - 'type': 'object'}}, - 'type': 'object'} - + @ReturnMapping(ErrorResults) + async def RevokeSecret(self, applications=None, label=None, uri=None): + ''' + RevokeSecret revokes access to a user secret. - @ReturnMapping(MachineStorageIdsWatchResult) - async def Next(self): + applications : typing.Sequence[str] + label : str + uri : str + Returns -> ErrorResults ''' - Next returns when a change has occurred to an entity of the - collection being watched since the most recent call to Next - or the Watch call that created the srvMachineStorageIdsWatcher. + if applications is not None and not isinstance(applications, (bytes, str, list)): + raise Exception("Expected applications to be a Sequence, received: {}".format(type(applications))) + if label is not None and not isinstance(label, (bytes, str)): + raise Exception("Expected label to be a str, received: {}".format(type(label))) - Returns -> MachineStorageIdsWatchResult - ''' + if uri is not None and not isinstance(uri, (bytes, str)): + raise Exception("Expected uri to be a str, received: {}".format(type(uri))) # map input types to rpc msg _params = dict() - msg = dict(type='VolumeAttachmentsWatcher', - request='Next', + msg = dict(type='Secrets', + request='RevokeSecret', version=2, params=_params) - + _params['applications'] = applications + _params['label'] = label + _params['uri'] = uri reply = await self.rpc(msg) return reply - @ReturnMapping(None) - async def Stop(self): + @ReturnMapping(ErrorResults) + async def UpdateSecrets(self, args=None): ''' - Stop stops the watcher. - + UpdateSecrets creates new secrets. - Returns -> None + args : typing.Sequence[~UpdateUserSecretArg] + Returns -> ErrorResults ''' + if args is not None and not isinstance(args, (bytes, str, list)): + raise Exception("Expected args to be a Sequence, received: {}".format(type(args))) # map input types to rpc msg _params = dict() - msg = dict(type='VolumeAttachmentsWatcher', - request='Stop', + msg = dict(type='Secrets', + request='UpdateSecrets', version=2, params=_params) - + _params['args'] = args reply = await self.rpc(msg) return reply - - async def rpc(self, msg): - ''' - Patch rpc method to add Id. - ''' - if not hasattr(self, 'Id'): - raise RuntimeError('Missing "Id" field') - msg['Id'] = id - - from .facade import TypeEncoder - reply = await self.connection.rpc(msg, encoder=TypeEncoder) - return reply - - diff --git a/juju/client/_client3.py b/juju/client/_client3.py index 3da26b13..97b22d90 100644 --- a/juju/client/_client3.py +++ b/juju/client/_client3.py @@ -204,315 +204,65 @@ async def RedirectInfo(self): -class AgentFacade(Type): - name = 'Agent' +class AllWatcherFacade(Type): + name = 'AllWatcher' version = 3 - schema = {'definitions': {'AgentGetEntitiesResult': {'additionalProperties': False, - 'properties': {'container-type': {'type': 'string'}, - 'error': {'$ref': '#/definitions/Error'}, - 'jobs': {'items': {'type': 'string'}, - 'type': 'array'}, - 'life': {'type': 'string'}}, - 'required': ['life', - 'jobs', - 'container-type'], - 'type': 'object'}, - 'AgentGetEntitiesResults': {'additionalProperties': False, - 'properties': {'entities': {'items': {'$ref': '#/definitions/AgentGetEntitiesResult'}, - 'type': 'array'}}, - 'required': ['entities'], - 'type': 'object'}, - 'CloudCredential': {'additionalProperties': False, - 'properties': {'attrs': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}, - 'auth-type': {'type': 'string'}, - 'redacted': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'required': ['auth-type'], - 'type': 'object'}, - 'CloudSpec': {'additionalProperties': False, - 'properties': {'cacertificates': {'items': {'type': 'string'}, - 'type': 'array'}, - 'credential': {'$ref': '#/definitions/CloudCredential'}, - 'endpoint': {'type': 'string'}, - 'identity-endpoint': {'type': 'string'}, - 'is-controller-cloud': {'type': 'boolean'}, - 'name': {'type': 'string'}, - 'region': {'type': 'string'}, - 'skip-tls-verify': {'type': 'boolean'}, - 'storage-endpoint': {'type': 'string'}, - 'type': {'type': 'string'}}, - 'required': ['type', 'name'], - 'type': 'object'}, - 'CloudSpecResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'result': {'$ref': '#/definitions/CloudSpec'}}, - 'type': 'object'}, - 'CloudSpecResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/CloudSpecResult'}, - 'type': 'array'}}, - 'type': 'object'}, - 'ControllerAPIInfoResult': {'additionalProperties': False, - 'properties': {'addresses': {'items': {'type': 'string'}, - 'type': 'array'}, - 'cacert': {'type': 'string'}, - 'error': {'$ref': '#/definitions/Error'}}, - 'required': ['addresses', - 'cacert'], - 'type': 'object'}, - 'ControllerAPIInfoResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/ControllerAPIInfoResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'ControllerConfigResult': {'additionalProperties': False, - 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}}, - 'required': ['config'], - 'type': 'object'}, - 'Entities': {'additionalProperties': False, - 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'}, - 'type': 'array'}}, - 'required': ['entities'], - 'type': 'object'}, - 'Entity': {'additionalProperties': False, - 'properties': {'tag': {'type': 'string'}}, - 'required': ['tag'], - 'type': 'object'}, - 'EntityPassword': {'additionalProperties': False, - 'properties': {'password': {'type': 'string'}, - 'tag': {'type': 'string'}}, - 'required': ['tag', 'password'], - 'type': 'object'}, - 'EntityPasswords': {'additionalProperties': False, - 'properties': {'changes': {'items': {'$ref': '#/definitions/EntityPassword'}, - 'type': 'array'}}, - 'required': ['changes'], - 'type': 'object'}, - 'Error': {'additionalProperties': False, - 'properties': {'code': {'type': 'string'}, - 'info': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'message': {'type': 'string'}}, - 'required': ['message', 'code'], - 'type': 'object'}, - 'ErrorResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}}, - 'type': 'object'}, - 'ErrorResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'IsMasterResult': {'additionalProperties': False, - 'properties': {'master': {'type': 'boolean'}}, - 'required': ['master'], - 'type': 'object'}, - 'ModelConfigResult': {'additionalProperties': False, - 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}}, - 'required': ['config'], - 'type': 'object'}, - 'ModelTag': {'additionalProperties': False, 'type': 'object'}, - 'NotifyWatchResult': {'additionalProperties': False, - 'properties': {'NotifyWatcherId': {'type': 'string'}, - 'error': {'$ref': '#/definitions/Error'}}, - 'required': ['NotifyWatcherId'], - 'type': 'object'}, - 'NotifyWatchResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'StateServingInfo': {'additionalProperties': False, - 'properties': {'api-port': {'type': 'integer'}, - 'ca-private-key': {'type': 'string'}, - 'cert': {'type': 'string'}, - 'controller-api-port': {'type': 'integer'}, - 'private-key': {'type': 'string'}, - 'shared-secret': {'type': 'string'}, - 'state-port': {'type': 'integer'}, - 'system-identity': {'type': 'string'}}, - 'required': ['api-port', - 'state-port', - 'cert', - 'private-key', - 'ca-private-key', - 'shared-secret', - 'system-identity'], - 'type': 'object'}}, - 'properties': {'ClearReboot': {'description': 'ClearReboot will clear the ' - 'reboot flag on provided ' - 'machines, if it exists.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'CloudSpec': {'description': "CloudSpec returns the model's " - 'cloud spec.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/CloudSpecResults'}}, - 'type': 'object'}, - 'ControllerAPIInfoForModels': {'description': 'ControllerAPIInfoForModels ' - 'returns the ' - 'controller api ' - 'connection ' - 'details for the ' - 'specified ' - 'models.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ControllerAPIInfoResults'}}, - 'type': 'object'}, - 'ControllerConfig': {'description': 'ControllerConfig returns ' - "the controller's " - 'configuration.', - 'properties': {'Result': {'$ref': '#/definitions/ControllerConfigResult'}}, - 'type': 'object'}, - 'GetCloudSpec': {'description': 'GetCloudSpec constructs the ' - 'CloudSpec for a validated and ' - 'authorized model.', - 'properties': {'Params': {'$ref': '#/definitions/ModelTag'}, - 'Result': {'$ref': '#/definitions/CloudSpecResult'}}, - 'type': 'object'}, - 'GetEntities': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/AgentGetEntitiesResults'}}, - 'type': 'object'}, - 'IsMaster': {'properties': {'Result': {'$ref': '#/definitions/IsMasterResult'}}, - 'type': 'object'}, - 'ModelConfig': {'description': 'ModelConfig returns the ' - "current model's configuration.", - 'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}}, - 'type': 'object'}, - 'SetPasswords': {'description': 'SetPasswords sets the given ' - 'password for each supplied ' - 'entity, if possible.', - 'properties': {'Params': {'$ref': '#/definitions/EntityPasswords'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'StateServingInfo': {'properties': {'Result': {'$ref': '#/definitions/StateServingInfo'}}, - 'type': 'object'}, - 'WatchCloudSpecsChanges': {'description': 'WatchCloudSpecsChanges ' - 'returns a watcher ' - 'for cloud spec ' - 'changes.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/NotifyWatchResults'}}, + schema = {'definitions': {'AllWatcherNextResults': {'additionalProperties': False, + 'properties': {'deltas': {'items': {'$ref': '#/definitions/Delta'}, + 'type': 'array'}}, + 'required': ['deltas'], 'type': 'object'}, - 'WatchCredentials': {'description': 'WatchCredentials watches ' - 'for changes to the ' - 'specified credentials.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/NotifyWatchResults'}}, - 'type': 'object'}, - 'WatchForModelConfigChanges': {'description': 'WatchForModelConfigChanges ' - 'returns a ' - 'NotifyWatcher ' - 'that observes\n' - 'changes to the ' - 'model ' - 'configuration.\n' - 'Note that ' - 'although the ' - 'NotifyWatchResult ' - 'contains an ' - 'Error field,\n' - "it's not used " - 'because we are ' - 'only returning ' - 'a single ' - 'watcher,\n' - 'so we use the ' - 'regular error ' - 'return.', - 'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}}, - 'type': 'object'}}, + 'Delta': {'additionalProperties': False, + 'properties': {'entity': {'additionalProperties': True, + 'type': 'object'}, + 'removed': {'type': 'boolean'}}, + 'required': ['removed', 'entity'], + 'type': 'object'}}, + 'properties': {'Next': {'description': 'Next will return the current state of ' + 'everything on the first call\n' + 'and subsequent calls will', + 'properties': {'Result': {'$ref': '#/definitions/AllWatcherNextResults'}}, + 'type': 'object'}, + 'Stop': {'description': 'Stop stops the watcher.', + 'type': 'object'}}, 'type': 'object'} - @ReturnMapping(ErrorResults) - async def ClearReboot(self, entities=None): - ''' - ClearReboot will clear the reboot flag on provided machines, if it exists. - - entities : typing.Sequence[~Entity] - Returns -> ErrorResults + @ReturnMapping(AllWatcherNextResults) + async def Next(self): ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Agent', - request='ClearReboot', - version=3, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - + Next will return the current state of everything on the first call + and subsequent calls will - @ReturnMapping(CloudSpecResults) - async def CloudSpec(self, entities=None): - ''' - CloudSpec returns the model's cloud spec. - entities : typing.Sequence[~Entity] - Returns -> CloudSpecResults + Returns -> AllWatcherNextResults ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) # map input types to rpc msg _params = dict() - msg = dict(type='Agent', - request='CloudSpec', + msg = dict(type='AllWatcher', + request='Next', version=3, params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - @ReturnMapping(ControllerAPIInfoResults) - async def ControllerAPIInfoForModels(self, entities=None): - ''' - ControllerAPIInfoForModels returns the controller api connection details for the specified models. - - entities : typing.Sequence[~Entity] - Returns -> ControllerAPIInfoResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Agent', - request='ControllerAPIInfoForModels', - version=3, - params=_params) - _params['entities'] = entities reply = await self.rpc(msg) return reply - @ReturnMapping(ControllerConfigResult) - async def ControllerConfig(self): + @ReturnMapping(None) + async def Stop(self): ''' - ControllerConfig returns the controller's configuration. + Stop stops the watcher. - Returns -> ControllerConfigResult + Returns -> None ''' # map input types to rpc msg _params = dict() - msg = dict(type='Agent', - request='ControllerConfig', + msg = dict(type='AllWatcher', + request='Stop', version=3, params=_params) @@ -521,122 +271,286 @@ async def ControllerConfig(self): - @ReturnMapping(CloudSpecResult) - async def GetCloudSpec(self): + async def rpc(self, msg): ''' - GetCloudSpec constructs the CloudSpec for a validated and authorized model. - - - Returns -> CloudSpecResult + Patch rpc method to add Id. ''' + if not hasattr(self, 'Id'): + raise RuntimeError('Missing "Id" field') + msg['Id'] = id - # map input types to rpc msg - _params = dict() - msg = dict(type='Agent', - request='GetCloudSpec', - version=3, - params=_params) - - reply = await self.rpc(msg) + from .facade import TypeEncoder + reply = await self.connection.rpc(msg, encoder=TypeEncoder) return reply - @ReturnMapping(AgentGetEntitiesResults) - async def GetEntities(self, entities=None): - ''' - entities : typing.Sequence[~Entity] - Returns -> AgentGetEntitiesResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Agent', - request='GetEntities', - version=3, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - +class BackupsFacade(Type): + name = 'Backups' + version = 3 + schema = {'definitions': {'BackupsCreateArgs': {'additionalProperties': False, + 'properties': {'no-download': {'type': 'boolean'}, + 'notes': {'type': 'string'}}, + 'required': ['notes', 'no-download'], + 'type': 'object'}, + 'BackupsMetadataResult': {'additionalProperties': False, + 'properties': {'base': {'type': 'string'}, + 'checksum': {'type': 'string'}, + 'checksum-format': {'type': 'string'}, + 'controller-machine-id': {'type': 'string'}, + 'controller-machine-inst-id': {'type': 'string'}, + 'controller-uuid': {'type': 'string'}, + 'filename': {'type': 'string'}, + 'finished': {'format': 'date-time', + 'type': 'string'}, + 'format-version': {'type': 'integer'}, + 'ha-nodes': {'type': 'integer'}, + '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', + 'checksum-format', + 'size', + 'stored', + 'started', + 'finished', + 'notes', + 'model', + 'machine', + 'hostname', + 'version', + 'base', + 'filename', + 'format-version', + 'controller-uuid', + 'controller-machine-id', + 'controller-machine-inst-id', + 'ha-nodes'], + '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'}}, + 'properties': {'Create': {'description': 'Create is the API method that ' + 'requests juju to create a new ' + 'backup\n' + 'of its state.', + 'properties': {'Params': {'$ref': '#/definitions/BackupsCreateArgs'}, + 'Result': {'$ref': '#/definitions/BackupsMetadataResult'}}, + 'type': 'object'}}, + 'type': 'object'} + - @ReturnMapping(IsMasterResult) - async def IsMaster(self): + @ReturnMapping(BackupsMetadataResult) + async def Create(self, no_download=None, notes=None): ''' + Create is the API method that requests juju to create a new backup + of its state. - Returns -> IsMasterResult + no_download : bool + notes : str + Returns -> BackupsMetadataResult ''' + if no_download is not None and not isinstance(no_download, bool): + raise Exception("Expected no_download to be a bool, received: {}".format(type(no_download))) + + if notes is not None and not isinstance(notes, (bytes, str)): + raise Exception("Expected notes to be a str, received: {}".format(type(notes))) # map input types to rpc msg _params = dict() - msg = dict(type='Agent', - request='IsMaster', + msg = dict(type='Backups', + request='Create', version=3, params=_params) - + _params['no-download'] = no_download + _params['notes'] = notes reply = await self.rpc(msg) return reply - @ReturnMapping(ModelConfigResult) - async def ModelConfig(self): - ''' - ModelConfig returns the current model's configuration. - - - Returns -> ModelConfigResult - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='Agent', - request='ModelConfig', - version=3, - params=_params) - - reply = await self.rpc(msg) - return reply - - +class ModelConfigFacade(Type): + name = 'ModelConfig' + version = 3 + schema = {'definitions': {'ConfigValue': {'additionalProperties': False, + 'properties': {'source': {'type': 'string'}, + 'value': {'additionalProperties': True, + 'type': 'object'}}, + 'required': ['value', 'source'], + 'type': 'object'}, + 'Error': {'additionalProperties': False, + 'properties': {'code': {'type': 'string'}, + 'info': {'patternProperties': {'.*': {'additionalProperties': True, + 'type': 'object'}}, + 'type': 'object'}, + 'message': {'type': 'string'}}, + 'required': ['message', 'code'], + 'type': 'object'}, + 'GetConstraintsResults': {'additionalProperties': False, + 'properties': {'constraints': {'$ref': '#/definitions/Value'}}, + 'required': ['constraints'], + 'type': 'object'}, + 'ModelConfigResults': {'additionalProperties': False, + 'properties': {'config': {'patternProperties': {'.*': {'$ref': '#/definitions/ConfigValue'}}, + 'type': 'object'}}, + 'required': ['config'], + 'type': 'object'}, + 'ModelSLA': {'additionalProperties': False, + 'properties': {'ModelSLAInfo': {'$ref': '#/definitions/ModelSLAInfo'}, + 'creds': {'items': {'type': 'integer'}, + 'type': 'array'}, + 'level': {'type': 'string'}, + 'owner': {'type': 'string'}}, + 'required': ['level', + 'owner', + 'ModelSLAInfo', + 'creds'], + 'type': 'object'}, + 'ModelSLAInfo': {'additionalProperties': False, + 'properties': {'level': {'type': 'string'}, + 'owner': {'type': 'string'}}, + 'required': ['level', 'owner'], + 'type': 'object'}, + 'ModelSequencesResult': {'additionalProperties': False, + 'properties': {'sequences': {'patternProperties': {'.*': {'type': 'integer'}}, + 'type': 'object'}}, + 'required': ['sequences'], + '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'}, + 'SetConstraints': {'additionalProperties': False, + 'properties': {'application': {'type': 'string'}, + 'constraints': {'$ref': '#/definitions/Value'}}, + 'required': ['application', 'constraints'], + 'type': 'object'}, + 'StringResult': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}, + 'result': {'type': 'string'}}, + 'required': ['result'], + 'type': 'object'}, + 'Value': {'additionalProperties': False, + 'properties': {'allocate-public-ip': {'type': 'boolean'}, + 'arch': {'type': 'string'}, + 'container': {'type': 'string'}, + 'cores': {'type': 'integer'}, + 'cpu-power': {'type': 'integer'}, + 'image-id': {'type': 'string'}, + 'instance-role': {'type': 'string'}, + 'instance-type': {'type': 'string'}, + 'mem': {'type': 'integer'}, + 'root-disk': {'type': 'integer'}, + 'root-disk-source': {'type': 'string'}, + 'spaces': {'items': {'type': 'string'}, + 'type': 'array'}, + 'tags': {'items': {'type': 'string'}, + 'type': 'array'}, + 'virt-type': {'type': 'string'}, + 'zones': {'items': {'type': 'string'}, + 'type': 'array'}}, + 'type': 'object'}}, + 'properties': {'GetModelConstraints': {'description': 'GetModelConstraints ' + 'returns the ' + 'constraints for the ' + 'model.', + 'properties': {'Result': {'$ref': '#/definitions/GetConstraintsResults'}}, + 'type': 'object'}, + 'ModelGet': {'description': 'ModelGet implements the ' + 'server-side part of the\n' + 'model-config CLI command.', + 'properties': {'Result': {'$ref': '#/definitions/ModelConfigResults'}}, + 'type': 'object'}, + 'ModelSet': {'description': 'ModelSet implements the ' + 'server-side part of the\n' + 'set-model-config CLI command.', + 'properties': {'Params': {'$ref': '#/definitions/ModelSet'}}, + 'type': 'object'}, + 'ModelUnset': {'description': 'ModelUnset implements the ' + 'server-side part of the\n' + 'set-model-config CLI command.', + 'properties': {'Params': {'$ref': '#/definitions/ModelUnset'}}, + 'type': 'object'}, + 'SLALevel': {'description': 'SLALevel returns the current sla ' + 'level for the model.', + 'properties': {'Result': {'$ref': '#/definitions/StringResult'}}, + 'type': 'object'}, + 'Sequences': {'description': "Sequences returns the model's " + 'sequence names and next values.', + 'properties': {'Result': {'$ref': '#/definitions/ModelSequencesResult'}}, + 'type': 'object'}, + 'SetModelConstraints': {'description': 'SetModelConstraints ' + 'sets the constraints ' + 'for the model.', + 'properties': {'Params': {'$ref': '#/definitions/SetConstraints'}}, + 'type': 'object'}, + 'SetSLALevel': {'description': 'SetSLALevel sets the sla level ' + 'on the model.', + 'properties': {'Params': {'$ref': '#/definitions/ModelSLA'}}, + 'type': 'object'}}, + 'type': 'object'} + - @ReturnMapping(ErrorResults) - async def SetPasswords(self, changes=None): + @ReturnMapping(GetConstraintsResults) + async def GetModelConstraints(self): ''' - SetPasswords sets the given password for each supplied entity, if possible. + GetModelConstraints returns the constraints for the model. - changes : typing.Sequence[~EntityPassword] - Returns -> ErrorResults + + Returns -> GetConstraintsResults ''' - if changes is not None and not isinstance(changes, (bytes, str, list)): - raise Exception("Expected changes to be a Sequence, received: {}".format(type(changes))) # map input types to rpc msg _params = dict() - msg = dict(type='Agent', - request='SetPasswords', + msg = dict(type='ModelConfig', + request='GetModelConstraints', version=3, params=_params) - _params['changes'] = changes + reply = await self.rpc(msg) return reply - @ReturnMapping(StateServingInfo) - async def StateServingInfo(self): + @ReturnMapping(ModelConfigResults) + async def ModelGet(self): ''' + ModelGet implements the server-side part of the + model-config CLI command. + - Returns -> StateServingInfo + Returns -> ModelConfigResults ''' # map input types to rpc msg _params = dict() - msg = dict(type='Agent', - request='StateServingInfo', + msg = dict(type='ModelConfig', + request='ModelGet', version=3, params=_params) @@ -645,69 +559,67 @@ async def StateServingInfo(self): - @ReturnMapping(NotifyWatchResults) - async def WatchCloudSpecsChanges(self, entities=None): + @ReturnMapping(None) + async def ModelSet(self, config=None): ''' - WatchCloudSpecsChanges returns a watcher for cloud spec changes. + ModelSet implements the server-side part of the + set-model-config CLI command. - entities : typing.Sequence[~Entity] - Returns -> NotifyWatchResults + config : typing.Mapping[str, typing.Any] + Returns -> None ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) + if config is not None and not isinstance(config, dict): + raise Exception("Expected config to be a Mapping, received: {}".format(type(config))) # map input types to rpc msg _params = dict() - msg = dict(type='Agent', - request='WatchCloudSpecsChanges', + msg = dict(type='ModelConfig', + request='ModelSet', version=3, params=_params) - _params['entities'] = entities + _params['config'] = config reply = await self.rpc(msg) return reply - @ReturnMapping(NotifyWatchResults) - async def WatchCredentials(self, entities=None): + @ReturnMapping(None) + async def ModelUnset(self, keys=None): ''' - WatchCredentials watches for changes to the specified credentials. + ModelUnset implements the server-side part of the + set-model-config CLI command. - entities : typing.Sequence[~Entity] - Returns -> NotifyWatchResults + keys : typing.Sequence[str] + Returns -> None ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) + if keys is not None and not isinstance(keys, (bytes, str, list)): + raise Exception("Expected keys to be a Sequence, received: {}".format(type(keys))) # map input types to rpc msg _params = dict() - msg = dict(type='Agent', - request='WatchCredentials', + msg = dict(type='ModelConfig', + request='ModelUnset', version=3, params=_params) - _params['entities'] = entities + _params['keys'] = keys reply = await self.rpc(msg) return reply - @ReturnMapping(NotifyWatchResult) - async def WatchForModelConfigChanges(self): + @ReturnMapping(StringResult) + async def SLALevel(self): ''' - WatchForModelConfigChanges returns a NotifyWatcher that observes - changes to the model configuration. - Note that although the NotifyWatchResult contains an Error field, - it's not used because we are only returning a single watcher, - so we use the regular error return. + SLALevel returns the current sla level for the model. - Returns -> NotifyWatchResult + Returns -> StringResult ''' # map input types to rpc msg _params = dict() - msg = dict(type='Agent', - request='WatchForModelConfigChanges', + msg = dict(type='ModelConfig', + request='SLALevel', version=3, params=_params) @@ -716,44 +628,19 @@ async def WatchForModelConfigChanges(self): -class AllWatcherFacade(Type): - name = 'AllWatcher' - version = 3 - 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': {'description': 'Next will return the current state of ' - 'everything on the first call\n' - 'and subsequent calls will', - 'properties': {'Result': {'$ref': '#/definitions/AllWatcherNextResults'}}, - 'type': 'object'}, - 'Stop': {'description': 'Stop stops the watcher.', - 'type': 'object'}}, - 'type': 'object'} - - - @ReturnMapping(AllWatcherNextResults) - async def Next(self): + @ReturnMapping(ModelSequencesResult) + async def Sequences(self): ''' - Next will return the current state of everything on the first call - and subsequent calls will + Sequences returns the model's sequence names and next values. - Returns -> AllWatcherNextResults + Returns -> ModelSequencesResult ''' # map input types to rpc msg _params = dict() - msg = dict(type='AllWatcher', - request='Next', + msg = dict(type='ModelConfig', + request='Sequences', version=3, params=_params) @@ -763,2395 +650,305 @@ async def Next(self): @ReturnMapping(None) - async def Stop(self): + async def SetModelConstraints(self, application=None, constraints=None): ''' - Stop stops the watcher. - + SetModelConstraints sets the constraints for the model. + application : str + constraints : Value Returns -> None ''' + if application is not None and not isinstance(application, (bytes, str)): + raise Exception("Expected application to be a str, received: {}".format(type(application))) + + if constraints is not None and not isinstance(constraints, (dict, Value)): + raise Exception("Expected constraints to be a Value, received: {}".format(type(constraints))) # map input types to rpc msg _params = dict() - msg = dict(type='AllWatcher', - request='Stop', + msg = dict(type='ModelConfig', + request='SetModelConstraints', version=3, params=_params) - + _params['application'] = application + _params['constraints'] = constraints reply = await self.rpc(msg) return reply - async def rpc(self, msg): - ''' - Patch rpc method to add Id. + @ReturnMapping(None) + async def SetSLALevel(self, modelslainfo=None, creds=None, level=None, owner=None): ''' - if not hasattr(self, 'Id'): - raise RuntimeError('Missing "Id" field') - msg['Id'] = id - - from .facade import TypeEncoder - reply = await self.connection.rpc(msg, encoder=TypeEncoder) - return reply - - - -class BackupsFacade(Type): - name = 'Backups' - version = 3 - schema = {'definitions': {'BackupsCreateArgs': {'additionalProperties': False, - 'properties': {'no-download': {'type': 'boolean'}, - 'notes': {'type': 'string'}}, - 'required': ['notes', 'no-download'], - 'type': 'object'}, - 'BackupsMetadataResult': {'additionalProperties': False, - 'properties': {'base': {'type': 'string'}, - 'checksum': {'type': 'string'}, - 'checksum-format': {'type': 'string'}, - 'controller-machine-id': {'type': 'string'}, - 'controller-machine-inst-id': {'type': 'string'}, - 'controller-uuid': {'type': 'string'}, - 'filename': {'type': 'string'}, - 'finished': {'format': 'date-time', - 'type': 'string'}, - 'format-version': {'type': 'integer'}, - 'ha-nodes': {'type': 'integer'}, - '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', - 'checksum-format', - 'size', - 'stored', - 'started', - 'finished', - 'notes', - 'model', - 'machine', - 'hostname', - 'version', - 'base', - 'filename', - 'format-version', - 'controller-uuid', - 'controller-machine-id', - 'controller-machine-inst-id', - 'ha-nodes'], - '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'}}, - 'properties': {'Create': {'description': 'Create is the API method that ' - 'requests juju to create a new ' - 'backup\n' - 'of its state.', - 'properties': {'Params': {'$ref': '#/definitions/BackupsCreateArgs'}, - 'Result': {'$ref': '#/definitions/BackupsMetadataResult'}}, - 'type': 'object'}}, - 'type': 'object'} - - - @ReturnMapping(BackupsMetadataResult) - async def Create(self, no_download=None, notes=None): - ''' - Create is the API method that requests juju to create a new backup - of its state. - - no_download : bool - notes : str - Returns -> BackupsMetadataResult - ''' - if no_download is not None and not isinstance(no_download, bool): - raise Exception("Expected no_download to be a bool, received: {}".format(type(no_download))) - - if notes is not None and not isinstance(notes, (bytes, str)): - raise Exception("Expected notes to be a str, received: {}".format(type(notes))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Backups', - request='Create', - version=3, - params=_params) - _params['no-download'] = no_download - _params['notes'] = notes - reply = await self.rpc(msg) - return reply - - - -class ImageMetadataFacade(Type): - name = 'ImageMetadata' - version = 3 - schema = {'properties': {'UpdateFromPublishedImages': {'description': 'UpdateFromPublishedImages ' - 'is now a no-op.\n' - 'It is retained ' - 'for ' - 'compatibility.', - 'type': 'object'}}, - 'type': 'object'} - - - @ReturnMapping(None) - async def UpdateFromPublishedImages(self): - ''' - UpdateFromPublishedImages is now a no-op. - It is retained for compatibility. - - - Returns -> None - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='ImageMetadata', - request='UpdateFromPublishedImages', - version=3, - params=_params) - - reply = await self.rpc(msg) - return reply - - - -class InstanceMutaterFacade(Type): - name = 'InstanceMutater' - version = 3 - schema = {'definitions': {'CharmLXDProfile': {'additionalProperties': False, - 'properties': {'config': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}, - 'description': {'type': 'string'}, - 'devices': {'patternProperties': {'.*': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}}, - 'type': 'object'}}, - 'required': ['config', - 'description', - 'devices'], - 'type': 'object'}, - 'CharmProfilingInfoResult': {'additionalProperties': False, - 'properties': {'current-profiles': {'items': {'type': 'string'}, - 'type': 'array'}, - 'error': {'$ref': '#/definitions/Error'}, - 'instance-id': {'type': 'string'}, - 'model-name': {'type': 'string'}, - 'profile-changes': {'items': {'$ref': '#/definitions/ProfileInfoResult'}, - 'type': 'array'}}, - 'required': ['instance-id', - 'model-name', - 'profile-changes', - 'current-profiles', - 'error'], - 'type': 'object'}, - 'ContainerTypeResult': {'additionalProperties': False, - 'properties': {'container-type': {'type': 'string'}, - 'error': {'$ref': '#/definitions/Error'}}, - 'required': ['container-type', - 'error'], - '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': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'message': {'type': 'string'}}, - 'required': ['message', 'code'], - 'type': 'object'}, - 'ErrorResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}}, - 'type': 'object'}, - 'ErrorResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'LifeResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'life': {'type': 'string'}}, - 'required': ['life'], - 'type': 'object'}, - 'LifeResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'NotifyWatchResult': {'additionalProperties': False, - 'properties': {'NotifyWatcherId': {'type': 'string'}, - 'error': {'$ref': '#/definitions/Error'}}, - 'required': ['NotifyWatcherId'], - 'type': 'object'}, - 'NotifyWatchResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'ProfileInfoResult': {'additionalProperties': False, - 'properties': {'application-name': {'type': 'string'}, - 'error': {'$ref': '#/definitions/Error'}, - 'profile': {'$ref': '#/definitions/CharmLXDProfile'}, - 'revision': {'type': 'integer'}}, - 'type': 'object'}, - 'SetProfileArg': {'additionalProperties': False, - 'properties': {'entity': {'$ref': '#/definitions/Entity'}, - 'profiles': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'required': ['entity', 'profiles'], - 'type': 'object'}, - 'SetProfileArgs': {'additionalProperties': False, - 'properties': {'args': {'items': {'$ref': '#/definitions/SetProfileArg'}, - 'type': 'array'}}, - 'required': ['args'], - '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'}, - 'watcher-id': {'type': 'string'}}, - 'required': ['watcher-id'], - 'type': 'object'}}, - 'properties': {'CharmProfilingInfo': {'description': 'CharmProfilingInfo ' - 'returns info to update ' - 'lxd profiles on the ' - 'machine. If\n' - 'the machine is not ' - 'provisioned, no profile ' - 'change info will be ' - 'returned,\n' - 'nor will an error.', - 'properties': {'Params': {'$ref': '#/definitions/Entity'}, - 'Result': {'$ref': '#/definitions/CharmProfilingInfoResult'}}, - 'type': 'object'}, - 'ContainerType': {'description': 'ContainerType returns the ' - 'container type of a machine.', - 'properties': {'Params': {'$ref': '#/definitions/Entity'}, - 'Result': {'$ref': '#/definitions/ContainerTypeResult'}}, - 'type': 'object'}, - 'Life': {'description': 'Life returns the life status of every ' - 'supplied entity, where available.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/LifeResults'}}, - 'type': 'object'}, - 'SetCharmProfiles': {'description': 'SetCharmProfiles records ' - 'the given slice of charm ' - 'profile names.', - 'properties': {'Params': {'$ref': '#/definitions/SetProfileArgs'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'SetModificationStatus': {'description': 'SetModificationStatus ' - 'updates the instance ' - 'whilst changes are ' - 'occurring. This\n' - 'is different from ' - 'SetStatus and ' - 'SetInstanceStatus, ' - 'by the fact this ' - 'holds\n' - 'information about ' - 'the ongoing changes ' - 'that are happening ' - 'to instances.\n' - 'Consider LXD Profile ' - 'updates that can ' - 'modify a instance, ' - 'but may not cause\n' - 'the instance to be ' - 'placed into a error ' - 'state. This ' - 'modification status\n' - 'serves the purpose ' - 'of highlighting that ' - 'to the operator.\n' - 'Only machine tags ' - 'are accepted.', - 'properties': {'Params': {'$ref': '#/definitions/SetStatus'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'WatchContainers': {'description': 'WatchContainers starts a ' - 'watcher to track ' - 'Containers on a given\n' - 'machine.', - 'properties': {'Params': {'$ref': '#/definitions/Entity'}, - 'Result': {'$ref': '#/definitions/StringsWatchResult'}}, - 'type': 'object'}, - 'WatchLXDProfileVerificationNeeded': {'description': 'WatchLXDProfileVerificationNeeded ' - 'starts a ' - 'watcher ' - 'to track ' - 'Applications ' - 'with\n' - 'LXD ' - 'Profiles.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/NotifyWatchResults'}}, - 'type': 'object'}, - 'WatchMachines': {'description': 'WatchMachines starts a ' - 'watcher to track machines.\n' - 'WatchMachines does not ' - 'consume the initial event of ' - 'the watch response, as\n' - 'that returns the initial set ' - 'of machines that are ' - 'currently available.', - 'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}}, - 'type': 'object'}, - 'WatchModelMachines': {'description': 'WatchModelMachines ' - 'starts a watcher to ' - 'track machines, but not ' - 'containers.\n' - 'WatchModelMachines does ' - 'not consume the initial ' - 'event of the watch ' - 'response, as\n' - 'that returns the ' - 'initial set of machines ' - 'that are currently ' - 'available.', - 'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}}, - 'type': 'object'}}, - 'type': 'object'} - - - @ReturnMapping(CharmProfilingInfoResult) - async def CharmProfilingInfo(self, tag=None): - ''' - CharmProfilingInfo returns info to update lxd profiles on the machine. If - the machine is not provisioned, no profile change info will be returned, - nor will an error. - - tag : str - Returns -> CharmProfilingInfoResult - ''' - if tag is not None and not isinstance(tag, (bytes, str)): - raise Exception("Expected tag to be a str, received: {}".format(type(tag))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='InstanceMutater', - request='CharmProfilingInfo', - version=3, - params=_params) - _params['tag'] = tag - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ContainerTypeResult) - async def ContainerType(self, tag=None): - ''' - ContainerType returns the container type of a machine. - - tag : str - Returns -> ContainerTypeResult - ''' - if tag is not None and not isinstance(tag, (bytes, str)): - raise Exception("Expected tag to be a str, received: {}".format(type(tag))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='InstanceMutater', - request='ContainerType', - version=3, - params=_params) - _params['tag'] = tag - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(LifeResults) - async def Life(self, entities=None): - ''' - Life returns the life status of every supplied entity, where available. - - entities : typing.Sequence[~Entity] - Returns -> LifeResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='InstanceMutater', - request='Life', - version=3, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def SetCharmProfiles(self, args=None): - ''' - SetCharmProfiles records the given slice of charm profile names. - - args : typing.Sequence[~SetProfileArg] - Returns -> ErrorResults - ''' - if args is not None and not isinstance(args, (bytes, str, list)): - raise Exception("Expected args to be a Sequence, received: {}".format(type(args))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='InstanceMutater', - request='SetCharmProfiles', - version=3, - params=_params) - _params['args'] = args - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def SetModificationStatus(self, entities=None): - ''' - SetModificationStatus updates the instance whilst changes are occurring. This - is different from SetStatus and SetInstanceStatus, by the fact this holds - information about the ongoing changes that are happening to instances. - Consider LXD Profile updates that can modify a instance, but may not cause - the instance to be placed into a error state. This modification status - serves the purpose of highlighting that to the operator. - Only machine tags are accepted. - - entities : typing.Sequence[~EntityStatusArgs] - Returns -> ErrorResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='InstanceMutater', - request='SetModificationStatus', - version=3, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringsWatchResult) - async def WatchContainers(self, tag=None): - ''' - WatchContainers starts a watcher to track Containers on a given - machine. - - tag : str - Returns -> StringsWatchResult - ''' - if tag is not None and not isinstance(tag, (bytes, str)): - raise Exception("Expected tag to be a str, received: {}".format(type(tag))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='InstanceMutater', - request='WatchContainers', - version=3, - params=_params) - _params['tag'] = tag - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(NotifyWatchResults) - async def WatchLXDProfileVerificationNeeded(self, entities=None): - ''' - WatchLXDProfileVerificationNeeded starts a watcher to track Applications with - LXD Profiles. - - entities : typing.Sequence[~Entity] - Returns -> NotifyWatchResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='InstanceMutater', - request='WatchLXDProfileVerificationNeeded', - version=3, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringsWatchResult) - async def WatchMachines(self): - ''' - WatchMachines starts a watcher to track machines. - WatchMachines does not consume the initial event of the watch response, as - that returns the initial set of machines that are currently available. - - - Returns -> StringsWatchResult - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='InstanceMutater', - request='WatchMachines', - version=3, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringsWatchResult) - async def WatchModelMachines(self): - ''' - WatchModelMachines starts a watcher to track machines, but not containers. - WatchModelMachines does not consume the initial event of the watch response, as - that returns the initial set of machines that are currently available. - - - Returns -> StringsWatchResult - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='InstanceMutater', - request='WatchModelMachines', - version=3, - params=_params) - - reply = await self.rpc(msg) - return reply - - - -class MigrationMasterFacade(Type): - name = 'MigrationMaster' - version = 3 - schema = {'definitions': {'Error': {'additionalProperties': False, - 'properties': {'code': {'type': 'string'}, - 'info': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'message': {'type': 'string'}}, - 'required': ['message', 'code'], - 'type': 'object'}, - 'MasterMigrationStatus': {'additionalProperties': False, - 'properties': {'migration-id': {'type': 'string'}, - 'phase': {'type': 'string'}, - 'phase-changed-time': {'format': 'date-time', - 'type': 'string'}, - 'spec': {'$ref': '#/definitions/MigrationSpec'}}, - 'required': ['spec', - 'migration-id', - 'phase', - 'phase-changed-time'], - 'type': 'object'}, - 'MigrationModelInfo': {'additionalProperties': False, - 'properties': {'agent-version': {'$ref': '#/definitions/Number'}, - 'controller-agent-version': {'$ref': '#/definitions/Number'}, - 'name': {'type': 'string'}, - 'owner-tag': {'type': 'string'}, - 'uuid': {'type': 'string'}}, - 'required': ['uuid', - 'name', - 'owner-tag', - 'agent-version', - 'controller-agent-version'], - 'type': 'object'}, - 'MigrationSourceInfo': {'additionalProperties': False, - 'properties': {'addrs': {'items': {'type': 'string'}, - 'type': 'array'}, - 'ca-cert': {'type': 'string'}, - 'controller-alias': {'type': 'string'}, - 'controller-tag': {'type': 'string'}, - 'local-related-models': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'required': ['local-related-models', - 'controller-tag', - 'addrs', - 'ca-cert'], - 'type': 'object'}, - 'MigrationSpec': {'additionalProperties': False, - 'properties': {'model-tag': {'type': 'string'}, - 'target-info': {'$ref': '#/definitions/MigrationTargetInfo'}}, - 'required': ['model-tag', 'target-info'], - 'type': 'object'}, - 'MigrationTargetInfo': {'additionalProperties': False, - 'properties': {'addrs': {'items': {'type': 'string'}, - 'type': 'array'}, - 'auth-tag': {'type': 'string'}, - 'ca-cert': {'type': 'string'}, - 'controller-alias': {'type': 'string'}, - 'controller-tag': {'type': 'string'}, - 'macaroons': {'type': 'string'}, - 'password': {'type': 'string'}}, - 'required': ['controller-tag', - 'addrs', - 'ca-cert', - 'auth-tag'], - 'type': 'object'}, - 'MinionReports': {'additionalProperties': False, - 'properties': {'failed': {'items': {'type': 'string'}, - 'type': 'array'}, - 'migration-id': {'type': 'string'}, - 'phase': {'type': 'string'}, - 'success-count': {'type': 'integer'}, - 'unknown-count': {'type': 'integer'}, - 'unknown-sample': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'required': ['migration-id', - 'phase', - 'success-count', - 'unknown-count', - 'unknown-sample', - 'failed'], - 'type': 'object'}, - 'NotifyWatchResult': {'additionalProperties': False, - 'properties': {'NotifyWatcherId': {'type': 'string'}, - 'error': {'$ref': '#/definitions/Error'}}, - 'required': ['NotifyWatcherId'], - 'type': 'object'}, - 'Number': {'additionalProperties': False, - 'properties': {'Build': {'type': 'integer'}, - 'Major': {'type': 'integer'}, - 'Minor': {'type': 'integer'}, - 'Patch': {'type': 'integer'}, - 'Tag': {'type': 'string'}}, - 'required': ['Major', - 'Minor', - 'Tag', - 'Patch', - 'Build'], - 'type': 'object'}, - 'PrechecksArgs': {'additionalProperties': False, - 'properties': {'target-controller-version': {'$ref': '#/definitions/Number'}}, - 'required': ['target-controller-version'], - 'type': 'object'}, - 'ProcessRelations': {'additionalProperties': False, - 'properties': {'controller-alias': {'type': 'string'}}, - 'required': ['controller-alias'], - 'type': 'object'}, - 'SerializedModel': {'additionalProperties': False, - 'properties': {'bytes': {'items': {'type': 'integer'}, - 'type': 'array'}, - 'charms': {'items': {'type': 'string'}, - 'type': 'array'}, - 'resources': {'items': {'$ref': '#/definitions/SerializedModelResource'}, - 'type': 'array'}, - 'tools': {'items': {'$ref': '#/definitions/SerializedModelTools'}, - 'type': 'array'}}, - 'required': ['bytes', - 'charms', - 'tools', - 'resources'], - 'type': 'object'}, - 'SerializedModelResource': {'additionalProperties': False, - 'properties': {'application': {'type': 'string'}, - 'application-revision': {'$ref': '#/definitions/SerializedModelResourceRevision'}, - 'charmstore-revision': {'$ref': '#/definitions/SerializedModelResourceRevision'}, - 'name': {'type': 'string'}, - 'unit-revisions': {'patternProperties': {'.*': {'$ref': '#/definitions/SerializedModelResourceRevision'}}, - 'type': 'object'}}, - 'required': ['application', - 'name', - 'application-revision', - 'charmstore-revision', - 'unit-revisions'], - 'type': 'object'}, - 'SerializedModelResourceRevision': {'additionalProperties': False, - 'properties': {'description': {'type': 'string'}, - 'fingerprint': {'type': 'string'}, - 'origin': {'type': 'string'}, - 'path': {'type': 'string'}, - 'revision': {'type': 'integer'}, - 'size': {'type': 'integer'}, - 'timestamp': {'format': 'date-time', - 'type': 'string'}, - 'type': {'type': 'string'}, - 'username': {'type': 'string'}}, - 'required': ['revision', - 'type', - 'path', - 'description', - 'origin', - 'fingerprint', - 'size', - 'timestamp'], - 'type': 'object'}, - 'SerializedModelTools': {'additionalProperties': False, - 'properties': {'uri': {'type': 'string'}, - 'version': {'type': 'string'}}, - 'required': ['version', 'uri'], - 'type': 'object'}, - 'SetMigrationPhaseArgs': {'additionalProperties': False, - 'properties': {'phase': {'type': 'string'}}, - 'required': ['phase'], - 'type': 'object'}, - 'SetMigrationStatusMessageArgs': {'additionalProperties': False, - 'properties': {'message': {'type': 'string'}}, - 'required': ['message'], - 'type': 'object'}, - 'StringResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'result': {'type': 'string'}}, - 'required': ['result'], - 'type': 'object'}}, - 'properties': {'Export': {'description': 'Export serializes the model ' - 'associated with the API connection.', - 'properties': {'Result': {'$ref': '#/definitions/SerializedModel'}}, - 'type': 'object'}, - 'MigrationStatus': {'description': 'MigrationStatus returns ' - 'the details and progress ' - 'of the latest\n' - 'model migration.', - 'properties': {'Result': {'$ref': '#/definitions/MasterMigrationStatus'}}, - 'type': 'object'}, - 'MinionReportTimeout': {'description': 'MinionReportTimeout ' - 'returns the ' - 'configuration value ' - 'for this controller ' - 'that\n' - 'indicates how long the ' - 'migration master ' - 'worker should wait for ' - 'minions to\n' - 'reported on phases of ' - 'a migration.', - 'properties': {'Result': {'$ref': '#/definitions/StringResult'}}, - 'type': 'object'}, - 'MinionReports': {'description': 'MinionReports returns ' - 'details of the reports made ' - 'by migration\n' - 'minions to the controller ' - 'for the current migration ' - 'phase.', - 'properties': {'Result': {'$ref': '#/definitions/MinionReports'}}, - 'type': 'object'}, - 'ModelInfo': {'description': 'ModelInfo returns essential ' - 'information about the model to ' - 'be\n' - 'migrated.', - 'properties': {'Result': {'$ref': '#/definitions/MigrationModelInfo'}}, - 'type': 'object'}, - 'Prechecks': {'description': 'Prechecks performs pre-migration ' - 'checks on the model and\n' - '(source) controller.', - 'properties': {'Params': {'$ref': '#/definitions/PrechecksArgs'}}, - 'type': 'object'}, - 'ProcessRelations': {'description': 'ProcessRelations ' - 'processes any relations ' - 'that need updating after ' - 'an export.\n' - 'This should help fix any ' - 'remoteApplications that ' - 'have been migrated.', - 'properties': {'Params': {'$ref': '#/definitions/ProcessRelations'}}, - 'type': 'object'}, - 'Reap': {'description': 'Reap removes all documents for the ' - 'model associated with the API\n' - 'connection.', - 'type': 'object'}, - 'SetPhase': {'description': 'SetPhase sets the phase of the ' - 'active model migration. The ' - 'provided\n' - 'phase must be a valid phase ' - 'value, for example QUIESCE" or\n' - '"ABORT". See the core/migration ' - 'package for the complete list.', - 'properties': {'Params': {'$ref': '#/definitions/SetMigrationPhaseArgs'}}, - 'type': 'object'}, - 'SetStatusMessage': {'description': 'SetStatusMessage sets a ' - 'human readable status ' - 'message containing\n' - 'information about the ' - "migration's progress. " - 'This will be shown in\n' - 'status output shown to ' - 'the end user.', - 'properties': {'Params': {'$ref': '#/definitions/SetMigrationStatusMessageArgs'}}, - 'type': 'object'}, - 'SourceControllerInfo': {'description': 'SourceControllerInfo ' - 'returns the details ' - 'required to connect ' - 'to\n' - 'the source controller ' - 'for model migration.', - 'properties': {'Result': {'$ref': '#/definitions/MigrationSourceInfo'}}, - 'type': 'object'}, - 'Watch': {'description': 'Watch starts watching for an active ' - 'migration for the model\n' - 'associated with the API connection. ' - 'The returned id should be used\n' - 'with the NotifyWatcher facade to ' - 'receive events.', - 'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}}, - 'type': 'object'}, - 'WatchMinionReports': {'description': 'WatchMinionReports sets ' - 'up a watcher which ' - 'reports when a report\n' - 'for a migration minion ' - 'has arrived.', - 'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}}, - 'type': 'object'}}, - 'type': 'object'} - - - @ReturnMapping(SerializedModel) - async def Export(self): - ''' - Export serializes the model associated with the API connection. - - - Returns -> SerializedModel - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='MigrationMaster', - request='Export', - version=3, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(MasterMigrationStatus) - async def MigrationStatus(self): - ''' - MigrationStatus returns the details and progress of the latest - model migration. - - - Returns -> MasterMigrationStatus - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='MigrationMaster', - request='MigrationStatus', - version=3, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringResult) - async def MinionReportTimeout(self): - ''' - MinionReportTimeout returns the configuration value for this controller that - indicates how long the migration master worker should wait for minions to - reported on phases of a migration. - - - Returns -> StringResult - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='MigrationMaster', - request='MinionReportTimeout', - version=3, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(MinionReports) - async def MinionReports(self): - ''' - MinionReports returns details of the reports made by migration - minions to the controller for the current migration phase. - - - Returns -> MinionReports - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='MigrationMaster', - request='MinionReports', - version=3, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(MigrationModelInfo) - async def ModelInfo(self): - ''' - ModelInfo returns essential information about the model to be - migrated. - - - Returns -> MigrationModelInfo - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='MigrationMaster', - request='ModelInfo', - version=3, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(None) - async def Prechecks(self, target_controller_version=None): - ''' - Prechecks performs pre-migration checks on the model and - (source) controller. - - target_controller_version : Number - Returns -> None - ''' - if target_controller_version is not None and not isinstance(target_controller_version, (dict, Number)): - raise Exception("Expected target_controller_version to be a Number, received: {}".format(type(target_controller_version))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='MigrationMaster', - request='Prechecks', - version=3, - params=_params) - _params['target-controller-version'] = target_controller_version - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(None) - async def ProcessRelations(self, controller_alias=None): - ''' - ProcessRelations processes any relations that need updating after an export. - This should help fix any remoteApplications that have been migrated. - - controller_alias : str - Returns -> None - ''' - if controller_alias is not None and not isinstance(controller_alias, (bytes, str)): - raise Exception("Expected controller_alias to be a str, received: {}".format(type(controller_alias))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='MigrationMaster', - request='ProcessRelations', - version=3, - params=_params) - _params['controller-alias'] = controller_alias - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(None) - async def Reap(self): - ''' - Reap removes all documents for the model associated with the API - connection. - - - Returns -> None - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='MigrationMaster', - request='Reap', - version=3, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(None) - async def SetPhase(self, phase=None): - ''' - SetPhase sets the phase of the active model migration. The provided - phase must be a valid phase value, for example QUIESCE" or - "ABORT". See the core/migration package for the complete list. - - phase : str - Returns -> None - ''' - if phase is not None and not isinstance(phase, (bytes, str)): - raise Exception("Expected phase to be a str, received: {}".format(type(phase))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='MigrationMaster', - request='SetPhase', - version=3, - params=_params) - _params['phase'] = phase - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(None) - async def SetStatusMessage(self, message=None): - ''' - SetStatusMessage sets a human readable status message containing - information about the migration's progress. This will be shown in - status output shown to the end user. - - message : str - Returns -> None - ''' - if message is not None and not isinstance(message, (bytes, str)): - raise Exception("Expected message to be a str, received: {}".format(type(message))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='MigrationMaster', - request='SetStatusMessage', - version=3, - params=_params) - _params['message'] = message - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(MigrationSourceInfo) - async def SourceControllerInfo(self): - ''' - SourceControllerInfo returns the details required to connect to - the source controller for model migration. - - - Returns -> MigrationSourceInfo - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='MigrationMaster', - request='SourceControllerInfo', - version=3, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(NotifyWatchResult) - async def Watch(self): - ''' - Watch starts watching for an active migration for the model - associated with the API connection. The returned id should be used - with the NotifyWatcher facade to receive events. - - - Returns -> NotifyWatchResult - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='MigrationMaster', - request='Watch', - version=3, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(NotifyWatchResult) - async def WatchMinionReports(self): - ''' - WatchMinionReports sets up a watcher which reports when a report - for a migration minion has arrived. - - - Returns -> NotifyWatchResult - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='MigrationMaster', - request='WatchMinionReports', - version=3, - params=_params) - - reply = await self.rpc(msg) - return reply - - - -class ModelConfigFacade(Type): - name = 'ModelConfig' - version = 3 - schema = {'definitions': {'ConfigValue': {'additionalProperties': False, - 'properties': {'source': {'type': 'string'}, - 'value': {'additionalProperties': True, - 'type': 'object'}}, - 'required': ['value', 'source'], - 'type': 'object'}, - 'Error': {'additionalProperties': False, - 'properties': {'code': {'type': 'string'}, - 'info': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'message': {'type': 'string'}}, - 'required': ['message', 'code'], - 'type': 'object'}, - 'GetConstraintsResults': {'additionalProperties': False, - 'properties': {'constraints': {'$ref': '#/definitions/Value'}}, - 'required': ['constraints'], - 'type': 'object'}, - 'ModelConfigResults': {'additionalProperties': False, - 'properties': {'config': {'patternProperties': {'.*': {'$ref': '#/definitions/ConfigValue'}}, - 'type': 'object'}}, - 'required': ['config'], - 'type': 'object'}, - 'ModelSLA': {'additionalProperties': False, - 'properties': {'ModelSLAInfo': {'$ref': '#/definitions/ModelSLAInfo'}, - 'creds': {'items': {'type': 'integer'}, - 'type': 'array'}, - 'level': {'type': 'string'}, - 'owner': {'type': 'string'}}, - 'required': ['level', - 'owner', - 'ModelSLAInfo', - 'creds'], - 'type': 'object'}, - 'ModelSLAInfo': {'additionalProperties': False, - 'properties': {'level': {'type': 'string'}, - 'owner': {'type': 'string'}}, - 'required': ['level', 'owner'], - 'type': 'object'}, - 'ModelSequencesResult': {'additionalProperties': False, - 'properties': {'sequences': {'patternProperties': {'.*': {'type': 'integer'}}, - 'type': 'object'}}, - 'required': ['sequences'], - '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'}, - 'SetConstraints': {'additionalProperties': False, - 'properties': {'application': {'type': 'string'}, - 'constraints': {'$ref': '#/definitions/Value'}}, - 'required': ['application', 'constraints'], - 'type': 'object'}, - 'StringResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'result': {'type': 'string'}}, - 'required': ['result'], - 'type': 'object'}, - 'Value': {'additionalProperties': False, - 'properties': {'allocate-public-ip': {'type': 'boolean'}, - 'arch': {'type': 'string'}, - 'container': {'type': 'string'}, - 'cores': {'type': 'integer'}, - 'cpu-power': {'type': 'integer'}, - 'image-id': {'type': 'string'}, - 'instance-role': {'type': 'string'}, - 'instance-type': {'type': 'string'}, - 'mem': {'type': 'integer'}, - 'root-disk': {'type': 'integer'}, - 'root-disk-source': {'type': 'string'}, - 'spaces': {'items': {'type': 'string'}, - 'type': 'array'}, - 'tags': {'items': {'type': 'string'}, - 'type': 'array'}, - 'virt-type': {'type': 'string'}, - 'zones': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'type': 'object'}}, - 'properties': {'GetModelConstraints': {'description': 'GetModelConstraints ' - 'returns the ' - 'constraints for the ' - 'model.', - 'properties': {'Result': {'$ref': '#/definitions/GetConstraintsResults'}}, - 'type': 'object'}, - 'ModelGet': {'description': 'ModelGet implements the ' - 'server-side part of the\n' - 'model-config CLI command.', - 'properties': {'Result': {'$ref': '#/definitions/ModelConfigResults'}}, - 'type': 'object'}, - 'ModelSet': {'description': 'ModelSet implements the ' - 'server-side part of the\n' - 'set-model-config CLI command.', - 'properties': {'Params': {'$ref': '#/definitions/ModelSet'}}, - 'type': 'object'}, - 'ModelUnset': {'description': 'ModelUnset implements the ' - 'server-side part of the\n' - 'set-model-config CLI command.', - 'properties': {'Params': {'$ref': '#/definitions/ModelUnset'}}, - 'type': 'object'}, - 'SLALevel': {'description': 'SLALevel returns the current sla ' - 'level for the model.', - 'properties': {'Result': {'$ref': '#/definitions/StringResult'}}, - 'type': 'object'}, - 'Sequences': {'description': "Sequences returns the model's " - 'sequence names and next values.', - 'properties': {'Result': {'$ref': '#/definitions/ModelSequencesResult'}}, - 'type': 'object'}, - 'SetModelConstraints': {'description': 'SetModelConstraints ' - 'sets the constraints ' - 'for the model.', - 'properties': {'Params': {'$ref': '#/definitions/SetConstraints'}}, - 'type': 'object'}, - 'SetSLALevel': {'description': 'SetSLALevel sets the sla level ' - 'on the model.', - 'properties': {'Params': {'$ref': '#/definitions/ModelSLA'}}, - 'type': 'object'}}, - 'type': 'object'} - - - @ReturnMapping(GetConstraintsResults) - async def GetModelConstraints(self): - ''' - GetModelConstraints returns the constraints for the model. - - - Returns -> GetConstraintsResults - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='ModelConfig', - request='GetModelConstraints', - version=3, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ModelConfigResults) - async def ModelGet(self): - ''' - ModelGet implements the server-side part of the - model-config CLI command. - - - Returns -> ModelConfigResults - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='ModelConfig', - request='ModelGet', - version=3, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(None) - async def ModelSet(self, config=None): - ''' - ModelSet implements the server-side part of the - set-model-config CLI command. - - config : typing.Mapping[str, typing.Any] - Returns -> None - ''' - if config is not None and not isinstance(config, dict): - raise Exception("Expected config to be a Mapping, received: {}".format(type(config))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='ModelConfig', - request='ModelSet', - version=3, - params=_params) - _params['config'] = config - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(None) - async def ModelUnset(self, keys=None): - ''' - ModelUnset implements the server-side part of the - set-model-config CLI command. - - keys : typing.Sequence[str] - Returns -> None - ''' - if keys is not None and not isinstance(keys, (bytes, str, list)): - raise Exception("Expected keys to be a Sequence, received: {}".format(type(keys))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='ModelConfig', - request='ModelUnset', - version=3, - params=_params) - _params['keys'] = keys - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringResult) - async def SLALevel(self): - ''' - SLALevel returns the current sla level for the model. - - - Returns -> StringResult - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='ModelConfig', - request='SLALevel', - version=3, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ModelSequencesResult) - async def Sequences(self): - ''' - Sequences returns the model's sequence names and next values. - - - Returns -> ModelSequencesResult - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='ModelConfig', - request='Sequences', - version=3, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(None) - async def SetModelConstraints(self, application=None, constraints=None): - ''' - SetModelConstraints sets the constraints for the model. - - application : str - constraints : Value - Returns -> None - ''' - if application is not None and not isinstance(application, (bytes, str)): - raise Exception("Expected application to be a str, received: {}".format(type(application))) - - if constraints is not None and not isinstance(constraints, (dict, Value)): - raise Exception("Expected constraints to be a Value, received: {}".format(type(constraints))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='ModelConfig', - request='SetModelConstraints', - version=3, - params=_params) - _params['application'] = application - _params['constraints'] = constraints - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(None) - async def SetSLALevel(self, modelslainfo=None, creds=None, level=None, owner=None): - ''' - SetSLALevel sets the sla level on the model. - - modelslainfo : ModelSLAInfo - creds : typing.Sequence[int] - level : str - owner : str - Returns -> None - ''' - if modelslainfo is not None and not isinstance(modelslainfo, (dict, ModelSLAInfo)): - raise Exception("Expected modelslainfo to be a ModelSLAInfo, received: {}".format(type(modelslainfo))) - - if creds is not None and not isinstance(creds, (bytes, str, list)): - raise Exception("Expected creds to be a Sequence, received: {}".format(type(creds))) - - if level is not None and not isinstance(level, (bytes, str)): - raise Exception("Expected level to be a str, received: {}".format(type(level))) - - if owner is not None and not isinstance(owner, (bytes, str)): - raise Exception("Expected owner to be a str, received: {}".format(type(owner))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='ModelConfig', - request='SetSLALevel', - version=3, - params=_params) - _params['ModelSLAInfo'] = modelslainfo - _params['creds'] = creds - _params['level'] = level - _params['owner'] = owner - reply = await self.rpc(msg) - return reply - - - -class ResourcesFacade(Type): - name = 'Resources' - version = 3 - schema = {'definitions': {'AddPendingResourcesArgsV2': {'additionalProperties': False, - 'properties': {'Entity': {'$ref': '#/definitions/Entity'}, - 'charm-origin': {'$ref': '#/definitions/CharmOrigin'}, - 'macaroon': {'$ref': '#/definitions/Macaroon'}, - 'resources': {'items': {'$ref': '#/definitions/CharmResource'}, - 'type': 'array'}, - 'tag': {'type': 'string'}, - 'url': {'type': 'string'}}, - 'required': ['tag', - 'Entity', - 'url', - 'charm-origin', - 'macaroon', - 'resources'], - 'type': 'object'}, - 'AddPendingResourcesResult': {'additionalProperties': False, - 'properties': {'ErrorResult': {'$ref': '#/definitions/ErrorResult'}, - 'error': {'$ref': '#/definitions/Error'}, - 'pending-ids': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'required': ['ErrorResult', - 'pending-ids'], - 'type': 'object'}, - 'Base': {'additionalProperties': False, - 'properties': {'channel': {'type': 'string'}, - 'name': {'type': 'string'}}, - 'required': ['name', 'channel'], - 'type': 'object'}, - 'CharmOrigin': {'additionalProperties': False, - 'properties': {'architecture': {'type': 'string'}, - 'base': {'$ref': '#/definitions/Base'}, - 'branch': {'type': 'string'}, - 'hash': {'type': 'string'}, - 'id': {'type': 'string'}, - 'instance-key': {'type': 'string'}, - 'revision': {'type': 'integer'}, - 'risk': {'type': 'string'}, - 'source': {'type': 'string'}, - 'track': {'type': 'string'}, - 'type': {'type': 'string'}}, - 'required': ['source', 'type', 'id'], - 'type': 'object'}, - 'CharmResource': {'additionalProperties': False, - 'properties': {'description': {'type': 'string'}, - 'fingerprint': {'items': {'type': 'integer'}, - 'type': 'array'}, - 'name': {'type': 'string'}, - 'origin': {'type': 'string'}, - 'path': {'type': 'string'}, - 'revision': {'type': 'integer'}, - 'size': {'type': 'integer'}, - 'type': {'type': 'string'}}, - 'required': ['name', - 'type', - 'path', - 'origin', - 'revision', - 'fingerprint', - 'size'], - 'type': 'object'}, - 'Entity': {'additionalProperties': False, - 'properties': {'tag': {'type': 'string'}}, - 'required': ['tag'], - 'type': 'object'}, - 'Error': {'additionalProperties': False, - 'properties': {'code': {'type': 'string'}, - 'info': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'message': {'type': 'string'}}, - 'required': ['message', 'code'], - 'type': 'object'}, - 'ErrorResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}}, - 'type': 'object'}, - 'ListResourcesArgs': {'additionalProperties': False, - 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'}, - 'type': 'array'}}, - 'required': ['entities'], - 'type': 'object'}, - 'Macaroon': {'additionalProperties': False, 'type': 'object'}, - 'Resource': {'additionalProperties': False, - 'properties': {'CharmResource': {'$ref': '#/definitions/CharmResource'}, - 'application': {'type': 'string'}, - 'description': {'type': 'string'}, - 'fingerprint': {'items': {'type': 'integer'}, - 'type': 'array'}, - 'id': {'type': 'string'}, - 'name': {'type': 'string'}, - 'origin': {'type': 'string'}, - 'path': {'type': 'string'}, - 'pending-id': {'type': 'string'}, - 'revision': {'type': 'integer'}, - 'size': {'type': 'integer'}, - 'timestamp': {'format': 'date-time', - 'type': 'string'}, - 'type': {'type': 'string'}, - 'username': {'type': 'string'}}, - 'required': ['name', - 'type', - 'path', - 'origin', - 'revision', - 'fingerprint', - 'size', - 'CharmResource', - 'id', - 'pending-id', - 'application', - 'username', - 'timestamp'], - 'type': 'object'}, - 'ResourcesResult': {'additionalProperties': False, - 'properties': {'ErrorResult': {'$ref': '#/definitions/ErrorResult'}, - 'charm-store-resources': {'items': {'$ref': '#/definitions/CharmResource'}, - 'type': 'array'}, - 'error': {'$ref': '#/definitions/Error'}, - 'resources': {'items': {'$ref': '#/definitions/Resource'}, - 'type': 'array'}, - 'unit-resources': {'items': {'$ref': '#/definitions/UnitResources'}, - 'type': 'array'}}, - 'required': ['ErrorResult', - 'resources', - 'charm-store-resources', - 'unit-resources'], - 'type': 'object'}, - 'ResourcesResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/ResourcesResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'UnitResources': {'additionalProperties': False, - 'properties': {'Entity': {'$ref': '#/definitions/Entity'}, - 'download-progress': {'patternProperties': {'.*': {'type': 'integer'}}, - 'type': 'object'}, - 'resources': {'items': {'$ref': '#/definitions/Resource'}, - 'type': 'array'}, - 'tag': {'type': 'string'}}, - 'required': ['tag', - 'Entity', - 'resources', - 'download-progress'], - 'type': 'object'}}, - 'properties': {'AddPendingResources': {'description': 'AddPendingResources ' - 'adds the provided ' - 'resources (info) to ' - 'the Juju\n' - 'model in a pending ' - 'state, meaning they ' - 'are not available ' - 'until\n' - 'resolved. Handles ' - 'CharmHub and Local ' - 'charms.', - 'properties': {'Params': {'$ref': '#/definitions/AddPendingResourcesArgsV2'}, - 'Result': {'$ref': '#/definitions/AddPendingResourcesResult'}}, - 'type': 'object'}, - 'ListResources': {'description': 'ListResources returns the ' - 'list of resources for the ' - 'given application.', - 'properties': {'Params': {'$ref': '#/definitions/ListResourcesArgs'}, - 'Result': {'$ref': '#/definitions/ResourcesResults'}}, - 'type': 'object'}}, - 'type': 'object'} - - - @ReturnMapping(AddPendingResourcesResult) - async def AddPendingResources(self, entity=None, charm_origin=None, macaroon=None, resources=None, tag=None, url=None): - ''' - AddPendingResources adds the provided resources (info) to the Juju - model in a pending state, meaning they are not available until - resolved. Handles CharmHub and Local charms. - - entity : Entity - charm_origin : CharmOrigin - macaroon : Macaroon - resources : typing.Sequence[~CharmResource] - tag : str - url : str - Returns -> AddPendingResourcesResult - ''' - if entity is not None and not isinstance(entity, (dict, Entity)): - raise Exception("Expected entity to be a Entity, received: {}".format(type(entity))) - - if charm_origin is not None and not isinstance(charm_origin, (dict, CharmOrigin)): - raise Exception("Expected charm_origin to be a CharmOrigin, received: {}".format(type(charm_origin))) - - if macaroon is not None and not isinstance(macaroon, (dict, Macaroon)): - raise Exception("Expected macaroon to be a Macaroon, received: {}".format(type(macaroon))) - - if resources is not None and not isinstance(resources, (bytes, str, list)): - raise Exception("Expected resources to be a Sequence, received: {}".format(type(resources))) - - if tag is not None and not isinstance(tag, (bytes, str)): - raise Exception("Expected tag to be a str, received: {}".format(type(tag))) - - if url is not None and not isinstance(url, (bytes, str)): - raise Exception("Expected url to be a str, received: {}".format(type(url))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Resources', - request='AddPendingResources', - version=3, - params=_params) - _params['Entity'] = entity - _params['charm-origin'] = charm_origin - _params['macaroon'] = macaroon - _params['resources'] = resources - _params['tag'] = tag - _params['url'] = url - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ResourcesResults) - async def ListResources(self, entities=None): - ''' - ListResources returns the list of resources for the given application. - - entities : typing.Sequence[~Entity] - Returns -> ResourcesResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Resources', - request='ListResources', - version=3, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - -class UpgradeSeriesFacade(Type): - name = 'UpgradeSeries' - version = 3 - schema = {'definitions': {'Entities': {'additionalProperties': False, - 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'}, - 'type': 'array'}}, - 'required': ['entities'], - 'type': 'object'}, - 'EntitiesResult': {'additionalProperties': False, - 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'}, - 'type': 'array'}, - 'error': {'$ref': '#/definitions/Error'}}, - 'required': ['entities'], - 'type': 'object'}, - 'EntitiesResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/EntitiesResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'Entity': {'additionalProperties': False, - 'properties': {'tag': {'type': 'string'}}, - 'required': ['tag'], - 'type': 'object'}, - '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': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'message': {'type': 'string'}}, - 'required': ['message', 'code'], - 'type': 'object'}, - 'ErrorResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}}, - 'type': 'object'}, - 'ErrorResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'NotifyWatchResult': {'additionalProperties': False, - 'properties': {'NotifyWatcherId': {'type': 'string'}, - 'error': {'$ref': '#/definitions/Error'}}, - 'required': ['NotifyWatcherId'], - 'type': 'object'}, - 'NotifyWatchResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'PinApplicationResult': {'additionalProperties': False, - 'properties': {'application-name': {'type': 'string'}, - 'error': {'$ref': '#/definitions/Error'}}, - 'required': ['application-name'], - 'type': 'object'}, - 'PinApplicationsResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/PinApplicationResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'PinnedLeadershipResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'result': {'patternProperties': {'.*': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'type': 'object'}}, - 'type': 'object'}, - 'SetStatus': {'additionalProperties': False, - 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'}, - 'type': 'array'}}, - 'required': ['entities'], - 'type': 'object'}, - 'StringResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'result': {'type': 'string'}}, - 'required': ['result'], - 'type': 'object'}, - 'StringResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'UpdateChannelArg': {'additionalProperties': False, - 'properties': {'channel': {'type': 'string'}, - 'force': {'type': 'boolean'}, - 'tag': {'$ref': '#/definitions/Entity'}}, - 'required': ['tag', 'force', 'channel'], - 'type': 'object'}, - 'UpdateChannelArgs': {'additionalProperties': False, - 'properties': {'args': {'items': {'$ref': '#/definitions/UpdateChannelArg'}, - 'type': 'array'}}, - 'required': ['args'], - 'type': 'object'}, - 'UpgradeSeriesStartUnitCompletionParam': {'additionalProperties': False, - 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'}, - 'type': 'array'}, - 'message': {'type': 'string'}}, - 'required': ['entities', - 'message'], - 'type': 'object'}, - 'UpgradeSeriesStatusParam': {'additionalProperties': False, - 'properties': {'entity': {'$ref': '#/definitions/Entity'}, - 'message': {'type': 'string'}, - 'status': {'type': 'string'}}, - 'required': ['entity', - 'status', - 'message'], - 'type': 'object'}, - 'UpgradeSeriesStatusParams': {'additionalProperties': False, - 'properties': {'params': {'items': {'$ref': '#/definitions/UpgradeSeriesStatusParam'}, - 'type': 'array'}}, - 'required': ['params'], - 'type': 'object'}, - 'UpgradeSeriesStatusResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'status': {'type': 'string'}, - 'target': {'type': 'string'}}, - 'type': 'object'}, - 'UpgradeSeriesStatusResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/UpgradeSeriesStatusResult'}, - 'type': 'array'}}, - 'type': 'object'}}, - 'properties': {'CurrentSeries': {'description': 'CurrentSeries returns what ' - 'Juju thinks the current ' - 'series of the machine is.\n' - 'Note that a machine could ' - 'have been upgraded ' - 'out-of-band by running\n' - 'do-release-upgrade outside ' - 'of the upgrade-machine ' - 'workflow,\n' - 'making this value incorrect.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/StringResults'}}, - 'type': 'object'}, - 'FinishUpgradeSeries': {'description': 'FinishUpgradeSeries is ' - 'the last action in the ' - 'upgrade workflow and ' - 'is\n' - 'called after all ' - 'machine and unit ' - 'statuses are ' - '"completed".\n' - 'It updates the machine ' - 'series to reflect the ' - 'completed upgrade, ' - 'then\n' - 'removes the ' - 'upgrade-machine lock.', - 'properties': {'Params': {'$ref': '#/definitions/UpdateChannelArgs'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'MachineStatus': {'description': 'MachineStatus gets the ' - 'current upgrade-machine ' - 'status of a machine.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/UpgradeSeriesStatusResults'}}, - 'type': 'object'}, - 'PinMachineApplications': {'description': 'PinMachineApplications ' - 'pins leadership for ' - 'applications ' - 'represented by ' - 'units\n' - 'running on the ' - "auth'd machine.", - 'properties': {'Result': {'$ref': '#/definitions/PinApplicationsResults'}}, - 'type': 'object'}, - 'PinnedLeadership': {'description': 'PinnedLeadership returns ' - 'all pinned applications ' - 'and the entities that\n' - 'require their pinned ' - 'behaviour, for leadership ' - 'in the current model.', - 'properties': {'Result': {'$ref': '#/definitions/PinnedLeadershipResult'}}, - 'type': 'object'}, - 'SetInstanceStatus': {'description': 'SetInstanceStatus sets ' - 'the status of the ' - 'machine.', - 'properties': {'Params': {'$ref': '#/definitions/SetStatus'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'SetMachineStatus': {'description': 'SetMachineStatus sets the ' - 'current upgrade-machine ' - 'status of a machine.', - 'properties': {'Params': {'$ref': '#/definitions/UpgradeSeriesStatusParams'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'SetUpgradeSeriesUnitStatus': {'description': 'SetUpgradeSeriesUnitStatus ' - 'sets the ' - 'upgrade series ' - 'status of the ' - 'unit.\n' - 'If no upgrade ' - 'is in progress ' - 'an error is ' - 'returned ' - 'instead.', - 'properties': {'Params': {'$ref': '#/definitions/UpgradeSeriesStatusParams'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'StartUnitCompletion': {'description': 'StartUnitCompletion ' - 'starts the upgrade ' - 'series completion ' - 'phase for all ' - 'subordinate\n' - 'units of a given ' - 'machine.', - 'properties': {'Params': {'$ref': '#/definitions/UpgradeSeriesStartUnitCompletionParam'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'TargetSeries': {'description': 'TargetSeries returns the ' - 'series that a machine has ' - 'been locked\n' - 'for upgrading to.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/StringResults'}}, - 'type': 'object'}, - 'UnitsCompleted': {'description': 'UnitsCompleted returns the ' - 'units running on this ' - 'machine that have ' - 'completed\n' - 'the upgrade-machine ' - 'workflow and are in their ' - 'normal running state.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/EntitiesResults'}}, - 'type': 'object'}, - 'UnitsPrepared': {'description': 'UnitsPrepared returns the ' - 'units running on this ' - 'machine that have completed\n' - 'their upgrade-machine ' - 'preparation, and are ready ' - 'to be stopped and have ' - 'their\n' - 'unit agent services ' - 'converted for the target ' - 'series.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/EntitiesResults'}}, - 'type': 'object'}, - 'UnpinMachineApplications': {'description': 'UnpinMachineApplications ' - 'unpins leadership ' - 'for applications ' - 'represented by\n' - 'units running on ' - "the auth'd " - 'machine.', - 'properties': {'Result': {'$ref': '#/definitions/PinApplicationsResults'}}, - 'type': 'object'}, - 'UpgradeSeriesUnitStatus': {'description': 'UpgradeSeriesUnitStatus ' - 'returns the ' - 'current ' - 'preparation status ' - 'of an\n' - 'upgrading unit.\n' - 'If no series ' - 'upgrade is in ' - 'progress an error ' - 'is returned ' - 'instead.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/UpgradeSeriesStatusResults'}}, - 'type': 'object'}, - 'WatchUpgradeSeriesNotifications': {'description': 'WatchUpgradeSeriesNotifications ' - 'returns a ' - 'NotifyWatcher ' - 'for ' - 'observing ' - 'changes to ' - 'upgrade ' - 'series ' - 'locks.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/NotifyWatchResults'}}, - 'type': 'object'}}, - 'type': 'object'} - - - @ReturnMapping(StringResults) - async def CurrentSeries(self, entities=None): - ''' - CurrentSeries returns what Juju thinks the current series of the machine is. - Note that a machine could have been upgraded out-of-band by running - do-release-upgrade outside of the upgrade-machine workflow, - making this value incorrect. - - entities : typing.Sequence[~Entity] - Returns -> StringResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='UpgradeSeries', - request='CurrentSeries', - version=3, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def FinishUpgradeSeries(self, args=None): - ''' - FinishUpgradeSeries is the last action in the upgrade workflow and is - called after all machine and unit statuses are "completed". - It updates the machine series to reflect the completed upgrade, then - removes the upgrade-machine lock. - - args : typing.Sequence[~UpdateChannelArg] - Returns -> ErrorResults - ''' - if args is not None and not isinstance(args, (bytes, str, list)): - raise Exception("Expected args to be a Sequence, received: {}".format(type(args))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='UpgradeSeries', - request='FinishUpgradeSeries', - version=3, - params=_params) - _params['args'] = args - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(UpgradeSeriesStatusResults) - async def MachineStatus(self, entities=None): - ''' - MachineStatus gets the current upgrade-machine status of a machine. - - entities : typing.Sequence[~Entity] - Returns -> UpgradeSeriesStatusResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='UpgradeSeries', - request='MachineStatus', - version=3, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(PinApplicationsResults) - async def PinMachineApplications(self): - ''' - PinMachineApplications pins leadership for applications represented by units - running on the auth'd machine. - - - Returns -> PinApplicationsResults - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='UpgradeSeries', - request='PinMachineApplications', - version=3, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(PinnedLeadershipResult) - async def PinnedLeadership(self): - ''' - PinnedLeadership returns all pinned applications and the entities that - require their pinned behaviour, for leadership in the current model. - - - Returns -> PinnedLeadershipResult - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='UpgradeSeries', - request='PinnedLeadership', - version=3, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def SetInstanceStatus(self, entities=None): - ''' - SetInstanceStatus sets the status of the machine. - - entities : typing.Sequence[~EntityStatusArgs] - Returns -> ErrorResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='UpgradeSeries', - request='SetInstanceStatus', - version=3, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def SetMachineStatus(self, params=None): - ''' - SetMachineStatus sets the current upgrade-machine status of a machine. - - params : typing.Sequence[~UpgradeSeriesStatusParam] - Returns -> ErrorResults - ''' - if params is not None and not isinstance(params, (bytes, str, list)): - raise Exception("Expected params to be a Sequence, received: {}".format(type(params))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='UpgradeSeries', - request='SetMachineStatus', - version=3, - params=_params) - _params['params'] = params - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def SetUpgradeSeriesUnitStatus(self, params=None): - ''' - SetUpgradeSeriesUnitStatus sets the upgrade series status of the unit. - If no upgrade is in progress an error is returned instead. - - params : typing.Sequence[~UpgradeSeriesStatusParam] - Returns -> ErrorResults - ''' - if params is not None and not isinstance(params, (bytes, str, list)): - raise Exception("Expected params to be a Sequence, received: {}".format(type(params))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='UpgradeSeries', - request='SetUpgradeSeriesUnitStatus', - version=3, - params=_params) - _params['params'] = params - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def StartUnitCompletion(self, entities=None, message=None): - ''' - StartUnitCompletion starts the upgrade series completion phase for all subordinate - units of a given machine. - - entities : typing.Sequence[~Entity] - message : str - Returns -> ErrorResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - if message is not None and not isinstance(message, (bytes, str)): - raise Exception("Expected message to be a str, received: {}".format(type(message))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='UpgradeSeries', - request='StartUnitCompletion', - version=3, - params=_params) - _params['entities'] = entities - _params['message'] = message - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringResults) - async def TargetSeries(self, entities=None): - ''' - TargetSeries returns the series that a machine has been locked - for upgrading to. - - entities : typing.Sequence[~Entity] - Returns -> StringResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='UpgradeSeries', - request='TargetSeries', - version=3, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(EntitiesResults) - async def UnitsCompleted(self, entities=None): - ''' - UnitsCompleted returns the units running on this machine that have completed - the upgrade-machine workflow and are in their normal running state. - - entities : typing.Sequence[~Entity] - Returns -> EntitiesResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='UpgradeSeries', - request='UnitsCompleted', - version=3, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply + SetSLALevel sets the sla level on the model. + modelslainfo : ModelSLAInfo + creds : typing.Sequence[int] + level : str + owner : str + Returns -> None + ''' + if modelslainfo is not None and not isinstance(modelslainfo, (dict, ModelSLAInfo)): + raise Exception("Expected modelslainfo to be a ModelSLAInfo, received: {}".format(type(modelslainfo))) + if creds is not None and not isinstance(creds, (bytes, str, list)): + raise Exception("Expected creds to be a Sequence, received: {}".format(type(creds))) - @ReturnMapping(EntitiesResults) - async def UnitsPrepared(self, entities=None): - ''' - UnitsPrepared returns the units running on this machine that have completed - their upgrade-machine preparation, and are ready to be stopped and have their - unit agent services converted for the target series. + if level is not None and not isinstance(level, (bytes, str)): + raise Exception("Expected level to be a str, received: {}".format(type(level))) - entities : typing.Sequence[~Entity] - Returns -> EntitiesResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) + if owner is not None and not isinstance(owner, (bytes, str)): + raise Exception("Expected owner to be a str, received: {}".format(type(owner))) # map input types to rpc msg _params = dict() - msg = dict(type='UpgradeSeries', - request='UnitsPrepared', + msg = dict(type='ModelConfig', + request='SetSLALevel', version=3, params=_params) - _params['entities'] = entities + _params['ModelSLAInfo'] = modelslainfo + _params['creds'] = creds + _params['level'] = level + _params['owner'] = owner reply = await self.rpc(msg) return reply - @ReturnMapping(PinApplicationsResults) - async def UnpinMachineApplications(self): - ''' - UnpinMachineApplications unpins leadership for applications represented by - units running on the auth'd machine. - +class ResourcesFacade(Type): + name = 'Resources' + version = 3 + schema = {'definitions': {'AddPendingResourcesArgsV2': {'additionalProperties': False, + 'properties': {'Entity': {'$ref': '#/definitions/Entity'}, + 'charm-origin': {'$ref': '#/definitions/CharmOrigin'}, + 'macaroon': {'$ref': '#/definitions/Macaroon'}, + 'resources': {'items': {'$ref': '#/definitions/CharmResource'}, + 'type': 'array'}, + 'tag': {'type': 'string'}, + 'url': {'type': 'string'}}, + 'required': ['tag', + 'Entity', + 'url', + 'charm-origin', + 'macaroon', + 'resources'], + 'type': 'object'}, + 'AddPendingResourcesResult': {'additionalProperties': False, + 'properties': {'ErrorResult': {'$ref': '#/definitions/ErrorResult'}, + 'error': {'$ref': '#/definitions/Error'}, + 'pending-ids': {'items': {'type': 'string'}, + 'type': 'array'}}, + 'required': ['ErrorResult', + 'pending-ids'], + 'type': 'object'}, + 'Base': {'additionalProperties': False, + 'properties': {'channel': {'type': 'string'}, + 'name': {'type': 'string'}}, + 'required': ['name', 'channel'], + 'type': 'object'}, + 'CharmOrigin': {'additionalProperties': False, + 'properties': {'architecture': {'type': 'string'}, + 'base': {'$ref': '#/definitions/Base'}, + 'branch': {'type': 'string'}, + 'hash': {'type': 'string'}, + 'id': {'type': 'string'}, + 'instance-key': {'type': 'string'}, + 'revision': {'type': 'integer'}, + 'risk': {'type': 'string'}, + 'source': {'type': 'string'}, + 'track': {'type': 'string'}, + 'type': {'type': 'string'}}, + 'required': ['source', 'type', 'id'], + 'type': 'object'}, + 'CharmResource': {'additionalProperties': False, + 'properties': {'description': {'type': 'string'}, + 'fingerprint': {'items': {'type': 'integer'}, + 'type': 'array'}, + 'name': {'type': 'string'}, + 'origin': {'type': 'string'}, + 'path': {'type': 'string'}, + 'revision': {'type': 'integer'}, + 'size': {'type': 'integer'}, + 'type': {'type': 'string'}}, + 'required': ['name', + 'type', + 'path', + 'origin', + 'revision', + 'fingerprint', + 'size'], + 'type': 'object'}, + 'Entity': {'additionalProperties': False, + 'properties': {'tag': {'type': 'string'}}, + 'required': ['tag'], + 'type': 'object'}, + 'Error': {'additionalProperties': False, + 'properties': {'code': {'type': 'string'}, + 'info': {'patternProperties': {'.*': {'additionalProperties': True, + 'type': 'object'}}, + 'type': 'object'}, + 'message': {'type': 'string'}}, + 'required': ['message', 'code'], + 'type': 'object'}, + 'ErrorResult': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}}, + 'type': 'object'}, + 'ListResourcesArgs': {'additionalProperties': False, + 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'}, + 'type': 'array'}}, + 'required': ['entities'], + 'type': 'object'}, + 'Macaroon': {'additionalProperties': False, 'type': 'object'}, + 'Resource': {'additionalProperties': False, + 'properties': {'CharmResource': {'$ref': '#/definitions/CharmResource'}, + 'application': {'type': 'string'}, + 'description': {'type': 'string'}, + 'fingerprint': {'items': {'type': 'integer'}, + 'type': 'array'}, + 'id': {'type': 'string'}, + 'name': {'type': 'string'}, + 'origin': {'type': 'string'}, + 'path': {'type': 'string'}, + 'pending-id': {'type': 'string'}, + 'revision': {'type': 'integer'}, + 'size': {'type': 'integer'}, + 'timestamp': {'format': 'date-time', + 'type': 'string'}, + 'type': {'type': 'string'}, + 'username': {'type': 'string'}}, + 'required': ['name', + 'type', + 'path', + 'origin', + 'revision', + 'fingerprint', + 'size', + 'CharmResource', + 'id', + 'pending-id', + 'application', + 'username', + 'timestamp'], + 'type': 'object'}, + 'ResourcesResult': {'additionalProperties': False, + 'properties': {'ErrorResult': {'$ref': '#/definitions/ErrorResult'}, + 'charm-store-resources': {'items': {'$ref': '#/definitions/CharmResource'}, + 'type': 'array'}, + 'error': {'$ref': '#/definitions/Error'}, + 'resources': {'items': {'$ref': '#/definitions/Resource'}, + 'type': 'array'}, + 'unit-resources': {'items': {'$ref': '#/definitions/UnitResources'}, + 'type': 'array'}}, + 'required': ['ErrorResult', + 'resources', + 'charm-store-resources', + 'unit-resources'], + 'type': 'object'}, + 'ResourcesResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/ResourcesResult'}, + 'type': 'array'}}, + 'required': ['results'], + 'type': 'object'}, + 'UnitResources': {'additionalProperties': False, + 'properties': {'Entity': {'$ref': '#/definitions/Entity'}, + 'download-progress': {'patternProperties': {'.*': {'type': 'integer'}}, + 'type': 'object'}, + 'resources': {'items': {'$ref': '#/definitions/Resource'}, + 'type': 'array'}, + 'tag': {'type': 'string'}}, + 'required': ['tag', + 'Entity', + 'resources', + 'download-progress'], + 'type': 'object'}}, + 'properties': {'AddPendingResources': {'description': 'AddPendingResources ' + 'adds the provided ' + 'resources (info) to ' + 'the Juju\n' + 'model in a pending ' + 'state, meaning they ' + 'are not available ' + 'until\n' + 'resolved. Handles ' + 'CharmHub and Local ' + 'charms.', + 'properties': {'Params': {'$ref': '#/definitions/AddPendingResourcesArgsV2'}, + 'Result': {'$ref': '#/definitions/AddPendingResourcesResult'}}, + 'type': 'object'}, + 'ListResources': {'description': 'ListResources returns the ' + 'list of resources for the ' + 'given application.', + 'properties': {'Params': {'$ref': '#/definitions/ListResourcesArgs'}, + 'Result': {'$ref': '#/definitions/ResourcesResults'}}, + 'type': 'object'}}, + 'type': 'object'} + - Returns -> PinApplicationsResults + @ReturnMapping(AddPendingResourcesResult) + async def AddPendingResources(self, entity=None, charm_origin=None, macaroon=None, resources=None, tag=None, url=None): ''' + AddPendingResources adds the provided resources (info) to the Juju + model in a pending state, meaning they are not available until + resolved. Handles CharmHub and Local charms. - # map input types to rpc msg - _params = dict() - msg = dict(type='UpgradeSeries', - request='UnpinMachineApplications', - version=3, - params=_params) + entity : Entity + charm_origin : CharmOrigin + macaroon : Macaroon + resources : typing.Sequence[~CharmResource] + tag : str + url : str + Returns -> AddPendingResourcesResult + ''' + if entity is not None and not isinstance(entity, (dict, Entity)): + raise Exception("Expected entity to be a Entity, received: {}".format(type(entity))) - reply = await self.rpc(msg) - return reply + if charm_origin is not None and not isinstance(charm_origin, (dict, CharmOrigin)): + raise Exception("Expected charm_origin to be a CharmOrigin, received: {}".format(type(charm_origin))) + if macaroon is not None and not isinstance(macaroon, (dict, Macaroon)): + raise Exception("Expected macaroon to be a Macaroon, received: {}".format(type(macaroon))) + if resources is not None and not isinstance(resources, (bytes, str, list)): + raise Exception("Expected resources to be a Sequence, received: {}".format(type(resources))) - @ReturnMapping(UpgradeSeriesStatusResults) - async def UpgradeSeriesUnitStatus(self, entities=None): - ''' - UpgradeSeriesUnitStatus returns the current preparation status of an - upgrading unit. - If no series upgrade is in progress an error is returned instead. + if tag is not None and not isinstance(tag, (bytes, str)): + raise Exception("Expected tag to be a str, received: {}".format(type(tag))) - entities : typing.Sequence[~Entity] - Returns -> UpgradeSeriesStatusResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) + if url is not None and not isinstance(url, (bytes, str)): + raise Exception("Expected url to be a str, received: {}".format(type(url))) # map input types to rpc msg _params = dict() - msg = dict(type='UpgradeSeries', - request='UpgradeSeriesUnitStatus', + msg = dict(type='Resources', + request='AddPendingResources', version=3, params=_params) - _params['entities'] = entities + _params['Entity'] = entity + _params['charm-origin'] = charm_origin + _params['macaroon'] = macaroon + _params['resources'] = resources + _params['tag'] = tag + _params['url'] = url reply = await self.rpc(msg) return reply - @ReturnMapping(NotifyWatchResults) - async def WatchUpgradeSeriesNotifications(self, entities=None): + @ReturnMapping(ResourcesResults) + async def ListResources(self, entities=None): ''' - WatchUpgradeSeriesNotifications returns a NotifyWatcher for observing changes to upgrade series locks. + ListResources returns the list of resources for the given application. entities : typing.Sequence[~Entity] - Returns -> NotifyWatchResults + Returns -> ResourcesResults ''' if entities is not None and not isinstance(entities, (bytes, str, list)): raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) # map input types to rpc msg _params = dict() - msg = dict(type='UpgradeSeries', - request='WatchUpgradeSeriesNotifications', + msg = dict(type='Resources', + request='ListResources', version=3, params=_params) _params['entities'] = entities diff --git a/juju/client/_client4.py b/juju/client/_client4.py index b313103c..090bbf04 100644 --- a/juju/client/_client4.py +++ b/juju/client/_client4.py @@ -663,51 +663,41 @@ async def RemoteApplicationInfo(self, bakery_version=None, offer_urls=None): -class InstancePollerFacade(Type): - name = 'InstancePoller' +class ModelGenerationFacade(Type): + name = 'ModelGeneration' version = 4 - schema = {'definitions': {'Address': {'additionalProperties': False, - 'properties': {'cidr': {'type': 'string'}, - 'config-type': {'type': 'string'}, - 'is-secondary': {'type': 'boolean'}, - 'scope': {'type': 'string'}, - 'space-id': {'type': 'string'}, - 'space-name': {'type': 'string'}, - 'type': {'type': 'string'}, - 'value': {'type': 'string'}}, - 'required': ['value', 'type', 'scope'], - 'type': 'object'}, - 'BoolResult': {'additionalProperties': False, + schema = {'definitions': {'BoolResult': {'additionalProperties': False, 'properties': {'error': {'$ref': '#/definitions/Error'}, 'result': {'type': 'boolean'}}, 'required': ['result'], 'type': 'object'}, - 'BoolResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/BoolResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'Entities': {'additionalProperties': False, - 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'}, - 'type': 'array'}}, - 'required': ['entities'], - 'type': 'object'}, + 'BranchArg': {'additionalProperties': False, + 'properties': {'branch': {'type': 'string'}}, + 'required': ['branch'], + 'type': 'object'}, + 'BranchInfoArgs': {'additionalProperties': False, + 'properties': {'branches': {'items': {'type': 'string'}, + 'type': 'array'}, + 'detailed': {'type': 'boolean'}}, + 'required': ['branches', 'detailed'], + 'type': 'object'}, + 'BranchResults': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}, + 'generations': {'items': {'$ref': '#/definitions/Generation'}, + 'type': 'array'}}, + 'required': ['generations'], + 'type': 'object'}, + 'BranchTrackArg': {'additionalProperties': False, + 'properties': {'branch': {'type': 'string'}, + 'entities': {'items': {'$ref': '#/definitions/Entity'}, + 'type': 'array'}, + 'num-units': {'type': 'integer'}}, + 'required': ['branch', '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': {'patternProperties': {'.*': {'additionalProperties': True, @@ -724,2621 +714,478 @@ class InstancePollerFacade(Type): 'type': 'array'}}, 'required': ['results'], 'type': 'object'}, - 'LifeResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'life': {'type': 'string'}}, - 'required': ['life'], - 'type': 'object'}, - 'LifeResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'MachineAddresses': {'additionalProperties': False, - 'properties': {'addresses': {'items': {'$ref': '#/definitions/Address'}, - 'type': 'array'}, - 'tag': {'type': 'string'}}, - 'required': ['tag', 'addresses'], - 'type': 'object'}, - 'MachineAddressesResult': {'additionalProperties': False, - 'properties': {'addresses': {'items': {'$ref': '#/definitions/Address'}, - 'type': 'array'}, - 'error': {'$ref': '#/definitions/Error'}}, - 'required': ['addresses'], - 'type': 'object'}, - 'MachineAddressesResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/MachineAddressesResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'ModelConfigResult': {'additionalProperties': False, - 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}}, - 'required': ['config'], - 'type': 'object'}, - 'NetworkConfig': {'additionalProperties': False, - 'properties': {'address': {'type': 'string'}, - 'addresses': {'items': {'$ref': '#/definitions/Address'}, + 'Generation': {'additionalProperties': False, + 'properties': {'applications': {'items': {'$ref': '#/definitions/GenerationApplication'}, 'type': 'array'}, - 'cidr': {'type': 'string'}, - 'config-type': {'type': 'string'}, - 'device-index': {'type': 'integer'}, - 'disabled': {'type': 'boolean'}, - 'dns-search-domains': {'items': {'type': 'string'}, - 'type': 'array'}, - 'dns-servers': {'items': {'type': 'string'}, - 'type': 'array'}, - 'gateway-address': {'type': 'string'}, - 'interface-name': {'type': 'string'}, - 'interface-type': {'type': 'string'}, - 'is-default-gateway': {'type': 'boolean'}, - 'mac-address': {'type': 'string'}, - 'mtu': {'type': 'integer'}, - 'no-auto-start': {'type': 'boolean'}, - 'origin': {'type': 'string'}, - 'parent-interface-name': {'type': 'string'}, - 'provider-address-id': {'type': 'string'}, - 'provider-id': {'type': 'string'}, - 'provider-network-id': {'type': 'string'}, - 'provider-space-id': {'type': 'string'}, - 'provider-subnet-id': {'type': 'string'}, - 'provider-vlan-id': {'type': 'string'}, - 'routes': {'items': {'$ref': '#/definitions/NetworkRoute'}, - 'type': 'array'}, - 'shadow-addresses': {'items': {'$ref': '#/definitions/Address'}, - 'type': 'array'}, - 'virtual-port-type': {'type': 'string'}, - 'vlan-tag': {'type': 'integer'}}, - 'required': ['device-index', - 'mac-address', - 'cidr', - 'mtu', - 'provider-id', - 'provider-network-id', - 'provider-subnet-id', - 'provider-space-id', - 'provider-address-id', - 'provider-vlan-id', - 'vlan-tag', - 'interface-name', - 'parent-interface-name', - 'interface-type', - 'disabled'], - 'type': 'object'}, - 'NetworkRoute': {'additionalProperties': False, - 'properties': {'destination-cidr': {'type': 'string'}, - 'gateway-ip': {'type': 'string'}, - 'metric': {'type': 'integer'}}, - 'required': ['destination-cidr', - 'gateway-ip', - 'metric'], - 'type': 'object'}, - 'NotifyWatchResult': {'additionalProperties': False, - 'properties': {'NotifyWatcherId': {'type': 'string'}, - 'error': {'$ref': '#/definitions/Error'}}, - 'required': ['NotifyWatcherId'], - 'type': 'object'}, - 'ProviderNetworkConfig': {'additionalProperties': False, - 'properties': {'config': {'items': {'$ref': '#/definitions/NetworkConfig'}, - 'type': 'array'}, - 'tag': {'type': 'string'}}, - 'required': ['tag', 'config'], + 'branch': {'type': 'string'}, + 'completed': {'type': 'integer'}, + 'completed-by': {'type': 'string'}, + 'created': {'type': 'integer'}, + 'created-by': {'type': 'string'}, + 'generation-id': {'type': 'integer'}}, + 'required': ['branch', + 'created', + 'created-by', + 'applications'], + 'type': 'object'}, + 'GenerationApplication': {'additionalProperties': False, + 'properties': {'application': {'type': 'string'}, + 'config': {'patternProperties': {'.*': {'additionalProperties': True, + 'type': 'object'}}, + 'type': 'object'}, + 'pending': {'items': {'type': 'string'}, + 'type': 'array'}, + 'progress': {'type': 'string'}, + 'tracking': {'items': {'type': 'string'}, + 'type': 'array'}}, + 'required': ['application', + 'progress', + 'config'], 'type': 'object'}, - 'SetMachinesAddresses': {'additionalProperties': False, - 'properties': {'machine-addresses': {'items': {'$ref': '#/definitions/MachineAddresses'}, - 'type': 'array'}}, - 'required': ['machine-addresses'], - 'type': 'object'}, - 'SetProviderNetworkConfig': {'additionalProperties': False, - 'properties': {'args': {'items': {'$ref': '#/definitions/ProviderNetworkConfig'}, - 'type': 'array'}}, - 'required': ['args'], - 'type': 'object'}, - 'SetProviderNetworkConfigResult': {'additionalProperties': False, - 'properties': {'addresses': {'items': {'$ref': '#/definitions/Address'}, - 'type': 'array'}, - 'error': {'$ref': '#/definitions/Error'}, - 'modified': {'type': 'boolean'}}, - 'required': ['addresses', - 'modified'], - 'type': 'object'}, - 'SetProviderNetworkConfigResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/SetProviderNetworkConfigResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'SetStatus': {'additionalProperties': False, - 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'}, - 'type': 'array'}}, - 'required': ['entities'], - 'type': 'object'}, - 'StatusResult': {'additionalProperties': False, - 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'error': {'$ref': '#/definitions/Error'}, - 'id': {'type': 'string'}, - 'info': {'type': 'string'}, - 'life': {'type': 'string'}, - 'since': {'format': 'date-time', - 'type': 'string'}, - 'status': {'type': 'string'}}, - 'required': ['id', - 'life', - 'status', - 'info', - 'data', - 'since'], - 'type': 'object'}, - 'StatusResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/StatusResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'StringResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'result': {'type': 'string'}}, - 'required': ['result'], + 'GenerationId': {'additionalProperties': False, + 'properties': {'generation-id': {'type': 'integer'}}, + 'required': ['generation-id'], 'type': 'object'}, - 'StringResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'StringsWatchResult': {'additionalProperties': False, - 'properties': {'changes': {'items': {'type': 'string'}, - 'type': 'array'}, - 'error': {'$ref': '#/definitions/Error'}, - 'watcher-id': {'type': 'string'}}, - 'required': ['watcher-id'], - 'type': 'object'}}, - 'properties': {'AreManuallyProvisioned': {'description': 'AreManuallyProvisioned ' - 'returns whether ' - 'each given entity ' - 'is\n' - 'manually ' - 'provisioned or not. ' - 'Only machine tags ' - 'are accepted.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/BoolResults'}}, - 'type': 'object'}, - 'InstanceId': {'description': 'InstanceId returns the provider ' - 'specific instance id for each ' - 'given\n' - 'machine or an ' - 'CodeNotProvisioned error, if ' - 'not set.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/StringResults'}}, + 'GenerationResult': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}, + 'generation': {'$ref': '#/definitions/Generation'}}, + 'required': ['generation'], + 'type': 'object'}, + 'IntResult': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}, + 'result': {'type': 'integer'}}, + 'required': ['result'], + 'type': 'object'}}, + 'properties': {'AbortBranch': {'description': 'AbortBranch aborts the input ' + 'branch, marking it complete. ' + 'However no\n' + 'changes are made applicable to ' + 'the whole model. No units may ' + 'be assigned\n' + 'to the branch when aborting.', + 'properties': {'Params': {'$ref': '#/definitions/BranchArg'}, + 'Result': {'$ref': '#/definitions/ErrorResult'}}, + 'type': 'object'}, + 'AddBranch': {'description': 'AddBranch adds a new branch with ' + 'the input name to the model.', + 'properties': {'Params': {'$ref': '#/definitions/BranchArg'}, + 'Result': {'$ref': '#/definitions/ErrorResult'}}, + 'type': 'object'}, + 'BranchInfo': {'description': 'BranchInfo will return details ' + 'of branch identified by the ' + 'input argument,\n' + 'including units on the branch ' + 'and the configuration disjoint ' + 'with the\n' + 'master generation.\n' + 'An error is returned if no ' + 'in-flight branch matching in ' + 'input is found.', + 'properties': {'Params': {'$ref': '#/definitions/BranchInfoArgs'}, + 'Result': {'$ref': '#/definitions/BranchResults'}}, 'type': 'object'}, - 'InstanceStatus': {'description': 'InstanceStatus returns the ' - 'instance status for each ' - 'given entity.\n' - 'Only machine tags are ' - 'accepted.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/StatusResults'}}, - 'type': 'object'}, - 'Life': {'description': 'Life returns the life status of every ' - 'supplied entity, where available.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/LifeResults'}}, - 'type': 'object'}, - 'ModelConfig': {'description': 'ModelConfig returns the ' - "current model's configuration.", - 'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}}, + 'CommitBranch': {'description': 'CommitBranch commits the ' + 'input branch, making its ' + 'changes applicable to\n' + 'the whole model and marking ' + 'it complete.', + 'properties': {'Params': {'$ref': '#/definitions/BranchArg'}, + 'Result': {'$ref': '#/definitions/IntResult'}}, + 'type': 'object'}, + 'HasActiveBranch': {'description': 'HasActiveBranch returns a ' + 'true result if the input ' + 'model has an "in-flight"\n' + 'branch matching the input ' + 'name.', + 'properties': {'Params': {'$ref': '#/definitions/BranchArg'}, + 'Result': {'$ref': '#/definitions/BoolResult'}}, + 'type': 'object'}, + 'ListCommits': {'description': 'ListCommits will return the ' + 'commits, hence only branches ' + 'with generation_id higher than ' + '0', + 'properties': {'Result': {'$ref': '#/definitions/BranchResults'}}, 'type': 'object'}, - 'ProviderAddresses': {'description': 'ProviderAddresses ' - 'returns the list of all ' - 'known provider ' - 'addresses\n' - 'for each given entity. ' - 'Only machine tags are ' - 'accepted.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/MachineAddressesResults'}}, - 'type': 'object'}, - 'SetInstanceStatus': {'description': 'SetInstanceStatus ' - 'updates the instance ' - 'status for each given ' - 'entity.\n' - 'Only machine tags are ' - 'accepted.', - 'properties': {'Params': {'$ref': '#/definitions/SetStatus'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'SetProviderAddresses': {'description': 'SetProviderAddresses ' - 'updates the list of ' - 'known provider ' - 'addresses\n' - 'for each given ' - 'entity. Only machine ' - 'tags are accepted.', - 'properties': {'Params': {'$ref': '#/definitions/SetMachinesAddresses'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'SetProviderNetworkConfig': {'description': 'SetProviderNetworkConfig ' - 'updates the ' - 'provider ' - 'addresses for one ' - 'or more\n' - 'machines.\n' - '\n' - "What's more, if " - 'the client ' - 'request includes ' - 'provider-specific ' - 'IDs (e.g.\n' - 'network, subnet ' - 'or address IDs), ' - 'this method will ' - 'also iterate any ' - 'present\n' - 'link layer ' - 'devices (and ' - 'their addresses) ' - 'and merge in any ' - 'missing\n' - 'provider-specific ' - 'information.', - 'properties': {'Params': {'$ref': '#/definitions/SetProviderNetworkConfig'}, - 'Result': {'$ref': '#/definitions/SetProviderNetworkConfigResults'}}, - 'type': 'object'}, - 'Status': {'description': 'Status returns the status of each ' - 'given entity.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/StatusResults'}}, - 'type': 'object'}, - 'WatchForModelConfigChanges': {'description': 'WatchForModelConfigChanges ' - 'returns a ' - 'NotifyWatcher ' - 'that observes\n' - 'changes to the ' - 'model ' - 'configuration.\n' - 'Note that ' - 'although the ' - 'NotifyWatchResult ' - 'contains an ' - 'Error field,\n' - "it's not used " - 'because we are ' - 'only returning ' - 'a single ' - 'watcher,\n' - 'so we use the ' - 'regular error ' - 'return.', - 'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}}, - 'type': 'object'}, - 'WatchModelMachineStartTimes': {'description': 'WatchModelMachineStartTimes ' - 'watches the ' - 'non-container ' - 'machines in ' - 'the model\n' - 'for changes to ' - 'the Life or ' - 'AgentStartTime ' - 'fields and ' - 'reports them ' - 'as a batch.', - 'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}}, - 'type': 'object'}, - 'WatchModelMachines': {'description': 'WatchModelMachines ' - 'returns a ' - 'StringsWatcher that ' - 'notifies of\n' - 'changes to the life ' - 'cycles of the top level ' - 'machines in the ' - 'current\n' - 'model.', - 'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}}, - 'type': 'object'}}, + 'ShowCommit': {'description': 'ShowCommit will return details ' + 'a commit given by its ' + 'generationId\n' + 'An error is returned if either ' + 'no branch can be found ' + 'corresponding to the generation ' + 'id.\n' + 'Or the generation id given is ' + 'below 1.', + 'properties': {'Params': {'$ref': '#/definitions/GenerationId'}, + 'Result': {'$ref': '#/definitions/GenerationResult'}}, + 'type': 'object'}, + 'TrackBranch': {'description': 'TrackBranch marks the input ' + 'units and/or applications as ' + 'tracking the input\n' + 'branch, causing them to ' + 'realise changes made under ' + 'that branch.', + 'properties': {'Params': {'$ref': '#/definitions/BranchTrackArg'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}}, 'type': 'object'} - @ReturnMapping(BoolResults) - async def AreManuallyProvisioned(self, entities=None): + @ReturnMapping(ErrorResult) + async def AbortBranch(self, branch=None): ''' - AreManuallyProvisioned returns whether each given entity is - manually provisioned or not. Only machine tags are accepted. + AbortBranch aborts the input branch, marking it complete. However no + changes are made applicable to the whole model. No units may be assigned + to the branch when aborting. - entities : typing.Sequence[~Entity] - Returns -> BoolResults + branch : str + Returns -> ErrorResult ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) + if branch is not None and not isinstance(branch, (bytes, str)): + raise Exception("Expected branch to be a str, received: {}".format(type(branch))) # map input types to rpc msg _params = dict() - msg = dict(type='InstancePoller', - request='AreManuallyProvisioned', + msg = dict(type='ModelGeneration', + request='AbortBranch', version=4, params=_params) - _params['entities'] = entities + _params['branch'] = branch reply = await self.rpc(msg) return reply - @ReturnMapping(StringResults) - async def InstanceId(self, entities=None): + @ReturnMapping(ErrorResult) + async def AddBranch(self, branch=None): ''' - InstanceId returns the provider specific instance id for each given - machine or an CodeNotProvisioned error, if not set. + AddBranch adds a new branch with the input name to the model. - entities : typing.Sequence[~Entity] - Returns -> StringResults + branch : str + Returns -> ErrorResult ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) + if branch is not None and not isinstance(branch, (bytes, str)): + raise Exception("Expected branch to be a str, received: {}".format(type(branch))) # map input types to rpc msg _params = dict() - msg = dict(type='InstancePoller', - request='InstanceId', + msg = dict(type='ModelGeneration', + request='AddBranch', version=4, params=_params) - _params['entities'] = entities + _params['branch'] = branch reply = await self.rpc(msg) return reply - @ReturnMapping(StatusResults) - async def InstanceStatus(self, entities=None): - ''' - InstanceStatus returns the instance status for each given entity. - Only machine tags are accepted. - - entities : typing.Sequence[~Entity] - Returns -> StatusResults + @ReturnMapping(BranchResults) + async def BranchInfo(self, branches=None, detailed=None): ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='InstancePoller', - request='InstanceStatus', - version=4, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - + BranchInfo will return details of branch identified by the input argument, + including units on the branch and the configuration disjoint with the + master generation. + An error is returned if no in-flight branch matching in input is found. - @ReturnMapping(LifeResults) - async def Life(self, entities=None): + branches : typing.Sequence[str] + detailed : bool + Returns -> BranchResults ''' - Life returns the life status of every supplied entity, where available. + if branches is not None and not isinstance(branches, (bytes, str, list)): + raise Exception("Expected branches to be a Sequence, received: {}".format(type(branches))) - entities : typing.Sequence[~Entity] - Returns -> LifeResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) + if detailed is not None and not isinstance(detailed, bool): + raise Exception("Expected detailed to be a bool, received: {}".format(type(detailed))) # map input types to rpc msg _params = dict() - msg = dict(type='InstancePoller', - request='Life', + msg = dict(type='ModelGeneration', + request='BranchInfo', version=4, params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ModelConfigResult) - async def ModelConfig(self): - ''' - ModelConfig returns the current model's configuration. - - - Returns -> ModelConfigResult - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='InstancePoller', - request='ModelConfig', - version=4, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(MachineAddressesResults) - async def ProviderAddresses(self, entities=None): - ''' - ProviderAddresses returns the list of all known provider addresses - for each given entity. Only machine tags are accepted. - - entities : typing.Sequence[~Entity] - Returns -> MachineAddressesResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='InstancePoller', - request='ProviderAddresses', - version=4, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def SetInstanceStatus(self, entities=None): - ''' - SetInstanceStatus updates the instance status for each given entity. - Only machine tags are accepted. - - entities : typing.Sequence[~EntityStatusArgs] - Returns -> ErrorResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='InstancePoller', - request='SetInstanceStatus', - version=4, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def SetProviderAddresses(self, machine_addresses=None): - ''' - SetProviderAddresses updates the list of known provider addresses - for each given entity. Only machine tags are accepted. - - machine_addresses : typing.Sequence[~MachineAddresses] - Returns -> ErrorResults - ''' - if machine_addresses is not None and not isinstance(machine_addresses, (bytes, str, list)): - raise Exception("Expected machine_addresses to be a Sequence, received: {}".format(type(machine_addresses))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='InstancePoller', - request='SetProviderAddresses', - version=4, - params=_params) - _params['machine-addresses'] = machine_addresses - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(SetProviderNetworkConfigResults) - async def SetProviderNetworkConfig(self, args=None): - ''' - SetProviderNetworkConfig updates the provider addresses for one or more - machines. - - What's more, if the client request includes provider-specific IDs (e.g. - network, subnet or address IDs), this method will also iterate any present - link layer devices (and their addresses) and merge in any missing - provider-specific information. - - args : typing.Sequence[~ProviderNetworkConfig] - Returns -> SetProviderNetworkConfigResults - ''' - if args is not None and not isinstance(args, (bytes, str, list)): - raise Exception("Expected args to be a Sequence, received: {}".format(type(args))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='InstancePoller', - request='SetProviderNetworkConfig', - version=4, - params=_params) - _params['args'] = args - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StatusResults) - async def Status(self, entities=None): - ''' - Status returns the status of each given entity. - - entities : typing.Sequence[~Entity] - Returns -> StatusResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='InstancePoller', - request='Status', - version=4, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(NotifyWatchResult) - async def WatchForModelConfigChanges(self): - ''' - WatchForModelConfigChanges returns a NotifyWatcher that observes - changes to the model configuration. - Note that although the NotifyWatchResult contains an Error field, - it's not used because we are only returning a single watcher, - so we use the regular error return. - - - Returns -> NotifyWatchResult - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='InstancePoller', - request='WatchForModelConfigChanges', - version=4, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringsWatchResult) - async def WatchModelMachineStartTimes(self): - ''' - WatchModelMachineStartTimes watches the non-container machines in the model - for changes to the Life or AgentStartTime fields and reports them as a batch. - - - Returns -> StringsWatchResult - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='InstancePoller', - request='WatchModelMachineStartTimes', - version=4, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringsWatchResult) - async def WatchModelMachines(self): - ''' - WatchModelMachines returns a StringsWatcher that notifies of - changes to the life cycles of the top level machines in the current - model. - - - Returns -> StringsWatchResult - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='InstancePoller', - request='WatchModelMachines', - version=4, - params=_params) - - reply = await self.rpc(msg) - return reply - - - -class ModelGenerationFacade(Type): - name = 'ModelGeneration' - version = 4 - schema = {'definitions': {'BoolResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'result': {'type': 'boolean'}}, - 'required': ['result'], - 'type': 'object'}, - 'BranchArg': {'additionalProperties': False, - 'properties': {'branch': {'type': 'string'}}, - 'required': ['branch'], - 'type': 'object'}, - 'BranchInfoArgs': {'additionalProperties': False, - 'properties': {'branches': {'items': {'type': 'string'}, - 'type': 'array'}, - 'detailed': {'type': 'boolean'}}, - 'required': ['branches', 'detailed'], - 'type': 'object'}, - 'BranchResults': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'generations': {'items': {'$ref': '#/definitions/Generation'}, - 'type': 'array'}}, - 'required': ['generations'], - 'type': 'object'}, - 'BranchTrackArg': {'additionalProperties': False, - 'properties': {'branch': {'type': 'string'}, - 'entities': {'items': {'$ref': '#/definitions/Entity'}, - 'type': 'array'}, - 'num-units': {'type': 'integer'}}, - 'required': ['branch', 'entities'], - 'type': 'object'}, - 'Entity': {'additionalProperties': False, - 'properties': {'tag': {'type': 'string'}}, - 'required': ['tag'], - 'type': 'object'}, - 'Error': {'additionalProperties': False, - 'properties': {'code': {'type': 'string'}, - 'info': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'message': {'type': 'string'}}, - 'required': ['message', 'code'], - 'type': 'object'}, - 'ErrorResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}}, - 'type': 'object'}, - 'ErrorResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'Generation': {'additionalProperties': False, - 'properties': {'applications': {'items': {'$ref': '#/definitions/GenerationApplication'}, - 'type': 'array'}, - 'branch': {'type': 'string'}, - 'completed': {'type': 'integer'}, - 'completed-by': {'type': 'string'}, - 'created': {'type': 'integer'}, - 'created-by': {'type': 'string'}, - 'generation-id': {'type': 'integer'}}, - 'required': ['branch', - 'created', - 'created-by', - 'applications'], - 'type': 'object'}, - 'GenerationApplication': {'additionalProperties': False, - 'properties': {'application': {'type': 'string'}, - 'config': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'pending': {'items': {'type': 'string'}, - 'type': 'array'}, - 'progress': {'type': 'string'}, - 'tracking': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'required': ['application', - 'progress', - 'config'], - 'type': 'object'}, - 'GenerationId': {'additionalProperties': False, - 'properties': {'generation-id': {'type': 'integer'}}, - 'required': ['generation-id'], - 'type': 'object'}, - 'GenerationResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'generation': {'$ref': '#/definitions/Generation'}}, - 'required': ['generation'], - 'type': 'object'}, - 'IntResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'result': {'type': 'integer'}}, - 'required': ['result'], - 'type': 'object'}}, - 'properties': {'AbortBranch': {'description': 'AbortBranch aborts the input ' - 'branch, marking it complete. ' - 'However no\n' - 'changes are made applicable to ' - 'the whole model. No units may ' - 'be assigned\n' - 'to the branch when aborting.', - 'properties': {'Params': {'$ref': '#/definitions/BranchArg'}, - 'Result': {'$ref': '#/definitions/ErrorResult'}}, - 'type': 'object'}, - 'AddBranch': {'description': 'AddBranch adds a new branch with ' - 'the input name to the model.', - 'properties': {'Params': {'$ref': '#/definitions/BranchArg'}, - 'Result': {'$ref': '#/definitions/ErrorResult'}}, - 'type': 'object'}, - 'BranchInfo': {'description': 'BranchInfo will return details ' - 'of branch identified by the ' - 'input argument,\n' - 'including units on the branch ' - 'and the configuration disjoint ' - 'with the\n' - 'master generation.\n' - 'An error is returned if no ' - 'in-flight branch matching in ' - 'input is found.', - 'properties': {'Params': {'$ref': '#/definitions/BranchInfoArgs'}, - 'Result': {'$ref': '#/definitions/BranchResults'}}, - 'type': 'object'}, - 'CommitBranch': {'description': 'CommitBranch commits the ' - 'input branch, making its ' - 'changes applicable to\n' - 'the whole model and marking ' - 'it complete.', - 'properties': {'Params': {'$ref': '#/definitions/BranchArg'}, - 'Result': {'$ref': '#/definitions/IntResult'}}, - 'type': 'object'}, - 'HasActiveBranch': {'description': 'HasActiveBranch returns a ' - 'true result if the input ' - 'model has an "in-flight"\n' - 'branch matching the input ' - 'name.', - 'properties': {'Params': {'$ref': '#/definitions/BranchArg'}, - 'Result': {'$ref': '#/definitions/BoolResult'}}, - 'type': 'object'}, - 'ListCommits': {'description': 'ListCommits will return the ' - 'commits, hence only branches ' - 'with generation_id higher than ' - '0', - 'properties': {'Result': {'$ref': '#/definitions/BranchResults'}}, - 'type': 'object'}, - 'ShowCommit': {'description': 'ShowCommit will return details ' - 'a commit given by its ' - 'generationId\n' - 'An error is returned if either ' - 'no branch can be found ' - 'corresponding to the generation ' - 'id.\n' - 'Or the generation id given is ' - 'below 1.', - 'properties': {'Params': {'$ref': '#/definitions/GenerationId'}, - 'Result': {'$ref': '#/definitions/GenerationResult'}}, - 'type': 'object'}, - 'TrackBranch': {'description': 'TrackBranch marks the input ' - 'units and/or applications as ' - 'tracking the input\n' - 'branch, causing them to ' - 'realise changes made under ' - 'that branch.', - 'properties': {'Params': {'$ref': '#/definitions/BranchTrackArg'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}}, - 'type': 'object'} - - - @ReturnMapping(ErrorResult) - async def AbortBranch(self, branch=None): - ''' - AbortBranch aborts the input branch, marking it complete. However no - changes are made applicable to the whole model. No units may be assigned - to the branch when aborting. - - branch : str - Returns -> ErrorResult - ''' - if branch is not None and not isinstance(branch, (bytes, str)): - raise Exception("Expected branch to be a str, received: {}".format(type(branch))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='ModelGeneration', - request='AbortBranch', - version=4, - params=_params) - _params['branch'] = branch - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResult) - async def AddBranch(self, branch=None): - ''' - AddBranch adds a new branch with the input name to the model. - - branch : str - Returns -> ErrorResult - ''' - if branch is not None and not isinstance(branch, (bytes, str)): - raise Exception("Expected branch to be a str, received: {}".format(type(branch))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='ModelGeneration', - request='AddBranch', - version=4, - params=_params) - _params['branch'] = branch - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(BranchResults) - async def BranchInfo(self, branches=None, detailed=None): - ''' - BranchInfo will return details of branch identified by the input argument, - including units on the branch and the configuration disjoint with the - master generation. - An error is returned if no in-flight branch matching in input is found. - - branches : typing.Sequence[str] - detailed : bool - Returns -> BranchResults - ''' - if branches is not None and not isinstance(branches, (bytes, str, list)): - raise Exception("Expected branches to be a Sequence, received: {}".format(type(branches))) - - if detailed is not None and not isinstance(detailed, bool): - raise Exception("Expected detailed to be a bool, received: {}".format(type(detailed))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='ModelGeneration', - request='BranchInfo', - version=4, - params=_params) - _params['branches'] = branches - _params['detailed'] = detailed - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(IntResult) - async def CommitBranch(self, branch=None): - ''' - CommitBranch commits the input branch, making its changes applicable to - the whole model and marking it complete. - - branch : str - Returns -> IntResult - ''' - if branch is not None and not isinstance(branch, (bytes, str)): - raise Exception("Expected branch to be a str, received: {}".format(type(branch))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='ModelGeneration', - request='CommitBranch', - version=4, - params=_params) - _params['branch'] = branch - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(BoolResult) - async def HasActiveBranch(self, branch=None): - ''' - HasActiveBranch returns a true result if the input model has an "in-flight" - branch matching the input name. - - branch : str - Returns -> BoolResult - ''' - if branch is not None and not isinstance(branch, (bytes, str)): - raise Exception("Expected branch to be a str, received: {}".format(type(branch))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='ModelGeneration', - request='HasActiveBranch', - version=4, - params=_params) - _params['branch'] = branch - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(BranchResults) - async def ListCommits(self): - ''' - ListCommits will return the commits, hence only branches with generation_id higher than 0 - - - Returns -> BranchResults - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='ModelGeneration', - request='ListCommits', - version=4, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(GenerationResult) - async def ShowCommit(self, generation_id=None): - ''' - ShowCommit will return details a commit given by its generationId - An error is returned if either no branch can be found corresponding to the generation id. - Or the generation id given is below 1. - - generation_id : int - Returns -> GenerationResult - ''' - if generation_id is not None and not isinstance(generation_id, int): - raise Exception("Expected generation_id to be a int, received: {}".format(type(generation_id))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='ModelGeneration', - request='ShowCommit', - version=4, - params=_params) - _params['generation-id'] = generation_id - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def TrackBranch(self, branch=None, entities=None, num_units=None): - ''' - TrackBranch marks the input units and/or applications as tracking the input - branch, causing them to realise changes made under that branch. - - branch : str - entities : typing.Sequence[~Entity] - num_units : int - Returns -> ErrorResults - ''' - if branch is not None and not isinstance(branch, (bytes, str)): - raise Exception("Expected branch to be a str, received: {}".format(type(branch))) - - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - if num_units is not None and not isinstance(num_units, int): - raise Exception("Expected num_units to be a int, received: {}".format(type(num_units))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='ModelGeneration', - request='TrackBranch', - version=4, - params=_params) - _params['branch'] = branch - _params['entities'] = entities - _params['num-units'] = num_units - reply = await self.rpc(msg) - return reply - - - -class SSHClientFacade(Type): - name = 'SSHClient' - version = 4 - schema = {'definitions': {'CloudCredential': {'additionalProperties': False, - 'properties': {'attrs': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}, - 'auth-type': {'type': 'string'}, - 'redacted': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'required': ['auth-type'], - 'type': 'object'}, - 'CloudSpec': {'additionalProperties': False, - 'properties': {'cacertificates': {'items': {'type': 'string'}, - 'type': 'array'}, - 'credential': {'$ref': '#/definitions/CloudCredential'}, - 'endpoint': {'type': 'string'}, - 'identity-endpoint': {'type': 'string'}, - 'is-controller-cloud': {'type': 'boolean'}, - 'name': {'type': 'string'}, - 'region': {'type': 'string'}, - 'skip-tls-verify': {'type': 'boolean'}, - 'storage-endpoint': {'type': 'string'}, - 'type': {'type': 'string'}}, - 'required': ['type', 'name'], - 'type': 'object'}, - 'CloudSpecResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'result': {'$ref': '#/definitions/CloudSpec'}}, - 'type': 'object'}, - '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': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'message': {'type': 'string'}}, - 'required': ['message', 'code'], - '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'}, - 'SSHAddressesResult': {'additionalProperties': False, - 'properties': {'addresses': {'items': {'type': 'string'}, - 'type': 'array'}, - 'error': {'$ref': '#/definitions/Error'}}, - 'required': ['addresses'], - 'type': 'object'}, - 'SSHAddressesResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/SSHAddressesResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'SSHProxyResult': {'additionalProperties': False, - 'properties': {'use-proxy': {'type': 'boolean'}}, - 'required': ['use-proxy'], - 'type': 'object'}, - 'SSHPublicKeysResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'public-keys': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'type': 'object'}, - 'SSHPublicKeysResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/SSHPublicKeysResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}}, - 'properties': {'AllAddresses': {'description': 'AllAddresses reports all ' - 'addresses that might have SSH ' - 'listening for each\n' - 'entity in args. The result is ' - 'sorted with public addresses ' - 'first.\n' - 'Machines and units are ' - 'supported as entity types.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/SSHAddressesResults'}}, - 'type': 'object'}, - 'ModelCredentialForSSH': {'description': 'ModelCredentialForSSH ' - 'returns a cloud spec ' - 'for ssh purpose.\n' - 'This facade call is ' - 'only used for k8s ' - 'model.', - 'properties': {'Result': {'$ref': '#/definitions/CloudSpecResult'}}, - 'type': 'object'}, - 'PrivateAddress': {'description': 'PrivateAddress reports the ' - 'preferred private network ' - 'address for one or\n' - 'more entities. Machines and ' - 'units are supported.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/SSHAddressResults'}}, - 'type': 'object'}, - 'Proxy': {'description': 'Proxy returns whether SSH ' - 'connections should be proxied ' - 'through the\n' - 'controller hosts for the model ' - 'associated with the API connection.', - 'properties': {'Result': {'$ref': '#/definitions/SSHProxyResult'}}, - 'type': 'object'}, - 'PublicAddress': {'description': 'PublicAddress reports the ' - 'preferred public network ' - 'address for one\n' - 'or more entities. Machines ' - 'and units are supported.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/SSHAddressResults'}}, - 'type': 'object'}, - 'PublicKeys': {'description': 'PublicKeys returns the public ' - 'SSH hosts for one or more\n' - 'entities. Machines and units ' - 'are supported.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/SSHPublicKeysResults'}}, - 'type': 'object'}}, - 'type': 'object'} - - - @ReturnMapping(SSHAddressesResults) - async def AllAddresses(self, entities=None): - ''' - AllAddresses reports all addresses that might have SSH listening for each - entity in args. The result is sorted with public addresses first. - Machines and units are supported as entity types. - - entities : typing.Sequence[~Entity] - Returns -> SSHAddressesResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='SSHClient', - request='AllAddresses', - version=4, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(CloudSpecResult) - async def ModelCredentialForSSH(self): - ''' - ModelCredentialForSSH returns a cloud spec for ssh purpose. - This facade call is only used for k8s model. - - - Returns -> CloudSpecResult - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='SSHClient', - request='ModelCredentialForSSH', - version=4, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(SSHAddressResults) - async def PrivateAddress(self, entities=None): - ''' - PrivateAddress reports the preferred private network address for one or - more entities. Machines and units are supported. - - entities : typing.Sequence[~Entity] - Returns -> SSHAddressResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='SSHClient', - request='PrivateAddress', - version=4, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(SSHProxyResult) - async def Proxy(self): - ''' - Proxy returns whether SSH connections should be proxied through the - controller hosts for the model associated with the API connection. - - - Returns -> SSHProxyResult - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='SSHClient', - request='Proxy', - version=4, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(SSHAddressResults) - async def PublicAddress(self, entities=None): - ''' - PublicAddress reports the preferred public network address for one - or more entities. Machines and units are supported. - - entities : typing.Sequence[~Entity] - Returns -> SSHAddressResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='SSHClient', - request='PublicAddress', - version=4, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(SSHPublicKeysResults) - async def PublicKeys(self, entities=None): - ''' - PublicKeys returns the public SSH hosts for one or more - entities. Machines and units are supported. - - entities : typing.Sequence[~Entity] - Returns -> SSHPublicKeysResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='SSHClient', - request='PublicKeys', - version=4, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - -class StorageProvisionerFacade(Type): - name = 'StorageProvisioner' - version = 4 - 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'}, - 'SerialId': {'type': 'string'}, - 'Size': {'type': 'integer'}, - 'UUID': {'type': 'string'}, - 'WWN': {'type': 'string'}}, - 'required': ['DeviceName', - 'DeviceLinks', - 'Label', - 'UUID', - 'HardwareId', - 'WWN', - 'BusAddress', - 'Size', - 'FilesystemType', - 'InUse', - 'MountPoint', - 'SerialId'], - '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': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'message': {'type': 'string'}}, - 'required': ['message', 'code'], - 'type': 'object'}, - 'ErrorResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}}, - 'type': 'object'}, - 'ErrorResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'Filesystem': {'additionalProperties': False, - 'properties': {'filesystem-tag': {'type': 'string'}, - 'info': {'$ref': '#/definitions/FilesystemInfo'}, - 'volume-tag': {'type': 'string'}}, - 'required': ['filesystem-tag', 'info'], - 'type': 'object'}, - 'FilesystemAttachment': {'additionalProperties': False, - 'properties': {'filesystem-tag': {'type': 'string'}, - 'info': {'$ref': '#/definitions/FilesystemAttachmentInfo'}, - 'machine-tag': {'type': 'string'}}, - 'required': ['filesystem-tag', - 'machine-tag', - 'info'], - 'type': 'object'}, - 'FilesystemAttachmentInfo': {'additionalProperties': False, - 'properties': {'mount-point': {'type': 'string'}, - 'read-only': {'type': 'boolean'}}, - 'type': 'object'}, - 'FilesystemAttachmentParams': {'additionalProperties': False, - 'properties': {'filesystem-id': {'type': 'string'}, - 'filesystem-tag': {'type': 'string'}, - 'instance-id': {'type': 'string'}, - 'machine-tag': {'type': 'string'}, - 'mount-point': {'type': 'string'}, - 'provider': {'type': 'string'}, - 'read-only': {'type': 'boolean'}}, - 'required': ['filesystem-tag', - 'machine-tag', - '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': {'filesystem-attachments': {'items': {'$ref': '#/definitions/FilesystemAttachment'}, - 'type': 'array'}}, - 'required': ['filesystem-attachments'], - 'type': 'object'}, - 'FilesystemInfo': {'additionalProperties': False, - 'properties': {'filesystem-id': {'type': 'string'}, - 'pool': {'type': 'string'}, - 'size': {'type': 'integer'}}, - 'required': ['filesystem-id', - 'pool', - 'size'], - 'type': 'object'}, - 'FilesystemParams': {'additionalProperties': False, - 'properties': {'attachment': {'$ref': '#/definitions/FilesystemAttachmentParams'}, - 'attributes': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'filesystem-tag': {'type': 'string'}, - 'provider': {'type': 'string'}, - 'size': {'type': 'integer'}, - 'tags': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}, - 'volume-tag': {'type': 'string'}}, - 'required': ['filesystem-tag', - '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'], - 'type': 'object'}, - 'LifeResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'MachineStorageId': {'additionalProperties': False, - 'properties': {'attachment-tag': {'type': 'string'}, - 'machine-tag': {'type': 'string'}}, - 'required': ['machine-tag', - 'attachment-tag'], - 'type': 'object'}, - 'MachineStorageIds': {'additionalProperties': False, - 'properties': {'ids': {'items': {'$ref': '#/definitions/MachineStorageId'}, - 'type': 'array'}}, - 'required': ['ids'], - 'type': 'object'}, - 'MachineStorageIdsWatchResult': {'additionalProperties': False, - 'properties': {'changes': {'items': {'$ref': '#/definitions/MachineStorageId'}, - 'type': 'array'}, - 'error': {'$ref': '#/definitions/Error'}, - 'watcher-id': {'type': 'string'}}, - 'required': ['watcher-id', - 'changes'], - 'type': 'object'}, - 'MachineStorageIdsWatchResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/MachineStorageIdsWatchResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'NotifyWatchResult': {'additionalProperties': False, - 'properties': {'NotifyWatcherId': {'type': 'string'}, - 'error': {'$ref': '#/definitions/Error'}}, - 'required': ['NotifyWatcherId'], - 'type': 'object'}, - 'NotifyWatchResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'RemoveFilesystemParams': {'additionalProperties': False, - 'properties': {'destroy': {'type': 'boolean'}, - 'filesystem-id': {'type': 'string'}, - 'provider': {'type': 'string'}}, - 'required': ['provider', - 'filesystem-id'], - 'type': 'object'}, - 'RemoveFilesystemParamsResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'result': {'$ref': '#/definitions/RemoveFilesystemParams'}}, - 'required': ['result'], - 'type': 'object'}, - 'RemoveFilesystemParamsResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/RemoveFilesystemParamsResult'}, - 'type': 'array'}}, - 'type': 'object'}, - 'RemoveVolumeParams': {'additionalProperties': False, - 'properties': {'destroy': {'type': 'boolean'}, - 'provider': {'type': 'string'}, - 'volume-id': {'type': 'string'}}, - 'required': ['provider', 'volume-id'], - 'type': 'object'}, - 'RemoveVolumeParamsResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'result': {'$ref': '#/definitions/RemoveVolumeParams'}}, - 'required': ['result'], - 'type': 'object'}, - 'RemoveVolumeParamsResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/RemoveVolumeParamsResult'}, - 'type': 'array'}}, - 'type': 'object'}, - 'SetStatus': {'additionalProperties': False, - 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'}, - 'type': 'array'}}, - 'required': ['entities'], - 'type': 'object'}, - 'StringResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'result': {'type': 'string'}}, - 'required': ['result'], - 'type': 'object'}, - 'StringResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'StringsWatchResult': {'additionalProperties': False, - 'properties': {'changes': {'items': {'type': 'string'}, - 'type': 'array'}, - 'error': {'$ref': '#/definitions/Error'}, - 'watcher-id': {'type': 'string'}}, - 'required': ['watcher-id'], - 'type': 'object'}, - 'StringsWatchResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'Volume': {'additionalProperties': False, - 'properties': {'info': {'$ref': '#/definitions/VolumeInfo'}, - 'volume-tag': {'type': 'string'}}, - 'required': ['volume-tag', 'info'], - 'type': 'object'}, - 'VolumeAttachment': {'additionalProperties': False, - 'properties': {'info': {'$ref': '#/definitions/VolumeAttachmentInfo'}, - 'machine-tag': {'type': 'string'}, - 'volume-tag': {'type': 'string'}}, - 'required': ['volume-tag', - 'machine-tag', - 'info'], - 'type': 'object'}, - 'VolumeAttachmentInfo': {'additionalProperties': False, - 'properties': {'bus-address': {'type': 'string'}, - 'device-link': {'type': 'string'}, - 'device-name': {'type': 'string'}, - 'plan-info': {'$ref': '#/definitions/VolumeAttachmentPlanInfo'}, - 'read-only': {'type': 'boolean'}}, - 'type': 'object'}, - 'VolumeAttachmentParams': {'additionalProperties': False, - 'properties': {'instance-id': {'type': 'string'}, - 'machine-tag': {'type': 'string'}, - 'provider': {'type': 'string'}, - 'read-only': {'type': 'boolean'}, - 'volume-id': {'type': 'string'}, - 'volume-tag': {'type': 'string'}}, - 'required': ['volume-tag', - 'machine-tag', - 'provider'], - 'type': 'object'}, - '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'}, - 'VolumeAttachmentPlan': {'additionalProperties': False, - 'properties': {'block-device': {'$ref': '#/definitions/BlockDevice'}, - 'life': {'type': 'string'}, - 'machine-tag': {'type': 'string'}, - 'plan-info': {'$ref': '#/definitions/VolumeAttachmentPlanInfo'}, - 'volume-tag': {'type': 'string'}}, - 'required': ['volume-tag', - 'machine-tag', - 'plan-info'], - 'type': 'object'}, - 'VolumeAttachmentPlanInfo': {'additionalProperties': False, - 'properties': {'device-attributes': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}, - 'device-type': {'type': 'string'}}, - 'type': 'object'}, - 'VolumeAttachmentPlanResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'result': {'$ref': '#/definitions/VolumeAttachmentPlan'}}, - 'required': ['result'], - 'type': 'object'}, - 'VolumeAttachmentPlanResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/VolumeAttachmentPlanResult'}, - 'type': 'array'}}, - 'type': 'object'}, - 'VolumeAttachmentPlans': {'additionalProperties': False, - 'properties': {'volume-plans': {'items': {'$ref': '#/definitions/VolumeAttachmentPlan'}, - 'type': 'array'}}, - 'required': ['volume-plans'], - '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': {'volume-attachments': {'items': {'$ref': '#/definitions/VolumeAttachment'}, - 'type': 'array'}}, - 'required': ['volume-attachments'], - 'type': 'object'}, - 'VolumeInfo': {'additionalProperties': False, - 'properties': {'hardware-id': {'type': 'string'}, - 'persistent': {'type': 'boolean'}, - 'pool': {'type': 'string'}, - 'size': {'type': 'integer'}, - 'volume-id': {'type': 'string'}, - 'wwn': {'type': 'string'}}, - 'required': ['volume-id', 'size', 'persistent'], - 'type': 'object'}, - 'VolumeParams': {'additionalProperties': False, - 'properties': {'attachment': {'$ref': '#/definitions/VolumeAttachmentParams'}, - 'attributes': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'provider': {'type': 'string'}, - 'size': {'type': 'integer'}, - 'tags': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}, - 'volume-tag': {'type': 'string'}}, - 'required': ['volume-tag', - 'size', - 'provider'], - 'type': 'object'}, - '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'}}, - 'properties': {'AttachmentLife': {'description': 'AttachmentLife returns the ' - 'lifecycle state of each ' - 'specified machine\n' - 'storage attachment.', - 'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'}, - 'Result': {'$ref': '#/definitions/LifeResults'}}, - 'type': 'object'}, - 'CreateVolumeAttachmentPlans': {'properties': {'Params': {'$ref': '#/definitions/VolumeAttachmentPlans'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'EnsureDead': {'description': 'EnsureDead calls EnsureDead on ' - 'each given entity from state. ' - 'It\n' - 'will fail if the entity is not ' - "present. If it's Alive, nothing " - 'will\n' - 'happen (see state/EnsureDead() ' - 'for units or machines).', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'FilesystemAttachmentParams': {'description': 'FilesystemAttachmentParams ' - 'returns the ' - 'parameters for ' - 'creating the ' - 'filesystem\n' - 'attachments ' - 'with the ' - 'specified IDs.', - 'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'}, - 'Result': {'$ref': '#/definitions/FilesystemAttachmentParamsResults'}}, - 'type': 'object'}, - 'FilesystemAttachments': {'description': 'FilesystemAttachments ' - 'returns details of ' - 'filesystem ' - 'attachments with the ' - 'specified IDs.', - 'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'}, - 'Result': {'$ref': '#/definitions/FilesystemAttachmentResults'}}, - 'type': 'object'}, - 'FilesystemParams': {'description': 'FilesystemParams returns ' - 'the parameters for ' - 'creating the filesystems\n' - 'with the specified tags.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/FilesystemParamsResults'}}, - 'type': 'object'}, - 'Filesystems': {'description': 'Filesystems returns details of ' - 'filesystems with the specified ' - 'tags.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/FilesystemResults'}}, - 'type': 'object'}, - 'InstanceId': {'description': 'InstanceId returns the provider ' - 'specific instance id for each ' - 'given\n' - 'machine or an ' - 'CodeNotProvisioned error, if ' - 'not set.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/StringResults'}}, - 'type': 'object'}, - 'Life': {'description': 'Life returns the life status of every ' - 'supplied entity, where available.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/LifeResults'}}, - 'type': 'object'}, - 'Remove': {'description': 'Remove removes volumes and ' - 'filesystems from state.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'RemoveAttachment': {'description': 'RemoveAttachment removes ' - 'the specified machine ' - 'storage attachments\n' - 'from state.', - 'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'RemoveFilesystemParams': {'description': 'RemoveFilesystemParams ' - 'returns the ' - 'parameters for ' - 'destroying or\n' - 'releasing the ' - 'filesystems with ' - 'the specified tags.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/RemoveFilesystemParamsResults'}}, - 'type': 'object'}, - 'RemoveVolumeAttachmentPlan': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'RemoveVolumeParams': {'description': 'RemoveVolumeParams ' - 'returns the parameters ' - 'for destroying\n' - 'or releasing the ' - 'volumes with the ' - 'specified tags.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/RemoveVolumeParamsResults'}}, - 'type': 'object'}, - 'SetFilesystemAttachmentInfo': {'description': 'SetFilesystemAttachmentInfo ' - 'records the ' - 'details of ' - 'newly ' - 'provisioned ' - 'filesystem\n' - 'attachments.', - 'properties': {'Params': {'$ref': '#/definitions/FilesystemAttachments'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'SetFilesystemInfo': {'description': 'SetFilesystemInfo ' - 'records the details of ' - 'newly provisioned ' - 'filesystems.', - 'properties': {'Params': {'$ref': '#/definitions/Filesystems'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'SetStatus': {'description': 'SetStatus sets the status of ' - 'each given entity.', - 'properties': {'Params': {'$ref': '#/definitions/SetStatus'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'SetVolumeAttachmentInfo': {'description': 'SetVolumeAttachmentInfo ' - 'records the ' - 'details of newly ' - 'provisioned ' - 'volume\n' - 'attachments.', - 'properties': {'Params': {'$ref': '#/definitions/VolumeAttachments'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'SetVolumeAttachmentPlanBlockInfo': {'properties': {'Params': {'$ref': '#/definitions/VolumeAttachmentPlans'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'SetVolumeInfo': {'description': 'SetVolumeInfo records the ' - 'details of newly provisioned ' - 'volumes.', - 'properties': {'Params': {'$ref': '#/definitions/Volumes'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'VolumeAttachmentParams': {'description': 'VolumeAttachmentParams ' - 'returns the ' - 'parameters for ' - 'creating the ' - 'volume\n' - 'attachments with ' - 'the specified IDs.', - 'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'}, - 'Result': {'$ref': '#/definitions/VolumeAttachmentParamsResults'}}, - 'type': 'object'}, - 'VolumeAttachmentPlans': {'description': 'VolumeAttachmentPlans ' - 'returns details of ' - 'volume attachment ' - 'plans with the ' - 'specified IDs.', - 'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'}, - 'Result': {'$ref': '#/definitions/VolumeAttachmentPlanResults'}}, - 'type': 'object'}, - 'VolumeAttachments': {'description': 'VolumeAttachments ' - 'returns details of ' - 'volume attachments with ' - 'the specified IDs.', - 'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'}, - 'Result': {'$ref': '#/definitions/VolumeAttachmentResults'}}, - 'type': 'object'}, - 'VolumeBlockDevices': {'description': 'VolumeBlockDevices ' - 'returns details of the ' - 'block devices ' - 'corresponding to the\n' - 'volume attachments with ' - 'the specified IDs.', - 'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'}, - 'Result': {'$ref': '#/definitions/BlockDeviceResults'}}, - 'type': 'object'}, - 'VolumeParams': {'description': 'VolumeParams returns the ' - 'parameters for creating or ' - 'destroying\n' - 'the volumes with the ' - 'specified tags.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/VolumeParamsResults'}}, - 'type': 'object'}, - 'Volumes': {'description': 'Volumes returns details of volumes ' - 'with the specified tags.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/VolumeResults'}}, - 'type': 'object'}, - 'WatchApplications': {'description': 'WatchApplications starts ' - 'a StringsWatcher to ' - 'watch CAAS applications\n' - 'deployed to this model.', - 'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}}, - 'type': 'object'}, - 'WatchBlockDevices': {'description': 'WatchBlockDevices ' - 'watches for changes to ' - "the specified machines' " - 'block devices.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/NotifyWatchResults'}}, - 'type': 'object'}, - 'WatchFilesystemAttachments': {'description': 'WatchFilesystemAttachments ' - 'watches for ' - 'changes to ' - 'filesystem ' - 'attachments\n' - 'scoped to the ' - 'entity with the ' - 'tag passed to ' - 'NewState.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/MachineStorageIdsWatchResults'}}, - 'type': 'object'}, - 'WatchFilesystems': {'description': 'WatchFilesystems watches ' - 'for changes to ' - 'filesystems scoped\n' - 'to the entity with the ' - 'tag passed to NewState.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/StringsWatchResults'}}, - 'type': 'object'}, - 'WatchMachines': {'description': 'WatchMachines watches for ' - 'changes to the specified ' - 'machines.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/NotifyWatchResults'}}, - 'type': 'object'}, - 'WatchVolumeAttachmentPlans': {'description': 'WatchVolumeAttachmentPlans ' - 'watches for ' - 'changes to ' - 'volume ' - 'attachments for ' - 'a machine for ' - 'the purpose of ' - 'allowing\n' - 'that machine to ' - 'run any ' - 'initialization ' - 'needed, for ' - 'that volume to ' - 'actually appear ' - 'as a block ' - 'device (ie: ' - 'iSCSI)', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/MachineStorageIdsWatchResults'}}, - 'type': 'object'}, - 'WatchVolumeAttachments': {'description': 'WatchVolumeAttachments ' - 'watches for changes ' - 'to volume ' - 'attachments scoped ' - 'to\n' - 'the entity with the ' - 'tag passed to ' - 'NewState.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/MachineStorageIdsWatchResults'}}, - 'type': 'object'}, - 'WatchVolumes': {'description': 'WatchVolumes watches for ' - 'changes to volumes scoped to ' - 'the\n' - 'entity with the tag passed to ' - 'NewState.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/StringsWatchResults'}}, - 'type': 'object'}}, - 'type': 'object'} - - - @ReturnMapping(LifeResults) - async def AttachmentLife(self, ids=None): - ''' - AttachmentLife returns the lifecycle state of each specified machine - storage attachment. - - ids : typing.Sequence[~MachineStorageId] - Returns -> LifeResults - ''' - if ids is not None and not isinstance(ids, (bytes, str, list)): - raise Exception("Expected ids to be a Sequence, received: {}".format(type(ids))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='StorageProvisioner', - request='AttachmentLife', - version=4, - params=_params) - _params['ids'] = ids - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def CreateVolumeAttachmentPlans(self, volume_plans=None): - ''' - volume_plans : typing.Sequence[~VolumeAttachmentPlan] - Returns -> ErrorResults - ''' - if volume_plans is not None and not isinstance(volume_plans, (bytes, str, list)): - raise Exception("Expected volume_plans to be a Sequence, received: {}".format(type(volume_plans))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='StorageProvisioner', - request='CreateVolumeAttachmentPlans', - version=4, - params=_params) - _params['volume-plans'] = volume_plans - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def EnsureDead(self, entities=None): - ''' - EnsureDead calls EnsureDead on each given entity from state. It - will fail if the entity is not present. If it's Alive, nothing will - happen (see state/EnsureDead() for units or machines). - - entities : typing.Sequence[~Entity] - Returns -> ErrorResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='StorageProvisioner', - request='EnsureDead', - version=4, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(FilesystemAttachmentParamsResults) - async def FilesystemAttachmentParams(self, ids=None): - ''' - FilesystemAttachmentParams returns the parameters for creating the filesystem - attachments with the specified IDs. - - ids : typing.Sequence[~MachineStorageId] - Returns -> FilesystemAttachmentParamsResults - ''' - if ids is not None and not isinstance(ids, (bytes, str, list)): - raise Exception("Expected ids to be a Sequence, received: {}".format(type(ids))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='StorageProvisioner', - request='FilesystemAttachmentParams', - version=4, - params=_params) - _params['ids'] = ids - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(FilesystemAttachmentResults) - async def FilesystemAttachments(self, ids=None): - ''' - FilesystemAttachments returns details of filesystem attachments with the specified IDs. - - ids : typing.Sequence[~MachineStorageId] - Returns -> FilesystemAttachmentResults - ''' - if ids is not None and not isinstance(ids, (bytes, str, list)): - raise Exception("Expected ids to be a Sequence, received: {}".format(type(ids))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='StorageProvisioner', - request='FilesystemAttachments', - version=4, - params=_params) - _params['ids'] = ids - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(FilesystemParamsResults) - async def FilesystemParams(self, entities=None): - ''' - FilesystemParams returns the parameters for creating the filesystems - with the specified tags. - - entities : typing.Sequence[~Entity] - Returns -> FilesystemParamsResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='StorageProvisioner', - request='FilesystemParams', - version=4, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(FilesystemResults) - async def Filesystems(self, entities=None): - ''' - Filesystems returns details of filesystems with the specified tags. - - entities : typing.Sequence[~Entity] - Returns -> FilesystemResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='StorageProvisioner', - request='Filesystems', - version=4, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringResults) - async def InstanceId(self, entities=None): - ''' - InstanceId returns the provider specific instance id for each given - machine or an CodeNotProvisioned error, if not set. - - entities : typing.Sequence[~Entity] - Returns -> StringResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='StorageProvisioner', - request='InstanceId', - version=4, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(LifeResults) - async def Life(self, entities=None): - ''' - Life returns the life status of every supplied entity, where available. - - entities : typing.Sequence[~Entity] - Returns -> LifeResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='StorageProvisioner', - request='Life', - version=4, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def Remove(self, entities=None): - ''' - Remove removes volumes and filesystems from state. - - entities : typing.Sequence[~Entity] - Returns -> ErrorResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='StorageProvisioner', - request='Remove', - version=4, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def RemoveAttachment(self, ids=None): - ''' - RemoveAttachment removes the specified machine storage attachments - from state. - - ids : typing.Sequence[~MachineStorageId] - Returns -> ErrorResults - ''' - if ids is not None and not isinstance(ids, (bytes, str, list)): - raise Exception("Expected ids to be a Sequence, received: {}".format(type(ids))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='StorageProvisioner', - request='RemoveAttachment', - version=4, - params=_params) - _params['ids'] = ids - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(RemoveFilesystemParamsResults) - async def RemoveFilesystemParams(self, entities=None): - ''' - RemoveFilesystemParams returns the parameters for destroying or - releasing the filesystems with the specified tags. - - entities : typing.Sequence[~Entity] - Returns -> RemoveFilesystemParamsResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='StorageProvisioner', - request='RemoveFilesystemParams', - version=4, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def RemoveVolumeAttachmentPlan(self, ids=None): - ''' - ids : typing.Sequence[~MachineStorageId] - Returns -> ErrorResults - ''' - if ids is not None and not isinstance(ids, (bytes, str, list)): - raise Exception("Expected ids to be a Sequence, received: {}".format(type(ids))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='StorageProvisioner', - request='RemoveVolumeAttachmentPlan', - version=4, - params=_params) - _params['ids'] = ids - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(RemoveVolumeParamsResults) - async def RemoveVolumeParams(self, entities=None): - ''' - RemoveVolumeParams returns the parameters for destroying - or releasing the volumes with the specified tags. - - entities : typing.Sequence[~Entity] - Returns -> RemoveVolumeParamsResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='StorageProvisioner', - request='RemoveVolumeParams', - version=4, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def SetFilesystemAttachmentInfo(self, filesystem_attachments=None): - ''' - SetFilesystemAttachmentInfo records the details of newly provisioned filesystem - attachments. - - filesystem_attachments : typing.Sequence[~FilesystemAttachment] - Returns -> ErrorResults - ''' - if filesystem_attachments is not None and not isinstance(filesystem_attachments, (bytes, str, list)): - raise Exception("Expected filesystem_attachments to be a Sequence, received: {}".format(type(filesystem_attachments))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='StorageProvisioner', - request='SetFilesystemAttachmentInfo', - version=4, - params=_params) - _params['filesystem-attachments'] = filesystem_attachments - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def SetFilesystemInfo(self, filesystems=None): - ''' - SetFilesystemInfo records the details of newly provisioned filesystems. - - filesystems : typing.Sequence[~Filesystem] - Returns -> ErrorResults - ''' - if filesystems is not None and not isinstance(filesystems, (bytes, str, list)): - raise Exception("Expected filesystems to be a Sequence, received: {}".format(type(filesystems))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='StorageProvisioner', - request='SetFilesystemInfo', - version=4, - params=_params) - _params['filesystems'] = filesystems - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def SetStatus(self, entities=None): - ''' - SetStatus sets the status of each given entity. - - entities : typing.Sequence[~EntityStatusArgs] - Returns -> ErrorResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='StorageProvisioner', - request='SetStatus', - version=4, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def SetVolumeAttachmentInfo(self, volume_attachments=None): - ''' - SetVolumeAttachmentInfo records the details of newly provisioned volume - attachments. - - volume_attachments : typing.Sequence[~VolumeAttachment] - Returns -> ErrorResults - ''' - if volume_attachments is not None and not isinstance(volume_attachments, (bytes, str, list)): - raise Exception("Expected volume_attachments to be a Sequence, received: {}".format(type(volume_attachments))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='StorageProvisioner', - request='SetVolumeAttachmentInfo', - version=4, - params=_params) - _params['volume-attachments'] = volume_attachments - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def SetVolumeAttachmentPlanBlockInfo(self, volume_plans=None): - ''' - volume_plans : typing.Sequence[~VolumeAttachmentPlan] - Returns -> ErrorResults - ''' - if volume_plans is not None and not isinstance(volume_plans, (bytes, str, list)): - raise Exception("Expected volume_plans to be a Sequence, received: {}".format(type(volume_plans))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='StorageProvisioner', - request='SetVolumeAttachmentPlanBlockInfo', - version=4, - params=_params) - _params['volume-plans'] = volume_plans - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def SetVolumeInfo(self, volumes=None): - ''' - SetVolumeInfo records the details of newly provisioned volumes. - - volumes : typing.Sequence[~Volume] - Returns -> ErrorResults - ''' - if volumes is not None and not isinstance(volumes, (bytes, str, list)): - raise Exception("Expected volumes to be a Sequence, received: {}".format(type(volumes))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='StorageProvisioner', - request='SetVolumeInfo', - version=4, - params=_params) - _params['volumes'] = volumes - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(VolumeAttachmentParamsResults) - async def VolumeAttachmentParams(self, ids=None): - ''' - VolumeAttachmentParams returns the parameters for creating the volume - attachments with the specified IDs. - - ids : typing.Sequence[~MachineStorageId] - Returns -> VolumeAttachmentParamsResults - ''' - if ids is not None and not isinstance(ids, (bytes, str, list)): - raise Exception("Expected ids to be a Sequence, received: {}".format(type(ids))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='StorageProvisioner', - request='VolumeAttachmentParams', - version=4, - params=_params) - _params['ids'] = ids - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(VolumeAttachmentPlanResults) - async def VolumeAttachmentPlans(self, ids=None): - ''' - VolumeAttachmentPlans returns details of volume attachment plans with the specified IDs. - - ids : typing.Sequence[~MachineStorageId] - Returns -> VolumeAttachmentPlanResults - ''' - if ids is not None and not isinstance(ids, (bytes, str, list)): - raise Exception("Expected ids to be a Sequence, received: {}".format(type(ids))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='StorageProvisioner', - request='VolumeAttachmentPlans', - version=4, - params=_params) - _params['ids'] = ids - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(VolumeAttachmentResults) - async def VolumeAttachments(self, ids=None): - ''' - VolumeAttachments returns details of volume attachments with the specified IDs. - - ids : typing.Sequence[~MachineStorageId] - Returns -> VolumeAttachmentResults - ''' - if ids is not None and not isinstance(ids, (bytes, str, list)): - raise Exception("Expected ids to be a Sequence, received: {}".format(type(ids))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='StorageProvisioner', - request='VolumeAttachments', - version=4, - params=_params) - _params['ids'] = ids + _params['branches'] = branches + _params['detailed'] = detailed reply = await self.rpc(msg) return reply - @ReturnMapping(BlockDeviceResults) - async def VolumeBlockDevices(self, ids=None): + @ReturnMapping(IntResult) + async def CommitBranch(self, branch=None): ''' - VolumeBlockDevices returns details of the block devices corresponding to the - volume attachments with the specified IDs. + CommitBranch commits the input branch, making its changes applicable to + the whole model and marking it complete. - ids : typing.Sequence[~MachineStorageId] - Returns -> BlockDeviceResults + branch : str + Returns -> IntResult ''' - if ids is not None and not isinstance(ids, (bytes, str, list)): - raise Exception("Expected ids to be a Sequence, received: {}".format(type(ids))) + if branch is not None and not isinstance(branch, (bytes, str)): + raise Exception("Expected branch to be a str, received: {}".format(type(branch))) # map input types to rpc msg _params = dict() - msg = dict(type='StorageProvisioner', - request='VolumeBlockDevices', + msg = dict(type='ModelGeneration', + request='CommitBranch', version=4, params=_params) - _params['ids'] = ids + _params['branch'] = branch reply = await self.rpc(msg) return reply - @ReturnMapping(VolumeParamsResults) - async def VolumeParams(self, entities=None): + @ReturnMapping(BoolResult) + async def HasActiveBranch(self, branch=None): ''' - VolumeParams returns the parameters for creating or destroying - the volumes with the specified tags. + HasActiveBranch returns a true result if the input model has an "in-flight" + branch matching the input name. - entities : typing.Sequence[~Entity] - Returns -> VolumeParamsResults + branch : str + Returns -> BoolResult ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) + if branch is not None and not isinstance(branch, (bytes, str)): + raise Exception("Expected branch to be a str, received: {}".format(type(branch))) # map input types to rpc msg _params = dict() - msg = dict(type='StorageProvisioner', - request='VolumeParams', + msg = dict(type='ModelGeneration', + request='HasActiveBranch', version=4, params=_params) - _params['entities'] = entities + _params['branch'] = branch reply = await self.rpc(msg) return reply - @ReturnMapping(VolumeResults) - async def Volumes(self, entities=None): + @ReturnMapping(BranchResults) + async def ListCommits(self): ''' - Volumes returns details of volumes with the specified tags. + ListCommits will return the commits, hence only branches with generation_id higher than 0 - entities : typing.Sequence[~Entity] - Returns -> VolumeResults + + Returns -> BranchResults ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) # map input types to rpc msg _params = dict() - msg = dict(type='StorageProvisioner', - request='Volumes', + msg = dict(type='ModelGeneration', + request='ListCommits', version=4, params=_params) - _params['entities'] = entities + reply = await self.rpc(msg) return reply - @ReturnMapping(StringsWatchResult) - async def WatchApplications(self): + @ReturnMapping(GenerationResult) + async def ShowCommit(self, generation_id=None): ''' - WatchApplications starts a StringsWatcher to watch CAAS applications - deployed to this model. - + ShowCommit will return details a commit given by its generationId + An error is returned if either no branch can be found corresponding to the generation id. + Or the generation id given is below 1. - Returns -> StringsWatchResult + generation_id : int + Returns -> GenerationResult ''' + if generation_id is not None and not isinstance(generation_id, int): + raise Exception("Expected generation_id to be a int, received: {}".format(type(generation_id))) # map input types to rpc msg _params = dict() - msg = dict(type='StorageProvisioner', - request='WatchApplications', + msg = dict(type='ModelGeneration', + request='ShowCommit', version=4, params=_params) - + _params['generation-id'] = generation_id reply = await self.rpc(msg) return reply - @ReturnMapping(NotifyWatchResults) - async def WatchBlockDevices(self, entities=None): + @ReturnMapping(ErrorResults) + async def TrackBranch(self, branch=None, entities=None, num_units=None): ''' - WatchBlockDevices watches for changes to the specified machines' block devices. + TrackBranch marks the input units and/or applications as tracking the input + branch, causing them to realise changes made under that branch. + branch : str entities : typing.Sequence[~Entity] - Returns -> NotifyWatchResults + num_units : int + Returns -> ErrorResults ''' + if branch is not None and not isinstance(branch, (bytes, str)): + raise Exception("Expected branch to be a str, received: {}".format(type(branch))) + if entities is not None and not isinstance(entities, (bytes, str, list)): raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) + if num_units is not None and not isinstance(num_units, int): + raise Exception("Expected num_units to be a int, received: {}".format(type(num_units))) + # map input types to rpc msg _params = dict() - msg = dict(type='StorageProvisioner', - request='WatchBlockDevices', + msg = dict(type='ModelGeneration', + request='TrackBranch', version=4, params=_params) + _params['branch'] = branch _params['entities'] = entities + _params['num-units'] = num_units reply = await self.rpc(msg) return reply - @ReturnMapping(MachineStorageIdsWatchResults) - async def WatchFilesystemAttachments(self, entities=None): +class SSHClientFacade(Type): + name = 'SSHClient' + version = 4 + schema = {'definitions': {'CloudCredential': {'additionalProperties': False, + 'properties': {'attrs': {'patternProperties': {'.*': {'type': 'string'}}, + 'type': 'object'}, + 'auth-type': {'type': 'string'}, + 'redacted': {'items': {'type': 'string'}, + 'type': 'array'}}, + 'required': ['auth-type'], + 'type': 'object'}, + 'CloudSpec': {'additionalProperties': False, + 'properties': {'cacertificates': {'items': {'type': 'string'}, + 'type': 'array'}, + 'credential': {'$ref': '#/definitions/CloudCredential'}, + 'endpoint': {'type': 'string'}, + 'identity-endpoint': {'type': 'string'}, + 'is-controller-cloud': {'type': 'boolean'}, + 'name': {'type': 'string'}, + 'region': {'type': 'string'}, + 'skip-tls-verify': {'type': 'boolean'}, + 'storage-endpoint': {'type': 'string'}, + 'type': {'type': 'string'}}, + 'required': ['type', 'name'], + 'type': 'object'}, + 'CloudSpecResult': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}, + 'result': {'$ref': '#/definitions/CloudSpec'}}, + 'type': 'object'}, + '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': {'patternProperties': {'.*': {'additionalProperties': True, + 'type': 'object'}}, + 'type': 'object'}, + 'message': {'type': 'string'}}, + 'required': ['message', 'code'], + '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'}, + 'SSHAddressesResult': {'additionalProperties': False, + 'properties': {'addresses': {'items': {'type': 'string'}, + 'type': 'array'}, + 'error': {'$ref': '#/definitions/Error'}}, + 'required': ['addresses'], + 'type': 'object'}, + 'SSHAddressesResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/SSHAddressesResult'}, + 'type': 'array'}}, + 'required': ['results'], + 'type': 'object'}, + 'SSHProxyResult': {'additionalProperties': False, + 'properties': {'use-proxy': {'type': 'boolean'}}, + 'required': ['use-proxy'], + 'type': 'object'}, + 'SSHPublicKeysResult': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}, + 'public-keys': {'items': {'type': 'string'}, + 'type': 'array'}}, + 'type': 'object'}, + 'SSHPublicKeysResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/SSHPublicKeysResult'}, + 'type': 'array'}}, + 'required': ['results'], + 'type': 'object'}}, + 'properties': {'AllAddresses': {'description': 'AllAddresses reports all ' + 'addresses that might have SSH ' + 'listening for each\n' + 'entity in args. The result is ' + 'sorted with public addresses ' + 'first.\n' + 'Machines and units are ' + 'supported as entity types.', + 'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/SSHAddressesResults'}}, + 'type': 'object'}, + 'ModelCredentialForSSH': {'description': 'ModelCredentialForSSH ' + 'returns a cloud spec ' + 'for ssh purpose.\n' + 'This facade call is ' + 'only used for k8s ' + 'model.', + 'properties': {'Result': {'$ref': '#/definitions/CloudSpecResult'}}, + 'type': 'object'}, + 'PrivateAddress': {'description': 'PrivateAddress reports the ' + 'preferred private network ' + 'address for one or\n' + 'more entities. Machines and ' + 'units are supported.', + 'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/SSHAddressResults'}}, + 'type': 'object'}, + 'Proxy': {'description': 'Proxy returns whether SSH ' + 'connections should be proxied ' + 'through the\n' + 'controller hosts for the model ' + 'associated with the API connection.', + 'properties': {'Result': {'$ref': '#/definitions/SSHProxyResult'}}, + 'type': 'object'}, + 'PublicAddress': {'description': 'PublicAddress reports the ' + 'preferred public network ' + 'address for one\n' + 'or more entities. Machines ' + 'and units are supported.', + 'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/SSHAddressResults'}}, + 'type': 'object'}, + 'PublicKeys': {'description': 'PublicKeys returns the public ' + 'SSH hosts for one or more\n' + 'entities. Machines and units ' + 'are supported.', + 'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/SSHPublicKeysResults'}}, + 'type': 'object'}}, + 'type': 'object'} + + + @ReturnMapping(SSHAddressesResults) + async def AllAddresses(self, entities=None): ''' - WatchFilesystemAttachments watches for changes to filesystem attachments - scoped to the entity with the tag passed to NewState. + AllAddresses reports all addresses that might have SSH listening for each + entity in args. The result is sorted with public addresses first. + Machines and units are supported as entity types. entities : typing.Sequence[~Entity] - Returns -> MachineStorageIdsWatchResults + Returns -> SSHAddressesResults ''' if entities is not None and not isinstance(entities, (bytes, str, list)): raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) # map input types to rpc msg _params = dict() - msg = dict(type='StorageProvisioner', - request='WatchFilesystemAttachments', + msg = dict(type='SSHClient', + request='AllAddresses', version=4, params=_params) _params['entities'] = entities @@ -3347,45 +1194,44 @@ async def WatchFilesystemAttachments(self, entities=None): - @ReturnMapping(StringsWatchResults) - async def WatchFilesystems(self, entities=None): + @ReturnMapping(CloudSpecResult) + async def ModelCredentialForSSH(self): ''' - WatchFilesystems watches for changes to filesystems scoped - to the entity with the tag passed to NewState. + ModelCredentialForSSH returns a cloud spec for ssh purpose. + This facade call is only used for k8s model. - entities : typing.Sequence[~Entity] - Returns -> StringsWatchResults + + Returns -> CloudSpecResult ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) # map input types to rpc msg _params = dict() - msg = dict(type='StorageProvisioner', - request='WatchFilesystems', + msg = dict(type='SSHClient', + request='ModelCredentialForSSH', version=4, params=_params) - _params['entities'] = entities + reply = await self.rpc(msg) return reply - @ReturnMapping(NotifyWatchResults) - async def WatchMachines(self, entities=None): + @ReturnMapping(SSHAddressResults) + async def PrivateAddress(self, entities=None): ''' - WatchMachines watches for changes to the specified machines. + PrivateAddress reports the preferred private network address for one or + more entities. Machines and units are supported. entities : typing.Sequence[~Entity] - Returns -> NotifyWatchResults + Returns -> SSHAddressResults ''' if entities is not None and not isinstance(entities, (bytes, str, list)): raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) # map input types to rpc msg _params = dict() - msg = dict(type='StorageProvisioner', - request='WatchMachines', + msg = dict(type='SSHClient', + request='PrivateAddress', version=4, params=_params) _params['entities'] = entities @@ -3394,46 +1240,44 @@ async def WatchMachines(self, entities=None): - @ReturnMapping(MachineStorageIdsWatchResults) - async def WatchVolumeAttachmentPlans(self, entities=None): + @ReturnMapping(SSHProxyResult) + async def Proxy(self): ''' - WatchVolumeAttachmentPlans watches for changes to volume attachments for a machine for the purpose of allowing - that machine to run any initialization needed, for that volume to actually appear as a block device (ie: iSCSI) + Proxy returns whether SSH connections should be proxied through the + controller hosts for the model associated with the API connection. - entities : typing.Sequence[~Entity] - Returns -> MachineStorageIdsWatchResults + + Returns -> SSHProxyResult ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) # map input types to rpc msg _params = dict() - msg = dict(type='StorageProvisioner', - request='WatchVolumeAttachmentPlans', + msg = dict(type='SSHClient', + request='Proxy', version=4, params=_params) - _params['entities'] = entities + reply = await self.rpc(msg) return reply - @ReturnMapping(MachineStorageIdsWatchResults) - async def WatchVolumeAttachments(self, entities=None): + @ReturnMapping(SSHAddressResults) + async def PublicAddress(self, entities=None): ''' - WatchVolumeAttachments watches for changes to volume attachments scoped to - the entity with the tag passed to NewState. + PublicAddress reports the preferred public network address for one + or more entities. Machines and units are supported. entities : typing.Sequence[~Entity] - Returns -> MachineStorageIdsWatchResults + Returns -> SSHAddressResults ''' if entities is not None and not isinstance(entities, (bytes, str, list)): raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) # map input types to rpc msg _params = dict() - msg = dict(type='StorageProvisioner', - request='WatchVolumeAttachments', + msg = dict(type='SSHClient', + request='PublicAddress', version=4, params=_params) _params['entities'] = entities @@ -3442,22 +1286,22 @@ async def WatchVolumeAttachments(self, entities=None): - @ReturnMapping(StringsWatchResults) - async def WatchVolumes(self, entities=None): + @ReturnMapping(SSHPublicKeysResults) + async def PublicKeys(self, entities=None): ''' - WatchVolumes watches for changes to volumes scoped to the - entity with the tag passed to NewState. + PublicKeys returns the public SSH hosts for one or more + entities. Machines and units are supported. entities : typing.Sequence[~Entity] - Returns -> StringsWatchResults + Returns -> SSHPublicKeysResults ''' if entities is not None and not isinstance(entities, (bytes, str, list)): raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) # map input types to rpc msg _params = dict() - msg = dict(type='StorageProvisioner', - request='WatchVolumes', + msg = dict(type='SSHClient', + request='PublicKeys', version=4, params=_params) _params['entities'] = entities diff --git a/juju/client/_client5.py b/juju/client/_client5.py index 0ea7f5cb..f434e0ac 100644 --- a/juju/client/_client5.py +++ b/juju/client/_client5.py @@ -5,570 +5,6 @@ from juju.client._definitions import * -class MachinerFacade(Type): - name = 'Machiner' - version = 5 - schema = {'definitions': {'APIHostPortsResult': {'additionalProperties': False, - 'properties': {'servers': {'items': {'items': {'$ref': '#/definitions/HostPort'}, - 'type': 'array'}, - 'type': 'array'}}, - 'required': ['servers'], - 'type': 'object'}, - 'Address': {'additionalProperties': False, - 'properties': {'cidr': {'type': 'string'}, - 'config-type': {'type': 'string'}, - 'is-secondary': {'type': 'boolean'}, - 'scope': {'type': 'string'}, - 'space-id': {'type': 'string'}, - 'space-name': {'type': 'string'}, - 'type': {'type': 'string'}, - 'value': {'type': 'string'}}, - 'required': ['value', 'type', 'scope'], - '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': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'message': {'type': 'string'}}, - 'required': ['message', 'code'], - 'type': 'object'}, - 'ErrorResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}}, - 'type': 'object'}, - 'ErrorResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'HostPort': {'additionalProperties': False, - 'properties': {'Address': {'$ref': '#/definitions/Address'}, - 'cidr': {'type': 'string'}, - 'config-type': {'type': 'string'}, - 'is-secondary': {'type': 'boolean'}, - 'port': {'type': 'integer'}, - 'scope': {'type': 'string'}, - 'space-id': {'type': 'string'}, - 'space-name': {'type': 'string'}, - 'type': {'type': 'string'}, - 'value': {'type': 'string'}}, - 'required': ['value', - 'type', - 'scope', - 'Address', - 'port'], - 'type': 'object'}, - 'JobsResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'jobs': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'required': ['jobs'], - 'type': 'object'}, - 'JobsResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/JobsResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'LifeResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'life': {'type': 'string'}}, - 'required': ['life'], - 'type': 'object'}, - 'LifeResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - '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'}, - 'addresses': {'items': {'$ref': '#/definitions/Address'}, - 'type': 'array'}, - 'cidr': {'type': 'string'}, - 'config-type': {'type': 'string'}, - 'device-index': {'type': 'integer'}, - 'disabled': {'type': 'boolean'}, - 'dns-search-domains': {'items': {'type': 'string'}, - 'type': 'array'}, - 'dns-servers': {'items': {'type': 'string'}, - 'type': 'array'}, - 'gateway-address': {'type': 'string'}, - 'interface-name': {'type': 'string'}, - 'interface-type': {'type': 'string'}, - 'is-default-gateway': {'type': 'boolean'}, - 'mac-address': {'type': 'string'}, - 'mtu': {'type': 'integer'}, - 'no-auto-start': {'type': 'boolean'}, - 'origin': {'type': 'string'}, - 'parent-interface-name': {'type': 'string'}, - 'provider-address-id': {'type': 'string'}, - 'provider-id': {'type': 'string'}, - 'provider-network-id': {'type': 'string'}, - 'provider-space-id': {'type': 'string'}, - 'provider-subnet-id': {'type': 'string'}, - 'provider-vlan-id': {'type': 'string'}, - 'routes': {'items': {'$ref': '#/definitions/NetworkRoute'}, - 'type': 'array'}, - 'shadow-addresses': {'items': {'$ref': '#/definitions/Address'}, - 'type': 'array'}, - 'virtual-port-type': {'type': 'string'}, - 'vlan-tag': {'type': 'integer'}}, - 'required': ['device-index', - 'mac-address', - 'cidr', - 'mtu', - 'provider-id', - 'provider-network-id', - 'provider-subnet-id', - 'provider-space-id', - 'provider-address-id', - 'provider-vlan-id', - 'vlan-tag', - 'interface-name', - 'parent-interface-name', - 'interface-type', - 'disabled'], - 'type': 'object'}, - 'NetworkRoute': {'additionalProperties': False, - 'properties': {'destination-cidr': {'type': 'string'}, - 'gateway-ip': {'type': 'string'}, - 'metric': {'type': 'integer'}}, - 'required': ['destination-cidr', - 'gateway-ip', - 'metric'], - 'type': 'object'}, - 'NotifyWatchResult': {'additionalProperties': False, - 'properties': {'NotifyWatcherId': {'type': 'string'}, - 'error': {'$ref': '#/definitions/Error'}}, - 'required': ['NotifyWatcherId'], - 'type': 'object'}, - 'NotifyWatchResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'RecordAgentStartInformationArg': {'additionalProperties': False, - 'properties': {'hostname': {'type': 'string'}, - 'tag': {'type': 'string'}}, - 'required': ['tag'], - 'type': 'object'}, - 'RecordAgentStartInformationArgs': {'additionalProperties': False, - 'properties': {'args': {'items': {'$ref': '#/definitions/RecordAgentStartInformationArg'}, - 'type': 'array'}}, - 'required': ['args'], - 'type': 'object'}, - 'SetMachineNetworkConfig': {'additionalProperties': False, - 'properties': {'config': {'items': {'$ref': '#/definitions/NetworkConfig'}, - 'type': 'array'}, - 'tag': {'type': 'string'}}, - 'required': ['tag', 'config'], - 'type': 'object'}, - 'SetMachinesAddresses': {'additionalProperties': False, - 'properties': {'machine-addresses': {'items': {'$ref': '#/definitions/MachineAddresses'}, - 'type': 'array'}}, - 'required': ['machine-addresses'], - 'type': 'object'}, - 'SetStatus': {'additionalProperties': False, - 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'}, - 'type': 'array'}}, - 'required': ['entities'], - 'type': 'object'}, - 'StringsResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'result': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'type': 'object'}}, - 'properties': {'APIAddresses': {'description': 'APIAddresses returns the list ' - 'of addresses used to connect ' - 'to the API.', - 'properties': {'Result': {'$ref': '#/definitions/StringsResult'}}, - 'type': 'object'}, - 'APIHostPorts': {'description': 'APIHostPorts returns the API ' - 'server addresses.', - 'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}}, - 'type': 'object'}, - 'EnsureDead': {'description': 'EnsureDead calls EnsureDead on ' - 'each given entity from state. ' - 'It\n' - 'will fail if the entity is not ' - "present. If it's Alive, nothing " - 'will\n' - 'happen (see state/EnsureDead() ' - 'for units or machines).', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'Jobs': {'description': 'Jobs returns the jobs assigned to the ' - 'given entities.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/JobsResults'}}, - 'type': 'object'}, - 'Life': {'description': 'Life returns the life status of every ' - 'supplied entity, where available.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/LifeResults'}}, - 'type': 'object'}, - 'RecordAgentStartInformation': {'description': 'RecordAgentStartInformation ' - 'syncs the ' - 'machine model ' - 'with ' - 'information\n' - 'reported by a ' - 'machine agent ' - 'when it ' - 'starts.', - 'properties': {'Params': {'$ref': '#/definitions/RecordAgentStartInformationArgs'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'RecordAgentStartTime': {'description': 'RecordAgentStartTime ' - 'updates the agent ' - 'start time field in ' - 'the machine doc.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'SetMachineAddresses': {'properties': {'Params': {'$ref': '#/definitions/SetMachinesAddresses'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'SetObservedNetworkConfig': {'description': 'SetObservedNetworkConfig ' - 'reads the network ' - 'config for the ' - 'machine\n' - 'identified by the ' - 'input args.\n' - 'This config is ' - 'merged with the ' - 'new network ' - 'config supplied ' - 'in the\n' - 'same args and ' - 'updated if it has ' - 'changed.', - 'properties': {'Params': {'$ref': '#/definitions/SetMachineNetworkConfig'}}, - 'type': 'object'}, - 'SetStatus': {'description': 'SetStatus sets the status of ' - 'each given entity.', - 'properties': {'Params': {'$ref': '#/definitions/SetStatus'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'Watch': {'description': 'Watch starts an NotifyWatcher for ' - 'each given entity.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/NotifyWatchResults'}}, - 'type': 'object'}, - 'WatchAPIHostPorts': {'description': 'WatchAPIHostPorts ' - 'watches the API server ' - 'addresses.', - 'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}}, - 'type': 'object'}}, - 'type': 'object'} - - - @ReturnMapping(StringsResult) - async def APIAddresses(self): - ''' - APIAddresses returns the list of addresses used to connect to the API. - - - Returns -> StringsResult - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='Machiner', - request='APIAddresses', - version=5, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(APIHostPortsResult) - async def APIHostPorts(self): - ''' - APIHostPorts returns the API server addresses. - - - Returns -> APIHostPortsResult - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='Machiner', - request='APIHostPorts', - version=5, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def EnsureDead(self, entities=None): - ''' - EnsureDead calls EnsureDead on each given entity from state. It - will fail if the entity is not present. If it's Alive, nothing will - happen (see state/EnsureDead() for units or machines). - - entities : typing.Sequence[~Entity] - Returns -> ErrorResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Machiner', - request='EnsureDead', - version=5, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(JobsResults) - async def Jobs(self, entities=None): - ''' - Jobs returns the jobs assigned to the given entities. - - entities : typing.Sequence[~Entity] - Returns -> JobsResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Machiner', - request='Jobs', - version=5, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(LifeResults) - async def Life(self, entities=None): - ''' - Life returns the life status of every supplied entity, where available. - - entities : typing.Sequence[~Entity] - Returns -> LifeResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Machiner', - request='Life', - version=5, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def RecordAgentStartInformation(self, args=None): - ''' - RecordAgentStartInformation syncs the machine model with information - reported by a machine agent when it starts. - - args : typing.Sequence[~RecordAgentStartInformationArg] - Returns -> ErrorResults - ''' - if args is not None and not isinstance(args, (bytes, str, list)): - raise Exception("Expected args to be a Sequence, received: {}".format(type(args))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Machiner', - request='RecordAgentStartInformation', - version=5, - params=_params) - _params['args'] = args - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def RecordAgentStartTime(self, entities=None): - ''' - RecordAgentStartTime updates the agent start time field in the machine doc. - - entities : typing.Sequence[~Entity] - Returns -> ErrorResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Machiner', - request='RecordAgentStartTime', - version=5, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def SetMachineAddresses(self, machine_addresses=None): - ''' - machine_addresses : typing.Sequence[~MachineAddresses] - Returns -> ErrorResults - ''' - if machine_addresses is not None and not isinstance(machine_addresses, (bytes, str, list)): - raise Exception("Expected machine_addresses to be a Sequence, received: {}".format(type(machine_addresses))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Machiner', - request='SetMachineAddresses', - version=5, - params=_params) - _params['machine-addresses'] = machine_addresses - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(None) - async def SetObservedNetworkConfig(self, config=None, tag=None): - ''' - SetObservedNetworkConfig reads the network config for the machine - identified by the input args. - This config is merged with the new network config supplied in the - same args and updated if it has changed. - - config : typing.Sequence[~NetworkConfig] - tag : str - Returns -> None - ''' - if config is not None and not isinstance(config, (bytes, str, list)): - raise Exception("Expected config to be a Sequence, received: {}".format(type(config))) - - if tag is not None and not isinstance(tag, (bytes, str)): - raise Exception("Expected tag to be a str, received: {}".format(type(tag))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Machiner', - request='SetObservedNetworkConfig', - version=5, - params=_params) - _params['config'] = config - _params['tag'] = tag - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def SetStatus(self, entities=None): - ''' - SetStatus sets the status of each given entity. - - entities : typing.Sequence[~EntityStatusArgs] - Returns -> ErrorResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Machiner', - request='SetStatus', - version=5, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(NotifyWatchResults) - async def Watch(self, entities=None): - ''' - Watch starts an NotifyWatcher for each given entity. - - entities : typing.Sequence[~Entity] - Returns -> NotifyWatchResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Machiner', - request='Watch', - version=5, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(NotifyWatchResult) - async def WatchAPIHostPorts(self): - ''' - WatchAPIHostPorts watches the API server addresses. - - - Returns -> NotifyWatchResult - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='Machiner', - request='WatchAPIHostPorts', - version=5, - params=_params) - - reply = await self.rpc(msg) - return reply - - - class SubnetsFacade(Type): name = 'Subnets' version = 5 diff --git a/juju/client/_client7.py b/juju/client/_client7.py index 7b54560a..74d82d18 100644 --- a/juju/client/_client7.py +++ b/juju/client/_client7.py @@ -2789,1178 +2789,3 @@ async def UserCredentials(self, user_clouds=None): return reply - -class FirewallerFacade(Type): - name = 'Firewaller' - version = 7 - schema = {'definitions': {'BoolResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'result': {'type': 'boolean'}}, - 'required': ['result'], - 'type': 'object'}, - 'BoolResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/BoolResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'CloudCredential': {'additionalProperties': False, - 'properties': {'attrs': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}, - 'auth-type': {'type': 'string'}, - 'redacted': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'required': ['auth-type'], - 'type': 'object'}, - 'CloudSpec': {'additionalProperties': False, - 'properties': {'cacertificates': {'items': {'type': 'string'}, - 'type': 'array'}, - 'credential': {'$ref': '#/definitions/CloudCredential'}, - 'endpoint': {'type': 'string'}, - 'identity-endpoint': {'type': 'string'}, - 'is-controller-cloud': {'type': 'boolean'}, - 'name': {'type': 'string'}, - 'region': {'type': 'string'}, - 'skip-tls-verify': {'type': 'boolean'}, - 'storage-endpoint': {'type': 'string'}, - 'type': {'type': 'string'}}, - 'required': ['type', 'name'], - 'type': 'object'}, - 'CloudSpecResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'result': {'$ref': '#/definitions/CloudSpec'}}, - 'type': 'object'}, - 'CloudSpecResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/CloudSpecResult'}, - 'type': 'array'}}, - 'type': 'object'}, - 'ControllerAPIInfoResult': {'additionalProperties': False, - 'properties': {'addresses': {'items': {'type': 'string'}, - 'type': 'array'}, - 'cacert': {'type': 'string'}, - 'error': {'$ref': '#/definitions/Error'}}, - 'required': ['addresses', - 'cacert'], - 'type': 'object'}, - 'ControllerAPIInfoResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/ControllerAPIInfoResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'ControllerConfigResult': {'additionalProperties': False, - 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}}, - 'required': ['config'], - 'type': 'object'}, - 'Entities': {'additionalProperties': False, - 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'}, - 'type': 'array'}}, - 'required': ['entities'], - 'type': 'object'}, - 'Entity': {'additionalProperties': False, - 'properties': {'tag': {'type': 'string'}}, - 'required': ['tag'], - 'type': 'object'}, - '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': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'message': {'type': 'string'}}, - 'required': ['message', 'code'], - 'type': 'object'}, - 'ErrorResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}}, - 'type': 'object'}, - 'ErrorResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'ExposeInfoResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'exposed': {'type': 'boolean'}, - 'exposed-endpoints': {'patternProperties': {'.*': {'$ref': '#/definitions/ExposedEndpoint'}}, - 'type': 'object'}}, - 'type': 'object'}, - 'ExposeInfoResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/ExposeInfoResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'ExposedEndpoint': {'additionalProperties': False, - 'properties': {'expose-to-cidrs': {'items': {'type': 'string'}, - 'type': 'array'}, - 'expose-to-spaces': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'type': 'object'}, - 'FanConfigEntry': {'additionalProperties': False, - 'properties': {'overlay': {'type': 'string'}, - 'underlay': {'type': 'string'}}, - 'required': ['underlay', 'overlay'], - 'type': 'object'}, - 'IngressRule': {'additionalProperties': False, - 'properties': {'port-range': {'$ref': '#/definitions/PortRange'}, - 'source-cidrs': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'required': ['port-range', 'source-cidrs'], - 'type': 'object'}, - 'IngressRulesResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'rules': {'items': {'$ref': '#/definitions/IngressRule'}, - 'type': 'array'}}, - 'required': ['rules'], - 'type': 'object'}, - 'LifeResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'life': {'type': 'string'}}, - 'required': ['life'], - 'type': 'object'}, - 'LifeResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'Macaroon': {'additionalProperties': False, 'type': 'object'}, - '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'}, - 'ModelConfigResult': {'additionalProperties': False, - 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}}, - 'required': ['config'], - 'type': 'object'}, - 'ModelTag': {'additionalProperties': False, 'type': 'object'}, - 'NotifyWatchResult': {'additionalProperties': False, - 'properties': {'NotifyWatcherId': {'type': 'string'}, - 'error': {'$ref': '#/definitions/Error'}}, - 'required': ['NotifyWatcherId'], - 'type': 'object'}, - 'NotifyWatchResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'OpenMachinePortRangesResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'unit-port-ranges': {'patternProperties': {'.*': {'items': {'$ref': '#/definitions/OpenUnitPortRanges'}, - 'type': 'array'}}, - 'type': 'object'}}, - 'required': ['unit-port-ranges'], - 'type': 'object'}, - 'OpenMachinePortRangesResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/OpenMachinePortRangesResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'OpenUnitPortRanges': {'additionalProperties': False, - 'properties': {'endpoint': {'type': 'string'}, - 'port-ranges': {'items': {'$ref': '#/definitions/PortRange'}, - 'type': 'array'}, - 'subnet-cidrs': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'required': ['endpoint', - 'port-ranges', - 'subnet-cidrs'], - 'type': 'object'}, - 'PortRange': {'additionalProperties': False, - 'properties': {'from-port': {'type': 'integer'}, - 'protocol': {'type': 'string'}, - 'to-port': {'type': 'integer'}}, - 'required': ['from-port', 'to-port', 'protocol'], - 'type': 'object'}, - 'SetStatus': {'additionalProperties': False, - 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'}, - 'type': 'array'}}, - 'required': ['entities'], - 'type': 'object'}, - 'SpaceInfo': {'additionalProperties': False, - 'properties': {'id': {'type': 'string'}, - 'name': {'type': 'string'}, - 'provider-id': {'type': 'string'}, - 'subnets': {'items': {'$ref': '#/definitions/SubnetV3'}, - 'type': 'array'}}, - 'required': ['id', 'name'], - 'type': 'object'}, - 'SpaceInfos': {'additionalProperties': False, - 'properties': {'space-infos': {'items': {'$ref': '#/definitions/SpaceInfo'}, - 'type': 'array'}}, - 'type': 'object'}, - 'SpaceInfosParams': {'additionalProperties': False, - 'properties': {'space-ids': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'type': 'object'}, - 'StringResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'result': {'type': 'string'}}, - 'required': ['result'], - 'type': 'object'}, - 'StringResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'StringsWatchResult': {'additionalProperties': False, - 'properties': {'changes': {'items': {'type': 'string'}, - 'type': 'array'}, - 'error': {'$ref': '#/definitions/Error'}, - 'watcher-id': {'type': 'string'}}, - 'required': ['watcher-id'], - 'type': 'object'}, - 'StringsWatchResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'Subnet': {'additionalProperties': False, - 'properties': {'cidr': {'type': 'string'}, - 'life': {'type': 'string'}, - 'provider-id': {'type': 'string'}, - 'provider-network-id': {'type': 'string'}, - 'provider-space-id': {'type': 'string'}, - 'space-tag': {'type': 'string'}, - 'status': {'type': 'string'}, - 'vlan-tag': {'type': 'integer'}, - 'zones': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'required': ['cidr', - 'vlan-tag', - 'life', - 'space-tag', - 'zones'], - 'type': 'object'}, - 'SubnetV2': {'additionalProperties': False, - 'properties': {'Subnet': {'$ref': '#/definitions/Subnet'}, - 'cidr': {'type': 'string'}, - 'id': {'type': 'string'}, - 'life': {'type': 'string'}, - 'provider-id': {'type': 'string'}, - 'provider-network-id': {'type': 'string'}, - 'provider-space-id': {'type': 'string'}, - 'space-tag': {'type': 'string'}, - 'status': {'type': 'string'}, - 'vlan-tag': {'type': 'integer'}, - 'zones': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'required': ['cidr', - 'vlan-tag', - 'life', - 'space-tag', - 'zones', - 'Subnet'], - 'type': 'object'}, - 'SubnetV3': {'additionalProperties': False, - 'properties': {'Subnet': {'$ref': '#/definitions/Subnet'}, - 'SubnetV2': {'$ref': '#/definitions/SubnetV2'}, - 'cidr': {'type': 'string'}, - 'fan-info': {'$ref': '#/definitions/FanConfigEntry'}, - 'id': {'type': 'string'}, - 'is-public': {'type': 'boolean'}, - 'life': {'type': 'string'}, - 'provider-id': {'type': 'string'}, - 'provider-network-id': {'type': 'string'}, - 'provider-space-id': {'type': 'string'}, - 'space-id': {'type': 'string'}, - 'space-tag': {'type': 'string'}, - 'status': {'type': 'string'}, - 'vlan-tag': {'type': 'integer'}, - 'zones': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'required': ['cidr', - 'vlan-tag', - 'life', - 'space-tag', - 'zones', - 'Subnet', - 'SubnetV2', - 'space-id'], - 'type': 'object'}}, - 'properties': {'AreManuallyProvisioned': {'description': 'AreManuallyProvisioned ' - 'returns whether ' - 'each given entity ' - 'is\n' - 'manually ' - 'provisioned or not. ' - 'Only machine tags ' - 'are accepted.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/BoolResults'}}, - 'type': 'object'}, - 'CloudSpec': {'description': "CloudSpec returns the model's " - 'cloud spec.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/CloudSpecResults'}}, - 'type': 'object'}, - 'ControllerAPIInfoForModels': {'description': 'ControllerAPIInfoForModels ' - 'returns the ' - 'controller api ' - 'connection ' - 'details for the ' - 'specified ' - 'models.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ControllerAPIInfoResults'}}, - 'type': 'object'}, - 'ControllerConfig': {'description': 'ControllerConfig returns ' - "the controller's " - 'configuration.', - 'properties': {'Result': {'$ref': '#/definitions/ControllerConfigResult'}}, - 'type': 'object'}, - 'GetAssignedMachine': {'description': 'GetAssignedMachine ' - 'returns the assigned ' - 'machine tag (if any) ' - 'for\n' - 'each given unit.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/StringResults'}}, - 'type': 'object'}, - 'GetCloudSpec': {'description': 'GetCloudSpec constructs the ' - 'CloudSpec for a validated and ' - 'authorized model.', - 'properties': {'Params': {'$ref': '#/definitions/ModelTag'}, - 'Result': {'$ref': '#/definitions/CloudSpecResult'}}, - 'type': 'object'}, - 'GetExposeInfo': {'description': 'GetExposeInfo returns the ' - 'expose flag and per-endpoint ' - 'expose settings\n' - 'for the specified ' - 'applications.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ExposeInfoResults'}}, - 'type': 'object'}, - 'InstanceId': {'description': 'InstanceId returns the provider ' - 'specific instance id for each ' - 'given\n' - 'machine or an ' - 'CodeNotProvisioned error, if ' - 'not set.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/StringResults'}}, - 'type': 'object'}, - 'Life': {'description': 'Life returns the life status of every ' - 'supplied entity, where available.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/LifeResults'}}, - 'type': 'object'}, - 'MacaroonForRelations': {'description': 'MacaroonForRelations ' - 'returns the macaroon ' - 'for the specified ' - 'relations.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/MacaroonResults'}}, - 'type': 'object'}, - 'ModelConfig': {'description': 'ModelConfig returns the ' - "current model's configuration.", - 'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}}, - 'type': 'object'}, - 'ModelFirewallRules': {'description': 'ModelFirewallRules ' - 'returns the firewall ' - 'rules that this model ' - 'is\n' - 'configured to open', - 'properties': {'Result': {'$ref': '#/definitions/IngressRulesResult'}}, - 'type': 'object'}, - 'OpenedMachinePortRanges': {'description': 'OpenedMachinePortRanges ' - 'returns a list of ' - 'the opened port ' - 'ranges for the\n' - 'specified machines ' - 'where each result ' - 'is broken down by ' - 'unit. The list of\n' - 'opened ports for ' - 'each unit is ' - 'further grouped by ' - 'endpoint name and ' - 'includes\n' - 'the subnet CIDRs ' - 'that belong to the ' - 'space that each ' - 'endpoint is bound ' - 'to.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/OpenMachinePortRangesResults'}}, - 'type': 'object'}, - 'SetRelationsStatus': {'description': 'SetRelationsStatus sets ' - 'the status for the ' - 'specified relations.', - 'properties': {'Params': {'$ref': '#/definitions/SetStatus'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'SpaceInfos': {'description': 'SpaceInfos returns a ' - 'comprehensive representation of ' - 'either all spaces or\n' - 'a filtered subset of the known ' - 'spaces and their associated ' - 'subnet details.', - 'properties': {'Params': {'$ref': '#/definitions/SpaceInfosParams'}, - 'Result': {'$ref': '#/definitions/SpaceInfos'}}, - 'type': 'object'}, - 'Watch': {'description': 'Watch starts an NotifyWatcher for ' - 'each given entity.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/NotifyWatchResults'}}, - 'type': 'object'}, - 'WatchCloudSpecsChanges': {'description': 'WatchCloudSpecsChanges ' - 'returns a watcher ' - 'for cloud spec ' - 'changes.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/NotifyWatchResults'}}, - 'type': 'object'}, - 'WatchEgressAddressesForRelations': {'description': 'WatchEgressAddressesForRelations ' - 'creates a ' - 'watcher ' - 'that ' - 'notifies ' - 'when ' - 'addresses, ' - 'from ' - 'which\n' - 'connections ' - 'will ' - 'originate ' - 'for the ' - 'relation, ' - 'change.\n' - 'Each ' - 'event ' - 'contains ' - 'the ' - 'entire ' - 'set of ' - 'addresses ' - 'which are ' - 'required ' - 'for ' - 'ingress ' - 'for the ' - 'relation.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/StringsWatchResults'}}, - 'type': 'object'}, - 'WatchForModelConfigChanges': {'description': 'WatchForModelConfigChanges ' - 'returns a ' - 'NotifyWatcher ' - 'that observes\n' - 'changes to the ' - 'model ' - 'configuration.\n' - 'Note that ' - 'although the ' - 'NotifyWatchResult ' - 'contains an ' - 'Error field,\n' - "it's not used " - 'because we are ' - 'only returning ' - 'a single ' - 'watcher,\n' - 'so we use the ' - 'regular error ' - 'return.', - 'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}}, - 'type': 'object'}, - 'WatchIngressAddressesForRelations': {'description': 'WatchIngressAddressesForRelations ' - 'creates ' - 'a ' - 'watcher ' - 'that ' - 'returns ' - 'the ' - 'ingress ' - 'networks\n' - 'that ' - 'have ' - 'been ' - 'recorded ' - 'against ' - 'the ' - 'specified ' - 'relations.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/StringsWatchResults'}}, - 'type': 'object'}, - 'WatchModelFirewallRules': {'description': 'WatchModelFirewallRules ' - 'returns a ' - 'NotifyWatcher that ' - 'notifies of\n' - 'potential changes ' - "to a model's " - 'configured ' - 'firewall rules', - 'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}}, - 'type': 'object'}, - 'WatchModelMachineStartTimes': {'description': 'WatchModelMachineStartTimes ' - 'watches the ' - 'non-container ' - 'machines in ' - 'the model\n' - 'for changes to ' - 'the Life or ' - 'AgentStartTime ' - 'fields and ' - 'reports them ' - 'as a batch.', - 'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}}, - 'type': 'object'}, - 'WatchModelMachines': {'description': 'WatchModelMachines ' - 'returns a ' - 'StringsWatcher that ' - 'notifies of\n' - 'changes to the life ' - 'cycles of the top level ' - 'machines in the ' - 'current\n' - 'model.', - 'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}}, - 'type': 'object'}, - 'WatchOpenedPorts': {'description': 'WatchOpenedPorts returns ' - 'a new StringsWatcher for ' - 'each given\n' - 'model tag.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/StringsWatchResults'}}, - 'type': 'object'}, - 'WatchSubnets': {'description': 'WatchSubnets returns a new ' - 'StringsWatcher that watches ' - 'the specified\n' - 'subnet tags or all tags if no ' - 'entities are specified.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/StringsWatchResult'}}, - 'type': 'object'}, - 'WatchUnits': {'description': 'WatchUnits starts a ' - 'StringsWatcher to watch all ' - 'units belonging to\n' - 'to any entity (machine or ' - 'service) passed in args.', - 'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/StringsWatchResults'}}, - 'type': 'object'}}, - 'type': 'object'} - - - @ReturnMapping(BoolResults) - async def AreManuallyProvisioned(self, entities=None): - ''' - AreManuallyProvisioned returns whether each given entity is - manually provisioned or not. Only machine tags are accepted. - - entities : typing.Sequence[~Entity] - Returns -> BoolResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Firewaller', - request='AreManuallyProvisioned', - version=7, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(CloudSpecResults) - async def CloudSpec(self, entities=None): - ''' - CloudSpec returns the model's cloud spec. - - entities : typing.Sequence[~Entity] - Returns -> CloudSpecResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Firewaller', - request='CloudSpec', - version=7, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ControllerAPIInfoResults) - async def ControllerAPIInfoForModels(self, entities=None): - ''' - ControllerAPIInfoForModels returns the controller api connection details for the specified models. - - entities : typing.Sequence[~Entity] - Returns -> ControllerAPIInfoResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Firewaller', - request='ControllerAPIInfoForModels', - version=7, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ControllerConfigResult) - async def ControllerConfig(self): - ''' - ControllerConfig returns the controller's configuration. - - - Returns -> ControllerConfigResult - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='Firewaller', - request='ControllerConfig', - version=7, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringResults) - async def GetAssignedMachine(self, entities=None): - ''' - GetAssignedMachine returns the assigned machine tag (if any) for - each given unit. - - entities : typing.Sequence[~Entity] - Returns -> StringResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Firewaller', - request='GetAssignedMachine', - version=7, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(CloudSpecResult) - async def GetCloudSpec(self): - ''' - GetCloudSpec constructs the CloudSpec for a validated and authorized model. - - - Returns -> CloudSpecResult - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='Firewaller', - request='GetCloudSpec', - version=7, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ExposeInfoResults) - async def GetExposeInfo(self, entities=None): - ''' - GetExposeInfo returns the expose flag and per-endpoint expose settings - for the specified applications. - - entities : typing.Sequence[~Entity] - Returns -> ExposeInfoResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Firewaller', - request='GetExposeInfo', - version=7, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringResults) - async def InstanceId(self, entities=None): - ''' - InstanceId returns the provider specific instance id for each given - machine or an CodeNotProvisioned error, if not set. - - entities : typing.Sequence[~Entity] - Returns -> StringResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Firewaller', - request='InstanceId', - version=7, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(LifeResults) - async def Life(self, entities=None): - ''' - Life returns the life status of every supplied entity, where available. - - entities : typing.Sequence[~Entity] - Returns -> LifeResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Firewaller', - request='Life', - version=7, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(MacaroonResults) - async def MacaroonForRelations(self, entities=None): - ''' - MacaroonForRelations returns the macaroon for the specified relations. - - entities : typing.Sequence[~Entity] - Returns -> MacaroonResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Firewaller', - request='MacaroonForRelations', - version=7, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ModelConfigResult) - async def ModelConfig(self): - ''' - ModelConfig returns the current model's configuration. - - - Returns -> ModelConfigResult - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='Firewaller', - request='ModelConfig', - version=7, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(IngressRulesResult) - async def ModelFirewallRules(self): - ''' - ModelFirewallRules returns the firewall rules that this model is - configured to open - - - Returns -> IngressRulesResult - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='Firewaller', - request='ModelFirewallRules', - version=7, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(OpenMachinePortRangesResults) - async def OpenedMachinePortRanges(self, entities=None): - ''' - OpenedMachinePortRanges returns a list of the opened port ranges for the - specified machines where each result is broken down by unit. The list of - opened ports for each unit is further grouped by endpoint name and includes - the subnet CIDRs that belong to the space that each endpoint is bound to. - - entities : typing.Sequence[~Entity] - Returns -> OpenMachinePortRangesResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Firewaller', - request='OpenedMachinePortRanges', - version=7, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def SetRelationsStatus(self, entities=None): - ''' - SetRelationsStatus sets the status for the specified relations. - - entities : typing.Sequence[~EntityStatusArgs] - Returns -> ErrorResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Firewaller', - request='SetRelationsStatus', - version=7, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(SpaceInfos) - async def SpaceInfos(self, space_ids=None): - ''' - SpaceInfos returns a comprehensive representation of either all spaces or - a filtered subset of the known spaces and their associated subnet details. - - space_ids : typing.Sequence[str] - Returns -> SpaceInfos - ''' - if space_ids is not None and not isinstance(space_ids, (bytes, str, list)): - raise Exception("Expected space_ids to be a Sequence, received: {}".format(type(space_ids))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Firewaller', - request='SpaceInfos', - version=7, - params=_params) - _params['space-ids'] = space_ids - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(NotifyWatchResults) - async def Watch(self, entities=None): - ''' - Watch starts an NotifyWatcher for each given entity. - - entities : typing.Sequence[~Entity] - Returns -> NotifyWatchResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Firewaller', - request='Watch', - version=7, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(NotifyWatchResults) - async def WatchCloudSpecsChanges(self, entities=None): - ''' - WatchCloudSpecsChanges returns a watcher for cloud spec changes. - - entities : typing.Sequence[~Entity] - Returns -> NotifyWatchResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Firewaller', - request='WatchCloudSpecsChanges', - version=7, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringsWatchResults) - async def WatchEgressAddressesForRelations(self, entities=None): - ''' - WatchEgressAddressesForRelations creates a watcher that notifies when addresses, from which - connections will originate for the relation, change. - Each event contains the entire set of addresses which are required for ingress for the relation. - - entities : typing.Sequence[~Entity] - Returns -> StringsWatchResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Firewaller', - request='WatchEgressAddressesForRelations', - version=7, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(NotifyWatchResult) - async def WatchForModelConfigChanges(self): - ''' - WatchForModelConfigChanges returns a NotifyWatcher that observes - changes to the model configuration. - Note that although the NotifyWatchResult contains an Error field, - it's not used because we are only returning a single watcher, - so we use the regular error return. - - - Returns -> NotifyWatchResult - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='Firewaller', - request='WatchForModelConfigChanges', - version=7, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringsWatchResults) - async def WatchIngressAddressesForRelations(self, entities=None): - ''' - WatchIngressAddressesForRelations creates a watcher that returns the ingress networks - that have been recorded against the specified relations. - - entities : typing.Sequence[~Entity] - Returns -> StringsWatchResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Firewaller', - request='WatchIngressAddressesForRelations', - version=7, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(NotifyWatchResult) - async def WatchModelFirewallRules(self): - ''' - WatchModelFirewallRules returns a NotifyWatcher that notifies of - potential changes to a model's configured firewall rules - - - Returns -> NotifyWatchResult - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='Firewaller', - request='WatchModelFirewallRules', - version=7, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringsWatchResult) - async def WatchModelMachineStartTimes(self): - ''' - WatchModelMachineStartTimes watches the non-container machines in the model - for changes to the Life or AgentStartTime fields and reports them as a batch. - - - Returns -> StringsWatchResult - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='Firewaller', - request='WatchModelMachineStartTimes', - version=7, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringsWatchResult) - async def WatchModelMachines(self): - ''' - WatchModelMachines returns a StringsWatcher that notifies of - changes to the life cycles of the top level machines in the current - model. - - - Returns -> StringsWatchResult - ''' - - # map input types to rpc msg - _params = dict() - msg = dict(type='Firewaller', - request='WatchModelMachines', - version=7, - params=_params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringsWatchResults) - async def WatchOpenedPorts(self, entities=None): - ''' - WatchOpenedPorts returns a new StringsWatcher for each given - model tag. - - entities : typing.Sequence[~Entity] - Returns -> StringsWatchResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Firewaller', - request='WatchOpenedPorts', - version=7, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringsWatchResult) - async def WatchSubnets(self, entities=None): - ''' - WatchSubnets returns a new StringsWatcher that watches the specified - subnet tags or all tags if no entities are specified. - - entities : typing.Sequence[~Entity] - Returns -> StringsWatchResult - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Firewaller', - request='WatchSubnets', - version=7, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringsWatchResults) - async def WatchUnits(self, entities=None): - ''' - WatchUnits starts a StringsWatcher to watch all units belonging to - to any entity (machine or service) passed in args. - - entities : typing.Sequence[~Entity] - Returns -> StringsWatchResults - ''' - if entities is not None and not isinstance(entities, (bytes, str, list)): - raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) - - # map input types to rpc msg - _params = dict() - msg = dict(type='Firewaller', - request='WatchUnits', - version=7, - params=_params) - _params['entities'] = entities - reply = await self.rpc(msg) - return reply - - diff --git a/juju/client/_definitions.py b/juju/client/_definitions.py index 8fca18cf..18395bba 100644 --- a/juju/client/_definitions.py +++ b/juju/client/_definitions.py @@ -4,20 +4,32 @@ from juju.client.facade import Type, ReturnMapping -class APIHostPortsResult(Type): - _toSchema = {'servers': 'servers'} - _toPy = {'servers': 'servers'} - def __init__(self, servers=None, **unknown_fields): +class AccessInfo(Type): + _toSchema = {'role': 'role', 'scope_tag': 'scope-tag', 'target_tag': 'target-tag'} + _toPy = {'role': 'role', 'scope-tag': 'scope_tag', 'target-tag': 'target_tag'} + def __init__(self, role=None, scope_tag=None, target_tag=None, **unknown_fields): ''' - servers : typing.Sequence[~HostPort] + role : str + scope_tag : str + target_tag : str ''' - servers_ = [HostPort.from_json(o) for o in servers or []] + role_ = role + scope_tag_ = scope_tag + target_tag_ = target_tag # Validate arguments against known Juju API types. - if servers_ is not None and not isinstance(servers_, (bytes, str, list)): - raise Exception("Expected servers_ to be a Sequence, received: {}".format(type(servers_))) + if role_ is not None and not isinstance(role_, (bytes, str)): + raise Exception("Expected role_ to be a str, received: {}".format(type(role_))) - self.servers = servers_ + if scope_tag_ is not None and not isinstance(scope_tag_, (bytes, str)): + raise Exception("Expected scope_tag_ to be a str, received: {}".format(type(scope_tag_))) + + if target_tag_ is not None and not isinstance(target_tag_, (bytes, str)): + raise Exception("Expected target_tag_ to be a str, received: {}".format(type(target_tag_))) + + self.role = role_ + self.scope_tag = scope_tag_ + self.target_tag = target_tag_ self.unknown_fields = unknown_fields @@ -70,60 +82,6 @@ def __init__(self, execution_group=None, name=None, parallel=None, parameters=No -class ActionExecutionResult(Type): - _toSchema = {'action_tag': 'action-tag', 'message': 'message', 'results': 'results', 'status': 'status'} - _toPy = {'action-tag': 'action_tag', 'message': 'message', 'results': 'results', 'status': 'status'} - def __init__(self, action_tag=None, message=None, results=None, status=None, **unknown_fields): - ''' - action_tag : str - message : str - results : typing.Mapping[str, typing.Any] - status : str - ''' - action_tag_ = action_tag - message_ = message - results_ = results - status_ = status - - # Validate arguments against known Juju API types. - if action_tag_ is not None and not isinstance(action_tag_, (bytes, str)): - raise Exception("Expected action_tag_ to be a str, received: {}".format(type(action_tag_))) - - if message_ is not None and not isinstance(message_, (bytes, str)): - raise Exception("Expected message_ to be a str, received: {}".format(type(message_))) - - if results_ is not None and not isinstance(results_, dict): - raise Exception("Expected results_ to be a Mapping, received: {}".format(type(results_))) - - if status_ is not None and not isinstance(status_, (bytes, str)): - raise Exception("Expected status_ to be a str, received: {}".format(type(status_))) - - self.action_tag = action_tag_ - self.message = message_ - self.results = results_ - self.status = status_ - self.unknown_fields = unknown_fields - - - -class ActionExecutionResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None, **unknown_fields): - ''' - results : typing.Sequence[~ActionExecutionResult] - ''' - results_ = [ActionExecutionResult.from_json(o) for o in results or []] - - # Validate arguments against known Juju API types. - if results_ is not None and not isinstance(results_, (bytes, str, list)): - raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) - - self.results = results_ - self.unknown_fields = unknown_fields - - - class ActionMessage(Type): _toSchema = {'message': 'message', 'timestamp': 'timestamp'} _toPy = {'message': 'message', 'timestamp': 'timestamp'} @@ -148,48 +106,6 @@ def __init__(self, message=None, timestamp=None, **unknown_fields): -class ActionMessageParams(Type): - _toSchema = {'messages': 'messages'} - _toPy = {'messages': 'messages'} - def __init__(self, messages=None, **unknown_fields): - ''' - messages : typing.Sequence[~EntityString] - ''' - messages_ = [EntityString.from_json(o) for o in messages or []] - - # Validate arguments against known Juju API types. - if messages_ is not None and not isinstance(messages_, (bytes, str, list)): - raise Exception("Expected messages_ to be a Sequence, received: {}".format(type(messages_))) - - self.messages = messages_ - self.unknown_fields = unknown_fields - - - -class ActionPruneArgs(Type): - _toSchema = {'max_history_mb': 'max-history-mb', 'max_history_time': 'max-history-time'} - _toPy = {'max-history-mb': 'max_history_mb', 'max-history-time': 'max_history_time'} - def __init__(self, max_history_mb=None, max_history_time=None, **unknown_fields): - ''' - max_history_mb : int - max_history_time : int - ''' - max_history_mb_ = max_history_mb - max_history_time_ = max_history_time - - # Validate arguments against known Juju API types. - if max_history_mb_ is not None and not isinstance(max_history_mb_, int): - raise Exception("Expected max_history_mb_ to be a int, received: {}".format(type(max_history_mb_))) - - if max_history_time_ is not None and not isinstance(max_history_time_, int): - raise Exception("Expected max_history_time_ to be a int, received: {}".format(type(max_history_time_))) - - self.max_history_mb = max_history_mb_ - self.max_history_time = max_history_time_ - self.unknown_fields = unknown_fields - - - class ActionResult(Type): _toSchema = {'action': 'action', 'completed': 'completed', 'enqueued': 'enqueued', 'error': 'error', 'log': 'log', 'message': 'message', 'output': 'output', 'started': 'started', 'status': 'status'} _toPy = {'action': 'action', 'completed': 'completed', 'enqueued': 'enqueued', 'error': 'error', 'log': 'log', 'message': 'message', 'output': 'output', 'started': 'started', 'status': 'status'} @@ -316,102 +232,6 @@ def __init__(self, actions=None, **unknown_fields): -class ActionsByReceiver(Type): - _toSchema = {'actions': 'actions', 'error': 'error', 'receiver': 'receiver'} - _toPy = {'actions': 'actions', 'error': 'error', 'receiver': 'receiver'} - def __init__(self, actions=None, error=None, receiver=None, **unknown_fields): - ''' - actions : typing.Sequence[~ActionResult] - error : Error - receiver : str - ''' - actions_ = [ActionResult.from_json(o) for o in actions or []] - error_ = Error.from_json(error) if error else None - receiver_ = receiver - - # Validate arguments against known Juju API types. - if actions_ is not None and not isinstance(actions_, (bytes, str, list)): - raise Exception("Expected actions_ to be a Sequence, received: {}".format(type(actions_))) - - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - - if receiver_ is not None and not isinstance(receiver_, (bytes, str)): - raise Exception("Expected receiver_ to be a str, received: {}".format(type(receiver_))) - - self.actions = actions_ - self.error = error_ - self.receiver = receiver_ - self.unknown_fields = unknown_fields - - - -class ActionsByReceivers(Type): - _toSchema = {'actions': 'actions'} - _toPy = {'actions': 'actions'} - def __init__(self, actions=None, **unknown_fields): - ''' - actions : typing.Sequence[~ActionsByReceiver] - ''' - actions_ = [ActionsByReceiver.from_json(o) for o in actions or []] - - # Validate arguments against known Juju API types. - if actions_ is not None and not isinstance(actions_, (bytes, str, list)): - raise Exception("Expected actions_ to be a Sequence, received: {}".format(type(actions_))) - - self.actions = actions_ - self.unknown_fields = unknown_fields - - - -class ActivateModelArgs(Type): - _toSchema = {'controller_alias': 'controller-alias', 'controller_tag': 'controller-tag', 'cross_model_uuids': 'cross-model-uuids', 'model_tag': 'model-tag', 'source_api_addrs': 'source-api-addrs', 'source_ca_cert': 'source-ca-cert'} - _toPy = {'controller-alias': 'controller_alias', 'controller-tag': 'controller_tag', 'cross-model-uuids': 'cross_model_uuids', 'model-tag': 'model_tag', 'source-api-addrs': 'source_api_addrs', 'source-ca-cert': 'source_ca_cert'} - def __init__(self, controller_alias=None, controller_tag=None, cross_model_uuids=None, model_tag=None, source_api_addrs=None, source_ca_cert=None, **unknown_fields): - ''' - controller_alias : str - controller_tag : str - cross_model_uuids : typing.Sequence[str] - model_tag : str - source_api_addrs : typing.Sequence[str] - source_ca_cert : str - ''' - controller_alias_ = controller_alias - controller_tag_ = controller_tag - cross_model_uuids_ = cross_model_uuids - model_tag_ = model_tag - source_api_addrs_ = source_api_addrs - source_ca_cert_ = source_ca_cert - - # Validate arguments against known Juju API types. - if controller_alias_ is not None and not isinstance(controller_alias_, (bytes, str)): - raise Exception("Expected controller_alias_ to be a str, received: {}".format(type(controller_alias_))) - - if controller_tag_ is not None and not isinstance(controller_tag_, (bytes, str)): - raise Exception("Expected controller_tag_ to be a str, received: {}".format(type(controller_tag_))) - - if cross_model_uuids_ is not None and not isinstance(cross_model_uuids_, (bytes, str, list)): - raise Exception("Expected cross_model_uuids_ to be a Sequence, received: {}".format(type(cross_model_uuids_))) - - if model_tag_ is not None and not isinstance(model_tag_, (bytes, str)): - raise Exception("Expected model_tag_ to be a str, received: {}".format(type(model_tag_))) - - if source_api_addrs_ is not None and not isinstance(source_api_addrs_, (bytes, str, list)): - raise Exception("Expected source_api_addrs_ to be a Sequence, received: {}".format(type(source_api_addrs_))) - - if source_ca_cert_ is not None and not isinstance(source_ca_cert_, (bytes, str)): - raise Exception("Expected source_ca_cert_ to be a str, received: {}".format(type(source_ca_cert_))) - - self.controller_alias = controller_alias_ - self.controller_tag = controller_tag_ - self.cross_model_uuids = cross_model_uuids_ - self.model_tag = model_tag_ - self.source_api_addrs = source_api_addrs_ - self.source_ca_cert = source_ca_cert_ - self.unknown_fields = unknown_fields - - - class AddApplicationOffer(Type): _toSchema = {'application_description': 'application-description', 'application_name': 'application-name', 'endpoints': 'endpoints', 'model_tag': 'model-tag', 'offer_name': 'offer-name', 'owner_tag': 'owner-tag'} _toPy = {'application-description': 'application_description', 'application-name': 'application_name', 'endpoints': 'endpoints', 'model-tag': 'model_tag', 'offer-name': 'offer_name', 'owner-tag': 'owner_tag'} @@ -1138,84 +958,6 @@ def __init__(self, cidr=None, config_type=None, is_secondary=None, scope=None, s -class AdoptResourcesArgs(Type): - _toSchema = {'model_tag': 'model-tag', 'source_controller_version': 'source-controller-version'} - _toPy = {'model-tag': 'model_tag', 'source-controller-version': 'source_controller_version'} - def __init__(self, model_tag=None, source_controller_version=None, **unknown_fields): - ''' - model_tag : str - source_controller_version : Number - ''' - model_tag_ = model_tag - source_controller_version_ = Number.from_json(source_controller_version) if source_controller_version else None - - # Validate arguments against known Juju API types. - if model_tag_ is not None and not isinstance(model_tag_, (bytes, str)): - raise Exception("Expected model_tag_ to be a str, received: {}".format(type(model_tag_))) - - if source_controller_version_ is not None and not isinstance(source_controller_version_, (dict, Number)): - raise Exception("Expected source_controller_version_ to be a Number, received: {}".format(type(source_controller_version_))) - - self.model_tag = model_tag_ - self.source_controller_version = source_controller_version_ - self.unknown_fields = unknown_fields - - - -class AgentGetEntitiesResult(Type): - _toSchema = {'container_type': 'container-type', 'error': 'error', 'jobs': 'jobs', 'life': 'life'} - _toPy = {'container-type': 'container_type', 'error': 'error', 'jobs': 'jobs', 'life': 'life'} - def __init__(self, container_type=None, error=None, jobs=None, life=None, **unknown_fields): - ''' - container_type : str - error : Error - jobs : typing.Sequence[str] - life : str - ''' - container_type_ = container_type - error_ = Error.from_json(error) if error else None - jobs_ = jobs - life_ = life - - # Validate arguments against known Juju API types. - if container_type_ is not None and not isinstance(container_type_, (bytes, str)): - raise Exception("Expected container_type_ to be a str, received: {}".format(type(container_type_))) - - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - - if jobs_ is not None and not isinstance(jobs_, (bytes, str, list)): - raise Exception("Expected jobs_ to be a Sequence, received: {}".format(type(jobs_))) - - if life_ is not None and not isinstance(life_, (bytes, str)): - raise Exception("Expected life_ to be a str, received: {}".format(type(life_))) - - self.container_type = container_type_ - self.error = error_ - self.jobs = jobs_ - self.life = life_ - self.unknown_fields = unknown_fields - - - -class AgentGetEntitiesResults(Type): - _toSchema = {'entities': 'entities'} - _toPy = {'entities': 'entities'} - def __init__(self, entities=None, **unknown_fields): - ''' - entities : typing.Sequence[~AgentGetEntitiesResult] - ''' - entities_ = [AgentGetEntitiesResult.from_json(o) for o in entities or []] - - # Validate arguments against known Juju API types. - if entities_ is not None and not isinstance(entities_, (bytes, str, list)): - raise Exception("Expected entities_ to be a Sequence, received: {}".format(type(entities_))) - - self.entities = entities_ - self.unknown_fields = unknown_fields - - - class AllWatcherId(Type): _toSchema = {'watcher_id': 'watcher-id'} _toPy = {'watcher-id': 'watcher_id'} @@ -1318,48 +1060,6 @@ def __init__(self, annotations=None, **unknown_fields): -class ApplicationCharm(Type): - _toSchema = {'charm_modified_version': 'charm-modified-version', 'deployment_mode': 'deployment-mode', 'force_upgrade': 'force-upgrade', 'sha256': 'sha256', 'url': 'url'} - _toPy = {'charm-modified-version': 'charm_modified_version', 'deployment-mode': 'deployment_mode', 'force-upgrade': 'force_upgrade', 'sha256': 'sha256', 'url': 'url'} - def __init__(self, charm_modified_version=None, deployment_mode=None, force_upgrade=None, sha256=None, url=None, **unknown_fields): - ''' - charm_modified_version : int - deployment_mode : str - force_upgrade : bool - sha256 : str - url : str - ''' - charm_modified_version_ = charm_modified_version - deployment_mode_ = deployment_mode - force_upgrade_ = force_upgrade - sha256_ = sha256 - url_ = url - - # Validate arguments against known Juju API types. - if charm_modified_version_ is not None and not isinstance(charm_modified_version_, int): - raise Exception("Expected charm_modified_version_ to be a int, received: {}".format(type(charm_modified_version_))) - - if deployment_mode_ is not None and not isinstance(deployment_mode_, (bytes, str)): - raise Exception("Expected deployment_mode_ to be a str, received: {}".format(type(deployment_mode_))) - - if force_upgrade_ is not None and not isinstance(force_upgrade_, bool): - raise Exception("Expected force_upgrade_ to be a bool, received: {}".format(type(force_upgrade_))) - - if sha256_ is not None and not isinstance(sha256_, (bytes, str)): - raise Exception("Expected sha256_ to be a str, received: {}".format(type(sha256_))) - - if url_ is not None and not isinstance(url_, (bytes, str)): - raise Exception("Expected url_ to be a str, received: {}".format(type(url_))) - - self.charm_modified_version = charm_modified_version_ - self.deployment_mode = deployment_mode_ - self.force_upgrade = force_upgrade_ - self.sha256 = sha256_ - self.url = url_ - self.unknown_fields = unknown_fields - - - class ApplicationCharmActionsResult(Type): _toSchema = {'actions': 'actions', 'application_tag': 'application-tag', 'error': 'error'} _toPy = {'actions': 'actions', 'application-tag': 'application_tag', 'error': 'error'} @@ -1468,70 +1168,28 @@ def __init__(self, charm_relations=None, **unknown_fields): -class ApplicationCharmResult(Type): - _toSchema = {'error': 'error', 'result': 'result'} - _toPy = {'error': 'error', 'result': 'result'} - def __init__(self, error=None, result=None, **unknown_fields): +class ApplicationConfigUnsetArgs(Type): + _toSchema = {'args': 'Args'} + _toPy = {'Args': 'args'} + def __init__(self, args=None, **unknown_fields): ''' - error : Error - result : ApplicationCharm + args : typing.Sequence[~ApplicationUnset] ''' - error_ = Error.from_json(error) if error else None - result_ = ApplicationCharm.from_json(result) if result else None + args_ = [ApplicationUnset.from_json(o) for o in args or []] # Validate arguments against known Juju API types. - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - - if result_ is not None and not isinstance(result_, (dict, ApplicationCharm)): - raise Exception("Expected result_ to be a ApplicationCharm, received: {}".format(type(result_))) + if args_ is not None and not isinstance(args_, (bytes, str, list)): + raise Exception("Expected args_ to be a Sequence, received: {}".format(type(args_))) - self.error = error_ - self.result = result_ + self.args = args_ self.unknown_fields = unknown_fields -class ApplicationCharmResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None, **unknown_fields): - ''' - results : typing.Sequence[~ApplicationCharmResult] - ''' - results_ = [ApplicationCharmResult.from_json(o) for o in results or []] - - # Validate arguments against known Juju API types. - if results_ is not None and not isinstance(results_, (bytes, str, list)): - raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) - - self.results = results_ - self.unknown_fields = unknown_fields - - - -class ApplicationConfigUnsetArgs(Type): - _toSchema = {'args': 'Args'} - _toPy = {'Args': 'args'} - def __init__(self, args=None, **unknown_fields): - ''' - args : typing.Sequence[~ApplicationUnset] - ''' - args_ = [ApplicationUnset.from_json(o) for o in args or []] - - # Validate arguments against known Juju API types. - if args_ is not None and not isinstance(args_, (bytes, str, list)): - raise Exception("Expected args_ to be a Sequence, received: {}".format(type(args_))) - - self.args = args_ - self.unknown_fields = unknown_fields - - - -class ApplicationConstraint(Type): - _toSchema = {'constraints': 'constraints', 'error': 'error'} - _toPy = {'constraints': 'constraints', 'error': 'error'} - def __init__(self, constraints=None, error=None, **unknown_fields): +class ApplicationConstraint(Type): + _toSchema = {'constraints': 'constraints', 'error': 'error'} + _toPy = {'constraints': 'constraints', 'error': 'error'} + def __init__(self, constraints=None, error=None, **unknown_fields): ''' constraints : Value error : Error @@ -2206,72 +1864,6 @@ def __init__(self, results=None, **unknown_fields): -class ApplicationOpenedPorts(Type): - _toSchema = {'endpoint': 'endpoint', 'port_ranges': 'port-ranges'} - _toPy = {'endpoint': 'endpoint', 'port-ranges': 'port_ranges'} - def __init__(self, endpoint=None, port_ranges=None, **unknown_fields): - ''' - endpoint : str - port_ranges : typing.Sequence[~PortRange] - ''' - endpoint_ = endpoint - port_ranges_ = [PortRange.from_json(o) for o in port_ranges or []] - - # Validate arguments against known Juju API types. - if endpoint_ is not None and not isinstance(endpoint_, (bytes, str)): - raise Exception("Expected endpoint_ to be a str, received: {}".format(type(endpoint_))) - - if port_ranges_ is not None and not isinstance(port_ranges_, (bytes, str, list)): - raise Exception("Expected port_ranges_ to be a Sequence, received: {}".format(type(port_ranges_))) - - self.endpoint = endpoint_ - self.port_ranges = port_ranges_ - self.unknown_fields = unknown_fields - - - -class ApplicationOpenedPortsResult(Type): - _toSchema = {'application_port_ranges': 'application-port-ranges', 'error': 'error'} - _toPy = {'application-port-ranges': 'application_port_ranges', 'error': 'error'} - def __init__(self, application_port_ranges=None, error=None, **unknown_fields): - ''' - application_port_ranges : typing.Sequence[~ApplicationOpenedPorts] - error : Error - ''' - application_port_ranges_ = [ApplicationOpenedPorts.from_json(o) for o in application_port_ranges or []] - error_ = Error.from_json(error) if error else None - - # Validate arguments against known Juju API types. - if application_port_ranges_ is not None and not isinstance(application_port_ranges_, (bytes, str, list)): - raise Exception("Expected application_port_ranges_ to be a Sequence, received: {}".format(type(application_port_ranges_))) - - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - - self.application_port_ranges = application_port_ranges_ - self.error = error_ - self.unknown_fields = unknown_fields - - - -class ApplicationOpenedPortsResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None, **unknown_fields): - ''' - results : typing.Sequence[~ApplicationOpenedPortsResult] - ''' - results_ = [ApplicationOpenedPortsResult.from_json(o) for o in results or []] - - # Validate arguments against known Juju API types. - if results_ is not None and not isinstance(results_, (bytes, str, list)): - raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) - - self.results = results_ - self.unknown_fields = unknown_fields - - - class ApplicationResult(Type): _toSchema = {'base': 'base', 'channel': 'channel', 'charm': 'charm', 'constraints': 'constraints', 'endpoint_bindings': 'endpoint-bindings', 'exposed': 'exposed', 'exposed_endpoints': 'exposed-endpoints', 'life': 'life', 'principal': 'principal', 'remote': 'remote', 'tag': 'tag'} _toPy = {'base': 'base', 'channel': 'channel', 'charm': 'charm', 'constraints': 'constraints', 'endpoint-bindings': 'endpoint_bindings', 'exposed': 'exposed', 'exposed-endpoints': 'exposed_endpoints', 'life': 'life', 'principal': 'principal', 'remote': 'remote', 'tag': 'tag'} @@ -2572,72 +2164,6 @@ def __init__(self, base=None, can_upgrade_to=None, charm=None, charm_channel=Non -class ApplicationStatusResult(Type): - _toSchema = {'application': 'application', 'error': 'error', 'units': 'units'} - _toPy = {'application': 'application', 'error': 'error', 'units': 'units'} - def __init__(self, application=None, error=None, units=None, **unknown_fields): - ''' - application : StatusResult - error : Error - units : typing.Mapping[str, ~StatusResult] - ''' - application_ = StatusResult.from_json(application) if application else None - error_ = Error.from_json(error) if error else None - units_ = {k: StatusResult.from_json(v) for k, v in (units or dict()).items()} - - # Validate arguments against known Juju API types. - if application_ is not None and not isinstance(application_, (dict, StatusResult)): - raise Exception("Expected application_ to be a StatusResult, received: {}".format(type(application_))) - - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - - if units_ is not None and not isinstance(units_, dict): - raise Exception("Expected units_ to be a Mapping, received: {}".format(type(units_))) - - self.application = application_ - self.error = error_ - self.units = units_ - self.unknown_fields = unknown_fields - - - -class ApplicationStatusResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None, **unknown_fields): - ''' - results : typing.Sequence[~ApplicationStatusResult] - ''' - results_ = [ApplicationStatusResult.from_json(o) for o in results or []] - - # Validate arguments against known Juju API types. - if results_ is not None and not isinstance(results_, (bytes, str, list)): - raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) - - self.results = results_ - self.unknown_fields = unknown_fields - - - -class ApplicationTag(Type): - _toSchema = {'name': 'Name'} - _toPy = {'Name': 'name'} - def __init__(self, name=None, **unknown_fields): - ''' - name : str - ''' - name_ = name - - # Validate arguments against known Juju API types. - if name_ is not None and not isinstance(name_, (bytes, str)): - raise Exception("Expected name_ to be a str, received: {}".format(type(name_))) - - self.name = name_ - self.unknown_fields = unknown_fields - - - class ApplicationUnexpose(Type): _toSchema = {'application': 'application', 'exposed_endpoints': 'exposed-endpoints'} _toPy = {'application': 'application', 'exposed-endpoints': 'exposed_endpoints'} @@ -2662,96 +2188,6 @@ def __init__(self, application=None, exposed_endpoints=None, **unknown_fields): -class ApplicationUnitInfo(Type): - _toSchema = {'provider_id': 'provider-id', 'unit_tag': 'unit-tag'} - _toPy = {'provider-id': 'provider_id', 'unit-tag': 'unit_tag'} - def __init__(self, provider_id=None, unit_tag=None, **unknown_fields): - ''' - provider_id : str - unit_tag : str - ''' - provider_id_ = provider_id - unit_tag_ = unit_tag - - # Validate arguments against known Juju API types. - if provider_id_ is not None and not isinstance(provider_id_, (bytes, str)): - raise Exception("Expected provider_id_ to be a str, received: {}".format(type(provider_id_))) - - if unit_tag_ is not None and not isinstance(unit_tag_, (bytes, str)): - raise Exception("Expected unit_tag_ to be a str, received: {}".format(type(unit_tag_))) - - self.provider_id = provider_id_ - self.unit_tag = unit_tag_ - self.unknown_fields = unknown_fields - - - -class ApplicationUnitParams(Type): - _toSchema = {'address': 'address', 'data': 'data', 'filesystem_info': 'filesystem-info', 'info': 'info', 'ports': 'ports', 'provider_id': 'provider-id', 'stateful': 'stateful', 'status': 'status', 'unit_tag': 'unit-tag'} - _toPy = {'address': 'address', 'data': 'data', 'filesystem-info': 'filesystem_info', 'info': 'info', 'ports': 'ports', 'provider-id': 'provider_id', 'stateful': 'stateful', 'status': 'status', 'unit-tag': 'unit_tag'} - def __init__(self, address=None, data=None, filesystem_info=None, info=None, ports=None, provider_id=None, stateful=None, status=None, unit_tag=None, **unknown_fields): - ''' - address : str - data : typing.Mapping[str, typing.Any] - filesystem_info : typing.Sequence[~KubernetesFilesystemInfo] - info : str - ports : typing.Sequence[str] - provider_id : str - stateful : bool - status : str - unit_tag : str - ''' - address_ = address - data_ = data - filesystem_info_ = [KubernetesFilesystemInfo.from_json(o) for o in filesystem_info or []] - info_ = info - ports_ = ports - provider_id_ = provider_id - stateful_ = stateful - status_ = status - unit_tag_ = unit_tag - - # Validate arguments against known Juju API types. - if address_ is not None and not isinstance(address_, (bytes, str)): - raise Exception("Expected address_ to be a str, received: {}".format(type(address_))) - - if data_ is not None and not isinstance(data_, dict): - raise Exception("Expected data_ to be a Mapping, received: {}".format(type(data_))) - - if filesystem_info_ is not None and not isinstance(filesystem_info_, (bytes, str, list)): - raise Exception("Expected filesystem_info_ to be a Sequence, received: {}".format(type(filesystem_info_))) - - if info_ is not None and not isinstance(info_, (bytes, str)): - raise Exception("Expected info_ to be a str, received: {}".format(type(info_))) - - if ports_ is not None and not isinstance(ports_, (bytes, str, list)): - raise Exception("Expected ports_ to be a Sequence, received: {}".format(type(ports_))) - - if provider_id_ is not None and not isinstance(provider_id_, (bytes, str)): - raise Exception("Expected provider_id_ to be a str, received: {}".format(type(provider_id_))) - - if stateful_ is not None and not isinstance(stateful_, bool): - raise Exception("Expected stateful_ to be a bool, received: {}".format(type(stateful_))) - - if status_ is not None and not isinstance(status_, (bytes, str)): - raise Exception("Expected status_ to be a str, received: {}".format(type(status_))) - - if unit_tag_ is not None and not isinstance(unit_tag_, (bytes, str)): - raise Exception("Expected unit_tag_ to be a str, received: {}".format(type(unit_tag_))) - - self.address = address_ - self.data = data_ - self.filesystem_info = filesystem_info_ - self.info = info_ - self.ports = ports_ - self.provider_id = provider_id_ - self.stateful = stateful_ - self.status = status_ - self.unit_tag = unit_tag_ - self.unknown_fields = unknown_fields - - - class ApplicationUnset(Type): _toSchema = {'application': 'application', 'branch': 'branch', 'options': 'options'} _toPy = {'application': 'application', 'branch': 'branch', 'options': 'options'} @@ -3136,107 +2572,23 @@ def __init__(self, id_=None, message=None, tag=None, type_=None, **unknown_field -class BlockDevice(Type): - _toSchema = {'busaddress': 'BusAddress', 'devicelinks': 'DeviceLinks', 'devicename': 'DeviceName', 'filesystemtype': 'FilesystemType', 'hardwareid': 'HardwareId', 'inuse': 'InUse', 'label': 'Label', 'mountpoint': 'MountPoint', 'serialid': 'SerialId', 'size': 'Size', 'uuid': 'UUID', 'wwn': 'WWN'} - _toPy = {'BusAddress': 'busaddress', 'DeviceLinks': 'devicelinks', 'DeviceName': 'devicename', 'FilesystemType': 'filesystemtype', 'HardwareId': 'hardwareid', 'InUse': 'inuse', 'Label': 'label', 'MountPoint': 'mountpoint', 'SerialId': 'serialid', 'Size': 'size', 'UUID': 'uuid', 'WWN': 'wwn'} - def __init__(self, busaddress=None, devicelinks=None, devicename=None, filesystemtype=None, hardwareid=None, inuse=None, label=None, mountpoint=None, serialid=None, size=None, uuid=None, wwn=None, **unknown_fields): - ''' - busaddress : str - devicelinks : typing.Sequence[str] - devicename : str - filesystemtype : str - hardwareid : str - inuse : bool - label : str - mountpoint : str - serialid : str - size : int - uuid : str - wwn : str - ''' - busaddress_ = busaddress - devicelinks_ = devicelinks - devicename_ = devicename - filesystemtype_ = filesystemtype - hardwareid_ = hardwareid - inuse_ = inuse - label_ = label - mountpoint_ = mountpoint - serialid_ = serialid - size_ = size - uuid_ = uuid - wwn_ = wwn - - # Validate arguments against known Juju API types. - if busaddress_ is not None and not isinstance(busaddress_, (bytes, str)): - raise Exception("Expected busaddress_ to be a str, received: {}".format(type(busaddress_))) - - if devicelinks_ is not None and not isinstance(devicelinks_, (bytes, str, list)): - raise Exception("Expected devicelinks_ to be a Sequence, received: {}".format(type(devicelinks_))) - - if devicename_ is not None and not isinstance(devicename_, (bytes, str)): - raise Exception("Expected devicename_ to be a str, received: {}".format(type(devicename_))) - - if filesystemtype_ is not None and not isinstance(filesystemtype_, (bytes, str)): - raise Exception("Expected filesystemtype_ to be a str, received: {}".format(type(filesystemtype_))) - - if hardwareid_ is not None and not isinstance(hardwareid_, (bytes, str)): - raise Exception("Expected hardwareid_ to be a str, received: {}".format(type(hardwareid_))) - - if inuse_ is not None and not isinstance(inuse_, bool): - raise Exception("Expected inuse_ to be a bool, received: {}".format(type(inuse_))) - - if label_ is not None and not isinstance(label_, (bytes, str)): - raise Exception("Expected label_ to be a str, received: {}".format(type(label_))) - - if mountpoint_ is not None and not isinstance(mountpoint_, (bytes, str)): - raise Exception("Expected mountpoint_ to be a str, received: {}".format(type(mountpoint_))) - - if serialid_ is not None and not isinstance(serialid_, (bytes, str)): - raise Exception("Expected serialid_ to be a str, received: {}".format(type(serialid_))) - - if size_ is not None and not isinstance(size_, int): - raise Exception("Expected size_ to be a int, received: {}".format(type(size_))) - - if uuid_ is not None and not isinstance(uuid_, (bytes, str)): - raise Exception("Expected uuid_ to be a str, received: {}".format(type(uuid_))) - - if wwn_ is not None and not isinstance(wwn_, (bytes, str)): - raise Exception("Expected wwn_ to be a str, received: {}".format(type(wwn_))) - - 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.serialid = serialid_ - self.size = size_ - self.uuid = uuid_ - self.wwn = wwn_ - self.unknown_fields = unknown_fields - - - -class BlockDeviceResult(Type): +class BlockResult(Type): _toSchema = {'error': 'error', 'result': 'result'} _toPy = {'error': 'error', 'result': 'result'} def __init__(self, error=None, result=None, **unknown_fields): ''' error : Error - result : BlockDevice + result : Block ''' error_ = Error.from_json(error) if error else None - result_ = BlockDevice.from_json(result) if result else None + result_ = Block.from_json(result) if result else None # Validate arguments against known Juju API types. if error_ is not None and not isinstance(error_, (dict, Error)): raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - if result_ is not None and not isinstance(result_, (dict, BlockDevice)): - raise Exception("Expected result_ to be a BlockDevice, received: {}".format(type(result_))) + if result_ is not None and not isinstance(result_, (dict, Block)): + raise Exception("Expected result_ to be a Block, received: {}".format(type(result_))) self.error = error_ self.result = result_ @@ -3244,14 +2596,14 @@ def __init__(self, error=None, result=None, **unknown_fields): -class BlockDeviceResults(Type): +class BlockResults(Type): _toSchema = {'results': 'results'} _toPy = {'results': 'results'} def __init__(self, results=None, **unknown_fields): ''' - results : typing.Sequence[~BlockDeviceResult] + results : typing.Sequence[~BlockResult] ''' - results_ = [BlockDeviceResult.from_json(o) for o in results or []] + results_ = [BlockResult.from_json(o) for o in results or []] # Validate arguments against known Juju API types. if results_ is not None and not isinstance(results_, (bytes, str, list)): @@ -3262,55 +2614,13 @@ def __init__(self, results=None, **unknown_fields): -class BlockResult(Type): - _toSchema = {'error': 'error', 'result': 'result'} - _toPy = {'error': 'error', 'result': 'result'} - def __init__(self, error=None, result=None, **unknown_fields): +class BlockSwitchParams(Type): + _toSchema = {'message': 'message', 'type_': 'type'} + _toPy = {'message': 'message', 'type': 'type_'} + def __init__(self, message=None, type_=None, **unknown_fields): ''' - error : Error - result : Block - ''' - error_ = Error.from_json(error) if error else None - result_ = Block.from_json(result) if result else None - - # Validate arguments against known Juju API types. - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - - if result_ is not None and not isinstance(result_, (dict, Block)): - raise Exception("Expected result_ to be a Block, received: {}".format(type(result_))) - - self.error = error_ - self.result = result_ - self.unknown_fields = unknown_fields - - - -class BlockResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None, **unknown_fields): - ''' - results : typing.Sequence[~BlockResult] - ''' - results_ = [BlockResult.from_json(o) for o in results or []] - - # Validate arguments against known Juju API types. - if results_ is not None and not isinstance(results_, (bytes, str, list)): - raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) - - self.results = results_ - self.unknown_fields = unknown_fields - - - -class BlockSwitchParams(Type): - _toSchema = {'message': 'message', 'type_': 'type'} - _toPy = {'message': 'message', 'type': 'type_'} - def __init__(self, message=None, type_=None, **unknown_fields): - ''' - message : str - type_ : str + message : str + type_ : str ''' message_ = message type__ = type_ @@ -3352,24 +2662,6 @@ def __init__(self, error=None, result=None, **unknown_fields): -class BoolResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None, **unknown_fields): - ''' - results : typing.Sequence[~BoolResult] - ''' - results_ = [BoolResult.from_json(o) for o in results or []] - - # Validate arguments against known Juju API types. - if results_ is not None and not isinstance(results_, (bytes, str, list)): - raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) - - self.results = results_ - self.unknown_fields = unknown_fields - - - class BranchArg(Type): _toSchema = {'branch': 'branch'} _toPy = {'branch': 'branch'} @@ -3658,1279 +2950,1113 @@ def __init__(self, changes=None, errors=None, **unknown_fields): -class BytesResult(Type): - _toSchema = {'result': 'result'} - _toPy = {'result': 'result'} - def __init__(self, result=None, **unknown_fields): +class CIDRParams(Type): + _toSchema = {'cidrs': 'cidrs'} + _toPy = {'cidrs': 'cidrs'} + def __init__(self, cidrs=None, **unknown_fields): ''' - result : typing.Sequence[int] + cidrs : typing.Sequence[str] ''' - result_ = result + cidrs_ = cidrs # Validate arguments against known Juju API types. - if result_ is not None and not isinstance(result_, (bytes, str, list)): - raise Exception("Expected result_ to be a Sequence, received: {}".format(type(result_))) + if cidrs_ is not None and not isinstance(cidrs_, (bytes, str, list)): + raise Exception("Expected cidrs_ to be a Sequence, received: {}".format(type(cidrs_))) - self.result = result_ + self.cidrs = cidrs_ self.unknown_fields = unknown_fields -class CAASApplicationGarbageCollectArg(Type): - _toSchema = {'active_pod_names': 'active-pod-names', 'application': 'application', 'desired_replicas': 'desired-replicas', 'force': 'force', 'observed_units': 'observed-units'} - _toPy = {'active-pod-names': 'active_pod_names', 'application': 'application', 'desired-replicas': 'desired_replicas', 'force': 'force', 'observed-units': 'observed_units'} - def __init__(self, active_pod_names=None, application=None, desired_replicas=None, force=None, observed_units=None, **unknown_fields): +class ChangeModelCredentialParams(Type): + _toSchema = {'credential_tag': 'credential-tag', 'model_tag': 'model-tag'} + _toPy = {'credential-tag': 'credential_tag', 'model-tag': 'model_tag'} + def __init__(self, credential_tag=None, model_tag=None, **unknown_fields): ''' - active_pod_names : typing.Sequence[str] - application : Entity - desired_replicas : int - force : bool - observed_units : Entities + credential_tag : str + model_tag : str ''' - active_pod_names_ = active_pod_names - application_ = Entity.from_json(application) if application else None - desired_replicas_ = desired_replicas - force_ = force - observed_units_ = Entities.from_json(observed_units) if observed_units else None + credential_tag_ = credential_tag + model_tag_ = model_tag # Validate arguments against known Juju API types. - if active_pod_names_ is not None and not isinstance(active_pod_names_, (bytes, str, list)): - raise Exception("Expected active_pod_names_ to be a Sequence, received: {}".format(type(active_pod_names_))) - - if application_ is not None and not isinstance(application_, (dict, Entity)): - raise Exception("Expected application_ to be a Entity, received: {}".format(type(application_))) - - if desired_replicas_ is not None and not isinstance(desired_replicas_, int): - raise Exception("Expected desired_replicas_ to be a int, received: {}".format(type(desired_replicas_))) - - if force_ is not None and not isinstance(force_, bool): - raise Exception("Expected force_ to be a bool, received: {}".format(type(force_))) + if credential_tag_ is not None and not isinstance(credential_tag_, (bytes, str)): + raise Exception("Expected credential_tag_ to be a str, received: {}".format(type(credential_tag_))) - if observed_units_ is not None and not isinstance(observed_units_, (dict, Entities)): - raise Exception("Expected observed_units_ to be a Entities, received: {}".format(type(observed_units_))) + if model_tag_ is not None and not isinstance(model_tag_, (bytes, str)): + raise Exception("Expected model_tag_ to be a str, received: {}".format(type(model_tag_))) - self.active_pod_names = active_pod_names_ - self.application = application_ - self.desired_replicas = desired_replicas_ - self.force = force_ - self.observed_units = observed_units_ + self.credential_tag = credential_tag_ + self.model_tag = model_tag_ self.unknown_fields = unknown_fields -class CAASApplicationGarbageCollectArgs(Type): - _toSchema = {'args': 'args'} - _toPy = {'args': 'args'} - def __init__(self, args=None, **unknown_fields): +class ChangeModelCredentialsParams(Type): + _toSchema = {'model_credentials': 'model-credentials'} + _toPy = {'model-credentials': 'model_credentials'} + def __init__(self, model_credentials=None, **unknown_fields): ''' - args : typing.Sequence[~CAASApplicationGarbageCollectArg] + model_credentials : typing.Sequence[~ChangeModelCredentialParams] ''' - args_ = [CAASApplicationGarbageCollectArg.from_json(o) for o in args or []] + model_credentials_ = [ChangeModelCredentialParams.from_json(o) for o in model_credentials or []] # Validate arguments against known Juju API types. - if args_ is not None and not isinstance(args_, (bytes, str, list)): - raise Exception("Expected args_ to be a Sequence, received: {}".format(type(args_))) + if model_credentials_ is not None and not isinstance(model_credentials_, (bytes, str, list)): + raise Exception("Expected model_credentials_ to be a Sequence, received: {}".format(type(model_credentials_))) - self.args = args_ + self.model_credentials = model_credentials_ self.unknown_fields = unknown_fields -class CAASApplicationOCIResourceResult(Type): - _toSchema = {'error': 'error', 'result': 'result'} - _toPy = {'error': 'error', 'result': 'result'} - def __init__(self, error=None, result=None, **unknown_fields): +class Charm(Type): + _toSchema = {'actions': 'actions', 'config': 'config', 'lxd_profile': 'lxd-profile', 'manifest': 'manifest', 'meta': 'meta', 'metrics': 'metrics', 'revision': 'revision', 'url': 'url'} + _toPy = {'actions': 'actions', 'config': 'config', 'lxd-profile': 'lxd_profile', 'manifest': 'manifest', 'meta': 'meta', 'metrics': 'metrics', 'revision': 'revision', 'url': 'url'} + def __init__(self, actions=None, config=None, lxd_profile=None, manifest=None, meta=None, metrics=None, revision=None, url=None, **unknown_fields): ''' - error : Error - result : CAASApplicationOCIResources + actions : CharmActions + config : typing.Mapping[str, ~CharmOption] + lxd_profile : CharmLXDProfile + manifest : CharmManifest + meta : CharmMeta + metrics : CharmMetrics + revision : int + url : str ''' - error_ = Error.from_json(error) if error else None - result_ = CAASApplicationOCIResources.from_json(result) if result else None + actions_ = CharmActions.from_json(actions) if actions else None + config_ = {k: CharmOption.from_json(v) for k, v in (config or dict()).items()} + lxd_profile_ = CharmLXDProfile.from_json(lxd_profile) if lxd_profile else None + manifest_ = CharmManifest.from_json(manifest) if manifest else None + meta_ = CharmMeta.from_json(meta) if meta else None + metrics_ = CharmMetrics.from_json(metrics) if metrics else None + revision_ = revision + url_ = url # Validate arguments against known Juju API types. - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) + if actions_ is not None and not isinstance(actions_, (dict, CharmActions)): + raise Exception("Expected actions_ to be a CharmActions, received: {}".format(type(actions_))) - if result_ is not None and not isinstance(result_, (dict, CAASApplicationOCIResources)): - raise Exception("Expected result_ to be a CAASApplicationOCIResources, received: {}".format(type(result_))) + if config_ is not None and not isinstance(config_, dict): + raise Exception("Expected config_ to be a Mapping, received: {}".format(type(config_))) - self.error = error_ - self.result = result_ - self.unknown_fields = unknown_fields + if lxd_profile_ is not None and not isinstance(lxd_profile_, (dict, CharmLXDProfile)): + raise Exception("Expected lxd_profile_ to be a CharmLXDProfile, received: {}".format(type(lxd_profile_))) + if manifest_ is not None and not isinstance(manifest_, (dict, CharmManifest)): + raise Exception("Expected manifest_ to be a CharmManifest, received: {}".format(type(manifest_))) + if meta_ is not None and not isinstance(meta_, (dict, CharmMeta)): + raise Exception("Expected meta_ to be a CharmMeta, received: {}".format(type(meta_))) -class CAASApplicationOCIResourceResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None, **unknown_fields): - ''' - results : typing.Sequence[~CAASApplicationOCIResourceResult] - ''' - results_ = [CAASApplicationOCIResourceResult.from_json(o) for o in results or []] + if metrics_ is not None and not isinstance(metrics_, (dict, CharmMetrics)): + raise Exception("Expected metrics_ to be a CharmMetrics, received: {}".format(type(metrics_))) - # Validate arguments against known Juju API types. - if results_ is not None and not isinstance(results_, (bytes, str, list)): - raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) + if revision_ is not None and not isinstance(revision_, int): + raise Exception("Expected revision_ to be a int, received: {}".format(type(revision_))) - self.results = results_ + if url_ is not None and not isinstance(url_, (bytes, str)): + raise Exception("Expected url_ to be a str, received: {}".format(type(url_))) + + self.actions = actions_ + self.config = config_ + self.lxd_profile = lxd_profile_ + self.manifest = manifest_ + self.meta = meta_ + self.metrics = metrics_ + self.revision = revision_ + self.url = url_ self.unknown_fields = unknown_fields -class CAASApplicationOCIResources(Type): - _toSchema = {'images': 'images'} - _toPy = {'images': 'images'} - def __init__(self, images=None, **unknown_fields): +class CharmActionSpec(Type): + _toSchema = {'description': 'description', 'params': 'params'} + _toPy = {'description': 'description', 'params': 'params'} + def __init__(self, description=None, params=None, **unknown_fields): ''' - images : typing.Mapping[str, ~DockerImageInfo] + description : str + params : typing.Mapping[str, typing.Any] ''' - images_ = {k: DockerImageInfo.from_json(v) for k, v in (images or dict()).items()} + description_ = description + params_ = params # Validate arguments against known Juju API types. - if images_ is not None and not isinstance(images_, dict): - raise Exception("Expected images_ to be a Mapping, received: {}".format(type(images_))) + if description_ is not None and not isinstance(description_, (bytes, str)): + raise Exception("Expected description_ to be a str, received: {}".format(type(description_))) - self.images = images_ + if params_ is not None and not isinstance(params_, dict): + raise Exception("Expected params_ to be a Mapping, received: {}".format(type(params_))) + + self.description = description_ + self.params = params_ self.unknown_fields = unknown_fields -class CAASApplicationProvisionerConfig(Type): - _toSchema = {'unmanaged_applications': 'unmanaged-applications'} - _toPy = {'unmanaged-applications': 'unmanaged_applications'} - def __init__(self, unmanaged_applications=None, **unknown_fields): +class CharmActions(Type): + _toSchema = {'specs': 'specs'} + _toPy = {'specs': 'specs'} + def __init__(self, specs=None, **unknown_fields): ''' - unmanaged_applications : Entities + specs : typing.Mapping[str, ~CharmActionSpec] ''' - unmanaged_applications_ = Entities.from_json(unmanaged_applications) if unmanaged_applications else None + specs_ = {k: CharmActionSpec.from_json(v) for k, v in (specs or dict()).items()} # Validate arguments against known Juju API types. - if unmanaged_applications_ is not None and not isinstance(unmanaged_applications_, (dict, Entities)): - raise Exception("Expected unmanaged_applications_ to be a Entities, received: {}".format(type(unmanaged_applications_))) + if specs_ is not None and not isinstance(specs_, dict): + raise Exception("Expected specs_ to be a Mapping, received: {}".format(type(specs_))) - self.unmanaged_applications = unmanaged_applications_ + self.specs = specs_ self.unknown_fields = unknown_fields -class CAASApplicationProvisionerConfigResult(Type): - _toSchema = {'error': 'error', 'provisioner_config': 'provisioner-config'} - _toPy = {'error': 'error', 'provisioner-config': 'provisioner_config'} - def __init__(self, error=None, provisioner_config=None, **unknown_fields): +class CharmBase(Type): + _toSchema = {'architectures': 'architectures', 'channel': 'channel', 'name': 'name'} + _toPy = {'architectures': 'architectures', 'channel': 'channel', 'name': 'name'} + def __init__(self, architectures=None, channel=None, name=None, **unknown_fields): ''' - error : Error - provisioner_config : CAASApplicationProvisionerConfig + architectures : typing.Sequence[str] + channel : str + name : str ''' - error_ = Error.from_json(error) if error else None - provisioner_config_ = CAASApplicationProvisionerConfig.from_json(provisioner_config) if provisioner_config else None + architectures_ = architectures + channel_ = channel + name_ = name # Validate arguments against known Juju API types. - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) + if architectures_ is not None and not isinstance(architectures_, (bytes, str, list)): + raise Exception("Expected architectures_ to be a Sequence, received: {}".format(type(architectures_))) + + if channel_ is not None and not isinstance(channel_, (bytes, str)): + raise Exception("Expected channel_ to be a str, received: {}".format(type(channel_))) - if provisioner_config_ is not None and not isinstance(provisioner_config_, (dict, CAASApplicationProvisionerConfig)): - raise Exception("Expected provisioner_config_ to be a CAASApplicationProvisionerConfig, received: {}".format(type(provisioner_config_))) + if name_ is not None and not isinstance(name_, (bytes, str)): + raise Exception("Expected name_ to be a str, received: {}".format(type(name_))) - self.error = error_ - self.provisioner_config = provisioner_config_ + self.architectures = architectures_ + self.channel = channel_ + self.name = name_ self.unknown_fields = unknown_fields -class CAASApplicationProvisioningInfo(Type): - _toSchema = {'api_addresses': 'api-addresses', 'base': 'base', 'ca_cert': 'ca-cert', 'charm_modified_version': 'charm-modified-version', 'charm_url': 'charm-url', 'constraints': 'constraints', 'devices': 'devices', 'error': 'error', 'filesystems': 'filesystems', 'image_repo': 'image-repo', 'scale': 'scale', 'tags': 'tags', 'trust': 'trust', 'version': 'version', 'volumes': 'volumes'} - _toPy = {'api-addresses': 'api_addresses', 'base': 'base', 'ca-cert': 'ca_cert', 'charm-modified-version': 'charm_modified_version', 'charm-url': 'charm_url', 'constraints': 'constraints', 'devices': 'devices', 'error': 'error', 'filesystems': 'filesystems', 'image-repo': 'image_repo', 'scale': 'scale', 'tags': 'tags', 'trust': 'trust', 'version': 'version', 'volumes': 'volumes'} - def __init__(self, api_addresses=None, base=None, ca_cert=None, charm_modified_version=None, charm_url=None, constraints=None, devices=None, error=None, filesystems=None, image_repo=None, scale=None, tags=None, trust=None, version=None, volumes=None, **unknown_fields): +class CharmContainer(Type): + _toSchema = {'mounts': 'mounts', 'resource': 'resource'} + _toPy = {'mounts': 'mounts', 'resource': 'resource'} + def __init__(self, mounts=None, resource=None, **unknown_fields): ''' - api_addresses : typing.Sequence[str] - base : Base - ca_cert : str - charm_modified_version : int - charm_url : str - constraints : Value - devices : typing.Sequence[~KubernetesDeviceParams] - error : Error - filesystems : typing.Sequence[~KubernetesFilesystemParams] - image_repo : DockerImageInfo - scale : int - tags : typing.Mapping[str, str] - trust : bool - version : Number - volumes : typing.Sequence[~KubernetesVolumeParams] + mounts : typing.Sequence[~CharmMount] + resource : str ''' - api_addresses_ = api_addresses - base_ = Base.from_json(base) if base else None - ca_cert_ = ca_cert - charm_modified_version_ = charm_modified_version - charm_url_ = charm_url - constraints_ = Value.from_json(constraints) if constraints else None - devices_ = [KubernetesDeviceParams.from_json(o) for o in devices or []] - error_ = Error.from_json(error) if error else None - filesystems_ = [KubernetesFilesystemParams.from_json(o) for o in filesystems or []] - image_repo_ = DockerImageInfo.from_json(image_repo) if image_repo else None - scale_ = scale - tags_ = tags - trust_ = trust - version_ = Number.from_json(version) if version else None - volumes_ = [KubernetesVolumeParams.from_json(o) for o in volumes or []] + mounts_ = [CharmMount.from_json(o) for o in mounts or []] + resource_ = resource # Validate arguments against known Juju API types. - if api_addresses_ is not None and not isinstance(api_addresses_, (bytes, str, list)): - raise Exception("Expected api_addresses_ to be a Sequence, received: {}".format(type(api_addresses_))) + if mounts_ is not None and not isinstance(mounts_, (bytes, str, list)): + raise Exception("Expected mounts_ to be a Sequence, received: {}".format(type(mounts_))) - if base_ is not None and not isinstance(base_, (dict, Base)): - raise Exception("Expected base_ to be a Base, received: {}".format(type(base_))) + if resource_ is not None and not isinstance(resource_, (bytes, str)): + raise Exception("Expected resource_ to be a str, received: {}".format(type(resource_))) - if ca_cert_ is not None and not isinstance(ca_cert_, (bytes, str)): - raise Exception("Expected ca_cert_ to be a str, received: {}".format(type(ca_cert_))) - - if charm_modified_version_ is not None and not isinstance(charm_modified_version_, int): - raise Exception("Expected charm_modified_version_ to be a int, received: {}".format(type(charm_modified_version_))) - - if charm_url_ is not None and not isinstance(charm_url_, (bytes, str)): - raise Exception("Expected charm_url_ to be a str, received: {}".format(type(charm_url_))) - - if constraints_ is not None and not isinstance(constraints_, (dict, Value)): - raise Exception("Expected constraints_ to be a Value, received: {}".format(type(constraints_))) - - if devices_ is not None and not isinstance(devices_, (bytes, str, list)): - raise Exception("Expected devices_ to be a Sequence, received: {}".format(type(devices_))) - - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - - if filesystems_ is not None and not isinstance(filesystems_, (bytes, str, list)): - raise Exception("Expected filesystems_ to be a Sequence, received: {}".format(type(filesystems_))) - - if image_repo_ is not None and not isinstance(image_repo_, (dict, DockerImageInfo)): - raise Exception("Expected image_repo_ to be a DockerImageInfo, received: {}".format(type(image_repo_))) - - if scale_ is not None and not isinstance(scale_, int): - raise Exception("Expected scale_ to be a int, received: {}".format(type(scale_))) - - if tags_ is not None and not isinstance(tags_, dict): - raise Exception("Expected tags_ to be a Mapping, received: {}".format(type(tags_))) - - if trust_ is not None and not isinstance(trust_, bool): - raise Exception("Expected trust_ to be a bool, received: {}".format(type(trust_))) - - if version_ is not None and not isinstance(version_, (dict, Number)): - raise Exception("Expected version_ to be a Number, received: {}".format(type(version_))) - - if volumes_ is not None and not isinstance(volumes_, (bytes, str, list)): - raise Exception("Expected volumes_ to be a Sequence, received: {}".format(type(volumes_))) - - self.api_addresses = api_addresses_ - self.base = base_ - self.ca_cert = ca_cert_ - self.charm_modified_version = charm_modified_version_ - self.charm_url = charm_url_ - self.constraints = constraints_ - self.devices = devices_ - self.error = error_ - self.filesystems = filesystems_ - self.image_repo = image_repo_ - self.scale = scale_ - self.tags = tags_ - self.trust = trust_ - self.version = version_ - self.volumes = volumes_ + self.mounts = mounts_ + self.resource = resource_ self.unknown_fields = unknown_fields -class CAASApplicationProvisioningInfoResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None, **unknown_fields): +class CharmDeployment(Type): + _toSchema = {'min_version': 'min-version', 'mode': 'mode', 'service': 'service', 'type_': 'type'} + _toPy = {'min-version': 'min_version', 'mode': 'mode', 'service': 'service', 'type': 'type_'} + def __init__(self, min_version=None, mode=None, service=None, type_=None, **unknown_fields): ''' - results : typing.Sequence[~CAASApplicationProvisioningInfo] + min_version : str + mode : str + service : str + type_ : str ''' - results_ = [CAASApplicationProvisioningInfo.from_json(o) for o in results or []] + min_version_ = min_version + mode_ = mode + service_ = service + type__ = type_ # Validate arguments against known Juju API types. - if results_ is not None and not isinstance(results_, (bytes, str, list)): - raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) - - self.results = results_ - self.unknown_fields = unknown_fields - - + if min_version_ is not None and not isinstance(min_version_, (bytes, str)): + raise Exception("Expected min_version_ to be a str, received: {}".format(type(min_version_))) -class CAASApplicationProvisioningState(Type): - _toSchema = {'scale_target': 'scale-target', 'scaling': 'scaling'} - _toPy = {'scale-target': 'scale_target', 'scaling': 'scaling'} - def __init__(self, scale_target=None, scaling=None, **unknown_fields): - ''' - scale_target : int - scaling : bool - ''' - scale_target_ = scale_target - scaling_ = scaling + if mode_ is not None and not isinstance(mode_, (bytes, str)): + raise Exception("Expected mode_ to be a str, received: {}".format(type(mode_))) - # Validate arguments against known Juju API types. - if scale_target_ is not None and not isinstance(scale_target_, int): - raise Exception("Expected scale_target_ to be a int, received: {}".format(type(scale_target_))) + if service_ is not None and not isinstance(service_, (bytes, str)): + raise Exception("Expected service_ to be a str, received: {}".format(type(service_))) - if scaling_ is not None and not isinstance(scaling_, bool): - raise Exception("Expected scaling_ to be a bool, received: {}".format(type(scaling_))) + if type__ is not None and not isinstance(type__, (bytes, str)): + raise Exception("Expected type__ to be a str, received: {}".format(type(type__))) - self.scale_target = scale_target_ - self.scaling = scaling_ + self.min_version = min_version_ + self.mode = mode_ + self.service = service_ + self.type_ = type__ self.unknown_fields = unknown_fields -class CAASApplicationProvisioningStateArg(Type): - _toSchema = {'application': 'application', 'provisioning_state': 'provisioning-state'} - _toPy = {'application': 'application', 'provisioning-state': 'provisioning_state'} - def __init__(self, application=None, provisioning_state=None, **unknown_fields): +class CharmDevice(Type): + _toSchema = {'countmax': 'CountMax', 'countmin': 'CountMin', 'description': 'Description', 'name': 'Name', 'type_': 'Type'} + _toPy = {'CountMax': 'countmax', 'CountMin': 'countmin', 'Description': 'description', 'Name': 'name', 'Type': 'type_'} + def __init__(self, countmax=None, countmin=None, description=None, name=None, type_=None, **unknown_fields): ''' - application : Entity - provisioning_state : CAASApplicationProvisioningState + countmax : int + countmin : int + description : str + name : str + type_ : str ''' - application_ = Entity.from_json(application) if application else None - provisioning_state_ = CAASApplicationProvisioningState.from_json(provisioning_state) if provisioning_state else None + countmax_ = countmax + countmin_ = countmin + description_ = description + name_ = name + type__ = type_ # Validate arguments against known Juju API types. - if application_ is not None and not isinstance(application_, (dict, Entity)): - raise Exception("Expected application_ to be a Entity, received: {}".format(type(application_))) - - if provisioning_state_ is not None and not isinstance(provisioning_state_, (dict, CAASApplicationProvisioningState)): - raise Exception("Expected provisioning_state_ to be a CAASApplicationProvisioningState, received: {}".format(type(provisioning_state_))) - - self.application = application_ - self.provisioning_state = provisioning_state_ - self.unknown_fields = unknown_fields - + if countmax_ is not None and not isinstance(countmax_, int): + raise Exception("Expected countmax_ to be a int, received: {}".format(type(countmax_))) + if countmin_ is not None and not isinstance(countmin_, int): + raise Exception("Expected countmin_ to be a int, received: {}".format(type(countmin_))) -class CAASApplicationProvisioningStateResult(Type): - _toSchema = {'error': 'error', 'provisioning_state': 'provisioning-state'} - _toPy = {'error': 'error', 'provisioning-state': 'provisioning_state'} - def __init__(self, error=None, provisioning_state=None, **unknown_fields): - ''' - error : Error - provisioning_state : CAASApplicationProvisioningState - ''' - error_ = Error.from_json(error) if error else None - provisioning_state_ = CAASApplicationProvisioningState.from_json(provisioning_state) if provisioning_state else None + if description_ is not None and not isinstance(description_, (bytes, str)): + raise Exception("Expected description_ to be a str, received: {}".format(type(description_))) - # Validate arguments against known Juju API types. - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) + if name_ is not None and not isinstance(name_, (bytes, str)): + raise Exception("Expected name_ to be a str, received: {}".format(type(name_))) - if provisioning_state_ is not None and not isinstance(provisioning_state_, (dict, CAASApplicationProvisioningState)): - raise Exception("Expected provisioning_state_ to be a CAASApplicationProvisioningState, received: {}".format(type(provisioning_state_))) + if type__ is not None and not isinstance(type__, (bytes, str)): + raise Exception("Expected type__ to be a str, received: {}".format(type(type__))) - self.error = error_ - self.provisioning_state = provisioning_state_ + self.countmax = countmax_ + self.countmin = countmin_ + self.description = description_ + self.name = name_ + self.type_ = type__ self.unknown_fields = unknown_fields -class CAASUnitInfo(Type): - _toSchema = {'tag': 'tag', 'unit_status': 'unit-status'} - _toPy = {'tag': 'tag', 'unit-status': 'unit_status'} - def __init__(self, tag=None, unit_status=None, **unknown_fields): +class CharmLXDProfile(Type): + _toSchema = {'config': 'config', 'description': 'description', 'devices': 'devices'} + _toPy = {'config': 'config', 'description': 'description', 'devices': 'devices'} + def __init__(self, config=None, description=None, devices=None, **unknown_fields): ''' - tag : str - unit_status : UnitStatus + config : typing.Mapping[str, str] + description : str + devices : typing.Mapping[str, typing.Any] ''' - tag_ = tag - unit_status_ = UnitStatus.from_json(unit_status) if unit_status else None + config_ = config + description_ = description + devices_ = devices # Validate arguments against known Juju API types. - if tag_ is not None and not isinstance(tag_, (bytes, str)): - raise Exception("Expected tag_ to be a str, received: {}".format(type(tag_))) + if config_ is not None and not isinstance(config_, dict): + raise Exception("Expected config_ to be a Mapping, received: {}".format(type(config_))) + + if description_ is not None and not isinstance(description_, (bytes, str)): + raise Exception("Expected description_ to be a str, received: {}".format(type(description_))) - if unit_status_ is not None and not isinstance(unit_status_, (dict, UnitStatus)): - raise Exception("Expected unit_status_ to be a UnitStatus, received: {}".format(type(unit_status_))) + if devices_ is not None and not isinstance(devices_, dict): + raise Exception("Expected devices_ to be a Mapping, received: {}".format(type(devices_))) - self.tag = tag_ - self.unit_status = unit_status_ + self.config = config_ + self.description = description_ + self.devices = devices_ self.unknown_fields = unknown_fields -class CAASUnitIntroduction(Type): - _toSchema = {'agent_conf': 'agent-conf', 'unit_name': 'unit-name'} - _toPy = {'agent-conf': 'agent_conf', 'unit-name': 'unit_name'} - def __init__(self, agent_conf=None, unit_name=None, **unknown_fields): +class CharmManifest(Type): + _toSchema = {'bases': 'bases'} + _toPy = {'bases': 'bases'} + def __init__(self, bases=None, **unknown_fields): ''' - agent_conf : typing.Sequence[int] - unit_name : str + bases : typing.Sequence[~CharmBase] ''' - agent_conf_ = agent_conf - unit_name_ = unit_name + bases_ = [CharmBase.from_json(o) for o in bases or []] # Validate arguments against known Juju API types. - if agent_conf_ is not None and not isinstance(agent_conf_, (bytes, str, list)): - raise Exception("Expected agent_conf_ to be a Sequence, received: {}".format(type(agent_conf_))) - - if unit_name_ is not None and not isinstance(unit_name_, (bytes, str)): - raise Exception("Expected unit_name_ to be a str, received: {}".format(type(unit_name_))) + if bases_ is not None and not isinstance(bases_, (bytes, str, list)): + raise Exception("Expected bases_ to be a Sequence, received: {}".format(type(bases_))) - self.agent_conf = agent_conf_ - self.unit_name = unit_name_ + self.bases = bases_ self.unknown_fields = unknown_fields -class CAASUnitIntroductionArgs(Type): - _toSchema = {'pod_name': 'pod-name', 'pod_uuid': 'pod-uuid'} - _toPy = {'pod-name': 'pod_name', 'pod-uuid': 'pod_uuid'} - def __init__(self, pod_name=None, pod_uuid=None, **unknown_fields): +class CharmMeta(Type): + _toSchema = {'assumes_expr': 'assumes-expr', 'categories': 'categories', 'containers': 'containers', 'deployment': 'deployment', 'description': 'description', 'devices': 'devices', 'extra_bindings': 'extra-bindings', 'min_juju_version': 'min-juju-version', 'name': 'name', 'payload_classes': 'payload-classes', 'peers': 'peers', 'provides': 'provides', 'requires': 'requires', 'resources': 'resources', 'series': 'series', 'storage': 'storage', 'subordinate': 'subordinate', 'summary': 'summary', 'tags': 'tags', 'terms': 'terms'} + _toPy = {'assumes-expr': 'assumes_expr', 'categories': 'categories', 'containers': 'containers', 'deployment': 'deployment', 'description': 'description', 'devices': 'devices', 'extra-bindings': 'extra_bindings', 'min-juju-version': 'min_juju_version', 'name': 'name', 'payload-classes': 'payload_classes', 'peers': 'peers', 'provides': 'provides', 'requires': 'requires', 'resources': 'resources', 'series': 'series', 'storage': 'storage', 'subordinate': 'subordinate', 'summary': 'summary', 'tags': 'tags', 'terms': 'terms'} + def __init__(self, assumes_expr=None, categories=None, containers=None, deployment=None, description=None, devices=None, extra_bindings=None, min_juju_version=None, name=None, payload_classes=None, peers=None, provides=None, requires=None, resources=None, series=None, storage=None, subordinate=None, summary=None, tags=None, terms=None, **unknown_fields): ''' - pod_name : str - pod_uuid : str + assumes_expr : ExpressionTree + categories : typing.Sequence[str] + containers : typing.Mapping[str, ~CharmContainer] + deployment : CharmDeployment + description : str + devices : typing.Mapping[str, ~CharmDevice] + extra_bindings : typing.Mapping[str, str] + min_juju_version : str + name : str + payload_classes : typing.Mapping[str, ~CharmPayloadClass] + peers : typing.Mapping[str, ~CharmRelation] + provides : typing.Mapping[str, ~CharmRelation] + requires : typing.Mapping[str, ~CharmRelation] + resources : typing.Mapping[str, ~CharmResourceMeta] + series : typing.Sequence[str] + storage : typing.Mapping[str, ~CharmStorage] + subordinate : bool + summary : str + tags : typing.Sequence[str] + terms : typing.Sequence[str] ''' - pod_name_ = pod_name - pod_uuid_ = pod_uuid + assumes_expr_ = ExpressionTree.from_json(assumes_expr) if assumes_expr else None + categories_ = categories + containers_ = {k: CharmContainer.from_json(v) for k, v in (containers or dict()).items()} + deployment_ = CharmDeployment.from_json(deployment) if deployment else None + description_ = description + devices_ = {k: CharmDevice.from_json(v) for k, v in (devices or dict()).items()} + extra_bindings_ = extra_bindings + min_juju_version_ = min_juju_version + name_ = name + payload_classes_ = {k: CharmPayloadClass.from_json(v) for k, v in (payload_classes or dict()).items()} + peers_ = {k: CharmRelation.from_json(v) for k, v in (peers or dict()).items()} + provides_ = {k: CharmRelation.from_json(v) for k, v in (provides or dict()).items()} + requires_ = {k: CharmRelation.from_json(v) for k, v in (requires or dict()).items()} + resources_ = {k: CharmResourceMeta.from_json(v) for k, v in (resources or dict()).items()} + series_ = series + storage_ = {k: CharmStorage.from_json(v) for k, v in (storage or dict()).items()} + subordinate_ = subordinate + summary_ = summary + tags_ = tags + terms_ = terms # Validate arguments against known Juju API types. - if pod_name_ is not None and not isinstance(pod_name_, (bytes, str)): - raise Exception("Expected pod_name_ to be a str, received: {}".format(type(pod_name_))) + if assumes_expr_ is not None and not isinstance(assumes_expr_, (dict, ExpressionTree)): + raise Exception("Expected assumes_expr_ to be a ExpressionTree, received: {}".format(type(assumes_expr_))) - if pod_uuid_ is not None and not isinstance(pod_uuid_, (bytes, str)): - raise Exception("Expected pod_uuid_ to be a str, received: {}".format(type(pod_uuid_))) + if categories_ is not None and not isinstance(categories_, (bytes, str, list)): + raise Exception("Expected categories_ to be a Sequence, received: {}".format(type(categories_))) - self.pod_name = pod_name_ - self.pod_uuid = pod_uuid_ - self.unknown_fields = unknown_fields + if containers_ is not None and not isinstance(containers_, dict): + raise Exception("Expected containers_ to be a Mapping, received: {}".format(type(containers_))) + if deployment_ is not None and not isinstance(deployment_, (dict, CharmDeployment)): + raise Exception("Expected deployment_ to be a CharmDeployment, received: {}".format(type(deployment_))) + if description_ is not None and not isinstance(description_, (bytes, str)): + raise Exception("Expected description_ to be a str, received: {}".format(type(description_))) -class CAASUnitIntroductionResult(Type): - _toSchema = {'error': 'error', 'result': 'result'} - _toPy = {'error': 'error', 'result': 'result'} - def __init__(self, error=None, result=None, **unknown_fields): - ''' - error : Error - result : CAASUnitIntroduction - ''' - error_ = Error.from_json(error) if error else None - result_ = CAASUnitIntroduction.from_json(result) if result else None + if devices_ is not None and not isinstance(devices_, dict): + raise Exception("Expected devices_ to be a Mapping, received: {}".format(type(devices_))) - # Validate arguments against known Juju API types. - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) + if extra_bindings_ is not None and not isinstance(extra_bindings_, dict): + raise Exception("Expected extra_bindings_ to be a Mapping, received: {}".format(type(extra_bindings_))) - if result_ is not None and not isinstance(result_, (dict, CAASUnitIntroduction)): - raise Exception("Expected result_ to be a CAASUnitIntroduction, received: {}".format(type(result_))) + if min_juju_version_ is not None and not isinstance(min_juju_version_, (bytes, str)): + raise Exception("Expected min_juju_version_ to be a str, received: {}".format(type(min_juju_version_))) - self.error = error_ - self.result = result_ - self.unknown_fields = unknown_fields + if name_ is not None and not isinstance(name_, (bytes, str)): + raise Exception("Expected name_ to be a str, received: {}".format(type(name_))) + if payload_classes_ is not None and not isinstance(payload_classes_, dict): + raise Exception("Expected payload_classes_ to be a Mapping, received: {}".format(type(payload_classes_))) + if peers_ is not None and not isinstance(peers_, dict): + raise Exception("Expected peers_ to be a Mapping, received: {}".format(type(peers_))) -class CAASUnitTerminationResult(Type): - _toSchema = {'error': 'Error', 'willrestart': 'WillRestart'} - _toPy = {'Error': 'error', 'WillRestart': 'willrestart'} - def __init__(self, error=None, willrestart=None, **unknown_fields): - ''' - error : Error - willrestart : bool - ''' - error_ = Error.from_json(error) if error else None - willrestart_ = willrestart + if provides_ is not None and not isinstance(provides_, dict): + raise Exception("Expected provides_ to be a Mapping, received: {}".format(type(provides_))) - # Validate arguments against known Juju API types. - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) + if requires_ is not None and not isinstance(requires_, dict): + raise Exception("Expected requires_ to be a Mapping, received: {}".format(type(requires_))) - if willrestart_ is not None and not isinstance(willrestart_, bool): - raise Exception("Expected willrestart_ to be a bool, received: {}".format(type(willrestart_))) + if resources_ is not None and not isinstance(resources_, dict): + raise Exception("Expected resources_ to be a Mapping, received: {}".format(type(resources_))) - self.error = error_ - self.willrestart = willrestart_ - self.unknown_fields = unknown_fields + if series_ is not None and not isinstance(series_, (bytes, str, list)): + raise Exception("Expected series_ to be a Sequence, received: {}".format(type(series_))) + if storage_ is not None and not isinstance(storage_, dict): + raise Exception("Expected storage_ to be a Mapping, received: {}".format(type(storage_))) + if subordinate_ is not None and not isinstance(subordinate_, bool): + raise Exception("Expected subordinate_ to be a bool, received: {}".format(type(subordinate_))) -class CAASUnitsResult(Type): - _toSchema = {'error': 'error', 'units': 'units'} - _toPy = {'error': 'error', 'units': 'units'} - def __init__(self, error=None, units=None, **unknown_fields): - ''' - error : Error - units : typing.Sequence[~CAASUnitInfo] - ''' - error_ = Error.from_json(error) if error else None - units_ = [CAASUnitInfo.from_json(o) for o in units or []] + if summary_ is not None and not isinstance(summary_, (bytes, str)): + raise Exception("Expected summary_ to be a str, received: {}".format(type(summary_))) - # Validate arguments against known Juju API types. - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) + if tags_ is not None and not isinstance(tags_, (bytes, str, list)): + raise Exception("Expected tags_ to be a Sequence, received: {}".format(type(tags_))) - if units_ is not None and not isinstance(units_, (bytes, str, list)): - raise Exception("Expected units_ to be a Sequence, received: {}".format(type(units_))) + if terms_ is not None and not isinstance(terms_, (bytes, str, list)): + raise Exception("Expected terms_ to be a Sequence, received: {}".format(type(terms_))) - self.error = error_ - self.units = units_ + self.assumes_expr = assumes_expr_ + self.categories = categories_ + self.containers = containers_ + self.deployment = deployment_ + self.description = description_ + self.devices = devices_ + self.extra_bindings = extra_bindings_ + self.min_juju_version = min_juju_version_ + self.name = name_ + self.payload_classes = payload_classes_ + self.peers = peers_ + self.provides = provides_ + self.requires = requires_ + self.resources = resources_ + self.series = series_ + self.storage = storage_ + self.subordinate = subordinate_ + self.summary = summary_ + self.tags = tags_ + self.terms = terms_ self.unknown_fields = unknown_fields -class CAASUnitsResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None, **unknown_fields): +class CharmMetric(Type): + _toSchema = {'description': 'description', 'type_': 'type'} + _toPy = {'description': 'description', 'type': 'type_'} + def __init__(self, description=None, type_=None, **unknown_fields): ''' - results : typing.Sequence[~CAASUnitsResult] + description : str + type_ : str ''' - results_ = [CAASUnitsResult.from_json(o) for o in results or []] + description_ = description + type__ = type_ # Validate arguments against known Juju API types. - if results_ is not None and not isinstance(results_, (bytes, str, list)): - raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) - - self.results = results_ - self.unknown_fields = unknown_fields - - - -class CIDRParams(Type): - _toSchema = {'cidrs': 'cidrs'} - _toPy = {'cidrs': 'cidrs'} - def __init__(self, cidrs=None, **unknown_fields): - ''' - cidrs : typing.Sequence[str] - ''' - cidrs_ = cidrs + if description_ is not None and not isinstance(description_, (bytes, str)): + raise Exception("Expected description_ to be a str, received: {}".format(type(description_))) - # Validate arguments against known Juju API types. - if cidrs_ is not None and not isinstance(cidrs_, (bytes, str, list)): - raise Exception("Expected cidrs_ to be a Sequence, received: {}".format(type(cidrs_))) + if type__ is not None and not isinstance(type__, (bytes, str)): + raise Exception("Expected type__ to be a str, received: {}".format(type(type__))) - self.cidrs = cidrs_ + self.description = description_ + self.type_ = type__ self.unknown_fields = unknown_fields -class ChangeModelCredentialParams(Type): - _toSchema = {'credential_tag': 'credential-tag', 'model_tag': 'model-tag'} - _toPy = {'credential-tag': 'credential_tag', 'model-tag': 'model_tag'} - def __init__(self, credential_tag=None, model_tag=None, **unknown_fields): +class CharmMetrics(Type): + _toSchema = {'metrics': 'metrics', 'plan': 'plan'} + _toPy = {'metrics': 'metrics', 'plan': 'plan'} + def __init__(self, metrics=None, plan=None, **unknown_fields): ''' - credential_tag : str - model_tag : str + metrics : typing.Mapping[str, ~CharmMetric] + plan : CharmPlan ''' - credential_tag_ = credential_tag - model_tag_ = model_tag + metrics_ = {k: CharmMetric.from_json(v) for k, v in (metrics or dict()).items()} + plan_ = CharmPlan.from_json(plan) if plan else None # Validate arguments against known Juju API types. - if credential_tag_ is not None and not isinstance(credential_tag_, (bytes, str)): - raise Exception("Expected credential_tag_ to be a str, received: {}".format(type(credential_tag_))) - - if model_tag_ is not None and not isinstance(model_tag_, (bytes, str)): - raise Exception("Expected model_tag_ to be a str, received: {}".format(type(model_tag_))) - - self.credential_tag = credential_tag_ - self.model_tag = model_tag_ - self.unknown_fields = unknown_fields - - - -class ChangeModelCredentialsParams(Type): - _toSchema = {'model_credentials': 'model-credentials'} - _toPy = {'model-credentials': 'model_credentials'} - def __init__(self, model_credentials=None, **unknown_fields): - ''' - model_credentials : typing.Sequence[~ChangeModelCredentialParams] - ''' - model_credentials_ = [ChangeModelCredentialParams.from_json(o) for o in model_credentials or []] + if metrics_ is not None and not isinstance(metrics_, dict): + raise Exception("Expected metrics_ to be a Mapping, received: {}".format(type(metrics_))) - # Validate arguments against known Juju API types. - if model_credentials_ is not None and not isinstance(model_credentials_, (bytes, str, list)): - raise Exception("Expected model_credentials_ to be a Sequence, received: {}".format(type(model_credentials_))) + if plan_ is not None and not isinstance(plan_, (dict, CharmPlan)): + raise Exception("Expected plan_ to be a CharmPlan, received: {}".format(type(plan_))) - self.model_credentials = model_credentials_ + self.metrics = metrics_ + self.plan = plan_ self.unknown_fields = unknown_fields -class ChangeSecretBackendArg(Type): - _toSchema = {'content': 'content', 'revision': 'revision', 'uri': 'uri'} - _toPy = {'content': 'content', 'revision': 'revision', 'uri': 'uri'} - def __init__(self, content=None, revision=None, uri=None, **unknown_fields): +class CharmMount(Type): + _toSchema = {'location': 'location', 'storage': 'storage'} + _toPy = {'location': 'location', 'storage': 'storage'} + def __init__(self, location=None, storage=None, **unknown_fields): ''' - content : SecretContentParams - revision : int - uri : str + location : str + storage : str ''' - content_ = SecretContentParams.from_json(content) if content else None - revision_ = revision - uri_ = uri + location_ = location + storage_ = storage # Validate arguments against known Juju API types. - if content_ is not None and not isinstance(content_, (dict, SecretContentParams)): - raise Exception("Expected content_ to be a SecretContentParams, received: {}".format(type(content_))) - - if revision_ is not None and not isinstance(revision_, int): - raise Exception("Expected revision_ to be a int, received: {}".format(type(revision_))) + if location_ is not None and not isinstance(location_, (bytes, str)): + raise Exception("Expected location_ to be a str, received: {}".format(type(location_))) - if uri_ is not None and not isinstance(uri_, (bytes, str)): - raise Exception("Expected uri_ to be a str, received: {}".format(type(uri_))) + if storage_ is not None and not isinstance(storage_, (bytes, str)): + raise Exception("Expected storage_ to be a str, received: {}".format(type(storage_))) - self.content = content_ - self.revision = revision_ - self.uri = uri_ + self.location = location_ + self.storage = storage_ self.unknown_fields = unknown_fields -class ChangeSecretBackendArgs(Type): - _toSchema = {'args': 'args'} - _toPy = {'args': 'args'} - def __init__(self, args=None, **unknown_fields): +class CharmOption(Type): + _toSchema = {'default': 'default', 'description': 'description', 'type_': 'type'} + _toPy = {'default': 'default', 'description': 'description', 'type': 'type_'} + def __init__(self, default=None, description=None, type_=None, **unknown_fields): ''' - args : typing.Sequence[~ChangeSecretBackendArg] + default : Any + description : str + type_ : str ''' - args_ = [ChangeSecretBackendArg.from_json(o) for o in args or []] + default_ = default + description_ = description + type__ = type_ # Validate arguments against known Juju API types. - if args_ is not None and not isinstance(args_, (bytes, str, list)): - raise Exception("Expected args_ to be a Sequence, received: {}".format(type(args_))) + if description_ is not None and not isinstance(description_, (bytes, str)): + raise Exception("Expected description_ to be a str, received: {}".format(type(description_))) - self.args = args_ + if type__ is not None and not isinstance(type__, (bytes, str)): + raise Exception("Expected type__ to be a str, received: {}".format(type(type__))) + + self.default = default_ + self.description = description_ + self.type_ = type__ self.unknown_fields = unknown_fields -class Channel(Type): - _toSchema = {'branch': 'branch', 'risk': 'risk', 'track': 'track'} - _toPy = {'branch': 'branch', 'risk': 'risk', 'track': 'track'} - def __init__(self, branch=None, risk=None, track=None, **unknown_fields): +class CharmOrigin(Type): + _toSchema = {'architecture': 'architecture', 'base': 'base', 'branch': 'branch', 'hash_': 'hash', 'id_': 'id', 'instance_key': 'instance-key', 'revision': 'revision', 'risk': 'risk', 'source': 'source', 'track': 'track', 'type_': 'type'} + _toPy = {'architecture': 'architecture', 'base': 'base', 'branch': 'branch', 'hash': 'hash_', 'id': 'id_', 'instance-key': 'instance_key', 'revision': 'revision', 'risk': 'risk', 'source': 'source', 'track': 'track', 'type': 'type_'} + def __init__(self, architecture=None, base=None, branch=None, hash_=None, id_=None, instance_key=None, revision=None, risk=None, source=None, track=None, type_=None, **unknown_fields): ''' + architecture : str + base : Base branch : str + hash_ : str + id_ : str + instance_key : str + revision : int risk : str + source : str track : str + type_ : str ''' + architecture_ = architecture + base_ = Base.from_json(base) if base else None branch_ = branch + hash__ = hash_ + id__ = id_ + instance_key_ = instance_key + revision_ = revision risk_ = risk + source_ = source track_ = track + type__ = type_ # Validate arguments against known Juju API types. + if architecture_ is not None and not isinstance(architecture_, (bytes, str)): + raise Exception("Expected architecture_ to be a str, received: {}".format(type(architecture_))) + + if base_ is not None and not isinstance(base_, (dict, Base)): + raise Exception("Expected base_ to be a Base, received: {}".format(type(base_))) + if branch_ is not None and not isinstance(branch_, (bytes, str)): raise Exception("Expected branch_ to be a str, received: {}".format(type(branch_))) + if hash__ is not None and not isinstance(hash__, (bytes, str)): + raise Exception("Expected hash__ to be a str, received: {}".format(type(hash__))) + + if id__ is not None and not isinstance(id__, (bytes, str)): + raise Exception("Expected id__ to be a str, received: {}".format(type(id__))) + + if instance_key_ is not None and not isinstance(instance_key_, (bytes, str)): + raise Exception("Expected instance_key_ to be a str, received: {}".format(type(instance_key_))) + + if revision_ is not None and not isinstance(revision_, int): + raise Exception("Expected revision_ to be a int, received: {}".format(type(revision_))) + if risk_ is not None and not isinstance(risk_, (bytes, str)): raise Exception("Expected risk_ to be a str, received: {}".format(type(risk_))) + if source_ is not None and not isinstance(source_, (bytes, str)): + raise Exception("Expected source_ to be a str, received: {}".format(type(source_))) + if track_ is not None and not isinstance(track_, (bytes, str)): raise Exception("Expected track_ to be a str, received: {}".format(type(track_))) + if type__ is not None and not isinstance(type__, (bytes, str)): + raise Exception("Expected type__ to be a str, received: {}".format(type(type__))) + + self.architecture = architecture_ + self.base = base_ self.branch = branch_ + self.hash_ = hash__ + self.id_ = id__ + self.instance_key = instance_key_ + self.revision = revision_ self.risk = risk_ + self.source = source_ self.track = track_ + self.type_ = type__ self.unknown_fields = unknown_fields -class Charm(Type): - _toSchema = {'actions': 'actions', 'config': 'config', 'lxd_profile': 'lxd-profile', 'manifest': 'manifest', 'meta': 'meta', 'metrics': 'metrics', 'revision': 'revision', 'url': 'url'} - _toPy = {'actions': 'actions', 'config': 'config', 'lxd-profile': 'lxd_profile', 'manifest': 'manifest', 'meta': 'meta', 'metrics': 'metrics', 'revision': 'revision', 'url': 'url'} - def __init__(self, actions=None, config=None, lxd_profile=None, manifest=None, meta=None, metrics=None, revision=None, url=None, **unknown_fields): +class CharmOriginResult(Type): + _toSchema = {'charm_origin': 'charm-origin', 'error': 'error'} + _toPy = {'charm-origin': 'charm_origin', 'error': 'error'} + def __init__(self, charm_origin=None, error=None, **unknown_fields): ''' - actions : CharmActions - config : typing.Mapping[str, ~CharmOption] - lxd_profile : CharmLXDProfile - manifest : CharmManifest - meta : CharmMeta - metrics : CharmMetrics - revision : int - url : str + charm_origin : CharmOrigin + error : Error ''' - actions_ = CharmActions.from_json(actions) if actions else None - config_ = {k: CharmOption.from_json(v) for k, v in (config or dict()).items()} - lxd_profile_ = CharmLXDProfile.from_json(lxd_profile) if lxd_profile else None - manifest_ = CharmManifest.from_json(manifest) if manifest else None - meta_ = CharmMeta.from_json(meta) if meta else None - metrics_ = CharmMetrics.from_json(metrics) if metrics else None - revision_ = revision - url_ = url + charm_origin_ = CharmOrigin.from_json(charm_origin) if charm_origin else None + error_ = Error.from_json(error) if error else None # Validate arguments against known Juju API types. - if actions_ is not None and not isinstance(actions_, (dict, CharmActions)): - raise Exception("Expected actions_ to be a CharmActions, received: {}".format(type(actions_))) - - if config_ is not None and not isinstance(config_, dict): - raise Exception("Expected config_ to be a Mapping, received: {}".format(type(config_))) - - if lxd_profile_ is not None and not isinstance(lxd_profile_, (dict, CharmLXDProfile)): - raise Exception("Expected lxd_profile_ to be a CharmLXDProfile, received: {}".format(type(lxd_profile_))) - - if manifest_ is not None and not isinstance(manifest_, (dict, CharmManifest)): - raise Exception("Expected manifest_ to be a CharmManifest, received: {}".format(type(manifest_))) - - if meta_ is not None and not isinstance(meta_, (dict, CharmMeta)): - raise Exception("Expected meta_ to be a CharmMeta, received: {}".format(type(meta_))) - - if metrics_ is not None and not isinstance(metrics_, (dict, CharmMetrics)): - raise Exception("Expected metrics_ to be a CharmMetrics, received: {}".format(type(metrics_))) - - if revision_ is not None and not isinstance(revision_, int): - raise Exception("Expected revision_ to be a int, received: {}".format(type(revision_))) + if charm_origin_ is not None and not isinstance(charm_origin_, (dict, CharmOrigin)): + raise Exception("Expected charm_origin_ to be a CharmOrigin, received: {}".format(type(charm_origin_))) - if url_ is not None and not isinstance(url_, (bytes, str)): - raise Exception("Expected url_ to be a str, received: {}".format(type(url_))) + if error_ is not None and not isinstance(error_, (dict, Error)): + raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - self.actions = actions_ - self.config = config_ - self.lxd_profile = lxd_profile_ - self.manifest = manifest_ - self.meta = meta_ - self.metrics = metrics_ - self.revision = revision_ - self.url = url_ + self.charm_origin = charm_origin_ + self.error = error_ self.unknown_fields = unknown_fields -class CharmActionSpec(Type): - _toSchema = {'description': 'description', 'params': 'params'} - _toPy = {'description': 'description', 'params': 'params'} - def __init__(self, description=None, params=None, **unknown_fields): +class CharmPayloadClass(Type): + _toSchema = {'name': 'name', 'type_': 'type'} + _toPy = {'name': 'name', 'type': 'type_'} + def __init__(self, name=None, type_=None, **unknown_fields): ''' - description : str - params : typing.Mapping[str, typing.Any] + name : str + type_ : str ''' - description_ = description - params_ = params + name_ = name + type__ = type_ # Validate arguments against known Juju API types. - if description_ is not None and not isinstance(description_, (bytes, str)): - raise Exception("Expected description_ to be a str, received: {}".format(type(description_))) + if name_ is not None and not isinstance(name_, (bytes, str)): + raise Exception("Expected name_ to be a str, received: {}".format(type(name_))) - if params_ is not None and not isinstance(params_, dict): - raise Exception("Expected params_ to be a Mapping, received: {}".format(type(params_))) + if type__ is not None and not isinstance(type__, (bytes, str)): + raise Exception("Expected type__ to be a str, received: {}".format(type(type__))) - self.description = description_ - self.params = params_ + self.name = name_ + self.type_ = type__ self.unknown_fields = unknown_fields -class CharmActions(Type): - _toSchema = {'specs': 'specs'} - _toPy = {'specs': 'specs'} - def __init__(self, specs=None, **unknown_fields): +class CharmPlan(Type): + _toSchema = {'required': 'required'} + _toPy = {'required': 'required'} + def __init__(self, required=None, **unknown_fields): ''' - specs : typing.Mapping[str, ~CharmActionSpec] + required : bool ''' - specs_ = {k: CharmActionSpec.from_json(v) for k, v in (specs or dict()).items()} + required_ = required # Validate arguments against known Juju API types. - if specs_ is not None and not isinstance(specs_, dict): - raise Exception("Expected specs_ to be a Mapping, received: {}".format(type(specs_))) + if required_ is not None and not isinstance(required_, bool): + raise Exception("Expected required_ to be a bool, received: {}".format(type(required_))) - self.specs = specs_ + self.required = required_ self.unknown_fields = unknown_fields -class CharmBase(Type): - _toSchema = {'architectures': 'architectures', 'channel': 'channel', 'name': 'name'} - _toPy = {'architectures': 'architectures', 'channel': 'channel', 'name': 'name'} - def __init__(self, architectures=None, channel=None, name=None, **unknown_fields): +class CharmRelation(Type): + _toSchema = {'interface': 'interface', 'limit': 'limit', 'name': 'name', 'optional': 'optional', 'role': 'role', 'scope': 'scope'} + _toPy = {'interface': 'interface', 'limit': 'limit', 'name': 'name', 'optional': 'optional', 'role': 'role', 'scope': 'scope'} + def __init__(self, interface=None, limit=None, name=None, optional=None, role=None, scope=None, **unknown_fields): ''' - architectures : typing.Sequence[str] - channel : str + interface : str + limit : int name : str + optional : bool + role : str + scope : str ''' - architectures_ = architectures - channel_ = channel + interface_ = interface + limit_ = limit name_ = name + optional_ = optional + role_ = role + scope_ = scope # Validate arguments against known Juju API types. - if architectures_ is not None and not isinstance(architectures_, (bytes, str, list)): - raise Exception("Expected architectures_ to be a Sequence, received: {}".format(type(architectures_))) + if interface_ is not None and not isinstance(interface_, (bytes, str)): + raise Exception("Expected interface_ to be a str, received: {}".format(type(interface_))) - if channel_ is not None and not isinstance(channel_, (bytes, str)): - raise Exception("Expected channel_ to be a str, received: {}".format(type(channel_))) + if limit_ is not None and not isinstance(limit_, int): + raise Exception("Expected limit_ to be a int, received: {}".format(type(limit_))) if name_ is not None and not isinstance(name_, (bytes, str)): raise Exception("Expected name_ to be a str, received: {}".format(type(name_))) - self.architectures = architectures_ - self.channel = channel_ - self.name = name_ - self.unknown_fields = unknown_fields - - - -class CharmContainer(Type): - _toSchema = {'mounts': 'mounts', 'resource': 'resource'} - _toPy = {'mounts': 'mounts', 'resource': 'resource'} - def __init__(self, mounts=None, resource=None, **unknown_fields): - ''' - mounts : typing.Sequence[~CharmMount] - resource : str - ''' - mounts_ = [CharmMount.from_json(o) for o in mounts or []] - resource_ = resource + if optional_ is not None and not isinstance(optional_, bool): + raise Exception("Expected optional_ to be a bool, received: {}".format(type(optional_))) - # Validate arguments against known Juju API types. - if mounts_ is not None and not isinstance(mounts_, (bytes, str, list)): - raise Exception("Expected mounts_ to be a Sequence, received: {}".format(type(mounts_))) + if role_ is not None and not isinstance(role_, (bytes, str)): + raise Exception("Expected role_ to be a str, received: {}".format(type(role_))) - if resource_ is not None and not isinstance(resource_, (bytes, str)): - raise Exception("Expected resource_ to be a str, received: {}".format(type(resource_))) + if scope_ is not None and not isinstance(scope_, (bytes, str)): + raise Exception("Expected scope_ to be a str, received: {}".format(type(scope_))) - self.mounts = mounts_ - self.resource = resource_ + self.interface = interface_ + self.limit = limit_ + self.name = name_ + self.optional = optional_ + self.role = role_ + self.scope = scope_ self.unknown_fields = unknown_fields -class CharmDeployment(Type): - _toSchema = {'min_version': 'min-version', 'mode': 'mode', 'service': 'service', 'type_': 'type'} - _toPy = {'min-version': 'min_version', 'mode': 'mode', 'service': 'service', 'type': 'type_'} - def __init__(self, min_version=None, mode=None, service=None, type_=None, **unknown_fields): +class CharmResource(Type): + _toSchema = {'description': 'description', 'fingerprint': 'fingerprint', 'name': 'name', 'origin': 'origin', 'path': 'path', 'revision': 'revision', 'size': 'size', 'type_': 'type'} + _toPy = {'description': 'description', 'fingerprint': 'fingerprint', 'name': 'name', 'origin': 'origin', 'path': 'path', 'revision': 'revision', 'size': 'size', 'type': 'type_'} + def __init__(self, description=None, fingerprint=None, name=None, origin=None, path=None, revision=None, size=None, type_=None, **unknown_fields): ''' - min_version : str - mode : str - service : str + description : str + fingerprint : typing.Sequence[int] + name : str + origin : str + path : str + revision : int + size : int type_ : str ''' - min_version_ = min_version - mode_ = mode - service_ = service + description_ = description + fingerprint_ = fingerprint + name_ = name + origin_ = origin + path_ = path + revision_ = revision + size_ = size type__ = type_ # Validate arguments against known Juju API types. - if min_version_ is not None and not isinstance(min_version_, (bytes, str)): - raise Exception("Expected min_version_ to be a str, received: {}".format(type(min_version_))) + if description_ is not None and not isinstance(description_, (bytes, str)): + raise Exception("Expected description_ to be a str, received: {}".format(type(description_))) - if mode_ is not None and not isinstance(mode_, (bytes, str)): - raise Exception("Expected mode_ to be a str, received: {}".format(type(mode_))) + if fingerprint_ is not None and not isinstance(fingerprint_, (bytes, str, list)): + raise Exception("Expected fingerprint_ to be a Sequence, received: {}".format(type(fingerprint_))) - if service_ is not None and not isinstance(service_, (bytes, str)): - raise Exception("Expected service_ to be a str, received: {}".format(type(service_))) + if name_ is not None and not isinstance(name_, (bytes, str)): + raise Exception("Expected name_ to be a str, received: {}".format(type(name_))) + + if origin_ is not None and not isinstance(origin_, (bytes, str)): + raise Exception("Expected origin_ to be a str, received: {}".format(type(origin_))) + + if path_ is not None and not isinstance(path_, (bytes, str)): + raise Exception("Expected path_ to be a str, received: {}".format(type(path_))) + + if revision_ is not None and not isinstance(revision_, int): + raise Exception("Expected revision_ to be a int, received: {}".format(type(revision_))) + + if size_ is not None and not isinstance(size_, int): + raise Exception("Expected size_ to be a int, received: {}".format(type(size_))) if type__ is not None and not isinstance(type__, (bytes, str)): raise Exception("Expected type__ to be a str, received: {}".format(type(type__))) - self.min_version = min_version_ - self.mode = mode_ - self.service = service_ + self.description = description_ + self.fingerprint = fingerprint_ + self.name = name_ + self.origin = origin_ + self.path = path_ + self.revision = revision_ + self.size = size_ self.type_ = type__ self.unknown_fields = unknown_fields -class CharmDevice(Type): - _toSchema = {'countmax': 'CountMax', 'countmin': 'CountMin', 'description': 'Description', 'name': 'Name', 'type_': 'Type'} - _toPy = {'CountMax': 'countmax', 'CountMin': 'countmin', 'Description': 'description', 'Name': 'name', 'Type': 'type_'} - def __init__(self, countmax=None, countmin=None, description=None, name=None, type_=None, **unknown_fields): +class CharmResourceMeta(Type): + _toSchema = {'description': 'description', 'name': 'name', 'path': 'path', 'type_': 'type'} + _toPy = {'description': 'description', 'name': 'name', 'path': 'path', 'type': 'type_'} + def __init__(self, description=None, name=None, path=None, type_=None, **unknown_fields): ''' - countmax : int - countmin : int description : str name : str + path : str type_ : str ''' - countmax_ = countmax - countmin_ = countmin description_ = description name_ = name + path_ = path type__ = type_ # Validate arguments against known Juju API types. - if countmax_ is not None and not isinstance(countmax_, int): - raise Exception("Expected countmax_ to be a int, received: {}".format(type(countmax_))) - - if countmin_ is not None and not isinstance(countmin_, int): - raise Exception("Expected countmin_ to be a int, received: {}".format(type(countmin_))) - if description_ is not None and not isinstance(description_, (bytes, str)): raise Exception("Expected description_ to be a str, received: {}".format(type(description_))) if name_ is not None and not isinstance(name_, (bytes, str)): raise Exception("Expected name_ to be a str, received: {}".format(type(name_))) + if path_ is not None and not isinstance(path_, (bytes, str)): + raise Exception("Expected path_ to be a str, received: {}".format(type(path_))) + if type__ is not None and not isinstance(type__, (bytes, str)): raise Exception("Expected type__ to be a str, received: {}".format(type(type__))) - self.countmax = countmax_ - self.countmin = countmin_ self.description = description_ self.name = name_ + self.path = path_ self.type_ = type__ self.unknown_fields = unknown_fields -class CharmLXDProfile(Type): - _toSchema = {'config': 'config', 'description': 'description', 'devices': 'devices'} - _toPy = {'config': 'config', 'description': 'description', 'devices': 'devices'} - def __init__(self, config=None, description=None, devices=None, **unknown_fields): +class CharmResourceResult(Type): + _toSchema = {'charmresource': 'CharmResource', 'description': 'description', 'error': 'error', 'errorresult': 'ErrorResult', 'fingerprint': 'fingerprint', 'name': 'name', 'origin': 'origin', 'path': 'path', 'revision': 'revision', 'size': 'size', 'type_': 'type'} + _toPy = {'CharmResource': 'charmresource', 'ErrorResult': 'errorresult', 'description': 'description', 'error': 'error', 'fingerprint': 'fingerprint', 'name': 'name', 'origin': 'origin', 'path': 'path', 'revision': 'revision', 'size': 'size', 'type': 'type_'} + def __init__(self, charmresource=None, errorresult=None, description=None, error=None, fingerprint=None, name=None, origin=None, path=None, revision=None, size=None, type_=None, **unknown_fields): ''' - config : typing.Mapping[str, str] + charmresource : CharmResource + errorresult : ErrorResult description : str - devices : typing.Mapping[str, typing.Any] + error : Error + fingerprint : typing.Sequence[int] + name : str + origin : str + path : str + revision : int + size : int + type_ : str ''' - config_ = config + charmresource_ = CharmResource.from_json(charmresource) if charmresource else None + errorresult_ = ErrorResult.from_json(errorresult) if errorresult else None description_ = description - devices_ = devices + error_ = Error.from_json(error) if error else None + fingerprint_ = fingerprint + name_ = name + origin_ = origin + path_ = path + revision_ = revision + size_ = size + type__ = type_ # Validate arguments against known Juju API types. - if config_ is not None and not isinstance(config_, dict): - raise Exception("Expected config_ to be a Mapping, received: {}".format(type(config_))) + if charmresource_ is not None and not isinstance(charmresource_, (dict, CharmResource)): + raise Exception("Expected charmresource_ to be a CharmResource, received: {}".format(type(charmresource_))) + + if errorresult_ is not None and not isinstance(errorresult_, (dict, ErrorResult)): + raise Exception("Expected errorresult_ to be a ErrorResult, received: {}".format(type(errorresult_))) if description_ is not None and not isinstance(description_, (bytes, str)): raise Exception("Expected description_ to be a str, received: {}".format(type(description_))) - if devices_ is not None and not isinstance(devices_, dict): - raise Exception("Expected devices_ to be a Mapping, received: {}".format(type(devices_))) + if error_ is not None and not isinstance(error_, (dict, Error)): + raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - self.config = config_ + if fingerprint_ is not None and not isinstance(fingerprint_, (bytes, str, list)): + raise Exception("Expected fingerprint_ to be a Sequence, received: {}".format(type(fingerprint_))) + + if name_ is not None and not isinstance(name_, (bytes, str)): + raise Exception("Expected name_ to be a str, received: {}".format(type(name_))) + + if origin_ is not None and not isinstance(origin_, (bytes, str)): + raise Exception("Expected origin_ to be a str, received: {}".format(type(origin_))) + + if path_ is not None and not isinstance(path_, (bytes, str)): + raise Exception("Expected path_ to be a str, received: {}".format(type(path_))) + + if revision_ is not None and not isinstance(revision_, int): + raise Exception("Expected revision_ to be a int, received: {}".format(type(revision_))) + + if size_ is not None and not isinstance(size_, int): + raise Exception("Expected size_ to be a int, received: {}".format(type(size_))) + + if type__ is not None and not isinstance(type__, (bytes, str)): + raise Exception("Expected type__ to be a str, received: {}".format(type(type__))) + + self.charmresource = charmresource_ + self.errorresult = errorresult_ self.description = description_ - self.devices = devices_ + self.error = error_ + self.fingerprint = fingerprint_ + self.name = name_ + self.origin = origin_ + self.path = path_ + self.revision = revision_ + self.size = size_ + self.type_ = type__ self.unknown_fields = unknown_fields -class CharmManifest(Type): - _toSchema = {'bases': 'bases'} - _toPy = {'bases': 'bases'} - def __init__(self, bases=None, **unknown_fields): +class CharmResourcesResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} + def __init__(self, results=None, **unknown_fields): ''' - bases : typing.Sequence[~CharmBase] + results : typing.Sequence[~CharmResourceResult] ''' - bases_ = [CharmBase.from_json(o) for o in bases or []] + results_ = [CharmResourceResult.from_json(o) for o in results or []] # Validate arguments against known Juju API types. - if bases_ is not None and not isinstance(bases_, (bytes, str, list)): - raise Exception("Expected bases_ to be a Sequence, received: {}".format(type(bases_))) + if results_ is not None and not isinstance(results_, (bytes, str, list)): + raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) - self.bases = bases_ + self.results = results_ self.unknown_fields = unknown_fields -class CharmMeta(Type): - _toSchema = {'assumes_expr': 'assumes-expr', 'categories': 'categories', 'containers': 'containers', 'deployment': 'deployment', 'description': 'description', 'devices': 'devices', 'extra_bindings': 'extra-bindings', 'min_juju_version': 'min-juju-version', 'name': 'name', 'payload_classes': 'payload-classes', 'peers': 'peers', 'provides': 'provides', 'requires': 'requires', 'resources': 'resources', 'series': 'series', 'storage': 'storage', 'subordinate': 'subordinate', 'summary': 'summary', 'tags': 'tags', 'terms': 'terms'} - _toPy = {'assumes-expr': 'assumes_expr', 'categories': 'categories', 'containers': 'containers', 'deployment': 'deployment', 'description': 'description', 'devices': 'devices', 'extra-bindings': 'extra_bindings', 'min-juju-version': 'min_juju_version', 'name': 'name', 'payload-classes': 'payload_classes', 'peers': 'peers', 'provides': 'provides', 'requires': 'requires', 'resources': 'resources', 'series': 'series', 'storage': 'storage', 'subordinate': 'subordinate', 'summary': 'summary', 'tags': 'tags', 'terms': 'terms'} - def __init__(self, assumes_expr=None, categories=None, containers=None, deployment=None, description=None, devices=None, extra_bindings=None, min_juju_version=None, name=None, payload_classes=None, peers=None, provides=None, requires=None, resources=None, series=None, storage=None, subordinate=None, summary=None, tags=None, terms=None, **unknown_fields): +class CharmStorage(Type): + _toSchema = {'count_max': 'count-max', 'count_min': 'count-min', 'description': 'description', 'location': 'location', 'minimum_size': 'minimum-size', 'name': 'name', 'properties': 'properties', 'read_only': 'read-only', 'shared': 'shared', 'type_': 'type'} + _toPy = {'count-max': 'count_max', 'count-min': 'count_min', 'description': 'description', 'location': 'location', 'minimum-size': 'minimum_size', 'name': 'name', 'properties': 'properties', 'read-only': 'read_only', 'shared': 'shared', 'type': 'type_'} + def __init__(self, count_max=None, count_min=None, description=None, location=None, minimum_size=None, name=None, properties=None, read_only=None, shared=None, type_=None, **unknown_fields): ''' - assumes_expr : ExpressionTree - categories : typing.Sequence[str] - containers : typing.Mapping[str, ~CharmContainer] - deployment : CharmDeployment + count_max : int + count_min : int description : str - devices : typing.Mapping[str, ~CharmDevice] - extra_bindings : typing.Mapping[str, str] - min_juju_version : str + location : str + minimum_size : int name : str - payload_classes : typing.Mapping[str, ~CharmPayloadClass] - peers : typing.Mapping[str, ~CharmRelation] - provides : typing.Mapping[str, ~CharmRelation] - requires : typing.Mapping[str, ~CharmRelation] - resources : typing.Mapping[str, ~CharmResourceMeta] - series : typing.Sequence[str] - storage : typing.Mapping[str, ~CharmStorage] - subordinate : bool - summary : str - tags : typing.Sequence[str] - terms : typing.Sequence[str] + properties : typing.Sequence[str] + read_only : bool + shared : bool + type_ : str ''' - assumes_expr_ = ExpressionTree.from_json(assumes_expr) if assumes_expr else None - categories_ = categories - containers_ = {k: CharmContainer.from_json(v) for k, v in (containers or dict()).items()} - deployment_ = CharmDeployment.from_json(deployment) if deployment else None + count_max_ = count_max + count_min_ = count_min description_ = description - devices_ = {k: CharmDevice.from_json(v) for k, v in (devices or dict()).items()} - extra_bindings_ = extra_bindings - min_juju_version_ = min_juju_version + location_ = location + minimum_size_ = minimum_size name_ = name - payload_classes_ = {k: CharmPayloadClass.from_json(v) for k, v in (payload_classes or dict()).items()} - peers_ = {k: CharmRelation.from_json(v) for k, v in (peers or dict()).items()} - provides_ = {k: CharmRelation.from_json(v) for k, v in (provides or dict()).items()} - requires_ = {k: CharmRelation.from_json(v) for k, v in (requires or dict()).items()} - resources_ = {k: CharmResourceMeta.from_json(v) for k, v in (resources or dict()).items()} - series_ = series - storage_ = {k: CharmStorage.from_json(v) for k, v in (storage or dict()).items()} - subordinate_ = subordinate - summary_ = summary - tags_ = tags - terms_ = terms + properties_ = properties + read_only_ = read_only + shared_ = shared + type__ = type_ # Validate arguments against known Juju API types. - if assumes_expr_ is not None and not isinstance(assumes_expr_, (dict, ExpressionTree)): - raise Exception("Expected assumes_expr_ to be a ExpressionTree, received: {}".format(type(assumes_expr_))) - - if categories_ is not None and not isinstance(categories_, (bytes, str, list)): - raise Exception("Expected categories_ to be a Sequence, received: {}".format(type(categories_))) - - if containers_ is not None and not isinstance(containers_, dict): - raise Exception("Expected containers_ to be a Mapping, received: {}".format(type(containers_))) + if count_max_ is not None and not isinstance(count_max_, int): + raise Exception("Expected count_max_ to be a int, received: {}".format(type(count_max_))) - if deployment_ is not None and not isinstance(deployment_, (dict, CharmDeployment)): - raise Exception("Expected deployment_ to be a CharmDeployment, received: {}".format(type(deployment_))) + if count_min_ is not None and not isinstance(count_min_, int): + raise Exception("Expected count_min_ to be a int, received: {}".format(type(count_min_))) if description_ is not None and not isinstance(description_, (bytes, str)): raise Exception("Expected description_ to be a str, received: {}".format(type(description_))) - if devices_ is not None and not isinstance(devices_, dict): - raise Exception("Expected devices_ to be a Mapping, received: {}".format(type(devices_))) - - if extra_bindings_ is not None and not isinstance(extra_bindings_, dict): - raise Exception("Expected extra_bindings_ to be a Mapping, received: {}".format(type(extra_bindings_))) + if location_ is not None and not isinstance(location_, (bytes, str)): + raise Exception("Expected location_ to be a str, received: {}".format(type(location_))) - if min_juju_version_ is not None and not isinstance(min_juju_version_, (bytes, str)): - raise Exception("Expected min_juju_version_ to be a str, received: {}".format(type(min_juju_version_))) + if minimum_size_ is not None and not isinstance(minimum_size_, int): + raise Exception("Expected minimum_size_ to be a int, received: {}".format(type(minimum_size_))) if name_ is not None and not isinstance(name_, (bytes, str)): raise Exception("Expected name_ to be a str, received: {}".format(type(name_))) - if payload_classes_ is not None and not isinstance(payload_classes_, dict): - raise Exception("Expected payload_classes_ to be a Mapping, received: {}".format(type(payload_classes_))) - - if peers_ is not None and not isinstance(peers_, dict): - raise Exception("Expected peers_ to be a Mapping, received: {}".format(type(peers_))) - - if provides_ is not None and not isinstance(provides_, dict): - raise Exception("Expected provides_ to be a Mapping, received: {}".format(type(provides_))) - - if requires_ is not None and not isinstance(requires_, dict): - raise Exception("Expected requires_ to be a Mapping, received: {}".format(type(requires_))) - - if resources_ is not None and not isinstance(resources_, dict): - raise Exception("Expected resources_ to be a Mapping, received: {}".format(type(resources_))) - - if series_ is not None and not isinstance(series_, (bytes, str, list)): - raise Exception("Expected series_ to be a Sequence, received: {}".format(type(series_))) - - if storage_ is not None and not isinstance(storage_, dict): - raise Exception("Expected storage_ to be a Mapping, received: {}".format(type(storage_))) - - if subordinate_ is not None and not isinstance(subordinate_, bool): - raise Exception("Expected subordinate_ to be a bool, received: {}".format(type(subordinate_))) + if properties_ is not None and not isinstance(properties_, (bytes, str, list)): + raise Exception("Expected properties_ to be a Sequence, received: {}".format(type(properties_))) - if summary_ is not None and not isinstance(summary_, (bytes, str)): - raise Exception("Expected summary_ to be a str, received: {}".format(type(summary_))) + if read_only_ is not None and not isinstance(read_only_, bool): + raise Exception("Expected read_only_ to be a bool, received: {}".format(type(read_only_))) - if tags_ is not None and not isinstance(tags_, (bytes, str, list)): - raise Exception("Expected tags_ to be a Sequence, received: {}".format(type(tags_))) + if shared_ is not None and not isinstance(shared_, bool): + raise Exception("Expected shared_ to be a bool, received: {}".format(type(shared_))) - if terms_ is not None and not isinstance(terms_, (bytes, str, list)): - raise Exception("Expected terms_ to be a Sequence, received: {}".format(type(terms_))) + if type__ is not None and not isinstance(type__, (bytes, str)): + raise Exception("Expected type__ to be a str, received: {}".format(type(type__))) - self.assumes_expr = assumes_expr_ - self.categories = categories_ - self.containers = containers_ - self.deployment = deployment_ + self.count_max = count_max_ + self.count_min = count_min_ self.description = description_ - self.devices = devices_ - self.extra_bindings = extra_bindings_ - self.min_juju_version = min_juju_version_ + self.location = location_ + self.minimum_size = minimum_size_ self.name = name_ - self.payload_classes = payload_classes_ - self.peers = peers_ - self.provides = provides_ - self.requires = requires_ - self.resources = resources_ - self.series = series_ - self.storage = storage_ - self.subordinate = subordinate_ - self.summary = summary_ - self.tags = tags_ - self.terms = terms_ + self.properties = properties_ + self.read_only = read_only_ + self.shared = shared_ + self.type_ = type__ self.unknown_fields = unknown_fields -class CharmMetric(Type): - _toSchema = {'description': 'description', 'type_': 'type'} - _toPy = {'description': 'description', 'type': 'type_'} - def __init__(self, description=None, type_=None, **unknown_fields): +class CharmURL(Type): + _toSchema = {'url': 'url'} + _toPy = {'url': 'url'} + def __init__(self, url=None, **unknown_fields): ''' - description : str - type_ : str + url : str ''' - description_ = description - type__ = type_ + url_ = url # Validate arguments against known Juju API types. - if description_ is not None and not isinstance(description_, (bytes, str)): - raise Exception("Expected description_ to be a str, received: {}".format(type(description_))) - - if type__ is not None and not isinstance(type__, (bytes, str)): - raise Exception("Expected type__ to be a str, received: {}".format(type(type__))) + if url_ is not None and not isinstance(url_, (bytes, str)): + raise Exception("Expected url_ to be a str, received: {}".format(type(url_))) - self.description = description_ - self.type_ = type__ + self.url = url_ self.unknown_fields = unknown_fields -class CharmMetrics(Type): - _toSchema = {'metrics': 'metrics', 'plan': 'plan'} - _toPy = {'metrics': 'metrics', 'plan': 'plan'} - def __init__(self, metrics=None, plan=None, **unknown_fields): +class CharmURLAndOrigin(Type): + _toSchema = {'charm_origin': 'charm-origin', 'charm_url': 'charm-url', 'macaroon': 'macaroon'} + _toPy = {'charm-origin': 'charm_origin', 'charm-url': 'charm_url', 'macaroon': 'macaroon'} + def __init__(self, charm_origin=None, charm_url=None, macaroon=None, **unknown_fields): ''' - metrics : typing.Mapping[str, ~CharmMetric] - plan : CharmPlan - ''' - metrics_ = {k: CharmMetric.from_json(v) for k, v in (metrics or dict()).items()} - plan_ = CharmPlan.from_json(plan) if plan else None - - # Validate arguments against known Juju API types. - if metrics_ is not None and not isinstance(metrics_, dict): - raise Exception("Expected metrics_ to be a Mapping, received: {}".format(type(metrics_))) - - if plan_ is not None and not isinstance(plan_, (dict, CharmPlan)): - raise Exception("Expected plan_ to be a CharmPlan, received: {}".format(type(plan_))) - - self.metrics = metrics_ - self.plan = plan_ - self.unknown_fields = unknown_fields - - - -class CharmMount(Type): - _toSchema = {'location': 'location', 'storage': 'storage'} - _toPy = {'location': 'location', 'storage': 'storage'} - def __init__(self, location=None, storage=None, **unknown_fields): - ''' - location : str - storage : str + charm_origin : CharmOrigin + charm_url : str + macaroon : Macaroon ''' - location_ = location - storage_ = storage + charm_origin_ = CharmOrigin.from_json(charm_origin) if charm_origin else None + charm_url_ = charm_url + macaroon_ = Macaroon.from_json(macaroon) if macaroon else None # Validate arguments against known Juju API types. - if location_ is not None and not isinstance(location_, (bytes, str)): - raise Exception("Expected location_ to be a str, received: {}".format(type(location_))) - - if storage_ is not None and not isinstance(storage_, (bytes, str)): - raise Exception("Expected storage_ to be a str, received: {}".format(type(storage_))) - - self.location = location_ - self.storage = storage_ - self.unknown_fields = unknown_fields - - - -class CharmOption(Type): - _toSchema = {'default': 'default', 'description': 'description', 'type_': 'type'} - _toPy = {'default': 'default', 'description': 'description', 'type': 'type_'} - def __init__(self, default=None, description=None, type_=None, **unknown_fields): - ''' - default : Any - description : str - type_ : str - ''' - default_ = default - description_ = description - type__ = type_ + if charm_origin_ is not None and not isinstance(charm_origin_, (dict, CharmOrigin)): + raise Exception("Expected charm_origin_ to be a CharmOrigin, received: {}".format(type(charm_origin_))) - # Validate arguments against known Juju API types. - if description_ is not None and not isinstance(description_, (bytes, str)): - raise Exception("Expected description_ to be a str, received: {}".format(type(description_))) + if charm_url_ is not None and not isinstance(charm_url_, (bytes, str)): + raise Exception("Expected charm_url_ to be a str, received: {}".format(type(charm_url_))) - if type__ is not None and not isinstance(type__, (bytes, str)): - raise Exception("Expected type__ to be a str, received: {}".format(type(type__))) + if macaroon_ is not None and not isinstance(macaroon_, (dict, Macaroon)): + raise Exception("Expected macaroon_ to be a Macaroon, received: {}".format(type(macaroon_))) - self.default = default_ - self.description = description_ - self.type_ = type__ + self.charm_origin = charm_origin_ + self.charm_url = charm_url_ + self.macaroon = macaroon_ self.unknown_fields = unknown_fields -class CharmOrigin(Type): - _toSchema = {'architecture': 'architecture', 'base': 'base', 'branch': 'branch', 'hash_': 'hash', 'id_': 'id', 'instance_key': 'instance-key', 'revision': 'revision', 'risk': 'risk', 'source': 'source', 'track': 'track', 'type_': 'type'} - _toPy = {'architecture': 'architecture', 'base': 'base', 'branch': 'branch', 'hash': 'hash_', 'id': 'id_', 'instance-key': 'instance_key', 'revision': 'revision', 'risk': 'risk', 'source': 'source', 'track': 'track', 'type': 'type_'} - def __init__(self, architecture=None, base=None, branch=None, hash_=None, id_=None, instance_key=None, revision=None, risk=None, source=None, track=None, type_=None, **unknown_fields): +class CharmURLAndOrigins(Type): + _toSchema = {'entities': 'entities'} + _toPy = {'entities': 'entities'} + def __init__(self, entities=None, **unknown_fields): ''' - architecture : str - base : Base - branch : str - hash_ : str - id_ : str - instance_key : str - revision : int - risk : str - source : str - track : str - type_ : str + entities : typing.Sequence[~CharmURLAndOrigin] ''' - architecture_ = architecture - base_ = Base.from_json(base) if base else None - branch_ = branch - hash__ = hash_ - id__ = id_ - instance_key_ = instance_key - revision_ = revision - risk_ = risk - source_ = source - track_ = track - type__ = type_ + entities_ = [CharmURLAndOrigin.from_json(o) for o in entities or []] # Validate arguments against known Juju API types. - if architecture_ is not None and not isinstance(architecture_, (bytes, str)): - raise Exception("Expected architecture_ to be a str, received: {}".format(type(architecture_))) - - if base_ is not None and not isinstance(base_, (dict, Base)): - raise Exception("Expected base_ to be a Base, received: {}".format(type(base_))) - - if branch_ is not None and not isinstance(branch_, (bytes, str)): - raise Exception("Expected branch_ to be a str, received: {}".format(type(branch_))) - - if hash__ is not None and not isinstance(hash__, (bytes, str)): - raise Exception("Expected hash__ to be a str, received: {}".format(type(hash__))) - - if id__ is not None and not isinstance(id__, (bytes, str)): - raise Exception("Expected id__ to be a str, received: {}".format(type(id__))) - - if instance_key_ is not None and not isinstance(instance_key_, (bytes, str)): - raise Exception("Expected instance_key_ to be a str, received: {}".format(type(instance_key_))) - - if revision_ is not None and not isinstance(revision_, int): - raise Exception("Expected revision_ to be a int, received: {}".format(type(revision_))) - - if risk_ is not None and not isinstance(risk_, (bytes, str)): - raise Exception("Expected risk_ to be a str, received: {}".format(type(risk_))) - - if source_ is not None and not isinstance(source_, (bytes, str)): - raise Exception("Expected source_ to be a str, received: {}".format(type(source_))) - - if track_ is not None and not isinstance(track_, (bytes, str)): - raise Exception("Expected track_ to be a str, received: {}".format(type(track_))) - - if type__ is not None and not isinstance(type__, (bytes, str)): - raise Exception("Expected type__ to be a str, received: {}".format(type(type__))) + if entities_ is not None and not isinstance(entities_, (bytes, str, list)): + raise Exception("Expected entities_ to be a Sequence, received: {}".format(type(entities_))) - self.architecture = architecture_ - self.base = base_ - self.branch = branch_ - self.hash_ = hash__ - self.id_ = id__ - self.instance_key = instance_key_ - self.revision = revision_ - self.risk = risk_ - self.source = source_ - self.track = track_ - self.type_ = type__ + self.entities = entities_ self.unknown_fields = unknown_fields -class CharmOriginResult(Type): - _toSchema = {'charm_origin': 'charm-origin', 'error': 'error'} - _toPy = {'charm-origin': 'charm_origin', 'error': 'error'} - def __init__(self, charm_origin=None, error=None, **unknown_fields): +class CharmURLOriginResult(Type): + _toSchema = {'charm_origin': 'charm-origin', 'error': 'error', 'url': 'url'} + _toPy = {'charm-origin': 'charm_origin', 'error': 'error', 'url': 'url'} + def __init__(self, charm_origin=None, error=None, url=None, **unknown_fields): ''' charm_origin : CharmOrigin error : Error + url : str ''' charm_origin_ = CharmOrigin.from_json(charm_origin) if charm_origin else None error_ = Error.from_json(error) if error else None + url_ = url # Validate arguments against known Juju API types. if charm_origin_ is not None and not isinstance(charm_origin_, (dict, CharmOrigin)): @@ -4939,326 +4065,246 @@ def __init__(self, charm_origin=None, error=None, **unknown_fields): if error_ is not None and not isinstance(error_, (dict, Error)): raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) + if url_ is not None and not isinstance(url_, (bytes, str)): + raise Exception("Expected url_ to be a str, received: {}".format(type(url_))) + self.charm_origin = charm_origin_ self.error = error_ + self.url = url_ self.unknown_fields = unknown_fields -class CharmPayloadClass(Type): - _toSchema = {'name': 'name', 'type_': 'type'} - _toPy = {'name': 'name', 'type': 'type_'} - def __init__(self, name=None, type_=None, **unknown_fields): +class CharmsList(Type): + _toSchema = {'names': 'names'} + _toPy = {'names': 'names'} + def __init__(self, names=None, **unknown_fields): ''' - name : str - type_ : str + names : typing.Sequence[str] ''' - name_ = name - type__ = type_ + names_ = names # Validate arguments against known Juju API types. - if name_ is not None and not isinstance(name_, (bytes, str)): - raise Exception("Expected name_ to be a str, received: {}".format(type(name_))) - - if type__ is not None and not isinstance(type__, (bytes, str)): - raise Exception("Expected type__ to be a str, received: {}".format(type(type__))) + if names_ is not None and not isinstance(names_, (bytes, str, list)): + raise Exception("Expected names_ to be a Sequence, received: {}".format(type(names_))) - self.name = name_ - self.type_ = type__ + self.names = names_ self.unknown_fields = unknown_fields -class CharmPlan(Type): - _toSchema = {'required': 'required'} - _toPy = {'required': 'required'} - def __init__(self, required=None, **unknown_fields): +class CharmsListResult(Type): + _toSchema = {'charm_urls': 'charm-urls'} + _toPy = {'charm-urls': 'charm_urls'} + def __init__(self, charm_urls=None, **unknown_fields): ''' - required : bool + charm_urls : typing.Sequence[str] ''' - required_ = required + charm_urls_ = charm_urls # Validate arguments against known Juju API types. - if required_ is not None and not isinstance(required_, bool): - raise Exception("Expected required_ to be a bool, received: {}".format(type(required_))) + if charm_urls_ is not None and not isinstance(charm_urls_, (bytes, str, list)): + raise Exception("Expected charm_urls_ to be a Sequence, received: {}".format(type(charm_urls_))) - self.required = required_ + self.charm_urls = charm_urls_ self.unknown_fields = unknown_fields -class CharmProfilingInfoResult(Type): - _toSchema = {'current_profiles': 'current-profiles', 'error': 'error', 'instance_id': 'instance-id', 'model_name': 'model-name', 'profile_changes': 'profile-changes'} - _toPy = {'current-profiles': 'current_profiles', 'error': 'error', 'instance-id': 'instance_id', 'model-name': 'model_name', 'profile-changes': 'profile_changes'} - def __init__(self, current_profiles=None, error=None, instance_id=None, model_name=None, profile_changes=None, **unknown_fields): +class Cloud(Type): + _toSchema = {'auth_types': 'auth-types', 'ca_certificates': 'ca-certificates', 'config': 'config', 'endpoint': 'endpoint', 'host_cloud_region': 'host-cloud-region', 'identity_endpoint': 'identity-endpoint', 'is_controller_cloud': 'is-controller-cloud', 'region_config': 'region-config', 'regions': 'regions', 'skip_tls_verify': 'skip-tls-verify', 'storage_endpoint': 'storage-endpoint', 'type_': 'type'} + _toPy = {'auth-types': 'auth_types', 'ca-certificates': 'ca_certificates', 'config': 'config', 'endpoint': 'endpoint', 'host-cloud-region': 'host_cloud_region', 'identity-endpoint': 'identity_endpoint', 'is-controller-cloud': 'is_controller_cloud', 'region-config': 'region_config', 'regions': 'regions', 'skip-tls-verify': 'skip_tls_verify', 'storage-endpoint': 'storage_endpoint', 'type': 'type_'} + def __init__(self, auth_types=None, ca_certificates=None, config=None, endpoint=None, host_cloud_region=None, identity_endpoint=None, is_controller_cloud=None, region_config=None, regions=None, skip_tls_verify=None, storage_endpoint=None, type_=None, **unknown_fields): ''' - current_profiles : typing.Sequence[str] - error : Error - instance_id : str - model_name : str - profile_changes : typing.Sequence[~ProfileInfoResult] + auth_types : typing.Sequence[str] + ca_certificates : typing.Sequence[str] + config : typing.Mapping[str, typing.Any] + endpoint : str + host_cloud_region : str + identity_endpoint : str + is_controller_cloud : bool + region_config : typing.Mapping[str, typing.Any] + regions : typing.Sequence[~CloudRegion] + skip_tls_verify : bool + storage_endpoint : str + type_ : str ''' - current_profiles_ = current_profiles - error_ = Error.from_json(error) if error else None - instance_id_ = instance_id - model_name_ = model_name - profile_changes_ = [ProfileInfoResult.from_json(o) for o in profile_changes or []] + auth_types_ = auth_types + ca_certificates_ = ca_certificates + config_ = config + endpoint_ = endpoint + host_cloud_region_ = host_cloud_region + identity_endpoint_ = identity_endpoint + is_controller_cloud_ = is_controller_cloud + region_config_ = region_config + regions_ = [CloudRegion.from_json(o) for o in regions or []] + skip_tls_verify_ = skip_tls_verify + storage_endpoint_ = storage_endpoint + type__ = type_ # Validate arguments against known Juju API types. - if current_profiles_ is not None and not isinstance(current_profiles_, (bytes, str, list)): - raise Exception("Expected current_profiles_ to be a Sequence, received: {}".format(type(current_profiles_))) - - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) + if auth_types_ is not None and not isinstance(auth_types_, (bytes, str, list)): + raise Exception("Expected auth_types_ to be a Sequence, received: {}".format(type(auth_types_))) - if instance_id_ is not None and not isinstance(instance_id_, (bytes, str)): - raise Exception("Expected instance_id_ to be a str, received: {}".format(type(instance_id_))) + if ca_certificates_ is not None and not isinstance(ca_certificates_, (bytes, str, list)): + raise Exception("Expected ca_certificates_ to be a Sequence, received: {}".format(type(ca_certificates_))) - if model_name_ is not None and not isinstance(model_name_, (bytes, str)): - raise Exception("Expected model_name_ to be a str, received: {}".format(type(model_name_))) - - if profile_changes_ is not None and not isinstance(profile_changes_, (bytes, str, list)): - raise Exception("Expected profile_changes_ to be a Sequence, received: {}".format(type(profile_changes_))) - - self.current_profiles = current_profiles_ - self.error = error_ - self.instance_id = instance_id_ - self.model_name = model_name_ - self.profile_changes = profile_changes_ - self.unknown_fields = unknown_fields + if config_ is not None and not isinstance(config_, dict): + raise Exception("Expected config_ to be a Mapping, received: {}".format(type(config_))) + if endpoint_ is not None and not isinstance(endpoint_, (bytes, str)): + raise Exception("Expected endpoint_ to be a str, received: {}".format(type(endpoint_))) + if host_cloud_region_ is not None and not isinstance(host_cloud_region_, (bytes, str)): + raise Exception("Expected host_cloud_region_ to be a str, received: {}".format(type(host_cloud_region_))) -class CharmRelation(Type): - _toSchema = {'interface': 'interface', 'limit': 'limit', 'name': 'name', 'optional': 'optional', 'role': 'role', 'scope': 'scope'} - _toPy = {'interface': 'interface', 'limit': 'limit', 'name': 'name', 'optional': 'optional', 'role': 'role', 'scope': 'scope'} - def __init__(self, interface=None, limit=None, name=None, optional=None, role=None, scope=None, **unknown_fields): - ''' - interface : str - limit : int - name : str - optional : bool - role : str - scope : str - ''' - interface_ = interface - limit_ = limit - name_ = name - optional_ = optional - role_ = role - scope_ = scope + if identity_endpoint_ is not None and not isinstance(identity_endpoint_, (bytes, str)): + raise Exception("Expected identity_endpoint_ to be a str, received: {}".format(type(identity_endpoint_))) - # Validate arguments against known Juju API types. - if interface_ is not None and not isinstance(interface_, (bytes, str)): - raise Exception("Expected interface_ to be a str, received: {}".format(type(interface_))) + if is_controller_cloud_ is not None and not isinstance(is_controller_cloud_, bool): + raise Exception("Expected is_controller_cloud_ to be a bool, received: {}".format(type(is_controller_cloud_))) - if limit_ is not None and not isinstance(limit_, int): - raise Exception("Expected limit_ to be a int, received: {}".format(type(limit_))) + if region_config_ is not None and not isinstance(region_config_, dict): + raise Exception("Expected region_config_ to be a Mapping, received: {}".format(type(region_config_))) - if name_ is not None and not isinstance(name_, (bytes, str)): - raise Exception("Expected name_ to be a str, received: {}".format(type(name_))) + if regions_ is not None and not isinstance(regions_, (bytes, str, list)): + raise Exception("Expected regions_ to be a Sequence, received: {}".format(type(regions_))) - if optional_ is not None and not isinstance(optional_, bool): - raise Exception("Expected optional_ to be a bool, received: {}".format(type(optional_))) + if skip_tls_verify_ is not None and not isinstance(skip_tls_verify_, bool): + raise Exception("Expected skip_tls_verify_ to be a bool, received: {}".format(type(skip_tls_verify_))) - if role_ is not None and not isinstance(role_, (bytes, str)): - raise Exception("Expected role_ to be a str, received: {}".format(type(role_))) + if storage_endpoint_ is not None and not isinstance(storage_endpoint_, (bytes, str)): + raise Exception("Expected storage_endpoint_ to be a str, received: {}".format(type(storage_endpoint_))) - if scope_ is not None and not isinstance(scope_, (bytes, str)): - raise Exception("Expected scope_ to be a str, received: {}".format(type(scope_))) + if type__ is not None and not isinstance(type__, (bytes, str)): + raise Exception("Expected type__ to be a str, received: {}".format(type(type__))) - self.interface = interface_ - self.limit = limit_ - self.name = name_ - self.optional = optional_ - self.role = role_ - self.scope = scope_ + self.auth_types = auth_types_ + self.ca_certificates = ca_certificates_ + self.config = config_ + self.endpoint = endpoint_ + self.host_cloud_region = host_cloud_region_ + self.identity_endpoint = identity_endpoint_ + self.is_controller_cloud = is_controller_cloud_ + self.region_config = region_config_ + self.regions = regions_ + self.skip_tls_verify = skip_tls_verify_ + self.storage_endpoint = storage_endpoint_ + self.type_ = type__ self.unknown_fields = unknown_fields -class CharmResource(Type): - _toSchema = {'description': 'description', 'fingerprint': 'fingerprint', 'name': 'name', 'origin': 'origin', 'path': 'path', 'revision': 'revision', 'size': 'size', 'type_': 'type'} - _toPy = {'description': 'description', 'fingerprint': 'fingerprint', 'name': 'name', 'origin': 'origin', 'path': 'path', 'revision': 'revision', 'size': 'size', 'type': 'type_'} - def __init__(self, description=None, fingerprint=None, name=None, origin=None, path=None, revision=None, size=None, type_=None, **unknown_fields): +class CloudCredential(Type): + _toSchema = {'attrs': 'attrs', 'auth_type': 'auth-type', 'redacted': 'redacted'} + _toPy = {'attrs': 'attrs', 'auth-type': 'auth_type', 'redacted': 'redacted'} + def __init__(self, attrs=None, auth_type=None, redacted=None, **unknown_fields): ''' - description : str - fingerprint : typing.Sequence[int] - name : str - origin : str - path : str - revision : int - size : int - type_ : str + attrs : typing.Mapping[str, str] + auth_type : str + redacted : typing.Sequence[str] ''' - description_ = description - fingerprint_ = fingerprint - name_ = name - origin_ = origin - path_ = path - revision_ = revision - size_ = size - type__ = type_ + attrs_ = attrs + auth_type_ = auth_type + redacted_ = redacted # Validate arguments against known Juju API types. - if description_ is not None and not isinstance(description_, (bytes, str)): - raise Exception("Expected description_ to be a str, received: {}".format(type(description_))) + if attrs_ is not None and not isinstance(attrs_, dict): + raise Exception("Expected attrs_ to be a Mapping, received: {}".format(type(attrs_))) - if fingerprint_ is not None and not isinstance(fingerprint_, (bytes, str, list)): - raise Exception("Expected fingerprint_ to be a Sequence, received: {}".format(type(fingerprint_))) + if auth_type_ is not None and not isinstance(auth_type_, (bytes, str)): + raise Exception("Expected auth_type_ to be a str, received: {}".format(type(auth_type_))) - if name_ is not None and not isinstance(name_, (bytes, str)): - raise Exception("Expected name_ to be a str, received: {}".format(type(name_))) + if redacted_ is not None and not isinstance(redacted_, (bytes, str, list)): + raise Exception("Expected redacted_ to be a Sequence, received: {}".format(type(redacted_))) - if origin_ is not None and not isinstance(origin_, (bytes, str)): - raise Exception("Expected origin_ to be a str, received: {}".format(type(origin_))) + self.attrs = attrs_ + self.auth_type = auth_type_ + self.redacted = redacted_ + self.unknown_fields = unknown_fields - if path_ is not None and not isinstance(path_, (bytes, str)): - raise Exception("Expected path_ to be a str, received: {}".format(type(path_))) - if revision_ is not None and not isinstance(revision_, int): - raise Exception("Expected revision_ to be a int, received: {}".format(type(revision_))) - if size_ is not None and not isinstance(size_, int): - raise Exception("Expected size_ to be a int, received: {}".format(type(size_))) +class CloudCredentialArg(Type): + _toSchema = {'cloud_name': 'cloud-name', 'credential_name': 'credential-name'} + _toPy = {'cloud-name': 'cloud_name', 'credential-name': 'credential_name'} + def __init__(self, cloud_name=None, credential_name=None, **unknown_fields): + ''' + cloud_name : str + credential_name : str + ''' + cloud_name_ = cloud_name + credential_name_ = credential_name - if type__ is not None and not isinstance(type__, (bytes, str)): - raise Exception("Expected type__ to be a str, received: {}".format(type(type__))) + # Validate arguments against known Juju API types. + if cloud_name_ is not None and not isinstance(cloud_name_, (bytes, str)): + raise Exception("Expected cloud_name_ to be a str, received: {}".format(type(cloud_name_))) - self.description = description_ - self.fingerprint = fingerprint_ - self.name = name_ - self.origin = origin_ - self.path = path_ - self.revision = revision_ - self.size = size_ - self.type_ = type__ + if credential_name_ is not None and not isinstance(credential_name_, (bytes, str)): + raise Exception("Expected credential_name_ to be a str, received: {}".format(type(credential_name_))) + + self.cloud_name = cloud_name_ + self.credential_name = credential_name_ self.unknown_fields = unknown_fields -class CharmResourceMeta(Type): - _toSchema = {'description': 'description', 'name': 'name', 'path': 'path', 'type_': 'type'} - _toPy = {'description': 'description', 'name': 'name', 'path': 'path', 'type': 'type_'} - def __init__(self, description=None, name=None, path=None, type_=None, **unknown_fields): +class CloudCredentialArgs(Type): + _toSchema = {'credentials': 'credentials', 'include_secrets': 'include-secrets'} + _toPy = {'credentials': 'credentials', 'include-secrets': 'include_secrets'} + def __init__(self, credentials=None, include_secrets=None, **unknown_fields): ''' - description : str - name : str - path : str - type_ : str + credentials : typing.Sequence[~CloudCredentialArg] + include_secrets : bool ''' - description_ = description - name_ = name - path_ = path - type__ = type_ + credentials_ = [CloudCredentialArg.from_json(o) for o in credentials or []] + include_secrets_ = include_secrets # Validate arguments against known Juju API types. - if description_ is not None and not isinstance(description_, (bytes, str)): - raise Exception("Expected description_ to be a str, received: {}".format(type(description_))) - - if name_ is not None and not isinstance(name_, (bytes, str)): - raise Exception("Expected name_ to be a str, received: {}".format(type(name_))) - - if path_ is not None and not isinstance(path_, (bytes, str)): - raise Exception("Expected path_ to be a str, received: {}".format(type(path_))) + if credentials_ is not None and not isinstance(credentials_, (bytes, str, list)): + raise Exception("Expected credentials_ to be a Sequence, received: {}".format(type(credentials_))) - if type__ is not None and not isinstance(type__, (bytes, str)): - raise Exception("Expected type__ to be a str, received: {}".format(type(type__))) + if include_secrets_ is not None and not isinstance(include_secrets_, bool): + raise Exception("Expected include_secrets_ to be a bool, received: {}".format(type(include_secrets_))) - self.description = description_ - self.name = name_ - self.path = path_ - self.type_ = type__ + self.credentials = credentials_ + self.include_secrets = include_secrets_ self.unknown_fields = unknown_fields -class CharmResourceResult(Type): - _toSchema = {'charmresource': 'CharmResource', 'description': 'description', 'error': 'error', 'errorresult': 'ErrorResult', 'fingerprint': 'fingerprint', 'name': 'name', 'origin': 'origin', 'path': 'path', 'revision': 'revision', 'size': 'size', 'type_': 'type'} - _toPy = {'CharmResource': 'charmresource', 'ErrorResult': 'errorresult', 'description': 'description', 'error': 'error', 'fingerprint': 'fingerprint', 'name': 'name', 'origin': 'origin', 'path': 'path', 'revision': 'revision', 'size': 'size', 'type': 'type_'} - def __init__(self, charmresource=None, errorresult=None, description=None, error=None, fingerprint=None, name=None, origin=None, path=None, revision=None, size=None, type_=None, **unknown_fields): +class CloudCredentialResult(Type): + _toSchema = {'error': 'error', 'result': 'result'} + _toPy = {'error': 'error', 'result': 'result'} + def __init__(self, error=None, result=None, **unknown_fields): ''' - charmresource : CharmResource - errorresult : ErrorResult - description : str error : Error - fingerprint : typing.Sequence[int] - name : str - origin : str - path : str - revision : int - size : int - type_ : str + result : CloudCredential ''' - charmresource_ = CharmResource.from_json(charmresource) if charmresource else None - errorresult_ = ErrorResult.from_json(errorresult) if errorresult else None - description_ = description error_ = Error.from_json(error) if error else None - fingerprint_ = fingerprint - name_ = name - origin_ = origin - path_ = path - revision_ = revision - size_ = size - type__ = type_ + result_ = CloudCredential.from_json(result) if result else None # Validate arguments against known Juju API types. - if charmresource_ is not None and not isinstance(charmresource_, (dict, CharmResource)): - raise Exception("Expected charmresource_ to be a CharmResource, received: {}".format(type(charmresource_))) - - if errorresult_ is not None and not isinstance(errorresult_, (dict, ErrorResult)): - raise Exception("Expected errorresult_ to be a ErrorResult, received: {}".format(type(errorresult_))) - - if description_ is not None and not isinstance(description_, (bytes, str)): - raise Exception("Expected description_ to be a str, received: {}".format(type(description_))) - if error_ is not None and not isinstance(error_, (dict, Error)): raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - if fingerprint_ is not None and not isinstance(fingerprint_, (bytes, str, list)): - raise Exception("Expected fingerprint_ to be a Sequence, received: {}".format(type(fingerprint_))) + if result_ is not None and not isinstance(result_, (dict, CloudCredential)): + raise Exception("Expected result_ to be a CloudCredential, received: {}".format(type(result_))) - if name_ is not None and not isinstance(name_, (bytes, str)): - raise Exception("Expected name_ to be a str, received: {}".format(type(name_))) + self.error = error_ + self.result = result_ + self.unknown_fields = unknown_fields - if origin_ is not None and not isinstance(origin_, (bytes, str)): - raise Exception("Expected origin_ to be a str, received: {}".format(type(origin_))) - if path_ is not None and not isinstance(path_, (bytes, str)): - raise Exception("Expected path_ to be a str, received: {}".format(type(path_))) - if revision_ is not None and not isinstance(revision_, int): - raise Exception("Expected revision_ to be a int, received: {}".format(type(revision_))) - - if size_ is not None and not isinstance(size_, int): - raise Exception("Expected size_ to be a int, received: {}".format(type(size_))) - - if type__ is not None and not isinstance(type__, (bytes, str)): - raise Exception("Expected type__ to be a str, received: {}".format(type(type__))) - - self.charmresource = charmresource_ - self.errorresult = errorresult_ - self.description = description_ - self.error = error_ - self.fingerprint = fingerprint_ - self.name = name_ - self.origin = origin_ - self.path = path_ - self.revision = revision_ - self.size = size_ - self.type_ = type__ - self.unknown_fields = unknown_fields - - - -class CharmResourcesResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None, **unknown_fields): - ''' - results : typing.Sequence[~CharmResourceResult] - ''' - results_ = [CharmResourceResult.from_json(o) for o in results or []] +class CloudCredentialResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} + def __init__(self, results=None, **unknown_fields): + ''' + results : typing.Sequence[~CloudCredentialResult] + ''' + results_ = [CloudCredentialResult.from_json(o) for o in results or []] # Validate arguments against known Juju API types. if results_ is not None and not isinstance(results_, (bytes, str, list)): @@ -5269,352 +4315,384 @@ def __init__(self, results=None, **unknown_fields): -class CharmStorage(Type): - _toSchema = {'count_max': 'count-max', 'count_min': 'count-min', 'description': 'description', 'location': 'location', 'minimum_size': 'minimum-size', 'name': 'name', 'properties': 'properties', 'read_only': 'read-only', 'shared': 'shared', 'type_': 'type'} - _toPy = {'count-max': 'count_max', 'count-min': 'count_min', 'description': 'description', 'location': 'location', 'minimum-size': 'minimum_size', 'name': 'name', 'properties': 'properties', 'read-only': 'read_only', 'shared': 'shared', 'type': 'type_'} - def __init__(self, count_max=None, count_min=None, description=None, location=None, minimum_size=None, name=None, properties=None, read_only=None, shared=None, type_=None, **unknown_fields): +class CloudDetails(Type): + _toSchema = {'auth_types': 'auth-types', 'endpoint': 'endpoint', 'identity_endpoint': 'identity-endpoint', 'regions': 'regions', 'storage_endpoint': 'storage-endpoint', 'type_': 'type'} + _toPy = {'auth-types': 'auth_types', 'endpoint': 'endpoint', 'identity-endpoint': 'identity_endpoint', 'regions': 'regions', 'storage-endpoint': 'storage_endpoint', 'type': 'type_'} + def __init__(self, auth_types=None, endpoint=None, identity_endpoint=None, regions=None, storage_endpoint=None, type_=None, **unknown_fields): ''' - count_max : int - count_min : int - description : str - location : str - minimum_size : int - name : str - properties : typing.Sequence[str] - read_only : bool - shared : bool + auth_types : typing.Sequence[str] + endpoint : str + identity_endpoint : str + regions : typing.Sequence[~CloudRegion] + storage_endpoint : str type_ : str ''' - count_max_ = count_max - count_min_ = count_min - description_ = description - location_ = location - minimum_size_ = minimum_size - name_ = name - properties_ = properties - read_only_ = read_only - shared_ = shared + auth_types_ = auth_types + endpoint_ = endpoint + identity_endpoint_ = identity_endpoint + regions_ = [CloudRegion.from_json(o) for o in regions or []] + storage_endpoint_ = storage_endpoint type__ = type_ # Validate arguments against known Juju API types. - if count_max_ is not None and not isinstance(count_max_, int): - raise Exception("Expected count_max_ to be a int, received: {}".format(type(count_max_))) - - if count_min_ is not None and not isinstance(count_min_, int): - raise Exception("Expected count_min_ to be a int, received: {}".format(type(count_min_))) - - if description_ is not None and not isinstance(description_, (bytes, str)): - raise Exception("Expected description_ to be a str, received: {}".format(type(description_))) - - if location_ is not None and not isinstance(location_, (bytes, str)): - raise Exception("Expected location_ to be a str, received: {}".format(type(location_))) - - if minimum_size_ is not None and not isinstance(minimum_size_, int): - raise Exception("Expected minimum_size_ to be a int, received: {}".format(type(minimum_size_))) + if auth_types_ is not None and not isinstance(auth_types_, (bytes, str, list)): + raise Exception("Expected auth_types_ to be a Sequence, received: {}".format(type(auth_types_))) - if name_ is not None and not isinstance(name_, (bytes, str)): - raise Exception("Expected name_ to be a str, received: {}".format(type(name_))) + if endpoint_ is not None and not isinstance(endpoint_, (bytes, str)): + raise Exception("Expected endpoint_ to be a str, received: {}".format(type(endpoint_))) - if properties_ is not None and not isinstance(properties_, (bytes, str, list)): - raise Exception("Expected properties_ to be a Sequence, received: {}".format(type(properties_))) + if identity_endpoint_ is not None and not isinstance(identity_endpoint_, (bytes, str)): + raise Exception("Expected identity_endpoint_ to be a str, received: {}".format(type(identity_endpoint_))) - if read_only_ is not None and not isinstance(read_only_, bool): - raise Exception("Expected read_only_ to be a bool, received: {}".format(type(read_only_))) + if regions_ is not None and not isinstance(regions_, (bytes, str, list)): + raise Exception("Expected regions_ to be a Sequence, received: {}".format(type(regions_))) - if shared_ is not None and not isinstance(shared_, bool): - raise Exception("Expected shared_ to be a bool, received: {}".format(type(shared_))) + if storage_endpoint_ is not None and not isinstance(storage_endpoint_, (bytes, str)): + raise Exception("Expected storage_endpoint_ to be a str, received: {}".format(type(storage_endpoint_))) if type__ is not None and not isinstance(type__, (bytes, str)): raise Exception("Expected type__ to be a str, received: {}".format(type(type__))) - self.count_max = count_max_ - self.count_min = count_min_ - self.description = description_ - self.location = location_ - self.minimum_size = minimum_size_ - self.name = name_ - self.properties = properties_ - self.read_only = read_only_ - self.shared = shared_ + self.auth_types = auth_types_ + self.endpoint = endpoint_ + self.identity_endpoint = identity_endpoint_ + self.regions = regions_ + self.storage_endpoint = storage_endpoint_ self.type_ = type__ self.unknown_fields = unknown_fields -class CharmURL(Type): - _toSchema = {'url': 'url'} - _toPy = {'url': 'url'} - def __init__(self, url=None, **unknown_fields): +class CloudImageMetadata(Type): + _toSchema = {'arch': 'arch', 'image_id': 'image-id', 'priority': 'priority', 'region': 'region', 'root_storage_size': 'root-storage-size', 'root_storage_type': 'root-storage-type', 'source': 'source', 'stream': 'stream', 'version': 'version', 'virt_type': 'virt-type'} + _toPy = {'arch': 'arch', 'image-id': 'image_id', 'priority': 'priority', 'region': 'region', 'root-storage-size': 'root_storage_size', 'root-storage-type': 'root_storage_type', 'source': 'source', 'stream': 'stream', 'version': 'version', 'virt-type': 'virt_type'} + def __init__(self, arch=None, image_id=None, priority=None, region=None, root_storage_size=None, root_storage_type=None, source=None, stream=None, version=None, virt_type=None, **unknown_fields): ''' - url : str + arch : str + image_id : str + priority : int + region : str + root_storage_size : int + root_storage_type : str + source : str + stream : str + version : str + virt_type : str ''' - url_ = url + arch_ = arch + image_id_ = image_id + priority_ = priority + region_ = region + root_storage_size_ = root_storage_size + root_storage_type_ = root_storage_type + source_ = source + stream_ = stream + version_ = version + virt_type_ = virt_type # Validate arguments against known Juju API types. - if url_ is not None and not isinstance(url_, (bytes, str)): - raise Exception("Expected url_ to be a str, received: {}".format(type(url_))) + if arch_ is not None and not isinstance(arch_, (bytes, str)): + raise Exception("Expected arch_ to be a str, received: {}".format(type(arch_))) - self.url = url_ - self.unknown_fields = unknown_fields + if image_id_ is not None and not isinstance(image_id_, (bytes, str)): + raise Exception("Expected image_id_ to be a str, received: {}".format(type(image_id_))) + if priority_ is not None and not isinstance(priority_, int): + raise Exception("Expected priority_ to be a int, received: {}".format(type(priority_))) + if region_ is not None and not isinstance(region_, (bytes, str)): + raise Exception("Expected region_ to be a str, received: {}".format(type(region_))) -class CharmURLAndOrigin(Type): - _toSchema = {'charm_origin': 'charm-origin', 'charm_url': 'charm-url', 'macaroon': 'macaroon'} - _toPy = {'charm-origin': 'charm_origin', 'charm-url': 'charm_url', 'macaroon': 'macaroon'} - def __init__(self, charm_origin=None, charm_url=None, macaroon=None, **unknown_fields): - ''' - charm_origin : CharmOrigin - charm_url : str - macaroon : Macaroon - ''' - charm_origin_ = CharmOrigin.from_json(charm_origin) if charm_origin else None - charm_url_ = charm_url - macaroon_ = Macaroon.from_json(macaroon) if macaroon else None + if root_storage_size_ is not None and not isinstance(root_storage_size_, int): + raise Exception("Expected root_storage_size_ to be a int, received: {}".format(type(root_storage_size_))) - # Validate arguments against known Juju API types. - if charm_origin_ is not None and not isinstance(charm_origin_, (dict, CharmOrigin)): - raise Exception("Expected charm_origin_ to be a CharmOrigin, received: {}".format(type(charm_origin_))) + if root_storage_type_ is not None and not isinstance(root_storage_type_, (bytes, str)): + raise Exception("Expected root_storage_type_ to be a str, received: {}".format(type(root_storage_type_))) - if charm_url_ is not None and not isinstance(charm_url_, (bytes, str)): - raise Exception("Expected charm_url_ to be a str, received: {}".format(type(charm_url_))) + if source_ is not None and not isinstance(source_, (bytes, str)): + raise Exception("Expected source_ to be a str, received: {}".format(type(source_))) - if macaroon_ is not None and not isinstance(macaroon_, (dict, Macaroon)): - raise Exception("Expected macaroon_ to be a Macaroon, received: {}".format(type(macaroon_))) + if stream_ is not None and not isinstance(stream_, (bytes, str)): + raise Exception("Expected stream_ to be a str, received: {}".format(type(stream_))) - self.charm_origin = charm_origin_ - self.charm_url = charm_url_ - self.macaroon = macaroon_ + if version_ is not None and not isinstance(version_, (bytes, str)): + raise Exception("Expected version_ to be a str, received: {}".format(type(version_))) + + if virt_type_ is not None and not isinstance(virt_type_, (bytes, str)): + raise Exception("Expected virt_type_ to be a str, received: {}".format(type(virt_type_))) + + 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.source = source_ + self.stream = stream_ + self.version = version_ + self.virt_type = virt_type_ self.unknown_fields = unknown_fields -class CharmURLAndOrigins(Type): - _toSchema = {'entities': 'entities'} - _toPy = {'entities': 'entities'} - def __init__(self, entities=None, **unknown_fields): +class CloudImageMetadataList(Type): + _toSchema = {'metadata': 'metadata'} + _toPy = {'metadata': 'metadata'} + def __init__(self, metadata=None, **unknown_fields): ''' - entities : typing.Sequence[~CharmURLAndOrigin] + metadata : typing.Sequence[~CloudImageMetadata] ''' - entities_ = [CharmURLAndOrigin.from_json(o) for o in entities or []] + metadata_ = [CloudImageMetadata.from_json(o) for o in metadata or []] # Validate arguments against known Juju API types. - if entities_ is not None and not isinstance(entities_, (bytes, str, list)): - raise Exception("Expected entities_ to be a Sequence, received: {}".format(type(entities_))) + if metadata_ is not None and not isinstance(metadata_, (bytes, str, list)): + raise Exception("Expected metadata_ to be a Sequence, received: {}".format(type(metadata_))) - self.entities = entities_ + self.metadata = metadata_ self.unknown_fields = unknown_fields -class CharmURLOriginResult(Type): - _toSchema = {'charm_origin': 'charm-origin', 'error': 'error', 'url': 'url'} - _toPy = {'charm-origin': 'charm_origin', 'error': 'error', 'url': 'url'} - def __init__(self, charm_origin=None, error=None, url=None, **unknown_fields): +class CloudInfo(Type): + _toSchema = {'clouddetails': 'CloudDetails', 'users': 'users'} + _toPy = {'CloudDetails': 'clouddetails', 'users': 'users'} + def __init__(self, clouddetails=None, users=None, **unknown_fields): ''' - charm_origin : CharmOrigin - error : Error - url : str + clouddetails : CloudDetails + users : typing.Sequence[~CloudUserInfo] ''' - charm_origin_ = CharmOrigin.from_json(charm_origin) if charm_origin else None - error_ = Error.from_json(error) if error else None - url_ = url + clouddetails_ = CloudDetails.from_json(clouddetails) if clouddetails else None + users_ = [CloudUserInfo.from_json(o) for o in users or []] # Validate arguments against known Juju API types. - if charm_origin_ is not None and not isinstance(charm_origin_, (dict, CharmOrigin)): - raise Exception("Expected charm_origin_ to be a CharmOrigin, received: {}".format(type(charm_origin_))) - - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) + if clouddetails_ is not None and not isinstance(clouddetails_, (dict, CloudDetails)): + raise Exception("Expected clouddetails_ to be a CloudDetails, received: {}".format(type(clouddetails_))) - if url_ is not None and not isinstance(url_, (bytes, str)): - raise Exception("Expected url_ to be a str, received: {}".format(type(url_))) + if users_ is not None and not isinstance(users_, (bytes, str, list)): + raise Exception("Expected users_ to be a Sequence, received: {}".format(type(users_))) - self.charm_origin = charm_origin_ - self.error = error_ - self.url = url_ + self.clouddetails = clouddetails_ + self.users = users_ self.unknown_fields = unknown_fields -class CharmURLs(Type): - _toSchema = {'urls': 'urls'} - _toPy = {'urls': 'urls'} - def __init__(self, urls=None, **unknown_fields): - ''' - urls : typing.Sequence[~CharmURL] +class CloudInfoResult(Type): + _toSchema = {'error': 'error', 'result': 'result'} + _toPy = {'error': 'error', 'result': 'result'} + def __init__(self, error=None, result=None, **unknown_fields): ''' - urls_ = [CharmURL.from_json(o) for o in urls or []] + error : Error + result : CloudInfo + ''' + error_ = Error.from_json(error) if error else None + result_ = CloudInfo.from_json(result) if result else None # Validate arguments against known Juju API types. - if urls_ is not None and not isinstance(urls_, (bytes, str, list)): - raise Exception("Expected urls_ to be a Sequence, received: {}".format(type(urls_))) + if error_ is not None and not isinstance(error_, (dict, Error)): + raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) + + if result_ is not None and not isinstance(result_, (dict, CloudInfo)): + raise Exception("Expected result_ to be a CloudInfo, received: {}".format(type(result_))) - self.urls = urls_ + self.error = error_ + self.result = result_ self.unknown_fields = unknown_fields -class CharmsList(Type): - _toSchema = {'names': 'names'} - _toPy = {'names': 'names'} - def __init__(self, names=None, **unknown_fields): +class CloudInfoResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} + def __init__(self, results=None, **unknown_fields): ''' - names : typing.Sequence[str] + results : typing.Sequence[~CloudInfoResult] ''' - names_ = names + results_ = [CloudInfoResult.from_json(o) for o in results or []] # Validate arguments against known Juju API types. - if names_ is not None and not isinstance(names_, (bytes, str, list)): - raise Exception("Expected names_ to be a Sequence, received: {}".format(type(names_))) + if results_ is not None and not isinstance(results_, (bytes, str, list)): + raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) - self.names = names_ + self.results = results_ self.unknown_fields = unknown_fields -class CharmsListResult(Type): - _toSchema = {'charm_urls': 'charm-urls'} - _toPy = {'charm-urls': 'charm_urls'} - def __init__(self, charm_urls=None, **unknown_fields): +class CloudInstanceTypesConstraint(Type): + _toSchema = {'cloud_tag': 'cloud-tag', 'constraints': 'constraints', 'region': 'region'} + _toPy = {'cloud-tag': 'cloud_tag', 'constraints': 'constraints', 'region': 'region'} + def __init__(self, cloud_tag=None, constraints=None, region=None, **unknown_fields): ''' - charm_urls : typing.Sequence[str] + cloud_tag : str + constraints : Value + region : str ''' - charm_urls_ = charm_urls + cloud_tag_ = cloud_tag + constraints_ = Value.from_json(constraints) if constraints else None + region_ = region # Validate arguments against known Juju API types. - if charm_urls_ is not None and not isinstance(charm_urls_, (bytes, str, list)): - raise Exception("Expected charm_urls_ to be a Sequence, received: {}".format(type(charm_urls_))) + if cloud_tag_ is not None and not isinstance(cloud_tag_, (bytes, str)): + raise Exception("Expected cloud_tag_ to be a str, received: {}".format(type(cloud_tag_))) - self.charm_urls = charm_urls_ + if constraints_ is not None and not isinstance(constraints_, (dict, Value)): + raise Exception("Expected constraints_ to be a Value, received: {}".format(type(constraints_))) + + if region_ is not None and not isinstance(region_, (bytes, str)): + raise Exception("Expected region_ to be a str, received: {}".format(type(region_))) + + self.cloud_tag = cloud_tag_ + self.constraints = constraints_ + self.region = region_ self.unknown_fields = unknown_fields -class ClaimLeadershipBulkParams(Type): - _toSchema = {'params': 'params'} - _toPy = {'params': 'params'} - def __init__(self, params=None, **unknown_fields): +class CloudInstanceTypesConstraints(Type): + _toSchema = {'constraints': 'constraints'} + _toPy = {'constraints': 'constraints'} + def __init__(self, constraints=None, **unknown_fields): ''' - params : typing.Sequence[~ClaimLeadershipParams] + constraints : typing.Sequence[~CloudInstanceTypesConstraint] ''' - params_ = [ClaimLeadershipParams.from_json(o) for o in params or []] + constraints_ = [CloudInstanceTypesConstraint.from_json(o) for o in constraints or []] # Validate arguments against known Juju API types. - if params_ is not None and not isinstance(params_, (bytes, str, list)): - raise Exception("Expected params_ to be a Sequence, received: {}".format(type(params_))) + if constraints_ is not None and not isinstance(constraints_, (bytes, str, list)): + raise Exception("Expected constraints_ to be a Sequence, received: {}".format(type(constraints_))) - self.params = params_ + self.constraints = constraints_ self.unknown_fields = unknown_fields -class ClaimLeadershipBulkResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None, **unknown_fields): +class CloudRegion(Type): + _toSchema = {'endpoint': 'endpoint', 'identity_endpoint': 'identity-endpoint', 'name': 'name', 'storage_endpoint': 'storage-endpoint'} + _toPy = {'endpoint': 'endpoint', 'identity-endpoint': 'identity_endpoint', 'name': 'name', 'storage-endpoint': 'storage_endpoint'} + def __init__(self, endpoint=None, identity_endpoint=None, name=None, storage_endpoint=None, **unknown_fields): ''' - results : typing.Sequence[~ErrorResult] + endpoint : str + identity_endpoint : str + name : str + storage_endpoint : str ''' - results_ = [ErrorResult.from_json(o) for o in results or []] + endpoint_ = endpoint + identity_endpoint_ = identity_endpoint + name_ = name + storage_endpoint_ = storage_endpoint # Validate arguments against known Juju API types. - if results_ is not None and not isinstance(results_, (bytes, str, list)): - raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) + if endpoint_ is not None and not isinstance(endpoint_, (bytes, str)): + raise Exception("Expected endpoint_ to be a str, received: {}".format(type(endpoint_))) - self.results = results_ + if identity_endpoint_ is not None and not isinstance(identity_endpoint_, (bytes, str)): + raise Exception("Expected identity_endpoint_ to be a str, received: {}".format(type(identity_endpoint_))) + + if name_ is not None and not isinstance(name_, (bytes, str)): + raise Exception("Expected name_ to be a str, received: {}".format(type(name_))) + + if storage_endpoint_ is not None and not isinstance(storage_endpoint_, (bytes, str)): + raise Exception("Expected storage_endpoint_ to be a str, received: {}".format(type(storage_endpoint_))) + + self.endpoint = endpoint_ + self.identity_endpoint = identity_endpoint_ + self.name = name_ + self.storage_endpoint = storage_endpoint_ self.unknown_fields = unknown_fields -class ClaimLeadershipParams(Type): - _toSchema = {'application_tag': 'application-tag', 'duration': 'duration', 'unit_tag': 'unit-tag'} - _toPy = {'application-tag': 'application_tag', 'duration': 'duration', 'unit-tag': 'unit_tag'} - def __init__(self, application_tag=None, duration=None, unit_tag=None, **unknown_fields): +class CloudResult(Type): + _toSchema = {'cloud': 'cloud', 'error': 'error'} + _toPy = {'cloud': 'cloud', 'error': 'error'} + def __init__(self, cloud=None, error=None, **unknown_fields): ''' - application_tag : str - duration : float - unit_tag : str + cloud : Cloud + error : Error ''' - application_tag_ = application_tag - duration_ = duration - unit_tag_ = unit_tag + cloud_ = Cloud.from_json(cloud) if cloud else None + error_ = Error.from_json(error) if error else None # Validate arguments against known Juju API types. - if application_tag_ is not None and not isinstance(application_tag_, (bytes, str)): - raise Exception("Expected application_tag_ to be a str, received: {}".format(type(application_tag_))) + if cloud_ is not None and not isinstance(cloud_, (dict, Cloud)): + raise Exception("Expected cloud_ to be a Cloud, received: {}".format(type(cloud_))) + + if error_ is not None and not isinstance(error_, (dict, Error)): + raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - if duration_ is not None and not isinstance(duration_, float): - raise Exception("Expected duration_ to be a float, received: {}".format(type(duration_))) + self.cloud = cloud_ + self.error = error_ + self.unknown_fields = unknown_fields - if unit_tag_ is not None and not isinstance(unit_tag_, (bytes, str)): - raise Exception("Expected unit_tag_ to be a str, received: {}".format(type(unit_tag_))) - self.application_tag = application_tag_ - self.duration = duration_ - self.unit_tag = unit_tag_ + +class CloudResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} + def __init__(self, results=None, **unknown_fields): + ''' + results : typing.Sequence[~CloudResult] + ''' + results_ = [CloudResult.from_json(o) for o in results or []] + + # Validate arguments against known Juju API types. + if results_ is not None and not isinstance(results_, (bytes, str, list)): + raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) + + self.results = results_ self.unknown_fields = unknown_fields -class Cloud(Type): - _toSchema = {'auth_types': 'auth-types', 'ca_certificates': 'ca-certificates', 'config': 'config', 'endpoint': 'endpoint', 'host_cloud_region': 'host-cloud-region', 'identity_endpoint': 'identity-endpoint', 'is_controller_cloud': 'is-controller-cloud', 'region_config': 'region-config', 'regions': 'regions', 'skip_tls_verify': 'skip-tls-verify', 'storage_endpoint': 'storage-endpoint', 'type_': 'type'} - _toPy = {'auth-types': 'auth_types', 'ca-certificates': 'ca_certificates', 'config': 'config', 'endpoint': 'endpoint', 'host-cloud-region': 'host_cloud_region', 'identity-endpoint': 'identity_endpoint', 'is-controller-cloud': 'is_controller_cloud', 'region-config': 'region_config', 'regions': 'regions', 'skip-tls-verify': 'skip_tls_verify', 'storage-endpoint': 'storage_endpoint', 'type': 'type_'} - def __init__(self, auth_types=None, ca_certificates=None, config=None, endpoint=None, host_cloud_region=None, identity_endpoint=None, is_controller_cloud=None, region_config=None, regions=None, skip_tls_verify=None, storage_endpoint=None, type_=None, **unknown_fields): +class CloudSpec(Type): + _toSchema = {'cacertificates': 'cacertificates', 'credential': 'credential', 'endpoint': 'endpoint', 'identity_endpoint': 'identity-endpoint', 'is_controller_cloud': 'is-controller-cloud', 'name': 'name', 'region': 'region', 'skip_tls_verify': 'skip-tls-verify', 'storage_endpoint': 'storage-endpoint', 'type_': 'type'} + _toPy = {'cacertificates': 'cacertificates', 'credential': 'credential', 'endpoint': 'endpoint', 'identity-endpoint': 'identity_endpoint', 'is-controller-cloud': 'is_controller_cloud', 'name': 'name', 'region': 'region', 'skip-tls-verify': 'skip_tls_verify', 'storage-endpoint': 'storage_endpoint', 'type': 'type_'} + def __init__(self, cacertificates=None, credential=None, endpoint=None, identity_endpoint=None, is_controller_cloud=None, name=None, region=None, skip_tls_verify=None, storage_endpoint=None, type_=None, **unknown_fields): ''' - auth_types : typing.Sequence[str] - ca_certificates : typing.Sequence[str] - config : typing.Mapping[str, typing.Any] + cacertificates : typing.Sequence[str] + credential : CloudCredential endpoint : str - host_cloud_region : str identity_endpoint : str is_controller_cloud : bool - region_config : typing.Mapping[str, typing.Any] - regions : typing.Sequence[~CloudRegion] + name : str + region : str skip_tls_verify : bool storage_endpoint : str type_ : str ''' - auth_types_ = auth_types - ca_certificates_ = ca_certificates - config_ = config + cacertificates_ = cacertificates + credential_ = CloudCredential.from_json(credential) if credential else None endpoint_ = endpoint - host_cloud_region_ = host_cloud_region identity_endpoint_ = identity_endpoint is_controller_cloud_ = is_controller_cloud - region_config_ = region_config - regions_ = [CloudRegion.from_json(o) for o in regions or []] + name_ = name + region_ = region skip_tls_verify_ = skip_tls_verify storage_endpoint_ = storage_endpoint type__ = type_ # Validate arguments against known Juju API types. - if auth_types_ is not None and not isinstance(auth_types_, (bytes, str, list)): - raise Exception("Expected auth_types_ to be a Sequence, received: {}".format(type(auth_types_))) - - if ca_certificates_ is not None and not isinstance(ca_certificates_, (bytes, str, list)): - raise Exception("Expected ca_certificates_ to be a Sequence, received: {}".format(type(ca_certificates_))) + if cacertificates_ is not None and not isinstance(cacertificates_, (bytes, str, list)): + raise Exception("Expected cacertificates_ to be a Sequence, received: {}".format(type(cacertificates_))) - if config_ is not None and not isinstance(config_, dict): - raise Exception("Expected config_ to be a Mapping, received: {}".format(type(config_))) + if credential_ is not None and not isinstance(credential_, (dict, CloudCredential)): + raise Exception("Expected credential_ to be a CloudCredential, received: {}".format(type(credential_))) if endpoint_ is not None and not isinstance(endpoint_, (bytes, str)): raise Exception("Expected endpoint_ to be a str, received: {}".format(type(endpoint_))) - if host_cloud_region_ is not None and not isinstance(host_cloud_region_, (bytes, str)): - raise Exception("Expected host_cloud_region_ to be a str, received: {}".format(type(host_cloud_region_))) - if identity_endpoint_ is not None and not isinstance(identity_endpoint_, (bytes, str)): raise Exception("Expected identity_endpoint_ to be a str, received: {}".format(type(identity_endpoint_))) if is_controller_cloud_ is not None and not isinstance(is_controller_cloud_, bool): raise Exception("Expected is_controller_cloud_ to be a bool, received: {}".format(type(is_controller_cloud_))) - if region_config_ is not None and not isinstance(region_config_, dict): - raise Exception("Expected region_config_ to be a Mapping, received: {}".format(type(region_config_))) + if name_ is not None and not isinstance(name_, (bytes, str)): + raise Exception("Expected name_ to be a str, received: {}".format(type(name_))) - if regions_ is not None and not isinstance(regions_, (bytes, str, list)): - raise Exception("Expected regions_ to be a Sequence, received: {}".format(type(regions_))) + if region_ is not None and not isinstance(region_, (bytes, str)): + raise Exception("Expected region_ to be a str, received: {}".format(type(region_))) if skip_tls_verify_ is not None and not isinstance(skip_tls_verify_, bool): raise Exception("Expected skip_tls_verify_ to be a bool, received: {}".format(type(skip_tls_verify_))) @@ -5625,15 +4703,13 @@ def __init__(self, auth_types=None, ca_certificates=None, config=None, endpoint= if type__ is not None and not isinstance(type__, (bytes, str)): raise Exception("Expected type__ to be a str, received: {}".format(type(type__))) - self.auth_types = auth_types_ - self.ca_certificates = ca_certificates_ - self.config = config_ + self.cacertificates = cacertificates_ + self.credential = credential_ self.endpoint = endpoint_ - self.host_cloud_region = host_cloud_region_ self.identity_endpoint = identity_endpoint_ self.is_controller_cloud = is_controller_cloud_ - self.region_config = region_config_ - self.regions = regions_ + self.name = name_ + self.region = region_ self.skip_tls_verify = skip_tls_verify_ self.storage_endpoint = storage_endpoint_ self.type_ = type__ @@ -5641,560 +4717,485 @@ def __init__(self, auth_types=None, ca_certificates=None, config=None, endpoint= -class CloudCredential(Type): - _toSchema = {'attrs': 'attrs', 'auth_type': 'auth-type', 'redacted': 'redacted'} - _toPy = {'attrs': 'attrs', 'auth-type': 'auth_type', 'redacted': 'redacted'} - def __init__(self, attrs=None, auth_type=None, redacted=None, **unknown_fields): +class CloudSpecResult(Type): + _toSchema = {'error': 'error', 'result': 'result'} + _toPy = {'error': 'error', 'result': 'result'} + def __init__(self, error=None, result=None, **unknown_fields): ''' - attrs : typing.Mapping[str, str] - auth_type : str - redacted : typing.Sequence[str] + error : Error + result : CloudSpec ''' - attrs_ = attrs - auth_type_ = auth_type - redacted_ = redacted + error_ = Error.from_json(error) if error else None + result_ = CloudSpec.from_json(result) if result else None # Validate arguments against known Juju API types. - if attrs_ is not None and not isinstance(attrs_, dict): - raise Exception("Expected attrs_ to be a Mapping, received: {}".format(type(attrs_))) - - if auth_type_ is not None and not isinstance(auth_type_, (bytes, str)): - raise Exception("Expected auth_type_ to be a str, received: {}".format(type(auth_type_))) + if error_ is not None and not isinstance(error_, (dict, Error)): + raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - if redacted_ is not None and not isinstance(redacted_, (bytes, str, list)): - raise Exception("Expected redacted_ to be a Sequence, received: {}".format(type(redacted_))) + if result_ is not None and not isinstance(result_, (dict, CloudSpec)): + raise Exception("Expected result_ to be a CloudSpec, received: {}".format(type(result_))) - self.attrs = attrs_ - self.auth_type = auth_type_ - self.redacted = redacted_ + self.error = error_ + self.result = result_ self.unknown_fields = unknown_fields -class CloudCredentialArg(Type): - _toSchema = {'cloud_name': 'cloud-name', 'credential_name': 'credential-name'} - _toPy = {'cloud-name': 'cloud_name', 'credential-name': 'credential_name'} - def __init__(self, cloud_name=None, credential_name=None, **unknown_fields): +class CloudSpecResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} + def __init__(self, results=None, **unknown_fields): ''' - cloud_name : str - credential_name : str + results : typing.Sequence[~CloudSpecResult] ''' - cloud_name_ = cloud_name - credential_name_ = credential_name + results_ = [CloudSpecResult.from_json(o) for o in results or []] # Validate arguments against known Juju API types. - if cloud_name_ is not None and not isinstance(cloud_name_, (bytes, str)): - raise Exception("Expected cloud_name_ to be a str, received: {}".format(type(cloud_name_))) - - if credential_name_ is not None and not isinstance(credential_name_, (bytes, str)): - raise Exception("Expected credential_name_ to be a str, received: {}".format(type(credential_name_))) + if results_ is not None and not isinstance(results_, (bytes, str, list)): + raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) - self.cloud_name = cloud_name_ - self.credential_name = credential_name_ + self.results = results_ self.unknown_fields = unknown_fields -class CloudCredentialArgs(Type): - _toSchema = {'credentials': 'credentials', 'include_secrets': 'include-secrets'} - _toPy = {'credentials': 'credentials', 'include-secrets': 'include_secrets'} - def __init__(self, credentials=None, include_secrets=None, **unknown_fields): +class CloudUserInfo(Type): + _toSchema = {'access': 'access', 'display_name': 'display-name', 'user': 'user'} + _toPy = {'access': 'access', 'display-name': 'display_name', 'user': 'user'} + def __init__(self, access=None, display_name=None, user=None, **unknown_fields): ''' - credentials : typing.Sequence[~CloudCredentialArg] - include_secrets : bool + access : str + display_name : str + user : str ''' - credentials_ = [CloudCredentialArg.from_json(o) for o in credentials or []] - include_secrets_ = include_secrets + access_ = access + display_name_ = display_name + user_ = user # Validate arguments against known Juju API types. - if credentials_ is not None and not isinstance(credentials_, (bytes, str, list)): - raise Exception("Expected credentials_ to be a Sequence, received: {}".format(type(credentials_))) + if access_ is not None and not isinstance(access_, (bytes, str)): + raise Exception("Expected access_ to be a str, received: {}".format(type(access_))) - if include_secrets_ is not None and not isinstance(include_secrets_, bool): - raise Exception("Expected include_secrets_ to be a bool, received: {}".format(type(include_secrets_))) + if display_name_ is not None and not isinstance(display_name_, (bytes, str)): + raise Exception("Expected display_name_ to be a str, received: {}".format(type(display_name_))) - self.credentials = credentials_ - self.include_secrets = include_secrets_ + if user_ is not None and not isinstance(user_, (bytes, str)): + raise Exception("Expected user_ to be a str, received: {}".format(type(user_))) + + self.access = access_ + self.display_name = display_name_ + self.user = user_ self.unknown_fields = unknown_fields -class CloudCredentialResult(Type): - _toSchema = {'error': 'error', 'result': 'result'} - _toPy = {'error': 'error', 'result': 'result'} - def __init__(self, error=None, result=None, **unknown_fields): +class CloudsResult(Type): + _toSchema = {'clouds': 'clouds'} + _toPy = {'clouds': 'clouds'} + def __init__(self, clouds=None, **unknown_fields): ''' - error : Error - result : CloudCredential + clouds : typing.Mapping[str, ~Cloud] ''' - error_ = Error.from_json(error) if error else None - result_ = CloudCredential.from_json(result) if result else None + clouds_ = {k: Cloud.from_json(v) for k, v in (clouds or dict()).items()} # Validate arguments against known Juju API types. - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - - if result_ is not None and not isinstance(result_, (dict, CloudCredential)): - raise Exception("Expected result_ to be a CloudCredential, received: {}".format(type(result_))) + if clouds_ is not None and not isinstance(clouds_, dict): + raise Exception("Expected clouds_ to be a Mapping, received: {}".format(type(clouds_))) - self.error = error_ - self.result = result_ + self.clouds = clouds_ self.unknown_fields = unknown_fields -class CloudCredentialResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None, **unknown_fields): +class ConfigResult(Type): + _toSchema = {'config': 'config', 'error': 'error'} + _toPy = {'config': 'config', 'error': 'error'} + def __init__(self, config=None, error=None, **unknown_fields): ''' - results : typing.Sequence[~CloudCredentialResult] + config : typing.Mapping[str, typing.Any] + error : Error ''' - results_ = [CloudCredentialResult.from_json(o) for o in results or []] + config_ = config + error_ = Error.from_json(error) if error else None # Validate arguments against known Juju API types. - if results_ is not None and not isinstance(results_, (bytes, str, list)): - raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) + if config_ is not None and not isinstance(config_, dict): + raise Exception("Expected config_ to be a Mapping, received: {}".format(type(config_))) - self.results = results_ + if error_ is not None and not isinstance(error_, (dict, Error)): + raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) + + self.config = config_ + self.error = error_ self.unknown_fields = unknown_fields -class CloudDetails(Type): - _toSchema = {'auth_types': 'auth-types', 'endpoint': 'endpoint', 'identity_endpoint': 'identity-endpoint', 'regions': 'regions', 'storage_endpoint': 'storage-endpoint', 'type_': 'type'} - _toPy = {'auth-types': 'auth_types', 'endpoint': 'endpoint', 'identity-endpoint': 'identity_endpoint', 'regions': 'regions', 'storage-endpoint': 'storage_endpoint', 'type': 'type_'} - def __init__(self, auth_types=None, endpoint=None, identity_endpoint=None, regions=None, storage_endpoint=None, type_=None, **unknown_fields): +class ConfigSet(Type): + _toSchema = {'application': 'application', 'config': 'config', 'config_yaml': 'config-yaml', 'generation': 'generation'} + _toPy = {'application': 'application', 'config': 'config', 'config-yaml': 'config_yaml', 'generation': 'generation'} + def __init__(self, application=None, config=None, config_yaml=None, generation=None, **unknown_fields): ''' - auth_types : typing.Sequence[str] - endpoint : str - identity_endpoint : str - regions : typing.Sequence[~CloudRegion] - storage_endpoint : str - type_ : str + application : str + config : typing.Mapping[str, str] + config_yaml : str + generation : str ''' - auth_types_ = auth_types - endpoint_ = endpoint - identity_endpoint_ = identity_endpoint - regions_ = [CloudRegion.from_json(o) for o in regions or []] - storage_endpoint_ = storage_endpoint - type__ = type_ + application_ = application + config_ = config + config_yaml_ = config_yaml + generation_ = generation # Validate arguments against known Juju API types. - if auth_types_ is not None and not isinstance(auth_types_, (bytes, str, list)): - raise Exception("Expected auth_types_ to be a Sequence, received: {}".format(type(auth_types_))) - - if endpoint_ is not None and not isinstance(endpoint_, (bytes, str)): - raise Exception("Expected endpoint_ to be a str, received: {}".format(type(endpoint_))) - - if identity_endpoint_ is not None and not isinstance(identity_endpoint_, (bytes, str)): - raise Exception("Expected identity_endpoint_ to be a str, received: {}".format(type(identity_endpoint_))) + if application_ is not None and not isinstance(application_, (bytes, str)): + raise Exception("Expected application_ to be a str, received: {}".format(type(application_))) - if regions_ is not None and not isinstance(regions_, (bytes, str, list)): - raise Exception("Expected regions_ to be a Sequence, received: {}".format(type(regions_))) + if config_ is not None and not isinstance(config_, dict): + raise Exception("Expected config_ to be a Mapping, received: {}".format(type(config_))) - if storage_endpoint_ is not None and not isinstance(storage_endpoint_, (bytes, str)): - raise Exception("Expected storage_endpoint_ to be a str, received: {}".format(type(storage_endpoint_))) + if config_yaml_ is not None and not isinstance(config_yaml_, (bytes, str)): + raise Exception("Expected config_yaml_ to be a str, received: {}".format(type(config_yaml_))) - if type__ is not None and not isinstance(type__, (bytes, str)): - raise Exception("Expected type__ to be a str, received: {}".format(type(type__))) + if generation_ is not None and not isinstance(generation_, (bytes, str)): + raise Exception("Expected generation_ to be a str, received: {}".format(type(generation_))) - self.auth_types = auth_types_ - self.endpoint = endpoint_ - self.identity_endpoint = identity_endpoint_ - self.regions = regions_ - self.storage_endpoint = storage_endpoint_ - self.type_ = type__ + self.application = application_ + self.config = config_ + self.config_yaml = config_yaml_ + self.generation = generation_ self.unknown_fields = unknown_fields -class CloudImageMetadata(Type): - _toSchema = {'arch': 'arch', 'image_id': 'image-id', 'priority': 'priority', 'region': 'region', 'root_storage_size': 'root-storage-size', 'root_storage_type': 'root-storage-type', 'source': 'source', 'stream': 'stream', 'version': 'version', 'virt_type': 'virt-type'} - _toPy = {'arch': 'arch', 'image-id': 'image_id', 'priority': 'priority', 'region': 'region', 'root-storage-size': 'root_storage_size', 'root-storage-type': 'root_storage_type', 'source': 'source', 'stream': 'stream', 'version': 'version', 'virt-type': 'virt_type'} - def __init__(self, arch=None, image_id=None, priority=None, region=None, root_storage_size=None, root_storage_type=None, source=None, stream=None, version=None, virt_type=None, **unknown_fields): +class ConfigSetArgs(Type): + _toSchema = {'args': 'Args'} + _toPy = {'Args': 'args'} + def __init__(self, args=None, **unknown_fields): ''' - arch : str - image_id : str - priority : int - region : str - root_storage_size : int - root_storage_type : str - source : str - stream : str - version : str - virt_type : str + args : typing.Sequence[~ConfigSet] ''' - arch_ = arch - image_id_ = image_id - priority_ = priority - region_ = region - root_storage_size_ = root_storage_size - root_storage_type_ = root_storage_type - source_ = source - stream_ = stream - version_ = version - virt_type_ = virt_type + args_ = [ConfigSet.from_json(o) for o in args or []] # Validate arguments against known Juju API types. - if arch_ is not None and not isinstance(arch_, (bytes, str)): - raise Exception("Expected arch_ to be a str, received: {}".format(type(arch_))) - - if image_id_ is not None and not isinstance(image_id_, (bytes, str)): - raise Exception("Expected image_id_ to be a str, received: {}".format(type(image_id_))) + if args_ is not None and not isinstance(args_, (bytes, str, list)): + raise Exception("Expected args_ to be a Sequence, received: {}".format(type(args_))) - if priority_ is not None and not isinstance(priority_, int): - raise Exception("Expected priority_ to be a int, received: {}".format(type(priority_))) + self.args = args_ + self.unknown_fields = unknown_fields - if region_ is not None and not isinstance(region_, (bytes, str)): - raise Exception("Expected region_ to be a str, received: {}".format(type(region_))) - if root_storage_size_ is not None and not isinstance(root_storage_size_, int): - raise Exception("Expected root_storage_size_ to be a int, received: {}".format(type(root_storage_size_))) - if root_storage_type_ is not None and not isinstance(root_storage_type_, (bytes, str)): - raise Exception("Expected root_storage_type_ to be a str, received: {}".format(type(root_storage_type_))) +class ConfigValue(Type): + _toSchema = {'source': 'source', 'value': 'value'} + _toPy = {'source': 'source', 'value': 'value'} + def __init__(self, source=None, value=None, **unknown_fields): + ''' + source : str + value : Any + ''' + source_ = source + value_ = value + # Validate arguments against known Juju API types. if source_ is not None and not isinstance(source_, (bytes, str)): raise Exception("Expected source_ to be a str, received: {}".format(type(source_))) - if stream_ is not None and not isinstance(stream_, (bytes, str)): - raise Exception("Expected stream_ to be a str, received: {}".format(type(stream_))) - - if version_ is not None and not isinstance(version_, (bytes, str)): - raise Exception("Expected version_ to be a str, received: {}".format(type(version_))) - - if virt_type_ is not None and not isinstance(virt_type_, (bytes, str)): - raise Exception("Expected virt_type_ to be a str, received: {}".format(type(virt_type_))) - - 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.source = source_ - self.stream = stream_ - self.version = version_ - self.virt_type = virt_type_ + self.value = value_ self.unknown_fields = unknown_fields -class CloudImageMetadataList(Type): - _toSchema = {'metadata': 'metadata'} - _toPy = {'metadata': 'metadata'} - def __init__(self, metadata=None, **unknown_fields): +class Constraints(Type): + _toSchema = {'count': 'Count', 'pool': 'Pool', 'size': 'Size'} + _toPy = {'Count': 'count', 'Pool': 'pool', 'Size': 'size'} + def __init__(self, count=None, pool=None, size=None, **unknown_fields): ''' - metadata : typing.Sequence[~CloudImageMetadata] + count : int + pool : str + size : int ''' - metadata_ = [CloudImageMetadata.from_json(o) for o in metadata or []] + count_ = count + pool_ = pool + size_ = size # Validate arguments against known Juju API types. - if metadata_ is not None and not isinstance(metadata_, (bytes, str, list)): - raise Exception("Expected metadata_ to be a Sequence, received: {}".format(type(metadata_))) + if count_ is not None and not isinstance(count_, int): + raise Exception("Expected count_ to be a int, received: {}".format(type(count_))) - self.metadata = metadata_ - self.unknown_fields = unknown_fields + if pool_ is not None and not isinstance(pool_, (bytes, str)): + raise Exception("Expected pool_ to be a str, received: {}".format(type(pool_))) + if size_ is not None and not isinstance(size_, int): + raise Exception("Expected size_ to be a int, received: {}".format(type(size_))) + self.count = count_ + self.pool = pool_ + self.size = size_ + self.unknown_fields = unknown_fields -class CloudInfo(Type): - _toSchema = {'clouddetails': 'CloudDetails', 'users': 'users'} - _toPy = {'CloudDetails': 'clouddetails', 'users': 'users'} - def __init__(self, clouddetails=None, users=None, **unknown_fields): + + +class ConsumeApplicationArg(Type): + _toSchema = {'application_alias': 'application-alias', 'application_description': 'application-description', 'applicationofferdetails': 'ApplicationOfferDetails', 'bindings': 'bindings', 'endpoints': 'endpoints', 'external_controller': 'external-controller', 'macaroon': 'macaroon', 'offer_name': 'offer-name', 'offer_url': 'offer-url', 'offer_uuid': 'offer-uuid', 'source_model_tag': 'source-model-tag', 'spaces': 'spaces', 'users': 'users'} + _toPy = {'ApplicationOfferDetails': 'applicationofferdetails', 'application-alias': 'application_alias', 'application-description': 'application_description', 'bindings': 'bindings', 'endpoints': 'endpoints', 'external-controller': 'external_controller', 'macaroon': 'macaroon', 'offer-name': 'offer_name', 'offer-url': 'offer_url', 'offer-uuid': 'offer_uuid', 'source-model-tag': 'source_model_tag', 'spaces': 'spaces', 'users': 'users'} + def __init__(self, applicationofferdetails=None, application_alias=None, application_description=None, bindings=None, endpoints=None, external_controller=None, macaroon=None, offer_name=None, offer_url=None, offer_uuid=None, source_model_tag=None, spaces=None, users=None, **unknown_fields): ''' - clouddetails : CloudDetails - users : typing.Sequence[~CloudUserInfo] + applicationofferdetails : ApplicationOfferDetails + application_alias : str + application_description : str + bindings : typing.Mapping[str, str] + endpoints : typing.Sequence[~RemoteEndpoint] + external_controller : ExternalControllerInfo + macaroon : Macaroon + offer_name : str + offer_url : str + offer_uuid : str + source_model_tag : str + spaces : typing.Sequence[~RemoteSpace] + users : typing.Sequence[~OfferUserDetails] ''' - clouddetails_ = CloudDetails.from_json(clouddetails) if clouddetails else None - users_ = [CloudUserInfo.from_json(o) for o in users or []] + applicationofferdetails_ = ApplicationOfferDetails.from_json(applicationofferdetails) if applicationofferdetails else None + application_alias_ = application_alias + application_description_ = application_description + bindings_ = bindings + endpoints_ = [RemoteEndpoint.from_json(o) for o in endpoints or []] + external_controller_ = ExternalControllerInfo.from_json(external_controller) if external_controller else None + macaroon_ = Macaroon.from_json(macaroon) if macaroon else None + offer_name_ = offer_name + offer_url_ = offer_url + offer_uuid_ = offer_uuid + source_model_tag_ = source_model_tag + spaces_ = [RemoteSpace.from_json(o) for o in spaces or []] + users_ = [OfferUserDetails.from_json(o) for o in users or []] # Validate arguments against known Juju API types. - if clouddetails_ is not None and not isinstance(clouddetails_, (dict, CloudDetails)): - raise Exception("Expected clouddetails_ to be a CloudDetails, received: {}".format(type(clouddetails_))) + if applicationofferdetails_ is not None and not isinstance(applicationofferdetails_, (dict, ApplicationOfferDetails)): + raise Exception("Expected applicationofferdetails_ to be a ApplicationOfferDetails, received: {}".format(type(applicationofferdetails_))) - if users_ is not None and not isinstance(users_, (bytes, str, list)): - raise Exception("Expected users_ to be a Sequence, received: {}".format(type(users_))) + if application_alias_ is not None and not isinstance(application_alias_, (bytes, str)): + raise Exception("Expected application_alias_ to be a str, received: {}".format(type(application_alias_))) - self.clouddetails = clouddetails_ - self.users = users_ - self.unknown_fields = unknown_fields + if application_description_ is not None and not isinstance(application_description_, (bytes, str)): + raise Exception("Expected application_description_ to be a str, received: {}".format(type(application_description_))) + if bindings_ is not None and not isinstance(bindings_, dict): + raise Exception("Expected bindings_ to be a Mapping, received: {}".format(type(bindings_))) + if endpoints_ is not None and not isinstance(endpoints_, (bytes, str, list)): + raise Exception("Expected endpoints_ to be a Sequence, received: {}".format(type(endpoints_))) -class CloudInfoResult(Type): - _toSchema = {'error': 'error', 'result': 'result'} - _toPy = {'error': 'error', 'result': 'result'} - def __init__(self, error=None, result=None, **unknown_fields): - ''' - error : Error - result : CloudInfo - ''' - error_ = Error.from_json(error) if error else None - result_ = CloudInfo.from_json(result) if result else None + if external_controller_ is not None and not isinstance(external_controller_, (dict, ExternalControllerInfo)): + raise Exception("Expected external_controller_ to be a ExternalControllerInfo, received: {}".format(type(external_controller_))) - # Validate arguments against known Juju API types. - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) + if macaroon_ is not None and not isinstance(macaroon_, (dict, Macaroon)): + raise Exception("Expected macaroon_ to be a Macaroon, received: {}".format(type(macaroon_))) - if result_ is not None and not isinstance(result_, (dict, CloudInfo)): - raise Exception("Expected result_ to be a CloudInfo, received: {}".format(type(result_))) + if offer_name_ is not None and not isinstance(offer_name_, (bytes, str)): + raise Exception("Expected offer_name_ to be a str, received: {}".format(type(offer_name_))) - self.error = error_ - self.result = result_ - self.unknown_fields = unknown_fields + if offer_url_ is not None and not isinstance(offer_url_, (bytes, str)): + raise Exception("Expected offer_url_ to be a str, received: {}".format(type(offer_url_))) + if offer_uuid_ is not None and not isinstance(offer_uuid_, (bytes, str)): + raise Exception("Expected offer_uuid_ to be a str, received: {}".format(type(offer_uuid_))) + if source_model_tag_ is not None and not isinstance(source_model_tag_, (bytes, str)): + raise Exception("Expected source_model_tag_ to be a str, received: {}".format(type(source_model_tag_))) -class CloudInfoResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None, **unknown_fields): - ''' - results : typing.Sequence[~CloudInfoResult] - ''' - results_ = [CloudInfoResult.from_json(o) for o in results or []] + if spaces_ is not None and not isinstance(spaces_, (bytes, str, list)): + raise Exception("Expected spaces_ to be a Sequence, received: {}".format(type(spaces_))) - # Validate arguments against known Juju API types. - if results_ is not None and not isinstance(results_, (bytes, str, list)): - raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) + if users_ is not None and not isinstance(users_, (bytes, str, list)): + raise Exception("Expected users_ to be a Sequence, received: {}".format(type(users_))) - self.results = results_ + self.applicationofferdetails = applicationofferdetails_ + self.application_alias = application_alias_ + self.application_description = application_description_ + self.bindings = bindings_ + self.endpoints = endpoints_ + self.external_controller = external_controller_ + self.macaroon = macaroon_ + self.offer_name = offer_name_ + self.offer_url = offer_url_ + self.offer_uuid = offer_uuid_ + self.source_model_tag = source_model_tag_ + self.spaces = spaces_ + self.users = users_ self.unknown_fields = unknown_fields -class CloudInstanceTypesConstraint(Type): - _toSchema = {'cloud_tag': 'cloud-tag', 'constraints': 'constraints', 'region': 'region'} - _toPy = {'cloud-tag': 'cloud_tag', 'constraints': 'constraints', 'region': 'region'} - def __init__(self, cloud_tag=None, constraints=None, region=None, **unknown_fields): +class ConsumeApplicationArgs(Type): + _toSchema = {'args': 'args'} + _toPy = {'args': 'args'} + def __init__(self, args=None, **unknown_fields): ''' - cloud_tag : str - constraints : Value - region : str + args : typing.Sequence[~ConsumeApplicationArg] ''' - cloud_tag_ = cloud_tag - constraints_ = Value.from_json(constraints) if constraints else None - region_ = region + args_ = [ConsumeApplicationArg.from_json(o) for o in args or []] # Validate arguments against known Juju API types. - if cloud_tag_ is not None and not isinstance(cloud_tag_, (bytes, str)): - raise Exception("Expected cloud_tag_ to be a str, received: {}".format(type(cloud_tag_))) - - if constraints_ is not None and not isinstance(constraints_, (dict, Value)): - raise Exception("Expected constraints_ to be a Value, received: {}".format(type(constraints_))) - - if region_ is not None and not isinstance(region_, (bytes, str)): - raise Exception("Expected region_ to be a str, received: {}".format(type(region_))) + if args_ is not None and not isinstance(args_, (bytes, str, list)): + raise Exception("Expected args_ to be a Sequence, received: {}".format(type(args_))) - self.cloud_tag = cloud_tag_ - self.constraints = constraints_ - self.region = region_ + self.args = args_ self.unknown_fields = unknown_fields -class CloudInstanceTypesConstraints(Type): - _toSchema = {'constraints': 'constraints'} - _toPy = {'constraints': 'constraints'} - def __init__(self, constraints=None, **unknown_fields): +class ConsumeOfferDetails(Type): + _toSchema = {'external_controller': 'external-controller', 'macaroon': 'macaroon', 'offer': 'offer'} + _toPy = {'external-controller': 'external_controller', 'macaroon': 'macaroon', 'offer': 'offer'} + def __init__(self, external_controller=None, macaroon=None, offer=None, **unknown_fields): ''' - constraints : typing.Sequence[~CloudInstanceTypesConstraint] + external_controller : ExternalControllerInfo + macaroon : Macaroon + offer : ApplicationOfferDetails ''' - constraints_ = [CloudInstanceTypesConstraint.from_json(o) for o in constraints or []] + external_controller_ = ExternalControllerInfo.from_json(external_controller) if external_controller else None + macaroon_ = Macaroon.from_json(macaroon) if macaroon else None + offer_ = ApplicationOfferDetails.from_json(offer) if offer else None # Validate arguments against known Juju API types. - if constraints_ is not None and not isinstance(constraints_, (bytes, str, list)): - raise Exception("Expected constraints_ to be a Sequence, received: {}".format(type(constraints_))) + if external_controller_ is not None and not isinstance(external_controller_, (dict, ExternalControllerInfo)): + raise Exception("Expected external_controller_ to be a ExternalControllerInfo, received: {}".format(type(external_controller_))) - self.constraints = constraints_ + if macaroon_ is not None and not isinstance(macaroon_, (dict, Macaroon)): + raise Exception("Expected macaroon_ to be a Macaroon, received: {}".format(type(macaroon_))) + + if offer_ is not None and not isinstance(offer_, (dict, ApplicationOfferDetails)): + raise Exception("Expected offer_ to be a ApplicationOfferDetails, received: {}".format(type(offer_))) + + self.external_controller = external_controller_ + self.macaroon = macaroon_ + self.offer = offer_ self.unknown_fields = unknown_fields -class CloudRegion(Type): - _toSchema = {'endpoint': 'endpoint', 'identity_endpoint': 'identity-endpoint', 'name': 'name', 'storage_endpoint': 'storage-endpoint'} - _toPy = {'endpoint': 'endpoint', 'identity-endpoint': 'identity_endpoint', 'name': 'name', 'storage-endpoint': 'storage_endpoint'} - def __init__(self, endpoint=None, identity_endpoint=None, name=None, storage_endpoint=None, **unknown_fields): +class ConsumeOfferDetailsArg(Type): + _toSchema = {'offer_urls': 'offer-urls', 'user_tag': 'user-tag'} + _toPy = {'offer-urls': 'offer_urls', 'user-tag': 'user_tag'} + def __init__(self, offer_urls=None, user_tag=None, **unknown_fields): ''' - endpoint : str - identity_endpoint : str - name : str - storage_endpoint : str + offer_urls : OfferURLs + user_tag : str ''' - endpoint_ = endpoint - identity_endpoint_ = identity_endpoint - name_ = name - storage_endpoint_ = storage_endpoint + offer_urls_ = OfferURLs.from_json(offer_urls) if offer_urls else None + user_tag_ = user_tag # Validate arguments against known Juju API types. - if endpoint_ is not None and not isinstance(endpoint_, (bytes, str)): - raise Exception("Expected endpoint_ to be a str, received: {}".format(type(endpoint_))) - - if identity_endpoint_ is not None and not isinstance(identity_endpoint_, (bytes, str)): - raise Exception("Expected identity_endpoint_ to be a str, received: {}".format(type(identity_endpoint_))) - - if name_ is not None and not isinstance(name_, (bytes, str)): - raise Exception("Expected name_ to be a str, received: {}".format(type(name_))) + if offer_urls_ is not None and not isinstance(offer_urls_, (dict, OfferURLs)): + raise Exception("Expected offer_urls_ to be a OfferURLs, received: {}".format(type(offer_urls_))) - if storage_endpoint_ is not None and not isinstance(storage_endpoint_, (bytes, str)): - raise Exception("Expected storage_endpoint_ to be a str, received: {}".format(type(storage_endpoint_))) + if user_tag_ is not None and not isinstance(user_tag_, (bytes, str)): + raise Exception("Expected user_tag_ to be a str, received: {}".format(type(user_tag_))) - self.endpoint = endpoint_ - self.identity_endpoint = identity_endpoint_ - self.name = name_ - self.storage_endpoint = storage_endpoint_ + self.offer_urls = offer_urls_ + self.user_tag = user_tag_ self.unknown_fields = unknown_fields -class CloudResult(Type): - _toSchema = {'cloud': 'cloud', 'error': 'error'} - _toPy = {'cloud': 'cloud', 'error': 'error'} - def __init__(self, cloud=None, error=None, **unknown_fields): +class ConsumeOfferDetailsResult(Type): + _toSchema = {'consumeofferdetails': 'ConsumeOfferDetails', 'error': 'error', 'external_controller': 'external-controller', 'macaroon': 'macaroon', 'offer': 'offer'} + _toPy = {'ConsumeOfferDetails': 'consumeofferdetails', 'error': 'error', 'external-controller': 'external_controller', 'macaroon': 'macaroon', 'offer': 'offer'} + def __init__(self, consumeofferdetails=None, error=None, external_controller=None, macaroon=None, offer=None, **unknown_fields): ''' - cloud : Cloud + consumeofferdetails : ConsumeOfferDetails error : Error + external_controller : ExternalControllerInfo + macaroon : Macaroon + offer : ApplicationOfferDetails ''' - cloud_ = Cloud.from_json(cloud) if cloud else None + consumeofferdetails_ = ConsumeOfferDetails.from_json(consumeofferdetails) if consumeofferdetails else None error_ = Error.from_json(error) if error else None + external_controller_ = ExternalControllerInfo.from_json(external_controller) if external_controller else None + macaroon_ = Macaroon.from_json(macaroon) if macaroon else None + offer_ = ApplicationOfferDetails.from_json(offer) if offer else None # Validate arguments against known Juju API types. - if cloud_ is not None and not isinstance(cloud_, (dict, Cloud)): - raise Exception("Expected cloud_ to be a Cloud, received: {}".format(type(cloud_))) + if consumeofferdetails_ is not None and not isinstance(consumeofferdetails_, (dict, ConsumeOfferDetails)): + raise Exception("Expected consumeofferdetails_ to be a ConsumeOfferDetails, received: {}".format(type(consumeofferdetails_))) if error_ is not None and not isinstance(error_, (dict, Error)): raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - self.cloud = cloud_ - self.error = error_ - self.unknown_fields = unknown_fields + if external_controller_ is not None and not isinstance(external_controller_, (dict, ExternalControllerInfo)): + raise Exception("Expected external_controller_ to be a ExternalControllerInfo, received: {}".format(type(external_controller_))) + if macaroon_ is not None and not isinstance(macaroon_, (dict, Macaroon)): + raise Exception("Expected macaroon_ to be a Macaroon, received: {}".format(type(macaroon_))) + if offer_ is not None and not isinstance(offer_, (dict, ApplicationOfferDetails)): + raise Exception("Expected offer_ to be a ApplicationOfferDetails, received: {}".format(type(offer_))) -class CloudResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None, **unknown_fields): - ''' - results : typing.Sequence[~CloudResult] - ''' - results_ = [CloudResult.from_json(o) for o in results or []] - - # Validate arguments against known Juju API types. - if results_ is not None and not isinstance(results_, (bytes, str, list)): - raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) - - self.results = results_ + self.consumeofferdetails = consumeofferdetails_ + self.error = error_ + self.external_controller = external_controller_ + self.macaroon = macaroon_ + self.offer = offer_ self.unknown_fields = unknown_fields -class CloudSpec(Type): - _toSchema = {'cacertificates': 'cacertificates', 'credential': 'credential', 'endpoint': 'endpoint', 'identity_endpoint': 'identity-endpoint', 'is_controller_cloud': 'is-controller-cloud', 'name': 'name', 'region': 'region', 'skip_tls_verify': 'skip-tls-verify', 'storage_endpoint': 'storage-endpoint', 'type_': 'type'} - _toPy = {'cacertificates': 'cacertificates', 'credential': 'credential', 'endpoint': 'endpoint', 'identity-endpoint': 'identity_endpoint', 'is-controller-cloud': 'is_controller_cloud', 'name': 'name', 'region': 'region', 'skip-tls-verify': 'skip_tls_verify', 'storage-endpoint': 'storage_endpoint', 'type': 'type_'} - def __init__(self, cacertificates=None, credential=None, endpoint=None, identity_endpoint=None, is_controller_cloud=None, name=None, region=None, skip_tls_verify=None, storage_endpoint=None, type_=None, **unknown_fields): +class ConsumeOfferDetailsResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} + def __init__(self, results=None, **unknown_fields): ''' - cacertificates : typing.Sequence[str] - credential : CloudCredential - endpoint : str - identity_endpoint : str - is_controller_cloud : bool - name : str - region : str - skip_tls_verify : bool - storage_endpoint : str - type_ : str + results : typing.Sequence[~ConsumeOfferDetailsResult] ''' - cacertificates_ = cacertificates - credential_ = CloudCredential.from_json(credential) if credential else None - endpoint_ = endpoint - identity_endpoint_ = identity_endpoint - is_controller_cloud_ = is_controller_cloud - name_ = name - region_ = region - skip_tls_verify_ = skip_tls_verify - storage_endpoint_ = storage_endpoint - type__ = type_ + results_ = [ConsumeOfferDetailsResult.from_json(o) for o in results or []] # Validate arguments against known Juju API types. - if cacertificates_ is not None and not isinstance(cacertificates_, (bytes, str, list)): - raise Exception("Expected cacertificates_ to be a Sequence, received: {}".format(type(cacertificates_))) - - if credential_ is not None and not isinstance(credential_, (dict, CloudCredential)): - raise Exception("Expected credential_ to be a CloudCredential, received: {}".format(type(credential_))) - - if endpoint_ is not None and not isinstance(endpoint_, (bytes, str)): - raise Exception("Expected endpoint_ to be a str, received: {}".format(type(endpoint_))) - - if identity_endpoint_ is not None and not isinstance(identity_endpoint_, (bytes, str)): - raise Exception("Expected identity_endpoint_ to be a str, received: {}".format(type(identity_endpoint_))) - - if is_controller_cloud_ is not None and not isinstance(is_controller_cloud_, bool): - raise Exception("Expected is_controller_cloud_ to be a bool, received: {}".format(type(is_controller_cloud_))) - - if name_ is not None and not isinstance(name_, (bytes, str)): - raise Exception("Expected name_ to be a str, received: {}".format(type(name_))) - - if region_ is not None and not isinstance(region_, (bytes, str)): - raise Exception("Expected region_ to be a str, received: {}".format(type(region_))) - - if skip_tls_verify_ is not None and not isinstance(skip_tls_verify_, bool): - raise Exception("Expected skip_tls_verify_ to be a bool, received: {}".format(type(skip_tls_verify_))) - - if storage_endpoint_ is not None and not isinstance(storage_endpoint_, (bytes, str)): - raise Exception("Expected storage_endpoint_ to be a str, received: {}".format(type(storage_endpoint_))) - - if type__ is not None and not isinstance(type__, (bytes, str)): - raise Exception("Expected type__ to be a str, received: {}".format(type(type__))) + if results_ is not None and not isinstance(results_, (bytes, str, list)): + raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) - self.cacertificates = cacertificates_ - self.credential = credential_ - self.endpoint = endpoint_ - self.identity_endpoint = identity_endpoint_ - self.is_controller_cloud = is_controller_cloud_ - self.name = name_ - self.region = region_ - self.skip_tls_verify = skip_tls_verify_ - self.storage_endpoint = storage_endpoint_ - self.type_ = type__ + self.results = results_ self.unknown_fields = unknown_fields -class CloudSpecResult(Type): - _toSchema = {'error': 'error', 'result': 'result'} - _toPy = {'error': 'error', 'result': 'result'} - def __init__(self, error=None, result=None, **unknown_fields): +class ControllerAPIInfoResult(Type): + _toSchema = {'addresses': 'addresses', 'cacert': 'cacert', 'error': 'error'} + _toPy = {'addresses': 'addresses', 'cacert': 'cacert', 'error': 'error'} + def __init__(self, addresses=None, cacert=None, error=None, **unknown_fields): ''' + addresses : typing.Sequence[str] + cacert : str error : Error - result : CloudSpec ''' + addresses_ = addresses + cacert_ = cacert error_ = Error.from_json(error) if error else None - result_ = CloudSpec.from_json(result) if result else None # Validate arguments against known Juju API types. + if addresses_ is not None and not isinstance(addresses_, (bytes, str, list)): + raise Exception("Expected addresses_ to be a Sequence, received: {}".format(type(addresses_))) + + if cacert_ is not None and not isinstance(cacert_, (bytes, str)): + raise Exception("Expected cacert_ to be a str, received: {}".format(type(cacert_))) + if error_ is not None and not isinstance(error_, (dict, Error)): raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - if result_ is not None and not isinstance(result_, (dict, CloudSpec)): - raise Exception("Expected result_ to be a CloudSpec, received: {}".format(type(result_))) - + self.addresses = addresses_ + self.cacert = cacert_ self.error = error_ - self.result = result_ self.unknown_fields = unknown_fields -class CloudSpecResults(Type): +class ControllerAPIInfoResults(Type): _toSchema = {'results': 'results'} _toPy = {'results': 'results'} def __init__(self, results=None, **unknown_fields): ''' - results : typing.Sequence[~CloudSpecResult] + results : typing.Sequence[~ControllerAPIInfoResult] ''' - results_ = [CloudSpecResult.from_json(o) for o in results or []] + results_ = [ControllerAPIInfoResult.from_json(o) for o in results or []] # Validate arguments against known Juju API types. if results_ is not None and not isinstance(results_, (bytes, str, list)): @@ -6205,791 +5206,791 @@ def __init__(self, results=None, **unknown_fields): -class CloudUserInfo(Type): - _toSchema = {'access': 'access', 'display_name': 'display-name', 'user': 'user'} - _toPy = {'access': 'access', 'display-name': 'display_name', 'user': 'user'} - def __init__(self, access=None, display_name=None, user=None, **unknown_fields): +class ControllerConfigResult(Type): + _toSchema = {'config': 'config'} + _toPy = {'config': 'config'} + def __init__(self, config=None, **unknown_fields): ''' - access : str - display_name : str - user : str + config : typing.Mapping[str, typing.Any] ''' - access_ = access - display_name_ = display_name - user_ = user + config_ = config # Validate arguments against known Juju API types. - if access_ is not None and not isinstance(access_, (bytes, str)): - raise Exception("Expected access_ to be a str, received: {}".format(type(access_))) - - if display_name_ is not None and not isinstance(display_name_, (bytes, str)): - raise Exception("Expected display_name_ to be a str, received: {}".format(type(display_name_))) - - if user_ is not None and not isinstance(user_, (bytes, str)): - raise Exception("Expected user_ to be a str, received: {}".format(type(user_))) + if config_ is not None and not isinstance(config_, dict): + raise Exception("Expected config_ to be a Mapping, received: {}".format(type(config_))) - self.access = access_ - self.display_name = display_name_ - self.user = user_ + self.config = config_ self.unknown_fields = unknown_fields -class CloudsResult(Type): - _toSchema = {'clouds': 'clouds'} - _toPy = {'clouds': 'clouds'} - def __init__(self, clouds=None, **unknown_fields): +class ControllerConfigSet(Type): + _toSchema = {'config': 'config'} + _toPy = {'config': 'config'} + def __init__(self, config=None, **unknown_fields): ''' - clouds : typing.Mapping[str, ~Cloud] + config : typing.Mapping[str, typing.Any] ''' - clouds_ = {k: Cloud.from_json(v) for k, v in (clouds or dict()).items()} + config_ = config # Validate arguments against known Juju API types. - if clouds_ is not None and not isinstance(clouds_, dict): - raise Exception("Expected clouds_ to be a Mapping, received: {}".format(type(clouds_))) + if config_ is not None and not isinstance(config_, dict): + raise Exception("Expected config_ to be a Mapping, received: {}".format(type(config_))) - self.clouds = clouds_ + self.config = config_ self.unknown_fields = unknown_fields -class CommitHookChangesArg(Type): - _toSchema = {'add_storage': 'add-storage', 'close_ports': 'close-ports', 'open_ports': 'open-ports', 'pod_spec': 'pod-spec', 'relation_unit_settings': 'relation-unit-settings', 'secret_creates': 'secret-creates', 'secret_deletes': 'secret-deletes', 'secret_grants': 'secret-grants', 'secret_revokes': 'secret-revokes', 'secret_updates': 'secret-updates', 'set_raw_k8s_spec': 'set-raw-k8s-spec', 'tag': 'tag', 'unit_state': 'unit-state', 'update_network_info': 'update-network-info'} - _toPy = {'add-storage': 'add_storage', 'close-ports': 'close_ports', 'open-ports': 'open_ports', 'pod-spec': 'pod_spec', 'relation-unit-settings': 'relation_unit_settings', 'secret-creates': 'secret_creates', 'secret-deletes': 'secret_deletes', 'secret-grants': 'secret_grants', 'secret-revokes': 'secret_revokes', 'secret-updates': 'secret_updates', 'set-raw-k8s-spec': 'set_raw_k8s_spec', 'tag': 'tag', 'unit-state': 'unit_state', 'update-network-info': 'update_network_info'} - def __init__(self, add_storage=None, close_ports=None, open_ports=None, pod_spec=None, relation_unit_settings=None, secret_creates=None, secret_deletes=None, secret_grants=None, secret_revokes=None, secret_updates=None, set_raw_k8s_spec=None, tag=None, unit_state=None, update_network_info=None, **unknown_fields): +class ControllerCredentialInfo(Type): + _toSchema = {'content': 'content', 'models': 'models'} + _toPy = {'content': 'content', 'models': 'models'} + def __init__(self, content=None, models=None, **unknown_fields): ''' - add_storage : typing.Sequence[~StorageAddParams] - close_ports : typing.Sequence[~EntityPortRange] - open_ports : typing.Sequence[~EntityPortRange] - pod_spec : PodSpec - relation_unit_settings : typing.Sequence[~RelationUnitSettings] - secret_creates : typing.Sequence[~CreateSecretArg] - secret_deletes : typing.Sequence[~DeleteSecretArg] - secret_grants : typing.Sequence[~GrantRevokeSecretArg] - secret_revokes : typing.Sequence[~GrantRevokeSecretArg] - secret_updates : typing.Sequence[~UpdateSecretArg] - set_raw_k8s_spec : PodSpec - tag : str - unit_state : SetUnitStateArg - update_network_info : bool - ''' - add_storage_ = [StorageAddParams.from_json(o) for o in add_storage or []] - close_ports_ = [EntityPortRange.from_json(o) for o in close_ports or []] - open_ports_ = [EntityPortRange.from_json(o) for o in open_ports or []] - pod_spec_ = PodSpec.from_json(pod_spec) if pod_spec else None - relation_unit_settings_ = [RelationUnitSettings.from_json(o) for o in relation_unit_settings or []] - secret_creates_ = [CreateSecretArg.from_json(o) for o in secret_creates or []] - secret_deletes_ = [DeleteSecretArg.from_json(o) for o in secret_deletes or []] - secret_grants_ = [GrantRevokeSecretArg.from_json(o) for o in secret_grants or []] - secret_revokes_ = [GrantRevokeSecretArg.from_json(o) for o in secret_revokes or []] - secret_updates_ = [UpdateSecretArg.from_json(o) for o in secret_updates or []] - set_raw_k8s_spec_ = PodSpec.from_json(set_raw_k8s_spec) if set_raw_k8s_spec else None - tag_ = tag - unit_state_ = SetUnitStateArg.from_json(unit_state) if unit_state else None - update_network_info_ = update_network_info + content : CredentialContent + models : typing.Sequence[~ModelAccess] + ''' + content_ = CredentialContent.from_json(content) if content else None + models_ = [ModelAccess.from_json(o) for o in models or []] # Validate arguments against known Juju API types. - if add_storage_ is not None and not isinstance(add_storage_, (bytes, str, list)): - raise Exception("Expected add_storage_ to be a Sequence, received: {}".format(type(add_storage_))) - - if close_ports_ is not None and not isinstance(close_ports_, (bytes, str, list)): - raise Exception("Expected close_ports_ to be a Sequence, received: {}".format(type(close_ports_))) - - if open_ports_ is not None and not isinstance(open_ports_, (bytes, str, list)): - raise Exception("Expected open_ports_ to be a Sequence, received: {}".format(type(open_ports_))) - - if pod_spec_ is not None and not isinstance(pod_spec_, (dict, PodSpec)): - raise Exception("Expected pod_spec_ to be a PodSpec, received: {}".format(type(pod_spec_))) - - if relation_unit_settings_ is not None and not isinstance(relation_unit_settings_, (bytes, str, list)): - raise Exception("Expected relation_unit_settings_ to be a Sequence, received: {}".format(type(relation_unit_settings_))) - - if secret_creates_ is not None and not isinstance(secret_creates_, (bytes, str, list)): - raise Exception("Expected secret_creates_ to be a Sequence, received: {}".format(type(secret_creates_))) - - if secret_deletes_ is not None and not isinstance(secret_deletes_, (bytes, str, list)): - raise Exception("Expected secret_deletes_ to be a Sequence, received: {}".format(type(secret_deletes_))) - - if secret_grants_ is not None and not isinstance(secret_grants_, (bytes, str, list)): - raise Exception("Expected secret_grants_ to be a Sequence, received: {}".format(type(secret_grants_))) - - if secret_revokes_ is not None and not isinstance(secret_revokes_, (bytes, str, list)): - raise Exception("Expected secret_revokes_ to be a Sequence, received: {}".format(type(secret_revokes_))) - - if secret_updates_ is not None and not isinstance(secret_updates_, (bytes, str, list)): - raise Exception("Expected secret_updates_ to be a Sequence, received: {}".format(type(secret_updates_))) - - if set_raw_k8s_spec_ is not None and not isinstance(set_raw_k8s_spec_, (dict, PodSpec)): - raise Exception("Expected set_raw_k8s_spec_ to be a PodSpec, received: {}".format(type(set_raw_k8s_spec_))) + if content_ is not None and not isinstance(content_, (dict, CredentialContent)): + raise Exception("Expected content_ to be a CredentialContent, received: {}".format(type(content_))) - if tag_ is not None and not isinstance(tag_, (bytes, str)): - raise Exception("Expected tag_ to be a str, received: {}".format(type(tag_))) + if models_ is not None and not isinstance(models_, (bytes, str, list)): + raise Exception("Expected models_ to be a Sequence, received: {}".format(type(models_))) - if unit_state_ is not None and not isinstance(unit_state_, (dict, SetUnitStateArg)): - raise Exception("Expected unit_state_ to be a SetUnitStateArg, received: {}".format(type(unit_state_))) - - if update_network_info_ is not None and not isinstance(update_network_info_, bool): - raise Exception("Expected update_network_info_ to be a bool, received: {}".format(type(update_network_info_))) - - self.add_storage = add_storage_ - self.close_ports = close_ports_ - self.open_ports = open_ports_ - self.pod_spec = pod_spec_ - self.relation_unit_settings = relation_unit_settings_ - self.secret_creates = secret_creates_ - self.secret_deletes = secret_deletes_ - self.secret_grants = secret_grants_ - self.secret_revokes = secret_revokes_ - self.secret_updates = secret_updates_ - self.set_raw_k8s_spec = set_raw_k8s_spec_ - self.tag = tag_ - self.unit_state = unit_state_ - self.update_network_info = update_network_info_ + self.content = content_ + self.models = models_ self.unknown_fields = unknown_fields -class CommitHookChangesArgs(Type): - _toSchema = {'args': 'args'} - _toPy = {'args': 'args'} - def __init__(self, args=None, **unknown_fields): +class ControllerVersionResults(Type): + _toSchema = {'git_commit': 'git-commit', 'version': 'version'} + _toPy = {'git-commit': 'git_commit', 'version': 'version'} + def __init__(self, git_commit=None, version=None, **unknown_fields): ''' - args : typing.Sequence[~CommitHookChangesArg] + git_commit : str + version : str ''' - args_ = [CommitHookChangesArg.from_json(o) for o in args or []] + git_commit_ = git_commit + version_ = version # Validate arguments against known Juju API types. - if args_ is not None and not isinstance(args_, (bytes, str, list)): - raise Exception("Expected args_ to be a Sequence, received: {}".format(type(args_))) + if git_commit_ is not None and not isinstance(git_commit_, (bytes, str)): + raise Exception("Expected git_commit_ to be a str, received: {}".format(type(git_commit_))) - self.args = args_ + if version_ is not None and not isinstance(version_, (bytes, str)): + raise Exception("Expected version_ to be a str, received: {}".format(type(version_))) + + self.git_commit = git_commit_ + self.version = version_ self.unknown_fields = unknown_fields -class ConfigResult(Type): - _toSchema = {'config': 'config', 'error': 'error'} - _toPy = {'config': 'config', 'error': 'error'} - def __init__(self, config=None, error=None, **unknown_fields): +class ControllersChangeResult(Type): + _toSchema = {'error': 'error', 'result': 'result'} + _toPy = {'error': 'error', 'result': 'result'} + def __init__(self, error=None, result=None, **unknown_fields): ''' - config : typing.Mapping[str, typing.Any] error : Error + result : ControllersChanges ''' - config_ = config error_ = Error.from_json(error) if error else None + result_ = ControllersChanges.from_json(result) if result else None # Validate arguments against known Juju API types. - if config_ is not None and not isinstance(config_, dict): - raise Exception("Expected config_ to be a Mapping, received: {}".format(type(config_))) - if error_ is not None and not isinstance(error_, (dict, Error)): raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - self.config = config_ + if result_ is not None and not isinstance(result_, (dict, ControllersChanges)): + raise Exception("Expected result_ to be a ControllersChanges, received: {}".format(type(result_))) + self.error = error_ + self.result = result_ self.unknown_fields = unknown_fields -class ConfigSet(Type): - _toSchema = {'application': 'application', 'config': 'config', 'config_yaml': 'config-yaml', 'generation': 'generation'} - _toPy = {'application': 'application', 'config': 'config', 'config-yaml': 'config_yaml', 'generation': 'generation'} - def __init__(self, application=None, config=None, config_yaml=None, generation=None, **unknown_fields): +class ControllersChangeResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} + def __init__(self, results=None, **unknown_fields): ''' - application : str - config : typing.Mapping[str, str] - config_yaml : str - generation : str + results : typing.Sequence[~ControllersChangeResult] ''' - application_ = application - config_ = config - config_yaml_ = config_yaml - generation_ = generation + results_ = [ControllersChangeResult.from_json(o) for o in results or []] # Validate arguments against known Juju API types. - if application_ is not None and not isinstance(application_, (bytes, str)): - raise Exception("Expected application_ to be a str, received: {}".format(type(application_))) - - if config_ is not None and not isinstance(config_, dict): - raise Exception("Expected config_ to be a Mapping, received: {}".format(type(config_))) - - if config_yaml_ is not None and not isinstance(config_yaml_, (bytes, str)): - raise Exception("Expected config_yaml_ to be a str, received: {}".format(type(config_yaml_))) - - if generation_ is not None and not isinstance(generation_, (bytes, str)): - raise Exception("Expected generation_ to be a str, received: {}".format(type(generation_))) + if results_ is not None and not isinstance(results_, (bytes, str, list)): + raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) - self.application = application_ - self.config = config_ - self.config_yaml = config_yaml_ - self.generation = generation_ + self.results = results_ self.unknown_fields = unknown_fields -class ConfigSetArgs(Type): - _toSchema = {'args': 'Args'} - _toPy = {'Args': 'args'} - def __init__(self, args=None, **unknown_fields): +class ControllersChanges(Type): + _toSchema = {'added': 'added', 'converted': 'converted', 'maintained': 'maintained', 'removed': 'removed'} + _toPy = {'added': 'added', 'converted': 'converted', 'maintained': 'maintained', 'removed': 'removed'} + def __init__(self, added=None, converted=None, maintained=None, removed=None, **unknown_fields): ''' - args : typing.Sequence[~ConfigSet] + added : typing.Sequence[str] + converted : typing.Sequence[str] + maintained : typing.Sequence[str] + removed : typing.Sequence[str] ''' - args_ = [ConfigSet.from_json(o) for o in args or []] + added_ = added + converted_ = converted + maintained_ = maintained + removed_ = removed # Validate arguments against known Juju API types. - if args_ is not None and not isinstance(args_, (bytes, str, list)): - raise Exception("Expected args_ to be a Sequence, received: {}".format(type(args_))) + if added_ is not None and not isinstance(added_, (bytes, str, list)): + raise Exception("Expected added_ to be a Sequence, received: {}".format(type(added_))) - self.args = args_ + if converted_ is not None and not isinstance(converted_, (bytes, str, list)): + raise Exception("Expected converted_ to be a Sequence, received: {}".format(type(converted_))) + + if maintained_ is not None and not isinstance(maintained_, (bytes, str, list)): + raise Exception("Expected maintained_ to be a Sequence, received: {}".format(type(maintained_))) + + if removed_ is not None and not isinstance(removed_, (bytes, str, list)): + raise Exception("Expected removed_ to be a Sequence, received: {}".format(type(removed_))) + + self.added = added_ + self.converted = converted_ + self.maintained = maintained_ + self.removed = removed_ self.unknown_fields = unknown_fields -class ConfigSettingsResult(Type): - _toSchema = {'error': 'error', 'settings': 'settings'} - _toPy = {'error': 'error', 'settings': 'settings'} - def __init__(self, error=None, settings=None, **unknown_fields): +class ControllersSpec(Type): + _toSchema = {'constraints': 'constraints', 'num_controllers': 'num-controllers', 'placement': 'placement'} + _toPy = {'constraints': 'constraints', 'num-controllers': 'num_controllers', 'placement': 'placement'} + def __init__(self, constraints=None, num_controllers=None, placement=None, **unknown_fields): ''' - error : Error - settings : typing.Mapping[str, typing.Any] + constraints : Value + num_controllers : int + placement : typing.Sequence[str] ''' - error_ = Error.from_json(error) if error else None - settings_ = settings + constraints_ = Value.from_json(constraints) if constraints else None + num_controllers_ = num_controllers + placement_ = placement # Validate arguments against known Juju API types. - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) + if constraints_ is not None and not isinstance(constraints_, (dict, Value)): + raise Exception("Expected constraints_ to be a Value, received: {}".format(type(constraints_))) + + if num_controllers_ is not None and not isinstance(num_controllers_, int): + raise Exception("Expected num_controllers_ to be a int, received: {}".format(type(num_controllers_))) - if settings_ is not None and not isinstance(settings_, dict): - raise Exception("Expected settings_ to be a Mapping, received: {}".format(type(settings_))) + if placement_ is not None and not isinstance(placement_, (bytes, str, list)): + raise Exception("Expected placement_ to be a Sequence, received: {}".format(type(placement_))) - self.error = error_ - self.settings = settings_ + self.constraints = constraints_ + self.num_controllers = num_controllers_ + self.placement = placement_ self.unknown_fields = unknown_fields -class ConfigSettingsResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None, **unknown_fields): +class ControllersSpecs(Type): + _toSchema = {'specs': 'specs'} + _toPy = {'specs': 'specs'} + def __init__(self, specs=None, **unknown_fields): ''' - results : typing.Sequence[~ConfigSettingsResult] + specs : typing.Sequence[~ControllersSpec] ''' - results_ = [ConfigSettingsResult.from_json(o) for o in results or []] + specs_ = [ControllersSpec.from_json(o) for o in specs or []] # Validate arguments against known Juju API types. - if results_ is not None and not isinstance(results_, (bytes, str, list)): - raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) + if specs_ is not None and not isinstance(specs_, (bytes, str, list)): + raise Exception("Expected specs_ to be a Sequence, received: {}".format(type(specs_))) - self.results = results_ + self.specs = specs_ self.unknown_fields = unknown_fields -class ConfigValue(Type): - _toSchema = {'source': 'source', 'value': 'value'} - _toPy = {'source': 'source', 'value': 'value'} - def __init__(self, source=None, value=None, **unknown_fields): +class CreateSecretArg(Type): + _toSchema = {'content': 'content', 'description': 'description', 'expire_time': 'expire-time', 'label': 'label', 'owner_tag': 'owner-tag', 'params': 'params', 'rotate_policy': 'rotate-policy', 'upsertsecretarg': 'UpsertSecretArg', 'uri': 'uri'} + _toPy = {'UpsertSecretArg': 'upsertsecretarg', 'content': 'content', 'description': 'description', 'expire-time': 'expire_time', 'label': 'label', 'owner-tag': 'owner_tag', 'params': 'params', 'rotate-policy': 'rotate_policy', 'uri': 'uri'} + def __init__(self, upsertsecretarg=None, content=None, description=None, expire_time=None, label=None, owner_tag=None, params=None, rotate_policy=None, uri=None, **unknown_fields): ''' - source : str - value : Any + upsertsecretarg : UpsertSecretArg + content : SecretContentParams + description : str + expire_time : str + label : str + owner_tag : str + params : typing.Mapping[str, typing.Any] + rotate_policy : str + uri : str ''' - source_ = source - value_ = value + upsertsecretarg_ = UpsertSecretArg.from_json(upsertsecretarg) if upsertsecretarg else None + content_ = SecretContentParams.from_json(content) if content else None + description_ = description + expire_time_ = expire_time + label_ = label + owner_tag_ = owner_tag + params_ = params + rotate_policy_ = rotate_policy + uri_ = uri # Validate arguments against known Juju API types. - if source_ is not None and not isinstance(source_, (bytes, str)): - raise Exception("Expected source_ to be a str, received: {}".format(type(source_))) + if upsertsecretarg_ is not None and not isinstance(upsertsecretarg_, (dict, UpsertSecretArg)): + raise Exception("Expected upsertsecretarg_ to be a UpsertSecretArg, received: {}".format(type(upsertsecretarg_))) - self.source = source_ - self.value = value_ + if content_ is not None and not isinstance(content_, (dict, SecretContentParams)): + raise Exception("Expected content_ to be a SecretContentParams, received: {}".format(type(content_))) + + if description_ is not None and not isinstance(description_, (bytes, str)): + raise Exception("Expected description_ to be a str, received: {}".format(type(description_))) + + if expire_time_ is not None and not isinstance(expire_time_, (bytes, str)): + raise Exception("Expected expire_time_ to be a str, received: {}".format(type(expire_time_))) + + if label_ is not None and not isinstance(label_, (bytes, str)): + raise Exception("Expected label_ to be a str, received: {}".format(type(label_))) + + if owner_tag_ is not None and not isinstance(owner_tag_, (bytes, str)): + raise Exception("Expected owner_tag_ to be a str, received: {}".format(type(owner_tag_))) + + if params_ is not None and not isinstance(params_, dict): + raise Exception("Expected params_ to be a Mapping, received: {}".format(type(params_))) + + if rotate_policy_ is not None and not isinstance(rotate_policy_, (bytes, str)): + raise Exception("Expected rotate_policy_ to be a str, received: {}".format(type(rotate_policy_))) + + if uri_ is not None and not isinstance(uri_, (bytes, str)): + raise Exception("Expected uri_ to be a str, received: {}".format(type(uri_))) + + self.upsertsecretarg = upsertsecretarg_ + self.content = content_ + self.description = description_ + self.expire_time = expire_time_ + self.label = label_ + self.owner_tag = owner_tag_ + self.params = params_ + self.rotate_policy = rotate_policy_ + self.uri = uri_ self.unknown_fields = unknown_fields -class Constraints(Type): - _toSchema = {'count': 'Count', 'pool': 'Pool', 'size': 'Size'} - _toPy = {'Count': 'count', 'Pool': 'pool', 'Size': 'size'} - def __init__(self, count=None, pool=None, size=None, **unknown_fields): +class CreateSecretArgs(Type): + _toSchema = {'args': 'args'} + _toPy = {'args': 'args'} + def __init__(self, args=None, **unknown_fields): ''' - count : int - pool : str - size : int + args : typing.Sequence[~CreateSecretArg] ''' - count_ = count - pool_ = pool - size_ = size + args_ = [CreateSecretArg.from_json(o) for o in args or []] # Validate arguments against known Juju API types. - if count_ is not None and not isinstance(count_, int): - raise Exception("Expected count_ to be a int, received: {}".format(type(count_))) - - if pool_ is not None and not isinstance(pool_, (bytes, str)): - raise Exception("Expected pool_ to be a str, received: {}".format(type(pool_))) - - if size_ is not None and not isinstance(size_, int): - raise Exception("Expected size_ to be a int, received: {}".format(type(size_))) + if args_ is not None and not isinstance(args_, (bytes, str, list)): + raise Exception("Expected args_ to be a Sequence, received: {}".format(type(args_))) - self.count = count_ - self.pool = pool_ - self.size = size_ + self.args = args_ self.unknown_fields = unknown_fields -class ConstraintsResult(Type): - _toSchema = {'constraints': 'constraints', 'error': 'error'} - _toPy = {'constraints': 'constraints', 'error': 'error'} - def __init__(self, constraints=None, error=None, **unknown_fields): +class CreateSpaceParams(Type): + _toSchema = {'cidrs': 'cidrs', 'provider_id': 'provider-id', 'public': 'public', 'space_tag': 'space-tag'} + _toPy = {'cidrs': 'cidrs', 'provider-id': 'provider_id', 'public': 'public', 'space-tag': 'space_tag'} + def __init__(self, cidrs=None, provider_id=None, public=None, space_tag=None, **unknown_fields): ''' - constraints : Value - error : Error + cidrs : typing.Sequence[str] + provider_id : str + public : bool + space_tag : str ''' - constraints_ = Value.from_json(constraints) if constraints else None - error_ = Error.from_json(error) if error else None + cidrs_ = cidrs + provider_id_ = provider_id + public_ = public + space_tag_ = space_tag # Validate arguments against known Juju API types. - if constraints_ is not None and not isinstance(constraints_, (dict, Value)): - raise Exception("Expected constraints_ to be a Value, received: {}".format(type(constraints_))) + if cidrs_ is not None and not isinstance(cidrs_, (bytes, str, list)): + raise Exception("Expected cidrs_ to be a Sequence, received: {}".format(type(cidrs_))) - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) + if provider_id_ is not None and not isinstance(provider_id_, (bytes, str)): + raise Exception("Expected provider_id_ to be a str, received: {}".format(type(provider_id_))) - self.constraints = constraints_ - self.error = error_ + if public_ is not None and not isinstance(public_, bool): + raise Exception("Expected public_ to be a bool, received: {}".format(type(public_))) + + if space_tag_ is not None and not isinstance(space_tag_, (bytes, str)): + raise Exception("Expected space_tag_ to be a str, received: {}".format(type(space_tag_))) + + self.cidrs = cidrs_ + self.provider_id = provider_id_ + self.public = public_ + self.space_tag = space_tag_ self.unknown_fields = unknown_fields -class ConstraintsResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None, **unknown_fields): +class CreateSpacesParams(Type): + _toSchema = {'spaces': 'spaces'} + _toPy = {'spaces': 'spaces'} + def __init__(self, spaces=None, **unknown_fields): ''' - results : typing.Sequence[~ConstraintsResult] + spaces : typing.Sequence[~CreateSpaceParams] ''' - results_ = [ConstraintsResult.from_json(o) for o in results or []] + spaces_ = [CreateSpaceParams.from_json(o) for o in spaces or []] # Validate arguments against known Juju API types. - if results_ is not None and not isinstance(results_, (bytes, str, list)): - raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) + if spaces_ is not None and not isinstance(spaces_, (bytes, str, list)): + raise Exception("Expected spaces_ to be a Sequence, received: {}".format(type(spaces_))) - self.results = results_ + self.spaces = spaces_ self.unknown_fields = unknown_fields -class ConsumeApplicationArg(Type): - _toSchema = {'application_alias': 'application-alias', 'application_description': 'application-description', 'applicationofferdetails': 'ApplicationOfferDetails', 'bindings': 'bindings', 'endpoints': 'endpoints', 'external_controller': 'external-controller', 'macaroon': 'macaroon', 'offer_name': 'offer-name', 'offer_url': 'offer-url', 'offer_uuid': 'offer-uuid', 'source_model_tag': 'source-model-tag', 'spaces': 'spaces', 'users': 'users'} - _toPy = {'ApplicationOfferDetails': 'applicationofferdetails', 'application-alias': 'application_alias', 'application-description': 'application_description', 'bindings': 'bindings', 'endpoints': 'endpoints', 'external-controller': 'external_controller', 'macaroon': 'macaroon', 'offer-name': 'offer_name', 'offer-url': 'offer_url', 'offer-uuid': 'offer_uuid', 'source-model-tag': 'source_model_tag', 'spaces': 'spaces', 'users': 'users'} - def __init__(self, applicationofferdetails=None, application_alias=None, application_description=None, bindings=None, endpoints=None, external_controller=None, macaroon=None, offer_name=None, offer_url=None, offer_uuid=None, source_model_tag=None, spaces=None, users=None, **unknown_fields): +class CredentialContent(Type): + _toSchema = {'attrs': 'attrs', 'auth_type': 'auth-type', 'cloud': 'cloud', 'name': 'name', 'valid': 'valid'} + _toPy = {'attrs': 'attrs', 'auth-type': 'auth_type', 'cloud': 'cloud', 'name': 'name', 'valid': 'valid'} + def __init__(self, attrs=None, auth_type=None, cloud=None, name=None, valid=None, **unknown_fields): ''' - applicationofferdetails : ApplicationOfferDetails - application_alias : str - application_description : str - bindings : typing.Mapping[str, str] - endpoints : typing.Sequence[~RemoteEndpoint] - external_controller : ExternalControllerInfo - macaroon : Macaroon - offer_name : str - offer_url : str - offer_uuid : str - source_model_tag : str - spaces : typing.Sequence[~RemoteSpace] - users : typing.Sequence[~OfferUserDetails] + attrs : typing.Mapping[str, str] + auth_type : str + cloud : str + name : str + valid : bool ''' - applicationofferdetails_ = ApplicationOfferDetails.from_json(applicationofferdetails) if applicationofferdetails else None - application_alias_ = application_alias - application_description_ = application_description - bindings_ = bindings - endpoints_ = [RemoteEndpoint.from_json(o) for o in endpoints or []] - external_controller_ = ExternalControllerInfo.from_json(external_controller) if external_controller else None - macaroon_ = Macaroon.from_json(macaroon) if macaroon else None - offer_name_ = offer_name - offer_url_ = offer_url - offer_uuid_ = offer_uuid - source_model_tag_ = source_model_tag - spaces_ = [RemoteSpace.from_json(o) for o in spaces or []] - users_ = [OfferUserDetails.from_json(o) for o in users or []] + attrs_ = attrs + auth_type_ = auth_type + cloud_ = cloud + name_ = name + valid_ = valid # Validate arguments against known Juju API types. - if applicationofferdetails_ is not None and not isinstance(applicationofferdetails_, (dict, ApplicationOfferDetails)): - raise Exception("Expected applicationofferdetails_ to be a ApplicationOfferDetails, received: {}".format(type(applicationofferdetails_))) - - if application_alias_ is not None and not isinstance(application_alias_, (bytes, str)): - raise Exception("Expected application_alias_ to be a str, received: {}".format(type(application_alias_))) - - if application_description_ is not None and not isinstance(application_description_, (bytes, str)): - raise Exception("Expected application_description_ to be a str, received: {}".format(type(application_description_))) + if attrs_ is not None and not isinstance(attrs_, dict): + raise Exception("Expected attrs_ to be a Mapping, received: {}".format(type(attrs_))) - if bindings_ is not None and not isinstance(bindings_, dict): - raise Exception("Expected bindings_ to be a Mapping, received: {}".format(type(bindings_))) + if auth_type_ is not None and not isinstance(auth_type_, (bytes, str)): + raise Exception("Expected auth_type_ to be a str, received: {}".format(type(auth_type_))) - if endpoints_ is not None and not isinstance(endpoints_, (bytes, str, list)): - raise Exception("Expected endpoints_ to be a Sequence, received: {}".format(type(endpoints_))) + if cloud_ is not None and not isinstance(cloud_, (bytes, str)): + raise Exception("Expected cloud_ to be a str, received: {}".format(type(cloud_))) - if external_controller_ is not None and not isinstance(external_controller_, (dict, ExternalControllerInfo)): - raise Exception("Expected external_controller_ to be a ExternalControllerInfo, received: {}".format(type(external_controller_))) + if name_ is not None and not isinstance(name_, (bytes, str)): + raise Exception("Expected name_ to be a str, received: {}".format(type(name_))) - if macaroon_ is not None and not isinstance(macaroon_, (dict, Macaroon)): - raise Exception("Expected macaroon_ to be a Macaroon, received: {}".format(type(macaroon_))) + if valid_ is not None and not isinstance(valid_, bool): + raise Exception("Expected valid_ to be a bool, received: {}".format(type(valid_))) - if offer_name_ is not None and not isinstance(offer_name_, (bytes, str)): - raise Exception("Expected offer_name_ to be a str, received: {}".format(type(offer_name_))) + self.attrs = attrs_ + self.auth_type = auth_type_ + self.cloud = cloud_ + self.name = name_ + self.valid = valid_ + self.unknown_fields = unknown_fields - if offer_url_ is not None and not isinstance(offer_url_, (bytes, str)): - raise Exception("Expected offer_url_ to be a str, received: {}".format(type(offer_url_))) - if offer_uuid_ is not None and not isinstance(offer_uuid_, (bytes, str)): - raise Exception("Expected offer_uuid_ to be a str, received: {}".format(type(offer_uuid_))) - if source_model_tag_ is not None and not isinstance(source_model_tag_, (bytes, str)): - raise Exception("Expected source_model_tag_ to be a str, received: {}".format(type(source_model_tag_))) +class CredentialContentResult(Type): + _toSchema = {'error': 'error', 'result': 'result'} + _toPy = {'error': 'error', 'result': 'result'} + def __init__(self, error=None, result=None, **unknown_fields): + ''' + error : Error + result : ControllerCredentialInfo + ''' + error_ = Error.from_json(error) if error else None + result_ = ControllerCredentialInfo.from_json(result) if result else None - if spaces_ is not None and not isinstance(spaces_, (bytes, str, list)): - raise Exception("Expected spaces_ to be a Sequence, received: {}".format(type(spaces_))) + # Validate arguments against known Juju API types. + if error_ is not None and not isinstance(error_, (dict, Error)): + raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - if users_ is not None and not isinstance(users_, (bytes, str, list)): - raise Exception("Expected users_ to be a Sequence, received: {}".format(type(users_))) + if result_ is not None and not isinstance(result_, (dict, ControllerCredentialInfo)): + raise Exception("Expected result_ to be a ControllerCredentialInfo, received: {}".format(type(result_))) - self.applicationofferdetails = applicationofferdetails_ - self.application_alias = application_alias_ - self.application_description = application_description_ - self.bindings = bindings_ - self.endpoints = endpoints_ - self.external_controller = external_controller_ - self.macaroon = macaroon_ - self.offer_name = offer_name_ - self.offer_url = offer_url_ - self.offer_uuid = offer_uuid_ - self.source_model_tag = source_model_tag_ - self.spaces = spaces_ - self.users = users_ + self.error = error_ + self.result = result_ self.unknown_fields = unknown_fields -class ConsumeApplicationArgs(Type): - _toSchema = {'args': 'args'} - _toPy = {'args': 'args'} - def __init__(self, args=None, **unknown_fields): +class CredentialContentResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} + def __init__(self, results=None, **unknown_fields): ''' - args : typing.Sequence[~ConsumeApplicationArg] + results : typing.Sequence[~CredentialContentResult] ''' - args_ = [ConsumeApplicationArg.from_json(o) for o in args or []] + results_ = [CredentialContentResult.from_json(o) for o in results or []] # Validate arguments against known Juju API types. - if args_ is not None and not isinstance(args_, (bytes, str, list)): - raise Exception("Expected args_ to be a Sequence, received: {}".format(type(args_))) + if results_ is not None and not isinstance(results_, (bytes, str, list)): + raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) - self.args = args_ + self.results = results_ self.unknown_fields = unknown_fields -class ConsumeOfferDetails(Type): - _toSchema = {'external_controller': 'external-controller', 'macaroon': 'macaroon', 'offer': 'offer'} - _toPy = {'external-controller': 'external_controller', 'macaroon': 'macaroon', 'offer': 'offer'} - def __init__(self, external_controller=None, macaroon=None, offer=None, **unknown_fields): +class DashboardConnectionInfo(Type): + _toSchema = {'error': 'error', 'proxy_connection': 'proxy-connection', 'ssh_connection': 'ssh-connection'} + _toPy = {'error': 'error', 'proxy-connection': 'proxy_connection', 'ssh-connection': 'ssh_connection'} + def __init__(self, error=None, proxy_connection=None, ssh_connection=None, **unknown_fields): ''' - external_controller : ExternalControllerInfo - macaroon : Macaroon - offer : ApplicationOfferDetails + error : Error + proxy_connection : Proxy + ssh_connection : DashboardConnectionSSHTunnel ''' - external_controller_ = ExternalControllerInfo.from_json(external_controller) if external_controller else None - macaroon_ = Macaroon.from_json(macaroon) if macaroon else None - offer_ = ApplicationOfferDetails.from_json(offer) if offer else None + error_ = Error.from_json(error) if error else None + proxy_connection_ = Proxy.from_json(proxy_connection) if proxy_connection else None + ssh_connection_ = DashboardConnectionSSHTunnel.from_json(ssh_connection) if ssh_connection else None # Validate arguments against known Juju API types. - if external_controller_ is not None and not isinstance(external_controller_, (dict, ExternalControllerInfo)): - raise Exception("Expected external_controller_ to be a ExternalControllerInfo, received: {}".format(type(external_controller_))) + if error_ is not None and not isinstance(error_, (dict, Error)): + raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - if macaroon_ is not None and not isinstance(macaroon_, (dict, Macaroon)): - raise Exception("Expected macaroon_ to be a Macaroon, received: {}".format(type(macaroon_))) + if proxy_connection_ is not None and not isinstance(proxy_connection_, (dict, Proxy)): + raise Exception("Expected proxy_connection_ to be a Proxy, received: {}".format(type(proxy_connection_))) - if offer_ is not None and not isinstance(offer_, (dict, ApplicationOfferDetails)): - raise Exception("Expected offer_ to be a ApplicationOfferDetails, received: {}".format(type(offer_))) + if ssh_connection_ is not None and not isinstance(ssh_connection_, (dict, DashboardConnectionSSHTunnel)): + raise Exception("Expected ssh_connection_ to be a DashboardConnectionSSHTunnel, received: {}".format(type(ssh_connection_))) - self.external_controller = external_controller_ - self.macaroon = macaroon_ - self.offer = offer_ + self.error = error_ + self.proxy_connection = proxy_connection_ + self.ssh_connection = ssh_connection_ self.unknown_fields = unknown_fields -class ConsumeOfferDetailsArg(Type): - _toSchema = {'offer_urls': 'offer-urls', 'user_tag': 'user-tag'} - _toPy = {'offer-urls': 'offer_urls', 'user-tag': 'user_tag'} - def __init__(self, offer_urls=None, user_tag=None, **unknown_fields): +class DashboardConnectionSSHTunnel(Type): + _toSchema = {'entity': 'entity', 'host': 'host', 'model': 'model', 'port': 'port'} + _toPy = {'entity': 'entity', 'host': 'host', 'model': 'model', 'port': 'port'} + def __init__(self, entity=None, host=None, model=None, port=None, **unknown_fields): ''' - offer_urls : OfferURLs - user_tag : str + entity : str + host : str + model : str + port : str ''' - offer_urls_ = OfferURLs.from_json(offer_urls) if offer_urls else None - user_tag_ = user_tag + entity_ = entity + host_ = host + model_ = model + port_ = port # Validate arguments against known Juju API types. - if offer_urls_ is not None and not isinstance(offer_urls_, (dict, OfferURLs)): - raise Exception("Expected offer_urls_ to be a OfferURLs, received: {}".format(type(offer_urls_))) + if entity_ is not None and not isinstance(entity_, (bytes, str)): + raise Exception("Expected entity_ to be a str, received: {}".format(type(entity_))) - if user_tag_ is not None and not isinstance(user_tag_, (bytes, str)): - raise Exception("Expected user_tag_ to be a str, received: {}".format(type(user_tag_))) + if host_ is not None and not isinstance(host_, (bytes, str)): + raise Exception("Expected host_ to be a str, received: {}".format(type(host_))) - self.offer_urls = offer_urls_ - self.user_tag = user_tag_ + if model_ is not None and not isinstance(model_, (bytes, str)): + raise Exception("Expected model_ to be a str, received: {}".format(type(model_))) + + if port_ is not None and not isinstance(port_, (bytes, str)): + raise Exception("Expected port_ to be a str, received: {}".format(type(port_))) + + self.entity = entity_ + self.host = host_ + self.model = model_ + self.port = port_ self.unknown_fields = unknown_fields -class ConsumeOfferDetailsResult(Type): - _toSchema = {'consumeofferdetails': 'ConsumeOfferDetails', 'error': 'error', 'external_controller': 'external-controller', 'macaroon': 'macaroon', 'offer': 'offer'} - _toPy = {'ConsumeOfferDetails': 'consumeofferdetails', 'error': 'error', 'external-controller': 'external_controller', 'macaroon': 'macaroon', 'offer': 'offer'} - def __init__(self, consumeofferdetails=None, error=None, external_controller=None, macaroon=None, offer=None, **unknown_fields): +class DeleteSecretArg(Type): + _toSchema = {'label': 'label', 'revisions': 'revisions', 'uri': 'uri'} + _toPy = {'label': 'label', 'revisions': 'revisions', 'uri': 'uri'} + def __init__(self, label=None, revisions=None, uri=None, **unknown_fields): ''' - consumeofferdetails : ConsumeOfferDetails - error : Error - external_controller : ExternalControllerInfo - macaroon : Macaroon - offer : ApplicationOfferDetails + label : str + revisions : typing.Sequence[int] + uri : str ''' - consumeofferdetails_ = ConsumeOfferDetails.from_json(consumeofferdetails) if consumeofferdetails else None - error_ = Error.from_json(error) if error else None - external_controller_ = ExternalControllerInfo.from_json(external_controller) if external_controller else None - macaroon_ = Macaroon.from_json(macaroon) if macaroon else None - offer_ = ApplicationOfferDetails.from_json(offer) if offer else None + label_ = label + revisions_ = revisions + uri_ = uri # Validate arguments against known Juju API types. - if consumeofferdetails_ is not None and not isinstance(consumeofferdetails_, (dict, ConsumeOfferDetails)): - raise Exception("Expected consumeofferdetails_ to be a ConsumeOfferDetails, received: {}".format(type(consumeofferdetails_))) - - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - - if external_controller_ is not None and not isinstance(external_controller_, (dict, ExternalControllerInfo)): - raise Exception("Expected external_controller_ to be a ExternalControllerInfo, received: {}".format(type(external_controller_))) + if label_ is not None and not isinstance(label_, (bytes, str)): + raise Exception("Expected label_ to be a str, received: {}".format(type(label_))) - if macaroon_ is not None and not isinstance(macaroon_, (dict, Macaroon)): - raise Exception("Expected macaroon_ to be a Macaroon, received: {}".format(type(macaroon_))) + if revisions_ is not None and not isinstance(revisions_, (bytes, str, list)): + raise Exception("Expected revisions_ to be a Sequence, received: {}".format(type(revisions_))) - if offer_ is not None and not isinstance(offer_, (dict, ApplicationOfferDetails)): - raise Exception("Expected offer_ to be a ApplicationOfferDetails, received: {}".format(type(offer_))) + if uri_ is not None and not isinstance(uri_, (bytes, str)): + raise Exception("Expected uri_ to be a str, received: {}".format(type(uri_))) - self.consumeofferdetails = consumeofferdetails_ - self.error = error_ - self.external_controller = external_controller_ - self.macaroon = macaroon_ - self.offer = offer_ + self.label = label_ + self.revisions = revisions_ + self.uri = uri_ self.unknown_fields = unknown_fields -class ConsumeOfferDetailsResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None, **unknown_fields): +class DeleteSecretArgs(Type): + _toSchema = {'args': 'args'} + _toPy = {'args': 'args'} + def __init__(self, args=None, **unknown_fields): ''' - results : typing.Sequence[~ConsumeOfferDetailsResult] + args : typing.Sequence[~DeleteSecretArg] ''' - results_ = [ConsumeOfferDetailsResult.from_json(o) for o in results or []] + args_ = [DeleteSecretArg.from_json(o) for o in args or []] # Validate arguments against known Juju API types. - if results_ is not None and not isinstance(results_, (bytes, str, list)): - raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) + if args_ is not None and not isinstance(args_, (bytes, str, list)): + raise Exception("Expected args_ to be a Sequence, received: {}".format(type(args_))) - self.results = results_ + self.args = args_ self.unknown_fields = unknown_fields -class ContainerConfig(Type): - _toSchema = {'apt_mirror': 'apt-mirror', 'apt_proxy': 'apt-proxy', 'authorized_keys': 'authorized-keys', 'cloudinit_userdata': 'cloudinit-userdata', 'container_inherit_properties': 'container-inherit-properties', 'juju_proxy': 'juju-proxy', 'legacy_proxy': 'legacy-proxy', 'provider_type': 'provider-type', 'snap_proxy': 'snap-proxy', 'snap_store_assertions': 'snap-store-assertions', 'snap_store_proxy_id': 'snap-store-proxy-id', 'snap_store_proxy_url': 'snap-store-proxy-url', 'ssl_hostname_verification': 'ssl-hostname-verification', 'updatebehavior': 'UpdateBehavior'} - _toPy = {'UpdateBehavior': 'updatebehavior', 'apt-mirror': 'apt_mirror', 'apt-proxy': 'apt_proxy', 'authorized-keys': 'authorized_keys', 'cloudinit-userdata': 'cloudinit_userdata', 'container-inherit-properties': 'container_inherit_properties', 'juju-proxy': 'juju_proxy', 'legacy-proxy': 'legacy_proxy', 'provider-type': 'provider_type', 'snap-proxy': 'snap_proxy', 'snap-store-assertions': 'snap_store_assertions', 'snap-store-proxy-id': 'snap_store_proxy_id', 'snap-store-proxy-url': 'snap_store_proxy_url', 'ssl-hostname-verification': 'ssl_hostname_verification'} - def __init__(self, updatebehavior=None, apt_mirror=None, apt_proxy=None, authorized_keys=None, cloudinit_userdata=None, container_inherit_properties=None, juju_proxy=None, legacy_proxy=None, provider_type=None, snap_proxy=None, snap_store_assertions=None, snap_store_proxy_id=None, snap_store_proxy_url=None, ssl_hostname_verification=None, **unknown_fields): +class Delta(Type): + _toSchema = {'entity': 'entity', 'removed': 'removed'} + _toPy = {'entity': 'entity', 'removed': 'removed'} + def __init__(self, entity=None, removed=None, **unknown_fields): ''' - updatebehavior : UpdateBehavior - apt_mirror : str - apt_proxy : Settings - authorized_keys : str - cloudinit_userdata : typing.Mapping[str, typing.Any] - container_inherit_properties : str - juju_proxy : Settings - legacy_proxy : Settings - provider_type : str - snap_proxy : Settings - snap_store_assertions : str - snap_store_proxy_id : str - snap_store_proxy_url : str - ssl_hostname_verification : bool - ''' - updatebehavior_ = UpdateBehavior.from_json(updatebehavior) if updatebehavior else None - apt_mirror_ = apt_mirror - apt_proxy_ = Settings.from_json(apt_proxy) if apt_proxy else None - authorized_keys_ = authorized_keys - cloudinit_userdata_ = cloudinit_userdata - container_inherit_properties_ = container_inherit_properties - juju_proxy_ = Settings.from_json(juju_proxy) if juju_proxy else None - legacy_proxy_ = Settings.from_json(legacy_proxy) if legacy_proxy else None - provider_type_ = provider_type - snap_proxy_ = Settings.from_json(snap_proxy) if snap_proxy else None - snap_store_assertions_ = snap_store_assertions - snap_store_proxy_id_ = snap_store_proxy_id - snap_store_proxy_url_ = snap_store_proxy_url - ssl_hostname_verification_ = ssl_hostname_verification + entity : Any + removed : bool + ''' + entity_ = entity + removed_ = removed # Validate arguments against known Juju API types. - if updatebehavior_ is not None and not isinstance(updatebehavior_, (dict, UpdateBehavior)): - raise Exception("Expected updatebehavior_ to be a UpdateBehavior, received: {}".format(type(updatebehavior_))) + if removed_ is not None and not isinstance(removed_, bool): + raise Exception("Expected removed_ to be a bool, received: {}".format(type(removed_))) + + self.entity = entity_ + self.removed = removed_ + self.unknown_fields = unknown_fields + - if apt_mirror_ is not None and not isinstance(apt_mirror_, (bytes, str)): - raise Exception("Expected apt_mirror_ to be a str, received: {}".format(type(apt_mirror_))) - if apt_proxy_ is not None and not isinstance(apt_proxy_, (dict, Settings)): - raise Exception("Expected apt_proxy_ to be a Settings, received: {}".format(type(apt_proxy_))) +class DeployFromRepositoryArg(Type): + _toSchema = {'applicationname': 'ApplicationName', 'attachstorage': 'AttachStorage', 'base': 'base', 'channel': 'channel', 'charmname': 'CharmName', 'configyaml': 'ConfigYAML', 'cons': 'Cons', 'devices': 'Devices', 'dryrun': 'DryRun', 'endpoint_bindings': 'endpoint-bindings', 'force': 'force', 'num_units': 'num-units', 'placement': 'Placement', 'resources': 'resources', 'revision': 'revision', 'storage': 'Storage', 'trust': 'Trust'} + _toPy = {'ApplicationName': 'applicationname', 'AttachStorage': 'attachstorage', 'CharmName': 'charmname', 'ConfigYAML': 'configyaml', 'Cons': 'cons', 'Devices': 'devices', 'DryRun': 'dryrun', 'Placement': 'placement', 'Storage': 'storage', 'Trust': 'trust', 'base': 'base', 'channel': 'channel', 'endpoint-bindings': 'endpoint_bindings', 'force': 'force', 'num-units': 'num_units', 'resources': 'resources', 'revision': 'revision'} + def __init__(self, applicationname=None, attachstorage=None, charmname=None, configyaml=None, cons=None, devices=None, dryrun=None, placement=None, storage=None, trust=None, base=None, channel=None, endpoint_bindings=None, force=None, num_units=None, resources=None, revision=None, **unknown_fields): + ''' + applicationname : str + attachstorage : typing.Sequence[str] + charmname : str + configyaml : str + cons : Value + devices : typing.Mapping[str, ~Constraints] + dryrun : bool + placement : typing.Sequence[~Placement] + storage : typing.Mapping[str, ~Constraints] + trust : bool + base : Base + channel : str + endpoint_bindings : typing.Mapping[str, str] + force : bool + num_units : int + resources : typing.Mapping[str, str] + revision : int + ''' + applicationname_ = applicationname + attachstorage_ = attachstorage + charmname_ = charmname + configyaml_ = configyaml + cons_ = Value.from_json(cons) if cons else None + devices_ = {k: Constraints.from_json(v) for k, v in (devices or dict()).items()} + dryrun_ = dryrun + placement_ = [Placement.from_json(o) for o in placement or []] + storage_ = {k: Constraints.from_json(v) for k, v in (storage or dict()).items()} + trust_ = trust + base_ = Base.from_json(base) if base else None + channel_ = channel + endpoint_bindings_ = endpoint_bindings + force_ = force + num_units_ = num_units + resources_ = resources + revision_ = revision - if authorized_keys_ is not None and not isinstance(authorized_keys_, (bytes, str)): - raise Exception("Expected authorized_keys_ to be a str, received: {}".format(type(authorized_keys_))) + # Validate arguments against known Juju API types. + if applicationname_ is not None and not isinstance(applicationname_, (bytes, str)): + raise Exception("Expected applicationname_ to be a str, received: {}".format(type(applicationname_))) - if cloudinit_userdata_ is not None and not isinstance(cloudinit_userdata_, dict): - raise Exception("Expected cloudinit_userdata_ to be a Mapping, received: {}".format(type(cloudinit_userdata_))) + if attachstorage_ is not None and not isinstance(attachstorage_, (bytes, str, list)): + raise Exception("Expected attachstorage_ to be a Sequence, received: {}".format(type(attachstorage_))) - if container_inherit_properties_ is not None and not isinstance(container_inherit_properties_, (bytes, str)): - raise Exception("Expected container_inherit_properties_ to be a str, received: {}".format(type(container_inherit_properties_))) + if charmname_ is not None and not isinstance(charmname_, (bytes, str)): + raise Exception("Expected charmname_ to be a str, received: {}".format(type(charmname_))) - if juju_proxy_ is not None and not isinstance(juju_proxy_, (dict, Settings)): - raise Exception("Expected juju_proxy_ to be a Settings, received: {}".format(type(juju_proxy_))) + if configyaml_ is not None and not isinstance(configyaml_, (bytes, str)): + raise Exception("Expected configyaml_ to be a str, received: {}".format(type(configyaml_))) - if legacy_proxy_ is not None and not isinstance(legacy_proxy_, (dict, Settings)): - raise Exception("Expected legacy_proxy_ to be a Settings, received: {}".format(type(legacy_proxy_))) + if cons_ is not None and not isinstance(cons_, (dict, Value)): + raise Exception("Expected cons_ to be a Value, received: {}".format(type(cons_))) - if provider_type_ is not None and not isinstance(provider_type_, (bytes, str)): - raise Exception("Expected provider_type_ to be a str, received: {}".format(type(provider_type_))) + if devices_ is not None and not isinstance(devices_, dict): + raise Exception("Expected devices_ to be a Mapping, received: {}".format(type(devices_))) - if snap_proxy_ is not None and not isinstance(snap_proxy_, (dict, Settings)): - raise Exception("Expected snap_proxy_ to be a Settings, received: {}".format(type(snap_proxy_))) + if dryrun_ is not None and not isinstance(dryrun_, bool): + raise Exception("Expected dryrun_ to be a bool, received: {}".format(type(dryrun_))) - if snap_store_assertions_ is not None and not isinstance(snap_store_assertions_, (bytes, str)): - raise Exception("Expected snap_store_assertions_ to be a str, received: {}".format(type(snap_store_assertions_))) + if placement_ is not None and not isinstance(placement_, (bytes, str, list)): + raise Exception("Expected placement_ to be a Sequence, received: {}".format(type(placement_))) - if snap_store_proxy_id_ is not None and not isinstance(snap_store_proxy_id_, (bytes, str)): - raise Exception("Expected snap_store_proxy_id_ to be a str, received: {}".format(type(snap_store_proxy_id_))) + if storage_ is not None and not isinstance(storage_, dict): + raise Exception("Expected storage_ to be a Mapping, received: {}".format(type(storage_))) - if snap_store_proxy_url_ is not None and not isinstance(snap_store_proxy_url_, (bytes, str)): - raise Exception("Expected snap_store_proxy_url_ to be a str, received: {}".format(type(snap_store_proxy_url_))) + if trust_ is not None and not isinstance(trust_, bool): + raise Exception("Expected trust_ to be a bool, received: {}".format(type(trust_))) - if ssl_hostname_verification_ is not None and not isinstance(ssl_hostname_verification_, bool): - raise Exception("Expected ssl_hostname_verification_ to be a bool, received: {}".format(type(ssl_hostname_verification_))) + if base_ is not None and not isinstance(base_, (dict, Base)): + raise Exception("Expected base_ to be a Base, received: {}".format(type(base_))) - self.updatebehavior = updatebehavior_ - self.apt_mirror = apt_mirror_ - self.apt_proxy = apt_proxy_ - self.authorized_keys = authorized_keys_ - self.cloudinit_userdata = cloudinit_userdata_ - self.container_inherit_properties = container_inherit_properties_ - self.juju_proxy = juju_proxy_ - self.legacy_proxy = legacy_proxy_ - self.provider_type = provider_type_ - self.snap_proxy = snap_proxy_ - self.snap_store_assertions = snap_store_assertions_ - self.snap_store_proxy_id = snap_store_proxy_id_ - self.snap_store_proxy_url = snap_store_proxy_url_ - self.ssl_hostname_verification = ssl_hostname_verification_ - self.unknown_fields = unknown_fields + if channel_ is not None and not isinstance(channel_, (bytes, str)): + raise Exception("Expected channel_ to be a str, received: {}".format(type(channel_))) + if endpoint_bindings_ is not None and not isinstance(endpoint_bindings_, dict): + raise Exception("Expected endpoint_bindings_ to be a Mapping, received: {}".format(type(endpoint_bindings_))) + if force_ is not None and not isinstance(force_, bool): + raise Exception("Expected force_ to be a bool, received: {}".format(type(force_))) -class ContainerLXDProfile(Type): - _toSchema = {'name': 'name', 'profile': 'profile'} - _toPy = {'name': 'name', 'profile': 'profile'} - def __init__(self, name=None, profile=None, **unknown_fields): - ''' - name : str - profile : CharmLXDProfile - ''' - name_ = name - profile_ = CharmLXDProfile.from_json(profile) if profile else None + if num_units_ is not None and not isinstance(num_units_, int): + raise Exception("Expected num_units_ to be a int, received: {}".format(type(num_units_))) - # Validate arguments against known Juju API types. - if name_ is not None and not isinstance(name_, (bytes, str)): - raise Exception("Expected name_ to be a str, received: {}".format(type(name_))) + if resources_ is not None and not isinstance(resources_, dict): + raise Exception("Expected resources_ to be a Mapping, received: {}".format(type(resources_))) - if profile_ is not None and not isinstance(profile_, (dict, CharmLXDProfile)): - raise Exception("Expected profile_ to be a CharmLXDProfile, received: {}".format(type(profile_))) + if revision_ is not None and not isinstance(revision_, int): + raise Exception("Expected revision_ to be a int, received: {}".format(type(revision_))) - self.name = name_ - self.profile = profile_ + self.applicationname = applicationname_ + self.attachstorage = attachstorage_ + self.charmname = charmname_ + self.configyaml = configyaml_ + self.cons = cons_ + self.devices = devices_ + self.dryrun = dryrun_ + self.placement = placement_ + self.storage = storage_ + self.trust = trust_ + self.base = base_ + self.channel = channel_ + self.endpoint_bindings = endpoint_bindings_ + self.force = force_ + self.num_units = num_units_ + self.resources = resources_ + self.revision = revision_ self.unknown_fields = unknown_fields -class ContainerManagerConfig(Type): - _toSchema = {'config': 'config'} - _toPy = {'config': 'config'} - def __init__(self, config=None, **unknown_fields): +class DeployFromRepositoryArgs(Type): + _toSchema = {'args': 'Args'} + _toPy = {'Args': 'args'} + def __init__(self, args=None, **unknown_fields): ''' - config : typing.Mapping[str, str] + args : typing.Sequence[~DeployFromRepositoryArg] ''' - config_ = config + args_ = [DeployFromRepositoryArg.from_json(o) for o in args or []] # Validate arguments against known Juju API types. - if config_ is not None and not isinstance(config_, dict): - raise Exception("Expected config_ to be a Mapping, received: {}".format(type(config_))) + if args_ is not None and not isinstance(args_, (bytes, str, list)): + raise Exception("Expected args_ to be a Sequence, received: {}".format(type(args_))) - self.config = config_ + self.args = args_ self.unknown_fields = unknown_fields -class ContainerManagerConfigParams(Type): - _toSchema = {'type_': 'type'} - _toPy = {'type': 'type_'} - def __init__(self, type_=None, **unknown_fields): +class DeployFromRepositoryInfo(Type): + _toSchema = {'architecture': 'architecture', 'base': 'base', 'channel': 'channel', 'effective_channel': 'effective-channel', 'name': 'name', 'revision': 'revision'} + _toPy = {'architecture': 'architecture', 'base': 'base', 'channel': 'channel', 'effective-channel': 'effective_channel', 'name': 'name', 'revision': 'revision'} + def __init__(self, architecture=None, base=None, channel=None, effective_channel=None, name=None, revision=None, **unknown_fields): ''' - type_ : str + architecture : str + base : Base + channel : str + effective_channel : str + name : str + revision : int ''' - type__ = type_ + architecture_ = architecture + base_ = Base.from_json(base) if base else None + channel_ = channel + effective_channel_ = effective_channel + name_ = name + revision_ = revision # Validate arguments against known Juju API types. - if type__ is not None and not isinstance(type__, (bytes, str)): - raise Exception("Expected type__ to be a str, received: {}".format(type(type__))) + if architecture_ is not None and not isinstance(architecture_, (bytes, str)): + raise Exception("Expected architecture_ to be a str, received: {}".format(type(architecture_))) - self.type_ = type__ + if base_ is not None and not isinstance(base_, (dict, Base)): + raise Exception("Expected base_ to be a Base, received: {}".format(type(base_))) + + if channel_ is not None and not isinstance(channel_, (bytes, str)): + raise Exception("Expected channel_ to be a str, received: {}".format(type(channel_))) + + if effective_channel_ is not None and not isinstance(effective_channel_, (bytes, str)): + raise Exception("Expected effective_channel_ to be a str, received: {}".format(type(effective_channel_))) + + if name_ is not None and not isinstance(name_, (bytes, str)): + raise Exception("Expected name_ to be a str, received: {}".format(type(name_))) + + if revision_ is not None and not isinstance(revision_, int): + raise Exception("Expected revision_ to be a int, received: {}".format(type(revision_))) + + self.architecture = architecture_ + self.base = base_ + self.channel = channel_ + self.effective_channel = effective_channel_ + self.name = name_ + self.revision = revision_ self.unknown_fields = unknown_fields -class ContainerProfileResult(Type): - _toSchema = {'error': 'error', 'lxd_profiles': 'lxd-profiles'} - _toPy = {'error': 'error', 'lxd-profiles': 'lxd_profiles'} - def __init__(self, error=None, lxd_profiles=None, **unknown_fields): +class DeployFromRepositoryResult(Type): + _toSchema = {'errors': 'Errors', 'info': 'Info', 'pendingresourceuploads': 'PendingResourceUploads'} + _toPy = {'Errors': 'errors', 'Info': 'info', 'PendingResourceUploads': 'pendingresourceuploads'} + def __init__(self, errors=None, info=None, pendingresourceuploads=None, **unknown_fields): ''' - error : Error - lxd_profiles : typing.Sequence[~ContainerLXDProfile] + errors : typing.Sequence[~Error] + info : DeployFromRepositoryInfo + pendingresourceuploads : typing.Sequence[~PendingResourceUpload] ''' - error_ = Error.from_json(error) if error else None - lxd_profiles_ = [ContainerLXDProfile.from_json(o) for o in lxd_profiles or []] + errors_ = [Error.from_json(o) for o in errors or []] + info_ = DeployFromRepositoryInfo.from_json(info) if info else None + pendingresourceuploads_ = [PendingResourceUpload.from_json(o) for o in pendingresourceuploads or []] # Validate arguments against known Juju API types. - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) + if errors_ is not None and not isinstance(errors_, (bytes, str, list)): + raise Exception("Expected errors_ to be a Sequence, received: {}".format(type(errors_))) - if lxd_profiles_ is not None and not isinstance(lxd_profiles_, (bytes, str, list)): - raise Exception("Expected lxd_profiles_ to be a Sequence, received: {}".format(type(lxd_profiles_))) + if info_ is not None and not isinstance(info_, (dict, DeployFromRepositoryInfo)): + raise Exception("Expected info_ to be a DeployFromRepositoryInfo, received: {}".format(type(info_))) - self.error = error_ - self.lxd_profiles = lxd_profiles_ + if pendingresourceuploads_ is not None and not isinstance(pendingresourceuploads_, (bytes, str, list)): + raise Exception("Expected pendingresourceuploads_ to be a Sequence, received: {}".format(type(pendingresourceuploads_))) + + self.errors = errors_ + self.info = info_ + self.pendingresourceuploads = pendingresourceuploads_ self.unknown_fields = unknown_fields -class ContainerProfileResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} +class DeployFromRepositoryResults(Type): + _toSchema = {'results': 'Results'} + _toPy = {'Results': 'results'} def __init__(self, results=None, **unknown_fields): ''' - results : typing.Sequence[~ContainerProfileResult] + results : typing.Sequence[~DeployFromRepositoryResult] ''' - results_ = [ContainerProfileResult.from_json(o) for o in results or []] + results_ = [DeployFromRepositoryResult.from_json(o) for o in results or []] # Validate arguments against known Juju API types. if results_ is not None and not isinstance(results_, (bytes, str, list)): @@ -7000,518 +6001,572 @@ def __init__(self, results=None, **unknown_fields): -class ContainerTypeResult(Type): - _toSchema = {'container_type': 'container-type', 'error': 'error'} - _toPy = {'container-type': 'container_type', 'error': 'error'} - def __init__(self, container_type=None, error=None, **unknown_fields): +class DestroyApplicationInfo(Type): + _toSchema = {'destroyed_storage': 'destroyed-storage', 'destroyed_units': 'destroyed-units', 'detached_storage': 'detached-storage'} + _toPy = {'destroyed-storage': 'destroyed_storage', 'destroyed-units': 'destroyed_units', 'detached-storage': 'detached_storage'} + def __init__(self, destroyed_storage=None, destroyed_units=None, detached_storage=None, **unknown_fields): ''' - container_type : str - error : Error + destroyed_storage : typing.Sequence[~Entity] + destroyed_units : typing.Sequence[~Entity] + detached_storage : typing.Sequence[~Entity] ''' - container_type_ = container_type - error_ = Error.from_json(error) if error else None + destroyed_storage_ = [Entity.from_json(o) for o in destroyed_storage or []] + destroyed_units_ = [Entity.from_json(o) for o in destroyed_units or []] + detached_storage_ = [Entity.from_json(o) for o in detached_storage or []] # Validate arguments against known Juju API types. - if container_type_ is not None and not isinstance(container_type_, (bytes, str)): - raise Exception("Expected container_type_ to be a str, received: {}".format(type(container_type_))) + if destroyed_storage_ is not None and not isinstance(destroyed_storage_, (bytes, str, list)): + raise Exception("Expected destroyed_storage_ to be a Sequence, received: {}".format(type(destroyed_storage_))) - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) + if destroyed_units_ is not None and not isinstance(destroyed_units_, (bytes, str, list)): + raise Exception("Expected destroyed_units_ to be a Sequence, received: {}".format(type(destroyed_units_))) - self.container_type = container_type_ - self.error = error_ + if detached_storage_ is not None and not isinstance(detached_storage_, (bytes, str, list)): + raise Exception("Expected detached_storage_ to be a Sequence, received: {}".format(type(detached_storage_))) + + self.destroyed_storage = destroyed_storage_ + self.destroyed_units = destroyed_units_ + self.detached_storage = detached_storage_ self.unknown_fields = unknown_fields -class ControllerAPIInfoResult(Type): - _toSchema = {'addresses': 'addresses', 'cacert': 'cacert', 'error': 'error'} - _toPy = {'addresses': 'addresses', 'cacert': 'cacert', 'error': 'error'} - def __init__(self, addresses=None, cacert=None, error=None, **unknown_fields): +class DestroyApplicationOffers(Type): + _toSchema = {'force': 'force', 'offer_urls': 'offer-urls'} + _toPy = {'force': 'force', 'offer-urls': 'offer_urls'} + def __init__(self, force=None, offer_urls=None, **unknown_fields): ''' - addresses : typing.Sequence[str] - cacert : str - error : Error + force : bool + offer_urls : typing.Sequence[str] ''' - addresses_ = addresses - cacert_ = cacert - error_ = Error.from_json(error) if error else None + force_ = force + offer_urls_ = offer_urls # Validate arguments against known Juju API types. - if addresses_ is not None and not isinstance(addresses_, (bytes, str, list)): - raise Exception("Expected addresses_ to be a Sequence, received: {}".format(type(addresses_))) - - if cacert_ is not None and not isinstance(cacert_, (bytes, str)): - raise Exception("Expected cacert_ to be a str, received: {}".format(type(cacert_))) + if force_ is not None and not isinstance(force_, bool): + raise Exception("Expected force_ to be a bool, received: {}".format(type(force_))) - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) + if offer_urls_ is not None and not isinstance(offer_urls_, (bytes, str, list)): + raise Exception("Expected offer_urls_ to be a Sequence, received: {}".format(type(offer_urls_))) - self.addresses = addresses_ - self.cacert = cacert_ - self.error = error_ + self.force = force_ + self.offer_urls = offer_urls_ self.unknown_fields = unknown_fields -class ControllerAPIInfoResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None, **unknown_fields): +class DestroyApplicationParams(Type): + _toSchema = {'application_tag': 'application-tag', 'destroy_storage': 'destroy-storage', 'dry_run': 'dry-run', 'force': 'force', 'max_wait': 'max-wait'} + _toPy = {'application-tag': 'application_tag', 'destroy-storage': 'destroy_storage', 'dry-run': 'dry_run', 'force': 'force', 'max-wait': 'max_wait'} + def __init__(self, application_tag=None, destroy_storage=None, dry_run=None, force=None, max_wait=None, **unknown_fields): ''' - results : typing.Sequence[~ControllerAPIInfoResult] + application_tag : str + destroy_storage : bool + dry_run : bool + force : bool + max_wait : int ''' - results_ = [ControllerAPIInfoResult.from_json(o) for o in results or []] + application_tag_ = application_tag + destroy_storage_ = destroy_storage + dry_run_ = dry_run + force_ = force + max_wait_ = max_wait # Validate arguments against known Juju API types. - if results_ is not None and not isinstance(results_, (bytes, str, list)): - raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) - - self.results = results_ - self.unknown_fields = unknown_fields + if application_tag_ is not None and not isinstance(application_tag_, (bytes, str)): + raise Exception("Expected application_tag_ to be a str, received: {}".format(type(application_tag_))) + if destroy_storage_ is not None and not isinstance(destroy_storage_, bool): + raise Exception("Expected destroy_storage_ to be a bool, received: {}".format(type(destroy_storage_))) + if dry_run_ is not None and not isinstance(dry_run_, bool): + raise Exception("Expected dry_run_ to be a bool, received: {}".format(type(dry_run_))) -class ControllerConfigResult(Type): - _toSchema = {'config': 'config'} - _toPy = {'config': 'config'} - def __init__(self, config=None, **unknown_fields): - ''' - config : typing.Mapping[str, typing.Any] - ''' - config_ = config + if force_ is not None and not isinstance(force_, bool): + raise Exception("Expected force_ to be a bool, received: {}".format(type(force_))) - # Validate arguments against known Juju API types. - if config_ is not None and not isinstance(config_, dict): - raise Exception("Expected config_ to be a Mapping, received: {}".format(type(config_))) + if max_wait_ is not None and not isinstance(max_wait_, int): + raise Exception("Expected max_wait_ to be a int, received: {}".format(type(max_wait_))) - self.config = config_ + self.application_tag = application_tag_ + self.destroy_storage = destroy_storage_ + self.dry_run = dry_run_ + self.force = force_ + self.max_wait = max_wait_ self.unknown_fields = unknown_fields -class ControllerConfigSet(Type): - _toSchema = {'config': 'config'} - _toPy = {'config': 'config'} - def __init__(self, config=None, **unknown_fields): +class DestroyApplicationResult(Type): + _toSchema = {'error': 'error', 'info': 'info'} + _toPy = {'error': 'error', 'info': 'info'} + def __init__(self, error=None, info=None, **unknown_fields): ''' - config : typing.Mapping[str, typing.Any] + error : Error + info : DestroyApplicationInfo ''' - config_ = config + error_ = Error.from_json(error) if error else None + info_ = DestroyApplicationInfo.from_json(info) if info else None # Validate arguments against known Juju API types. - if config_ is not None and not isinstance(config_, dict): - raise Exception("Expected config_ to be a Mapping, received: {}".format(type(config_))) + if error_ is not None and not isinstance(error_, (dict, Error)): + raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - self.config = config_ + if info_ is not None and not isinstance(info_, (dict, DestroyApplicationInfo)): + raise Exception("Expected info_ to be a DestroyApplicationInfo, received: {}".format(type(info_))) + + self.error = error_ + self.info = info_ self.unknown_fields = unknown_fields -class ControllerCredentialInfo(Type): - _toSchema = {'content': 'content', 'models': 'models'} - _toPy = {'content': 'content', 'models': 'models'} - def __init__(self, content=None, models=None, **unknown_fields): +class DestroyApplicationResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} + def __init__(self, results=None, **unknown_fields): ''' - content : CredentialContent - models : typing.Sequence[~ModelAccess] + results : typing.Sequence[~DestroyApplicationResult] ''' - content_ = CredentialContent.from_json(content) if content else None - models_ = [ModelAccess.from_json(o) for o in models or []] + results_ = [DestroyApplicationResult.from_json(o) for o in results or []] # Validate arguments against known Juju API types. - if content_ is not None and not isinstance(content_, (dict, CredentialContent)): - raise Exception("Expected content_ to be a CredentialContent, received: {}".format(type(content_))) - - if models_ is not None and not isinstance(models_, (bytes, str, list)): - raise Exception("Expected models_ to be a Sequence, received: {}".format(type(models_))) + if results_ is not None and not isinstance(results_, (bytes, str, list)): + raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) - self.content = content_ - self.models = models_ + self.results = results_ self.unknown_fields = unknown_fields -class ControllerVersionResults(Type): - _toSchema = {'git_commit': 'git-commit', 'version': 'version'} - _toPy = {'git-commit': 'git_commit', 'version': 'version'} - def __init__(self, git_commit=None, version=None, **unknown_fields): +class DestroyApplicationsParams(Type): + _toSchema = {'applications': 'applications'} + _toPy = {'applications': 'applications'} + def __init__(self, applications=None, **unknown_fields): ''' - git_commit : str - version : str + applications : typing.Sequence[~DestroyApplicationParams] ''' - git_commit_ = git_commit - version_ = version + applications_ = [DestroyApplicationParams.from_json(o) for o in applications or []] # Validate arguments against known Juju API types. - if git_commit_ is not None and not isinstance(git_commit_, (bytes, str)): - raise Exception("Expected git_commit_ to be a str, received: {}".format(type(git_commit_))) - - if version_ is not None and not isinstance(version_, (bytes, str)): - raise Exception("Expected version_ to be a str, received: {}".format(type(version_))) + if applications_ is not None and not isinstance(applications_, (bytes, str, list)): + raise Exception("Expected applications_ to be a Sequence, received: {}".format(type(applications_))) - self.git_commit = git_commit_ - self.version = version_ + self.applications = applications_ self.unknown_fields = unknown_fields -class ControllersChangeResult(Type): - _toSchema = {'error': 'error', 'result': 'result'} - _toPy = {'error': 'error', 'result': 'result'} - def __init__(self, error=None, result=None, **unknown_fields): +class DestroyConsumedApplicationParams(Type): + _toSchema = {'application_tag': 'application-tag', 'force': 'force', 'max_wait': 'max-wait'} + _toPy = {'application-tag': 'application_tag', 'force': 'force', 'max-wait': 'max_wait'} + def __init__(self, application_tag=None, force=None, max_wait=None, **unknown_fields): ''' - error : Error - result : ControllersChanges + application_tag : str + force : bool + max_wait : int ''' - error_ = Error.from_json(error) if error else None - result_ = ControllersChanges.from_json(result) if result else None + application_tag_ = application_tag + force_ = force + max_wait_ = max_wait # Validate arguments against known Juju API types. - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) + if application_tag_ is not None and not isinstance(application_tag_, (bytes, str)): + raise Exception("Expected application_tag_ to be a str, received: {}".format(type(application_tag_))) - if result_ is not None and not isinstance(result_, (dict, ControllersChanges)): - raise Exception("Expected result_ to be a ControllersChanges, received: {}".format(type(result_))) + if force_ is not None and not isinstance(force_, bool): + raise Exception("Expected force_ to be a bool, received: {}".format(type(force_))) - self.error = error_ - self.result = result_ + if max_wait_ is not None and not isinstance(max_wait_, int): + raise Exception("Expected max_wait_ to be a int, received: {}".format(type(max_wait_))) + + self.application_tag = application_tag_ + self.force = force_ + self.max_wait = max_wait_ self.unknown_fields = unknown_fields -class ControllersChangeResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None, **unknown_fields): +class DestroyConsumedApplicationsParams(Type): + _toSchema = {'applications': 'applications'} + _toPy = {'applications': 'applications'} + def __init__(self, applications=None, **unknown_fields): ''' - results : typing.Sequence[~ControllersChangeResult] + applications : typing.Sequence[~DestroyConsumedApplicationParams] ''' - results_ = [ControllersChangeResult.from_json(o) for o in results or []] + applications_ = [DestroyConsumedApplicationParams.from_json(o) for o in applications or []] # Validate arguments against known Juju API types. - if results_ is not None and not isinstance(results_, (bytes, str, list)): - raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) + if applications_ is not None and not isinstance(applications_, (bytes, str, list)): + raise Exception("Expected applications_ to be a Sequence, received: {}".format(type(applications_))) - self.results = results_ + self.applications = applications_ self.unknown_fields = unknown_fields -class ControllersChanges(Type): - _toSchema = {'added': 'added', 'converted': 'converted', 'maintained': 'maintained', 'removed': 'removed'} - _toPy = {'added': 'added', 'converted': 'converted', 'maintained': 'maintained', 'removed': 'removed'} - def __init__(self, added=None, converted=None, maintained=None, removed=None, **unknown_fields): +class DestroyControllerArgs(Type): + _toSchema = {'destroy_models': 'destroy-models', 'destroy_storage': 'destroy-storage', 'force': 'force', 'max_wait': 'max-wait', 'model_timeout': 'model-timeout'} + _toPy = {'destroy-models': 'destroy_models', 'destroy-storage': 'destroy_storage', 'force': 'force', 'max-wait': 'max_wait', 'model-timeout': 'model_timeout'} + def __init__(self, destroy_models=None, destroy_storage=None, force=None, max_wait=None, model_timeout=None, **unknown_fields): ''' - added : typing.Sequence[str] - converted : typing.Sequence[str] - maintained : typing.Sequence[str] - removed : typing.Sequence[str] + destroy_models : bool + destroy_storage : bool + force : bool + max_wait : int + model_timeout : int ''' - added_ = added - converted_ = converted - maintained_ = maintained - removed_ = removed + destroy_models_ = destroy_models + destroy_storage_ = destroy_storage + force_ = force + max_wait_ = max_wait + model_timeout_ = model_timeout # Validate arguments against known Juju API types. - if added_ is not None and not isinstance(added_, (bytes, str, list)): - raise Exception("Expected added_ to be a Sequence, received: {}".format(type(added_))) + if destroy_models_ is not None and not isinstance(destroy_models_, bool): + raise Exception("Expected destroy_models_ to be a bool, received: {}".format(type(destroy_models_))) - if converted_ is not None and not isinstance(converted_, (bytes, str, list)): - raise Exception("Expected converted_ to be a Sequence, received: {}".format(type(converted_))) + if destroy_storage_ is not None and not isinstance(destroy_storage_, bool): + raise Exception("Expected destroy_storage_ to be a bool, received: {}".format(type(destroy_storage_))) - if maintained_ is not None and not isinstance(maintained_, (bytes, str, list)): - raise Exception("Expected maintained_ to be a Sequence, received: {}".format(type(maintained_))) + if force_ is not None and not isinstance(force_, bool): + raise Exception("Expected force_ to be a bool, received: {}".format(type(force_))) - if removed_ is not None and not isinstance(removed_, (bytes, str, list)): - raise Exception("Expected removed_ to be a Sequence, received: {}".format(type(removed_))) + if max_wait_ is not None and not isinstance(max_wait_, int): + raise Exception("Expected max_wait_ to be a int, received: {}".format(type(max_wait_))) - self.added = added_ - self.converted = converted_ - self.maintained = maintained_ - self.removed = removed_ + if model_timeout_ is not None and not isinstance(model_timeout_, int): + raise Exception("Expected model_timeout_ to be a int, received: {}".format(type(model_timeout_))) + + self.destroy_models = destroy_models_ + self.destroy_storage = destroy_storage_ + self.force = force_ + self.max_wait = max_wait_ + self.model_timeout = model_timeout_ self.unknown_fields = unknown_fields -class ControllersSpec(Type): - _toSchema = {'constraints': 'constraints', 'num_controllers': 'num-controllers', 'placement': 'placement'} - _toPy = {'constraints': 'constraints', 'num-controllers': 'num_controllers', 'placement': 'placement'} - def __init__(self, constraints=None, num_controllers=None, placement=None, **unknown_fields): +class DestroyMachineInfo(Type): + _toSchema = {'destroyed_containers': 'destroyed-containers', 'destroyed_storage': 'destroyed-storage', 'destroyed_units': 'destroyed-units', 'detached_storage': 'detached-storage', 'machine_id': 'machine-id'} + _toPy = {'destroyed-containers': 'destroyed_containers', 'destroyed-storage': 'destroyed_storage', 'destroyed-units': 'destroyed_units', 'detached-storage': 'detached_storage', 'machine-id': 'machine_id'} + def __init__(self, destroyed_containers=None, destroyed_storage=None, destroyed_units=None, detached_storage=None, machine_id=None, **unknown_fields): ''' - constraints : Value - num_controllers : int - placement : typing.Sequence[str] + destroyed_containers : typing.Sequence[~DestroyMachineResult] + destroyed_storage : typing.Sequence[~Entity] + destroyed_units : typing.Sequence[~Entity] + detached_storage : typing.Sequence[~Entity] + machine_id : str ''' - constraints_ = Value.from_json(constraints) if constraints else None - num_controllers_ = num_controllers - placement_ = placement + destroyed_containers_ = [DestroyMachineResult.from_json(o) for o in destroyed_containers or []] + destroyed_storage_ = [Entity.from_json(o) for o in destroyed_storage or []] + destroyed_units_ = [Entity.from_json(o) for o in destroyed_units or []] + detached_storage_ = [Entity.from_json(o) for o in detached_storage or []] + machine_id_ = machine_id # Validate arguments against known Juju API types. - if constraints_ is not None and not isinstance(constraints_, (dict, Value)): - raise Exception("Expected constraints_ to be a Value, received: {}".format(type(constraints_))) + if destroyed_containers_ is not None and not isinstance(destroyed_containers_, (bytes, str, list)): + raise Exception("Expected destroyed_containers_ to be a Sequence, received: {}".format(type(destroyed_containers_))) - if num_controllers_ is not None and not isinstance(num_controllers_, int): - raise Exception("Expected num_controllers_ to be a int, received: {}".format(type(num_controllers_))) + if destroyed_storage_ is not None and not isinstance(destroyed_storage_, (bytes, str, list)): + raise Exception("Expected destroyed_storage_ to be a Sequence, received: {}".format(type(destroyed_storage_))) - if placement_ is not None and not isinstance(placement_, (bytes, str, list)): - raise Exception("Expected placement_ to be a Sequence, received: {}".format(type(placement_))) + if destroyed_units_ is not None and not isinstance(destroyed_units_, (bytes, str, list)): + raise Exception("Expected destroyed_units_ to be a Sequence, received: {}".format(type(destroyed_units_))) - self.constraints = constraints_ - self.num_controllers = num_controllers_ - self.placement = placement_ + if detached_storage_ is not None and not isinstance(detached_storage_, (bytes, str, list)): + raise Exception("Expected detached_storage_ to be a Sequence, received: {}".format(type(detached_storage_))) + + if machine_id_ is not None and not isinstance(machine_id_, (bytes, str)): + raise Exception("Expected machine_id_ to be a str, received: {}".format(type(machine_id_))) + + self.destroyed_containers = destroyed_containers_ + self.destroyed_storage = destroyed_storage_ + self.destroyed_units = destroyed_units_ + self.detached_storage = detached_storage_ + self.machine_id = machine_id_ self.unknown_fields = unknown_fields -class ControllersSpecs(Type): - _toSchema = {'specs': 'specs'} - _toPy = {'specs': 'specs'} - def __init__(self, specs=None, **unknown_fields): +class DestroyMachineResult(Type): + _toSchema = {'error': 'error', 'info': 'info'} + _toPy = {'error': 'error', 'info': 'info'} + def __init__(self, error=None, info=None, **unknown_fields): ''' - specs : typing.Sequence[~ControllersSpec] + error : Error + info : DestroyMachineInfo ''' - specs_ = [ControllersSpec.from_json(o) for o in specs or []] + error_ = Error.from_json(error) if error else None + info_ = DestroyMachineInfo.from_json(info) if info else None # Validate arguments against known Juju API types. - if specs_ is not None and not isinstance(specs_, (bytes, str, list)): - raise Exception("Expected specs_ to be a Sequence, received: {}".format(type(specs_))) + if error_ is not None and not isinstance(error_, (dict, Error)): + raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - self.specs = specs_ + if info_ is not None and not isinstance(info_, (dict, DestroyMachineInfo)): + raise Exception("Expected info_ to be a DestroyMachineInfo, received: {}".format(type(info_))) + + self.error = error_ + self.info = info_ self.unknown_fields = unknown_fields -class CreateSecretArg(Type): - _toSchema = {'content': 'content', 'description': 'description', 'expire_time': 'expire-time', 'label': 'label', 'owner_tag': 'owner-tag', 'params': 'params', 'rotate_policy': 'rotate-policy', 'upsertsecretarg': 'UpsertSecretArg', 'uri': 'uri'} - _toPy = {'UpsertSecretArg': 'upsertsecretarg', 'content': 'content', 'description': 'description', 'expire-time': 'expire_time', 'label': 'label', 'owner-tag': 'owner_tag', 'params': 'params', 'rotate-policy': 'rotate_policy', 'uri': 'uri'} - def __init__(self, upsertsecretarg=None, content=None, description=None, expire_time=None, label=None, owner_tag=None, params=None, rotate_policy=None, uri=None, **unknown_fields): +class DestroyMachineResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} + def __init__(self, results=None, **unknown_fields): ''' - upsertsecretarg : UpsertSecretArg - content : SecretContentParams - description : str - expire_time : str - label : str - owner_tag : str - params : typing.Mapping[str, typing.Any] - rotate_policy : str - uri : str + results : typing.Sequence[~DestroyMachineResult] ''' - upsertsecretarg_ = UpsertSecretArg.from_json(upsertsecretarg) if upsertsecretarg else None - content_ = SecretContentParams.from_json(content) if content else None - description_ = description - expire_time_ = expire_time - label_ = label - owner_tag_ = owner_tag - params_ = params - rotate_policy_ = rotate_policy - uri_ = uri + results_ = [DestroyMachineResult.from_json(o) for o in results or []] # Validate arguments against known Juju API types. - if upsertsecretarg_ is not None and not isinstance(upsertsecretarg_, (dict, UpsertSecretArg)): - raise Exception("Expected upsertsecretarg_ to be a UpsertSecretArg, received: {}".format(type(upsertsecretarg_))) + if results_ is not None and not isinstance(results_, (bytes, str, list)): + raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) - if content_ is not None and not isinstance(content_, (dict, SecretContentParams)): - raise Exception("Expected content_ to be a SecretContentParams, received: {}".format(type(content_))) + self.results = results_ + self.unknown_fields = unknown_fields - if description_ is not None and not isinstance(description_, (bytes, str)): - raise Exception("Expected description_ to be a str, received: {}".format(type(description_))) - if expire_time_ is not None and not isinstance(expire_time_, (bytes, str)): - raise Exception("Expected expire_time_ to be a str, received: {}".format(type(expire_time_))) - if label_ is not None and not isinstance(label_, (bytes, str)): - raise Exception("Expected label_ to be a str, received: {}".format(type(label_))) +class DestroyMachinesParams(Type): + _toSchema = {'dry_run': 'dry-run', 'force': 'force', 'keep': 'keep', 'machine_tags': 'machine-tags', 'max_wait': 'max-wait'} + _toPy = {'dry-run': 'dry_run', 'force': 'force', 'keep': 'keep', 'machine-tags': 'machine_tags', 'max-wait': 'max_wait'} + def __init__(self, dry_run=None, force=None, keep=None, machine_tags=None, max_wait=None, **unknown_fields): + ''' + dry_run : bool + force : bool + keep : bool + machine_tags : typing.Sequence[str] + max_wait : int + ''' + dry_run_ = dry_run + force_ = force + keep_ = keep + machine_tags_ = machine_tags + max_wait_ = max_wait - if owner_tag_ is not None and not isinstance(owner_tag_, (bytes, str)): - raise Exception("Expected owner_tag_ to be a str, received: {}".format(type(owner_tag_))) + # Validate arguments against known Juju API types. + if dry_run_ is not None and not isinstance(dry_run_, bool): + raise Exception("Expected dry_run_ to be a bool, received: {}".format(type(dry_run_))) - if params_ is not None and not isinstance(params_, dict): - raise Exception("Expected params_ to be a Mapping, received: {}".format(type(params_))) + if force_ is not None and not isinstance(force_, bool): + raise Exception("Expected force_ to be a bool, received: {}".format(type(force_))) - if rotate_policy_ is not None and not isinstance(rotate_policy_, (bytes, str)): - raise Exception("Expected rotate_policy_ to be a str, received: {}".format(type(rotate_policy_))) + if keep_ is not None and not isinstance(keep_, bool): + raise Exception("Expected keep_ to be a bool, received: {}".format(type(keep_))) - if uri_ is not None and not isinstance(uri_, (bytes, str)): - raise Exception("Expected uri_ to be a str, received: {}".format(type(uri_))) + if machine_tags_ is not None and not isinstance(machine_tags_, (bytes, str, list)): + raise Exception("Expected machine_tags_ to be a Sequence, received: {}".format(type(machine_tags_))) - self.upsertsecretarg = upsertsecretarg_ - self.content = content_ - self.description = description_ - self.expire_time = expire_time_ - self.label = label_ - self.owner_tag = owner_tag_ - self.params = params_ - self.rotate_policy = rotate_policy_ - self.uri = uri_ + if max_wait_ is not None and not isinstance(max_wait_, int): + raise Exception("Expected max_wait_ to be a int, received: {}".format(type(max_wait_))) + + self.dry_run = dry_run_ + self.force = force_ + self.keep = keep_ + self.machine_tags = machine_tags_ + self.max_wait = max_wait_ self.unknown_fields = unknown_fields -class CreateSecretArgs(Type): - _toSchema = {'args': 'args'} - _toPy = {'args': 'args'} - def __init__(self, args=None, **unknown_fields): +class DestroyModelParams(Type): + _toSchema = {'destroy_storage': 'destroy-storage', 'force': 'force', 'max_wait': 'max-wait', 'model_tag': 'model-tag', 'timeout': 'timeout'} + _toPy = {'destroy-storage': 'destroy_storage', 'force': 'force', 'max-wait': 'max_wait', 'model-tag': 'model_tag', 'timeout': 'timeout'} + def __init__(self, destroy_storage=None, force=None, max_wait=None, model_tag=None, timeout=None, **unknown_fields): ''' - args : typing.Sequence[~CreateSecretArg] + destroy_storage : bool + force : bool + max_wait : int + model_tag : str + timeout : int ''' - args_ = [CreateSecretArg.from_json(o) for o in args or []] + destroy_storage_ = destroy_storage + force_ = force + max_wait_ = max_wait + model_tag_ = model_tag + timeout_ = timeout # Validate arguments against known Juju API types. - if args_ is not None and not isinstance(args_, (bytes, str, list)): - raise Exception("Expected args_ to be a Sequence, received: {}".format(type(args_))) + if destroy_storage_ is not None and not isinstance(destroy_storage_, bool): + raise Exception("Expected destroy_storage_ to be a bool, received: {}".format(type(destroy_storage_))) - self.args = args_ + if force_ is not None and not isinstance(force_, bool): + raise Exception("Expected force_ to be a bool, received: {}".format(type(force_))) + + if max_wait_ is not None and not isinstance(max_wait_, int): + raise Exception("Expected max_wait_ to be a int, received: {}".format(type(max_wait_))) + + if model_tag_ is not None and not isinstance(model_tag_, (bytes, str)): + raise Exception("Expected model_tag_ to be a str, received: {}".format(type(model_tag_))) + + if timeout_ is not None and not isinstance(timeout_, int): + raise Exception("Expected timeout_ to be a int, received: {}".format(type(timeout_))) + + self.destroy_storage = destroy_storage_ + self.force = force_ + self.max_wait = max_wait_ + self.model_tag = model_tag_ + self.timeout = timeout_ self.unknown_fields = unknown_fields -class CreateSecretURIsArg(Type): - _toSchema = {'count': 'count'} - _toPy = {'count': 'count'} - def __init__(self, count=None, **unknown_fields): +class DestroyModelsParams(Type): + _toSchema = {'models': 'models'} + _toPy = {'models': 'models'} + def __init__(self, models=None, **unknown_fields): ''' - count : int + models : typing.Sequence[~DestroyModelParams] ''' - count_ = count + models_ = [DestroyModelParams.from_json(o) for o in models or []] # Validate arguments against known Juju API types. - if count_ is not None and not isinstance(count_, int): - raise Exception("Expected count_ to be a int, received: {}".format(type(count_))) + if models_ is not None and not isinstance(models_, (bytes, str, list)): + raise Exception("Expected models_ to be a Sequence, received: {}".format(type(models_))) - self.count = count_ + self.models = models_ self.unknown_fields = unknown_fields -class CreateSpaceParams(Type): - _toSchema = {'cidrs': 'cidrs', 'provider_id': 'provider-id', 'public': 'public', 'space_tag': 'space-tag'} - _toPy = {'cidrs': 'cidrs', 'provider-id': 'provider_id', 'public': 'public', 'space-tag': 'space_tag'} - def __init__(self, cidrs=None, provider_id=None, public=None, space_tag=None, **unknown_fields): +class DestroyRelation(Type): + _toSchema = {'endpoints': 'endpoints', 'force': 'force', 'max_wait': 'max-wait', 'relation_id': 'relation-id'} + _toPy = {'endpoints': 'endpoints', 'force': 'force', 'max-wait': 'max_wait', 'relation-id': 'relation_id'} + def __init__(self, endpoints=None, force=None, max_wait=None, relation_id=None, **unknown_fields): ''' - cidrs : typing.Sequence[str] - provider_id : str - public : bool - space_tag : str + endpoints : typing.Sequence[str] + force : bool + max_wait : int + relation_id : int ''' - cidrs_ = cidrs - provider_id_ = provider_id - public_ = public - space_tag_ = space_tag + endpoints_ = endpoints + force_ = force + max_wait_ = max_wait + relation_id_ = relation_id # Validate arguments against known Juju API types. - if cidrs_ is not None and not isinstance(cidrs_, (bytes, str, list)): - raise Exception("Expected cidrs_ to be a Sequence, received: {}".format(type(cidrs_))) + if endpoints_ is not None and not isinstance(endpoints_, (bytes, str, list)): + raise Exception("Expected endpoints_ to be a Sequence, received: {}".format(type(endpoints_))) - if provider_id_ is not None and not isinstance(provider_id_, (bytes, str)): - raise Exception("Expected provider_id_ to be a str, received: {}".format(type(provider_id_))) + if force_ is not None and not isinstance(force_, bool): + raise Exception("Expected force_ to be a bool, received: {}".format(type(force_))) - if public_ is not None and not isinstance(public_, bool): - raise Exception("Expected public_ to be a bool, received: {}".format(type(public_))) + if max_wait_ is not None and not isinstance(max_wait_, int): + raise Exception("Expected max_wait_ to be a int, received: {}".format(type(max_wait_))) - if space_tag_ is not None and not isinstance(space_tag_, (bytes, str)): - raise Exception("Expected space_tag_ to be a str, received: {}".format(type(space_tag_))) + if relation_id_ is not None and not isinstance(relation_id_, int): + raise Exception("Expected relation_id_ to be a int, received: {}".format(type(relation_id_))) - self.cidrs = cidrs_ - self.provider_id = provider_id_ - self.public = public_ - self.space_tag = space_tag_ + self.endpoints = endpoints_ + self.force = force_ + self.max_wait = max_wait_ + self.relation_id = relation_id_ self.unknown_fields = unknown_fields -class CreateSpacesParams(Type): - _toSchema = {'spaces': 'spaces'} - _toPy = {'spaces': 'spaces'} - def __init__(self, spaces=None, **unknown_fields): +class DestroyUnitInfo(Type): + _toSchema = {'destroyed_storage': 'destroyed-storage', 'detached_storage': 'detached-storage'} + _toPy = {'destroyed-storage': 'destroyed_storage', 'detached-storage': 'detached_storage'} + def __init__(self, destroyed_storage=None, detached_storage=None, **unknown_fields): ''' - spaces : typing.Sequence[~CreateSpaceParams] + destroyed_storage : typing.Sequence[~Entity] + detached_storage : typing.Sequence[~Entity] ''' - spaces_ = [CreateSpaceParams.from_json(o) for o in spaces or []] + destroyed_storage_ = [Entity.from_json(o) for o in destroyed_storage or []] + detached_storage_ = [Entity.from_json(o) for o in detached_storage or []] # Validate arguments against known Juju API types. - if spaces_ is not None and not isinstance(spaces_, (bytes, str, list)): - raise Exception("Expected spaces_ to be a Sequence, received: {}".format(type(spaces_))) + if destroyed_storage_ is not None and not isinstance(destroyed_storage_, (bytes, str, list)): + raise Exception("Expected destroyed_storage_ to be a Sequence, received: {}".format(type(destroyed_storage_))) - self.spaces = spaces_ + if detached_storage_ is not None and not isinstance(detached_storage_, (bytes, str, list)): + raise Exception("Expected detached_storage_ to be a Sequence, received: {}".format(type(detached_storage_))) + + self.destroyed_storage = destroyed_storage_ + self.detached_storage = detached_storage_ self.unknown_fields = unknown_fields -class CredentialContent(Type): - _toSchema = {'attrs': 'attrs', 'auth_type': 'auth-type', 'cloud': 'cloud', 'name': 'name', 'valid': 'valid'} - _toPy = {'attrs': 'attrs', 'auth-type': 'auth_type', 'cloud': 'cloud', 'name': 'name', 'valid': 'valid'} - def __init__(self, attrs=None, auth_type=None, cloud=None, name=None, valid=None, **unknown_fields): +class DestroyUnitParams(Type): + _toSchema = {'destroy_storage': 'destroy-storage', 'dry_run': 'dry-run', 'force': 'force', 'max_wait': 'max-wait', 'unit_tag': 'unit-tag'} + _toPy = {'destroy-storage': 'destroy_storage', 'dry-run': 'dry_run', 'force': 'force', 'max-wait': 'max_wait', 'unit-tag': 'unit_tag'} + def __init__(self, destroy_storage=None, dry_run=None, force=None, max_wait=None, unit_tag=None, **unknown_fields): ''' - attrs : typing.Mapping[str, str] - auth_type : str - cloud : str - name : str - valid : bool + destroy_storage : bool + dry_run : bool + force : bool + max_wait : int + unit_tag : str ''' - attrs_ = attrs - auth_type_ = auth_type - cloud_ = cloud - name_ = name - valid_ = valid + destroy_storage_ = destroy_storage + dry_run_ = dry_run + force_ = force + max_wait_ = max_wait + unit_tag_ = unit_tag # Validate arguments against known Juju API types. - if attrs_ is not None and not isinstance(attrs_, dict): - raise Exception("Expected attrs_ to be a Mapping, received: {}".format(type(attrs_))) + if destroy_storage_ is not None and not isinstance(destroy_storage_, bool): + raise Exception("Expected destroy_storage_ to be a bool, received: {}".format(type(destroy_storage_))) - if auth_type_ is not None and not isinstance(auth_type_, (bytes, str)): - raise Exception("Expected auth_type_ to be a str, received: {}".format(type(auth_type_))) + if dry_run_ is not None and not isinstance(dry_run_, bool): + raise Exception("Expected dry_run_ to be a bool, received: {}".format(type(dry_run_))) - if cloud_ is not None and not isinstance(cloud_, (bytes, str)): - raise Exception("Expected cloud_ to be a str, received: {}".format(type(cloud_))) + if force_ is not None and not isinstance(force_, bool): + raise Exception("Expected force_ to be a bool, received: {}".format(type(force_))) - if name_ is not None and not isinstance(name_, (bytes, str)): - raise Exception("Expected name_ to be a str, received: {}".format(type(name_))) + if max_wait_ is not None and not isinstance(max_wait_, int): + raise Exception("Expected max_wait_ to be a int, received: {}".format(type(max_wait_))) - if valid_ is not None and not isinstance(valid_, bool): - raise Exception("Expected valid_ to be a bool, received: {}".format(type(valid_))) + if unit_tag_ is not None and not isinstance(unit_tag_, (bytes, str)): + raise Exception("Expected unit_tag_ to be a str, received: {}".format(type(unit_tag_))) - self.attrs = attrs_ - self.auth_type = auth_type_ - self.cloud = cloud_ - self.name = name_ - self.valid = valid_ + self.destroy_storage = destroy_storage_ + self.dry_run = dry_run_ + self.force = force_ + self.max_wait = max_wait_ + self.unit_tag = unit_tag_ self.unknown_fields = unknown_fields -class CredentialContentResult(Type): - _toSchema = {'error': 'error', 'result': 'result'} - _toPy = {'error': 'error', 'result': 'result'} - def __init__(self, error=None, result=None, **unknown_fields): +class DestroyUnitResult(Type): + _toSchema = {'error': 'error', 'info': 'info'} + _toPy = {'error': 'error', 'info': 'info'} + def __init__(self, error=None, info=None, **unknown_fields): ''' error : Error - result : ControllerCredentialInfo + info : DestroyUnitInfo ''' error_ = Error.from_json(error) if error else None - result_ = ControllerCredentialInfo.from_json(result) if result else None + info_ = DestroyUnitInfo.from_json(info) if info else None # Validate arguments against known Juju API types. if error_ is not None and not isinstance(error_, (dict, Error)): raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - if result_ is not None and not isinstance(result_, (dict, ControllerCredentialInfo)): - raise Exception("Expected result_ to be a ControllerCredentialInfo, received: {}".format(type(result_))) + if info_ is not None and not isinstance(info_, (dict, DestroyUnitInfo)): + raise Exception("Expected info_ to be a DestroyUnitInfo, received: {}".format(type(info_))) self.error = error_ - self.result = result_ + self.info = info_ self.unknown_fields = unknown_fields -class CredentialContentResults(Type): +class DestroyUnitResults(Type): _toSchema = {'results': 'results'} _toPy = {'results': 'results'} def __init__(self, results=None, **unknown_fields): ''' - results : typing.Sequence[~CredentialContentResult] + results : typing.Sequence[~DestroyUnitResult] ''' - results_ = [CredentialContentResult.from_json(o) for o in results or []] + results_ = [DestroyUnitResult.from_json(o) for o in results or []] # Validate arguments against known Juju API types. if results_ is not None and not isinstance(results_, (bytes, str, list)): @@ -7522,1901 +6577,1985 @@ def __init__(self, results=None, **unknown_fields): -class DashboardConnectionInfo(Type): - _toSchema = {'error': 'error', 'proxy_connection': 'proxy-connection', 'ssh_connection': 'ssh-connection'} - _toPy = {'error': 'error', 'proxy-connection': 'proxy_connection', 'ssh-connection': 'ssh_connection'} - def __init__(self, error=None, proxy_connection=None, ssh_connection=None, **unknown_fields): +class DestroyUnitsParams(Type): + _toSchema = {'units': 'units'} + _toPy = {'units': 'units'} + def __init__(self, units=None, **unknown_fields): ''' - error : Error - proxy_connection : Proxy - ssh_connection : DashboardConnectionSSHTunnel + units : typing.Sequence[~DestroyUnitParams] ''' - error_ = Error.from_json(error) if error else None - proxy_connection_ = Proxy.from_json(proxy_connection) if proxy_connection else None - ssh_connection_ = DashboardConnectionSSHTunnel.from_json(ssh_connection) if ssh_connection else None + units_ = [DestroyUnitParams.from_json(o) for o in units or []] # Validate arguments against known Juju API types. - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - - if proxy_connection_ is not None and not isinstance(proxy_connection_, (dict, Proxy)): - raise Exception("Expected proxy_connection_ to be a Proxy, received: {}".format(type(proxy_connection_))) - - if ssh_connection_ is not None and not isinstance(ssh_connection_, (dict, DashboardConnectionSSHTunnel)): - raise Exception("Expected ssh_connection_ to be a DashboardConnectionSSHTunnel, received: {}".format(type(ssh_connection_))) + if units_ is not None and not isinstance(units_, (bytes, str, list)): + raise Exception("Expected units_ to be a Sequence, received: {}".format(type(units_))) - self.error = error_ - self.proxy_connection = proxy_connection_ - self.ssh_connection = ssh_connection_ + self.units = units_ self.unknown_fields = unknown_fields -class DashboardConnectionSSHTunnel(Type): - _toSchema = {'entity': 'entity', 'host': 'host', 'model': 'model', 'port': 'port'} - _toPy = {'entity': 'entity', 'host': 'host', 'model': 'model', 'port': 'port'} - def __init__(self, entity=None, host=None, model=None, port=None, **unknown_fields): +class DetailedStatus(Type): + _toSchema = {'data': 'data', 'err': 'err', 'info': 'info', 'kind': 'kind', 'life': 'life', 'since': 'since', 'status': 'status', 'version': 'version'} + _toPy = {'data': 'data', 'err': 'err', 'info': 'info', 'kind': 'kind', 'life': 'life', 'since': 'since', 'status': 'status', 'version': 'version'} + def __init__(self, data=None, err=None, info=None, kind=None, life=None, since=None, status=None, version=None, **unknown_fields): ''' - entity : str - host : str - model : str - port : str + data : typing.Mapping[str, typing.Any] + err : Error + info : str + kind : str + life : str + since : str + status : str + version : str ''' - entity_ = entity - host_ = host - model_ = model - port_ = port + data_ = data + err_ = Error.from_json(err) if err else None + info_ = info + kind_ = kind + life_ = life + since_ = since + status_ = status + version_ = version # Validate arguments against known Juju API types. - if entity_ is not None and not isinstance(entity_, (bytes, str)): - raise Exception("Expected entity_ to be a str, received: {}".format(type(entity_))) + if data_ is not None and not isinstance(data_, dict): + raise Exception("Expected data_ to be a Mapping, received: {}".format(type(data_))) - if host_ is not None and not isinstance(host_, (bytes, str)): - raise Exception("Expected host_ to be a str, received: {}".format(type(host_))) + if err_ is not None and not isinstance(err_, (dict, Error)): + raise Exception("Expected err_ to be a Error, received: {}".format(type(err_))) - if model_ is not None and not isinstance(model_, (bytes, str)): - raise Exception("Expected model_ to be a str, received: {}".format(type(model_))) + if info_ is not None and not isinstance(info_, (bytes, str)): + raise Exception("Expected info_ to be a str, received: {}".format(type(info_))) - if port_ is not None and not isinstance(port_, (bytes, str)): - raise Exception("Expected port_ to be a str, received: {}".format(type(port_))) + if kind_ is not None and not isinstance(kind_, (bytes, str)): + raise Exception("Expected kind_ to be a str, received: {}".format(type(kind_))) - self.entity = entity_ - self.host = host_ - self.model = model_ - self.port = port_ + if life_ is not None and not isinstance(life_, (bytes, str)): + raise Exception("Expected life_ to be a str, received: {}".format(type(life_))) + + if since_ is not None and not isinstance(since_, (bytes, str)): + raise Exception("Expected since_ to be a str, received: {}".format(type(since_))) + + if status_ is not None and not isinstance(status_, (bytes, str)): + raise Exception("Expected status_ to be a str, received: {}".format(type(status_))) + + if version_ is not None and not isinstance(version_, (bytes, str)): + raise Exception("Expected version_ to be a str, received: {}".format(type(version_))) + + self.data = data_ + self.err = err_ + self.info = info_ + self.kind = kind_ + self.life = life_ + self.since = since_ + self.status = status_ + self.version = version_ self.unknown_fields = unknown_fields -class DeleteSecretArg(Type): - _toSchema = {'label': 'label', 'revisions': 'revisions', 'uri': 'uri'} - _toPy = {'label': 'label', 'revisions': 'revisions', 'uri': 'uri'} - def __init__(self, label=None, revisions=None, uri=None, **unknown_fields): +class DownloadInfoResult(Type): + _toSchema = {'charm_origin': 'charm-origin', 'url': 'url'} + _toPy = {'charm-origin': 'charm_origin', 'url': 'url'} + def __init__(self, charm_origin=None, url=None, **unknown_fields): ''' - label : str - revisions : typing.Sequence[int] - uri : str + charm_origin : CharmOrigin + url : str ''' - label_ = label - revisions_ = revisions - uri_ = uri + charm_origin_ = CharmOrigin.from_json(charm_origin) if charm_origin else None + url_ = url # Validate arguments against known Juju API types. - if label_ is not None and not isinstance(label_, (bytes, str)): - raise Exception("Expected label_ to be a str, received: {}".format(type(label_))) - - if revisions_ is not None and not isinstance(revisions_, (bytes, str, list)): - raise Exception("Expected revisions_ to be a Sequence, received: {}".format(type(revisions_))) + if charm_origin_ is not None and not isinstance(charm_origin_, (dict, CharmOrigin)): + raise Exception("Expected charm_origin_ to be a CharmOrigin, received: {}".format(type(charm_origin_))) - if uri_ is not None and not isinstance(uri_, (bytes, str)): - raise Exception("Expected uri_ to be a str, received: {}".format(type(uri_))) + if url_ is not None and not isinstance(url_, (bytes, str)): + raise Exception("Expected url_ to be a str, received: {}".format(type(url_))) - self.label = label_ - self.revisions = revisions_ - self.uri = uri_ + self.charm_origin = charm_origin_ + self.url = url_ self.unknown_fields = unknown_fields -class DeleteSecretArgs(Type): - _toSchema = {'args': 'args'} - _toPy = {'args': 'args'} - def __init__(self, args=None, **unknown_fields): +class DownloadInfoResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} + def __init__(self, results=None, **unknown_fields): ''' - args : typing.Sequence[~DeleteSecretArg] + results : typing.Sequence[~DownloadInfoResult] ''' - args_ = [DeleteSecretArg.from_json(o) for o in args or []] + results_ = [DownloadInfoResult.from_json(o) for o in results or []] # Validate arguments against known Juju API types. - if args_ is not None and not isinstance(args_, (bytes, str, list)): - raise Exception("Expected args_ to be a Sequence, received: {}".format(type(args_))) + if results_ is not None and not isinstance(results_, (bytes, str, list)): + raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) - self.args = args_ + self.results = results_ self.unknown_fields = unknown_fields -class Delta(Type): - _toSchema = {'entity': 'entity', 'removed': 'removed'} - _toPy = {'entity': 'entity', 'removed': 'removed'} - def __init__(self, entity=None, removed=None, **unknown_fields): +class DumpModelRequest(Type): + _toSchema = {'entities': 'entities', 'simplified': 'simplified'} + _toPy = {'entities': 'entities', 'simplified': 'simplified'} + def __init__(self, entities=None, simplified=None, **unknown_fields): ''' - entity : Any - removed : bool + entities : typing.Sequence[~Entity] + simplified : bool ''' - entity_ = entity - removed_ = removed + entities_ = [Entity.from_json(o) for o in entities or []] + simplified_ = simplified # Validate arguments against known Juju API types. - if removed_ is not None and not isinstance(removed_, bool): - raise Exception("Expected removed_ to be a bool, received: {}".format(type(removed_))) + if entities_ is not None and not isinstance(entities_, (bytes, str, list)): + raise Exception("Expected entities_ to be a Sequence, received: {}".format(type(entities_))) - self.entity = entity_ - self.removed = removed_ + if simplified_ is not None and not isinstance(simplified_, bool): + raise Exception("Expected simplified_ to be a bool, received: {}".format(type(simplified_))) + + self.entities = entities_ + self.simplified = simplified_ self.unknown_fields = unknown_fields -class DeployFromRepositoryArg(Type): - _toSchema = {'applicationname': 'ApplicationName', 'attachstorage': 'AttachStorage', 'base': 'base', 'channel': 'channel', 'charmname': 'CharmName', 'configyaml': 'ConfigYAML', 'cons': 'Cons', 'devices': 'Devices', 'dryrun': 'DryRun', 'endpoint_bindings': 'endpoint-bindings', 'force': 'force', 'num_units': 'num-units', 'placement': 'Placement', 'resources': 'resources', 'revision': 'revision', 'storage': 'Storage', 'trust': 'Trust'} - _toPy = {'ApplicationName': 'applicationname', 'AttachStorage': 'attachstorage', 'CharmName': 'charmname', 'ConfigYAML': 'configyaml', 'Cons': 'cons', 'Devices': 'devices', 'DryRun': 'dryrun', 'Placement': 'placement', 'Storage': 'storage', 'Trust': 'trust', 'base': 'base', 'channel': 'channel', 'endpoint-bindings': 'endpoint_bindings', 'force': 'force', 'num-units': 'num_units', 'resources': 'resources', 'revision': 'revision'} - def __init__(self, applicationname=None, attachstorage=None, charmname=None, configyaml=None, cons=None, devices=None, dryrun=None, placement=None, storage=None, trust=None, base=None, channel=None, endpoint_bindings=None, force=None, num_units=None, resources=None, revision=None, **unknown_fields): +class EndpointFilterAttributes(Type): + _toSchema = {'interface': 'interface', 'name': 'name', 'role': 'role'} + _toPy = {'interface': 'interface', 'name': 'name', 'role': 'role'} + def __init__(self, interface=None, name=None, role=None, **unknown_fields): ''' - applicationname : str - attachstorage : typing.Sequence[str] - charmname : str - configyaml : str - cons : Value - devices : typing.Mapping[str, ~Constraints] - dryrun : bool - placement : typing.Sequence[~Placement] - storage : typing.Mapping[str, ~Constraints] - trust : bool - base : Base - channel : str - endpoint_bindings : typing.Mapping[str, str] - force : bool - num_units : int - resources : typing.Mapping[str, str] - revision : int + interface : str + name : str + role : str ''' - applicationname_ = applicationname - attachstorage_ = attachstorage - charmname_ = charmname - configyaml_ = configyaml - cons_ = Value.from_json(cons) if cons else None - devices_ = {k: Constraints.from_json(v) for k, v in (devices or dict()).items()} - dryrun_ = dryrun - placement_ = [Placement.from_json(o) for o in placement or []] - storage_ = {k: Constraints.from_json(v) for k, v in (storage or dict()).items()} - trust_ = trust - base_ = Base.from_json(base) if base else None - channel_ = channel - endpoint_bindings_ = endpoint_bindings - force_ = force - num_units_ = num_units - resources_ = resources - revision_ = revision + interface_ = interface + name_ = name + role_ = role # Validate arguments against known Juju API types. - if applicationname_ is not None and not isinstance(applicationname_, (bytes, str)): - raise Exception("Expected applicationname_ to be a str, received: {}".format(type(applicationname_))) - - if attachstorage_ is not None and not isinstance(attachstorage_, (bytes, str, list)): - raise Exception("Expected attachstorage_ to be a Sequence, received: {}".format(type(attachstorage_))) - - if charmname_ is not None and not isinstance(charmname_, (bytes, str)): - raise Exception("Expected charmname_ to be a str, received: {}".format(type(charmname_))) - - if configyaml_ is not None and not isinstance(configyaml_, (bytes, str)): - raise Exception("Expected configyaml_ to be a str, received: {}".format(type(configyaml_))) - - if cons_ is not None and not isinstance(cons_, (dict, Value)): - raise Exception("Expected cons_ to be a Value, received: {}".format(type(cons_))) + if interface_ is not None and not isinstance(interface_, (bytes, str)): + raise Exception("Expected interface_ to be a str, received: {}".format(type(interface_))) - if devices_ is not None and not isinstance(devices_, dict): - raise Exception("Expected devices_ to be a Mapping, received: {}".format(type(devices_))) + if name_ is not None and not isinstance(name_, (bytes, str)): + raise Exception("Expected name_ to be a str, received: {}".format(type(name_))) - if dryrun_ is not None and not isinstance(dryrun_, bool): - raise Exception("Expected dryrun_ to be a bool, received: {}".format(type(dryrun_))) + if role_ is not None and not isinstance(role_, (bytes, str)): + raise Exception("Expected role_ to be a str, received: {}".format(type(role_))) - if placement_ is not None and not isinstance(placement_, (bytes, str, list)): - raise Exception("Expected placement_ to be a Sequence, received: {}".format(type(placement_))) + self.interface = interface_ + self.name = name_ + self.role = role_ + self.unknown_fields = unknown_fields - if storage_ is not None and not isinstance(storage_, dict): - raise Exception("Expected storage_ to be a Mapping, received: {}".format(type(storage_))) - if trust_ is not None and not isinstance(trust_, bool): - raise Exception("Expected trust_ to be a bool, received: {}".format(type(trust_))) - if base_ is not None and not isinstance(base_, (dict, Base)): - raise Exception("Expected base_ to be a Base, received: {}".format(type(base_))) +class EndpointRelationData(Type): + _toSchema = {'applicationdata': 'ApplicationData', 'cross_model': 'cross-model', 'endpoint': 'endpoint', 'related_endpoint': 'related-endpoint', 'relation_id': 'relation-id', 'unit_relation_data': 'unit-relation-data'} + _toPy = {'ApplicationData': 'applicationdata', 'cross-model': 'cross_model', 'endpoint': 'endpoint', 'related-endpoint': 'related_endpoint', 'relation-id': 'relation_id', 'unit-relation-data': 'unit_relation_data'} + def __init__(self, applicationdata=None, cross_model=None, endpoint=None, related_endpoint=None, relation_id=None, unit_relation_data=None, **unknown_fields): + ''' + applicationdata : typing.Mapping[str, typing.Any] + cross_model : bool + endpoint : str + related_endpoint : str + relation_id : int + unit_relation_data : typing.Mapping[str, ~RelationData] + ''' + applicationdata_ = applicationdata + cross_model_ = cross_model + endpoint_ = endpoint + related_endpoint_ = related_endpoint + relation_id_ = relation_id + unit_relation_data_ = {k: RelationData.from_json(v) for k, v in (unit_relation_data or dict()).items()} - if channel_ is not None and not isinstance(channel_, (bytes, str)): - raise Exception("Expected channel_ to be a str, received: {}".format(type(channel_))) + # Validate arguments against known Juju API types. + if applicationdata_ is not None and not isinstance(applicationdata_, dict): + raise Exception("Expected applicationdata_ to be a Mapping, received: {}".format(type(applicationdata_))) - if endpoint_bindings_ is not None and not isinstance(endpoint_bindings_, dict): - raise Exception("Expected endpoint_bindings_ to be a Mapping, received: {}".format(type(endpoint_bindings_))) + if cross_model_ is not None and not isinstance(cross_model_, bool): + raise Exception("Expected cross_model_ to be a bool, received: {}".format(type(cross_model_))) - if force_ is not None and not isinstance(force_, bool): - raise Exception("Expected force_ to be a bool, received: {}".format(type(force_))) + if endpoint_ is not None and not isinstance(endpoint_, (bytes, str)): + raise Exception("Expected endpoint_ to be a str, received: {}".format(type(endpoint_))) - if num_units_ is not None and not isinstance(num_units_, int): - raise Exception("Expected num_units_ to be a int, received: {}".format(type(num_units_))) + if related_endpoint_ is not None and not isinstance(related_endpoint_, (bytes, str)): + raise Exception("Expected related_endpoint_ to be a str, received: {}".format(type(related_endpoint_))) - if resources_ is not None and not isinstance(resources_, dict): - raise Exception("Expected resources_ to be a Mapping, received: {}".format(type(resources_))) + if relation_id_ is not None and not isinstance(relation_id_, int): + raise Exception("Expected relation_id_ to be a int, received: {}".format(type(relation_id_))) - if revision_ is not None and not isinstance(revision_, int): - raise Exception("Expected revision_ to be a int, received: {}".format(type(revision_))) + if unit_relation_data_ is not None and not isinstance(unit_relation_data_, dict): + raise Exception("Expected unit_relation_data_ to be a Mapping, received: {}".format(type(unit_relation_data_))) - self.applicationname = applicationname_ - self.attachstorage = attachstorage_ - self.charmname = charmname_ - self.configyaml = configyaml_ - self.cons = cons_ - self.devices = devices_ - self.dryrun = dryrun_ - self.placement = placement_ - self.storage = storage_ - self.trust = trust_ - self.base = base_ - self.channel = channel_ - self.endpoint_bindings = endpoint_bindings_ - self.force = force_ - self.num_units = num_units_ - self.resources = resources_ - self.revision = revision_ + self.applicationdata = applicationdata_ + self.cross_model = cross_model_ + self.endpoint = endpoint_ + self.related_endpoint = related_endpoint_ + self.relation_id = relation_id_ + self.unit_relation_data = unit_relation_data_ self.unknown_fields = unknown_fields -class DeployFromRepositoryArgs(Type): - _toSchema = {'args': 'Args'} - _toPy = {'Args': 'args'} - def __init__(self, args=None, **unknown_fields): +class EndpointStatus(Type): + _toSchema = {'application': 'application', 'name': 'name', 'role': 'role', 'subordinate': 'subordinate'} + _toPy = {'application': 'application', 'name': 'name', 'role': 'role', 'subordinate': 'subordinate'} + def __init__(self, application=None, name=None, role=None, subordinate=None, **unknown_fields): ''' - args : typing.Sequence[~DeployFromRepositoryArg] + application : str + name : str + role : str + subordinate : bool ''' - args_ = [DeployFromRepositoryArg.from_json(o) for o in args or []] + application_ = application + name_ = name + role_ = role + subordinate_ = subordinate # Validate arguments against known Juju API types. - if args_ is not None and not isinstance(args_, (bytes, str, list)): - raise Exception("Expected args_ to be a Sequence, received: {}".format(type(args_))) + if application_ is not None and not isinstance(application_, (bytes, str)): + raise Exception("Expected application_ to be a str, received: {}".format(type(application_))) - self.args = args_ + if name_ is not None and not isinstance(name_, (bytes, str)): + raise Exception("Expected name_ to be a str, received: {}".format(type(name_))) + + if role_ is not None and not isinstance(role_, (bytes, str)): + raise Exception("Expected role_ to be a str, received: {}".format(type(role_))) + + if subordinate_ is not None and not isinstance(subordinate_, bool): + raise Exception("Expected subordinate_ to be a bool, received: {}".format(type(subordinate_))) + + self.application = application_ + self.name = name_ + self.role = role_ + self.subordinate = subordinate_ self.unknown_fields = unknown_fields -class DeployFromRepositoryInfo(Type): - _toSchema = {'architecture': 'architecture', 'base': 'base', 'channel': 'channel', 'effective_channel': 'effective-channel', 'name': 'name', 'revision': 'revision'} - _toPy = {'architecture': 'architecture', 'base': 'base', 'channel': 'channel', 'effective-channel': 'effective_channel', 'name': 'name', 'revision': 'revision'} - def __init__(self, architecture=None, base=None, channel=None, effective_channel=None, name=None, revision=None, **unknown_fields): +class EnqueuedActions(Type): + _toSchema = {'actions': 'actions', 'operation': 'operation'} + _toPy = {'actions': 'actions', 'operation': 'operation'} + def __init__(self, actions=None, operation=None, **unknown_fields): ''' - architecture : str - base : Base - channel : str - effective_channel : str - name : str - revision : int + actions : typing.Sequence[~ActionResult] + operation : str ''' - architecture_ = architecture - base_ = Base.from_json(base) if base else None - channel_ = channel - effective_channel_ = effective_channel - name_ = name - revision_ = revision + actions_ = [ActionResult.from_json(o) for o in actions or []] + operation_ = operation # Validate arguments against known Juju API types. - if architecture_ is not None and not isinstance(architecture_, (bytes, str)): - raise Exception("Expected architecture_ to be a str, received: {}".format(type(architecture_))) - - if base_ is not None and not isinstance(base_, (dict, Base)): - raise Exception("Expected base_ to be a Base, received: {}".format(type(base_))) - - if channel_ is not None and not isinstance(channel_, (bytes, str)): - raise Exception("Expected channel_ to be a str, received: {}".format(type(channel_))) - - if effective_channel_ is not None and not isinstance(effective_channel_, (bytes, str)): - raise Exception("Expected effective_channel_ to be a str, received: {}".format(type(effective_channel_))) - - if name_ is not None and not isinstance(name_, (bytes, str)): - raise Exception("Expected name_ to be a str, received: {}".format(type(name_))) + if actions_ is not None and not isinstance(actions_, (bytes, str, list)): + raise Exception("Expected actions_ to be a Sequence, received: {}".format(type(actions_))) - if revision_ is not None and not isinstance(revision_, int): - raise Exception("Expected revision_ to be a int, received: {}".format(type(revision_))) + if operation_ is not None and not isinstance(operation_, (bytes, str)): + raise Exception("Expected operation_ to be a str, received: {}".format(type(operation_))) - self.architecture = architecture_ - self.base = base_ - self.channel = channel_ - self.effective_channel = effective_channel_ - self.name = name_ - self.revision = revision_ + self.actions = actions_ + self.operation = operation_ self.unknown_fields = unknown_fields -class DeployFromRepositoryResult(Type): - _toSchema = {'errors': 'Errors', 'info': 'Info', 'pendingresourceuploads': 'PendingResourceUploads'} - _toPy = {'Errors': 'errors', 'Info': 'info', 'PendingResourceUploads': 'pendingresourceuploads'} - def __init__(self, errors=None, info=None, pendingresourceuploads=None, **unknown_fields): +class Entities(Type): + _toSchema = {'entities': 'entities'} + _toPy = {'entities': 'entities'} + def __init__(self, entities=None, **unknown_fields): ''' - errors : typing.Sequence[~Error] - info : DeployFromRepositoryInfo - pendingresourceuploads : typing.Sequence[~PendingResourceUpload] + entities : typing.Sequence[~Entity] ''' - errors_ = [Error.from_json(o) for o in errors or []] - info_ = DeployFromRepositoryInfo.from_json(info) if info else None - pendingresourceuploads_ = [PendingResourceUpload.from_json(o) for o in pendingresourceuploads or []] + entities_ = [Entity.from_json(o) for o in entities or []] # Validate arguments against known Juju API types. - if errors_ is not None and not isinstance(errors_, (bytes, str, list)): - raise Exception("Expected errors_ to be a Sequence, received: {}".format(type(errors_))) - - if info_ is not None and not isinstance(info_, (dict, DeployFromRepositoryInfo)): - raise Exception("Expected info_ to be a DeployFromRepositoryInfo, received: {}".format(type(info_))) - - if pendingresourceuploads_ is not None and not isinstance(pendingresourceuploads_, (bytes, str, list)): - raise Exception("Expected pendingresourceuploads_ to be a Sequence, received: {}".format(type(pendingresourceuploads_))) + if entities_ is not None and not isinstance(entities_, (bytes, str, list)): + raise Exception("Expected entities_ to be a Sequence, received: {}".format(type(entities_))) - self.errors = errors_ - self.info = info_ - self.pendingresourceuploads = pendingresourceuploads_ + self.entities = entities_ self.unknown_fields = unknown_fields -class DeployFromRepositoryResults(Type): - _toSchema = {'results': 'Results'} - _toPy = {'Results': 'results'} - def __init__(self, results=None, **unknown_fields): +class Entity(Type): + _toSchema = {'tag': 'tag'} + _toPy = {'tag': 'tag'} + def __init__(self, tag=None, **unknown_fields): ''' - results : typing.Sequence[~DeployFromRepositoryResult] + tag : str ''' - results_ = [DeployFromRepositoryResult.from_json(o) for o in results or []] + tag_ = tag # Validate arguments against known Juju API types. - if results_ is not None and not isinstance(results_, (bytes, str, list)): - raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) + if tag_ is not None and not isinstance(tag_, (bytes, str)): + raise Exception("Expected tag_ to be a str, received: {}".format(type(tag_))) - self.results = results_ + self.tag = tag_ self.unknown_fields = unknown_fields -class DeployerConnectionValues(Type): - _toSchema = {'api_addresses': 'api-addresses'} - _toPy = {'api-addresses': 'api_addresses'} - def __init__(self, api_addresses=None, **unknown_fields): +class EntityAnnotations(Type): + _toSchema = {'annotations': 'annotations', 'entity': 'entity'} + _toPy = {'annotations': 'annotations', 'entity': 'entity'} + def __init__(self, annotations=None, entity=None, **unknown_fields): ''' - api_addresses : typing.Sequence[str] + annotations : typing.Mapping[str, str] + entity : str ''' - api_addresses_ = api_addresses + annotations_ = annotations + entity_ = entity # Validate arguments against known Juju API types. - if api_addresses_ is not None and not isinstance(api_addresses_, (bytes, str, list)): - raise Exception("Expected api_addresses_ to be a Sequence, received: {}".format(type(api_addresses_))) + if annotations_ is not None and not isinstance(annotations_, dict): + raise Exception("Expected annotations_ to be a Mapping, received: {}".format(type(annotations_))) + + if entity_ is not None and not isinstance(entity_, (bytes, str)): + raise Exception("Expected entity_ to be a str, received: {}".format(type(entity_))) - self.api_addresses = api_addresses_ + self.annotations = annotations_ + self.entity = entity_ self.unknown_fields = unknown_fields -class DestroyApplicationInfo(Type): - _toSchema = {'destroyed_storage': 'destroyed-storage', 'destroyed_units': 'destroyed-units', 'detached_storage': 'detached-storage'} - _toPy = {'destroyed-storage': 'destroyed_storage', 'destroyed-units': 'destroyed_units', 'detached-storage': 'detached_storage'} - def __init__(self, destroyed_storage=None, destroyed_units=None, detached_storage=None, **unknown_fields): +class EntityMetrics(Type): + _toSchema = {'error': 'error', 'metrics': 'metrics'} + _toPy = {'error': 'error', 'metrics': 'metrics'} + def __init__(self, error=None, metrics=None, **unknown_fields): ''' - destroyed_storage : typing.Sequence[~Entity] - destroyed_units : typing.Sequence[~Entity] - detached_storage : typing.Sequence[~Entity] + error : Error + metrics : typing.Sequence[~MetricResult] ''' - destroyed_storage_ = [Entity.from_json(o) for o in destroyed_storage or []] - destroyed_units_ = [Entity.from_json(o) for o in destroyed_units or []] - detached_storage_ = [Entity.from_json(o) for o in detached_storage or []] + error_ = Error.from_json(error) if error else None + metrics_ = [MetricResult.from_json(o) for o in metrics or []] # Validate arguments against known Juju API types. - if destroyed_storage_ is not None and not isinstance(destroyed_storage_, (bytes, str, list)): - raise Exception("Expected destroyed_storage_ to be a Sequence, received: {}".format(type(destroyed_storage_))) - - if destroyed_units_ is not None and not isinstance(destroyed_units_, (bytes, str, list)): - raise Exception("Expected destroyed_units_ to be a Sequence, received: {}".format(type(destroyed_units_))) + if error_ is not None and not isinstance(error_, (dict, Error)): + raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - if detached_storage_ is not None and not isinstance(detached_storage_, (bytes, str, list)): - raise Exception("Expected detached_storage_ to be a Sequence, received: {}".format(type(detached_storage_))) + if metrics_ is not None and not isinstance(metrics_, (bytes, str, list)): + raise Exception("Expected metrics_ to be a Sequence, received: {}".format(type(metrics_))) - self.destroyed_storage = destroyed_storage_ - self.destroyed_units = destroyed_units_ - self.detached_storage = detached_storage_ + self.error = error_ + self.metrics = metrics_ self.unknown_fields = unknown_fields -class DestroyApplicationOffers(Type): - _toSchema = {'force': 'force', 'offer_urls': 'offer-urls'} - _toPy = {'force': 'force', 'offer-urls': 'offer_urls'} - def __init__(self, force=None, offer_urls=None, **unknown_fields): +class EntityPassword(Type): + _toSchema = {'password': 'password', 'tag': 'tag'} + _toPy = {'password': 'password', 'tag': 'tag'} + def __init__(self, password=None, tag=None, **unknown_fields): ''' - force : bool - offer_urls : typing.Sequence[str] + password : str + tag : str ''' - force_ = force - offer_urls_ = offer_urls + password_ = password + tag_ = tag # Validate arguments against known Juju API types. - if force_ is not None and not isinstance(force_, bool): - raise Exception("Expected force_ to be a bool, received: {}".format(type(force_))) + if password_ is not None and not isinstance(password_, (bytes, str)): + raise Exception("Expected password_ to be a str, received: {}".format(type(password_))) - if offer_urls_ is not None and not isinstance(offer_urls_, (bytes, str, list)): - raise Exception("Expected offer_urls_ to be a Sequence, received: {}".format(type(offer_urls_))) + if tag_ is not None and not isinstance(tag_, (bytes, str)): + raise Exception("Expected tag_ to be a str, received: {}".format(type(tag_))) - self.force = force_ - self.offer_urls = offer_urls_ + self.password = password_ + self.tag = tag_ self.unknown_fields = unknown_fields -class DestroyApplicationParams(Type): - _toSchema = {'application_tag': 'application-tag', 'destroy_storage': 'destroy-storage', 'dry_run': 'dry-run', 'force': 'force', 'max_wait': 'max-wait'} - _toPy = {'application-tag': 'application_tag', 'destroy-storage': 'destroy_storage', 'dry-run': 'dry_run', 'force': 'force', 'max-wait': 'max_wait'} - def __init__(self, application_tag=None, destroy_storage=None, dry_run=None, force=None, max_wait=None, **unknown_fields): +class EntityPasswords(Type): + _toSchema = {'changes': 'changes'} + _toPy = {'changes': 'changes'} + def __init__(self, changes=None, **unknown_fields): ''' - application_tag : str - destroy_storage : bool - dry_run : bool - force : bool - max_wait : int + changes : typing.Sequence[~EntityPassword] ''' - application_tag_ = application_tag - destroy_storage_ = destroy_storage - dry_run_ = dry_run - force_ = force - max_wait_ = max_wait + changes_ = [EntityPassword.from_json(o) for o in changes or []] # Validate arguments against known Juju API types. - if application_tag_ is not None and not isinstance(application_tag_, (bytes, str)): - raise Exception("Expected application_tag_ to be a str, received: {}".format(type(application_tag_))) - - if destroy_storage_ is not None and not isinstance(destroy_storage_, bool): - raise Exception("Expected destroy_storage_ to be a bool, received: {}".format(type(destroy_storage_))) - - if dry_run_ is not None and not isinstance(dry_run_, bool): - raise Exception("Expected dry_run_ to be a bool, received: {}".format(type(dry_run_))) - - if force_ is not None and not isinstance(force_, bool): - raise Exception("Expected force_ to be a bool, received: {}".format(type(force_))) - - if max_wait_ is not None and not isinstance(max_wait_, int): - raise Exception("Expected max_wait_ to be a int, received: {}".format(type(max_wait_))) + if changes_ is not None and not isinstance(changes_, (bytes, str, list)): + raise Exception("Expected changes_ to be a Sequence, received: {}".format(type(changes_))) - self.application_tag = application_tag_ - self.destroy_storage = destroy_storage_ - self.dry_run = dry_run_ - self.force = force_ - self.max_wait = max_wait_ + self.changes = changes_ self.unknown_fields = unknown_fields -class DestroyApplicationResult(Type): - _toSchema = {'error': 'error', 'info': 'info'} - _toPy = {'error': 'error', 'info': 'info'} - def __init__(self, error=None, info=None, **unknown_fields): +class EntityStatus(Type): + _toSchema = {'data': 'data', 'info': 'info', 'since': 'since', 'status': 'status'} + _toPy = {'data': 'data', 'info': 'info', 'since': 'since', 'status': 'status'} + def __init__(self, data=None, info=None, since=None, status=None, **unknown_fields): ''' - error : Error - info : DestroyApplicationInfo + data : typing.Mapping[str, typing.Any] + info : str + since : str + status : str ''' - error_ = Error.from_json(error) if error else None - info_ = DestroyApplicationInfo.from_json(info) if info else None + data_ = data + info_ = info + since_ = since + status_ = status # Validate arguments against known Juju API types. - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) + if data_ is not None and not isinstance(data_, dict): + raise Exception("Expected data_ to be a Mapping, received: {}".format(type(data_))) - if info_ is not None and not isinstance(info_, (dict, DestroyApplicationInfo)): - raise Exception("Expected info_ to be a DestroyApplicationInfo, received: {}".format(type(info_))) + if info_ is not None and not isinstance(info_, (bytes, str)): + raise Exception("Expected info_ to be a str, received: {}".format(type(info_))) - self.error = error_ + if since_ is not None and not isinstance(since_, (bytes, str)): + raise Exception("Expected since_ to be a str, received: {}".format(type(since_))) + + if status_ is not None and not isinstance(status_, (bytes, str)): + raise Exception("Expected status_ to be a str, received: {}".format(type(status_))) + + self.data = data_ self.info = info_ + self.since = since_ + self.status = status_ self.unknown_fields = unknown_fields -class DestroyApplicationResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None, **unknown_fields): +class Error(Type): + _toSchema = {'code': 'code', 'info': 'info', 'message': 'message'} + _toPy = {'code': 'code', 'info': 'info', 'message': 'message'} + def __init__(self, code=None, info=None, message=None, **unknown_fields): ''' - results : typing.Sequence[~DestroyApplicationResult] + code : str + info : typing.Mapping[str, typing.Any] + message : str ''' - results_ = [DestroyApplicationResult.from_json(o) for o in results or []] + code_ = code + info_ = info + message_ = message # Validate arguments against known Juju API types. - if results_ is not None and not isinstance(results_, (bytes, str, list)): - raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) + if code_ is not None and not isinstance(code_, (bytes, str)): + raise Exception("Expected code_ to be a str, received: {}".format(type(code_))) - self.results = results_ + if info_ is not None and not isinstance(info_, dict): + raise Exception("Expected info_ to be a Mapping, received: {}".format(type(info_))) + + if message_ is not None and not isinstance(message_, (bytes, str)): + raise Exception("Expected message_ to be a str, received: {}".format(type(message_))) + + self.code = code_ + self.info = info_ + self.message = message_ self.unknown_fields = unknown_fields -class DestroyApplicationsParams(Type): - _toSchema = {'applications': 'applications'} - _toPy = {'applications': 'applications'} - def __init__(self, applications=None, **unknown_fields): +class ErrorResult(Type): + _toSchema = {'error': 'error'} + _toPy = {'error': 'error'} + def __init__(self, error=None, **unknown_fields): ''' - applications : typing.Sequence[~DestroyApplicationParams] + error : Error ''' - applications_ = [DestroyApplicationParams.from_json(o) for o in applications or []] + error_ = Error.from_json(error) if error else None # Validate arguments against known Juju API types. - if applications_ is not None and not isinstance(applications_, (bytes, str, list)): - raise Exception("Expected applications_ to be a Sequence, received: {}".format(type(applications_))) + if error_ is not None and not isinstance(error_, (dict, Error)): + raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - self.applications = applications_ + self.error = error_ self.unknown_fields = unknown_fields -class DestroyConsumedApplicationParams(Type): - _toSchema = {'application_tag': 'application-tag', 'force': 'force', 'max_wait': 'max-wait'} - _toPy = {'application-tag': 'application_tag', 'force': 'force', 'max-wait': 'max_wait'} - def __init__(self, application_tag=None, force=None, max_wait=None, **unknown_fields): +class ErrorResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} + def __init__(self, results=None, **unknown_fields): ''' - application_tag : str - force : bool - max_wait : int + results : typing.Sequence[~ErrorResult] ''' - application_tag_ = application_tag - force_ = force - max_wait_ = max_wait + results_ = [ErrorResult.from_json(o) for o in results or []] # Validate arguments against known Juju API types. - if application_tag_ is not None and not isinstance(application_tag_, (bytes, str)): - raise Exception("Expected application_tag_ to be a str, received: {}".format(type(application_tag_))) - - if force_ is not None and not isinstance(force_, bool): - raise Exception("Expected force_ to be a bool, received: {}".format(type(force_))) - - if max_wait_ is not None and not isinstance(max_wait_, int): - raise Exception("Expected max_wait_ to be a int, received: {}".format(type(max_wait_))) + if results_ is not None and not isinstance(results_, (bytes, str, list)): + raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) - self.application_tag = application_tag_ - self.force = force_ - self.max_wait = max_wait_ + self.results = results_ self.unknown_fields = unknown_fields -class DestroyConsumedApplicationsParams(Type): - _toSchema = {'applications': 'applications'} - _toPy = {'applications': 'applications'} - def __init__(self, applications=None, **unknown_fields): +class ExportBundleParams(Type): + _toSchema = {'include_charm_defaults': 'include-charm-defaults', 'include_series': 'include-series'} + _toPy = {'include-charm-defaults': 'include_charm_defaults', 'include-series': 'include_series'} + def __init__(self, include_charm_defaults=None, include_series=None, **unknown_fields): ''' - applications : typing.Sequence[~DestroyConsumedApplicationParams] + include_charm_defaults : bool + include_series : bool ''' - applications_ = [DestroyConsumedApplicationParams.from_json(o) for o in applications or []] + include_charm_defaults_ = include_charm_defaults + include_series_ = include_series # Validate arguments against known Juju API types. - if applications_ is not None and not isinstance(applications_, (bytes, str, list)): - raise Exception("Expected applications_ to be a Sequence, received: {}".format(type(applications_))) + if include_charm_defaults_ is not None and not isinstance(include_charm_defaults_, bool): + raise Exception("Expected include_charm_defaults_ to be a bool, received: {}".format(type(include_charm_defaults_))) - self.applications = applications_ + if include_series_ is not None and not isinstance(include_series_, bool): + raise Exception("Expected include_series_ to be a bool, received: {}".format(type(include_series_))) + + self.include_charm_defaults = include_charm_defaults_ + self.include_series = include_series_ self.unknown_fields = unknown_fields -class DestroyControllerArgs(Type): - _toSchema = {'destroy_models': 'destroy-models', 'destroy_storage': 'destroy-storage', 'force': 'force', 'max_wait': 'max-wait', 'model_timeout': 'model-timeout'} - _toPy = {'destroy-models': 'destroy_models', 'destroy-storage': 'destroy_storage', 'force': 'force', 'max-wait': 'max_wait', 'model-timeout': 'model_timeout'} - def __init__(self, destroy_models=None, destroy_storage=None, force=None, max_wait=None, model_timeout=None, **unknown_fields): +class ExposedEndpoint(Type): + _toSchema = {'expose_to_cidrs': 'expose-to-cidrs', 'expose_to_spaces': 'expose-to-spaces'} + _toPy = {'expose-to-cidrs': 'expose_to_cidrs', 'expose-to-spaces': 'expose_to_spaces'} + def __init__(self, expose_to_cidrs=None, expose_to_spaces=None, **unknown_fields): ''' - destroy_models : bool - destroy_storage : bool - force : bool - max_wait : int - model_timeout : int + expose_to_cidrs : typing.Sequence[str] + expose_to_spaces : typing.Sequence[str] ''' - destroy_models_ = destroy_models - destroy_storage_ = destroy_storage - force_ = force - max_wait_ = max_wait - model_timeout_ = model_timeout + expose_to_cidrs_ = expose_to_cidrs + expose_to_spaces_ = expose_to_spaces # Validate arguments against known Juju API types. - if destroy_models_ is not None and not isinstance(destroy_models_, bool): - raise Exception("Expected destroy_models_ to be a bool, received: {}".format(type(destroy_models_))) + if expose_to_cidrs_ is not None and not isinstance(expose_to_cidrs_, (bytes, str, list)): + raise Exception("Expected expose_to_cidrs_ to be a Sequence, received: {}".format(type(expose_to_cidrs_))) - if destroy_storage_ is not None and not isinstance(destroy_storage_, bool): - raise Exception("Expected destroy_storage_ to be a bool, received: {}".format(type(destroy_storage_))) + if expose_to_spaces_ is not None and not isinstance(expose_to_spaces_, (bytes, str, list)): + raise Exception("Expected expose_to_spaces_ to be a Sequence, received: {}".format(type(expose_to_spaces_))) - if force_ is not None and not isinstance(force_, bool): - raise Exception("Expected force_ to be a bool, received: {}".format(type(force_))) + self.expose_to_cidrs = expose_to_cidrs_ + self.expose_to_spaces = expose_to_spaces_ + self.unknown_fields = unknown_fields - if max_wait_ is not None and not isinstance(max_wait_, int): - raise Exception("Expected max_wait_ to be a int, received: {}".format(type(max_wait_))) - if model_timeout_ is not None and not isinstance(model_timeout_, int): - raise Exception("Expected model_timeout_ to be a int, received: {}".format(type(model_timeout_))) - self.destroy_models = destroy_models_ - self.destroy_storage = destroy_storage_ - self.force = force_ - self.max_wait = max_wait_ - self.model_timeout = model_timeout_ +class ExpressionTree(Type): + _toSchema = {'expression': 'Expression'} + _toPy = {'Expression': 'expression'} + def __init__(self, expression=None, **unknown_fields): + ''' + expression : Any + ''' + expression_ = expression + + # Validate arguments against known Juju API types. + self.expression = expression_ self.unknown_fields = unknown_fields -class DestroyMachineInfo(Type): - _toSchema = {'destroyed_containers': 'destroyed-containers', 'destroyed_storage': 'destroyed-storage', 'destroyed_units': 'destroyed-units', 'detached_storage': 'detached-storage', 'machine_id': 'machine-id'} - _toPy = {'destroyed-containers': 'destroyed_containers', 'destroyed-storage': 'destroyed_storage', 'destroyed-units': 'destroyed_units', 'detached-storage': 'detached_storage', 'machine-id': 'machine_id'} - def __init__(self, destroyed_containers=None, destroyed_storage=None, destroyed_units=None, detached_storage=None, machine_id=None, **unknown_fields): +class ExternalControllerInfo(Type): + _toSchema = {'addrs': 'addrs', 'ca_cert': 'ca-cert', 'controller_alias': 'controller-alias', 'controller_tag': 'controller-tag'} + _toPy = {'addrs': 'addrs', 'ca-cert': 'ca_cert', 'controller-alias': 'controller_alias', 'controller-tag': 'controller_tag'} + def __init__(self, addrs=None, ca_cert=None, controller_alias=None, controller_tag=None, **unknown_fields): ''' - destroyed_containers : typing.Sequence[~DestroyMachineResult] - destroyed_storage : typing.Sequence[~Entity] - destroyed_units : typing.Sequence[~Entity] - detached_storage : typing.Sequence[~Entity] - machine_id : str + addrs : typing.Sequence[str] + ca_cert : str + controller_alias : str + controller_tag : str ''' - destroyed_containers_ = [DestroyMachineResult.from_json(o) for o in destroyed_containers or []] - destroyed_storage_ = [Entity.from_json(o) for o in destroyed_storage or []] - destroyed_units_ = [Entity.from_json(o) for o in destroyed_units or []] - detached_storage_ = [Entity.from_json(o) for o in detached_storage or []] - machine_id_ = machine_id + addrs_ = addrs + ca_cert_ = ca_cert + controller_alias_ = controller_alias + controller_tag_ = controller_tag # Validate arguments against known Juju API types. - if destroyed_containers_ is not None and not isinstance(destroyed_containers_, (bytes, str, list)): - raise Exception("Expected destroyed_containers_ to be a Sequence, received: {}".format(type(destroyed_containers_))) - - if destroyed_storage_ is not None and not isinstance(destroyed_storage_, (bytes, str, list)): - raise Exception("Expected destroyed_storage_ to be a Sequence, received: {}".format(type(destroyed_storage_))) + if addrs_ is not None and not isinstance(addrs_, (bytes, str, list)): + raise Exception("Expected addrs_ to be a Sequence, received: {}".format(type(addrs_))) - if destroyed_units_ is not None and not isinstance(destroyed_units_, (bytes, str, list)): - raise Exception("Expected destroyed_units_ to be a Sequence, received: {}".format(type(destroyed_units_))) + if ca_cert_ is not None and not isinstance(ca_cert_, (bytes, str)): + raise Exception("Expected ca_cert_ to be a str, received: {}".format(type(ca_cert_))) - if detached_storage_ is not None and not isinstance(detached_storage_, (bytes, str, list)): - raise Exception("Expected detached_storage_ to be a Sequence, received: {}".format(type(detached_storage_))) + if controller_alias_ is not None and not isinstance(controller_alias_, (bytes, str)): + raise Exception("Expected controller_alias_ to be a str, received: {}".format(type(controller_alias_))) - if machine_id_ is not None and not isinstance(machine_id_, (bytes, str)): - raise Exception("Expected machine_id_ to be a str, received: {}".format(type(machine_id_))) + if controller_tag_ is not None and not isinstance(controller_tag_, (bytes, str)): + raise Exception("Expected controller_tag_ to be a str, received: {}".format(type(controller_tag_))) - self.destroyed_containers = destroyed_containers_ - self.destroyed_storage = destroyed_storage_ - self.destroyed_units = destroyed_units_ - self.detached_storage = detached_storage_ - self.machine_id = machine_id_ + self.addrs = addrs_ + self.ca_cert = ca_cert_ + self.controller_alias = controller_alias_ + self.controller_tag = controller_tag_ self.unknown_fields = unknown_fields -class DestroyMachineResult(Type): - _toSchema = {'error': 'error', 'info': 'info'} - _toPy = {'error': 'error', 'info': 'info'} - def __init__(self, error=None, info=None, **unknown_fields): +class FilesystemAttachmentDetails(Type): + _toSchema = {'filesystemattachmentinfo': 'FilesystemAttachmentInfo', 'life': 'life', 'mount_point': 'mount-point', 'read_only': 'read-only'} + _toPy = {'FilesystemAttachmentInfo': 'filesystemattachmentinfo', 'life': 'life', 'mount-point': 'mount_point', 'read-only': 'read_only'} + def __init__(self, filesystemattachmentinfo=None, life=None, mount_point=None, read_only=None, **unknown_fields): ''' - error : Error - info : DestroyMachineInfo + filesystemattachmentinfo : FilesystemAttachmentInfo + life : str + mount_point : str + read_only : bool ''' - error_ = Error.from_json(error) if error else None - info_ = DestroyMachineInfo.from_json(info) if info else None + filesystemattachmentinfo_ = FilesystemAttachmentInfo.from_json(filesystemattachmentinfo) if filesystemattachmentinfo else None + life_ = life + mount_point_ = mount_point + read_only_ = read_only # Validate arguments against known Juju API types. - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) + if filesystemattachmentinfo_ is not None and not isinstance(filesystemattachmentinfo_, (dict, FilesystemAttachmentInfo)): + raise Exception("Expected filesystemattachmentinfo_ to be a FilesystemAttachmentInfo, received: {}".format(type(filesystemattachmentinfo_))) - if info_ is not None and not isinstance(info_, (dict, DestroyMachineInfo)): - raise Exception("Expected info_ to be a DestroyMachineInfo, received: {}".format(type(info_))) + if life_ is not None and not isinstance(life_, (bytes, str)): + raise Exception("Expected life_ to be a str, received: {}".format(type(life_))) - self.error = error_ - self.info = info_ + if mount_point_ is not None and not isinstance(mount_point_, (bytes, str)): + raise Exception("Expected mount_point_ to be a str, received: {}".format(type(mount_point_))) + + if read_only_ is not None and not isinstance(read_only_, bool): + raise Exception("Expected read_only_ to be a bool, received: {}".format(type(read_only_))) + + self.filesystemattachmentinfo = filesystemattachmentinfo_ + self.life = life_ + self.mount_point = mount_point_ + self.read_only = read_only_ self.unknown_fields = unknown_fields -class DestroyMachineResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None, **unknown_fields): +class FilesystemAttachmentInfo(Type): + _toSchema = {'mount_point': 'mount-point', 'read_only': 'read-only'} + _toPy = {'mount-point': 'mount_point', 'read-only': 'read_only'} + def __init__(self, mount_point=None, read_only=None, **unknown_fields): ''' - results : typing.Sequence[~DestroyMachineResult] + mount_point : str + read_only : bool ''' - results_ = [DestroyMachineResult.from_json(o) for o in results or []] - + mount_point_ = mount_point + read_only_ = read_only + # Validate arguments against known Juju API types. - if results_ is not None and not isinstance(results_, (bytes, str, list)): - raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) + if mount_point_ is not None and not isinstance(mount_point_, (bytes, str)): + raise Exception("Expected mount_point_ to be a str, received: {}".format(type(mount_point_))) - self.results = results_ + if read_only_ is not None and not isinstance(read_only_, bool): + raise Exception("Expected read_only_ to be a bool, received: {}".format(type(read_only_))) + + self.mount_point = mount_point_ + self.read_only = read_only_ self.unknown_fields = unknown_fields -class DestroyMachinesParams(Type): - _toSchema = {'dry_run': 'dry-run', 'force': 'force', 'keep': 'keep', 'machine_tags': 'machine-tags', 'max_wait': 'max-wait'} - _toPy = {'dry-run': 'dry_run', 'force': 'force', 'keep': 'keep', 'machine-tags': 'machine_tags', 'max-wait': 'max_wait'} - def __init__(self, dry_run=None, force=None, keep=None, machine_tags=None, max_wait=None, **unknown_fields): +class FilesystemDetails(Type): + _toSchema = {'filesystem_tag': 'filesystem-tag', 'info': 'info', 'life': 'life', 'machine_attachments': 'machine-attachments', 'status': 'status', 'storage': 'storage', 'unit_attachments': 'unit-attachments', 'volume_tag': 'volume-tag'} + _toPy = {'filesystem-tag': 'filesystem_tag', 'info': 'info', 'life': 'life', 'machine-attachments': 'machine_attachments', 'status': 'status', 'storage': 'storage', 'unit-attachments': 'unit_attachments', 'volume-tag': 'volume_tag'} + def __init__(self, filesystem_tag=None, info=None, life=None, machine_attachments=None, status=None, storage=None, unit_attachments=None, volume_tag=None, **unknown_fields): ''' - dry_run : bool - force : bool - keep : bool - machine_tags : typing.Sequence[str] - max_wait : int + filesystem_tag : str + info : FilesystemInfo + life : str + machine_attachments : typing.Mapping[str, ~FilesystemAttachmentDetails] + status : EntityStatus + storage : StorageDetails + unit_attachments : typing.Mapping[str, ~FilesystemAttachmentDetails] + volume_tag : str ''' - dry_run_ = dry_run - force_ = force - keep_ = keep - machine_tags_ = machine_tags - max_wait_ = max_wait + filesystem_tag_ = filesystem_tag + info_ = FilesystemInfo.from_json(info) if info else None + life_ = life + machine_attachments_ = {k: FilesystemAttachmentDetails.from_json(v) for k, v in (machine_attachments or dict()).items()} + status_ = EntityStatus.from_json(status) if status else None + storage_ = StorageDetails.from_json(storage) if storage else None + unit_attachments_ = {k: FilesystemAttachmentDetails.from_json(v) for k, v in (unit_attachments or dict()).items()} + volume_tag_ = volume_tag # Validate arguments against known Juju API types. - if dry_run_ is not None and not isinstance(dry_run_, bool): - raise Exception("Expected dry_run_ to be a bool, received: {}".format(type(dry_run_))) + if filesystem_tag_ is not None and not isinstance(filesystem_tag_, (bytes, str)): + raise Exception("Expected filesystem_tag_ to be a str, received: {}".format(type(filesystem_tag_))) - if force_ is not None and not isinstance(force_, bool): - raise Exception("Expected force_ to be a bool, received: {}".format(type(force_))) + if info_ is not None and not isinstance(info_, (dict, FilesystemInfo)): + raise Exception("Expected info_ to be a FilesystemInfo, received: {}".format(type(info_))) - if keep_ is not None and not isinstance(keep_, bool): - raise Exception("Expected keep_ to be a bool, received: {}".format(type(keep_))) + if life_ is not None and not isinstance(life_, (bytes, str)): + raise Exception("Expected life_ to be a str, received: {}".format(type(life_))) - if machine_tags_ is not None and not isinstance(machine_tags_, (bytes, str, list)): - raise Exception("Expected machine_tags_ to be a Sequence, received: {}".format(type(machine_tags_))) + if machine_attachments_ is not None and not isinstance(machine_attachments_, dict): + raise Exception("Expected machine_attachments_ to be a Mapping, received: {}".format(type(machine_attachments_))) - if max_wait_ is not None and not isinstance(max_wait_, int): - raise Exception("Expected max_wait_ to be a int, received: {}".format(type(max_wait_))) + if status_ is not None and not isinstance(status_, (dict, EntityStatus)): + raise Exception("Expected status_ to be a EntityStatus, received: {}".format(type(status_))) - self.dry_run = dry_run_ - self.force = force_ - self.keep = keep_ - self.machine_tags = machine_tags_ - self.max_wait = max_wait_ + if storage_ is not None and not isinstance(storage_, (dict, StorageDetails)): + raise Exception("Expected storage_ to be a StorageDetails, received: {}".format(type(storage_))) + + if unit_attachments_ is not None and not isinstance(unit_attachments_, dict): + raise Exception("Expected unit_attachments_ to be a Mapping, received: {}".format(type(unit_attachments_))) + + if volume_tag_ is not None and not isinstance(volume_tag_, (bytes, str)): + raise Exception("Expected volume_tag_ to be a str, received: {}".format(type(volume_tag_))) + + self.filesystem_tag = filesystem_tag_ + self.info = info_ + self.life = life_ + self.machine_attachments = machine_attachments_ + self.status = status_ + self.storage = storage_ + self.unit_attachments = unit_attachments_ + self.volume_tag = volume_tag_ self.unknown_fields = unknown_fields -class DestroyModelParams(Type): - _toSchema = {'destroy_storage': 'destroy-storage', 'force': 'force', 'max_wait': 'max-wait', 'model_tag': 'model-tag', 'timeout': 'timeout'} - _toPy = {'destroy-storage': 'destroy_storage', 'force': 'force', 'max-wait': 'max_wait', 'model-tag': 'model_tag', 'timeout': 'timeout'} - def __init__(self, destroy_storage=None, force=None, max_wait=None, model_tag=None, timeout=None, **unknown_fields): +class FilesystemDetailsListResult(Type): + _toSchema = {'error': 'error', 'result': 'result'} + _toPy = {'error': 'error', 'result': 'result'} + def __init__(self, error=None, result=None, **unknown_fields): ''' - destroy_storage : bool - force : bool - max_wait : int - model_tag : str - timeout : int + error : Error + result : typing.Sequence[~FilesystemDetails] ''' - destroy_storage_ = destroy_storage - force_ = force - max_wait_ = max_wait - model_tag_ = model_tag - timeout_ = timeout + error_ = Error.from_json(error) if error else None + result_ = [FilesystemDetails.from_json(o) for o in result or []] # Validate arguments against known Juju API types. - if destroy_storage_ is not None and not isinstance(destroy_storage_, bool): - raise Exception("Expected destroy_storage_ to be a bool, received: {}".format(type(destroy_storage_))) - - if force_ is not None and not isinstance(force_, bool): - raise Exception("Expected force_ to be a bool, received: {}".format(type(force_))) - - if max_wait_ is not None and not isinstance(max_wait_, int): - raise Exception("Expected max_wait_ to be a int, received: {}".format(type(max_wait_))) - - if model_tag_ is not None and not isinstance(model_tag_, (bytes, str)): - raise Exception("Expected model_tag_ to be a str, received: {}".format(type(model_tag_))) + if error_ is not None and not isinstance(error_, (dict, Error)): + raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - if timeout_ is not None and not isinstance(timeout_, int): - raise Exception("Expected timeout_ to be a int, received: {}".format(type(timeout_))) + if result_ is not None and not isinstance(result_, (bytes, str, list)): + raise Exception("Expected result_ to be a Sequence, received: {}".format(type(result_))) - self.destroy_storage = destroy_storage_ - self.force = force_ - self.max_wait = max_wait_ - self.model_tag = model_tag_ - self.timeout = timeout_ + self.error = error_ + self.result = result_ self.unknown_fields = unknown_fields -class DestroyModelsParams(Type): - _toSchema = {'models': 'models'} - _toPy = {'models': 'models'} - def __init__(self, models=None, **unknown_fields): +class FilesystemDetailsListResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} + def __init__(self, results=None, **unknown_fields): ''' - models : typing.Sequence[~DestroyModelParams] + results : typing.Sequence[~FilesystemDetailsListResult] ''' - models_ = [DestroyModelParams.from_json(o) for o in models or []] + results_ = [FilesystemDetailsListResult.from_json(o) for o in results or []] # Validate arguments against known Juju API types. - if models_ is not None and not isinstance(models_, (bytes, str, list)): - raise Exception("Expected models_ to be a Sequence, received: {}".format(type(models_))) + if results_ is not None and not isinstance(results_, (bytes, str, list)): + raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) - self.models = models_ + self.results = results_ self.unknown_fields = unknown_fields -class DestroyRelation(Type): - _toSchema = {'endpoints': 'endpoints', 'force': 'force', 'max_wait': 'max-wait', 'relation_id': 'relation-id'} - _toPy = {'endpoints': 'endpoints', 'force': 'force', 'max-wait': 'max_wait', 'relation-id': 'relation_id'} - def __init__(self, endpoints=None, force=None, max_wait=None, relation_id=None, **unknown_fields): +class FilesystemFilter(Type): + _toSchema = {'machines': 'machines'} + _toPy = {'machines': 'machines'} + def __init__(self, machines=None, **unknown_fields): ''' - endpoints : typing.Sequence[str] - force : bool - max_wait : int - relation_id : int + machines : typing.Sequence[str] ''' - endpoints_ = endpoints - force_ = force - max_wait_ = max_wait - relation_id_ = relation_id + machines_ = machines # Validate arguments against known Juju API types. - if endpoints_ is not None and not isinstance(endpoints_, (bytes, str, list)): - raise Exception("Expected endpoints_ to be a Sequence, received: {}".format(type(endpoints_))) - - if force_ is not None and not isinstance(force_, bool): - raise Exception("Expected force_ to be a bool, received: {}".format(type(force_))) - - if max_wait_ is not None and not isinstance(max_wait_, int): - raise Exception("Expected max_wait_ to be a int, received: {}".format(type(max_wait_))) - - if relation_id_ is not None and not isinstance(relation_id_, int): - raise Exception("Expected relation_id_ to be a int, received: {}".format(type(relation_id_))) + if machines_ is not None and not isinstance(machines_, (bytes, str, list)): + raise Exception("Expected machines_ to be a Sequence, received: {}".format(type(machines_))) - self.endpoints = endpoints_ - self.force = force_ - self.max_wait = max_wait_ - self.relation_id = relation_id_ + self.machines = machines_ self.unknown_fields = unknown_fields -class DestroyUnitInfo(Type): - _toSchema = {'destroyed_storage': 'destroyed-storage', 'detached_storage': 'detached-storage'} - _toPy = {'destroyed-storage': 'destroyed_storage', 'detached-storage': 'detached_storage'} - def __init__(self, destroyed_storage=None, detached_storage=None, **unknown_fields): +class FilesystemFilters(Type): + _toSchema = {'filters': 'filters'} + _toPy = {'filters': 'filters'} + def __init__(self, filters=None, **unknown_fields): ''' - destroyed_storage : typing.Sequence[~Entity] - detached_storage : typing.Sequence[~Entity] + filters : typing.Sequence[~FilesystemFilter] ''' - destroyed_storage_ = [Entity.from_json(o) for o in destroyed_storage or []] - detached_storage_ = [Entity.from_json(o) for o in detached_storage or []] + filters_ = [FilesystemFilter.from_json(o) for o in filters or []] # Validate arguments against known Juju API types. - if destroyed_storage_ is not None and not isinstance(destroyed_storage_, (bytes, str, list)): - raise Exception("Expected destroyed_storage_ to be a Sequence, received: {}".format(type(destroyed_storage_))) - - if detached_storage_ is not None and not isinstance(detached_storage_, (bytes, str, list)): - raise Exception("Expected detached_storage_ to be a Sequence, received: {}".format(type(detached_storage_))) + if filters_ is not None and not isinstance(filters_, (bytes, str, list)): + raise Exception("Expected filters_ to be a Sequence, received: {}".format(type(filters_))) - self.destroyed_storage = destroyed_storage_ - self.detached_storage = detached_storage_ + self.filters = filters_ self.unknown_fields = unknown_fields -class DestroyUnitParams(Type): - _toSchema = {'destroy_storage': 'destroy-storage', 'dry_run': 'dry-run', 'force': 'force', 'max_wait': 'max-wait', 'unit_tag': 'unit-tag'} - _toPy = {'destroy-storage': 'destroy_storage', 'dry-run': 'dry_run', 'force': 'force', 'max-wait': 'max_wait', 'unit-tag': 'unit_tag'} - def __init__(self, destroy_storage=None, dry_run=None, force=None, max_wait=None, unit_tag=None, **unknown_fields): +class FilesystemInfo(Type): + _toSchema = {'filesystem_id': 'filesystem-id', 'pool': 'pool', 'size': 'size'} + _toPy = {'filesystem-id': 'filesystem_id', 'pool': 'pool', 'size': 'size'} + def __init__(self, filesystem_id=None, pool=None, size=None, **unknown_fields): ''' - destroy_storage : bool - dry_run : bool - force : bool - max_wait : int - unit_tag : str + filesystem_id : str + pool : str + size : int ''' - destroy_storage_ = destroy_storage - dry_run_ = dry_run - force_ = force - max_wait_ = max_wait - unit_tag_ = unit_tag + filesystem_id_ = filesystem_id + pool_ = pool + size_ = size # Validate arguments against known Juju API types. - if destroy_storage_ is not None and not isinstance(destroy_storage_, bool): - raise Exception("Expected destroy_storage_ to be a bool, received: {}".format(type(destroy_storage_))) + if filesystem_id_ is not None and not isinstance(filesystem_id_, (bytes, str)): + raise Exception("Expected filesystem_id_ to be a str, received: {}".format(type(filesystem_id_))) - if dry_run_ is not None and not isinstance(dry_run_, bool): - raise Exception("Expected dry_run_ to be a bool, received: {}".format(type(dry_run_))) + if pool_ is not None and not isinstance(pool_, (bytes, str)): + raise Exception("Expected pool_ to be a str, received: {}".format(type(pool_))) - if force_ is not None and not isinstance(force_, bool): - raise Exception("Expected force_ to be a bool, received: {}".format(type(force_))) + if size_ is not None and not isinstance(size_, int): + raise Exception("Expected size_ to be a int, received: {}".format(type(size_))) - if max_wait_ is not None and not isinstance(max_wait_, int): - raise Exception("Expected max_wait_ to be a int, received: {}".format(type(max_wait_))) + self.filesystem_id = filesystem_id_ + self.pool = pool_ + self.size = size_ + self.unknown_fields = unknown_fields - if unit_tag_ is not None and not isinstance(unit_tag_, (bytes, str)): - raise Exception("Expected unit_tag_ to be a str, received: {}".format(type(unit_tag_))) - self.destroy_storage = destroy_storage_ - self.dry_run = dry_run_ - self.force = force_ - self.max_wait = max_wait_ - self.unit_tag = unit_tag_ + +class FindToolsParams(Type): + _toSchema = {'agentstream': 'agentstream', 'arch': 'arch', 'major': 'major', 'number': 'number', 'os_type': 'os-type'} + _toPy = {'agentstream': 'agentstream', 'arch': 'arch', 'major': 'major', 'number': 'number', 'os-type': 'os_type'} + def __init__(self, agentstream=None, arch=None, major=None, number=None, os_type=None, **unknown_fields): + ''' + agentstream : str + arch : str + major : int + number : Number + os_type : str + ''' + agentstream_ = agentstream + arch_ = arch + major_ = major + number_ = Number.from_json(number) if number else None + os_type_ = os_type + + # Validate arguments against known Juju API types. + if agentstream_ is not None and not isinstance(agentstream_, (bytes, str)): + raise Exception("Expected agentstream_ to be a str, received: {}".format(type(agentstream_))) + + if arch_ is not None and not isinstance(arch_, (bytes, str)): + raise Exception("Expected arch_ to be a str, received: {}".format(type(arch_))) + + if major_ is not None and not isinstance(major_, int): + raise Exception("Expected major_ to be a int, received: {}".format(type(major_))) + + if number_ is not None and not isinstance(number_, (dict, Number)): + raise Exception("Expected number_ to be a Number, received: {}".format(type(number_))) + + if os_type_ is not None and not isinstance(os_type_, (bytes, str)): + raise Exception("Expected os_type_ to be a str, received: {}".format(type(os_type_))) + + self.agentstream = agentstream_ + self.arch = arch_ + self.major = major_ + self.number = number_ + self.os_type = os_type_ self.unknown_fields = unknown_fields -class DestroyUnitResult(Type): - _toSchema = {'error': 'error', 'info': 'info'} - _toPy = {'error': 'error', 'info': 'info'} - def __init__(self, error=None, info=None, **unknown_fields): +class FindToolsResult(Type): + _toSchema = {'error': 'error', 'list_': 'list'} + _toPy = {'error': 'error', 'list': 'list_'} + def __init__(self, error=None, list_=None, **unknown_fields): ''' error : Error - info : DestroyUnitInfo + list_ : typing.Sequence[~Tools] ''' error_ = Error.from_json(error) if error else None - info_ = DestroyUnitInfo.from_json(info) if info else None + list__ = [Tools.from_json(o) for o in list_ or []] # Validate arguments against known Juju API types. if error_ is not None and not isinstance(error_, (dict, Error)): raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - if info_ is not None and not isinstance(info_, (dict, DestroyUnitInfo)): - raise Exception("Expected info_ to be a DestroyUnitInfo, received: {}".format(type(info_))) + if list__ is not None and not isinstance(list__, (bytes, str, list)): + raise Exception("Expected list__ to be a Sequence, received: {}".format(type(list__))) self.error = error_ - self.info = info_ + self.list_ = list__ self.unknown_fields = unknown_fields -class DestroyUnitResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None, **unknown_fields): +class FirewallRule(Type): + _toSchema = {'known_service': 'known-service', 'whitelist_cidrs': 'whitelist-cidrs'} + _toPy = {'known-service': 'known_service', 'whitelist-cidrs': 'whitelist_cidrs'} + def __init__(self, known_service=None, whitelist_cidrs=None, **unknown_fields): ''' - results : typing.Sequence[~DestroyUnitResult] + known_service : str + whitelist_cidrs : typing.Sequence[str] ''' - results_ = [DestroyUnitResult.from_json(o) for o in results or []] + known_service_ = known_service + whitelist_cidrs_ = whitelist_cidrs # Validate arguments against known Juju API types. - if results_ is not None and not isinstance(results_, (bytes, str, list)): - raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) + if known_service_ is not None and not isinstance(known_service_, (bytes, str)): + raise Exception("Expected known_service_ to be a str, received: {}".format(type(known_service_))) - self.results = results_ + if whitelist_cidrs_ is not None and not isinstance(whitelist_cidrs_, (bytes, str, list)): + raise Exception("Expected whitelist_cidrs_ to be a Sequence, received: {}".format(type(whitelist_cidrs_))) + + self.known_service = known_service_ + self.whitelist_cidrs = whitelist_cidrs_ self.unknown_fields = unknown_fields -class DestroyUnitsParams(Type): - _toSchema = {'units': 'units'} - _toPy = {'units': 'units'} - def __init__(self, units=None, **unknown_fields): +class FirewallRuleArgs(Type): + _toSchema = {'args': 'args'} + _toPy = {'args': 'args'} + def __init__(self, args=None, **unknown_fields): ''' - units : typing.Sequence[~DestroyUnitParams] + args : typing.Sequence[~FirewallRule] ''' - units_ = [DestroyUnitParams.from_json(o) for o in units or []] + args_ = [FirewallRule.from_json(o) for o in args or []] # Validate arguments against known Juju API types. - if units_ is not None and not isinstance(units_, (bytes, str, list)): - raise Exception("Expected units_ to be a Sequence, received: {}".format(type(units_))) + if args_ is not None and not isinstance(args_, (bytes, str, list)): + raise Exception("Expected args_ to be a Sequence, received: {}".format(type(args_))) - self.units = units_ + self.args = args_ self.unknown_fields = unknown_fields -class DetailedStatus(Type): - _toSchema = {'data': 'data', 'err': 'err', 'info': 'info', 'kind': 'kind', 'life': 'life', 'since': 'since', 'status': 'status', 'version': 'version'} - _toPy = {'data': 'data', 'err': 'err', 'info': 'info', 'kind': 'kind', 'life': 'life', 'since': 'since', 'status': 'status', 'version': 'version'} - def __init__(self, data=None, err=None, info=None, kind=None, life=None, since=None, status=None, version=None, **unknown_fields): +class FullStatus(Type): + _toSchema = {'applications': 'applications', 'branches': 'branches', 'controller_timestamp': 'controller-timestamp', 'filesystems': 'filesystems', 'machines': 'machines', 'model': 'model', 'offers': 'offers', 'relations': 'relations', 'remote_applications': 'remote-applications', 'storage': 'storage', 'volumes': 'volumes'} + _toPy = {'applications': 'applications', 'branches': 'branches', 'controller-timestamp': 'controller_timestamp', 'filesystems': 'filesystems', 'machines': 'machines', 'model': 'model', 'offers': 'offers', 'relations': 'relations', 'remote-applications': 'remote_applications', 'storage': 'storage', 'volumes': 'volumes'} + def __init__(self, applications=None, branches=None, controller_timestamp=None, filesystems=None, machines=None, model=None, offers=None, relations=None, remote_applications=None, storage=None, volumes=None, **unknown_fields): ''' - data : typing.Mapping[str, typing.Any] - err : Error - info : str - kind : str - life : str - since : str - status : str - version : str + applications : typing.Mapping[str, ~ApplicationStatus] + branches : typing.Mapping[str, ~BranchStatus] + controller_timestamp : str + filesystems : typing.Sequence[~FilesystemDetails] + machines : typing.Mapping[str, ~MachineStatus] + model : ModelStatusInfo + offers : typing.Mapping[str, ~ApplicationOfferStatus] + relations : typing.Sequence[~RelationStatus] + remote_applications : typing.Mapping[str, ~RemoteApplicationStatus] + storage : typing.Sequence[~StorageDetails] + volumes : typing.Sequence[~VolumeDetails] ''' - data_ = data - err_ = Error.from_json(err) if err else None - info_ = info - kind_ = kind - life_ = life - since_ = since - status_ = status - version_ = version + applications_ = {k: ApplicationStatus.from_json(v) for k, v in (applications or dict()).items()} + branches_ = {k: BranchStatus.from_json(v) for k, v in (branches or dict()).items()} + controller_timestamp_ = controller_timestamp + filesystems_ = [FilesystemDetails.from_json(o) for o in filesystems or []] + machines_ = {k: MachineStatus.from_json(v) for k, v in (machines or dict()).items()} + model_ = ModelStatusInfo.from_json(model) if model else None + offers_ = {k: ApplicationOfferStatus.from_json(v) for k, v in (offers or dict()).items()} + relations_ = [RelationStatus.from_json(o) for o in relations or []] + remote_applications_ = {k: RemoteApplicationStatus.from_json(v) for k, v in (remote_applications or dict()).items()} + storage_ = [StorageDetails.from_json(o) for o in storage or []] + volumes_ = [VolumeDetails.from_json(o) for o in volumes or []] # Validate arguments against known Juju API types. - if data_ is not None and not isinstance(data_, dict): - raise Exception("Expected data_ to be a Mapping, received: {}".format(type(data_))) + if applications_ is not None and not isinstance(applications_, dict): + raise Exception("Expected applications_ to be a Mapping, received: {}".format(type(applications_))) - if err_ is not None and not isinstance(err_, (dict, Error)): - raise Exception("Expected err_ to be a Error, received: {}".format(type(err_))) + if branches_ is not None and not isinstance(branches_, dict): + raise Exception("Expected branches_ to be a Mapping, received: {}".format(type(branches_))) - if info_ is not None and not isinstance(info_, (bytes, str)): - raise Exception("Expected info_ to be a str, received: {}".format(type(info_))) + if controller_timestamp_ is not None and not isinstance(controller_timestamp_, (bytes, str)): + raise Exception("Expected controller_timestamp_ to be a str, received: {}".format(type(controller_timestamp_))) - if kind_ is not None and not isinstance(kind_, (bytes, str)): - raise Exception("Expected kind_ to be a str, received: {}".format(type(kind_))) + if filesystems_ is not None and not isinstance(filesystems_, (bytes, str, list)): + raise Exception("Expected filesystems_ to be a Sequence, received: {}".format(type(filesystems_))) - if life_ is not None and not isinstance(life_, (bytes, str)): - raise Exception("Expected life_ to be a str, received: {}".format(type(life_))) + if machines_ is not None and not isinstance(machines_, dict): + raise Exception("Expected machines_ to be a Mapping, received: {}".format(type(machines_))) - if since_ is not None and not isinstance(since_, (bytes, str)): - raise Exception("Expected since_ to be a str, received: {}".format(type(since_))) + if model_ is not None and not isinstance(model_, (dict, ModelStatusInfo)): + raise Exception("Expected model_ to be a ModelStatusInfo, received: {}".format(type(model_))) - if status_ is not None and not isinstance(status_, (bytes, str)): - raise Exception("Expected status_ to be a str, received: {}".format(type(status_))) + if offers_ is not None and not isinstance(offers_, dict): + raise Exception("Expected offers_ to be a Mapping, received: {}".format(type(offers_))) - if version_ is not None and not isinstance(version_, (bytes, str)): - raise Exception("Expected version_ to be a str, received: {}".format(type(version_))) + if relations_ is not None and not isinstance(relations_, (bytes, str, list)): + raise Exception("Expected relations_ to be a Sequence, received: {}".format(type(relations_))) - self.data = data_ - self.err = err_ - self.info = info_ - self.kind = kind_ - self.life = life_ - self.since = since_ - self.status = status_ - self.version = version_ + if remote_applications_ is not None and not isinstance(remote_applications_, dict): + raise Exception("Expected remote_applications_ to be a Mapping, received: {}".format(type(remote_applications_))) + + if storage_ is not None and not isinstance(storage_, (bytes, str, list)): + raise Exception("Expected storage_ to be a Sequence, received: {}".format(type(storage_))) + + if volumes_ is not None and not isinstance(volumes_, (bytes, str, list)): + raise Exception("Expected volumes_ to be a Sequence, received: {}".format(type(volumes_))) + + self.applications = applications_ + self.branches = branches_ + self.controller_timestamp = controller_timestamp_ + self.filesystems = filesystems_ + self.machines = machines_ + self.model = model_ + self.offers = offers_ + self.relations = relations_ + self.remote_applications = remote_applications_ + self.storage = storage_ + self.volumes = volumes_ self.unknown_fields = unknown_fields -class DeviceBridgeInfo(Type): - _toSchema = {'bridge_name': 'bridge-name', 'host_device_name': 'host-device-name', 'mac_address': 'mac-address'} - _toPy = {'bridge-name': 'bridge_name', 'host-device-name': 'host_device_name', 'mac-address': 'mac_address'} - def __init__(self, bridge_name=None, host_device_name=None, mac_address=None, **unknown_fields): +class Generation(Type): + _toSchema = {'applications': 'applications', 'branch': 'branch', 'completed': 'completed', 'completed_by': 'completed-by', 'created': 'created', 'created_by': 'created-by', 'generation_id': 'generation-id'} + _toPy = {'applications': 'applications', 'branch': 'branch', 'completed': 'completed', 'completed-by': 'completed_by', 'created': 'created', 'created-by': 'created_by', 'generation-id': 'generation_id'} + def __init__(self, applications=None, branch=None, completed=None, completed_by=None, created=None, created_by=None, generation_id=None, **unknown_fields): ''' - bridge_name : str - host_device_name : str - mac_address : str + applications : typing.Sequence[~GenerationApplication] + branch : str + completed : int + completed_by : str + created : int + created_by : str + generation_id : int ''' - bridge_name_ = bridge_name - host_device_name_ = host_device_name - mac_address_ = mac_address + applications_ = [GenerationApplication.from_json(o) for o in applications or []] + branch_ = branch + completed_ = completed + completed_by_ = completed_by + created_ = created + created_by_ = created_by + generation_id_ = generation_id # Validate arguments against known Juju API types. - if bridge_name_ is not None and not isinstance(bridge_name_, (bytes, str)): - raise Exception("Expected bridge_name_ to be a str, received: {}".format(type(bridge_name_))) + if applications_ is not None and not isinstance(applications_, (bytes, str, list)): + raise Exception("Expected applications_ to be a Sequence, received: {}".format(type(applications_))) - if host_device_name_ is not None and not isinstance(host_device_name_, (bytes, str)): - raise Exception("Expected host_device_name_ to be a str, received: {}".format(type(host_device_name_))) + if branch_ is not None and not isinstance(branch_, (bytes, str)): + raise Exception("Expected branch_ to be a str, received: {}".format(type(branch_))) - if mac_address_ is not None and not isinstance(mac_address_, (bytes, str)): - raise Exception("Expected mac_address_ to be a str, received: {}".format(type(mac_address_))) + if completed_ is not None and not isinstance(completed_, int): + raise Exception("Expected completed_ to be a int, received: {}".format(type(completed_))) - self.bridge_name = bridge_name_ - self.host_device_name = host_device_name_ - self.mac_address = mac_address_ - self.unknown_fields = unknown_fields + if completed_by_ is not None and not isinstance(completed_by_, (bytes, str)): + raise Exception("Expected completed_by_ to be a str, received: {}".format(type(completed_by_))) + if created_ is not None and not isinstance(created_, int): + raise Exception("Expected created_ to be a int, received: {}".format(type(created_))) + if created_by_ is not None and not isinstance(created_by_, (bytes, str)): + raise Exception("Expected created_by_ to be a str, received: {}".format(type(created_by_))) -class DistributionGroupResult(Type): - _toSchema = {'error': 'error', 'result': 'result'} - _toPy = {'error': 'error', 'result': 'result'} - def __init__(self, error=None, result=None, **unknown_fields): - ''' - error : Error - result : typing.Sequence[str] - ''' - error_ = Error.from_json(error) if error else None - result_ = result - - # Validate arguments against known Juju API types. - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - - if result_ is not None and not isinstance(result_, (bytes, str, list)): - raise Exception("Expected result_ to be a Sequence, received: {}".format(type(result_))) + if generation_id_ is not None and not isinstance(generation_id_, int): + raise Exception("Expected generation_id_ to be a int, received: {}".format(type(generation_id_))) - self.error = error_ - self.result = result_ + self.applications = applications_ + self.branch = branch_ + self.completed = completed_ + self.completed_by = completed_by_ + self.created = created_ + self.created_by = created_by_ + self.generation_id = generation_id_ self.unknown_fields = unknown_fields -class DistributionGroupResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None, **unknown_fields): +class GenerationApplication(Type): + _toSchema = {'application': 'application', 'config': 'config', 'pending': 'pending', 'progress': 'progress', 'tracking': 'tracking'} + _toPy = {'application': 'application', 'config': 'config', 'pending': 'pending', 'progress': 'progress', 'tracking': 'tracking'} + def __init__(self, application=None, config=None, pending=None, progress=None, tracking=None, **unknown_fields): ''' - results : typing.Sequence[~DistributionGroupResult] + application : str + config : typing.Mapping[str, typing.Any] + pending : typing.Sequence[str] + progress : str + tracking : typing.Sequence[str] ''' - results_ = [DistributionGroupResult.from_json(o) for o in results or []] + application_ = application + config_ = config + pending_ = pending + progress_ = progress + tracking_ = tracking # Validate arguments against known Juju API types. - if results_ is not None and not isinstance(results_, (bytes, str, list)): - raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) - - self.results = results_ - self.unknown_fields = unknown_fields - - - -class DockerImageInfo(Type): - _toSchema = {'auth': 'auth', 'email': 'email', 'identitytoken': 'identitytoken', 'image_name': 'image-name', 'password': 'password', 'registrytoken': 'registrytoken', 'repository': 'repository', 'serveraddress': 'serveraddress', 'username': 'username'} - _toPy = {'auth': 'auth', 'email': 'email', 'identitytoken': 'identitytoken', 'image-name': 'image_name', 'password': 'password', 'registrytoken': 'registrytoken', 'repository': 'repository', 'serveraddress': 'serveraddress', 'username': 'username'} - def __init__(self, auth=None, email=None, identitytoken=None, image_name=None, password=None, registrytoken=None, repository=None, serveraddress=None, username=None, **unknown_fields): - ''' - auth : str - email : str - identitytoken : str - image_name : str - password : str - registrytoken : str - repository : str - serveraddress : str - username : str - ''' - auth_ = auth - email_ = email - identitytoken_ = identitytoken - image_name_ = image_name - password_ = password - registrytoken_ = registrytoken - repository_ = repository - serveraddress_ = serveraddress - username_ = username + if application_ is not None and not isinstance(application_, (bytes, str)): + raise Exception("Expected application_ to be a str, received: {}".format(type(application_))) - # Validate arguments against known Juju API types. - if auth_ is not None and not isinstance(auth_, (bytes, str)): - raise Exception("Expected auth_ to be a str, received: {}".format(type(auth_))) + if config_ is not None and not isinstance(config_, dict): + raise Exception("Expected config_ to be a Mapping, received: {}".format(type(config_))) - if email_ is not None and not isinstance(email_, (bytes, str)): - raise Exception("Expected email_ to be a str, received: {}".format(type(email_))) + if pending_ is not None and not isinstance(pending_, (bytes, str, list)): + raise Exception("Expected pending_ to be a Sequence, received: {}".format(type(pending_))) - if identitytoken_ is not None and not isinstance(identitytoken_, (bytes, str)): - raise Exception("Expected identitytoken_ to be a str, received: {}".format(type(identitytoken_))) + if progress_ is not None and not isinstance(progress_, (bytes, str)): + raise Exception("Expected progress_ to be a str, received: {}".format(type(progress_))) - if image_name_ is not None and not isinstance(image_name_, (bytes, str)): - raise Exception("Expected image_name_ to be a str, received: {}".format(type(image_name_))) + if tracking_ is not None and not isinstance(tracking_, (bytes, str, list)): + raise Exception("Expected tracking_ to be a Sequence, received: {}".format(type(tracking_))) - if password_ is not None and not isinstance(password_, (bytes, str)): - raise Exception("Expected password_ to be a str, received: {}".format(type(password_))) + self.application = application_ + self.config = config_ + self.pending = pending_ + self.progress = progress_ + self.tracking = tracking_ + self.unknown_fields = unknown_fields - if registrytoken_ is not None and not isinstance(registrytoken_, (bytes, str)): - raise Exception("Expected registrytoken_ to be a str, received: {}".format(type(registrytoken_))) - if repository_ is not None and not isinstance(repository_, (bytes, str)): - raise Exception("Expected repository_ to be a str, received: {}".format(type(repository_))) - if serveraddress_ is not None and not isinstance(serveraddress_, (bytes, str)): - raise Exception("Expected serveraddress_ to be a str, received: {}".format(type(serveraddress_))) +class GenerationId(Type): + _toSchema = {'generation_id': 'generation-id'} + _toPy = {'generation-id': 'generation_id'} + def __init__(self, generation_id=None, **unknown_fields): + ''' + generation_id : int + ''' + generation_id_ = generation_id - if username_ is not None and not isinstance(username_, (bytes, str)): - raise Exception("Expected username_ to be a str, received: {}".format(type(username_))) + # Validate arguments against known Juju API types. + if generation_id_ is not None and not isinstance(generation_id_, int): + raise Exception("Expected generation_id_ to be a int, received: {}".format(type(generation_id_))) - self.auth = auth_ - self.email = email_ - self.identitytoken = identitytoken_ - self.image_name = image_name_ - self.password = password_ - self.registrytoken = registrytoken_ - self.repository = repository_ - self.serveraddress = serveraddress_ - self.username = username_ + self.generation_id = generation_id_ self.unknown_fields = unknown_fields -class DownloadInfoResult(Type): - _toSchema = {'charm_origin': 'charm-origin', 'url': 'url'} - _toPy = {'charm-origin': 'charm_origin', 'url': 'url'} - def __init__(self, charm_origin=None, url=None, **unknown_fields): +class GenerationResult(Type): + _toSchema = {'error': 'error', 'generation': 'generation'} + _toPy = {'error': 'error', 'generation': 'generation'} + def __init__(self, error=None, generation=None, **unknown_fields): ''' - charm_origin : CharmOrigin - url : str + error : Error + generation : Generation ''' - charm_origin_ = CharmOrigin.from_json(charm_origin) if charm_origin else None - url_ = url + error_ = Error.from_json(error) if error else None + generation_ = Generation.from_json(generation) if generation else None # Validate arguments against known Juju API types. - if charm_origin_ is not None and not isinstance(charm_origin_, (dict, CharmOrigin)): - raise Exception("Expected charm_origin_ to be a CharmOrigin, received: {}".format(type(charm_origin_))) + if error_ is not None and not isinstance(error_, (dict, Error)): + raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - if url_ is not None and not isinstance(url_, (bytes, str)): - raise Exception("Expected url_ to be a str, received: {}".format(type(url_))) + if generation_ is not None and not isinstance(generation_, (dict, Generation)): + raise Exception("Expected generation_ to be a Generation, received: {}".format(type(generation_))) - self.charm_origin = charm_origin_ - self.url = url_ + self.error = error_ + self.generation = generation_ self.unknown_fields = unknown_fields -class DownloadInfoResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None, **unknown_fields): +class GetConstraintsResults(Type): + _toSchema = {'constraints': 'constraints'} + _toPy = {'constraints': 'constraints'} + def __init__(self, constraints=None, **unknown_fields): ''' - results : typing.Sequence[~DownloadInfoResult] + constraints : Value ''' - results_ = [DownloadInfoResult.from_json(o) for o in results or []] + constraints_ = Value.from_json(constraints) if constraints else None # Validate arguments against known Juju API types. - if results_ is not None and not isinstance(results_, (bytes, str, list)): - raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) + if constraints_ is not None and not isinstance(constraints_, (dict, Value)): + raise Exception("Expected constraints_ to be a Value, received: {}".format(type(constraints_))) - self.results = results_ + self.constraints = constraints_ self.unknown_fields = unknown_fields -class DumpModelRequest(Type): - _toSchema = {'entities': 'entities', 'simplified': 'simplified'} - _toPy = {'entities': 'entities', 'simplified': 'simplified'} - def __init__(self, entities=None, simplified=None, **unknown_fields): +class GrantRevokeUserSecretArg(Type): + _toSchema = {'applications': 'applications', 'label': 'label', 'uri': 'uri'} + _toPy = {'applications': 'applications', 'label': 'label', 'uri': 'uri'} + def __init__(self, applications=None, label=None, uri=None, **unknown_fields): ''' - entities : typing.Sequence[~Entity] - simplified : bool + applications : typing.Sequence[str] + label : str + uri : str ''' - entities_ = [Entity.from_json(o) for o in entities or []] - simplified_ = simplified + applications_ = applications + label_ = label + uri_ = uri # Validate arguments against known Juju API types. - if entities_ is not None and not isinstance(entities_, (bytes, str, list)): - raise Exception("Expected entities_ to be a Sequence, received: {}".format(type(entities_))) + if applications_ is not None and not isinstance(applications_, (bytes, str, list)): + raise Exception("Expected applications_ to be a Sequence, received: {}".format(type(applications_))) - if simplified_ is not None and not isinstance(simplified_, bool): - raise Exception("Expected simplified_ to be a bool, received: {}".format(type(simplified_))) + if label_ is not None and not isinstance(label_, (bytes, str)): + raise Exception("Expected label_ to be a str, received: {}".format(type(label_))) - self.entities = entities_ - self.simplified = simplified_ + if uri_ is not None and not isinstance(uri_, (bytes, str)): + raise Exception("Expected uri_ to be a str, received: {}".format(type(uri_))) + + self.applications = applications_ + self.label = label_ + self.uri = uri_ self.unknown_fields = unknown_fields -class Endpoint(Type): - _toSchema = {'application_name': 'application-name', 'relation': 'relation'} - _toPy = {'application-name': 'application_name', 'relation': 'relation'} - def __init__(self, application_name=None, relation=None, **unknown_fields): +class HardwareCharacteristics(Type): + _toSchema = {'arch': 'arch', 'availability_zone': 'availability-zone', 'cpu_cores': 'cpu-cores', 'cpu_power': 'cpu-power', 'mem': 'mem', 'root_disk': 'root-disk', 'root_disk_source': 'root-disk-source', 'tags': 'tags', 'virt_type': 'virt-type'} + _toPy = {'arch': 'arch', 'availability-zone': 'availability_zone', 'cpu-cores': 'cpu_cores', 'cpu-power': 'cpu_power', 'mem': 'mem', 'root-disk': 'root_disk', 'root-disk-source': 'root_disk_source', 'tags': 'tags', 'virt-type': 'virt_type'} + def __init__(self, arch=None, availability_zone=None, cpu_cores=None, cpu_power=None, mem=None, root_disk=None, root_disk_source=None, tags=None, virt_type=None, **unknown_fields): ''' - application_name : str - relation : CharmRelation + arch : str + availability_zone : str + cpu_cores : int + cpu_power : int + mem : int + root_disk : int + root_disk_source : str + tags : typing.Sequence[str] + virt_type : str ''' - application_name_ = application_name - relation_ = CharmRelation.from_json(relation) if relation else None + arch_ = arch + availability_zone_ = availability_zone + cpu_cores_ = cpu_cores + cpu_power_ = cpu_power + mem_ = mem + root_disk_ = root_disk + root_disk_source_ = root_disk_source + tags_ = tags + virt_type_ = virt_type # Validate arguments against known Juju API types. - if application_name_ is not None and not isinstance(application_name_, (bytes, str)): - raise Exception("Expected application_name_ to be a str, received: {}".format(type(application_name_))) + if arch_ is not None and not isinstance(arch_, (bytes, str)): + raise Exception("Expected arch_ to be a str, received: {}".format(type(arch_))) - if relation_ is not None and not isinstance(relation_, (dict, CharmRelation)): - raise Exception("Expected relation_ to be a CharmRelation, received: {}".format(type(relation_))) + if availability_zone_ is not None and not isinstance(availability_zone_, (bytes, str)): + raise Exception("Expected availability_zone_ to be a str, received: {}".format(type(availability_zone_))) - self.application_name = application_name_ - self.relation = relation_ - self.unknown_fields = unknown_fields + if cpu_cores_ is not None and not isinstance(cpu_cores_, int): + raise Exception("Expected cpu_cores_ to be a int, received: {}".format(type(cpu_cores_))) + if cpu_power_ is not None and not isinstance(cpu_power_, int): + raise Exception("Expected cpu_power_ to be a int, received: {}".format(type(cpu_power_))) + if mem_ is not None and not isinstance(mem_, int): + raise Exception("Expected mem_ to be a int, received: {}".format(type(mem_))) -class EndpointFilterAttributes(Type): - _toSchema = {'interface': 'interface', 'name': 'name', 'role': 'role'} - _toPy = {'interface': 'interface', 'name': 'name', 'role': 'role'} - def __init__(self, interface=None, name=None, role=None, **unknown_fields): - ''' - interface : str - name : str - role : str - ''' - interface_ = interface - name_ = name - role_ = role + if root_disk_ is not None and not isinstance(root_disk_, int): + raise Exception("Expected root_disk_ to be a int, received: {}".format(type(root_disk_))) - # Validate arguments against known Juju API types. - if interface_ is not None and not isinstance(interface_, (bytes, str)): - raise Exception("Expected interface_ to be a str, received: {}".format(type(interface_))) + if root_disk_source_ is not None and not isinstance(root_disk_source_, (bytes, str)): + raise Exception("Expected root_disk_source_ to be a str, received: {}".format(type(root_disk_source_))) - if name_ is not None and not isinstance(name_, (bytes, str)): - raise Exception("Expected name_ to be a str, received: {}".format(type(name_))) + if tags_ is not None and not isinstance(tags_, (bytes, str, list)): + raise Exception("Expected tags_ to be a Sequence, received: {}".format(type(tags_))) - if role_ is not None and not isinstance(role_, (bytes, str)): - raise Exception("Expected role_ to be a str, received: {}".format(type(role_))) + if virt_type_ is not None and not isinstance(virt_type_, (bytes, str)): + raise Exception("Expected virt_type_ to be a str, received: {}".format(type(virt_type_))) - self.interface = interface_ - self.name = name_ - self.role = role_ + self.arch = arch_ + self.availability_zone = availability_zone_ + self.cpu_cores = cpu_cores_ + self.cpu_power = cpu_power_ + self.mem = mem_ + self.root_disk = root_disk_ + self.root_disk_source = root_disk_source_ + self.tags = tags_ + self.virt_type = virt_type_ self.unknown_fields = unknown_fields -class EndpointRelationData(Type): - _toSchema = {'applicationdata': 'ApplicationData', 'cross_model': 'cross-model', 'endpoint': 'endpoint', 'related_endpoint': 'related-endpoint', 'relation_id': 'relation-id', 'unit_relation_data': 'unit-relation-data'} - _toPy = {'ApplicationData': 'applicationdata', 'cross-model': 'cross_model', 'endpoint': 'endpoint', 'related-endpoint': 'related_endpoint', 'relation-id': 'relation_id', 'unit-relation-data': 'unit_relation_data'} - def __init__(self, applicationdata=None, cross_model=None, endpoint=None, related_endpoint=None, relation_id=None, unit_relation_data=None, **unknown_fields): - ''' - applicationdata : typing.Mapping[str, typing.Any] - cross_model : bool - endpoint : str - related_endpoint : str - relation_id : int - unit_relation_data : typing.Mapping[str, ~RelationData] +class History(Type): + _toSchema = {'error': 'error', 'statuses': 'statuses'} + _toPy = {'error': 'error', 'statuses': 'statuses'} + def __init__(self, error=None, statuses=None, **unknown_fields): ''' - applicationdata_ = applicationdata - cross_model_ = cross_model - endpoint_ = endpoint - related_endpoint_ = related_endpoint - relation_id_ = relation_id - unit_relation_data_ = {k: RelationData.from_json(v) for k, v in (unit_relation_data or dict()).items()} + error : Error + statuses : typing.Sequence[~DetailedStatus] + ''' + error_ = Error.from_json(error) if error else None + statuses_ = [DetailedStatus.from_json(o) for o in statuses or []] # Validate arguments against known Juju API types. - if applicationdata_ is not None and not isinstance(applicationdata_, dict): - raise Exception("Expected applicationdata_ to be a Mapping, received: {}".format(type(applicationdata_))) - - if cross_model_ is not None and not isinstance(cross_model_, bool): - raise Exception("Expected cross_model_ to be a bool, received: {}".format(type(cross_model_))) - - if endpoint_ is not None and not isinstance(endpoint_, (bytes, str)): - raise Exception("Expected endpoint_ to be a str, received: {}".format(type(endpoint_))) - - if related_endpoint_ is not None and not isinstance(related_endpoint_, (bytes, str)): - raise Exception("Expected related_endpoint_ to be a str, received: {}".format(type(related_endpoint_))) - - if relation_id_ is not None and not isinstance(relation_id_, int): - raise Exception("Expected relation_id_ to be a int, received: {}".format(type(relation_id_))) + if error_ is not None and not isinstance(error_, (dict, Error)): + raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - if unit_relation_data_ is not None and not isinstance(unit_relation_data_, dict): - raise Exception("Expected unit_relation_data_ to be a Mapping, received: {}".format(type(unit_relation_data_))) + if statuses_ is not None and not isinstance(statuses_, (bytes, str, list)): + raise Exception("Expected statuses_ to be a Sequence, received: {}".format(type(statuses_))) - self.applicationdata = applicationdata_ - self.cross_model = cross_model_ - self.endpoint = endpoint_ - self.related_endpoint = related_endpoint_ - self.relation_id = relation_id_ - self.unit_relation_data = unit_relation_data_ + self.error = error_ + self.statuses = statuses_ self.unknown_fields = unknown_fields -class EndpointStatus(Type): - _toSchema = {'application': 'application', 'name': 'name', 'role': 'role', 'subordinate': 'subordinate'} - _toPy = {'application': 'application', 'name': 'name', 'role': 'role', 'subordinate': 'subordinate'} - def __init__(self, application=None, name=None, role=None, subordinate=None, **unknown_fields): +class HostPort(Type): + _toSchema = {'address': 'Address', 'cidr': 'cidr', 'config_type': 'config-type', 'is_secondary': 'is-secondary', 'port': 'port', 'scope': 'scope', 'space_id': 'space-id', 'space_name': 'space-name', 'type_': 'type', 'value': 'value'} + _toPy = {'Address': 'address', 'cidr': 'cidr', 'config-type': 'config_type', 'is-secondary': 'is_secondary', 'port': 'port', 'scope': 'scope', 'space-id': 'space_id', 'space-name': 'space_name', 'type': 'type_', 'value': 'value'} + def __init__(self, address=None, cidr=None, config_type=None, is_secondary=None, port=None, scope=None, space_id=None, space_name=None, type_=None, value=None, **unknown_fields): ''' - application : str - name : str - role : str - subordinate : bool + address : Address + cidr : str + config_type : str + is_secondary : bool + port : int + scope : str + space_id : str + space_name : str + type_ : str + value : str ''' - application_ = application - name_ = name - role_ = role - subordinate_ = subordinate + address_ = Address.from_json(address) if address else None + cidr_ = cidr + config_type_ = config_type + is_secondary_ = is_secondary + port_ = port + scope_ = scope + space_id_ = space_id + space_name_ = space_name + type__ = type_ + value_ = value # Validate arguments against known Juju API types. - if application_ is not None and not isinstance(application_, (bytes, str)): - raise Exception("Expected application_ to be a str, received: {}".format(type(application_))) + if address_ is not None and not isinstance(address_, (dict, Address)): + raise Exception("Expected address_ to be a Address, received: {}".format(type(address_))) - if name_ is not None and not isinstance(name_, (bytes, str)): - raise Exception("Expected name_ to be a str, received: {}".format(type(name_))) + if cidr_ is not None and not isinstance(cidr_, (bytes, str)): + raise Exception("Expected cidr_ to be a str, received: {}".format(type(cidr_))) - if role_ is not None and not isinstance(role_, (bytes, str)): - raise Exception("Expected role_ to be a str, received: {}".format(type(role_))) + if config_type_ is not None and not isinstance(config_type_, (bytes, str)): + raise Exception("Expected config_type_ to be a str, received: {}".format(type(config_type_))) - if subordinate_ is not None and not isinstance(subordinate_, bool): - raise Exception("Expected subordinate_ to be a bool, received: {}".format(type(subordinate_))) + if is_secondary_ is not None and not isinstance(is_secondary_, bool): + raise Exception("Expected is_secondary_ to be a bool, received: {}".format(type(is_secondary_))) - self.application = application_ - self.name = name_ - self.role = role_ - self.subordinate = subordinate_ - self.unknown_fields = unknown_fields + if port_ is not None and not isinstance(port_, int): + raise Exception("Expected port_ to be a int, received: {}".format(type(port_))) + if scope_ is not None and not isinstance(scope_, (bytes, str)): + raise Exception("Expected scope_ to be a str, received: {}".format(type(scope_))) + if space_id_ is not None and not isinstance(space_id_, (bytes, str)): + raise Exception("Expected space_id_ to be a str, received: {}".format(type(space_id_))) -class EnqueuedActions(Type): - _toSchema = {'actions': 'actions', 'operation': 'operation'} - _toPy = {'actions': 'actions', 'operation': 'operation'} - def __init__(self, actions=None, operation=None, **unknown_fields): - ''' - actions : typing.Sequence[~ActionResult] - operation : str - ''' - actions_ = [ActionResult.from_json(o) for o in actions or []] - operation_ = operation + if space_name_ is not None and not isinstance(space_name_, (bytes, str)): + raise Exception("Expected space_name_ to be a str, received: {}".format(type(space_name_))) - # Validate arguments against known Juju API types. - if actions_ is not None and not isinstance(actions_, (bytes, str, list)): - raise Exception("Expected actions_ to be a Sequence, received: {}".format(type(actions_))) + if type__ is not None and not isinstance(type__, (bytes, str)): + raise Exception("Expected type__ to be a str, received: {}".format(type(type__))) - if operation_ is not None and not isinstance(operation_, (bytes, str)): - raise Exception("Expected operation_ to be a str, received: {}".format(type(operation_))) + if value_ is not None and not isinstance(value_, (bytes, str)): + raise Exception("Expected value_ to be a str, received: {}".format(type(value_))) - self.actions = actions_ - self.operation = operation_ + self.address = address_ + self.cidr = cidr_ + self.config_type = config_type_ + self.is_secondary = is_secondary_ + self.port = port_ + self.scope = scope_ + self.space_id = space_id_ + self.space_name = space_name_ + self.type_ = type__ + self.value = value_ self.unknown_fields = unknown_fields -class Entities(Type): - _toSchema = {'entities': 'entities'} - _toPy = {'entities': 'entities'} - def __init__(self, entities=None, **unknown_fields): +class HostedModelConfig(Type): + _toSchema = {'cloud_spec': 'cloud-spec', 'config': 'config', 'error': 'error', 'name': 'name', 'owner': 'owner'} + _toPy = {'cloud-spec': 'cloud_spec', 'config': 'config', 'error': 'error', 'name': 'name', 'owner': 'owner'} + def __init__(self, cloud_spec=None, config=None, error=None, name=None, owner=None, **unknown_fields): ''' - entities : typing.Sequence[~Entity] + cloud_spec : CloudSpec + config : typing.Mapping[str, typing.Any] + error : Error + name : str + owner : str ''' - entities_ = [Entity.from_json(o) for o in entities or []] + cloud_spec_ = CloudSpec.from_json(cloud_spec) if cloud_spec else None + config_ = config + error_ = Error.from_json(error) if error else None + name_ = name + owner_ = owner # Validate arguments against known Juju API types. - if entities_ is not None and not isinstance(entities_, (bytes, str, list)): - raise Exception("Expected entities_ to be a Sequence, received: {}".format(type(entities_))) + if cloud_spec_ is not None and not isinstance(cloud_spec_, (dict, CloudSpec)): + raise Exception("Expected cloud_spec_ to be a CloudSpec, received: {}".format(type(cloud_spec_))) - self.entities = entities_ + if config_ is not None and not isinstance(config_, dict): + raise Exception("Expected config_ to be a Mapping, received: {}".format(type(config_))) + + if error_ is not None and not isinstance(error_, (dict, Error)): + raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) + + if name_ is not None and not isinstance(name_, (bytes, str)): + raise Exception("Expected name_ to be a str, received: {}".format(type(name_))) + + if owner_ is not None and not isinstance(owner_, (bytes, str)): + raise Exception("Expected owner_ to be a str, received: {}".format(type(owner_))) + + self.cloud_spec = cloud_spec_ + self.config = config_ + self.error = error_ + self.name = name_ + self.owner = owner_ self.unknown_fields = unknown_fields -class EntitiesCharmURL(Type): - _toSchema = {'entities': 'entities'} - _toPy = {'entities': 'entities'} - def __init__(self, entities=None, **unknown_fields): +class HostedModelConfigsResults(Type): + _toSchema = {'models': 'models'} + _toPy = {'models': 'models'} + def __init__(self, models=None, **unknown_fields): ''' - entities : typing.Sequence[~EntityCharmURL] + models : typing.Sequence[~HostedModelConfig] ''' - entities_ = [EntityCharmURL.from_json(o) for o in entities or []] + models_ = [HostedModelConfig.from_json(o) for o in models or []] # Validate arguments against known Juju API types. - if entities_ is not None and not isinstance(entities_, (bytes, str, list)): - raise Exception("Expected entities_ to be a Sequence, received: {}".format(type(entities_))) + if models_ is not None and not isinstance(models_, (bytes, str, list)): + raise Exception("Expected models_ to be a Sequence, received: {}".format(type(models_))) - self.entities = entities_ + self.models = models_ self.unknown_fields = unknown_fields -class EntitiesResult(Type): - _toSchema = {'entities': 'entities', 'error': 'error'} - _toPy = {'entities': 'entities', 'error': 'error'} - def __init__(self, entities=None, error=None, **unknown_fields): +class ImageMetadataFilter(Type): + _toSchema = {'arches': 'arches', 'region': 'region', 'root_storage_type': 'root-storage-type', 'stream': 'stream', 'versions': 'versions', 'virt_type': 'virt-type'} + _toPy = {'arches': 'arches', 'region': 'region', 'root-storage-type': 'root_storage_type', 'stream': 'stream', 'versions': 'versions', 'virt-type': 'virt_type'} + def __init__(self, arches=None, region=None, root_storage_type=None, stream=None, versions=None, virt_type=None, **unknown_fields): ''' - entities : typing.Sequence[~Entity] - error : Error + arches : typing.Sequence[str] + region : str + root_storage_type : str + stream : str + versions : typing.Sequence[str] + virt_type : str ''' - entities_ = [Entity.from_json(o) for o in entities or []] - error_ = Error.from_json(error) if error else None + arches_ = arches + region_ = region + root_storage_type_ = root_storage_type + stream_ = stream + versions_ = versions + virt_type_ = virt_type # Validate arguments against known Juju API types. - if entities_ is not None and not isinstance(entities_, (bytes, str, list)): - raise Exception("Expected entities_ to be a Sequence, received: {}".format(type(entities_))) - - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) + if arches_ is not None and not isinstance(arches_, (bytes, str, list)): + raise Exception("Expected arches_ to be a Sequence, received: {}".format(type(arches_))) - self.entities = entities_ - self.error = error_ - self.unknown_fields = unknown_fields + if region_ is not None and not isinstance(region_, (bytes, str)): + raise Exception("Expected region_ to be a str, received: {}".format(type(region_))) + if root_storage_type_ is not None and not isinstance(root_storage_type_, (bytes, str)): + raise Exception("Expected root_storage_type_ to be a str, received: {}".format(type(root_storage_type_))) + if stream_ is not None and not isinstance(stream_, (bytes, str)): + raise Exception("Expected stream_ to be a str, received: {}".format(type(stream_))) -class EntitiesResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None, **unknown_fields): - ''' - results : typing.Sequence[~EntitiesResult] - ''' - results_ = [EntitiesResult.from_json(o) for o in results or []] + if versions_ is not None and not isinstance(versions_, (bytes, str, list)): + raise Exception("Expected versions_ to be a Sequence, received: {}".format(type(versions_))) - # Validate arguments against known Juju API types. - if results_ is not None and not isinstance(results_, (bytes, str, list)): - raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) + if virt_type_ is not None and not isinstance(virt_type_, (bytes, str)): + raise Exception("Expected virt_type_ to be a str, received: {}".format(type(virt_type_))) - self.results = results_ + self.arches = arches_ + self.region = region_ + self.root_storage_type = root_storage_type_ + self.stream = stream_ + self.versions = versions_ + self.virt_type = virt_type_ self.unknown_fields = unknown_fields -class EntitiesVersion(Type): - _toSchema = {'agent_tools': 'agent-tools'} - _toPy = {'agent-tools': 'agent_tools'} - def __init__(self, agent_tools=None, **unknown_fields): +class ImportStorageDetails(Type): + _toSchema = {'storage_tag': 'storage-tag'} + _toPy = {'storage-tag': 'storage_tag'} + def __init__(self, storage_tag=None, **unknown_fields): ''' - agent_tools : typing.Sequence[~EntityVersion] + storage_tag : str ''' - agent_tools_ = [EntityVersion.from_json(o) for o in agent_tools or []] + storage_tag_ = storage_tag # Validate arguments against known Juju API types. - if agent_tools_ is not None and not isinstance(agent_tools_, (bytes, str, list)): - raise Exception("Expected agent_tools_ to be a Sequence, received: {}".format(type(agent_tools_))) + if storage_tag_ is not None and not isinstance(storage_tag_, (bytes, str)): + raise Exception("Expected storage_tag_ to be a str, received: {}".format(type(storage_tag_))) - self.agent_tools = agent_tools_ + self.storage_tag = storage_tag_ self.unknown_fields = unknown_fields -class EntitiesWatchResult(Type): - _toSchema = {'changes': 'changes', 'error': 'error', 'watcher_id': 'watcher-id'} - _toPy = {'changes': 'changes', 'error': 'error', 'watcher-id': 'watcher_id'} - def __init__(self, changes=None, error=None, watcher_id=None, **unknown_fields): +class ImportStorageParams(Type): + _toSchema = {'kind': 'kind', 'pool': 'pool', 'provider_id': 'provider-id', 'storage_name': 'storage-name'} + _toPy = {'kind': 'kind', 'pool': 'pool', 'provider-id': 'provider_id', 'storage-name': 'storage_name'} + def __init__(self, kind=None, pool=None, provider_id=None, storage_name=None, **unknown_fields): + ''' + kind : int + pool : str + provider_id : str + storage_name : str + ''' + kind_ = kind + pool_ = pool + provider_id_ = provider_id + storage_name_ = storage_name + + # Validate arguments against known Juju API types. + if kind_ is not None and not isinstance(kind_, int): + raise Exception("Expected kind_ to be a int, received: {}".format(type(kind_))) + + if pool_ is not None and not isinstance(pool_, (bytes, str)): + raise Exception("Expected pool_ to be a str, received: {}".format(type(pool_))) + + if provider_id_ is not None and not isinstance(provider_id_, (bytes, str)): + raise Exception("Expected provider_id_ to be a str, received: {}".format(type(provider_id_))) + + if storage_name_ is not None and not isinstance(storage_name_, (bytes, str)): + raise Exception("Expected storage_name_ to be a str, received: {}".format(type(storage_name_))) + + self.kind = kind_ + self.pool = pool_ + self.provider_id = provider_id_ + self.storage_name = storage_name_ + self.unknown_fields = unknown_fields + + + +class ImportStorageResult(Type): + _toSchema = {'error': 'error', 'result': 'result'} + _toPy = {'error': 'error', 'result': 'result'} + def __init__(self, error=None, result=None, **unknown_fields): ''' - changes : typing.Sequence[str] error : Error - watcher_id : str + result : ImportStorageDetails ''' - changes_ = changes error_ = Error.from_json(error) if error else None - watcher_id_ = watcher_id + result_ = ImportStorageDetails.from_json(result) if result else None # Validate arguments against known Juju API types. - if changes_ is not None and not isinstance(changes_, (bytes, str, list)): - raise Exception("Expected changes_ to be a Sequence, received: {}".format(type(changes_))) - if error_ is not None and not isinstance(error_, (dict, Error)): raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - if watcher_id_ is not None and not isinstance(watcher_id_, (bytes, str)): - raise Exception("Expected watcher_id_ to be a str, received: {}".format(type(watcher_id_))) + if result_ is not None and not isinstance(result_, (dict, ImportStorageDetails)): + raise Exception("Expected result_ to be a ImportStorageDetails, received: {}".format(type(result_))) - self.changes = changes_ self.error = error_ - self.watcher_id = watcher_id_ + self.result = result_ self.unknown_fields = unknown_fields -class Entity(Type): - _toSchema = {'tag': 'tag'} - _toPy = {'tag': 'tag'} - def __init__(self, tag=None, **unknown_fields): +class ImportStorageResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} + def __init__(self, results=None, **unknown_fields): ''' - tag : str + results : typing.Sequence[~ImportStorageResult] ''' - tag_ = tag + results_ = [ImportStorageResult.from_json(o) for o in results or []] # Validate arguments against known Juju API types. - if tag_ is not None and not isinstance(tag_, (bytes, str)): - raise Exception("Expected tag_ to be a str, received: {}".format(type(tag_))) + if results_ is not None and not isinstance(results_, (bytes, str, list)): + raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) - self.tag = tag_ + self.results = results_ self.unknown_fields = unknown_fields -class EntityAnnotations(Type): - _toSchema = {'annotations': 'annotations', 'entity': 'entity'} - _toPy = {'annotations': 'annotations', 'entity': 'entity'} - def __init__(self, annotations=None, entity=None, **unknown_fields): +class InitiateMigrationArgs(Type): + _toSchema = {'specs': 'specs'} + _toPy = {'specs': 'specs'} + def __init__(self, specs=None, **unknown_fields): ''' - annotations : typing.Mapping[str, str] - entity : str + specs : typing.Sequence[~MigrationSpec] ''' - annotations_ = annotations - entity_ = entity + specs_ = [MigrationSpec.from_json(o) for o in specs or []] # Validate arguments against known Juju API types. - if annotations_ is not None and not isinstance(annotations_, dict): - raise Exception("Expected annotations_ to be a Mapping, received: {}".format(type(annotations_))) - - if entity_ is not None and not isinstance(entity_, (bytes, str)): - raise Exception("Expected entity_ to be a str, received: {}".format(type(entity_))) + if specs_ is not None and not isinstance(specs_, (bytes, str, list)): + raise Exception("Expected specs_ to be a Sequence, received: {}".format(type(specs_))) - self.annotations = annotations_ - self.entity = entity_ + self.specs = specs_ self.unknown_fields = unknown_fields -class EntityCharmURL(Type): - _toSchema = {'charm_url': 'charm-url', 'tag': 'tag'} - _toPy = {'charm-url': 'charm_url', 'tag': 'tag'} - def __init__(self, charm_url=None, tag=None, **unknown_fields): +class InitiateMigrationResult(Type): + _toSchema = {'error': 'error', 'migration_id': 'migration-id', 'model_tag': 'model-tag'} + _toPy = {'error': 'error', 'migration-id': 'migration_id', 'model-tag': 'model_tag'} + def __init__(self, error=None, migration_id=None, model_tag=None, **unknown_fields): ''' - charm_url : str - tag : str + error : Error + migration_id : str + model_tag : str ''' - charm_url_ = charm_url - tag_ = tag + error_ = Error.from_json(error) if error else None + migration_id_ = migration_id + model_tag_ = model_tag # Validate arguments against known Juju API types. - if charm_url_ is not None and not isinstance(charm_url_, (bytes, str)): - raise Exception("Expected charm_url_ to be a str, received: {}".format(type(charm_url_))) + if error_ is not None and not isinstance(error_, (dict, Error)): + raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - if tag_ is not None and not isinstance(tag_, (bytes, str)): - raise Exception("Expected tag_ to be a str, received: {}".format(type(tag_))) + if migration_id_ is not None and not isinstance(migration_id_, (bytes, str)): + raise Exception("Expected migration_id_ to be a str, received: {}".format(type(migration_id_))) - self.charm_url = charm_url_ - self.tag = tag_ + if model_tag_ is not None and not isinstance(model_tag_, (bytes, str)): + raise Exception("Expected model_tag_ to be a str, received: {}".format(type(model_tag_))) + + self.error = error_ + self.migration_id = migration_id_ + self.model_tag = model_tag_ self.unknown_fields = unknown_fields -class EntityMacaroonArg(Type): - _toSchema = {'macaroon': 'macaroon', 'tag': 'tag'} - _toPy = {'macaroon': 'macaroon', 'tag': 'tag'} - def __init__(self, macaroon=None, tag=None, **unknown_fields): +class InitiateMigrationResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} + def __init__(self, results=None, **unknown_fields): ''' - macaroon : Macaroon - tag : str + results : typing.Sequence[~InitiateMigrationResult] ''' - macaroon_ = Macaroon.from_json(macaroon) if macaroon else None - tag_ = tag + results_ = [InitiateMigrationResult.from_json(o) for o in results or []] # Validate arguments against known Juju API types. - if macaroon_ is not None and not isinstance(macaroon_, (dict, Macaroon)): - raise Exception("Expected macaroon_ to be a Macaroon, received: {}".format(type(macaroon_))) - - if tag_ is not None and not isinstance(tag_, (bytes, str)): - raise Exception("Expected tag_ to be a str, received: {}".format(type(tag_))) + if results_ is not None and not isinstance(results_, (bytes, str, list)): + raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) - self.macaroon = macaroon_ - self.tag = tag_ + self.results = results_ self.unknown_fields = unknown_fields -class EntityMacaroonArgs(Type): - _toSchema = {'args': 'Args'} - _toPy = {'Args': 'args'} - def __init__(self, args=None, **unknown_fields): +class InstanceType(Type): + _toSchema = {'arches': 'arches', 'cost': 'cost', 'cpu_cores': 'cpu-cores', 'memory': 'memory', 'name': 'name', 'root_disk': 'root-disk', 'virt_type': 'virt-type'} + _toPy = {'arches': 'arches', 'cost': 'cost', 'cpu-cores': 'cpu_cores', 'memory': 'memory', 'name': 'name', 'root-disk': 'root_disk', 'virt-type': 'virt_type'} + def __init__(self, arches=None, cost=None, cpu_cores=None, memory=None, name=None, root_disk=None, virt_type=None, **unknown_fields): ''' - args : typing.Sequence[~EntityMacaroonArg] + arches : typing.Sequence[str] + cost : int + cpu_cores : int + memory : int + name : str + root_disk : int + virt_type : str ''' - args_ = [EntityMacaroonArg.from_json(o) for o in args or []] + arches_ = arches + cost_ = cost + cpu_cores_ = cpu_cores + memory_ = memory + name_ = name + root_disk_ = root_disk + virt_type_ = virt_type # Validate arguments against known Juju API types. - if args_ is not None and not isinstance(args_, (bytes, str, list)): - raise Exception("Expected args_ to be a Sequence, received: {}".format(type(args_))) + if arches_ is not None and not isinstance(arches_, (bytes, str, list)): + raise Exception("Expected arches_ to be a Sequence, received: {}".format(type(arches_))) - self.args = args_ + if cost_ is not None and not isinstance(cost_, int): + raise Exception("Expected cost_ to be a int, received: {}".format(type(cost_))) + + if cpu_cores_ is not None and not isinstance(cpu_cores_, int): + raise Exception("Expected cpu_cores_ to be a int, received: {}".format(type(cpu_cores_))) + + if memory_ is not None and not isinstance(memory_, int): + raise Exception("Expected memory_ to be a int, received: {}".format(type(memory_))) + + if name_ is not None and not isinstance(name_, (bytes, str)): + raise Exception("Expected name_ to be a str, received: {}".format(type(name_))) + + if root_disk_ is not None and not isinstance(root_disk_, int): + raise Exception("Expected root_disk_ to be a int, received: {}".format(type(root_disk_))) + + if virt_type_ is not None and not isinstance(virt_type_, (bytes, str)): + raise Exception("Expected virt_type_ to be a str, received: {}".format(type(virt_type_))) + + self.arches = arches_ + self.cost = cost_ + self.cpu_cores = cpu_cores_ + self.memory = memory_ + self.name = name_ + self.root_disk = root_disk_ + self.virt_type = virt_type_ self.unknown_fields = unknown_fields -class EntityMetrics(Type): - _toSchema = {'error': 'error', 'metrics': 'metrics'} - _toPy = {'error': 'error', 'metrics': 'metrics'} - def __init__(self, error=None, metrics=None, **unknown_fields): +class InstanceTypesResult(Type): + _toSchema = {'cost_currency': 'cost-currency', 'cost_divisor': 'cost-divisor', 'cost_unit': 'cost-unit', 'error': 'error', 'instance_types': 'instance-types'} + _toPy = {'cost-currency': 'cost_currency', 'cost-divisor': 'cost_divisor', 'cost-unit': 'cost_unit', 'error': 'error', 'instance-types': 'instance_types'} + def __init__(self, cost_currency=None, cost_divisor=None, cost_unit=None, error=None, instance_types=None, **unknown_fields): ''' + cost_currency : str + cost_divisor : int + cost_unit : str error : Error - metrics : typing.Sequence[~MetricResult] + instance_types : typing.Sequence[~InstanceType] ''' + cost_currency_ = cost_currency + cost_divisor_ = cost_divisor + cost_unit_ = cost_unit error_ = Error.from_json(error) if error else None - metrics_ = [MetricResult.from_json(o) for o in metrics or []] + instance_types_ = [InstanceType.from_json(o) for o in instance_types or []] # Validate arguments against known Juju API types. + if cost_currency_ is not None and not isinstance(cost_currency_, (bytes, str)): + raise Exception("Expected cost_currency_ to be a str, received: {}".format(type(cost_currency_))) + + if cost_divisor_ is not None and not isinstance(cost_divisor_, int): + raise Exception("Expected cost_divisor_ to be a int, received: {}".format(type(cost_divisor_))) + + if cost_unit_ is not None and not isinstance(cost_unit_, (bytes, str)): + raise Exception("Expected cost_unit_ to be a str, received: {}".format(type(cost_unit_))) + if error_ is not None and not isinstance(error_, (dict, Error)): raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - if metrics_ is not None and not isinstance(metrics_, (bytes, str, list)): - raise Exception("Expected metrics_ to be a Sequence, received: {}".format(type(metrics_))) + if instance_types_ is not None and not isinstance(instance_types_, (bytes, str, list)): + raise Exception("Expected instance_types_ to be a Sequence, received: {}".format(type(instance_types_))) + self.cost_currency = cost_currency_ + self.cost_divisor = cost_divisor_ + self.cost_unit = cost_unit_ self.error = error_ - self.metrics = metrics_ + self.instance_types = instance_types_ self.unknown_fields = unknown_fields -class EntityPassword(Type): - _toSchema = {'password': 'password', 'tag': 'tag'} - _toPy = {'password': 'password', 'tag': 'tag'} - def __init__(self, password=None, tag=None, **unknown_fields): +class InstanceTypesResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} + def __init__(self, results=None, **unknown_fields): ''' - password : str - tag : str + results : typing.Sequence[~InstanceTypesResult] ''' - password_ = password - tag_ = tag + results_ = [InstanceTypesResult.from_json(o) for o in results or []] # Validate arguments against known Juju API types. - if password_ is not None and not isinstance(password_, (bytes, str)): - raise Exception("Expected password_ to be a str, received: {}".format(type(password_))) + if results_ is not None and not isinstance(results_, (bytes, str, list)): + raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) - if tag_ is not None and not isinstance(tag_, (bytes, str)): - raise Exception("Expected tag_ to be a str, received: {}".format(type(tag_))) - - self.password = password_ - self.tag = tag_ + self.results = results_ self.unknown_fields = unknown_fields -class EntityPasswords(Type): - _toSchema = {'changes': 'changes'} - _toPy = {'changes': 'changes'} - def __init__(self, changes=None, **unknown_fields): +class IntResult(Type): + _toSchema = {'error': 'error', 'result': 'result'} + _toPy = {'error': 'error', 'result': 'result'} + def __init__(self, error=None, result=None, **unknown_fields): ''' - changes : typing.Sequence[~EntityPassword] + error : Error + result : int ''' - changes_ = [EntityPassword.from_json(o) for o in changes or []] + error_ = Error.from_json(error) if error else None + result_ = result # Validate arguments against known Juju API types. - if changes_ is not None and not isinstance(changes_, (bytes, str, list)): - raise Exception("Expected changes_ to be a Sequence, received: {}".format(type(changes_))) + if error_ is not None and not isinstance(error_, (dict, Error)): + raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - self.changes = changes_ + if result_ is not None and not isinstance(result_, int): + raise Exception("Expected result_ to be a int, received: {}".format(type(result_))) + + self.error = error_ + self.result = result_ self.unknown_fields = unknown_fields -class EntityPortRange(Type): - _toSchema = {'endpoint': 'endpoint', 'from_port': 'from-port', 'protocol': 'protocol', 'tag': 'tag', 'to_port': 'to-port'} - _toPy = {'endpoint': 'endpoint', 'from-port': 'from_port', 'protocol': 'protocol', 'tag': 'tag', 'to-port': 'to_port'} - def __init__(self, endpoint=None, from_port=None, protocol=None, tag=None, to_port=None, **unknown_fields): +class InvalidateCredentialArg(Type): + _toSchema = {'reason': 'reason'} + _toPy = {'reason': 'reason'} + def __init__(self, reason=None, **unknown_fields): ''' - endpoint : str - from_port : int - protocol : str - tag : str - to_port : int + reason : str ''' - endpoint_ = endpoint - from_port_ = from_port - protocol_ = protocol - tag_ = tag - to_port_ = to_port + reason_ = reason # Validate arguments against known Juju API types. - if endpoint_ is not None and not isinstance(endpoint_, (bytes, str)): - raise Exception("Expected endpoint_ to be a str, received: {}".format(type(endpoint_))) + if reason_ is not None and not isinstance(reason_, (bytes, str)): + raise Exception("Expected reason_ to be a str, received: {}".format(type(reason_))) - if from_port_ is not None and not isinstance(from_port_, int): - raise Exception("Expected from_port_ to be a int, received: {}".format(type(from_port_))) + self.reason = reason_ + self.unknown_fields = unknown_fields - if protocol_ is not None and not isinstance(protocol_, (bytes, str)): - raise Exception("Expected protocol_ to be a str, received: {}".format(type(protocol_))) - if tag_ is not None and not isinstance(tag_, (bytes, str)): - raise Exception("Expected tag_ to be a str, received: {}".format(type(tag_))) - if to_port_ is not None and not isinstance(to_port_, int): - raise Exception("Expected to_port_ to be a int, received: {}".format(type(to_port_))) +class IsMeteredResult(Type): + _toSchema = {'metered': 'metered'} + _toPy = {'metered': 'metered'} + def __init__(self, metered=None, **unknown_fields): + ''' + metered : bool + ''' + metered_ = metered - self.endpoint = endpoint_ - self.from_port = from_port_ - self.protocol = protocol_ - self.tag = tag_ - self.to_port = to_port_ + # Validate arguments against known Juju API types. + if metered_ is not None and not isinstance(metered_, bool): + raise Exception("Expected metered_ to be a bool, received: {}".format(type(metered_))) + + self.metered = metered_ self.unknown_fields = unknown_fields -class EntityStatus(Type): - _toSchema = {'data': 'data', 'info': 'info', 'since': 'since', 'status': 'status'} - _toPy = {'data': 'data', 'info': 'info', 'since': 'since', 'status': 'status'} - def __init__(self, data=None, info=None, since=None, status=None, **unknown_fields): +class LXDProfile(Type): + _toSchema = {'config': 'config', 'description': 'description', 'devices': 'devices'} + _toPy = {'config': 'config', 'description': 'description', 'devices': 'devices'} + def __init__(self, config=None, description=None, devices=None, **unknown_fields): ''' - data : typing.Mapping[str, typing.Any] - info : str - since : str - status : str + config : typing.Mapping[str, str] + description : str + devices : typing.Mapping[str, typing.Any] ''' - data_ = data - info_ = info - since_ = since - status_ = status + config_ = config + description_ = description + devices_ = devices # Validate arguments against known Juju API types. - if data_ is not None and not isinstance(data_, dict): - raise Exception("Expected data_ to be a Mapping, received: {}".format(type(data_))) - - if info_ is not None and not isinstance(info_, (bytes, str)): - raise Exception("Expected info_ to be a str, received: {}".format(type(info_))) + if config_ is not None and not isinstance(config_, dict): + raise Exception("Expected config_ to be a Mapping, received: {}".format(type(config_))) - if since_ is not None and not isinstance(since_, (bytes, str)): - raise Exception("Expected since_ to be a str, received: {}".format(type(since_))) + if description_ is not None and not isinstance(description_, (bytes, str)): + raise Exception("Expected description_ to be a str, received: {}".format(type(description_))) - if status_ is not None and not isinstance(status_, (bytes, str)): - raise Exception("Expected status_ to be a str, received: {}".format(type(status_))) + if devices_ is not None and not isinstance(devices_, dict): + raise Exception("Expected devices_ to be a Mapping, received: {}".format(type(devices_))) - self.data = data_ - self.info = info_ - self.since = since_ - self.status = status_ + self.config = config_ + self.description = description_ + self.devices = devices_ self.unknown_fields = unknown_fields -class EntityStatusArgs(Type): - _toSchema = {'data': 'data', 'info': 'info', 'status': 'status', 'tag': 'tag'} - _toPy = {'data': 'data', 'info': 'info', 'status': 'status', 'tag': 'tag'} - def __init__(self, data=None, info=None, status=None, tag=None, **unknown_fields): +class ListCloudImageMetadataResult(Type): + _toSchema = {'result': 'result'} + _toPy = {'result': 'result'} + def __init__(self, result=None, **unknown_fields): ''' - data : typing.Mapping[str, typing.Any] - info : str - status : str - tag : str + result : typing.Sequence[~CloudImageMetadata] ''' - data_ = data - info_ = info - status_ = status - tag_ = tag + result_ = [CloudImageMetadata.from_json(o) for o in result or []] # Validate arguments against known Juju API types. - if data_ is not None and not isinstance(data_, dict): - raise Exception("Expected data_ to be a Mapping, received: {}".format(type(data_))) + if result_ is not None and not isinstance(result_, (bytes, str, list)): + raise Exception("Expected result_ to be a Sequence, received: {}".format(type(result_))) - if info_ is not None and not isinstance(info_, (bytes, str)): - raise Exception("Expected info_ to be a str, received: {}".format(type(info_))) + self.result = result_ + self.unknown_fields = unknown_fields - if status_ is not None and not isinstance(status_, (bytes, str)): - raise Exception("Expected status_ to be a str, received: {}".format(type(status_))) - if tag_ is not None and not isinstance(tag_, (bytes, str)): - raise Exception("Expected tag_ to be a str, received: {}".format(type(tag_))) - self.data = data_ - self.info = info_ - self.status = status_ - self.tag = tag_ +class ListCloudInfo(Type): + _toSchema = {'clouddetails': 'CloudDetails', 'user_access': 'user-access'} + _toPy = {'CloudDetails': 'clouddetails', 'user-access': 'user_access'} + def __init__(self, clouddetails=None, user_access=None, **unknown_fields): + ''' + clouddetails : CloudDetails + user_access : str + ''' + clouddetails_ = CloudDetails.from_json(clouddetails) if clouddetails else None + user_access_ = user_access + + # Validate arguments against known Juju API types. + if clouddetails_ is not None and not isinstance(clouddetails_, (dict, CloudDetails)): + raise Exception("Expected clouddetails_ to be a CloudDetails, received: {}".format(type(clouddetails_))) + + if user_access_ is not None and not isinstance(user_access_, (bytes, str)): + raise Exception("Expected user_access_ to be a str, received: {}".format(type(user_access_))) + + self.clouddetails = clouddetails_ + self.user_access = user_access_ self.unknown_fields = unknown_fields -class EntityString(Type): - _toSchema = {'tag': 'tag', 'value': 'value'} - _toPy = {'tag': 'tag', 'value': 'value'} - def __init__(self, tag=None, value=None, **unknown_fields): +class ListCloudInfoResult(Type): + _toSchema = {'error': 'error', 'result': 'result'} + _toPy = {'error': 'error', 'result': 'result'} + def __init__(self, error=None, result=None, **unknown_fields): ''' - tag : str - value : str + error : Error + result : ListCloudInfo ''' - tag_ = tag - value_ = value + error_ = Error.from_json(error) if error else None + result_ = ListCloudInfo.from_json(result) if result else None # Validate arguments against known Juju API types. - if tag_ is not None and not isinstance(tag_, (bytes, str)): - raise Exception("Expected tag_ to be a str, received: {}".format(type(tag_))) + if error_ is not None and not isinstance(error_, (dict, Error)): + raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - if value_ is not None and not isinstance(value_, (bytes, str)): - raise Exception("Expected value_ to be a str, received: {}".format(type(value_))) + if result_ is not None and not isinstance(result_, (dict, ListCloudInfo)): + raise Exception("Expected result_ to be a ListCloudInfo, received: {}".format(type(result_))) - self.tag = tag_ - self.value = value_ + self.error = error_ + self.result = result_ self.unknown_fields = unknown_fields -class EntityVersion(Type): - _toSchema = {'tag': 'tag', 'tools': 'tools'} - _toPy = {'tag': 'tag', 'tools': 'tools'} - def __init__(self, tag=None, tools=None, **unknown_fields): +class ListCloudInfoResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} + def __init__(self, results=None, **unknown_fields): ''' - tag : str - tools : Version + results : typing.Sequence[~ListCloudInfoResult] ''' - tag_ = tag - tools_ = Version.from_json(tools) if tools else None + results_ = [ListCloudInfoResult.from_json(o) for o in results or []] # Validate arguments against known Juju API types. - if tag_ is not None and not isinstance(tag_, (bytes, str)): - raise Exception("Expected tag_ to be a str, received: {}".format(type(tag_))) - - if tools_ is not None and not isinstance(tools_, (dict, Version)): - raise Exception("Expected tools_ to be a Version, received: {}".format(type(tools_))) + if results_ is not None and not isinstance(results_, (bytes, str, list)): + raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) - self.tag = tag_ - self.tools = tools_ + self.results = results_ self.unknown_fields = unknown_fields -class EntityWorkloadVersion(Type): - _toSchema = {'tag': 'tag', 'workload_version': 'workload-version'} - _toPy = {'tag': 'tag', 'workload-version': 'workload_version'} - def __init__(self, tag=None, workload_version=None, **unknown_fields): +class ListCloudsRequest(Type): + _toSchema = {'all_': 'all', 'user_tag': 'user-tag'} + _toPy = {'all': 'all_', 'user-tag': 'user_tag'} + def __init__(self, all_=None, user_tag=None, **unknown_fields): ''' - tag : str - workload_version : str + all_ : bool + user_tag : str ''' - tag_ = tag - workload_version_ = workload_version + all__ = all_ + user_tag_ = user_tag # Validate arguments against known Juju API types. - if tag_ is not None and not isinstance(tag_, (bytes, str)): - raise Exception("Expected tag_ to be a str, received: {}".format(type(tag_))) + if all__ is not None and not isinstance(all__, bool): + raise Exception("Expected all__ to be a bool, received: {}".format(type(all__))) - if workload_version_ is not None and not isinstance(workload_version_, (bytes, str)): - raise Exception("Expected workload_version_ to be a str, received: {}".format(type(workload_version_))) + if user_tag_ is not None and not isinstance(user_tag_, (bytes, str)): + raise Exception("Expected user_tag_ to be a str, received: {}".format(type(user_tag_))) - self.tag = tag_ - self.workload_version = workload_version_ + self.all_ = all__ + self.user_tag = user_tag_ + self.unknown_fields = unknown_fields + + + +class ListFirewallRulesResults(Type): + _toSchema = {'rules': 'Rules'} + _toPy = {'Rules': 'rules'} + def __init__(self, rules=None, **unknown_fields): + ''' + rules : typing.Sequence[~FirewallRule] + ''' + rules_ = [FirewallRule.from_json(o) for o in rules or []] + + # Validate arguments against known Juju API types. + if rules_ is not None and not isinstance(rules_, (bytes, str, list)): + raise Exception("Expected rules_ to be a Sequence, received: {}".format(type(rules_))) + + self.rules = rules_ self.unknown_fields = unknown_fields -class EntityWorkloadVersions(Type): +class ListResourcesArgs(Type): _toSchema = {'entities': 'entities'} _toPy = {'entities': 'entities'} def __init__(self, entities=None, **unknown_fields): ''' - entities : typing.Sequence[~EntityWorkloadVersion] + entities : typing.Sequence[~Entity] ''' - entities_ = [EntityWorkloadVersion.from_json(o) for o in entities or []] + entities_ = [Entity.from_json(o) for o in entities or []] # Validate arguments against known Juju API types. if entities_ is not None and not isinstance(entities_, (bytes, str, list)): @@ -9427,62 +8566,62 @@ def __init__(self, entities=None, **unknown_fields): -class Error(Type): - _toSchema = {'code': 'code', 'info': 'info', 'message': 'message'} - _toPy = {'code': 'code', 'info': 'info', 'message': 'message'} - def __init__(self, code=None, info=None, message=None, **unknown_fields): +class ListSSHKeys(Type): + _toSchema = {'entities': 'entities', 'mode': 'mode'} + _toPy = {'entities': 'entities', 'mode': 'mode'} + def __init__(self, entities=None, mode=None, **unknown_fields): ''' - code : str - info : typing.Mapping[str, typing.Any] - message : str + entities : Entities + mode : bool ''' - code_ = code - info_ = info - message_ = message + entities_ = Entities.from_json(entities) if entities else None + mode_ = mode # Validate arguments against known Juju API types. - if code_ is not None and not isinstance(code_, (bytes, str)): - raise Exception("Expected code_ to be a str, received: {}".format(type(code_))) - - if info_ is not None and not isinstance(info_, dict): - raise Exception("Expected info_ to be a Mapping, received: {}".format(type(info_))) + if entities_ is not None and not isinstance(entities_, (dict, Entities)): + raise Exception("Expected entities_ to be a Entities, received: {}".format(type(entities_))) - if message_ is not None and not isinstance(message_, (bytes, str)): - raise Exception("Expected message_ to be a str, received: {}".format(type(message_))) + if mode_ is not None and not isinstance(mode_, bool): + raise Exception("Expected mode_ to be a bool, received: {}".format(type(mode_))) - self.code = code_ - self.info = info_ - self.message = message_ + self.entities = entities_ + self.mode = mode_ self.unknown_fields = unknown_fields -class ErrorResult(Type): - _toSchema = {'error': 'error'} - _toPy = {'error': 'error'} - def __init__(self, error=None, **unknown_fields): +class ListSecretBackendsArgs(Type): + _toSchema = {'names': 'names', 'reveal': 'reveal'} + _toPy = {'names': 'names', 'reveal': 'reveal'} + def __init__(self, names=None, reveal=None, **unknown_fields): ''' - error : Error + names : typing.Sequence[str] + reveal : bool ''' - error_ = Error.from_json(error) if error else None + names_ = names + reveal_ = reveal # Validate arguments against known Juju API types. - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) + if names_ is not None and not isinstance(names_, (bytes, str, list)): + raise Exception("Expected names_ to be a Sequence, received: {}".format(type(names_))) - self.error = error_ + if reveal_ is not None and not isinstance(reveal_, bool): + raise Exception("Expected reveal_ to be a bool, received: {}".format(type(reveal_))) + + self.names = names_ + self.reveal = reveal_ self.unknown_fields = unknown_fields -class ErrorResults(Type): +class ListSecretBackendsResults(Type): _toSchema = {'results': 'results'} _toPy = {'results': 'results'} def __init__(self, results=None, **unknown_fields): ''' - results : typing.Sequence[~ErrorResult] + results : typing.Sequence[~SecretBackendResult] ''' - results_ = [ErrorResult.from_json(o) for o in results or []] + results_ = [SecretBackendResult.from_json(o) for o in results or []] # Validate arguments against known Juju API types. if results_ is not None and not isinstance(results_, (bytes, str, list)): @@ -9493,68 +8632,110 @@ def __init__(self, results=None, **unknown_fields): -class ExportBundleParams(Type): - _toSchema = {'include_charm_defaults': 'include-charm-defaults', 'include_series': 'include-series'} - _toPy = {'include-charm-defaults': 'include_charm_defaults', 'include-series': 'include_series'} - def __init__(self, include_charm_defaults=None, include_series=None, **unknown_fields): +class ListSecretResult(Type): + _toSchema = {'access': 'access', 'create_time': 'create-time', 'description': 'description', 'label': 'label', 'latest_expire_time': 'latest-expire-time', 'latest_revision': 'latest-revision', 'next_rotate_time': 'next-rotate-time', 'owner_tag': 'owner-tag', 'revisions': 'revisions', 'rotate_policy': 'rotate-policy', 'update_time': 'update-time', 'uri': 'uri', 'value': 'value', 'version': 'version'} + _toPy = {'access': 'access', 'create-time': 'create_time', 'description': 'description', 'label': 'label', 'latest-expire-time': 'latest_expire_time', 'latest-revision': 'latest_revision', 'next-rotate-time': 'next_rotate_time', 'owner-tag': 'owner_tag', 'revisions': 'revisions', 'rotate-policy': 'rotate_policy', 'update-time': 'update_time', 'uri': 'uri', 'value': 'value', 'version': 'version'} + def __init__(self, access=None, create_time=None, description=None, label=None, latest_expire_time=None, latest_revision=None, next_rotate_time=None, owner_tag=None, revisions=None, rotate_policy=None, update_time=None, uri=None, value=None, version=None, **unknown_fields): ''' - include_charm_defaults : bool - include_series : bool + access : typing.Sequence[~AccessInfo] + create_time : str + description : str + label : str + latest_expire_time : str + latest_revision : int + next_rotate_time : str + owner_tag : str + revisions : typing.Sequence[~SecretRevision] + rotate_policy : str + update_time : str + uri : str + value : SecretValueResult + version : int ''' - include_charm_defaults_ = include_charm_defaults - include_series_ = include_series + access_ = [AccessInfo.from_json(o) for o in access or []] + create_time_ = create_time + description_ = description + label_ = label + latest_expire_time_ = latest_expire_time + latest_revision_ = latest_revision + next_rotate_time_ = next_rotate_time + owner_tag_ = owner_tag + revisions_ = [SecretRevision.from_json(o) for o in revisions or []] + rotate_policy_ = rotate_policy + update_time_ = update_time + uri_ = uri + value_ = SecretValueResult.from_json(value) if value else None + version_ = version # Validate arguments against known Juju API types. - if include_charm_defaults_ is not None and not isinstance(include_charm_defaults_, bool): - raise Exception("Expected include_charm_defaults_ to be a bool, received: {}".format(type(include_charm_defaults_))) + if access_ is not None and not isinstance(access_, (bytes, str, list)): + raise Exception("Expected access_ to be a Sequence, received: {}".format(type(access_))) - if include_series_ is not None and not isinstance(include_series_, bool): - raise Exception("Expected include_series_ to be a bool, received: {}".format(type(include_series_))) + if create_time_ is not None and not isinstance(create_time_, (bytes, str)): + raise Exception("Expected create_time_ to be a str, received: {}".format(type(create_time_))) - self.include_charm_defaults = include_charm_defaults_ - self.include_series = include_series_ - self.unknown_fields = unknown_fields + if description_ is not None and not isinstance(description_, (bytes, str)): + raise Exception("Expected description_ to be a str, received: {}".format(type(description_))) + + if label_ is not None and not isinstance(label_, (bytes, str)): + raise Exception("Expected label_ to be a str, received: {}".format(type(label_))) + if latest_expire_time_ is not None and not isinstance(latest_expire_time_, (bytes, str)): + raise Exception("Expected latest_expire_time_ to be a str, received: {}".format(type(latest_expire_time_))) + if latest_revision_ is not None and not isinstance(latest_revision_, int): + raise Exception("Expected latest_revision_ to be a int, received: {}".format(type(latest_revision_))) -class ExposeInfoResult(Type): - _toSchema = {'error': 'error', 'exposed': 'exposed', 'exposed_endpoints': 'exposed-endpoints'} - _toPy = {'error': 'error', 'exposed': 'exposed', 'exposed-endpoints': 'exposed_endpoints'} - def __init__(self, error=None, exposed=None, exposed_endpoints=None, **unknown_fields): - ''' - error : Error - exposed : bool - exposed_endpoints : typing.Mapping[str, ~ExposedEndpoint] - ''' - error_ = Error.from_json(error) if error else None - exposed_ = exposed - exposed_endpoints_ = {k: ExposedEndpoint.from_json(v) for k, v in (exposed_endpoints or dict()).items()} + if next_rotate_time_ is not None and not isinstance(next_rotate_time_, (bytes, str)): + raise Exception("Expected next_rotate_time_ to be a str, received: {}".format(type(next_rotate_time_))) - # Validate arguments against known Juju API types. - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) + if owner_tag_ is not None and not isinstance(owner_tag_, (bytes, str)): + raise Exception("Expected owner_tag_ to be a str, received: {}".format(type(owner_tag_))) - if exposed_ is not None and not isinstance(exposed_, bool): - raise Exception("Expected exposed_ to be a bool, received: {}".format(type(exposed_))) + if revisions_ is not None and not isinstance(revisions_, (bytes, str, list)): + raise Exception("Expected revisions_ to be a Sequence, received: {}".format(type(revisions_))) - if exposed_endpoints_ is not None and not isinstance(exposed_endpoints_, dict): - raise Exception("Expected exposed_endpoints_ to be a Mapping, received: {}".format(type(exposed_endpoints_))) + if rotate_policy_ is not None and not isinstance(rotate_policy_, (bytes, str)): + raise Exception("Expected rotate_policy_ to be a str, received: {}".format(type(rotate_policy_))) - self.error = error_ - self.exposed = exposed_ - self.exposed_endpoints = exposed_endpoints_ + if update_time_ is not None and not isinstance(update_time_, (bytes, str)): + raise Exception("Expected update_time_ to be a str, received: {}".format(type(update_time_))) + + if uri_ is not None and not isinstance(uri_, (bytes, str)): + raise Exception("Expected uri_ to be a str, received: {}".format(type(uri_))) + + if value_ is not None and not isinstance(value_, (dict, SecretValueResult)): + raise Exception("Expected value_ to be a SecretValueResult, received: {}".format(type(value_))) + + if version_ is not None and not isinstance(version_, int): + raise Exception("Expected version_ to be a int, received: {}".format(type(version_))) + + self.access = access_ + self.create_time = create_time_ + self.description = description_ + self.label = label_ + self.latest_expire_time = latest_expire_time_ + self.latest_revision = latest_revision_ + self.next_rotate_time = next_rotate_time_ + self.owner_tag = owner_tag_ + self.revisions = revisions_ + self.rotate_policy = rotate_policy_ + self.update_time = update_time_ + self.uri = uri_ + self.value = value_ + self.version = version_ self.unknown_fields = unknown_fields -class ExposeInfoResults(Type): +class ListSecretResults(Type): _toSchema = {'results': 'results'} _toPy = {'results': 'results'} def __init__(self, results=None, **unknown_fields): ''' - results : typing.Sequence[~ExposeInfoResult] + results : typing.Sequence[~ListSecretResult] ''' - results_ = [ExposeInfoResult.from_json(o) for o in results or []] + results_ = [ListSecretResult.from_json(o) for o in results or []] # Validate arguments against known Juju API types. if results_ is not None and not isinstance(results_, (bytes, str, list)): @@ -9565,356 +8746,418 @@ def __init__(self, results=None, **unknown_fields): -class ExposedEndpoint(Type): - _toSchema = {'expose_to_cidrs': 'expose-to-cidrs', 'expose_to_spaces': 'expose-to-spaces'} - _toPy = {'expose-to-cidrs': 'expose_to_cidrs', 'expose-to-spaces': 'expose_to_spaces'} - def __init__(self, expose_to_cidrs=None, expose_to_spaces=None, **unknown_fields): +class ListSecretsArgs(Type): + _toSchema = {'filter_': 'filter', 'show_secrets': 'show-secrets'} + _toPy = {'filter': 'filter_', 'show-secrets': 'show_secrets'} + def __init__(self, filter_=None, show_secrets=None, **unknown_fields): ''' - expose_to_cidrs : typing.Sequence[str] - expose_to_spaces : typing.Sequence[str] + filter_ : SecretsFilter + show_secrets : bool ''' - expose_to_cidrs_ = expose_to_cidrs - expose_to_spaces_ = expose_to_spaces + filter__ = SecretsFilter.from_json(filter_) if filter_ else None + show_secrets_ = show_secrets # Validate arguments against known Juju API types. - if expose_to_cidrs_ is not None and not isinstance(expose_to_cidrs_, (bytes, str, list)): - raise Exception("Expected expose_to_cidrs_ to be a Sequence, received: {}".format(type(expose_to_cidrs_))) + if filter__ is not None and not isinstance(filter__, (dict, SecretsFilter)): + raise Exception("Expected filter__ to be a SecretsFilter, received: {}".format(type(filter__))) - if expose_to_spaces_ is not None and not isinstance(expose_to_spaces_, (bytes, str, list)): - raise Exception("Expected expose_to_spaces_ to be a Sequence, received: {}".format(type(expose_to_spaces_))) + if show_secrets_ is not None and not isinstance(show_secrets_, bool): + raise Exception("Expected show_secrets_ to be a bool, received: {}".format(type(show_secrets_))) - self.expose_to_cidrs = expose_to_cidrs_ - self.expose_to_spaces = expose_to_spaces_ + self.filter_ = filter__ + self.show_secrets = show_secrets_ self.unknown_fields = unknown_fields -class ExpressionTree(Type): - _toSchema = {'expression': 'Expression'} - _toPy = {'Expression': 'expression'} - def __init__(self, expression=None, **unknown_fields): +class ListSpacesResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} + def __init__(self, results=None, **unknown_fields): ''' - expression : Any + results : typing.Sequence[~Space] ''' - expression_ = expression + results_ = [Space.from_json(o) for o in results or []] # Validate arguments against known Juju API types. - self.expression = expression_ + if results_ is not None and not isinstance(results_, (bytes, str, list)): + raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) + + self.results = results_ self.unknown_fields = unknown_fields -class ExternalControllerInfo(Type): - _toSchema = {'addrs': 'addrs', 'ca_cert': 'ca-cert', 'controller_alias': 'controller-alias', 'controller_tag': 'controller-tag'} - _toPy = {'addrs': 'addrs', 'ca-cert': 'ca_cert', 'controller-alias': 'controller_alias', 'controller-tag': 'controller_tag'} - def __init__(self, addrs=None, ca_cert=None, controller_alias=None, controller_tag=None, **unknown_fields): +class ListSubnetsResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} + def __init__(self, results=None, **unknown_fields): ''' - addrs : typing.Sequence[str] - ca_cert : str - controller_alias : str - controller_tag : str + results : typing.Sequence[~Subnet] ''' - addrs_ = addrs - ca_cert_ = ca_cert - controller_alias_ = controller_alias - controller_tag_ = controller_tag + results_ = [Subnet.from_json(o) for o in results or []] # Validate arguments against known Juju API types. - if addrs_ is not None and not isinstance(addrs_, (bytes, str, list)): - raise Exception("Expected addrs_ to be a Sequence, received: {}".format(type(addrs_))) - - if ca_cert_ is not None and not isinstance(ca_cert_, (bytes, str)): - raise Exception("Expected ca_cert_ to be a str, received: {}".format(type(ca_cert_))) - - if controller_alias_ is not None and not isinstance(controller_alias_, (bytes, str)): - raise Exception("Expected controller_alias_ to be a str, received: {}".format(type(controller_alias_))) - - if controller_tag_ is not None and not isinstance(controller_tag_, (bytes, str)): - raise Exception("Expected controller_tag_ to be a str, received: {}".format(type(controller_tag_))) + if results_ is not None and not isinstance(results_, (bytes, str, list)): + raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) - self.addrs = addrs_ - self.ca_cert = ca_cert_ - self.controller_alias = controller_alias_ - self.controller_tag = controller_tag_ + self.results = results_ self.unknown_fields = unknown_fields -class ExternalControllerInfoResult(Type): - _toSchema = {'error': 'error', 'result': 'result'} - _toPy = {'error': 'error', 'result': 'result'} - def __init__(self, error=None, result=None, **unknown_fields): +class LoginRequest(Type): + _toSchema = {'auth_tag': 'auth-tag', 'bakery_version': 'bakery-version', 'cli_args': 'cli-args', 'client_version': 'client-version', 'credentials': 'credentials', 'macaroons': 'macaroons', 'nonce': 'nonce', 'token': 'token', 'user_data': 'user-data'} + _toPy = {'auth-tag': 'auth_tag', 'bakery-version': 'bakery_version', 'cli-args': 'cli_args', 'client-version': 'client_version', 'credentials': 'credentials', 'macaroons': 'macaroons', 'nonce': 'nonce', 'token': 'token', 'user-data': 'user_data'} + def __init__(self, auth_tag=None, bakery_version=None, cli_args=None, client_version=None, credentials=None, macaroons=None, nonce=None, token=None, user_data=None, **unknown_fields): ''' - error : Error - result : ExternalControllerInfo + auth_tag : str + bakery_version : int + cli_args : str + client_version : str + credentials : str + macaroons : typing.Sequence[~Macaroon] + nonce : str + token : str + user_data : str ''' - error_ = Error.from_json(error) if error else None - result_ = ExternalControllerInfo.from_json(result) if result else None + auth_tag_ = auth_tag + bakery_version_ = bakery_version + cli_args_ = cli_args + client_version_ = client_version + credentials_ = credentials + macaroons_ = [Macaroon.from_json(o) for o in macaroons or []] + nonce_ = nonce + token_ = token + user_data_ = user_data # Validate arguments against known Juju API types. - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - - if result_ is not None and not isinstance(result_, (dict, ExternalControllerInfo)): - raise Exception("Expected result_ to be a ExternalControllerInfo, received: {}".format(type(result_))) - - self.error = error_ - self.result = result_ - self.unknown_fields = unknown_fields - - + if auth_tag_ is not None and not isinstance(auth_tag_, (bytes, str)): + raise Exception("Expected auth_tag_ to be a str, received: {}".format(type(auth_tag_))) -class ExternalControllerInfoResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None, **unknown_fields): - ''' - results : typing.Sequence[~ExternalControllerInfoResult] - ''' - results_ = [ExternalControllerInfoResult.from_json(o) for o in results or []] + if bakery_version_ is not None and not isinstance(bakery_version_, int): + raise Exception("Expected bakery_version_ to be a int, received: {}".format(type(bakery_version_))) - # Validate arguments against known Juju API types. - if results_ is not None and not isinstance(results_, (bytes, str, list)): - raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) + if cli_args_ is not None and not isinstance(cli_args_, (bytes, str)): + raise Exception("Expected cli_args_ to be a str, received: {}".format(type(cli_args_))) - self.results = results_ - self.unknown_fields = unknown_fields + if client_version_ is not None and not isinstance(client_version_, (bytes, str)): + raise Exception("Expected client_version_ to be a str, received: {}".format(type(client_version_))) + if credentials_ is not None and not isinstance(credentials_, (bytes, str)): + raise Exception("Expected credentials_ to be a str, received: {}".format(type(credentials_))) + if macaroons_ is not None and not isinstance(macaroons_, (bytes, str, list)): + raise Exception("Expected macaroons_ to be a Sequence, received: {}".format(type(macaroons_))) -class FanConfigEntry(Type): - _toSchema = {'overlay': 'overlay', 'underlay': 'underlay'} - _toPy = {'overlay': 'overlay', 'underlay': 'underlay'} - def __init__(self, overlay=None, underlay=None, **unknown_fields): - ''' - overlay : str - underlay : str - ''' - overlay_ = overlay - underlay_ = underlay + if nonce_ is not None and not isinstance(nonce_, (bytes, str)): + raise Exception("Expected nonce_ to be a str, received: {}".format(type(nonce_))) - # Validate arguments against known Juju API types. - if overlay_ is not None and not isinstance(overlay_, (bytes, str)): - raise Exception("Expected overlay_ to be a str, received: {}".format(type(overlay_))) + if token_ is not None and not isinstance(token_, (bytes, str)): + raise Exception("Expected token_ to be a str, received: {}".format(type(token_))) - if underlay_ is not None and not isinstance(underlay_, (bytes, str)): - raise Exception("Expected underlay_ to be a str, received: {}".format(type(underlay_))) + if user_data_ is not None and not isinstance(user_data_, (bytes, str)): + raise Exception("Expected user_data_ to be a str, received: {}".format(type(user_data_))) - self.overlay = overlay_ - self.underlay = underlay_ + self.auth_tag = auth_tag_ + self.bakery_version = bakery_version_ + self.cli_args = cli_args_ + self.client_version = client_version_ + self.credentials = credentials_ + self.macaroons = macaroons_ + self.nonce = nonce_ + self.token = token_ + self.user_data = user_data_ self.unknown_fields = unknown_fields -class FanConfigResult(Type): - _toSchema = {'fans': 'fans'} - _toPy = {'fans': 'fans'} - def __init__(self, fans=None, **unknown_fields): +class LoginResult(Type): + _toSchema = {'bakery_discharge_required': 'bakery-discharge-required', 'controller_tag': 'controller-tag', 'discharge_required': 'discharge-required', 'discharge_required_error': 'discharge-required-error', 'facades': 'facades', 'model_tag': 'model-tag', 'public_dns_name': 'public-dns-name', 'server_version': 'server-version', 'servers': 'servers', 'user_info': 'user-info'} + _toPy = {'bakery-discharge-required': 'bakery_discharge_required', 'controller-tag': 'controller_tag', 'discharge-required': 'discharge_required', 'discharge-required-error': 'discharge_required_error', 'facades': 'facades', 'model-tag': 'model_tag', 'public-dns-name': 'public_dns_name', 'server-version': 'server_version', 'servers': 'servers', 'user-info': 'user_info'} + def __init__(self, bakery_discharge_required=None, controller_tag=None, discharge_required=None, discharge_required_error=None, facades=None, model_tag=None, public_dns_name=None, server_version=None, servers=None, user_info=None, **unknown_fields): ''' - fans : typing.Sequence[~FanConfigEntry] + bakery_discharge_required : Macaroon + controller_tag : str + discharge_required : Macaroon + discharge_required_error : str + facades : typing.Sequence[~FacadeVersions] + model_tag : str + public_dns_name : str + server_version : str + servers : typing.Sequence[~HostPort] + user_info : AuthUserInfo ''' - fans_ = [FanConfigEntry.from_json(o) for o in fans or []] + bakery_discharge_required_ = Macaroon.from_json(bakery_discharge_required) if bakery_discharge_required else None + controller_tag_ = controller_tag + discharge_required_ = Macaroon.from_json(discharge_required) if discharge_required else None + discharge_required_error_ = discharge_required_error + facades_ = [FacadeVersions.from_json(o) for o in facades or []] + model_tag_ = model_tag + public_dns_name_ = public_dns_name + server_version_ = server_version + servers_ = [HostPort.from_json(o) for o in servers or []] + user_info_ = AuthUserInfo.from_json(user_info) if user_info else None # Validate arguments against known Juju API types. - if fans_ is not None and not isinstance(fans_, (bytes, str, list)): - raise Exception("Expected fans_ to be a Sequence, received: {}".format(type(fans_))) - - self.fans = fans_ - self.unknown_fields = unknown_fields + if bakery_discharge_required_ is not None and not isinstance(bakery_discharge_required_, (dict, Macaroon)): + raise Exception("Expected bakery_discharge_required_ to be a Macaroon, received: {}".format(type(bakery_discharge_required_))) + if controller_tag_ is not None and not isinstance(controller_tag_, (bytes, str)): + raise Exception("Expected controller_tag_ to be a str, received: {}".format(type(controller_tag_))) + if discharge_required_ is not None and not isinstance(discharge_required_, (dict, Macaroon)): + raise Exception("Expected discharge_required_ to be a Macaroon, received: {}".format(type(discharge_required_))) -class Filesystem(Type): - _toSchema = {'filesystem_tag': 'filesystem-tag', 'info': 'info', 'volume_tag': 'volume-tag'} - _toPy = {'filesystem-tag': 'filesystem_tag', 'info': 'info', 'volume-tag': 'volume_tag'} - def __init__(self, filesystem_tag=None, info=None, volume_tag=None, **unknown_fields): - ''' - filesystem_tag : str - info : FilesystemInfo - volume_tag : str - ''' - filesystem_tag_ = filesystem_tag - info_ = FilesystemInfo.from_json(info) if info else None - volume_tag_ = volume_tag + if discharge_required_error_ is not None and not isinstance(discharge_required_error_, (bytes, str)): + raise Exception("Expected discharge_required_error_ to be a str, received: {}".format(type(discharge_required_error_))) - # Validate arguments against known Juju API types. - if filesystem_tag_ is not None and not isinstance(filesystem_tag_, (bytes, str)): - raise Exception("Expected filesystem_tag_ to be a str, received: {}".format(type(filesystem_tag_))) + if facades_ is not None and not isinstance(facades_, (bytes, str, list)): + raise Exception("Expected facades_ to be a Sequence, received: {}".format(type(facades_))) - if info_ is not None and not isinstance(info_, (dict, FilesystemInfo)): - raise Exception("Expected info_ to be a FilesystemInfo, received: {}".format(type(info_))) + if model_tag_ is not None and not isinstance(model_tag_, (bytes, str)): + raise Exception("Expected model_tag_ to be a str, received: {}".format(type(model_tag_))) - if volume_tag_ is not None and not isinstance(volume_tag_, (bytes, str)): - raise Exception("Expected volume_tag_ to be a str, received: {}".format(type(volume_tag_))) + if public_dns_name_ is not None and not isinstance(public_dns_name_, (bytes, str)): + raise Exception("Expected public_dns_name_ to be a str, received: {}".format(type(public_dns_name_))) - self.filesystem_tag = filesystem_tag_ - self.info = info_ - self.volume_tag = volume_tag_ - self.unknown_fields = unknown_fields + if server_version_ is not None and not isinstance(server_version_, (bytes, str)): + raise Exception("Expected server_version_ to be a str, received: {}".format(type(server_version_))) + if servers_ is not None and not isinstance(servers_, (bytes, str, list)): + raise Exception("Expected servers_ to be a Sequence, received: {}".format(type(servers_))) + if user_info_ is not None and not isinstance(user_info_, (dict, AuthUserInfo)): + raise Exception("Expected user_info_ to be a AuthUserInfo, received: {}".format(type(user_info_))) -class FilesystemAttachment(Type): - _toSchema = {'filesystem_tag': 'filesystem-tag', 'info': 'info', 'machine_tag': 'machine-tag'} - _toPy = {'filesystem-tag': 'filesystem_tag', 'info': 'info', 'machine-tag': 'machine_tag'} - def __init__(self, filesystem_tag=None, info=None, machine_tag=None, **unknown_fields): - ''' - filesystem_tag : str - info : FilesystemAttachmentInfo - machine_tag : str - ''' - filesystem_tag_ = filesystem_tag - info_ = FilesystemAttachmentInfo.from_json(info) if info else None - machine_tag_ = machine_tag + self.bakery_discharge_required = bakery_discharge_required_ + self.controller_tag = controller_tag_ + self.discharge_required = discharge_required_ + self.discharge_required_error = discharge_required_error_ + self.facades = facades_ + self.model_tag = model_tag_ + self.public_dns_name = public_dns_name_ + self.server_version = server_version_ + self.servers = servers_ + self.user_info = user_info_ + self.unknown_fields = unknown_fields - # Validate arguments against known Juju API types. - if filesystem_tag_ is not None and not isinstance(filesystem_tag_, (bytes, str)): - raise Exception("Expected filesystem_tag_ to be a str, received: {}".format(type(filesystem_tag_))) - if info_ is not None and not isinstance(info_, (dict, FilesystemAttachmentInfo)): - raise Exception("Expected info_ to be a FilesystemAttachmentInfo, received: {}".format(type(info_))) - if machine_tag_ is not None and not isinstance(machine_tag_, (bytes, str)): - raise Exception("Expected machine_tag_ to be a str, received: {}".format(type(machine_tag_))) +class Macaroon(Type): + _toSchema = {} + _toPy = {} + def __init__(self, **unknown_fields): + ''' - self.filesystem_tag = filesystem_tag_ - self.info = info_ - self.machine_tag = machine_tag_ + ''' self.unknown_fields = unknown_fields -class FilesystemAttachmentDetails(Type): - _toSchema = {'filesystemattachmentinfo': 'FilesystemAttachmentInfo', 'life': 'life', 'mount_point': 'mount-point', 'read_only': 'read-only'} - _toPy = {'FilesystemAttachmentInfo': 'filesystemattachmentinfo', 'life': 'life', 'mount-point': 'mount_point', 'read-only': 'read_only'} - def __init__(self, filesystemattachmentinfo=None, life=None, mount_point=None, read_only=None, **unknown_fields): +class MachineHardware(Type): + _toSchema = {'arch': 'arch', 'availability_zone': 'availability-zone', 'cores': 'cores', 'cpu_power': 'cpu-power', 'mem': 'mem', 'root_disk': 'root-disk', 'tags': 'tags', 'virt_type': 'virt-type'} + _toPy = {'arch': 'arch', 'availability-zone': 'availability_zone', 'cores': 'cores', 'cpu-power': 'cpu_power', 'mem': 'mem', 'root-disk': 'root_disk', 'tags': 'tags', 'virt-type': 'virt_type'} + def __init__(self, arch=None, availability_zone=None, cores=None, cpu_power=None, mem=None, root_disk=None, tags=None, virt_type=None, **unknown_fields): ''' - filesystemattachmentinfo : FilesystemAttachmentInfo - life : str - mount_point : str - read_only : bool + arch : str + availability_zone : str + cores : int + cpu_power : int + mem : int + root_disk : int + tags : typing.Sequence[str] + virt_type : str ''' - filesystemattachmentinfo_ = FilesystemAttachmentInfo.from_json(filesystemattachmentinfo) if filesystemattachmentinfo else None - life_ = life - mount_point_ = mount_point - read_only_ = read_only + arch_ = arch + availability_zone_ = availability_zone + cores_ = cores + cpu_power_ = cpu_power + mem_ = mem + root_disk_ = root_disk + tags_ = tags + virt_type_ = virt_type # Validate arguments against known Juju API types. - if filesystemattachmentinfo_ is not None and not isinstance(filesystemattachmentinfo_, (dict, FilesystemAttachmentInfo)): - raise Exception("Expected filesystemattachmentinfo_ to be a FilesystemAttachmentInfo, received: {}".format(type(filesystemattachmentinfo_))) - - if life_ is not None and not isinstance(life_, (bytes, str)): - raise Exception("Expected life_ to be a str, received: {}".format(type(life_))) - - if mount_point_ is not None and not isinstance(mount_point_, (bytes, str)): - raise Exception("Expected mount_point_ to be a str, received: {}".format(type(mount_point_))) + if arch_ is not None and not isinstance(arch_, (bytes, str)): + raise Exception("Expected arch_ to be a str, received: {}".format(type(arch_))) - if read_only_ is not None and not isinstance(read_only_, bool): - raise Exception("Expected read_only_ to be a bool, received: {}".format(type(read_only_))) + if availability_zone_ is not None and not isinstance(availability_zone_, (bytes, str)): + raise Exception("Expected availability_zone_ to be a str, received: {}".format(type(availability_zone_))) - self.filesystemattachmentinfo = filesystemattachmentinfo_ - self.life = life_ - self.mount_point = mount_point_ - self.read_only = read_only_ - self.unknown_fields = unknown_fields + if cores_ is not None and not isinstance(cores_, int): + raise Exception("Expected cores_ to be a int, received: {}".format(type(cores_))) + if cpu_power_ is not None and not isinstance(cpu_power_, int): + raise Exception("Expected cpu_power_ to be a int, received: {}".format(type(cpu_power_))) + if mem_ is not None and not isinstance(mem_, int): + raise Exception("Expected mem_ to be a int, received: {}".format(type(mem_))) -class FilesystemAttachmentInfo(Type): - _toSchema = {'mount_point': 'mount-point', 'read_only': 'read-only'} - _toPy = {'mount-point': 'mount_point', 'read-only': 'read_only'} - def __init__(self, mount_point=None, read_only=None, **unknown_fields): - ''' - mount_point : str - read_only : bool - ''' - mount_point_ = mount_point - read_only_ = read_only + if root_disk_ is not None and not isinstance(root_disk_, int): + raise Exception("Expected root_disk_ to be a int, received: {}".format(type(root_disk_))) - # Validate arguments against known Juju API types. - if mount_point_ is not None and not isinstance(mount_point_, (bytes, str)): - raise Exception("Expected mount_point_ to be a str, received: {}".format(type(mount_point_))) + if tags_ is not None and not isinstance(tags_, (bytes, str, list)): + raise Exception("Expected tags_ to be a Sequence, received: {}".format(type(tags_))) - if read_only_ is not None and not isinstance(read_only_, bool): - raise Exception("Expected read_only_ to be a bool, received: {}".format(type(read_only_))) + if virt_type_ is not None and not isinstance(virt_type_, (bytes, str)): + raise Exception("Expected virt_type_ to be a str, received: {}".format(type(virt_type_))) - self.mount_point = mount_point_ - self.read_only = read_only_ + self.arch = arch_ + self.availability_zone = availability_zone_ + self.cores = cores_ + self.cpu_power = cpu_power_ + self.mem = mem_ + self.root_disk = root_disk_ + self.tags = tags_ + self.virt_type = virt_type_ self.unknown_fields = unknown_fields -class FilesystemAttachmentParams(Type): - _toSchema = {'filesystem_id': 'filesystem-id', 'filesystem_tag': 'filesystem-tag', 'instance_id': 'instance-id', 'machine_tag': 'machine-tag', 'mount_point': 'mount-point', 'provider': 'provider', 'read_only': 'read-only'} - _toPy = {'filesystem-id': 'filesystem_id', 'filesystem-tag': 'filesystem_tag', 'instance-id': 'instance_id', 'machine-tag': 'machine_tag', 'mount-point': 'mount_point', 'provider': 'provider', 'read-only': 'read_only'} - def __init__(self, filesystem_id=None, filesystem_tag=None, instance_id=None, machine_tag=None, mount_point=None, provider=None, read_only=None, **unknown_fields): - ''' - filesystem_id : str - filesystem_tag : str - instance_id : str - machine_tag : str - mount_point : str - provider : str - read_only : bool +class MachineStatus(Type): + _toSchema = {'agent_status': 'agent-status', 'base': 'base', 'constraints': 'constraints', 'containers': 'containers', 'display_name': 'display-name', 'dns_name': 'dns-name', 'hardware': 'hardware', 'has_vote': 'has-vote', 'hostname': 'hostname', 'id_': 'id', 'instance_id': 'instance-id', 'instance_status': 'instance-status', 'ip_addresses': 'ip-addresses', 'jobs': 'jobs', 'lxd_profiles': 'lxd-profiles', 'modification_status': 'modification-status', 'network_interfaces': 'network-interfaces', 'primary_controller_machine': 'primary-controller-machine', 'wants_vote': 'wants-vote'} + _toPy = {'agent-status': 'agent_status', 'base': 'base', 'constraints': 'constraints', 'containers': 'containers', 'display-name': 'display_name', 'dns-name': 'dns_name', 'hardware': 'hardware', 'has-vote': 'has_vote', 'hostname': 'hostname', 'id': 'id_', 'instance-id': 'instance_id', 'instance-status': 'instance_status', 'ip-addresses': 'ip_addresses', 'jobs': 'jobs', 'lxd-profiles': 'lxd_profiles', 'modification-status': 'modification_status', 'network-interfaces': 'network_interfaces', 'primary-controller-machine': 'primary_controller_machine', 'wants-vote': 'wants_vote'} + def __init__(self, agent_status=None, base=None, constraints=None, containers=None, display_name=None, dns_name=None, hardware=None, has_vote=None, hostname=None, id_=None, instance_id=None, instance_status=None, ip_addresses=None, jobs=None, lxd_profiles=None, modification_status=None, network_interfaces=None, primary_controller_machine=None, wants_vote=None, **unknown_fields): ''' - filesystem_id_ = filesystem_id - filesystem_tag_ = filesystem_tag + agent_status : DetailedStatus + base : Base + constraints : str + containers : typing.Mapping[str, ~MachineStatus] + display_name : str + dns_name : str + hardware : str + has_vote : bool + hostname : str + id_ : str + instance_id : str + instance_status : DetailedStatus + ip_addresses : typing.Sequence[str] + jobs : typing.Sequence[str] + lxd_profiles : typing.Mapping[str, ~LXDProfile] + modification_status : DetailedStatus + network_interfaces : typing.Mapping[str, ~NetworkInterface] + primary_controller_machine : bool + wants_vote : bool + ''' + agent_status_ = DetailedStatus.from_json(agent_status) if agent_status else None + base_ = Base.from_json(base) if base else None + constraints_ = constraints + containers_ = {k: MachineStatus.from_json(v) for k, v in (containers or dict()).items()} + display_name_ = display_name + dns_name_ = dns_name + hardware_ = hardware + has_vote_ = has_vote + hostname_ = hostname + id__ = id_ instance_id_ = instance_id - machine_tag_ = machine_tag - mount_point_ = mount_point - provider_ = provider - read_only_ = read_only + instance_status_ = DetailedStatus.from_json(instance_status) if instance_status else None + ip_addresses_ = ip_addresses + jobs_ = jobs + lxd_profiles_ = {k: LXDProfile.from_json(v) for k, v in (lxd_profiles or dict()).items()} + modification_status_ = DetailedStatus.from_json(modification_status) if modification_status else None + network_interfaces_ = {k: NetworkInterface.from_json(v) for k, v in (network_interfaces or dict()).items()} + primary_controller_machine_ = primary_controller_machine + wants_vote_ = wants_vote # Validate arguments against known Juju API types. - if filesystem_id_ is not None and not isinstance(filesystem_id_, (bytes, str)): - raise Exception("Expected filesystem_id_ to be a str, received: {}".format(type(filesystem_id_))) + if agent_status_ is not None and not isinstance(agent_status_, (dict, DetailedStatus)): + raise Exception("Expected agent_status_ to be a DetailedStatus, received: {}".format(type(agent_status_))) - if filesystem_tag_ is not None and not isinstance(filesystem_tag_, (bytes, str)): - raise Exception("Expected filesystem_tag_ to be a str, received: {}".format(type(filesystem_tag_))) + if base_ is not None and not isinstance(base_, (dict, Base)): + raise Exception("Expected base_ to be a Base, received: {}".format(type(base_))) + + if constraints_ is not None and not isinstance(constraints_, (bytes, str)): + raise Exception("Expected constraints_ to be a str, received: {}".format(type(constraints_))) + + if containers_ is not None and not isinstance(containers_, dict): + raise Exception("Expected containers_ to be a Mapping, received: {}".format(type(containers_))) + + if display_name_ is not None and not isinstance(display_name_, (bytes, str)): + raise Exception("Expected display_name_ to be a str, received: {}".format(type(display_name_))) + + if dns_name_ is not None and not isinstance(dns_name_, (bytes, str)): + raise Exception("Expected dns_name_ to be a str, received: {}".format(type(dns_name_))) + + if hardware_ is not None and not isinstance(hardware_, (bytes, str)): + raise Exception("Expected hardware_ to be a str, received: {}".format(type(hardware_))) + + if has_vote_ is not None and not isinstance(has_vote_, bool): + raise Exception("Expected has_vote_ to be a bool, received: {}".format(type(has_vote_))) + + if hostname_ is not None and not isinstance(hostname_, (bytes, str)): + raise Exception("Expected hostname_ to be a str, received: {}".format(type(hostname_))) + + if id__ is not None and not isinstance(id__, (bytes, str)): + raise Exception("Expected id__ to be a str, received: {}".format(type(id__))) if instance_id_ is not None and not isinstance(instance_id_, (bytes, str)): raise Exception("Expected instance_id_ to be a str, received: {}".format(type(instance_id_))) - if machine_tag_ is not None and not isinstance(machine_tag_, (bytes, str)): - raise Exception("Expected machine_tag_ to be a str, received: {}".format(type(machine_tag_))) + if instance_status_ is not None and not isinstance(instance_status_, (dict, DetailedStatus)): + raise Exception("Expected instance_status_ to be a DetailedStatus, received: {}".format(type(instance_status_))) - if mount_point_ is not None and not isinstance(mount_point_, (bytes, str)): - raise Exception("Expected mount_point_ to be a str, received: {}".format(type(mount_point_))) + if ip_addresses_ is not None and not isinstance(ip_addresses_, (bytes, str, list)): + raise Exception("Expected ip_addresses_ to be a Sequence, received: {}".format(type(ip_addresses_))) - if provider_ is not None and not isinstance(provider_, (bytes, str)): - raise Exception("Expected provider_ to be a str, received: {}".format(type(provider_))) + if jobs_ is not None and not isinstance(jobs_, (bytes, str, list)): + raise Exception("Expected jobs_ to be a Sequence, received: {}".format(type(jobs_))) - if read_only_ is not None and not isinstance(read_only_, bool): - raise Exception("Expected read_only_ to be a bool, received: {}".format(type(read_only_))) + if lxd_profiles_ is not None and not isinstance(lxd_profiles_, dict): + raise Exception("Expected lxd_profiles_ to be a Mapping, received: {}".format(type(lxd_profiles_))) - self.filesystem_id = filesystem_id_ - self.filesystem_tag = filesystem_tag_ + if modification_status_ is not None and not isinstance(modification_status_, (dict, DetailedStatus)): + raise Exception("Expected modification_status_ to be a DetailedStatus, received: {}".format(type(modification_status_))) + + if network_interfaces_ is not None and not isinstance(network_interfaces_, dict): + raise Exception("Expected network_interfaces_ to be a Mapping, received: {}".format(type(network_interfaces_))) + + if primary_controller_machine_ is not None and not isinstance(primary_controller_machine_, bool): + raise Exception("Expected primary_controller_machine_ to be a bool, received: {}".format(type(primary_controller_machine_))) + + if wants_vote_ is not None and not isinstance(wants_vote_, bool): + raise Exception("Expected wants_vote_ to be a bool, received: {}".format(type(wants_vote_))) + + self.agent_status = agent_status_ + self.base = base_ + self.constraints = constraints_ + self.containers = containers_ + self.display_name = display_name_ + self.dns_name = dns_name_ + self.hardware = hardware_ + self.has_vote = has_vote_ + self.hostname = hostname_ + self.id_ = id__ self.instance_id = instance_id_ - self.machine_tag = machine_tag_ - self.mount_point = mount_point_ - self.provider = provider_ - self.read_only = read_only_ + self.instance_status = instance_status_ + self.ip_addresses = ip_addresses_ + self.jobs = jobs_ + self.lxd_profiles = lxd_profiles_ + self.modification_status = modification_status_ + self.network_interfaces = network_interfaces_ + self.primary_controller_machine = primary_controller_machine_ + self.wants_vote = wants_vote_ self.unknown_fields = unknown_fields -class FilesystemAttachmentParamsResult(Type): +class MapResult(Type): _toSchema = {'error': 'error', 'result': 'result'} _toPy = {'error': 'error', 'result': 'result'} def __init__(self, error=None, result=None, **unknown_fields): ''' error : Error - result : FilesystemAttachmentParams + result : typing.Mapping[str, typing.Any] ''' error_ = Error.from_json(error) if error else None - result_ = FilesystemAttachmentParams.from_json(result) if result else None + result_ = result # Validate arguments against known Juju API types. if error_ is not None and not isinstance(error_, (dict, Error)): raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - if result_ is not None and not isinstance(result_, (dict, FilesystemAttachmentParams)): - raise Exception("Expected result_ to be a FilesystemAttachmentParams, received: {}".format(type(result_))) + if result_ is not None and not isinstance(result_, dict): + raise Exception("Expected result_ to be a Mapping, received: {}".format(type(result_))) self.error = error_ self.result = result_ @@ -9922,14 +9165,14 @@ def __init__(self, error=None, result=None, **unknown_fields): -class FilesystemAttachmentParamsResults(Type): +class MapResults(Type): _toSchema = {'results': 'results'} _toPy = {'results': 'results'} def __init__(self, results=None, **unknown_fields): ''' - results : typing.Sequence[~FilesystemAttachmentParamsResult] + results : typing.Sequence[~MapResult] ''' - results_ = [FilesystemAttachmentParamsResult.from_json(o) for o in results or []] + results_ = [MapResult.from_json(o) for o in results or []] # Validate arguments against known Juju API types. if results_ is not None and not isinstance(results_, (bytes, str, list)): @@ -9940,158 +9183,164 @@ def __init__(self, results=None, **unknown_fields): -class FilesystemAttachmentResult(Type): - _toSchema = {'error': 'error', 'result': 'result'} - _toPy = {'error': 'error', 'result': 'result'} - def __init__(self, error=None, result=None, **unknown_fields): +class MetadataImageIds(Type): + _toSchema = {'image_ids': 'image-ids'} + _toPy = {'image-ids': 'image_ids'} + def __init__(self, image_ids=None, **unknown_fields): ''' - error : Error - result : FilesystemAttachment + image_ids : typing.Sequence[str] ''' - error_ = Error.from_json(error) if error else None - result_ = FilesystemAttachment.from_json(result) if result else None + image_ids_ = image_ids # Validate arguments against known Juju API types. - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - - if result_ is not None and not isinstance(result_, (dict, FilesystemAttachment)): - raise Exception("Expected result_ to be a FilesystemAttachment, received: {}".format(type(result_))) + if image_ids_ is not None and not isinstance(image_ids_, (bytes, str, list)): + raise Exception("Expected image_ids_ to be a Sequence, received: {}".format(type(image_ids_))) - self.error = error_ - self.result = result_ + self.image_ids = image_ids_ self.unknown_fields = unknown_fields -class FilesystemAttachmentResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None, **unknown_fields): +class MetadataSaveParams(Type): + _toSchema = {'metadata': 'metadata'} + _toPy = {'metadata': 'metadata'} + def __init__(self, metadata=None, **unknown_fields): ''' - results : typing.Sequence[~FilesystemAttachmentResult] + metadata : typing.Sequence[~CloudImageMetadataList] ''' - results_ = [FilesystemAttachmentResult.from_json(o) for o in results or []] + metadata_ = [CloudImageMetadataList.from_json(o) for o in metadata or []] # Validate arguments against known Juju API types. - if results_ is not None and not isinstance(results_, (bytes, str, list)): - raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) + if metadata_ is not None and not isinstance(metadata_, (bytes, str, list)): + raise Exception("Expected metadata_ to be a Sequence, received: {}".format(type(metadata_))) - self.results = results_ + self.metadata = metadata_ self.unknown_fields = unknown_fields -class FilesystemAttachments(Type): - _toSchema = {'filesystem_attachments': 'filesystem-attachments'} - _toPy = {'filesystem-attachments': 'filesystem_attachments'} - def __init__(self, filesystem_attachments=None, **unknown_fields): +class MeterStatus(Type): + _toSchema = {'color': 'color', 'message': 'message'} + _toPy = {'color': 'color', 'message': 'message'} + def __init__(self, color=None, message=None, **unknown_fields): ''' - filesystem_attachments : typing.Sequence[~FilesystemAttachment] + color : str + message : str ''' - filesystem_attachments_ = [FilesystemAttachment.from_json(o) for o in filesystem_attachments or []] + color_ = color + message_ = message # Validate arguments against known Juju API types. - if filesystem_attachments_ is not None and not isinstance(filesystem_attachments_, (bytes, str, list)): - raise Exception("Expected filesystem_attachments_ to be a Sequence, received: {}".format(type(filesystem_attachments_))) + if color_ is not None and not isinstance(color_, (bytes, str)): + raise Exception("Expected color_ to be a str, received: {}".format(type(color_))) + + if message_ is not None and not isinstance(message_, (bytes, str)): + raise Exception("Expected message_ to be a str, received: {}".format(type(message_))) - self.filesystem_attachments = filesystem_attachments_ + self.color = color_ + self.message = message_ self.unknown_fields = unknown_fields -class FilesystemDetails(Type): - _toSchema = {'filesystem_tag': 'filesystem-tag', 'info': 'info', 'life': 'life', 'machine_attachments': 'machine-attachments', 'status': 'status', 'storage': 'storage', 'unit_attachments': 'unit-attachments', 'volume_tag': 'volume-tag'} - _toPy = {'filesystem-tag': 'filesystem_tag', 'info': 'info', 'life': 'life', 'machine-attachments': 'machine_attachments', 'status': 'status', 'storage': 'storage', 'unit-attachments': 'unit_attachments', 'volume-tag': 'volume_tag'} - def __init__(self, filesystem_tag=None, info=None, life=None, machine_attachments=None, status=None, storage=None, unit_attachments=None, volume_tag=None, **unknown_fields): +class MeterStatusParam(Type): + _toSchema = {'code': 'code', 'info': 'info', 'tag': 'tag'} + _toPy = {'code': 'code', 'info': 'info', 'tag': 'tag'} + def __init__(self, code=None, info=None, tag=None, **unknown_fields): ''' - filesystem_tag : str - info : FilesystemInfo - life : str - machine_attachments : typing.Mapping[str, ~FilesystemAttachmentDetails] - status : EntityStatus - storage : StorageDetails - unit_attachments : typing.Mapping[str, ~FilesystemAttachmentDetails] - volume_tag : str + code : str + info : str + tag : str ''' - filesystem_tag_ = filesystem_tag - info_ = FilesystemInfo.from_json(info) if info else None - life_ = life - machine_attachments_ = {k: FilesystemAttachmentDetails.from_json(v) for k, v in (machine_attachments or dict()).items()} - status_ = EntityStatus.from_json(status) if status else None - storage_ = StorageDetails.from_json(storage) if storage else None - unit_attachments_ = {k: FilesystemAttachmentDetails.from_json(v) for k, v in (unit_attachments or dict()).items()} - volume_tag_ = volume_tag + code_ = code + info_ = info + tag_ = tag # Validate arguments against known Juju API types. - if filesystem_tag_ is not None and not isinstance(filesystem_tag_, (bytes, str)): - raise Exception("Expected filesystem_tag_ to be a str, received: {}".format(type(filesystem_tag_))) - - if info_ is not None and not isinstance(info_, (dict, FilesystemInfo)): - raise Exception("Expected info_ to be a FilesystemInfo, received: {}".format(type(info_))) - - if life_ is not None and not isinstance(life_, (bytes, str)): - raise Exception("Expected life_ to be a str, received: {}".format(type(life_))) - - if machine_attachments_ is not None and not isinstance(machine_attachments_, dict): - raise Exception("Expected machine_attachments_ to be a Mapping, received: {}".format(type(machine_attachments_))) - - if status_ is not None and not isinstance(status_, (dict, EntityStatus)): - raise Exception("Expected status_ to be a EntityStatus, received: {}".format(type(status_))) - - if storage_ is not None and not isinstance(storage_, (dict, StorageDetails)): - raise Exception("Expected storage_ to be a StorageDetails, received: {}".format(type(storage_))) + if code_ is not None and not isinstance(code_, (bytes, str)): + raise Exception("Expected code_ to be a str, received: {}".format(type(code_))) - if unit_attachments_ is not None and not isinstance(unit_attachments_, dict): - raise Exception("Expected unit_attachments_ to be a Mapping, received: {}".format(type(unit_attachments_))) + if info_ is not None and not isinstance(info_, (bytes, str)): + raise Exception("Expected info_ to be a str, received: {}".format(type(info_))) - if volume_tag_ is not None and not isinstance(volume_tag_, (bytes, str)): - raise Exception("Expected volume_tag_ to be a str, received: {}".format(type(volume_tag_))) + if tag_ is not None and not isinstance(tag_, (bytes, str)): + raise Exception("Expected tag_ to be a str, received: {}".format(type(tag_))) - self.filesystem_tag = filesystem_tag_ + self.code = code_ self.info = info_ - self.life = life_ - self.machine_attachments = machine_attachments_ - self.status = status_ - self.storage = storage_ - self.unit_attachments = unit_attachments_ - self.volume_tag = volume_tag_ + self.tag = tag_ self.unknown_fields = unknown_fields -class FilesystemDetailsListResult(Type): - _toSchema = {'error': 'error', 'result': 'result'} - _toPy = {'error': 'error', 'result': 'result'} - def __init__(self, error=None, result=None, **unknown_fields): - ''' - error : Error - result : typing.Sequence[~FilesystemDetails] +class MeterStatusParams(Type): + _toSchema = {'statues': 'statues'} + _toPy = {'statues': 'statues'} + def __init__(self, statues=None, **unknown_fields): ''' - error_ = Error.from_json(error) if error else None - result_ = [FilesystemDetails.from_json(o) for o in result or []] + statues : typing.Sequence[~MeterStatusParam] + ''' + statues_ = [MeterStatusParam.from_json(o) for o in statues or []] # Validate arguments against known Juju API types. - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) + if statues_ is not None and not isinstance(statues_, (bytes, str, list)): + raise Exception("Expected statues_ to be a Sequence, received: {}".format(type(statues_))) - if result_ is not None and not isinstance(result_, (bytes, str, list)): - raise Exception("Expected result_ to be a Sequence, received: {}".format(type(result_))) + self.statues = statues_ + self.unknown_fields = unknown_fields - self.error = error_ - self.result = result_ + + +class MetricResult(Type): + _toSchema = {'key': 'key', 'labels': 'labels', 'time': 'time', 'unit': 'unit', 'value': 'value'} + _toPy = {'key': 'key', 'labels': 'labels', 'time': 'time', 'unit': 'unit', 'value': 'value'} + def __init__(self, key=None, labels=None, time=None, unit=None, value=None, **unknown_fields): + ''' + key : str + labels : typing.Mapping[str, str] + time : str + unit : str + value : str + ''' + key_ = key + labels_ = labels + time_ = time + unit_ = unit + value_ = value + + # Validate arguments against known Juju API types. + if key_ is not None and not isinstance(key_, (bytes, str)): + raise Exception("Expected key_ to be a str, received: {}".format(type(key_))) + + if labels_ is not None and not isinstance(labels_, dict): + raise Exception("Expected labels_ to be a Mapping, received: {}".format(type(labels_))) + + if time_ is not None and not isinstance(time_, (bytes, str)): + raise Exception("Expected time_ to be a str, received: {}".format(type(time_))) + + if unit_ is not None and not isinstance(unit_, (bytes, str)): + raise Exception("Expected unit_ to be a str, received: {}".format(type(unit_))) + + if value_ is not None and not isinstance(value_, (bytes, str)): + raise Exception("Expected value_ to be a str, received: {}".format(type(value_))) + + self.key = key_ + self.labels = labels_ + self.time = time_ + self.unit = unit_ + self.value = value_ self.unknown_fields = unknown_fields -class FilesystemDetailsListResults(Type): +class MetricResults(Type): _toSchema = {'results': 'results'} _toPy = {'results': 'results'} def __init__(self, results=None, **unknown_fields): ''' - results : typing.Sequence[~FilesystemDetailsListResult] + results : typing.Sequence[~EntityMetrics] ''' - results_ = [FilesystemDetailsListResult.from_json(o) for o in results or []] + results_ = [EntityMetrics.from_json(o) for o in results or []] # Validate arguments against known Juju API types. if results_ is not None and not isinstance(results_, (bytes, str, list)): @@ -10102,11433 +9351,620 @@ def __init__(self, results=None, **unknown_fields): -class FilesystemFilter(Type): - _toSchema = {'machines': 'machines'} - _toPy = {'machines': 'machines'} - def __init__(self, machines=None, **unknown_fields): +class MigrationSpec(Type): + _toSchema = {'model_tag': 'model-tag', 'target_info': 'target-info'} + _toPy = {'model-tag': 'model_tag', 'target-info': 'target_info'} + def __init__(self, model_tag=None, target_info=None, **unknown_fields): ''' - machines : typing.Sequence[str] + model_tag : str + target_info : MigrationTargetInfo ''' - machines_ = machines + model_tag_ = model_tag + target_info_ = MigrationTargetInfo.from_json(target_info) if target_info else None # Validate arguments against known Juju API types. - if machines_ is not None and not isinstance(machines_, (bytes, str, list)): - raise Exception("Expected machines_ to be a Sequence, received: {}".format(type(machines_))) + if model_tag_ is not None and not isinstance(model_tag_, (bytes, str)): + raise Exception("Expected model_tag_ to be a str, received: {}".format(type(model_tag_))) - self.machines = machines_ + if target_info_ is not None and not isinstance(target_info_, (dict, MigrationTargetInfo)): + raise Exception("Expected target_info_ to be a MigrationTargetInfo, received: {}".format(type(target_info_))) + + self.model_tag = model_tag_ + self.target_info = target_info_ self.unknown_fields = unknown_fields -class FilesystemFilters(Type): - _toSchema = {'filters': 'filters'} - _toPy = {'filters': 'filters'} - def __init__(self, filters=None, **unknown_fields): +class MigrationTargetInfo(Type): + _toSchema = {'addrs': 'addrs', 'auth_tag': 'auth-tag', 'ca_cert': 'ca-cert', 'controller_alias': 'controller-alias', 'controller_tag': 'controller-tag', 'macaroons': 'macaroons', 'password': 'password'} + _toPy = {'addrs': 'addrs', 'auth-tag': 'auth_tag', 'ca-cert': 'ca_cert', 'controller-alias': 'controller_alias', 'controller-tag': 'controller_tag', 'macaroons': 'macaroons', 'password': 'password'} + def __init__(self, addrs=None, auth_tag=None, ca_cert=None, controller_alias=None, controller_tag=None, macaroons=None, password=None, **unknown_fields): ''' - filters : typing.Sequence[~FilesystemFilter] + addrs : typing.Sequence[str] + auth_tag : str + ca_cert : str + controller_alias : str + controller_tag : str + macaroons : str + password : str ''' - filters_ = [FilesystemFilter.from_json(o) for o in filters or []] + addrs_ = addrs + auth_tag_ = auth_tag + ca_cert_ = ca_cert + controller_alias_ = controller_alias + controller_tag_ = controller_tag + macaroons_ = macaroons + password_ = password # Validate arguments against known Juju API types. - if filters_ is not None and not isinstance(filters_, (bytes, str, list)): - raise Exception("Expected filters_ to be a Sequence, received: {}".format(type(filters_))) - - self.filters = filters_ - self.unknown_fields = unknown_fields + if addrs_ is not None and not isinstance(addrs_, (bytes, str, list)): + raise Exception("Expected addrs_ to be a Sequence, received: {}".format(type(addrs_))) + if auth_tag_ is not None and not isinstance(auth_tag_, (bytes, str)): + raise Exception("Expected auth_tag_ to be a str, received: {}".format(type(auth_tag_))) + if ca_cert_ is not None and not isinstance(ca_cert_, (bytes, str)): + raise Exception("Expected ca_cert_ to be a str, received: {}".format(type(ca_cert_))) -class FilesystemInfo(Type): - _toSchema = {'filesystem_id': 'filesystem-id', 'pool': 'pool', 'size': 'size'} - _toPy = {'filesystem-id': 'filesystem_id', 'pool': 'pool', 'size': 'size'} - def __init__(self, filesystem_id=None, pool=None, size=None, **unknown_fields): - ''' - filesystem_id : str - pool : str - size : int - ''' - filesystem_id_ = filesystem_id - pool_ = pool - size_ = size + if controller_alias_ is not None and not isinstance(controller_alias_, (bytes, str)): + raise Exception("Expected controller_alias_ to be a str, received: {}".format(type(controller_alias_))) - # Validate arguments against known Juju API types. - if filesystem_id_ is not None and not isinstance(filesystem_id_, (bytes, str)): - raise Exception("Expected filesystem_id_ to be a str, received: {}".format(type(filesystem_id_))) + if controller_tag_ is not None and not isinstance(controller_tag_, (bytes, str)): + raise Exception("Expected controller_tag_ to be a str, received: {}".format(type(controller_tag_))) - if pool_ is not None and not isinstance(pool_, (bytes, str)): - raise Exception("Expected pool_ to be a str, received: {}".format(type(pool_))) + if macaroons_ is not None and not isinstance(macaroons_, (bytes, str)): + raise Exception("Expected macaroons_ to be a str, received: {}".format(type(macaroons_))) - if size_ is not None and not isinstance(size_, int): - raise Exception("Expected size_ to be a int, received: {}".format(type(size_))) + if password_ is not None and not isinstance(password_, (bytes, str)): + raise Exception("Expected password_ to be a str, received: {}".format(type(password_))) - self.filesystem_id = filesystem_id_ - self.pool = pool_ - self.size = size_ + self.addrs = addrs_ + self.auth_tag = auth_tag_ + self.ca_cert = ca_cert_ + self.controller_alias = controller_alias_ + self.controller_tag = controller_tag_ + self.macaroons = macaroons_ + self.password = password_ self.unknown_fields = unknown_fields -class FilesystemParams(Type): - _toSchema = {'attachment': 'attachment', 'attributes': 'attributes', 'filesystem_tag': 'filesystem-tag', 'provider': 'provider', 'size': 'size', 'tags': 'tags', 'volume_tag': 'volume-tag'} - _toPy = {'attachment': 'attachment', 'attributes': 'attributes', 'filesystem-tag': 'filesystem_tag', 'provider': 'provider', 'size': 'size', 'tags': 'tags', 'volume-tag': 'volume_tag'} - def __init__(self, attachment=None, attributes=None, filesystem_tag=None, provider=None, size=None, tags=None, volume_tag=None, **unknown_fields): +class Model(Type): + _toSchema = {'name': 'name', 'owner_tag': 'owner-tag', 'type_': 'type', 'uuid': 'uuid'} + _toPy = {'name': 'name', 'owner-tag': 'owner_tag', 'type': 'type_', 'uuid': 'uuid'} + def __init__(self, name=None, owner_tag=None, type_=None, uuid=None, **unknown_fields): ''' - attachment : FilesystemAttachmentParams - attributes : typing.Mapping[str, typing.Any] - filesystem_tag : str - provider : str - size : int - tags : typing.Mapping[str, str] - volume_tag : str + name : str + owner_tag : str + type_ : str + uuid : str ''' - attachment_ = FilesystemAttachmentParams.from_json(attachment) if attachment else None - attributes_ = attributes - filesystem_tag_ = filesystem_tag - provider_ = provider - size_ = size - tags_ = tags - volume_tag_ = volume_tag + name_ = name + owner_tag_ = owner_tag + type__ = type_ + uuid_ = uuid # Validate arguments against known Juju API types. - if attachment_ is not None and not isinstance(attachment_, (dict, FilesystemAttachmentParams)): - raise Exception("Expected attachment_ to be a FilesystemAttachmentParams, received: {}".format(type(attachment_))) - - if attributes_ is not None and not isinstance(attributes_, dict): - raise Exception("Expected attributes_ to be a Mapping, received: {}".format(type(attributes_))) - - if filesystem_tag_ is not None and not isinstance(filesystem_tag_, (bytes, str)): - raise Exception("Expected filesystem_tag_ to be a str, received: {}".format(type(filesystem_tag_))) - - if provider_ is not None and not isinstance(provider_, (bytes, str)): - raise Exception("Expected provider_ to be a str, received: {}".format(type(provider_))) + if name_ is not None and not isinstance(name_, (bytes, str)): + raise Exception("Expected name_ to be a str, received: {}".format(type(name_))) - if size_ is not None and not isinstance(size_, int): - raise Exception("Expected size_ to be a int, received: {}".format(type(size_))) + if owner_tag_ is not None and not isinstance(owner_tag_, (bytes, str)): + raise Exception("Expected owner_tag_ to be a str, received: {}".format(type(owner_tag_))) - if tags_ is not None and not isinstance(tags_, dict): - raise Exception("Expected tags_ to be a Mapping, received: {}".format(type(tags_))) + if type__ is not None and not isinstance(type__, (bytes, str)): + raise Exception("Expected type__ to be a str, received: {}".format(type(type__))) - if volume_tag_ is not None and not isinstance(volume_tag_, (bytes, str)): - raise Exception("Expected volume_tag_ to be a str, received: {}".format(type(volume_tag_))) + if uuid_ is not None and not isinstance(uuid_, (bytes, str)): + raise Exception("Expected uuid_ to be a str, received: {}".format(type(uuid_))) - self.attachment = attachment_ - self.attributes = attributes_ - self.filesystem_tag = filesystem_tag_ - self.provider = provider_ - self.size = size_ - self.tags = tags_ - self.volume_tag = volume_tag_ + self.name = name_ + self.owner_tag = owner_tag_ + self.type_ = type__ + self.uuid = uuid_ self.unknown_fields = unknown_fields -class FilesystemParamsResult(Type): - _toSchema = {'error': 'error', 'result': 'result'} - _toPy = {'error': 'error', 'result': 'result'} - def __init__(self, error=None, result=None, **unknown_fields): +class ModelAccess(Type): + _toSchema = {'access': 'access', 'model': 'model'} + _toPy = {'access': 'access', 'model': 'model'} + def __init__(self, access=None, model=None, **unknown_fields): ''' - error : Error - result : FilesystemParams + access : str + model : str ''' - error_ = Error.from_json(error) if error else None - result_ = FilesystemParams.from_json(result) if result else None + access_ = access + model_ = model # Validate arguments against known Juju API types. - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) + if access_ is not None and not isinstance(access_, (bytes, str)): + raise Exception("Expected access_ to be a str, received: {}".format(type(access_))) - if result_ is not None and not isinstance(result_, (dict, FilesystemParams)): - raise Exception("Expected result_ to be a FilesystemParams, received: {}".format(type(result_))) + if model_ is not None and not isinstance(model_, (bytes, str)): + raise Exception("Expected model_ to be a str, received: {}".format(type(model_))) - self.error = error_ - self.result = result_ + self.access = access_ + self.model = model_ self.unknown_fields = unknown_fields -class FilesystemParamsResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None, **unknown_fields): +class ModelApplicationInfo(Type): + _toSchema = {'name': 'name'} + _toPy = {'name': 'name'} + def __init__(self, name=None, **unknown_fields): ''' - results : typing.Sequence[~FilesystemParamsResult] + name : str ''' - results_ = [FilesystemParamsResult.from_json(o) for o in results or []] + name_ = name # Validate arguments against known Juju API types. - if results_ is not None and not isinstance(results_, (bytes, str, list)): - raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) + if name_ is not None and not isinstance(name_, (bytes, str)): + raise Exception("Expected name_ to be a str, received: {}".format(type(name_))) - self.results = results_ + self.name = name_ self.unknown_fields = unknown_fields -class FilesystemResult(Type): - _toSchema = {'error': 'error', 'result': 'result'} - _toPy = {'error': 'error', 'result': 'result'} - def __init__(self, error=None, result=None, **unknown_fields): +class ModelBlockInfo(Type): + _toSchema = {'blocks': 'blocks', 'model_uuid': 'model-uuid', 'name': 'name', 'owner_tag': 'owner-tag'} + _toPy = {'blocks': 'blocks', 'model-uuid': 'model_uuid', 'name': 'name', 'owner-tag': 'owner_tag'} + def __init__(self, blocks=None, model_uuid=None, name=None, owner_tag=None, **unknown_fields): ''' - error : Error - result : Filesystem + blocks : typing.Sequence[str] + model_uuid : str + name : str + owner_tag : str ''' - error_ = Error.from_json(error) if error else None - result_ = Filesystem.from_json(result) if result else None + blocks_ = blocks + model_uuid_ = model_uuid + name_ = name + owner_tag_ = owner_tag # Validate arguments against known Juju API types. - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) + if blocks_ is not None and not isinstance(blocks_, (bytes, str, list)): + raise Exception("Expected blocks_ to be a Sequence, received: {}".format(type(blocks_))) - if result_ is not None and not isinstance(result_, (dict, Filesystem)): - raise Exception("Expected result_ to be a Filesystem, received: {}".format(type(result_))) + if model_uuid_ is not None and not isinstance(model_uuid_, (bytes, str)): + raise Exception("Expected model_uuid_ to be a str, received: {}".format(type(model_uuid_))) - self.error = error_ - self.result = result_ + if name_ is not None and not isinstance(name_, (bytes, str)): + raise Exception("Expected name_ to be a str, received: {}".format(type(name_))) + + if owner_tag_ is not None and not isinstance(owner_tag_, (bytes, str)): + raise Exception("Expected owner_tag_ to be a str, received: {}".format(type(owner_tag_))) + + self.blocks = blocks_ + self.model_uuid = model_uuid_ + self.name = name_ + self.owner_tag = owner_tag_ self.unknown_fields = unknown_fields -class FilesystemResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None, **unknown_fields): +class ModelBlockInfoList(Type): + _toSchema = {'models': 'models'} + _toPy = {'models': 'models'} + def __init__(self, models=None, **unknown_fields): ''' - results : typing.Sequence[~FilesystemResult] + models : typing.Sequence[~ModelBlockInfo] ''' - results_ = [FilesystemResult.from_json(o) for o in results or []] + models_ = [ModelBlockInfo.from_json(o) for o in models or []] # Validate arguments against known Juju API types. - if results_ is not None and not isinstance(results_, (bytes, str, list)): - raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) + if models_ is not None and not isinstance(models_, (bytes, str, list)): + raise Exception("Expected models_ to be a Sequence, received: {}".format(type(models_))) - self.results = results_ + self.models = models_ self.unknown_fields = unknown_fields -class Filesystems(Type): - _toSchema = {'filesystems': 'filesystems'} - _toPy = {'filesystems': 'filesystems'} - def __init__(self, filesystems=None, **unknown_fields): +class ModelConfigResults(Type): + _toSchema = {'config': 'config'} + _toPy = {'config': 'config'} + def __init__(self, config=None, **unknown_fields): ''' - filesystems : typing.Sequence[~Filesystem] + config : typing.Mapping[str, ~ConfigValue] ''' - filesystems_ = [Filesystem.from_json(o) for o in filesystems or []] + config_ = {k: ConfigValue.from_json(v) for k, v in (config or dict()).items()} # Validate arguments against known Juju API types. - if filesystems_ is not None and not isinstance(filesystems_, (bytes, str, list)): - raise Exception("Expected filesystems_ to be a Sequence, received: {}".format(type(filesystems_))) + if config_ is not None and not isinstance(config_, dict): + raise Exception("Expected config_ to be a Mapping, received: {}".format(type(config_))) - self.filesystems = filesystems_ + self.config = config_ self.unknown_fields = unknown_fields -class FindToolsParams(Type): - _toSchema = {'agentstream': 'agentstream', 'arch': 'arch', 'major': 'major', 'number': 'number', 'os_type': 'os-type'} - _toPy = {'agentstream': 'agentstream', 'arch': 'arch', 'major': 'major', 'number': 'number', 'os-type': 'os_type'} - def __init__(self, agentstream=None, arch=None, major=None, number=None, os_type=None, **unknown_fields): +class ModelCreateArgs(Type): + _toSchema = {'cloud_tag': 'cloud-tag', 'config': 'config', 'credential': 'credential', 'name': 'name', 'owner_tag': 'owner-tag', 'region': 'region'} + _toPy = {'cloud-tag': 'cloud_tag', 'config': 'config', 'credential': 'credential', 'name': 'name', 'owner-tag': 'owner_tag', 'region': 'region'} + def __init__(self, cloud_tag=None, config=None, credential=None, name=None, owner_tag=None, region=None, **unknown_fields): ''' - agentstream : str - arch : str - major : int - number : Number - os_type : str + cloud_tag : str + config : typing.Mapping[str, typing.Any] + credential : str + name : str + owner_tag : str + region : str ''' - agentstream_ = agentstream - arch_ = arch - major_ = major - number_ = Number.from_json(number) if number else None - os_type_ = os_type + cloud_tag_ = cloud_tag + config_ = config + credential_ = credential + name_ = name + owner_tag_ = owner_tag + region_ = region # Validate arguments against known Juju API types. - if agentstream_ is not None and not isinstance(agentstream_, (bytes, str)): - raise Exception("Expected agentstream_ to be a str, received: {}".format(type(agentstream_))) + if cloud_tag_ is not None and not isinstance(cloud_tag_, (bytes, str)): + raise Exception("Expected cloud_tag_ to be a str, received: {}".format(type(cloud_tag_))) - if arch_ is not None and not isinstance(arch_, (bytes, str)): - raise Exception("Expected arch_ to be a str, received: {}".format(type(arch_))) + if config_ is not None and not isinstance(config_, dict): + raise Exception("Expected config_ to be a Mapping, received: {}".format(type(config_))) - if major_ is not None and not isinstance(major_, int): - raise Exception("Expected major_ to be a int, received: {}".format(type(major_))) + if credential_ is not None and not isinstance(credential_, (bytes, str)): + raise Exception("Expected credential_ to be a str, received: {}".format(type(credential_))) - if number_ is not None and not isinstance(number_, (dict, Number)): - raise Exception("Expected number_ to be a Number, received: {}".format(type(number_))) + if name_ is not None and not isinstance(name_, (bytes, str)): + raise Exception("Expected name_ to be a str, received: {}".format(type(name_))) - if os_type_ is not None and not isinstance(os_type_, (bytes, str)): - raise Exception("Expected os_type_ to be a str, received: {}".format(type(os_type_))) + if owner_tag_ is not None and not isinstance(owner_tag_, (bytes, str)): + raise Exception("Expected owner_tag_ to be a str, received: {}".format(type(owner_tag_))) - self.agentstream = agentstream_ - self.arch = arch_ - self.major = major_ - self.number = number_ - self.os_type = os_type_ + if region_ is not None and not isinstance(region_, (bytes, str)): + raise Exception("Expected region_ to be a str, received: {}".format(type(region_))) + + self.cloud_tag = cloud_tag_ + self.config = config_ + self.credential = credential_ + self.name = name_ + self.owner_tag = owner_tag_ + self.region = region_ self.unknown_fields = unknown_fields -class FindToolsResult(Type): - _toSchema = {'error': 'error', 'list_': 'list'} - _toPy = {'error': 'error', 'list': 'list_'} - def __init__(self, error=None, list_=None, **unknown_fields): +class ModelDefaultValues(Type): + _toSchema = {'cloud_region': 'cloud-region', 'cloud_tag': 'cloud-tag', 'config': 'config'} + _toPy = {'cloud-region': 'cloud_region', 'cloud-tag': 'cloud_tag', 'config': 'config'} + def __init__(self, cloud_region=None, cloud_tag=None, config=None, **unknown_fields): ''' - error : Error - list_ : typing.Sequence[~Tools] + cloud_region : str + cloud_tag : str + config : typing.Mapping[str, typing.Any] ''' - error_ = Error.from_json(error) if error else None - list__ = [Tools.from_json(o) for o in list_ or []] + cloud_region_ = cloud_region + cloud_tag_ = cloud_tag + config_ = config # Validate arguments against known Juju API types. - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) + if cloud_region_ is not None and not isinstance(cloud_region_, (bytes, str)): + raise Exception("Expected cloud_region_ to be a str, received: {}".format(type(cloud_region_))) - if list__ is not None and not isinstance(list__, (bytes, str, list)): - raise Exception("Expected list__ to be a Sequence, received: {}".format(type(list__))) + if cloud_tag_ is not None and not isinstance(cloud_tag_, (bytes, str)): + raise Exception("Expected cloud_tag_ to be a str, received: {}".format(type(cloud_tag_))) - self.error = error_ - self.list_ = list__ + if config_ is not None and not isinstance(config_, dict): + raise Exception("Expected config_ to be a Mapping, received: {}".format(type(config_))) + + self.cloud_region = cloud_region_ + self.cloud_tag = cloud_tag_ + self.config = config_ self.unknown_fields = unknown_fields -class FirewallRule(Type): - _toSchema = {'known_service': 'known-service', 'whitelist_cidrs': 'whitelist-cidrs'} - _toPy = {'known-service': 'known_service', 'whitelist-cidrs': 'whitelist_cidrs'} - def __init__(self, known_service=None, whitelist_cidrs=None, **unknown_fields): +class ModelDefaults(Type): + _toSchema = {'controller': 'controller', 'default': 'default', 'regions': 'regions'} + _toPy = {'controller': 'controller', 'default': 'default', 'regions': 'regions'} + def __init__(self, controller=None, default=None, regions=None, **unknown_fields): ''' - known_service : str - whitelist_cidrs : typing.Sequence[str] + controller : Any + default : Any + regions : typing.Sequence[~RegionDefaults] ''' - known_service_ = known_service - whitelist_cidrs_ = whitelist_cidrs + controller_ = controller + default_ = default + regions_ = [RegionDefaults.from_json(o) for o in regions or []] # Validate arguments against known Juju API types. - if known_service_ is not None and not isinstance(known_service_, (bytes, str)): - raise Exception("Expected known_service_ to be a str, received: {}".format(type(known_service_))) - - if whitelist_cidrs_ is not None and not isinstance(whitelist_cidrs_, (bytes, str, list)): - raise Exception("Expected whitelist_cidrs_ to be a Sequence, received: {}".format(type(whitelist_cidrs_))) + if regions_ is not None and not isinstance(regions_, (bytes, str, list)): + raise Exception("Expected regions_ to be a Sequence, received: {}".format(type(regions_))) - self.known_service = known_service_ - self.whitelist_cidrs = whitelist_cidrs_ + self.controller = controller_ + self.default = default_ + self.regions = regions_ self.unknown_fields = unknown_fields -class FirewallRuleArgs(Type): - _toSchema = {'args': 'args'} - _toPy = {'args': 'args'} - def __init__(self, args=None, **unknown_fields): +class ModelDefaultsResult(Type): + _toSchema = {'config': 'config', 'error': 'error'} + _toPy = {'config': 'config', 'error': 'error'} + def __init__(self, config=None, error=None, **unknown_fields): ''' - args : typing.Sequence[~FirewallRule] + config : typing.Mapping[str, ~ModelDefaults] + error : Error ''' - args_ = [FirewallRule.from_json(o) for o in args or []] + config_ = {k: ModelDefaults.from_json(v) for k, v in (config or dict()).items()} + error_ = Error.from_json(error) if error else None # Validate arguments against known Juju API types. - if args_ is not None and not isinstance(args_, (bytes, str, list)): - raise Exception("Expected args_ to be a Sequence, received: {}".format(type(args_))) + if config_ is not None and not isinstance(config_, dict): + raise Exception("Expected config_ to be a Mapping, received: {}".format(type(config_))) - self.args = args_ + if error_ is not None and not isinstance(error_, (dict, Error)): + raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) + + self.config = config_ + self.error = error_ self.unknown_fields = unknown_fields -class FullStatus(Type): - _toSchema = {'applications': 'applications', 'branches': 'branches', 'controller_timestamp': 'controller-timestamp', 'filesystems': 'filesystems', 'machines': 'machines', 'model': 'model', 'offers': 'offers', 'relations': 'relations', 'remote_applications': 'remote-applications', 'storage': 'storage', 'volumes': 'volumes'} - _toPy = {'applications': 'applications', 'branches': 'branches', 'controller-timestamp': 'controller_timestamp', 'filesystems': 'filesystems', 'machines': 'machines', 'model': 'model', 'offers': 'offers', 'relations': 'relations', 'remote-applications': 'remote_applications', 'storage': 'storage', 'volumes': 'volumes'} - def __init__(self, applications=None, branches=None, controller_timestamp=None, filesystems=None, machines=None, model=None, offers=None, relations=None, remote_applications=None, storage=None, volumes=None, **unknown_fields): +class ModelDefaultsResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} + def __init__(self, results=None, **unknown_fields): ''' - applications : typing.Mapping[str, ~ApplicationStatus] - branches : typing.Mapping[str, ~BranchStatus] - controller_timestamp : str - filesystems : typing.Sequence[~FilesystemDetails] - machines : typing.Mapping[str, ~MachineStatus] - model : ModelStatusInfo - offers : typing.Mapping[str, ~ApplicationOfferStatus] - relations : typing.Sequence[~RelationStatus] - remote_applications : typing.Mapping[str, ~RemoteApplicationStatus] - storage : typing.Sequence[~StorageDetails] - volumes : typing.Sequence[~VolumeDetails] + results : typing.Sequence[~ModelDefaultsResult] ''' - applications_ = {k: ApplicationStatus.from_json(v) for k, v in (applications or dict()).items()} - branches_ = {k: BranchStatus.from_json(v) for k, v in (branches or dict()).items()} - controller_timestamp_ = controller_timestamp - filesystems_ = [FilesystemDetails.from_json(o) for o in filesystems or []] - machines_ = {k: MachineStatus.from_json(v) for k, v in (machines or dict()).items()} - model_ = ModelStatusInfo.from_json(model) if model else None - offers_ = {k: ApplicationOfferStatus.from_json(v) for k, v in (offers or dict()).items()} - relations_ = [RelationStatus.from_json(o) for o in relations or []] - remote_applications_ = {k: RemoteApplicationStatus.from_json(v) for k, v in (remote_applications or dict()).items()} - storage_ = [StorageDetails.from_json(o) for o in storage or []] - volumes_ = [VolumeDetails.from_json(o) for o in volumes or []] + results_ = [ModelDefaultsResult.from_json(o) for o in results or []] # Validate arguments against known Juju API types. - if applications_ is not None and not isinstance(applications_, dict): - raise Exception("Expected applications_ to be a Mapping, received: {}".format(type(applications_))) - - if branches_ is not None and not isinstance(branches_, dict): - raise Exception("Expected branches_ to be a Mapping, received: {}".format(type(branches_))) - - if controller_timestamp_ is not None and not isinstance(controller_timestamp_, (bytes, str)): - raise Exception("Expected controller_timestamp_ to be a str, received: {}".format(type(controller_timestamp_))) + if results_ is not None and not isinstance(results_, (bytes, str, list)): + raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) - if filesystems_ is not None and not isinstance(filesystems_, (bytes, str, list)): - raise Exception("Expected filesystems_ to be a Sequence, received: {}".format(type(filesystems_))) + self.results = results_ + self.unknown_fields = unknown_fields - if machines_ is not None and not isinstance(machines_, dict): - raise Exception("Expected machines_ to be a Mapping, received: {}".format(type(machines_))) - if model_ is not None and not isinstance(model_, (dict, ModelStatusInfo)): - raise Exception("Expected model_ to be a ModelStatusInfo, received: {}".format(type(model_))) - if offers_ is not None and not isinstance(offers_, dict): - raise Exception("Expected offers_ to be a Mapping, received: {}".format(type(offers_))) - - if relations_ is not None and not isinstance(relations_, (bytes, str, list)): - raise Exception("Expected relations_ to be a Sequence, received: {}".format(type(relations_))) - - if remote_applications_ is not None and not isinstance(remote_applications_, dict): - raise Exception("Expected remote_applications_ to be a Mapping, received: {}".format(type(remote_applications_))) - - if storage_ is not None and not isinstance(storage_, (bytes, str, list)): - raise Exception("Expected storage_ to be a Sequence, received: {}".format(type(storage_))) - - if volumes_ is not None and not isinstance(volumes_, (bytes, str, list)): - raise Exception("Expected volumes_ to be a Sequence, received: {}".format(type(volumes_))) - - self.applications = applications_ - self.branches = branches_ - self.controller_timestamp = controller_timestamp_ - self.filesystems = filesystems_ - self.machines = machines_ - self.model = model_ - self.offers = offers_ - self.relations = relations_ - self.remote_applications = remote_applications_ - self.storage = storage_ - self.volumes = volumes_ - self.unknown_fields = unknown_fields - - - -class Generation(Type): - _toSchema = {'applications': 'applications', 'branch': 'branch', 'completed': 'completed', 'completed_by': 'completed-by', 'created': 'created', 'created_by': 'created-by', 'generation_id': 'generation-id'} - _toPy = {'applications': 'applications', 'branch': 'branch', 'completed': 'completed', 'completed-by': 'completed_by', 'created': 'created', 'created-by': 'created_by', 'generation-id': 'generation_id'} - def __init__(self, applications=None, branch=None, completed=None, completed_by=None, created=None, created_by=None, generation_id=None, **unknown_fields): - ''' - applications : typing.Sequence[~GenerationApplication] - branch : str - completed : int - completed_by : str - created : int - created_by : str - generation_id : int - ''' - applications_ = [GenerationApplication.from_json(o) for o in applications or []] - branch_ = branch - completed_ = completed - completed_by_ = completed_by - created_ = created - created_by_ = created_by - generation_id_ = generation_id - - # Validate arguments against known Juju API types. - if applications_ is not None and not isinstance(applications_, (bytes, str, list)): - raise Exception("Expected applications_ to be a Sequence, received: {}".format(type(applications_))) - - if branch_ is not None and not isinstance(branch_, (bytes, str)): - raise Exception("Expected branch_ to be a str, received: {}".format(type(branch_))) - - if completed_ is not None and not isinstance(completed_, int): - raise Exception("Expected completed_ to be a int, received: {}".format(type(completed_))) - - if completed_by_ is not None and not isinstance(completed_by_, (bytes, str)): - raise Exception("Expected completed_by_ to be a str, received: {}".format(type(completed_by_))) - - if created_ is not None and not isinstance(created_, int): - raise Exception("Expected created_ to be a int, received: {}".format(type(created_))) - - if created_by_ is not None and not isinstance(created_by_, (bytes, str)): - raise Exception("Expected created_by_ to be a str, received: {}".format(type(created_by_))) - - if generation_id_ is not None and not isinstance(generation_id_, int): - raise Exception("Expected generation_id_ to be a int, received: {}".format(type(generation_id_))) - - self.applications = applications_ - self.branch = branch_ - self.completed = completed_ - self.completed_by = completed_by_ - self.created = created_ - self.created_by = created_by_ - self.generation_id = generation_id_ - self.unknown_fields = unknown_fields - - - -class GenerationApplication(Type): - _toSchema = {'application': 'application', 'config': 'config', 'pending': 'pending', 'progress': 'progress', 'tracking': 'tracking'} - _toPy = {'application': 'application', 'config': 'config', 'pending': 'pending', 'progress': 'progress', 'tracking': 'tracking'} - def __init__(self, application=None, config=None, pending=None, progress=None, tracking=None, **unknown_fields): - ''' - application : str - config : typing.Mapping[str, typing.Any] - pending : typing.Sequence[str] - progress : str - tracking : typing.Sequence[str] - ''' - application_ = application - config_ = config - pending_ = pending - progress_ = progress - tracking_ = tracking - - # Validate arguments against known Juju API types. - if application_ is not None and not isinstance(application_, (bytes, str)): - raise Exception("Expected application_ to be a str, received: {}".format(type(application_))) - - if config_ is not None and not isinstance(config_, dict): - raise Exception("Expected config_ to be a Mapping, received: {}".format(type(config_))) - - if pending_ is not None and not isinstance(pending_, (bytes, str, list)): - raise Exception("Expected pending_ to be a Sequence, received: {}".format(type(pending_))) - - if progress_ is not None and not isinstance(progress_, (bytes, str)): - raise Exception("Expected progress_ to be a str, received: {}".format(type(progress_))) - - if tracking_ is not None and not isinstance(tracking_, (bytes, str, list)): - raise Exception("Expected tracking_ to be a Sequence, received: {}".format(type(tracking_))) - - self.application = application_ - self.config = config_ - self.pending = pending_ - self.progress = progress_ - self.tracking = tracking_ - self.unknown_fields = unknown_fields - - - -class GenerationId(Type): - _toSchema = {'generation_id': 'generation-id'} - _toPy = {'generation-id': 'generation_id'} - def __init__(self, generation_id=None, **unknown_fields): - ''' - generation_id : int - ''' - generation_id_ = generation_id - - # Validate arguments against known Juju API types. - if generation_id_ is not None and not isinstance(generation_id_, int): - raise Exception("Expected generation_id_ to be a int, received: {}".format(type(generation_id_))) - - self.generation_id = generation_id_ - self.unknown_fields = unknown_fields - - - -class GenerationResult(Type): - _toSchema = {'error': 'error', 'generation': 'generation'} - _toPy = {'error': 'error', 'generation': 'generation'} - def __init__(self, error=None, generation=None, **unknown_fields): - ''' - error : Error - generation : Generation - ''' - error_ = Error.from_json(error) if error else None - generation_ = Generation.from_json(generation) if generation else None - - # Validate arguments against known Juju API types. - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - - if generation_ is not None and not isinstance(generation_, (dict, Generation)): - raise Exception("Expected generation_ to be a Generation, received: {}".format(type(generation_))) - - self.error = error_ - self.generation = generation_ - self.unknown_fields = unknown_fields - - - -class GetConstraintsResults(Type): - _toSchema = {'constraints': 'constraints'} - _toPy = {'constraints': 'constraints'} - def __init__(self, constraints=None, **unknown_fields): - ''' - constraints : Value - ''' - constraints_ = Value.from_json(constraints) if constraints else None - - # Validate arguments against known Juju API types. - if constraints_ is not None and not isinstance(constraints_, (dict, Value)): - raise Exception("Expected constraints_ to be a Value, received: {}".format(type(constraints_))) - - self.constraints = constraints_ - self.unknown_fields = unknown_fields - - - -class GetLeadershipSettingsBulkResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None, **unknown_fields): - ''' - results : typing.Sequence[~GetLeadershipSettingsResult] - ''' - results_ = [GetLeadershipSettingsResult.from_json(o) for o in results or []] - - # Validate arguments against known Juju API types. - if results_ is not None and not isinstance(results_, (bytes, str, list)): - raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) - - self.results = results_ - self.unknown_fields = unknown_fields - - - -class GetLeadershipSettingsResult(Type): - _toSchema = {'error': 'error', 'settings': 'settings'} - _toPy = {'error': 'error', 'settings': 'settings'} - def __init__(self, error=None, settings=None, **unknown_fields): - ''' - error : Error - settings : typing.Mapping[str, str] - ''' - error_ = Error.from_json(error) if error else None - settings_ = settings - - # Validate arguments against known Juju API types. - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - - if settings_ is not None and not isinstance(settings_, dict): - raise Exception("Expected settings_ to be a Mapping, received: {}".format(type(settings_))) - - self.error = error_ - self.settings = settings_ - self.unknown_fields = unknown_fields - - - -class GetRemoteSecretAccessArg(Type): - _toSchema = {'application_token': 'application-token', 'unit_id': 'unit-id', 'uri': 'uri'} - _toPy = {'application-token': 'application_token', 'unit-id': 'unit_id', 'uri': 'uri'} - def __init__(self, application_token=None, unit_id=None, uri=None, **unknown_fields): - ''' - application_token : str - unit_id : int - uri : str - ''' - application_token_ = application_token - unit_id_ = unit_id - uri_ = uri - - # Validate arguments against known Juju API types. - if application_token_ is not None and not isinstance(application_token_, (bytes, str)): - raise Exception("Expected application_token_ to be a str, received: {}".format(type(application_token_))) - - if unit_id_ is not None and not isinstance(unit_id_, int): - raise Exception("Expected unit_id_ to be a int, received: {}".format(type(unit_id_))) - - if uri_ is not None and not isinstance(uri_, (bytes, str)): - raise Exception("Expected uri_ to be a str, received: {}".format(type(uri_))) - - self.application_token = application_token_ - self.unit_id = unit_id_ - self.uri = uri_ - self.unknown_fields = unknown_fields - - - -class GetRemoteSecretAccessArgs(Type): - _toSchema = {'relations': 'relations'} - _toPy = {'relations': 'relations'} - def __init__(self, relations=None, **unknown_fields): - ''' - relations : typing.Sequence[~GetRemoteSecretAccessArg] - ''' - relations_ = [GetRemoteSecretAccessArg.from_json(o) for o in relations or []] - - # Validate arguments against known Juju API types. - if relations_ is not None and not isinstance(relations_, (bytes, str, list)): - raise Exception("Expected relations_ to be a Sequence, received: {}".format(type(relations_))) - - self.relations = relations_ - self.unknown_fields = unknown_fields - - - -class GetRemoteSecretContentArg(Type): - _toSchema = {'application_token': 'application-token', 'bakery_version': 'bakery-version', 'macaroons': 'macaroons', 'peek': 'peek', 'refresh': 'refresh', 'revision': 'revision', 'unit_id': 'unit-id', 'uri': 'uri'} - _toPy = {'application-token': 'application_token', 'bakery-version': 'bakery_version', 'macaroons': 'macaroons', 'peek': 'peek', 'refresh': 'refresh', 'revision': 'revision', 'unit-id': 'unit_id', 'uri': 'uri'} - def __init__(self, application_token=None, bakery_version=None, macaroons=None, peek=None, refresh=None, revision=None, unit_id=None, uri=None, **unknown_fields): - ''' - application_token : str - bakery_version : int - macaroons : typing.Sequence[~Macaroon] - peek : bool - refresh : bool - revision : int - unit_id : int - uri : str - ''' - application_token_ = application_token - bakery_version_ = bakery_version - macaroons_ = [Macaroon.from_json(o) for o in macaroons or []] - peek_ = peek - refresh_ = refresh - revision_ = revision - unit_id_ = unit_id - uri_ = uri - - # Validate arguments against known Juju API types. - if application_token_ is not None and not isinstance(application_token_, (bytes, str)): - raise Exception("Expected application_token_ to be a str, received: {}".format(type(application_token_))) - - if bakery_version_ is not None and not isinstance(bakery_version_, int): - raise Exception("Expected bakery_version_ to be a int, received: {}".format(type(bakery_version_))) - - if macaroons_ is not None and not isinstance(macaroons_, (bytes, str, list)): - raise Exception("Expected macaroons_ to be a Sequence, received: {}".format(type(macaroons_))) - - if peek_ is not None and not isinstance(peek_, bool): - raise Exception("Expected peek_ to be a bool, received: {}".format(type(peek_))) - - if refresh_ is not None and not isinstance(refresh_, bool): - raise Exception("Expected refresh_ to be a bool, received: {}".format(type(refresh_))) - - if revision_ is not None and not isinstance(revision_, int): - raise Exception("Expected revision_ to be a int, received: {}".format(type(revision_))) - - if unit_id_ is not None and not isinstance(unit_id_, int): - raise Exception("Expected unit_id_ to be a int, received: {}".format(type(unit_id_))) - - if uri_ is not None and not isinstance(uri_, (bytes, str)): - raise Exception("Expected uri_ to be a str, received: {}".format(type(uri_))) - - self.application_token = application_token_ - self.bakery_version = bakery_version_ - self.macaroons = macaroons_ - self.peek = peek_ - self.refresh = refresh_ - self.revision = revision_ - self.unit_id = unit_id_ - self.uri = uri_ - self.unknown_fields = unknown_fields - - - -class GetRemoteSecretContentArgs(Type): - _toSchema = {'relations': 'relations'} - _toPy = {'relations': 'relations'} - def __init__(self, relations=None, **unknown_fields): - ''' - relations : typing.Sequence[~GetRemoteSecretContentArg] - ''' - relations_ = [GetRemoteSecretContentArg.from_json(o) for o in relations or []] - - # Validate arguments against known Juju API types. - if relations_ is not None and not isinstance(relations_, (bytes, str, list)): - raise Exception("Expected relations_ to be a Sequence, received: {}".format(type(relations_))) - - self.relations = relations_ - self.unknown_fields = unknown_fields - - - -class GetSecretConsumerInfoArgs(Type): - _toSchema = {'consumer_tag': 'consumer-tag', 'uris': 'uris'} - _toPy = {'consumer-tag': 'consumer_tag', 'uris': 'uris'} - def __init__(self, consumer_tag=None, uris=None, **unknown_fields): - ''' - consumer_tag : str - uris : typing.Sequence[str] - ''' - consumer_tag_ = consumer_tag - uris_ = uris - - # Validate arguments against known Juju API types. - if consumer_tag_ is not None and not isinstance(consumer_tag_, (bytes, str)): - raise Exception("Expected consumer_tag_ to be a str, received: {}".format(type(consumer_tag_))) - - if uris_ is not None and not isinstance(uris_, (bytes, str, list)): - raise Exception("Expected uris_ to be a Sequence, received: {}".format(type(uris_))) - - self.consumer_tag = consumer_tag_ - self.uris = uris_ - self.unknown_fields = unknown_fields - - - -class GetSecretContentArg(Type): - _toSchema = {'label': 'label', 'peek': 'peek', 'refresh': 'refresh', 'uri': 'uri'} - _toPy = {'label': 'label', 'peek': 'peek', 'refresh': 'refresh', 'uri': 'uri'} - def __init__(self, label=None, peek=None, refresh=None, uri=None, **unknown_fields): - ''' - label : str - peek : bool - refresh : bool - uri : str - ''' - label_ = label - peek_ = peek - refresh_ = refresh - uri_ = uri - - # Validate arguments against known Juju API types. - if label_ is not None and not isinstance(label_, (bytes, str)): - raise Exception("Expected label_ to be a str, received: {}".format(type(label_))) - - if peek_ is not None and not isinstance(peek_, bool): - raise Exception("Expected peek_ to be a bool, received: {}".format(type(peek_))) - - if refresh_ is not None and not isinstance(refresh_, bool): - raise Exception("Expected refresh_ to be a bool, received: {}".format(type(refresh_))) - - if uri_ is not None and not isinstance(uri_, (bytes, str)): - raise Exception("Expected uri_ to be a str, received: {}".format(type(uri_))) - - self.label = label_ - self.peek = peek_ - self.refresh = refresh_ - self.uri = uri_ - self.unknown_fields = unknown_fields - - - -class GetSecretContentArgs(Type): - _toSchema = {'args': 'args'} - _toPy = {'args': 'args'} - def __init__(self, args=None, **unknown_fields): - ''' - args : typing.Sequence[~GetSecretContentArg] - ''' - args_ = [GetSecretContentArg.from_json(o) for o in args or []] - - # Validate arguments against known Juju API types. - if args_ is not None and not isinstance(args_, (bytes, str, list)): - raise Exception("Expected args_ to be a Sequence, received: {}".format(type(args_))) - - self.args = args_ - self.unknown_fields = unknown_fields - - - -class GetTokenArg(Type): - _toSchema = {'tag': 'tag'} - _toPy = {'tag': 'tag'} - def __init__(self, tag=None, **unknown_fields): - ''' - tag : str - ''' - tag_ = tag - - # Validate arguments against known Juju API types. - if tag_ is not None and not isinstance(tag_, (bytes, str)): - raise Exception("Expected tag_ to be a str, received: {}".format(type(tag_))) - - self.tag = tag_ - self.unknown_fields = unknown_fields - - - -class GetTokenArgs(Type): - _toSchema = {'args': 'Args'} - _toPy = {'Args': 'args'} - def __init__(self, args=None, **unknown_fields): - ''' - args : typing.Sequence[~GetTokenArg] - ''' - args_ = [GetTokenArg.from_json(o) for o in args or []] - - # Validate arguments against known Juju API types. - if args_ is not None and not isinstance(args_, (bytes, str, list)): - raise Exception("Expected args_ to be a Sequence, received: {}".format(type(args_))) - - self.args = args_ - self.unknown_fields = unknown_fields - - - -class GoalState(Type): - _toSchema = {'relations': 'relations', 'units': 'units'} - _toPy = {'relations': 'relations', 'units': 'units'} - def __init__(self, relations=None, units=None, **unknown_fields): - ''' - relations : typing.Mapping[str, typing.Any] - units : typing.Mapping[str, ~GoalStateStatus] - ''' - relations_ = relations - units_ = {k: GoalStateStatus.from_json(v) for k, v in (units or dict()).items()} - - # Validate arguments against known Juju API types. - if relations_ is not None and not isinstance(relations_, dict): - raise Exception("Expected relations_ to be a Mapping, received: {}".format(type(relations_))) - - if units_ is not None and not isinstance(units_, dict): - raise Exception("Expected units_ to be a Mapping, received: {}".format(type(units_))) - - self.relations = relations_ - self.units = units_ - self.unknown_fields = unknown_fields - - - -class GoalStateResult(Type): - _toSchema = {'error': 'error', 'result': 'result'} - _toPy = {'error': 'error', 'result': 'result'} - def __init__(self, error=None, result=None, **unknown_fields): - ''' - error : Error - result : GoalState - ''' - error_ = Error.from_json(error) if error else None - result_ = GoalState.from_json(result) if result else None - - # Validate arguments against known Juju API types. - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - - if result_ is not None and not isinstance(result_, (dict, GoalState)): - raise Exception("Expected result_ to be a GoalState, received: {}".format(type(result_))) - - self.error = error_ - self.result = result_ - self.unknown_fields = unknown_fields - - - -class GoalStateResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None, **unknown_fields): - ''' - results : typing.Sequence[~GoalStateResult] - ''' - results_ = [GoalStateResult.from_json(o) for o in results or []] - - # Validate arguments against known Juju API types. - if results_ is not None and not isinstance(results_, (bytes, str, list)): - raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) - - self.results = results_ - self.unknown_fields = unknown_fields - - - -class GoalStateStatus(Type): - _toSchema = {'since': 'since', 'status': 'status'} - _toPy = {'since': 'since', 'status': 'status'} - def __init__(self, since=None, status=None, **unknown_fields): - ''' - since : str - status : str - ''' - since_ = since - status_ = status - - # Validate arguments against known Juju API types. - if since_ is not None and not isinstance(since_, (bytes, str)): - raise Exception("Expected since_ to be a str, received: {}".format(type(since_))) - - if status_ is not None and not isinstance(status_, (bytes, str)): - raise Exception("Expected status_ to be a str, received: {}".format(type(status_))) - - self.since = since_ - self.status = status_ - self.unknown_fields = unknown_fields - - - -class GrantRevokeSecretArg(Type): - _toSchema = {'role': 'role', 'scope_tag': 'scope-tag', 'subject_tags': 'subject-tags', 'uri': 'uri'} - _toPy = {'role': 'role', 'scope-tag': 'scope_tag', 'subject-tags': 'subject_tags', 'uri': 'uri'} - def __init__(self, role=None, scope_tag=None, subject_tags=None, uri=None, **unknown_fields): - ''' - role : str - scope_tag : str - subject_tags : typing.Sequence[str] - uri : str - ''' - role_ = role - scope_tag_ = scope_tag - subject_tags_ = subject_tags - uri_ = uri - - # Validate arguments against known Juju API types. - if role_ is not None and not isinstance(role_, (bytes, str)): - raise Exception("Expected role_ to be a str, received: {}".format(type(role_))) - - if scope_tag_ is not None and not isinstance(scope_tag_, (bytes, str)): - raise Exception("Expected scope_tag_ to be a str, received: {}".format(type(scope_tag_))) - - if subject_tags_ is not None and not isinstance(subject_tags_, (bytes, str, list)): - raise Exception("Expected subject_tags_ to be a Sequence, received: {}".format(type(subject_tags_))) - - if uri_ is not None and not isinstance(uri_, (bytes, str)): - raise Exception("Expected uri_ to be a str, received: {}".format(type(uri_))) - - self.role = role_ - self.scope_tag = scope_tag_ - self.subject_tags = subject_tags_ - self.uri = uri_ - self.unknown_fields = unknown_fields - - - -class GrantRevokeSecretArgs(Type): - _toSchema = {'args': 'args'} - _toPy = {'args': 'args'} - def __init__(self, args=None, **unknown_fields): - ''' - args : typing.Sequence[~GrantRevokeSecretArg] - ''' - args_ = [GrantRevokeSecretArg.from_json(o) for o in args or []] - - # Validate arguments against known Juju API types. - if args_ is not None and not isinstance(args_, (bytes, str, list)): - raise Exception("Expected args_ to be a Sequence, received: {}".format(type(args_))) - - self.args = args_ - self.unknown_fields = unknown_fields - - - -class GrantRevokeUserSecretArg(Type): - _toSchema = {'applications': 'applications', 'label': 'label', 'uri': 'uri'} - _toPy = {'applications': 'applications', 'label': 'label', 'uri': 'uri'} - def __init__(self, applications=None, label=None, uri=None, **unknown_fields): - ''' - applications : typing.Sequence[str] - label : str - uri : str - ''' - applications_ = applications - label_ = label - uri_ = uri - - # Validate arguments against known Juju API types. - if applications_ is not None and not isinstance(applications_, (bytes, str, list)): - raise Exception("Expected applications_ to be a Sequence, received: {}".format(type(applications_))) - - if label_ is not None and not isinstance(label_, (bytes, str)): - raise Exception("Expected label_ to be a str, received: {}".format(type(label_))) - - if uri_ is not None and not isinstance(uri_, (bytes, str)): - raise Exception("Expected uri_ to be a str, received: {}".format(type(uri_))) - - self.applications = applications_ - self.label = label_ - self.uri = uri_ - self.unknown_fields = unknown_fields - - - -class HardwareCharacteristics(Type): - _toSchema = {'arch': 'arch', 'availability_zone': 'availability-zone', 'cpu_cores': 'cpu-cores', 'cpu_power': 'cpu-power', 'mem': 'mem', 'root_disk': 'root-disk', 'root_disk_source': 'root-disk-source', 'tags': 'tags', 'virt_type': 'virt-type'} - _toPy = {'arch': 'arch', 'availability-zone': 'availability_zone', 'cpu-cores': 'cpu_cores', 'cpu-power': 'cpu_power', 'mem': 'mem', 'root-disk': 'root_disk', 'root-disk-source': 'root_disk_source', 'tags': 'tags', 'virt-type': 'virt_type'} - def __init__(self, arch=None, availability_zone=None, cpu_cores=None, cpu_power=None, mem=None, root_disk=None, root_disk_source=None, tags=None, virt_type=None, **unknown_fields): - ''' - arch : str - availability_zone : str - cpu_cores : int - cpu_power : int - mem : int - root_disk : int - root_disk_source : str - tags : typing.Sequence[str] - virt_type : str - ''' - arch_ = arch - availability_zone_ = availability_zone - cpu_cores_ = cpu_cores - cpu_power_ = cpu_power - mem_ = mem - root_disk_ = root_disk - root_disk_source_ = root_disk_source - tags_ = tags - virt_type_ = virt_type - - # Validate arguments against known Juju API types. - if arch_ is not None and not isinstance(arch_, (bytes, str)): - raise Exception("Expected arch_ to be a str, received: {}".format(type(arch_))) - - if availability_zone_ is not None and not isinstance(availability_zone_, (bytes, str)): - raise Exception("Expected availability_zone_ to be a str, received: {}".format(type(availability_zone_))) - - if cpu_cores_ is not None and not isinstance(cpu_cores_, int): - raise Exception("Expected cpu_cores_ to be a int, received: {}".format(type(cpu_cores_))) - - if cpu_power_ is not None and not isinstance(cpu_power_, int): - raise Exception("Expected cpu_power_ to be a int, received: {}".format(type(cpu_power_))) - - if mem_ is not None and not isinstance(mem_, int): - raise Exception("Expected mem_ to be a int, received: {}".format(type(mem_))) - - if root_disk_ is not None and not isinstance(root_disk_, int): - raise Exception("Expected root_disk_ to be a int, received: {}".format(type(root_disk_))) - - if root_disk_source_ is not None and not isinstance(root_disk_source_, (bytes, str)): - raise Exception("Expected root_disk_source_ to be a str, received: {}".format(type(root_disk_source_))) - - if tags_ is not None and not isinstance(tags_, (bytes, str, list)): - raise Exception("Expected tags_ to be a Sequence, received: {}".format(type(tags_))) - - if virt_type_ is not None and not isinstance(virt_type_, (bytes, str)): - raise Exception("Expected virt_type_ to be a str, received: {}".format(type(virt_type_))) - - self.arch = arch_ - self.availability_zone = availability_zone_ - self.cpu_cores = cpu_cores_ - self.cpu_power = cpu_power_ - self.mem = mem_ - self.root_disk = root_disk_ - self.root_disk_source = root_disk_source_ - self.tags = tags_ - self.virt_type = virt_type_ - self.unknown_fields = unknown_fields - - - -class History(Type): - _toSchema = {'error': 'error', 'statuses': 'statuses'} - _toPy = {'error': 'error', 'statuses': 'statuses'} - def __init__(self, error=None, statuses=None, **unknown_fields): - ''' - error : Error - statuses : typing.Sequence[~DetailedStatus] - ''' - error_ = Error.from_json(error) if error else None - statuses_ = [DetailedStatus.from_json(o) for o in statuses or []] - - # Validate arguments against known Juju API types. - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - - if statuses_ is not None and not isinstance(statuses_, (bytes, str, list)): - raise Exception("Expected statuses_ to be a Sequence, received: {}".format(type(statuses_))) - - self.error = error_ - self.statuses = statuses_ - self.unknown_fields = unknown_fields - - - -class HostNetworkChange(Type): - _toSchema = {'error': 'error', 'new_bridges': 'new-bridges', 'reconfigure_delay': 'reconfigure-delay'} - _toPy = {'error': 'error', 'new-bridges': 'new_bridges', 'reconfigure-delay': 'reconfigure_delay'} - def __init__(self, error=None, new_bridges=None, reconfigure_delay=None, **unknown_fields): - ''' - error : Error - new_bridges : typing.Sequence[~DeviceBridgeInfo] - reconfigure_delay : int - ''' - error_ = Error.from_json(error) if error else None - new_bridges_ = [DeviceBridgeInfo.from_json(o) for o in new_bridges or []] - reconfigure_delay_ = reconfigure_delay - - # Validate arguments against known Juju API types. - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - - if new_bridges_ is not None and not isinstance(new_bridges_, (bytes, str, list)): - raise Exception("Expected new_bridges_ to be a Sequence, received: {}".format(type(new_bridges_))) - - if reconfigure_delay_ is not None and not isinstance(reconfigure_delay_, int): - raise Exception("Expected reconfigure_delay_ to be a int, received: {}".format(type(reconfigure_delay_))) - - self.error = error_ - self.new_bridges = new_bridges_ - self.reconfigure_delay = reconfigure_delay_ - self.unknown_fields = unknown_fields - - - -class HostNetworkChangeResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None, **unknown_fields): - ''' - results : typing.Sequence[~HostNetworkChange] - ''' - results_ = [HostNetworkChange.from_json(o) for o in results or []] - - # Validate arguments against known Juju API types. - if results_ is not None and not isinstance(results_, (bytes, str, list)): - raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) - - self.results = results_ - self.unknown_fields = unknown_fields - - - -class HostPort(Type): - _toSchema = {'address': 'Address', 'cidr': 'cidr', 'config_type': 'config-type', 'is_secondary': 'is-secondary', 'port': 'port', 'scope': 'scope', 'space_id': 'space-id', 'space_name': 'space-name', 'type_': 'type', 'value': 'value'} - _toPy = {'Address': 'address', 'cidr': 'cidr', 'config-type': 'config_type', 'is-secondary': 'is_secondary', 'port': 'port', 'scope': 'scope', 'space-id': 'space_id', 'space-name': 'space_name', 'type': 'type_', 'value': 'value'} - def __init__(self, address=None, cidr=None, config_type=None, is_secondary=None, port=None, scope=None, space_id=None, space_name=None, type_=None, value=None, **unknown_fields): - ''' - address : Address - cidr : str - config_type : str - is_secondary : bool - port : int - scope : str - space_id : str - space_name : str - type_ : str - value : str - ''' - address_ = Address.from_json(address) if address else None - cidr_ = cidr - config_type_ = config_type - is_secondary_ = is_secondary - port_ = port - scope_ = scope - space_id_ = space_id - space_name_ = space_name - type__ = type_ - value_ = value - - # Validate arguments against known Juju API types. - if address_ is not None and not isinstance(address_, (dict, Address)): - raise Exception("Expected address_ to be a Address, received: {}".format(type(address_))) - - if cidr_ is not None and not isinstance(cidr_, (bytes, str)): - raise Exception("Expected cidr_ to be a str, received: {}".format(type(cidr_))) - - if config_type_ is not None and not isinstance(config_type_, (bytes, str)): - raise Exception("Expected config_type_ to be a str, received: {}".format(type(config_type_))) - - if is_secondary_ is not None and not isinstance(is_secondary_, bool): - raise Exception("Expected is_secondary_ to be a bool, received: {}".format(type(is_secondary_))) - - if port_ is not None and not isinstance(port_, int): - raise Exception("Expected port_ to be a int, received: {}".format(type(port_))) - - if scope_ is not None and not isinstance(scope_, (bytes, str)): - raise Exception("Expected scope_ to be a str, received: {}".format(type(scope_))) - - if space_id_ is not None and not isinstance(space_id_, (bytes, str)): - raise Exception("Expected space_id_ to be a str, received: {}".format(type(space_id_))) - - if space_name_ is not None and not isinstance(space_name_, (bytes, str)): - raise Exception("Expected space_name_ to be a str, received: {}".format(type(space_name_))) - - if type__ is not None and not isinstance(type__, (bytes, str)): - raise Exception("Expected type__ to be a str, received: {}".format(type(type__))) - - if value_ is not None and not isinstance(value_, (bytes, str)): - raise Exception("Expected value_ to be a str, received: {}".format(type(value_))) - - self.address = address_ - self.cidr = cidr_ - self.config_type = config_type_ - self.is_secondary = is_secondary_ - self.port = port_ - self.scope = scope_ - self.space_id = space_id_ - self.space_name = space_name_ - self.type_ = type__ - self.value = value_ - self.unknown_fields = unknown_fields - - - -class HostedModelConfig(Type): - _toSchema = {'cloud_spec': 'cloud-spec', 'config': 'config', 'error': 'error', 'name': 'name', 'owner': 'owner'} - _toPy = {'cloud-spec': 'cloud_spec', 'config': 'config', 'error': 'error', 'name': 'name', 'owner': 'owner'} - def __init__(self, cloud_spec=None, config=None, error=None, name=None, owner=None, **unknown_fields): - ''' - cloud_spec : CloudSpec - config : typing.Mapping[str, typing.Any] - error : Error - name : str - owner : str - ''' - cloud_spec_ = CloudSpec.from_json(cloud_spec) if cloud_spec else None - config_ = config - error_ = Error.from_json(error) if error else None - name_ = name - owner_ = owner - - # Validate arguments against known Juju API types. - if cloud_spec_ is not None and not isinstance(cloud_spec_, (dict, CloudSpec)): - raise Exception("Expected cloud_spec_ to be a CloudSpec, received: {}".format(type(cloud_spec_))) - - if config_ is not None and not isinstance(config_, dict): - raise Exception("Expected config_ to be a Mapping, received: {}".format(type(config_))) - - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - - if name_ is not None and not isinstance(name_, (bytes, str)): - raise Exception("Expected name_ to be a str, received: {}".format(type(name_))) - - if owner_ is not None and not isinstance(owner_, (bytes, str)): - raise Exception("Expected owner_ to be a str, received: {}".format(type(owner_))) - - self.cloud_spec = cloud_spec_ - self.config = config_ - self.error = error_ - self.name = name_ - self.owner = owner_ - self.unknown_fields = unknown_fields - - - -class HostedModelConfigsResults(Type): - _toSchema = {'models': 'models'} - _toPy = {'models': 'models'} - def __init__(self, models=None, **unknown_fields): - ''' - models : typing.Sequence[~HostedModelConfig] - ''' - models_ = [HostedModelConfig.from_json(o) for o in models or []] - - # Validate arguments against known Juju API types. - if models_ is not None and not isinstance(models_, (bytes, str, list)): - raise Exception("Expected models_ to be a Sequence, received: {}".format(type(models_))) - - self.models = models_ - self.unknown_fields = unknown_fields - - - -class ImageMetadataFilter(Type): - _toSchema = {'arches': 'arches', 'region': 'region', 'root_storage_type': 'root-storage-type', 'stream': 'stream', 'versions': 'versions', 'virt_type': 'virt-type'} - _toPy = {'arches': 'arches', 'region': 'region', 'root-storage-type': 'root_storage_type', 'stream': 'stream', 'versions': 'versions', 'virt-type': 'virt_type'} - def __init__(self, arches=None, region=None, root_storage_type=None, stream=None, versions=None, virt_type=None, **unknown_fields): - ''' - arches : typing.Sequence[str] - region : str - root_storage_type : str - stream : str - versions : typing.Sequence[str] - virt_type : str - ''' - arches_ = arches - region_ = region - root_storage_type_ = root_storage_type - stream_ = stream - versions_ = versions - virt_type_ = virt_type - - # Validate arguments against known Juju API types. - if arches_ is not None and not isinstance(arches_, (bytes, str, list)): - raise Exception("Expected arches_ to be a Sequence, received: {}".format(type(arches_))) - - if region_ is not None and not isinstance(region_, (bytes, str)): - raise Exception("Expected region_ to be a str, received: {}".format(type(region_))) - - if root_storage_type_ is not None and not isinstance(root_storage_type_, (bytes, str)): - raise Exception("Expected root_storage_type_ to be a str, received: {}".format(type(root_storage_type_))) - - if stream_ is not None and not isinstance(stream_, (bytes, str)): - raise Exception("Expected stream_ to be a str, received: {}".format(type(stream_))) - - if versions_ is not None and not isinstance(versions_, (bytes, str, list)): - raise Exception("Expected versions_ to be a Sequence, received: {}".format(type(versions_))) - - if virt_type_ is not None and not isinstance(virt_type_, (bytes, str)): - raise Exception("Expected virt_type_ to be a str, received: {}".format(type(virt_type_))) - - self.arches = arches_ - self.region = region_ - self.root_storage_type = root_storage_type_ - self.stream = stream_ - self.versions = versions_ - self.virt_type = virt_type_ - self.unknown_fields = unknown_fields - - - -class ImportStorageDetails(Type): - _toSchema = {'storage_tag': 'storage-tag'} - _toPy = {'storage-tag': 'storage_tag'} - def __init__(self, storage_tag=None, **unknown_fields): - ''' - storage_tag : str - ''' - storage_tag_ = storage_tag - - # Validate arguments against known Juju API types. - if storage_tag_ is not None and not isinstance(storage_tag_, (bytes, str)): - raise Exception("Expected storage_tag_ to be a str, received: {}".format(type(storage_tag_))) - - self.storage_tag = storage_tag_ - self.unknown_fields = unknown_fields - - - -class ImportStorageParams(Type): - _toSchema = {'kind': 'kind', 'pool': 'pool', 'provider_id': 'provider-id', 'storage_name': 'storage-name'} - _toPy = {'kind': 'kind', 'pool': 'pool', 'provider-id': 'provider_id', 'storage-name': 'storage_name'} - def __init__(self, kind=None, pool=None, provider_id=None, storage_name=None, **unknown_fields): - ''' - kind : int - pool : str - provider_id : str - storage_name : str - ''' - kind_ = kind - pool_ = pool - provider_id_ = provider_id - storage_name_ = storage_name - - # Validate arguments against known Juju API types. - if kind_ is not None and not isinstance(kind_, int): - raise Exception("Expected kind_ to be a int, received: {}".format(type(kind_))) - - if pool_ is not None and not isinstance(pool_, (bytes, str)): - raise Exception("Expected pool_ to be a str, received: {}".format(type(pool_))) - - if provider_id_ is not None and not isinstance(provider_id_, (bytes, str)): - raise Exception("Expected provider_id_ to be a str, received: {}".format(type(provider_id_))) - - if storage_name_ is not None and not isinstance(storage_name_, (bytes, str)): - raise Exception("Expected storage_name_ to be a str, received: {}".format(type(storage_name_))) - - self.kind = kind_ - self.pool = pool_ - self.provider_id = provider_id_ - self.storage_name = storage_name_ - self.unknown_fields = unknown_fields - - - -class ImportStorageResult(Type): - _toSchema = {'error': 'error', 'result': 'result'} - _toPy = {'error': 'error', 'result': 'result'} - def __init__(self, error=None, result=None, **unknown_fields): - ''' - error : Error - result : ImportStorageDetails - ''' - error_ = Error.from_json(error) if error else None - result_ = ImportStorageDetails.from_json(result) if result else None - - # Validate arguments against known Juju API types. - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - - if result_ is not None and not isinstance(result_, (dict, ImportStorageDetails)): - raise Exception("Expected result_ to be a ImportStorageDetails, received: {}".format(type(result_))) - - self.error = error_ - self.result = result_ - self.unknown_fields = unknown_fields - - - -class ImportStorageResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None, **unknown_fields): - ''' - results : typing.Sequence[~ImportStorageResult] - ''' - results_ = [ImportStorageResult.from_json(o) for o in results or []] - - # Validate arguments against known Juju API types. - if results_ is not None and not isinstance(results_, (bytes, str, list)): - raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) - - self.results = results_ - self.unknown_fields = unknown_fields - - - -class IngressNetworksChangeEvent(Type): - _toSchema = {'bakery_version': 'bakery-version', 'ingress_required': 'ingress-required', 'macaroons': 'macaroons', 'networks': 'networks', 'relation_token': 'relation-token'} - _toPy = {'bakery-version': 'bakery_version', 'ingress-required': 'ingress_required', 'macaroons': 'macaroons', 'networks': 'networks', 'relation-token': 'relation_token'} - def __init__(self, bakery_version=None, ingress_required=None, macaroons=None, networks=None, relation_token=None, **unknown_fields): - ''' - bakery_version : int - ingress_required : bool - macaroons : typing.Sequence[~Macaroon] - networks : typing.Sequence[str] - relation_token : str - ''' - bakery_version_ = bakery_version - ingress_required_ = ingress_required - macaroons_ = [Macaroon.from_json(o) for o in macaroons or []] - networks_ = networks - relation_token_ = relation_token - - # Validate arguments against known Juju API types. - if bakery_version_ is not None and not isinstance(bakery_version_, int): - raise Exception("Expected bakery_version_ to be a int, received: {}".format(type(bakery_version_))) - - if ingress_required_ is not None and not isinstance(ingress_required_, bool): - raise Exception("Expected ingress_required_ to be a bool, received: {}".format(type(ingress_required_))) - - if macaroons_ is not None and not isinstance(macaroons_, (bytes, str, list)): - raise Exception("Expected macaroons_ to be a Sequence, received: {}".format(type(macaroons_))) - - if networks_ is not None and not isinstance(networks_, (bytes, str, list)): - raise Exception("Expected networks_ to be a Sequence, received: {}".format(type(networks_))) - - if relation_token_ is not None and not isinstance(relation_token_, (bytes, str)): - raise Exception("Expected relation_token_ to be a str, received: {}".format(type(relation_token_))) - - self.bakery_version = bakery_version_ - self.ingress_required = ingress_required_ - self.macaroons = macaroons_ - self.networks = networks_ - self.relation_token = relation_token_ - self.unknown_fields = unknown_fields - - - -class IngressNetworksChanges(Type): - _toSchema = {'changes': 'changes'} - _toPy = {'changes': 'changes'} - def __init__(self, changes=None, **unknown_fields): - ''' - changes : typing.Sequence[~IngressNetworksChangeEvent] - ''' - changes_ = [IngressNetworksChangeEvent.from_json(o) for o in changes or []] - - # Validate arguments against known Juju API types. - if changes_ is not None and not isinstance(changes_, (bytes, str, list)): - raise Exception("Expected changes_ to be a Sequence, received: {}".format(type(changes_))) - - self.changes = changes_ - self.unknown_fields = unknown_fields - - - -class IngressRule(Type): - _toSchema = {'port_range': 'port-range', 'source_cidrs': 'source-cidrs'} - _toPy = {'port-range': 'port_range', 'source-cidrs': 'source_cidrs'} - def __init__(self, port_range=None, source_cidrs=None, **unknown_fields): - ''' - port_range : PortRange - source_cidrs : typing.Sequence[str] - ''' - port_range_ = PortRange.from_json(port_range) if port_range else None - source_cidrs_ = source_cidrs - - # Validate arguments against known Juju API types. - if port_range_ is not None and not isinstance(port_range_, (dict, PortRange)): - raise Exception("Expected port_range_ to be a PortRange, received: {}".format(type(port_range_))) - - if source_cidrs_ is not None and not isinstance(source_cidrs_, (bytes, str, list)): - raise Exception("Expected source_cidrs_ to be a Sequence, received: {}".format(type(source_cidrs_))) - - self.port_range = port_range_ - self.source_cidrs = source_cidrs_ - self.unknown_fields = unknown_fields - - - -class IngressRulesResult(Type): - _toSchema = {'error': 'error', 'rules': 'rules'} - _toPy = {'error': 'error', 'rules': 'rules'} - def __init__(self, error=None, rules=None, **unknown_fields): - ''' - error : Error - rules : typing.Sequence[~IngressRule] - ''' - error_ = Error.from_json(error) if error else None - rules_ = [IngressRule.from_json(o) for o in rules or []] - - # Validate arguments against known Juju API types. - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - - if rules_ is not None and not isinstance(rules_, (bytes, str, list)): - raise Exception("Expected rules_ to be a Sequence, received: {}".format(type(rules_))) - - self.error = error_ - self.rules = rules_ - self.unknown_fields = unknown_fields - - - -class InitiateMigrationArgs(Type): - _toSchema = {'specs': 'specs'} - _toPy = {'specs': 'specs'} - def __init__(self, specs=None, **unknown_fields): - ''' - specs : typing.Sequence[~MigrationSpec] - ''' - specs_ = [MigrationSpec.from_json(o) for o in specs or []] - - # Validate arguments against known Juju API types. - if specs_ is not None and not isinstance(specs_, (bytes, str, list)): - raise Exception("Expected specs_ to be a Sequence, received: {}".format(type(specs_))) - - self.specs = specs_ - self.unknown_fields = unknown_fields - - - -class InitiateMigrationResult(Type): - _toSchema = {'error': 'error', 'migration_id': 'migration-id', 'model_tag': 'model-tag'} - _toPy = {'error': 'error', 'migration-id': 'migration_id', 'model-tag': 'model_tag'} - def __init__(self, error=None, migration_id=None, model_tag=None, **unknown_fields): - ''' - error : Error - migration_id : str - model_tag : str - ''' - error_ = Error.from_json(error) if error else None - migration_id_ = migration_id - model_tag_ = model_tag - - # Validate arguments against known Juju API types. - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - - if migration_id_ is not None and not isinstance(migration_id_, (bytes, str)): - raise Exception("Expected migration_id_ to be a str, received: {}".format(type(migration_id_))) - - if model_tag_ is not None and not isinstance(model_tag_, (bytes, str)): - raise Exception("Expected model_tag_ to be a str, received: {}".format(type(model_tag_))) - - self.error = error_ - self.migration_id = migration_id_ - self.model_tag = model_tag_ - self.unknown_fields = unknown_fields - - - -class InitiateMigrationResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None, **unknown_fields): - ''' - results : typing.Sequence[~InitiateMigrationResult] - ''' - results_ = [InitiateMigrationResult.from_json(o) for o in results or []] - - # Validate arguments against known Juju API types. - if results_ is not None and not isinstance(results_, (bytes, str, list)): - raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) - - self.results = results_ - self.unknown_fields = unknown_fields - - - -class InstanceInfo(Type): - _toSchema = {'characteristics': 'characteristics', 'charm_profiles': 'charm-profiles', 'display_name': 'display-name', 'instance_id': 'instance-id', 'network_config': 'network-config', 'nonce': 'nonce', 'tag': 'tag', 'volume_attachments': 'volume-attachments', 'volumes': 'volumes'} - _toPy = {'characteristics': 'characteristics', 'charm-profiles': 'charm_profiles', 'display-name': 'display_name', 'instance-id': 'instance_id', 'network-config': 'network_config', 'nonce': 'nonce', 'tag': 'tag', 'volume-attachments': 'volume_attachments', 'volumes': 'volumes'} - def __init__(self, characteristics=None, charm_profiles=None, display_name=None, instance_id=None, network_config=None, nonce=None, tag=None, volume_attachments=None, volumes=None, **unknown_fields): - ''' - characteristics : HardwareCharacteristics - charm_profiles : typing.Sequence[str] - display_name : str - instance_id : str - network_config : typing.Sequence[~NetworkConfig] - nonce : str - tag : str - volume_attachments : typing.Mapping[str, ~VolumeAttachmentInfo] - volumes : typing.Sequence[~Volume] - ''' - characteristics_ = HardwareCharacteristics.from_json(characteristics) if characteristics else None - charm_profiles_ = charm_profiles - display_name_ = display_name - instance_id_ = instance_id - network_config_ = [NetworkConfig.from_json(o) for o in network_config or []] - nonce_ = nonce - tag_ = tag - volume_attachments_ = {k: VolumeAttachmentInfo.from_json(v) for k, v in (volume_attachments or dict()).items()} - volumes_ = [Volume.from_json(o) for o in volumes or []] - - # Validate arguments against known Juju API types. - if characteristics_ is not None and not isinstance(characteristics_, (dict, HardwareCharacteristics)): - raise Exception("Expected characteristics_ to be a HardwareCharacteristics, received: {}".format(type(characteristics_))) - - if charm_profiles_ is not None and not isinstance(charm_profiles_, (bytes, str, list)): - raise Exception("Expected charm_profiles_ to be a Sequence, received: {}".format(type(charm_profiles_))) - - if display_name_ is not None and not isinstance(display_name_, (bytes, str)): - raise Exception("Expected display_name_ to be a str, received: {}".format(type(display_name_))) - - if instance_id_ is not None and not isinstance(instance_id_, (bytes, str)): - raise Exception("Expected instance_id_ to be a str, received: {}".format(type(instance_id_))) - - if network_config_ is not None and not isinstance(network_config_, (bytes, str, list)): - raise Exception("Expected network_config_ to be a Sequence, received: {}".format(type(network_config_))) - - if nonce_ is not None and not isinstance(nonce_, (bytes, str)): - raise Exception("Expected nonce_ to be a str, received: {}".format(type(nonce_))) - - if tag_ is not None and not isinstance(tag_, (bytes, str)): - raise Exception("Expected tag_ to be a str, received: {}".format(type(tag_))) - - if volume_attachments_ is not None and not isinstance(volume_attachments_, dict): - raise Exception("Expected volume_attachments_ to be a Mapping, received: {}".format(type(volume_attachments_))) - - if volumes_ is not None and not isinstance(volumes_, (bytes, str, list)): - raise Exception("Expected volumes_ to be a Sequence, received: {}".format(type(volumes_))) - - self.characteristics = characteristics_ - self.charm_profiles = charm_profiles_ - self.display_name = display_name_ - self.instance_id = instance_id_ - self.network_config = network_config_ - self.nonce = nonce_ - self.tag = tag_ - self.volume_attachments = volume_attachments_ - self.volumes = volumes_ - self.unknown_fields = unknown_fields - - - -class InstanceType(Type): - _toSchema = {'arches': 'arches', 'cost': 'cost', 'cpu_cores': 'cpu-cores', 'memory': 'memory', 'name': 'name', 'root_disk': 'root-disk', 'virt_type': 'virt-type'} - _toPy = {'arches': 'arches', 'cost': 'cost', 'cpu-cores': 'cpu_cores', 'memory': 'memory', 'name': 'name', 'root-disk': 'root_disk', 'virt-type': 'virt_type'} - def __init__(self, arches=None, cost=None, cpu_cores=None, memory=None, name=None, root_disk=None, virt_type=None, **unknown_fields): - ''' - arches : typing.Sequence[str] - cost : int - cpu_cores : int - memory : int - name : str - root_disk : int - virt_type : str - ''' - arches_ = arches - cost_ = cost - cpu_cores_ = cpu_cores - memory_ = memory - name_ = name - root_disk_ = root_disk - virt_type_ = virt_type - - # Validate arguments against known Juju API types. - if arches_ is not None and not isinstance(arches_, (bytes, str, list)): - raise Exception("Expected arches_ to be a Sequence, received: {}".format(type(arches_))) - - if cost_ is not None and not isinstance(cost_, int): - raise Exception("Expected cost_ to be a int, received: {}".format(type(cost_))) - - if cpu_cores_ is not None and not isinstance(cpu_cores_, int): - raise Exception("Expected cpu_cores_ to be a int, received: {}".format(type(cpu_cores_))) - - if memory_ is not None and not isinstance(memory_, int): - raise Exception("Expected memory_ to be a int, received: {}".format(type(memory_))) - - if name_ is not None and not isinstance(name_, (bytes, str)): - raise Exception("Expected name_ to be a str, received: {}".format(type(name_))) - - if root_disk_ is not None and not isinstance(root_disk_, int): - raise Exception("Expected root_disk_ to be a int, received: {}".format(type(root_disk_))) - - if virt_type_ is not None and not isinstance(virt_type_, (bytes, str)): - raise Exception("Expected virt_type_ to be a str, received: {}".format(type(virt_type_))) - - self.arches = arches_ - self.cost = cost_ - self.cpu_cores = cpu_cores_ - self.memory = memory_ - self.name = name_ - self.root_disk = root_disk_ - self.virt_type = virt_type_ - self.unknown_fields = unknown_fields - - - -class InstanceTypesResult(Type): - _toSchema = {'cost_currency': 'cost-currency', 'cost_divisor': 'cost-divisor', 'cost_unit': 'cost-unit', 'error': 'error', 'instance_types': 'instance-types'} - _toPy = {'cost-currency': 'cost_currency', 'cost-divisor': 'cost_divisor', 'cost-unit': 'cost_unit', 'error': 'error', 'instance-types': 'instance_types'} - def __init__(self, cost_currency=None, cost_divisor=None, cost_unit=None, error=None, instance_types=None, **unknown_fields): - ''' - cost_currency : str - cost_divisor : int - cost_unit : str - error : Error - instance_types : typing.Sequence[~InstanceType] - ''' - cost_currency_ = cost_currency - cost_divisor_ = cost_divisor - cost_unit_ = cost_unit - error_ = Error.from_json(error) if error else None - instance_types_ = [InstanceType.from_json(o) for o in instance_types or []] - - # Validate arguments against known Juju API types. - if cost_currency_ is not None and not isinstance(cost_currency_, (bytes, str)): - raise Exception("Expected cost_currency_ to be a str, received: {}".format(type(cost_currency_))) - - if cost_divisor_ is not None and not isinstance(cost_divisor_, int): - raise Exception("Expected cost_divisor_ to be a int, received: {}".format(type(cost_divisor_))) - - if cost_unit_ is not None and not isinstance(cost_unit_, (bytes, str)): - raise Exception("Expected cost_unit_ to be a str, received: {}".format(type(cost_unit_))) - - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - - if instance_types_ is not None and not isinstance(instance_types_, (bytes, str, list)): - raise Exception("Expected instance_types_ to be a Sequence, received: {}".format(type(instance_types_))) - - self.cost_currency = cost_currency_ - self.cost_divisor = cost_divisor_ - self.cost_unit = cost_unit_ - self.error = error_ - self.instance_types = instance_types_ - self.unknown_fields = unknown_fields - - - -class InstanceTypesResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None, **unknown_fields): - ''' - results : typing.Sequence[~InstanceTypesResult] - ''' - results_ = [InstanceTypesResult.from_json(o) for o in results or []] - - # Validate arguments against known Juju API types. - if results_ is not None and not isinstance(results_, (bytes, str, list)): - raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) - - self.results = results_ - self.unknown_fields = unknown_fields - - - -class InstancesInfo(Type): - _toSchema = {'machines': 'machines'} - _toPy = {'machines': 'machines'} - def __init__(self, machines=None, **unknown_fields): - ''' - machines : typing.Sequence[~InstanceInfo] - ''' - machines_ = [InstanceInfo.from_json(o) for o in machines or []] - - # Validate arguments against known Juju API types. - if machines_ is not None and not isinstance(machines_, (bytes, str, list)): - raise Exception("Expected machines_ to be a Sequence, received: {}".format(type(machines_))) - - self.machines = machines_ - self.unknown_fields = unknown_fields - - - -class IntResult(Type): - _toSchema = {'error': 'error', 'result': 'result'} - _toPy = {'error': 'error', 'result': 'result'} - def __init__(self, error=None, result=None, **unknown_fields): - ''' - error : Error - result : int - ''' - error_ = Error.from_json(error) if error else None - result_ = result - - # Validate arguments against known Juju API types. - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - - if result_ is not None and not isinstance(result_, int): - raise Exception("Expected result_ to be a int, received: {}".format(type(result_))) - - self.error = error_ - self.result = result_ - self.unknown_fields = unknown_fields - - - -class IntResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None, **unknown_fields): - ''' - results : typing.Sequence[~IntResult] - ''' - results_ = [IntResult.from_json(o) for o in results or []] - - # Validate arguments against known Juju API types. - if results_ is not None and not isinstance(results_, (bytes, str, list)): - raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) - - self.results = results_ - self.unknown_fields = unknown_fields - - - -class InterfaceAddress(Type): - _toSchema = {'cidr': 'cidr', 'hostname': 'hostname', 'value': 'value'} - _toPy = {'cidr': 'cidr', 'hostname': 'hostname', 'value': 'value'} - def __init__(self, cidr=None, hostname=None, value=None, **unknown_fields): - ''' - cidr : str - hostname : str - value : str - ''' - cidr_ = cidr - hostname_ = hostname - value_ = value - - # Validate arguments against known Juju API types. - if cidr_ is not None and not isinstance(cidr_, (bytes, str)): - raise Exception("Expected cidr_ to be a str, received: {}".format(type(cidr_))) - - if hostname_ is not None and not isinstance(hostname_, (bytes, str)): - raise Exception("Expected hostname_ to be a str, received: {}".format(type(hostname_))) - - if value_ is not None and not isinstance(value_, (bytes, str)): - raise Exception("Expected value_ to be a str, received: {}".format(type(value_))) - - self.cidr = cidr_ - self.hostname = hostname_ - self.value = value_ - self.unknown_fields = unknown_fields - - - -class InvalidateCredentialArg(Type): - _toSchema = {'reason': 'reason'} - _toPy = {'reason': 'reason'} - def __init__(self, reason=None, **unknown_fields): - ''' - reason : str - ''' - reason_ = reason - - # Validate arguments against known Juju API types. - if reason_ is not None and not isinstance(reason_, (bytes, str)): - raise Exception("Expected reason_ to be a str, received: {}".format(type(reason_))) - - self.reason = reason_ - self.unknown_fields = unknown_fields - - - -class IsMasterResult(Type): - _toSchema = {'master': 'master'} - _toPy = {'master': 'master'} - def __init__(self, master=None, **unknown_fields): - ''' - master : bool - ''' - master_ = master - - # Validate arguments against known Juju API types. - if master_ is not None and not isinstance(master_, bool): - raise Exception("Expected master_ to be a bool, received: {}".format(type(master_))) - - self.master = master_ - self.unknown_fields = unknown_fields - - - -class IsMeteredResult(Type): - _toSchema = {'metered': 'metered'} - _toPy = {'metered': 'metered'} - def __init__(self, metered=None, **unknown_fields): - ''' - metered : bool - ''' - metered_ = metered - - # Validate arguments against known Juju API types. - if metered_ is not None and not isinstance(metered_, bool): - raise Exception("Expected metered_ to be a bool, received: {}".format(type(metered_))) - - self.metered = metered_ - self.unknown_fields = unknown_fields - - - -class IssueOperatorCertificateResult(Type): - _toSchema = {'ca_cert': 'ca-cert', 'cert': 'cert', 'error': 'error', 'private_key': 'private-key'} - _toPy = {'ca-cert': 'ca_cert', 'cert': 'cert', 'error': 'error', 'private-key': 'private_key'} - def __init__(self, ca_cert=None, cert=None, error=None, private_key=None, **unknown_fields): - ''' - ca_cert : str - cert : str - error : Error - private_key : str - ''' - ca_cert_ = ca_cert - cert_ = cert - error_ = Error.from_json(error) if error else None - private_key_ = private_key - - # Validate arguments against known Juju API types. - if ca_cert_ is not None and not isinstance(ca_cert_, (bytes, str)): - raise Exception("Expected ca_cert_ to be a str, received: {}".format(type(ca_cert_))) - - if cert_ is not None and not isinstance(cert_, (bytes, str)): - raise Exception("Expected cert_ to be a str, received: {}".format(type(cert_))) - - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - - if private_key_ is not None and not isinstance(private_key_, (bytes, str)): - raise Exception("Expected private_key_ to be a str, received: {}".format(type(private_key_))) - - self.ca_cert = ca_cert_ - self.cert = cert_ - self.error = error_ - self.private_key = private_key_ - self.unknown_fields = unknown_fields - - - -class IssueOperatorCertificateResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None, **unknown_fields): - ''' - results : typing.Sequence[~IssueOperatorCertificateResult] - ''' - results_ = [IssueOperatorCertificateResult.from_json(o) for o in results or []] - - # Validate arguments against known Juju API types. - if results_ is not None and not isinstance(results_, (bytes, str, list)): - raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) - - self.results = results_ - self.unknown_fields = unknown_fields - - - -class JobsResult(Type): - _toSchema = {'error': 'error', 'jobs': 'jobs'} - _toPy = {'error': 'error', 'jobs': 'jobs'} - def __init__(self, error=None, jobs=None, **unknown_fields): - ''' - error : Error - jobs : typing.Sequence[str] - ''' - error_ = Error.from_json(error) if error else None - jobs_ = jobs - - # Validate arguments against known Juju API types. - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - - if jobs_ is not None and not isinstance(jobs_, (bytes, str, list)): - raise Exception("Expected jobs_ to be a Sequence, received: {}".format(type(jobs_))) - - self.error = error_ - self.jobs = jobs_ - self.unknown_fields = unknown_fields - - - -class JobsResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None, **unknown_fields): - ''' - results : typing.Sequence[~JobsResult] - ''' - results_ = [JobsResult.from_json(o) for o in results or []] - - # Validate arguments against known Juju API types. - if results_ is not None and not isinstance(results_, (bytes, str, list)): - raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) - - self.results = results_ - self.unknown_fields = unknown_fields - - - -class KnownServiceArgs(Type): - _toSchema = {'known_services': 'known-services'} - _toPy = {'known-services': 'known_services'} - def __init__(self, known_services=None, **unknown_fields): - ''' - known_services : typing.Sequence[str] - ''' - known_services_ = known_services - - # Validate arguments against known Juju API types. - if known_services_ is not None and not isinstance(known_services_, (bytes, str, list)): - raise Exception("Expected known_services_ to be a Sequence, received: {}".format(type(known_services_))) - - self.known_services = known_services_ - self.unknown_fields = unknown_fields - - - -class KubernetesDeploymentInfo(Type): - _toSchema = {'deployment_type': 'deployment-type', 'service_type': 'service-type'} - _toPy = {'deployment-type': 'deployment_type', 'service-type': 'service_type'} - def __init__(self, deployment_type=None, service_type=None, **unknown_fields): - ''' - deployment_type : str - service_type : str - ''' - deployment_type_ = deployment_type - service_type_ = service_type - - # Validate arguments against known Juju API types. - if deployment_type_ is not None and not isinstance(deployment_type_, (bytes, str)): - raise Exception("Expected deployment_type_ to be a str, received: {}".format(type(deployment_type_))) - - if service_type_ is not None and not isinstance(service_type_, (bytes, str)): - raise Exception("Expected service_type_ to be a str, received: {}".format(type(service_type_))) - - self.deployment_type = deployment_type_ - self.service_type = service_type_ - self.unknown_fields = unknown_fields - - - -class KubernetesDeviceParams(Type): - _toSchema = {'attributes': 'Attributes', 'count': 'Count', 'type_': 'Type'} - _toPy = {'Attributes': 'attributes', 'Count': 'count', 'Type': 'type_'} - def __init__(self, attributes=None, count=None, type_=None, **unknown_fields): - ''' - attributes : typing.Mapping[str, str] - count : int - type_ : str - ''' - attributes_ = attributes - count_ = count - type__ = type_ - - # Validate arguments against known Juju API types. - if attributes_ is not None and not isinstance(attributes_, dict): - raise Exception("Expected attributes_ to be a Mapping, received: {}".format(type(attributes_))) - - if count_ is not None and not isinstance(count_, int): - raise Exception("Expected count_ to be a int, received: {}".format(type(count_))) - - if type__ is not None and not isinstance(type__, (bytes, str)): - raise Exception("Expected type__ to be a str, received: {}".format(type(type__))) - - self.attributes = attributes_ - self.count = count_ - self.type_ = type__ - self.unknown_fields = unknown_fields - - - -class KubernetesFilesystemAttachmentParams(Type): - _toSchema = {'mount_point': 'mount-point', 'provider': 'provider', 'read_only': 'read-only'} - _toPy = {'mount-point': 'mount_point', 'provider': 'provider', 'read-only': 'read_only'} - def __init__(self, mount_point=None, provider=None, read_only=None, **unknown_fields): - ''' - mount_point : str - provider : str - read_only : bool - ''' - mount_point_ = mount_point - provider_ = provider - read_only_ = read_only - - # Validate arguments against known Juju API types. - if mount_point_ is not None and not isinstance(mount_point_, (bytes, str)): - raise Exception("Expected mount_point_ to be a str, received: {}".format(type(mount_point_))) - - if provider_ is not None and not isinstance(provider_, (bytes, str)): - raise Exception("Expected provider_ to be a str, received: {}".format(type(provider_))) - - if read_only_ is not None and not isinstance(read_only_, bool): - raise Exception("Expected read_only_ to be a bool, received: {}".format(type(read_only_))) - - self.mount_point = mount_point_ - self.provider = provider_ - self.read_only = read_only_ - self.unknown_fields = unknown_fields - - - -class KubernetesFilesystemInfo(Type): - _toSchema = {'data': 'data', 'filesystem_id': 'filesystem-id', 'info': 'info', 'mount_point': 'mount-point', 'pool': 'pool', 'read_only': 'read-only', 'size': 'size', 'status': 'status', 'storagename': 'storagename', 'volume': 'volume'} - _toPy = {'data': 'data', 'filesystem-id': 'filesystem_id', 'info': 'info', 'mount-point': 'mount_point', 'pool': 'pool', 'read-only': 'read_only', 'size': 'size', 'status': 'status', 'storagename': 'storagename', 'volume': 'volume'} - def __init__(self, data=None, filesystem_id=None, info=None, mount_point=None, pool=None, read_only=None, size=None, status=None, storagename=None, volume=None, **unknown_fields): - ''' - data : typing.Mapping[str, typing.Any] - filesystem_id : str - info : str - mount_point : str - pool : str - read_only : bool - size : int - status : str - storagename : str - volume : KubernetesVolumeInfo - ''' - data_ = data - filesystem_id_ = filesystem_id - info_ = info - mount_point_ = mount_point - pool_ = pool - read_only_ = read_only - size_ = size - status_ = status - storagename_ = storagename - volume_ = KubernetesVolumeInfo.from_json(volume) if volume else None - - # Validate arguments against known Juju API types. - if data_ is not None and not isinstance(data_, dict): - raise Exception("Expected data_ to be a Mapping, received: {}".format(type(data_))) - - if filesystem_id_ is not None and not isinstance(filesystem_id_, (bytes, str)): - raise Exception("Expected filesystem_id_ to be a str, received: {}".format(type(filesystem_id_))) - - if info_ is not None and not isinstance(info_, (bytes, str)): - raise Exception("Expected info_ to be a str, received: {}".format(type(info_))) - - if mount_point_ is not None and not isinstance(mount_point_, (bytes, str)): - raise Exception("Expected mount_point_ to be a str, received: {}".format(type(mount_point_))) - - if pool_ is not None and not isinstance(pool_, (bytes, str)): - raise Exception("Expected pool_ to be a str, received: {}".format(type(pool_))) - - if read_only_ is not None and not isinstance(read_only_, bool): - raise Exception("Expected read_only_ to be a bool, received: {}".format(type(read_only_))) - - if size_ is not None and not isinstance(size_, int): - raise Exception("Expected size_ to be a int, received: {}".format(type(size_))) - - if status_ is not None and not isinstance(status_, (bytes, str)): - raise Exception("Expected status_ to be a str, received: {}".format(type(status_))) - - if storagename_ is not None and not isinstance(storagename_, (bytes, str)): - raise Exception("Expected storagename_ to be a str, received: {}".format(type(storagename_))) - - if volume_ is not None and not isinstance(volume_, (dict, KubernetesVolumeInfo)): - raise Exception("Expected volume_ to be a KubernetesVolumeInfo, received: {}".format(type(volume_))) - - self.data = data_ - self.filesystem_id = filesystem_id_ - self.info = info_ - self.mount_point = mount_point_ - self.pool = pool_ - self.read_only = read_only_ - self.size = size_ - self.status = status_ - self.storagename = storagename_ - self.volume = volume_ - self.unknown_fields = unknown_fields - - - -class KubernetesFilesystemParams(Type): - _toSchema = {'attachment': 'attachment', 'attributes': 'attributes', 'provider': 'provider', 'size': 'size', 'storagename': 'storagename', 'tags': 'tags'} - _toPy = {'attachment': 'attachment', 'attributes': 'attributes', 'provider': 'provider', 'size': 'size', 'storagename': 'storagename', 'tags': 'tags'} - def __init__(self, attachment=None, attributes=None, provider=None, size=None, storagename=None, tags=None, **unknown_fields): - ''' - attachment : KubernetesFilesystemAttachmentParams - attributes : typing.Mapping[str, typing.Any] - provider : str - size : int - storagename : str - tags : typing.Mapping[str, str] - ''' - attachment_ = KubernetesFilesystemAttachmentParams.from_json(attachment) if attachment else None - attributes_ = attributes - provider_ = provider - size_ = size - storagename_ = storagename - tags_ = tags - - # Validate arguments against known Juju API types. - if attachment_ is not None and not isinstance(attachment_, (dict, KubernetesFilesystemAttachmentParams)): - raise Exception("Expected attachment_ to be a KubernetesFilesystemAttachmentParams, received: {}".format(type(attachment_))) - - if attributes_ is not None and not isinstance(attributes_, dict): - raise Exception("Expected attributes_ to be a Mapping, received: {}".format(type(attributes_))) - - if provider_ is not None and not isinstance(provider_, (bytes, str)): - raise Exception("Expected provider_ to be a str, received: {}".format(type(provider_))) - - if size_ is not None and not isinstance(size_, int): - raise Exception("Expected size_ to be a int, received: {}".format(type(size_))) - - if storagename_ is not None and not isinstance(storagename_, (bytes, str)): - raise Exception("Expected storagename_ to be a str, received: {}".format(type(storagename_))) - - if tags_ is not None and not isinstance(tags_, dict): - raise Exception("Expected tags_ to be a Mapping, received: {}".format(type(tags_))) - - self.attachment = attachment_ - self.attributes = attributes_ - self.provider = provider_ - self.size = size_ - self.storagename = storagename_ - self.tags = tags_ - self.unknown_fields = unknown_fields - - - -class KubernetesProvisioningInfo(Type): - _toSchema = {'charm_modified_version': 'charm-modified-version', 'constraints': 'constraints', 'deployment_info': 'deployment-info', 'devices': 'devices', 'filesystems': 'filesystems', 'image_repo': 'image-repo', 'pod_spec': 'pod-spec', 'raw_k8s_spec': 'raw-k8s-spec', 'tags': 'tags', 'volumes': 'volumes'} - _toPy = {'charm-modified-version': 'charm_modified_version', 'constraints': 'constraints', 'deployment-info': 'deployment_info', 'devices': 'devices', 'filesystems': 'filesystems', 'image-repo': 'image_repo', 'pod-spec': 'pod_spec', 'raw-k8s-spec': 'raw_k8s_spec', 'tags': 'tags', 'volumes': 'volumes'} - def __init__(self, charm_modified_version=None, constraints=None, deployment_info=None, devices=None, filesystems=None, image_repo=None, pod_spec=None, raw_k8s_spec=None, tags=None, volumes=None, **unknown_fields): - ''' - charm_modified_version : int - constraints : Value - deployment_info : KubernetesDeploymentInfo - devices : typing.Sequence[~KubernetesDeviceParams] - filesystems : typing.Sequence[~KubernetesFilesystemParams] - image_repo : DockerImageInfo - pod_spec : str - raw_k8s_spec : str - tags : typing.Mapping[str, str] - volumes : typing.Sequence[~KubernetesVolumeParams] - ''' - charm_modified_version_ = charm_modified_version - constraints_ = Value.from_json(constraints) if constraints else None - deployment_info_ = KubernetesDeploymentInfo.from_json(deployment_info) if deployment_info else None - devices_ = [KubernetesDeviceParams.from_json(o) for o in devices or []] - filesystems_ = [KubernetesFilesystemParams.from_json(o) for o in filesystems or []] - image_repo_ = DockerImageInfo.from_json(image_repo) if image_repo else None - pod_spec_ = pod_spec - raw_k8s_spec_ = raw_k8s_spec - tags_ = tags - volumes_ = [KubernetesVolumeParams.from_json(o) for o in volumes or []] - - # Validate arguments against known Juju API types. - if charm_modified_version_ is not None and not isinstance(charm_modified_version_, int): - raise Exception("Expected charm_modified_version_ to be a int, received: {}".format(type(charm_modified_version_))) - - if constraints_ is not None and not isinstance(constraints_, (dict, Value)): - raise Exception("Expected constraints_ to be a Value, received: {}".format(type(constraints_))) - - if deployment_info_ is not None and not isinstance(deployment_info_, (dict, KubernetesDeploymentInfo)): - raise Exception("Expected deployment_info_ to be a KubernetesDeploymentInfo, received: {}".format(type(deployment_info_))) - - if devices_ is not None and not isinstance(devices_, (bytes, str, list)): - raise Exception("Expected devices_ to be a Sequence, received: {}".format(type(devices_))) - - if filesystems_ is not None and not isinstance(filesystems_, (bytes, str, list)): - raise Exception("Expected filesystems_ to be a Sequence, received: {}".format(type(filesystems_))) - - if image_repo_ is not None and not isinstance(image_repo_, (dict, DockerImageInfo)): - raise Exception("Expected image_repo_ to be a DockerImageInfo, received: {}".format(type(image_repo_))) - - if pod_spec_ is not None and not isinstance(pod_spec_, (bytes, str)): - raise Exception("Expected pod_spec_ to be a str, received: {}".format(type(pod_spec_))) - - if raw_k8s_spec_ is not None and not isinstance(raw_k8s_spec_, (bytes, str)): - raise Exception("Expected raw_k8s_spec_ to be a str, received: {}".format(type(raw_k8s_spec_))) - - if tags_ is not None and not isinstance(tags_, dict): - raise Exception("Expected tags_ to be a Mapping, received: {}".format(type(tags_))) - - if volumes_ is not None and not isinstance(volumes_, (bytes, str, list)): - raise Exception("Expected volumes_ to be a Sequence, received: {}".format(type(volumes_))) - - self.charm_modified_version = charm_modified_version_ - self.constraints = constraints_ - self.deployment_info = deployment_info_ - self.devices = devices_ - self.filesystems = filesystems_ - self.image_repo = image_repo_ - self.pod_spec = pod_spec_ - self.raw_k8s_spec = raw_k8s_spec_ - self.tags = tags_ - self.volumes = volumes_ - self.unknown_fields = unknown_fields - - - -class KubernetesProvisioningInfoResult(Type): - _toSchema = {'error': 'error', 'result': 'result'} - _toPy = {'error': 'error', 'result': 'result'} - def __init__(self, error=None, result=None, **unknown_fields): - ''' - error : Error - result : KubernetesProvisioningInfo - ''' - error_ = Error.from_json(error) if error else None - result_ = KubernetesProvisioningInfo.from_json(result) if result else None - - # Validate arguments against known Juju API types. - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - - if result_ is not None and not isinstance(result_, (dict, KubernetesProvisioningInfo)): - raise Exception("Expected result_ to be a KubernetesProvisioningInfo, received: {}".format(type(result_))) - - self.error = error_ - self.result = result_ - self.unknown_fields = unknown_fields - - - -class KubernetesProvisioningInfoResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None, **unknown_fields): - ''' - results : typing.Sequence[~KubernetesProvisioningInfoResult] - ''' - results_ = [KubernetesProvisioningInfoResult.from_json(o) for o in results or []] - - # Validate arguments against known Juju API types. - if results_ is not None and not isinstance(results_, (bytes, str, list)): - raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) - - self.results = results_ - self.unknown_fields = unknown_fields - - - -class KubernetesUpgradeArg(Type): - _toSchema = {'agent_tag': 'agent-tag', 'version': 'version'} - _toPy = {'agent-tag': 'agent_tag', 'version': 'version'} - def __init__(self, agent_tag=None, version=None, **unknown_fields): - ''' - agent_tag : str - version : Number - ''' - agent_tag_ = agent_tag - version_ = Number.from_json(version) if version else None - - # Validate arguments against known Juju API types. - if agent_tag_ is not None and not isinstance(agent_tag_, (bytes, str)): - raise Exception("Expected agent_tag_ to be a str, received: {}".format(type(agent_tag_))) - - if version_ is not None and not isinstance(version_, (dict, Number)): - raise Exception("Expected version_ to be a Number, received: {}".format(type(version_))) - - self.agent_tag = agent_tag_ - self.version = version_ - self.unknown_fields = unknown_fields - - - -class KubernetesVolumeAttachmentParams(Type): - _toSchema = {'provider': 'provider', 'read_only': 'read-only'} - _toPy = {'provider': 'provider', 'read-only': 'read_only'} - def __init__(self, provider=None, read_only=None, **unknown_fields): - ''' - provider : str - read_only : bool - ''' - provider_ = provider - read_only_ = read_only - - # Validate arguments against known Juju API types. - if provider_ is not None and not isinstance(provider_, (bytes, str)): - raise Exception("Expected provider_ to be a str, received: {}".format(type(provider_))) - - if read_only_ is not None and not isinstance(read_only_, bool): - raise Exception("Expected read_only_ to be a bool, received: {}".format(type(read_only_))) - - self.provider = provider_ - self.read_only = read_only_ - self.unknown_fields = unknown_fields - - - -class KubernetesVolumeInfo(Type): - _toSchema = {'data': 'data', 'info': 'info', 'persistent': 'persistent', 'pool': 'pool', 'size': 'size', 'status': 'status', 'volume_id': 'volume-id'} - _toPy = {'data': 'data', 'info': 'info', 'persistent': 'persistent', 'pool': 'pool', 'size': 'size', 'status': 'status', 'volume-id': 'volume_id'} - def __init__(self, data=None, info=None, persistent=None, pool=None, size=None, status=None, volume_id=None, **unknown_fields): - ''' - data : typing.Mapping[str, typing.Any] - info : str - persistent : bool - pool : str - size : int - status : str - volume_id : str - ''' - data_ = data - info_ = info - persistent_ = persistent - pool_ = pool - size_ = size - status_ = status - volume_id_ = volume_id - - # Validate arguments against known Juju API types. - if data_ is not None and not isinstance(data_, dict): - raise Exception("Expected data_ to be a Mapping, received: {}".format(type(data_))) - - if info_ is not None and not isinstance(info_, (bytes, str)): - raise Exception("Expected info_ to be a str, received: {}".format(type(info_))) - - if persistent_ is not None and not isinstance(persistent_, bool): - raise Exception("Expected persistent_ to be a bool, received: {}".format(type(persistent_))) - - if pool_ is not None and not isinstance(pool_, (bytes, str)): - raise Exception("Expected pool_ to be a str, received: {}".format(type(pool_))) - - if size_ is not None and not isinstance(size_, int): - raise Exception("Expected size_ to be a int, received: {}".format(type(size_))) - - if status_ is not None and not isinstance(status_, (bytes, str)): - raise Exception("Expected status_ to be a str, received: {}".format(type(status_))) - - if volume_id_ is not None and not isinstance(volume_id_, (bytes, str)): - raise Exception("Expected volume_id_ to be a str, received: {}".format(type(volume_id_))) - - self.data = data_ - self.info = info_ - self.persistent = persistent_ - self.pool = pool_ - self.size = size_ - self.status = status_ - self.volume_id = volume_id_ - self.unknown_fields = unknown_fields - - - -class KubernetesVolumeParams(Type): - _toSchema = {'attachment': 'attachment', 'attributes': 'attributes', 'provider': 'provider', 'size': 'size', 'storagename': 'storagename', 'tags': 'tags'} - _toPy = {'attachment': 'attachment', 'attributes': 'attributes', 'provider': 'provider', 'size': 'size', 'storagename': 'storagename', 'tags': 'tags'} - def __init__(self, attachment=None, attributes=None, provider=None, size=None, storagename=None, tags=None, **unknown_fields): - ''' - attachment : KubernetesVolumeAttachmentParams - attributes : typing.Mapping[str, typing.Any] - provider : str - size : int - storagename : str - tags : typing.Mapping[str, str] - ''' - attachment_ = KubernetesVolumeAttachmentParams.from_json(attachment) if attachment else None - attributes_ = attributes - provider_ = provider - size_ = size - storagename_ = storagename - tags_ = tags - - # Validate arguments against known Juju API types. - if attachment_ is not None and not isinstance(attachment_, (dict, KubernetesVolumeAttachmentParams)): - raise Exception("Expected attachment_ to be a KubernetesVolumeAttachmentParams, received: {}".format(type(attachment_))) - - if attributes_ is not None and not isinstance(attributes_, dict): - raise Exception("Expected attributes_ to be a Mapping, received: {}".format(type(attributes_))) - - if provider_ is not None and not isinstance(provider_, (bytes, str)): - raise Exception("Expected provider_ to be a str, received: {}".format(type(provider_))) - - if size_ is not None and not isinstance(size_, int): - raise Exception("Expected size_ to be a int, received: {}".format(type(size_))) - - if storagename_ is not None and not isinstance(storagename_, (bytes, str)): - raise Exception("Expected storagename_ to be a str, received: {}".format(type(storagename_))) - - if tags_ is not None and not isinstance(tags_, dict): - raise Exception("Expected tags_ to be a Mapping, received: {}".format(type(tags_))) - - self.attachment = attachment_ - self.attributes = attributes_ - self.provider = provider_ - self.size = size_ - self.storagename = storagename_ - self.tags = tags_ - self.unknown_fields = unknown_fields - - - -class LXDProfile(Type): - _toSchema = {'config': 'config', 'description': 'description', 'devices': 'devices'} - _toPy = {'config': 'config', 'description': 'description', 'devices': 'devices'} - def __init__(self, config=None, description=None, devices=None, **unknown_fields): - ''' - config : typing.Mapping[str, str] - description : str - devices : typing.Mapping[str, typing.Any] - ''' - config_ = config - description_ = description - devices_ = devices - - # Validate arguments against known Juju API types. - if config_ is not None and not isinstance(config_, dict): - raise Exception("Expected config_ to be a Mapping, received: {}".format(type(config_))) - - if description_ is not None and not isinstance(description_, (bytes, str)): - raise Exception("Expected description_ to be a str, received: {}".format(type(description_))) - - if devices_ is not None and not isinstance(devices_, dict): - raise Exception("Expected devices_ to be a Mapping, received: {}".format(type(devices_))) - - self.config = config_ - self.description = description_ - self.devices = devices_ - self.unknown_fields = unknown_fields - - - -class LatestSecretRevisionChanges(Type): - _toSchema = {'changes': 'changes'} - _toPy = {'changes': 'changes'} - def __init__(self, changes=None, **unknown_fields): - ''' - changes : typing.Sequence[~SecretRevisionChange] - ''' - changes_ = [SecretRevisionChange.from_json(o) for o in changes or []] - - # Validate arguments against known Juju API types. - if changes_ is not None and not isinstance(changes_, (bytes, str, list)): - raise Exception("Expected changes_ to be a Sequence, received: {}".format(type(changes_))) - - self.changes = changes_ - self.unknown_fields = unknown_fields - - - -class LeaseOperationCommand(Type): - _toSchema = {'duration': 'duration', 'holder': 'holder', 'lease': 'lease', 'model_uuid': 'model-uuid', 'namespace': 'namespace', 'new_time': 'new-time', 'old_time': 'old-time', 'operation': 'operation', 'pin_entity': 'pin-entity', 'version': 'version'} - _toPy = {'duration': 'duration', 'holder': 'holder', 'lease': 'lease', 'model-uuid': 'model_uuid', 'namespace': 'namespace', 'new-time': 'new_time', 'old-time': 'old_time', 'operation': 'operation', 'pin-entity': 'pin_entity', 'version': 'version'} - def __init__(self, duration=None, holder=None, lease=None, model_uuid=None, namespace=None, new_time=None, old_time=None, operation=None, pin_entity=None, version=None, **unknown_fields): - ''' - duration : int - holder : str - lease : str - model_uuid : str - namespace : str - new_time : str - old_time : str - operation : str - pin_entity : str - version : int - ''' - duration_ = duration - holder_ = holder - lease_ = lease - model_uuid_ = model_uuid - namespace_ = namespace - new_time_ = new_time - old_time_ = old_time - operation_ = operation - pin_entity_ = pin_entity - version_ = version - - # Validate arguments against known Juju API types. - if duration_ is not None and not isinstance(duration_, int): - raise Exception("Expected duration_ to be a int, received: {}".format(type(duration_))) - - if holder_ is not None and not isinstance(holder_, (bytes, str)): - raise Exception("Expected holder_ to be a str, received: {}".format(type(holder_))) - - if lease_ is not None and not isinstance(lease_, (bytes, str)): - raise Exception("Expected lease_ to be a str, received: {}".format(type(lease_))) - - if model_uuid_ is not None and not isinstance(model_uuid_, (bytes, str)): - raise Exception("Expected model_uuid_ to be a str, received: {}".format(type(model_uuid_))) - - if namespace_ is not None and not isinstance(namespace_, (bytes, str)): - raise Exception("Expected namespace_ to be a str, received: {}".format(type(namespace_))) - - if new_time_ is not None and not isinstance(new_time_, (bytes, str)): - raise Exception("Expected new_time_ to be a str, received: {}".format(type(new_time_))) - - if old_time_ is not None and not isinstance(old_time_, (bytes, str)): - raise Exception("Expected old_time_ to be a str, received: {}".format(type(old_time_))) - - if operation_ is not None and not isinstance(operation_, (bytes, str)): - raise Exception("Expected operation_ to be a str, received: {}".format(type(operation_))) - - if pin_entity_ is not None and not isinstance(pin_entity_, (bytes, str)): - raise Exception("Expected pin_entity_ to be a str, received: {}".format(type(pin_entity_))) - - if version_ is not None and not isinstance(version_, int): - raise Exception("Expected version_ to be a int, received: {}".format(type(version_))) - - self.duration = duration_ - self.holder = holder_ - self.lease = lease_ - self.model_uuid = model_uuid_ - self.namespace = namespace_ - self.new_time = new_time_ - self.old_time = old_time_ - self.operation = operation_ - self.pin_entity = pin_entity_ - self.version = version_ - self.unknown_fields = unknown_fields - - - -class LeaseOperationsV2(Type): - _toSchema = {'commands': 'commands'} - _toPy = {'commands': 'commands'} - def __init__(self, commands=None, **unknown_fields): - ''' - commands : typing.Sequence[~LeaseOperationCommand] - ''' - commands_ = [LeaseOperationCommand.from_json(o) for o in commands or []] - - # Validate arguments against known Juju API types. - if commands_ is not None and not isinstance(commands_, (bytes, str, list)): - raise Exception("Expected commands_ to be a Sequence, received: {}".format(type(commands_))) - - self.commands = commands_ - self.unknown_fields = unknown_fields - - - -class LifeResult(Type): - _toSchema = {'error': 'error', 'life': 'life'} - _toPy = {'error': 'error', 'life': 'life'} - def __init__(self, error=None, life=None, **unknown_fields): - ''' - error : Error - life : str - ''' - error_ = Error.from_json(error) if error else None - life_ = life - - # Validate arguments against known Juju API types. - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - - if life_ is not None and not isinstance(life_, (bytes, str)): - raise Exception("Expected life_ to be a str, received: {}".format(type(life_))) - - self.error = error_ - self.life = life_ - self.unknown_fields = unknown_fields - - - -class LifeResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None, **unknown_fields): - ''' - results : typing.Sequence[~LifeResult] - ''' - results_ = [LifeResult.from_json(o) for o in results or []] - - # Validate arguments against known Juju API types. - if results_ is not None and not isinstance(results_, (bytes, str, list)): - raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) - - self.results = results_ - self.unknown_fields = unknown_fields - - - -class ListCloudImageMetadataResult(Type): - _toSchema = {'result': 'result'} - _toPy = {'result': 'result'} - def __init__(self, result=None, **unknown_fields): - ''' - result : typing.Sequence[~CloudImageMetadata] - ''' - result_ = [CloudImageMetadata.from_json(o) for o in result or []] - - # Validate arguments against known Juju API types. - if result_ is not None and not isinstance(result_, (bytes, str, list)): - raise Exception("Expected result_ to be a Sequence, received: {}".format(type(result_))) - - self.result = result_ - self.unknown_fields = unknown_fields - - - -class ListCloudInfo(Type): - _toSchema = {'clouddetails': 'CloudDetails', 'user_access': 'user-access'} - _toPy = {'CloudDetails': 'clouddetails', 'user-access': 'user_access'} - def __init__(self, clouddetails=None, user_access=None, **unknown_fields): - ''' - clouddetails : CloudDetails - user_access : str - ''' - clouddetails_ = CloudDetails.from_json(clouddetails) if clouddetails else None - user_access_ = user_access - - # Validate arguments against known Juju API types. - if clouddetails_ is not None and not isinstance(clouddetails_, (dict, CloudDetails)): - raise Exception("Expected clouddetails_ to be a CloudDetails, received: {}".format(type(clouddetails_))) - - if user_access_ is not None and not isinstance(user_access_, (bytes, str)): - raise Exception("Expected user_access_ to be a str, received: {}".format(type(user_access_))) - - self.clouddetails = clouddetails_ - self.user_access = user_access_ - self.unknown_fields = unknown_fields - - - -class ListCloudInfoResult(Type): - _toSchema = {'error': 'error', 'result': 'result'} - _toPy = {'error': 'error', 'result': 'result'} - def __init__(self, error=None, result=None, **unknown_fields): - ''' - error : Error - result : ListCloudInfo - ''' - error_ = Error.from_json(error) if error else None - result_ = ListCloudInfo.from_json(result) if result else None - - # Validate arguments against known Juju API types. - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - - if result_ is not None and not isinstance(result_, (dict, ListCloudInfo)): - raise Exception("Expected result_ to be a ListCloudInfo, received: {}".format(type(result_))) - - self.error = error_ - self.result = result_ - self.unknown_fields = unknown_fields - - - -class ListCloudInfoResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None, **unknown_fields): - ''' - results : typing.Sequence[~ListCloudInfoResult] - ''' - results_ = [ListCloudInfoResult.from_json(o) for o in results or []] - - # Validate arguments against known Juju API types. - if results_ is not None and not isinstance(results_, (bytes, str, list)): - raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) - - self.results = results_ - self.unknown_fields = unknown_fields - - - -class ListCloudsRequest(Type): - _toSchema = {'all_': 'all', 'user_tag': 'user-tag'} - _toPy = {'all': 'all_', 'user-tag': 'user_tag'} - def __init__(self, all_=None, user_tag=None, **unknown_fields): - ''' - all_ : bool - user_tag : str - ''' - all__ = all_ - user_tag_ = user_tag - - # Validate arguments against known Juju API types. - if all__ is not None and not isinstance(all__, bool): - raise Exception("Expected all__ to be a bool, received: {}".format(type(all__))) - - if user_tag_ is not None and not isinstance(user_tag_, (bytes, str)): - raise Exception("Expected user_tag_ to be a str, received: {}".format(type(user_tag_))) - - self.all_ = all__ - self.user_tag = user_tag_ - self.unknown_fields = unknown_fields - - - -class ListFirewallRulesResults(Type): - _toSchema = {'rules': 'Rules'} - _toPy = {'Rules': 'rules'} - def __init__(self, rules=None, **unknown_fields): - ''' - rules : typing.Sequence[~FirewallRule] - ''' - rules_ = [FirewallRule.from_json(o) for o in rules or []] - - # Validate arguments against known Juju API types. - if rules_ is not None and not isinstance(rules_, (bytes, str, list)): - raise Exception("Expected rules_ to be a Sequence, received: {}".format(type(rules_))) - - self.rules = rules_ - self.unknown_fields = unknown_fields - - - -class ListResourcesArgs(Type): - _toSchema = {'entities': 'entities'} - _toPy = {'entities': 'entities'} - def __init__(self, entities=None, **unknown_fields): - ''' - entities : typing.Sequence[~Entity] - ''' - entities_ = [Entity.from_json(o) for o in entities or []] - - # Validate arguments against known Juju API types. - if entities_ is not None and not isinstance(entities_, (bytes, str, list)): - raise Exception("Expected entities_ to be a Sequence, received: {}".format(type(entities_))) - - self.entities = entities_ - self.unknown_fields = unknown_fields - - - -class ListSSHKeys(Type): - _toSchema = {'entities': 'entities', 'mode': 'mode'} - _toPy = {'entities': 'entities', 'mode': 'mode'} - def __init__(self, entities=None, mode=None, **unknown_fields): - ''' - entities : Entities - mode : bool - ''' - entities_ = Entities.from_json(entities) if entities else None - mode_ = mode - - # Validate arguments against known Juju API types. - if entities_ is not None and not isinstance(entities_, (dict, Entities)): - raise Exception("Expected entities_ to be a Entities, received: {}".format(type(entities_))) - - if mode_ is not None and not isinstance(mode_, bool): - raise Exception("Expected mode_ to be a bool, received: {}".format(type(mode_))) - - self.entities = entities_ - self.mode = mode_ - self.unknown_fields = unknown_fields - - - -class ListSecretBackendsArgs(Type): - _toSchema = {'names': 'names', 'reveal': 'reveal'} - _toPy = {'names': 'names', 'reveal': 'reveal'} - def __init__(self, names=None, reveal=None, **unknown_fields): - ''' - names : typing.Sequence[str] - reveal : bool - ''' - names_ = names - reveal_ = reveal - - # Validate arguments against known Juju API types. - if names_ is not None and not isinstance(names_, (bytes, str, list)): - raise Exception("Expected names_ to be a Sequence, received: {}".format(type(names_))) - - if reveal_ is not None and not isinstance(reveal_, bool): - raise Exception("Expected reveal_ to be a bool, received: {}".format(type(reveal_))) - - self.names = names_ - self.reveal = reveal_ - self.unknown_fields = unknown_fields - - - -class ListSecretBackendsResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None, **unknown_fields): - ''' - results : typing.Sequence[~SecretBackendResult] - ''' - results_ = [SecretBackendResult.from_json(o) for o in results or []] - - # Validate arguments against known Juju API types. - if results_ is not None and not isinstance(results_, (bytes, str, list)): - raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) - - self.results = results_ - self.unknown_fields = unknown_fields - - - -class ListSecretResult(Type): - _toSchema = {'create_time': 'create-time', 'description': 'description', 'label': 'label', 'latest_expire_time': 'latest-expire-time', 'latest_revision': 'latest-revision', 'next_rotate_time': 'next-rotate-time', 'owner_tag': 'owner-tag', 'revisions': 'revisions', 'rotate_policy': 'rotate-policy', 'update_time': 'update-time', 'uri': 'uri', 'value': 'value', 'version': 'version'} - _toPy = {'create-time': 'create_time', 'description': 'description', 'label': 'label', 'latest-expire-time': 'latest_expire_time', 'latest-revision': 'latest_revision', 'next-rotate-time': 'next_rotate_time', 'owner-tag': 'owner_tag', 'revisions': 'revisions', 'rotate-policy': 'rotate_policy', 'update-time': 'update_time', 'uri': 'uri', 'value': 'value', 'version': 'version'} - def __init__(self, create_time=None, description=None, label=None, latest_expire_time=None, latest_revision=None, next_rotate_time=None, owner_tag=None, revisions=None, rotate_policy=None, update_time=None, uri=None, value=None, version=None, **unknown_fields): - ''' - create_time : str - description : str - label : str - latest_expire_time : str - latest_revision : int - next_rotate_time : str - owner_tag : str - revisions : typing.Sequence[~SecretRevision] - rotate_policy : str - update_time : str - uri : str - value : SecretValueResult - version : int - ''' - create_time_ = create_time - description_ = description - label_ = label - latest_expire_time_ = latest_expire_time - latest_revision_ = latest_revision - next_rotate_time_ = next_rotate_time - owner_tag_ = owner_tag - revisions_ = [SecretRevision.from_json(o) for o in revisions or []] - rotate_policy_ = rotate_policy - update_time_ = update_time - uri_ = uri - value_ = SecretValueResult.from_json(value) if value else None - version_ = version - - # Validate arguments against known Juju API types. - if create_time_ is not None and not isinstance(create_time_, (bytes, str)): - raise Exception("Expected create_time_ to be a str, received: {}".format(type(create_time_))) - - if description_ is not None and not isinstance(description_, (bytes, str)): - raise Exception("Expected description_ to be a str, received: {}".format(type(description_))) - - if label_ is not None and not isinstance(label_, (bytes, str)): - raise Exception("Expected label_ to be a str, received: {}".format(type(label_))) - - if latest_expire_time_ is not None and not isinstance(latest_expire_time_, (bytes, str)): - raise Exception("Expected latest_expire_time_ to be a str, received: {}".format(type(latest_expire_time_))) - - if latest_revision_ is not None and not isinstance(latest_revision_, int): - raise Exception("Expected latest_revision_ to be a int, received: {}".format(type(latest_revision_))) - - if next_rotate_time_ is not None and not isinstance(next_rotate_time_, (bytes, str)): - raise Exception("Expected next_rotate_time_ to be a str, received: {}".format(type(next_rotate_time_))) - - if owner_tag_ is not None and not isinstance(owner_tag_, (bytes, str)): - raise Exception("Expected owner_tag_ to be a str, received: {}".format(type(owner_tag_))) - - if revisions_ is not None and not isinstance(revisions_, (bytes, str, list)): - raise Exception("Expected revisions_ to be a Sequence, received: {}".format(type(revisions_))) - - if rotate_policy_ is not None and not isinstance(rotate_policy_, (bytes, str)): - raise Exception("Expected rotate_policy_ to be a str, received: {}".format(type(rotate_policy_))) - - if update_time_ is not None and not isinstance(update_time_, (bytes, str)): - raise Exception("Expected update_time_ to be a str, received: {}".format(type(update_time_))) - - if uri_ is not None and not isinstance(uri_, (bytes, str)): - raise Exception("Expected uri_ to be a str, received: {}".format(type(uri_))) - - if value_ is not None and not isinstance(value_, (dict, SecretValueResult)): - raise Exception("Expected value_ to be a SecretValueResult, received: {}".format(type(value_))) - - if version_ is not None and not isinstance(version_, int): - raise Exception("Expected version_ to be a int, received: {}".format(type(version_))) - - self.create_time = create_time_ - self.description = description_ - self.label = label_ - self.latest_expire_time = latest_expire_time_ - self.latest_revision = latest_revision_ - self.next_rotate_time = next_rotate_time_ - self.owner_tag = owner_tag_ - self.revisions = revisions_ - self.rotate_policy = rotate_policy_ - self.update_time = update_time_ - self.uri = uri_ - self.value = value_ - self.version = version_ - self.unknown_fields = unknown_fields - - - -class ListSecretResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None, **unknown_fields): - ''' - results : typing.Sequence[~ListSecretResult] - ''' - results_ = [ListSecretResult.from_json(o) for o in results or []] - - # Validate arguments against known Juju API types. - if results_ is not None and not isinstance(results_, (bytes, str, list)): - raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) - - self.results = results_ - self.unknown_fields = unknown_fields - - - -class ListSecretsArgs(Type): - _toSchema = {'filter_': 'filter', 'show_secrets': 'show-secrets'} - _toPy = {'filter': 'filter_', 'show-secrets': 'show_secrets'} - def __init__(self, filter_=None, show_secrets=None, **unknown_fields): - ''' - filter_ : SecretsFilter - show_secrets : bool - ''' - filter__ = SecretsFilter.from_json(filter_) if filter_ else None - show_secrets_ = show_secrets - - # Validate arguments against known Juju API types. - if filter__ is not None and not isinstance(filter__, (dict, SecretsFilter)): - raise Exception("Expected filter__ to be a SecretsFilter, received: {}".format(type(filter__))) - - if show_secrets_ is not None and not isinstance(show_secrets_, bool): - raise Exception("Expected show_secrets_ to be a bool, received: {}".format(type(show_secrets_))) - - self.filter_ = filter__ - self.show_secrets = show_secrets_ - self.unknown_fields = unknown_fields - - - -class ListSpacesResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None, **unknown_fields): - ''' - results : typing.Sequence[~Space] - ''' - results_ = [Space.from_json(o) for o in results or []] - - # Validate arguments against known Juju API types. - if results_ is not None and not isinstance(results_, (bytes, str, list)): - raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) - - self.results = results_ - self.unknown_fields = unknown_fields - - - -class ListSubnetsResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None, **unknown_fields): - ''' - results : typing.Sequence[~Subnet] - ''' - results_ = [Subnet.from_json(o) for o in results or []] - - # Validate arguments against known Juju API types. - if results_ is not None and not isinstance(results_, (bytes, str, list)): - raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) - - self.results = results_ - self.unknown_fields = unknown_fields - - - -class ListUnitResourcesArgs(Type): - _toSchema = {'resource_names': 'resource-names'} - _toPy = {'resource-names': 'resource_names'} - def __init__(self, resource_names=None, **unknown_fields): - ''' - resource_names : typing.Sequence[str] - ''' - resource_names_ = resource_names - - # Validate arguments against known Juju API types. - if resource_names_ is not None and not isinstance(resource_names_, (bytes, str, list)): - raise Exception("Expected resource_names_ to be a Sequence, received: {}".format(type(resource_names_))) - - self.resource_names = resource_names_ - self.unknown_fields = unknown_fields - - - -class LogForwardingGetLastSentParams(Type): - _toSchema = {'ids': 'ids'} - _toPy = {'ids': 'ids'} - def __init__(self, ids=None, **unknown_fields): - ''' - ids : typing.Sequence[~LogForwardingID] - ''' - ids_ = [LogForwardingID.from_json(o) for o in ids or []] - - # Validate arguments against known Juju API types. - if ids_ is not None and not isinstance(ids_, (bytes, str, list)): - raise Exception("Expected ids_ to be a Sequence, received: {}".format(type(ids_))) - - self.ids = ids_ - self.unknown_fields = unknown_fields - - - -class LogForwardingGetLastSentResult(Type): - _toSchema = {'err': 'err', 'record_id': 'record-id', 'record_timestamp': 'record-timestamp'} - _toPy = {'err': 'err', 'record-id': 'record_id', 'record-timestamp': 'record_timestamp'} - def __init__(self, err=None, record_id=None, record_timestamp=None, **unknown_fields): - ''' - err : Error - record_id : int - record_timestamp : int - ''' - err_ = Error.from_json(err) if err else None - record_id_ = record_id - record_timestamp_ = record_timestamp - - # Validate arguments against known Juju API types. - if err_ is not None and not isinstance(err_, (dict, Error)): - raise Exception("Expected err_ to be a Error, received: {}".format(type(err_))) - - if record_id_ is not None and not isinstance(record_id_, int): - raise Exception("Expected record_id_ to be a int, received: {}".format(type(record_id_))) - - if record_timestamp_ is not None and not isinstance(record_timestamp_, int): - raise Exception("Expected record_timestamp_ to be a int, received: {}".format(type(record_timestamp_))) - - self.err = err_ - self.record_id = record_id_ - self.record_timestamp = record_timestamp_ - self.unknown_fields = unknown_fields - - - -class LogForwardingGetLastSentResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None, **unknown_fields): - ''' - results : typing.Sequence[~LogForwardingGetLastSentResult] - ''' - results_ = [LogForwardingGetLastSentResult.from_json(o) for o in results or []] - - # Validate arguments against known Juju API types. - if results_ is not None and not isinstance(results_, (bytes, str, list)): - raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) - - self.results = results_ - self.unknown_fields = unknown_fields - - - -class LogForwardingID(Type): - _toSchema = {'model': 'model', 'sink': 'sink'} - _toPy = {'model': 'model', 'sink': 'sink'} - def __init__(self, model=None, sink=None, **unknown_fields): - ''' - model : str - sink : str - ''' - model_ = model - sink_ = sink - - # Validate arguments against known Juju API types. - if model_ is not None and not isinstance(model_, (bytes, str)): - raise Exception("Expected model_ to be a str, received: {}".format(type(model_))) - - if sink_ is not None and not isinstance(sink_, (bytes, str)): - raise Exception("Expected sink_ to be a str, received: {}".format(type(sink_))) - - self.model = model_ - self.sink = sink_ - self.unknown_fields = unknown_fields - - - -class LogForwardingSetLastSentParam(Type): - _toSchema = {'logforwardingid': 'LogForwardingID', 'model': 'model', 'record_id': 'record-id', 'record_timestamp': 'record-timestamp', 'sink': 'sink'} - _toPy = {'LogForwardingID': 'logforwardingid', 'model': 'model', 'record-id': 'record_id', 'record-timestamp': 'record_timestamp', 'sink': 'sink'} - def __init__(self, logforwardingid=None, model=None, record_id=None, record_timestamp=None, sink=None, **unknown_fields): - ''' - logforwardingid : LogForwardingID - model : str - record_id : int - record_timestamp : int - sink : str - ''' - logforwardingid_ = LogForwardingID.from_json(logforwardingid) if logforwardingid else None - model_ = model - record_id_ = record_id - record_timestamp_ = record_timestamp - sink_ = sink - - # Validate arguments against known Juju API types. - if logforwardingid_ is not None and not isinstance(logforwardingid_, (dict, LogForwardingID)): - raise Exception("Expected logforwardingid_ to be a LogForwardingID, received: {}".format(type(logforwardingid_))) - - if model_ is not None and not isinstance(model_, (bytes, str)): - raise Exception("Expected model_ to be a str, received: {}".format(type(model_))) - - if record_id_ is not None and not isinstance(record_id_, int): - raise Exception("Expected record_id_ to be a int, received: {}".format(type(record_id_))) - - if record_timestamp_ is not None and not isinstance(record_timestamp_, int): - raise Exception("Expected record_timestamp_ to be a int, received: {}".format(type(record_timestamp_))) - - if sink_ is not None and not isinstance(sink_, (bytes, str)): - raise Exception("Expected sink_ to be a str, received: {}".format(type(sink_))) - - self.logforwardingid = logforwardingid_ - self.model = model_ - self.record_id = record_id_ - self.record_timestamp = record_timestamp_ - self.sink = sink_ - self.unknown_fields = unknown_fields - - - -class LogForwardingSetLastSentParams(Type): - _toSchema = {'params': 'params'} - _toPy = {'params': 'params'} - def __init__(self, params=None, **unknown_fields): - ''' - params : typing.Sequence[~LogForwardingSetLastSentParam] - ''' - params_ = [LogForwardingSetLastSentParam.from_json(o) for o in params or []] - - # Validate arguments against known Juju API types. - if params_ is not None and not isinstance(params_, (bytes, str, list)): - raise Exception("Expected params_ to be a Sequence, received: {}".format(type(params_))) - - self.params = params_ - self.unknown_fields = unknown_fields - - - -class LoginRequest(Type): - _toSchema = {'auth_tag': 'auth-tag', 'bakery_version': 'bakery-version', 'cli_args': 'cli-args', 'client_version': 'client-version', 'credentials': 'credentials', 'macaroons': 'macaroons', 'nonce': 'nonce', 'token': 'token', 'user_data': 'user-data'} - _toPy = {'auth-tag': 'auth_tag', 'bakery-version': 'bakery_version', 'cli-args': 'cli_args', 'client-version': 'client_version', 'credentials': 'credentials', 'macaroons': 'macaroons', 'nonce': 'nonce', 'token': 'token', 'user-data': 'user_data'} - def __init__(self, auth_tag=None, bakery_version=None, cli_args=None, client_version=None, credentials=None, macaroons=None, nonce=None, token=None, user_data=None, **unknown_fields): - ''' - auth_tag : str - bakery_version : int - cli_args : str - client_version : str - credentials : str - macaroons : typing.Sequence[~Macaroon] - nonce : str - token : str - user_data : str - ''' - auth_tag_ = auth_tag - bakery_version_ = bakery_version - cli_args_ = cli_args - client_version_ = client_version - credentials_ = credentials - macaroons_ = [Macaroon.from_json(o) for o in macaroons or []] - nonce_ = nonce - token_ = token - user_data_ = user_data - - # Validate arguments against known Juju API types. - if auth_tag_ is not None and not isinstance(auth_tag_, (bytes, str)): - raise Exception("Expected auth_tag_ to be a str, received: {}".format(type(auth_tag_))) - - if bakery_version_ is not None and not isinstance(bakery_version_, int): - raise Exception("Expected bakery_version_ to be a int, received: {}".format(type(bakery_version_))) - - if cli_args_ is not None and not isinstance(cli_args_, (bytes, str)): - raise Exception("Expected cli_args_ to be a str, received: {}".format(type(cli_args_))) - - if client_version_ is not None and not isinstance(client_version_, (bytes, str)): - raise Exception("Expected client_version_ to be a str, received: {}".format(type(client_version_))) - - if credentials_ is not None and not isinstance(credentials_, (bytes, str)): - raise Exception("Expected credentials_ to be a str, received: {}".format(type(credentials_))) - - if macaroons_ is not None and not isinstance(macaroons_, (bytes, str, list)): - raise Exception("Expected macaroons_ to be a Sequence, received: {}".format(type(macaroons_))) - - if nonce_ is not None and not isinstance(nonce_, (bytes, str)): - raise Exception("Expected nonce_ to be a str, received: {}".format(type(nonce_))) - - if token_ is not None and not isinstance(token_, (bytes, str)): - raise Exception("Expected token_ to be a str, received: {}".format(type(token_))) - - if user_data_ is not None and not isinstance(user_data_, (bytes, str)): - raise Exception("Expected user_data_ to be a str, received: {}".format(type(user_data_))) - - self.auth_tag = auth_tag_ - self.bakery_version = bakery_version_ - self.cli_args = cli_args_ - self.client_version = client_version_ - self.credentials = credentials_ - self.macaroons = macaroons_ - self.nonce = nonce_ - self.token = token_ - self.user_data = user_data_ - self.unknown_fields = unknown_fields - - - -class LoginResult(Type): - _toSchema = {'bakery_discharge_required': 'bakery-discharge-required', 'controller_tag': 'controller-tag', 'discharge_required': 'discharge-required', 'discharge_required_error': 'discharge-required-error', 'facades': 'facades', 'model_tag': 'model-tag', 'public_dns_name': 'public-dns-name', 'server_version': 'server-version', 'servers': 'servers', 'user_info': 'user-info'} - _toPy = {'bakery-discharge-required': 'bakery_discharge_required', 'controller-tag': 'controller_tag', 'discharge-required': 'discharge_required', 'discharge-required-error': 'discharge_required_error', 'facades': 'facades', 'model-tag': 'model_tag', 'public-dns-name': 'public_dns_name', 'server-version': 'server_version', 'servers': 'servers', 'user-info': 'user_info'} - def __init__(self, bakery_discharge_required=None, controller_tag=None, discharge_required=None, discharge_required_error=None, facades=None, model_tag=None, public_dns_name=None, server_version=None, servers=None, user_info=None, **unknown_fields): - ''' - bakery_discharge_required : Macaroon - controller_tag : str - discharge_required : Macaroon - discharge_required_error : str - facades : typing.Sequence[~FacadeVersions] - model_tag : str - public_dns_name : str - server_version : str - servers : typing.Sequence[~HostPort] - user_info : AuthUserInfo - ''' - bakery_discharge_required_ = Macaroon.from_json(bakery_discharge_required) if bakery_discharge_required else None - controller_tag_ = controller_tag - discharge_required_ = Macaroon.from_json(discharge_required) if discharge_required else None - discharge_required_error_ = discharge_required_error - facades_ = [FacadeVersions.from_json(o) for o in facades or []] - model_tag_ = model_tag - public_dns_name_ = public_dns_name - server_version_ = server_version - servers_ = [HostPort.from_json(o) for o in servers or []] - user_info_ = AuthUserInfo.from_json(user_info) if user_info else None - - # Validate arguments against known Juju API types. - if bakery_discharge_required_ is not None and not isinstance(bakery_discharge_required_, (dict, Macaroon)): - raise Exception("Expected bakery_discharge_required_ to be a Macaroon, received: {}".format(type(bakery_discharge_required_))) - - if controller_tag_ is not None and not isinstance(controller_tag_, (bytes, str)): - raise Exception("Expected controller_tag_ to be a str, received: {}".format(type(controller_tag_))) - - if discharge_required_ is not None and not isinstance(discharge_required_, (dict, Macaroon)): - raise Exception("Expected discharge_required_ to be a Macaroon, received: {}".format(type(discharge_required_))) - - if discharge_required_error_ is not None and not isinstance(discharge_required_error_, (bytes, str)): - raise Exception("Expected discharge_required_error_ to be a str, received: {}".format(type(discharge_required_error_))) - - if facades_ is not None and not isinstance(facades_, (bytes, str, list)): - raise Exception("Expected facades_ to be a Sequence, received: {}".format(type(facades_))) - - if model_tag_ is not None and not isinstance(model_tag_, (bytes, str)): - raise Exception("Expected model_tag_ to be a str, received: {}".format(type(model_tag_))) - - if public_dns_name_ is not None and not isinstance(public_dns_name_, (bytes, str)): - raise Exception("Expected public_dns_name_ to be a str, received: {}".format(type(public_dns_name_))) - - if server_version_ is not None and not isinstance(server_version_, (bytes, str)): - raise Exception("Expected server_version_ to be a str, received: {}".format(type(server_version_))) - - if servers_ is not None and not isinstance(servers_, (bytes, str, list)): - raise Exception("Expected servers_ to be a Sequence, received: {}".format(type(servers_))) - - if user_info_ is not None and not isinstance(user_info_, (dict, AuthUserInfo)): - raise Exception("Expected user_info_ to be a AuthUserInfo, received: {}".format(type(user_info_))) - - self.bakery_discharge_required = bakery_discharge_required_ - self.controller_tag = controller_tag_ - self.discharge_required = discharge_required_ - self.discharge_required_error = discharge_required_error_ - self.facades = facades_ - self.model_tag = model_tag_ - self.public_dns_name = public_dns_name_ - self.server_version = server_version_ - self.servers = servers_ - self.user_info = user_info_ - self.unknown_fields = unknown_fields - - - -class LookUpPayloadArg(Type): - _toSchema = {'id_': 'id', 'name': 'name'} - _toPy = {'id': 'id_', 'name': 'name'} - def __init__(self, id_=None, name=None, **unknown_fields): - ''' - id_ : str - name : str - ''' - id__ = id_ - name_ = name - - # Validate arguments against known Juju API types. - if id__ is not None and not isinstance(id__, (bytes, str)): - raise Exception("Expected id__ to be a str, received: {}".format(type(id__))) - - if name_ is not None and not isinstance(name_, (bytes, str)): - raise Exception("Expected name_ to be a str, received: {}".format(type(name_))) - - self.id_ = id__ - self.name = name_ - self.unknown_fields = unknown_fields - - - -class LookUpPayloadArgs(Type): - _toSchema = {'args': 'args'} - _toPy = {'args': 'args'} - def __init__(self, args=None, **unknown_fields): - ''' - args : typing.Sequence[~LookUpPayloadArg] - ''' - args_ = [LookUpPayloadArg.from_json(o) for o in args or []] - - # Validate arguments against known Juju API types. - if args_ is not None and not isinstance(args_, (bytes, str, list)): - raise Exception("Expected args_ to be a Sequence, received: {}".format(type(args_))) - - self.args = args_ - self.unknown_fields = unknown_fields - - - -class Macaroon(Type): - _toSchema = {} - _toPy = {} - def __init__(self, **unknown_fields): - ''' - - ''' - self.unknown_fields = unknown_fields - - - -class MacaroonResult(Type): - _toSchema = {'error': 'error', 'result': 'result'} - _toPy = {'error': 'error', 'result': 'result'} - def __init__(self, error=None, result=None, **unknown_fields): - ''' - error : Error - result : Macaroon - ''' - error_ = Error.from_json(error) if error else None - result_ = Macaroon.from_json(result) if result else None - - # Validate arguments against known Juju API types. - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - - if result_ is not None and not isinstance(result_, (dict, Macaroon)): - raise Exception("Expected result_ to be a Macaroon, received: {}".format(type(result_))) - - self.error = error_ - self.result = result_ - self.unknown_fields = unknown_fields - - - -class MacaroonResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None, **unknown_fields): - ''' - results : typing.Sequence[~MacaroonResult] - ''' - results_ = [MacaroonResult.from_json(o) for o in results or []] - - # Validate arguments against known Juju API types. - if results_ is not None and not isinstance(results_, (bytes, str, list)): - raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) - - self.results = results_ - self.unknown_fields = unknown_fields - - - -class MachineAddresses(Type): - _toSchema = {'addresses': 'addresses', 'tag': 'tag'} - _toPy = {'addresses': 'addresses', 'tag': 'tag'} - def __init__(self, addresses=None, tag=None, **unknown_fields): - ''' - addresses : typing.Sequence[~Address] - tag : str - ''' - addresses_ = [Address.from_json(o) for o in addresses or []] - tag_ = tag - - # Validate arguments against known Juju API types. - if addresses_ is not None and not isinstance(addresses_, (bytes, str, list)): - raise Exception("Expected addresses_ to be a Sequence, received: {}".format(type(addresses_))) - - if tag_ is not None and not isinstance(tag_, (bytes, str)): - raise Exception("Expected tag_ to be a str, received: {}".format(type(tag_))) - - self.addresses = addresses_ - self.tag = tag_ - self.unknown_fields = unknown_fields - - - -class MachineAddressesResult(Type): - _toSchema = {'addresses': 'addresses', 'error': 'error'} - _toPy = {'addresses': 'addresses', 'error': 'error'} - def __init__(self, addresses=None, error=None, **unknown_fields): - ''' - addresses : typing.Sequence[~Address] - error : Error - ''' - addresses_ = [Address.from_json(o) for o in addresses or []] - error_ = Error.from_json(error) if error else None - - # Validate arguments against known Juju API types. - if addresses_ is not None and not isinstance(addresses_, (bytes, str, list)): - raise Exception("Expected addresses_ to be a Sequence, received: {}".format(type(addresses_))) - - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - - self.addresses = addresses_ - self.error = error_ - self.unknown_fields = unknown_fields - - - -class MachineAddressesResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None, **unknown_fields): - ''' - results : typing.Sequence[~MachineAddressesResult] - ''' - results_ = [MachineAddressesResult.from_json(o) for o in results or []] - - # Validate arguments against known Juju API types. - if results_ is not None and not isinstance(results_, (bytes, str, list)): - raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) - - self.results = results_ - self.unknown_fields = unknown_fields - - - -class MachineBlockDevices(Type): - _toSchema = {'block_devices': 'block-devices', 'machine': 'machine'} - _toPy = {'block-devices': 'block_devices', 'machine': 'machine'} - def __init__(self, block_devices=None, machine=None, **unknown_fields): - ''' - block_devices : typing.Sequence[~BlockDevice] - machine : str - ''' - block_devices_ = [BlockDevice.from_json(o) for o in block_devices or []] - machine_ = machine - - # Validate arguments against known Juju API types. - if block_devices_ is not None and not isinstance(block_devices_, (bytes, str, list)): - raise Exception("Expected block_devices_ to be a Sequence, received: {}".format(type(block_devices_))) - - if machine_ is not None and not isinstance(machine_, (bytes, str)): - raise Exception("Expected machine_ to be a str, received: {}".format(type(machine_))) - - self.block_devices = block_devices_ - self.machine = machine_ - self.unknown_fields = unknown_fields - - - -class MachineContainerResult(Type): - _toSchema = {'container_types': 'container-types', 'determined': 'determined', 'error': 'error'} - _toPy = {'container-types': 'container_types', 'determined': 'determined', 'error': 'error'} - def __init__(self, container_types=None, determined=None, error=None, **unknown_fields): - ''' - container_types : typing.Sequence[str] - determined : bool - error : Error - ''' - container_types_ = container_types - determined_ = determined - error_ = Error.from_json(error) if error else None - - # Validate arguments against known Juju API types. - if container_types_ is not None and not isinstance(container_types_, (bytes, str, list)): - raise Exception("Expected container_types_ to be a Sequence, received: {}".format(type(container_types_))) - - if determined_ is not None and not isinstance(determined_, bool): - raise Exception("Expected determined_ to be a bool, received: {}".format(type(determined_))) - - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - - self.container_types = container_types_ - self.determined = determined_ - self.error = error_ - self.unknown_fields = unknown_fields - - - -class MachineContainerResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None, **unknown_fields): - ''' - results : typing.Sequence[~MachineContainerResult] - ''' - results_ = [MachineContainerResult.from_json(o) for o in results or []] - - # Validate arguments against known Juju API types. - if results_ is not None and not isinstance(results_, (bytes, str, list)): - raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) - - self.results = results_ - self.unknown_fields = unknown_fields - - - -class MachineContainers(Type): - _toSchema = {'container_types': 'container-types', 'machine_tag': 'machine-tag'} - _toPy = {'container-types': 'container_types', 'machine-tag': 'machine_tag'} - def __init__(self, container_types=None, machine_tag=None, **unknown_fields): - ''' - container_types : typing.Sequence[str] - machine_tag : str - ''' - container_types_ = container_types - machine_tag_ = machine_tag - - # Validate arguments against known Juju API types. - if container_types_ is not None and not isinstance(container_types_, (bytes, str, list)): - raise Exception("Expected container_types_ to be a Sequence, received: {}".format(type(container_types_))) - - if machine_tag_ is not None and not isinstance(machine_tag_, (bytes, str)): - raise Exception("Expected machine_tag_ to be a str, received: {}".format(type(machine_tag_))) - - self.container_types = container_types_ - self.machine_tag = machine_tag_ - self.unknown_fields = unknown_fields - - - -class MachineContainersParams(Type): - _toSchema = {'params': 'params'} - _toPy = {'params': 'params'} - def __init__(self, params=None, **unknown_fields): - ''' - params : typing.Sequence[~MachineContainers] - ''' - params_ = [MachineContainers.from_json(o) for o in params or []] - - # Validate arguments against known Juju API types. - if params_ is not None and not isinstance(params_, (bytes, str, list)): - raise Exception("Expected params_ to be a Sequence, received: {}".format(type(params_))) - - self.params = params_ - self.unknown_fields = unknown_fields - - - -class MachineHardware(Type): - _toSchema = {'arch': 'arch', 'availability_zone': 'availability-zone', 'cores': 'cores', 'cpu_power': 'cpu-power', 'mem': 'mem', 'root_disk': 'root-disk', 'tags': 'tags', 'virt_type': 'virt-type'} - _toPy = {'arch': 'arch', 'availability-zone': 'availability_zone', 'cores': 'cores', 'cpu-power': 'cpu_power', 'mem': 'mem', 'root-disk': 'root_disk', 'tags': 'tags', 'virt-type': 'virt_type'} - def __init__(self, arch=None, availability_zone=None, cores=None, cpu_power=None, mem=None, root_disk=None, tags=None, virt_type=None, **unknown_fields): - ''' - arch : str - availability_zone : str - cores : int - cpu_power : int - mem : int - root_disk : int - tags : typing.Sequence[str] - virt_type : str - ''' - arch_ = arch - availability_zone_ = availability_zone - cores_ = cores - cpu_power_ = cpu_power - mem_ = mem - root_disk_ = root_disk - tags_ = tags - virt_type_ = virt_type - - # Validate arguments against known Juju API types. - if arch_ is not None and not isinstance(arch_, (bytes, str)): - raise Exception("Expected arch_ to be a str, received: {}".format(type(arch_))) - - if availability_zone_ is not None and not isinstance(availability_zone_, (bytes, str)): - raise Exception("Expected availability_zone_ to be a str, received: {}".format(type(availability_zone_))) - - if cores_ is not None and not isinstance(cores_, int): - raise Exception("Expected cores_ to be a int, received: {}".format(type(cores_))) - - if cpu_power_ is not None and not isinstance(cpu_power_, int): - raise Exception("Expected cpu_power_ to be a int, received: {}".format(type(cpu_power_))) - - if mem_ is not None and not isinstance(mem_, int): - raise Exception("Expected mem_ to be a int, received: {}".format(type(mem_))) - - if root_disk_ is not None and not isinstance(root_disk_, int): - raise Exception("Expected root_disk_ to be a int, received: {}".format(type(root_disk_))) - - if tags_ is not None and not isinstance(tags_, (bytes, str, list)): - raise Exception("Expected tags_ to be a Sequence, received: {}".format(type(tags_))) - - if virt_type_ is not None and not isinstance(virt_type_, (bytes, str)): - raise Exception("Expected virt_type_ to be a str, received: {}".format(type(virt_type_))) - - self.arch = arch_ - self.availability_zone = availability_zone_ - self.cores = cores_ - self.cpu_power = cpu_power_ - self.mem = mem_ - self.root_disk = root_disk_ - self.tags = tags_ - self.virt_type = virt_type_ - self.unknown_fields = unknown_fields - - - -class MachineNetworkConfigResult(Type): - _toSchema = {'error': 'error', 'info': 'info'} - _toPy = {'error': 'error', 'info': 'info'} - def __init__(self, error=None, info=None, **unknown_fields): - ''' - error : Error - info : typing.Sequence[~NetworkConfig] - ''' - error_ = Error.from_json(error) if error else None - info_ = [NetworkConfig.from_json(o) for o in info or []] - - # Validate arguments against known Juju API types. - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - - if info_ is not None and not isinstance(info_, (bytes, str, list)): - raise Exception("Expected info_ to be a Sequence, received: {}".format(type(info_))) - - self.error = error_ - self.info = info_ - self.unknown_fields = unknown_fields - - - -class MachineNetworkConfigResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None, **unknown_fields): - ''' - results : typing.Sequence[~MachineNetworkConfigResult] - ''' - results_ = [MachineNetworkConfigResult.from_json(o) for o in results or []] - - # Validate arguments against known Juju API types. - if results_ is not None and not isinstance(results_, (bytes, str, list)): - raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) - - self.results = results_ - self.unknown_fields = unknown_fields - - - -class MachineStatus(Type): - _toSchema = {'agent_status': 'agent-status', 'base': 'base', 'constraints': 'constraints', 'containers': 'containers', 'display_name': 'display-name', 'dns_name': 'dns-name', 'hardware': 'hardware', 'has_vote': 'has-vote', 'hostname': 'hostname', 'id_': 'id', 'instance_id': 'instance-id', 'instance_status': 'instance-status', 'ip_addresses': 'ip-addresses', 'jobs': 'jobs', 'lxd_profiles': 'lxd-profiles', 'modification_status': 'modification-status', 'network_interfaces': 'network-interfaces', 'primary_controller_machine': 'primary-controller-machine', 'wants_vote': 'wants-vote'} - _toPy = {'agent-status': 'agent_status', 'base': 'base', 'constraints': 'constraints', 'containers': 'containers', 'display-name': 'display_name', 'dns-name': 'dns_name', 'hardware': 'hardware', 'has-vote': 'has_vote', 'hostname': 'hostname', 'id': 'id_', 'instance-id': 'instance_id', 'instance-status': 'instance_status', 'ip-addresses': 'ip_addresses', 'jobs': 'jobs', 'lxd-profiles': 'lxd_profiles', 'modification-status': 'modification_status', 'network-interfaces': 'network_interfaces', 'primary-controller-machine': 'primary_controller_machine', 'wants-vote': 'wants_vote'} - def __init__(self, agent_status=None, base=None, constraints=None, containers=None, display_name=None, dns_name=None, hardware=None, has_vote=None, hostname=None, id_=None, instance_id=None, instance_status=None, ip_addresses=None, jobs=None, lxd_profiles=None, modification_status=None, network_interfaces=None, primary_controller_machine=None, wants_vote=None, **unknown_fields): - ''' - agent_status : DetailedStatus - base : Base - constraints : str - containers : typing.Mapping[str, ~MachineStatus] - display_name : str - dns_name : str - hardware : str - has_vote : bool - hostname : str - id_ : str - instance_id : str - instance_status : DetailedStatus - ip_addresses : typing.Sequence[str] - jobs : typing.Sequence[str] - lxd_profiles : typing.Mapping[str, ~LXDProfile] - modification_status : DetailedStatus - network_interfaces : typing.Mapping[str, ~NetworkInterface] - primary_controller_machine : bool - wants_vote : bool - ''' - agent_status_ = DetailedStatus.from_json(agent_status) if agent_status else None - base_ = Base.from_json(base) if base else None - constraints_ = constraints - containers_ = {k: MachineStatus.from_json(v) for k, v in (containers or dict()).items()} - display_name_ = display_name - dns_name_ = dns_name - hardware_ = hardware - has_vote_ = has_vote - hostname_ = hostname - id__ = id_ - instance_id_ = instance_id - instance_status_ = DetailedStatus.from_json(instance_status) if instance_status else None - ip_addresses_ = ip_addresses - jobs_ = jobs - lxd_profiles_ = {k: LXDProfile.from_json(v) for k, v in (lxd_profiles or dict()).items()} - modification_status_ = DetailedStatus.from_json(modification_status) if modification_status else None - network_interfaces_ = {k: NetworkInterface.from_json(v) for k, v in (network_interfaces or dict()).items()} - primary_controller_machine_ = primary_controller_machine - wants_vote_ = wants_vote - - # Validate arguments against known Juju API types. - if agent_status_ is not None and not isinstance(agent_status_, (dict, DetailedStatus)): - raise Exception("Expected agent_status_ to be a DetailedStatus, received: {}".format(type(agent_status_))) - - if base_ is not None and not isinstance(base_, (dict, Base)): - raise Exception("Expected base_ to be a Base, received: {}".format(type(base_))) - - if constraints_ is not None and not isinstance(constraints_, (bytes, str)): - raise Exception("Expected constraints_ to be a str, received: {}".format(type(constraints_))) - - if containers_ is not None and not isinstance(containers_, dict): - raise Exception("Expected containers_ to be a Mapping, received: {}".format(type(containers_))) - - if display_name_ is not None and not isinstance(display_name_, (bytes, str)): - raise Exception("Expected display_name_ to be a str, received: {}".format(type(display_name_))) - - if dns_name_ is not None and not isinstance(dns_name_, (bytes, str)): - raise Exception("Expected dns_name_ to be a str, received: {}".format(type(dns_name_))) - - if hardware_ is not None and not isinstance(hardware_, (bytes, str)): - raise Exception("Expected hardware_ to be a str, received: {}".format(type(hardware_))) - - if has_vote_ is not None and not isinstance(has_vote_, bool): - raise Exception("Expected has_vote_ to be a bool, received: {}".format(type(has_vote_))) - - if hostname_ is not None and not isinstance(hostname_, (bytes, str)): - raise Exception("Expected hostname_ to be a str, received: {}".format(type(hostname_))) - - if id__ is not None and not isinstance(id__, (bytes, str)): - raise Exception("Expected id__ to be a str, received: {}".format(type(id__))) - - if instance_id_ is not None and not isinstance(instance_id_, (bytes, str)): - raise Exception("Expected instance_id_ to be a str, received: {}".format(type(instance_id_))) - - if instance_status_ is not None and not isinstance(instance_status_, (dict, DetailedStatus)): - raise Exception("Expected instance_status_ to be a DetailedStatus, received: {}".format(type(instance_status_))) - - if ip_addresses_ is not None and not isinstance(ip_addresses_, (bytes, str, list)): - raise Exception("Expected ip_addresses_ to be a Sequence, received: {}".format(type(ip_addresses_))) - - if jobs_ is not None and not isinstance(jobs_, (bytes, str, list)): - raise Exception("Expected jobs_ to be a Sequence, received: {}".format(type(jobs_))) - - if lxd_profiles_ is not None and not isinstance(lxd_profiles_, dict): - raise Exception("Expected lxd_profiles_ to be a Mapping, received: {}".format(type(lxd_profiles_))) - - if modification_status_ is not None and not isinstance(modification_status_, (dict, DetailedStatus)): - raise Exception("Expected modification_status_ to be a DetailedStatus, received: {}".format(type(modification_status_))) - - if network_interfaces_ is not None and not isinstance(network_interfaces_, dict): - raise Exception("Expected network_interfaces_ to be a Mapping, received: {}".format(type(network_interfaces_))) - - if primary_controller_machine_ is not None and not isinstance(primary_controller_machine_, bool): - raise Exception("Expected primary_controller_machine_ to be a bool, received: {}".format(type(primary_controller_machine_))) - - if wants_vote_ is not None and not isinstance(wants_vote_, bool): - raise Exception("Expected wants_vote_ to be a bool, received: {}".format(type(wants_vote_))) - - self.agent_status = agent_status_ - self.base = base_ - self.constraints = constraints_ - self.containers = containers_ - self.display_name = display_name_ - self.dns_name = dns_name_ - self.hardware = hardware_ - self.has_vote = has_vote_ - self.hostname = hostname_ - self.id_ = id__ - self.instance_id = instance_id_ - self.instance_status = instance_status_ - self.ip_addresses = ip_addresses_ - self.jobs = jobs_ - self.lxd_profiles = lxd_profiles_ - self.modification_status = modification_status_ - self.network_interfaces = network_interfaces_ - self.primary_controller_machine = primary_controller_machine_ - self.wants_vote = wants_vote_ - self.unknown_fields = unknown_fields - - - -class MachineStorageId(Type): - _toSchema = {'attachment_tag': 'attachment-tag', 'machine_tag': 'machine-tag'} - _toPy = {'attachment-tag': 'attachment_tag', 'machine-tag': 'machine_tag'} - def __init__(self, attachment_tag=None, machine_tag=None, **unknown_fields): - ''' - attachment_tag : str - machine_tag : str - ''' - attachment_tag_ = attachment_tag - machine_tag_ = machine_tag - - # Validate arguments against known Juju API types. - if attachment_tag_ is not None and not isinstance(attachment_tag_, (bytes, str)): - raise Exception("Expected attachment_tag_ to be a str, received: {}".format(type(attachment_tag_))) - - if machine_tag_ is not None and not isinstance(machine_tag_, (bytes, str)): - raise Exception("Expected machine_tag_ to be a str, received: {}".format(type(machine_tag_))) - - self.attachment_tag = attachment_tag_ - self.machine_tag = machine_tag_ - self.unknown_fields = unknown_fields - - - -class MachineStorageIds(Type): - _toSchema = {'ids': 'ids'} - _toPy = {'ids': 'ids'} - def __init__(self, ids=None, **unknown_fields): - ''' - ids : typing.Sequence[~MachineStorageId] - ''' - ids_ = [MachineStorageId.from_json(o) for o in ids or []] - - # Validate arguments against known Juju API types. - if ids_ is not None and not isinstance(ids_, (bytes, str, list)): - raise Exception("Expected ids_ to be a Sequence, received: {}".format(type(ids_))) - - self.ids = ids_ - self.unknown_fields = unknown_fields - - - -class MachineStorageIdsWatchResult(Type): - _toSchema = {'changes': 'changes', 'error': 'error', 'watcher_id': 'watcher-id'} - _toPy = {'changes': 'changes', 'error': 'error', 'watcher-id': 'watcher_id'} - def __init__(self, changes=None, error=None, watcher_id=None, **unknown_fields): - ''' - changes : typing.Sequence[~MachineStorageId] - error : Error - watcher_id : str - ''' - changes_ = [MachineStorageId.from_json(o) for o in changes or []] - error_ = Error.from_json(error) if error else None - watcher_id_ = watcher_id - - # Validate arguments against known Juju API types. - if changes_ is not None and not isinstance(changes_, (bytes, str, list)): - raise Exception("Expected changes_ to be a Sequence, received: {}".format(type(changes_))) - - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - - if watcher_id_ is not None and not isinstance(watcher_id_, (bytes, str)): - raise Exception("Expected watcher_id_ to be a str, received: {}".format(type(watcher_id_))) - - self.changes = changes_ - self.error = error_ - self.watcher_id = watcher_id_ - self.unknown_fields = unknown_fields - - - -class MachineStorageIdsWatchResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None, **unknown_fields): - ''' - results : typing.Sequence[~MachineStorageIdsWatchResult] - ''' - results_ = [MachineStorageIdsWatchResult.from_json(o) for o in results or []] - - # Validate arguments against known Juju API types. - if results_ is not None and not isinstance(results_, (bytes, str, list)): - raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) - - self.results = results_ - self.unknown_fields = unknown_fields - - - -class MapResult(Type): - _toSchema = {'error': 'error', 'result': 'result'} - _toPy = {'error': 'error', 'result': 'result'} - def __init__(self, error=None, result=None, **unknown_fields): - ''' - error : Error - result : typing.Mapping[str, typing.Any] - ''' - error_ = Error.from_json(error) if error else None - result_ = result - - # Validate arguments against known Juju API types. - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - - if result_ is not None and not isinstance(result_, dict): - raise Exception("Expected result_ to be a Mapping, received: {}".format(type(result_))) - - self.error = error_ - self.result = result_ - self.unknown_fields = unknown_fields - - - -class MapResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None, **unknown_fields): - ''' - results : typing.Sequence[~MapResult] - ''' - results_ = [MapResult.from_json(o) for o in results or []] - - # Validate arguments against known Juju API types. - if results_ is not None and not isinstance(results_, (bytes, str, list)): - raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) - - self.results = results_ - self.unknown_fields = unknown_fields - - - -class MasterMigrationStatus(Type): - _toSchema = {'migration_id': 'migration-id', 'phase': 'phase', 'phase_changed_time': 'phase-changed-time', 'spec': 'spec'} - _toPy = {'migration-id': 'migration_id', 'phase': 'phase', 'phase-changed-time': 'phase_changed_time', 'spec': 'spec'} - def __init__(self, migration_id=None, phase=None, phase_changed_time=None, spec=None, **unknown_fields): - ''' - migration_id : str - phase : str - phase_changed_time : str - spec : MigrationSpec - ''' - migration_id_ = migration_id - phase_ = phase - phase_changed_time_ = phase_changed_time - spec_ = MigrationSpec.from_json(spec) if spec else None - - # Validate arguments against known Juju API types. - if migration_id_ is not None and not isinstance(migration_id_, (bytes, str)): - raise Exception("Expected migration_id_ to be a str, received: {}".format(type(migration_id_))) - - if phase_ is not None and not isinstance(phase_, (bytes, str)): - raise Exception("Expected phase_ to be a str, received: {}".format(type(phase_))) - - if phase_changed_time_ is not None and not isinstance(phase_changed_time_, (bytes, str)): - raise Exception("Expected phase_changed_time_ to be a str, received: {}".format(type(phase_changed_time_))) - - if spec_ is not None and not isinstance(spec_, (dict, MigrationSpec)): - raise Exception("Expected spec_ to be a MigrationSpec, received: {}".format(type(spec_))) - - self.migration_id = migration_id_ - self.phase = phase_ - self.phase_changed_time = phase_changed_time_ - self.spec = spec_ - self.unknown_fields = unknown_fields - - - -class MergeLeadershipSettingsBulkParams(Type): - _toSchema = {'params': 'params'} - _toPy = {'params': 'params'} - def __init__(self, params=None, **unknown_fields): - ''' - params : typing.Sequence[~MergeLeadershipSettingsParam] - ''' - params_ = [MergeLeadershipSettingsParam.from_json(o) for o in params or []] - - # Validate arguments against known Juju API types. - if params_ is not None and not isinstance(params_, (bytes, str, list)): - raise Exception("Expected params_ to be a Sequence, received: {}".format(type(params_))) - - self.params = params_ - self.unknown_fields = unknown_fields - - - -class MergeLeadershipSettingsParam(Type): - _toSchema = {'application_tag': 'application-tag', 'settings': 'settings', 'unit_tag': 'unit-tag'} - _toPy = {'application-tag': 'application_tag', 'settings': 'settings', 'unit-tag': 'unit_tag'} - def __init__(self, application_tag=None, settings=None, unit_tag=None, **unknown_fields): - ''' - application_tag : str - settings : typing.Mapping[str, str] - unit_tag : str - ''' - application_tag_ = application_tag - settings_ = settings - unit_tag_ = unit_tag - - # Validate arguments against known Juju API types. - if application_tag_ is not None and not isinstance(application_tag_, (bytes, str)): - raise Exception("Expected application_tag_ to be a str, received: {}".format(type(application_tag_))) - - if settings_ is not None and not isinstance(settings_, dict): - raise Exception("Expected settings_ to be a Mapping, received: {}".format(type(settings_))) - - if unit_tag_ is not None and not isinstance(unit_tag_, (bytes, str)): - raise Exception("Expected unit_tag_ to be a str, received: {}".format(type(unit_tag_))) - - self.application_tag = application_tag_ - self.settings = settings_ - self.unit_tag = unit_tag_ - self.unknown_fields = unknown_fields - - - -class MetadataImageIds(Type): - _toSchema = {'image_ids': 'image-ids'} - _toPy = {'image-ids': 'image_ids'} - def __init__(self, image_ids=None, **unknown_fields): - ''' - image_ids : typing.Sequence[str] - ''' - image_ids_ = image_ids - - # Validate arguments against known Juju API types. - if image_ids_ is not None and not isinstance(image_ids_, (bytes, str, list)): - raise Exception("Expected image_ids_ to be a Sequence, received: {}".format(type(image_ids_))) - - self.image_ids = image_ids_ - self.unknown_fields = unknown_fields - - - -class MetadataSaveParams(Type): - _toSchema = {'metadata': 'metadata'} - _toPy = {'metadata': 'metadata'} - def __init__(self, metadata=None, **unknown_fields): - ''' - metadata : typing.Sequence[~CloudImageMetadataList] - ''' - metadata_ = [CloudImageMetadataList.from_json(o) for o in metadata or []] - - # Validate arguments against known Juju API types. - if metadata_ is not None and not isinstance(metadata_, (bytes, str, list)): - raise Exception("Expected metadata_ to be a Sequence, received: {}".format(type(metadata_))) - - self.metadata = metadata_ - self.unknown_fields = unknown_fields - - - -class MeterStatus(Type): - _toSchema = {'color': 'color', 'message': 'message'} - _toPy = {'color': 'color', 'message': 'message'} - def __init__(self, color=None, message=None, **unknown_fields): - ''' - color : str - message : str - ''' - color_ = color - message_ = message - - # Validate arguments against known Juju API types. - if color_ is not None and not isinstance(color_, (bytes, str)): - raise Exception("Expected color_ to be a str, received: {}".format(type(color_))) - - if message_ is not None and not isinstance(message_, (bytes, str)): - raise Exception("Expected message_ to be a str, received: {}".format(type(message_))) - - self.color = color_ - self.message = message_ - self.unknown_fields = unknown_fields - - - -class MeterStatusParam(Type): - _toSchema = {'code': 'code', 'info': 'info', 'tag': 'tag'} - _toPy = {'code': 'code', 'info': 'info', 'tag': 'tag'} - def __init__(self, code=None, info=None, tag=None, **unknown_fields): - ''' - code : str - info : str - tag : str - ''' - code_ = code - info_ = info - tag_ = tag - - # Validate arguments against known Juju API types. - if code_ is not None and not isinstance(code_, (bytes, str)): - raise Exception("Expected code_ to be a str, received: {}".format(type(code_))) - - if info_ is not None and not isinstance(info_, (bytes, str)): - raise Exception("Expected info_ to be a str, received: {}".format(type(info_))) - - if tag_ is not None and not isinstance(tag_, (bytes, str)): - raise Exception("Expected tag_ to be a str, received: {}".format(type(tag_))) - - self.code = code_ - self.info = info_ - self.tag = tag_ - self.unknown_fields = unknown_fields - - - -class MeterStatusParams(Type): - _toSchema = {'statues': 'statues'} - _toPy = {'statues': 'statues'} - def __init__(self, statues=None, **unknown_fields): - ''' - statues : typing.Sequence[~MeterStatusParam] - ''' - statues_ = [MeterStatusParam.from_json(o) for o in statues or []] - - # Validate arguments against known Juju API types. - if statues_ is not None and not isinstance(statues_, (bytes, str, list)): - raise Exception("Expected statues_ to be a Sequence, received: {}".format(type(statues_))) - - self.statues = statues_ - self.unknown_fields = unknown_fields - - - -class MeterStatusResult(Type): - _toSchema = {'code': 'code', 'error': 'error', 'info': 'info'} - _toPy = {'code': 'code', 'error': 'error', 'info': 'info'} - def __init__(self, code=None, error=None, info=None, **unknown_fields): - ''' - code : str - error : Error - info : str - ''' - code_ = code - error_ = Error.from_json(error) if error else None - info_ = info - - # Validate arguments against known Juju API types. - if code_ is not None and not isinstance(code_, (bytes, str)): - raise Exception("Expected code_ to be a str, received: {}".format(type(code_))) - - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - - if info_ is not None and not isinstance(info_, (bytes, str)): - raise Exception("Expected info_ to be a str, received: {}".format(type(info_))) - - self.code = code_ - self.error = error_ - self.info = info_ - self.unknown_fields = unknown_fields - - - -class MeterStatusResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None, **unknown_fields): - ''' - results : typing.Sequence[~MeterStatusResult] - ''' - results_ = [MeterStatusResult.from_json(o) for o in results or []] - - # Validate arguments against known Juju API types. - if results_ is not None and not isinstance(results_, (bytes, str, list)): - raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) - - self.results = results_ - self.unknown_fields = unknown_fields - - - -class Metric(Type): - _toSchema = {'key': 'key', 'labels': 'labels', 'time': 'time', 'value': 'value'} - _toPy = {'key': 'key', 'labels': 'labels', 'time': 'time', 'value': 'value'} - def __init__(self, key=None, labels=None, time=None, value=None, **unknown_fields): - ''' - key : str - labels : typing.Mapping[str, str] - time : str - value : str - ''' - key_ = key - labels_ = labels - time_ = time - value_ = value - - # Validate arguments against known Juju API types. - if key_ is not None and not isinstance(key_, (bytes, str)): - raise Exception("Expected key_ to be a str, received: {}".format(type(key_))) - - if labels_ is not None and not isinstance(labels_, dict): - raise Exception("Expected labels_ to be a Mapping, received: {}".format(type(labels_))) - - if time_ is not None and not isinstance(time_, (bytes, str)): - raise Exception("Expected time_ to be a str, received: {}".format(type(time_))) - - if value_ is not None and not isinstance(value_, (bytes, str)): - raise Exception("Expected value_ to be a str, received: {}".format(type(value_))) - - self.key = key_ - self.labels = labels_ - self.time = time_ - self.value = value_ - self.unknown_fields = unknown_fields - - - -class MetricBatch(Type): - _toSchema = {'charm_url': 'charm-url', 'created': 'created', 'metrics': 'metrics', 'uuid': 'uuid'} - _toPy = {'charm-url': 'charm_url', 'created': 'created', 'metrics': 'metrics', 'uuid': 'uuid'} - def __init__(self, charm_url=None, created=None, metrics=None, uuid=None, **unknown_fields): - ''' - charm_url : str - created : str - metrics : typing.Sequence[~Metric] - uuid : str - ''' - charm_url_ = charm_url - created_ = created - metrics_ = [Metric.from_json(o) for o in metrics or []] - uuid_ = uuid - - # Validate arguments against known Juju API types. - if charm_url_ is not None and not isinstance(charm_url_, (bytes, str)): - raise Exception("Expected charm_url_ to be a str, received: {}".format(type(charm_url_))) - - if created_ is not None and not isinstance(created_, (bytes, str)): - raise Exception("Expected created_ to be a str, received: {}".format(type(created_))) - - if metrics_ is not None and not isinstance(metrics_, (bytes, str, list)): - raise Exception("Expected metrics_ to be a Sequence, received: {}".format(type(metrics_))) - - if uuid_ is not None and not isinstance(uuid_, (bytes, str)): - raise Exception("Expected uuid_ to be a str, received: {}".format(type(uuid_))) - - self.charm_url = charm_url_ - self.created = created_ - self.metrics = metrics_ - self.uuid = uuid_ - self.unknown_fields = unknown_fields - - - -class MetricBatchParam(Type): - _toSchema = {'batch': 'batch', 'tag': 'tag'} - _toPy = {'batch': 'batch', 'tag': 'tag'} - def __init__(self, batch=None, tag=None, **unknown_fields): - ''' - batch : MetricBatch - tag : str - ''' - batch_ = MetricBatch.from_json(batch) if batch else None - tag_ = tag - - # Validate arguments against known Juju API types. - if batch_ is not None and not isinstance(batch_, (dict, MetricBatch)): - raise Exception("Expected batch_ to be a MetricBatch, received: {}".format(type(batch_))) - - if tag_ is not None and not isinstance(tag_, (bytes, str)): - raise Exception("Expected tag_ to be a str, received: {}".format(type(tag_))) - - self.batch = batch_ - self.tag = tag_ - self.unknown_fields = unknown_fields - - - -class MetricBatchParams(Type): - _toSchema = {'batches': 'batches'} - _toPy = {'batches': 'batches'} - def __init__(self, batches=None, **unknown_fields): - ''' - batches : typing.Sequence[~MetricBatchParam] - ''' - batches_ = [MetricBatchParam.from_json(o) for o in batches or []] - - # Validate arguments against known Juju API types. - if batches_ is not None and not isinstance(batches_, (bytes, str, list)): - raise Exception("Expected batches_ to be a Sequence, received: {}".format(type(batches_))) - - self.batches = batches_ - self.unknown_fields = unknown_fields - - - -class MetricResult(Type): - _toSchema = {'key': 'key', 'labels': 'labels', 'time': 'time', 'unit': 'unit', 'value': 'value'} - _toPy = {'key': 'key', 'labels': 'labels', 'time': 'time', 'unit': 'unit', 'value': 'value'} - def __init__(self, key=None, labels=None, time=None, unit=None, value=None, **unknown_fields): - ''' - key : str - labels : typing.Mapping[str, str] - time : str - unit : str - value : str - ''' - key_ = key - labels_ = labels - time_ = time - unit_ = unit - value_ = value - - # Validate arguments against known Juju API types. - if key_ is not None and not isinstance(key_, (bytes, str)): - raise Exception("Expected key_ to be a str, received: {}".format(type(key_))) - - if labels_ is not None and not isinstance(labels_, dict): - raise Exception("Expected labels_ to be a Mapping, received: {}".format(type(labels_))) - - if time_ is not None and not isinstance(time_, (bytes, str)): - raise Exception("Expected time_ to be a str, received: {}".format(type(time_))) - - if unit_ is not None and not isinstance(unit_, (bytes, str)): - raise Exception("Expected unit_ to be a str, received: {}".format(type(unit_))) - - if value_ is not None and not isinstance(value_, (bytes, str)): - raise Exception("Expected value_ to be a str, received: {}".format(type(value_))) - - self.key = key_ - self.labels = labels_ - self.time = time_ - self.unit = unit_ - self.value = value_ - self.unknown_fields = unknown_fields - - - -class MetricResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None, **unknown_fields): - ''' - results : typing.Sequence[~EntityMetrics] - ''' - results_ = [EntityMetrics.from_json(o) for o in results or []] - - # Validate arguments against known Juju API types. - if results_ is not None and not isinstance(results_, (bytes, str, list)): - raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) - - self.results = results_ - self.unknown_fields = unknown_fields - - - -class MigrationModelInfo(Type): - _toSchema = {'agent_version': 'agent-version', 'controller_agent_version': 'controller-agent-version', 'name': 'name', 'owner_tag': 'owner-tag', 'uuid': 'uuid'} - _toPy = {'agent-version': 'agent_version', 'controller-agent-version': 'controller_agent_version', 'name': 'name', 'owner-tag': 'owner_tag', 'uuid': 'uuid'} - def __init__(self, agent_version=None, controller_agent_version=None, name=None, owner_tag=None, uuid=None, **unknown_fields): - ''' - agent_version : Number - controller_agent_version : Number - name : str - owner_tag : str - uuid : str - ''' - agent_version_ = Number.from_json(agent_version) if agent_version else None - controller_agent_version_ = Number.from_json(controller_agent_version) if controller_agent_version else None - name_ = name - owner_tag_ = owner_tag - uuid_ = uuid - - # Validate arguments against known Juju API types. - if agent_version_ is not None and not isinstance(agent_version_, (dict, Number)): - raise Exception("Expected agent_version_ to be a Number, received: {}".format(type(agent_version_))) - - if controller_agent_version_ is not None and not isinstance(controller_agent_version_, (dict, Number)): - raise Exception("Expected controller_agent_version_ to be a Number, received: {}".format(type(controller_agent_version_))) - - if name_ is not None and not isinstance(name_, (bytes, str)): - raise Exception("Expected name_ to be a str, received: {}".format(type(name_))) - - if owner_tag_ is not None and not isinstance(owner_tag_, (bytes, str)): - raise Exception("Expected owner_tag_ to be a str, received: {}".format(type(owner_tag_))) - - if uuid_ is not None and not isinstance(uuid_, (bytes, str)): - raise Exception("Expected uuid_ to be a str, received: {}".format(type(uuid_))) - - self.agent_version = agent_version_ - self.controller_agent_version = controller_agent_version_ - self.name = name_ - self.owner_tag = owner_tag_ - self.uuid = uuid_ - self.unknown_fields = unknown_fields - - - -class MigrationSourceInfo(Type): - _toSchema = {'addrs': 'addrs', 'ca_cert': 'ca-cert', 'controller_alias': 'controller-alias', 'controller_tag': 'controller-tag', 'local_related_models': 'local-related-models'} - _toPy = {'addrs': 'addrs', 'ca-cert': 'ca_cert', 'controller-alias': 'controller_alias', 'controller-tag': 'controller_tag', 'local-related-models': 'local_related_models'} - def __init__(self, addrs=None, ca_cert=None, controller_alias=None, controller_tag=None, local_related_models=None, **unknown_fields): - ''' - addrs : typing.Sequence[str] - ca_cert : str - controller_alias : str - controller_tag : str - local_related_models : typing.Sequence[str] - ''' - addrs_ = addrs - ca_cert_ = ca_cert - controller_alias_ = controller_alias - controller_tag_ = controller_tag - local_related_models_ = local_related_models - - # Validate arguments against known Juju API types. - if addrs_ is not None and not isinstance(addrs_, (bytes, str, list)): - raise Exception("Expected addrs_ to be a Sequence, received: {}".format(type(addrs_))) - - if ca_cert_ is not None and not isinstance(ca_cert_, (bytes, str)): - raise Exception("Expected ca_cert_ to be a str, received: {}".format(type(ca_cert_))) - - if controller_alias_ is not None and not isinstance(controller_alias_, (bytes, str)): - raise Exception("Expected controller_alias_ to be a str, received: {}".format(type(controller_alias_))) - - if controller_tag_ is not None and not isinstance(controller_tag_, (bytes, str)): - raise Exception("Expected controller_tag_ to be a str, received: {}".format(type(controller_tag_))) - - if local_related_models_ is not None and not isinstance(local_related_models_, (bytes, str, list)): - raise Exception("Expected local_related_models_ to be a Sequence, received: {}".format(type(local_related_models_))) - - self.addrs = addrs_ - self.ca_cert = ca_cert_ - self.controller_alias = controller_alias_ - self.controller_tag = controller_tag_ - self.local_related_models = local_related_models_ - self.unknown_fields = unknown_fields - - - -class MigrationSpec(Type): - _toSchema = {'model_tag': 'model-tag', 'target_info': 'target-info'} - _toPy = {'model-tag': 'model_tag', 'target-info': 'target_info'} - def __init__(self, model_tag=None, target_info=None, **unknown_fields): - ''' - model_tag : str - target_info : MigrationTargetInfo - ''' - model_tag_ = model_tag - target_info_ = MigrationTargetInfo.from_json(target_info) if target_info else None - - # Validate arguments against known Juju API types. - if model_tag_ is not None and not isinstance(model_tag_, (bytes, str)): - raise Exception("Expected model_tag_ to be a str, received: {}".format(type(model_tag_))) - - if target_info_ is not None and not isinstance(target_info_, (dict, MigrationTargetInfo)): - raise Exception("Expected target_info_ to be a MigrationTargetInfo, received: {}".format(type(target_info_))) - - self.model_tag = model_tag_ - self.target_info = target_info_ - self.unknown_fields = unknown_fields - - - -class MigrationStatus(Type): - _toSchema = {'attempt': 'attempt', 'migration_id': 'migration-id', 'phase': 'phase', 'source_api_addrs': 'source-api-addrs', 'source_ca_cert': 'source-ca-cert', 'target_api_addrs': 'target-api-addrs', 'target_ca_cert': 'target-ca-cert'} - _toPy = {'attempt': 'attempt', 'migration-id': 'migration_id', 'phase': 'phase', 'source-api-addrs': 'source_api_addrs', 'source-ca-cert': 'source_ca_cert', 'target-api-addrs': 'target_api_addrs', 'target-ca-cert': 'target_ca_cert'} - def __init__(self, attempt=None, migration_id=None, phase=None, source_api_addrs=None, source_ca_cert=None, target_api_addrs=None, target_ca_cert=None, **unknown_fields): - ''' - attempt : int - migration_id : str - phase : str - source_api_addrs : typing.Sequence[str] - source_ca_cert : str - target_api_addrs : typing.Sequence[str] - target_ca_cert : str - ''' - attempt_ = attempt - migration_id_ = migration_id - phase_ = phase - source_api_addrs_ = source_api_addrs - source_ca_cert_ = source_ca_cert - target_api_addrs_ = target_api_addrs - target_ca_cert_ = target_ca_cert - - # Validate arguments against known Juju API types. - if attempt_ is not None and not isinstance(attempt_, int): - raise Exception("Expected attempt_ to be a int, received: {}".format(type(attempt_))) - - if migration_id_ is not None and not isinstance(migration_id_, (bytes, str)): - raise Exception("Expected migration_id_ to be a str, received: {}".format(type(migration_id_))) - - if phase_ is not None and not isinstance(phase_, (bytes, str)): - raise Exception("Expected phase_ to be a str, received: {}".format(type(phase_))) - - if source_api_addrs_ is not None and not isinstance(source_api_addrs_, (bytes, str, list)): - raise Exception("Expected source_api_addrs_ to be a Sequence, received: {}".format(type(source_api_addrs_))) - - if source_ca_cert_ is not None and not isinstance(source_ca_cert_, (bytes, str)): - raise Exception("Expected source_ca_cert_ to be a str, received: {}".format(type(source_ca_cert_))) - - if target_api_addrs_ is not None and not isinstance(target_api_addrs_, (bytes, str, list)): - raise Exception("Expected target_api_addrs_ to be a Sequence, received: {}".format(type(target_api_addrs_))) - - if target_ca_cert_ is not None and not isinstance(target_ca_cert_, (bytes, str)): - raise Exception("Expected target_ca_cert_ to be a str, received: {}".format(type(target_ca_cert_))) - - self.attempt = attempt_ - self.migration_id = migration_id_ - self.phase = phase_ - self.source_api_addrs = source_api_addrs_ - self.source_ca_cert = source_ca_cert_ - self.target_api_addrs = target_api_addrs_ - self.target_ca_cert = target_ca_cert_ - self.unknown_fields = unknown_fields - - - -class MigrationTargetInfo(Type): - _toSchema = {'addrs': 'addrs', 'auth_tag': 'auth-tag', 'ca_cert': 'ca-cert', 'controller_alias': 'controller-alias', 'controller_tag': 'controller-tag', 'macaroons': 'macaroons', 'password': 'password'} - _toPy = {'addrs': 'addrs', 'auth-tag': 'auth_tag', 'ca-cert': 'ca_cert', 'controller-alias': 'controller_alias', 'controller-tag': 'controller_tag', 'macaroons': 'macaroons', 'password': 'password'} - def __init__(self, addrs=None, auth_tag=None, ca_cert=None, controller_alias=None, controller_tag=None, macaroons=None, password=None, **unknown_fields): - ''' - addrs : typing.Sequence[str] - auth_tag : str - ca_cert : str - controller_alias : str - controller_tag : str - macaroons : str - password : str - ''' - addrs_ = addrs - auth_tag_ = auth_tag - ca_cert_ = ca_cert - controller_alias_ = controller_alias - controller_tag_ = controller_tag - macaroons_ = macaroons - password_ = password - - # Validate arguments against known Juju API types. - if addrs_ is not None and not isinstance(addrs_, (bytes, str, list)): - raise Exception("Expected addrs_ to be a Sequence, received: {}".format(type(addrs_))) - - if auth_tag_ is not None and not isinstance(auth_tag_, (bytes, str)): - raise Exception("Expected auth_tag_ to be a str, received: {}".format(type(auth_tag_))) - - if ca_cert_ is not None and not isinstance(ca_cert_, (bytes, str)): - raise Exception("Expected ca_cert_ to be a str, received: {}".format(type(ca_cert_))) - - if controller_alias_ is not None and not isinstance(controller_alias_, (bytes, str)): - raise Exception("Expected controller_alias_ to be a str, received: {}".format(type(controller_alias_))) - - if controller_tag_ is not None and not isinstance(controller_tag_, (bytes, str)): - raise Exception("Expected controller_tag_ to be a str, received: {}".format(type(controller_tag_))) - - if macaroons_ is not None and not isinstance(macaroons_, (bytes, str)): - raise Exception("Expected macaroons_ to be a str, received: {}".format(type(macaroons_))) - - if password_ is not None and not isinstance(password_, (bytes, str)): - raise Exception("Expected password_ to be a str, received: {}".format(type(password_))) - - self.addrs = addrs_ - self.auth_tag = auth_tag_ - self.ca_cert = ca_cert_ - self.controller_alias = controller_alias_ - self.controller_tag = controller_tag_ - self.macaroons = macaroons_ - self.password = password_ - self.unknown_fields = unknown_fields - - - -class MinionReport(Type): - _toSchema = {'migration_id': 'migration-id', 'phase': 'phase', 'success': 'success'} - _toPy = {'migration-id': 'migration_id', 'phase': 'phase', 'success': 'success'} - def __init__(self, migration_id=None, phase=None, success=None, **unknown_fields): - ''' - migration_id : str - phase : str - success : bool - ''' - migration_id_ = migration_id - phase_ = phase - success_ = success - - # Validate arguments against known Juju API types. - if migration_id_ is not None and not isinstance(migration_id_, (bytes, str)): - raise Exception("Expected migration_id_ to be a str, received: {}".format(type(migration_id_))) - - if phase_ is not None and not isinstance(phase_, (bytes, str)): - raise Exception("Expected phase_ to be a str, received: {}".format(type(phase_))) - - if success_ is not None and not isinstance(success_, bool): - raise Exception("Expected success_ to be a bool, received: {}".format(type(success_))) - - self.migration_id = migration_id_ - self.phase = phase_ - self.success = success_ - self.unknown_fields = unknown_fields - - - -class MinionReports(Type): - _toSchema = {'failed': 'failed', 'migration_id': 'migration-id', 'phase': 'phase', 'success_count': 'success-count', 'unknown_count': 'unknown-count', 'unknown_sample': 'unknown-sample'} - _toPy = {'failed': 'failed', 'migration-id': 'migration_id', 'phase': 'phase', 'success-count': 'success_count', 'unknown-count': 'unknown_count', 'unknown-sample': 'unknown_sample'} - def __init__(self, failed=None, migration_id=None, phase=None, success_count=None, unknown_count=None, unknown_sample=None, **unknown_fields): - ''' - failed : typing.Sequence[str] - migration_id : str - phase : str - success_count : int - unknown_count : int - unknown_sample : typing.Sequence[str] - ''' - failed_ = failed - migration_id_ = migration_id - phase_ = phase - success_count_ = success_count - unknown_count_ = unknown_count - unknown_sample_ = unknown_sample - - # Validate arguments against known Juju API types. - if failed_ is not None and not isinstance(failed_, (bytes, str, list)): - raise Exception("Expected failed_ to be a Sequence, received: {}".format(type(failed_))) - - if migration_id_ is not None and not isinstance(migration_id_, (bytes, str)): - raise Exception("Expected migration_id_ to be a str, received: {}".format(type(migration_id_))) - - if phase_ is not None and not isinstance(phase_, (bytes, str)): - raise Exception("Expected phase_ to be a str, received: {}".format(type(phase_))) - - if success_count_ is not None and not isinstance(success_count_, int): - raise Exception("Expected success_count_ to be a int, received: {}".format(type(success_count_))) - - if unknown_count_ is not None and not isinstance(unknown_count_, int): - raise Exception("Expected unknown_count_ to be a int, received: {}".format(type(unknown_count_))) - - if unknown_sample_ is not None and not isinstance(unknown_sample_, (bytes, str, list)): - raise Exception("Expected unknown_sample_ to be a Sequence, received: {}".format(type(unknown_sample_))) - - self.failed = failed_ - self.migration_id = migration_id_ - self.phase = phase_ - self.success_count = success_count_ - self.unknown_count = unknown_count_ - self.unknown_sample = unknown_sample_ - self.unknown_fields = unknown_fields - - - -class Model(Type): - _toSchema = {'name': 'name', 'owner_tag': 'owner-tag', 'type_': 'type', 'uuid': 'uuid'} - _toPy = {'name': 'name', 'owner-tag': 'owner_tag', 'type': 'type_', 'uuid': 'uuid'} - def __init__(self, name=None, owner_tag=None, type_=None, uuid=None, **unknown_fields): - ''' - name : str - owner_tag : str - type_ : str - uuid : str - ''' - name_ = name - owner_tag_ = owner_tag - type__ = type_ - uuid_ = uuid - - # Validate arguments against known Juju API types. - if name_ is not None and not isinstance(name_, (bytes, str)): - raise Exception("Expected name_ to be a str, received: {}".format(type(name_))) - - if owner_tag_ is not None and not isinstance(owner_tag_, (bytes, str)): - raise Exception("Expected owner_tag_ to be a str, received: {}".format(type(owner_tag_))) - - if type__ is not None and not isinstance(type__, (bytes, str)): - raise Exception("Expected type__ to be a str, received: {}".format(type(type__))) - - if uuid_ is not None and not isinstance(uuid_, (bytes, str)): - raise Exception("Expected uuid_ to be a str, received: {}".format(type(uuid_))) - - self.name = name_ - self.owner_tag = owner_tag_ - self.type_ = type__ - self.uuid = uuid_ - self.unknown_fields = unknown_fields - - - -class ModelAbstract(Type): - _toSchema = {'admins': 'admins', 'annotations': 'annotations', 'cloud': 'cloud', 'controller': 'controller', 'credential': 'credential', 'messages': 'messages', 'name': 'name', 'region': 'region', 'removed': 'removed', 'size': 'size', 'status': 'status', 'uuid': 'uuid'} - _toPy = {'admins': 'admins', 'annotations': 'annotations', 'cloud': 'cloud', 'controller': 'controller', 'credential': 'credential', 'messages': 'messages', 'name': 'name', 'region': 'region', 'removed': 'removed', 'size': 'size', 'status': 'status', 'uuid': 'uuid'} - def __init__(self, admins=None, annotations=None, cloud=None, controller=None, credential=None, messages=None, name=None, region=None, removed=None, size=None, status=None, uuid=None, **unknown_fields): - ''' - admins : typing.Sequence[str] - annotations : typing.Mapping[str, str] - cloud : str - controller : str - credential : str - messages : typing.Sequence[~ModelSummaryMessage] - name : str - region : str - removed : bool - size : ModelSummarySize - status : str - uuid : str - ''' - admins_ = admins - annotations_ = annotations - cloud_ = cloud - controller_ = controller - credential_ = credential - messages_ = [ModelSummaryMessage.from_json(o) for o in messages or []] - name_ = name - region_ = region - removed_ = removed - size_ = ModelSummarySize.from_json(size) if size else None - status_ = status - uuid_ = uuid - - # Validate arguments against known Juju API types. - if admins_ is not None and not isinstance(admins_, (bytes, str, list)): - raise Exception("Expected admins_ to be a Sequence, received: {}".format(type(admins_))) - - if annotations_ is not None and not isinstance(annotations_, dict): - raise Exception("Expected annotations_ to be a Mapping, received: {}".format(type(annotations_))) - - if cloud_ is not None and not isinstance(cloud_, (bytes, str)): - raise Exception("Expected cloud_ to be a str, received: {}".format(type(cloud_))) - - if controller_ is not None and not isinstance(controller_, (bytes, str)): - raise Exception("Expected controller_ to be a str, received: {}".format(type(controller_))) - - if credential_ is not None and not isinstance(credential_, (bytes, str)): - raise Exception("Expected credential_ to be a str, received: {}".format(type(credential_))) - - if messages_ is not None and not isinstance(messages_, (bytes, str, list)): - raise Exception("Expected messages_ to be a Sequence, received: {}".format(type(messages_))) - - if name_ is not None and not isinstance(name_, (bytes, str)): - raise Exception("Expected name_ to be a str, received: {}".format(type(name_))) - - if region_ is not None and not isinstance(region_, (bytes, str)): - raise Exception("Expected region_ to be a str, received: {}".format(type(region_))) - - if removed_ is not None and not isinstance(removed_, bool): - raise Exception("Expected removed_ to be a bool, received: {}".format(type(removed_))) - - if size_ is not None and not isinstance(size_, (dict, ModelSummarySize)): - raise Exception("Expected size_ to be a ModelSummarySize, received: {}".format(type(size_))) - - if status_ is not None and not isinstance(status_, (bytes, str)): - raise Exception("Expected status_ to be a str, received: {}".format(type(status_))) - - if uuid_ is not None and not isinstance(uuid_, (bytes, str)): - raise Exception("Expected uuid_ to be a str, received: {}".format(type(uuid_))) - - self.admins = admins_ - self.annotations = annotations_ - self.cloud = cloud_ - self.controller = controller_ - self.credential = credential_ - self.messages = messages_ - self.name = name_ - self.region = region_ - self.removed = removed_ - self.size = size_ - self.status = status_ - self.uuid = uuid_ - self.unknown_fields = unknown_fields - - - -class ModelAccess(Type): - _toSchema = {'access': 'access', 'model': 'model'} - _toPy = {'access': 'access', 'model': 'model'} - def __init__(self, access=None, model=None, **unknown_fields): - ''' - access : str - model : str - ''' - access_ = access - model_ = model - - # Validate arguments against known Juju API types. - if access_ is not None and not isinstance(access_, (bytes, str)): - raise Exception("Expected access_ to be a str, received: {}".format(type(access_))) - - if model_ is not None and not isinstance(model_, (bytes, str)): - raise Exception("Expected model_ to be a str, received: {}".format(type(model_))) - - self.access = access_ - self.model = model_ - self.unknown_fields = unknown_fields - - - -class ModelApplicationInfo(Type): - _toSchema = {'name': 'name'} - _toPy = {'name': 'name'} - def __init__(self, name=None, **unknown_fields): - ''' - name : str - ''' - name_ = name - - # Validate arguments against known Juju API types. - if name_ is not None and not isinstance(name_, (bytes, str)): - raise Exception("Expected name_ to be a str, received: {}".format(type(name_))) - - self.name = name_ - self.unknown_fields = unknown_fields - - - -class ModelArgs(Type): - _toSchema = {'model_tag': 'model-tag'} - _toPy = {'model-tag': 'model_tag'} - def __init__(self, model_tag=None, **unknown_fields): - ''' - model_tag : str - ''' - model_tag_ = model_tag - - # Validate arguments against known Juju API types. - if model_tag_ is not None and not isinstance(model_tag_, (bytes, str)): - raise Exception("Expected model_tag_ to be a str, received: {}".format(type(model_tag_))) - - self.model_tag = model_tag_ - self.unknown_fields = unknown_fields - - - -class ModelBlockInfo(Type): - _toSchema = {'blocks': 'blocks', 'model_uuid': 'model-uuid', 'name': 'name', 'owner_tag': 'owner-tag'} - _toPy = {'blocks': 'blocks', 'model-uuid': 'model_uuid', 'name': 'name', 'owner-tag': 'owner_tag'} - def __init__(self, blocks=None, model_uuid=None, name=None, owner_tag=None, **unknown_fields): - ''' - blocks : typing.Sequence[str] - model_uuid : str - name : str - owner_tag : str - ''' - blocks_ = blocks - model_uuid_ = model_uuid - name_ = name - owner_tag_ = owner_tag - - # Validate arguments against known Juju API types. - if blocks_ is not None and not isinstance(blocks_, (bytes, str, list)): - raise Exception("Expected blocks_ to be a Sequence, received: {}".format(type(blocks_))) - - if model_uuid_ is not None and not isinstance(model_uuid_, (bytes, str)): - raise Exception("Expected model_uuid_ to be a str, received: {}".format(type(model_uuid_))) - - if name_ is not None and not isinstance(name_, (bytes, str)): - raise Exception("Expected name_ to be a str, received: {}".format(type(name_))) - - if owner_tag_ is not None and not isinstance(owner_tag_, (bytes, str)): - raise Exception("Expected owner_tag_ to be a str, received: {}".format(type(owner_tag_))) - - self.blocks = blocks_ - self.model_uuid = model_uuid_ - self.name = name_ - self.owner_tag = owner_tag_ - self.unknown_fields = unknown_fields - - - -class ModelBlockInfoList(Type): - _toSchema = {'models': 'models'} - _toPy = {'models': 'models'} - def __init__(self, models=None, **unknown_fields): - ''' - models : typing.Sequence[~ModelBlockInfo] - ''' - models_ = [ModelBlockInfo.from_json(o) for o in models or []] - - # Validate arguments against known Juju API types. - if models_ is not None and not isinstance(models_, (bytes, str, list)): - raise Exception("Expected models_ to be a Sequence, received: {}".format(type(models_))) - - self.models = models_ - self.unknown_fields = unknown_fields - - - -class ModelConfigResult(Type): - _toSchema = {'config': 'config'} - _toPy = {'config': 'config'} - def __init__(self, config=None, **unknown_fields): - ''' - config : typing.Mapping[str, typing.Any] - ''' - config_ = config - - # Validate arguments against known Juju API types. - if config_ is not None and not isinstance(config_, dict): - raise Exception("Expected config_ to be a Mapping, received: {}".format(type(config_))) - - self.config = config_ - self.unknown_fields = unknown_fields - - - -class ModelConfigResults(Type): - _toSchema = {'config': 'config'} - _toPy = {'config': 'config'} - def __init__(self, config=None, **unknown_fields): - ''' - config : typing.Mapping[str, ~ConfigValue] - ''' - config_ = {k: ConfigValue.from_json(v) for k, v in (config or dict()).items()} - - # Validate arguments against known Juju API types. - if config_ is not None and not isinstance(config_, dict): - raise Exception("Expected config_ to be a Mapping, received: {}".format(type(config_))) - - self.config = config_ - self.unknown_fields = unknown_fields - - - -class ModelCreateArgs(Type): - _toSchema = {'cloud_tag': 'cloud-tag', 'config': 'config', 'credential': 'credential', 'name': 'name', 'owner_tag': 'owner-tag', 'region': 'region'} - _toPy = {'cloud-tag': 'cloud_tag', 'config': 'config', 'credential': 'credential', 'name': 'name', 'owner-tag': 'owner_tag', 'region': 'region'} - def __init__(self, cloud_tag=None, config=None, credential=None, name=None, owner_tag=None, region=None, **unknown_fields): - ''' - cloud_tag : str - config : typing.Mapping[str, typing.Any] - credential : str - name : str - owner_tag : str - region : str - ''' - cloud_tag_ = cloud_tag - config_ = config - credential_ = credential - name_ = name - owner_tag_ = owner_tag - region_ = region - - # Validate arguments against known Juju API types. - if cloud_tag_ is not None and not isinstance(cloud_tag_, (bytes, str)): - raise Exception("Expected cloud_tag_ to be a str, received: {}".format(type(cloud_tag_))) - - if config_ is not None and not isinstance(config_, dict): - raise Exception("Expected config_ to be a Mapping, received: {}".format(type(config_))) - - if credential_ is not None and not isinstance(credential_, (bytes, str)): - raise Exception("Expected credential_ to be a str, received: {}".format(type(credential_))) - - if name_ is not None and not isinstance(name_, (bytes, str)): - raise Exception("Expected name_ to be a str, received: {}".format(type(name_))) - - if owner_tag_ is not None and not isinstance(owner_tag_, (bytes, str)): - raise Exception("Expected owner_tag_ to be a str, received: {}".format(type(owner_tag_))) - - if region_ is not None and not isinstance(region_, (bytes, str)): - raise Exception("Expected region_ to be a str, received: {}".format(type(region_))) - - self.cloud_tag = cloud_tag_ - self.config = config_ - self.credential = credential_ - self.name = name_ - self.owner_tag = owner_tag_ - self.region = region_ - self.unknown_fields = unknown_fields - - - -class ModelCredential(Type): - _toSchema = {'credential_tag': 'credential-tag', 'exists': 'exists', 'model_tag': 'model-tag', 'valid': 'valid'} - _toPy = {'credential-tag': 'credential_tag', 'exists': 'exists', 'model-tag': 'model_tag', 'valid': 'valid'} - def __init__(self, credential_tag=None, exists=None, model_tag=None, valid=None, **unknown_fields): - ''' - credential_tag : str - exists : bool - model_tag : str - valid : bool - ''' - credential_tag_ = credential_tag - exists_ = exists - model_tag_ = model_tag - valid_ = valid - - # Validate arguments against known Juju API types. - if credential_tag_ is not None and not isinstance(credential_tag_, (bytes, str)): - raise Exception("Expected credential_tag_ to be a str, received: {}".format(type(credential_tag_))) - - if exists_ is not None and not isinstance(exists_, bool): - raise Exception("Expected exists_ to be a bool, received: {}".format(type(exists_))) - - if model_tag_ is not None and not isinstance(model_tag_, (bytes, str)): - raise Exception("Expected model_tag_ to be a str, received: {}".format(type(model_tag_))) - - if valid_ is not None and not isinstance(valid_, bool): - raise Exception("Expected valid_ to be a bool, received: {}".format(type(valid_))) - - self.credential_tag = credential_tag_ - self.exists = exists_ - self.model_tag = model_tag_ - self.valid = valid_ - self.unknown_fields = unknown_fields - - - -class ModelDefaultValues(Type): - _toSchema = {'cloud_region': 'cloud-region', 'cloud_tag': 'cloud-tag', 'config': 'config'} - _toPy = {'cloud-region': 'cloud_region', 'cloud-tag': 'cloud_tag', 'config': 'config'} - def __init__(self, cloud_region=None, cloud_tag=None, config=None, **unknown_fields): - ''' - cloud_region : str - cloud_tag : str - config : typing.Mapping[str, typing.Any] - ''' - cloud_region_ = cloud_region - cloud_tag_ = cloud_tag - config_ = config - - # Validate arguments against known Juju API types. - if cloud_region_ is not None and not isinstance(cloud_region_, (bytes, str)): - raise Exception("Expected cloud_region_ to be a str, received: {}".format(type(cloud_region_))) - - if cloud_tag_ is not None and not isinstance(cloud_tag_, (bytes, str)): - raise Exception("Expected cloud_tag_ to be a str, received: {}".format(type(cloud_tag_))) - - if config_ is not None and not isinstance(config_, dict): - raise Exception("Expected config_ to be a Mapping, received: {}".format(type(config_))) - - self.cloud_region = cloud_region_ - self.cloud_tag = cloud_tag_ - self.config = config_ - self.unknown_fields = unknown_fields - - - -class ModelDefaults(Type): - _toSchema = {'controller': 'controller', 'default': 'default', 'regions': 'regions'} - _toPy = {'controller': 'controller', 'default': 'default', 'regions': 'regions'} - def __init__(self, controller=None, default=None, regions=None, **unknown_fields): - ''' - controller : Any - default : Any - regions : typing.Sequence[~RegionDefaults] - ''' - controller_ = controller - default_ = default - regions_ = [RegionDefaults.from_json(o) for o in regions or []] - - # Validate arguments against known Juju API types. - if regions_ is not None and not isinstance(regions_, (bytes, str, list)): - raise Exception("Expected regions_ to be a Sequence, received: {}".format(type(regions_))) - - self.controller = controller_ - self.default = default_ - self.regions = regions_ - self.unknown_fields = unknown_fields - - - -class ModelDefaultsResult(Type): - _toSchema = {'config': 'config', 'error': 'error'} - _toPy = {'config': 'config', 'error': 'error'} - def __init__(self, config=None, error=None, **unknown_fields): - ''' - config : typing.Mapping[str, ~ModelDefaults] - error : Error - ''' - config_ = {k: ModelDefaults.from_json(v) for k, v in (config or dict()).items()} - error_ = Error.from_json(error) if error else None - - # Validate arguments against known Juju API types. - if config_ is not None and not isinstance(config_, dict): - raise Exception("Expected config_ to be a Mapping, received: {}".format(type(config_))) - - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - - self.config = config_ - self.error = error_ - self.unknown_fields = unknown_fields - - - -class ModelDefaultsResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None, **unknown_fields): - ''' - results : typing.Sequence[~ModelDefaultsResult] - ''' - results_ = [ModelDefaultsResult.from_json(o) for o in results or []] - - # Validate arguments against known Juju API types. - if results_ is not None and not isinstance(results_, (bytes, str, list)): - raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) - - self.results = results_ - self.unknown_fields = unknown_fields - - - -class ModelEntityCount(Type): - _toSchema = {'count': 'count', 'entity': 'entity'} - _toPy = {'count': 'count', 'entity': 'entity'} - def __init__(self, count=None, entity=None, **unknown_fields): - ''' - count : int - entity : str - ''' - count_ = count - entity_ = entity - - # Validate arguments against known Juju API types. - if count_ is not None and not isinstance(count_, int): - raise Exception("Expected count_ to be a int, received: {}".format(type(count_))) - - if entity_ is not None and not isinstance(entity_, (bytes, str)): - raise Exception("Expected entity_ to be a str, received: {}".format(type(entity_))) - - self.count = count_ - self.entity = entity_ - self.unknown_fields = unknown_fields - - - -class ModelFilesystemInfo(Type): - _toSchema = {'detachable': 'detachable', 'id_': 'id', 'message': 'message', 'provider_id': 'provider-id', 'status': 'status'} - _toPy = {'detachable': 'detachable', 'id': 'id_', 'message': 'message', 'provider-id': 'provider_id', 'status': 'status'} - def __init__(self, detachable=None, id_=None, message=None, provider_id=None, status=None, **unknown_fields): - ''' - detachable : bool - id_ : str - message : str - provider_id : str - status : str - ''' - detachable_ = detachable - id__ = id_ - message_ = message - provider_id_ = provider_id - status_ = status - - # Validate arguments against known Juju API types. - if detachable_ is not None and not isinstance(detachable_, bool): - raise Exception("Expected detachable_ to be a bool, received: {}".format(type(detachable_))) - - if id__ is not None and not isinstance(id__, (bytes, str)): - raise Exception("Expected id__ to be a str, received: {}".format(type(id__))) - - if message_ is not None and not isinstance(message_, (bytes, str)): - raise Exception("Expected message_ to be a str, received: {}".format(type(message_))) - - if provider_id_ is not None and not isinstance(provider_id_, (bytes, str)): - raise Exception("Expected provider_id_ to be a str, received: {}".format(type(provider_id_))) - - if status_ is not None and not isinstance(status_, (bytes, str)): - raise Exception("Expected status_ to be a str, received: {}".format(type(status_))) - - self.detachable = detachable_ - self.id_ = id__ - self.message = message_ - self.provider_id = provider_id_ - self.status = status_ - self.unknown_fields = unknown_fields - - - -class ModelInfo(Type): - _toSchema = {'agent_version': 'agent-version', 'cloud_credential_tag': 'cloud-credential-tag', 'cloud_credential_validity': 'cloud-credential-validity', 'cloud_region': 'cloud-region', 'cloud_tag': 'cloud-tag', 'controller_uuid': 'controller-uuid', 'default_base': 'default-base', 'default_series': 'default-series', 'is_controller': 'is-controller', 'life': 'life', 'machines': 'machines', 'migration': 'migration', 'name': 'name', 'owner_tag': 'owner-tag', 'provider_type': 'provider-type', 'secret_backends': 'secret-backends', 'sla': 'sla', 'status': 'status', 'supported_features': 'supported-features', 'type_': 'type', 'users': 'users', 'uuid': 'uuid'} - _toPy = {'agent-version': 'agent_version', 'cloud-credential-tag': 'cloud_credential_tag', 'cloud-credential-validity': 'cloud_credential_validity', 'cloud-region': 'cloud_region', 'cloud-tag': 'cloud_tag', 'controller-uuid': 'controller_uuid', 'default-base': 'default_base', 'default-series': 'default_series', 'is-controller': 'is_controller', 'life': 'life', 'machines': 'machines', 'migration': 'migration', 'name': 'name', 'owner-tag': 'owner_tag', 'provider-type': 'provider_type', 'secret-backends': 'secret_backends', 'sla': 'sla', 'status': 'status', 'supported-features': 'supported_features', 'type': 'type_', 'users': 'users', 'uuid': 'uuid'} - def __init__(self, agent_version=None, cloud_credential_tag=None, cloud_credential_validity=None, cloud_region=None, cloud_tag=None, controller_uuid=None, default_base=None, default_series=None, is_controller=None, life=None, machines=None, migration=None, name=None, owner_tag=None, provider_type=None, secret_backends=None, sla=None, status=None, supported_features=None, type_=None, users=None, uuid=None, **unknown_fields): - ''' - agent_version : Number - cloud_credential_tag : str - cloud_credential_validity : bool - cloud_region : str - cloud_tag : str - controller_uuid : str - default_base : str - default_series : str - is_controller : bool - life : str - machines : typing.Sequence[~ModelMachineInfo] - migration : ModelMigrationStatus - name : str - owner_tag : str - provider_type : str - secret_backends : typing.Sequence[~SecretBackendResult] - sla : ModelSLAInfo - status : EntityStatus - supported_features : typing.Sequence[~SupportedFeature] - type_ : str - users : typing.Sequence[~ModelUserInfo] - uuid : str - ''' - agent_version_ = Number.from_json(agent_version) if agent_version else None - cloud_credential_tag_ = cloud_credential_tag - cloud_credential_validity_ = cloud_credential_validity - cloud_region_ = cloud_region - cloud_tag_ = cloud_tag - controller_uuid_ = controller_uuid - default_base_ = default_base - default_series_ = default_series - is_controller_ = is_controller - life_ = life - machines_ = [ModelMachineInfo.from_json(o) for o in machines or []] - migration_ = ModelMigrationStatus.from_json(migration) if migration else None - name_ = name - owner_tag_ = owner_tag - provider_type_ = provider_type - secret_backends_ = [SecretBackendResult.from_json(o) for o in secret_backends or []] - sla_ = ModelSLAInfo.from_json(sla) if sla else None - status_ = EntityStatus.from_json(status) if status else None - supported_features_ = [SupportedFeature.from_json(o) for o in supported_features or []] - type__ = type_ - users_ = [ModelUserInfo.from_json(o) for o in users or []] - uuid_ = uuid - - # Validate arguments against known Juju API types. - if agent_version_ is not None and not isinstance(agent_version_, (dict, Number)): - raise Exception("Expected agent_version_ to be a Number, received: {}".format(type(agent_version_))) - - if cloud_credential_tag_ is not None and not isinstance(cloud_credential_tag_, (bytes, str)): - raise Exception("Expected cloud_credential_tag_ to be a str, received: {}".format(type(cloud_credential_tag_))) - - if cloud_credential_validity_ is not None and not isinstance(cloud_credential_validity_, bool): - raise Exception("Expected cloud_credential_validity_ to be a bool, received: {}".format(type(cloud_credential_validity_))) - - if cloud_region_ is not None and not isinstance(cloud_region_, (bytes, str)): - raise Exception("Expected cloud_region_ to be a str, received: {}".format(type(cloud_region_))) - - if cloud_tag_ is not None and not isinstance(cloud_tag_, (bytes, str)): - raise Exception("Expected cloud_tag_ to be a str, received: {}".format(type(cloud_tag_))) - - if controller_uuid_ is not None and not isinstance(controller_uuid_, (bytes, str)): - raise Exception("Expected controller_uuid_ to be a str, received: {}".format(type(controller_uuid_))) - - if default_base_ is not None and not isinstance(default_base_, (bytes, str)): - raise Exception("Expected default_base_ to be a str, received: {}".format(type(default_base_))) - - if default_series_ is not None and not isinstance(default_series_, (bytes, str)): - raise Exception("Expected default_series_ to be a str, received: {}".format(type(default_series_))) - - if is_controller_ is not None and not isinstance(is_controller_, bool): - raise Exception("Expected is_controller_ to be a bool, received: {}".format(type(is_controller_))) - - if life_ is not None and not isinstance(life_, (bytes, str)): - raise Exception("Expected life_ to be a str, received: {}".format(type(life_))) - - if machines_ is not None and not isinstance(machines_, (bytes, str, list)): - raise Exception("Expected machines_ to be a Sequence, received: {}".format(type(machines_))) - - if migration_ is not None and not isinstance(migration_, (dict, ModelMigrationStatus)): - raise Exception("Expected migration_ to be a ModelMigrationStatus, received: {}".format(type(migration_))) - - if name_ is not None and not isinstance(name_, (bytes, str)): - raise Exception("Expected name_ to be a str, received: {}".format(type(name_))) - - if owner_tag_ is not None and not isinstance(owner_tag_, (bytes, str)): - raise Exception("Expected owner_tag_ to be a str, received: {}".format(type(owner_tag_))) - - if provider_type_ is not None and not isinstance(provider_type_, (bytes, str)): - raise Exception("Expected provider_type_ to be a str, received: {}".format(type(provider_type_))) - - if secret_backends_ is not None and not isinstance(secret_backends_, (bytes, str, list)): - raise Exception("Expected secret_backends_ to be a Sequence, received: {}".format(type(secret_backends_))) - - if sla_ is not None and not isinstance(sla_, (dict, ModelSLAInfo)): - raise Exception("Expected sla_ to be a ModelSLAInfo, received: {}".format(type(sla_))) - - if status_ is not None and not isinstance(status_, (dict, EntityStatus)): - raise Exception("Expected status_ to be a EntityStatus, received: {}".format(type(status_))) - - if supported_features_ is not None and not isinstance(supported_features_, (bytes, str, list)): - raise Exception("Expected supported_features_ to be a Sequence, received: {}".format(type(supported_features_))) - - if type__ is not None and not isinstance(type__, (bytes, str)): - raise Exception("Expected type__ to be a str, received: {}".format(type(type__))) - - if users_ is not None and not isinstance(users_, (bytes, str, list)): - raise Exception("Expected users_ to be a Sequence, received: {}".format(type(users_))) - - if uuid_ is not None and not isinstance(uuid_, (bytes, str)): - raise Exception("Expected uuid_ to be a str, received: {}".format(type(uuid_))) - - self.agent_version = agent_version_ - self.cloud_credential_tag = cloud_credential_tag_ - self.cloud_credential_validity = cloud_credential_validity_ - self.cloud_region = cloud_region_ - self.cloud_tag = cloud_tag_ - self.controller_uuid = controller_uuid_ - self.default_base = default_base_ - self.default_series = default_series_ - self.is_controller = is_controller_ - self.life = life_ - self.machines = machines_ - self.migration = migration_ - self.name = name_ - self.owner_tag = owner_tag_ - self.provider_type = provider_type_ - self.secret_backends = secret_backends_ - self.sla = sla_ - self.status = status_ - self.supported_features = supported_features_ - self.type_ = type__ - self.users = users_ - self.uuid = uuid_ - self.unknown_fields = unknown_fields - - - -class ModelInfoResult(Type): - _toSchema = {'error': 'error', 'result': 'result'} - _toPy = {'error': 'error', 'result': 'result'} - def __init__(self, error=None, result=None, **unknown_fields): - ''' - error : Error - result : ModelInfo - ''' - error_ = Error.from_json(error) if error else None - result_ = ModelInfo.from_json(result) if result else None - - # Validate arguments against known Juju API types. - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - - if result_ is not None and not isinstance(result_, (dict, ModelInfo)): - raise Exception("Expected result_ to be a ModelInfo, received: {}".format(type(result_))) - - self.error = error_ - self.result = result_ - self.unknown_fields = unknown_fields - - - -class ModelInfoResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None, **unknown_fields): - ''' - results : typing.Sequence[~ModelInfoResult] - ''' - results_ = [ModelInfoResult.from_json(o) for o in results or []] - - # Validate arguments against known Juju API types. - if results_ is not None and not isinstance(results_, (bytes, str, list)): - raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) - - self.results = results_ - self.unknown_fields = unknown_fields - - - -class ModelInstanceTypesConstraint(Type): - _toSchema = {'value': 'value'} - _toPy = {'value': 'value'} - def __init__(self, value=None, **unknown_fields): - ''' - value : Value - ''' - value_ = Value.from_json(value) if value else None - - # Validate arguments against known Juju API types. - if value_ is not None and not isinstance(value_, (dict, Value)): - raise Exception("Expected value_ to be a Value, received: {}".format(type(value_))) - - self.value = value_ - self.unknown_fields = unknown_fields - - - -class ModelInstanceTypesConstraints(Type): - _toSchema = {'constraints': 'constraints'} - _toPy = {'constraints': 'constraints'} - def __init__(self, constraints=None, **unknown_fields): - ''' - constraints : typing.Sequence[~ModelInstanceTypesConstraint] - ''' - constraints_ = [ModelInstanceTypesConstraint.from_json(o) for o in constraints or []] - - # Validate arguments against known Juju API types. - if constraints_ is not None and not isinstance(constraints_, (bytes, str, list)): - raise Exception("Expected constraints_ to be a Sequence, received: {}".format(type(constraints_))) - - self.constraints = constraints_ - self.unknown_fields = unknown_fields - - - -class ModelMachineInfo(Type): - _toSchema = {'display_name': 'display-name', 'ha_primary': 'ha-primary', 'hardware': 'hardware', 'has_vote': 'has-vote', 'id_': 'id', 'instance_id': 'instance-id', 'message': 'message', 'status': 'status', 'wants_vote': 'wants-vote'} - _toPy = {'display-name': 'display_name', 'ha-primary': 'ha_primary', 'hardware': 'hardware', 'has-vote': 'has_vote', 'id': 'id_', 'instance-id': 'instance_id', 'message': 'message', 'status': 'status', 'wants-vote': 'wants_vote'} - def __init__(self, display_name=None, ha_primary=None, hardware=None, has_vote=None, id_=None, instance_id=None, message=None, status=None, wants_vote=None, **unknown_fields): - ''' - display_name : str - ha_primary : bool - hardware : MachineHardware - has_vote : bool - id_ : str - instance_id : str - message : str - status : str - wants_vote : bool - ''' - display_name_ = display_name - ha_primary_ = ha_primary - hardware_ = MachineHardware.from_json(hardware) if hardware else None - has_vote_ = has_vote - id__ = id_ - instance_id_ = instance_id - message_ = message - status_ = status - wants_vote_ = wants_vote - - # Validate arguments against known Juju API types. - if display_name_ is not None and not isinstance(display_name_, (bytes, str)): - raise Exception("Expected display_name_ to be a str, received: {}".format(type(display_name_))) - - if ha_primary_ is not None and not isinstance(ha_primary_, bool): - raise Exception("Expected ha_primary_ to be a bool, received: {}".format(type(ha_primary_))) - - if hardware_ is not None and not isinstance(hardware_, (dict, MachineHardware)): - raise Exception("Expected hardware_ to be a MachineHardware, received: {}".format(type(hardware_))) - - if has_vote_ is not None and not isinstance(has_vote_, bool): - raise Exception("Expected has_vote_ to be a bool, received: {}".format(type(has_vote_))) - - if id__ is not None and not isinstance(id__, (bytes, str)): - raise Exception("Expected id__ to be a str, received: {}".format(type(id__))) - - if instance_id_ is not None and not isinstance(instance_id_, (bytes, str)): - raise Exception("Expected instance_id_ to be a str, received: {}".format(type(instance_id_))) - - if message_ is not None and not isinstance(message_, (bytes, str)): - raise Exception("Expected message_ to be a str, received: {}".format(type(message_))) - - if status_ is not None and not isinstance(status_, (bytes, str)): - raise Exception("Expected status_ to be a str, received: {}".format(type(status_))) - - if wants_vote_ is not None and not isinstance(wants_vote_, bool): - raise Exception("Expected wants_vote_ to be a bool, received: {}".format(type(wants_vote_))) - - self.display_name = display_name_ - self.ha_primary = ha_primary_ - self.hardware = hardware_ - self.has_vote = has_vote_ - self.id_ = id__ - self.instance_id = instance_id_ - self.message = message_ - self.status = status_ - self.wants_vote = wants_vote_ - self.unknown_fields = unknown_fields - - - -class ModelMigrationStatus(Type): - _toSchema = {'end': 'end', 'start': 'start', 'status': 'status'} - _toPy = {'end': 'end', 'start': 'start', 'status': 'status'} - def __init__(self, end=None, start=None, status=None, **unknown_fields): - ''' - end : str - start : str - status : str - ''' - end_ = end - start_ = start - status_ = status - - # Validate arguments against known Juju API types. - if end_ is not None and not isinstance(end_, (bytes, str)): - raise Exception("Expected end_ to be a str, received: {}".format(type(end_))) - - if start_ is not None and not isinstance(start_, (bytes, str)): - raise Exception("Expected start_ to be a str, received: {}".format(type(start_))) - - if status_ is not None and not isinstance(status_, (bytes, str)): - raise Exception("Expected status_ to be a str, received: {}".format(type(status_))) - - self.end = end_ - self.start = start_ - self.status = status_ - self.unknown_fields = unknown_fields - - - -class ModelOperatorInfo(Type): - _toSchema = {'api_addresses': 'api-addresses', 'image_details': 'image-details', 'version': 'version'} - _toPy = {'api-addresses': 'api_addresses', 'image-details': 'image_details', 'version': 'version'} - def __init__(self, api_addresses=None, image_details=None, version=None, **unknown_fields): - ''' - api_addresses : typing.Sequence[str] - image_details : DockerImageInfo - version : Number - ''' - api_addresses_ = api_addresses - image_details_ = DockerImageInfo.from_json(image_details) if image_details else None - version_ = Number.from_json(version) if version else None - - # Validate arguments against known Juju API types. - if api_addresses_ is not None and not isinstance(api_addresses_, (bytes, str, list)): - raise Exception("Expected api_addresses_ to be a Sequence, received: {}".format(type(api_addresses_))) - - if image_details_ is not None and not isinstance(image_details_, (dict, DockerImageInfo)): - raise Exception("Expected image_details_ to be a DockerImageInfo, received: {}".format(type(image_details_))) - - if version_ is not None and not isinstance(version_, (dict, Number)): - raise Exception("Expected version_ to be a Number, received: {}".format(type(version_))) - - self.api_addresses = api_addresses_ - self.image_details = image_details_ - self.version = version_ - self.unknown_fields = unknown_fields - - - -class ModelParam(Type): - _toSchema = {'model_tag': 'model-tag'} - _toPy = {'model-tag': 'model_tag'} - def __init__(self, model_tag=None, **unknown_fields): - ''' - model_tag : str - ''' - model_tag_ = model_tag - - # Validate arguments against known Juju API types. - if model_tag_ is not None and not isinstance(model_tag_, (bytes, str)): - raise Exception("Expected model_tag_ to be a str, received: {}".format(type(model_tag_))) - - self.model_tag = model_tag_ - self.unknown_fields = unknown_fields - - - -class ModelResult(Type): - _toSchema = {'error': 'error', 'name': 'name', 'type_': 'type', 'uuid': 'uuid'} - _toPy = {'error': 'error', 'name': 'name', 'type': 'type_', 'uuid': 'uuid'} - def __init__(self, error=None, name=None, type_=None, uuid=None, **unknown_fields): - ''' - error : Error - name : str - type_ : str - uuid : str - ''' - error_ = Error.from_json(error) if error else None - name_ = name - type__ = type_ - uuid_ = uuid - - # Validate arguments against known Juju API types. - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - - if name_ is not None and not isinstance(name_, (bytes, str)): - raise Exception("Expected name_ to be a str, received: {}".format(type(name_))) - - if type__ is not None and not isinstance(type__, (bytes, str)): - raise Exception("Expected type__ to be a str, received: {}".format(type(type__))) - - if uuid_ is not None and not isinstance(uuid_, (bytes, str)): - raise Exception("Expected uuid_ to be a str, received: {}".format(type(uuid_))) - - self.error = error_ - self.name = name_ - self.type_ = type__ - self.uuid = uuid_ - self.unknown_fields = unknown_fields - - - -class ModelSLA(Type): - _toSchema = {'creds': 'creds', 'level': 'level', 'modelslainfo': 'ModelSLAInfo', 'owner': 'owner'} - _toPy = {'ModelSLAInfo': 'modelslainfo', 'creds': 'creds', 'level': 'level', 'owner': 'owner'} - def __init__(self, modelslainfo=None, creds=None, level=None, owner=None, **unknown_fields): - ''' - modelslainfo : ModelSLAInfo - creds : typing.Sequence[int] - level : str - owner : str - ''' - modelslainfo_ = ModelSLAInfo.from_json(modelslainfo) if modelslainfo else None - creds_ = creds - level_ = level - owner_ = owner - - # Validate arguments against known Juju API types. - if modelslainfo_ is not None and not isinstance(modelslainfo_, (dict, ModelSLAInfo)): - raise Exception("Expected modelslainfo_ to be a ModelSLAInfo, received: {}".format(type(modelslainfo_))) - - if creds_ is not None and not isinstance(creds_, (bytes, str, list)): - raise Exception("Expected creds_ to be a Sequence, received: {}".format(type(creds_))) - - if level_ is not None and not isinstance(level_, (bytes, str)): - raise Exception("Expected level_ to be a str, received: {}".format(type(level_))) - - if owner_ is not None and not isinstance(owner_, (bytes, str)): - raise Exception("Expected owner_ to be a str, received: {}".format(type(owner_))) - - self.modelslainfo = modelslainfo_ - self.creds = creds_ - self.level = level_ - self.owner = owner_ - self.unknown_fields = unknown_fields - - - -class ModelSLAInfo(Type): - _toSchema = {'level': 'level', 'owner': 'owner'} - _toPy = {'level': 'level', 'owner': 'owner'} - def __init__(self, level=None, owner=None, **unknown_fields): - ''' - level : str - owner : str - ''' - level_ = level - owner_ = owner - - # Validate arguments against known Juju API types. - if level_ is not None and not isinstance(level_, (bytes, str)): - raise Exception("Expected level_ to be a str, received: {}".format(type(level_))) - - if owner_ is not None and not isinstance(owner_, (bytes, str)): - raise Exception("Expected owner_ to be a str, received: {}".format(type(owner_))) - - self.level = level_ - self.owner = owner_ - self.unknown_fields = unknown_fields - - - -class ModelSequencesResult(Type): - _toSchema = {'sequences': 'sequences'} - _toPy = {'sequences': 'sequences'} - def __init__(self, sequences=None, **unknown_fields): - ''' - sequences : typing.Mapping[str, int] - ''' - sequences_ = sequences - - # Validate arguments against known Juju API types. - if sequences_ is not None and not isinstance(sequences_, dict): - raise Exception("Expected sequences_ to be a Mapping, received: {}".format(type(sequences_))) - - self.sequences = sequences_ - self.unknown_fields = unknown_fields - - - -class ModelSet(Type): - _toSchema = {'config': 'config'} - _toPy = {'config': 'config'} - def __init__(self, config=None, **unknown_fields): - ''' - config : typing.Mapping[str, typing.Any] - ''' - config_ = config - - # Validate arguments against known Juju API types. - if config_ is not None and not isinstance(config_, dict): - raise Exception("Expected config_ to be a Mapping, received: {}".format(type(config_))) - - self.config = config_ - self.unknown_fields = unknown_fields - - - -class ModelStatus(Type): - _toSchema = {'application_count': 'application-count', 'applications': 'applications', 'error': 'error', 'filesystems': 'filesystems', 'hosted_machine_count': 'hosted-machine-count', 'life': 'life', 'machines': 'machines', 'model_tag': 'model-tag', 'owner_tag': 'owner-tag', 'type_': 'type', 'unit_count': 'unit-count', 'volumes': 'volumes'} - _toPy = {'application-count': 'application_count', 'applications': 'applications', 'error': 'error', 'filesystems': 'filesystems', 'hosted-machine-count': 'hosted_machine_count', 'life': 'life', 'machines': 'machines', 'model-tag': 'model_tag', 'owner-tag': 'owner_tag', 'type': 'type_', 'unit-count': 'unit_count', 'volumes': 'volumes'} - def __init__(self, application_count=None, applications=None, error=None, filesystems=None, hosted_machine_count=None, life=None, machines=None, model_tag=None, owner_tag=None, type_=None, unit_count=None, volumes=None, **unknown_fields): - ''' - application_count : int - applications : typing.Sequence[~ModelApplicationInfo] - error : Error - filesystems : typing.Sequence[~ModelFilesystemInfo] - hosted_machine_count : int - life : str - machines : typing.Sequence[~ModelMachineInfo] - model_tag : str - owner_tag : str - type_ : str - unit_count : int - volumes : typing.Sequence[~ModelVolumeInfo] - ''' - application_count_ = application_count - applications_ = [ModelApplicationInfo.from_json(o) for o in applications or []] - error_ = Error.from_json(error) if error else None - filesystems_ = [ModelFilesystemInfo.from_json(o) for o in filesystems or []] - hosted_machine_count_ = hosted_machine_count - life_ = life - machines_ = [ModelMachineInfo.from_json(o) for o in machines or []] - model_tag_ = model_tag - owner_tag_ = owner_tag - type__ = type_ - unit_count_ = unit_count - volumes_ = [ModelVolumeInfo.from_json(o) for o in volumes or []] - - # Validate arguments against known Juju API types. - if application_count_ is not None and not isinstance(application_count_, int): - raise Exception("Expected application_count_ to be a int, received: {}".format(type(application_count_))) - - if applications_ is not None and not isinstance(applications_, (bytes, str, list)): - raise Exception("Expected applications_ to be a Sequence, received: {}".format(type(applications_))) - - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - - if filesystems_ is not None and not isinstance(filesystems_, (bytes, str, list)): - raise Exception("Expected filesystems_ to be a Sequence, received: {}".format(type(filesystems_))) - - if hosted_machine_count_ is not None and not isinstance(hosted_machine_count_, int): - raise Exception("Expected hosted_machine_count_ to be a int, received: {}".format(type(hosted_machine_count_))) - - if life_ is not None and not isinstance(life_, (bytes, str)): - raise Exception("Expected life_ to be a str, received: {}".format(type(life_))) - - if machines_ is not None and not isinstance(machines_, (bytes, str, list)): - raise Exception("Expected machines_ to be a Sequence, received: {}".format(type(machines_))) - - if model_tag_ is not None and not isinstance(model_tag_, (bytes, str)): - raise Exception("Expected model_tag_ to be a str, received: {}".format(type(model_tag_))) - - if owner_tag_ is not None and not isinstance(owner_tag_, (bytes, str)): - raise Exception("Expected owner_tag_ to be a str, received: {}".format(type(owner_tag_))) - - if type__ is not None and not isinstance(type__, (bytes, str)): - raise Exception("Expected type__ to be a str, received: {}".format(type(type__))) - - if unit_count_ is not None and not isinstance(unit_count_, int): - raise Exception("Expected unit_count_ to be a int, received: {}".format(type(unit_count_))) - - if volumes_ is not None and not isinstance(volumes_, (bytes, str, list)): - raise Exception("Expected volumes_ to be a Sequence, received: {}".format(type(volumes_))) - - self.application_count = application_count_ - self.applications = applications_ - self.error = error_ - self.filesystems = filesystems_ - self.hosted_machine_count = hosted_machine_count_ - self.life = life_ - self.machines = machines_ - self.model_tag = model_tag_ - self.owner_tag = owner_tag_ - self.type_ = type__ - self.unit_count = unit_count_ - self.volumes = volumes_ - self.unknown_fields = unknown_fields - - - -class ModelStatusInfo(Type): - _toSchema = {'available_version': 'available-version', 'cloud_tag': 'cloud-tag', 'meter_status': 'meter-status', 'model_status': 'model-status', 'name': 'name', 'region': 'region', 'sla': 'sla', 'type_': 'type', 'version': 'version'} - _toPy = {'available-version': 'available_version', 'cloud-tag': 'cloud_tag', 'meter-status': 'meter_status', 'model-status': 'model_status', 'name': 'name', 'region': 'region', 'sla': 'sla', 'type': 'type_', 'version': 'version'} - def __init__(self, available_version=None, cloud_tag=None, meter_status=None, model_status=None, name=None, region=None, sla=None, type_=None, version=None, **unknown_fields): - ''' - available_version : str - cloud_tag : str - meter_status : MeterStatus - model_status : DetailedStatus - name : str - region : str - sla : str - type_ : str - version : str - ''' - available_version_ = available_version - cloud_tag_ = cloud_tag - meter_status_ = MeterStatus.from_json(meter_status) if meter_status else None - model_status_ = DetailedStatus.from_json(model_status) if model_status else None - name_ = name - region_ = region - sla_ = sla - type__ = type_ - version_ = version - - # Validate arguments against known Juju API types. - if available_version_ is not None and not isinstance(available_version_, (bytes, str)): - raise Exception("Expected available_version_ to be a str, received: {}".format(type(available_version_))) - - if cloud_tag_ is not None and not isinstance(cloud_tag_, (bytes, str)): - raise Exception("Expected cloud_tag_ to be a str, received: {}".format(type(cloud_tag_))) - - if meter_status_ is not None and not isinstance(meter_status_, (dict, MeterStatus)): - raise Exception("Expected meter_status_ to be a MeterStatus, received: {}".format(type(meter_status_))) - - if model_status_ is not None and not isinstance(model_status_, (dict, DetailedStatus)): - raise Exception("Expected model_status_ to be a DetailedStatus, received: {}".format(type(model_status_))) - - if name_ is not None and not isinstance(name_, (bytes, str)): - raise Exception("Expected name_ to be a str, received: {}".format(type(name_))) - - if region_ is not None and not isinstance(region_, (bytes, str)): - raise Exception("Expected region_ to be a str, received: {}".format(type(region_))) - - if sla_ is not None and not isinstance(sla_, (bytes, str)): - raise Exception("Expected sla_ to be a str, received: {}".format(type(sla_))) - - if type__ is not None and not isinstance(type__, (bytes, str)): - raise Exception("Expected type__ to be a str, received: {}".format(type(type__))) - - if version_ is not None and not isinstance(version_, (bytes, str)): - raise Exception("Expected version_ to be a str, received: {}".format(type(version_))) - - self.available_version = available_version_ - self.cloud_tag = cloud_tag_ - self.meter_status = meter_status_ - self.model_status = model_status_ - self.name = name_ - self.region = region_ - self.sla = sla_ - self.type_ = type__ - self.version = version_ - self.unknown_fields = unknown_fields - - - -class ModelStatusResults(Type): - _toSchema = {'models': 'models'} - _toPy = {'models': 'models'} - def __init__(self, models=None, **unknown_fields): - ''' - models : typing.Sequence[~ModelStatus] - ''' - models_ = [ModelStatus.from_json(o) for o in models or []] - - # Validate arguments against known Juju API types. - if models_ is not None and not isinstance(models_, (bytes, str, list)): - raise Exception("Expected models_ to be a Sequence, received: {}".format(type(models_))) - - self.models = models_ - self.unknown_fields = unknown_fields - - - -class ModelSummariesRequest(Type): - _toSchema = {'all_': 'all', 'user_tag': 'user-tag'} - _toPy = {'all': 'all_', 'user-tag': 'user_tag'} - def __init__(self, all_=None, user_tag=None, **unknown_fields): - ''' - all_ : bool - user_tag : str - ''' - all__ = all_ - user_tag_ = user_tag - - # Validate arguments against known Juju API types. - if all__ is not None and not isinstance(all__, bool): - raise Exception("Expected all__ to be a bool, received: {}".format(type(all__))) - - if user_tag_ is not None and not isinstance(user_tag_, (bytes, str)): - raise Exception("Expected user_tag_ to be a str, received: {}".format(type(user_tag_))) - - self.all_ = all__ - self.user_tag = user_tag_ - self.unknown_fields = unknown_fields - - - -class ModelSummary(Type): - _toSchema = {'agent_version': 'agent-version', 'cloud_credential_tag': 'cloud-credential-tag', 'cloud_region': 'cloud-region', 'cloud_tag': 'cloud-tag', 'controller_uuid': 'controller-uuid', 'counts': 'counts', 'default_series': 'default-series', 'is_controller': 'is-controller', 'last_connection': 'last-connection', 'life': 'life', 'migration': 'migration', 'name': 'name', 'owner_tag': 'owner-tag', 'provider_type': 'provider-type', 'sla': 'sla', 'status': 'status', 'type_': 'type', 'user_access': 'user-access', 'uuid': 'uuid'} - _toPy = {'agent-version': 'agent_version', 'cloud-credential-tag': 'cloud_credential_tag', 'cloud-region': 'cloud_region', 'cloud-tag': 'cloud_tag', 'controller-uuid': 'controller_uuid', 'counts': 'counts', 'default-series': 'default_series', 'is-controller': 'is_controller', 'last-connection': 'last_connection', 'life': 'life', 'migration': 'migration', 'name': 'name', 'owner-tag': 'owner_tag', 'provider-type': 'provider_type', 'sla': 'sla', 'status': 'status', 'type': 'type_', 'user-access': 'user_access', 'uuid': 'uuid'} - def __init__(self, agent_version=None, cloud_credential_tag=None, cloud_region=None, cloud_tag=None, controller_uuid=None, counts=None, default_series=None, is_controller=None, last_connection=None, life=None, migration=None, name=None, owner_tag=None, provider_type=None, sla=None, status=None, type_=None, user_access=None, uuid=None, **unknown_fields): - ''' - agent_version : Number - cloud_credential_tag : str - cloud_region : str - cloud_tag : str - controller_uuid : str - counts : typing.Sequence[~ModelEntityCount] - default_series : str - is_controller : bool - last_connection : str - life : str - migration : ModelMigrationStatus - name : str - owner_tag : str - provider_type : str - sla : ModelSLAInfo - status : EntityStatus - type_ : str - user_access : str - uuid : str - ''' - agent_version_ = Number.from_json(agent_version) if agent_version else None - cloud_credential_tag_ = cloud_credential_tag - cloud_region_ = cloud_region - cloud_tag_ = cloud_tag - controller_uuid_ = controller_uuid - counts_ = [ModelEntityCount.from_json(o) for o in counts or []] - default_series_ = default_series - is_controller_ = is_controller - last_connection_ = last_connection - life_ = life - migration_ = ModelMigrationStatus.from_json(migration) if migration else None - name_ = name - owner_tag_ = owner_tag - provider_type_ = provider_type - sla_ = ModelSLAInfo.from_json(sla) if sla else None - status_ = EntityStatus.from_json(status) if status else None - type__ = type_ - user_access_ = user_access - uuid_ = uuid - - # Validate arguments against known Juju API types. - if agent_version_ is not None and not isinstance(agent_version_, (dict, Number)): - raise Exception("Expected agent_version_ to be a Number, received: {}".format(type(agent_version_))) - - if cloud_credential_tag_ is not None and not isinstance(cloud_credential_tag_, (bytes, str)): - raise Exception("Expected cloud_credential_tag_ to be a str, received: {}".format(type(cloud_credential_tag_))) - - if cloud_region_ is not None and not isinstance(cloud_region_, (bytes, str)): - raise Exception("Expected cloud_region_ to be a str, received: {}".format(type(cloud_region_))) - - if cloud_tag_ is not None and not isinstance(cloud_tag_, (bytes, str)): - raise Exception("Expected cloud_tag_ to be a str, received: {}".format(type(cloud_tag_))) - - if controller_uuid_ is not None and not isinstance(controller_uuid_, (bytes, str)): - raise Exception("Expected controller_uuid_ to be a str, received: {}".format(type(controller_uuid_))) - - if counts_ is not None and not isinstance(counts_, (bytes, str, list)): - raise Exception("Expected counts_ to be a Sequence, received: {}".format(type(counts_))) - - if default_series_ is not None and not isinstance(default_series_, (bytes, str)): - raise Exception("Expected default_series_ to be a str, received: {}".format(type(default_series_))) - - if is_controller_ is not None and not isinstance(is_controller_, bool): - raise Exception("Expected is_controller_ to be a bool, received: {}".format(type(is_controller_))) - - if last_connection_ is not None and not isinstance(last_connection_, (bytes, str)): - raise Exception("Expected last_connection_ to be a str, received: {}".format(type(last_connection_))) - - if life_ is not None and not isinstance(life_, (bytes, str)): - raise Exception("Expected life_ to be a str, received: {}".format(type(life_))) - - if migration_ is not None and not isinstance(migration_, (dict, ModelMigrationStatus)): - raise Exception("Expected migration_ to be a ModelMigrationStatus, received: {}".format(type(migration_))) - - if name_ is not None and not isinstance(name_, (bytes, str)): - raise Exception("Expected name_ to be a str, received: {}".format(type(name_))) - - if owner_tag_ is not None and not isinstance(owner_tag_, (bytes, str)): - raise Exception("Expected owner_tag_ to be a str, received: {}".format(type(owner_tag_))) - - if provider_type_ is not None and not isinstance(provider_type_, (bytes, str)): - raise Exception("Expected provider_type_ to be a str, received: {}".format(type(provider_type_))) - - if sla_ is not None and not isinstance(sla_, (dict, ModelSLAInfo)): - raise Exception("Expected sla_ to be a ModelSLAInfo, received: {}".format(type(sla_))) - - if status_ is not None and not isinstance(status_, (dict, EntityStatus)): - raise Exception("Expected status_ to be a EntityStatus, received: {}".format(type(status_))) - - if type__ is not None and not isinstance(type__, (bytes, str)): - raise Exception("Expected type__ to be a str, received: {}".format(type(type__))) - - if user_access_ is not None and not isinstance(user_access_, (bytes, str)): - raise Exception("Expected user_access_ to be a str, received: {}".format(type(user_access_))) - - if uuid_ is not None and not isinstance(uuid_, (bytes, str)): - raise Exception("Expected uuid_ to be a str, received: {}".format(type(uuid_))) - - self.agent_version = agent_version_ - self.cloud_credential_tag = cloud_credential_tag_ - self.cloud_region = cloud_region_ - self.cloud_tag = cloud_tag_ - self.controller_uuid = controller_uuid_ - self.counts = counts_ - self.default_series = default_series_ - self.is_controller = is_controller_ - self.last_connection = last_connection_ - self.life = life_ - self.migration = migration_ - self.name = name_ - self.owner_tag = owner_tag_ - self.provider_type = provider_type_ - self.sla = sla_ - self.status = status_ - self.type_ = type__ - self.user_access = user_access_ - self.uuid = uuid_ - self.unknown_fields = unknown_fields - - - -class ModelSummaryMessage(Type): - _toSchema = {'agent': 'agent', 'message': 'message'} - _toPy = {'agent': 'agent', 'message': 'message'} - def __init__(self, agent=None, message=None, **unknown_fields): - ''' - agent : str - message : str - ''' - agent_ = agent - message_ = message - - # Validate arguments against known Juju API types. - if agent_ is not None and not isinstance(agent_, (bytes, str)): - raise Exception("Expected agent_ to be a str, received: {}".format(type(agent_))) - - if message_ is not None and not isinstance(message_, (bytes, str)): - raise Exception("Expected message_ to be a str, received: {}".format(type(message_))) - - self.agent = agent_ - self.message = message_ - self.unknown_fields = unknown_fields - - - -class ModelSummaryResult(Type): - _toSchema = {'error': 'error', 'result': 'result'} - _toPy = {'error': 'error', 'result': 'result'} - def __init__(self, error=None, result=None, **unknown_fields): - ''' - error : Error - result : ModelSummary - ''' - error_ = Error.from_json(error) if error else None - result_ = ModelSummary.from_json(result) if result else None - - # Validate arguments against known Juju API types. - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - - if result_ is not None and not isinstance(result_, (dict, ModelSummary)): - raise Exception("Expected result_ to be a ModelSummary, received: {}".format(type(result_))) - - self.error = error_ - self.result = result_ - self.unknown_fields = unknown_fields - - - -class ModelSummaryResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None, **unknown_fields): - ''' - results : typing.Sequence[~ModelSummaryResult] - ''' - results_ = [ModelSummaryResult.from_json(o) for o in results or []] - - # Validate arguments against known Juju API types. - if results_ is not None and not isinstance(results_, (bytes, str, list)): - raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) - - self.results = results_ - self.unknown_fields = unknown_fields - - - -class ModelSummarySize(Type): - _toSchema = {'applications': 'applications', 'containers': 'containers', 'machines': 'machines', 'relations': 'relations', 'units': 'units'} - _toPy = {'applications': 'applications', 'containers': 'containers', 'machines': 'machines', 'relations': 'relations', 'units': 'units'} - def __init__(self, applications=None, containers=None, machines=None, relations=None, units=None, **unknown_fields): - ''' - applications : int - containers : int - machines : int - relations : int - units : int - ''' - applications_ = applications - containers_ = containers - machines_ = machines - relations_ = relations - units_ = units - - # Validate arguments against known Juju API types. - if applications_ is not None and not isinstance(applications_, int): - raise Exception("Expected applications_ to be a int, received: {}".format(type(applications_))) - - if containers_ is not None and not isinstance(containers_, int): - raise Exception("Expected containers_ to be a int, received: {}".format(type(containers_))) - - if machines_ is not None and not isinstance(machines_, int): - raise Exception("Expected machines_ to be a int, received: {}".format(type(machines_))) - - if relations_ is not None and not isinstance(relations_, int): - raise Exception("Expected relations_ to be a int, received: {}".format(type(relations_))) - - if units_ is not None and not isinstance(units_, int): - raise Exception("Expected units_ to be a int, received: {}".format(type(units_))) - - self.applications = applications_ - self.containers = containers_ - self.machines = machines_ - self.relations = relations_ - self.units = units_ - self.unknown_fields = unknown_fields - - - -class ModelTag(Type): - _toSchema = {} - _toPy = {} - def __init__(self, **unknown_fields): - ''' - - ''' - self.unknown_fields = unknown_fields - - - -class ModelUnset(Type): - _toSchema = {'keys': 'keys'} - _toPy = {'keys': 'keys'} - def __init__(self, keys=None, **unknown_fields): - ''' - keys : typing.Sequence[str] - ''' - keys_ = keys - - # Validate arguments against known Juju API types. - if keys_ is not None and not isinstance(keys_, (bytes, str, list)): - raise Exception("Expected keys_ to be a Sequence, received: {}".format(type(keys_))) - - self.keys = keys_ - self.unknown_fields = unknown_fields - - - -class ModelUnsetKeys(Type): - _toSchema = {'cloud_region': 'cloud-region', 'cloud_tag': 'cloud-tag', 'keys': 'keys'} - _toPy = {'cloud-region': 'cloud_region', 'cloud-tag': 'cloud_tag', 'keys': 'keys'} - def __init__(self, cloud_region=None, cloud_tag=None, keys=None, **unknown_fields): - ''' - cloud_region : str - cloud_tag : str - keys : typing.Sequence[str] - ''' - cloud_region_ = cloud_region - cloud_tag_ = cloud_tag - keys_ = keys - - # Validate arguments against known Juju API types. - if cloud_region_ is not None and not isinstance(cloud_region_, (bytes, str)): - raise Exception("Expected cloud_region_ to be a str, received: {}".format(type(cloud_region_))) - - if cloud_tag_ is not None and not isinstance(cloud_tag_, (bytes, str)): - raise Exception("Expected cloud_tag_ to be a str, received: {}".format(type(cloud_tag_))) - - if keys_ is not None and not isinstance(keys_, (bytes, str, list)): - raise Exception("Expected keys_ to be a Sequence, received: {}".format(type(keys_))) - - self.cloud_region = cloud_region_ - self.cloud_tag = cloud_tag_ - self.keys = keys_ - self.unknown_fields = unknown_fields - - - -class ModelUserInfo(Type): - _toSchema = {'access': 'access', 'display_name': 'display-name', 'last_connection': 'last-connection', 'model_tag': 'model-tag', 'user': 'user'} - _toPy = {'access': 'access', 'display-name': 'display_name', 'last-connection': 'last_connection', 'model-tag': 'model_tag', 'user': 'user'} - def __init__(self, access=None, display_name=None, last_connection=None, model_tag=None, user=None, **unknown_fields): - ''' - access : str - display_name : str - last_connection : str - model_tag : str - user : str - ''' - access_ = access - display_name_ = display_name - last_connection_ = last_connection - model_tag_ = model_tag - user_ = user - - # Validate arguments against known Juju API types. - if access_ is not None and not isinstance(access_, (bytes, str)): - raise Exception("Expected access_ to be a str, received: {}".format(type(access_))) - - if display_name_ is not None and not isinstance(display_name_, (bytes, str)): - raise Exception("Expected display_name_ to be a str, received: {}".format(type(display_name_))) - - if last_connection_ is not None and not isinstance(last_connection_, (bytes, str)): - raise Exception("Expected last_connection_ to be a str, received: {}".format(type(last_connection_))) - - if model_tag_ is not None and not isinstance(model_tag_, (bytes, str)): - raise Exception("Expected model_tag_ to be a str, received: {}".format(type(model_tag_))) - - if user_ is not None and not isinstance(user_, (bytes, str)): - raise Exception("Expected user_ to be a str, received: {}".format(type(user_))) - - self.access = access_ - self.display_name = display_name_ - self.last_connection = last_connection_ - self.model_tag = model_tag_ - self.user = user_ - self.unknown_fields = unknown_fields - - - -class ModelUserInfoResult(Type): - _toSchema = {'error': 'error', 'result': 'result'} - _toPy = {'error': 'error', 'result': 'result'} - def __init__(self, error=None, result=None, **unknown_fields): - ''' - error : Error - result : ModelUserInfo - ''' - error_ = Error.from_json(error) if error else None - result_ = ModelUserInfo.from_json(result) if result else None - - # Validate arguments against known Juju API types. - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - - if result_ is not None and not isinstance(result_, (dict, ModelUserInfo)): - raise Exception("Expected result_ to be a ModelUserInfo, received: {}".format(type(result_))) - - self.error = error_ - self.result = result_ - self.unknown_fields = unknown_fields - - - -class ModelUserInfoResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None, **unknown_fields): - ''' - results : typing.Sequence[~ModelUserInfoResult] - ''' - results_ = [ModelUserInfoResult.from_json(o) for o in results or []] - - # Validate arguments against known Juju API types. - if results_ is not None and not isinstance(results_, (bytes, str, list)): - raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) - - self.results = results_ - self.unknown_fields = unknown_fields - - - -class ModelVolumeInfo(Type): - _toSchema = {'detachable': 'detachable', 'id_': 'id', 'message': 'message', 'provider_id': 'provider-id', 'status': 'status'} - _toPy = {'detachable': 'detachable', 'id': 'id_', 'message': 'message', 'provider-id': 'provider_id', 'status': 'status'} - def __init__(self, detachable=None, id_=None, message=None, provider_id=None, status=None, **unknown_fields): - ''' - detachable : bool - id_ : str - message : str - provider_id : str - status : str - ''' - detachable_ = detachable - id__ = id_ - message_ = message - provider_id_ = provider_id - status_ = status - - # Validate arguments against known Juju API types. - if detachable_ is not None and not isinstance(detachable_, bool): - raise Exception("Expected detachable_ to be a bool, received: {}".format(type(detachable_))) - - if id__ is not None and not isinstance(id__, (bytes, str)): - raise Exception("Expected id__ to be a str, received: {}".format(type(id__))) - - if message_ is not None and not isinstance(message_, (bytes, str)): - raise Exception("Expected message_ to be a str, received: {}".format(type(message_))) - - if provider_id_ is not None and not isinstance(provider_id_, (bytes, str)): - raise Exception("Expected provider_id_ to be a str, received: {}".format(type(provider_id_))) - - if status_ is not None and not isinstance(status_, (bytes, str)): - raise Exception("Expected status_ to be a str, received: {}".format(type(status_))) - - self.detachable = detachable_ - self.id_ = id__ - self.message = message_ - self.provider_id = provider_id_ - self.status = status_ - self.unknown_fields = unknown_fields - - - -class ModifyCloudAccess(Type): - _toSchema = {'access': 'access', 'action': 'action', 'cloud_tag': 'cloud-tag', 'user_tag': 'user-tag'} - _toPy = {'access': 'access', 'action': 'action', 'cloud-tag': 'cloud_tag', 'user-tag': 'user_tag'} - def __init__(self, access=None, action=None, cloud_tag=None, user_tag=None, **unknown_fields): - ''' - access : str - action : str - cloud_tag : str - user_tag : str - ''' - access_ = access - action_ = action - cloud_tag_ = cloud_tag - user_tag_ = user_tag - - # Validate arguments against known Juju API types. - if access_ is not None and not isinstance(access_, (bytes, str)): - raise Exception("Expected access_ to be a str, received: {}".format(type(access_))) - - if action_ is not None and not isinstance(action_, (bytes, str)): - raise Exception("Expected action_ to be a str, received: {}".format(type(action_))) - - if cloud_tag_ is not None and not isinstance(cloud_tag_, (bytes, str)): - raise Exception("Expected cloud_tag_ to be a str, received: {}".format(type(cloud_tag_))) - - if user_tag_ is not None and not isinstance(user_tag_, (bytes, str)): - raise Exception("Expected user_tag_ to be a str, received: {}".format(type(user_tag_))) - - self.access = access_ - self.action = action_ - self.cloud_tag = cloud_tag_ - self.user_tag = user_tag_ - self.unknown_fields = unknown_fields - - - -class ModifyCloudAccessRequest(Type): - _toSchema = {'changes': 'changes'} - _toPy = {'changes': 'changes'} - def __init__(self, changes=None, **unknown_fields): - ''' - changes : typing.Sequence[~ModifyCloudAccess] - ''' - changes_ = [ModifyCloudAccess.from_json(o) for o in changes or []] - - # Validate arguments against known Juju API types. - if changes_ is not None and not isinstance(changes_, (bytes, str, list)): - raise Exception("Expected changes_ to be a Sequence, received: {}".format(type(changes_))) - - self.changes = changes_ - self.unknown_fields = unknown_fields - - - -class ModifyControllerAccess(Type): - _toSchema = {'access': 'access', 'action': 'action', 'user_tag': 'user-tag'} - _toPy = {'access': 'access', 'action': 'action', 'user-tag': 'user_tag'} - def __init__(self, access=None, action=None, user_tag=None, **unknown_fields): - ''' - access : str - action : str - user_tag : str - ''' - access_ = access - action_ = action - user_tag_ = user_tag - - # Validate arguments against known Juju API types. - if access_ is not None and not isinstance(access_, (bytes, str)): - raise Exception("Expected access_ to be a str, received: {}".format(type(access_))) - - if action_ is not None and not isinstance(action_, (bytes, str)): - raise Exception("Expected action_ to be a str, received: {}".format(type(action_))) - - if user_tag_ is not None and not isinstance(user_tag_, (bytes, str)): - raise Exception("Expected user_tag_ to be a str, received: {}".format(type(user_tag_))) - - self.access = access_ - self.action = action_ - self.user_tag = user_tag_ - self.unknown_fields = unknown_fields - - - -class ModifyControllerAccessRequest(Type): - _toSchema = {'changes': 'changes'} - _toPy = {'changes': 'changes'} - def __init__(self, changes=None, **unknown_fields): - ''' - changes : typing.Sequence[~ModifyControllerAccess] - ''' - changes_ = [ModifyControllerAccess.from_json(o) for o in changes or []] - - # Validate arguments against known Juju API types. - if changes_ is not None and not isinstance(changes_, (bytes, str, list)): - raise Exception("Expected changes_ to be a Sequence, received: {}".format(type(changes_))) - - self.changes = changes_ - self.unknown_fields = unknown_fields - - - -class ModifyModelAccess(Type): - _toSchema = {'access': 'access', 'action': 'action', 'model_tag': 'model-tag', 'user_tag': 'user-tag'} - _toPy = {'access': 'access', 'action': 'action', 'model-tag': 'model_tag', 'user-tag': 'user_tag'} - def __init__(self, access=None, action=None, model_tag=None, user_tag=None, **unknown_fields): - ''' - access : str - action : str - model_tag : str - user_tag : str - ''' - access_ = access - action_ = action - model_tag_ = model_tag - user_tag_ = user_tag - - # Validate arguments against known Juju API types. - if access_ is not None and not isinstance(access_, (bytes, str)): - raise Exception("Expected access_ to be a str, received: {}".format(type(access_))) - - if action_ is not None and not isinstance(action_, (bytes, str)): - raise Exception("Expected action_ to be a str, received: {}".format(type(action_))) - - if model_tag_ is not None and not isinstance(model_tag_, (bytes, str)): - raise Exception("Expected model_tag_ to be a str, received: {}".format(type(model_tag_))) - - if user_tag_ is not None and not isinstance(user_tag_, (bytes, str)): - raise Exception("Expected user_tag_ to be a str, received: {}".format(type(user_tag_))) - - self.access = access_ - self.action = action_ - self.model_tag = model_tag_ - self.user_tag = user_tag_ - self.unknown_fields = unknown_fields - - - -class ModifyModelAccessRequest(Type): - _toSchema = {'changes': 'changes'} - _toPy = {'changes': 'changes'} - def __init__(self, changes=None, **unknown_fields): - ''' - changes : typing.Sequence[~ModifyModelAccess] - ''' - changes_ = [ModifyModelAccess.from_json(o) for o in changes or []] - - # Validate arguments against known Juju API types. - if changes_ is not None and not isinstance(changes_, (bytes, str, list)): - raise Exception("Expected changes_ to be a Sequence, received: {}".format(type(changes_))) - - self.changes = changes_ - self.unknown_fields = unknown_fields - - - -class ModifyOfferAccess(Type): - _toSchema = {'access': 'access', 'action': 'action', 'offer_url': 'offer-url', 'user_tag': 'user-tag'} - _toPy = {'access': 'access', 'action': 'action', 'offer-url': 'offer_url', 'user-tag': 'user_tag'} - def __init__(self, access=None, action=None, offer_url=None, user_tag=None, **unknown_fields): - ''' - access : str - action : str - offer_url : str - user_tag : str - ''' - access_ = access - action_ = action - offer_url_ = offer_url - user_tag_ = user_tag - - # Validate arguments against known Juju API types. - if access_ is not None and not isinstance(access_, (bytes, str)): - raise Exception("Expected access_ to be a str, received: {}".format(type(access_))) - - if action_ is not None and not isinstance(action_, (bytes, str)): - raise Exception("Expected action_ to be a str, received: {}".format(type(action_))) - - if offer_url_ is not None and not isinstance(offer_url_, (bytes, str)): - raise Exception("Expected offer_url_ to be a str, received: {}".format(type(offer_url_))) - - if user_tag_ is not None and not isinstance(user_tag_, (bytes, str)): - raise Exception("Expected user_tag_ to be a str, received: {}".format(type(user_tag_))) - - self.access = access_ - self.action = action_ - self.offer_url = offer_url_ - self.user_tag = user_tag_ - self.unknown_fields = unknown_fields - - - -class ModifyOfferAccessRequest(Type): - _toSchema = {'changes': 'changes'} - _toPy = {'changes': 'changes'} - def __init__(self, changes=None, **unknown_fields): - ''' - changes : typing.Sequence[~ModifyOfferAccess] - ''' - changes_ = [ModifyOfferAccess.from_json(o) for o in changes or []] - - # Validate arguments against known Juju API types. - if changes_ is not None and not isinstance(changes_, (bytes, str, list)): - raise Exception("Expected changes_ to be a Sequence, received: {}".format(type(changes_))) - - self.changes = changes_ - self.unknown_fields = unknown_fields - - - -class ModifyUserSSHKeys(Type): - _toSchema = {'ssh_keys': 'ssh-keys', 'user': 'user'} - _toPy = {'ssh-keys': 'ssh_keys', 'user': 'user'} - def __init__(self, ssh_keys=None, user=None, **unknown_fields): - ''' - ssh_keys : typing.Sequence[str] - user : str - ''' - ssh_keys_ = ssh_keys - user_ = user - - # Validate arguments against known Juju API types. - if ssh_keys_ is not None and not isinstance(ssh_keys_, (bytes, str, list)): - raise Exception("Expected ssh_keys_ to be a Sequence, received: {}".format(type(ssh_keys_))) - - if user_ is not None and not isinstance(user_, (bytes, str)): - raise Exception("Expected user_ to be a str, received: {}".format(type(user_))) - - self.ssh_keys = ssh_keys_ - self.user = user_ - self.unknown_fields = unknown_fields - - - -class MoveSubnetsParam(Type): - _toSchema = {'force': 'force', 'space_tag': 'space-tag', 'subnets': 'subnets'} - _toPy = {'force': 'force', 'space-tag': 'space_tag', 'subnets': 'subnets'} - def __init__(self, force=None, space_tag=None, subnets=None, **unknown_fields): - ''' - force : bool - space_tag : str - subnets : typing.Sequence[str] - ''' - force_ = force - space_tag_ = space_tag - subnets_ = subnets - - # Validate arguments against known Juju API types. - if force_ is not None and not isinstance(force_, bool): - raise Exception("Expected force_ to be a bool, received: {}".format(type(force_))) - - if space_tag_ is not None and not isinstance(space_tag_, (bytes, str)): - raise Exception("Expected space_tag_ to be a str, received: {}".format(type(space_tag_))) - - if subnets_ is not None and not isinstance(subnets_, (bytes, str, list)): - raise Exception("Expected subnets_ to be a Sequence, received: {}".format(type(subnets_))) - - self.force = force_ - self.space_tag = space_tag_ - self.subnets = subnets_ - self.unknown_fields = unknown_fields - - - -class MoveSubnetsParams(Type): - _toSchema = {'args': 'args'} - _toPy = {'args': 'args'} - def __init__(self, args=None, **unknown_fields): - ''' - args : typing.Sequence[~MoveSubnetsParam] - ''' - args_ = [MoveSubnetsParam.from_json(o) for o in args or []] - - # Validate arguments against known Juju API types. - if args_ is not None and not isinstance(args_, (bytes, str, list)): - raise Exception("Expected args_ to be a Sequence, received: {}".format(type(args_))) - - self.args = args_ - self.unknown_fields = unknown_fields - - - -class MoveSubnetsResult(Type): - _toSchema = {'error': 'error', 'moved_subnets': 'moved-subnets', 'new_space': 'new-space'} - _toPy = {'error': 'error', 'moved-subnets': 'moved_subnets', 'new-space': 'new_space'} - def __init__(self, error=None, moved_subnets=None, new_space=None, **unknown_fields): - ''' - error : Error - moved_subnets : typing.Sequence[~MovedSubnet] - new_space : str - ''' - error_ = Error.from_json(error) if error else None - moved_subnets_ = [MovedSubnet.from_json(o) for o in moved_subnets or []] - new_space_ = new_space - - # Validate arguments against known Juju API types. - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - - if moved_subnets_ is not None and not isinstance(moved_subnets_, (bytes, str, list)): - raise Exception("Expected moved_subnets_ to be a Sequence, received: {}".format(type(moved_subnets_))) - - if new_space_ is not None and not isinstance(new_space_, (bytes, str)): - raise Exception("Expected new_space_ to be a str, received: {}".format(type(new_space_))) - - self.error = error_ - self.moved_subnets = moved_subnets_ - self.new_space = new_space_ - self.unknown_fields = unknown_fields - - - -class MoveSubnetsResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None, **unknown_fields): - ''' - results : typing.Sequence[~MoveSubnetsResult] - ''' - results_ = [MoveSubnetsResult.from_json(o) for o in results or []] - - # Validate arguments against known Juju API types. - if results_ is not None and not isinstance(results_, (bytes, str, list)): - raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) - - self.results = results_ - self.unknown_fields = unknown_fields - - - -class MovedSubnet(Type): - _toSchema = {'cidr': 'cidr', 'old_space': 'old-space', 'subnet': 'subnet'} - _toPy = {'cidr': 'cidr', 'old-space': 'old_space', 'subnet': 'subnet'} - def __init__(self, cidr=None, old_space=None, subnet=None, **unknown_fields): - ''' - cidr : str - old_space : str - subnet : str - ''' - cidr_ = cidr - old_space_ = old_space - subnet_ = subnet - - # Validate arguments against known Juju API types. - if cidr_ is not None and not isinstance(cidr_, (bytes, str)): - raise Exception("Expected cidr_ to be a str, received: {}".format(type(cidr_))) - - if old_space_ is not None and not isinstance(old_space_, (bytes, str)): - raise Exception("Expected old_space_ to be a str, received: {}".format(type(old_space_))) - - if subnet_ is not None and not isinstance(subnet_, (bytes, str)): - raise Exception("Expected subnet_ to be a str, received: {}".format(type(subnet_))) - - self.cidr = cidr_ - self.old_space = old_space_ - self.subnet = subnet_ - self.unknown_fields = unknown_fields - - - -class NetworkConfig(Type): - _toSchema = {'address': 'address', 'addresses': 'addresses', 'cidr': 'cidr', 'config_type': 'config-type', 'device_index': 'device-index', 'disabled': 'disabled', 'dns_search_domains': 'dns-search-domains', 'dns_servers': 'dns-servers', 'gateway_address': 'gateway-address', 'interface_name': 'interface-name', 'interface_type': 'interface-type', 'is_default_gateway': 'is-default-gateway', 'mac_address': 'mac-address', 'mtu': 'mtu', 'no_auto_start': 'no-auto-start', 'origin': 'origin', 'parent_interface_name': 'parent-interface-name', 'provider_address_id': 'provider-address-id', 'provider_id': 'provider-id', 'provider_network_id': 'provider-network-id', 'provider_space_id': 'provider-space-id', 'provider_subnet_id': 'provider-subnet-id', 'provider_vlan_id': 'provider-vlan-id', 'routes': 'routes', 'shadow_addresses': 'shadow-addresses', 'virtual_port_type': 'virtual-port-type', 'vlan_tag': 'vlan-tag'} - _toPy = {'address': 'address', 'addresses': 'addresses', 'cidr': 'cidr', 'config-type': 'config_type', 'device-index': 'device_index', 'disabled': 'disabled', 'dns-search-domains': 'dns_search_domains', 'dns-servers': 'dns_servers', 'gateway-address': 'gateway_address', 'interface-name': 'interface_name', 'interface-type': 'interface_type', 'is-default-gateway': 'is_default_gateway', 'mac-address': 'mac_address', 'mtu': 'mtu', 'no-auto-start': 'no_auto_start', 'origin': 'origin', 'parent-interface-name': 'parent_interface_name', 'provider-address-id': 'provider_address_id', 'provider-id': 'provider_id', 'provider-network-id': 'provider_network_id', 'provider-space-id': 'provider_space_id', 'provider-subnet-id': 'provider_subnet_id', 'provider-vlan-id': 'provider_vlan_id', 'routes': 'routes', 'shadow-addresses': 'shadow_addresses', 'virtual-port-type': 'virtual_port_type', 'vlan-tag': 'vlan_tag'} - def __init__(self, address=None, addresses=None, cidr=None, config_type=None, device_index=None, disabled=None, dns_search_domains=None, dns_servers=None, gateway_address=None, interface_name=None, interface_type=None, is_default_gateway=None, mac_address=None, mtu=None, no_auto_start=None, origin=None, parent_interface_name=None, provider_address_id=None, provider_id=None, provider_network_id=None, provider_space_id=None, provider_subnet_id=None, provider_vlan_id=None, routes=None, shadow_addresses=None, virtual_port_type=None, vlan_tag=None, **unknown_fields): - ''' - address : str - addresses : typing.Sequence[~Address] - cidr : str - config_type : str - device_index : int - disabled : bool - dns_search_domains : typing.Sequence[str] - dns_servers : typing.Sequence[str] - gateway_address : str - interface_name : str - interface_type : str - is_default_gateway : bool - mac_address : str - mtu : int - no_auto_start : bool - origin : str - parent_interface_name : str - provider_address_id : str - provider_id : str - provider_network_id : str - provider_space_id : str - provider_subnet_id : str - provider_vlan_id : str - routes : typing.Sequence[~NetworkRoute] - shadow_addresses : typing.Sequence[~Address] - virtual_port_type : str - vlan_tag : int - ''' - address_ = address - addresses_ = [Address.from_json(o) for o in addresses or []] - cidr_ = cidr - config_type_ = config_type - device_index_ = device_index - disabled_ = disabled - dns_search_domains_ = dns_search_domains - dns_servers_ = dns_servers - gateway_address_ = gateway_address - interface_name_ = interface_name - interface_type_ = interface_type - is_default_gateway_ = is_default_gateway - mac_address_ = mac_address - mtu_ = mtu - no_auto_start_ = no_auto_start - origin_ = origin - parent_interface_name_ = parent_interface_name - provider_address_id_ = provider_address_id - provider_id_ = provider_id - provider_network_id_ = provider_network_id - provider_space_id_ = provider_space_id - provider_subnet_id_ = provider_subnet_id - provider_vlan_id_ = provider_vlan_id - routes_ = [NetworkRoute.from_json(o) for o in routes or []] - shadow_addresses_ = [Address.from_json(o) for o in shadow_addresses or []] - virtual_port_type_ = virtual_port_type - vlan_tag_ = vlan_tag - - # Validate arguments against known Juju API types. - if address_ is not None and not isinstance(address_, (bytes, str)): - raise Exception("Expected address_ to be a str, received: {}".format(type(address_))) - - if addresses_ is not None and not isinstance(addresses_, (bytes, str, list)): - raise Exception("Expected addresses_ to be a Sequence, received: {}".format(type(addresses_))) - - if cidr_ is not None and not isinstance(cidr_, (bytes, str)): - raise Exception("Expected cidr_ to be a str, received: {}".format(type(cidr_))) - - if config_type_ is not None and not isinstance(config_type_, (bytes, str)): - raise Exception("Expected config_type_ to be a str, received: {}".format(type(config_type_))) - - if device_index_ is not None and not isinstance(device_index_, int): - raise Exception("Expected device_index_ to be a int, received: {}".format(type(device_index_))) - - if disabled_ is not None and not isinstance(disabled_, bool): - raise Exception("Expected disabled_ to be a bool, received: {}".format(type(disabled_))) - - if dns_search_domains_ is not None and not isinstance(dns_search_domains_, (bytes, str, list)): - raise Exception("Expected dns_search_domains_ to be a Sequence, received: {}".format(type(dns_search_domains_))) - - if dns_servers_ is not None and not isinstance(dns_servers_, (bytes, str, list)): - raise Exception("Expected dns_servers_ to be a Sequence, received: {}".format(type(dns_servers_))) - - if gateway_address_ is not None and not isinstance(gateway_address_, (bytes, str)): - raise Exception("Expected gateway_address_ to be a str, received: {}".format(type(gateway_address_))) - - if interface_name_ is not None and not isinstance(interface_name_, (bytes, str)): - raise Exception("Expected interface_name_ to be a str, received: {}".format(type(interface_name_))) - - if interface_type_ is not None and not isinstance(interface_type_, (bytes, str)): - raise Exception("Expected interface_type_ to be a str, received: {}".format(type(interface_type_))) - - if is_default_gateway_ is not None and not isinstance(is_default_gateway_, bool): - raise Exception("Expected is_default_gateway_ to be a bool, received: {}".format(type(is_default_gateway_))) - - if mac_address_ is not None and not isinstance(mac_address_, (bytes, str)): - raise Exception("Expected mac_address_ to be a str, received: {}".format(type(mac_address_))) - - if mtu_ is not None and not isinstance(mtu_, int): - raise Exception("Expected mtu_ to be a int, received: {}".format(type(mtu_))) - - if no_auto_start_ is not None and not isinstance(no_auto_start_, bool): - raise Exception("Expected no_auto_start_ to be a bool, received: {}".format(type(no_auto_start_))) - - if origin_ is not None and not isinstance(origin_, (bytes, str)): - raise Exception("Expected origin_ to be a str, received: {}".format(type(origin_))) - - if parent_interface_name_ is not None and not isinstance(parent_interface_name_, (bytes, str)): - raise Exception("Expected parent_interface_name_ to be a str, received: {}".format(type(parent_interface_name_))) - - if provider_address_id_ is not None and not isinstance(provider_address_id_, (bytes, str)): - raise Exception("Expected provider_address_id_ to be a str, received: {}".format(type(provider_address_id_))) - - if provider_id_ is not None and not isinstance(provider_id_, (bytes, str)): - raise Exception("Expected provider_id_ to be a str, received: {}".format(type(provider_id_))) - - if provider_network_id_ is not None and not isinstance(provider_network_id_, (bytes, str)): - raise Exception("Expected provider_network_id_ to be a str, received: {}".format(type(provider_network_id_))) - - if provider_space_id_ is not None and not isinstance(provider_space_id_, (bytes, str)): - raise Exception("Expected provider_space_id_ to be a str, received: {}".format(type(provider_space_id_))) - - if provider_subnet_id_ is not None and not isinstance(provider_subnet_id_, (bytes, str)): - raise Exception("Expected provider_subnet_id_ to be a str, received: {}".format(type(provider_subnet_id_))) - - if provider_vlan_id_ is not None and not isinstance(provider_vlan_id_, (bytes, str)): - raise Exception("Expected provider_vlan_id_ to be a str, received: {}".format(type(provider_vlan_id_))) - - if routes_ is not None and not isinstance(routes_, (bytes, str, list)): - raise Exception("Expected routes_ to be a Sequence, received: {}".format(type(routes_))) - - if shadow_addresses_ is not None and not isinstance(shadow_addresses_, (bytes, str, list)): - raise Exception("Expected shadow_addresses_ to be a Sequence, received: {}".format(type(shadow_addresses_))) - - if virtual_port_type_ is not None and not isinstance(virtual_port_type_, (bytes, str)): - raise Exception("Expected virtual_port_type_ to be a str, received: {}".format(type(virtual_port_type_))) - - if vlan_tag_ is not None and not isinstance(vlan_tag_, int): - raise Exception("Expected vlan_tag_ to be a int, received: {}".format(type(vlan_tag_))) - - self.address = address_ - self.addresses = addresses_ - self.cidr = cidr_ - self.config_type = config_type_ - self.device_index = device_index_ - self.disabled = disabled_ - self.dns_search_domains = dns_search_domains_ - self.dns_servers = dns_servers_ - self.gateway_address = gateway_address_ - self.interface_name = interface_name_ - self.interface_type = interface_type_ - self.is_default_gateway = is_default_gateway_ - self.mac_address = mac_address_ - self.mtu = mtu_ - self.no_auto_start = no_auto_start_ - self.origin = origin_ - self.parent_interface_name = parent_interface_name_ - self.provider_address_id = provider_address_id_ - self.provider_id = provider_id_ - self.provider_network_id = provider_network_id_ - self.provider_space_id = provider_space_id_ - self.provider_subnet_id = provider_subnet_id_ - self.provider_vlan_id = provider_vlan_id_ - self.routes = routes_ - self.shadow_addresses = shadow_addresses_ - self.virtual_port_type = virtual_port_type_ - self.vlan_tag = vlan_tag_ - self.unknown_fields = unknown_fields - - - -class NetworkInfo(Type): - _toSchema = {'addresses': 'addresses', 'interface_name': 'interface-name', 'mac_address': 'mac-address'} - _toPy = {'addresses': 'addresses', 'interface-name': 'interface_name', 'mac-address': 'mac_address'} - def __init__(self, addresses=None, interface_name=None, mac_address=None, **unknown_fields): - ''' - addresses : typing.Sequence[~InterfaceAddress] - interface_name : str - mac_address : str - ''' - addresses_ = [InterfaceAddress.from_json(o) for o in addresses or []] - interface_name_ = interface_name - mac_address_ = mac_address - - # Validate arguments against known Juju API types. - if addresses_ is not None and not isinstance(addresses_, (bytes, str, list)): - raise Exception("Expected addresses_ to be a Sequence, received: {}".format(type(addresses_))) - - if interface_name_ is not None and not isinstance(interface_name_, (bytes, str)): - raise Exception("Expected interface_name_ to be a str, received: {}".format(type(interface_name_))) - - if mac_address_ is not None and not isinstance(mac_address_, (bytes, str)): - raise Exception("Expected mac_address_ to be a str, received: {}".format(type(mac_address_))) - - self.addresses = addresses_ - self.interface_name = interface_name_ - self.mac_address = mac_address_ - self.unknown_fields = unknown_fields - - - -class NetworkInfoParams(Type): - _toSchema = {'bindings': 'bindings', 'relation_id': 'relation-id', 'unit': 'unit'} - _toPy = {'bindings': 'bindings', 'relation-id': 'relation_id', 'unit': 'unit'} - def __init__(self, bindings=None, relation_id=None, unit=None, **unknown_fields): - ''' - bindings : typing.Sequence[str] - relation_id : int - unit : str - ''' - bindings_ = bindings - relation_id_ = relation_id - unit_ = unit - - # Validate arguments against known Juju API types. - if bindings_ is not None and not isinstance(bindings_, (bytes, str, list)): - raise Exception("Expected bindings_ to be a Sequence, received: {}".format(type(bindings_))) - - if relation_id_ is not None and not isinstance(relation_id_, int): - raise Exception("Expected relation_id_ to be a int, received: {}".format(type(relation_id_))) - - if unit_ is not None and not isinstance(unit_, (bytes, str)): - raise Exception("Expected unit_ to be a str, received: {}".format(type(unit_))) - - self.bindings = bindings_ - self.relation_id = relation_id_ - self.unit = unit_ - self.unknown_fields = unknown_fields - - - -class NetworkInfoResult(Type): - _toSchema = {'bind_addresses': 'bind-addresses', 'egress_subnets': 'egress-subnets', 'error': 'error', 'ingress_addresses': 'ingress-addresses'} - _toPy = {'bind-addresses': 'bind_addresses', 'egress-subnets': 'egress_subnets', 'error': 'error', 'ingress-addresses': 'ingress_addresses'} - def __init__(self, bind_addresses=None, egress_subnets=None, error=None, ingress_addresses=None, **unknown_fields): - ''' - bind_addresses : typing.Sequence[~NetworkInfo] - egress_subnets : typing.Sequence[str] - error : Error - ingress_addresses : typing.Sequence[str] - ''' - bind_addresses_ = [NetworkInfo.from_json(o) for o in bind_addresses or []] - egress_subnets_ = egress_subnets - error_ = Error.from_json(error) if error else None - ingress_addresses_ = ingress_addresses - - # Validate arguments against known Juju API types. - if bind_addresses_ is not None and not isinstance(bind_addresses_, (bytes, str, list)): - raise Exception("Expected bind_addresses_ to be a Sequence, received: {}".format(type(bind_addresses_))) - - if egress_subnets_ is not None and not isinstance(egress_subnets_, (bytes, str, list)): - raise Exception("Expected egress_subnets_ to be a Sequence, received: {}".format(type(egress_subnets_))) - - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - - if ingress_addresses_ is not None and not isinstance(ingress_addresses_, (bytes, str, list)): - raise Exception("Expected ingress_addresses_ to be a Sequence, received: {}".format(type(ingress_addresses_))) - - self.bind_addresses = bind_addresses_ - self.egress_subnets = egress_subnets_ - self.error = error_ - self.ingress_addresses = ingress_addresses_ - self.unknown_fields = unknown_fields - - - -class NetworkInfoResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None, **unknown_fields): - ''' - results : typing.Mapping[str, ~NetworkInfoResult] - ''' - results_ = {k: NetworkInfoResult.from_json(v) for k, v in (results or dict()).items()} - - # Validate arguments against known Juju API types. - if results_ is not None and not isinstance(results_, dict): - raise Exception("Expected results_ to be a Mapping, received: {}".format(type(results_))) - - self.results = results_ - self.unknown_fields = unknown_fields - - - -class NetworkInterface(Type): - _toSchema = {'dns_nameservers': 'dns-nameservers', 'gateway': 'gateway', 'ip_addresses': 'ip-addresses', 'is_up': 'is-up', 'mac_address': 'mac-address', 'space': 'space'} - _toPy = {'dns-nameservers': 'dns_nameservers', 'gateway': 'gateway', 'ip-addresses': 'ip_addresses', 'is-up': 'is_up', 'mac-address': 'mac_address', 'space': 'space'} - def __init__(self, dns_nameservers=None, gateway=None, ip_addresses=None, is_up=None, mac_address=None, space=None, **unknown_fields): - ''' - dns_nameservers : typing.Sequence[str] - gateway : str - ip_addresses : typing.Sequence[str] - is_up : bool - mac_address : str - space : str - ''' - dns_nameservers_ = dns_nameservers - gateway_ = gateway - ip_addresses_ = ip_addresses - is_up_ = is_up - mac_address_ = mac_address - space_ = space - - # Validate arguments against known Juju API types. - if dns_nameservers_ is not None and not isinstance(dns_nameservers_, (bytes, str, list)): - raise Exception("Expected dns_nameservers_ to be a Sequence, received: {}".format(type(dns_nameservers_))) - - if gateway_ is not None and not isinstance(gateway_, (bytes, str)): - raise Exception("Expected gateway_ to be a str, received: {}".format(type(gateway_))) - - if ip_addresses_ is not None and not isinstance(ip_addresses_, (bytes, str, list)): - raise Exception("Expected ip_addresses_ to be a Sequence, received: {}".format(type(ip_addresses_))) - - if is_up_ is not None and not isinstance(is_up_, bool): - raise Exception("Expected is_up_ to be a bool, received: {}".format(type(is_up_))) - - if mac_address_ is not None and not isinstance(mac_address_, (bytes, str)): - raise Exception("Expected mac_address_ to be a str, received: {}".format(type(mac_address_))) - - if space_ is not None and not isinstance(space_, (bytes, str)): - raise Exception("Expected space_ to be a str, received: {}".format(type(space_))) - - self.dns_nameservers = dns_nameservers_ - self.gateway = gateway_ - self.ip_addresses = ip_addresses_ - self.is_up = is_up_ - self.mac_address = mac_address_ - self.space = space_ - self.unknown_fields = unknown_fields - - - -class NetworkRoute(Type): - _toSchema = {'destination_cidr': 'destination-cidr', 'gateway_ip': 'gateway-ip', 'metric': 'metric'} - _toPy = {'destination-cidr': 'destination_cidr', 'gateway-ip': 'gateway_ip', 'metric': 'metric'} - def __init__(self, destination_cidr=None, gateway_ip=None, metric=None, **unknown_fields): - ''' - destination_cidr : str - gateway_ip : str - metric : int - ''' - destination_cidr_ = destination_cidr - gateway_ip_ = gateway_ip - metric_ = metric - - # Validate arguments against known Juju API types. - if destination_cidr_ is not None and not isinstance(destination_cidr_, (bytes, str)): - raise Exception("Expected destination_cidr_ to be a str, received: {}".format(type(destination_cidr_))) - - if gateway_ip_ is not None and not isinstance(gateway_ip_, (bytes, str)): - raise Exception("Expected gateway_ip_ to be a str, received: {}".format(type(gateway_ip_))) - - if metric_ is not None and not isinstance(metric_, int): - raise Exception("Expected metric_ to be a int, received: {}".format(type(metric_))) - - self.destination_cidr = destination_cidr_ - self.gateway_ip = gateway_ip_ - self.metric = metric_ - self.unknown_fields = unknown_fields - - - -class NotifyWatchResult(Type): - _toSchema = {'error': 'error', 'notifywatcherid': 'NotifyWatcherId'} - _toPy = {'NotifyWatcherId': 'notifywatcherid', 'error': 'error'} - def __init__(self, notifywatcherid=None, error=None, **unknown_fields): - ''' - notifywatcherid : str - error : Error - ''' - notifywatcherid_ = notifywatcherid - error_ = Error.from_json(error) if error else None - - # Validate arguments against known Juju API types. - if notifywatcherid_ is not None and not isinstance(notifywatcherid_, (bytes, str)): - raise Exception("Expected notifywatcherid_ to be a str, received: {}".format(type(notifywatcherid_))) - - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - - self.notifywatcherid = notifywatcherid_ - self.error = error_ - self.unknown_fields = unknown_fields - - - -class NotifyWatchResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None, **unknown_fields): - ''' - results : typing.Sequence[~NotifyWatchResult] - ''' - results_ = [NotifyWatchResult.from_json(o) for o in results or []] - - # Validate arguments against known Juju API types. - if results_ is not None and not isinstance(results_, (bytes, str, list)): - raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) - - self.results = results_ - self.unknown_fields = unknown_fields - - - -class Number(Type): - _toSchema = {'build': 'Build', 'major': 'Major', 'minor': 'Minor', 'patch': 'Patch', 'tag': 'Tag'} - _toPy = {'Build': 'build', 'Major': 'major', 'Minor': 'minor', 'Patch': 'patch', 'Tag': 'tag'} - def __init__(self, build=None, major=None, minor=None, patch=None, tag=None, **unknown_fields): - ''' - build : int - major : int - minor : int - patch : int - tag : str - ''' - build_ = build - major_ = major - minor_ = minor - patch_ = patch - tag_ = tag - - # Validate arguments against known Juju API types. - if build_ is not None and not isinstance(build_, int): - raise Exception("Expected build_ to be a int, received: {}".format(type(build_))) - - if major_ is not None and not isinstance(major_, int): - raise Exception("Expected major_ to be a int, received: {}".format(type(major_))) - - if minor_ is not None and not isinstance(minor_, int): - raise Exception("Expected minor_ to be a int, received: {}".format(type(minor_))) - - if patch_ is not None and not isinstance(patch_, int): - raise Exception("Expected patch_ to be a int, received: {}".format(type(patch_))) - - if tag_ is not None and not isinstance(tag_, (bytes, str)): - raise Exception("Expected tag_ to be a str, received: {}".format(type(tag_))) - - self.build = build_ - self.major = major_ - self.minor = minor_ - self.patch = patch_ - self.tag = tag_ - self.unknown_fields = unknown_fields - - - -class OfferArg(Type): - _toSchema = {'bakery_version': 'bakery-version', 'macaroons': 'macaroons', 'offer_uuid': 'offer-uuid'} - _toPy = {'bakery-version': 'bakery_version', 'macaroons': 'macaroons', 'offer-uuid': 'offer_uuid'} - def __init__(self, bakery_version=None, macaroons=None, offer_uuid=None, **unknown_fields): - ''' - bakery_version : int - macaroons : typing.Sequence[~Macaroon] - offer_uuid : str - ''' - bakery_version_ = bakery_version - macaroons_ = [Macaroon.from_json(o) for o in macaroons or []] - offer_uuid_ = offer_uuid - - # Validate arguments against known Juju API types. - if bakery_version_ is not None and not isinstance(bakery_version_, int): - raise Exception("Expected bakery_version_ to be a int, received: {}".format(type(bakery_version_))) - - if macaroons_ is not None and not isinstance(macaroons_, (bytes, str, list)): - raise Exception("Expected macaroons_ to be a Sequence, received: {}".format(type(macaroons_))) - - if offer_uuid_ is not None and not isinstance(offer_uuid_, (bytes, str)): - raise Exception("Expected offer_uuid_ to be a str, received: {}".format(type(offer_uuid_))) - - self.bakery_version = bakery_version_ - self.macaroons = macaroons_ - self.offer_uuid = offer_uuid_ - self.unknown_fields = unknown_fields - - - -class OfferArgs(Type): - _toSchema = {'args': 'args'} - _toPy = {'args': 'args'} - def __init__(self, args=None, **unknown_fields): - ''' - args : typing.Sequence[~OfferArg] - ''' - args_ = [OfferArg.from_json(o) for o in args or []] - - # Validate arguments against known Juju API types. - if args_ is not None and not isinstance(args_, (bytes, str, list)): - raise Exception("Expected args_ to be a Sequence, received: {}".format(type(args_))) - - self.args = args_ - self.unknown_fields = unknown_fields - - - -class OfferConnection(Type): - _toSchema = {'endpoint': 'endpoint', 'ingress_subnets': 'ingress-subnets', 'relation_id': 'relation-id', 'source_model_tag': 'source-model-tag', 'status': 'status', 'username': 'username'} - _toPy = {'endpoint': 'endpoint', 'ingress-subnets': 'ingress_subnets', 'relation-id': 'relation_id', 'source-model-tag': 'source_model_tag', 'status': 'status', 'username': 'username'} - def __init__(self, endpoint=None, ingress_subnets=None, relation_id=None, source_model_tag=None, status=None, username=None, **unknown_fields): - ''' - endpoint : str - ingress_subnets : typing.Sequence[str] - relation_id : int - source_model_tag : str - status : EntityStatus - username : str - ''' - endpoint_ = endpoint - ingress_subnets_ = ingress_subnets - relation_id_ = relation_id - source_model_tag_ = source_model_tag - status_ = EntityStatus.from_json(status) if status else None - username_ = username - - # Validate arguments against known Juju API types. - if endpoint_ is not None and not isinstance(endpoint_, (bytes, str)): - raise Exception("Expected endpoint_ to be a str, received: {}".format(type(endpoint_))) - - if ingress_subnets_ is not None and not isinstance(ingress_subnets_, (bytes, str, list)): - raise Exception("Expected ingress_subnets_ to be a Sequence, received: {}".format(type(ingress_subnets_))) - - if relation_id_ is not None and not isinstance(relation_id_, int): - raise Exception("Expected relation_id_ to be a int, received: {}".format(type(relation_id_))) - - if source_model_tag_ is not None and not isinstance(source_model_tag_, (bytes, str)): - raise Exception("Expected source_model_tag_ to be a str, received: {}".format(type(source_model_tag_))) - - if status_ is not None and not isinstance(status_, (dict, EntityStatus)): - raise Exception("Expected status_ to be a EntityStatus, received: {}".format(type(status_))) - - if username_ is not None and not isinstance(username_, (bytes, str)): - raise Exception("Expected username_ to be a str, received: {}".format(type(username_))) - - self.endpoint = endpoint_ - self.ingress_subnets = ingress_subnets_ - self.relation_id = relation_id_ - self.source_model_tag = source_model_tag_ - self.status = status_ - self.username = username_ - self.unknown_fields = unknown_fields - - - -class OfferFilter(Type): - _toSchema = {'allowed_users': 'allowed-users', 'application_description': 'application-description', 'application_name': 'application-name', 'application_user': 'application-user', 'connected_users': 'connected-users', 'endpoints': 'endpoints', 'model_name': 'model-name', 'offer_name': 'offer-name', 'owner_name': 'owner-name'} - _toPy = {'allowed-users': 'allowed_users', 'application-description': 'application_description', 'application-name': 'application_name', 'application-user': 'application_user', 'connected-users': 'connected_users', 'endpoints': 'endpoints', 'model-name': 'model_name', 'offer-name': 'offer_name', 'owner-name': 'owner_name'} - def __init__(self, allowed_users=None, application_description=None, application_name=None, application_user=None, connected_users=None, endpoints=None, model_name=None, offer_name=None, owner_name=None, **unknown_fields): - ''' - allowed_users : typing.Sequence[str] - application_description : str - application_name : str - application_user : str - connected_users : typing.Sequence[str] - endpoints : typing.Sequence[~EndpointFilterAttributes] - model_name : str - offer_name : str - owner_name : str - ''' - allowed_users_ = allowed_users - application_description_ = application_description - application_name_ = application_name - application_user_ = application_user - connected_users_ = connected_users - endpoints_ = [EndpointFilterAttributes.from_json(o) for o in endpoints or []] - model_name_ = model_name - offer_name_ = offer_name - owner_name_ = owner_name - - # Validate arguments against known Juju API types. - if allowed_users_ is not None and not isinstance(allowed_users_, (bytes, str, list)): - raise Exception("Expected allowed_users_ to be a Sequence, received: {}".format(type(allowed_users_))) - - if application_description_ is not None and not isinstance(application_description_, (bytes, str)): - raise Exception("Expected application_description_ to be a str, received: {}".format(type(application_description_))) - - if application_name_ is not None and not isinstance(application_name_, (bytes, str)): - raise Exception("Expected application_name_ to be a str, received: {}".format(type(application_name_))) - - if application_user_ is not None and not isinstance(application_user_, (bytes, str)): - raise Exception("Expected application_user_ to be a str, received: {}".format(type(application_user_))) - - if connected_users_ is not None and not isinstance(connected_users_, (bytes, str, list)): - raise Exception("Expected connected_users_ to be a Sequence, received: {}".format(type(connected_users_))) - - if endpoints_ is not None and not isinstance(endpoints_, (bytes, str, list)): - raise Exception("Expected endpoints_ to be a Sequence, received: {}".format(type(endpoints_))) - - if model_name_ is not None and not isinstance(model_name_, (bytes, str)): - raise Exception("Expected model_name_ to be a str, received: {}".format(type(model_name_))) - - if offer_name_ is not None and not isinstance(offer_name_, (bytes, str)): - raise Exception("Expected offer_name_ to be a str, received: {}".format(type(offer_name_))) - - if owner_name_ is not None and not isinstance(owner_name_, (bytes, str)): - raise Exception("Expected owner_name_ to be a str, received: {}".format(type(owner_name_))) - - self.allowed_users = allowed_users_ - self.application_description = application_description_ - self.application_name = application_name_ - self.application_user = application_user_ - self.connected_users = connected_users_ - self.endpoints = endpoints_ - self.model_name = model_name_ - self.offer_name = offer_name_ - self.owner_name = owner_name_ - self.unknown_fields = unknown_fields - - - -class OfferFilters(Type): - _toSchema = {'filters': 'Filters'} - _toPy = {'Filters': 'filters'} - def __init__(self, filters=None, **unknown_fields): - ''' - filters : typing.Sequence[~OfferFilter] - ''' - filters_ = [OfferFilter.from_json(o) for o in filters or []] - - # Validate arguments against known Juju API types. - if filters_ is not None and not isinstance(filters_, (bytes, str, list)): - raise Exception("Expected filters_ to be a Sequence, received: {}".format(type(filters_))) - - self.filters = filters_ - self.unknown_fields = unknown_fields - - - -class OfferStatusChange(Type): - _toSchema = {'offer_name': 'offer-name', 'status': 'status'} - _toPy = {'offer-name': 'offer_name', 'status': 'status'} - def __init__(self, offer_name=None, status=None, **unknown_fields): - ''' - offer_name : str - status : EntityStatus - ''' - offer_name_ = offer_name - status_ = EntityStatus.from_json(status) if status else None - - # Validate arguments against known Juju API types. - if offer_name_ is not None and not isinstance(offer_name_, (bytes, str)): - raise Exception("Expected offer_name_ to be a str, received: {}".format(type(offer_name_))) - - if status_ is not None and not isinstance(status_, (dict, EntityStatus)): - raise Exception("Expected status_ to be a EntityStatus, received: {}".format(type(status_))) - - self.offer_name = offer_name_ - self.status = status_ - self.unknown_fields = unknown_fields - - - -class OfferStatusWatchResult(Type): - _toSchema = {'changes': 'changes', 'error': 'error', 'watcher_id': 'watcher-id'} - _toPy = {'changes': 'changes', 'error': 'error', 'watcher-id': 'watcher_id'} - def __init__(self, changes=None, error=None, watcher_id=None, **unknown_fields): - ''' - changes : typing.Sequence[~OfferStatusChange] - error : Error - watcher_id : str - ''' - changes_ = [OfferStatusChange.from_json(o) for o in changes or []] - error_ = Error.from_json(error) if error else None - watcher_id_ = watcher_id - - # Validate arguments against known Juju API types. - if changes_ is not None and not isinstance(changes_, (bytes, str, list)): - raise Exception("Expected changes_ to be a Sequence, received: {}".format(type(changes_))) - - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - - if watcher_id_ is not None and not isinstance(watcher_id_, (bytes, str)): - raise Exception("Expected watcher_id_ to be a str, received: {}".format(type(watcher_id_))) - - self.changes = changes_ - self.error = error_ - self.watcher_id = watcher_id_ - self.unknown_fields = unknown_fields - - - -class OfferStatusWatchResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None, **unknown_fields): - ''' - results : typing.Sequence[~OfferStatusWatchResult] - ''' - results_ = [OfferStatusWatchResult.from_json(o) for o in results or []] - - # Validate arguments against known Juju API types. - if results_ is not None and not isinstance(results_, (bytes, str, list)): - raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) - - self.results = results_ - self.unknown_fields = unknown_fields - - - -class OfferURLs(Type): - _toSchema = {'bakery_version': 'bakery-version', 'offer_urls': 'offer-urls'} - _toPy = {'bakery-version': 'bakery_version', 'offer-urls': 'offer_urls'} - def __init__(self, bakery_version=None, offer_urls=None, **unknown_fields): - ''' - bakery_version : int - offer_urls : typing.Sequence[str] - ''' - bakery_version_ = bakery_version - offer_urls_ = offer_urls - - # Validate arguments against known Juju API types. - if bakery_version_ is not None and not isinstance(bakery_version_, int): - raise Exception("Expected bakery_version_ to be a int, received: {}".format(type(bakery_version_))) - - if offer_urls_ is not None and not isinstance(offer_urls_, (bytes, str, list)): - raise Exception("Expected offer_urls_ to be a Sequence, received: {}".format(type(offer_urls_))) - - self.bakery_version = bakery_version_ - self.offer_urls = offer_urls_ - self.unknown_fields = unknown_fields - - - -class OfferUserDetails(Type): - _toSchema = {'access': 'access', 'display_name': 'display-name', 'user': 'user'} - _toPy = {'access': 'access', 'display-name': 'display_name', 'user': 'user'} - def __init__(self, access=None, display_name=None, user=None, **unknown_fields): - ''' - access : str - display_name : str - user : str - ''' - access_ = access - display_name_ = display_name - user_ = user - - # Validate arguments against known Juju API types. - if access_ is not None and not isinstance(access_, (bytes, str)): - raise Exception("Expected access_ to be a str, received: {}".format(type(access_))) - - if display_name_ is not None and not isinstance(display_name_, (bytes, str)): - raise Exception("Expected display_name_ to be a str, received: {}".format(type(display_name_))) - - if user_ is not None and not isinstance(user_, (bytes, str)): - raise Exception("Expected user_ to be a str, received: {}".format(type(user_))) - - self.access = access_ - self.display_name = display_name_ - self.user = user_ - self.unknown_fields = unknown_fields - - - -class OpenMachinePortRangesByEndpointResult(Type): - _toSchema = {'error': 'error', 'unit_port_ranges': 'unit-port-ranges'} - _toPy = {'error': 'error', 'unit-port-ranges': 'unit_port_ranges'} - def __init__(self, error=None, unit_port_ranges=None, **unknown_fields): - ''' - error : Error - unit_port_ranges : typing.Mapping[str, typing.Sequence[~OpenUnitPortRangesByEndpoint]] - ''' - error_ = Error.from_json(error) if error else None - unit_port_ranges_ = {k: OpenUnitPortRangesByEndpoint.from_json(v) for k, v in (unit_port_ranges or dict()).items()} - - # Validate arguments against known Juju API types. - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - - if unit_port_ranges_ is not None and not isinstance(unit_port_ranges_, dict): - raise Exception("Expected unit_port_ranges_ to be a Mapping, received: {}".format(type(unit_port_ranges_))) - - self.error = error_ - self.unit_port_ranges = unit_port_ranges_ - self.unknown_fields = unknown_fields - - - -class OpenMachinePortRangesByEndpointResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None, **unknown_fields): - ''' - results : typing.Sequence[~OpenMachinePortRangesByEndpointResult] - ''' - results_ = [OpenMachinePortRangesByEndpointResult.from_json(o) for o in results or []] - - # Validate arguments against known Juju API types. - if results_ is not None and not isinstance(results_, (bytes, str, list)): - raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) - - self.results = results_ - self.unknown_fields = unknown_fields - - - -class OpenMachinePortRangesResult(Type): - _toSchema = {'error': 'error', 'unit_port_ranges': 'unit-port-ranges'} - _toPy = {'error': 'error', 'unit-port-ranges': 'unit_port_ranges'} - def __init__(self, error=None, unit_port_ranges=None, **unknown_fields): - ''' - error : Error - unit_port_ranges : typing.Mapping[str, typing.Sequence[~OpenUnitPortRanges]] - ''' - error_ = Error.from_json(error) if error else None - unit_port_ranges_ = {k: OpenUnitPortRanges.from_json(v) for k, v in (unit_port_ranges or dict()).items()} - - # Validate arguments against known Juju API types. - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - - if unit_port_ranges_ is not None and not isinstance(unit_port_ranges_, dict): - raise Exception("Expected unit_port_ranges_ to be a Mapping, received: {}".format(type(unit_port_ranges_))) - - self.error = error_ - self.unit_port_ranges = unit_port_ranges_ - self.unknown_fields = unknown_fields - - - -class OpenMachinePortRangesResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None, **unknown_fields): - ''' - results : typing.Sequence[~OpenMachinePortRangesResult] - ''' - results_ = [OpenMachinePortRangesResult.from_json(o) for o in results or []] - - # Validate arguments against known Juju API types. - if results_ is not None and not isinstance(results_, (bytes, str, list)): - raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) - - self.results = results_ - self.unknown_fields = unknown_fields - - - -class OpenPortRangesByEndpointResult(Type): - _toSchema = {'error': 'error', 'unit_port_ranges': 'unit-port-ranges'} - _toPy = {'error': 'error', 'unit-port-ranges': 'unit_port_ranges'} - def __init__(self, error=None, unit_port_ranges=None, **unknown_fields): - ''' - error : Error - unit_port_ranges : typing.Mapping[str, typing.Sequence[~OpenUnitPortRangesByEndpoint]] - ''' - error_ = Error.from_json(error) if error else None - unit_port_ranges_ = {k: OpenUnitPortRangesByEndpoint.from_json(v) for k, v in (unit_port_ranges or dict()).items()} - - # Validate arguments against known Juju API types. - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - - if unit_port_ranges_ is not None and not isinstance(unit_port_ranges_, dict): - raise Exception("Expected unit_port_ranges_ to be a Mapping, received: {}".format(type(unit_port_ranges_))) - - self.error = error_ - self.unit_port_ranges = unit_port_ranges_ - self.unknown_fields = unknown_fields - - - -class OpenPortRangesByEndpointResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None, **unknown_fields): - ''' - results : typing.Sequence[~OpenPortRangesByEndpointResult] - ''' - results_ = [OpenPortRangesByEndpointResult.from_json(o) for o in results or []] - - # Validate arguments against known Juju API types. - if results_ is not None and not isinstance(results_, (bytes, str, list)): - raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) - - self.results = results_ - self.unknown_fields = unknown_fields - - - -class OpenUnitPortRanges(Type): - _toSchema = {'endpoint': 'endpoint', 'port_ranges': 'port-ranges', 'subnet_cidrs': 'subnet-cidrs'} - _toPy = {'endpoint': 'endpoint', 'port-ranges': 'port_ranges', 'subnet-cidrs': 'subnet_cidrs'} - def __init__(self, endpoint=None, port_ranges=None, subnet_cidrs=None, **unknown_fields): - ''' - endpoint : str - port_ranges : typing.Sequence[~PortRange] - subnet_cidrs : typing.Sequence[str] - ''' - endpoint_ = endpoint - port_ranges_ = [PortRange.from_json(o) for o in port_ranges or []] - subnet_cidrs_ = subnet_cidrs - - # Validate arguments against known Juju API types. - if endpoint_ is not None and not isinstance(endpoint_, (bytes, str)): - raise Exception("Expected endpoint_ to be a str, received: {}".format(type(endpoint_))) - - if port_ranges_ is not None and not isinstance(port_ranges_, (bytes, str, list)): - raise Exception("Expected port_ranges_ to be a Sequence, received: {}".format(type(port_ranges_))) - - if subnet_cidrs_ is not None and not isinstance(subnet_cidrs_, (bytes, str, list)): - raise Exception("Expected subnet_cidrs_ to be a Sequence, received: {}".format(type(subnet_cidrs_))) - - self.endpoint = endpoint_ - self.port_ranges = port_ranges_ - self.subnet_cidrs = subnet_cidrs_ - self.unknown_fields = unknown_fields - - - -class OpenUnitPortRangesByEndpoint(Type): - _toSchema = {'endpoint': 'endpoint', 'port_ranges': 'port-ranges'} - _toPy = {'endpoint': 'endpoint', 'port-ranges': 'port_ranges'} - def __init__(self, endpoint=None, port_ranges=None, **unknown_fields): - ''' - endpoint : str - port_ranges : typing.Sequence[~PortRange] - ''' - endpoint_ = endpoint - port_ranges_ = [PortRange.from_json(o) for o in port_ranges or []] - - # Validate arguments against known Juju API types. - if endpoint_ is not None and not isinstance(endpoint_, (bytes, str)): - raise Exception("Expected endpoint_ to be a str, received: {}".format(type(endpoint_))) - - if port_ranges_ is not None and not isinstance(port_ranges_, (bytes, str, list)): - raise Exception("Expected port_ranges_ to be a Sequence, received: {}".format(type(port_ranges_))) - - self.endpoint = endpoint_ - self.port_ranges = port_ranges_ - self.unknown_fields = unknown_fields - - - -class OperationQueryArgs(Type): - _toSchema = {'actions': 'actions', 'applications': 'applications', 'limit': 'limit', 'machines': 'machines', 'offset': 'offset', 'status': 'status', 'units': 'units'} - _toPy = {'actions': 'actions', 'applications': 'applications', 'limit': 'limit', 'machines': 'machines', 'offset': 'offset', 'status': 'status', 'units': 'units'} - def __init__(self, actions=None, applications=None, limit=None, machines=None, offset=None, status=None, units=None, **unknown_fields): - ''' - actions : typing.Sequence[str] - applications : typing.Sequence[str] - limit : int - machines : typing.Sequence[str] - offset : int - status : typing.Sequence[str] - units : typing.Sequence[str] - ''' - actions_ = actions - applications_ = applications - limit_ = limit - machines_ = machines - offset_ = offset - status_ = status - units_ = units - - # Validate arguments against known Juju API types. - if actions_ is not None and not isinstance(actions_, (bytes, str, list)): - raise Exception("Expected actions_ to be a Sequence, received: {}".format(type(actions_))) - - if applications_ is not None and not isinstance(applications_, (bytes, str, list)): - raise Exception("Expected applications_ to be a Sequence, received: {}".format(type(applications_))) - - if limit_ is not None and not isinstance(limit_, int): - raise Exception("Expected limit_ to be a int, received: {}".format(type(limit_))) - - if machines_ is not None and not isinstance(machines_, (bytes, str, list)): - raise Exception("Expected machines_ to be a Sequence, received: {}".format(type(machines_))) - - if offset_ is not None and not isinstance(offset_, int): - raise Exception("Expected offset_ to be a int, received: {}".format(type(offset_))) - - if status_ is not None and not isinstance(status_, (bytes, str, list)): - raise Exception("Expected status_ to be a Sequence, received: {}".format(type(status_))) - - if units_ is not None and not isinstance(units_, (bytes, str, list)): - raise Exception("Expected units_ to be a Sequence, received: {}".format(type(units_))) - - self.actions = actions_ - self.applications = applications_ - self.limit = limit_ - self.machines = machines_ - self.offset = offset_ - self.status = status_ - self.units = units_ - self.unknown_fields = unknown_fields - - - -class OperationResult(Type): - _toSchema = {'actions': 'actions', 'completed': 'completed', 'enqueued': 'enqueued', 'error': 'error', 'fail': 'fail', 'operation': 'operation', 'started': 'started', 'status': 'status', 'summary': 'summary'} - _toPy = {'actions': 'actions', 'completed': 'completed', 'enqueued': 'enqueued', 'error': 'error', 'fail': 'fail', 'operation': 'operation', 'started': 'started', 'status': 'status', 'summary': 'summary'} - def __init__(self, actions=None, completed=None, enqueued=None, error=None, fail=None, operation=None, started=None, status=None, summary=None, **unknown_fields): - ''' - actions : typing.Sequence[~ActionResult] - completed : str - enqueued : str - error : Error - fail : str - operation : str - started : str - status : str - summary : str - ''' - actions_ = [ActionResult.from_json(o) for o in actions or []] - completed_ = completed - enqueued_ = enqueued - error_ = Error.from_json(error) if error else None - fail_ = fail - operation_ = operation - started_ = started - status_ = status - summary_ = summary - - # Validate arguments against known Juju API types. - if actions_ is not None and not isinstance(actions_, (bytes, str, list)): - raise Exception("Expected actions_ to be a Sequence, received: {}".format(type(actions_))) - - if completed_ is not None and not isinstance(completed_, (bytes, str)): - raise Exception("Expected completed_ to be a str, received: {}".format(type(completed_))) - - if enqueued_ is not None and not isinstance(enqueued_, (bytes, str)): - raise Exception("Expected enqueued_ to be a str, received: {}".format(type(enqueued_))) - - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - - if fail_ is not None and not isinstance(fail_, (bytes, str)): - raise Exception("Expected fail_ to be a str, received: {}".format(type(fail_))) - - if operation_ is not None and not isinstance(operation_, (bytes, str)): - raise Exception("Expected operation_ to be a str, received: {}".format(type(operation_))) - - if started_ is not None and not isinstance(started_, (bytes, str)): - raise Exception("Expected started_ to be a str, received: {}".format(type(started_))) - - if status_ is not None and not isinstance(status_, (bytes, str)): - raise Exception("Expected status_ to be a str, received: {}".format(type(status_))) - - if summary_ is not None and not isinstance(summary_, (bytes, str)): - raise Exception("Expected summary_ to be a str, received: {}".format(type(summary_))) - - self.actions = actions_ - self.completed = completed_ - self.enqueued = enqueued_ - self.error = error_ - self.fail = fail_ - self.operation = operation_ - self.started = started_ - self.status = status_ - self.summary = summary_ - self.unknown_fields = unknown_fields - - - -class OperationResults(Type): - _toSchema = {'results': 'results', 'truncated': 'truncated'} - _toPy = {'results': 'results', 'truncated': 'truncated'} - def __init__(self, results=None, truncated=None, **unknown_fields): - ''' - results : typing.Sequence[~OperationResult] - truncated : bool - ''' - results_ = [OperationResult.from_json(o) for o in results or []] - truncated_ = truncated - - # Validate arguments against known Juju API types. - if results_ is not None and not isinstance(results_, (bytes, str, list)): - raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) - - if truncated_ is not None and not isinstance(truncated_, bool): - raise Exception("Expected truncated_ to be a bool, received: {}".format(type(truncated_))) - - self.results = results_ - self.truncated = truncated_ - self.unknown_fields = unknown_fields - - - -class OperatorProvisioningInfo(Type): - _toSchema = {'api_addresses': 'api-addresses', 'base_image_details': 'base-image-details', 'charm_storage': 'charm-storage', 'error': 'error', 'image_details': 'image-details', 'tags': 'tags', 'version': 'version'} - _toPy = {'api-addresses': 'api_addresses', 'base-image-details': 'base_image_details', 'charm-storage': 'charm_storage', 'error': 'error', 'image-details': 'image_details', 'tags': 'tags', 'version': 'version'} - def __init__(self, api_addresses=None, base_image_details=None, charm_storage=None, error=None, image_details=None, tags=None, version=None, **unknown_fields): - ''' - api_addresses : typing.Sequence[str] - base_image_details : DockerImageInfo - charm_storage : KubernetesFilesystemParams - error : Error - image_details : DockerImageInfo - tags : typing.Mapping[str, str] - version : Number - ''' - api_addresses_ = api_addresses - base_image_details_ = DockerImageInfo.from_json(base_image_details) if base_image_details else None - charm_storage_ = KubernetesFilesystemParams.from_json(charm_storage) if charm_storage else None - error_ = Error.from_json(error) if error else None - image_details_ = DockerImageInfo.from_json(image_details) if image_details else None - tags_ = tags - version_ = Number.from_json(version) if version else None - - # Validate arguments against known Juju API types. - if api_addresses_ is not None and not isinstance(api_addresses_, (bytes, str, list)): - raise Exception("Expected api_addresses_ to be a Sequence, received: {}".format(type(api_addresses_))) - - if base_image_details_ is not None and not isinstance(base_image_details_, (dict, DockerImageInfo)): - raise Exception("Expected base_image_details_ to be a DockerImageInfo, received: {}".format(type(base_image_details_))) - - if charm_storage_ is not None and not isinstance(charm_storage_, (dict, KubernetesFilesystemParams)): - raise Exception("Expected charm_storage_ to be a KubernetesFilesystemParams, received: {}".format(type(charm_storage_))) - - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - - if image_details_ is not None and not isinstance(image_details_, (dict, DockerImageInfo)): - raise Exception("Expected image_details_ to be a DockerImageInfo, received: {}".format(type(image_details_))) - - if tags_ is not None and not isinstance(tags_, dict): - raise Exception("Expected tags_ to be a Mapping, received: {}".format(type(tags_))) - - if version_ is not None and not isinstance(version_, (dict, Number)): - raise Exception("Expected version_ to be a Number, received: {}".format(type(version_))) - - self.api_addresses = api_addresses_ - self.base_image_details = base_image_details_ - self.charm_storage = charm_storage_ - self.error = error_ - self.image_details = image_details_ - self.tags = tags_ - self.version = version_ - self.unknown_fields = unknown_fields - - - -class OperatorProvisioningInfoResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None, **unknown_fields): - ''' - results : typing.Sequence[~OperatorProvisioningInfo] - ''' - results_ = [OperatorProvisioningInfo.from_json(o) for o in results or []] - - # Validate arguments against known Juju API types. - if results_ is not None and not isinstance(results_, (bytes, str, list)): - raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) - - self.results = results_ - self.unknown_fields = unknown_fields - - - -class Payload(Type): - _toSchema = {'class_': 'class', 'id_': 'id', 'labels': 'labels', 'machine': 'machine', 'status': 'status', 'type_': 'type', 'unit': 'unit'} - _toPy = {'class': 'class_', 'id': 'id_', 'labels': 'labels', 'machine': 'machine', 'status': 'status', 'type': 'type_', 'unit': 'unit'} - def __init__(self, class_=None, id_=None, labels=None, machine=None, status=None, type_=None, unit=None, **unknown_fields): - ''' - class_ : str - id_ : str - labels : typing.Sequence[str] - machine : str - status : str - type_ : str - unit : str - ''' - class__ = class_ - id__ = id_ - labels_ = labels - machine_ = machine - status_ = status - type__ = type_ - unit_ = unit - - # Validate arguments against known Juju API types. - if class__ is not None and not isinstance(class__, (bytes, str)): - raise Exception("Expected class__ to be a str, received: {}".format(type(class__))) - - if id__ is not None and not isinstance(id__, (bytes, str)): - raise Exception("Expected id__ to be a str, received: {}".format(type(id__))) - - if labels_ is not None and not isinstance(labels_, (bytes, str, list)): - raise Exception("Expected labels_ to be a Sequence, received: {}".format(type(labels_))) - - if machine_ is not None and not isinstance(machine_, (bytes, str)): - raise Exception("Expected machine_ to be a str, received: {}".format(type(machine_))) - - if status_ is not None and not isinstance(status_, (bytes, str)): - raise Exception("Expected status_ to be a str, received: {}".format(type(status_))) - - if type__ is not None and not isinstance(type__, (bytes, str)): - raise Exception("Expected type__ to be a str, received: {}".format(type(type__))) - - if unit_ is not None and not isinstance(unit_, (bytes, str)): - raise Exception("Expected unit_ to be a str, received: {}".format(type(unit_))) - - self.class_ = class__ - self.id_ = id__ - self.labels = labels_ - self.machine = machine_ - self.status = status_ - self.type_ = type__ - self.unit = unit_ - self.unknown_fields = unknown_fields - - - -class PayloadListArgs(Type): - _toSchema = {'patterns': 'patterns'} - _toPy = {'patterns': 'patterns'} - def __init__(self, patterns=None, **unknown_fields): - ''' - patterns : typing.Sequence[str] - ''' - patterns_ = patterns - - # Validate arguments against known Juju API types. - if patterns_ is not None and not isinstance(patterns_, (bytes, str, list)): - raise Exception("Expected patterns_ to be a Sequence, received: {}".format(type(patterns_))) - - self.patterns = patterns_ - self.unknown_fields = unknown_fields - - - -class PayloadListResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None, **unknown_fields): - ''' - results : typing.Sequence[~Payload] - ''' - results_ = [Payload.from_json(o) for o in results or []] - - # Validate arguments against known Juju API types. - if results_ is not None and not isinstance(results_, (bytes, str, list)): - raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) - - self.results = results_ - self.unknown_fields = unknown_fields - - - -class PayloadResult(Type): - _toSchema = {'entity': 'Entity', 'error': 'error', 'not_found': 'not-found', 'payload': 'payload', 'tag': 'tag'} - _toPy = {'Entity': 'entity', 'error': 'error', 'not-found': 'not_found', 'payload': 'payload', 'tag': 'tag'} - def __init__(self, entity=None, error=None, not_found=None, payload=None, tag=None, **unknown_fields): - ''' - entity : Entity - error : Error - not_found : bool - payload : Payload - tag : str - ''' - entity_ = Entity.from_json(entity) if entity else None - error_ = Error.from_json(error) if error else None - not_found_ = not_found - payload_ = Payload.from_json(payload) if payload else None - tag_ = tag - - # Validate arguments against known Juju API types. - if entity_ is not None and not isinstance(entity_, (dict, Entity)): - raise Exception("Expected entity_ to be a Entity, received: {}".format(type(entity_))) - - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - - if not_found_ is not None and not isinstance(not_found_, bool): - raise Exception("Expected not_found_ to be a bool, received: {}".format(type(not_found_))) - - if payload_ is not None and not isinstance(payload_, (dict, Payload)): - raise Exception("Expected payload_ to be a Payload, received: {}".format(type(payload_))) - - if tag_ is not None and not isinstance(tag_, (bytes, str)): - raise Exception("Expected tag_ to be a str, received: {}".format(type(tag_))) - - self.entity = entity_ - self.error = error_ - self.not_found = not_found_ - self.payload = payload_ - self.tag = tag_ - self.unknown_fields = unknown_fields - - - -class PayloadResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None, **unknown_fields): - ''' - results : typing.Sequence[~PayloadResult] - ''' - results_ = [PayloadResult.from_json(o) for o in results or []] - - # Validate arguments against known Juju API types. - if results_ is not None and not isinstance(results_, (bytes, str, list)): - raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) - - self.results = results_ - self.unknown_fields = unknown_fields - - - -class PendingResourceUpload(Type): - _toSchema = {'filename': 'Filename', 'name': 'Name', 'type_': 'Type'} - _toPy = {'Filename': 'filename', 'Name': 'name', 'Type': 'type_'} - def __init__(self, filename=None, name=None, type_=None, **unknown_fields): - ''' - filename : str - name : str - type_ : str - ''' - filename_ = filename - name_ = name - type__ = type_ - - # Validate arguments against known Juju API types. - if filename_ is not None and not isinstance(filename_, (bytes, str)): - raise Exception("Expected filename_ to be a str, received: {}".format(type(filename_))) - - if name_ is not None and not isinstance(name_, (bytes, str)): - raise Exception("Expected name_ to be a str, received: {}".format(type(name_))) - - if type__ is not None and not isinstance(type__, (bytes, str)): - raise Exception("Expected type__ to be a str, received: {}".format(type(type__))) - - self.filename = filename_ - self.name = name_ - self.type_ = type__ - self.unknown_fields = unknown_fields - - - -class PhaseResult(Type): - _toSchema = {'error': 'error', 'phase': 'phase'} - _toPy = {'error': 'error', 'phase': 'phase'} - def __init__(self, error=None, phase=None, **unknown_fields): - ''' - error : Error - phase : str - ''' - error_ = Error.from_json(error) if error else None - phase_ = phase - - # Validate arguments against known Juju API types. - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - - if phase_ is not None and not isinstance(phase_, (bytes, str)): - raise Exception("Expected phase_ to be a str, received: {}".format(type(phase_))) - - self.error = error_ - self.phase = phase_ - self.unknown_fields = unknown_fields - - - -class PhaseResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None, **unknown_fields): - ''' - results : typing.Sequence[~PhaseResult] - ''' - results_ = [PhaseResult.from_json(o) for o in results or []] - - # Validate arguments against known Juju API types. - if results_ is not None and not isinstance(results_, (bytes, str, list)): - raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) - - self.results = results_ - self.unknown_fields = unknown_fields - - - -class PinApplicationResult(Type): - _toSchema = {'application_name': 'application-name', 'error': 'error'} - _toPy = {'application-name': 'application_name', 'error': 'error'} - def __init__(self, application_name=None, error=None, **unknown_fields): - ''' - application_name : str - error : Error - ''' - application_name_ = application_name - error_ = Error.from_json(error) if error else None - - # Validate arguments against known Juju API types. - if application_name_ is not None and not isinstance(application_name_, (bytes, str)): - raise Exception("Expected application_name_ to be a str, received: {}".format(type(application_name_))) - - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - - self.application_name = application_name_ - self.error = error_ - self.unknown_fields = unknown_fields - - - -class PinApplicationsResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None, **unknown_fields): - ''' - results : typing.Sequence[~PinApplicationResult] - ''' - results_ = [PinApplicationResult.from_json(o) for o in results or []] - - # Validate arguments against known Juju API types. - if results_ is not None and not isinstance(results_, (bytes, str, list)): - raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) - - self.results = results_ - self.unknown_fields = unknown_fields - - - -class PinnedLeadershipResult(Type): - _toSchema = {'error': 'error', 'result': 'result'} - _toPy = {'error': 'error', 'result': 'result'} - def __init__(self, error=None, result=None, **unknown_fields): - ''' - error : Error - result : typing.Mapping[str, typing.Sequence[str]] - ''' - error_ = Error.from_json(error) if error else None - result_ = result - - # Validate arguments against known Juju API types. - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - - if result_ is not None and not isinstance(result_, dict): - raise Exception("Expected result_ to be a Mapping, received: {}".format(type(result_))) - - self.error = error_ - self.result = result_ - self.unknown_fields = unknown_fields - - - -class Placement(Type): - _toSchema = {'directive': 'directive', 'scope': 'scope'} - _toPy = {'directive': 'directive', 'scope': 'scope'} - def __init__(self, directive=None, scope=None, **unknown_fields): - ''' - directive : str - scope : str - ''' - directive_ = directive - scope_ = scope - - # Validate arguments against known Juju API types. - if directive_ is not None and not isinstance(directive_, (bytes, str)): - raise Exception("Expected directive_ to be a str, received: {}".format(type(directive_))) - - if scope_ is not None and not isinstance(scope_, (bytes, str)): - raise Exception("Expected scope_ to be a str, received: {}".format(type(scope_))) - - self.directive = directive_ - self.scope = scope_ - self.unknown_fields = unknown_fields - - - -class PodSpec(Type): - _toSchema = {'spec': 'spec', 'tag': 'tag'} - _toPy = {'spec': 'spec', 'tag': 'tag'} - def __init__(self, spec=None, tag=None, **unknown_fields): - ''' - spec : str - tag : str - ''' - spec_ = spec - tag_ = tag - - # Validate arguments against known Juju API types. - if spec_ is not None and not isinstance(spec_, (bytes, str)): - raise Exception("Expected spec_ to be a str, received: {}".format(type(spec_))) - - if tag_ is not None and not isinstance(tag_, (bytes, str)): - raise Exception("Expected tag_ to be a str, received: {}".format(type(tag_))) - - self.spec = spec_ - self.tag = tag_ - self.unknown_fields = unknown_fields - - - -class PortRange(Type): - _toSchema = {'from_port': 'from-port', 'protocol': 'protocol', 'to_port': 'to-port'} - _toPy = {'from-port': 'from_port', 'protocol': 'protocol', 'to-port': 'to_port'} - def __init__(self, from_port=None, protocol=None, to_port=None, **unknown_fields): - ''' - from_port : int - protocol : str - to_port : int - ''' - from_port_ = from_port - protocol_ = protocol - to_port_ = to_port - - # Validate arguments against known Juju API types. - if from_port_ is not None and not isinstance(from_port_, int): - raise Exception("Expected from_port_ to be a int, received: {}".format(type(from_port_))) - - if protocol_ is not None and not isinstance(protocol_, (bytes, str)): - raise Exception("Expected protocol_ to be a str, received: {}".format(type(protocol_))) - - if to_port_ is not None and not isinstance(to_port_, int): - raise Exception("Expected to_port_ to be a int, received: {}".format(type(to_port_))) - - self.from_port = from_port_ - self.protocol = protocol_ - self.to_port = to_port_ - self.unknown_fields = unknown_fields - - - -class PrechecksArgs(Type): - _toSchema = {'target_controller_version': 'target-controller-version'} - _toPy = {'target-controller-version': 'target_controller_version'} - def __init__(self, target_controller_version=None, **unknown_fields): - ''' - target_controller_version : Number - ''' - target_controller_version_ = Number.from_json(target_controller_version) if target_controller_version else None - - # Validate arguments against known Juju API types. - if target_controller_version_ is not None and not isinstance(target_controller_version_, (dict, Number)): - raise Exception("Expected target_controller_version_ to be a Number, received: {}".format(type(target_controller_version_))) - - self.target_controller_version = target_controller_version_ - self.unknown_fields = unknown_fields - - - -class ProcessRelations(Type): - _toSchema = {'controller_alias': 'controller-alias'} - _toPy = {'controller-alias': 'controller_alias'} - def __init__(self, controller_alias=None, **unknown_fields): - ''' - controller_alias : str - ''' - controller_alias_ = controller_alias - - # Validate arguments against known Juju API types. - if controller_alias_ is not None and not isinstance(controller_alias_, (bytes, str)): - raise Exception("Expected controller_alias_ to be a str, received: {}".format(type(controller_alias_))) - - self.controller_alias = controller_alias_ - self.unknown_fields = unknown_fields - - - -class ProfileInfoResult(Type): - _toSchema = {'application_name': 'application-name', 'error': 'error', 'profile': 'profile', 'revision': 'revision'} - _toPy = {'application-name': 'application_name', 'error': 'error', 'profile': 'profile', 'revision': 'revision'} - def __init__(self, application_name=None, error=None, profile=None, revision=None, **unknown_fields): - ''' - application_name : str - error : Error - profile : CharmLXDProfile - revision : int - ''' - application_name_ = application_name - error_ = Error.from_json(error) if error else None - profile_ = CharmLXDProfile.from_json(profile) if profile else None - revision_ = revision - - # Validate arguments against known Juju API types. - if application_name_ is not None and not isinstance(application_name_, (bytes, str)): - raise Exception("Expected application_name_ to be a str, received: {}".format(type(application_name_))) - - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - - if profile_ is not None and not isinstance(profile_, (dict, CharmLXDProfile)): - raise Exception("Expected profile_ to be a CharmLXDProfile, received: {}".format(type(profile_))) - - if revision_ is not None and not isinstance(revision_, int): - raise Exception("Expected revision_ to be a int, received: {}".format(type(revision_))) - - self.application_name = application_name_ - self.error = error_ - self.profile = profile_ - self.revision = revision_ - self.unknown_fields = unknown_fields - - - -class ProviderInterfaceInfo(Type): - _toSchema = {'interface_name': 'interface-name', 'mac_address': 'mac-address', 'provider_id': 'provider-id'} - _toPy = {'interface-name': 'interface_name', 'mac-address': 'mac_address', 'provider-id': 'provider_id'} - def __init__(self, interface_name=None, mac_address=None, provider_id=None, **unknown_fields): - ''' - interface_name : str - mac_address : str - provider_id : str - ''' - interface_name_ = interface_name - mac_address_ = mac_address - provider_id_ = provider_id - - # Validate arguments against known Juju API types. - if interface_name_ is not None and not isinstance(interface_name_, (bytes, str)): - raise Exception("Expected interface_name_ to be a str, received: {}".format(type(interface_name_))) - - if mac_address_ is not None and not isinstance(mac_address_, (bytes, str)): - raise Exception("Expected mac_address_ to be a str, received: {}".format(type(mac_address_))) - - if provider_id_ is not None and not isinstance(provider_id_, (bytes, str)): - raise Exception("Expected provider_id_ to be a str, received: {}".format(type(provider_id_))) - - self.interface_name = interface_name_ - self.mac_address = mac_address_ - self.provider_id = provider_id_ - self.unknown_fields = unknown_fields - - - -class ProviderInterfaceInfoResult(Type): - _toSchema = {'error': 'error', 'interfaces': 'interfaces', 'machine_tag': 'machine-tag'} - _toPy = {'error': 'error', 'interfaces': 'interfaces', 'machine-tag': 'machine_tag'} - def __init__(self, error=None, interfaces=None, machine_tag=None, **unknown_fields): - ''' - error : Error - interfaces : typing.Sequence[~ProviderInterfaceInfo] - machine_tag : str - ''' - error_ = Error.from_json(error) if error else None - interfaces_ = [ProviderInterfaceInfo.from_json(o) for o in interfaces or []] - machine_tag_ = machine_tag - - # Validate arguments against known Juju API types. - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - - if interfaces_ is not None and not isinstance(interfaces_, (bytes, str, list)): - raise Exception("Expected interfaces_ to be a Sequence, received: {}".format(type(interfaces_))) - - if machine_tag_ is not None and not isinstance(machine_tag_, (bytes, str)): - raise Exception("Expected machine_tag_ to be a str, received: {}".format(type(machine_tag_))) - - self.error = error_ - self.interfaces = interfaces_ - self.machine_tag = machine_tag_ - self.unknown_fields = unknown_fields - - - -class ProviderInterfaceInfoResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None, **unknown_fields): - ''' - results : typing.Sequence[~ProviderInterfaceInfoResult] - ''' - results_ = [ProviderInterfaceInfoResult.from_json(o) for o in results or []] - - # Validate arguments against known Juju API types. - if results_ is not None and not isinstance(results_, (bytes, str, list)): - raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) - - self.results = results_ - self.unknown_fields = unknown_fields - - - -class ProviderNetworkConfig(Type): - _toSchema = {'config': 'config', 'tag': 'tag'} - _toPy = {'config': 'config', 'tag': 'tag'} - def __init__(self, config=None, tag=None, **unknown_fields): - ''' - config : typing.Sequence[~NetworkConfig] - tag : str - ''' - config_ = [NetworkConfig.from_json(o) for o in config or []] - tag_ = tag - - # Validate arguments against known Juju API types. - if config_ is not None and not isinstance(config_, (bytes, str, list)): - raise Exception("Expected config_ to be a Sequence, received: {}".format(type(config_))) - - if tag_ is not None and not isinstance(tag_, (bytes, str)): - raise Exception("Expected tag_ to be a str, received: {}".format(type(tag_))) - - self.config = config_ - self.tag = tag_ - self.unknown_fields = unknown_fields - - - -class ProvisioningInfo(Type): - _toSchema = {'base': 'base', 'charm_lxd_profiles': 'charm-lxd-profiles', 'cloudinit_userdata': 'cloudinit-userdata', 'constraints': 'constraints', 'controller_config': 'controller-config', 'endpoint_bindings': 'endpoint-bindings', 'image_metadata': 'image-metadata', 'jobs': 'jobs', 'placement': 'placement', 'provisioningnetworktopology': 'ProvisioningNetworkTopology', 'root_disk': 'root-disk', 'space_subnets': 'space-subnets', 'subnet_zones': 'subnet-zones', 'tags': 'tags', 'volume_attachments': 'volume-attachments', 'volumes': 'volumes'} - _toPy = {'ProvisioningNetworkTopology': 'provisioningnetworktopology', 'base': 'base', 'charm-lxd-profiles': 'charm_lxd_profiles', 'cloudinit-userdata': 'cloudinit_userdata', 'constraints': 'constraints', 'controller-config': 'controller_config', 'endpoint-bindings': 'endpoint_bindings', 'image-metadata': 'image_metadata', 'jobs': 'jobs', 'placement': 'placement', 'root-disk': 'root_disk', 'space-subnets': 'space_subnets', 'subnet-zones': 'subnet_zones', 'tags': 'tags', 'volume-attachments': 'volume_attachments', 'volumes': 'volumes'} - def __init__(self, provisioningnetworktopology=None, base=None, charm_lxd_profiles=None, cloudinit_userdata=None, constraints=None, controller_config=None, endpoint_bindings=None, image_metadata=None, jobs=None, placement=None, root_disk=None, space_subnets=None, subnet_zones=None, tags=None, volume_attachments=None, volumes=None, **unknown_fields): - ''' - provisioningnetworktopology : ProvisioningNetworkTopology - base : Base - charm_lxd_profiles : typing.Sequence[str] - cloudinit_userdata : typing.Mapping[str, typing.Any] - constraints : Value - controller_config : typing.Mapping[str, typing.Any] - endpoint_bindings : typing.Mapping[str, str] - image_metadata : typing.Sequence[~CloudImageMetadata] - jobs : typing.Sequence[str] - placement : str - root_disk : VolumeParams - space_subnets : typing.Mapping[str, typing.Sequence[str]] - subnet_zones : typing.Mapping[str, typing.Sequence[str]] - tags : typing.Mapping[str, str] - volume_attachments : typing.Sequence[~VolumeAttachmentParams] - volumes : typing.Sequence[~VolumeParams] - ''' - provisioningnetworktopology_ = ProvisioningNetworkTopology.from_json(provisioningnetworktopology) if provisioningnetworktopology else None - base_ = Base.from_json(base) if base else None - charm_lxd_profiles_ = charm_lxd_profiles - cloudinit_userdata_ = cloudinit_userdata - constraints_ = Value.from_json(constraints) if constraints else None - controller_config_ = controller_config - endpoint_bindings_ = endpoint_bindings - image_metadata_ = [CloudImageMetadata.from_json(o) for o in image_metadata or []] - jobs_ = jobs - placement_ = placement - root_disk_ = VolumeParams.from_json(root_disk) if root_disk else None - space_subnets_ = space_subnets - subnet_zones_ = subnet_zones - tags_ = tags - volume_attachments_ = [VolumeAttachmentParams.from_json(o) for o in volume_attachments or []] - volumes_ = [VolumeParams.from_json(o) for o in volumes or []] - - # Validate arguments against known Juju API types. - if provisioningnetworktopology_ is not None and not isinstance(provisioningnetworktopology_, (dict, ProvisioningNetworkTopology)): - raise Exception("Expected provisioningnetworktopology_ to be a ProvisioningNetworkTopology, received: {}".format(type(provisioningnetworktopology_))) - - if base_ is not None and not isinstance(base_, (dict, Base)): - raise Exception("Expected base_ to be a Base, received: {}".format(type(base_))) - - if charm_lxd_profiles_ is not None and not isinstance(charm_lxd_profiles_, (bytes, str, list)): - raise Exception("Expected charm_lxd_profiles_ to be a Sequence, received: {}".format(type(charm_lxd_profiles_))) - - if cloudinit_userdata_ is not None and not isinstance(cloudinit_userdata_, dict): - raise Exception("Expected cloudinit_userdata_ to be a Mapping, received: {}".format(type(cloudinit_userdata_))) - - if constraints_ is not None and not isinstance(constraints_, (dict, Value)): - raise Exception("Expected constraints_ to be a Value, received: {}".format(type(constraints_))) - - if controller_config_ is not None and not isinstance(controller_config_, dict): - raise Exception("Expected controller_config_ to be a Mapping, received: {}".format(type(controller_config_))) - - if endpoint_bindings_ is not None and not isinstance(endpoint_bindings_, dict): - raise Exception("Expected endpoint_bindings_ to be a Mapping, received: {}".format(type(endpoint_bindings_))) - - if image_metadata_ is not None and not isinstance(image_metadata_, (bytes, str, list)): - raise Exception("Expected image_metadata_ to be a Sequence, received: {}".format(type(image_metadata_))) - - if jobs_ is not None and not isinstance(jobs_, (bytes, str, list)): - raise Exception("Expected jobs_ to be a Sequence, received: {}".format(type(jobs_))) - - if placement_ is not None and not isinstance(placement_, (bytes, str)): - raise Exception("Expected placement_ to be a str, received: {}".format(type(placement_))) - - if root_disk_ is not None and not isinstance(root_disk_, (dict, VolumeParams)): - raise Exception("Expected root_disk_ to be a VolumeParams, received: {}".format(type(root_disk_))) - - if space_subnets_ is not None and not isinstance(space_subnets_, dict): - raise Exception("Expected space_subnets_ to be a Mapping, received: {}".format(type(space_subnets_))) - - if subnet_zones_ is not None and not isinstance(subnet_zones_, dict): - raise Exception("Expected subnet_zones_ to be a Mapping, received: {}".format(type(subnet_zones_))) - - if tags_ is not None and not isinstance(tags_, dict): - raise Exception("Expected tags_ to be a Mapping, received: {}".format(type(tags_))) - - if volume_attachments_ is not None and not isinstance(volume_attachments_, (bytes, str, list)): - raise Exception("Expected volume_attachments_ to be a Sequence, received: {}".format(type(volume_attachments_))) - - if volumes_ is not None and not isinstance(volumes_, (bytes, str, list)): - raise Exception("Expected volumes_ to be a Sequence, received: {}".format(type(volumes_))) - - self.provisioningnetworktopology = provisioningnetworktopology_ - self.base = base_ - self.charm_lxd_profiles = charm_lxd_profiles_ - self.cloudinit_userdata = cloudinit_userdata_ - self.constraints = constraints_ - self.controller_config = controller_config_ - self.endpoint_bindings = endpoint_bindings_ - self.image_metadata = image_metadata_ - self.jobs = jobs_ - self.placement = placement_ - self.root_disk = root_disk_ - self.space_subnets = space_subnets_ - self.subnet_zones = subnet_zones_ - self.tags = tags_ - self.volume_attachments = volume_attachments_ - self.volumes = volumes_ - self.unknown_fields = unknown_fields - - - -class ProvisioningInfoResult(Type): - _toSchema = {'error': 'error', 'result': 'result'} - _toPy = {'error': 'error', 'result': 'result'} - def __init__(self, error=None, result=None, **unknown_fields): - ''' - error : Error - result : ProvisioningInfo - ''' - error_ = Error.from_json(error) if error else None - result_ = ProvisioningInfo.from_json(result) if result else None - - # Validate arguments against known Juju API types. - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - - if result_ is not None and not isinstance(result_, (dict, ProvisioningInfo)): - raise Exception("Expected result_ to be a ProvisioningInfo, received: {}".format(type(result_))) - - self.error = error_ - self.result = result_ - self.unknown_fields = unknown_fields - - - -class ProvisioningInfoResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None, **unknown_fields): - ''' - results : typing.Sequence[~ProvisioningInfoResult] - ''' - results_ = [ProvisioningInfoResult.from_json(o) for o in results or []] - - # Validate arguments against known Juju API types. - if results_ is not None and not isinstance(results_, (bytes, str, list)): - raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) - - self.results = results_ - self.unknown_fields = unknown_fields - - - -class ProvisioningNetworkTopology(Type): - _toSchema = {'space_subnets': 'space-subnets', 'subnet_zones': 'subnet-zones'} - _toPy = {'space-subnets': 'space_subnets', 'subnet-zones': 'subnet_zones'} - def __init__(self, space_subnets=None, subnet_zones=None, **unknown_fields): - ''' - space_subnets : typing.Mapping[str, typing.Sequence[str]] - subnet_zones : typing.Mapping[str, typing.Sequence[str]] - ''' - space_subnets_ = space_subnets - subnet_zones_ = subnet_zones - - # Validate arguments against known Juju API types. - if space_subnets_ is not None and not isinstance(space_subnets_, dict): - raise Exception("Expected space_subnets_ to be a Mapping, received: {}".format(type(space_subnets_))) - - if subnet_zones_ is not None and not isinstance(subnet_zones_, dict): - raise Exception("Expected subnet_zones_ to be a Mapping, received: {}".format(type(subnet_zones_))) - - self.space_subnets = space_subnets_ - self.subnet_zones = subnet_zones_ - self.unknown_fields = unknown_fields - - - -class ProvisioningScriptParams(Type): - _toSchema = {'data_dir': 'data-dir', 'disable_package_commands': 'disable-package-commands', 'machine_id': 'machine-id', 'nonce': 'nonce'} - _toPy = {'data-dir': 'data_dir', 'disable-package-commands': 'disable_package_commands', 'machine-id': 'machine_id', 'nonce': 'nonce'} - def __init__(self, data_dir=None, disable_package_commands=None, machine_id=None, nonce=None, **unknown_fields): - ''' - data_dir : str - disable_package_commands : bool - machine_id : str - nonce : str - ''' - data_dir_ = data_dir - disable_package_commands_ = disable_package_commands - machine_id_ = machine_id - nonce_ = nonce - - # Validate arguments against known Juju API types. - if data_dir_ is not None and not isinstance(data_dir_, (bytes, str)): - raise Exception("Expected data_dir_ to be a str, received: {}".format(type(data_dir_))) - - if disable_package_commands_ is not None and not isinstance(disable_package_commands_, bool): - raise Exception("Expected disable_package_commands_ to be a bool, received: {}".format(type(disable_package_commands_))) - - if machine_id_ is not None and not isinstance(machine_id_, (bytes, str)): - raise Exception("Expected machine_id_ to be a str, received: {}".format(type(machine_id_))) - - if nonce_ is not None and not isinstance(nonce_, (bytes, str)): - raise Exception("Expected nonce_ to be a str, received: {}".format(type(nonce_))) - - self.data_dir = data_dir_ - self.disable_package_commands = disable_package_commands_ - self.machine_id = machine_id_ - self.nonce = nonce_ - self.unknown_fields = unknown_fields - - - -class ProvisioningScriptResult(Type): - _toSchema = {'script': 'script'} - _toPy = {'script': 'script'} - def __init__(self, script=None, **unknown_fields): - ''' - script : str - ''' - script_ = script - - # Validate arguments against known Juju API types. - if script_ is not None and not isinstance(script_, (bytes, str)): - raise Exception("Expected script_ to be a str, received: {}".format(type(script_))) - - self.script = script_ - self.unknown_fields = unknown_fields - - - -class Proxy(Type): - _toSchema = {'config': 'config', 'type_': 'type'} - _toPy = {'config': 'config', 'type': 'type_'} - def __init__(self, config=None, type_=None, **unknown_fields): - ''' - config : typing.Mapping[str, typing.Any] - type_ : str - ''' - config_ = config - type__ = type_ - - # Validate arguments against known Juju API types. - if config_ is not None and not isinstance(config_, dict): - raise Exception("Expected config_ to be a Mapping, received: {}".format(type(config_))) - - if type__ is not None and not isinstance(type__, (bytes, str)): - raise Exception("Expected type__ to be a str, received: {}".format(type(type__))) - - self.config = config_ - self.type_ = type__ - self.unknown_fields = unknown_fields - - - -class ProxyConfig(Type): - _toSchema = {'ftp': 'ftp', 'http': 'http', 'https': 'https', 'no_proxy': 'no-proxy'} - _toPy = {'ftp': 'ftp', 'http': 'http', 'https': 'https', 'no-proxy': 'no_proxy'} - def __init__(self, ftp=None, http=None, https=None, no_proxy=None, **unknown_fields): - ''' - ftp : str - http : str - https : str - no_proxy : str - ''' - ftp_ = ftp - http_ = http - https_ = https - no_proxy_ = no_proxy - - # Validate arguments against known Juju API types. - if ftp_ is not None and not isinstance(ftp_, (bytes, str)): - raise Exception("Expected ftp_ to be a str, received: {}".format(type(ftp_))) - - if http_ is not None and not isinstance(http_, (bytes, str)): - raise Exception("Expected http_ to be a str, received: {}".format(type(http_))) - - if https_ is not None and not isinstance(https_, (bytes, str)): - raise Exception("Expected https_ to be a str, received: {}".format(type(https_))) - - if no_proxy_ is not None and not isinstance(no_proxy_, (bytes, str)): - raise Exception("Expected no_proxy_ to be a str, received: {}".format(type(no_proxy_))) - - self.ftp = ftp_ - self.http = http_ - self.https = https_ - self.no_proxy = no_proxy_ - self.unknown_fields = unknown_fields - - - -class ProxyConfigResult(Type): - _toSchema = {'apt_mirror': 'apt-mirror', 'apt_proxy_settings': 'apt-proxy-settings', 'error': 'error', 'juju_proxy_settings': 'juju-proxy-settings', 'legacy_proxy_settings': 'legacy-proxy-settings', 'snap_proxy_settings': 'snap-proxy-settings', 'snap_store_assertions': 'snap-store-assertions', 'snap_store_id': 'snap-store-id', 'snap_store_proxy_url': 'snap-store-proxy-url'} - _toPy = {'apt-mirror': 'apt_mirror', 'apt-proxy-settings': 'apt_proxy_settings', 'error': 'error', 'juju-proxy-settings': 'juju_proxy_settings', 'legacy-proxy-settings': 'legacy_proxy_settings', 'snap-proxy-settings': 'snap_proxy_settings', 'snap-store-assertions': 'snap_store_assertions', 'snap-store-id': 'snap_store_id', 'snap-store-proxy-url': 'snap_store_proxy_url'} - def __init__(self, apt_mirror=None, apt_proxy_settings=None, error=None, juju_proxy_settings=None, legacy_proxy_settings=None, snap_proxy_settings=None, snap_store_assertions=None, snap_store_id=None, snap_store_proxy_url=None, **unknown_fields): - ''' - apt_mirror : str - apt_proxy_settings : ProxyConfig - error : Error - juju_proxy_settings : ProxyConfig - legacy_proxy_settings : ProxyConfig - snap_proxy_settings : ProxyConfig - snap_store_assertions : str - snap_store_id : str - snap_store_proxy_url : str - ''' - apt_mirror_ = apt_mirror - apt_proxy_settings_ = ProxyConfig.from_json(apt_proxy_settings) if apt_proxy_settings else None - error_ = Error.from_json(error) if error else None - juju_proxy_settings_ = ProxyConfig.from_json(juju_proxy_settings) if juju_proxy_settings else None - legacy_proxy_settings_ = ProxyConfig.from_json(legacy_proxy_settings) if legacy_proxy_settings else None - snap_proxy_settings_ = ProxyConfig.from_json(snap_proxy_settings) if snap_proxy_settings else None - snap_store_assertions_ = snap_store_assertions - snap_store_id_ = snap_store_id - snap_store_proxy_url_ = snap_store_proxy_url - - # Validate arguments against known Juju API types. - if apt_mirror_ is not None and not isinstance(apt_mirror_, (bytes, str)): - raise Exception("Expected apt_mirror_ to be a str, received: {}".format(type(apt_mirror_))) - - if apt_proxy_settings_ is not None and not isinstance(apt_proxy_settings_, (dict, ProxyConfig)): - raise Exception("Expected apt_proxy_settings_ to be a ProxyConfig, received: {}".format(type(apt_proxy_settings_))) - - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - - if juju_proxy_settings_ is not None and not isinstance(juju_proxy_settings_, (dict, ProxyConfig)): - raise Exception("Expected juju_proxy_settings_ to be a ProxyConfig, received: {}".format(type(juju_proxy_settings_))) - - if legacy_proxy_settings_ is not None and not isinstance(legacy_proxy_settings_, (dict, ProxyConfig)): - raise Exception("Expected legacy_proxy_settings_ to be a ProxyConfig, received: {}".format(type(legacy_proxy_settings_))) - - if snap_proxy_settings_ is not None and not isinstance(snap_proxy_settings_, (dict, ProxyConfig)): - raise Exception("Expected snap_proxy_settings_ to be a ProxyConfig, received: {}".format(type(snap_proxy_settings_))) - - if snap_store_assertions_ is not None and not isinstance(snap_store_assertions_, (bytes, str)): - raise Exception("Expected snap_store_assertions_ to be a str, received: {}".format(type(snap_store_assertions_))) - - if snap_store_id_ is not None and not isinstance(snap_store_id_, (bytes, str)): - raise Exception("Expected snap_store_id_ to be a str, received: {}".format(type(snap_store_id_))) - - if snap_store_proxy_url_ is not None and not isinstance(snap_store_proxy_url_, (bytes, str)): - raise Exception("Expected snap_store_proxy_url_ to be a str, received: {}".format(type(snap_store_proxy_url_))) - - self.apt_mirror = apt_mirror_ - self.apt_proxy_settings = apt_proxy_settings_ - self.error = error_ - self.juju_proxy_settings = juju_proxy_settings_ - self.legacy_proxy_settings = legacy_proxy_settings_ - self.snap_proxy_settings = snap_proxy_settings_ - self.snap_store_assertions = snap_store_assertions_ - self.snap_store_id = snap_store_id_ - self.snap_store_proxy_url = snap_store_proxy_url_ - self.unknown_fields = unknown_fields - - - -class ProxyConfigResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None, **unknown_fields): - ''' - results : typing.Sequence[~ProxyConfigResult] - ''' - results_ = [ProxyConfigResult.from_json(o) for o in results or []] - - # Validate arguments against known Juju API types. - if results_ is not None and not isinstance(results_, (bytes, str, list)): - raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) - - self.results = results_ - self.unknown_fields = unknown_fields - - - -class QueryApplicationOffersResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None, **unknown_fields): - ''' - results : typing.Sequence[~ApplicationOfferAdminDetails] - ''' - results_ = [ApplicationOfferAdminDetails.from_json(o) for o in results or []] - - # Validate arguments against known Juju API types. - if results_ is not None and not isinstance(results_, (bytes, str, list)): - raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) - - self.results = results_ - self.unknown_fields = unknown_fields - - - -class RebootActionResult(Type): - _toSchema = {'error': 'error', 'result': 'result'} - _toPy = {'error': 'error', 'result': 'result'} - def __init__(self, error=None, result=None, **unknown_fields): - ''' - error : Error - result : str - ''' - error_ = Error.from_json(error) if error else None - result_ = result - - # Validate arguments against known Juju API types. - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - - if result_ is not None and not isinstance(result_, (bytes, str)): - raise Exception("Expected result_ to be a str, received: {}".format(type(result_))) - - self.error = error_ - self.result = result_ - self.unknown_fields = unknown_fields - - - -class RebootActionResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None, **unknown_fields): - ''' - results : typing.Sequence[~RebootActionResult] - ''' - results_ = [RebootActionResult.from_json(o) for o in results or []] - - # Validate arguments against known Juju API types. - if results_ is not None and not isinstance(results_, (bytes, str, list)): - raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) - - self.results = results_ - self.unknown_fields = unknown_fields - - - -class RecordAgentStartInformationArg(Type): - _toSchema = {'hostname': 'hostname', 'tag': 'tag'} - _toPy = {'hostname': 'hostname', 'tag': 'tag'} - def __init__(self, hostname=None, tag=None, **unknown_fields): - ''' - hostname : str - tag : str - ''' - hostname_ = hostname - tag_ = tag - - # Validate arguments against known Juju API types. - if hostname_ is not None and not isinstance(hostname_, (bytes, str)): - raise Exception("Expected hostname_ to be a str, received: {}".format(type(hostname_))) - - if tag_ is not None and not isinstance(tag_, (bytes, str)): - raise Exception("Expected tag_ to be a str, received: {}".format(type(tag_))) - - self.hostname = hostname_ - self.tag = tag_ - self.unknown_fields = unknown_fields - - - -class RecordAgentStartInformationArgs(Type): - _toSchema = {'args': 'args'} - _toPy = {'args': 'args'} - def __init__(self, args=None, **unknown_fields): - ''' - args : typing.Sequence[~RecordAgentStartInformationArg] - ''' - args_ = [RecordAgentStartInformationArg.from_json(o) for o in args or []] - - # Validate arguments against known Juju API types. - if args_ is not None and not isinstance(args_, (bytes, str, list)): - raise Exception("Expected args_ to be a Sequence, received: {}".format(type(args_))) - - self.args = args_ - self.unknown_fields = unknown_fields - - - -class RedirectInfoResult(Type): - _toSchema = {'ca_cert': 'ca-cert', 'servers': 'servers'} - _toPy = {'ca-cert': 'ca_cert', 'servers': 'servers'} - def __init__(self, ca_cert=None, servers=None, **unknown_fields): - ''' - ca_cert : str - servers : typing.Sequence[~HostPort] - ''' - ca_cert_ = ca_cert - servers_ = [HostPort.from_json(o) for o in servers or []] - - # Validate arguments against known Juju API types. - if ca_cert_ is not None and not isinstance(ca_cert_, (bytes, str)): - raise Exception("Expected ca_cert_ to be a str, received: {}".format(type(ca_cert_))) - - if servers_ is not None and not isinstance(servers_, (bytes, str, list)): - raise Exception("Expected servers_ to be a Sequence, received: {}".format(type(servers_))) - - self.ca_cert = ca_cert_ - self.servers = servers_ - self.unknown_fields = unknown_fields - - - -class RegionDefaults(Type): - _toSchema = {'region_name': 'region-name', 'value': 'value'} - _toPy = {'region-name': 'region_name', 'value': 'value'} - def __init__(self, region_name=None, value=None, **unknown_fields): - ''' - region_name : str - value : Any - ''' - region_name_ = region_name - value_ = value - - # Validate arguments against known Juju API types. - if region_name_ is not None and not isinstance(region_name_, (bytes, str)): - raise Exception("Expected region_name_ to be a str, received: {}".format(type(region_name_))) - - self.region_name = region_name_ - self.value = value_ - self.unknown_fields = unknown_fields - - - -class RegisterRemoteRelationArg(Type): - _toSchema = {'application_token': 'application-token', 'bakery_version': 'bakery-version', 'consume_version': 'consume-version', 'local_endpoint_name': 'local-endpoint-name', 'macaroons': 'macaroons', 'offer_uuid': 'offer-uuid', 'relation_token': 'relation-token', 'remote_endpoint': 'remote-endpoint', 'remote_space': 'remote-space', 'source_model_tag': 'source-model-tag'} - _toPy = {'application-token': 'application_token', 'bakery-version': 'bakery_version', 'consume-version': 'consume_version', 'local-endpoint-name': 'local_endpoint_name', 'macaroons': 'macaroons', 'offer-uuid': 'offer_uuid', 'relation-token': 'relation_token', 'remote-endpoint': 'remote_endpoint', 'remote-space': 'remote_space', 'source-model-tag': 'source_model_tag'} - def __init__(self, application_token=None, bakery_version=None, consume_version=None, local_endpoint_name=None, macaroons=None, offer_uuid=None, relation_token=None, remote_endpoint=None, remote_space=None, source_model_tag=None, **unknown_fields): - ''' - application_token : str - bakery_version : int - consume_version : int - local_endpoint_name : str - macaroons : typing.Sequence[~Macaroon] - offer_uuid : str - relation_token : str - remote_endpoint : RemoteEndpoint - remote_space : RemoteSpace - source_model_tag : str - ''' - application_token_ = application_token - bakery_version_ = bakery_version - consume_version_ = consume_version - local_endpoint_name_ = local_endpoint_name - macaroons_ = [Macaroon.from_json(o) for o in macaroons or []] - offer_uuid_ = offer_uuid - relation_token_ = relation_token - remote_endpoint_ = RemoteEndpoint.from_json(remote_endpoint) if remote_endpoint else None - remote_space_ = RemoteSpace.from_json(remote_space) if remote_space else None - source_model_tag_ = source_model_tag - - # Validate arguments against known Juju API types. - if application_token_ is not None and not isinstance(application_token_, (bytes, str)): - raise Exception("Expected application_token_ to be a str, received: {}".format(type(application_token_))) - - if bakery_version_ is not None and not isinstance(bakery_version_, int): - raise Exception("Expected bakery_version_ to be a int, received: {}".format(type(bakery_version_))) - - if consume_version_ is not None and not isinstance(consume_version_, int): - raise Exception("Expected consume_version_ to be a int, received: {}".format(type(consume_version_))) - - if local_endpoint_name_ is not None and not isinstance(local_endpoint_name_, (bytes, str)): - raise Exception("Expected local_endpoint_name_ to be a str, received: {}".format(type(local_endpoint_name_))) - - if macaroons_ is not None and not isinstance(macaroons_, (bytes, str, list)): - raise Exception("Expected macaroons_ to be a Sequence, received: {}".format(type(macaroons_))) - - if offer_uuid_ is not None and not isinstance(offer_uuid_, (bytes, str)): - raise Exception("Expected offer_uuid_ to be a str, received: {}".format(type(offer_uuid_))) - - if relation_token_ is not None and not isinstance(relation_token_, (bytes, str)): - raise Exception("Expected relation_token_ to be a str, received: {}".format(type(relation_token_))) - - if remote_endpoint_ is not None and not isinstance(remote_endpoint_, (dict, RemoteEndpoint)): - raise Exception("Expected remote_endpoint_ to be a RemoteEndpoint, received: {}".format(type(remote_endpoint_))) - - if remote_space_ is not None and not isinstance(remote_space_, (dict, RemoteSpace)): - raise Exception("Expected remote_space_ to be a RemoteSpace, received: {}".format(type(remote_space_))) - - if source_model_tag_ is not None and not isinstance(source_model_tag_, (bytes, str)): - raise Exception("Expected source_model_tag_ to be a str, received: {}".format(type(source_model_tag_))) - - self.application_token = application_token_ - self.bakery_version = bakery_version_ - self.consume_version = consume_version_ - self.local_endpoint_name = local_endpoint_name_ - self.macaroons = macaroons_ - self.offer_uuid = offer_uuid_ - self.relation_token = relation_token_ - self.remote_endpoint = remote_endpoint_ - self.remote_space = remote_space_ - self.source_model_tag = source_model_tag_ - self.unknown_fields = unknown_fields - - - -class RegisterRemoteRelationArgs(Type): - _toSchema = {'relations': 'relations'} - _toPy = {'relations': 'relations'} - def __init__(self, relations=None, **unknown_fields): - ''' - relations : typing.Sequence[~RegisterRemoteRelationArg] - ''' - relations_ = [RegisterRemoteRelationArg.from_json(o) for o in relations or []] - - # Validate arguments against known Juju API types. - if relations_ is not None and not isinstance(relations_, (bytes, str, list)): - raise Exception("Expected relations_ to be a Sequence, received: {}".format(type(relations_))) - - self.relations = relations_ - self.unknown_fields = unknown_fields - - - -class RegisterRemoteRelationResult(Type): - _toSchema = {'error': 'error', 'result': 'result'} - _toPy = {'error': 'error', 'result': 'result'} - def __init__(self, error=None, result=None, **unknown_fields): - ''' - error : Error - result : RemoteRelationDetails - ''' - error_ = Error.from_json(error) if error else None - result_ = RemoteRelationDetails.from_json(result) if result else None - - # Validate arguments against known Juju API types. - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - - if result_ is not None and not isinstance(result_, (dict, RemoteRelationDetails)): - raise Exception("Expected result_ to be a RemoteRelationDetails, received: {}".format(type(result_))) - - self.error = error_ - self.result = result_ - self.unknown_fields = unknown_fields - - - -class RegisterRemoteRelationResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None, **unknown_fields): - ''' - results : typing.Sequence[~RegisterRemoteRelationResult] - ''' - results_ = [RegisterRemoteRelationResult.from_json(o) for o in results or []] - - # Validate arguments against known Juju API types. - if results_ is not None and not isinstance(results_, (bytes, str, list)): - raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) - - self.results = results_ - self.unknown_fields = unknown_fields - - - -class RelationData(Type): - _toSchema = {'inscope': 'InScope', 'unitdata': 'UnitData'} - _toPy = {'InScope': 'inscope', 'UnitData': 'unitdata'} - def __init__(self, inscope=None, unitdata=None, **unknown_fields): - ''' - inscope : bool - unitdata : typing.Mapping[str, typing.Any] - ''' - inscope_ = inscope - unitdata_ = unitdata - - # Validate arguments against known Juju API types. - if inscope_ is not None and not isinstance(inscope_, bool): - raise Exception("Expected inscope_ to be a bool, received: {}".format(type(inscope_))) - - if unitdata_ is not None and not isinstance(unitdata_, dict): - raise Exception("Expected unitdata_ to be a Mapping, received: {}".format(type(unitdata_))) - - self.inscope = inscope_ - self.unitdata = unitdata_ - self.unknown_fields = unknown_fields - - - -class RelationIds(Type): - _toSchema = {'relation_ids': 'relation-ids'} - _toPy = {'relation-ids': 'relation_ids'} - def __init__(self, relation_ids=None, **unknown_fields): - ''' - relation_ids : typing.Sequence[int] - ''' - relation_ids_ = relation_ids - - # Validate arguments against known Juju API types. - if relation_ids_ is not None and not isinstance(relation_ids_, (bytes, str, list)): - raise Exception("Expected relation_ids_ to be a Sequence, received: {}".format(type(relation_ids_))) - - self.relation_ids = relation_ids_ - self.unknown_fields = unknown_fields - - - -class RelationLifeSuspendedStatusChange(Type): - _toSchema = {'key': 'key', 'life': 'life', 'suspended': 'suspended', 'suspended_reason': 'suspended-reason'} - _toPy = {'key': 'key', 'life': 'life', 'suspended': 'suspended', 'suspended-reason': 'suspended_reason'} - def __init__(self, key=None, life=None, suspended=None, suspended_reason=None, **unknown_fields): - ''' - key : str - life : str - suspended : bool - suspended_reason : str - ''' - key_ = key - life_ = life - suspended_ = suspended - suspended_reason_ = suspended_reason - - # Validate arguments against known Juju API types. - if key_ is not None and not isinstance(key_, (bytes, str)): - raise Exception("Expected key_ to be a str, received: {}".format(type(key_))) - - if life_ is not None and not isinstance(life_, (bytes, str)): - raise Exception("Expected life_ to be a str, received: {}".format(type(life_))) - - if suspended_ is not None and not isinstance(suspended_, bool): - raise Exception("Expected suspended_ to be a bool, received: {}".format(type(suspended_))) - - if suspended_reason_ is not None and not isinstance(suspended_reason_, (bytes, str)): - raise Exception("Expected suspended_reason_ to be a str, received: {}".format(type(suspended_reason_))) - - self.key = key_ - self.life = life_ - self.suspended = suspended_ - self.suspended_reason = suspended_reason_ - self.unknown_fields = unknown_fields - - - -class RelationLifeSuspendedStatusWatchResult(Type): - _toSchema = {'changes': 'changes', 'error': 'error', 'watcher_id': 'watcher-id'} - _toPy = {'changes': 'changes', 'error': 'error', 'watcher-id': 'watcher_id'} - def __init__(self, changes=None, error=None, watcher_id=None, **unknown_fields): - ''' - changes : typing.Sequence[~RelationLifeSuspendedStatusChange] - error : Error - watcher_id : str - ''' - changes_ = [RelationLifeSuspendedStatusChange.from_json(o) for o in changes or []] - error_ = Error.from_json(error) if error else None - watcher_id_ = watcher_id - - # Validate arguments against known Juju API types. - if changes_ is not None and not isinstance(changes_, (bytes, str, list)): - raise Exception("Expected changes_ to be a Sequence, received: {}".format(type(changes_))) - - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - - if watcher_id_ is not None and not isinstance(watcher_id_, (bytes, str)): - raise Exception("Expected watcher_id_ to be a str, received: {}".format(type(watcher_id_))) - - self.changes = changes_ - self.error = error_ - self.watcher_id = watcher_id_ - self.unknown_fields = unknown_fields - - - -class RelationResult(Type): - _toSchema = {'bool_': 'bool', 'endpoint': 'endpoint', 'error': 'error', 'id_': 'id', 'key': 'key', 'life': 'life', 'other_application': 'other-application'} - _toPy = {'bool': 'bool_', 'endpoint': 'endpoint', 'error': 'error', 'id': 'id_', 'key': 'key', 'life': 'life', 'other-application': 'other_application'} - def __init__(self, bool_=None, endpoint=None, error=None, id_=None, key=None, life=None, other_application=None, **unknown_fields): - ''' - bool_ : bool - endpoint : Endpoint - error : Error - id_ : int - key : str - life : str - other_application : str - ''' - bool__ = bool_ - endpoint_ = Endpoint.from_json(endpoint) if endpoint else None - error_ = Error.from_json(error) if error else None - id__ = id_ - key_ = key - life_ = life - other_application_ = other_application - - # Validate arguments against known Juju API types. - if bool__ is not None and not isinstance(bool__, bool): - raise Exception("Expected bool__ to be a bool, received: {}".format(type(bool__))) - - if endpoint_ is not None and not isinstance(endpoint_, (dict, Endpoint)): - raise Exception("Expected endpoint_ to be a Endpoint, received: {}".format(type(endpoint_))) - - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - - if id__ is not None and not isinstance(id__, int): - raise Exception("Expected id__ to be a int, received: {}".format(type(id__))) - - if key_ is not None and not isinstance(key_, (bytes, str)): - raise Exception("Expected key_ to be a str, received: {}".format(type(key_))) - - if life_ is not None and not isinstance(life_, (bytes, str)): - raise Exception("Expected life_ to be a str, received: {}".format(type(life_))) - - if other_application_ is not None and not isinstance(other_application_, (bytes, str)): - raise Exception("Expected other_application_ to be a str, received: {}".format(type(other_application_))) - - self.bool_ = bool__ - self.endpoint = endpoint_ - self.error = error_ - self.id_ = id__ - self.key = key_ - self.life = life_ - self.other_application = other_application_ - self.unknown_fields = unknown_fields - - - -class RelationResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None, **unknown_fields): - ''' - results : typing.Sequence[~RelationResult] - ''' - results_ = [RelationResult.from_json(o) for o in results or []] - - # Validate arguments against known Juju API types. - if results_ is not None and not isinstance(results_, (bytes, str, list)): - raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) - - self.results = results_ - self.unknown_fields = unknown_fields - - - -class RelationStatus(Type): - _toSchema = {'endpoints': 'endpoints', 'id_': 'id', 'interface': 'interface', 'key': 'key', 'scope': 'scope', 'status': 'status'} - _toPy = {'endpoints': 'endpoints', 'id': 'id_', 'interface': 'interface', 'key': 'key', 'scope': 'scope', 'status': 'status'} - def __init__(self, endpoints=None, id_=None, interface=None, key=None, scope=None, status=None, **unknown_fields): - ''' - endpoints : typing.Sequence[~EndpointStatus] - id_ : int - interface : str - key : str - scope : str - status : DetailedStatus - ''' - endpoints_ = [EndpointStatus.from_json(o) for o in endpoints or []] - id__ = id_ - interface_ = interface - key_ = key - scope_ = scope - status_ = DetailedStatus.from_json(status) if status else None - - # Validate arguments against known Juju API types. - if endpoints_ is not None and not isinstance(endpoints_, (bytes, str, list)): - raise Exception("Expected endpoints_ to be a Sequence, received: {}".format(type(endpoints_))) - - if id__ is not None and not isinstance(id__, int): - raise Exception("Expected id__ to be a int, received: {}".format(type(id__))) - - if interface_ is not None and not isinstance(interface_, (bytes, str)): - raise Exception("Expected interface_ to be a str, received: {}".format(type(interface_))) - - if key_ is not None and not isinstance(key_, (bytes, str)): - raise Exception("Expected key_ to be a str, received: {}".format(type(key_))) - - if scope_ is not None and not isinstance(scope_, (bytes, str)): - raise Exception("Expected scope_ to be a str, received: {}".format(type(scope_))) - - if status_ is not None and not isinstance(status_, (dict, DetailedStatus)): - raise Exception("Expected status_ to be a DetailedStatus, received: {}".format(type(status_))) - - self.endpoints = endpoints_ - self.id_ = id__ - self.interface = interface_ - self.key = key_ - self.scope = scope_ - self.status = status_ - self.unknown_fields = unknown_fields - - - -class RelationStatusArg(Type): - _toSchema = {'message': 'message', 'relation_id': 'relation-id', 'status': 'status', 'unit_tag': 'unit-tag'} - _toPy = {'message': 'message', 'relation-id': 'relation_id', 'status': 'status', 'unit-tag': 'unit_tag'} - def __init__(self, message=None, relation_id=None, status=None, unit_tag=None, **unknown_fields): - ''' - message : str - relation_id : int - status : str - unit_tag : str - ''' - message_ = message - relation_id_ = relation_id - status_ = status - unit_tag_ = unit_tag - - # Validate arguments against known Juju API types. - if message_ is not None and not isinstance(message_, (bytes, str)): - raise Exception("Expected message_ to be a str, received: {}".format(type(message_))) - - if relation_id_ is not None and not isinstance(relation_id_, int): - raise Exception("Expected relation_id_ to be a int, received: {}".format(type(relation_id_))) - - if status_ is not None and not isinstance(status_, (bytes, str)): - raise Exception("Expected status_ to be a str, received: {}".format(type(status_))) - - if unit_tag_ is not None and not isinstance(unit_tag_, (bytes, str)): - raise Exception("Expected unit_tag_ to be a str, received: {}".format(type(unit_tag_))) - - self.message = message_ - self.relation_id = relation_id_ - self.status = status_ - self.unit_tag = unit_tag_ - self.unknown_fields = unknown_fields - - - -class RelationStatusArgs(Type): - _toSchema = {'args': 'args'} - _toPy = {'args': 'args'} - def __init__(self, args=None, **unknown_fields): - ''' - args : typing.Sequence[~RelationStatusArg] - ''' - args_ = [RelationStatusArg.from_json(o) for o in args or []] - - # Validate arguments against known Juju API types. - if args_ is not None and not isinstance(args_, (bytes, str, list)): - raise Exception("Expected args_ to be a Sequence, received: {}".format(type(args_))) - - self.args = args_ - self.unknown_fields = unknown_fields - - - -class RelationStatusWatchResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None, **unknown_fields): - ''' - results : typing.Sequence[~RelationLifeSuspendedStatusWatchResult] - ''' - results_ = [RelationLifeSuspendedStatusWatchResult.from_json(o) for o in results or []] - - # Validate arguments against known Juju API types. - if results_ is not None and not isinstance(results_, (bytes, str, list)): - raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) - - self.results = results_ - self.unknown_fields = unknown_fields - - - -class RelationSuspendedArg(Type): - _toSchema = {'message': 'message', 'relation_id': 'relation-id', 'suspended': 'suspended'} - _toPy = {'message': 'message', 'relation-id': 'relation_id', 'suspended': 'suspended'} - def __init__(self, message=None, relation_id=None, suspended=None, **unknown_fields): - ''' - message : str - relation_id : int - suspended : bool - ''' - message_ = message - relation_id_ = relation_id - suspended_ = suspended - - # Validate arguments against known Juju API types. - if message_ is not None and not isinstance(message_, (bytes, str)): - raise Exception("Expected message_ to be a str, received: {}".format(type(message_))) - - if relation_id_ is not None and not isinstance(relation_id_, int): - raise Exception("Expected relation_id_ to be a int, received: {}".format(type(relation_id_))) - - if suspended_ is not None and not isinstance(suspended_, bool): - raise Exception("Expected suspended_ to be a bool, received: {}".format(type(suspended_))) - - self.message = message_ - self.relation_id = relation_id_ - self.suspended = suspended_ - self.unknown_fields = unknown_fields - - - -class RelationSuspendedArgs(Type): - _toSchema = {'args': 'args'} - _toPy = {'args': 'args'} - def __init__(self, args=None, **unknown_fields): - ''' - args : typing.Sequence[~RelationSuspendedArg] - ''' - args_ = [RelationSuspendedArg.from_json(o) for o in args or []] - - # Validate arguments against known Juju API types. - if args_ is not None and not isinstance(args_, (bytes, str, list)): - raise Exception("Expected args_ to be a Sequence, received: {}".format(type(args_))) - - self.args = args_ - self.unknown_fields = unknown_fields - - - -class RelationUnit(Type): - _toSchema = {'relation': 'relation', 'unit': 'unit'} - _toPy = {'relation': 'relation', 'unit': 'unit'} - def __init__(self, relation=None, unit=None, **unknown_fields): - ''' - relation : str - unit : str - ''' - relation_ = relation - unit_ = unit - - # Validate arguments against known Juju API types. - if relation_ is not None and not isinstance(relation_, (bytes, str)): - raise Exception("Expected relation_ to be a str, received: {}".format(type(relation_))) - - if unit_ is not None and not isinstance(unit_, (bytes, str)): - raise Exception("Expected unit_ to be a str, received: {}".format(type(unit_))) - - self.relation = relation_ - self.unit = unit_ - self.unknown_fields = unknown_fields - - - -class RelationUnitPair(Type): - _toSchema = {'local_unit': 'local-unit', 'relation': 'relation', 'remote_unit': 'remote-unit'} - _toPy = {'local-unit': 'local_unit', 'relation': 'relation', 'remote-unit': 'remote_unit'} - def __init__(self, local_unit=None, relation=None, remote_unit=None, **unknown_fields): - ''' - local_unit : str - relation : str - remote_unit : str - ''' - local_unit_ = local_unit - relation_ = relation - remote_unit_ = remote_unit - - # Validate arguments against known Juju API types. - if local_unit_ is not None and not isinstance(local_unit_, (bytes, str)): - raise Exception("Expected local_unit_ to be a str, received: {}".format(type(local_unit_))) - - if relation_ is not None and not isinstance(relation_, (bytes, str)): - raise Exception("Expected relation_ to be a str, received: {}".format(type(relation_))) - - if remote_unit_ is not None and not isinstance(remote_unit_, (bytes, str)): - raise Exception("Expected remote_unit_ to be a str, received: {}".format(type(remote_unit_))) - - self.local_unit = local_unit_ - self.relation = relation_ - self.remote_unit = remote_unit_ - self.unknown_fields = unknown_fields - - - -class RelationUnitPairs(Type): - _toSchema = {'relation_unit_pairs': 'relation-unit-pairs'} - _toPy = {'relation-unit-pairs': 'relation_unit_pairs'} - def __init__(self, relation_unit_pairs=None, **unknown_fields): - ''' - relation_unit_pairs : typing.Sequence[~RelationUnitPair] - ''' - relation_unit_pairs_ = [RelationUnitPair.from_json(o) for o in relation_unit_pairs or []] - - # Validate arguments against known Juju API types. - if relation_unit_pairs_ is not None and not isinstance(relation_unit_pairs_, (bytes, str, list)): - raise Exception("Expected relation_unit_pairs_ to be a Sequence, received: {}".format(type(relation_unit_pairs_))) - - self.relation_unit_pairs = relation_unit_pairs_ - self.unknown_fields = unknown_fields - - - -class RelationUnitSettings(Type): - _toSchema = {'application_settings': 'application-settings', 'relation': 'relation', 'settings': 'settings', 'unit': 'unit'} - _toPy = {'application-settings': 'application_settings', 'relation': 'relation', 'settings': 'settings', 'unit': 'unit'} - def __init__(self, application_settings=None, relation=None, settings=None, unit=None, **unknown_fields): - ''' - application_settings : typing.Mapping[str, str] - relation : str - settings : typing.Mapping[str, str] - unit : str - ''' - application_settings_ = application_settings - relation_ = relation - settings_ = settings - unit_ = unit - - # Validate arguments against known Juju API types. - if application_settings_ is not None and not isinstance(application_settings_, dict): - raise Exception("Expected application_settings_ to be a Mapping, received: {}".format(type(application_settings_))) - - if relation_ is not None and not isinstance(relation_, (bytes, str)): - raise Exception("Expected relation_ to be a str, received: {}".format(type(relation_))) - - if settings_ is not None and not isinstance(settings_, dict): - raise Exception("Expected settings_ to be a Mapping, received: {}".format(type(settings_))) - - if unit_ is not None and not isinstance(unit_, (bytes, str)): - raise Exception("Expected unit_ to be a str, received: {}".format(type(unit_))) - - self.application_settings = application_settings_ - self.relation = relation_ - self.settings = settings_ - self.unit = unit_ - self.unknown_fields = unknown_fields - - - -class RelationUnitStatus(Type): - _toSchema = {'in_scope': 'in-scope', 'relation_tag': 'relation-tag', 'suspended': 'suspended'} - _toPy = {'in-scope': 'in_scope', 'relation-tag': 'relation_tag', 'suspended': 'suspended'} - def __init__(self, in_scope=None, relation_tag=None, suspended=None, **unknown_fields): - ''' - in_scope : bool - relation_tag : str - suspended : bool - ''' - in_scope_ = in_scope - relation_tag_ = relation_tag - suspended_ = suspended - - # Validate arguments against known Juju API types. - if in_scope_ is not None and not isinstance(in_scope_, bool): - raise Exception("Expected in_scope_ to be a bool, received: {}".format(type(in_scope_))) - - if relation_tag_ is not None and not isinstance(relation_tag_, (bytes, str)): - raise Exception("Expected relation_tag_ to be a str, received: {}".format(type(relation_tag_))) - - if suspended_ is not None and not isinstance(suspended_, bool): - raise Exception("Expected suspended_ to be a bool, received: {}".format(type(suspended_))) - - self.in_scope = in_scope_ - self.relation_tag = relation_tag_ - self.suspended = suspended_ - self.unknown_fields = unknown_fields - - - -class RelationUnitStatusResult(Type): - _toSchema = {'error': 'error', 'results': 'results'} - _toPy = {'error': 'error', 'results': 'results'} - def __init__(self, error=None, results=None, **unknown_fields): - ''' - error : Error - results : typing.Sequence[~RelationUnitStatus] - ''' - error_ = Error.from_json(error) if error else None - results_ = [RelationUnitStatus.from_json(o) for o in results or []] - - # Validate arguments against known Juju API types. - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - - if results_ is not None and not isinstance(results_, (bytes, str, list)): - raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) - - self.error = error_ - self.results = results_ - self.unknown_fields = unknown_fields - - - -class RelationUnitStatusResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None, **unknown_fields): - ''' - results : typing.Sequence[~RelationUnitStatusResult] - ''' - results_ = [RelationUnitStatusResult.from_json(o) for o in results or []] - - # Validate arguments against known Juju API types. - if results_ is not None and not isinstance(results_, (bytes, str, list)): - raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) - - self.results = results_ - self.unknown_fields = unknown_fields - - - -class RelationUnits(Type): - _toSchema = {'relation_units': 'relation-units'} - _toPy = {'relation-units': 'relation_units'} - def __init__(self, relation_units=None, **unknown_fields): - ''' - relation_units : typing.Sequence[~RelationUnit] - ''' - relation_units_ = [RelationUnit.from_json(o) for o in relation_units or []] - - # Validate arguments against known Juju API types. - if relation_units_ is not None and not isinstance(relation_units_, (bytes, str, list)): - raise Exception("Expected relation_units_ to be a Sequence, received: {}".format(type(relation_units_))) - - self.relation_units = relation_units_ - self.unknown_fields = unknown_fields - - - -class RelationUnitsChange(Type): - _toSchema = {'app_changed': 'app-changed', 'changed': 'changed', 'departed': 'departed'} - _toPy = {'app-changed': 'app_changed', 'changed': 'changed', 'departed': 'departed'} - def __init__(self, app_changed=None, changed=None, departed=None, **unknown_fields): - ''' - app_changed : typing.Mapping[str, int] - changed : typing.Mapping[str, ~UnitSettings] - departed : typing.Sequence[str] - ''' - app_changed_ = app_changed - changed_ = {k: UnitSettings.from_json(v) for k, v in (changed or dict()).items()} - departed_ = departed - - # Validate arguments against known Juju API types. - if app_changed_ is not None and not isinstance(app_changed_, dict): - raise Exception("Expected app_changed_ to be a Mapping, received: {}".format(type(app_changed_))) - - if changed_ is not None and not isinstance(changed_, dict): - raise Exception("Expected changed_ to be a Mapping, received: {}".format(type(changed_))) - - if departed_ is not None and not isinstance(departed_, (bytes, str, list)): - raise Exception("Expected departed_ to be a Sequence, received: {}".format(type(departed_))) - - self.app_changed = app_changed_ - self.changed = changed_ - self.departed = departed_ - self.unknown_fields = unknown_fields - - - -class RelationUnitsWatchResult(Type): - _toSchema = {'changes': 'changes', 'error': 'error', 'watcher_id': 'watcher-id'} - _toPy = {'changes': 'changes', 'error': 'error', 'watcher-id': 'watcher_id'} - def __init__(self, changes=None, error=None, watcher_id=None, **unknown_fields): - ''' - changes : RelationUnitsChange - error : Error - watcher_id : str - ''' - changes_ = RelationUnitsChange.from_json(changes) if changes else None - error_ = Error.from_json(error) if error else None - watcher_id_ = watcher_id - - # Validate arguments against known Juju API types. - if changes_ is not None and not isinstance(changes_, (dict, RelationUnitsChange)): - raise Exception("Expected changes_ to be a RelationUnitsChange, received: {}".format(type(changes_))) - - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - - if watcher_id_ is not None and not isinstance(watcher_id_, (bytes, str)): - raise Exception("Expected watcher_id_ to be a str, received: {}".format(type(watcher_id_))) - - self.changes = changes_ - self.error = error_ - self.watcher_id = watcher_id_ - self.unknown_fields = unknown_fields - - - -class RelationUnitsWatchResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None, **unknown_fields): - ''' - results : typing.Sequence[~RelationUnitsWatchResult] - ''' - results_ = [RelationUnitsWatchResult.from_json(o) for o in results or []] - - # Validate arguments against known Juju API types. - if results_ is not None and not isinstance(results_, (bytes, str, list)): - raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) - - self.results = results_ - self.unknown_fields = unknown_fields - - - -class RemoteApplication(Type): - _toSchema = {'consume_version': 'consume-version', 'is_consumer_proxy': 'is-consumer-proxy', 'life': 'life', 'macaroon': 'macaroon', 'model_uuid': 'model-uuid', 'name': 'name', 'offer_uuid': 'offer-uuid', 'status': 'status'} - _toPy = {'consume-version': 'consume_version', 'is-consumer-proxy': 'is_consumer_proxy', 'life': 'life', 'macaroon': 'macaroon', 'model-uuid': 'model_uuid', 'name': 'name', 'offer-uuid': 'offer_uuid', 'status': 'status'} - def __init__(self, consume_version=None, is_consumer_proxy=None, life=None, macaroon=None, model_uuid=None, name=None, offer_uuid=None, status=None, **unknown_fields): - ''' - consume_version : int - is_consumer_proxy : bool - life : str - macaroon : Macaroon - model_uuid : str - name : str - offer_uuid : str - status : str - ''' - consume_version_ = consume_version - is_consumer_proxy_ = is_consumer_proxy - life_ = life - macaroon_ = Macaroon.from_json(macaroon) if macaroon else None - model_uuid_ = model_uuid - name_ = name - offer_uuid_ = offer_uuid - status_ = status - - # Validate arguments against known Juju API types. - if consume_version_ is not None and not isinstance(consume_version_, int): - raise Exception("Expected consume_version_ to be a int, received: {}".format(type(consume_version_))) - - if is_consumer_proxy_ is not None and not isinstance(is_consumer_proxy_, bool): - raise Exception("Expected is_consumer_proxy_ to be a bool, received: {}".format(type(is_consumer_proxy_))) - - if life_ is not None and not isinstance(life_, (bytes, str)): - raise Exception("Expected life_ to be a str, received: {}".format(type(life_))) - - if macaroon_ is not None and not isinstance(macaroon_, (dict, Macaroon)): - raise Exception("Expected macaroon_ to be a Macaroon, received: {}".format(type(macaroon_))) - - if model_uuid_ is not None and not isinstance(model_uuid_, (bytes, str)): - raise Exception("Expected model_uuid_ to be a str, received: {}".format(type(model_uuid_))) - - if name_ is not None and not isinstance(name_, (bytes, str)): - raise Exception("Expected name_ to be a str, received: {}".format(type(name_))) - - if offer_uuid_ is not None and not isinstance(offer_uuid_, (bytes, str)): - raise Exception("Expected offer_uuid_ to be a str, received: {}".format(type(offer_uuid_))) - - if status_ is not None and not isinstance(status_, (bytes, str)): - raise Exception("Expected status_ to be a str, received: {}".format(type(status_))) - - self.consume_version = consume_version_ - self.is_consumer_proxy = is_consumer_proxy_ - self.life = life_ - self.macaroon = macaroon_ - self.model_uuid = model_uuid_ - self.name = name_ - self.offer_uuid = offer_uuid_ - self.status = status_ - self.unknown_fields = unknown_fields - - - -class RemoteApplicationInfo(Type): - _toSchema = {'description': 'description', 'endpoints': 'endpoints', 'icon_url_path': 'icon-url-path', 'model_tag': 'model-tag', 'name': 'name', 'offer_url': 'offer-url', 'source_model_label': 'source-model-label'} - _toPy = {'description': 'description', 'endpoints': 'endpoints', 'icon-url-path': 'icon_url_path', 'model-tag': 'model_tag', 'name': 'name', 'offer-url': 'offer_url', 'source-model-label': 'source_model_label'} - def __init__(self, description=None, endpoints=None, icon_url_path=None, model_tag=None, name=None, offer_url=None, source_model_label=None, **unknown_fields): - ''' - description : str - endpoints : typing.Sequence[~RemoteEndpoint] - icon_url_path : str - model_tag : str - name : str - offer_url : str - source_model_label : str - ''' - description_ = description - endpoints_ = [RemoteEndpoint.from_json(o) for o in endpoints or []] - icon_url_path_ = icon_url_path - model_tag_ = model_tag - name_ = name - offer_url_ = offer_url - source_model_label_ = source_model_label - - # Validate arguments against known Juju API types. - if description_ is not None and not isinstance(description_, (bytes, str)): - raise Exception("Expected description_ to be a str, received: {}".format(type(description_))) - - if endpoints_ is not None and not isinstance(endpoints_, (bytes, str, list)): - raise Exception("Expected endpoints_ to be a Sequence, received: {}".format(type(endpoints_))) - - if icon_url_path_ is not None and not isinstance(icon_url_path_, (bytes, str)): - raise Exception("Expected icon_url_path_ to be a str, received: {}".format(type(icon_url_path_))) - - if model_tag_ is not None and not isinstance(model_tag_, (bytes, str)): - raise Exception("Expected model_tag_ to be a str, received: {}".format(type(model_tag_))) - - if name_ is not None and not isinstance(name_, (bytes, str)): - raise Exception("Expected name_ to be a str, received: {}".format(type(name_))) - - if offer_url_ is not None and not isinstance(offer_url_, (bytes, str)): - raise Exception("Expected offer_url_ to be a str, received: {}".format(type(offer_url_))) - - if source_model_label_ is not None and not isinstance(source_model_label_, (bytes, str)): - raise Exception("Expected source_model_label_ to be a str, received: {}".format(type(source_model_label_))) - - self.description = description_ - self.endpoints = endpoints_ - self.icon_url_path = icon_url_path_ - self.model_tag = model_tag_ - self.name = name_ - self.offer_url = offer_url_ - self.source_model_label = source_model_label_ - self.unknown_fields = unknown_fields - - - -class RemoteApplicationInfoResult(Type): - _toSchema = {'error': 'error', 'result': 'result'} - _toPy = {'error': 'error', 'result': 'result'} - def __init__(self, error=None, result=None, **unknown_fields): - ''' - error : Error - result : RemoteApplicationInfo - ''' - error_ = Error.from_json(error) if error else None - result_ = RemoteApplicationInfo.from_json(result) if result else None - - # Validate arguments against known Juju API types. - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - - if result_ is not None and not isinstance(result_, (dict, RemoteApplicationInfo)): - raise Exception("Expected result_ to be a RemoteApplicationInfo, received: {}".format(type(result_))) - - self.error = error_ - self.result = result_ - self.unknown_fields = unknown_fields - - - -class RemoteApplicationInfoResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None, **unknown_fields): - ''' - results : typing.Sequence[~RemoteApplicationInfoResult] - ''' - results_ = [RemoteApplicationInfoResult.from_json(o) for o in results or []] - - # Validate arguments against known Juju API types. - if results_ is not None and not isinstance(results_, (bytes, str, list)): - raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) - - self.results = results_ - self.unknown_fields = unknown_fields - - - -class RemoteApplicationResult(Type): - _toSchema = {'error': 'error', 'result': 'result'} - _toPy = {'error': 'error', 'result': 'result'} - def __init__(self, error=None, result=None, **unknown_fields): - ''' - error : Error - result : RemoteApplication - ''' - error_ = Error.from_json(error) if error else None - result_ = RemoteApplication.from_json(result) if result else None - - # Validate arguments against known Juju API types. - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - - if result_ is not None and not isinstance(result_, (dict, RemoteApplication)): - raise Exception("Expected result_ to be a RemoteApplication, received: {}".format(type(result_))) - - self.error = error_ - self.result = result_ - self.unknown_fields = unknown_fields - - - -class RemoteApplicationResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None, **unknown_fields): - ''' - results : typing.Sequence[~RemoteApplicationResult] - ''' - results_ = [RemoteApplicationResult.from_json(o) for o in results or []] - - # Validate arguments against known Juju API types. - if results_ is not None and not isinstance(results_, (bytes, str, list)): - raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) - - self.results = results_ - self.unknown_fields = unknown_fields - - - -class RemoteApplicationStatus(Type): - _toSchema = {'endpoints': 'endpoints', 'err': 'err', 'life': 'life', 'offer_name': 'offer-name', 'offer_url': 'offer-url', 'relations': 'relations', 'status': 'status'} - _toPy = {'endpoints': 'endpoints', 'err': 'err', 'life': 'life', 'offer-name': 'offer_name', 'offer-url': 'offer_url', 'relations': 'relations', 'status': 'status'} - def __init__(self, endpoints=None, err=None, life=None, offer_name=None, offer_url=None, relations=None, status=None, **unknown_fields): - ''' - endpoints : typing.Sequence[~RemoteEndpoint] - err : Error - life : str - offer_name : str - offer_url : str - relations : typing.Mapping[str, typing.Sequence[str]] - status : DetailedStatus - ''' - endpoints_ = [RemoteEndpoint.from_json(o) for o in endpoints or []] - err_ = Error.from_json(err) if err else None - life_ = life - offer_name_ = offer_name - offer_url_ = offer_url - relations_ = relations - status_ = DetailedStatus.from_json(status) if status else None - - # Validate arguments against known Juju API types. - if endpoints_ is not None and not isinstance(endpoints_, (bytes, str, list)): - raise Exception("Expected endpoints_ to be a Sequence, received: {}".format(type(endpoints_))) - - if err_ is not None and not isinstance(err_, (dict, Error)): - raise Exception("Expected err_ to be a Error, received: {}".format(type(err_))) - - if life_ is not None and not isinstance(life_, (bytes, str)): - raise Exception("Expected life_ to be a str, received: {}".format(type(life_))) - - if offer_name_ is not None and not isinstance(offer_name_, (bytes, str)): - raise Exception("Expected offer_name_ to be a str, received: {}".format(type(offer_name_))) - - if offer_url_ is not None and not isinstance(offer_url_, (bytes, str)): - raise Exception("Expected offer_url_ to be a str, received: {}".format(type(offer_url_))) - - if relations_ is not None and not isinstance(relations_, dict): - raise Exception("Expected relations_ to be a Mapping, received: {}".format(type(relations_))) - - if status_ is not None and not isinstance(status_, (dict, DetailedStatus)): - raise Exception("Expected status_ to be a DetailedStatus, received: {}".format(type(status_))) - - self.endpoints = endpoints_ - self.err = err_ - self.life = life_ - self.offer_name = offer_name_ - self.offer_url = offer_url_ - self.relations = relations_ - self.status = status_ - self.unknown_fields = unknown_fields - - - -class RemoteEndpoint(Type): - _toSchema = {'interface': 'interface', 'limit': 'limit', 'name': 'name', 'role': 'role'} - _toPy = {'interface': 'interface', 'limit': 'limit', 'name': 'name', 'role': 'role'} - def __init__(self, interface=None, limit=None, name=None, role=None, **unknown_fields): - ''' - interface : str - limit : int - name : str - role : str - ''' - interface_ = interface - limit_ = limit - name_ = name - role_ = role - - # Validate arguments against known Juju API types. - if interface_ is not None and not isinstance(interface_, (bytes, str)): - raise Exception("Expected interface_ to be a str, received: {}".format(type(interface_))) - - if limit_ is not None and not isinstance(limit_, int): - raise Exception("Expected limit_ to be a int, received: {}".format(type(limit_))) - - if name_ is not None and not isinstance(name_, (bytes, str)): - raise Exception("Expected name_ to be a str, received: {}".format(type(name_))) - - if role_ is not None and not isinstance(role_, (bytes, str)): - raise Exception("Expected role_ to be a str, received: {}".format(type(role_))) - - self.interface = interface_ - self.limit = limit_ - self.name = name_ - self.role = role_ - self.unknown_fields = unknown_fields - - - -class RemoteEntityArg(Type): - _toSchema = {'bakery_version': 'bakery-version', 'macaroons': 'macaroons', 'relation_token': 'relation-token'} - _toPy = {'bakery-version': 'bakery_version', 'macaroons': 'macaroons', 'relation-token': 'relation_token'} - def __init__(self, bakery_version=None, macaroons=None, relation_token=None, **unknown_fields): - ''' - bakery_version : int - macaroons : typing.Sequence[~Macaroon] - relation_token : str - ''' - bakery_version_ = bakery_version - macaroons_ = [Macaroon.from_json(o) for o in macaroons or []] - relation_token_ = relation_token - - # Validate arguments against known Juju API types. - if bakery_version_ is not None and not isinstance(bakery_version_, int): - raise Exception("Expected bakery_version_ to be a int, received: {}".format(type(bakery_version_))) - - if macaroons_ is not None and not isinstance(macaroons_, (bytes, str, list)): - raise Exception("Expected macaroons_ to be a Sequence, received: {}".format(type(macaroons_))) - - if relation_token_ is not None and not isinstance(relation_token_, (bytes, str)): - raise Exception("Expected relation_token_ to be a str, received: {}".format(type(relation_token_))) - - self.bakery_version = bakery_version_ - self.macaroons = macaroons_ - self.relation_token = relation_token_ - self.unknown_fields = unknown_fields - - - -class RemoteEntityArgs(Type): - _toSchema = {'args': 'args'} - _toPy = {'args': 'args'} - def __init__(self, args=None, **unknown_fields): - ''' - args : typing.Sequence[~RemoteEntityArg] - ''' - args_ = [RemoteEntityArg.from_json(o) for o in args or []] - - # Validate arguments against known Juju API types. - if args_ is not None and not isinstance(args_, (bytes, str, list)): - raise Exception("Expected args_ to be a Sequence, received: {}".format(type(args_))) - - self.args = args_ - self.unknown_fields = unknown_fields - - - -class RemoteEntityTokenArg(Type): - _toSchema = {'tag': 'tag', 'token': 'token'} - _toPy = {'tag': 'tag', 'token': 'token'} - def __init__(self, tag=None, token=None, **unknown_fields): - ''' - tag : str - token : str - ''' - tag_ = tag - token_ = token - - # Validate arguments against known Juju API types. - if tag_ is not None and not isinstance(tag_, (bytes, str)): - raise Exception("Expected tag_ to be a str, received: {}".format(type(tag_))) - - if token_ is not None and not isinstance(token_, (bytes, str)): - raise Exception("Expected token_ to be a str, received: {}".format(type(token_))) - - self.tag = tag_ - self.token = token_ - self.unknown_fields = unknown_fields - - - -class RemoteEntityTokenArgs(Type): - _toSchema = {'args': 'Args'} - _toPy = {'Args': 'args'} - def __init__(self, args=None, **unknown_fields): - ''' - args : typing.Sequence[~RemoteEntityTokenArg] - ''' - args_ = [RemoteEntityTokenArg.from_json(o) for o in args or []] - - # Validate arguments against known Juju API types. - if args_ is not None and not isinstance(args_, (bytes, str, list)): - raise Exception("Expected args_ to be a Sequence, received: {}".format(type(args_))) - - self.args = args_ - self.unknown_fields = unknown_fields - - - -class RemoteRelation(Type): - _toSchema = {'application_name': 'application-name', 'endpoint': 'endpoint', 'id_': 'id', 'key': 'key', 'life': 'life', 'remote_application_name': 'remote-application-name', 'remote_endpoint_name': 'remote-endpoint-name', 'source_model_uuid': 'source-model-uuid', 'suspended': 'suspended', 'unit_count': 'unit-count'} - _toPy = {'application-name': 'application_name', 'endpoint': 'endpoint', 'id': 'id_', 'key': 'key', 'life': 'life', 'remote-application-name': 'remote_application_name', 'remote-endpoint-name': 'remote_endpoint_name', 'source-model-uuid': 'source_model_uuid', 'suspended': 'suspended', 'unit-count': 'unit_count'} - def __init__(self, application_name=None, endpoint=None, id_=None, key=None, life=None, remote_application_name=None, remote_endpoint_name=None, source_model_uuid=None, suspended=None, unit_count=None, **unknown_fields): - ''' - application_name : str - endpoint : RemoteEndpoint - id_ : int - key : str - life : str - remote_application_name : str - remote_endpoint_name : str - source_model_uuid : str - suspended : bool - unit_count : int - ''' - application_name_ = application_name - endpoint_ = RemoteEndpoint.from_json(endpoint) if endpoint else None - id__ = id_ - key_ = key - life_ = life - remote_application_name_ = remote_application_name - remote_endpoint_name_ = remote_endpoint_name - source_model_uuid_ = source_model_uuid - suspended_ = suspended - unit_count_ = unit_count - - # Validate arguments against known Juju API types. - if application_name_ is not None and not isinstance(application_name_, (bytes, str)): - raise Exception("Expected application_name_ to be a str, received: {}".format(type(application_name_))) - - if endpoint_ is not None and not isinstance(endpoint_, (dict, RemoteEndpoint)): - raise Exception("Expected endpoint_ to be a RemoteEndpoint, received: {}".format(type(endpoint_))) - - if id__ is not None and not isinstance(id__, int): - raise Exception("Expected id__ to be a int, received: {}".format(type(id__))) - - if key_ is not None and not isinstance(key_, (bytes, str)): - raise Exception("Expected key_ to be a str, received: {}".format(type(key_))) - - if life_ is not None and not isinstance(life_, (bytes, str)): - raise Exception("Expected life_ to be a str, received: {}".format(type(life_))) - - if remote_application_name_ is not None and not isinstance(remote_application_name_, (bytes, str)): - raise Exception("Expected remote_application_name_ to be a str, received: {}".format(type(remote_application_name_))) - - if remote_endpoint_name_ is not None and not isinstance(remote_endpoint_name_, (bytes, str)): - raise Exception("Expected remote_endpoint_name_ to be a str, received: {}".format(type(remote_endpoint_name_))) - - if source_model_uuid_ is not None and not isinstance(source_model_uuid_, (bytes, str)): - raise Exception("Expected source_model_uuid_ to be a str, received: {}".format(type(source_model_uuid_))) - - if suspended_ is not None and not isinstance(suspended_, bool): - raise Exception("Expected suspended_ to be a bool, received: {}".format(type(suspended_))) - - if unit_count_ is not None and not isinstance(unit_count_, int): - raise Exception("Expected unit_count_ to be a int, received: {}".format(type(unit_count_))) - - self.application_name = application_name_ - self.endpoint = endpoint_ - self.id_ = id__ - self.key = key_ - self.life = life_ - self.remote_application_name = remote_application_name_ - self.remote_endpoint_name = remote_endpoint_name_ - self.source_model_uuid = source_model_uuid_ - self.suspended = suspended_ - self.unit_count = unit_count_ - self.unknown_fields = unknown_fields - - - -class RemoteRelationChangeEvent(Type): - _toSchema = {'application_settings': 'application-settings', 'application_token': 'application-token', 'bakery_version': 'bakery-version', 'changed_units': 'changed-units', 'departed_units': 'departed-units', 'force_cleanup': 'force-cleanup', 'life': 'life', 'macaroons': 'macaroons', 'relation_token': 'relation-token', 'suspended': 'suspended', 'suspended_reason': 'suspended-reason', 'unit_count': 'unit-count'} - _toPy = {'application-settings': 'application_settings', 'application-token': 'application_token', 'bakery-version': 'bakery_version', 'changed-units': 'changed_units', 'departed-units': 'departed_units', 'force-cleanup': 'force_cleanup', 'life': 'life', 'macaroons': 'macaroons', 'relation-token': 'relation_token', 'suspended': 'suspended', 'suspended-reason': 'suspended_reason', 'unit-count': 'unit_count'} - def __init__(self, application_settings=None, application_token=None, bakery_version=None, changed_units=None, departed_units=None, force_cleanup=None, life=None, macaroons=None, relation_token=None, suspended=None, suspended_reason=None, unit_count=None, **unknown_fields): - ''' - application_settings : typing.Mapping[str, typing.Any] - application_token : str - bakery_version : int - changed_units : typing.Sequence[~RemoteRelationUnitChange] - departed_units : typing.Sequence[int] - force_cleanup : bool - life : str - macaroons : typing.Sequence[~Macaroon] - relation_token : str - suspended : bool - suspended_reason : str - unit_count : int - ''' - application_settings_ = application_settings - application_token_ = application_token - bakery_version_ = bakery_version - changed_units_ = [RemoteRelationUnitChange.from_json(o) for o in changed_units or []] - departed_units_ = departed_units - force_cleanup_ = force_cleanup - life_ = life - macaroons_ = [Macaroon.from_json(o) for o in macaroons or []] - relation_token_ = relation_token - suspended_ = suspended - suspended_reason_ = suspended_reason - unit_count_ = unit_count - - # Validate arguments against known Juju API types. - if application_settings_ is not None and not isinstance(application_settings_, dict): - raise Exception("Expected application_settings_ to be a Mapping, received: {}".format(type(application_settings_))) - - if application_token_ is not None and not isinstance(application_token_, (bytes, str)): - raise Exception("Expected application_token_ to be a str, received: {}".format(type(application_token_))) - - if bakery_version_ is not None and not isinstance(bakery_version_, int): - raise Exception("Expected bakery_version_ to be a int, received: {}".format(type(bakery_version_))) - - if changed_units_ is not None and not isinstance(changed_units_, (bytes, str, list)): - raise Exception("Expected changed_units_ to be a Sequence, received: {}".format(type(changed_units_))) - - if departed_units_ is not None and not isinstance(departed_units_, (bytes, str, list)): - raise Exception("Expected departed_units_ to be a Sequence, received: {}".format(type(departed_units_))) - - if force_cleanup_ is not None and not isinstance(force_cleanup_, bool): - raise Exception("Expected force_cleanup_ to be a bool, received: {}".format(type(force_cleanup_))) - - if life_ is not None and not isinstance(life_, (bytes, str)): - raise Exception("Expected life_ to be a str, received: {}".format(type(life_))) - - if macaroons_ is not None and not isinstance(macaroons_, (bytes, str, list)): - raise Exception("Expected macaroons_ to be a Sequence, received: {}".format(type(macaroons_))) - - if relation_token_ is not None and not isinstance(relation_token_, (bytes, str)): - raise Exception("Expected relation_token_ to be a str, received: {}".format(type(relation_token_))) - - if suspended_ is not None and not isinstance(suspended_, bool): - raise Exception("Expected suspended_ to be a bool, received: {}".format(type(suspended_))) - - if suspended_reason_ is not None and not isinstance(suspended_reason_, (bytes, str)): - raise Exception("Expected suspended_reason_ to be a str, received: {}".format(type(suspended_reason_))) - - if unit_count_ is not None and not isinstance(unit_count_, int): - raise Exception("Expected unit_count_ to be a int, received: {}".format(type(unit_count_))) - - self.application_settings = application_settings_ - self.application_token = application_token_ - self.bakery_version = bakery_version_ - self.changed_units = changed_units_ - self.departed_units = departed_units_ - self.force_cleanup = force_cleanup_ - self.life = life_ - self.macaroons = macaroons_ - self.relation_token = relation_token_ - self.suspended = suspended_ - self.suspended_reason = suspended_reason_ - self.unit_count = unit_count_ - self.unknown_fields = unknown_fields - - - -class RemoteRelationDetails(Type): - _toSchema = {'bakery_version': 'bakery-version', 'macaroon': 'macaroon', 'relation_token': 'relation-token'} - _toPy = {'bakery-version': 'bakery_version', 'macaroon': 'macaroon', 'relation-token': 'relation_token'} - def __init__(self, bakery_version=None, macaroon=None, relation_token=None, **unknown_fields): - ''' - bakery_version : int - macaroon : Macaroon - relation_token : str - ''' - bakery_version_ = bakery_version - macaroon_ = Macaroon.from_json(macaroon) if macaroon else None - relation_token_ = relation_token - - # Validate arguments against known Juju API types. - if bakery_version_ is not None and not isinstance(bakery_version_, int): - raise Exception("Expected bakery_version_ to be a int, received: {}".format(type(bakery_version_))) - - if macaroon_ is not None and not isinstance(macaroon_, (dict, Macaroon)): - raise Exception("Expected macaroon_ to be a Macaroon, received: {}".format(type(macaroon_))) - - if relation_token_ is not None and not isinstance(relation_token_, (bytes, str)): - raise Exception("Expected relation_token_ to be a str, received: {}".format(type(relation_token_))) - - self.bakery_version = bakery_version_ - self.macaroon = macaroon_ - self.relation_token = relation_token_ - self.unknown_fields = unknown_fields - - - -class RemoteRelationResult(Type): - _toSchema = {'error': 'error', 'result': 'result'} - _toPy = {'error': 'error', 'result': 'result'} - def __init__(self, error=None, result=None, **unknown_fields): - ''' - error : Error - result : RemoteRelation - ''' - error_ = Error.from_json(error) if error else None - result_ = RemoteRelation.from_json(result) if result else None - - # Validate arguments against known Juju API types. - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - - if result_ is not None and not isinstance(result_, (dict, RemoteRelation)): - raise Exception("Expected result_ to be a RemoteRelation, received: {}".format(type(result_))) - - self.error = error_ - self.result = result_ - self.unknown_fields = unknown_fields - - - -class RemoteRelationResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None, **unknown_fields): - ''' - results : typing.Sequence[~RemoteRelationResult] - ''' - results_ = [RemoteRelationResult.from_json(o) for o in results or []] - - # Validate arguments against known Juju API types. - if results_ is not None and not isinstance(results_, (bytes, str, list)): - raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) - - self.results = results_ - self.unknown_fields = unknown_fields - - - -class RemoteRelationUnitChange(Type): - _toSchema = {'settings': 'settings', 'unit_id': 'unit-id'} - _toPy = {'settings': 'settings', 'unit-id': 'unit_id'} - def __init__(self, settings=None, unit_id=None, **unknown_fields): - ''' - settings : typing.Mapping[str, typing.Any] - unit_id : int - ''' - settings_ = settings - unit_id_ = unit_id - - # Validate arguments against known Juju API types. - if settings_ is not None and not isinstance(settings_, dict): - raise Exception("Expected settings_ to be a Mapping, received: {}".format(type(settings_))) - - if unit_id_ is not None and not isinstance(unit_id_, int): - raise Exception("Expected unit_id_ to be a int, received: {}".format(type(unit_id_))) - - self.settings = settings_ - self.unit_id = unit_id_ - self.unknown_fields = unknown_fields - - - -class RemoteRelationWatchResult(Type): - _toSchema = {'changes': 'changes', 'error': 'error', 'watcher_id': 'watcher-id'} - _toPy = {'changes': 'changes', 'error': 'error', 'watcher-id': 'watcher_id'} - def __init__(self, changes=None, error=None, watcher_id=None, **unknown_fields): - ''' - changes : RemoteRelationChangeEvent - error : Error - watcher_id : str - ''' - changes_ = RemoteRelationChangeEvent.from_json(changes) if changes else None - error_ = Error.from_json(error) if error else None - watcher_id_ = watcher_id - - # Validate arguments against known Juju API types. - if changes_ is not None and not isinstance(changes_, (dict, RemoteRelationChangeEvent)): - raise Exception("Expected changes_ to be a RemoteRelationChangeEvent, received: {}".format(type(changes_))) - - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - - if watcher_id_ is not None and not isinstance(watcher_id_, (bytes, str)): - raise Exception("Expected watcher_id_ to be a str, received: {}".format(type(watcher_id_))) - - self.changes = changes_ - self.error = error_ - self.watcher_id = watcher_id_ - self.unknown_fields = unknown_fields - - - -class RemoteRelationWatchResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None, **unknown_fields): - ''' - results : typing.Sequence[~RemoteRelationWatchResult] - ''' - results_ = [RemoteRelationWatchResult.from_json(o) for o in results or []] - - # Validate arguments against known Juju API types. - if results_ is not None and not isinstance(results_, (bytes, str, list)): - raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) - - self.results = results_ - self.unknown_fields = unknown_fields - - - -class RemoteRelationsChanges(Type): - _toSchema = {'changes': 'changes'} - _toPy = {'changes': 'changes'} - def __init__(self, changes=None, **unknown_fields): - ''' - changes : typing.Sequence[~RemoteRelationChangeEvent] - ''' - changes_ = [RemoteRelationChangeEvent.from_json(o) for o in changes or []] - - # Validate arguments against known Juju API types. - if changes_ is not None and not isinstance(changes_, (bytes, str, list)): - raise Exception("Expected changes_ to be a Sequence, received: {}".format(type(changes_))) - - self.changes = changes_ - self.unknown_fields = unknown_fields - - - -class RemoteSpace(Type): - _toSchema = {'cloud_type': 'cloud-type', 'name': 'name', 'provider_attributes': 'provider-attributes', 'provider_id': 'provider-id', 'subnets': 'subnets'} - _toPy = {'cloud-type': 'cloud_type', 'name': 'name', 'provider-attributes': 'provider_attributes', 'provider-id': 'provider_id', 'subnets': 'subnets'} - def __init__(self, cloud_type=None, name=None, provider_attributes=None, provider_id=None, subnets=None, **unknown_fields): - ''' - cloud_type : str - name : str - provider_attributes : typing.Mapping[str, typing.Any] - provider_id : str - subnets : typing.Sequence[~Subnet] - ''' - cloud_type_ = cloud_type - name_ = name - provider_attributes_ = provider_attributes - provider_id_ = provider_id - subnets_ = [Subnet.from_json(o) for o in subnets or []] - - # Validate arguments against known Juju API types. - if cloud_type_ is not None and not isinstance(cloud_type_, (bytes, str)): - raise Exception("Expected cloud_type_ to be a str, received: {}".format(type(cloud_type_))) - - if name_ is not None and not isinstance(name_, (bytes, str)): - raise Exception("Expected name_ to be a str, received: {}".format(type(name_))) - - if provider_attributes_ is not None and not isinstance(provider_attributes_, dict): - raise Exception("Expected provider_attributes_ to be a Mapping, received: {}".format(type(provider_attributes_))) - - if provider_id_ is not None and not isinstance(provider_id_, (bytes, str)): - raise Exception("Expected provider_id_ to be a str, received: {}".format(type(provider_id_))) - - if subnets_ is not None and not isinstance(subnets_, (bytes, str, list)): - raise Exception("Expected subnets_ to be a Sequence, received: {}".format(type(subnets_))) - - self.cloud_type = cloud_type_ - self.name = name_ - self.provider_attributes = provider_attributes_ - self.provider_id = provider_id_ - self.subnets = subnets_ - self.unknown_fields = unknown_fields - - - -class RemoveBlocksArgs(Type): - _toSchema = {'all_': 'all'} - _toPy = {'all': 'all_'} - def __init__(self, all_=None, **unknown_fields): - ''' - all_ : bool - ''' - all__ = all_ - - # Validate arguments against known Juju API types. - if all__ is not None and not isinstance(all__, bool): - raise Exception("Expected all__ to be a bool, received: {}".format(type(all__))) - - self.all_ = all__ - self.unknown_fields = unknown_fields - - - -class RemoveFilesystemParams(Type): - _toSchema = {'destroy': 'destroy', 'filesystem_id': 'filesystem-id', 'provider': 'provider'} - _toPy = {'destroy': 'destroy', 'filesystem-id': 'filesystem_id', 'provider': 'provider'} - def __init__(self, destroy=None, filesystem_id=None, provider=None, **unknown_fields): - ''' - destroy : bool - filesystem_id : str - provider : str - ''' - destroy_ = destroy - filesystem_id_ = filesystem_id - provider_ = provider - - # Validate arguments against known Juju API types. - if destroy_ is not None and not isinstance(destroy_, bool): - raise Exception("Expected destroy_ to be a bool, received: {}".format(type(destroy_))) - - if filesystem_id_ is not None and not isinstance(filesystem_id_, (bytes, str)): - raise Exception("Expected filesystem_id_ to be a str, received: {}".format(type(filesystem_id_))) - - if provider_ is not None and not isinstance(provider_, (bytes, str)): - raise Exception("Expected provider_ to be a str, received: {}".format(type(provider_))) - - self.destroy = destroy_ - self.filesystem_id = filesystem_id_ - self.provider = provider_ - self.unknown_fields = unknown_fields - - - -class RemoveFilesystemParamsResult(Type): - _toSchema = {'error': 'error', 'result': 'result'} - _toPy = {'error': 'error', 'result': 'result'} - def __init__(self, error=None, result=None, **unknown_fields): - ''' - error : Error - result : RemoveFilesystemParams - ''' - error_ = Error.from_json(error) if error else None - result_ = RemoveFilesystemParams.from_json(result) if result else None - - # Validate arguments against known Juju API types. - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - - if result_ is not None and not isinstance(result_, (dict, RemoveFilesystemParams)): - raise Exception("Expected result_ to be a RemoveFilesystemParams, received: {}".format(type(result_))) - - self.error = error_ - self.result = result_ - self.unknown_fields = unknown_fields - - - -class RemoveFilesystemParamsResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None, **unknown_fields): - ''' - results : typing.Sequence[~RemoveFilesystemParamsResult] - ''' - results_ = [RemoveFilesystemParamsResult.from_json(o) for o in results or []] - - # Validate arguments against known Juju API types. - if results_ is not None and not isinstance(results_, (bytes, str, list)): - raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) - - self.results = results_ - self.unknown_fields = unknown_fields - - - -class RemoveSecretBackendArg(Type): - _toSchema = {'force': 'force', 'name': 'name'} - _toPy = {'force': 'force', 'name': 'name'} - def __init__(self, force=None, name=None, **unknown_fields): - ''' - force : bool - name : str - ''' - force_ = force - name_ = name - - # Validate arguments against known Juju API types. - if force_ is not None and not isinstance(force_, bool): - raise Exception("Expected force_ to be a bool, received: {}".format(type(force_))) - - if name_ is not None and not isinstance(name_, (bytes, str)): - raise Exception("Expected name_ to be a str, received: {}".format(type(name_))) - - self.force = force_ - self.name = name_ - self.unknown_fields = unknown_fields - - - -class RemoveSecretBackendArgs(Type): - _toSchema = {'args': 'args'} - _toPy = {'args': 'args'} - def __init__(self, args=None, **unknown_fields): - ''' - args : typing.Sequence[~RemoveSecretBackendArg] - ''' - args_ = [RemoveSecretBackendArg.from_json(o) for o in args or []] - - # Validate arguments against known Juju API types. - if args_ is not None and not isinstance(args_, (bytes, str, list)): - raise Exception("Expected args_ to be a Sequence, received: {}".format(type(args_))) - - self.args = args_ - self.unknown_fields = unknown_fields - - - -class RemoveSpaceParam(Type): - _toSchema = {'dry_run': 'dry-run', 'force': 'force', 'space': 'space'} - _toPy = {'dry-run': 'dry_run', 'force': 'force', 'space': 'space'} - def __init__(self, dry_run=None, force=None, space=None, **unknown_fields): - ''' - dry_run : bool - force : bool - space : Entity - ''' - dry_run_ = dry_run - force_ = force - space_ = Entity.from_json(space) if space else None - - # Validate arguments against known Juju API types. - if dry_run_ is not None and not isinstance(dry_run_, bool): - raise Exception("Expected dry_run_ to be a bool, received: {}".format(type(dry_run_))) - - if force_ is not None and not isinstance(force_, bool): - raise Exception("Expected force_ to be a bool, received: {}".format(type(force_))) - - if space_ is not None and not isinstance(space_, (dict, Entity)): - raise Exception("Expected space_ to be a Entity, received: {}".format(type(space_))) - - self.dry_run = dry_run_ - self.force = force_ - self.space = space_ - self.unknown_fields = unknown_fields - - - -class RemoveSpaceParams(Type): - _toSchema = {'space_param': 'space-param'} - _toPy = {'space-param': 'space_param'} - def __init__(self, space_param=None, **unknown_fields): - ''' - space_param : typing.Sequence[~RemoveSpaceParam] - ''' - space_param_ = [RemoveSpaceParam.from_json(o) for o in space_param or []] - - # Validate arguments against known Juju API types. - if space_param_ is not None and not isinstance(space_param_, (bytes, str, list)): - raise Exception("Expected space_param_ to be a Sequence, received: {}".format(type(space_param_))) - - self.space_param = space_param_ - self.unknown_fields = unknown_fields - - - -class RemoveSpaceResult(Type): - _toSchema = {'bindings': 'bindings', 'constraints': 'constraints', 'controller_settings': 'controller-settings', 'error': 'error'} - _toPy = {'bindings': 'bindings', 'constraints': 'constraints', 'controller-settings': 'controller_settings', 'error': 'error'} - def __init__(self, bindings=None, constraints=None, controller_settings=None, error=None, **unknown_fields): - ''' - bindings : typing.Sequence[~Entity] - constraints : typing.Sequence[~Entity] - controller_settings : typing.Sequence[str] - error : Error - ''' - bindings_ = [Entity.from_json(o) for o in bindings or []] - constraints_ = [Entity.from_json(o) for o in constraints or []] - controller_settings_ = controller_settings - error_ = Error.from_json(error) if error else None - - # Validate arguments against known Juju API types. - if bindings_ is not None and not isinstance(bindings_, (bytes, str, list)): - raise Exception("Expected bindings_ to be a Sequence, received: {}".format(type(bindings_))) - - if constraints_ is not None and not isinstance(constraints_, (bytes, str, list)): - raise Exception("Expected constraints_ to be a Sequence, received: {}".format(type(constraints_))) - - if controller_settings_ is not None and not isinstance(controller_settings_, (bytes, str, list)): - raise Exception("Expected controller_settings_ to be a Sequence, received: {}".format(type(controller_settings_))) - - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - - self.bindings = bindings_ - self.constraints = constraints_ - self.controller_settings = controller_settings_ - self.error = error_ - self.unknown_fields = unknown_fields - - - -class RemoveSpaceResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None, **unknown_fields): - ''' - results : typing.Sequence[~RemoveSpaceResult] - ''' - results_ = [RemoveSpaceResult.from_json(o) for o in results or []] - - # Validate arguments against known Juju API types. - if results_ is not None and not isinstance(results_, (bytes, str, list)): - raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) - - self.results = results_ - self.unknown_fields = unknown_fields - - - -class RemoveStorage(Type): - _toSchema = {'storage': 'storage'} - _toPy = {'storage': 'storage'} - def __init__(self, storage=None, **unknown_fields): - ''' - storage : typing.Sequence[~RemoveStorageInstance] - ''' - storage_ = [RemoveStorageInstance.from_json(o) for o in storage or []] - - # Validate arguments against known Juju API types. - if storage_ is not None and not isinstance(storage_, (bytes, str, list)): - raise Exception("Expected storage_ to be a Sequence, received: {}".format(type(storage_))) - - self.storage = storage_ - self.unknown_fields = unknown_fields - - - -class RemoveStorageInstance(Type): - _toSchema = {'destroy_attachments': 'destroy-attachments', 'destroy_storage': 'destroy-storage', 'force': 'force', 'max_wait': 'max-wait', 'tag': 'tag'} - _toPy = {'destroy-attachments': 'destroy_attachments', 'destroy-storage': 'destroy_storage', 'force': 'force', 'max-wait': 'max_wait', 'tag': 'tag'} - def __init__(self, destroy_attachments=None, destroy_storage=None, force=None, max_wait=None, tag=None, **unknown_fields): - ''' - destroy_attachments : bool - destroy_storage : bool - force : bool - max_wait : int - tag : str - ''' - destroy_attachments_ = destroy_attachments - destroy_storage_ = destroy_storage - force_ = force - max_wait_ = max_wait - tag_ = tag - - # Validate arguments against known Juju API types. - if destroy_attachments_ is not None and not isinstance(destroy_attachments_, bool): - raise Exception("Expected destroy_attachments_ to be a bool, received: {}".format(type(destroy_attachments_))) - - if destroy_storage_ is not None and not isinstance(destroy_storage_, bool): - raise Exception("Expected destroy_storage_ to be a bool, received: {}".format(type(destroy_storage_))) - - if force_ is not None and not isinstance(force_, bool): - raise Exception("Expected force_ to be a bool, received: {}".format(type(force_))) - - if max_wait_ is not None and not isinstance(max_wait_, int): - raise Exception("Expected max_wait_ to be a int, received: {}".format(type(max_wait_))) - - if tag_ is not None and not isinstance(tag_, (bytes, str)): - raise Exception("Expected tag_ to be a str, received: {}".format(type(tag_))) - - self.destroy_attachments = destroy_attachments_ - self.destroy_storage = destroy_storage_ - self.force = force_ - self.max_wait = max_wait_ - self.tag = tag_ - self.unknown_fields = unknown_fields - - - -class RemoveVolumeParams(Type): - _toSchema = {'destroy': 'destroy', 'provider': 'provider', 'volume_id': 'volume-id'} - _toPy = {'destroy': 'destroy', 'provider': 'provider', 'volume-id': 'volume_id'} - def __init__(self, destroy=None, provider=None, volume_id=None, **unknown_fields): - ''' - destroy : bool - provider : str - volume_id : str - ''' - destroy_ = destroy - provider_ = provider - volume_id_ = volume_id - - # Validate arguments against known Juju API types. - if destroy_ is not None and not isinstance(destroy_, bool): - raise Exception("Expected destroy_ to be a bool, received: {}".format(type(destroy_))) - - if provider_ is not None and not isinstance(provider_, (bytes, str)): - raise Exception("Expected provider_ to be a str, received: {}".format(type(provider_))) - - if volume_id_ is not None and not isinstance(volume_id_, (bytes, str)): - raise Exception("Expected volume_id_ to be a str, received: {}".format(type(volume_id_))) - - self.destroy = destroy_ - self.provider = provider_ - self.volume_id = volume_id_ - self.unknown_fields = unknown_fields - - - -class RemoveVolumeParamsResult(Type): - _toSchema = {'error': 'error', 'result': 'result'} - _toPy = {'error': 'error', 'result': 'result'} - def __init__(self, error=None, result=None, **unknown_fields): - ''' - error : Error - result : RemoveVolumeParams - ''' - error_ = Error.from_json(error) if error else None - result_ = RemoveVolumeParams.from_json(result) if result else None - - # Validate arguments against known Juju API types. - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - - if result_ is not None and not isinstance(result_, (dict, RemoveVolumeParams)): - raise Exception("Expected result_ to be a RemoveVolumeParams, received: {}".format(type(result_))) - - self.error = error_ - self.result = result_ - self.unknown_fields = unknown_fields - - - -class RemoveVolumeParamsResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None, **unknown_fields): - ''' - results : typing.Sequence[~RemoveVolumeParamsResult] - ''' - results_ = [RemoveVolumeParamsResult.from_json(o) for o in results or []] - - # Validate arguments against known Juju API types. - if results_ is not None and not isinstance(results_, (bytes, str, list)): - raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) - - self.results = results_ - self.unknown_fields = unknown_fields - - - -class RenameSpaceParams(Type): - _toSchema = {'from_space_tag': 'from-space-tag', 'to_space_tag': 'to-space-tag'} - _toPy = {'from-space-tag': 'from_space_tag', 'to-space-tag': 'to_space_tag'} - def __init__(self, from_space_tag=None, to_space_tag=None, **unknown_fields): - ''' - from_space_tag : str - to_space_tag : str - ''' - from_space_tag_ = from_space_tag - to_space_tag_ = to_space_tag - - # Validate arguments against known Juju API types. - if from_space_tag_ is not None and not isinstance(from_space_tag_, (bytes, str)): - raise Exception("Expected from_space_tag_ to be a str, received: {}".format(type(from_space_tag_))) - - if to_space_tag_ is not None and not isinstance(to_space_tag_, (bytes, str)): - raise Exception("Expected to_space_tag_ to be a str, received: {}".format(type(to_space_tag_))) - - self.from_space_tag = from_space_tag_ - self.to_space_tag = to_space_tag_ - self.unknown_fields = unknown_fields - - - -class RenameSpacesParams(Type): - _toSchema = {'changes': 'changes'} - _toPy = {'changes': 'changes'} - def __init__(self, changes=None, **unknown_fields): - ''' - changes : typing.Sequence[~RenameSpaceParams] - ''' - changes_ = [RenameSpaceParams.from_json(o) for o in changes or []] - - # Validate arguments against known Juju API types. - if changes_ is not None and not isinstance(changes_, (bytes, str, list)): - raise Exception("Expected changes_ to be a Sequence, received: {}".format(type(changes_))) - - self.changes = changes_ - self.unknown_fields = unknown_fields - - - -class ResolveCharmWithChannel(Type): - _toSchema = {'charm_origin': 'charm-origin', 'reference': 'reference', 'switch_charm': 'switch-charm'} - _toPy = {'charm-origin': 'charm_origin', 'reference': 'reference', 'switch-charm': 'switch_charm'} - def __init__(self, charm_origin=None, reference=None, switch_charm=None, **unknown_fields): - ''' - charm_origin : CharmOrigin - reference : str - switch_charm : bool - ''' - charm_origin_ = CharmOrigin.from_json(charm_origin) if charm_origin else None - reference_ = reference - switch_charm_ = switch_charm - - # Validate arguments against known Juju API types. - if charm_origin_ is not None and not isinstance(charm_origin_, (dict, CharmOrigin)): - raise Exception("Expected charm_origin_ to be a CharmOrigin, received: {}".format(type(charm_origin_))) - - if reference_ is not None and not isinstance(reference_, (bytes, str)): - raise Exception("Expected reference_ to be a str, received: {}".format(type(reference_))) - - if switch_charm_ is not None and not isinstance(switch_charm_, bool): - raise Exception("Expected switch_charm_ to be a bool, received: {}".format(type(switch_charm_))) - - self.charm_origin = charm_origin_ - self.reference = reference_ - self.switch_charm = switch_charm_ - self.unknown_fields = unknown_fields - - - -class ResolveCharmWithChannelResult(Type): - _toSchema = {'charm_origin': 'charm-origin', 'error': 'error', 'supported_bases': 'supported-bases', 'url': 'url'} - _toPy = {'charm-origin': 'charm_origin', 'error': 'error', 'supported-bases': 'supported_bases', 'url': 'url'} - def __init__(self, charm_origin=None, error=None, supported_bases=None, url=None, **unknown_fields): - ''' - charm_origin : CharmOrigin - error : Error - supported_bases : typing.Sequence[~Base] - url : str - ''' - charm_origin_ = CharmOrigin.from_json(charm_origin) if charm_origin else None - error_ = Error.from_json(error) if error else None - supported_bases_ = [Base.from_json(o) for o in supported_bases or []] - url_ = url - - # Validate arguments against known Juju API types. - if charm_origin_ is not None and not isinstance(charm_origin_, (dict, CharmOrigin)): - raise Exception("Expected charm_origin_ to be a CharmOrigin, received: {}".format(type(charm_origin_))) - - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - - if supported_bases_ is not None and not isinstance(supported_bases_, (bytes, str, list)): - raise Exception("Expected supported_bases_ to be a Sequence, received: {}".format(type(supported_bases_))) - - if url_ is not None and not isinstance(url_, (bytes, str)): - raise Exception("Expected url_ to be a str, received: {}".format(type(url_))) - - self.charm_origin = charm_origin_ - self.error = error_ - self.supported_bases = supported_bases_ - self.url = url_ - self.unknown_fields = unknown_fields - - - -class ResolveCharmWithChannelResults(Type): - _toSchema = {'results': 'Results'} - _toPy = {'Results': 'results'} - def __init__(self, results=None, **unknown_fields): - ''' - results : typing.Sequence[~ResolveCharmWithChannelResult] - ''' - results_ = [ResolveCharmWithChannelResult.from_json(o) for o in results or []] - - # Validate arguments against known Juju API types. - if results_ is not None and not isinstance(results_, (bytes, str, list)): - raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) - - self.results = results_ - self.unknown_fields = unknown_fields - - - -class ResolveCharmsWithChannel(Type): - _toSchema = {'macaroon': 'macaroon', 'resolve': 'resolve'} - _toPy = {'macaroon': 'macaroon', 'resolve': 'resolve'} - def __init__(self, macaroon=None, resolve=None, **unknown_fields): - ''' - macaroon : Macaroon - resolve : typing.Sequence[~ResolveCharmWithChannel] - ''' - macaroon_ = Macaroon.from_json(macaroon) if macaroon else None - resolve_ = [ResolveCharmWithChannel.from_json(o) for o in resolve or []] - - # Validate arguments against known Juju API types. - if macaroon_ is not None and not isinstance(macaroon_, (dict, Macaroon)): - raise Exception("Expected macaroon_ to be a Macaroon, received: {}".format(type(macaroon_))) - - if resolve_ is not None and not isinstance(resolve_, (bytes, str, list)): - raise Exception("Expected resolve_ to be a Sequence, received: {}".format(type(resolve_))) - - self.macaroon = macaroon_ - self.resolve = resolve_ - self.unknown_fields = unknown_fields - - - -class ResolvedModeResult(Type): - _toSchema = {'error': 'error', 'mode': 'mode'} - _toPy = {'error': 'error', 'mode': 'mode'} - def __init__(self, error=None, mode=None, **unknown_fields): - ''' - error : Error - mode : str - ''' - error_ = Error.from_json(error) if error else None - mode_ = mode - - # Validate arguments against known Juju API types. - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - - if mode_ is not None and not isinstance(mode_, (bytes, str)): - raise Exception("Expected mode_ to be a str, received: {}".format(type(mode_))) - - self.error = error_ - self.mode = mode_ - self.unknown_fields = unknown_fields - - - -class ResolvedModeResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None, **unknown_fields): - ''' - results : typing.Sequence[~ResolvedModeResult] - ''' - results_ = [ResolvedModeResult.from_json(o) for o in results or []] - - # Validate arguments against known Juju API types. - if results_ is not None and not isinstance(results_, (bytes, str, list)): - raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) - - self.results = results_ - self.unknown_fields = unknown_fields - - - -class Resource(Type): - _toSchema = {'application': 'application', 'charmresource': 'CharmResource', 'description': 'description', 'fingerprint': 'fingerprint', 'id_': 'id', 'name': 'name', 'origin': 'origin', 'path': 'path', 'pending_id': 'pending-id', 'revision': 'revision', 'size': 'size', 'timestamp': 'timestamp', 'type_': 'type', 'username': 'username'} - _toPy = {'CharmResource': 'charmresource', 'application': 'application', 'description': 'description', 'fingerprint': 'fingerprint', 'id': 'id_', 'name': 'name', 'origin': 'origin', 'path': 'path', 'pending-id': 'pending_id', 'revision': 'revision', 'size': 'size', 'timestamp': 'timestamp', 'type': 'type_', 'username': 'username'} - def __init__(self, charmresource=None, application=None, description=None, fingerprint=None, id_=None, name=None, origin=None, path=None, pending_id=None, revision=None, size=None, timestamp=None, type_=None, username=None, **unknown_fields): - ''' - charmresource : CharmResource - application : str - description : str - fingerprint : typing.Sequence[int] - id_ : str - name : str - origin : str - path : str - pending_id : str - revision : int - size : int - timestamp : str - type_ : str - username : str - ''' - charmresource_ = CharmResource.from_json(charmresource) if charmresource else None - application_ = application - description_ = description - fingerprint_ = fingerprint - id__ = id_ - name_ = name - origin_ = origin - path_ = path - pending_id_ = pending_id - revision_ = revision - size_ = size - timestamp_ = timestamp - type__ = type_ - username_ = username - - # Validate arguments against known Juju API types. - if charmresource_ is not None and not isinstance(charmresource_, (dict, CharmResource)): - raise Exception("Expected charmresource_ to be a CharmResource, received: {}".format(type(charmresource_))) - - if application_ is not None and not isinstance(application_, (bytes, str)): - raise Exception("Expected application_ to be a str, received: {}".format(type(application_))) - - if description_ is not None and not isinstance(description_, (bytes, str)): - raise Exception("Expected description_ to be a str, received: {}".format(type(description_))) - - if fingerprint_ is not None and not isinstance(fingerprint_, (bytes, str, list)): - raise Exception("Expected fingerprint_ to be a Sequence, received: {}".format(type(fingerprint_))) - - if id__ is not None and not isinstance(id__, (bytes, str)): - raise Exception("Expected id__ to be a str, received: {}".format(type(id__))) - - if name_ is not None and not isinstance(name_, (bytes, str)): - raise Exception("Expected name_ to be a str, received: {}".format(type(name_))) - - if origin_ is not None and not isinstance(origin_, (bytes, str)): - raise Exception("Expected origin_ to be a str, received: {}".format(type(origin_))) - - if path_ is not None and not isinstance(path_, (bytes, str)): - raise Exception("Expected path_ to be a str, received: {}".format(type(path_))) - - if pending_id_ is not None and not isinstance(pending_id_, (bytes, str)): - raise Exception("Expected pending_id_ to be a str, received: {}".format(type(pending_id_))) - - if revision_ is not None and not isinstance(revision_, int): - raise Exception("Expected revision_ to be a int, received: {}".format(type(revision_))) - - if size_ is not None and not isinstance(size_, int): - raise Exception("Expected size_ to be a int, received: {}".format(type(size_))) - - if timestamp_ is not None and not isinstance(timestamp_, (bytes, str)): - raise Exception("Expected timestamp_ to be a str, received: {}".format(type(timestamp_))) - - if type__ is not None and not isinstance(type__, (bytes, str)): - raise Exception("Expected type__ to be a str, received: {}".format(type(type__))) - - if username_ is not None and not isinstance(username_, (bytes, str)): - raise Exception("Expected username_ to be a str, received: {}".format(type(username_))) - - self.charmresource = charmresource_ - self.application = application_ - self.description = description_ - self.fingerprint = fingerprint_ - self.id_ = id__ - self.name = name_ - self.origin = origin_ - self.path = path_ - self.pending_id = pending_id_ - self.revision = revision_ - self.size = size_ - self.timestamp = timestamp_ - self.type_ = type__ - self.username = username_ - self.unknown_fields = unknown_fields - - - -class ResourcesResult(Type): - _toSchema = {'charm_store_resources': 'charm-store-resources', 'error': 'error', 'errorresult': 'ErrorResult', 'resources': 'resources', 'unit_resources': 'unit-resources'} - _toPy = {'ErrorResult': 'errorresult', 'charm-store-resources': 'charm_store_resources', 'error': 'error', 'resources': 'resources', 'unit-resources': 'unit_resources'} - def __init__(self, errorresult=None, charm_store_resources=None, error=None, resources=None, unit_resources=None, **unknown_fields): - ''' - errorresult : ErrorResult - charm_store_resources : typing.Sequence[~CharmResource] - error : Error - resources : typing.Sequence[~Resource] - unit_resources : typing.Sequence[~UnitResources] - ''' - errorresult_ = ErrorResult.from_json(errorresult) if errorresult else None - charm_store_resources_ = [CharmResource.from_json(o) for o in charm_store_resources or []] - error_ = Error.from_json(error) if error else None - resources_ = [Resource.from_json(o) for o in resources or []] - unit_resources_ = [UnitResources.from_json(o) for o in unit_resources or []] - - # Validate arguments against known Juju API types. - if errorresult_ is not None and not isinstance(errorresult_, (dict, ErrorResult)): - raise Exception("Expected errorresult_ to be a ErrorResult, received: {}".format(type(errorresult_))) - - if charm_store_resources_ is not None and not isinstance(charm_store_resources_, (bytes, str, list)): - raise Exception("Expected charm_store_resources_ to be a Sequence, received: {}".format(type(charm_store_resources_))) - - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - - if resources_ is not None and not isinstance(resources_, (bytes, str, list)): - raise Exception("Expected resources_ to be a Sequence, received: {}".format(type(resources_))) - - if unit_resources_ is not None and not isinstance(unit_resources_, (bytes, str, list)): - raise Exception("Expected unit_resources_ to be a Sequence, received: {}".format(type(unit_resources_))) - - self.errorresult = errorresult_ - self.charm_store_resources = charm_store_resources_ - self.error = error_ - self.resources = resources_ - self.unit_resources = unit_resources_ - self.unknown_fields = unknown_fields - - - -class ResourcesResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None, **unknown_fields): - ''' - results : typing.Sequence[~ResourcesResult] - ''' - results_ = [ResourcesResult.from_json(o) for o in results or []] - - # Validate arguments against known Juju API types. - if results_ is not None and not isinstance(results_, (bytes, str, list)): - raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) - - self.results = results_ - self.unknown_fields = unknown_fields - - - -class RetryProvisioningArgs(Type): - _toSchema = {'all_': 'all', 'machines': 'machines'} - _toPy = {'all': 'all_', 'machines': 'machines'} - def __init__(self, all_=None, machines=None, **unknown_fields): - ''' - all_ : bool - machines : typing.Sequence[str] - ''' - all__ = all_ - machines_ = machines - - # Validate arguments against known Juju API types. - if all__ is not None and not isinstance(all__, bool): - raise Exception("Expected all__ to be a bool, received: {}".format(type(all__))) - - if machines_ is not None and not isinstance(machines_, (bytes, str, list)): - raise Exception("Expected machines_ to be a Sequence, received: {}".format(type(machines_))) - - self.all_ = all__ - self.machines = machines_ - self.unknown_fields = unknown_fields - - - -class RetryStrategy(Type): - _toSchema = {'jitter_retry_time': 'jitter-retry-time', 'max_retry_time': 'max-retry-time', 'min_retry_time': 'min-retry-time', 'retry_time_factor': 'retry-time-factor', 'should_retry': 'should-retry'} - _toPy = {'jitter-retry-time': 'jitter_retry_time', 'max-retry-time': 'max_retry_time', 'min-retry-time': 'min_retry_time', 'retry-time-factor': 'retry_time_factor', 'should-retry': 'should_retry'} - def __init__(self, jitter_retry_time=None, max_retry_time=None, min_retry_time=None, retry_time_factor=None, should_retry=None, **unknown_fields): - ''' - jitter_retry_time : bool - max_retry_time : int - min_retry_time : int - retry_time_factor : int - should_retry : bool - ''' - jitter_retry_time_ = jitter_retry_time - max_retry_time_ = max_retry_time - min_retry_time_ = min_retry_time - retry_time_factor_ = retry_time_factor - should_retry_ = should_retry - - # Validate arguments against known Juju API types. - if jitter_retry_time_ is not None and not isinstance(jitter_retry_time_, bool): - raise Exception("Expected jitter_retry_time_ to be a bool, received: {}".format(type(jitter_retry_time_))) - - if max_retry_time_ is not None and not isinstance(max_retry_time_, int): - raise Exception("Expected max_retry_time_ to be a int, received: {}".format(type(max_retry_time_))) - - if min_retry_time_ is not None and not isinstance(min_retry_time_, int): - raise Exception("Expected min_retry_time_ to be a int, received: {}".format(type(min_retry_time_))) - - if retry_time_factor_ is not None and not isinstance(retry_time_factor_, int): - raise Exception("Expected retry_time_factor_ to be a int, received: {}".format(type(retry_time_factor_))) - - if should_retry_ is not None and not isinstance(should_retry_, bool): - raise Exception("Expected should_retry_ to be a bool, received: {}".format(type(should_retry_))) - - self.jitter_retry_time = jitter_retry_time_ - self.max_retry_time = max_retry_time_ - self.min_retry_time = min_retry_time_ - self.retry_time_factor = retry_time_factor_ - self.should_retry = should_retry_ - self.unknown_fields = unknown_fields - - - -class RetryStrategyResult(Type): - _toSchema = {'error': 'error', 'result': 'result'} - _toPy = {'error': 'error', 'result': 'result'} - def __init__(self, error=None, result=None, **unknown_fields): +class ModelEntityCount(Type): + _toSchema = {'count': 'count', 'entity': 'entity'} + _toPy = {'count': 'count', 'entity': 'entity'} + def __init__(self, count=None, entity=None, **unknown_fields): ''' - error : Error - result : RetryStrategy + count : int + entity : str ''' - error_ = Error.from_json(error) if error else None - result_ = RetryStrategy.from_json(result) if result else None + count_ = count + entity_ = entity # Validate arguments against known Juju API types. - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) + if count_ is not None and not isinstance(count_, int): + raise Exception("Expected count_ to be a int, received: {}".format(type(count_))) - if result_ is not None and not isinstance(result_, (dict, RetryStrategy)): - raise Exception("Expected result_ to be a RetryStrategy, received: {}".format(type(result_))) + if entity_ is not None and not isinstance(entity_, (bytes, str)): + raise Exception("Expected entity_ to be a str, received: {}".format(type(entity_))) - self.error = error_ - self.result = result_ + self.count = count_ + self.entity = entity_ self.unknown_fields = unknown_fields -class RetryStrategyResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None, **unknown_fields): +class ModelFilesystemInfo(Type): + _toSchema = {'detachable': 'detachable', 'id_': 'id', 'message': 'message', 'provider_id': 'provider-id', 'status': 'status'} + _toPy = {'detachable': 'detachable', 'id': 'id_', 'message': 'message', 'provider-id': 'provider_id', 'status': 'status'} + def __init__(self, detachable=None, id_=None, message=None, provider_id=None, status=None, **unknown_fields): ''' - results : typing.Sequence[~RetryStrategyResult] + detachable : bool + id_ : str + message : str + provider_id : str + status : str ''' - results_ = [RetryStrategyResult.from_json(o) for o in results or []] + detachable_ = detachable + id__ = id_ + message_ = message + provider_id_ = provider_id + status_ = status # Validate arguments against known Juju API types. - if results_ is not None and not isinstance(results_, (bytes, str, list)): - raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) - - self.results = results_ - self.unknown_fields = unknown_fields - + if detachable_ is not None and not isinstance(detachable_, bool): + raise Exception("Expected detachable_ to be a bool, received: {}".format(type(detachable_))) + if id__ is not None and not isinstance(id__, (bytes, str)): + raise Exception("Expected id__ to be a str, received: {}".format(type(id__))) -class RevokeCredentialArg(Type): - _toSchema = {'force': 'force', 'tag': 'tag'} - _toPy = {'force': 'force', 'tag': 'tag'} - def __init__(self, force=None, tag=None, **unknown_fields): - ''' - force : bool - tag : str - ''' - force_ = force - tag_ = tag + if message_ is not None and not isinstance(message_, (bytes, str)): + raise Exception("Expected message_ to be a str, received: {}".format(type(message_))) - # Validate arguments against known Juju API types. - if force_ is not None and not isinstance(force_, bool): - raise Exception("Expected force_ to be a bool, received: {}".format(type(force_))) + if provider_id_ is not None and not isinstance(provider_id_, (bytes, str)): + raise Exception("Expected provider_id_ to be a str, received: {}".format(type(provider_id_))) - if tag_ is not None and not isinstance(tag_, (bytes, str)): - raise Exception("Expected tag_ to be a str, received: {}".format(type(tag_))) + if status_ is not None and not isinstance(status_, (bytes, str)): + raise Exception("Expected status_ to be a str, received: {}".format(type(status_))) - self.force = force_ - self.tag = tag_ + self.detachable = detachable_ + self.id_ = id__ + self.message = message_ + self.provider_id = provider_id_ + self.status = status_ self.unknown_fields = unknown_fields -class RevokeCredentialArgs(Type): - _toSchema = {'credentials': 'credentials'} - _toPy = {'credentials': 'credentials'} - def __init__(self, credentials=None, **unknown_fields): +class ModelInfo(Type): + _toSchema = {'agent_version': 'agent-version', 'cloud_credential_tag': 'cloud-credential-tag', 'cloud_credential_validity': 'cloud-credential-validity', 'cloud_region': 'cloud-region', 'cloud_tag': 'cloud-tag', 'controller_uuid': 'controller-uuid', 'default_base': 'default-base', 'default_series': 'default-series', 'is_controller': 'is-controller', 'life': 'life', 'machines': 'machines', 'migration': 'migration', 'name': 'name', 'owner_tag': 'owner-tag', 'provider_type': 'provider-type', 'secret_backends': 'secret-backends', 'sla': 'sla', 'status': 'status', 'supported_features': 'supported-features', 'type_': 'type', 'users': 'users', 'uuid': 'uuid'} + _toPy = {'agent-version': 'agent_version', 'cloud-credential-tag': 'cloud_credential_tag', 'cloud-credential-validity': 'cloud_credential_validity', 'cloud-region': 'cloud_region', 'cloud-tag': 'cloud_tag', 'controller-uuid': 'controller_uuid', 'default-base': 'default_base', 'default-series': 'default_series', 'is-controller': 'is_controller', 'life': 'life', 'machines': 'machines', 'migration': 'migration', 'name': 'name', 'owner-tag': 'owner_tag', 'provider-type': 'provider_type', 'secret-backends': 'secret_backends', 'sla': 'sla', 'status': 'status', 'supported-features': 'supported_features', 'type': 'type_', 'users': 'users', 'uuid': 'uuid'} + def __init__(self, agent_version=None, cloud_credential_tag=None, cloud_credential_validity=None, cloud_region=None, cloud_tag=None, controller_uuid=None, default_base=None, default_series=None, is_controller=None, life=None, machines=None, migration=None, name=None, owner_tag=None, provider_type=None, secret_backends=None, sla=None, status=None, supported_features=None, type_=None, users=None, uuid=None, **unknown_fields): ''' - credentials : typing.Sequence[~RevokeCredentialArg] + agent_version : Number + cloud_credential_tag : str + cloud_credential_validity : bool + cloud_region : str + cloud_tag : str + controller_uuid : str + default_base : str + default_series : str + is_controller : bool + life : str + machines : typing.Sequence[~ModelMachineInfo] + migration : ModelMigrationStatus + name : str + owner_tag : str + provider_type : str + secret_backends : typing.Sequence[~SecretBackendResult] + sla : ModelSLAInfo + status : EntityStatus + supported_features : typing.Sequence[~SupportedFeature] + type_ : str + users : typing.Sequence[~ModelUserInfo] + uuid : str ''' - credentials_ = [RevokeCredentialArg.from_json(o) for o in credentials or []] - - # Validate arguments against known Juju API types. - if credentials_ is not None and not isinstance(credentials_, (bytes, str, list)): - raise Exception("Expected credentials_ to be a Sequence, received: {}".format(type(credentials_))) - - self.credentials = credentials_ - self.unknown_fields = unknown_fields - + agent_version_ = Number.from_json(agent_version) if agent_version else None + cloud_credential_tag_ = cloud_credential_tag + cloud_credential_validity_ = cloud_credential_validity + cloud_region_ = cloud_region + cloud_tag_ = cloud_tag + controller_uuid_ = controller_uuid + default_base_ = default_base + default_series_ = default_series + is_controller_ = is_controller + life_ = life + machines_ = [ModelMachineInfo.from_json(o) for o in machines or []] + migration_ = ModelMigrationStatus.from_json(migration) if migration else None + name_ = name + owner_tag_ = owner_tag + provider_type_ = provider_type + secret_backends_ = [SecretBackendResult.from_json(o) for o in secret_backends or []] + sla_ = ModelSLAInfo.from_json(sla) if sla else None + status_ = EntityStatus.from_json(status) if status else None + supported_features_ = [SupportedFeature.from_json(o) for o in supported_features or []] + type__ = type_ + users_ = [ModelUserInfo.from_json(o) for o in users or []] + uuid_ = uuid + # Validate arguments against known Juju API types. + if agent_version_ is not None and not isinstance(agent_version_, (dict, Number)): + raise Exception("Expected agent_version_ to be a Number, received: {}".format(type(agent_version_))) -class RotateSecretBackendArgs(Type): - _toSchema = {'backend_ids': 'backend-ids'} - _toPy = {'backend-ids': 'backend_ids'} - def __init__(self, backend_ids=None, **unknown_fields): - ''' - backend_ids : typing.Sequence[str] - ''' - backend_ids_ = backend_ids + if cloud_credential_tag_ is not None and not isinstance(cloud_credential_tag_, (bytes, str)): + raise Exception("Expected cloud_credential_tag_ to be a str, received: {}".format(type(cloud_credential_tag_))) - # Validate arguments against known Juju API types. - if backend_ids_ is not None and not isinstance(backend_ids_, (bytes, str, list)): - raise Exception("Expected backend_ids_ to be a Sequence, received: {}".format(type(backend_ids_))) + if cloud_credential_validity_ is not None and not isinstance(cloud_credential_validity_, bool): + raise Exception("Expected cloud_credential_validity_ to be a bool, received: {}".format(type(cloud_credential_validity_))) - self.backend_ids = backend_ids_ - self.unknown_fields = unknown_fields + if cloud_region_ is not None and not isinstance(cloud_region_, (bytes, str)): + raise Exception("Expected cloud_region_ to be a str, received: {}".format(type(cloud_region_))) + if cloud_tag_ is not None and not isinstance(cloud_tag_, (bytes, str)): + raise Exception("Expected cloud_tag_ to be a str, received: {}".format(type(cloud_tag_))) + if controller_uuid_ is not None and not isinstance(controller_uuid_, (bytes, str)): + raise Exception("Expected controller_uuid_ to be a str, received: {}".format(type(controller_uuid_))) -class RunParams(Type): - _toSchema = {'applications': 'applications', 'commands': 'commands', 'execution_group': 'execution-group', 'machines': 'machines', 'parallel': 'parallel', 'timeout': 'timeout', 'units': 'units', 'workload_context': 'workload-context'} - _toPy = {'applications': 'applications', 'commands': 'commands', 'execution-group': 'execution_group', 'machines': 'machines', 'parallel': 'parallel', 'timeout': 'timeout', 'units': 'units', 'workload-context': 'workload_context'} - def __init__(self, applications=None, commands=None, execution_group=None, machines=None, parallel=None, timeout=None, units=None, workload_context=None, **unknown_fields): - ''' - applications : typing.Sequence[str] - commands : str - execution_group : str - machines : typing.Sequence[str] - parallel : bool - timeout : int - units : typing.Sequence[str] - workload_context : bool - ''' - applications_ = applications - commands_ = commands - execution_group_ = execution_group - machines_ = machines - parallel_ = parallel - timeout_ = timeout - units_ = units - workload_context_ = workload_context + if default_base_ is not None and not isinstance(default_base_, (bytes, str)): + raise Exception("Expected default_base_ to be a str, received: {}".format(type(default_base_))) - # Validate arguments against known Juju API types. - if applications_ is not None and not isinstance(applications_, (bytes, str, list)): - raise Exception("Expected applications_ to be a Sequence, received: {}".format(type(applications_))) + if default_series_ is not None and not isinstance(default_series_, (bytes, str)): + raise Exception("Expected default_series_ to be a str, received: {}".format(type(default_series_))) - if commands_ is not None and not isinstance(commands_, (bytes, str)): - raise Exception("Expected commands_ to be a str, received: {}".format(type(commands_))) + if is_controller_ is not None and not isinstance(is_controller_, bool): + raise Exception("Expected is_controller_ to be a bool, received: {}".format(type(is_controller_))) - if execution_group_ is not None and not isinstance(execution_group_, (bytes, str)): - raise Exception("Expected execution_group_ to be a str, received: {}".format(type(execution_group_))) + if life_ is not None and not isinstance(life_, (bytes, str)): + raise Exception("Expected life_ to be a str, received: {}".format(type(life_))) if machines_ is not None and not isinstance(machines_, (bytes, str, list)): raise Exception("Expected machines_ to be a Sequence, received: {}".format(type(machines_))) - if parallel_ is not None and not isinstance(parallel_, bool): - raise Exception("Expected parallel_ to be a bool, received: {}".format(type(parallel_))) - - if timeout_ is not None and not isinstance(timeout_, int): - raise Exception("Expected timeout_ to be a int, received: {}".format(type(timeout_))) - - if units_ is not None and not isinstance(units_, (bytes, str, list)): - raise Exception("Expected units_ to be a Sequence, received: {}".format(type(units_))) - - if workload_context_ is not None and not isinstance(workload_context_, bool): - raise Exception("Expected workload_context_ to be a bool, received: {}".format(type(workload_context_))) - - self.applications = applications_ - self.commands = commands_ - self.execution_group = execution_group_ - self.machines = machines_ - self.parallel = parallel_ - self.timeout = timeout_ - self.units = units_ - self.workload_context = workload_context_ - self.unknown_fields = unknown_fields + if migration_ is not None and not isinstance(migration_, (dict, ModelMigrationStatus)): + raise Exception("Expected migration_ to be a ModelMigrationStatus, received: {}".format(type(migration_))) + if name_ is not None and not isinstance(name_, (bytes, str)): + raise Exception("Expected name_ to be a str, received: {}".format(type(name_))) + if owner_tag_ is not None and not isinstance(owner_tag_, (bytes, str)): + raise Exception("Expected owner_tag_ to be a str, received: {}".format(type(owner_tag_))) -class SSHAddressResult(Type): - _toSchema = {'address': 'address', 'error': 'error'} - _toPy = {'address': 'address', 'error': 'error'} - def __init__(self, address=None, error=None, **unknown_fields): - ''' - address : str - error : Error - ''' - address_ = address - error_ = Error.from_json(error) if error else None + if provider_type_ is not None and not isinstance(provider_type_, (bytes, str)): + raise Exception("Expected provider_type_ to be a str, received: {}".format(type(provider_type_))) - # Validate arguments against known Juju API types. - if address_ is not None and not isinstance(address_, (bytes, str)): - raise Exception("Expected address_ to be a str, received: {}".format(type(address_))) + if secret_backends_ is not None and not isinstance(secret_backends_, (bytes, str, list)): + raise Exception("Expected secret_backends_ to be a Sequence, received: {}".format(type(secret_backends_))) - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) + if sla_ is not None and not isinstance(sla_, (dict, ModelSLAInfo)): + raise Exception("Expected sla_ to be a ModelSLAInfo, received: {}".format(type(sla_))) - self.address = address_ - self.error = error_ - self.unknown_fields = unknown_fields + if status_ is not None and not isinstance(status_, (dict, EntityStatus)): + raise Exception("Expected status_ to be a EntityStatus, received: {}".format(type(status_))) + if supported_features_ is not None and not isinstance(supported_features_, (bytes, str, list)): + raise Exception("Expected supported_features_ to be a Sequence, received: {}".format(type(supported_features_))) + if type__ is not None and not isinstance(type__, (bytes, str)): + raise Exception("Expected type__ to be a str, received: {}".format(type(type__))) -class SSHAddressResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None, **unknown_fields): - ''' - results : typing.Sequence[~SSHAddressResult] - ''' - results_ = [SSHAddressResult.from_json(o) for o in results or []] + if users_ is not None and not isinstance(users_, (bytes, str, list)): + raise Exception("Expected users_ to be a Sequence, received: {}".format(type(users_))) - # Validate arguments against known Juju API types. - if results_ is not None and not isinstance(results_, (bytes, str, list)): - raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) + if uuid_ is not None and not isinstance(uuid_, (bytes, str)): + raise Exception("Expected uuid_ to be a str, received: {}".format(type(uuid_))) - self.results = results_ + self.agent_version = agent_version_ + self.cloud_credential_tag = cloud_credential_tag_ + self.cloud_credential_validity = cloud_credential_validity_ + self.cloud_region = cloud_region_ + self.cloud_tag = cloud_tag_ + self.controller_uuid = controller_uuid_ + self.default_base = default_base_ + self.default_series = default_series_ + self.is_controller = is_controller_ + self.life = life_ + self.machines = machines_ + self.migration = migration_ + self.name = name_ + self.owner_tag = owner_tag_ + self.provider_type = provider_type_ + self.secret_backends = secret_backends_ + self.sla = sla_ + self.status = status_ + self.supported_features = supported_features_ + self.type_ = type__ + self.users = users_ + self.uuid = uuid_ self.unknown_fields = unknown_fields -class SSHAddressesResult(Type): - _toSchema = {'addresses': 'addresses', 'error': 'error'} - _toPy = {'addresses': 'addresses', 'error': 'error'} - def __init__(self, addresses=None, error=None, **unknown_fields): +class ModelInfoResult(Type): + _toSchema = {'error': 'error', 'result': 'result'} + _toPy = {'error': 'error', 'result': 'result'} + def __init__(self, error=None, result=None, **unknown_fields): ''' - addresses : typing.Sequence[str] error : Error + result : ModelInfo ''' - addresses_ = addresses error_ = Error.from_json(error) if error else None + result_ = ModelInfo.from_json(result) if result else None # Validate arguments against known Juju API types. - if addresses_ is not None and not isinstance(addresses_, (bytes, str, list)): - raise Exception("Expected addresses_ to be a Sequence, received: {}".format(type(addresses_))) - if error_ is not None and not isinstance(error_, (dict, Error)): raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - self.addresses = addresses_ + if result_ is not None and not isinstance(result_, (dict, ModelInfo)): + raise Exception("Expected result_ to be a ModelInfo, received: {}".format(type(result_))) + self.error = error_ + self.result = result_ self.unknown_fields = unknown_fields -class SSHAddressesResults(Type): +class ModelInfoResults(Type): _toSchema = {'results': 'results'} _toPy = {'results': 'results'} def __init__(self, results=None, **unknown_fields): ''' - results : typing.Sequence[~SSHAddressesResult] + results : typing.Sequence[~ModelInfoResult] ''' - results_ = [SSHAddressesResult.from_json(o) for o in results or []] + results_ = [ModelInfoResult.from_json(o) for o in results or []] # Validate arguments against known Juju API types. if results_ is not None and not isinstance(results_, (bytes, str, list)): @@ -21539,596 +9975,602 @@ def __init__(self, results=None, **unknown_fields): -class SSHHostKeySet(Type): - _toSchema = {'entity_keys': 'entity-keys'} - _toPy = {'entity-keys': 'entity_keys'} - def __init__(self, entity_keys=None, **unknown_fields): +class ModelInstanceTypesConstraint(Type): + _toSchema = {'value': 'value'} + _toPy = {'value': 'value'} + def __init__(self, value=None, **unknown_fields): ''' - entity_keys : typing.Sequence[~SSHHostKeys] + value : Value ''' - entity_keys_ = [SSHHostKeys.from_json(o) for o in entity_keys or []] + value_ = Value.from_json(value) if value else None # Validate arguments against known Juju API types. - if entity_keys_ is not None and not isinstance(entity_keys_, (bytes, str, list)): - raise Exception("Expected entity_keys_ to be a Sequence, received: {}".format(type(entity_keys_))) + if value_ is not None and not isinstance(value_, (dict, Value)): + raise Exception("Expected value_ to be a Value, received: {}".format(type(value_))) - self.entity_keys = entity_keys_ + self.value = value_ self.unknown_fields = unknown_fields -class SSHHostKeys(Type): - _toSchema = {'public_keys': 'public-keys', 'tag': 'tag'} - _toPy = {'public-keys': 'public_keys', 'tag': 'tag'} - def __init__(self, public_keys=None, tag=None, **unknown_fields): +class ModelInstanceTypesConstraints(Type): + _toSchema = {'constraints': 'constraints'} + _toPy = {'constraints': 'constraints'} + def __init__(self, constraints=None, **unknown_fields): ''' - public_keys : typing.Sequence[str] - tag : str + constraints : typing.Sequence[~ModelInstanceTypesConstraint] ''' - public_keys_ = public_keys - tag_ = tag + constraints_ = [ModelInstanceTypesConstraint.from_json(o) for o in constraints or []] # Validate arguments against known Juju API types. - if public_keys_ is not None and not isinstance(public_keys_, (bytes, str, list)): - raise Exception("Expected public_keys_ to be a Sequence, received: {}".format(type(public_keys_))) - - if tag_ is not None and not isinstance(tag_, (bytes, str)): - raise Exception("Expected tag_ to be a str, received: {}".format(type(tag_))) + if constraints_ is not None and not isinstance(constraints_, (bytes, str, list)): + raise Exception("Expected constraints_ to be a Sequence, received: {}".format(type(constraints_))) - self.public_keys = public_keys_ - self.tag = tag_ + self.constraints = constraints_ self.unknown_fields = unknown_fields -class SSHProxyResult(Type): - _toSchema = {'use_proxy': 'use-proxy'} - _toPy = {'use-proxy': 'use_proxy'} - def __init__(self, use_proxy=None, **unknown_fields): +class ModelMachineInfo(Type): + _toSchema = {'display_name': 'display-name', 'ha_primary': 'ha-primary', 'hardware': 'hardware', 'has_vote': 'has-vote', 'id_': 'id', 'instance_id': 'instance-id', 'message': 'message', 'status': 'status', 'wants_vote': 'wants-vote'} + _toPy = {'display-name': 'display_name', 'ha-primary': 'ha_primary', 'hardware': 'hardware', 'has-vote': 'has_vote', 'id': 'id_', 'instance-id': 'instance_id', 'message': 'message', 'status': 'status', 'wants-vote': 'wants_vote'} + def __init__(self, display_name=None, ha_primary=None, hardware=None, has_vote=None, id_=None, instance_id=None, message=None, status=None, wants_vote=None, **unknown_fields): ''' - use_proxy : bool + display_name : str + ha_primary : bool + hardware : MachineHardware + has_vote : bool + id_ : str + instance_id : str + message : str + status : str + wants_vote : bool ''' - use_proxy_ = use_proxy + display_name_ = display_name + ha_primary_ = ha_primary + hardware_ = MachineHardware.from_json(hardware) if hardware else None + has_vote_ = has_vote + id__ = id_ + instance_id_ = instance_id + message_ = message + status_ = status + wants_vote_ = wants_vote # Validate arguments against known Juju API types. - if use_proxy_ is not None and not isinstance(use_proxy_, bool): - raise Exception("Expected use_proxy_ to be a bool, received: {}".format(type(use_proxy_))) - - self.use_proxy = use_proxy_ - self.unknown_fields = unknown_fields - - - -class SSHPublicKeysResult(Type): - _toSchema = {'error': 'error', 'public_keys': 'public-keys'} - _toPy = {'error': 'error', 'public-keys': 'public_keys'} - def __init__(self, error=None, public_keys=None, **unknown_fields): - ''' - error : Error - public_keys : typing.Sequence[str] - ''' - error_ = Error.from_json(error) if error else None - public_keys_ = public_keys + if display_name_ is not None and not isinstance(display_name_, (bytes, str)): + raise Exception("Expected display_name_ to be a str, received: {}".format(type(display_name_))) - # Validate arguments against known Juju API types. - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) + if ha_primary_ is not None and not isinstance(ha_primary_, bool): + raise Exception("Expected ha_primary_ to be a bool, received: {}".format(type(ha_primary_))) - if public_keys_ is not None and not isinstance(public_keys_, (bytes, str, list)): - raise Exception("Expected public_keys_ to be a Sequence, received: {}".format(type(public_keys_))) + if hardware_ is not None and not isinstance(hardware_, (dict, MachineHardware)): + raise Exception("Expected hardware_ to be a MachineHardware, received: {}".format(type(hardware_))) - self.error = error_ - self.public_keys = public_keys_ - self.unknown_fields = unknown_fields + if has_vote_ is not None and not isinstance(has_vote_, bool): + raise Exception("Expected has_vote_ to be a bool, received: {}".format(type(has_vote_))) + if id__ is not None and not isinstance(id__, (bytes, str)): + raise Exception("Expected id__ to be a str, received: {}".format(type(id__))) + if instance_id_ is not None and not isinstance(instance_id_, (bytes, str)): + raise Exception("Expected instance_id_ to be a str, received: {}".format(type(instance_id_))) -class SSHPublicKeysResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None, **unknown_fields): - ''' - results : typing.Sequence[~SSHPublicKeysResult] - ''' - results_ = [SSHPublicKeysResult.from_json(o) for o in results or []] + if message_ is not None and not isinstance(message_, (bytes, str)): + raise Exception("Expected message_ to be a str, received: {}".format(type(message_))) - # Validate arguments against known Juju API types. - if results_ is not None and not isinstance(results_, (bytes, str, list)): - raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) + if status_ is not None and not isinstance(status_, (bytes, str)): + raise Exception("Expected status_ to be a str, received: {}".format(type(status_))) - self.results = results_ + if wants_vote_ is not None and not isinstance(wants_vote_, bool): + raise Exception("Expected wants_vote_ to be a bool, received: {}".format(type(wants_vote_))) + + self.display_name = display_name_ + self.ha_primary = ha_primary_ + self.hardware = hardware_ + self.has_vote = has_vote_ + self.id_ = id__ + self.instance_id = instance_id_ + self.message = message_ + self.status = status_ + self.wants_vote = wants_vote_ self.unknown_fields = unknown_fields -class ScaleApplicationInfo(Type): - _toSchema = {'num_units': 'num-units'} - _toPy = {'num-units': 'num_units'} - def __init__(self, num_units=None, **unknown_fields): +class ModelMigrationStatus(Type): + _toSchema = {'end': 'end', 'start': 'start', 'status': 'status'} + _toPy = {'end': 'end', 'start': 'start', 'status': 'status'} + def __init__(self, end=None, start=None, status=None, **unknown_fields): ''' - num_units : int + end : str + start : str + status : str ''' - num_units_ = num_units + end_ = end + start_ = start + status_ = status # Validate arguments against known Juju API types. - if num_units_ is not None and not isinstance(num_units_, int): - raise Exception("Expected num_units_ to be a int, received: {}".format(type(num_units_))) + if end_ is not None and not isinstance(end_, (bytes, str)): + raise Exception("Expected end_ to be a str, received: {}".format(type(end_))) - self.num_units = num_units_ + if start_ is not None and not isinstance(start_, (bytes, str)): + raise Exception("Expected start_ to be a str, received: {}".format(type(start_))) + + if status_ is not None and not isinstance(status_, (bytes, str)): + raise Exception("Expected status_ to be a str, received: {}".format(type(status_))) + + self.end = end_ + self.start = start_ + self.status = status_ self.unknown_fields = unknown_fields -class ScaleApplicationParams(Type): - _toSchema = {'application_tag': 'application-tag', 'force': 'force', 'scale': 'scale', 'scale_change': 'scale-change'} - _toPy = {'application-tag': 'application_tag', 'force': 'force', 'scale': 'scale', 'scale-change': 'scale_change'} - def __init__(self, application_tag=None, force=None, scale=None, scale_change=None, **unknown_fields): +class ModelParam(Type): + _toSchema = {'model_tag': 'model-tag'} + _toPy = {'model-tag': 'model_tag'} + def __init__(self, model_tag=None, **unknown_fields): ''' - application_tag : str - force : bool - scale : int - scale_change : int + model_tag : str ''' - application_tag_ = application_tag - force_ = force - scale_ = scale - scale_change_ = scale_change + model_tag_ = model_tag # Validate arguments against known Juju API types. - if application_tag_ is not None and not isinstance(application_tag_, (bytes, str)): - raise Exception("Expected application_tag_ to be a str, received: {}".format(type(application_tag_))) - - if force_ is not None and not isinstance(force_, bool): - raise Exception("Expected force_ to be a bool, received: {}".format(type(force_))) - - if scale_ is not None and not isinstance(scale_, int): - raise Exception("Expected scale_ to be a int, received: {}".format(type(scale_))) - - if scale_change_ is not None and not isinstance(scale_change_, int): - raise Exception("Expected scale_change_ to be a int, received: {}".format(type(scale_change_))) + if model_tag_ is not None and not isinstance(model_tag_, (bytes, str)): + raise Exception("Expected model_tag_ to be a str, received: {}".format(type(model_tag_))) - self.application_tag = application_tag_ - self.force = force_ - self.scale = scale_ - self.scale_change = scale_change_ + self.model_tag = model_tag_ self.unknown_fields = unknown_fields -class ScaleApplicationResult(Type): - _toSchema = {'error': 'error', 'info': 'info'} - _toPy = {'error': 'error', 'info': 'info'} - def __init__(self, error=None, info=None, **unknown_fields): +class ModelSLA(Type): + _toSchema = {'creds': 'creds', 'level': 'level', 'modelslainfo': 'ModelSLAInfo', 'owner': 'owner'} + _toPy = {'ModelSLAInfo': 'modelslainfo', 'creds': 'creds', 'level': 'level', 'owner': 'owner'} + def __init__(self, modelslainfo=None, creds=None, level=None, owner=None, **unknown_fields): ''' - error : Error - info : ScaleApplicationInfo + modelslainfo : ModelSLAInfo + creds : typing.Sequence[int] + level : str + owner : str ''' - error_ = Error.from_json(error) if error else None - info_ = ScaleApplicationInfo.from_json(info) if info else None + modelslainfo_ = ModelSLAInfo.from_json(modelslainfo) if modelslainfo else None + creds_ = creds + level_ = level + owner_ = owner # Validate arguments against known Juju API types. - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) + if modelslainfo_ is not None and not isinstance(modelslainfo_, (dict, ModelSLAInfo)): + raise Exception("Expected modelslainfo_ to be a ModelSLAInfo, received: {}".format(type(modelslainfo_))) - if info_ is not None and not isinstance(info_, (dict, ScaleApplicationInfo)): - raise Exception("Expected info_ to be a ScaleApplicationInfo, received: {}".format(type(info_))) + if creds_ is not None and not isinstance(creds_, (bytes, str, list)): + raise Exception("Expected creds_ to be a Sequence, received: {}".format(type(creds_))) - self.error = error_ - self.info = info_ + if level_ is not None and not isinstance(level_, (bytes, str)): + raise Exception("Expected level_ to be a str, received: {}".format(type(level_))) + + if owner_ is not None and not isinstance(owner_, (bytes, str)): + raise Exception("Expected owner_ to be a str, received: {}".format(type(owner_))) + + self.modelslainfo = modelslainfo_ + self.creds = creds_ + self.level = level_ + self.owner = owner_ self.unknown_fields = unknown_fields -class ScaleApplicationResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None, **unknown_fields): +class ModelSLAInfo(Type): + _toSchema = {'level': 'level', 'owner': 'owner'} + _toPy = {'level': 'level', 'owner': 'owner'} + def __init__(self, level=None, owner=None, **unknown_fields): ''' - results : typing.Sequence[~ScaleApplicationResult] + level : str + owner : str ''' - results_ = [ScaleApplicationResult.from_json(o) for o in results or []] + level_ = level + owner_ = owner # Validate arguments against known Juju API types. - if results_ is not None and not isinstance(results_, (bytes, str, list)): - raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) + if level_ is not None and not isinstance(level_, (bytes, str)): + raise Exception("Expected level_ to be a str, received: {}".format(type(level_))) - self.results = results_ + if owner_ is not None and not isinstance(owner_, (bytes, str)): + raise Exception("Expected owner_ to be a str, received: {}".format(type(owner_))) + + self.level = level_ + self.owner = owner_ self.unknown_fields = unknown_fields -class ScaleApplicationsParams(Type): - _toSchema = {'applications': 'applications'} - _toPy = {'applications': 'applications'} - def __init__(self, applications=None, **unknown_fields): +class ModelSequencesResult(Type): + _toSchema = {'sequences': 'sequences'} + _toPy = {'sequences': 'sequences'} + def __init__(self, sequences=None, **unknown_fields): ''' - applications : typing.Sequence[~ScaleApplicationParams] + sequences : typing.Mapping[str, int] ''' - applications_ = [ScaleApplicationParams.from_json(o) for o in applications or []] + sequences_ = sequences # Validate arguments against known Juju API types. - if applications_ is not None and not isinstance(applications_, (bytes, str, list)): - raise Exception("Expected applications_ to be a Sequence, received: {}".format(type(applications_))) + if sequences_ is not None and not isinstance(sequences_, dict): + raise Exception("Expected sequences_ to be a Mapping, received: {}".format(type(sequences_))) - self.applications = applications_ + self.sequences = sequences_ self.unknown_fields = unknown_fields -class SecretBackend(Type): - _toSchema = {'backend_type': 'backend-type', 'config': 'config', 'name': 'name', 'token_rotate_interval': 'token-rotate-interval'} - _toPy = {'backend-type': 'backend_type', 'config': 'config', 'name': 'name', 'token-rotate-interval': 'token_rotate_interval'} - def __init__(self, backend_type=None, config=None, name=None, token_rotate_interval=None, **unknown_fields): +class ModelSet(Type): + _toSchema = {'config': 'config'} + _toPy = {'config': 'config'} + def __init__(self, config=None, **unknown_fields): ''' - backend_type : str config : typing.Mapping[str, typing.Any] - name : str - token_rotate_interval : int ''' - backend_type_ = backend_type config_ = config - name_ = name - token_rotate_interval_ = token_rotate_interval # Validate arguments against known Juju API types. - if backend_type_ is not None and not isinstance(backend_type_, (bytes, str)): - raise Exception("Expected backend_type_ to be a str, received: {}".format(type(backend_type_))) - if config_ is not None and not isinstance(config_, dict): raise Exception("Expected config_ to be a Mapping, received: {}".format(type(config_))) - if name_ is not None and not isinstance(name_, (bytes, str)): - raise Exception("Expected name_ to be a str, received: {}".format(type(name_))) - - if token_rotate_interval_ is not None and not isinstance(token_rotate_interval_, int): - raise Exception("Expected token_rotate_interval_ to be a int, received: {}".format(type(token_rotate_interval_))) - - self.backend_type = backend_type_ self.config = config_ - self.name = name_ - self.token_rotate_interval = token_rotate_interval_ self.unknown_fields = unknown_fields -class SecretBackendArgs(Type): - _toSchema = {'backend_ids': 'backend-ids', 'for_drain': 'for-drain'} - _toPy = {'backend-ids': 'backend_ids', 'for-drain': 'for_drain'} - def __init__(self, backend_ids=None, for_drain=None, **unknown_fields): +class ModelStatus(Type): + _toSchema = {'application_count': 'application-count', 'applications': 'applications', 'error': 'error', 'filesystems': 'filesystems', 'hosted_machine_count': 'hosted-machine-count', 'life': 'life', 'machines': 'machines', 'model_tag': 'model-tag', 'owner_tag': 'owner-tag', 'type_': 'type', 'unit_count': 'unit-count', 'volumes': 'volumes'} + _toPy = {'application-count': 'application_count', 'applications': 'applications', 'error': 'error', 'filesystems': 'filesystems', 'hosted-machine-count': 'hosted_machine_count', 'life': 'life', 'machines': 'machines', 'model-tag': 'model_tag', 'owner-tag': 'owner_tag', 'type': 'type_', 'unit-count': 'unit_count', 'volumes': 'volumes'} + def __init__(self, application_count=None, applications=None, error=None, filesystems=None, hosted_machine_count=None, life=None, machines=None, model_tag=None, owner_tag=None, type_=None, unit_count=None, volumes=None, **unknown_fields): ''' - backend_ids : typing.Sequence[str] - for_drain : bool + application_count : int + applications : typing.Sequence[~ModelApplicationInfo] + error : Error + filesystems : typing.Sequence[~ModelFilesystemInfo] + hosted_machine_count : int + life : str + machines : typing.Sequence[~ModelMachineInfo] + model_tag : str + owner_tag : str + type_ : str + unit_count : int + volumes : typing.Sequence[~ModelVolumeInfo] ''' - backend_ids_ = backend_ids - for_drain_ = for_drain + application_count_ = application_count + applications_ = [ModelApplicationInfo.from_json(o) for o in applications or []] + error_ = Error.from_json(error) if error else None + filesystems_ = [ModelFilesystemInfo.from_json(o) for o in filesystems or []] + hosted_machine_count_ = hosted_machine_count + life_ = life + machines_ = [ModelMachineInfo.from_json(o) for o in machines or []] + model_tag_ = model_tag + owner_tag_ = owner_tag + type__ = type_ + unit_count_ = unit_count + volumes_ = [ModelVolumeInfo.from_json(o) for o in volumes or []] # Validate arguments against known Juju API types. - if backend_ids_ is not None and not isinstance(backend_ids_, (bytes, str, list)): - raise Exception("Expected backend_ids_ to be a Sequence, received: {}".format(type(backend_ids_))) + if application_count_ is not None and not isinstance(application_count_, int): + raise Exception("Expected application_count_ to be a int, received: {}".format(type(application_count_))) + + if applications_ is not None and not isinstance(applications_, (bytes, str, list)): + raise Exception("Expected applications_ to be a Sequence, received: {}".format(type(applications_))) + + if error_ is not None and not isinstance(error_, (dict, Error)): + raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - if for_drain_ is not None and not isinstance(for_drain_, bool): - raise Exception("Expected for_drain_ to be a bool, received: {}".format(type(for_drain_))) + if filesystems_ is not None and not isinstance(filesystems_, (bytes, str, list)): + raise Exception("Expected filesystems_ to be a Sequence, received: {}".format(type(filesystems_))) - self.backend_ids = backend_ids_ - self.for_drain = for_drain_ - self.unknown_fields = unknown_fields + if hosted_machine_count_ is not None and not isinstance(hosted_machine_count_, int): + raise Exception("Expected hosted_machine_count_ to be a int, received: {}".format(type(hosted_machine_count_))) + if life_ is not None and not isinstance(life_, (bytes, str)): + raise Exception("Expected life_ to be a str, received: {}".format(type(life_))) + if machines_ is not None and not isinstance(machines_, (bytes, str, list)): + raise Exception("Expected machines_ to be a Sequence, received: {}".format(type(machines_))) -class SecretBackendConfig(Type): - _toSchema = {'params': 'params', 'type_': 'type'} - _toPy = {'params': 'params', 'type': 'type_'} - def __init__(self, params=None, type_=None, **unknown_fields): - ''' - params : typing.Mapping[str, typing.Any] - type_ : str - ''' - params_ = params - type__ = type_ + if model_tag_ is not None and not isinstance(model_tag_, (bytes, str)): + raise Exception("Expected model_tag_ to be a str, received: {}".format(type(model_tag_))) - # Validate arguments against known Juju API types. - if params_ is not None and not isinstance(params_, dict): - raise Exception("Expected params_ to be a Mapping, received: {}".format(type(params_))) + if owner_tag_ is not None and not isinstance(owner_tag_, (bytes, str)): + raise Exception("Expected owner_tag_ to be a str, received: {}".format(type(owner_tag_))) if type__ is not None and not isinstance(type__, (bytes, str)): raise Exception("Expected type__ to be a str, received: {}".format(type(type__))) - self.params = params_ + if unit_count_ is not None and not isinstance(unit_count_, int): + raise Exception("Expected unit_count_ to be a int, received: {}".format(type(unit_count_))) + + if volumes_ is not None and not isinstance(volumes_, (bytes, str, list)): + raise Exception("Expected volumes_ to be a Sequence, received: {}".format(type(volumes_))) + + self.application_count = application_count_ + self.applications = applications_ + self.error = error_ + self.filesystems = filesystems_ + self.hosted_machine_count = hosted_machine_count_ + self.life = life_ + self.machines = machines_ + self.model_tag = model_tag_ + self.owner_tag = owner_tag_ self.type_ = type__ + self.unit_count = unit_count_ + self.volumes = volumes_ self.unknown_fields = unknown_fields -class SecretBackendConfigResult(Type): - _toSchema = {'config': 'config', 'draining': 'draining', 'model_controller': 'model-controller', 'model_name': 'model-name', 'model_uuid': 'model-uuid'} - _toPy = {'config': 'config', 'draining': 'draining', 'model-controller': 'model_controller', 'model-name': 'model_name', 'model-uuid': 'model_uuid'} - def __init__(self, config=None, draining=None, model_controller=None, model_name=None, model_uuid=None, **unknown_fields): +class ModelStatusInfo(Type): + _toSchema = {'available_version': 'available-version', 'cloud_tag': 'cloud-tag', 'meter_status': 'meter-status', 'model_status': 'model-status', 'name': 'name', 'region': 'region', 'sla': 'sla', 'type_': 'type', 'version': 'version'} + _toPy = {'available-version': 'available_version', 'cloud-tag': 'cloud_tag', 'meter-status': 'meter_status', 'model-status': 'model_status', 'name': 'name', 'region': 'region', 'sla': 'sla', 'type': 'type_', 'version': 'version'} + def __init__(self, available_version=None, cloud_tag=None, meter_status=None, model_status=None, name=None, region=None, sla=None, type_=None, version=None, **unknown_fields): ''' - config : SecretBackendConfig - draining : bool - model_controller : str - model_name : str - model_uuid : str + available_version : str + cloud_tag : str + meter_status : MeterStatus + model_status : DetailedStatus + name : str + region : str + sla : str + type_ : str + version : str ''' - config_ = SecretBackendConfig.from_json(config) if config else None - draining_ = draining - model_controller_ = model_controller - model_name_ = model_name - model_uuid_ = model_uuid + available_version_ = available_version + cloud_tag_ = cloud_tag + meter_status_ = MeterStatus.from_json(meter_status) if meter_status else None + model_status_ = DetailedStatus.from_json(model_status) if model_status else None + name_ = name + region_ = region + sla_ = sla + type__ = type_ + version_ = version # Validate arguments against known Juju API types. - if config_ is not None and not isinstance(config_, (dict, SecretBackendConfig)): - raise Exception("Expected config_ to be a SecretBackendConfig, received: {}".format(type(config_))) - - if draining_ is not None and not isinstance(draining_, bool): - raise Exception("Expected draining_ to be a bool, received: {}".format(type(draining_))) - - if model_controller_ is not None and not isinstance(model_controller_, (bytes, str)): - raise Exception("Expected model_controller_ to be a str, received: {}".format(type(model_controller_))) + if available_version_ is not None and not isinstance(available_version_, (bytes, str)): + raise Exception("Expected available_version_ to be a str, received: {}".format(type(available_version_))) - if model_name_ is not None and not isinstance(model_name_, (bytes, str)): - raise Exception("Expected model_name_ to be a str, received: {}".format(type(model_name_))) + if cloud_tag_ is not None and not isinstance(cloud_tag_, (bytes, str)): + raise Exception("Expected cloud_tag_ to be a str, received: {}".format(type(cloud_tag_))) - if model_uuid_ is not None and not isinstance(model_uuid_, (bytes, str)): - raise Exception("Expected model_uuid_ to be a str, received: {}".format(type(model_uuid_))) + if meter_status_ is not None and not isinstance(meter_status_, (dict, MeterStatus)): + raise Exception("Expected meter_status_ to be a MeterStatus, received: {}".format(type(meter_status_))) - self.config = config_ - self.draining = draining_ - self.model_controller = model_controller_ - self.model_name = model_name_ - self.model_uuid = model_uuid_ - self.unknown_fields = unknown_fields + if model_status_ is not None and not isinstance(model_status_, (dict, DetailedStatus)): + raise Exception("Expected model_status_ to be a DetailedStatus, received: {}".format(type(model_status_))) + if name_ is not None and not isinstance(name_, (bytes, str)): + raise Exception("Expected name_ to be a str, received: {}".format(type(name_))) + if region_ is not None and not isinstance(region_, (bytes, str)): + raise Exception("Expected region_ to be a str, received: {}".format(type(region_))) -class SecretBackendConfigResults(Type): - _toSchema = {'active_id': 'active-id', 'results': 'results'} - _toPy = {'active-id': 'active_id', 'results': 'results'} - def __init__(self, active_id=None, results=None, **unknown_fields): - ''' - active_id : str - results : typing.Mapping[str, ~SecretBackendConfigResult] - ''' - active_id_ = active_id - results_ = {k: SecretBackendConfigResult.from_json(v) for k, v in (results or dict()).items()} + if sla_ is not None and not isinstance(sla_, (bytes, str)): + raise Exception("Expected sla_ to be a str, received: {}".format(type(sla_))) - # Validate arguments against known Juju API types. - if active_id_ is not None and not isinstance(active_id_, (bytes, str)): - raise Exception("Expected active_id_ to be a str, received: {}".format(type(active_id_))) + if type__ is not None and not isinstance(type__, (bytes, str)): + raise Exception("Expected type__ to be a str, received: {}".format(type(type__))) - if results_ is not None and not isinstance(results_, dict): - raise Exception("Expected results_ to be a Mapping, received: {}".format(type(results_))) + if version_ is not None and not isinstance(version_, (bytes, str)): + raise Exception("Expected version_ to be a str, received: {}".format(type(version_))) - self.active_id = active_id_ - self.results = results_ + self.available_version = available_version_ + self.cloud_tag = cloud_tag_ + self.meter_status = meter_status_ + self.model_status = model_status_ + self.name = name_ + self.region = region_ + self.sla = sla_ + self.type_ = type__ + self.version = version_ self.unknown_fields = unknown_fields -class SecretBackendResult(Type): - _toSchema = {'error': 'error', 'id_': 'id', 'message': 'message', 'num_secrets': 'num-secrets', 'result': 'result', 'status': 'status'} - _toPy = {'error': 'error', 'id': 'id_', 'message': 'message', 'num-secrets': 'num_secrets', 'result': 'result', 'status': 'status'} - def __init__(self, error=None, id_=None, message=None, num_secrets=None, result=None, status=None, **unknown_fields): +class ModelStatusResults(Type): + _toSchema = {'models': 'models'} + _toPy = {'models': 'models'} + def __init__(self, models=None, **unknown_fields): ''' - error : Error - id_ : str - message : str - num_secrets : int - result : SecretBackend - status : str + models : typing.Sequence[~ModelStatus] ''' - error_ = Error.from_json(error) if error else None - id__ = id_ - message_ = message - num_secrets_ = num_secrets - result_ = SecretBackend.from_json(result) if result else None - status_ = status + models_ = [ModelStatus.from_json(o) for o in models or []] # Validate arguments against known Juju API types. - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - - if id__ is not None and not isinstance(id__, (bytes, str)): - raise Exception("Expected id__ to be a str, received: {}".format(type(id__))) - - if message_ is not None and not isinstance(message_, (bytes, str)): - raise Exception("Expected message_ to be a str, received: {}".format(type(message_))) - - if num_secrets_ is not None and not isinstance(num_secrets_, int): - raise Exception("Expected num_secrets_ to be a int, received: {}".format(type(num_secrets_))) - - if result_ is not None and not isinstance(result_, (dict, SecretBackend)): - raise Exception("Expected result_ to be a SecretBackend, received: {}".format(type(result_))) - - if status_ is not None and not isinstance(status_, (bytes, str)): - raise Exception("Expected status_ to be a str, received: {}".format(type(status_))) + if models_ is not None and not isinstance(models_, (bytes, str, list)): + raise Exception("Expected models_ to be a Sequence, received: {}".format(type(models_))) - self.error = error_ - self.id_ = id__ - self.message = message_ - self.num_secrets = num_secrets_ - self.result = result_ - self.status = status_ + self.models = models_ self.unknown_fields = unknown_fields -class SecretBackendRotateChange(Type): - _toSchema = {'backend_name': 'backend-name', 'id_': 'id', 'next_trigger_time': 'next-trigger-time'} - _toPy = {'backend-name': 'backend_name', 'id': 'id_', 'next-trigger-time': 'next_trigger_time'} - def __init__(self, backend_name=None, id_=None, next_trigger_time=None, **unknown_fields): +class ModelSummariesRequest(Type): + _toSchema = {'all_': 'all', 'user_tag': 'user-tag'} + _toPy = {'all': 'all_', 'user-tag': 'user_tag'} + def __init__(self, all_=None, user_tag=None, **unknown_fields): ''' - backend_name : str - id_ : str - next_trigger_time : str + all_ : bool + user_tag : str ''' - backend_name_ = backend_name - id__ = id_ - next_trigger_time_ = next_trigger_time + all__ = all_ + user_tag_ = user_tag # Validate arguments against known Juju API types. - if backend_name_ is not None and not isinstance(backend_name_, (bytes, str)): - raise Exception("Expected backend_name_ to be a str, received: {}".format(type(backend_name_))) - - if id__ is not None and not isinstance(id__, (bytes, str)): - raise Exception("Expected id__ to be a str, received: {}".format(type(id__))) + if all__ is not None and not isinstance(all__, bool): + raise Exception("Expected all__ to be a bool, received: {}".format(type(all__))) - if next_trigger_time_ is not None and not isinstance(next_trigger_time_, (bytes, str)): - raise Exception("Expected next_trigger_time_ to be a str, received: {}".format(type(next_trigger_time_))) + if user_tag_ is not None and not isinstance(user_tag_, (bytes, str)): + raise Exception("Expected user_tag_ to be a str, received: {}".format(type(user_tag_))) - self.backend_name = backend_name_ - self.id_ = id__ - self.next_trigger_time = next_trigger_time_ + self.all_ = all__ + self.user_tag = user_tag_ self.unknown_fields = unknown_fields -class SecretBackendRotateWatchResult(Type): - _toSchema = {'changes': 'changes', 'error': 'error', 'watcher_id': 'watcher-id'} - _toPy = {'changes': 'changes', 'error': 'error', 'watcher-id': 'watcher_id'} - def __init__(self, changes=None, error=None, watcher_id=None, **unknown_fields): +class ModelSummary(Type): + _toSchema = {'agent_version': 'agent-version', 'cloud_credential_tag': 'cloud-credential-tag', 'cloud_region': 'cloud-region', 'cloud_tag': 'cloud-tag', 'controller_uuid': 'controller-uuid', 'counts': 'counts', 'default_series': 'default-series', 'is_controller': 'is-controller', 'last_connection': 'last-connection', 'life': 'life', 'migration': 'migration', 'name': 'name', 'owner_tag': 'owner-tag', 'provider_type': 'provider-type', 'sla': 'sla', 'status': 'status', 'type_': 'type', 'user_access': 'user-access', 'uuid': 'uuid'} + _toPy = {'agent-version': 'agent_version', 'cloud-credential-tag': 'cloud_credential_tag', 'cloud-region': 'cloud_region', 'cloud-tag': 'cloud_tag', 'controller-uuid': 'controller_uuid', 'counts': 'counts', 'default-series': 'default_series', 'is-controller': 'is_controller', 'last-connection': 'last_connection', 'life': 'life', 'migration': 'migration', 'name': 'name', 'owner-tag': 'owner_tag', 'provider-type': 'provider_type', 'sla': 'sla', 'status': 'status', 'type': 'type_', 'user-access': 'user_access', 'uuid': 'uuid'} + def __init__(self, agent_version=None, cloud_credential_tag=None, cloud_region=None, cloud_tag=None, controller_uuid=None, counts=None, default_series=None, is_controller=None, last_connection=None, life=None, migration=None, name=None, owner_tag=None, provider_type=None, sla=None, status=None, type_=None, user_access=None, uuid=None, **unknown_fields): ''' - changes : typing.Sequence[~SecretBackendRotateChange] - error : Error - watcher_id : str + agent_version : Number + cloud_credential_tag : str + cloud_region : str + cloud_tag : str + controller_uuid : str + counts : typing.Sequence[~ModelEntityCount] + default_series : str + is_controller : bool + last_connection : str + life : str + migration : ModelMigrationStatus + name : str + owner_tag : str + provider_type : str + sla : ModelSLAInfo + status : EntityStatus + type_ : str + user_access : str + uuid : str ''' - changes_ = [SecretBackendRotateChange.from_json(o) for o in changes or []] - error_ = Error.from_json(error) if error else None - watcher_id_ = watcher_id + agent_version_ = Number.from_json(agent_version) if agent_version else None + cloud_credential_tag_ = cloud_credential_tag + cloud_region_ = cloud_region + cloud_tag_ = cloud_tag + controller_uuid_ = controller_uuid + counts_ = [ModelEntityCount.from_json(o) for o in counts or []] + default_series_ = default_series + is_controller_ = is_controller + last_connection_ = last_connection + life_ = life + migration_ = ModelMigrationStatus.from_json(migration) if migration else None + name_ = name + owner_tag_ = owner_tag + provider_type_ = provider_type + sla_ = ModelSLAInfo.from_json(sla) if sla else None + status_ = EntityStatus.from_json(status) if status else None + type__ = type_ + user_access_ = user_access + uuid_ = uuid # Validate arguments against known Juju API types. - if changes_ is not None and not isinstance(changes_, (bytes, str, list)): - raise Exception("Expected changes_ to be a Sequence, received: {}".format(type(changes_))) - - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - - if watcher_id_ is not None and not isinstance(watcher_id_, (bytes, str)): - raise Exception("Expected watcher_id_ to be a str, received: {}".format(type(watcher_id_))) - - self.changes = changes_ - self.error = error_ - self.watcher_id = watcher_id_ - self.unknown_fields = unknown_fields - + if agent_version_ is not None and not isinstance(agent_version_, (dict, Number)): + raise Exception("Expected agent_version_ to be a Number, received: {}".format(type(agent_version_))) + if cloud_credential_tag_ is not None and not isinstance(cloud_credential_tag_, (bytes, str)): + raise Exception("Expected cloud_credential_tag_ to be a str, received: {}".format(type(cloud_credential_tag_))) -class SecretConsumerInfoResult(Type): - _toSchema = {'error': 'error', 'label': 'label', 'revision': 'revision'} - _toPy = {'error': 'error', 'label': 'label', 'revision': 'revision'} - def __init__(self, error=None, label=None, revision=None, **unknown_fields): - ''' - error : Error - label : str - revision : int - ''' - error_ = Error.from_json(error) if error else None - label_ = label - revision_ = revision + if cloud_region_ is not None and not isinstance(cloud_region_, (bytes, str)): + raise Exception("Expected cloud_region_ to be a str, received: {}".format(type(cloud_region_))) - # Validate arguments against known Juju API types. - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) + if cloud_tag_ is not None and not isinstance(cloud_tag_, (bytes, str)): + raise Exception("Expected cloud_tag_ to be a str, received: {}".format(type(cloud_tag_))) - if label_ is not None and not isinstance(label_, (bytes, str)): - raise Exception("Expected label_ to be a str, received: {}".format(type(label_))) + if controller_uuid_ is not None and not isinstance(controller_uuid_, (bytes, str)): + raise Exception("Expected controller_uuid_ to be a str, received: {}".format(type(controller_uuid_))) - if revision_ is not None and not isinstance(revision_, int): - raise Exception("Expected revision_ to be a int, received: {}".format(type(revision_))) + if counts_ is not None and not isinstance(counts_, (bytes, str, list)): + raise Exception("Expected counts_ to be a Sequence, received: {}".format(type(counts_))) - self.error = error_ - self.label = label_ - self.revision = revision_ - self.unknown_fields = unknown_fields + if default_series_ is not None and not isinstance(default_series_, (bytes, str)): + raise Exception("Expected default_series_ to be a str, received: {}".format(type(default_series_))) + if is_controller_ is not None and not isinstance(is_controller_, bool): + raise Exception("Expected is_controller_ to be a bool, received: {}".format(type(is_controller_))) + if last_connection_ is not None and not isinstance(last_connection_, (bytes, str)): + raise Exception("Expected last_connection_ to be a str, received: {}".format(type(last_connection_))) -class SecretConsumerInfoResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None, **unknown_fields): - ''' - results : typing.Sequence[~SecretConsumerInfoResult] - ''' - results_ = [SecretConsumerInfoResult.from_json(o) for o in results or []] + if life_ is not None and not isinstance(life_, (bytes, str)): + raise Exception("Expected life_ to be a str, received: {}".format(type(life_))) - # Validate arguments against known Juju API types. - if results_ is not None and not isinstance(results_, (bytes, str, list)): - raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) + if migration_ is not None and not isinstance(migration_, (dict, ModelMigrationStatus)): + raise Exception("Expected migration_ to be a ModelMigrationStatus, received: {}".format(type(migration_))) - self.results = results_ - self.unknown_fields = unknown_fields + if name_ is not None and not isinstance(name_, (bytes, str)): + raise Exception("Expected name_ to be a str, received: {}".format(type(name_))) + if owner_tag_ is not None and not isinstance(owner_tag_, (bytes, str)): + raise Exception("Expected owner_tag_ to be a str, received: {}".format(type(owner_tag_))) + if provider_type_ is not None and not isinstance(provider_type_, (bytes, str)): + raise Exception("Expected provider_type_ to be a str, received: {}".format(type(provider_type_))) -class SecretContentParams(Type): - _toSchema = {'data': 'data', 'value_ref': 'value-ref'} - _toPy = {'data': 'data', 'value-ref': 'value_ref'} - def __init__(self, data=None, value_ref=None, **unknown_fields): - ''' - data : typing.Mapping[str, str] - value_ref : SecretValueRef - ''' - data_ = data - value_ref_ = SecretValueRef.from_json(value_ref) if value_ref else None + if sla_ is not None and not isinstance(sla_, (dict, ModelSLAInfo)): + raise Exception("Expected sla_ to be a ModelSLAInfo, received: {}".format(type(sla_))) - # Validate arguments against known Juju API types. - if data_ is not None and not isinstance(data_, dict): - raise Exception("Expected data_ to be a Mapping, received: {}".format(type(data_))) + if status_ is not None and not isinstance(status_, (dict, EntityStatus)): + raise Exception("Expected status_ to be a EntityStatus, received: {}".format(type(status_))) - if value_ref_ is not None and not isinstance(value_ref_, (dict, SecretValueRef)): - raise Exception("Expected value_ref_ to be a SecretValueRef, received: {}".format(type(value_ref_))) + if type__ is not None and not isinstance(type__, (bytes, str)): + raise Exception("Expected type__ to be a str, received: {}".format(type(type__))) - self.data = data_ - self.value_ref = value_ref_ + if user_access_ is not None and not isinstance(user_access_, (bytes, str)): + raise Exception("Expected user_access_ to be a str, received: {}".format(type(user_access_))) + + if uuid_ is not None and not isinstance(uuid_, (bytes, str)): + raise Exception("Expected uuid_ to be a str, received: {}".format(type(uuid_))) + + self.agent_version = agent_version_ + self.cloud_credential_tag = cloud_credential_tag_ + self.cloud_region = cloud_region_ + self.cloud_tag = cloud_tag_ + self.controller_uuid = controller_uuid_ + self.counts = counts_ + self.default_series = default_series_ + self.is_controller = is_controller_ + self.last_connection = last_connection_ + self.life = life_ + self.migration = migration_ + self.name = name_ + self.owner_tag = owner_tag_ + self.provider_type = provider_type_ + self.sla = sla_ + self.status = status_ + self.type_ = type__ + self.user_access = user_access_ + self.uuid = uuid_ self.unknown_fields = unknown_fields -class SecretContentResult(Type): - _toSchema = {'backend_config': 'backend-config', 'content': 'content', 'error': 'error', 'latest_revision': 'latest-revision'} - _toPy = {'backend-config': 'backend_config', 'content': 'content', 'error': 'error', 'latest-revision': 'latest_revision'} - def __init__(self, backend_config=None, content=None, error=None, latest_revision=None, **unknown_fields): +class ModelSummaryResult(Type): + _toSchema = {'error': 'error', 'result': 'result'} + _toPy = {'error': 'error', 'result': 'result'} + def __init__(self, error=None, result=None, **unknown_fields): ''' - backend_config : SecretBackendConfigResult - content : SecretContentParams error : Error - latest_revision : int + result : ModelSummary ''' - backend_config_ = SecretBackendConfigResult.from_json(backend_config) if backend_config else None - content_ = SecretContentParams.from_json(content) if content else None error_ = Error.from_json(error) if error else None - latest_revision_ = latest_revision + result_ = ModelSummary.from_json(result) if result else None # Validate arguments against known Juju API types. - if backend_config_ is not None and not isinstance(backend_config_, (dict, SecretBackendConfigResult)): - raise Exception("Expected backend_config_ to be a SecretBackendConfigResult, received: {}".format(type(backend_config_))) - - if content_ is not None and not isinstance(content_, (dict, SecretContentParams)): - raise Exception("Expected content_ to be a SecretContentParams, received: {}".format(type(content_))) - if error_ is not None and not isinstance(error_, (dict, Error)): raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - if latest_revision_ is not None and not isinstance(latest_revision_, int): - raise Exception("Expected latest_revision_ to be a int, received: {}".format(type(latest_revision_))) + if result_ is not None and not isinstance(result_, (dict, ModelSummary)): + raise Exception("Expected result_ to be a ModelSummary, received: {}".format(type(result_))) - self.backend_config = backend_config_ - self.content = content_ self.error = error_ - self.latest_revision = latest_revision_ + self.result = result_ self.unknown_fields = unknown_fields -class SecretContentResults(Type): +class ModelSummaryResults(Type): _toSchema = {'results': 'results'} _toPy = {'results': 'results'} def __init__(self, results=None, **unknown_fields): ''' - results : typing.Sequence[~SecretContentResult] + results : typing.Sequence[~ModelSummaryResult] ''' - results_ = [SecretContentResult.from_json(o) for o in results or []] + results_ = [ModelSummaryResult.from_json(o) for o in results or []] # Validate arguments against known Juju API types. if results_ is not None and not isinstance(results_, (bytes, str, list)): @@ -22139,146 +10581,139 @@ def __init__(self, results=None, **unknown_fields): -class SecretRevision(Type): - _toSchema = {'backend_name': 'backend-name', 'create_time': 'create-time', 'expire_time': 'expire-time', 'revision': 'revision', 'update_time': 'update-time', 'value_ref': 'value-ref'} - _toPy = {'backend-name': 'backend_name', 'create-time': 'create_time', 'expire-time': 'expire_time', 'revision': 'revision', 'update-time': 'update_time', 'value-ref': 'value_ref'} - def __init__(self, backend_name=None, create_time=None, expire_time=None, revision=None, update_time=None, value_ref=None, **unknown_fields): - ''' - backend_name : str - create_time : str - expire_time : str - revision : int - update_time : str - value_ref : SecretValueRef +class ModelTag(Type): + _toSchema = {} + _toPy = {} + def __init__(self, **unknown_fields): ''' - backend_name_ = backend_name - create_time_ = create_time - expire_time_ = expire_time - revision_ = revision - update_time_ = update_time - value_ref_ = SecretValueRef.from_json(value_ref) if value_ref else None - - # Validate arguments against known Juju API types. - if backend_name_ is not None and not isinstance(backend_name_, (bytes, str)): - raise Exception("Expected backend_name_ to be a str, received: {}".format(type(backend_name_))) - if create_time_ is not None and not isinstance(create_time_, (bytes, str)): - raise Exception("Expected create_time_ to be a str, received: {}".format(type(create_time_))) + ''' + self.unknown_fields = unknown_fields - if expire_time_ is not None and not isinstance(expire_time_, (bytes, str)): - raise Exception("Expected expire_time_ to be a str, received: {}".format(type(expire_time_))) - if revision_ is not None and not isinstance(revision_, int): - raise Exception("Expected revision_ to be a int, received: {}".format(type(revision_))) - if update_time_ is not None and not isinstance(update_time_, (bytes, str)): - raise Exception("Expected update_time_ to be a str, received: {}".format(type(update_time_))) +class ModelUnset(Type): + _toSchema = {'keys': 'keys'} + _toPy = {'keys': 'keys'} + def __init__(self, keys=None, **unknown_fields): + ''' + keys : typing.Sequence[str] + ''' + keys_ = keys - if value_ref_ is not None and not isinstance(value_ref_, (dict, SecretValueRef)): - raise Exception("Expected value_ref_ to be a SecretValueRef, received: {}".format(type(value_ref_))) + # Validate arguments against known Juju API types. + if keys_ is not None and not isinstance(keys_, (bytes, str, list)): + raise Exception("Expected keys_ to be a Sequence, received: {}".format(type(keys_))) - self.backend_name = backend_name_ - self.create_time = create_time_ - self.expire_time = expire_time_ - self.revision = revision_ - self.update_time = update_time_ - self.value_ref = value_ref_ + self.keys = keys_ self.unknown_fields = unknown_fields -class SecretRevisionArg(Type): - _toSchema = {'pending_delete': 'pending-delete', 'revisions': 'revisions', 'uri': 'uri'} - _toPy = {'pending-delete': 'pending_delete', 'revisions': 'revisions', 'uri': 'uri'} - def __init__(self, pending_delete=None, revisions=None, uri=None, **unknown_fields): +class ModelUnsetKeys(Type): + _toSchema = {'cloud_region': 'cloud-region', 'cloud_tag': 'cloud-tag', 'keys': 'keys'} + _toPy = {'cloud-region': 'cloud_region', 'cloud-tag': 'cloud_tag', 'keys': 'keys'} + def __init__(self, cloud_region=None, cloud_tag=None, keys=None, **unknown_fields): ''' - pending_delete : bool - revisions : typing.Sequence[int] - uri : str + cloud_region : str + cloud_tag : str + keys : typing.Sequence[str] ''' - pending_delete_ = pending_delete - revisions_ = revisions - uri_ = uri + cloud_region_ = cloud_region + cloud_tag_ = cloud_tag + keys_ = keys # Validate arguments against known Juju API types. - if pending_delete_ is not None and not isinstance(pending_delete_, bool): - raise Exception("Expected pending_delete_ to be a bool, received: {}".format(type(pending_delete_))) + if cloud_region_ is not None and not isinstance(cloud_region_, (bytes, str)): + raise Exception("Expected cloud_region_ to be a str, received: {}".format(type(cloud_region_))) - if revisions_ is not None and not isinstance(revisions_, (bytes, str, list)): - raise Exception("Expected revisions_ to be a Sequence, received: {}".format(type(revisions_))) + if cloud_tag_ is not None and not isinstance(cloud_tag_, (bytes, str)): + raise Exception("Expected cloud_tag_ to be a str, received: {}".format(type(cloud_tag_))) - if uri_ is not None and not isinstance(uri_, (bytes, str)): - raise Exception("Expected uri_ to be a str, received: {}".format(type(uri_))) + if keys_ is not None and not isinstance(keys_, (bytes, str, list)): + raise Exception("Expected keys_ to be a Sequence, received: {}".format(type(keys_))) - self.pending_delete = pending_delete_ - self.revisions = revisions_ - self.uri = uri_ + self.cloud_region = cloud_region_ + self.cloud_tag = cloud_tag_ + self.keys = keys_ self.unknown_fields = unknown_fields -class SecretRevisionChange(Type): - _toSchema = {'revision': 'revision', 'uri': 'uri'} - _toPy = {'revision': 'revision', 'uri': 'uri'} - def __init__(self, revision=None, uri=None, **unknown_fields): +class ModelUserInfo(Type): + _toSchema = {'access': 'access', 'display_name': 'display-name', 'last_connection': 'last-connection', 'model_tag': 'model-tag', 'user': 'user'} + _toPy = {'access': 'access', 'display-name': 'display_name', 'last-connection': 'last_connection', 'model-tag': 'model_tag', 'user': 'user'} + def __init__(self, access=None, display_name=None, last_connection=None, model_tag=None, user=None, **unknown_fields): ''' - revision : int - uri : str + access : str + display_name : str + last_connection : str + model_tag : str + user : str ''' - revision_ = revision - uri_ = uri + access_ = access + display_name_ = display_name + last_connection_ = last_connection + model_tag_ = model_tag + user_ = user # Validate arguments against known Juju API types. - if revision_ is not None and not isinstance(revision_, int): - raise Exception("Expected revision_ to be a int, received: {}".format(type(revision_))) + if access_ is not None and not isinstance(access_, (bytes, str)): + raise Exception("Expected access_ to be a str, received: {}".format(type(access_))) - if uri_ is not None and not isinstance(uri_, (bytes, str)): - raise Exception("Expected uri_ to be a str, received: {}".format(type(uri_))) + if display_name_ is not None and not isinstance(display_name_, (bytes, str)): + raise Exception("Expected display_name_ to be a str, received: {}".format(type(display_name_))) - self.revision = revision_ - self.uri = uri_ + if last_connection_ is not None and not isinstance(last_connection_, (bytes, str)): + raise Exception("Expected last_connection_ to be a str, received: {}".format(type(last_connection_))) + + if model_tag_ is not None and not isinstance(model_tag_, (bytes, str)): + raise Exception("Expected model_tag_ to be a str, received: {}".format(type(model_tag_))) + + if user_ is not None and not isinstance(user_, (bytes, str)): + raise Exception("Expected user_ to be a str, received: {}".format(type(user_))) + + self.access = access_ + self.display_name = display_name_ + self.last_connection = last_connection_ + self.model_tag = model_tag_ + self.user = user_ self.unknown_fields = unknown_fields -class SecretRevisionWatchResult(Type): - _toSchema = {'changes': 'changes', 'error': 'error', 'watcher_id': 'watcher-id'} - _toPy = {'changes': 'changes', 'error': 'error', 'watcher-id': 'watcher_id'} - def __init__(self, changes=None, error=None, watcher_id=None, **unknown_fields): +class ModelUserInfoResult(Type): + _toSchema = {'error': 'error', 'result': 'result'} + _toPy = {'error': 'error', 'result': 'result'} + def __init__(self, error=None, result=None, **unknown_fields): ''' - changes : typing.Sequence[~SecretRevisionChange] error : Error - watcher_id : str + result : ModelUserInfo ''' - changes_ = [SecretRevisionChange.from_json(o) for o in changes or []] error_ = Error.from_json(error) if error else None - watcher_id_ = watcher_id - - # Validate arguments against known Juju API types. - if changes_ is not None and not isinstance(changes_, (bytes, str, list)): - raise Exception("Expected changes_ to be a Sequence, received: {}".format(type(changes_))) + result_ = ModelUserInfo.from_json(result) if result else None + # Validate arguments against known Juju API types. if error_ is not None and not isinstance(error_, (dict, Error)): raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - if watcher_id_ is not None and not isinstance(watcher_id_, (bytes, str)): - raise Exception("Expected watcher_id_ to be a str, received: {}".format(type(watcher_id_))) + if result_ is not None and not isinstance(result_, (dict, ModelUserInfo)): + raise Exception("Expected result_ to be a ModelUserInfo, received: {}".format(type(result_))) - self.changes = changes_ self.error = error_ - self.watcher_id = watcher_id_ + self.result = result_ self.unknown_fields = unknown_fields -class SecretRevisionWatchResults(Type): +class ModelUserInfoResults(Type): _toSchema = {'results': 'results'} _toPy = {'results': 'results'} def __init__(self, results=None, **unknown_fields): ''' - results : typing.Sequence[~SecretRevisionWatchResult] + results : typing.Sequence[~ModelUserInfoResult] ''' - results_ = [SecretRevisionWatchResult.from_json(o) for o in results or []] + results_ = [ModelUserInfoResult.from_json(o) for o in results or []] # Validate arguments against known Juju API types. if results_ is not None and not isinstance(results_, (bytes, str, list)): @@ -22289,746 +10724,950 @@ def __init__(self, results=None, **unknown_fields): -class SecretRotatedArg(Type): - _toSchema = {'original_revision': 'original-revision', 'skip': 'skip', 'uri': 'uri'} - _toPy = {'original-revision': 'original_revision', 'skip': 'skip', 'uri': 'uri'} - def __init__(self, original_revision=None, skip=None, uri=None, **unknown_fields): +class ModelVolumeInfo(Type): + _toSchema = {'detachable': 'detachable', 'id_': 'id', 'message': 'message', 'provider_id': 'provider-id', 'status': 'status'} + _toPy = {'detachable': 'detachable', 'id': 'id_', 'message': 'message', 'provider-id': 'provider_id', 'status': 'status'} + def __init__(self, detachable=None, id_=None, message=None, provider_id=None, status=None, **unknown_fields): ''' - original_revision : int - skip : bool - uri : str + detachable : bool + id_ : str + message : str + provider_id : str + status : str ''' - original_revision_ = original_revision - skip_ = skip - uri_ = uri + detachable_ = detachable + id__ = id_ + message_ = message + provider_id_ = provider_id + status_ = status # Validate arguments against known Juju API types. - if original_revision_ is not None and not isinstance(original_revision_, int): - raise Exception("Expected original_revision_ to be a int, received: {}".format(type(original_revision_))) + if detachable_ is not None and not isinstance(detachable_, bool): + raise Exception("Expected detachable_ to be a bool, received: {}".format(type(detachable_))) + + if id__ is not None and not isinstance(id__, (bytes, str)): + raise Exception("Expected id__ to be a str, received: {}".format(type(id__))) - if skip_ is not None and not isinstance(skip_, bool): - raise Exception("Expected skip_ to be a bool, received: {}".format(type(skip_))) + if message_ is not None and not isinstance(message_, (bytes, str)): + raise Exception("Expected message_ to be a str, received: {}".format(type(message_))) - if uri_ is not None and not isinstance(uri_, (bytes, str)): - raise Exception("Expected uri_ to be a str, received: {}".format(type(uri_))) + if provider_id_ is not None and not isinstance(provider_id_, (bytes, str)): + raise Exception("Expected provider_id_ to be a str, received: {}".format(type(provider_id_))) - self.original_revision = original_revision_ - self.skip = skip_ - self.uri = uri_ + if status_ is not None and not isinstance(status_, (bytes, str)): + raise Exception("Expected status_ to be a str, received: {}".format(type(status_))) + + self.detachable = detachable_ + self.id_ = id__ + self.message = message_ + self.provider_id = provider_id_ + self.status = status_ self.unknown_fields = unknown_fields -class SecretRotatedArgs(Type): - _toSchema = {'args': 'args'} - _toPy = {'args': 'args'} - def __init__(self, args=None, **unknown_fields): +class ModifyCloudAccess(Type): + _toSchema = {'access': 'access', 'action': 'action', 'cloud_tag': 'cloud-tag', 'user_tag': 'user-tag'} + _toPy = {'access': 'access', 'action': 'action', 'cloud-tag': 'cloud_tag', 'user-tag': 'user_tag'} + def __init__(self, access=None, action=None, cloud_tag=None, user_tag=None, **unknown_fields): ''' - args : typing.Sequence[~SecretRotatedArg] + access : str + action : str + cloud_tag : str + user_tag : str ''' - args_ = [SecretRotatedArg.from_json(o) for o in args or []] + access_ = access + action_ = action + cloud_tag_ = cloud_tag + user_tag_ = user_tag # Validate arguments against known Juju API types. - if args_ is not None and not isinstance(args_, (bytes, str, list)): - raise Exception("Expected args_ to be a Sequence, received: {}".format(type(args_))) + if access_ is not None and not isinstance(access_, (bytes, str)): + raise Exception("Expected access_ to be a str, received: {}".format(type(access_))) - self.args = args_ + if action_ is not None and not isinstance(action_, (bytes, str)): + raise Exception("Expected action_ to be a str, received: {}".format(type(action_))) + + if cloud_tag_ is not None and not isinstance(cloud_tag_, (bytes, str)): + raise Exception("Expected cloud_tag_ to be a str, received: {}".format(type(cloud_tag_))) + + if user_tag_ is not None and not isinstance(user_tag_, (bytes, str)): + raise Exception("Expected user_tag_ to be a str, received: {}".format(type(user_tag_))) + + self.access = access_ + self.action = action_ + self.cloud_tag = cloud_tag_ + self.user_tag = user_tag_ self.unknown_fields = unknown_fields -class SecretTriggerChange(Type): - _toSchema = {'next_trigger_time': 'next-trigger-time', 'revision': 'revision', 'uri': 'uri'} - _toPy = {'next-trigger-time': 'next_trigger_time', 'revision': 'revision', 'uri': 'uri'} - def __init__(self, next_trigger_time=None, revision=None, uri=None, **unknown_fields): +class ModifyCloudAccessRequest(Type): + _toSchema = {'changes': 'changes'} + _toPy = {'changes': 'changes'} + def __init__(self, changes=None, **unknown_fields): ''' - next_trigger_time : str - revision : int - uri : str + changes : typing.Sequence[~ModifyCloudAccess] ''' - next_trigger_time_ = next_trigger_time - revision_ = revision - uri_ = uri + changes_ = [ModifyCloudAccess.from_json(o) for o in changes or []] # Validate arguments against known Juju API types. - if next_trigger_time_ is not None and not isinstance(next_trigger_time_, (bytes, str)): - raise Exception("Expected next_trigger_time_ to be a str, received: {}".format(type(next_trigger_time_))) + if changes_ is not None and not isinstance(changes_, (bytes, str, list)): + raise Exception("Expected changes_ to be a Sequence, received: {}".format(type(changes_))) - if revision_ is not None and not isinstance(revision_, int): - raise Exception("Expected revision_ to be a int, received: {}".format(type(revision_))) + self.changes = changes_ + self.unknown_fields = unknown_fields - if uri_ is not None and not isinstance(uri_, (bytes, str)): - raise Exception("Expected uri_ to be a str, received: {}".format(type(uri_))) - self.next_trigger_time = next_trigger_time_ - self.revision = revision_ - self.uri = uri_ + +class ModifyControllerAccess(Type): + _toSchema = {'access': 'access', 'action': 'action', 'user_tag': 'user-tag'} + _toPy = {'access': 'access', 'action': 'action', 'user-tag': 'user_tag'} + def __init__(self, access=None, action=None, user_tag=None, **unknown_fields): + ''' + access : str + action : str + user_tag : str + ''' + access_ = access + action_ = action + user_tag_ = user_tag + + # Validate arguments against known Juju API types. + if access_ is not None and not isinstance(access_, (bytes, str)): + raise Exception("Expected access_ to be a str, received: {}".format(type(access_))) + + if action_ is not None and not isinstance(action_, (bytes, str)): + raise Exception("Expected action_ to be a str, received: {}".format(type(action_))) + + if user_tag_ is not None and not isinstance(user_tag_, (bytes, str)): + raise Exception("Expected user_tag_ to be a str, received: {}".format(type(user_tag_))) + + self.access = access_ + self.action = action_ + self.user_tag = user_tag_ self.unknown_fields = unknown_fields -class SecretTriggerWatchResult(Type): - _toSchema = {'changes': 'changes', 'error': 'error', 'watcher_id': 'watcher-id'} - _toPy = {'changes': 'changes', 'error': 'error', 'watcher-id': 'watcher_id'} - def __init__(self, changes=None, error=None, watcher_id=None, **unknown_fields): +class ModifyControllerAccessRequest(Type): + _toSchema = {'changes': 'changes'} + _toPy = {'changes': 'changes'} + def __init__(self, changes=None, **unknown_fields): ''' - changes : typing.Sequence[~SecretTriggerChange] - error : Error - watcher_id : str + changes : typing.Sequence[~ModifyControllerAccess] ''' - changes_ = [SecretTriggerChange.from_json(o) for o in changes or []] - error_ = Error.from_json(error) if error else None - watcher_id_ = watcher_id + changes_ = [ModifyControllerAccess.from_json(o) for o in changes or []] # Validate arguments against known Juju API types. if changes_ is not None and not isinstance(changes_, (bytes, str, list)): raise Exception("Expected changes_ to be a Sequence, received: {}".format(type(changes_))) - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - - if watcher_id_ is not None and not isinstance(watcher_id_, (bytes, str)): - raise Exception("Expected watcher_id_ to be a str, received: {}".format(type(watcher_id_))) - self.changes = changes_ - self.error = error_ - self.watcher_id = watcher_id_ self.unknown_fields = unknown_fields -class SecretValueRef(Type): - _toSchema = {'backend_id': 'backend-id', 'revision_id': 'revision-id'} - _toPy = {'backend-id': 'backend_id', 'revision-id': 'revision_id'} - def __init__(self, backend_id=None, revision_id=None, **unknown_fields): +class ModifyModelAccess(Type): + _toSchema = {'access': 'access', 'action': 'action', 'model_tag': 'model-tag', 'user_tag': 'user-tag'} + _toPy = {'access': 'access', 'action': 'action', 'model-tag': 'model_tag', 'user-tag': 'user_tag'} + def __init__(self, access=None, action=None, model_tag=None, user_tag=None, **unknown_fields): ''' - backend_id : str - revision_id : str + access : str + action : str + model_tag : str + user_tag : str ''' - backend_id_ = backend_id - revision_id_ = revision_id + access_ = access + action_ = action + model_tag_ = model_tag + user_tag_ = user_tag # Validate arguments against known Juju API types. - if backend_id_ is not None and not isinstance(backend_id_, (bytes, str)): - raise Exception("Expected backend_id_ to be a str, received: {}".format(type(backend_id_))) + if access_ is not None and not isinstance(access_, (bytes, str)): + raise Exception("Expected access_ to be a str, received: {}".format(type(access_))) - if revision_id_ is not None and not isinstance(revision_id_, (bytes, str)): - raise Exception("Expected revision_id_ to be a str, received: {}".format(type(revision_id_))) + if action_ is not None and not isinstance(action_, (bytes, str)): + raise Exception("Expected action_ to be a str, received: {}".format(type(action_))) - self.backend_id = backend_id_ - self.revision_id = revision_id_ + if model_tag_ is not None and not isinstance(model_tag_, (bytes, str)): + raise Exception("Expected model_tag_ to be a str, received: {}".format(type(model_tag_))) + + if user_tag_ is not None and not isinstance(user_tag_, (bytes, str)): + raise Exception("Expected user_tag_ to be a str, received: {}".format(type(user_tag_))) + + self.access = access_ + self.action = action_ + self.model_tag = model_tag_ + self.user_tag = user_tag_ self.unknown_fields = unknown_fields -class SecretValueResult(Type): - _toSchema = {'data': 'data', 'error': 'error'} - _toPy = {'data': 'data', 'error': 'error'} - def __init__(self, data=None, error=None, **unknown_fields): +class ModifyModelAccessRequest(Type): + _toSchema = {'changes': 'changes'} + _toPy = {'changes': 'changes'} + def __init__(self, changes=None, **unknown_fields): ''' - data : typing.Mapping[str, str] - error : Error + changes : typing.Sequence[~ModifyModelAccess] ''' - data_ = data - error_ = Error.from_json(error) if error else None + changes_ = [ModifyModelAccess.from_json(o) for o in changes or []] # Validate arguments against known Juju API types. - if data_ is not None and not isinstance(data_, dict): - raise Exception("Expected data_ to be a Mapping, received: {}".format(type(data_))) - - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) + if changes_ is not None and not isinstance(changes_, (bytes, str, list)): + raise Exception("Expected changes_ to be a Sequence, received: {}".format(type(changes_))) - self.data = data_ - self.error = error_ + self.changes = changes_ self.unknown_fields = unknown_fields -class SecretsFilter(Type): - _toSchema = {'label': 'label', 'owner_tag': 'owner-tag', 'revision': 'revision', 'uri': 'uri'} - _toPy = {'label': 'label', 'owner-tag': 'owner_tag', 'revision': 'revision', 'uri': 'uri'} - def __init__(self, label=None, owner_tag=None, revision=None, uri=None, **unknown_fields): +class ModifyOfferAccess(Type): + _toSchema = {'access': 'access', 'action': 'action', 'offer_url': 'offer-url', 'user_tag': 'user-tag'} + _toPy = {'access': 'access', 'action': 'action', 'offer-url': 'offer_url', 'user-tag': 'user_tag'} + def __init__(self, access=None, action=None, offer_url=None, user_tag=None, **unknown_fields): ''' - label : str - owner_tag : str - revision : int - uri : str + access : str + action : str + offer_url : str + user_tag : str ''' - label_ = label - owner_tag_ = owner_tag - revision_ = revision - uri_ = uri + access_ = access + action_ = action + offer_url_ = offer_url + user_tag_ = user_tag + + # Validate arguments against known Juju API types. + if access_ is not None and not isinstance(access_, (bytes, str)): + raise Exception("Expected access_ to be a str, received: {}".format(type(access_))) + + if action_ is not None and not isinstance(action_, (bytes, str)): + raise Exception("Expected action_ to be a str, received: {}".format(type(action_))) + + if offer_url_ is not None and not isinstance(offer_url_, (bytes, str)): + raise Exception("Expected offer_url_ to be a str, received: {}".format(type(offer_url_))) + + if user_tag_ is not None and not isinstance(user_tag_, (bytes, str)): + raise Exception("Expected user_tag_ to be a str, received: {}".format(type(user_tag_))) + + self.access = access_ + self.action = action_ + self.offer_url = offer_url_ + self.user_tag = user_tag_ + self.unknown_fields = unknown_fields - # Validate arguments against known Juju API types. - if label_ is not None and not isinstance(label_, (bytes, str)): - raise Exception("Expected label_ to be a str, received: {}".format(type(label_))) - if owner_tag_ is not None and not isinstance(owner_tag_, (bytes, str)): - raise Exception("Expected owner_tag_ to be a str, received: {}".format(type(owner_tag_))) - if revision_ is not None and not isinstance(revision_, int): - raise Exception("Expected revision_ to be a int, received: {}".format(type(revision_))) +class ModifyOfferAccessRequest(Type): + _toSchema = {'changes': 'changes'} + _toPy = {'changes': 'changes'} + def __init__(self, changes=None, **unknown_fields): + ''' + changes : typing.Sequence[~ModifyOfferAccess] + ''' + changes_ = [ModifyOfferAccess.from_json(o) for o in changes or []] - if uri_ is not None and not isinstance(uri_, (bytes, str)): - raise Exception("Expected uri_ to be a str, received: {}".format(type(uri_))) + # Validate arguments against known Juju API types. + if changes_ is not None and not isinstance(changes_, (bytes, str, list)): + raise Exception("Expected changes_ to be a Sequence, received: {}".format(type(changes_))) - self.label = label_ - self.owner_tag = owner_tag_ - self.revision = revision_ - self.uri = uri_ + self.changes = changes_ self.unknown_fields = unknown_fields -class SerializedModel(Type): - _toSchema = {'bytes_': 'bytes', 'charms': 'charms', 'resources': 'resources', 'tools': 'tools'} - _toPy = {'bytes': 'bytes_', 'charms': 'charms', 'resources': 'resources', 'tools': 'tools'} - def __init__(self, bytes_=None, charms=None, resources=None, tools=None, **unknown_fields): +class ModifyUserSSHKeys(Type): + _toSchema = {'ssh_keys': 'ssh-keys', 'user': 'user'} + _toPy = {'ssh-keys': 'ssh_keys', 'user': 'user'} + def __init__(self, ssh_keys=None, user=None, **unknown_fields): ''' - bytes_ : typing.Sequence[int] - charms : typing.Sequence[str] - resources : typing.Sequence[~SerializedModelResource] - tools : typing.Sequence[~SerializedModelTools] + ssh_keys : typing.Sequence[str] + user : str ''' - bytes__ = bytes_ - charms_ = charms - resources_ = [SerializedModelResource.from_json(o) for o in resources or []] - tools_ = [SerializedModelTools.from_json(o) for o in tools or []] + ssh_keys_ = ssh_keys + user_ = user # Validate arguments against known Juju API types. - if bytes__ is not None and not isinstance(bytes__, (bytes, str, list)): - raise Exception("Expected bytes__ to be a Sequence, received: {}".format(type(bytes__))) - - if charms_ is not None and not isinstance(charms_, (bytes, str, list)): - raise Exception("Expected charms_ to be a Sequence, received: {}".format(type(charms_))) - - if resources_ is not None and not isinstance(resources_, (bytes, str, list)): - raise Exception("Expected resources_ to be a Sequence, received: {}".format(type(resources_))) + if ssh_keys_ is not None and not isinstance(ssh_keys_, (bytes, str, list)): + raise Exception("Expected ssh_keys_ to be a Sequence, received: {}".format(type(ssh_keys_))) - if tools_ is not None and not isinstance(tools_, (bytes, str, list)): - raise Exception("Expected tools_ to be a Sequence, received: {}".format(type(tools_))) + if user_ is not None and not isinstance(user_, (bytes, str)): + raise Exception("Expected user_ to be a str, received: {}".format(type(user_))) - self.bytes_ = bytes__ - self.charms = charms_ - self.resources = resources_ - self.tools = tools_ + self.ssh_keys = ssh_keys_ + self.user = user_ self.unknown_fields = unknown_fields -class SerializedModelResource(Type): - _toSchema = {'application': 'application', 'application_revision': 'application-revision', 'charmstore_revision': 'charmstore-revision', 'name': 'name', 'unit_revisions': 'unit-revisions'} - _toPy = {'application': 'application', 'application-revision': 'application_revision', 'charmstore-revision': 'charmstore_revision', 'name': 'name', 'unit-revisions': 'unit_revisions'} - def __init__(self, application=None, application_revision=None, charmstore_revision=None, name=None, unit_revisions=None, **unknown_fields): +class MoveSubnetsParam(Type): + _toSchema = {'force': 'force', 'space_tag': 'space-tag', 'subnets': 'subnets'} + _toPy = {'force': 'force', 'space-tag': 'space_tag', 'subnets': 'subnets'} + def __init__(self, force=None, space_tag=None, subnets=None, **unknown_fields): ''' - application : str - application_revision : SerializedModelResourceRevision - charmstore_revision : SerializedModelResourceRevision - name : str - unit_revisions : typing.Mapping[str, ~SerializedModelResourceRevision] + force : bool + space_tag : str + subnets : typing.Sequence[str] ''' - application_ = application - application_revision_ = SerializedModelResourceRevision.from_json(application_revision) if application_revision else None - charmstore_revision_ = SerializedModelResourceRevision.from_json(charmstore_revision) if charmstore_revision else None - name_ = name - unit_revisions_ = {k: SerializedModelResourceRevision.from_json(v) for k, v in (unit_revisions or dict()).items()} + force_ = force + space_tag_ = space_tag + subnets_ = subnets # Validate arguments against known Juju API types. - if application_ is not None and not isinstance(application_, (bytes, str)): - raise Exception("Expected application_ to be a str, received: {}".format(type(application_))) - - if application_revision_ is not None and not isinstance(application_revision_, (dict, SerializedModelResourceRevision)): - raise Exception("Expected application_revision_ to be a SerializedModelResourceRevision, received: {}".format(type(application_revision_))) - - if charmstore_revision_ is not None and not isinstance(charmstore_revision_, (dict, SerializedModelResourceRevision)): - raise Exception("Expected charmstore_revision_ to be a SerializedModelResourceRevision, received: {}".format(type(charmstore_revision_))) + if force_ is not None and not isinstance(force_, bool): + raise Exception("Expected force_ to be a bool, received: {}".format(type(force_))) - if name_ is not None and not isinstance(name_, (bytes, str)): - raise Exception("Expected name_ to be a str, received: {}".format(type(name_))) + if space_tag_ is not None and not isinstance(space_tag_, (bytes, str)): + raise Exception("Expected space_tag_ to be a str, received: {}".format(type(space_tag_))) - if unit_revisions_ is not None and not isinstance(unit_revisions_, dict): - raise Exception("Expected unit_revisions_ to be a Mapping, received: {}".format(type(unit_revisions_))) + if subnets_ is not None and not isinstance(subnets_, (bytes, str, list)): + raise Exception("Expected subnets_ to be a Sequence, received: {}".format(type(subnets_))) - self.application = application_ - self.application_revision = application_revision_ - self.charmstore_revision = charmstore_revision_ - self.name = name_ - self.unit_revisions = unit_revisions_ + self.force = force_ + self.space_tag = space_tag_ + self.subnets = subnets_ self.unknown_fields = unknown_fields -class SerializedModelResourceRevision(Type): - _toSchema = {'description': 'description', 'fingerprint': 'fingerprint', 'origin': 'origin', 'path': 'path', 'revision': 'revision', 'size': 'size', 'timestamp': 'timestamp', 'type_': 'type', 'username': 'username'} - _toPy = {'description': 'description', 'fingerprint': 'fingerprint', 'origin': 'origin', 'path': 'path', 'revision': 'revision', 'size': 'size', 'timestamp': 'timestamp', 'type': 'type_', 'username': 'username'} - def __init__(self, description=None, fingerprint=None, origin=None, path=None, revision=None, size=None, timestamp=None, type_=None, username=None, **unknown_fields): +class MoveSubnetsParams(Type): + _toSchema = {'args': 'args'} + _toPy = {'args': 'args'} + def __init__(self, args=None, **unknown_fields): ''' - description : str - fingerprint : str - origin : str - path : str - revision : int - size : int - timestamp : str - type_ : str - username : str + args : typing.Sequence[~MoveSubnetsParam] ''' - description_ = description - fingerprint_ = fingerprint - origin_ = origin - path_ = path - revision_ = revision - size_ = size - timestamp_ = timestamp - type__ = type_ - username_ = username + args_ = [MoveSubnetsParam.from_json(o) for o in args or []] # Validate arguments against known Juju API types. - if description_ is not None and not isinstance(description_, (bytes, str)): - raise Exception("Expected description_ to be a str, received: {}".format(type(description_))) - - if fingerprint_ is not None and not isinstance(fingerprint_, (bytes, str)): - raise Exception("Expected fingerprint_ to be a str, received: {}".format(type(fingerprint_))) + if args_ is not None and not isinstance(args_, (bytes, str, list)): + raise Exception("Expected args_ to be a Sequence, received: {}".format(type(args_))) - if origin_ is not None and not isinstance(origin_, (bytes, str)): - raise Exception("Expected origin_ to be a str, received: {}".format(type(origin_))) + self.args = args_ + self.unknown_fields = unknown_fields - if path_ is not None and not isinstance(path_, (bytes, str)): - raise Exception("Expected path_ to be a str, received: {}".format(type(path_))) - if revision_ is not None and not isinstance(revision_, int): - raise Exception("Expected revision_ to be a int, received: {}".format(type(revision_))) - if size_ is not None and not isinstance(size_, int): - raise Exception("Expected size_ to be a int, received: {}".format(type(size_))) +class MoveSubnetsResult(Type): + _toSchema = {'error': 'error', 'moved_subnets': 'moved-subnets', 'new_space': 'new-space'} + _toPy = {'error': 'error', 'moved-subnets': 'moved_subnets', 'new-space': 'new_space'} + def __init__(self, error=None, moved_subnets=None, new_space=None, **unknown_fields): + ''' + error : Error + moved_subnets : typing.Sequence[~MovedSubnet] + new_space : str + ''' + error_ = Error.from_json(error) if error else None + moved_subnets_ = [MovedSubnet.from_json(o) for o in moved_subnets or []] + new_space_ = new_space - if timestamp_ is not None and not isinstance(timestamp_, (bytes, str)): - raise Exception("Expected timestamp_ to be a str, received: {}".format(type(timestamp_))) + # Validate arguments against known Juju API types. + if error_ is not None and not isinstance(error_, (dict, Error)): + raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - if type__ is not None and not isinstance(type__, (bytes, str)): - raise Exception("Expected type__ to be a str, received: {}".format(type(type__))) + if moved_subnets_ is not None and not isinstance(moved_subnets_, (bytes, str, list)): + raise Exception("Expected moved_subnets_ to be a Sequence, received: {}".format(type(moved_subnets_))) - if username_ is not None and not isinstance(username_, (bytes, str)): - raise Exception("Expected username_ to be a str, received: {}".format(type(username_))) + if new_space_ is not None and not isinstance(new_space_, (bytes, str)): + raise Exception("Expected new_space_ to be a str, received: {}".format(type(new_space_))) - self.description = description_ - self.fingerprint = fingerprint_ - self.origin = origin_ - self.path = path_ - self.revision = revision_ - self.size = size_ - self.timestamp = timestamp_ - self.type_ = type__ - self.username = username_ + self.error = error_ + self.moved_subnets = moved_subnets_ + self.new_space = new_space_ self.unknown_fields = unknown_fields -class SerializedModelTools(Type): - _toSchema = {'uri': 'uri', 'version': 'version'} - _toPy = {'uri': 'uri', 'version': 'version'} - def __init__(self, uri=None, version=None, **unknown_fields): +class MoveSubnetsResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} + def __init__(self, results=None, **unknown_fields): ''' - uri : str - version : str + results : typing.Sequence[~MoveSubnetsResult] ''' - uri_ = uri - version_ = version + results_ = [MoveSubnetsResult.from_json(o) for o in results or []] # Validate arguments against known Juju API types. - if uri_ is not None and not isinstance(uri_, (bytes, str)): - raise Exception("Expected uri_ to be a str, received: {}".format(type(uri_))) - - if version_ is not None and not isinstance(version_, (bytes, str)): - raise Exception("Expected version_ to be a str, received: {}".format(type(version_))) + if results_ is not None and not isinstance(results_, (bytes, str, list)): + raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) - self.uri = uri_ - self.version = version_ + self.results = results_ self.unknown_fields = unknown_fields -class SetConstraints(Type): - _toSchema = {'application': 'application', 'constraints': 'constraints'} - _toPy = {'application': 'application', 'constraints': 'constraints'} - def __init__(self, application=None, constraints=None, **unknown_fields): +class MovedSubnet(Type): + _toSchema = {'cidr': 'cidr', 'old_space': 'old-space', 'subnet': 'subnet'} + _toPy = {'cidr': 'cidr', 'old-space': 'old_space', 'subnet': 'subnet'} + def __init__(self, cidr=None, old_space=None, subnet=None, **unknown_fields): ''' - application : str - constraints : Value + cidr : str + old_space : str + subnet : str ''' - application_ = application - constraints_ = Value.from_json(constraints) if constraints else None + cidr_ = cidr + old_space_ = old_space + subnet_ = subnet # Validate arguments against known Juju API types. - if application_ is not None and not isinstance(application_, (bytes, str)): - raise Exception("Expected application_ to be a str, received: {}".format(type(application_))) + if cidr_ is not None and not isinstance(cidr_, (bytes, str)): + raise Exception("Expected cidr_ to be a str, received: {}".format(type(cidr_))) - if constraints_ is not None and not isinstance(constraints_, (dict, Value)): - raise Exception("Expected constraints_ to be a Value, received: {}".format(type(constraints_))) + if old_space_ is not None and not isinstance(old_space_, (bytes, str)): + raise Exception("Expected old_space_ to be a str, received: {}".format(type(old_space_))) - self.application = application_ - self.constraints = constraints_ + if subnet_ is not None and not isinstance(subnet_, (bytes, str)): + raise Exception("Expected subnet_ to be a str, received: {}".format(type(subnet_))) + + self.cidr = cidr_ + self.old_space = old_space_ + self.subnet = subnet_ self.unknown_fields = unknown_fields -class SetExternalControllerInfoParams(Type): - _toSchema = {'info': 'info'} - _toPy = {'info': 'info'} - def __init__(self, info=None, **unknown_fields): +class NetworkInterface(Type): + _toSchema = {'dns_nameservers': 'dns-nameservers', 'gateway': 'gateway', 'ip_addresses': 'ip-addresses', 'is_up': 'is-up', 'mac_address': 'mac-address', 'space': 'space'} + _toPy = {'dns-nameservers': 'dns_nameservers', 'gateway': 'gateway', 'ip-addresses': 'ip_addresses', 'is-up': 'is_up', 'mac-address': 'mac_address', 'space': 'space'} + def __init__(self, dns_nameservers=None, gateway=None, ip_addresses=None, is_up=None, mac_address=None, space=None, **unknown_fields): ''' - info : ExternalControllerInfo + dns_nameservers : typing.Sequence[str] + gateway : str + ip_addresses : typing.Sequence[str] + is_up : bool + mac_address : str + space : str ''' - info_ = ExternalControllerInfo.from_json(info) if info else None + dns_nameservers_ = dns_nameservers + gateway_ = gateway + ip_addresses_ = ip_addresses + is_up_ = is_up + mac_address_ = mac_address + space_ = space # Validate arguments against known Juju API types. - if info_ is not None and not isinstance(info_, (dict, ExternalControllerInfo)): - raise Exception("Expected info_ to be a ExternalControllerInfo, received: {}".format(type(info_))) + if dns_nameservers_ is not None and not isinstance(dns_nameservers_, (bytes, str, list)): + raise Exception("Expected dns_nameservers_ to be a Sequence, received: {}".format(type(dns_nameservers_))) - self.info = info_ + if gateway_ is not None and not isinstance(gateway_, (bytes, str)): + raise Exception("Expected gateway_ to be a str, received: {}".format(type(gateway_))) + + if ip_addresses_ is not None and not isinstance(ip_addresses_, (bytes, str, list)): + raise Exception("Expected ip_addresses_ to be a Sequence, received: {}".format(type(ip_addresses_))) + + if is_up_ is not None and not isinstance(is_up_, bool): + raise Exception("Expected is_up_ to be a bool, received: {}".format(type(is_up_))) + + if mac_address_ is not None and not isinstance(mac_address_, (bytes, str)): + raise Exception("Expected mac_address_ to be a str, received: {}".format(type(mac_address_))) + + if space_ is not None and not isinstance(space_, (bytes, str)): + raise Exception("Expected space_ to be a str, received: {}".format(type(space_))) + + self.dns_nameservers = dns_nameservers_ + self.gateway = gateway_ + self.ip_addresses = ip_addresses_ + self.is_up = is_up_ + self.mac_address = mac_address_ + self.space = space_ self.unknown_fields = unknown_fields -class SetExternalControllersInfoParams(Type): - _toSchema = {'controllers': 'controllers'} - _toPy = {'controllers': 'controllers'} - def __init__(self, controllers=None, **unknown_fields): +class NotifyWatchResult(Type): + _toSchema = {'error': 'error', 'notifywatcherid': 'NotifyWatcherId'} + _toPy = {'NotifyWatcherId': 'notifywatcherid', 'error': 'error'} + def __init__(self, notifywatcherid=None, error=None, **unknown_fields): ''' - controllers : typing.Sequence[~SetExternalControllerInfoParams] + notifywatcherid : str + error : Error ''' - controllers_ = [SetExternalControllerInfoParams.from_json(o) for o in controllers or []] + notifywatcherid_ = notifywatcherid + error_ = Error.from_json(error) if error else None + + # Validate arguments against known Juju API types. + if notifywatcherid_ is not None and not isinstance(notifywatcherid_, (bytes, str)): + raise Exception("Expected notifywatcherid_ to be a str, received: {}".format(type(notifywatcherid_))) - # Validate arguments against known Juju API types. - if controllers_ is not None and not isinstance(controllers_, (bytes, str, list)): - raise Exception("Expected controllers_ to be a Sequence, received: {}".format(type(controllers_))) + if error_ is not None and not isinstance(error_, (dict, Error)): + raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - self.controllers = controllers_ + self.notifywatcherid = notifywatcherid_ + self.error = error_ self.unknown_fields = unknown_fields -class SetMachineBlockDevices(Type): - _toSchema = {'machine_block_devices': 'machine-block-devices'} - _toPy = {'machine-block-devices': 'machine_block_devices'} - def __init__(self, machine_block_devices=None, **unknown_fields): +class NotifyWatchResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} + def __init__(self, results=None, **unknown_fields): ''' - machine_block_devices : typing.Sequence[~MachineBlockDevices] + results : typing.Sequence[~NotifyWatchResult] ''' - machine_block_devices_ = [MachineBlockDevices.from_json(o) for o in machine_block_devices or []] + results_ = [NotifyWatchResult.from_json(o) for o in results or []] # Validate arguments against known Juju API types. - if machine_block_devices_ is not None and not isinstance(machine_block_devices_, (bytes, str, list)): - raise Exception("Expected machine_block_devices_ to be a Sequence, received: {}".format(type(machine_block_devices_))) + if results_ is not None and not isinstance(results_, (bytes, str, list)): + raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) - self.machine_block_devices = machine_block_devices_ + self.results = results_ self.unknown_fields = unknown_fields -class SetMachineNetworkConfig(Type): - _toSchema = {'config': 'config', 'tag': 'tag'} - _toPy = {'config': 'config', 'tag': 'tag'} - def __init__(self, config=None, tag=None, **unknown_fields): +class Number(Type): + _toSchema = {'build': 'Build', 'major': 'Major', 'minor': 'Minor', 'patch': 'Patch', 'tag': 'Tag'} + _toPy = {'Build': 'build', 'Major': 'major', 'Minor': 'minor', 'Patch': 'patch', 'Tag': 'tag'} + def __init__(self, build=None, major=None, minor=None, patch=None, tag=None, **unknown_fields): ''' - config : typing.Sequence[~NetworkConfig] + build : int + major : int + minor : int + patch : int tag : str ''' - config_ = [NetworkConfig.from_json(o) for o in config or []] + build_ = build + major_ = major + minor_ = minor + patch_ = patch tag_ = tag # Validate arguments against known Juju API types. - if config_ is not None and not isinstance(config_, (bytes, str, list)): - raise Exception("Expected config_ to be a Sequence, received: {}".format(type(config_))) + if build_ is not None and not isinstance(build_, int): + raise Exception("Expected build_ to be a int, received: {}".format(type(build_))) + + if major_ is not None and not isinstance(major_, int): + raise Exception("Expected major_ to be a int, received: {}".format(type(major_))) + + if minor_ is not None and not isinstance(minor_, int): + raise Exception("Expected minor_ to be a int, received: {}".format(type(minor_))) + + if patch_ is not None and not isinstance(patch_, int): + raise Exception("Expected patch_ to be a int, received: {}".format(type(patch_))) if tag_ is not None and not isinstance(tag_, (bytes, str)): raise Exception("Expected tag_ to be a str, received: {}".format(type(tag_))) - self.config = config_ + self.build = build_ + self.major = major_ + self.minor = minor_ + self.patch = patch_ self.tag = tag_ self.unknown_fields = unknown_fields -class SetMachinesAddresses(Type): - _toSchema = {'machine_addresses': 'machine-addresses'} - _toPy = {'machine-addresses': 'machine_addresses'} - def __init__(self, machine_addresses=None, **unknown_fields): +class OfferConnection(Type): + _toSchema = {'endpoint': 'endpoint', 'ingress_subnets': 'ingress-subnets', 'relation_id': 'relation-id', 'source_model_tag': 'source-model-tag', 'status': 'status', 'username': 'username'} + _toPy = {'endpoint': 'endpoint', 'ingress-subnets': 'ingress_subnets', 'relation-id': 'relation_id', 'source-model-tag': 'source_model_tag', 'status': 'status', 'username': 'username'} + def __init__(self, endpoint=None, ingress_subnets=None, relation_id=None, source_model_tag=None, status=None, username=None, **unknown_fields): ''' - machine_addresses : typing.Sequence[~MachineAddresses] + endpoint : str + ingress_subnets : typing.Sequence[str] + relation_id : int + source_model_tag : str + status : EntityStatus + username : str ''' - machine_addresses_ = [MachineAddresses.from_json(o) for o in machine_addresses or []] + endpoint_ = endpoint + ingress_subnets_ = ingress_subnets + relation_id_ = relation_id + source_model_tag_ = source_model_tag + status_ = EntityStatus.from_json(status) if status else None + username_ = username # Validate arguments against known Juju API types. - if machine_addresses_ is not None and not isinstance(machine_addresses_, (bytes, str, list)): - raise Exception("Expected machine_addresses_ to be a Sequence, received: {}".format(type(machine_addresses_))) + if endpoint_ is not None and not isinstance(endpoint_, (bytes, str)): + raise Exception("Expected endpoint_ to be a str, received: {}".format(type(endpoint_))) + + if ingress_subnets_ is not None and not isinstance(ingress_subnets_, (bytes, str, list)): + raise Exception("Expected ingress_subnets_ to be a Sequence, received: {}".format(type(ingress_subnets_))) + + if relation_id_ is not None and not isinstance(relation_id_, int): + raise Exception("Expected relation_id_ to be a int, received: {}".format(type(relation_id_))) + + if source_model_tag_ is not None and not isinstance(source_model_tag_, (bytes, str)): + raise Exception("Expected source_model_tag_ to be a str, received: {}".format(type(source_model_tag_))) + + if status_ is not None and not isinstance(status_, (dict, EntityStatus)): + raise Exception("Expected status_ to be a EntityStatus, received: {}".format(type(status_))) + + if username_ is not None and not isinstance(username_, (bytes, str)): + raise Exception("Expected username_ to be a str, received: {}".format(type(username_))) - self.machine_addresses = machine_addresses_ + self.endpoint = endpoint_ + self.ingress_subnets = ingress_subnets_ + self.relation_id = relation_id_ + self.source_model_tag = source_model_tag_ + self.status = status_ + self.username = username_ self.unknown_fields = unknown_fields -class SetMigrationPhaseArgs(Type): - _toSchema = {'phase': 'phase'} - _toPy = {'phase': 'phase'} - def __init__(self, phase=None, **unknown_fields): +class OfferFilter(Type): + _toSchema = {'allowed_users': 'allowed-users', 'application_description': 'application-description', 'application_name': 'application-name', 'application_user': 'application-user', 'connected_users': 'connected-users', 'endpoints': 'endpoints', 'model_name': 'model-name', 'offer_name': 'offer-name', 'owner_name': 'owner-name'} + _toPy = {'allowed-users': 'allowed_users', 'application-description': 'application_description', 'application-name': 'application_name', 'application-user': 'application_user', 'connected-users': 'connected_users', 'endpoints': 'endpoints', 'model-name': 'model_name', 'offer-name': 'offer_name', 'owner-name': 'owner_name'} + def __init__(self, allowed_users=None, application_description=None, application_name=None, application_user=None, connected_users=None, endpoints=None, model_name=None, offer_name=None, owner_name=None, **unknown_fields): ''' - phase : str + allowed_users : typing.Sequence[str] + application_description : str + application_name : str + application_user : str + connected_users : typing.Sequence[str] + endpoints : typing.Sequence[~EndpointFilterAttributes] + model_name : str + offer_name : str + owner_name : str ''' - phase_ = phase + allowed_users_ = allowed_users + application_description_ = application_description + application_name_ = application_name + application_user_ = application_user + connected_users_ = connected_users + endpoints_ = [EndpointFilterAttributes.from_json(o) for o in endpoints or []] + model_name_ = model_name + offer_name_ = offer_name + owner_name_ = owner_name # Validate arguments against known Juju API types. - if phase_ is not None and not isinstance(phase_, (bytes, str)): - raise Exception("Expected phase_ to be a str, received: {}".format(type(phase_))) + if allowed_users_ is not None and not isinstance(allowed_users_, (bytes, str, list)): + raise Exception("Expected allowed_users_ to be a Sequence, received: {}".format(type(allowed_users_))) + + if application_description_ is not None and not isinstance(application_description_, (bytes, str)): + raise Exception("Expected application_description_ to be a str, received: {}".format(type(application_description_))) + + if application_name_ is not None and not isinstance(application_name_, (bytes, str)): + raise Exception("Expected application_name_ to be a str, received: {}".format(type(application_name_))) + + if application_user_ is not None and not isinstance(application_user_, (bytes, str)): + raise Exception("Expected application_user_ to be a str, received: {}".format(type(application_user_))) + + if connected_users_ is not None and not isinstance(connected_users_, (bytes, str, list)): + raise Exception("Expected connected_users_ to be a Sequence, received: {}".format(type(connected_users_))) + + if endpoints_ is not None and not isinstance(endpoints_, (bytes, str, list)): + raise Exception("Expected endpoints_ to be a Sequence, received: {}".format(type(endpoints_))) + + if model_name_ is not None and not isinstance(model_name_, (bytes, str)): + raise Exception("Expected model_name_ to be a str, received: {}".format(type(model_name_))) + + if offer_name_ is not None and not isinstance(offer_name_, (bytes, str)): + raise Exception("Expected offer_name_ to be a str, received: {}".format(type(offer_name_))) - self.phase = phase_ + if owner_name_ is not None and not isinstance(owner_name_, (bytes, str)): + raise Exception("Expected owner_name_ to be a str, received: {}".format(type(owner_name_))) + + self.allowed_users = allowed_users_ + self.application_description = application_description_ + self.application_name = application_name_ + self.application_user = application_user_ + self.connected_users = connected_users_ + self.endpoints = endpoints_ + self.model_name = model_name_ + self.offer_name = offer_name_ + self.owner_name = owner_name_ self.unknown_fields = unknown_fields -class SetMigrationStatusMessageArgs(Type): - _toSchema = {'message': 'message'} - _toPy = {'message': 'message'} - def __init__(self, message=None, **unknown_fields): +class OfferFilters(Type): + _toSchema = {'filters': 'Filters'} + _toPy = {'Filters': 'filters'} + def __init__(self, filters=None, **unknown_fields): ''' - message : str + filters : typing.Sequence[~OfferFilter] ''' - message_ = message + filters_ = [OfferFilter.from_json(o) for o in filters or []] # Validate arguments against known Juju API types. - if message_ is not None and not isinstance(message_, (bytes, str)): - raise Exception("Expected message_ to be a str, received: {}".format(type(message_))) + if filters_ is not None and not isinstance(filters_, (bytes, str, list)): + raise Exception("Expected filters_ to be a Sequence, received: {}".format(type(filters_))) - self.message = message_ + self.filters = filters_ self.unknown_fields = unknown_fields -class SetModelDefaults(Type): - _toSchema = {'config': 'config'} - _toPy = {'config': 'config'} - def __init__(self, config=None, **unknown_fields): +class OfferURLs(Type): + _toSchema = {'bakery_version': 'bakery-version', 'offer_urls': 'offer-urls'} + _toPy = {'bakery-version': 'bakery_version', 'offer-urls': 'offer_urls'} + def __init__(self, bakery_version=None, offer_urls=None, **unknown_fields): ''' - config : typing.Sequence[~ModelDefaultValues] + bakery_version : int + offer_urls : typing.Sequence[str] ''' - config_ = [ModelDefaultValues.from_json(o) for o in config or []] + bakery_version_ = bakery_version + offer_urls_ = offer_urls # Validate arguments against known Juju API types. - if config_ is not None and not isinstance(config_, (bytes, str, list)): - raise Exception("Expected config_ to be a Sequence, received: {}".format(type(config_))) + if bakery_version_ is not None and not isinstance(bakery_version_, int): + raise Exception("Expected bakery_version_ to be a int, received: {}".format(type(bakery_version_))) - self.config = config_ + if offer_urls_ is not None and not isinstance(offer_urls_, (bytes, str, list)): + raise Exception("Expected offer_urls_ to be a Sequence, received: {}".format(type(offer_urls_))) + + self.bakery_version = bakery_version_ + self.offer_urls = offer_urls_ self.unknown_fields = unknown_fields -class SetModelEnvironVersion(Type): - _toSchema = {'model_tag': 'model-tag', 'version': 'version'} - _toPy = {'model-tag': 'model_tag', 'version': 'version'} - def __init__(self, model_tag=None, version=None, **unknown_fields): +class OfferUserDetails(Type): + _toSchema = {'access': 'access', 'display_name': 'display-name', 'user': 'user'} + _toPy = {'access': 'access', 'display-name': 'display_name', 'user': 'user'} + def __init__(self, access=None, display_name=None, user=None, **unknown_fields): ''' - model_tag : str - version : int + access : str + display_name : str + user : str ''' - model_tag_ = model_tag - version_ = version + access_ = access + display_name_ = display_name + user_ = user # Validate arguments against known Juju API types. - if model_tag_ is not None and not isinstance(model_tag_, (bytes, str)): - raise Exception("Expected model_tag_ to be a str, received: {}".format(type(model_tag_))) + if access_ is not None and not isinstance(access_, (bytes, str)): + raise Exception("Expected access_ to be a str, received: {}".format(type(access_))) - if version_ is not None and not isinstance(version_, int): - raise Exception("Expected version_ to be a int, received: {}".format(type(version_))) + if display_name_ is not None and not isinstance(display_name_, (bytes, str)): + raise Exception("Expected display_name_ to be a str, received: {}".format(type(display_name_))) - self.model_tag = model_tag_ - self.version = version_ + if user_ is not None and not isinstance(user_, (bytes, str)): + raise Exception("Expected user_ to be a str, received: {}".format(type(user_))) + + self.access = access_ + self.display_name = display_name_ + self.user = user_ self.unknown_fields = unknown_fields -class SetModelEnvironVersions(Type): - _toSchema = {'models': 'models'} - _toPy = {'models': 'models'} - def __init__(self, models=None, **unknown_fields): +class OperationQueryArgs(Type): + _toSchema = {'actions': 'actions', 'applications': 'applications', 'limit': 'limit', 'machines': 'machines', 'offset': 'offset', 'status': 'status', 'units': 'units'} + _toPy = {'actions': 'actions', 'applications': 'applications', 'limit': 'limit', 'machines': 'machines', 'offset': 'offset', 'status': 'status', 'units': 'units'} + def __init__(self, actions=None, applications=None, limit=None, machines=None, offset=None, status=None, units=None, **unknown_fields): ''' - models : typing.Sequence[~SetModelEnvironVersion] + actions : typing.Sequence[str] + applications : typing.Sequence[str] + limit : int + machines : typing.Sequence[str] + offset : int + status : typing.Sequence[str] + units : typing.Sequence[str] ''' - models_ = [SetModelEnvironVersion.from_json(o) for o in models or []] + actions_ = actions + applications_ = applications + limit_ = limit + machines_ = machines + offset_ = offset + status_ = status + units_ = units # Validate arguments against known Juju API types. - if models_ is not None and not isinstance(models_, (bytes, str, list)): - raise Exception("Expected models_ to be a Sequence, received: {}".format(type(models_))) + if actions_ is not None and not isinstance(actions_, (bytes, str, list)): + raise Exception("Expected actions_ to be a Sequence, received: {}".format(type(actions_))) - self.models = models_ + if applications_ is not None and not isinstance(applications_, (bytes, str, list)): + raise Exception("Expected applications_ to be a Sequence, received: {}".format(type(applications_))) + + if limit_ is not None and not isinstance(limit_, int): + raise Exception("Expected limit_ to be a int, received: {}".format(type(limit_))) + + if machines_ is not None and not isinstance(machines_, (bytes, str, list)): + raise Exception("Expected machines_ to be a Sequence, received: {}".format(type(machines_))) + + if offset_ is not None and not isinstance(offset_, int): + raise Exception("Expected offset_ to be a int, received: {}".format(type(offset_))) + + if status_ is not None and not isinstance(status_, (bytes, str, list)): + raise Exception("Expected status_ to be a Sequence, received: {}".format(type(status_))) + + if units_ is not None and not isinstance(units_, (bytes, str, list)): + raise Exception("Expected units_ to be a Sequence, received: {}".format(type(units_))) + + self.actions = actions_ + self.applications = applications_ + self.limit = limit_ + self.machines = machines_ + self.offset = offset_ + self.status = status_ + self.units = units_ self.unknown_fields = unknown_fields -class SetPayloadStatusArg(Type): - _toSchema = {'entity': 'Entity', 'status': 'status', 'tag': 'tag'} - _toPy = {'Entity': 'entity', 'status': 'status', 'tag': 'tag'} - def __init__(self, entity=None, status=None, tag=None, **unknown_fields): +class OperationResult(Type): + _toSchema = {'actions': 'actions', 'completed': 'completed', 'enqueued': 'enqueued', 'error': 'error', 'fail': 'fail', 'operation': 'operation', 'started': 'started', 'status': 'status', 'summary': 'summary'} + _toPy = {'actions': 'actions', 'completed': 'completed', 'enqueued': 'enqueued', 'error': 'error', 'fail': 'fail', 'operation': 'operation', 'started': 'started', 'status': 'status', 'summary': 'summary'} + def __init__(self, actions=None, completed=None, enqueued=None, error=None, fail=None, operation=None, started=None, status=None, summary=None, **unknown_fields): ''' - entity : Entity + actions : typing.Sequence[~ActionResult] + completed : str + enqueued : str + error : Error + fail : str + operation : str + started : str status : str - tag : str + summary : str ''' - entity_ = Entity.from_json(entity) if entity else None + actions_ = [ActionResult.from_json(o) for o in actions or []] + completed_ = completed + enqueued_ = enqueued + error_ = Error.from_json(error) if error else None + fail_ = fail + operation_ = operation + started_ = started status_ = status - tag_ = tag + summary_ = summary # Validate arguments against known Juju API types. - if entity_ is not None and not isinstance(entity_, (dict, Entity)): - raise Exception("Expected entity_ to be a Entity, received: {}".format(type(entity_))) - - if status_ is not None and not isinstance(status_, (bytes, str)): - raise Exception("Expected status_ to be a str, received: {}".format(type(status_))) - - if tag_ is not None and not isinstance(tag_, (bytes, str)): - raise Exception("Expected tag_ to be a str, received: {}".format(type(tag_))) - - self.entity = entity_ - self.status = status_ - self.tag = tag_ - self.unknown_fields = unknown_fields - + if actions_ is not None and not isinstance(actions_, (bytes, str, list)): + raise Exception("Expected actions_ to be a Sequence, received: {}".format(type(actions_))) + if completed_ is not None and not isinstance(completed_, (bytes, str)): + raise Exception("Expected completed_ to be a str, received: {}".format(type(completed_))) -class SetPayloadStatusArgs(Type): - _toSchema = {'args': 'args'} - _toPy = {'args': 'args'} - def __init__(self, args=None, **unknown_fields): - ''' - args : typing.Sequence[~SetPayloadStatusArg] - ''' - args_ = [SetPayloadStatusArg.from_json(o) for o in args or []] + if enqueued_ is not None and not isinstance(enqueued_, (bytes, str)): + raise Exception("Expected enqueued_ to be a str, received: {}".format(type(enqueued_))) - # Validate arguments against known Juju API types. - if args_ is not None and not isinstance(args_, (bytes, str, list)): - raise Exception("Expected args_ to be a Sequence, received: {}".format(type(args_))) + if error_ is not None and not isinstance(error_, (dict, Error)): + raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - self.args = args_ - self.unknown_fields = unknown_fields + if fail_ is not None and not isinstance(fail_, (bytes, str)): + raise Exception("Expected fail_ to be a str, received: {}".format(type(fail_))) + if operation_ is not None and not isinstance(operation_, (bytes, str)): + raise Exception("Expected operation_ to be a str, received: {}".format(type(operation_))) + if started_ is not None and not isinstance(started_, (bytes, str)): + raise Exception("Expected started_ to be a str, received: {}".format(type(started_))) -class SetPodSpecParams(Type): - _toSchema = {'specs': 'specs'} - _toPy = {'specs': 'specs'} - def __init__(self, specs=None, **unknown_fields): - ''' - specs : typing.Sequence[~EntityString] - ''' - specs_ = [EntityString.from_json(o) for o in specs or []] + if status_ is not None and not isinstance(status_, (bytes, str)): + raise Exception("Expected status_ to be a str, received: {}".format(type(status_))) - # Validate arguments against known Juju API types. - if specs_ is not None and not isinstance(specs_, (bytes, str, list)): - raise Exception("Expected specs_ to be a Sequence, received: {}".format(type(specs_))) + if summary_ is not None and not isinstance(summary_, (bytes, str)): + raise Exception("Expected summary_ to be a str, received: {}".format(type(summary_))) - self.specs = specs_ + self.actions = actions_ + self.completed = completed_ + self.enqueued = enqueued_ + self.error = error_ + self.fail = fail_ + self.operation = operation_ + self.started = started_ + self.status = status_ + self.summary = summary_ self.unknown_fields = unknown_fields -class SetProfileArg(Type): - _toSchema = {'entity': 'entity', 'profiles': 'profiles'} - _toPy = {'entity': 'entity', 'profiles': 'profiles'} - def __init__(self, entity=None, profiles=None, **unknown_fields): +class OperationResults(Type): + _toSchema = {'results': 'results', 'truncated': 'truncated'} + _toPy = {'results': 'results', 'truncated': 'truncated'} + def __init__(self, results=None, truncated=None, **unknown_fields): ''' - entity : Entity - profiles : typing.Sequence[str] + results : typing.Sequence[~OperationResult] + truncated : bool ''' - entity_ = Entity.from_json(entity) if entity else None - profiles_ = profiles + results_ = [OperationResult.from_json(o) for o in results or []] + truncated_ = truncated # Validate arguments against known Juju API types. - if entity_ is not None and not isinstance(entity_, (dict, Entity)): - raise Exception("Expected entity_ to be a Entity, received: {}".format(type(entity_))) + if results_ is not None and not isinstance(results_, (bytes, str, list)): + raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) - if profiles_ is not None and not isinstance(profiles_, (bytes, str, list)): - raise Exception("Expected profiles_ to be a Sequence, received: {}".format(type(profiles_))) + if truncated_ is not None and not isinstance(truncated_, bool): + raise Exception("Expected truncated_ to be a bool, received: {}".format(type(truncated_))) - self.entity = entity_ - self.profiles = profiles_ + self.results = results_ + self.truncated = truncated_ self.unknown_fields = unknown_fields -class SetProfileArgs(Type): - _toSchema = {'args': 'args'} - _toPy = {'args': 'args'} - def __init__(self, args=None, **unknown_fields): +class Payload(Type): + _toSchema = {'class_': 'class', 'id_': 'id', 'labels': 'labels', 'machine': 'machine', 'status': 'status', 'type_': 'type', 'unit': 'unit'} + _toPy = {'class': 'class_', 'id': 'id_', 'labels': 'labels', 'machine': 'machine', 'status': 'status', 'type': 'type_', 'unit': 'unit'} + def __init__(self, class_=None, id_=None, labels=None, machine=None, status=None, type_=None, unit=None, **unknown_fields): ''' - args : typing.Sequence[~SetProfileArg] + class_ : str + id_ : str + labels : typing.Sequence[str] + machine : str + status : str + type_ : str + unit : str ''' - args_ = [SetProfileArg.from_json(o) for o in args or []] + class__ = class_ + id__ = id_ + labels_ = labels + machine_ = machine + status_ = status + type__ = type_ + unit_ = unit # Validate arguments against known Juju API types. - if args_ is not None and not isinstance(args_, (bytes, str, list)): - raise Exception("Expected args_ to be a Sequence, received: {}".format(type(args_))) + if class__ is not None and not isinstance(class__, (bytes, str)): + raise Exception("Expected class__ to be a str, received: {}".format(type(class__))) - self.args = args_ - self.unknown_fields = unknown_fields + if id__ is not None and not isinstance(id__, (bytes, str)): + raise Exception("Expected id__ to be a str, received: {}".format(type(id__))) + if labels_ is not None and not isinstance(labels_, (bytes, str, list)): + raise Exception("Expected labels_ to be a Sequence, received: {}".format(type(labels_))) + if machine_ is not None and not isinstance(machine_, (bytes, str)): + raise Exception("Expected machine_ to be a str, received: {}".format(type(machine_))) -class SetProviderNetworkConfig(Type): - _toSchema = {'args': 'args'} - _toPy = {'args': 'args'} - def __init__(self, args=None, **unknown_fields): - ''' - args : typing.Sequence[~ProviderNetworkConfig] - ''' - args_ = [ProviderNetworkConfig.from_json(o) for o in args or []] + if status_ is not None and not isinstance(status_, (bytes, str)): + raise Exception("Expected status_ to be a str, received: {}".format(type(status_))) - # Validate arguments against known Juju API types. - if args_ is not None and not isinstance(args_, (bytes, str, list)): - raise Exception("Expected args_ to be a Sequence, received: {}".format(type(args_))) + if type__ is not None and not isinstance(type__, (bytes, str)): + raise Exception("Expected type__ to be a str, received: {}".format(type(type__))) - self.args = args_ + if unit_ is not None and not isinstance(unit_, (bytes, str)): + raise Exception("Expected unit_ to be a str, received: {}".format(type(unit_))) + + self.class_ = class__ + self.id_ = id__ + self.labels = labels_ + self.machine = machine_ + self.status = status_ + self.type_ = type__ + self.unit = unit_ self.unknown_fields = unknown_fields -class SetProviderNetworkConfigResult(Type): - _toSchema = {'addresses': 'addresses', 'error': 'error', 'modified': 'modified'} - _toPy = {'addresses': 'addresses', 'error': 'error', 'modified': 'modified'} - def __init__(self, addresses=None, error=None, modified=None, **unknown_fields): +class PayloadListArgs(Type): + _toSchema = {'patterns': 'patterns'} + _toPy = {'patterns': 'patterns'} + def __init__(self, patterns=None, **unknown_fields): ''' - addresses : typing.Sequence[~Address] - error : Error - modified : bool + patterns : typing.Sequence[str] ''' - addresses_ = [Address.from_json(o) for o in addresses or []] - error_ = Error.from_json(error) if error else None - modified_ = modified + patterns_ = patterns # Validate arguments against known Juju API types. - if addresses_ is not None and not isinstance(addresses_, (bytes, str, list)): - raise Exception("Expected addresses_ to be a Sequence, received: {}".format(type(addresses_))) - - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - - if modified_ is not None and not isinstance(modified_, bool): - raise Exception("Expected modified_ to be a bool, received: {}".format(type(modified_))) + if patterns_ is not None and not isinstance(patterns_, (bytes, str, list)): + raise Exception("Expected patterns_ to be a Sequence, received: {}".format(type(patterns_))) - self.addresses = addresses_ - self.error = error_ - self.modified = modified_ + self.patterns = patterns_ self.unknown_fields = unknown_fields -class SetProviderNetworkConfigResults(Type): +class PayloadListResults(Type): _toSchema = {'results': 'results'} _toPy = {'results': 'results'} def __init__(self, results=None, **unknown_fields): ''' - results : typing.Sequence[~SetProviderNetworkConfigResult] + results : typing.Sequence[~Payload] ''' - results_ = [SetProviderNetworkConfigResult.from_json(o) for o in results or []] + results_ = [Payload.from_json(o) for o in results or []] # Validate arguments against known Juju API types. if results_ is not None and not isinstance(results_, (bytes, str, list)): @@ -23039,170 +11678,146 @@ def __init__(self, results=None, **unknown_fields): -class SetStatus(Type): - _toSchema = {'entities': 'entities'} - _toPy = {'entities': 'entities'} - def __init__(self, entities=None, **unknown_fields): +class PendingResourceUpload(Type): + _toSchema = {'filename': 'Filename', 'name': 'Name', 'type_': 'Type'} + _toPy = {'Filename': 'filename', 'Name': 'name', 'Type': 'type_'} + def __init__(self, filename=None, name=None, type_=None, **unknown_fields): ''' - entities : typing.Sequence[~EntityStatusArgs] + filename : str + name : str + type_ : str ''' - entities_ = [EntityStatusArgs.from_json(o) for o in entities or []] + filename_ = filename + name_ = name + type__ = type_ # Validate arguments against known Juju API types. - if entities_ is not None and not isinstance(entities_, (bytes, str, list)): - raise Exception("Expected entities_ to be a Sequence, received: {}".format(type(entities_))) + if filename_ is not None and not isinstance(filename_, (bytes, str)): + raise Exception("Expected filename_ to be a str, received: {}".format(type(filename_))) - self.entities = entities_ + if name_ is not None and not isinstance(name_, (bytes, str)): + raise Exception("Expected name_ to be a str, received: {}".format(type(name_))) + + if type__ is not None and not isinstance(type__, (bytes, str)): + raise Exception("Expected type__ to be a str, received: {}".format(type(type__))) + + self.filename = filename_ + self.name = name_ + self.type_ = type__ self.unknown_fields = unknown_fields -class SetUnitStateArg(Type): - _toSchema = {'charm_state': 'charm-state', 'meter_status_state': 'meter-status-state', 'relation_state': 'relation-state', 'secret_state': 'secret-state', 'storage_state': 'storage-state', 'tag': 'tag', 'uniter_state': 'uniter-state'} - _toPy = {'charm-state': 'charm_state', 'meter-status-state': 'meter_status_state', 'relation-state': 'relation_state', 'secret-state': 'secret_state', 'storage-state': 'storage_state', 'tag': 'tag', 'uniter-state': 'uniter_state'} - def __init__(self, charm_state=None, meter_status_state=None, relation_state=None, secret_state=None, storage_state=None, tag=None, uniter_state=None, **unknown_fields): +class Placement(Type): + _toSchema = {'directive': 'directive', 'scope': 'scope'} + _toPy = {'directive': 'directive', 'scope': 'scope'} + def __init__(self, directive=None, scope=None, **unknown_fields): ''' - charm_state : typing.Mapping[str, str] - meter_status_state : str - relation_state : typing.Mapping[str, str] - secret_state : str - storage_state : str - tag : str - uniter_state : str + directive : str + scope : str ''' - charm_state_ = charm_state - meter_status_state_ = meter_status_state - relation_state_ = relation_state - secret_state_ = secret_state - storage_state_ = storage_state - tag_ = tag - uniter_state_ = uniter_state + directive_ = directive + scope_ = scope # Validate arguments against known Juju API types. - if charm_state_ is not None and not isinstance(charm_state_, dict): - raise Exception("Expected charm_state_ to be a Mapping, received: {}".format(type(charm_state_))) - - if meter_status_state_ is not None and not isinstance(meter_status_state_, (bytes, str)): - raise Exception("Expected meter_status_state_ to be a str, received: {}".format(type(meter_status_state_))) - - if relation_state_ is not None and not isinstance(relation_state_, dict): - raise Exception("Expected relation_state_ to be a Mapping, received: {}".format(type(relation_state_))) - - if secret_state_ is not None and not isinstance(secret_state_, (bytes, str)): - raise Exception("Expected secret_state_ to be a str, received: {}".format(type(secret_state_))) - - if storage_state_ is not None and not isinstance(storage_state_, (bytes, str)): - raise Exception("Expected storage_state_ to be a str, received: {}".format(type(storage_state_))) - - if tag_ is not None and not isinstance(tag_, (bytes, str)): - raise Exception("Expected tag_ to be a str, received: {}".format(type(tag_))) + if directive_ is not None and not isinstance(directive_, (bytes, str)): + raise Exception("Expected directive_ to be a str, received: {}".format(type(directive_))) - if uniter_state_ is not None and not isinstance(uniter_state_, (bytes, str)): - raise Exception("Expected uniter_state_ to be a str, received: {}".format(type(uniter_state_))) + if scope_ is not None and not isinstance(scope_, (bytes, str)): + raise Exception("Expected scope_ to be a str, received: {}".format(type(scope_))) - self.charm_state = charm_state_ - self.meter_status_state = meter_status_state_ - self.relation_state = relation_state_ - self.secret_state = secret_state_ - self.storage_state = storage_state_ - self.tag = tag_ - self.uniter_state = uniter_state_ + self.directive = directive_ + self.scope = scope_ self.unknown_fields = unknown_fields -class SetUnitStateArgs(Type): - _toSchema = {'args': 'args'} - _toPy = {'args': 'args'} - def __init__(self, args=None, **unknown_fields): +class ProvisioningScriptParams(Type): + _toSchema = {'data_dir': 'data-dir', 'disable_package_commands': 'disable-package-commands', 'machine_id': 'machine-id', 'nonce': 'nonce'} + _toPy = {'data-dir': 'data_dir', 'disable-package-commands': 'disable_package_commands', 'machine-id': 'machine_id', 'nonce': 'nonce'} + def __init__(self, data_dir=None, disable_package_commands=None, machine_id=None, nonce=None, **unknown_fields): ''' - args : typing.Sequence[~SetUnitStateArg] + data_dir : str + disable_package_commands : bool + machine_id : str + nonce : str ''' - args_ = [SetUnitStateArg.from_json(o) for o in args or []] + data_dir_ = data_dir + disable_package_commands_ = disable_package_commands + machine_id_ = machine_id + nonce_ = nonce + + # Validate arguments against known Juju API types. + if data_dir_ is not None and not isinstance(data_dir_, (bytes, str)): + raise Exception("Expected data_dir_ to be a str, received: {}".format(type(data_dir_))) - # Validate arguments against known Juju API types. - if args_ is not None and not isinstance(args_, (bytes, str, list)): - raise Exception("Expected args_ to be a Sequence, received: {}".format(type(args_))) + if disable_package_commands_ is not None and not isinstance(disable_package_commands_, bool): + raise Exception("Expected disable_package_commands_ to be a bool, received: {}".format(type(disable_package_commands_))) - self.args = args_ + if machine_id_ is not None and not isinstance(machine_id_, (bytes, str)): + raise Exception("Expected machine_id_ to be a str, received: {}".format(type(machine_id_))) + + if nonce_ is not None and not isinstance(nonce_, (bytes, str)): + raise Exception("Expected nonce_ to be a str, received: {}".format(type(nonce_))) + + self.data_dir = data_dir_ + self.disable_package_commands = disable_package_commands_ + self.machine_id = machine_id_ + self.nonce = nonce_ self.unknown_fields = unknown_fields -class Settings(Type): - _toSchema = {'autonoproxy': 'AutoNoProxy', 'ftp': 'Ftp', 'http': 'Http', 'https': 'Https', 'noproxy': 'NoProxy'} - _toPy = {'AutoNoProxy': 'autonoproxy', 'Ftp': 'ftp', 'Http': 'http', 'Https': 'https', 'NoProxy': 'noproxy'} - def __init__(self, autonoproxy=None, ftp=None, http=None, https=None, noproxy=None, **unknown_fields): +class ProvisioningScriptResult(Type): + _toSchema = {'script': 'script'} + _toPy = {'script': 'script'} + def __init__(self, script=None, **unknown_fields): ''' - autonoproxy : str - ftp : str - http : str - https : str - noproxy : str + script : str ''' - autonoproxy_ = autonoproxy - ftp_ = ftp - http_ = http - https_ = https - noproxy_ = noproxy + script_ = script # Validate arguments against known Juju API types. - if autonoproxy_ is not None and not isinstance(autonoproxy_, (bytes, str)): - raise Exception("Expected autonoproxy_ to be a str, received: {}".format(type(autonoproxy_))) - - if ftp_ is not None and not isinstance(ftp_, (bytes, str)): - raise Exception("Expected ftp_ to be a str, received: {}".format(type(ftp_))) - - if http_ is not None and not isinstance(http_, (bytes, str)): - raise Exception("Expected http_ to be a str, received: {}".format(type(http_))) - - if https_ is not None and not isinstance(https_, (bytes, str)): - raise Exception("Expected https_ to be a str, received: {}".format(type(https_))) - - if noproxy_ is not None and not isinstance(noproxy_, (bytes, str)): - raise Exception("Expected noproxy_ to be a str, received: {}".format(type(noproxy_))) + if script_ is not None and not isinstance(script_, (bytes, str)): + raise Exception("Expected script_ to be a str, received: {}".format(type(script_))) - self.autonoproxy = autonoproxy_ - self.ftp = ftp_ - self.http = http_ - self.https = https_ - self.noproxy = noproxy_ + self.script = script_ self.unknown_fields = unknown_fields -class SettingsResult(Type): - _toSchema = {'error': 'error', 'settings': 'settings'} - _toPy = {'error': 'error', 'settings': 'settings'} - def __init__(self, error=None, settings=None, **unknown_fields): +class Proxy(Type): + _toSchema = {'config': 'config', 'type_': 'type'} + _toPy = {'config': 'config', 'type': 'type_'} + def __init__(self, config=None, type_=None, **unknown_fields): ''' - error : Error - settings : typing.Mapping[str, str] + config : typing.Mapping[str, typing.Any] + type_ : str ''' - error_ = Error.from_json(error) if error else None - settings_ = settings + config_ = config + type__ = type_ # Validate arguments against known Juju API types. - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) + if config_ is not None and not isinstance(config_, dict): + raise Exception("Expected config_ to be a Mapping, received: {}".format(type(config_))) - if settings_ is not None and not isinstance(settings_, dict): - raise Exception("Expected settings_ to be a Mapping, received: {}".format(type(settings_))) + if type__ is not None and not isinstance(type__, (bytes, str)): + raise Exception("Expected type__ to be a str, received: {}".format(type(type__))) - self.error = error_ - self.settings = settings_ + self.config = config_ + self.type_ = type__ self.unknown_fields = unknown_fields -class SettingsResults(Type): +class QueryApplicationOffersResults(Type): _toSchema = {'results': 'results'} _toPy = {'results': 'results'} def __init__(self, results=None, **unknown_fields): ''' - results : typing.Sequence[~SettingsResult] + results : typing.Sequence[~ApplicationOfferAdminDetails] ''' - results_ = [SettingsResult.from_json(o) for o in results or []] + results_ = [ApplicationOfferAdminDetails.from_json(o) for o in results or []] # Validate arguments against known Juju API types. if results_ is not None and not isinstance(results_, (bytes, str, list)): @@ -23213,518 +11828,551 @@ def __init__(self, results=None, **unknown_fields): -class ShowSpaceResult(Type): - _toSchema = {'applications': 'applications', 'error': 'error', 'machine_count': 'machine-count', 'space': 'space'} - _toPy = {'applications': 'applications', 'error': 'error', 'machine-count': 'machine_count', 'space': 'space'} - def __init__(self, applications=None, error=None, machine_count=None, space=None, **unknown_fields): +class RedirectInfoResult(Type): + _toSchema = {'ca_cert': 'ca-cert', 'servers': 'servers'} + _toPy = {'ca-cert': 'ca_cert', 'servers': 'servers'} + def __init__(self, ca_cert=None, servers=None, **unknown_fields): ''' - applications : typing.Sequence[str] - error : Error - machine_count : int - space : Space + ca_cert : str + servers : typing.Sequence[~HostPort] ''' - applications_ = applications - error_ = Error.from_json(error) if error else None - machine_count_ = machine_count - space_ = Space.from_json(space) if space else None + ca_cert_ = ca_cert + servers_ = [HostPort.from_json(o) for o in servers or []] # Validate arguments against known Juju API types. - if applications_ is not None and not isinstance(applications_, (bytes, str, list)): - raise Exception("Expected applications_ to be a Sequence, received: {}".format(type(applications_))) - - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - - if machine_count_ is not None and not isinstance(machine_count_, int): - raise Exception("Expected machine_count_ to be a int, received: {}".format(type(machine_count_))) + if ca_cert_ is not None and not isinstance(ca_cert_, (bytes, str)): + raise Exception("Expected ca_cert_ to be a str, received: {}".format(type(ca_cert_))) - if space_ is not None and not isinstance(space_, (dict, Space)): - raise Exception("Expected space_ to be a Space, received: {}".format(type(space_))) + if servers_ is not None and not isinstance(servers_, (bytes, str, list)): + raise Exception("Expected servers_ to be a Sequence, received: {}".format(type(servers_))) - self.applications = applications_ - self.error = error_ - self.machine_count = machine_count_ - self.space = space_ + self.ca_cert = ca_cert_ + self.servers = servers_ self.unknown_fields = unknown_fields -class ShowSpaceResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None, **unknown_fields): +class RegionDefaults(Type): + _toSchema = {'region_name': 'region-name', 'value': 'value'} + _toPy = {'region-name': 'region_name', 'value': 'value'} + def __init__(self, region_name=None, value=None, **unknown_fields): ''' - results : typing.Sequence[~ShowSpaceResult] + region_name : str + value : Any ''' - results_ = [ShowSpaceResult.from_json(o) for o in results or []] + region_name_ = region_name + value_ = value # Validate arguments against known Juju API types. - if results_ is not None and not isinstance(results_, (bytes, str, list)): - raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) + if region_name_ is not None and not isinstance(region_name_, (bytes, str)): + raise Exception("Expected region_name_ to be a str, received: {}".format(type(region_name_))) - self.results = results_ + self.region_name = region_name_ + self.value = value_ self.unknown_fields = unknown_fields -class SingularClaim(Type): - _toSchema = {'claimant_tag': 'claimant-tag', 'duration': 'duration', 'entity_tag': 'entity-tag'} - _toPy = {'claimant-tag': 'claimant_tag', 'duration': 'duration', 'entity-tag': 'entity_tag'} - def __init__(self, claimant_tag=None, duration=None, entity_tag=None, **unknown_fields): +class RelationData(Type): + _toSchema = {'inscope': 'InScope', 'unitdata': 'UnitData'} + _toPy = {'InScope': 'inscope', 'UnitData': 'unitdata'} + def __init__(self, inscope=None, unitdata=None, **unknown_fields): ''' - claimant_tag : str - duration : int - entity_tag : str + inscope : bool + unitdata : typing.Mapping[str, typing.Any] ''' - claimant_tag_ = claimant_tag - duration_ = duration - entity_tag_ = entity_tag + inscope_ = inscope + unitdata_ = unitdata # Validate arguments against known Juju API types. - if claimant_tag_ is not None and not isinstance(claimant_tag_, (bytes, str)): - raise Exception("Expected claimant_tag_ to be a str, received: {}".format(type(claimant_tag_))) - - if duration_ is not None and not isinstance(duration_, int): - raise Exception("Expected duration_ to be a int, received: {}".format(type(duration_))) + if inscope_ is not None and not isinstance(inscope_, bool): + raise Exception("Expected inscope_ to be a bool, received: {}".format(type(inscope_))) - if entity_tag_ is not None and not isinstance(entity_tag_, (bytes, str)): - raise Exception("Expected entity_tag_ to be a str, received: {}".format(type(entity_tag_))) + if unitdata_ is not None and not isinstance(unitdata_, dict): + raise Exception("Expected unitdata_ to be a Mapping, received: {}".format(type(unitdata_))) - self.claimant_tag = claimant_tag_ - self.duration = duration_ - self.entity_tag = entity_tag_ + self.inscope = inscope_ + self.unitdata = unitdata_ self.unknown_fields = unknown_fields -class SingularClaims(Type): - _toSchema = {'claims': 'claims'} - _toPy = {'claims': 'claims'} - def __init__(self, claims=None, **unknown_fields): +class RelationStatus(Type): + _toSchema = {'endpoints': 'endpoints', 'id_': 'id', 'interface': 'interface', 'key': 'key', 'scope': 'scope', 'status': 'status'} + _toPy = {'endpoints': 'endpoints', 'id': 'id_', 'interface': 'interface', 'key': 'key', 'scope': 'scope', 'status': 'status'} + def __init__(self, endpoints=None, id_=None, interface=None, key=None, scope=None, status=None, **unknown_fields): ''' - claims : typing.Sequence[~SingularClaim] + endpoints : typing.Sequence[~EndpointStatus] + id_ : int + interface : str + key : str + scope : str + status : DetailedStatus ''' - claims_ = [SingularClaim.from_json(o) for o in claims or []] + endpoints_ = [EndpointStatus.from_json(o) for o in endpoints or []] + id__ = id_ + interface_ = interface + key_ = key + scope_ = scope + status_ = DetailedStatus.from_json(status) if status else None # Validate arguments against known Juju API types. - if claims_ is not None and not isinstance(claims_, (bytes, str, list)): - raise Exception("Expected claims_ to be a Sequence, received: {}".format(type(claims_))) + if endpoints_ is not None and not isinstance(endpoints_, (bytes, str, list)): + raise Exception("Expected endpoints_ to be a Sequence, received: {}".format(type(endpoints_))) + + if id__ is not None and not isinstance(id__, int): + raise Exception("Expected id__ to be a int, received: {}".format(type(id__))) + + if interface_ is not None and not isinstance(interface_, (bytes, str)): + raise Exception("Expected interface_ to be a str, received: {}".format(type(interface_))) + + if key_ is not None and not isinstance(key_, (bytes, str)): + raise Exception("Expected key_ to be a str, received: {}".format(type(key_))) + + if scope_ is not None and not isinstance(scope_, (bytes, str)): + raise Exception("Expected scope_ to be a str, received: {}".format(type(scope_))) + + if status_ is not None and not isinstance(status_, (dict, DetailedStatus)): + raise Exception("Expected status_ to be a DetailedStatus, received: {}".format(type(status_))) - self.claims = claims_ + self.endpoints = endpoints_ + self.id_ = id__ + self.interface = interface_ + self.key = key_ + self.scope = scope_ + self.status = status_ self.unknown_fields = unknown_fields -class Space(Type): - _toSchema = {'error': 'error', 'id_': 'id', 'name': 'name', 'subnets': 'subnets'} - _toPy = {'error': 'error', 'id': 'id_', 'name': 'name', 'subnets': 'subnets'} - def __init__(self, error=None, id_=None, name=None, subnets=None, **unknown_fields): +class RelationSuspendedArg(Type): + _toSchema = {'message': 'message', 'relation_id': 'relation-id', 'suspended': 'suspended'} + _toPy = {'message': 'message', 'relation-id': 'relation_id', 'suspended': 'suspended'} + def __init__(self, message=None, relation_id=None, suspended=None, **unknown_fields): ''' - error : Error - id_ : str - name : str - subnets : typing.Sequence[~Subnet] + message : str + relation_id : int + suspended : bool ''' - error_ = Error.from_json(error) if error else None - id__ = id_ - name_ = name - subnets_ = [Subnet.from_json(o) for o in subnets or []] + message_ = message + relation_id_ = relation_id + suspended_ = suspended # Validate arguments against known Juju API types. - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) + if message_ is not None and not isinstance(message_, (bytes, str)): + raise Exception("Expected message_ to be a str, received: {}".format(type(message_))) - if id__ is not None and not isinstance(id__, (bytes, str)): - raise Exception("Expected id__ to be a str, received: {}".format(type(id__))) + if relation_id_ is not None and not isinstance(relation_id_, int): + raise Exception("Expected relation_id_ to be a int, received: {}".format(type(relation_id_))) - if name_ is not None and not isinstance(name_, (bytes, str)): - raise Exception("Expected name_ to be a str, received: {}".format(type(name_))) + if suspended_ is not None and not isinstance(suspended_, bool): + raise Exception("Expected suspended_ to be a bool, received: {}".format(type(suspended_))) - if subnets_ is not None and not isinstance(subnets_, (bytes, str, list)): - raise Exception("Expected subnets_ to be a Sequence, received: {}".format(type(subnets_))) + self.message = message_ + self.relation_id = relation_id_ + self.suspended = suspended_ + self.unknown_fields = unknown_fields - self.error = error_ - self.id_ = id__ - self.name = name_ - self.subnets = subnets_ + + +class RelationSuspendedArgs(Type): + _toSchema = {'args': 'args'} + _toPy = {'args': 'args'} + def __init__(self, args=None, **unknown_fields): + ''' + args : typing.Sequence[~RelationSuspendedArg] + ''' + args_ = [RelationSuspendedArg.from_json(o) for o in args or []] + + # Validate arguments against known Juju API types. + if args_ is not None and not isinstance(args_, (bytes, str, list)): + raise Exception("Expected args_ to be a Sequence, received: {}".format(type(args_))) + + self.args = args_ self.unknown_fields = unknown_fields -class SpaceInfo(Type): - _toSchema = {'id_': 'id', 'name': 'name', 'provider_id': 'provider-id', 'subnets': 'subnets'} - _toPy = {'id': 'id_', 'name': 'name', 'provider-id': 'provider_id', 'subnets': 'subnets'} - def __init__(self, id_=None, name=None, provider_id=None, subnets=None, **unknown_fields): +class RemoteApplicationInfo(Type): + _toSchema = {'description': 'description', 'endpoints': 'endpoints', 'icon_url_path': 'icon-url-path', 'model_tag': 'model-tag', 'name': 'name', 'offer_url': 'offer-url', 'source_model_label': 'source-model-label'} + _toPy = {'description': 'description', 'endpoints': 'endpoints', 'icon-url-path': 'icon_url_path', 'model-tag': 'model_tag', 'name': 'name', 'offer-url': 'offer_url', 'source-model-label': 'source_model_label'} + def __init__(self, description=None, endpoints=None, icon_url_path=None, model_tag=None, name=None, offer_url=None, source_model_label=None, **unknown_fields): ''' - id_ : str + description : str + endpoints : typing.Sequence[~RemoteEndpoint] + icon_url_path : str + model_tag : str name : str - provider_id : str - subnets : typing.Sequence[~SubnetV3] + offer_url : str + source_model_label : str ''' - id__ = id_ + description_ = description + endpoints_ = [RemoteEndpoint.from_json(o) for o in endpoints or []] + icon_url_path_ = icon_url_path + model_tag_ = model_tag name_ = name - provider_id_ = provider_id - subnets_ = [SubnetV3.from_json(o) for o in subnets or []] + offer_url_ = offer_url + source_model_label_ = source_model_label # Validate arguments against known Juju API types. - if id__ is not None and not isinstance(id__, (bytes, str)): - raise Exception("Expected id__ to be a str, received: {}".format(type(id__))) + if description_ is not None and not isinstance(description_, (bytes, str)): + raise Exception("Expected description_ to be a str, received: {}".format(type(description_))) + + if endpoints_ is not None and not isinstance(endpoints_, (bytes, str, list)): + raise Exception("Expected endpoints_ to be a Sequence, received: {}".format(type(endpoints_))) + + if icon_url_path_ is not None and not isinstance(icon_url_path_, (bytes, str)): + raise Exception("Expected icon_url_path_ to be a str, received: {}".format(type(icon_url_path_))) + + if model_tag_ is not None and not isinstance(model_tag_, (bytes, str)): + raise Exception("Expected model_tag_ to be a str, received: {}".format(type(model_tag_))) if name_ is not None and not isinstance(name_, (bytes, str)): raise Exception("Expected name_ to be a str, received: {}".format(type(name_))) - if provider_id_ is not None and not isinstance(provider_id_, (bytes, str)): - raise Exception("Expected provider_id_ to be a str, received: {}".format(type(provider_id_))) + if offer_url_ is not None and not isinstance(offer_url_, (bytes, str)): + raise Exception("Expected offer_url_ to be a str, received: {}".format(type(offer_url_))) - if subnets_ is not None and not isinstance(subnets_, (bytes, str, list)): - raise Exception("Expected subnets_ to be a Sequence, received: {}".format(type(subnets_))) + if source_model_label_ is not None and not isinstance(source_model_label_, (bytes, str)): + raise Exception("Expected source_model_label_ to be a str, received: {}".format(type(source_model_label_))) - self.id_ = id__ + self.description = description_ + self.endpoints = endpoints_ + self.icon_url_path = icon_url_path_ + self.model_tag = model_tag_ self.name = name_ - self.provider_id = provider_id_ - self.subnets = subnets_ + self.offer_url = offer_url_ + self.source_model_label = source_model_label_ self.unknown_fields = unknown_fields -class SpaceInfos(Type): - _toSchema = {'space_infos': 'space-infos'} - _toPy = {'space-infos': 'space_infos'} - def __init__(self, space_infos=None, **unknown_fields): +class RemoteApplicationInfoResult(Type): + _toSchema = {'error': 'error', 'result': 'result'} + _toPy = {'error': 'error', 'result': 'result'} + def __init__(self, error=None, result=None, **unknown_fields): ''' - space_infos : typing.Sequence[~SpaceInfo] + error : Error + result : RemoteApplicationInfo ''' - space_infos_ = [SpaceInfo.from_json(o) for o in space_infos or []] + error_ = Error.from_json(error) if error else None + result_ = RemoteApplicationInfo.from_json(result) if result else None # Validate arguments against known Juju API types. - if space_infos_ is not None and not isinstance(space_infos_, (bytes, str, list)): - raise Exception("Expected space_infos_ to be a Sequence, received: {}".format(type(space_infos_))) + if error_ is not None and not isinstance(error_, (dict, Error)): + raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) + + if result_ is not None and not isinstance(result_, (dict, RemoteApplicationInfo)): + raise Exception("Expected result_ to be a RemoteApplicationInfo, received: {}".format(type(result_))) - self.space_infos = space_infos_ + self.error = error_ + self.result = result_ self.unknown_fields = unknown_fields -class SpaceInfosParams(Type): - _toSchema = {'space_ids': 'space-ids'} - _toPy = {'space-ids': 'space_ids'} - def __init__(self, space_ids=None, **unknown_fields): +class RemoteApplicationInfoResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} + def __init__(self, results=None, **unknown_fields): ''' - space_ids : typing.Sequence[str] + results : typing.Sequence[~RemoteApplicationInfoResult] ''' - space_ids_ = space_ids + results_ = [RemoteApplicationInfoResult.from_json(o) for o in results or []] # Validate arguments against known Juju API types. - if space_ids_ is not None and not isinstance(space_ids_, (bytes, str, list)): - raise Exception("Expected space_ids_ to be a Sequence, received: {}".format(type(space_ids_))) + if results_ is not None and not isinstance(results_, (bytes, str, list)): + raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) - self.space_ids = space_ids_ + self.results = results_ self.unknown_fields = unknown_fields -class StateServingInfo(Type): - _toSchema = {'api_port': 'api-port', 'ca_private_key': 'ca-private-key', 'cert': 'cert', 'controller_api_port': 'controller-api-port', 'private_key': 'private-key', 'shared_secret': 'shared-secret', 'state_port': 'state-port', 'system_identity': 'system-identity'} - _toPy = {'api-port': 'api_port', 'ca-private-key': 'ca_private_key', 'cert': 'cert', 'controller-api-port': 'controller_api_port', 'private-key': 'private_key', 'shared-secret': 'shared_secret', 'state-port': 'state_port', 'system-identity': 'system_identity'} - def __init__(self, api_port=None, ca_private_key=None, cert=None, controller_api_port=None, private_key=None, shared_secret=None, state_port=None, system_identity=None, **unknown_fields): +class RemoteApplicationStatus(Type): + _toSchema = {'endpoints': 'endpoints', 'err': 'err', 'life': 'life', 'offer_name': 'offer-name', 'offer_url': 'offer-url', 'relations': 'relations', 'status': 'status'} + _toPy = {'endpoints': 'endpoints', 'err': 'err', 'life': 'life', 'offer-name': 'offer_name', 'offer-url': 'offer_url', 'relations': 'relations', 'status': 'status'} + def __init__(self, endpoints=None, err=None, life=None, offer_name=None, offer_url=None, relations=None, status=None, **unknown_fields): ''' - api_port : int - ca_private_key : str - cert : str - controller_api_port : int - private_key : str - shared_secret : str - state_port : int - system_identity : str + endpoints : typing.Sequence[~RemoteEndpoint] + err : Error + life : str + offer_name : str + offer_url : str + relations : typing.Mapping[str, typing.Sequence[str]] + status : DetailedStatus ''' - api_port_ = api_port - ca_private_key_ = ca_private_key - cert_ = cert - controller_api_port_ = controller_api_port - private_key_ = private_key - shared_secret_ = shared_secret - state_port_ = state_port - system_identity_ = system_identity + endpoints_ = [RemoteEndpoint.from_json(o) for o in endpoints or []] + err_ = Error.from_json(err) if err else None + life_ = life + offer_name_ = offer_name + offer_url_ = offer_url + relations_ = relations + status_ = DetailedStatus.from_json(status) if status else None # Validate arguments against known Juju API types. - if api_port_ is not None and not isinstance(api_port_, int): - raise Exception("Expected api_port_ to be a int, received: {}".format(type(api_port_))) - - if ca_private_key_ is not None and not isinstance(ca_private_key_, (bytes, str)): - raise Exception("Expected ca_private_key_ to be a str, received: {}".format(type(ca_private_key_))) + if endpoints_ is not None and not isinstance(endpoints_, (bytes, str, list)): + raise Exception("Expected endpoints_ to be a Sequence, received: {}".format(type(endpoints_))) - if cert_ is not None and not isinstance(cert_, (bytes, str)): - raise Exception("Expected cert_ to be a str, received: {}".format(type(cert_))) + if err_ is not None and not isinstance(err_, (dict, Error)): + raise Exception("Expected err_ to be a Error, received: {}".format(type(err_))) - if controller_api_port_ is not None and not isinstance(controller_api_port_, int): - raise Exception("Expected controller_api_port_ to be a int, received: {}".format(type(controller_api_port_))) + if life_ is not None and not isinstance(life_, (bytes, str)): + raise Exception("Expected life_ to be a str, received: {}".format(type(life_))) - if private_key_ is not None and not isinstance(private_key_, (bytes, str)): - raise Exception("Expected private_key_ to be a str, received: {}".format(type(private_key_))) + if offer_name_ is not None and not isinstance(offer_name_, (bytes, str)): + raise Exception("Expected offer_name_ to be a str, received: {}".format(type(offer_name_))) - if shared_secret_ is not None and not isinstance(shared_secret_, (bytes, str)): - raise Exception("Expected shared_secret_ to be a str, received: {}".format(type(shared_secret_))) + if offer_url_ is not None and not isinstance(offer_url_, (bytes, str)): + raise Exception("Expected offer_url_ to be a str, received: {}".format(type(offer_url_))) - if state_port_ is not None and not isinstance(state_port_, int): - raise Exception("Expected state_port_ to be a int, received: {}".format(type(state_port_))) + if relations_ is not None and not isinstance(relations_, dict): + raise Exception("Expected relations_ to be a Mapping, received: {}".format(type(relations_))) - if system_identity_ is not None and not isinstance(system_identity_, (bytes, str)): - raise Exception("Expected system_identity_ to be a str, received: {}".format(type(system_identity_))) + if status_ is not None and not isinstance(status_, (dict, DetailedStatus)): + raise Exception("Expected status_ to be a DetailedStatus, received: {}".format(type(status_))) - self.api_port = api_port_ - self.ca_private_key = ca_private_key_ - self.cert = cert_ - self.controller_api_port = controller_api_port_ - self.private_key = private_key_ - self.shared_secret = shared_secret_ - self.state_port = state_port_ - self.system_identity = system_identity_ + self.endpoints = endpoints_ + self.err = err_ + self.life = life_ + self.offer_name = offer_name_ + self.offer_url = offer_url_ + self.relations = relations_ + self.status = status_ self.unknown_fields = unknown_fields -class StatusHistoryFilter(Type): - _toSchema = {'date': 'date', 'delta': 'delta', 'exclude': 'exclude', 'size': 'size'} - _toPy = {'date': 'date', 'delta': 'delta', 'exclude': 'exclude', 'size': 'size'} - def __init__(self, date=None, delta=None, exclude=None, size=None, **unknown_fields): +class RemoteEndpoint(Type): + _toSchema = {'interface': 'interface', 'limit': 'limit', 'name': 'name', 'role': 'role'} + _toPy = {'interface': 'interface', 'limit': 'limit', 'name': 'name', 'role': 'role'} + def __init__(self, interface=None, limit=None, name=None, role=None, **unknown_fields): ''' - date : str - delta : int - exclude : typing.Sequence[str] - size : int + interface : str + limit : int + name : str + role : str ''' - date_ = date - delta_ = delta - exclude_ = exclude - size_ = size + interface_ = interface + limit_ = limit + name_ = name + role_ = role # Validate arguments against known Juju API types. - if date_ is not None and not isinstance(date_, (bytes, str)): - raise Exception("Expected date_ to be a str, received: {}".format(type(date_))) + if interface_ is not None and not isinstance(interface_, (bytes, str)): + raise Exception("Expected interface_ to be a str, received: {}".format(type(interface_))) - if delta_ is not None and not isinstance(delta_, int): - raise Exception("Expected delta_ to be a int, received: {}".format(type(delta_))) + if limit_ is not None and not isinstance(limit_, int): + raise Exception("Expected limit_ to be a int, received: {}".format(type(limit_))) - if exclude_ is not None and not isinstance(exclude_, (bytes, str, list)): - raise Exception("Expected exclude_ to be a Sequence, received: {}".format(type(exclude_))) + if name_ is not None and not isinstance(name_, (bytes, str)): + raise Exception("Expected name_ to be a str, received: {}".format(type(name_))) - if size_ is not None and not isinstance(size_, int): - raise Exception("Expected size_ to be a int, received: {}".format(type(size_))) + if role_ is not None and not isinstance(role_, (bytes, str)): + raise Exception("Expected role_ to be a str, received: {}".format(type(role_))) - self.date = date_ - self.delta = delta_ - self.exclude = exclude_ - self.size = size_ + self.interface = interface_ + self.limit = limit_ + self.name = name_ + self.role = role_ self.unknown_fields = unknown_fields -class StatusHistoryPruneArgs(Type): - _toSchema = {'max_history_mb': 'max-history-mb', 'max_history_time': 'max-history-time'} - _toPy = {'max-history-mb': 'max_history_mb', 'max-history-time': 'max_history_time'} - def __init__(self, max_history_mb=None, max_history_time=None, **unknown_fields): +class RemoteSpace(Type): + _toSchema = {'cloud_type': 'cloud-type', 'name': 'name', 'provider_attributes': 'provider-attributes', 'provider_id': 'provider-id', 'subnets': 'subnets'} + _toPy = {'cloud-type': 'cloud_type', 'name': 'name', 'provider-attributes': 'provider_attributes', 'provider-id': 'provider_id', 'subnets': 'subnets'} + def __init__(self, cloud_type=None, name=None, provider_attributes=None, provider_id=None, subnets=None, **unknown_fields): ''' - max_history_mb : int - max_history_time : int + cloud_type : str + name : str + provider_attributes : typing.Mapping[str, typing.Any] + provider_id : str + subnets : typing.Sequence[~Subnet] ''' - max_history_mb_ = max_history_mb - max_history_time_ = max_history_time + cloud_type_ = cloud_type + name_ = name + provider_attributes_ = provider_attributes + provider_id_ = provider_id + subnets_ = [Subnet.from_json(o) for o in subnets or []] # Validate arguments against known Juju API types. - if max_history_mb_ is not None and not isinstance(max_history_mb_, int): - raise Exception("Expected max_history_mb_ to be a int, received: {}".format(type(max_history_mb_))) + if cloud_type_ is not None and not isinstance(cloud_type_, (bytes, str)): + raise Exception("Expected cloud_type_ to be a str, received: {}".format(type(cloud_type_))) + + if name_ is not None and not isinstance(name_, (bytes, str)): + raise Exception("Expected name_ to be a str, received: {}".format(type(name_))) + + if provider_attributes_ is not None and not isinstance(provider_attributes_, dict): + raise Exception("Expected provider_attributes_ to be a Mapping, received: {}".format(type(provider_attributes_))) + + if provider_id_ is not None and not isinstance(provider_id_, (bytes, str)): + raise Exception("Expected provider_id_ to be a str, received: {}".format(type(provider_id_))) - if max_history_time_ is not None and not isinstance(max_history_time_, int): - raise Exception("Expected max_history_time_ to be a int, received: {}".format(type(max_history_time_))) + if subnets_ is not None and not isinstance(subnets_, (bytes, str, list)): + raise Exception("Expected subnets_ to be a Sequence, received: {}".format(type(subnets_))) - self.max_history_mb = max_history_mb_ - self.max_history_time = max_history_time_ + self.cloud_type = cloud_type_ + self.name = name_ + self.provider_attributes = provider_attributes_ + self.provider_id = provider_id_ + self.subnets = subnets_ self.unknown_fields = unknown_fields -class StatusHistoryRequest(Type): - _toSchema = {'filter_': 'filter', 'historykind': 'historyKind', 'size': 'size', 'tag': 'tag'} - _toPy = {'filter': 'filter_', 'historyKind': 'historykind', 'size': 'size', 'tag': 'tag'} - def __init__(self, filter_=None, historykind=None, size=None, tag=None, **unknown_fields): +class RemoveBlocksArgs(Type): + _toSchema = {'all_': 'all'} + _toPy = {'all': 'all_'} + def __init__(self, all_=None, **unknown_fields): ''' - filter_ : StatusHistoryFilter - historykind : str - size : int - tag : str + all_ : bool ''' - filter__ = StatusHistoryFilter.from_json(filter_) if filter_ else None - historykind_ = historykind - size_ = size - tag_ = tag + all__ = all_ # Validate arguments against known Juju API types. - if filter__ is not None and not isinstance(filter__, (dict, StatusHistoryFilter)): - raise Exception("Expected filter__ to be a StatusHistoryFilter, received: {}".format(type(filter__))) - - if historykind_ is not None and not isinstance(historykind_, (bytes, str)): - raise Exception("Expected historykind_ to be a str, received: {}".format(type(historykind_))) - - if size_ is not None and not isinstance(size_, int): - raise Exception("Expected size_ to be a int, received: {}".format(type(size_))) - - if tag_ is not None and not isinstance(tag_, (bytes, str)): - raise Exception("Expected tag_ to be a str, received: {}".format(type(tag_))) + if all__ is not None and not isinstance(all__, bool): + raise Exception("Expected all__ to be a bool, received: {}".format(type(all__))) - self.filter_ = filter__ - self.historykind = historykind_ - self.size = size_ - self.tag = tag_ + self.all_ = all__ self.unknown_fields = unknown_fields -class StatusHistoryRequests(Type): - _toSchema = {'requests': 'requests'} - _toPy = {'requests': 'requests'} - def __init__(self, requests=None, **unknown_fields): +class RemoveSecretBackendArg(Type): + _toSchema = {'force': 'force', 'name': 'name'} + _toPy = {'force': 'force', 'name': 'name'} + def __init__(self, force=None, name=None, **unknown_fields): ''' - requests : typing.Sequence[~StatusHistoryRequest] + force : bool + name : str ''' - requests_ = [StatusHistoryRequest.from_json(o) for o in requests or []] + force_ = force + name_ = name # Validate arguments against known Juju API types. - if requests_ is not None and not isinstance(requests_, (bytes, str, list)): - raise Exception("Expected requests_ to be a Sequence, received: {}".format(type(requests_))) + if force_ is not None and not isinstance(force_, bool): + raise Exception("Expected force_ to be a bool, received: {}".format(type(force_))) - self.requests = requests_ + if name_ is not None and not isinstance(name_, (bytes, str)): + raise Exception("Expected name_ to be a str, received: {}".format(type(name_))) + + self.force = force_ + self.name = name_ self.unknown_fields = unknown_fields -class StatusHistoryResult(Type): - _toSchema = {'error': 'error', 'history': 'history'} - _toPy = {'error': 'error', 'history': 'history'} - def __init__(self, error=None, history=None, **unknown_fields): +class RemoveSecretBackendArgs(Type): + _toSchema = {'args': 'args'} + _toPy = {'args': 'args'} + def __init__(self, args=None, **unknown_fields): ''' - error : Error - history : History + args : typing.Sequence[~RemoveSecretBackendArg] ''' - error_ = Error.from_json(error) if error else None - history_ = History.from_json(history) if history else None + args_ = [RemoveSecretBackendArg.from_json(o) for o in args or []] # Validate arguments against known Juju API types. - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - - if history_ is not None and not isinstance(history_, (dict, History)): - raise Exception("Expected history_ to be a History, received: {}".format(type(history_))) + if args_ is not None and not isinstance(args_, (bytes, str, list)): + raise Exception("Expected args_ to be a Sequence, received: {}".format(type(args_))) - self.error = error_ - self.history = history_ + self.args = args_ self.unknown_fields = unknown_fields -class StatusHistoryResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None, **unknown_fields): +class RemoveSpaceParam(Type): + _toSchema = {'dry_run': 'dry-run', 'force': 'force', 'space': 'space'} + _toPy = {'dry-run': 'dry_run', 'force': 'force', 'space': 'space'} + def __init__(self, dry_run=None, force=None, space=None, **unknown_fields): ''' - results : typing.Sequence[~StatusHistoryResult] + dry_run : bool + force : bool + space : Entity ''' - results_ = [StatusHistoryResult.from_json(o) for o in results or []] + dry_run_ = dry_run + force_ = force + space_ = Entity.from_json(space) if space else None # Validate arguments against known Juju API types. - if results_ is not None and not isinstance(results_, (bytes, str, list)): - raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) + if dry_run_ is not None and not isinstance(dry_run_, bool): + raise Exception("Expected dry_run_ to be a bool, received: {}".format(type(dry_run_))) - self.results = results_ + if force_ is not None and not isinstance(force_, bool): + raise Exception("Expected force_ to be a bool, received: {}".format(type(force_))) + + if space_ is not None and not isinstance(space_, (dict, Entity)): + raise Exception("Expected space_ to be a Entity, received: {}".format(type(space_))) + + self.dry_run = dry_run_ + self.force = force_ + self.space = space_ self.unknown_fields = unknown_fields -class StatusParams(Type): - _toSchema = {'include_storage': 'include-storage', 'patterns': 'patterns'} - _toPy = {'include-storage': 'include_storage', 'patterns': 'patterns'} - def __init__(self, include_storage=None, patterns=None, **unknown_fields): +class RemoveSpaceParams(Type): + _toSchema = {'space_param': 'space-param'} + _toPy = {'space-param': 'space_param'} + def __init__(self, space_param=None, **unknown_fields): ''' - include_storage : bool - patterns : typing.Sequence[str] + space_param : typing.Sequence[~RemoveSpaceParam] ''' - include_storage_ = include_storage - patterns_ = patterns + space_param_ = [RemoveSpaceParam.from_json(o) for o in space_param or []] # Validate arguments against known Juju API types. - if include_storage_ is not None and not isinstance(include_storage_, bool): - raise Exception("Expected include_storage_ to be a bool, received: {}".format(type(include_storage_))) - - if patterns_ is not None and not isinstance(patterns_, (bytes, str, list)): - raise Exception("Expected patterns_ to be a Sequence, received: {}".format(type(patterns_))) + if space_param_ is not None and not isinstance(space_param_, (bytes, str, list)): + raise Exception("Expected space_param_ to be a Sequence, received: {}".format(type(space_param_))) - self.include_storage = include_storage_ - self.patterns = patterns_ + self.space_param = space_param_ self.unknown_fields = unknown_fields -class StatusResult(Type): - _toSchema = {'data': 'data', 'error': 'error', 'id_': 'id', 'info': 'info', 'life': 'life', 'since': 'since', 'status': 'status'} - _toPy = {'data': 'data', 'error': 'error', 'id': 'id_', 'info': 'info', 'life': 'life', 'since': 'since', 'status': 'status'} - def __init__(self, data=None, error=None, id_=None, info=None, life=None, since=None, status=None, **unknown_fields): +class RemoveSpaceResult(Type): + _toSchema = {'bindings': 'bindings', 'constraints': 'constraints', 'controller_settings': 'controller-settings', 'error': 'error'} + _toPy = {'bindings': 'bindings', 'constraints': 'constraints', 'controller-settings': 'controller_settings', 'error': 'error'} + def __init__(self, bindings=None, constraints=None, controller_settings=None, error=None, **unknown_fields): ''' - data : typing.Mapping[str, typing.Any] + bindings : typing.Sequence[~Entity] + constraints : typing.Sequence[~Entity] + controller_settings : typing.Sequence[str] error : Error - id_ : str - info : str - life : str - since : str - status : str ''' - data_ = data + bindings_ = [Entity.from_json(o) for o in bindings or []] + constraints_ = [Entity.from_json(o) for o in constraints or []] + controller_settings_ = controller_settings error_ = Error.from_json(error) if error else None - id__ = id_ - info_ = info - life_ = life - since_ = since - status_ = status # Validate arguments against known Juju API types. - if data_ is not None and not isinstance(data_, dict): - raise Exception("Expected data_ to be a Mapping, received: {}".format(type(data_))) - - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - - if id__ is not None and not isinstance(id__, (bytes, str)): - raise Exception("Expected id__ to be a str, received: {}".format(type(id__))) - - if info_ is not None and not isinstance(info_, (bytes, str)): - raise Exception("Expected info_ to be a str, received: {}".format(type(info_))) + if bindings_ is not None and not isinstance(bindings_, (bytes, str, list)): + raise Exception("Expected bindings_ to be a Sequence, received: {}".format(type(bindings_))) - if life_ is not None and not isinstance(life_, (bytes, str)): - raise Exception("Expected life_ to be a str, received: {}".format(type(life_))) + if constraints_ is not None and not isinstance(constraints_, (bytes, str, list)): + raise Exception("Expected constraints_ to be a Sequence, received: {}".format(type(constraints_))) - if since_ is not None and not isinstance(since_, (bytes, str)): - raise Exception("Expected since_ to be a str, received: {}".format(type(since_))) + if controller_settings_ is not None and not isinstance(controller_settings_, (bytes, str, list)): + raise Exception("Expected controller_settings_ to be a Sequence, received: {}".format(type(controller_settings_))) - if status_ is not None and not isinstance(status_, (bytes, str)): - raise Exception("Expected status_ to be a str, received: {}".format(type(status_))) + if error_ is not None and not isinstance(error_, (dict, Error)): + raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - self.data = data_ + self.bindings = bindings_ + self.constraints = constraints_ + self.controller_settings = controller_settings_ self.error = error_ - self.id_ = id__ - self.info = info_ - self.life = life_ - self.since = since_ - self.status = status_ self.unknown_fields = unknown_fields -class StatusResults(Type): +class RemoveSpaceResults(Type): _toSchema = {'results': 'results'} _toPy = {'results': 'results'} def __init__(self, results=None, **unknown_fields): ''' - results : typing.Sequence[~StatusResult] + results : typing.Sequence[~RemoveSpaceResult] ''' - results_ = [StatusResult.from_json(o) for o in results or []] + results_ = [RemoveSpaceResult.from_json(o) for o in results or []] # Validate arguments against known Juju API types. if results_ is not None and not isinstance(results_, (bytes, str, list)): @@ -23735,242 +12383,182 @@ def __init__(self, results=None, **unknown_fields): -class StorageAddParams(Type): - _toSchema = {'name': 'name', 'storage': 'storage', 'unit': 'unit'} - _toPy = {'name': 'name', 'storage': 'storage', 'unit': 'unit'} - def __init__(self, name=None, storage=None, unit=None, **unknown_fields): +class RemoveStorage(Type): + _toSchema = {'storage': 'storage'} + _toPy = {'storage': 'storage'} + def __init__(self, storage=None, **unknown_fields): ''' - name : str - storage : StorageConstraints - unit : str + storage : typing.Sequence[~RemoveStorageInstance] ''' - name_ = name - storage_ = StorageConstraints.from_json(storage) if storage else None - unit_ = unit + storage_ = [RemoveStorageInstance.from_json(o) for o in storage or []] # Validate arguments against known Juju API types. - if name_ is not None and not isinstance(name_, (bytes, str)): - raise Exception("Expected name_ to be a str, received: {}".format(type(name_))) - - if storage_ is not None and not isinstance(storage_, (dict, StorageConstraints)): - raise Exception("Expected storage_ to be a StorageConstraints, received: {}".format(type(storage_))) - - if unit_ is not None and not isinstance(unit_, (bytes, str)): - raise Exception("Expected unit_ to be a str, received: {}".format(type(unit_))) + if storage_ is not None and not isinstance(storage_, (bytes, str, list)): + raise Exception("Expected storage_ to be a Sequence, received: {}".format(type(storage_))) - self.name = name_ self.storage = storage_ - self.unit = unit_ - self.unknown_fields = unknown_fields - - - -class StorageAttachment(Type): - _toSchema = {'kind': 'kind', 'life': 'life', 'location': 'location', 'owner_tag': 'owner-tag', 'storage_tag': 'storage-tag', 'unit_tag': 'unit-tag'} - _toPy = {'kind': 'kind', 'life': 'life', 'location': 'location', 'owner-tag': 'owner_tag', 'storage-tag': 'storage_tag', 'unit-tag': 'unit_tag'} - def __init__(self, kind=None, life=None, location=None, owner_tag=None, storage_tag=None, unit_tag=None, **unknown_fields): - ''' - kind : int - life : str - location : str - owner_tag : str - storage_tag : str - unit_tag : str - ''' - kind_ = kind - life_ = life - location_ = location - owner_tag_ = owner_tag - storage_tag_ = storage_tag - unit_tag_ = unit_tag - - # Validate arguments against known Juju API types. - if kind_ is not None and not isinstance(kind_, int): - raise Exception("Expected kind_ to be a int, received: {}".format(type(kind_))) - - if life_ is not None and not isinstance(life_, (bytes, str)): - raise Exception("Expected life_ to be a str, received: {}".format(type(life_))) - - if location_ is not None and not isinstance(location_, (bytes, str)): - raise Exception("Expected location_ to be a str, received: {}".format(type(location_))) - - if owner_tag_ is not None and not isinstance(owner_tag_, (bytes, str)): - raise Exception("Expected owner_tag_ to be a str, received: {}".format(type(owner_tag_))) - - if storage_tag_ is not None and not isinstance(storage_tag_, (bytes, str)): - raise Exception("Expected storage_tag_ to be a str, received: {}".format(type(storage_tag_))) - - if unit_tag_ is not None and not isinstance(unit_tag_, (bytes, str)): - raise Exception("Expected unit_tag_ to be a str, received: {}".format(type(unit_tag_))) - - self.kind = kind_ - self.life = life_ - self.location = location_ - self.owner_tag = owner_tag_ - self.storage_tag = storage_tag_ - self.unit_tag = unit_tag_ self.unknown_fields = unknown_fields -class StorageAttachmentDetails(Type): - _toSchema = {'life': 'life', 'location': 'location', 'machine_tag': 'machine-tag', 'storage_tag': 'storage-tag', 'unit_tag': 'unit-tag'} - _toPy = {'life': 'life', 'location': 'location', 'machine-tag': 'machine_tag', 'storage-tag': 'storage_tag', 'unit-tag': 'unit_tag'} - def __init__(self, life=None, location=None, machine_tag=None, storage_tag=None, unit_tag=None, **unknown_fields): +class RemoveStorageInstance(Type): + _toSchema = {'destroy_attachments': 'destroy-attachments', 'destroy_storage': 'destroy-storage', 'force': 'force', 'max_wait': 'max-wait', 'tag': 'tag'} + _toPy = {'destroy-attachments': 'destroy_attachments', 'destroy-storage': 'destroy_storage', 'force': 'force', 'max-wait': 'max_wait', 'tag': 'tag'} + def __init__(self, destroy_attachments=None, destroy_storage=None, force=None, max_wait=None, tag=None, **unknown_fields): ''' - life : str - location : str - machine_tag : str - storage_tag : str - unit_tag : str + destroy_attachments : bool + destroy_storage : bool + force : bool + max_wait : int + tag : str ''' - life_ = life - location_ = location - machine_tag_ = machine_tag - storage_tag_ = storage_tag - unit_tag_ = unit_tag + destroy_attachments_ = destroy_attachments + destroy_storage_ = destroy_storage + force_ = force + max_wait_ = max_wait + tag_ = tag # Validate arguments against known Juju API types. - if life_ is not None and not isinstance(life_, (bytes, str)): - raise Exception("Expected life_ to be a str, received: {}".format(type(life_))) - - if location_ is not None and not isinstance(location_, (bytes, str)): - raise Exception("Expected location_ to be a str, received: {}".format(type(location_))) - - if machine_tag_ is not None and not isinstance(machine_tag_, (bytes, str)): - raise Exception("Expected machine_tag_ to be a str, received: {}".format(type(machine_tag_))) - - if storage_tag_ is not None and not isinstance(storage_tag_, (bytes, str)): - raise Exception("Expected storage_tag_ to be a str, received: {}".format(type(storage_tag_))) - - if unit_tag_ is not None and not isinstance(unit_tag_, (bytes, str)): - raise Exception("Expected unit_tag_ to be a str, received: {}".format(type(unit_tag_))) - - self.life = life_ - self.location = location_ - self.machine_tag = machine_tag_ - self.storage_tag = storage_tag_ - self.unit_tag = unit_tag_ - self.unknown_fields = unknown_fields - + if destroy_attachments_ is not None and not isinstance(destroy_attachments_, bool): + raise Exception("Expected destroy_attachments_ to be a bool, received: {}".format(type(destroy_attachments_))) + if destroy_storage_ is not None and not isinstance(destroy_storage_, bool): + raise Exception("Expected destroy_storage_ to be a bool, received: {}".format(type(destroy_storage_))) -class StorageAttachmentId(Type): - _toSchema = {'storage_tag': 'storage-tag', 'unit_tag': 'unit-tag'} - _toPy = {'storage-tag': 'storage_tag', 'unit-tag': 'unit_tag'} - def __init__(self, storage_tag=None, unit_tag=None, **unknown_fields): - ''' - storage_tag : str - unit_tag : str - ''' - storage_tag_ = storage_tag - unit_tag_ = unit_tag + if force_ is not None and not isinstance(force_, bool): + raise Exception("Expected force_ to be a bool, received: {}".format(type(force_))) - # Validate arguments against known Juju API types. - if storage_tag_ is not None and not isinstance(storage_tag_, (bytes, str)): - raise Exception("Expected storage_tag_ to be a str, received: {}".format(type(storage_tag_))) + if max_wait_ is not None and not isinstance(max_wait_, int): + raise Exception("Expected max_wait_ to be a int, received: {}".format(type(max_wait_))) - if unit_tag_ is not None and not isinstance(unit_tag_, (bytes, str)): - raise Exception("Expected unit_tag_ to be a str, received: {}".format(type(unit_tag_))) + if tag_ is not None and not isinstance(tag_, (bytes, str)): + raise Exception("Expected tag_ to be a str, received: {}".format(type(tag_))) - self.storage_tag = storage_tag_ - self.unit_tag = unit_tag_ + self.destroy_attachments = destroy_attachments_ + self.destroy_storage = destroy_storage_ + self.force = force_ + self.max_wait = max_wait_ + self.tag = tag_ self.unknown_fields = unknown_fields -class StorageAttachmentIds(Type): - _toSchema = {'ids': 'ids'} - _toPy = {'ids': 'ids'} - def __init__(self, ids=None, **unknown_fields): +class RenameSpaceParams(Type): + _toSchema = {'from_space_tag': 'from-space-tag', 'to_space_tag': 'to-space-tag'} + _toPy = {'from-space-tag': 'from_space_tag', 'to-space-tag': 'to_space_tag'} + def __init__(self, from_space_tag=None, to_space_tag=None, **unknown_fields): ''' - ids : typing.Sequence[~StorageAttachmentId] + from_space_tag : str + to_space_tag : str ''' - ids_ = [StorageAttachmentId.from_json(o) for o in ids or []] + from_space_tag_ = from_space_tag + to_space_tag_ = to_space_tag # Validate arguments against known Juju API types. - if ids_ is not None and not isinstance(ids_, (bytes, str, list)): - raise Exception("Expected ids_ to be a Sequence, received: {}".format(type(ids_))) + if from_space_tag_ is not None and not isinstance(from_space_tag_, (bytes, str)): + raise Exception("Expected from_space_tag_ to be a str, received: {}".format(type(from_space_tag_))) - self.ids = ids_ + if to_space_tag_ is not None and not isinstance(to_space_tag_, (bytes, str)): + raise Exception("Expected to_space_tag_ to be a str, received: {}".format(type(to_space_tag_))) + + self.from_space_tag = from_space_tag_ + self.to_space_tag = to_space_tag_ self.unknown_fields = unknown_fields -class StorageAttachmentIdsResult(Type): - _toSchema = {'error': 'error', 'result': 'result'} - _toPy = {'error': 'error', 'result': 'result'} - def __init__(self, error=None, result=None, **unknown_fields): +class RenameSpacesParams(Type): + _toSchema = {'changes': 'changes'} + _toPy = {'changes': 'changes'} + def __init__(self, changes=None, **unknown_fields): ''' - error : Error - result : StorageAttachmentIds + changes : typing.Sequence[~RenameSpaceParams] ''' - error_ = Error.from_json(error) if error else None - result_ = StorageAttachmentIds.from_json(result) if result else None + changes_ = [RenameSpaceParams.from_json(o) for o in changes or []] # Validate arguments against known Juju API types. - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - - if result_ is not None and not isinstance(result_, (dict, StorageAttachmentIds)): - raise Exception("Expected result_ to be a StorageAttachmentIds, received: {}".format(type(result_))) + if changes_ is not None and not isinstance(changes_, (bytes, str, list)): + raise Exception("Expected changes_ to be a Sequence, received: {}".format(type(changes_))) - self.error = error_ - self.result = result_ + self.changes = changes_ self.unknown_fields = unknown_fields -class StorageAttachmentIdsResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None, **unknown_fields): +class ResolveCharmWithChannel(Type): + _toSchema = {'charm_origin': 'charm-origin', 'reference': 'reference', 'switch_charm': 'switch-charm'} + _toPy = {'charm-origin': 'charm_origin', 'reference': 'reference', 'switch-charm': 'switch_charm'} + def __init__(self, charm_origin=None, reference=None, switch_charm=None, **unknown_fields): ''' - results : typing.Sequence[~StorageAttachmentIdsResult] + charm_origin : CharmOrigin + reference : str + switch_charm : bool ''' - results_ = [StorageAttachmentIdsResult.from_json(o) for o in results or []] + charm_origin_ = CharmOrigin.from_json(charm_origin) if charm_origin else None + reference_ = reference + switch_charm_ = switch_charm # Validate arguments against known Juju API types. - if results_ is not None and not isinstance(results_, (bytes, str, list)): - raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) + if charm_origin_ is not None and not isinstance(charm_origin_, (dict, CharmOrigin)): + raise Exception("Expected charm_origin_ to be a CharmOrigin, received: {}".format(type(charm_origin_))) - self.results = results_ + if reference_ is not None and not isinstance(reference_, (bytes, str)): + raise Exception("Expected reference_ to be a str, received: {}".format(type(reference_))) + + if switch_charm_ is not None and not isinstance(switch_charm_, bool): + raise Exception("Expected switch_charm_ to be a bool, received: {}".format(type(switch_charm_))) + + self.charm_origin = charm_origin_ + self.reference = reference_ + self.switch_charm = switch_charm_ self.unknown_fields = unknown_fields -class StorageAttachmentResult(Type): - _toSchema = {'error': 'error', 'result': 'result'} - _toPy = {'error': 'error', 'result': 'result'} - def __init__(self, error=None, result=None, **unknown_fields): +class ResolveCharmWithChannelResult(Type): + _toSchema = {'charm_origin': 'charm-origin', 'error': 'error', 'supported_bases': 'supported-bases', 'url': 'url'} + _toPy = {'charm-origin': 'charm_origin', 'error': 'error', 'supported-bases': 'supported_bases', 'url': 'url'} + def __init__(self, charm_origin=None, error=None, supported_bases=None, url=None, **unknown_fields): ''' + charm_origin : CharmOrigin error : Error - result : StorageAttachment + supported_bases : typing.Sequence[~Base] + url : str ''' + charm_origin_ = CharmOrigin.from_json(charm_origin) if charm_origin else None error_ = Error.from_json(error) if error else None - result_ = StorageAttachment.from_json(result) if result else None + supported_bases_ = [Base.from_json(o) for o in supported_bases or []] + url_ = url # Validate arguments against known Juju API types. + if charm_origin_ is not None and not isinstance(charm_origin_, (dict, CharmOrigin)): + raise Exception("Expected charm_origin_ to be a CharmOrigin, received: {}".format(type(charm_origin_))) + if error_ is not None and not isinstance(error_, (dict, Error)): raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - if result_ is not None and not isinstance(result_, (dict, StorageAttachment)): - raise Exception("Expected result_ to be a StorageAttachment, received: {}".format(type(result_))) + if supported_bases_ is not None and not isinstance(supported_bases_, (bytes, str, list)): + raise Exception("Expected supported_bases_ to be a Sequence, received: {}".format(type(supported_bases_))) + + if url_ is not None and not isinstance(url_, (bytes, str)): + raise Exception("Expected url_ to be a str, received: {}".format(type(url_))) + self.charm_origin = charm_origin_ self.error = error_ - self.result = result_ + self.supported_bases = supported_bases_ + self.url = url_ self.unknown_fields = unknown_fields -class StorageAttachmentResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} +class ResolveCharmWithChannelResults(Type): + _toSchema = {'results': 'Results'} + _toPy = {'Results': 'results'} def __init__(self, results=None, **unknown_fields): ''' - results : typing.Sequence[~StorageAttachmentResult] + results : typing.Sequence[~ResolveCharmWithChannelResult] ''' - results_ = [StorageAttachmentResult.from_json(o) for o in results or []] + results_ = [ResolveCharmWithChannelResult.from_json(o) for o in results or []] # Validate arguments against known Juju API types. if results_ is not None and not isinstance(results_, (bytes, str, list)): @@ -23981,194 +12569,176 @@ def __init__(self, results=None, **unknown_fields): -class StorageConstraints(Type): - _toSchema = {'count': 'count', 'pool': 'pool', 'size': 'size'} - _toPy = {'count': 'count', 'pool': 'pool', 'size': 'size'} - def __init__(self, count=None, pool=None, size=None, **unknown_fields): - ''' - count : int - pool : str - size : int - ''' - count_ = count - pool_ = pool - size_ = size - - # Validate arguments against known Juju API types. - if count_ is not None and not isinstance(count_, int): - raise Exception("Expected count_ to be a int, received: {}".format(type(count_))) - - if pool_ is not None and not isinstance(pool_, (bytes, str)): - raise Exception("Expected pool_ to be a str, received: {}".format(type(pool_))) - - if size_ is not None and not isinstance(size_, int): - raise Exception("Expected size_ to be a int, received: {}".format(type(size_))) - - self.count = count_ - self.pool = pool_ - self.size = size_ - self.unknown_fields = unknown_fields - - - -class StorageDetachmentParams(Type): - _toSchema = {'force': 'force', 'ids': 'ids', 'max_wait': 'max-wait'} - _toPy = {'force': 'force', 'ids': 'ids', 'max-wait': 'max_wait'} - def __init__(self, force=None, ids=None, max_wait=None, **unknown_fields): +class ResolveCharmsWithChannel(Type): + _toSchema = {'macaroon': 'macaroon', 'resolve': 'resolve'} + _toPy = {'macaroon': 'macaroon', 'resolve': 'resolve'} + def __init__(self, macaroon=None, resolve=None, **unknown_fields): ''' - force : bool - ids : StorageAttachmentIds - max_wait : int + macaroon : Macaroon + resolve : typing.Sequence[~ResolveCharmWithChannel] ''' - force_ = force - ids_ = StorageAttachmentIds.from_json(ids) if ids else None - max_wait_ = max_wait + macaroon_ = Macaroon.from_json(macaroon) if macaroon else None + resolve_ = [ResolveCharmWithChannel.from_json(o) for o in resolve or []] # Validate arguments against known Juju API types. - if force_ is not None and not isinstance(force_, bool): - raise Exception("Expected force_ to be a bool, received: {}".format(type(force_))) - - if ids_ is not None and not isinstance(ids_, (dict, StorageAttachmentIds)): - raise Exception("Expected ids_ to be a StorageAttachmentIds, received: {}".format(type(ids_))) + if macaroon_ is not None and not isinstance(macaroon_, (dict, Macaroon)): + raise Exception("Expected macaroon_ to be a Macaroon, received: {}".format(type(macaroon_))) - if max_wait_ is not None and not isinstance(max_wait_, int): - raise Exception("Expected max_wait_ to be a int, received: {}".format(type(max_wait_))) + if resolve_ is not None and not isinstance(resolve_, (bytes, str, list)): + raise Exception("Expected resolve_ to be a Sequence, received: {}".format(type(resolve_))) - self.force = force_ - self.ids = ids_ - self.max_wait = max_wait_ + self.macaroon = macaroon_ + self.resolve = resolve_ self.unknown_fields = unknown_fields -class StorageDetails(Type): - _toSchema = {'attachments': 'attachments', 'kind': 'kind', 'life': 'life', 'owner_tag': 'owner-tag', 'persistent': 'persistent', 'status': 'status', 'storage_tag': 'storage-tag'} - _toPy = {'attachments': 'attachments', 'kind': 'kind', 'life': 'life', 'owner-tag': 'owner_tag', 'persistent': 'persistent', 'status': 'status', 'storage-tag': 'storage_tag'} - def __init__(self, attachments=None, kind=None, life=None, owner_tag=None, persistent=None, status=None, storage_tag=None, **unknown_fields): +class Resource(Type): + _toSchema = {'application': 'application', 'charmresource': 'CharmResource', 'description': 'description', 'fingerprint': 'fingerprint', 'id_': 'id', 'name': 'name', 'origin': 'origin', 'path': 'path', 'pending_id': 'pending-id', 'revision': 'revision', 'size': 'size', 'timestamp': 'timestamp', 'type_': 'type', 'username': 'username'} + _toPy = {'CharmResource': 'charmresource', 'application': 'application', 'description': 'description', 'fingerprint': 'fingerprint', 'id': 'id_', 'name': 'name', 'origin': 'origin', 'path': 'path', 'pending-id': 'pending_id', 'revision': 'revision', 'size': 'size', 'timestamp': 'timestamp', 'type': 'type_', 'username': 'username'} + def __init__(self, charmresource=None, application=None, description=None, fingerprint=None, id_=None, name=None, origin=None, path=None, pending_id=None, revision=None, size=None, timestamp=None, type_=None, username=None, **unknown_fields): ''' - attachments : typing.Mapping[str, ~StorageAttachmentDetails] - kind : int - life : str - owner_tag : str - persistent : bool - status : EntityStatus - storage_tag : str + charmresource : CharmResource + application : str + description : str + fingerprint : typing.Sequence[int] + id_ : str + name : str + origin : str + path : str + pending_id : str + revision : int + size : int + timestamp : str + type_ : str + username : str ''' - attachments_ = {k: StorageAttachmentDetails.from_json(v) for k, v in (attachments or dict()).items()} - kind_ = kind - life_ = life - owner_tag_ = owner_tag - persistent_ = persistent - status_ = EntityStatus.from_json(status) if status else None - storage_tag_ = storage_tag + charmresource_ = CharmResource.from_json(charmresource) if charmresource else None + application_ = application + description_ = description + fingerprint_ = fingerprint + id__ = id_ + name_ = name + origin_ = origin + path_ = path + pending_id_ = pending_id + revision_ = revision + size_ = size + timestamp_ = timestamp + type__ = type_ + username_ = username # Validate arguments against known Juju API types. - if attachments_ is not None and not isinstance(attachments_, dict): - raise Exception("Expected attachments_ to be a Mapping, received: {}".format(type(attachments_))) - - if kind_ is not None and not isinstance(kind_, int): - raise Exception("Expected kind_ to be a int, received: {}".format(type(kind_))) - - if life_ is not None and not isinstance(life_, (bytes, str)): - raise Exception("Expected life_ to be a str, received: {}".format(type(life_))) - - if owner_tag_ is not None and not isinstance(owner_tag_, (bytes, str)): - raise Exception("Expected owner_tag_ to be a str, received: {}".format(type(owner_tag_))) - - if persistent_ is not None and not isinstance(persistent_, bool): - raise Exception("Expected persistent_ to be a bool, received: {}".format(type(persistent_))) + if charmresource_ is not None and not isinstance(charmresource_, (dict, CharmResource)): + raise Exception("Expected charmresource_ to be a CharmResource, received: {}".format(type(charmresource_))) - if status_ is not None and not isinstance(status_, (dict, EntityStatus)): - raise Exception("Expected status_ to be a EntityStatus, received: {}".format(type(status_))) + if application_ is not None and not isinstance(application_, (bytes, str)): + raise Exception("Expected application_ to be a str, received: {}".format(type(application_))) - if storage_tag_ is not None and not isinstance(storage_tag_, (bytes, str)): - raise Exception("Expected storage_tag_ to be a str, received: {}".format(type(storage_tag_))) + if description_ is not None and not isinstance(description_, (bytes, str)): + raise Exception("Expected description_ to be a str, received: {}".format(type(description_))) - self.attachments = attachments_ - self.kind = kind_ - self.life = life_ - self.owner_tag = owner_tag_ - self.persistent = persistent_ - self.status = status_ - self.storage_tag = storage_tag_ - self.unknown_fields = unknown_fields + if fingerprint_ is not None and not isinstance(fingerprint_, (bytes, str, list)): + raise Exception("Expected fingerprint_ to be a Sequence, received: {}".format(type(fingerprint_))) + if id__ is not None and not isinstance(id__, (bytes, str)): + raise Exception("Expected id__ to be a str, received: {}".format(type(id__))) + if name_ is not None and not isinstance(name_, (bytes, str)): + raise Exception("Expected name_ to be a str, received: {}".format(type(name_))) -class StorageDetailsListResult(Type): - _toSchema = {'error': 'error', 'result': 'result'} - _toPy = {'error': 'error', 'result': 'result'} - def __init__(self, error=None, result=None, **unknown_fields): - ''' - error : Error - result : typing.Sequence[~StorageDetails] - ''' - error_ = Error.from_json(error) if error else None - result_ = [StorageDetails.from_json(o) for o in result or []] + if origin_ is not None and not isinstance(origin_, (bytes, str)): + raise Exception("Expected origin_ to be a str, received: {}".format(type(origin_))) - # Validate arguments against known Juju API types. - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) + if path_ is not None and not isinstance(path_, (bytes, str)): + raise Exception("Expected path_ to be a str, received: {}".format(type(path_))) - if result_ is not None and not isinstance(result_, (bytes, str, list)): - raise Exception("Expected result_ to be a Sequence, received: {}".format(type(result_))) + if pending_id_ is not None and not isinstance(pending_id_, (bytes, str)): + raise Exception("Expected pending_id_ to be a str, received: {}".format(type(pending_id_))) - self.error = error_ - self.result = result_ - self.unknown_fields = unknown_fields + if revision_ is not None and not isinstance(revision_, int): + raise Exception("Expected revision_ to be a int, received: {}".format(type(revision_))) + if size_ is not None and not isinstance(size_, int): + raise Exception("Expected size_ to be a int, received: {}".format(type(size_))) + if timestamp_ is not None and not isinstance(timestamp_, (bytes, str)): + raise Exception("Expected timestamp_ to be a str, received: {}".format(type(timestamp_))) -class StorageDetailsListResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None, **unknown_fields): - ''' - results : typing.Sequence[~StorageDetailsListResult] - ''' - results_ = [StorageDetailsListResult.from_json(o) for o in results or []] + if type__ is not None and not isinstance(type__, (bytes, str)): + raise Exception("Expected type__ to be a str, received: {}".format(type(type__))) - # Validate arguments against known Juju API types. - if results_ is not None and not isinstance(results_, (bytes, str, list)): - raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) + if username_ is not None and not isinstance(username_, (bytes, str)): + raise Exception("Expected username_ to be a str, received: {}".format(type(username_))) - self.results = results_ + self.charmresource = charmresource_ + self.application = application_ + self.description = description_ + self.fingerprint = fingerprint_ + self.id_ = id__ + self.name = name_ + self.origin = origin_ + self.path = path_ + self.pending_id = pending_id_ + self.revision = revision_ + self.size = size_ + self.timestamp = timestamp_ + self.type_ = type__ + self.username = username_ self.unknown_fields = unknown_fields -class StorageDetailsResult(Type): - _toSchema = {'error': 'error', 'result': 'result'} - _toPy = {'error': 'error', 'result': 'result'} - def __init__(self, error=None, result=None, **unknown_fields): +class ResourcesResult(Type): + _toSchema = {'charm_store_resources': 'charm-store-resources', 'error': 'error', 'errorresult': 'ErrorResult', 'resources': 'resources', 'unit_resources': 'unit-resources'} + _toPy = {'ErrorResult': 'errorresult', 'charm-store-resources': 'charm_store_resources', 'error': 'error', 'resources': 'resources', 'unit-resources': 'unit_resources'} + def __init__(self, errorresult=None, charm_store_resources=None, error=None, resources=None, unit_resources=None, **unknown_fields): ''' + errorresult : ErrorResult + charm_store_resources : typing.Sequence[~CharmResource] error : Error - result : StorageDetails + resources : typing.Sequence[~Resource] + unit_resources : typing.Sequence[~UnitResources] ''' + errorresult_ = ErrorResult.from_json(errorresult) if errorresult else None + charm_store_resources_ = [CharmResource.from_json(o) for o in charm_store_resources or []] error_ = Error.from_json(error) if error else None - result_ = StorageDetails.from_json(result) if result else None + resources_ = [Resource.from_json(o) for o in resources or []] + unit_resources_ = [UnitResources.from_json(o) for o in unit_resources or []] # Validate arguments against known Juju API types. + if errorresult_ is not None and not isinstance(errorresult_, (dict, ErrorResult)): + raise Exception("Expected errorresult_ to be a ErrorResult, received: {}".format(type(errorresult_))) + + if charm_store_resources_ is not None and not isinstance(charm_store_resources_, (bytes, str, list)): + raise Exception("Expected charm_store_resources_ to be a Sequence, received: {}".format(type(charm_store_resources_))) + if error_ is not None and not isinstance(error_, (dict, Error)): raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - if result_ is not None and not isinstance(result_, (dict, StorageDetails)): - raise Exception("Expected result_ to be a StorageDetails, received: {}".format(type(result_))) + if resources_ is not None and not isinstance(resources_, (bytes, str, list)): + raise Exception("Expected resources_ to be a Sequence, received: {}".format(type(resources_))) + + if unit_resources_ is not None and not isinstance(unit_resources_, (bytes, str, list)): + raise Exception("Expected unit_resources_ to be a Sequence, received: {}".format(type(unit_resources_))) + self.errorresult = errorresult_ + self.charm_store_resources = charm_store_resources_ self.error = error_ - self.result = result_ + self.resources = resources_ + self.unit_resources = unit_resources_ self.unknown_fields = unknown_fields -class StorageDetailsResults(Type): +class ResourcesResults(Type): _toSchema = {'results': 'results'} _toPy = {'results': 'results'} def __init__(self, results=None, **unknown_fields): ''' - results : typing.Sequence[~StorageDetailsResult] + results : typing.Sequence[~ResourcesResult] ''' - results_ = [StorageDetailsResult.from_json(o) for o in results or []] + results_ = [ResourcesResult.from_json(o) for o in results or []] # Validate arguments against known Juju API types. if results_ is not None and not isinstance(results_, (bytes, str, list)): @@ -24179,193 +12749,206 @@ def __init__(self, results=None, **unknown_fields): -class StorageFilter(Type): - _toSchema = {} - _toPy = {} - def __init__(self, **unknown_fields): - ''' - - ''' - self.unknown_fields = unknown_fields - - - -class StorageFilters(Type): - _toSchema = {'filters': 'filters'} - _toPy = {'filters': 'filters'} - def __init__(self, filters=None, **unknown_fields): +class RetryProvisioningArgs(Type): + _toSchema = {'all_': 'all', 'machines': 'machines'} + _toPy = {'all': 'all_', 'machines': 'machines'} + def __init__(self, all_=None, machines=None, **unknown_fields): ''' - filters : typing.Sequence[~StorageFilter] + all_ : bool + machines : typing.Sequence[str] ''' - filters_ = [StorageFilter.from_json(o) for o in filters or []] + all__ = all_ + machines_ = machines # Validate arguments against known Juju API types. - if filters_ is not None and not isinstance(filters_, (bytes, str, list)): - raise Exception("Expected filters_ to be a Sequence, received: {}".format(type(filters_))) + if all__ is not None and not isinstance(all__, bool): + raise Exception("Expected all__ to be a bool, received: {}".format(type(all__))) - self.filters = filters_ + if machines_ is not None and not isinstance(machines_, (bytes, str, list)): + raise Exception("Expected machines_ to be a Sequence, received: {}".format(type(machines_))) + + self.all_ = all__ + self.machines = machines_ self.unknown_fields = unknown_fields -class StoragePool(Type): - _toSchema = {'attrs': 'attrs', 'name': 'name', 'provider': 'provider'} - _toPy = {'attrs': 'attrs', 'name': 'name', 'provider': 'provider'} - def __init__(self, attrs=None, name=None, provider=None, **unknown_fields): +class RevokeCredentialArg(Type): + _toSchema = {'force': 'force', 'tag': 'tag'} + _toPy = {'force': 'force', 'tag': 'tag'} + def __init__(self, force=None, tag=None, **unknown_fields): ''' - attrs : typing.Mapping[str, typing.Any] - name : str - provider : str + force : bool + tag : str ''' - attrs_ = attrs - name_ = name - provider_ = provider + force_ = force + tag_ = tag # Validate arguments against known Juju API types. - if attrs_ is not None and not isinstance(attrs_, dict): - raise Exception("Expected attrs_ to be a Mapping, received: {}".format(type(attrs_))) - - if name_ is not None and not isinstance(name_, (bytes, str)): - raise Exception("Expected name_ to be a str, received: {}".format(type(name_))) + if force_ is not None and not isinstance(force_, bool): + raise Exception("Expected force_ to be a bool, received: {}".format(type(force_))) - if provider_ is not None and not isinstance(provider_, (bytes, str)): - raise Exception("Expected provider_ to be a str, received: {}".format(type(provider_))) + if tag_ is not None and not isinstance(tag_, (bytes, str)): + raise Exception("Expected tag_ to be a str, received: {}".format(type(tag_))) - self.attrs = attrs_ - self.name = name_ - self.provider = provider_ + self.force = force_ + self.tag = tag_ self.unknown_fields = unknown_fields -class StoragePoolArgs(Type): - _toSchema = {'pools': 'pools'} - _toPy = {'pools': 'pools'} - def __init__(self, pools=None, **unknown_fields): +class RevokeCredentialArgs(Type): + _toSchema = {'credentials': 'credentials'} + _toPy = {'credentials': 'credentials'} + def __init__(self, credentials=None, **unknown_fields): ''' - pools : typing.Sequence[~StoragePool] + credentials : typing.Sequence[~RevokeCredentialArg] ''' - pools_ = [StoragePool.from_json(o) for o in pools or []] + credentials_ = [RevokeCredentialArg.from_json(o) for o in credentials or []] # Validate arguments against known Juju API types. - if pools_ is not None and not isinstance(pools_, (bytes, str, list)): - raise Exception("Expected pools_ to be a Sequence, received: {}".format(type(pools_))) + if credentials_ is not None and not isinstance(credentials_, (bytes, str, list)): + raise Exception("Expected credentials_ to be a Sequence, received: {}".format(type(credentials_))) - self.pools = pools_ + self.credentials = credentials_ self.unknown_fields = unknown_fields -class StoragePoolDeleteArg(Type): - _toSchema = {'name': 'name'} - _toPy = {'name': 'name'} - def __init__(self, name=None, **unknown_fields): +class RunParams(Type): + _toSchema = {'applications': 'applications', 'commands': 'commands', 'execution_group': 'execution-group', 'machines': 'machines', 'parallel': 'parallel', 'timeout': 'timeout', 'units': 'units', 'workload_context': 'workload-context'} + _toPy = {'applications': 'applications', 'commands': 'commands', 'execution-group': 'execution_group', 'machines': 'machines', 'parallel': 'parallel', 'timeout': 'timeout', 'units': 'units', 'workload-context': 'workload_context'} + def __init__(self, applications=None, commands=None, execution_group=None, machines=None, parallel=None, timeout=None, units=None, workload_context=None, **unknown_fields): ''' - name : str + applications : typing.Sequence[str] + commands : str + execution_group : str + machines : typing.Sequence[str] + parallel : bool + timeout : int + units : typing.Sequence[str] + workload_context : bool ''' - name_ = name + applications_ = applications + commands_ = commands + execution_group_ = execution_group + machines_ = machines + parallel_ = parallel + timeout_ = timeout + units_ = units + workload_context_ = workload_context # Validate arguments against known Juju API types. - if name_ is not None and not isinstance(name_, (bytes, str)): - raise Exception("Expected name_ to be a str, received: {}".format(type(name_))) + if applications_ is not None and not isinstance(applications_, (bytes, str, list)): + raise Exception("Expected applications_ to be a Sequence, received: {}".format(type(applications_))) - self.name = name_ - self.unknown_fields = unknown_fields + if commands_ is not None and not isinstance(commands_, (bytes, str)): + raise Exception("Expected commands_ to be a str, received: {}".format(type(commands_))) + if execution_group_ is not None and not isinstance(execution_group_, (bytes, str)): + raise Exception("Expected execution_group_ to be a str, received: {}".format(type(execution_group_))) + if machines_ is not None and not isinstance(machines_, (bytes, str, list)): + raise Exception("Expected machines_ to be a Sequence, received: {}".format(type(machines_))) -class StoragePoolDeleteArgs(Type): - _toSchema = {'pools': 'pools'} - _toPy = {'pools': 'pools'} - def __init__(self, pools=None, **unknown_fields): - ''' - pools : typing.Sequence[~StoragePoolDeleteArg] - ''' - pools_ = [StoragePoolDeleteArg.from_json(o) for o in pools or []] + if parallel_ is not None and not isinstance(parallel_, bool): + raise Exception("Expected parallel_ to be a bool, received: {}".format(type(parallel_))) - # Validate arguments against known Juju API types. - if pools_ is not None and not isinstance(pools_, (bytes, str, list)): - raise Exception("Expected pools_ to be a Sequence, received: {}".format(type(pools_))) + if timeout_ is not None and not isinstance(timeout_, int): + raise Exception("Expected timeout_ to be a int, received: {}".format(type(timeout_))) - self.pools = pools_ + if units_ is not None and not isinstance(units_, (bytes, str, list)): + raise Exception("Expected units_ to be a Sequence, received: {}".format(type(units_))) + + if workload_context_ is not None and not isinstance(workload_context_, bool): + raise Exception("Expected workload_context_ to be a bool, received: {}".format(type(workload_context_))) + + self.applications = applications_ + self.commands = commands_ + self.execution_group = execution_group_ + self.machines = machines_ + self.parallel = parallel_ + self.timeout = timeout_ + self.units = units_ + self.workload_context = workload_context_ self.unknown_fields = unknown_fields -class StoragePoolFilter(Type): - _toSchema = {'names': 'names', 'providers': 'providers'} - _toPy = {'names': 'names', 'providers': 'providers'} - def __init__(self, names=None, providers=None, **unknown_fields): +class SSHAddressResult(Type): + _toSchema = {'address': 'address', 'error': 'error'} + _toPy = {'address': 'address', 'error': 'error'} + def __init__(self, address=None, error=None, **unknown_fields): ''' - names : typing.Sequence[str] - providers : typing.Sequence[str] + address : str + error : Error ''' - names_ = names - providers_ = providers + address_ = address + error_ = Error.from_json(error) if error else None # Validate arguments against known Juju API types. - if names_ is not None and not isinstance(names_, (bytes, str, list)): - raise Exception("Expected names_ to be a Sequence, received: {}".format(type(names_))) + if address_ is not None and not isinstance(address_, (bytes, str)): + raise Exception("Expected address_ to be a str, received: {}".format(type(address_))) - if providers_ is not None and not isinstance(providers_, (bytes, str, list)): - raise Exception("Expected providers_ to be a Sequence, received: {}".format(type(providers_))) + if error_ is not None and not isinstance(error_, (dict, Error)): + raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - self.names = names_ - self.providers = providers_ + self.address = address_ + self.error = error_ self.unknown_fields = unknown_fields -class StoragePoolFilters(Type): - _toSchema = {'filters': 'filters'} - _toPy = {'filters': 'filters'} - def __init__(self, filters=None, **unknown_fields): +class SSHAddressResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} + def __init__(self, results=None, **unknown_fields): ''' - filters : typing.Sequence[~StoragePoolFilter] + results : typing.Sequence[~SSHAddressResult] ''' - filters_ = [StoragePoolFilter.from_json(o) for o in filters or []] + results_ = [SSHAddressResult.from_json(o) for o in results or []] # Validate arguments against known Juju API types. - if filters_ is not None and not isinstance(filters_, (bytes, str, list)): - raise Exception("Expected filters_ to be a Sequence, received: {}".format(type(filters_))) + if results_ is not None and not isinstance(results_, (bytes, str, list)): + raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) - self.filters = filters_ + self.results = results_ self.unknown_fields = unknown_fields -class StoragePoolsResult(Type): - _toSchema = {'error': 'error', 'storage_pools': 'storage-pools'} - _toPy = {'error': 'error', 'storage-pools': 'storage_pools'} - def __init__(self, error=None, storage_pools=None, **unknown_fields): +class SSHAddressesResult(Type): + _toSchema = {'addresses': 'addresses', 'error': 'error'} + _toPy = {'addresses': 'addresses', 'error': 'error'} + def __init__(self, addresses=None, error=None, **unknown_fields): ''' + addresses : typing.Sequence[str] error : Error - storage_pools : typing.Sequence[~StoragePool] ''' + addresses_ = addresses error_ = Error.from_json(error) if error else None - storage_pools_ = [StoragePool.from_json(o) for o in storage_pools or []] # Validate arguments against known Juju API types. + if addresses_ is not None and not isinstance(addresses_, (bytes, str, list)): + raise Exception("Expected addresses_ to be a Sequence, received: {}".format(type(addresses_))) + if error_ is not None and not isinstance(error_, (dict, Error)): raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - if storage_pools_ is not None and not isinstance(storage_pools_, (bytes, str, list)): - raise Exception("Expected storage_pools_ to be a Sequence, received: {}".format(type(storage_pools_))) - + self.addresses = addresses_ self.error = error_ - self.storage_pools = storage_pools_ self.unknown_fields = unknown_fields -class StoragePoolsResults(Type): +class SSHAddressesResults(Type): _toSchema = {'results': 'results'} _toPy = {'results': 'results'} def __init__(self, results=None, **unknown_fields): ''' - results : typing.Sequence[~StoragePoolsResult] + results : typing.Sequence[~SSHAddressesResult] ''' - results_ = [StoragePoolsResult.from_json(o) for o in results or []] + results_ = [SSHAddressesResult.from_json(o) for o in results or []] # Validate arguments against known Juju API types. if results_ is not None and not isinstance(results_, (bytes, str, list)): @@ -24376,62 +12959,56 @@ def __init__(self, results=None, **unknown_fields): -class StoragesAddParams(Type): - _toSchema = {'storages': 'storages'} - _toPy = {'storages': 'storages'} - def __init__(self, storages=None, **unknown_fields): +class SSHProxyResult(Type): + _toSchema = {'use_proxy': 'use-proxy'} + _toPy = {'use-proxy': 'use_proxy'} + def __init__(self, use_proxy=None, **unknown_fields): ''' - storages : typing.Sequence[~StorageAddParams] + use_proxy : bool ''' - storages_ = [StorageAddParams.from_json(o) for o in storages or []] + use_proxy_ = use_proxy # Validate arguments against known Juju API types. - if storages_ is not None and not isinstance(storages_, (bytes, str, list)): - raise Exception("Expected storages_ to be a Sequence, received: {}".format(type(storages_))) + if use_proxy_ is not None and not isinstance(use_proxy_, bool): + raise Exception("Expected use_proxy_ to be a bool, received: {}".format(type(use_proxy_))) - self.storages = storages_ + self.use_proxy = use_proxy_ self.unknown_fields = unknown_fields -class StringBoolResult(Type): - _toSchema = {'error': 'error', 'ok': 'ok', 'result': 'result'} - _toPy = {'error': 'error', 'ok': 'ok', 'result': 'result'} - def __init__(self, error=None, ok=None, result=None, **unknown_fields): +class SSHPublicKeysResult(Type): + _toSchema = {'error': 'error', 'public_keys': 'public-keys'} + _toPy = {'error': 'error', 'public-keys': 'public_keys'} + def __init__(self, error=None, public_keys=None, **unknown_fields): ''' error : Error - ok : bool - result : str + public_keys : typing.Sequence[str] ''' error_ = Error.from_json(error) if error else None - ok_ = ok - result_ = result + public_keys_ = public_keys # Validate arguments against known Juju API types. if error_ is not None and not isinstance(error_, (dict, Error)): raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - if ok_ is not None and not isinstance(ok_, bool): - raise Exception("Expected ok_ to be a bool, received: {}".format(type(ok_))) - - if result_ is not None and not isinstance(result_, (bytes, str)): - raise Exception("Expected result_ to be a str, received: {}".format(type(result_))) + if public_keys_ is not None and not isinstance(public_keys_, (bytes, str, list)): + raise Exception("Expected public_keys_ to be a Sequence, received: {}".format(type(public_keys_))) self.error = error_ - self.ok = ok_ - self.result = result_ + self.public_keys = public_keys_ self.unknown_fields = unknown_fields -class StringBoolResults(Type): +class SSHPublicKeysResults(Type): _toSchema = {'results': 'results'} _toPy = {'results': 'results'} def __init__(self, results=None, **unknown_fields): ''' - results : typing.Sequence[~StringBoolResult] + results : typing.Sequence[~SSHPublicKeysResult] ''' - results_ = [StringBoolResult.from_json(o) for o in results or []] + results_ = [SSHPublicKeysResult.from_json(o) for o in results or []] # Validate arguments against known Juju API types. if results_ is not None and not isinstance(results_, (bytes, str, list)): @@ -24442,80 +13019,92 @@ def __init__(self, results=None, **unknown_fields): -class StringResult(Type): - _toSchema = {'error': 'error', 'result': 'result'} - _toPy = {'error': 'error', 'result': 'result'} - def __init__(self, error=None, result=None, **unknown_fields): +class ScaleApplicationInfo(Type): + _toSchema = {'num_units': 'num-units'} + _toPy = {'num-units': 'num_units'} + def __init__(self, num_units=None, **unknown_fields): ''' - error : Error - result : str + num_units : int ''' - error_ = Error.from_json(error) if error else None - result_ = result + num_units_ = num_units # Validate arguments against known Juju API types. - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - - if result_ is not None and not isinstance(result_, (bytes, str)): - raise Exception("Expected result_ to be a str, received: {}".format(type(result_))) + if num_units_ is not None and not isinstance(num_units_, int): + raise Exception("Expected num_units_ to be a int, received: {}".format(type(num_units_))) - self.error = error_ - self.result = result_ + self.num_units = num_units_ self.unknown_fields = unknown_fields -class StringResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None, **unknown_fields): +class ScaleApplicationParams(Type): + _toSchema = {'application_tag': 'application-tag', 'force': 'force', 'scale': 'scale', 'scale_change': 'scale-change'} + _toPy = {'application-tag': 'application_tag', 'force': 'force', 'scale': 'scale', 'scale-change': 'scale_change'} + def __init__(self, application_tag=None, force=None, scale=None, scale_change=None, **unknown_fields): ''' - results : typing.Sequence[~StringResult] + application_tag : str + force : bool + scale : int + scale_change : int ''' - results_ = [StringResult.from_json(o) for o in results or []] + application_tag_ = application_tag + force_ = force + scale_ = scale + scale_change_ = scale_change # Validate arguments against known Juju API types. - if results_ is not None and not isinstance(results_, (bytes, str, list)): - raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) + if application_tag_ is not None and not isinstance(application_tag_, (bytes, str)): + raise Exception("Expected application_tag_ to be a str, received: {}".format(type(application_tag_))) - self.results = results_ + if force_ is not None and not isinstance(force_, bool): + raise Exception("Expected force_ to be a bool, received: {}".format(type(force_))) + + if scale_ is not None and not isinstance(scale_, int): + raise Exception("Expected scale_ to be a int, received: {}".format(type(scale_))) + + if scale_change_ is not None and not isinstance(scale_change_, int): + raise Exception("Expected scale_change_ to be a int, received: {}".format(type(scale_change_))) + + self.application_tag = application_tag_ + self.force = force_ + self.scale = scale_ + self.scale_change = scale_change_ self.unknown_fields = unknown_fields -class StringsResult(Type): - _toSchema = {'error': 'error', 'result': 'result'} - _toPy = {'error': 'error', 'result': 'result'} - def __init__(self, error=None, result=None, **unknown_fields): +class ScaleApplicationResult(Type): + _toSchema = {'error': 'error', 'info': 'info'} + _toPy = {'error': 'error', 'info': 'info'} + def __init__(self, error=None, info=None, **unknown_fields): ''' error : Error - result : typing.Sequence[str] + info : ScaleApplicationInfo ''' error_ = Error.from_json(error) if error else None - result_ = result + info_ = ScaleApplicationInfo.from_json(info) if info else None # Validate arguments against known Juju API types. if error_ is not None and not isinstance(error_, (dict, Error)): raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - if result_ is not None and not isinstance(result_, (bytes, str, list)): - raise Exception("Expected result_ to be a Sequence, received: {}".format(type(result_))) + if info_ is not None and not isinstance(info_, (dict, ScaleApplicationInfo)): + raise Exception("Expected info_ to be a ScaleApplicationInfo, received: {}".format(type(info_))) self.error = error_ - self.result = result_ + self.info = info_ self.unknown_fields = unknown_fields -class StringsResults(Type): +class ScaleApplicationResults(Type): _toSchema = {'results': 'results'} _toPy = {'results': 'results'} def __init__(self, results=None, **unknown_fields): ''' - results : typing.Sequence[~StringsResult] + results : typing.Sequence[~ScaleApplicationResult] ''' - results_ = [StringsResult.from_json(o) for o in results or []] + results_ = [ScaleApplicationResult.from_json(o) for o in results or []] # Validate arguments against known Juju API types. if results_ is not None and not isinstance(results_, (bytes, str, list)): @@ -24526,356 +13115,350 @@ def __init__(self, results=None, **unknown_fields): -class StringsWatchResult(Type): - _toSchema = {'changes': 'changes', 'error': 'error', 'watcher_id': 'watcher-id'} - _toPy = {'changes': 'changes', 'error': 'error', 'watcher-id': 'watcher_id'} - def __init__(self, changes=None, error=None, watcher_id=None, **unknown_fields): +class ScaleApplicationsParams(Type): + _toSchema = {'applications': 'applications'} + _toPy = {'applications': 'applications'} + def __init__(self, applications=None, **unknown_fields): ''' - changes : typing.Sequence[str] - error : Error - watcher_id : str + applications : typing.Sequence[~ScaleApplicationParams] ''' - changes_ = changes - error_ = Error.from_json(error) if error else None - watcher_id_ = watcher_id + applications_ = [ScaleApplicationParams.from_json(o) for o in applications or []] # Validate arguments against known Juju API types. - if changes_ is not None and not isinstance(changes_, (bytes, str, list)): - raise Exception("Expected changes_ to be a Sequence, received: {}".format(type(changes_))) - - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - - if watcher_id_ is not None and not isinstance(watcher_id_, (bytes, str)): - raise Exception("Expected watcher_id_ to be a str, received: {}".format(type(watcher_id_))) + if applications_ is not None and not isinstance(applications_, (bytes, str, list)): + raise Exception("Expected applications_ to be a Sequence, received: {}".format(type(applications_))) - self.changes = changes_ - self.error = error_ - self.watcher_id = watcher_id_ + self.applications = applications_ self.unknown_fields = unknown_fields -class StringsWatchResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None, **unknown_fields): +class SecretBackend(Type): + _toSchema = {'backend_type': 'backend-type', 'config': 'config', 'name': 'name', 'token_rotate_interval': 'token-rotate-interval'} + _toPy = {'backend-type': 'backend_type', 'config': 'config', 'name': 'name', 'token-rotate-interval': 'token_rotate_interval'} + def __init__(self, backend_type=None, config=None, name=None, token_rotate_interval=None, **unknown_fields): ''' - results : typing.Sequence[~StringsWatchResult] + backend_type : str + config : typing.Mapping[str, typing.Any] + name : str + token_rotate_interval : int ''' - results_ = [StringsWatchResult.from_json(o) for o in results or []] + backend_type_ = backend_type + config_ = config + name_ = name + token_rotate_interval_ = token_rotate_interval # Validate arguments against known Juju API types. - if results_ is not None and not isinstance(results_, (bytes, str, list)): - raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) + if backend_type_ is not None and not isinstance(backend_type_, (bytes, str)): + raise Exception("Expected backend_type_ to be a str, received: {}".format(type(backend_type_))) - self.results = results_ + if config_ is not None and not isinstance(config_, dict): + raise Exception("Expected config_ to be a Mapping, received: {}".format(type(config_))) + + if name_ is not None and not isinstance(name_, (bytes, str)): + raise Exception("Expected name_ to be a str, received: {}".format(type(name_))) + + if token_rotate_interval_ is not None and not isinstance(token_rotate_interval_, int): + raise Exception("Expected token_rotate_interval_ to be a int, received: {}".format(type(token_rotate_interval_))) + + self.backend_type = backend_type_ + self.config = config_ + self.name = name_ + self.token_rotate_interval = token_rotate_interval_ self.unknown_fields = unknown_fields -class Subnet(Type): - _toSchema = {'cidr': 'cidr', 'life': 'life', 'provider_id': 'provider-id', 'provider_network_id': 'provider-network-id', 'provider_space_id': 'provider-space-id', 'space_tag': 'space-tag', 'status': 'status', 'vlan_tag': 'vlan-tag', 'zones': 'zones'} - _toPy = {'cidr': 'cidr', 'life': 'life', 'provider-id': 'provider_id', 'provider-network-id': 'provider_network_id', 'provider-space-id': 'provider_space_id', 'space-tag': 'space_tag', 'status': 'status', 'vlan-tag': 'vlan_tag', 'zones': 'zones'} - def __init__(self, cidr=None, life=None, provider_id=None, provider_network_id=None, provider_space_id=None, space_tag=None, status=None, vlan_tag=None, zones=None, **unknown_fields): +class SecretBackendResult(Type): + _toSchema = {'error': 'error', 'id_': 'id', 'message': 'message', 'num_secrets': 'num-secrets', 'result': 'result', 'status': 'status'} + _toPy = {'error': 'error', 'id': 'id_', 'message': 'message', 'num-secrets': 'num_secrets', 'result': 'result', 'status': 'status'} + def __init__(self, error=None, id_=None, message=None, num_secrets=None, result=None, status=None, **unknown_fields): ''' - cidr : str - life : str - provider_id : str - provider_network_id : str - provider_space_id : str - space_tag : str + error : Error + id_ : str + message : str + num_secrets : int + result : SecretBackend status : str - vlan_tag : int - zones : typing.Sequence[str] ''' - cidr_ = cidr - life_ = life - provider_id_ = provider_id - provider_network_id_ = provider_network_id - provider_space_id_ = provider_space_id - space_tag_ = space_tag + error_ = Error.from_json(error) if error else None + id__ = id_ + message_ = message + num_secrets_ = num_secrets + result_ = SecretBackend.from_json(result) if result else None status_ = status - vlan_tag_ = vlan_tag - zones_ = zones # Validate arguments against known Juju API types. - if cidr_ is not None and not isinstance(cidr_, (bytes, str)): - raise Exception("Expected cidr_ to be a str, received: {}".format(type(cidr_))) - - if life_ is not None and not isinstance(life_, (bytes, str)): - raise Exception("Expected life_ to be a str, received: {}".format(type(life_))) + if error_ is not None and not isinstance(error_, (dict, Error)): + raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - if provider_id_ is not None and not isinstance(provider_id_, (bytes, str)): - raise Exception("Expected provider_id_ to be a str, received: {}".format(type(provider_id_))) + if id__ is not None and not isinstance(id__, (bytes, str)): + raise Exception("Expected id__ to be a str, received: {}".format(type(id__))) - if provider_network_id_ is not None and not isinstance(provider_network_id_, (bytes, str)): - raise Exception("Expected provider_network_id_ to be a str, received: {}".format(type(provider_network_id_))) + if message_ is not None and not isinstance(message_, (bytes, str)): + raise Exception("Expected message_ to be a str, received: {}".format(type(message_))) - if provider_space_id_ is not None and not isinstance(provider_space_id_, (bytes, str)): - raise Exception("Expected provider_space_id_ to be a str, received: {}".format(type(provider_space_id_))) + if num_secrets_ is not None and not isinstance(num_secrets_, int): + raise Exception("Expected num_secrets_ to be a int, received: {}".format(type(num_secrets_))) - if space_tag_ is not None and not isinstance(space_tag_, (bytes, str)): - raise Exception("Expected space_tag_ to be a str, received: {}".format(type(space_tag_))) + if result_ is not None and not isinstance(result_, (dict, SecretBackend)): + raise Exception("Expected result_ to be a SecretBackend, received: {}".format(type(result_))) if status_ is not None and not isinstance(status_, (bytes, str)): raise Exception("Expected status_ to be a str, received: {}".format(type(status_))) - if vlan_tag_ is not None and not isinstance(vlan_tag_, int): - raise Exception("Expected vlan_tag_ to be a int, received: {}".format(type(vlan_tag_))) + self.error = error_ + self.id_ = id__ + self.message = message_ + self.num_secrets = num_secrets_ + self.result = result_ + self.status = status_ + self.unknown_fields = unknown_fields - if zones_ is not None and not isinstance(zones_, (bytes, str, list)): - raise Exception("Expected zones_ to be a Sequence, received: {}".format(type(zones_))) - self.cidr = cidr_ - self.life = life_ - self.provider_id = provider_id_ - self.provider_network_id = provider_network_id_ - self.provider_space_id = provider_space_id_ - self.space_tag = space_tag_ - self.status = status_ - self.vlan_tag = vlan_tag_ - self.zones = zones_ + +class SecretContentParams(Type): + _toSchema = {'data': 'data', 'value_ref': 'value-ref'} + _toPy = {'data': 'data', 'value-ref': 'value_ref'} + def __init__(self, data=None, value_ref=None, **unknown_fields): + ''' + data : typing.Mapping[str, str] + value_ref : SecretValueRef + ''' + data_ = data + value_ref_ = SecretValueRef.from_json(value_ref) if value_ref else None + + # Validate arguments against known Juju API types. + if data_ is not None and not isinstance(data_, dict): + raise Exception("Expected data_ to be a Mapping, received: {}".format(type(data_))) + + if value_ref_ is not None and not isinstance(value_ref_, (dict, SecretValueRef)): + raise Exception("Expected value_ref_ to be a SecretValueRef, received: {}".format(type(value_ref_))) + + self.data = data_ + self.value_ref = value_ref_ self.unknown_fields = unknown_fields -class SubnetV2(Type): - _toSchema = {'cidr': 'cidr', 'id_': 'id', 'life': 'life', 'provider_id': 'provider-id', 'provider_network_id': 'provider-network-id', 'provider_space_id': 'provider-space-id', 'space_tag': 'space-tag', 'status': 'status', 'subnet': 'Subnet', 'vlan_tag': 'vlan-tag', 'zones': 'zones'} - _toPy = {'Subnet': 'subnet', 'cidr': 'cidr', 'id': 'id_', 'life': 'life', 'provider-id': 'provider_id', 'provider-network-id': 'provider_network_id', 'provider-space-id': 'provider_space_id', 'space-tag': 'space_tag', 'status': 'status', 'vlan-tag': 'vlan_tag', 'zones': 'zones'} - def __init__(self, subnet=None, cidr=None, id_=None, life=None, provider_id=None, provider_network_id=None, provider_space_id=None, space_tag=None, status=None, vlan_tag=None, zones=None, **unknown_fields): +class SecretRevision(Type): + _toSchema = {'backend_name': 'backend-name', 'create_time': 'create-time', 'expire_time': 'expire-time', 'revision': 'revision', 'update_time': 'update-time', 'value_ref': 'value-ref'} + _toPy = {'backend-name': 'backend_name', 'create-time': 'create_time', 'expire-time': 'expire_time', 'revision': 'revision', 'update-time': 'update_time', 'value-ref': 'value_ref'} + def __init__(self, backend_name=None, create_time=None, expire_time=None, revision=None, update_time=None, value_ref=None, **unknown_fields): ''' - subnet : Subnet - cidr : str - id_ : str - life : str - provider_id : str - provider_network_id : str - provider_space_id : str - space_tag : str - status : str - vlan_tag : int - zones : typing.Sequence[str] + backend_name : str + create_time : str + expire_time : str + revision : int + update_time : str + value_ref : SecretValueRef ''' - subnet_ = Subnet.from_json(subnet) if subnet else None - cidr_ = cidr - id__ = id_ - life_ = life - provider_id_ = provider_id - provider_network_id_ = provider_network_id - provider_space_id_ = provider_space_id - space_tag_ = space_tag - status_ = status - vlan_tag_ = vlan_tag - zones_ = zones + backend_name_ = backend_name + create_time_ = create_time + expire_time_ = expire_time + revision_ = revision + update_time_ = update_time + value_ref_ = SecretValueRef.from_json(value_ref) if value_ref else None # Validate arguments against known Juju API types. - if subnet_ is not None and not isinstance(subnet_, (dict, Subnet)): - raise Exception("Expected subnet_ to be a Subnet, received: {}".format(type(subnet_))) + if backend_name_ is not None and not isinstance(backend_name_, (bytes, str)): + raise Exception("Expected backend_name_ to be a str, received: {}".format(type(backend_name_))) - if cidr_ is not None and not isinstance(cidr_, (bytes, str)): - raise Exception("Expected cidr_ to be a str, received: {}".format(type(cidr_))) + if create_time_ is not None and not isinstance(create_time_, (bytes, str)): + raise Exception("Expected create_time_ to be a str, received: {}".format(type(create_time_))) - if id__ is not None and not isinstance(id__, (bytes, str)): - raise Exception("Expected id__ to be a str, received: {}".format(type(id__))) + if expire_time_ is not None and not isinstance(expire_time_, (bytes, str)): + raise Exception("Expected expire_time_ to be a str, received: {}".format(type(expire_time_))) - if life_ is not None and not isinstance(life_, (bytes, str)): - raise Exception("Expected life_ to be a str, received: {}".format(type(life_))) + if revision_ is not None and not isinstance(revision_, int): + raise Exception("Expected revision_ to be a int, received: {}".format(type(revision_))) - if provider_id_ is not None and not isinstance(provider_id_, (bytes, str)): - raise Exception("Expected provider_id_ to be a str, received: {}".format(type(provider_id_))) + if update_time_ is not None and not isinstance(update_time_, (bytes, str)): + raise Exception("Expected update_time_ to be a str, received: {}".format(type(update_time_))) - if provider_network_id_ is not None and not isinstance(provider_network_id_, (bytes, str)): - raise Exception("Expected provider_network_id_ to be a str, received: {}".format(type(provider_network_id_))) + if value_ref_ is not None and not isinstance(value_ref_, (dict, SecretValueRef)): + raise Exception("Expected value_ref_ to be a SecretValueRef, received: {}".format(type(value_ref_))) - if provider_space_id_ is not None and not isinstance(provider_space_id_, (bytes, str)): - raise Exception("Expected provider_space_id_ to be a str, received: {}".format(type(provider_space_id_))) + self.backend_name = backend_name_ + self.create_time = create_time_ + self.expire_time = expire_time_ + self.revision = revision_ + self.update_time = update_time_ + self.value_ref = value_ref_ + self.unknown_fields = unknown_fields - if space_tag_ is not None and not isinstance(space_tag_, (bytes, str)): - raise Exception("Expected space_tag_ to be a str, received: {}".format(type(space_tag_))) - if status_ is not None and not isinstance(status_, (bytes, str)): - raise Exception("Expected status_ to be a str, received: {}".format(type(status_))) - if vlan_tag_ is not None and not isinstance(vlan_tag_, int): - raise Exception("Expected vlan_tag_ to be a int, received: {}".format(type(vlan_tag_))) +class SecretValueRef(Type): + _toSchema = {'backend_id': 'backend-id', 'revision_id': 'revision-id'} + _toPy = {'backend-id': 'backend_id', 'revision-id': 'revision_id'} + def __init__(self, backend_id=None, revision_id=None, **unknown_fields): + ''' + backend_id : str + revision_id : str + ''' + backend_id_ = backend_id + revision_id_ = revision_id - if zones_ is not None and not isinstance(zones_, (bytes, str, list)): - raise Exception("Expected zones_ to be a Sequence, received: {}".format(type(zones_))) + # Validate arguments against known Juju API types. + if backend_id_ is not None and not isinstance(backend_id_, (bytes, str)): + raise Exception("Expected backend_id_ to be a str, received: {}".format(type(backend_id_))) - self.subnet = subnet_ - self.cidr = cidr_ - self.id_ = id__ - self.life = life_ - self.provider_id = provider_id_ - self.provider_network_id = provider_network_id_ - self.provider_space_id = provider_space_id_ - self.space_tag = space_tag_ - self.status = status_ - self.vlan_tag = vlan_tag_ - self.zones = zones_ + if revision_id_ is not None and not isinstance(revision_id_, (bytes, str)): + raise Exception("Expected revision_id_ to be a str, received: {}".format(type(revision_id_))) + + self.backend_id = backend_id_ + self.revision_id = revision_id_ self.unknown_fields = unknown_fields -class SubnetV3(Type): - _toSchema = {'cidr': 'cidr', 'fan_info': 'fan-info', 'id_': 'id', 'is_public': 'is-public', 'life': 'life', 'provider_id': 'provider-id', 'provider_network_id': 'provider-network-id', 'provider_space_id': 'provider-space-id', 'space_id': 'space-id', 'space_tag': 'space-tag', 'status': 'status', 'subnet': 'Subnet', 'subnetv2': 'SubnetV2', 'vlan_tag': 'vlan-tag', 'zones': 'zones'} - _toPy = {'Subnet': 'subnet', 'SubnetV2': 'subnetv2', 'cidr': 'cidr', 'fan-info': 'fan_info', 'id': 'id_', 'is-public': 'is_public', 'life': 'life', 'provider-id': 'provider_id', 'provider-network-id': 'provider_network_id', 'provider-space-id': 'provider_space_id', 'space-id': 'space_id', 'space-tag': 'space_tag', 'status': 'status', 'vlan-tag': 'vlan_tag', 'zones': 'zones'} - def __init__(self, subnet=None, subnetv2=None, cidr=None, fan_info=None, id_=None, is_public=None, life=None, provider_id=None, provider_network_id=None, provider_space_id=None, space_id=None, space_tag=None, status=None, vlan_tag=None, zones=None, **unknown_fields): +class SecretValueResult(Type): + _toSchema = {'data': 'data', 'error': 'error'} + _toPy = {'data': 'data', 'error': 'error'} + def __init__(self, data=None, error=None, **unknown_fields): ''' - subnet : Subnet - subnetv2 : SubnetV2 - cidr : str - fan_info : FanConfigEntry - id_ : str - is_public : bool - life : str - provider_id : str - provider_network_id : str - provider_space_id : str - space_id : str - space_tag : str - status : str - vlan_tag : int - zones : typing.Sequence[str] + data : typing.Mapping[str, str] + error : Error ''' - subnet_ = Subnet.from_json(subnet) if subnet else None - subnetv2_ = SubnetV2.from_json(subnetv2) if subnetv2 else None - cidr_ = cidr - fan_info_ = FanConfigEntry.from_json(fan_info) if fan_info else None - id__ = id_ - is_public_ = is_public - life_ = life - provider_id_ = provider_id - provider_network_id_ = provider_network_id - provider_space_id_ = provider_space_id - space_id_ = space_id - space_tag_ = space_tag - status_ = status - vlan_tag_ = vlan_tag - zones_ = zones + data_ = data + error_ = Error.from_json(error) if error else None # Validate arguments against known Juju API types. - if subnet_ is not None and not isinstance(subnet_, (dict, Subnet)): - raise Exception("Expected subnet_ to be a Subnet, received: {}".format(type(subnet_))) + if data_ is not None and not isinstance(data_, dict): + raise Exception("Expected data_ to be a Mapping, received: {}".format(type(data_))) + + if error_ is not None and not isinstance(error_, (dict, Error)): + raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - if subnetv2_ is not None and not isinstance(subnetv2_, (dict, SubnetV2)): - raise Exception("Expected subnetv2_ to be a SubnetV2, received: {}".format(type(subnetv2_))) + self.data = data_ + self.error = error_ + self.unknown_fields = unknown_fields - if cidr_ is not None and not isinstance(cidr_, (bytes, str)): - raise Exception("Expected cidr_ to be a str, received: {}".format(type(cidr_))) - if fan_info_ is not None and not isinstance(fan_info_, (dict, FanConfigEntry)): - raise Exception("Expected fan_info_ to be a FanConfigEntry, received: {}".format(type(fan_info_))) - if id__ is not None and not isinstance(id__, (bytes, str)): - raise Exception("Expected id__ to be a str, received: {}".format(type(id__))) +class SecretsFilter(Type): + _toSchema = {'label': 'label', 'owner_tag': 'owner-tag', 'revision': 'revision', 'uri': 'uri'} + _toPy = {'label': 'label', 'owner-tag': 'owner_tag', 'revision': 'revision', 'uri': 'uri'} + def __init__(self, label=None, owner_tag=None, revision=None, uri=None, **unknown_fields): + ''' + label : str + owner_tag : str + revision : int + uri : str + ''' + label_ = label + owner_tag_ = owner_tag + revision_ = revision + uri_ = uri - if is_public_ is not None and not isinstance(is_public_, bool): - raise Exception("Expected is_public_ to be a bool, received: {}".format(type(is_public_))) + # Validate arguments against known Juju API types. + if label_ is not None and not isinstance(label_, (bytes, str)): + raise Exception("Expected label_ to be a str, received: {}".format(type(label_))) - if life_ is not None and not isinstance(life_, (bytes, str)): - raise Exception("Expected life_ to be a str, received: {}".format(type(life_))) + if owner_tag_ is not None and not isinstance(owner_tag_, (bytes, str)): + raise Exception("Expected owner_tag_ to be a str, received: {}".format(type(owner_tag_))) - if provider_id_ is not None and not isinstance(provider_id_, (bytes, str)): - raise Exception("Expected provider_id_ to be a str, received: {}".format(type(provider_id_))) + if revision_ is not None and not isinstance(revision_, int): + raise Exception("Expected revision_ to be a int, received: {}".format(type(revision_))) - if provider_network_id_ is not None and not isinstance(provider_network_id_, (bytes, str)): - raise Exception("Expected provider_network_id_ to be a str, received: {}".format(type(provider_network_id_))) + if uri_ is not None and not isinstance(uri_, (bytes, str)): + raise Exception("Expected uri_ to be a str, received: {}".format(type(uri_))) - if provider_space_id_ is not None and not isinstance(provider_space_id_, (bytes, str)): - raise Exception("Expected provider_space_id_ to be a str, received: {}".format(type(provider_space_id_))) + self.label = label_ + self.owner_tag = owner_tag_ + self.revision = revision_ + self.uri = uri_ + self.unknown_fields = unknown_fields - if space_id_ is not None and not isinstance(space_id_, (bytes, str)): - raise Exception("Expected space_id_ to be a str, received: {}".format(type(space_id_))) - if space_tag_ is not None and not isinstance(space_tag_, (bytes, str)): - raise Exception("Expected space_tag_ to be a str, received: {}".format(type(space_tag_))) - if status_ is not None and not isinstance(status_, (bytes, str)): - raise Exception("Expected status_ to be a str, received: {}".format(type(status_))) +class SetConstraints(Type): + _toSchema = {'application': 'application', 'constraints': 'constraints'} + _toPy = {'application': 'application', 'constraints': 'constraints'} + def __init__(self, application=None, constraints=None, **unknown_fields): + ''' + application : str + constraints : Value + ''' + application_ = application + constraints_ = Value.from_json(constraints) if constraints else None - if vlan_tag_ is not None and not isinstance(vlan_tag_, int): - raise Exception("Expected vlan_tag_ to be a int, received: {}".format(type(vlan_tag_))) + # Validate arguments against known Juju API types. + if application_ is not None and not isinstance(application_, (bytes, str)): + raise Exception("Expected application_ to be a str, received: {}".format(type(application_))) - if zones_ is not None and not isinstance(zones_, (bytes, str, list)): - raise Exception("Expected zones_ to be a Sequence, received: {}".format(type(zones_))) + if constraints_ is not None and not isinstance(constraints_, (dict, Value)): + raise Exception("Expected constraints_ to be a Value, received: {}".format(type(constraints_))) - self.subnet = subnet_ - self.subnetv2 = subnetv2_ - self.cidr = cidr_ - self.fan_info = fan_info_ - self.id_ = id__ - self.is_public = is_public_ - self.life = life_ - self.provider_id = provider_id_ - self.provider_network_id = provider_network_id_ - self.provider_space_id = provider_space_id_ - self.space_id = space_id_ - self.space_tag = space_tag_ - self.status = status_ - self.vlan_tag = vlan_tag_ - self.zones = zones_ + self.application = application_ + self.constraints = constraints_ self.unknown_fields = unknown_fields -class SubnetsFilters(Type): - _toSchema = {'space_tag': 'space-tag', 'zone': 'zone'} - _toPy = {'space-tag': 'space_tag', 'zone': 'zone'} - def __init__(self, space_tag=None, zone=None, **unknown_fields): +class SetModelDefaults(Type): + _toSchema = {'config': 'config'} + _toPy = {'config': 'config'} + def __init__(self, config=None, **unknown_fields): ''' - space_tag : str - zone : str + config : typing.Sequence[~ModelDefaultValues] ''' - space_tag_ = space_tag - zone_ = zone + config_ = [ModelDefaultValues.from_json(o) for o in config or []] # Validate arguments against known Juju API types. - if space_tag_ is not None and not isinstance(space_tag_, (bytes, str)): - raise Exception("Expected space_tag_ to be a str, received: {}".format(type(space_tag_))) - - if zone_ is not None and not isinstance(zone_, (bytes, str)): - raise Exception("Expected zone_ to be a str, received: {}".format(type(zone_))) + if config_ is not None and not isinstance(config_, (bytes, str, list)): + raise Exception("Expected config_ to be a Sequence, received: {}".format(type(config_))) - self.space_tag = space_tag_ - self.zone = zone_ + self.config = config_ self.unknown_fields = unknown_fields -class SubnetsResult(Type): - _toSchema = {'error': 'error', 'subnets': 'subnets'} - _toPy = {'error': 'error', 'subnets': 'subnets'} - def __init__(self, error=None, subnets=None, **unknown_fields): +class ShowSpaceResult(Type): + _toSchema = {'applications': 'applications', 'error': 'error', 'machine_count': 'machine-count', 'space': 'space'} + _toPy = {'applications': 'applications', 'error': 'error', 'machine-count': 'machine_count', 'space': 'space'} + def __init__(self, applications=None, error=None, machine_count=None, space=None, **unknown_fields): ''' + applications : typing.Sequence[str] error : Error - subnets : typing.Sequence[~SubnetV2] + machine_count : int + space : Space ''' + applications_ = applications error_ = Error.from_json(error) if error else None - subnets_ = [SubnetV2.from_json(o) for o in subnets or []] + machine_count_ = machine_count + space_ = Space.from_json(space) if space else None # Validate arguments against known Juju API types. + if applications_ is not None and not isinstance(applications_, (bytes, str, list)): + raise Exception("Expected applications_ to be a Sequence, received: {}".format(type(applications_))) + if error_ is not None and not isinstance(error_, (dict, Error)): raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - if subnets_ is not None and not isinstance(subnets_, (bytes, str, list)): - raise Exception("Expected subnets_ to be a Sequence, received: {}".format(type(subnets_))) + if machine_count_ is not None and not isinstance(machine_count_, int): + raise Exception("Expected machine_count_ to be a int, received: {}".format(type(machine_count_))) + + if space_ is not None and not isinstance(space_, (dict, Space)): + raise Exception("Expected space_ to be a Space, received: {}".format(type(space_))) + self.applications = applications_ self.error = error_ - self.subnets = subnets_ + self.machine_count = machine_count_ + self.space = space_ self.unknown_fields = unknown_fields -class SubnetsResults(Type): +class ShowSpaceResults(Type): _toSchema = {'results': 'results'} _toPy = {'results': 'results'} def __init__(self, results=None, **unknown_fields): ''' - results : typing.Sequence[~SubnetsResult] + results : typing.Sequence[~ShowSpaceResult] ''' - results_ = [SubnetsResult.from_json(o) for o in results or []] + results_ = [ShowSpaceResult.from_json(o) for o in results or []] # Validate arguments against known Juju API types. if results_ is not None and not isinstance(results_, (bytes, str, list)): @@ -24886,146 +13469,164 @@ def __init__(self, results=None, **unknown_fields): -class SummaryWatcherID(Type): - _toSchema = {'watcher_id': 'watcher-id'} - _toPy = {'watcher-id': 'watcher_id'} - def __init__(self, watcher_id=None, **unknown_fields): +class Space(Type): + _toSchema = {'error': 'error', 'id_': 'id', 'name': 'name', 'subnets': 'subnets'} + _toPy = {'error': 'error', 'id': 'id_', 'name': 'name', 'subnets': 'subnets'} + def __init__(self, error=None, id_=None, name=None, subnets=None, **unknown_fields): ''' - watcher_id : str + error : Error + id_ : str + name : str + subnets : typing.Sequence[~Subnet] ''' - watcher_id_ = watcher_id + error_ = Error.from_json(error) if error else None + id__ = id_ + name_ = name + subnets_ = [Subnet.from_json(o) for o in subnets or []] # Validate arguments against known Juju API types. - if watcher_id_ is not None and not isinstance(watcher_id_, (bytes, str)): - raise Exception("Expected watcher_id_ to be a str, received: {}".format(type(watcher_id_))) - - self.watcher_id = watcher_id_ - self.unknown_fields = unknown_fields - + if error_ is not None and not isinstance(error_, (dict, Error)): + raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) + if id__ is not None and not isinstance(id__, (bytes, str)): + raise Exception("Expected id__ to be a str, received: {}".format(type(id__))) -class SummaryWatcherNextResults(Type): - _toSchema = {'models': 'models'} - _toPy = {'models': 'models'} - def __init__(self, models=None, **unknown_fields): - ''' - models : typing.Sequence[~ModelAbstract] - ''' - models_ = [ModelAbstract.from_json(o) for o in models or []] + if name_ is not None and not isinstance(name_, (bytes, str)): + raise Exception("Expected name_ to be a str, received: {}".format(type(name_))) - # Validate arguments against known Juju API types. - if models_ is not None and not isinstance(models_, (bytes, str, list)): - raise Exception("Expected models_ to be a Sequence, received: {}".format(type(models_))) + if subnets_ is not None and not isinstance(subnets_, (bytes, str, list)): + raise Exception("Expected subnets_ to be a Sequence, received: {}".format(type(subnets_))) - self.models = models_ + self.error = error_ + self.id_ = id__ + self.name = name_ + self.subnets = subnets_ self.unknown_fields = unknown_fields -class SupportedFeature(Type): - _toSchema = {'description': 'description', 'name': 'name', 'version': 'version'} - _toPy = {'description': 'description', 'name': 'name', 'version': 'version'} - def __init__(self, description=None, name=None, version=None, **unknown_fields): +class StatusHistoryFilter(Type): + _toSchema = {'date': 'date', 'delta': 'delta', 'exclude': 'exclude', 'size': 'size'} + _toPy = {'date': 'date', 'delta': 'delta', 'exclude': 'exclude', 'size': 'size'} + def __init__(self, date=None, delta=None, exclude=None, size=None, **unknown_fields): ''' - description : str - name : str - version : str + date : str + delta : int + exclude : typing.Sequence[str] + size : int ''' - description_ = description - name_ = name - version_ = version + date_ = date + delta_ = delta + exclude_ = exclude + size_ = size # Validate arguments against known Juju API types. - if description_ is not None and not isinstance(description_, (bytes, str)): - raise Exception("Expected description_ to be a str, received: {}".format(type(description_))) + if date_ is not None and not isinstance(date_, (bytes, str)): + raise Exception("Expected date_ to be a str, received: {}".format(type(date_))) - if name_ is not None and not isinstance(name_, (bytes, str)): - raise Exception("Expected name_ to be a str, received: {}".format(type(name_))) + if delta_ is not None and not isinstance(delta_, int): + raise Exception("Expected delta_ to be a int, received: {}".format(type(delta_))) - if version_ is not None and not isinstance(version_, (bytes, str)): - raise Exception("Expected version_ to be a str, received: {}".format(type(version_))) + if exclude_ is not None and not isinstance(exclude_, (bytes, str, list)): + raise Exception("Expected exclude_ to be a Sequence, received: {}".format(type(exclude_))) - self.description = description_ - self.name = name_ - self.version = version_ + if size_ is not None and not isinstance(size_, int): + raise Exception("Expected size_ to be a int, received: {}".format(type(size_))) + + self.date = date_ + self.delta = delta_ + self.exclude = exclude_ + self.size = size_ self.unknown_fields = unknown_fields -class TaggedCredential(Type): - _toSchema = {'credential': 'credential', 'tag': 'tag'} - _toPy = {'credential': 'credential', 'tag': 'tag'} - def __init__(self, credential=None, tag=None, **unknown_fields): +class StatusHistoryRequest(Type): + _toSchema = {'filter_': 'filter', 'historykind': 'historyKind', 'size': 'size', 'tag': 'tag'} + _toPy = {'filter': 'filter_', 'historyKind': 'historykind', 'size': 'size', 'tag': 'tag'} + def __init__(self, filter_=None, historykind=None, size=None, tag=None, **unknown_fields): ''' - credential : CloudCredential + filter_ : StatusHistoryFilter + historykind : str + size : int tag : str ''' - credential_ = CloudCredential.from_json(credential) if credential else None + filter__ = StatusHistoryFilter.from_json(filter_) if filter_ else None + historykind_ = historykind + size_ = size tag_ = tag # Validate arguments against known Juju API types. - if credential_ is not None and not isinstance(credential_, (dict, CloudCredential)): - raise Exception("Expected credential_ to be a CloudCredential, received: {}".format(type(credential_))) + if filter__ is not None and not isinstance(filter__, (dict, StatusHistoryFilter)): + raise Exception("Expected filter__ to be a StatusHistoryFilter, received: {}".format(type(filter__))) + + if historykind_ is not None and not isinstance(historykind_, (bytes, str)): + raise Exception("Expected historykind_ to be a str, received: {}".format(type(historykind_))) + + if size_ is not None and not isinstance(size_, int): + raise Exception("Expected size_ to be a int, received: {}".format(type(size_))) if tag_ is not None and not isinstance(tag_, (bytes, str)): raise Exception("Expected tag_ to be a str, received: {}".format(type(tag_))) - self.credential = credential_ + self.filter_ = filter__ + self.historykind = historykind_ + self.size = size_ self.tag = tag_ self.unknown_fields = unknown_fields -class TaggedCredentials(Type): - _toSchema = {'credentials': 'credentials'} - _toPy = {'credentials': 'credentials'} - def __init__(self, credentials=None, **unknown_fields): +class StatusHistoryRequests(Type): + _toSchema = {'requests': 'requests'} + _toPy = {'requests': 'requests'} + def __init__(self, requests=None, **unknown_fields): ''' - credentials : typing.Sequence[~TaggedCredential] + requests : typing.Sequence[~StatusHistoryRequest] ''' - credentials_ = [TaggedCredential.from_json(o) for o in credentials or []] + requests_ = [StatusHistoryRequest.from_json(o) for o in requests or []] # Validate arguments against known Juju API types. - if credentials_ is not None and not isinstance(credentials_, (bytes, str, list)): - raise Exception("Expected credentials_ to be a Sequence, received: {}".format(type(credentials_))) + if requests_ is not None and not isinstance(requests_, (bytes, str, list)): + raise Exception("Expected requests_ to be a Sequence, received: {}".format(type(requests_))) - self.credentials = credentials_ + self.requests = requests_ self.unknown_fields = unknown_fields -class TokenResult(Type): - _toSchema = {'error': 'error', 'token': 'token'} - _toPy = {'error': 'error', 'token': 'token'} - def __init__(self, error=None, token=None, **unknown_fields): +class StatusHistoryResult(Type): + _toSchema = {'error': 'error', 'history': 'history'} + _toPy = {'error': 'error', 'history': 'history'} + def __init__(self, error=None, history=None, **unknown_fields): ''' error : Error - token : str + history : History ''' error_ = Error.from_json(error) if error else None - token_ = token + history_ = History.from_json(history) if history else None # Validate arguments against known Juju API types. if error_ is not None and not isinstance(error_, (dict, Error)): raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - if token_ is not None and not isinstance(token_, (bytes, str)): - raise Exception("Expected token_ to be a str, received: {}".format(type(token_))) + if history_ is not None and not isinstance(history_, (dict, History)): + raise Exception("Expected history_ to be a History, received: {}".format(type(history_))) self.error = error_ - self.token = token_ + self.history = history_ self.unknown_fields = unknown_fields -class TokenResults(Type): +class StatusHistoryResults(Type): _toSchema = {'results': 'results'} _toPy = {'results': 'results'} def __init__(self, results=None, **unknown_fields): ''' - results : typing.Sequence[~TokenResult] + results : typing.Sequence[~StatusHistoryResult] ''' - results_ = [TokenResult.from_json(o) for o in results or []] + results_ = [StatusHistoryResult.from_json(o) for o in results or []] # Validate arguments against known Juju API types. if results_ is not None and not isinstance(results_, (bytes, str, list)): @@ -25036,197 +13637,275 @@ def __init__(self, results=None, **unknown_fields): -class Tools(Type): - _toSchema = {'sha256': 'sha256', 'size': 'size', 'url': 'url', 'version': 'version'} - _toPy = {'sha256': 'sha256', 'size': 'size', 'url': 'url', 'version': 'version'} - def __init__(self, sha256=None, size=None, url=None, version=None, **unknown_fields): +class StatusParams(Type): + _toSchema = {'include_storage': 'include-storage', 'patterns': 'patterns'} + _toPy = {'include-storage': 'include_storage', 'patterns': 'patterns'} + def __init__(self, include_storage=None, patterns=None, **unknown_fields): ''' - sha256 : str - size : int - url : str - version : Binary + include_storage : bool + patterns : typing.Sequence[str] ''' - sha256_ = sha256 - size_ = size - url_ = url - version_ = Binary.from_json(version) if version else None + include_storage_ = include_storage + patterns_ = patterns # Validate arguments against known Juju API types. - if sha256_ is not None and not isinstance(sha256_, (bytes, str)): - raise Exception("Expected sha256_ to be a str, received: {}".format(type(sha256_))) + if include_storage_ is not None and not isinstance(include_storage_, bool): + raise Exception("Expected include_storage_ to be a bool, received: {}".format(type(include_storage_))) - if size_ is not None and not isinstance(size_, int): - raise Exception("Expected size_ to be a int, received: {}".format(type(size_))) + if patterns_ is not None and not isinstance(patterns_, (bytes, str, list)): + raise Exception("Expected patterns_ to be a Sequence, received: {}".format(type(patterns_))) - if url_ is not None and not isinstance(url_, (bytes, str)): - raise Exception("Expected url_ to be a str, received: {}".format(type(url_))) + self.include_storage = include_storage_ + self.patterns = patterns_ + self.unknown_fields = unknown_fields - if version_ is not None and not isinstance(version_, (dict, Binary)): - raise Exception("Expected version_ to be a Binary, received: {}".format(type(version_))) - self.sha256 = sha256_ - self.size = size_ - self.url = url_ - self.version = version_ + +class StorageAddParams(Type): + _toSchema = {'name': 'name', 'storage': 'storage', 'unit': 'unit'} + _toPy = {'name': 'name', 'storage': 'storage', 'unit': 'unit'} + def __init__(self, name=None, storage=None, unit=None, **unknown_fields): + ''' + name : str + storage : StorageConstraints + unit : str + ''' + name_ = name + storage_ = StorageConstraints.from_json(storage) if storage else None + unit_ = unit + + # Validate arguments against known Juju API types. + if name_ is not None and not isinstance(name_, (bytes, str)): + raise Exception("Expected name_ to be a str, received: {}".format(type(name_))) + + if storage_ is not None and not isinstance(storage_, (dict, StorageConstraints)): + raise Exception("Expected storage_ to be a StorageConstraints, received: {}".format(type(storage_))) + + if unit_ is not None and not isinstance(unit_, (bytes, str)): + raise Exception("Expected unit_ to be a str, received: {}".format(type(unit_))) + + self.name = name_ + self.storage = storage_ + self.unit = unit_ self.unknown_fields = unknown_fields -class ToolsResult(Type): - _toSchema = {'error': 'error', 'tools': 'tools'} - _toPy = {'error': 'error', 'tools': 'tools'} - def __init__(self, error=None, tools=None, **unknown_fields): +class StorageAttachmentDetails(Type): + _toSchema = {'life': 'life', 'location': 'location', 'machine_tag': 'machine-tag', 'storage_tag': 'storage-tag', 'unit_tag': 'unit-tag'} + _toPy = {'life': 'life', 'location': 'location', 'machine-tag': 'machine_tag', 'storage-tag': 'storage_tag', 'unit-tag': 'unit_tag'} + def __init__(self, life=None, location=None, machine_tag=None, storage_tag=None, unit_tag=None, **unknown_fields): ''' - error : Error - tools : typing.Sequence[~Tools] + life : str + location : str + machine_tag : str + storage_tag : str + unit_tag : str ''' - error_ = Error.from_json(error) if error else None - tools_ = [Tools.from_json(o) for o in tools or []] + life_ = life + location_ = location + machine_tag_ = machine_tag + storage_tag_ = storage_tag + unit_tag_ = unit_tag # Validate arguments against known Juju API types. - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) + if life_ is not None and not isinstance(life_, (bytes, str)): + raise Exception("Expected life_ to be a str, received: {}".format(type(life_))) - if tools_ is not None and not isinstance(tools_, (bytes, str, list)): - raise Exception("Expected tools_ to be a Sequence, received: {}".format(type(tools_))) + if location_ is not None and not isinstance(location_, (bytes, str)): + raise Exception("Expected location_ to be a str, received: {}".format(type(location_))) - self.error = error_ - self.tools = tools_ + if machine_tag_ is not None and not isinstance(machine_tag_, (bytes, str)): + raise Exception("Expected machine_tag_ to be a str, received: {}".format(type(machine_tag_))) + + if storage_tag_ is not None and not isinstance(storage_tag_, (bytes, str)): + raise Exception("Expected storage_tag_ to be a str, received: {}".format(type(storage_tag_))) + + if unit_tag_ is not None and not isinstance(unit_tag_, (bytes, str)): + raise Exception("Expected unit_tag_ to be a str, received: {}".format(type(unit_tag_))) + + self.life = life_ + self.location = location_ + self.machine_tag = machine_tag_ + self.storage_tag = storage_tag_ + self.unit_tag = unit_tag_ self.unknown_fields = unknown_fields -class ToolsResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None, **unknown_fields): +class StorageAttachmentId(Type): + _toSchema = {'storage_tag': 'storage-tag', 'unit_tag': 'unit-tag'} + _toPy = {'storage-tag': 'storage_tag', 'unit-tag': 'unit_tag'} + def __init__(self, storage_tag=None, unit_tag=None, **unknown_fields): ''' - results : typing.Sequence[~ToolsResult] + storage_tag : str + unit_tag : str ''' - results_ = [ToolsResult.from_json(o) for o in results or []] + storage_tag_ = storage_tag + unit_tag_ = unit_tag # Validate arguments against known Juju API types. - if results_ is not None and not isinstance(results_, (bytes, str, list)): - raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) + if storage_tag_ is not None and not isinstance(storage_tag_, (bytes, str)): + raise Exception("Expected storage_tag_ to be a str, received: {}".format(type(storage_tag_))) - self.results = results_ + if unit_tag_ is not None and not isinstance(unit_tag_, (bytes, str)): + raise Exception("Expected unit_tag_ to be a str, received: {}".format(type(unit_tag_))) + + self.storage_tag = storage_tag_ + self.unit_tag = unit_tag_ self.unknown_fields = unknown_fields -class TrackPayloadArgs(Type): - _toSchema = {'payloads': 'payloads'} - _toPy = {'payloads': 'payloads'} - def __init__(self, payloads=None, **unknown_fields): +class StorageAttachmentIds(Type): + _toSchema = {'ids': 'ids'} + _toPy = {'ids': 'ids'} + def __init__(self, ids=None, **unknown_fields): ''' - payloads : typing.Sequence[~Payload] + ids : typing.Sequence[~StorageAttachmentId] ''' - payloads_ = [Payload.from_json(o) for o in payloads or []] + ids_ = [StorageAttachmentId.from_json(o) for o in ids or []] # Validate arguments against known Juju API types. - if payloads_ is not None and not isinstance(payloads_, (bytes, str, list)): - raise Exception("Expected payloads_ to be a Sequence, received: {}".format(type(payloads_))) + if ids_ is not None and not isinstance(ids_, (bytes, str, list)): + raise Exception("Expected ids_ to be a Sequence, received: {}".format(type(ids_))) - self.payloads = payloads_ + self.ids = ids_ self.unknown_fields = unknown_fields -class UndertakerModelInfo(Type): - _toSchema = {'destroy_timeout': 'destroy-timeout', 'force_destroyed': 'force-destroyed', 'global_name': 'global-name', 'is_system': 'is-system', 'life': 'life', 'name': 'name', 'uuid': 'uuid'} - _toPy = {'destroy-timeout': 'destroy_timeout', 'force-destroyed': 'force_destroyed', 'global-name': 'global_name', 'is-system': 'is_system', 'life': 'life', 'name': 'name', 'uuid': 'uuid'} - def __init__(self, destroy_timeout=None, force_destroyed=None, global_name=None, is_system=None, life=None, name=None, uuid=None, **unknown_fields): +class StorageConstraints(Type): + _toSchema = {'count': 'count', 'pool': 'pool', 'size': 'size'} + _toPy = {'count': 'count', 'pool': 'pool', 'size': 'size'} + def __init__(self, count=None, pool=None, size=None, **unknown_fields): ''' - destroy_timeout : int - force_destroyed : bool - global_name : str - is_system : bool - life : str - name : str - uuid : str + count : int + pool : str + size : int ''' - destroy_timeout_ = destroy_timeout - force_destroyed_ = force_destroyed - global_name_ = global_name - is_system_ = is_system - life_ = life - name_ = name - uuid_ = uuid + count_ = count + pool_ = pool + size_ = size # Validate arguments against known Juju API types. - if destroy_timeout_ is not None and not isinstance(destroy_timeout_, int): - raise Exception("Expected destroy_timeout_ to be a int, received: {}".format(type(destroy_timeout_))) + if count_ is not None and not isinstance(count_, int): + raise Exception("Expected count_ to be a int, received: {}".format(type(count_))) + + if pool_ is not None and not isinstance(pool_, (bytes, str)): + raise Exception("Expected pool_ to be a str, received: {}".format(type(pool_))) + + if size_ is not None and not isinstance(size_, int): + raise Exception("Expected size_ to be a int, received: {}".format(type(size_))) - if force_destroyed_ is not None and not isinstance(force_destroyed_, bool): - raise Exception("Expected force_destroyed_ to be a bool, received: {}".format(type(force_destroyed_))) + self.count = count_ + self.pool = pool_ + self.size = size_ + self.unknown_fields = unknown_fields - if global_name_ is not None and not isinstance(global_name_, (bytes, str)): - raise Exception("Expected global_name_ to be a str, received: {}".format(type(global_name_))) - if is_system_ is not None and not isinstance(is_system_, bool): - raise Exception("Expected is_system_ to be a bool, received: {}".format(type(is_system_))) - if life_ is not None and not isinstance(life_, (bytes, str)): - raise Exception("Expected life_ to be a str, received: {}".format(type(life_))) +class StorageDetachmentParams(Type): + _toSchema = {'force': 'force', 'ids': 'ids', 'max_wait': 'max-wait'} + _toPy = {'force': 'force', 'ids': 'ids', 'max-wait': 'max_wait'} + def __init__(self, force=None, ids=None, max_wait=None, **unknown_fields): + ''' + force : bool + ids : StorageAttachmentIds + max_wait : int + ''' + force_ = force + ids_ = StorageAttachmentIds.from_json(ids) if ids else None + max_wait_ = max_wait - if name_ is not None and not isinstance(name_, (bytes, str)): - raise Exception("Expected name_ to be a str, received: {}".format(type(name_))) + # Validate arguments against known Juju API types. + if force_ is not None and not isinstance(force_, bool): + raise Exception("Expected force_ to be a bool, received: {}".format(type(force_))) - if uuid_ is not None and not isinstance(uuid_, (bytes, str)): - raise Exception("Expected uuid_ to be a str, received: {}".format(type(uuid_))) + if ids_ is not None and not isinstance(ids_, (dict, StorageAttachmentIds)): + raise Exception("Expected ids_ to be a StorageAttachmentIds, received: {}".format(type(ids_))) - self.destroy_timeout = destroy_timeout_ - self.force_destroyed = force_destroyed_ - self.global_name = global_name_ - self.is_system = is_system_ - self.life = life_ - self.name = name_ - self.uuid = uuid_ + if max_wait_ is not None and not isinstance(max_wait_, int): + raise Exception("Expected max_wait_ to be a int, received: {}".format(type(max_wait_))) + + self.force = force_ + self.ids = ids_ + self.max_wait = max_wait_ self.unknown_fields = unknown_fields -class UndertakerModelInfoResult(Type): - _toSchema = {'error': 'error', 'result': 'result'} - _toPy = {'error': 'error', 'result': 'result'} - def __init__(self, error=None, result=None, **unknown_fields): - ''' - error : Error - result : UndertakerModelInfo - ''' - error_ = Error.from_json(error) if error else None - result_ = UndertakerModelInfo.from_json(result) if result else None +class StorageDetails(Type): + _toSchema = {'attachments': 'attachments', 'kind': 'kind', 'life': 'life', 'owner_tag': 'owner-tag', 'persistent': 'persistent', 'status': 'status', 'storage_tag': 'storage-tag'} + _toPy = {'attachments': 'attachments', 'kind': 'kind', 'life': 'life', 'owner-tag': 'owner_tag', 'persistent': 'persistent', 'status': 'status', 'storage-tag': 'storage_tag'} + def __init__(self, attachments=None, kind=None, life=None, owner_tag=None, persistent=None, status=None, storage_tag=None, **unknown_fields): + ''' + attachments : typing.Mapping[str, ~StorageAttachmentDetails] + kind : int + life : str + owner_tag : str + persistent : bool + status : EntityStatus + storage_tag : str + ''' + attachments_ = {k: StorageAttachmentDetails.from_json(v) for k, v in (attachments or dict()).items()} + kind_ = kind + life_ = life + owner_tag_ = owner_tag + persistent_ = persistent + status_ = EntityStatus.from_json(status) if status else None + storage_tag_ = storage_tag + + # Validate arguments against known Juju API types. + if attachments_ is not None and not isinstance(attachments_, dict): + raise Exception("Expected attachments_ to be a Mapping, received: {}".format(type(attachments_))) + + if kind_ is not None and not isinstance(kind_, int): + raise Exception("Expected kind_ to be a int, received: {}".format(type(kind_))) + + if life_ is not None and not isinstance(life_, (bytes, str)): + raise Exception("Expected life_ to be a str, received: {}".format(type(life_))) + + if owner_tag_ is not None and not isinstance(owner_tag_, (bytes, str)): + raise Exception("Expected owner_tag_ to be a str, received: {}".format(type(owner_tag_))) - # Validate arguments against known Juju API types. - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) + if persistent_ is not None and not isinstance(persistent_, bool): + raise Exception("Expected persistent_ to be a bool, received: {}".format(type(persistent_))) - if result_ is not None and not isinstance(result_, (dict, UndertakerModelInfo)): - raise Exception("Expected result_ to be a UndertakerModelInfo, received: {}".format(type(result_))) + if status_ is not None and not isinstance(status_, (dict, EntityStatus)): + raise Exception("Expected status_ to be a EntityStatus, received: {}".format(type(status_))) - self.error = error_ - self.result = result_ + if storage_tag_ is not None and not isinstance(storage_tag_, (bytes, str)): + raise Exception("Expected storage_tag_ to be a str, received: {}".format(type(storage_tag_))) + + self.attachments = attachments_ + self.kind = kind_ + self.life = life_ + self.owner_tag = owner_tag_ + self.persistent = persistent_ + self.status = status_ + self.storage_tag = storage_tag_ self.unknown_fields = unknown_fields -class UnitInfoResult(Type): +class StorageDetailsListResult(Type): _toSchema = {'error': 'error', 'result': 'result'} _toPy = {'error': 'error', 'result': 'result'} def __init__(self, error=None, result=None, **unknown_fields): ''' error : Error - result : UnitResult + result : typing.Sequence[~StorageDetails] ''' error_ = Error.from_json(error) if error else None - result_ = UnitResult.from_json(result) if result else None + result_ = [StorageDetails.from_json(o) for o in result or []] # Validate arguments against known Juju API types. if error_ is not None and not isinstance(error_, (dict, Error)): raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - if result_ is not None and not isinstance(result_, (dict, UnitResult)): - raise Exception("Expected result_ to be a UnitResult, received: {}".format(type(result_))) + if result_ is not None and not isinstance(result_, (bytes, str, list)): + raise Exception("Expected result_ to be a Sequence, received: {}".format(type(result_))) self.error = error_ self.result = result_ @@ -25234,14 +13913,14 @@ def __init__(self, error=None, result=None, **unknown_fields): -class UnitInfoResults(Type): +class StorageDetailsListResults(Type): _toSchema = {'results': 'results'} _toPy = {'results': 'results'} def __init__(self, results=None, **unknown_fields): ''' - results : typing.Sequence[~UnitInfoResult] + results : typing.Sequence[~StorageDetailsListResult] ''' - results_ = [UnitInfoResult.from_json(o) for o in results or []] + results_ = [StorageDetailsListResult.from_json(o) for o in results or []] # Validate arguments against known Juju API types. if results_ is not None and not isinstance(results_, (bytes, str, list)): @@ -25252,50 +13931,38 @@ def __init__(self, results=None, **unknown_fields): -class UnitRefreshResult(Type): - _toSchema = {'error': 'Error', 'life': 'Life', 'provider_id': 'provider-id', 'resolved': 'Resolved'} - _toPy = {'Error': 'error', 'Life': 'life', 'Resolved': 'resolved', 'provider-id': 'provider_id'} - def __init__(self, error=None, life=None, resolved=None, provider_id=None, **unknown_fields): +class StorageDetailsResult(Type): + _toSchema = {'error': 'error', 'result': 'result'} + _toPy = {'error': 'error', 'result': 'result'} + def __init__(self, error=None, result=None, **unknown_fields): ''' error : Error - life : str - resolved : str - provider_id : str + result : StorageDetails ''' error_ = Error.from_json(error) if error else None - life_ = life - resolved_ = resolved - provider_id_ = provider_id + result_ = StorageDetails.from_json(result) if result else None # Validate arguments against known Juju API types. if error_ is not None and not isinstance(error_, (dict, Error)): raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - if life_ is not None and not isinstance(life_, (bytes, str)): - raise Exception("Expected life_ to be a str, received: {}".format(type(life_))) - - if resolved_ is not None and not isinstance(resolved_, (bytes, str)): - raise Exception("Expected resolved_ to be a str, received: {}".format(type(resolved_))) - - if provider_id_ is not None and not isinstance(provider_id_, (bytes, str)): - raise Exception("Expected provider_id_ to be a str, received: {}".format(type(provider_id_))) + if result_ is not None and not isinstance(result_, (dict, StorageDetails)): + raise Exception("Expected result_ to be a StorageDetails, received: {}".format(type(result_))) self.error = error_ - self.life = life_ - self.resolved = resolved_ - self.provider_id = provider_id_ + self.result = result_ self.unknown_fields = unknown_fields -class UnitRefreshResults(Type): - _toSchema = {'results': 'Results'} - _toPy = {'Results': 'results'} +class StorageDetailsResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} def __init__(self, results=None, **unknown_fields): ''' - results : typing.Sequence[~UnitRefreshResult] + results : typing.Sequence[~StorageDetailsResult] ''' - results_ = [UnitRefreshResult.from_json(o) for o in results or []] + results_ = [StorageDetailsResult.from_json(o) for o in results or []] # Validate arguments against known Juju API types. if results_ is not None and not isinstance(results_, (bytes, str, list)): @@ -25306,506 +13973,295 @@ def __init__(self, results=None, **unknown_fields): -class UnitResourceResult(Type): - _toSchema = {'error': 'error', 'errorresult': 'ErrorResult', 'resource': 'resource'} - _toPy = {'ErrorResult': 'errorresult', 'error': 'error', 'resource': 'resource'} - def __init__(self, errorresult=None, error=None, resource=None, **unknown_fields): - ''' - errorresult : ErrorResult - error : Error - resource : Resource +class StorageFilter(Type): + _toSchema = {} + _toPy = {} + def __init__(self, **unknown_fields): ''' - errorresult_ = ErrorResult.from_json(errorresult) if errorresult else None - error_ = Error.from_json(error) if error else None - resource_ = Resource.from_json(resource) if resource else None - - # Validate arguments against known Juju API types. - if errorresult_ is not None and not isinstance(errorresult_, (dict, ErrorResult)): - raise Exception("Expected errorresult_ to be a ErrorResult, received: {}".format(type(errorresult_))) - - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - - if resource_ is not None and not isinstance(resource_, (dict, Resource)): - raise Exception("Expected resource_ to be a Resource, received: {}".format(type(resource_))) - - self.errorresult = errorresult_ - self.error = error_ - self.resource = resource_ - self.unknown_fields = unknown_fields - - -class UnitResources(Type): - _toSchema = {'download_progress': 'download-progress', 'entity': 'Entity', 'resources': 'resources', 'tag': 'tag'} - _toPy = {'Entity': 'entity', 'download-progress': 'download_progress', 'resources': 'resources', 'tag': 'tag'} - def __init__(self, entity=None, download_progress=None, resources=None, tag=None, **unknown_fields): - ''' - entity : Entity - download_progress : typing.Mapping[str, int] - resources : typing.Sequence[~Resource] - tag : str ''' - entity_ = Entity.from_json(entity) if entity else None - download_progress_ = download_progress - resources_ = [Resource.from_json(o) for o in resources or []] - tag_ = tag - - # Validate arguments against known Juju API types. - if entity_ is not None and not isinstance(entity_, (dict, Entity)): - raise Exception("Expected entity_ to be a Entity, received: {}".format(type(entity_))) - - if download_progress_ is not None and not isinstance(download_progress_, dict): - raise Exception("Expected download_progress_ to be a Mapping, received: {}".format(type(download_progress_))) - - if resources_ is not None and not isinstance(resources_, (bytes, str, list)): - raise Exception("Expected resources_ to be a Sequence, received: {}".format(type(resources_))) - - if tag_ is not None and not isinstance(tag_, (bytes, str)): - raise Exception("Expected tag_ to be a str, received: {}".format(type(tag_))) - - self.entity = entity_ - self.download_progress = download_progress_ - self.resources = resources_ - self.tag = tag_ self.unknown_fields = unknown_fields -class UnitResourcesResult(Type): - _toSchema = {'error': 'error', 'errorresult': 'ErrorResult', 'resources': 'resources'} - _toPy = {'ErrorResult': 'errorresult', 'error': 'error', 'resources': 'resources'} - def __init__(self, errorresult=None, error=None, resources=None, **unknown_fields): +class StorageFilters(Type): + _toSchema = {'filters': 'filters'} + _toPy = {'filters': 'filters'} + def __init__(self, filters=None, **unknown_fields): ''' - errorresult : ErrorResult - error : Error - resources : typing.Sequence[~UnitResourceResult] + filters : typing.Sequence[~StorageFilter] ''' - errorresult_ = ErrorResult.from_json(errorresult) if errorresult else None - error_ = Error.from_json(error) if error else None - resources_ = [UnitResourceResult.from_json(o) for o in resources or []] + filters_ = [StorageFilter.from_json(o) for o in filters or []] # Validate arguments against known Juju API types. - if errorresult_ is not None and not isinstance(errorresult_, (dict, ErrorResult)): - raise Exception("Expected errorresult_ to be a ErrorResult, received: {}".format(type(errorresult_))) - - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - - if resources_ is not None and not isinstance(resources_, (bytes, str, list)): - raise Exception("Expected resources_ to be a Sequence, received: {}".format(type(resources_))) + if filters_ is not None and not isinstance(filters_, (bytes, str, list)): + raise Exception("Expected filters_ to be a Sequence, received: {}".format(type(filters_))) - self.errorresult = errorresult_ - self.error = error_ - self.resources = resources_ + self.filters = filters_ self.unknown_fields = unknown_fields -class UnitResult(Type): - _toSchema = {'address': 'address', 'charm': 'charm', 'leader': 'leader', 'life': 'life', 'machine': 'machine', 'opened_ports': 'opened-ports', 'provider_id': 'provider-id', 'public_address': 'public-address', 'relation_data': 'relation-data', 'tag': 'tag', 'workload_version': 'workload-version'} - _toPy = {'address': 'address', 'charm': 'charm', 'leader': 'leader', 'life': 'life', 'machine': 'machine', 'opened-ports': 'opened_ports', 'provider-id': 'provider_id', 'public-address': 'public_address', 'relation-data': 'relation_data', 'tag': 'tag', 'workload-version': 'workload_version'} - def __init__(self, address=None, charm=None, leader=None, life=None, machine=None, opened_ports=None, provider_id=None, public_address=None, relation_data=None, tag=None, workload_version=None, **unknown_fields): +class StoragePool(Type): + _toSchema = {'attrs': 'attrs', 'name': 'name', 'provider': 'provider'} + _toPy = {'attrs': 'attrs', 'name': 'name', 'provider': 'provider'} + def __init__(self, attrs=None, name=None, provider=None, **unknown_fields): ''' - address : str - charm : str - leader : bool - life : str - machine : str - opened_ports : typing.Sequence[str] - provider_id : str - public_address : str - relation_data : typing.Sequence[~EndpointRelationData] - tag : str - workload_version : str + attrs : typing.Mapping[str, typing.Any] + name : str + provider : str ''' - address_ = address - charm_ = charm - leader_ = leader - life_ = life - machine_ = machine - opened_ports_ = opened_ports - provider_id_ = provider_id - public_address_ = public_address - relation_data_ = [EndpointRelationData.from_json(o) for o in relation_data or []] - tag_ = tag - workload_version_ = workload_version + attrs_ = attrs + name_ = name + provider_ = provider # Validate arguments against known Juju API types. - if address_ is not None and not isinstance(address_, (bytes, str)): - raise Exception("Expected address_ to be a str, received: {}".format(type(address_))) - - if charm_ is not None and not isinstance(charm_, (bytes, str)): - raise Exception("Expected charm_ to be a str, received: {}".format(type(charm_))) - - if leader_ is not None and not isinstance(leader_, bool): - raise Exception("Expected leader_ to be a bool, received: {}".format(type(leader_))) - - if life_ is not None and not isinstance(life_, (bytes, str)): - raise Exception("Expected life_ to be a str, received: {}".format(type(life_))) - - if machine_ is not None and not isinstance(machine_, (bytes, str)): - raise Exception("Expected machine_ to be a str, received: {}".format(type(machine_))) - - if opened_ports_ is not None and not isinstance(opened_ports_, (bytes, str, list)): - raise Exception("Expected opened_ports_ to be a Sequence, received: {}".format(type(opened_ports_))) - - if provider_id_ is not None and not isinstance(provider_id_, (bytes, str)): - raise Exception("Expected provider_id_ to be a str, received: {}".format(type(provider_id_))) - - if public_address_ is not None and not isinstance(public_address_, (bytes, str)): - raise Exception("Expected public_address_ to be a str, received: {}".format(type(public_address_))) - - if relation_data_ is not None and not isinstance(relation_data_, (bytes, str, list)): - raise Exception("Expected relation_data_ to be a Sequence, received: {}".format(type(relation_data_))) + if attrs_ is not None and not isinstance(attrs_, dict): + raise Exception("Expected attrs_ to be a Mapping, received: {}".format(type(attrs_))) - if tag_ is not None and not isinstance(tag_, (bytes, str)): - raise Exception("Expected tag_ to be a str, received: {}".format(type(tag_))) + if name_ is not None and not isinstance(name_, (bytes, str)): + raise Exception("Expected name_ to be a str, received: {}".format(type(name_))) - if workload_version_ is not None and not isinstance(workload_version_, (bytes, str)): - raise Exception("Expected workload_version_ to be a str, received: {}".format(type(workload_version_))) + if provider_ is not None and not isinstance(provider_, (bytes, str)): + raise Exception("Expected provider_ to be a str, received: {}".format(type(provider_))) - self.address = address_ - self.charm = charm_ - self.leader = leader_ - self.life = life_ - self.machine = machine_ - self.opened_ports = opened_ports_ - self.provider_id = provider_id_ - self.public_address = public_address_ - self.relation_data = relation_data_ - self.tag = tag_ - self.workload_version = workload_version_ + self.attrs = attrs_ + self.name = name_ + self.provider = provider_ self.unknown_fields = unknown_fields -class UnitSettings(Type): - _toSchema = {'version': 'version'} - _toPy = {'version': 'version'} - def __init__(self, version=None, **unknown_fields): +class StoragePoolArgs(Type): + _toSchema = {'pools': 'pools'} + _toPy = {'pools': 'pools'} + def __init__(self, pools=None, **unknown_fields): ''' - version : int + pools : typing.Sequence[~StoragePool] ''' - version_ = version + pools_ = [StoragePool.from_json(o) for o in pools or []] # Validate arguments against known Juju API types. - if version_ is not None and not isinstance(version_, int): - raise Exception("Expected version_ to be a int, received: {}".format(type(version_))) + if pools_ is not None and not isinstance(pools_, (bytes, str, list)): + raise Exception("Expected pools_ to be a Sequence, received: {}".format(type(pools_))) - self.version = version_ + self.pools = pools_ self.unknown_fields = unknown_fields -class UnitStateResult(Type): - _toSchema = {'charm_state': 'charm-state', 'error': 'error', 'meter_status_state': 'meter-status-state', 'relation_state': 'relation-state', 'secret_state': 'secret-state', 'storage_state': 'storage-state', 'uniter_state': 'uniter-state'} - _toPy = {'charm-state': 'charm_state', 'error': 'error', 'meter-status-state': 'meter_status_state', 'relation-state': 'relation_state', 'secret-state': 'secret_state', 'storage-state': 'storage_state', 'uniter-state': 'uniter_state'} - def __init__(self, charm_state=None, error=None, meter_status_state=None, relation_state=None, secret_state=None, storage_state=None, uniter_state=None, **unknown_fields): +class StoragePoolDeleteArg(Type): + _toSchema = {'name': 'name'} + _toPy = {'name': 'name'} + def __init__(self, name=None, **unknown_fields): ''' - charm_state : typing.Mapping[str, str] - error : Error - meter_status_state : str - relation_state : typing.Mapping[str, str] - secret_state : str - storage_state : str - uniter_state : str + name : str ''' - charm_state_ = charm_state - error_ = Error.from_json(error) if error else None - meter_status_state_ = meter_status_state - relation_state_ = relation_state - secret_state_ = secret_state - storage_state_ = storage_state - uniter_state_ = uniter_state + name_ = name # Validate arguments against known Juju API types. - if charm_state_ is not None and not isinstance(charm_state_, dict): - raise Exception("Expected charm_state_ to be a Mapping, received: {}".format(type(charm_state_))) - - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - - if meter_status_state_ is not None and not isinstance(meter_status_state_, (bytes, str)): - raise Exception("Expected meter_status_state_ to be a str, received: {}".format(type(meter_status_state_))) - - if relation_state_ is not None and not isinstance(relation_state_, dict): - raise Exception("Expected relation_state_ to be a Mapping, received: {}".format(type(relation_state_))) - - if secret_state_ is not None and not isinstance(secret_state_, (bytes, str)): - raise Exception("Expected secret_state_ to be a str, received: {}".format(type(secret_state_))) - - if storage_state_ is not None and not isinstance(storage_state_, (bytes, str)): - raise Exception("Expected storage_state_ to be a str, received: {}".format(type(storage_state_))) - - if uniter_state_ is not None and not isinstance(uniter_state_, (bytes, str)): - raise Exception("Expected uniter_state_ to be a str, received: {}".format(type(uniter_state_))) + if name_ is not None and not isinstance(name_, (bytes, str)): + raise Exception("Expected name_ to be a str, received: {}".format(type(name_))) - self.charm_state = charm_state_ - self.error = error_ - self.meter_status_state = meter_status_state_ - self.relation_state = relation_state_ - self.secret_state = secret_state_ - self.storage_state = storage_state_ - self.uniter_state = uniter_state_ + self.name = name_ self.unknown_fields = unknown_fields -class UnitStateResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None, **unknown_fields): +class StoragePoolDeleteArgs(Type): + _toSchema = {'pools': 'pools'} + _toPy = {'pools': 'pools'} + def __init__(self, pools=None, **unknown_fields): ''' - results : typing.Sequence[~UnitStateResult] + pools : typing.Sequence[~StoragePoolDeleteArg] ''' - results_ = [UnitStateResult.from_json(o) for o in results or []] + pools_ = [StoragePoolDeleteArg.from_json(o) for o in pools or []] # Validate arguments against known Juju API types. - if results_ is not None and not isinstance(results_, (bytes, str, list)): - raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) + if pools_ is not None and not isinstance(pools_, (bytes, str, list)): + raise Exception("Expected pools_ to be a Sequence, received: {}".format(type(pools_))) - self.results = results_ + self.pools = pools_ self.unknown_fields = unknown_fields -class UnitStatus(Type): - _toSchema = {'address': 'address', 'agent_status': 'agent-status', 'charm': 'charm', 'leader': 'leader', 'machine': 'machine', 'opened_ports': 'opened-ports', 'provider_id': 'provider-id', 'public_address': 'public-address', 'subordinates': 'subordinates', 'workload_status': 'workload-status', 'workload_version': 'workload-version'} - _toPy = {'address': 'address', 'agent-status': 'agent_status', 'charm': 'charm', 'leader': 'leader', 'machine': 'machine', 'opened-ports': 'opened_ports', 'provider-id': 'provider_id', 'public-address': 'public_address', 'subordinates': 'subordinates', 'workload-status': 'workload_status', 'workload-version': 'workload_version'} - def __init__(self, address=None, agent_status=None, charm=None, leader=None, machine=None, opened_ports=None, provider_id=None, public_address=None, subordinates=None, workload_status=None, workload_version=None, **unknown_fields): +class StoragePoolFilter(Type): + _toSchema = {'names': 'names', 'providers': 'providers'} + _toPy = {'names': 'names', 'providers': 'providers'} + def __init__(self, names=None, providers=None, **unknown_fields): ''' - address : str - agent_status : DetailedStatus - charm : str - leader : bool - machine : str - opened_ports : typing.Sequence[str] - provider_id : str - public_address : str - subordinates : typing.Mapping[str, ~UnitStatus] - workload_status : DetailedStatus - workload_version : str + names : typing.Sequence[str] + providers : typing.Sequence[str] ''' - address_ = address - agent_status_ = DetailedStatus.from_json(agent_status) if agent_status else None - charm_ = charm - leader_ = leader - machine_ = machine - opened_ports_ = opened_ports - provider_id_ = provider_id - public_address_ = public_address - subordinates_ = {k: UnitStatus.from_json(v) for k, v in (subordinates or dict()).items()} - workload_status_ = DetailedStatus.from_json(workload_status) if workload_status else None - workload_version_ = workload_version + names_ = names + providers_ = providers # Validate arguments against known Juju API types. - if address_ is not None and not isinstance(address_, (bytes, str)): - raise Exception("Expected address_ to be a str, received: {}".format(type(address_))) - - if agent_status_ is not None and not isinstance(agent_status_, (dict, DetailedStatus)): - raise Exception("Expected agent_status_ to be a DetailedStatus, received: {}".format(type(agent_status_))) - - if charm_ is not None and not isinstance(charm_, (bytes, str)): - raise Exception("Expected charm_ to be a str, received: {}".format(type(charm_))) - - if leader_ is not None and not isinstance(leader_, bool): - raise Exception("Expected leader_ to be a bool, received: {}".format(type(leader_))) - - if machine_ is not None and not isinstance(machine_, (bytes, str)): - raise Exception("Expected machine_ to be a str, received: {}".format(type(machine_))) + if names_ is not None and not isinstance(names_, (bytes, str, list)): + raise Exception("Expected names_ to be a Sequence, received: {}".format(type(names_))) - if opened_ports_ is not None and not isinstance(opened_ports_, (bytes, str, list)): - raise Exception("Expected opened_ports_ to be a Sequence, received: {}".format(type(opened_ports_))) + if providers_ is not None and not isinstance(providers_, (bytes, str, list)): + raise Exception("Expected providers_ to be a Sequence, received: {}".format(type(providers_))) - if provider_id_ is not None and not isinstance(provider_id_, (bytes, str)): - raise Exception("Expected provider_id_ to be a str, received: {}".format(type(provider_id_))) + self.names = names_ + self.providers = providers_ + self.unknown_fields = unknown_fields - if public_address_ is not None and not isinstance(public_address_, (bytes, str)): - raise Exception("Expected public_address_ to be a str, received: {}".format(type(public_address_))) - if subordinates_ is not None and not isinstance(subordinates_, dict): - raise Exception("Expected subordinates_ to be a Mapping, received: {}".format(type(subordinates_))) - if workload_status_ is not None and not isinstance(workload_status_, (dict, DetailedStatus)): - raise Exception("Expected workload_status_ to be a DetailedStatus, received: {}".format(type(workload_status_))) +class StoragePoolFilters(Type): + _toSchema = {'filters': 'filters'} + _toPy = {'filters': 'filters'} + def __init__(self, filters=None, **unknown_fields): + ''' + filters : typing.Sequence[~StoragePoolFilter] + ''' + filters_ = [StoragePoolFilter.from_json(o) for o in filters or []] - if workload_version_ is not None and not isinstance(workload_version_, (bytes, str)): - raise Exception("Expected workload_version_ to be a str, received: {}".format(type(workload_version_))) + # Validate arguments against known Juju API types. + if filters_ is not None and not isinstance(filters_, (bytes, str, list)): + raise Exception("Expected filters_ to be a Sequence, received: {}".format(type(filters_))) - self.address = address_ - self.agent_status = agent_status_ - self.charm = charm_ - self.leader = leader_ - self.machine = machine_ - self.opened_ports = opened_ports_ - self.provider_id = provider_id_ - self.public_address = public_address_ - self.subordinates = subordinates_ - self.workload_status = workload_status_ - self.workload_version = workload_version_ + self.filters = filters_ self.unknown_fields = unknown_fields -class UnitsResolved(Type): - _toSchema = {'all_': 'all', 'retry': 'retry', 'tags': 'tags'} - _toPy = {'all': 'all_', 'retry': 'retry', 'tags': 'tags'} - def __init__(self, all_=None, retry=None, tags=None, **unknown_fields): +class StoragePoolsResult(Type): + _toSchema = {'error': 'error', 'storage_pools': 'storage-pools'} + _toPy = {'error': 'error', 'storage-pools': 'storage_pools'} + def __init__(self, error=None, storage_pools=None, **unknown_fields): ''' - all_ : bool - retry : bool - tags : Entities + error : Error + storage_pools : typing.Sequence[~StoragePool] ''' - all__ = all_ - retry_ = retry - tags_ = Entities.from_json(tags) if tags else None + error_ = Error.from_json(error) if error else None + storage_pools_ = [StoragePool.from_json(o) for o in storage_pools or []] # Validate arguments against known Juju API types. - if all__ is not None and not isinstance(all__, bool): - raise Exception("Expected all__ to be a bool, received: {}".format(type(all__))) - - if retry_ is not None and not isinstance(retry_, bool): - raise Exception("Expected retry_ to be a bool, received: {}".format(type(retry_))) + if error_ is not None and not isinstance(error_, (dict, Error)): + raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - if tags_ is not None and not isinstance(tags_, (dict, Entities)): - raise Exception("Expected tags_ to be a Entities, received: {}".format(type(tags_))) + if storage_pools_ is not None and not isinstance(storage_pools_, (bytes, str, list)): + raise Exception("Expected storage_pools_ to be a Sequence, received: {}".format(type(storage_pools_))) - self.all_ = all__ - self.retry = retry_ - self.tags = tags_ + self.error = error_ + self.storage_pools = storage_pools_ self.unknown_fields = unknown_fields -class UnsetModelDefaults(Type): - _toSchema = {'keys': 'keys'} - _toPy = {'keys': 'keys'} - def __init__(self, keys=None, **unknown_fields): +class StoragePoolsResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} + def __init__(self, results=None, **unknown_fields): ''' - keys : typing.Sequence[~ModelUnsetKeys] + results : typing.Sequence[~StoragePoolsResult] ''' - keys_ = [ModelUnsetKeys.from_json(o) for o in keys or []] + results_ = [StoragePoolsResult.from_json(o) for o in results or []] # Validate arguments against known Juju API types. - if keys_ is not None and not isinstance(keys_, (bytes, str, list)): - raise Exception("Expected keys_ to be a Sequence, received: {}".format(type(keys_))) + if results_ is not None and not isinstance(results_, (bytes, str, list)): + raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) - self.keys = keys_ + self.results = results_ self.unknown_fields = unknown_fields -class UpdateApplicationServiceArg(Type): - _toSchema = {'addresses': 'addresses', 'application_tag': 'application-tag', 'generation': 'generation', 'provider_id': 'provider-id', 'scale': 'scale'} - _toPy = {'addresses': 'addresses', 'application-tag': 'application_tag', 'generation': 'generation', 'provider-id': 'provider_id', 'scale': 'scale'} - def __init__(self, addresses=None, application_tag=None, generation=None, provider_id=None, scale=None, **unknown_fields): +class StoragesAddParams(Type): + _toSchema = {'storages': 'storages'} + _toPy = {'storages': 'storages'} + def __init__(self, storages=None, **unknown_fields): ''' - addresses : typing.Sequence[~Address] - application_tag : str - generation : int - provider_id : str - scale : int + storages : typing.Sequence[~StorageAddParams] ''' - addresses_ = [Address.from_json(o) for o in addresses or []] - application_tag_ = application_tag - generation_ = generation - provider_id_ = provider_id - scale_ = scale + storages_ = [StorageAddParams.from_json(o) for o in storages or []] # Validate arguments against known Juju API types. - if addresses_ is not None and not isinstance(addresses_, (bytes, str, list)): - raise Exception("Expected addresses_ to be a Sequence, received: {}".format(type(addresses_))) - - if application_tag_ is not None and not isinstance(application_tag_, (bytes, str)): - raise Exception("Expected application_tag_ to be a str, received: {}".format(type(application_tag_))) - - if generation_ is not None and not isinstance(generation_, int): - raise Exception("Expected generation_ to be a int, received: {}".format(type(generation_))) - - if provider_id_ is not None and not isinstance(provider_id_, (bytes, str)): - raise Exception("Expected provider_id_ to be a str, received: {}".format(type(provider_id_))) - - if scale_ is not None and not isinstance(scale_, int): - raise Exception("Expected scale_ to be a int, received: {}".format(type(scale_))) + if storages_ is not None and not isinstance(storages_, (bytes, str, list)): + raise Exception("Expected storages_ to be a Sequence, received: {}".format(type(storages_))) - self.addresses = addresses_ - self.application_tag = application_tag_ - self.generation = generation_ - self.provider_id = provider_id_ - self.scale = scale_ + self.storages = storages_ self.unknown_fields = unknown_fields -class UpdateApplicationServiceArgs(Type): - _toSchema = {'args': 'args'} - _toPy = {'args': 'args'} - def __init__(self, args=None, **unknown_fields): +class StringResult(Type): + _toSchema = {'error': 'error', 'result': 'result'} + _toPy = {'error': 'error', 'result': 'result'} + def __init__(self, error=None, result=None, **unknown_fields): ''' - args : typing.Sequence[~UpdateApplicationServiceArg] + error : Error + result : str ''' - args_ = [UpdateApplicationServiceArg.from_json(o) for o in args or []] + error_ = Error.from_json(error) if error else None + result_ = result # Validate arguments against known Juju API types. - if args_ is not None and not isinstance(args_, (bytes, str, list)): - raise Exception("Expected args_ to be a Sequence, received: {}".format(type(args_))) + if error_ is not None and not isinstance(error_, (dict, Error)): + raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - self.args = args_ + if result_ is not None and not isinstance(result_, (bytes, str)): + raise Exception("Expected result_ to be a str, received: {}".format(type(result_))) + + self.error = error_ + self.result = result_ self.unknown_fields = unknown_fields -class UpdateApplicationUnitArgs(Type): - _toSchema = {'args': 'args'} - _toPy = {'args': 'args'} - def __init__(self, args=None, **unknown_fields): +class StringResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} + def __init__(self, results=None, **unknown_fields): ''' - args : typing.Sequence[~UpdateApplicationUnits] + results : typing.Sequence[~StringResult] ''' - args_ = [UpdateApplicationUnits.from_json(o) for o in args or []] + results_ = [StringResult.from_json(o) for o in results or []] # Validate arguments against known Juju API types. - if args_ is not None and not isinstance(args_, (bytes, str, list)): - raise Exception("Expected args_ to be a Sequence, received: {}".format(type(args_))) + if results_ is not None and not isinstance(results_, (bytes, str, list)): + raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) - self.args = args_ + self.results = results_ self.unknown_fields = unknown_fields -class UpdateApplicationUnitResult(Type): - _toSchema = {'error': 'error', 'info': 'info'} - _toPy = {'error': 'error', 'info': 'info'} - def __init__(self, error=None, info=None, **unknown_fields): +class StringsResult(Type): + _toSchema = {'error': 'error', 'result': 'result'} + _toPy = {'error': 'error', 'result': 'result'} + def __init__(self, error=None, result=None, **unknown_fields): ''' error : Error - info : UpdateApplicationUnitsInfo + result : typing.Sequence[str] ''' error_ = Error.from_json(error) if error else None - info_ = UpdateApplicationUnitsInfo.from_json(info) if info else None + result_ = result # Validate arguments against known Juju API types. if error_ is not None and not isinstance(error_, (dict, Error)): raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - if info_ is not None and not isinstance(info_, (dict, UpdateApplicationUnitsInfo)): - raise Exception("Expected info_ to be a UpdateApplicationUnitsInfo, received: {}".format(type(info_))) + if result_ is not None and not isinstance(result_, (bytes, str, list)): + raise Exception("Expected result_ to be a Sequence, received: {}".format(type(result_))) self.error = error_ - self.info = info_ + self.result = result_ self.unknown_fields = unknown_fields -class UpdateApplicationUnitResults(Type): +class StringsResults(Type): _toSchema = {'results': 'results'} _toPy = {'results': 'results'} def __init__(self, results=None, **unknown_fields): ''' - results : typing.Sequence[~UpdateApplicationUnitResult] + results : typing.Sequence[~StringsResult] ''' - results_ = [UpdateApplicationUnitResult.from_json(o) for o in results or []] + results_ = [StringsResult.from_json(o) for o in results or []] # Validate arguments against known Juju API types. if results_ is not None and not isinstance(results_, (bytes, str, list)): @@ -25816,290 +14272,254 @@ def __init__(self, results=None, **unknown_fields): -class UpdateApplicationUnits(Type): - _toSchema = {'application_tag': 'application-tag', 'generation': 'generation', 'scale': 'scale', 'status': 'status', 'units': 'units'} - _toPy = {'application-tag': 'application_tag', 'generation': 'generation', 'scale': 'scale', 'status': 'status', 'units': 'units'} - def __init__(self, application_tag=None, generation=None, scale=None, status=None, units=None, **unknown_fields): +class StringsWatchResult(Type): + _toSchema = {'changes': 'changes', 'error': 'error', 'watcher_id': 'watcher-id'} + _toPy = {'changes': 'changes', 'error': 'error', 'watcher-id': 'watcher_id'} + def __init__(self, changes=None, error=None, watcher_id=None, **unknown_fields): ''' - application_tag : str - generation : int - scale : int - status : EntityStatus - units : typing.Sequence[~ApplicationUnitParams] + changes : typing.Sequence[str] + error : Error + watcher_id : str ''' - application_tag_ = application_tag - generation_ = generation - scale_ = scale - status_ = EntityStatus.from_json(status) if status else None - units_ = [ApplicationUnitParams.from_json(o) for o in units or []] + changes_ = changes + error_ = Error.from_json(error) if error else None + watcher_id_ = watcher_id # Validate arguments against known Juju API types. - if application_tag_ is not None and not isinstance(application_tag_, (bytes, str)): - raise Exception("Expected application_tag_ to be a str, received: {}".format(type(application_tag_))) - - if generation_ is not None and not isinstance(generation_, int): - raise Exception("Expected generation_ to be a int, received: {}".format(type(generation_))) - - if scale_ is not None and not isinstance(scale_, int): - raise Exception("Expected scale_ to be a int, received: {}".format(type(scale_))) - - if status_ is not None and not isinstance(status_, (dict, EntityStatus)): - raise Exception("Expected status_ to be a EntityStatus, received: {}".format(type(status_))) - - if units_ is not None and not isinstance(units_, (bytes, str, list)): - raise Exception("Expected units_ to be a Sequence, received: {}".format(type(units_))) - - self.application_tag = application_tag_ - self.generation = generation_ - self.scale = scale_ - self.status = status_ - self.units = units_ - self.unknown_fields = unknown_fields - - + if changes_ is not None and not isinstance(changes_, (bytes, str, list)): + raise Exception("Expected changes_ to be a Sequence, received: {}".format(type(changes_))) -class UpdateApplicationUnitsInfo(Type): - _toSchema = {'units': 'units'} - _toPy = {'units': 'units'} - def __init__(self, units=None, **unknown_fields): - ''' - units : typing.Sequence[~ApplicationUnitInfo] - ''' - units_ = [ApplicationUnitInfo.from_json(o) for o in units or []] + if error_ is not None and not isinstance(error_, (dict, Error)): + raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - # Validate arguments against known Juju API types. - if units_ is not None and not isinstance(units_, (bytes, str, list)): - raise Exception("Expected units_ to be a Sequence, received: {}".format(type(units_))) + if watcher_id_ is not None and not isinstance(watcher_id_, (bytes, str)): + raise Exception("Expected watcher_id_ to be a str, received: {}".format(type(watcher_id_))) - self.units = units_ + self.changes = changes_ + self.error = error_ + self.watcher_id = watcher_id_ self.unknown_fields = unknown_fields -class UpdateBehavior(Type): - _toSchema = {'enable_os_refresh_update': 'enable-os-refresh-update', 'enable_os_upgrade': 'enable-os-upgrade'} - _toPy = {'enable-os-refresh-update': 'enable_os_refresh_update', 'enable-os-upgrade': 'enable_os_upgrade'} - def __init__(self, enable_os_refresh_update=None, enable_os_upgrade=None, **unknown_fields): +class StringsWatchResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} + def __init__(self, results=None, **unknown_fields): ''' - enable_os_refresh_update : bool - enable_os_upgrade : bool + results : typing.Sequence[~StringsWatchResult] ''' - enable_os_refresh_update_ = enable_os_refresh_update - enable_os_upgrade_ = enable_os_upgrade + results_ = [StringsWatchResult.from_json(o) for o in results or []] # Validate arguments against known Juju API types. - if enable_os_refresh_update_ is not None and not isinstance(enable_os_refresh_update_, bool): - raise Exception("Expected enable_os_refresh_update_ to be a bool, received: {}".format(type(enable_os_refresh_update_))) - - if enable_os_upgrade_ is not None and not isinstance(enable_os_upgrade_, bool): - raise Exception("Expected enable_os_upgrade_ to be a bool, received: {}".format(type(enable_os_upgrade_))) + if results_ is not None and not isinstance(results_, (bytes, str, list)): + raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) - self.enable_os_refresh_update = enable_os_refresh_update_ - self.enable_os_upgrade = enable_os_upgrade_ + self.results = results_ self.unknown_fields = unknown_fields -class UpdateChannelArg(Type): - _toSchema = {'channel': 'channel', 'force': 'force', 'tag': 'tag'} - _toPy = {'channel': 'channel', 'force': 'force', 'tag': 'tag'} - def __init__(self, channel=None, force=None, tag=None, **unknown_fields): +class Subnet(Type): + _toSchema = {'cidr': 'cidr', 'life': 'life', 'provider_id': 'provider-id', 'provider_network_id': 'provider-network-id', 'provider_space_id': 'provider-space-id', 'space_tag': 'space-tag', 'status': 'status', 'vlan_tag': 'vlan-tag', 'zones': 'zones'} + _toPy = {'cidr': 'cidr', 'life': 'life', 'provider-id': 'provider_id', 'provider-network-id': 'provider_network_id', 'provider-space-id': 'provider_space_id', 'space-tag': 'space_tag', 'status': 'status', 'vlan-tag': 'vlan_tag', 'zones': 'zones'} + def __init__(self, cidr=None, life=None, provider_id=None, provider_network_id=None, provider_space_id=None, space_tag=None, status=None, vlan_tag=None, zones=None, **unknown_fields): ''' - channel : str - force : bool - tag : Entity + cidr : str + life : str + provider_id : str + provider_network_id : str + provider_space_id : str + space_tag : str + status : str + vlan_tag : int + zones : typing.Sequence[str] ''' - channel_ = channel - force_ = force - tag_ = Entity.from_json(tag) if tag else None + cidr_ = cidr + life_ = life + provider_id_ = provider_id + provider_network_id_ = provider_network_id + provider_space_id_ = provider_space_id + space_tag_ = space_tag + status_ = status + vlan_tag_ = vlan_tag + zones_ = zones # Validate arguments against known Juju API types. - if channel_ is not None and not isinstance(channel_, (bytes, str)): - raise Exception("Expected channel_ to be a str, received: {}".format(type(channel_))) - - if force_ is not None and not isinstance(force_, bool): - raise Exception("Expected force_ to be a bool, received: {}".format(type(force_))) - - if tag_ is not None and not isinstance(tag_, (dict, Entity)): - raise Exception("Expected tag_ to be a Entity, received: {}".format(type(tag_))) - - self.channel = channel_ - self.force = force_ - self.tag = tag_ - self.unknown_fields = unknown_fields - + if cidr_ is not None and not isinstance(cidr_, (bytes, str)): + raise Exception("Expected cidr_ to be a str, received: {}".format(type(cidr_))) + if life_ is not None and not isinstance(life_, (bytes, str)): + raise Exception("Expected life_ to be a str, received: {}".format(type(life_))) -class UpdateChannelArgs(Type): - _toSchema = {'args': 'args'} - _toPy = {'args': 'args'} - def __init__(self, args=None, **unknown_fields): - ''' - args : typing.Sequence[~UpdateChannelArg] - ''' - args_ = [UpdateChannelArg.from_json(o) for o in args or []] + if provider_id_ is not None and not isinstance(provider_id_, (bytes, str)): + raise Exception("Expected provider_id_ to be a str, received: {}".format(type(provider_id_))) - # Validate arguments against known Juju API types. - if args_ is not None and not isinstance(args_, (bytes, str, list)): - raise Exception("Expected args_ to be a Sequence, received: {}".format(type(args_))) + if provider_network_id_ is not None and not isinstance(provider_network_id_, (bytes, str)): + raise Exception("Expected provider_network_id_ to be a str, received: {}".format(type(provider_network_id_))) - self.args = args_ - self.unknown_fields = unknown_fields + if provider_space_id_ is not None and not isinstance(provider_space_id_, (bytes, str)): + raise Exception("Expected provider_space_id_ to be a str, received: {}".format(type(provider_space_id_))) + if space_tag_ is not None and not isinstance(space_tag_, (bytes, str)): + raise Exception("Expected space_tag_ to be a str, received: {}".format(type(space_tag_))) + if status_ is not None and not isinstance(status_, (bytes, str)): + raise Exception("Expected status_ to be a str, received: {}".format(type(status_))) -class UpdateCloudArgs(Type): - _toSchema = {'clouds': 'clouds'} - _toPy = {'clouds': 'clouds'} - def __init__(self, clouds=None, **unknown_fields): - ''' - clouds : typing.Sequence[~AddCloudArgs] - ''' - clouds_ = [AddCloudArgs.from_json(o) for o in clouds or []] + if vlan_tag_ is not None and not isinstance(vlan_tag_, int): + raise Exception("Expected vlan_tag_ to be a int, received: {}".format(type(vlan_tag_))) - # Validate arguments against known Juju API types. - if clouds_ is not None and not isinstance(clouds_, (bytes, str, list)): - raise Exception("Expected clouds_ to be a Sequence, received: {}".format(type(clouds_))) + if zones_ is not None and not isinstance(zones_, (bytes, str, list)): + raise Exception("Expected zones_ to be a Sequence, received: {}".format(type(zones_))) - self.clouds = clouds_ + self.cidr = cidr_ + self.life = life_ + self.provider_id = provider_id_ + self.provider_network_id = provider_network_id_ + self.provider_space_id = provider_space_id_ + self.space_tag = space_tag_ + self.status = status_ + self.vlan_tag = vlan_tag_ + self.zones = zones_ self.unknown_fields = unknown_fields -class UpdateControllerForModel(Type): - _toSchema = {'info': 'info', 'model_tag': 'model-tag'} - _toPy = {'info': 'info', 'model-tag': 'model_tag'} - def __init__(self, info=None, model_tag=None, **unknown_fields): +class SubnetV2(Type): + _toSchema = {'cidr': 'cidr', 'id_': 'id', 'life': 'life', 'provider_id': 'provider-id', 'provider_network_id': 'provider-network-id', 'provider_space_id': 'provider-space-id', 'space_tag': 'space-tag', 'status': 'status', 'subnet': 'Subnet', 'vlan_tag': 'vlan-tag', 'zones': 'zones'} + _toPy = {'Subnet': 'subnet', 'cidr': 'cidr', 'id': 'id_', 'life': 'life', 'provider-id': 'provider_id', 'provider-network-id': 'provider_network_id', 'provider-space-id': 'provider_space_id', 'space-tag': 'space_tag', 'status': 'status', 'vlan-tag': 'vlan_tag', 'zones': 'zones'} + def __init__(self, subnet=None, cidr=None, id_=None, life=None, provider_id=None, provider_network_id=None, provider_space_id=None, space_tag=None, status=None, vlan_tag=None, zones=None, **unknown_fields): ''' - info : ExternalControllerInfo - model_tag : str + subnet : Subnet + cidr : str + id_ : str + life : str + provider_id : str + provider_network_id : str + provider_space_id : str + space_tag : str + status : str + vlan_tag : int + zones : typing.Sequence[str] ''' - info_ = ExternalControllerInfo.from_json(info) if info else None - model_tag_ = model_tag + subnet_ = Subnet.from_json(subnet) if subnet else None + cidr_ = cidr + id__ = id_ + life_ = life + provider_id_ = provider_id + provider_network_id_ = provider_network_id + provider_space_id_ = provider_space_id + space_tag_ = space_tag + status_ = status + vlan_tag_ = vlan_tag + zones_ = zones # Validate arguments against known Juju API types. - if info_ is not None and not isinstance(info_, (dict, ExternalControllerInfo)): - raise Exception("Expected info_ to be a ExternalControllerInfo, received: {}".format(type(info_))) - - if model_tag_ is not None and not isinstance(model_tag_, (bytes, str)): - raise Exception("Expected model_tag_ to be a str, received: {}".format(type(model_tag_))) - - self.info = info_ - self.model_tag = model_tag_ - self.unknown_fields = unknown_fields + if subnet_ is not None and not isinstance(subnet_, (dict, Subnet)): + raise Exception("Expected subnet_ to be a Subnet, received: {}".format(type(subnet_))) + if cidr_ is not None and not isinstance(cidr_, (bytes, str)): + raise Exception("Expected cidr_ to be a str, received: {}".format(type(cidr_))) + if id__ is not None and not isinstance(id__, (bytes, str)): + raise Exception("Expected id__ to be a str, received: {}".format(type(id__))) -class UpdateControllersForModelsParams(Type): - _toSchema = {'changes': 'changes'} - _toPy = {'changes': 'changes'} - def __init__(self, changes=None, **unknown_fields): - ''' - changes : typing.Sequence[~UpdateControllerForModel] - ''' - changes_ = [UpdateControllerForModel.from_json(o) for o in changes or []] + if life_ is not None and not isinstance(life_, (bytes, str)): + raise Exception("Expected life_ to be a str, received: {}".format(type(life_))) - # Validate arguments against known Juju API types. - if changes_ is not None and not isinstance(changes_, (bytes, str, list)): - raise Exception("Expected changes_ to be a Sequence, received: {}".format(type(changes_))) + if provider_id_ is not None and not isinstance(provider_id_, (bytes, str)): + raise Exception("Expected provider_id_ to be a str, received: {}".format(type(provider_id_))) - self.changes = changes_ - self.unknown_fields = unknown_fields + if provider_network_id_ is not None and not isinstance(provider_network_id_, (bytes, str)): + raise Exception("Expected provider_network_id_ to be a str, received: {}".format(type(provider_network_id_))) + if provider_space_id_ is not None and not isinstance(provider_space_id_, (bytes, str)): + raise Exception("Expected provider_space_id_ to be a str, received: {}".format(type(provider_space_id_))) + if space_tag_ is not None and not isinstance(space_tag_, (bytes, str)): + raise Exception("Expected space_tag_ to be a str, received: {}".format(type(space_tag_))) -class UpdateCredentialArgs(Type): - _toSchema = {'credentials': 'credentials', 'force': 'force'} - _toPy = {'credentials': 'credentials', 'force': 'force'} - def __init__(self, credentials=None, force=None, **unknown_fields): - ''' - credentials : typing.Sequence[~TaggedCredential] - force : bool - ''' - credentials_ = [TaggedCredential.from_json(o) for o in credentials or []] - force_ = force + if status_ is not None and not isinstance(status_, (bytes, str)): + raise Exception("Expected status_ to be a str, received: {}".format(type(status_))) - # Validate arguments against known Juju API types. - if credentials_ is not None and not isinstance(credentials_, (bytes, str, list)): - raise Exception("Expected credentials_ to be a Sequence, received: {}".format(type(credentials_))) + if vlan_tag_ is not None and not isinstance(vlan_tag_, int): + raise Exception("Expected vlan_tag_ to be a int, received: {}".format(type(vlan_tag_))) - if force_ is not None and not isinstance(force_, bool): - raise Exception("Expected force_ to be a bool, received: {}".format(type(force_))) + if zones_ is not None and not isinstance(zones_, (bytes, str, list)): + raise Exception("Expected zones_ to be a Sequence, received: {}".format(type(zones_))) - self.credentials = credentials_ - self.force = force_ + self.subnet = subnet_ + self.cidr = cidr_ + self.id_ = id__ + self.life = life_ + self.provider_id = provider_id_ + self.provider_network_id = provider_network_id_ + self.provider_space_id = provider_space_id_ + self.space_tag = space_tag_ + self.status = status_ + self.vlan_tag = vlan_tag_ + self.zones = zones_ self.unknown_fields = unknown_fields -class UpdateCredentialModelResult(Type): - _toSchema = {'errors': 'errors', 'name': 'name', 'uuid': 'uuid'} - _toPy = {'errors': 'errors', 'name': 'name', 'uuid': 'uuid'} - def __init__(self, errors=None, name=None, uuid=None, **unknown_fields): +class SubnetsFilters(Type): + _toSchema = {'space_tag': 'space-tag', 'zone': 'zone'} + _toPy = {'space-tag': 'space_tag', 'zone': 'zone'} + def __init__(self, space_tag=None, zone=None, **unknown_fields): ''' - errors : typing.Sequence[~ErrorResult] - name : str - uuid : str + space_tag : str + zone : str ''' - errors_ = [ErrorResult.from_json(o) for o in errors or []] - name_ = name - uuid_ = uuid + space_tag_ = space_tag + zone_ = zone # Validate arguments against known Juju API types. - if errors_ is not None and not isinstance(errors_, (bytes, str, list)): - raise Exception("Expected errors_ to be a Sequence, received: {}".format(type(errors_))) - - if name_ is not None and not isinstance(name_, (bytes, str)): - raise Exception("Expected name_ to be a str, received: {}".format(type(name_))) + if space_tag_ is not None and not isinstance(space_tag_, (bytes, str)): + raise Exception("Expected space_tag_ to be a str, received: {}".format(type(space_tag_))) - if uuid_ is not None and not isinstance(uuid_, (bytes, str)): - raise Exception("Expected uuid_ to be a str, received: {}".format(type(uuid_))) + if zone_ is not None and not isinstance(zone_, (bytes, str)): + raise Exception("Expected zone_ to be a str, received: {}".format(type(zone_))) - self.errors = errors_ - self.name = name_ - self.uuid = uuid_ + self.space_tag = space_tag_ + self.zone = zone_ self.unknown_fields = unknown_fields -class UpdateCredentialResult(Type): - _toSchema = {'error': 'error', 'models': 'models', 'tag': 'tag'} - _toPy = {'error': 'error', 'models': 'models', 'tag': 'tag'} - def __init__(self, error=None, models=None, tag=None, **unknown_fields): +class SubnetsResult(Type): + _toSchema = {'error': 'error', 'subnets': 'subnets'} + _toPy = {'error': 'error', 'subnets': 'subnets'} + def __init__(self, error=None, subnets=None, **unknown_fields): ''' error : Error - models : typing.Sequence[~UpdateCredentialModelResult] - tag : str + subnets : typing.Sequence[~SubnetV2] ''' error_ = Error.from_json(error) if error else None - models_ = [UpdateCredentialModelResult.from_json(o) for o in models or []] - tag_ = tag + subnets_ = [SubnetV2.from_json(o) for o in subnets or []] # Validate arguments against known Juju API types. if error_ is not None and not isinstance(error_, (dict, Error)): raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - if models_ is not None and not isinstance(models_, (bytes, str, list)): - raise Exception("Expected models_ to be a Sequence, received: {}".format(type(models_))) - - if tag_ is not None and not isinstance(tag_, (bytes, str)): - raise Exception("Expected tag_ to be a str, received: {}".format(type(tag_))) + if subnets_ is not None and not isinstance(subnets_, (bytes, str, list)): + raise Exception("Expected subnets_ to be a Sequence, received: {}".format(type(subnets_))) self.error = error_ - self.models = models_ - self.tag = tag_ + self.subnets = subnets_ self.unknown_fields = unknown_fields -class UpdateCredentialResults(Type): +class SubnetsResults(Type): _toSchema = {'results': 'results'} _toPy = {'results': 'results'} def __init__(self, results=None, **unknown_fields): ''' - results : typing.Sequence[~UpdateCredentialResult] + results : typing.Sequence[~SubnetsResult] ''' - results_ = [UpdateCredentialResult.from_json(o) for o in results or []] + results_ = [SubnetsResult.from_json(o) for o in results or []] # Validate arguments against known Juju API types. if results_ is not None and not isinstance(results_, (bytes, str, list)): @@ -26110,614 +14530,572 @@ def __init__(self, results=None, **unknown_fields): -class UpdateSecretArg(Type): - _toSchema = {'content': 'content', 'description': 'description', 'expire_time': 'expire-time', 'label': 'label', 'params': 'params', 'rotate_policy': 'rotate-policy', 'upsertsecretarg': 'UpsertSecretArg', 'uri': 'uri'} - _toPy = {'UpsertSecretArg': 'upsertsecretarg', 'content': 'content', 'description': 'description', 'expire-time': 'expire_time', 'label': 'label', 'params': 'params', 'rotate-policy': 'rotate_policy', 'uri': 'uri'} - def __init__(self, upsertsecretarg=None, content=None, description=None, expire_time=None, label=None, params=None, rotate_policy=None, uri=None, **unknown_fields): - ''' - upsertsecretarg : UpsertSecretArg - content : SecretContentParams - description : str - expire_time : str - label : str - params : typing.Mapping[str, typing.Any] - rotate_policy : str - uri : str - ''' - upsertsecretarg_ = UpsertSecretArg.from_json(upsertsecretarg) if upsertsecretarg else None - content_ = SecretContentParams.from_json(content) if content else None - description_ = description - expire_time_ = expire_time - label_ = label - params_ = params - rotate_policy_ = rotate_policy - uri_ = uri - - # Validate arguments against known Juju API types. - if upsertsecretarg_ is not None and not isinstance(upsertsecretarg_, (dict, UpsertSecretArg)): - raise Exception("Expected upsertsecretarg_ to be a UpsertSecretArg, received: {}".format(type(upsertsecretarg_))) - - if content_ is not None and not isinstance(content_, (dict, SecretContentParams)): - raise Exception("Expected content_ to be a SecretContentParams, received: {}".format(type(content_))) - - if description_ is not None and not isinstance(description_, (bytes, str)): - raise Exception("Expected description_ to be a str, received: {}".format(type(description_))) - - if expire_time_ is not None and not isinstance(expire_time_, (bytes, str)): - raise Exception("Expected expire_time_ to be a str, received: {}".format(type(expire_time_))) - - if label_ is not None and not isinstance(label_, (bytes, str)): - raise Exception("Expected label_ to be a str, received: {}".format(type(label_))) - - if params_ is not None and not isinstance(params_, dict): - raise Exception("Expected params_ to be a Mapping, received: {}".format(type(params_))) - - if rotate_policy_ is not None and not isinstance(rotate_policy_, (bytes, str)): - raise Exception("Expected rotate_policy_ to be a str, received: {}".format(type(rotate_policy_))) - - if uri_ is not None and not isinstance(uri_, (bytes, str)): - raise Exception("Expected uri_ to be a str, received: {}".format(type(uri_))) - - self.upsertsecretarg = upsertsecretarg_ - self.content = content_ - self.description = description_ - self.expire_time = expire_time_ - self.label = label_ - self.params = params_ - self.rotate_policy = rotate_policy_ - self.uri = uri_ - self.unknown_fields = unknown_fields - - - -class UpdateSecretArgs(Type): - _toSchema = {'args': 'args'} - _toPy = {'args': 'args'} - def __init__(self, args=None, **unknown_fields): +class SummaryWatcherID(Type): + _toSchema = {'watcher_id': 'watcher-id'} + _toPy = {'watcher-id': 'watcher_id'} + def __init__(self, watcher_id=None, **unknown_fields): ''' - args : typing.Sequence[~UpdateSecretArg] + watcher_id : str ''' - args_ = [UpdateSecretArg.from_json(o) for o in args or []] + watcher_id_ = watcher_id # Validate arguments against known Juju API types. - if args_ is not None and not isinstance(args_, (bytes, str, list)): - raise Exception("Expected args_ to be a Sequence, received: {}".format(type(args_))) + if watcher_id_ is not None and not isinstance(watcher_id_, (bytes, str)): + raise Exception("Expected watcher_id_ to be a str, received: {}".format(type(watcher_id_))) - self.args = args_ + self.watcher_id = watcher_id_ self.unknown_fields = unknown_fields -class UpdateSecretBackendArg(Type): - _toSchema = {'config': 'config', 'force': 'force', 'name': 'name', 'name_change': 'name-change', 'reset': 'reset', 'token_rotate_interval': 'token-rotate-interval'} - _toPy = {'config': 'config', 'force': 'force', 'name': 'name', 'name-change': 'name_change', 'reset': 'reset', 'token-rotate-interval': 'token_rotate_interval'} - def __init__(self, config=None, force=None, name=None, name_change=None, reset=None, token_rotate_interval=None, **unknown_fields): +class SupportedFeature(Type): + _toSchema = {'description': 'description', 'name': 'name', 'version': 'version'} + _toPy = {'description': 'description', 'name': 'name', 'version': 'version'} + def __init__(self, description=None, name=None, version=None, **unknown_fields): ''' - config : typing.Mapping[str, typing.Any] - force : bool + description : str name : str - name_change : str - reset : typing.Sequence[str] - token_rotate_interval : int + version : str ''' - config_ = config - force_ = force + description_ = description name_ = name - name_change_ = name_change - reset_ = reset - token_rotate_interval_ = token_rotate_interval + version_ = version # Validate arguments against known Juju API types. - if config_ is not None and not isinstance(config_, dict): - raise Exception("Expected config_ to be a Mapping, received: {}".format(type(config_))) - - if force_ is not None and not isinstance(force_, bool): - raise Exception("Expected force_ to be a bool, received: {}".format(type(force_))) + if description_ is not None and not isinstance(description_, (bytes, str)): + raise Exception("Expected description_ to be a str, received: {}".format(type(description_))) if name_ is not None and not isinstance(name_, (bytes, str)): raise Exception("Expected name_ to be a str, received: {}".format(type(name_))) - if name_change_ is not None and not isinstance(name_change_, (bytes, str)): - raise Exception("Expected name_change_ to be a str, received: {}".format(type(name_change_))) - - if reset_ is not None and not isinstance(reset_, (bytes, str, list)): - raise Exception("Expected reset_ to be a Sequence, received: {}".format(type(reset_))) - - if token_rotate_interval_ is not None and not isinstance(token_rotate_interval_, int): - raise Exception("Expected token_rotate_interval_ to be a int, received: {}".format(type(token_rotate_interval_))) - - self.config = config_ - self.force = force_ - self.name = name_ - self.name_change = name_change_ - self.reset = reset_ - self.token_rotate_interval = token_rotate_interval_ - self.unknown_fields = unknown_fields - - - -class UpdateSecretBackendArgs(Type): - _toSchema = {'args': 'args'} - _toPy = {'args': 'args'} - def __init__(self, args=None, **unknown_fields): - ''' - args : typing.Sequence[~UpdateSecretBackendArg] - ''' - args_ = [UpdateSecretBackendArg.from_json(o) for o in args or []] - - # Validate arguments against known Juju API types. - if args_ is not None and not isinstance(args_, (bytes, str, list)): - raise Exception("Expected args_ to be a Sequence, received: {}".format(type(args_))) - - self.args = args_ - self.unknown_fields = unknown_fields - - - -class UpdateUserSecretArg(Type): - _toSchema = {'auto_prune': 'auto-prune', 'content': 'content', 'description': 'description', 'existing_label': 'existing-label', 'expire_time': 'expire-time', 'label': 'label', 'params': 'params', 'rotate_policy': 'rotate-policy', 'upsertsecretarg': 'UpsertSecretArg', 'uri': 'uri'} - _toPy = {'UpsertSecretArg': 'upsertsecretarg', 'auto-prune': 'auto_prune', 'content': 'content', 'description': 'description', 'existing-label': 'existing_label', 'expire-time': 'expire_time', 'label': 'label', 'params': 'params', 'rotate-policy': 'rotate_policy', 'uri': 'uri'} - def __init__(self, upsertsecretarg=None, auto_prune=None, content=None, description=None, existing_label=None, expire_time=None, label=None, params=None, rotate_policy=None, uri=None, **unknown_fields): - ''' - upsertsecretarg : UpsertSecretArg - auto_prune : bool - content : SecretContentParams - description : str - existing_label : str - expire_time : str - label : str - params : typing.Mapping[str, typing.Any] - rotate_policy : str - uri : str - ''' - upsertsecretarg_ = UpsertSecretArg.from_json(upsertsecretarg) if upsertsecretarg else None - auto_prune_ = auto_prune - content_ = SecretContentParams.from_json(content) if content else None - description_ = description - existing_label_ = existing_label - expire_time_ = expire_time - label_ = label - params_ = params - rotate_policy_ = rotate_policy - uri_ = uri - - # Validate arguments against known Juju API types. - if upsertsecretarg_ is not None and not isinstance(upsertsecretarg_, (dict, UpsertSecretArg)): - raise Exception("Expected upsertsecretarg_ to be a UpsertSecretArg, received: {}".format(type(upsertsecretarg_))) - - if auto_prune_ is not None and not isinstance(auto_prune_, bool): - raise Exception("Expected auto_prune_ to be a bool, received: {}".format(type(auto_prune_))) - - if content_ is not None and not isinstance(content_, (dict, SecretContentParams)): - raise Exception("Expected content_ to be a SecretContentParams, received: {}".format(type(content_))) - - if description_ is not None and not isinstance(description_, (bytes, str)): - raise Exception("Expected description_ to be a str, received: {}".format(type(description_))) + if version_ is not None and not isinstance(version_, (bytes, str)): + raise Exception("Expected version_ to be a str, received: {}".format(type(version_))) - if existing_label_ is not None and not isinstance(existing_label_, (bytes, str)): - raise Exception("Expected existing_label_ to be a str, received: {}".format(type(existing_label_))) + self.description = description_ + self.name = name_ + self.version = version_ + self.unknown_fields = unknown_fields - if expire_time_ is not None and not isinstance(expire_time_, (bytes, str)): - raise Exception("Expected expire_time_ to be a str, received: {}".format(type(expire_time_))) - if label_ is not None and not isinstance(label_, (bytes, str)): - raise Exception("Expected label_ to be a str, received: {}".format(type(label_))) - if params_ is not None and not isinstance(params_, dict): - raise Exception("Expected params_ to be a Mapping, received: {}".format(type(params_))) +class TaggedCredential(Type): + _toSchema = {'credential': 'credential', 'tag': 'tag'} + _toPy = {'credential': 'credential', 'tag': 'tag'} + def __init__(self, credential=None, tag=None, **unknown_fields): + ''' + credential : CloudCredential + tag : str + ''' + credential_ = CloudCredential.from_json(credential) if credential else None + tag_ = tag - if rotate_policy_ is not None and not isinstance(rotate_policy_, (bytes, str)): - raise Exception("Expected rotate_policy_ to be a str, received: {}".format(type(rotate_policy_))) + # Validate arguments against known Juju API types. + if credential_ is not None and not isinstance(credential_, (dict, CloudCredential)): + raise Exception("Expected credential_ to be a CloudCredential, received: {}".format(type(credential_))) - if uri_ is not None and not isinstance(uri_, (bytes, str)): - raise Exception("Expected uri_ to be a str, received: {}".format(type(uri_))) + if tag_ is not None and not isinstance(tag_, (bytes, str)): + raise Exception("Expected tag_ to be a str, received: {}".format(type(tag_))) - self.upsertsecretarg = upsertsecretarg_ - self.auto_prune = auto_prune_ - self.content = content_ - self.description = description_ - self.existing_label = existing_label_ - self.expire_time = expire_time_ - self.label = label_ - self.params = params_ - self.rotate_policy = rotate_policy_ - self.uri = uri_ + self.credential = credential_ + self.tag = tag_ self.unknown_fields = unknown_fields -class UpdateUserSecretArgs(Type): - _toSchema = {'args': 'args'} - _toPy = {'args': 'args'} - def __init__(self, args=None, **unknown_fields): +class TaggedCredentials(Type): + _toSchema = {'credentials': 'credentials'} + _toPy = {'credentials': 'credentials'} + def __init__(self, credentials=None, **unknown_fields): ''' - args : typing.Sequence[~UpdateUserSecretArg] + credentials : typing.Sequence[~TaggedCredential] ''' - args_ = [UpdateUserSecretArg.from_json(o) for o in args or []] + credentials_ = [TaggedCredential.from_json(o) for o in credentials or []] # Validate arguments against known Juju API types. - if args_ is not None and not isinstance(args_, (bytes, str, list)): - raise Exception("Expected args_ to be a Sequence, received: {}".format(type(args_))) + if credentials_ is not None and not isinstance(credentials_, (bytes, str, list)): + raise Exception("Expected credentials_ to be a Sequence, received: {}".format(type(credentials_))) - self.args = args_ + self.credentials = credentials_ self.unknown_fields = unknown_fields -class UpgradeModelParams(Type): - _toSchema = {'agent_stream': 'agent-stream', 'dry_run': 'dry-run', 'ignore_agent_versions': 'ignore-agent-versions', 'model_tag': 'model-tag', 'target_version': 'target-version'} - _toPy = {'agent-stream': 'agent_stream', 'dry-run': 'dry_run', 'ignore-agent-versions': 'ignore_agent_versions', 'model-tag': 'model_tag', 'target-version': 'target_version'} - def __init__(self, agent_stream=None, dry_run=None, ignore_agent_versions=None, model_tag=None, target_version=None, **unknown_fields): +class Tools(Type): + _toSchema = {'sha256': 'sha256', 'size': 'size', 'url': 'url', 'version': 'version'} + _toPy = {'sha256': 'sha256', 'size': 'size', 'url': 'url', 'version': 'version'} + def __init__(self, sha256=None, size=None, url=None, version=None, **unknown_fields): ''' - agent_stream : str - dry_run : bool - ignore_agent_versions : bool - model_tag : str - target_version : Number + sha256 : str + size : int + url : str + version : Binary ''' - agent_stream_ = agent_stream - dry_run_ = dry_run - ignore_agent_versions_ = ignore_agent_versions - model_tag_ = model_tag - target_version_ = Number.from_json(target_version) if target_version else None + sha256_ = sha256 + size_ = size + url_ = url + version_ = Binary.from_json(version) if version else None # Validate arguments against known Juju API types. - if agent_stream_ is not None and not isinstance(agent_stream_, (bytes, str)): - raise Exception("Expected agent_stream_ to be a str, received: {}".format(type(agent_stream_))) - - if dry_run_ is not None and not isinstance(dry_run_, bool): - raise Exception("Expected dry_run_ to be a bool, received: {}".format(type(dry_run_))) + if sha256_ is not None and not isinstance(sha256_, (bytes, str)): + raise Exception("Expected sha256_ to be a str, received: {}".format(type(sha256_))) - if ignore_agent_versions_ is not None and not isinstance(ignore_agent_versions_, bool): - raise Exception("Expected ignore_agent_versions_ to be a bool, received: {}".format(type(ignore_agent_versions_))) + if size_ is not None and not isinstance(size_, int): + raise Exception("Expected size_ to be a int, received: {}".format(type(size_))) - if model_tag_ is not None and not isinstance(model_tag_, (bytes, str)): - raise Exception("Expected model_tag_ to be a str, received: {}".format(type(model_tag_))) + if url_ is not None and not isinstance(url_, (bytes, str)): + raise Exception("Expected url_ to be a str, received: {}".format(type(url_))) - if target_version_ is not None and not isinstance(target_version_, (dict, Number)): - raise Exception("Expected target_version_ to be a Number, received: {}".format(type(target_version_))) + if version_ is not None and not isinstance(version_, (dict, Binary)): + raise Exception("Expected version_ to be a Binary, received: {}".format(type(version_))) - self.agent_stream = agent_stream_ - self.dry_run = dry_run_ - self.ignore_agent_versions = ignore_agent_versions_ - self.model_tag = model_tag_ - self.target_version = target_version_ + self.sha256 = sha256_ + self.size = size_ + self.url = url_ + self.version = version_ self.unknown_fields = unknown_fields -class UpgradeModelResult(Type): - _toSchema = {'chosen_version': 'chosen-version', 'error': 'error'} - _toPy = {'chosen-version': 'chosen_version', 'error': 'error'} - def __init__(self, chosen_version=None, error=None, **unknown_fields): +class UnitInfoResult(Type): + _toSchema = {'error': 'error', 'result': 'result'} + _toPy = {'error': 'error', 'result': 'result'} + def __init__(self, error=None, result=None, **unknown_fields): ''' - chosen_version : Number error : Error + result : UnitResult ''' - chosen_version_ = Number.from_json(chosen_version) if chosen_version else None error_ = Error.from_json(error) if error else None + result_ = UnitResult.from_json(result) if result else None # Validate arguments against known Juju API types. - if chosen_version_ is not None and not isinstance(chosen_version_, (dict, Number)): - raise Exception("Expected chosen_version_ to be a Number, received: {}".format(type(chosen_version_))) - if error_ is not None and not isinstance(error_, (dict, Error)): raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - self.chosen_version = chosen_version_ + if result_ is not None and not isinstance(result_, (dict, UnitResult)): + raise Exception("Expected result_ to be a UnitResult, received: {}".format(type(result_))) + self.error = error_ + self.result = result_ self.unknown_fields = unknown_fields -class UpgradeSeriesNotificationParam(Type): - _toSchema = {'entity': 'entity', 'watcher_id': 'watcher-id'} - _toPy = {'entity': 'entity', 'watcher-id': 'watcher_id'} - def __init__(self, entity=None, watcher_id=None, **unknown_fields): +class UnitInfoResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} + def __init__(self, results=None, **unknown_fields): + ''' + results : typing.Sequence[~UnitInfoResult] + ''' + results_ = [UnitInfoResult.from_json(o) for o in results or []] + + # Validate arguments against known Juju API types. + if results_ is not None and not isinstance(results_, (bytes, str, list)): + raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) + + self.results = results_ + self.unknown_fields = unknown_fields + + + +class UnitResources(Type): + _toSchema = {'download_progress': 'download-progress', 'entity': 'Entity', 'resources': 'resources', 'tag': 'tag'} + _toPy = {'Entity': 'entity', 'download-progress': 'download_progress', 'resources': 'resources', 'tag': 'tag'} + def __init__(self, entity=None, download_progress=None, resources=None, tag=None, **unknown_fields): ''' entity : Entity - watcher_id : str + download_progress : typing.Mapping[str, int] + resources : typing.Sequence[~Resource] + tag : str ''' entity_ = Entity.from_json(entity) if entity else None - watcher_id_ = watcher_id + download_progress_ = download_progress + resources_ = [Resource.from_json(o) for o in resources or []] + tag_ = tag # Validate arguments against known Juju API types. if entity_ is not None and not isinstance(entity_, (dict, Entity)): raise Exception("Expected entity_ to be a Entity, received: {}".format(type(entity_))) - if watcher_id_ is not None and not isinstance(watcher_id_, (bytes, str)): - raise Exception("Expected watcher_id_ to be a str, received: {}".format(type(watcher_id_))) + if download_progress_ is not None and not isinstance(download_progress_, dict): + raise Exception("Expected download_progress_ to be a Mapping, received: {}".format(type(download_progress_))) + + if resources_ is not None and not isinstance(resources_, (bytes, str, list)): + raise Exception("Expected resources_ to be a Sequence, received: {}".format(type(resources_))) + + if tag_ is not None and not isinstance(tag_, (bytes, str)): + raise Exception("Expected tag_ to be a str, received: {}".format(type(tag_))) self.entity = entity_ - self.watcher_id = watcher_id_ + self.download_progress = download_progress_ + self.resources = resources_ + self.tag = tag_ self.unknown_fields = unknown_fields -class UpgradeSeriesNotificationParams(Type): - _toSchema = {'params': 'params'} - _toPy = {'params': 'params'} - def __init__(self, params=None, **unknown_fields): +class UnitResult(Type): + _toSchema = {'address': 'address', 'charm': 'charm', 'leader': 'leader', 'life': 'life', 'machine': 'machine', 'opened_ports': 'opened-ports', 'provider_id': 'provider-id', 'public_address': 'public-address', 'relation_data': 'relation-data', 'tag': 'tag', 'workload_version': 'workload-version'} + _toPy = {'address': 'address', 'charm': 'charm', 'leader': 'leader', 'life': 'life', 'machine': 'machine', 'opened-ports': 'opened_ports', 'provider-id': 'provider_id', 'public-address': 'public_address', 'relation-data': 'relation_data', 'tag': 'tag', 'workload-version': 'workload_version'} + def __init__(self, address=None, charm=None, leader=None, life=None, machine=None, opened_ports=None, provider_id=None, public_address=None, relation_data=None, tag=None, workload_version=None, **unknown_fields): ''' - params : typing.Sequence[~UpgradeSeriesNotificationParam] + address : str + charm : str + leader : bool + life : str + machine : str + opened_ports : typing.Sequence[str] + provider_id : str + public_address : str + relation_data : typing.Sequence[~EndpointRelationData] + tag : str + workload_version : str ''' - params_ = [UpgradeSeriesNotificationParam.from_json(o) for o in params or []] + address_ = address + charm_ = charm + leader_ = leader + life_ = life + machine_ = machine + opened_ports_ = opened_ports + provider_id_ = provider_id + public_address_ = public_address + relation_data_ = [EndpointRelationData.from_json(o) for o in relation_data or []] + tag_ = tag + workload_version_ = workload_version # Validate arguments against known Juju API types. - if params_ is not None and not isinstance(params_, (bytes, str, list)): - raise Exception("Expected params_ to be a Sequence, received: {}".format(type(params_))) + if address_ is not None and not isinstance(address_, (bytes, str)): + raise Exception("Expected address_ to be a str, received: {}".format(type(address_))) - self.params = params_ + if charm_ is not None and not isinstance(charm_, (bytes, str)): + raise Exception("Expected charm_ to be a str, received: {}".format(type(charm_))) + + if leader_ is not None and not isinstance(leader_, bool): + raise Exception("Expected leader_ to be a bool, received: {}".format(type(leader_))) + + if life_ is not None and not isinstance(life_, (bytes, str)): + raise Exception("Expected life_ to be a str, received: {}".format(type(life_))) + + if machine_ is not None and not isinstance(machine_, (bytes, str)): + raise Exception("Expected machine_ to be a str, received: {}".format(type(machine_))) + + if opened_ports_ is not None and not isinstance(opened_ports_, (bytes, str, list)): + raise Exception("Expected opened_ports_ to be a Sequence, received: {}".format(type(opened_ports_))) + + if provider_id_ is not None and not isinstance(provider_id_, (bytes, str)): + raise Exception("Expected provider_id_ to be a str, received: {}".format(type(provider_id_))) + + if public_address_ is not None and not isinstance(public_address_, (bytes, str)): + raise Exception("Expected public_address_ to be a str, received: {}".format(type(public_address_))) + + if relation_data_ is not None and not isinstance(relation_data_, (bytes, str, list)): + raise Exception("Expected relation_data_ to be a Sequence, received: {}".format(type(relation_data_))) + + if tag_ is not None and not isinstance(tag_, (bytes, str)): + raise Exception("Expected tag_ to be a str, received: {}".format(type(tag_))) + + if workload_version_ is not None and not isinstance(workload_version_, (bytes, str)): + raise Exception("Expected workload_version_ to be a str, received: {}".format(type(workload_version_))) + + self.address = address_ + self.charm = charm_ + self.leader = leader_ + self.life = life_ + self.machine = machine_ + self.opened_ports = opened_ports_ + self.provider_id = provider_id_ + self.public_address = public_address_ + self.relation_data = relation_data_ + self.tag = tag_ + self.workload_version = workload_version_ self.unknown_fields = unknown_fields -class UpgradeSeriesStartUnitCompletionParam(Type): - _toSchema = {'entities': 'entities', 'message': 'message'} - _toPy = {'entities': 'entities', 'message': 'message'} - def __init__(self, entities=None, message=None, **unknown_fields): +class UnitStatus(Type): + _toSchema = {'address': 'address', 'agent_status': 'agent-status', 'charm': 'charm', 'leader': 'leader', 'machine': 'machine', 'opened_ports': 'opened-ports', 'provider_id': 'provider-id', 'public_address': 'public-address', 'subordinates': 'subordinates', 'workload_status': 'workload-status', 'workload_version': 'workload-version'} + _toPy = {'address': 'address', 'agent-status': 'agent_status', 'charm': 'charm', 'leader': 'leader', 'machine': 'machine', 'opened-ports': 'opened_ports', 'provider-id': 'provider_id', 'public-address': 'public_address', 'subordinates': 'subordinates', 'workload-status': 'workload_status', 'workload-version': 'workload_version'} + def __init__(self, address=None, agent_status=None, charm=None, leader=None, machine=None, opened_ports=None, provider_id=None, public_address=None, subordinates=None, workload_status=None, workload_version=None, **unknown_fields): ''' - entities : typing.Sequence[~Entity] - message : str + address : str + agent_status : DetailedStatus + charm : str + leader : bool + machine : str + opened_ports : typing.Sequence[str] + provider_id : str + public_address : str + subordinates : typing.Mapping[str, ~UnitStatus] + workload_status : DetailedStatus + workload_version : str ''' - entities_ = [Entity.from_json(o) for o in entities or []] - message_ = message + address_ = address + agent_status_ = DetailedStatus.from_json(agent_status) if agent_status else None + charm_ = charm + leader_ = leader + machine_ = machine + opened_ports_ = opened_ports + provider_id_ = provider_id + public_address_ = public_address + subordinates_ = {k: UnitStatus.from_json(v) for k, v in (subordinates or dict()).items()} + workload_status_ = DetailedStatus.from_json(workload_status) if workload_status else None + workload_version_ = workload_version # Validate arguments against known Juju API types. - if entities_ is not None and not isinstance(entities_, (bytes, str, list)): - raise Exception("Expected entities_ to be a Sequence, received: {}".format(type(entities_))) - - if message_ is not None and not isinstance(message_, (bytes, str)): - raise Exception("Expected message_ to be a str, received: {}".format(type(message_))) - - self.entities = entities_ - self.message = message_ - self.unknown_fields = unknown_fields - + if address_ is not None and not isinstance(address_, (bytes, str)): + raise Exception("Expected address_ to be a str, received: {}".format(type(address_))) + if agent_status_ is not None and not isinstance(agent_status_, (dict, DetailedStatus)): + raise Exception("Expected agent_status_ to be a DetailedStatus, received: {}".format(type(agent_status_))) -class UpgradeSeriesStatusParam(Type): - _toSchema = {'entity': 'entity', 'message': 'message', 'status': 'status'} - _toPy = {'entity': 'entity', 'message': 'message', 'status': 'status'} - def __init__(self, entity=None, message=None, status=None, **unknown_fields): - ''' - entity : Entity - message : str - status : str - ''' - entity_ = Entity.from_json(entity) if entity else None - message_ = message - status_ = status + if charm_ is not None and not isinstance(charm_, (bytes, str)): + raise Exception("Expected charm_ to be a str, received: {}".format(type(charm_))) - # Validate arguments against known Juju API types. - if entity_ is not None and not isinstance(entity_, (dict, Entity)): - raise Exception("Expected entity_ to be a Entity, received: {}".format(type(entity_))) + if leader_ is not None and not isinstance(leader_, bool): + raise Exception("Expected leader_ to be a bool, received: {}".format(type(leader_))) - if message_ is not None and not isinstance(message_, (bytes, str)): - raise Exception("Expected message_ to be a str, received: {}".format(type(message_))) + if machine_ is not None and not isinstance(machine_, (bytes, str)): + raise Exception("Expected machine_ to be a str, received: {}".format(type(machine_))) - if status_ is not None and not isinstance(status_, (bytes, str)): - raise Exception("Expected status_ to be a str, received: {}".format(type(status_))) + if opened_ports_ is not None and not isinstance(opened_ports_, (bytes, str, list)): + raise Exception("Expected opened_ports_ to be a Sequence, received: {}".format(type(opened_ports_))) - self.entity = entity_ - self.message = message_ - self.status = status_ - self.unknown_fields = unknown_fields + if provider_id_ is not None and not isinstance(provider_id_, (bytes, str)): + raise Exception("Expected provider_id_ to be a str, received: {}".format(type(provider_id_))) + if public_address_ is not None and not isinstance(public_address_, (bytes, str)): + raise Exception("Expected public_address_ to be a str, received: {}".format(type(public_address_))) + if subordinates_ is not None and not isinstance(subordinates_, dict): + raise Exception("Expected subordinates_ to be a Mapping, received: {}".format(type(subordinates_))) -class UpgradeSeriesStatusParams(Type): - _toSchema = {'params': 'params'} - _toPy = {'params': 'params'} - def __init__(self, params=None, **unknown_fields): - ''' - params : typing.Sequence[~UpgradeSeriesStatusParam] - ''' - params_ = [UpgradeSeriesStatusParam.from_json(o) for o in params or []] + if workload_status_ is not None and not isinstance(workload_status_, (dict, DetailedStatus)): + raise Exception("Expected workload_status_ to be a DetailedStatus, received: {}".format(type(workload_status_))) - # Validate arguments against known Juju API types. - if params_ is not None and not isinstance(params_, (bytes, str, list)): - raise Exception("Expected params_ to be a Sequence, received: {}".format(type(params_))) + if workload_version_ is not None and not isinstance(workload_version_, (bytes, str)): + raise Exception("Expected workload_version_ to be a str, received: {}".format(type(workload_version_))) - self.params = params_ + self.address = address_ + self.agent_status = agent_status_ + self.charm = charm_ + self.leader = leader_ + self.machine = machine_ + self.opened_ports = opened_ports_ + self.provider_id = provider_id_ + self.public_address = public_address_ + self.subordinates = subordinates_ + self.workload_status = workload_status_ + self.workload_version = workload_version_ self.unknown_fields = unknown_fields -class UpgradeSeriesStatusResult(Type): - _toSchema = {'error': 'error', 'status': 'status', 'target': 'target'} - _toPy = {'error': 'error', 'status': 'status', 'target': 'target'} - def __init__(self, error=None, status=None, target=None, **unknown_fields): +class UnitsResolved(Type): + _toSchema = {'all_': 'all', 'retry': 'retry', 'tags': 'tags'} + _toPy = {'all': 'all_', 'retry': 'retry', 'tags': 'tags'} + def __init__(self, all_=None, retry=None, tags=None, **unknown_fields): ''' - error : Error - status : str - target : str + all_ : bool + retry : bool + tags : Entities ''' - error_ = Error.from_json(error) if error else None - status_ = status - target_ = target + all__ = all_ + retry_ = retry + tags_ = Entities.from_json(tags) if tags else None # Validate arguments against known Juju API types. - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) + if all__ is not None and not isinstance(all__, bool): + raise Exception("Expected all__ to be a bool, received: {}".format(type(all__))) - if status_ is not None and not isinstance(status_, (bytes, str)): - raise Exception("Expected status_ to be a str, received: {}".format(type(status_))) + if retry_ is not None and not isinstance(retry_, bool): + raise Exception("Expected retry_ to be a bool, received: {}".format(type(retry_))) - if target_ is not None and not isinstance(target_, (bytes, str)): - raise Exception("Expected target_ to be a str, received: {}".format(type(target_))) + if tags_ is not None and not isinstance(tags_, (dict, Entities)): + raise Exception("Expected tags_ to be a Entities, received: {}".format(type(tags_))) - self.error = error_ - self.status = status_ - self.target = target_ + self.all_ = all__ + self.retry = retry_ + self.tags = tags_ self.unknown_fields = unknown_fields -class UpgradeSeriesStatusResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None, **unknown_fields): +class UnsetModelDefaults(Type): + _toSchema = {'keys': 'keys'} + _toPy = {'keys': 'keys'} + def __init__(self, keys=None, **unknown_fields): ''' - results : typing.Sequence[~UpgradeSeriesStatusResult] + keys : typing.Sequence[~ModelUnsetKeys] ''' - results_ = [UpgradeSeriesStatusResult.from_json(o) for o in results or []] + keys_ = [ModelUnsetKeys.from_json(o) for o in keys or []] # Validate arguments against known Juju API types. - if results_ is not None and not isinstance(results_, (bytes, str, list)): - raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) + if keys_ is not None and not isinstance(keys_, (bytes, str, list)): + raise Exception("Expected keys_ to be a Sequence, received: {}".format(type(keys_))) - self.results = results_ + self.keys = keys_ self.unknown_fields = unknown_fields -class UpgradeSeriesUnitsResult(Type): - _toSchema = {'error': 'error', 'unit_names': 'unit-names'} - _toPy = {'error': 'error', 'unit-names': 'unit_names'} - def __init__(self, error=None, unit_names=None, **unknown_fields): +class UpdateChannelArg(Type): + _toSchema = {'channel': 'channel', 'force': 'force', 'tag': 'tag'} + _toPy = {'channel': 'channel', 'force': 'force', 'tag': 'tag'} + def __init__(self, channel=None, force=None, tag=None, **unknown_fields): ''' - error : Error - unit_names : typing.Sequence[str] + channel : str + force : bool + tag : Entity ''' - error_ = Error.from_json(error) if error else None - unit_names_ = unit_names + channel_ = channel + force_ = force + tag_ = Entity.from_json(tag) if tag else None # Validate arguments against known Juju API types. - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) + if channel_ is not None and not isinstance(channel_, (bytes, str)): + raise Exception("Expected channel_ to be a str, received: {}".format(type(channel_))) - if unit_names_ is not None and not isinstance(unit_names_, (bytes, str, list)): - raise Exception("Expected unit_names_ to be a Sequence, received: {}".format(type(unit_names_))) + if force_ is not None and not isinstance(force_, bool): + raise Exception("Expected force_ to be a bool, received: {}".format(type(force_))) - self.error = error_ - self.unit_names = unit_names_ + if tag_ is not None and not isinstance(tag_, (dict, Entity)): + raise Exception("Expected tag_ to be a Entity, received: {}".format(type(tag_))) + + self.channel = channel_ + self.force = force_ + self.tag = tag_ self.unknown_fields = unknown_fields -class UpgradeSeriesUnitsResults(Type): - _toSchema = {'results': 'Results'} - _toPy = {'Results': 'results'} - def __init__(self, results=None, **unknown_fields): +class UpdateChannelArgs(Type): + _toSchema = {'args': 'args'} + _toPy = {'args': 'args'} + def __init__(self, args=None, **unknown_fields): ''' - results : typing.Sequence[~UpgradeSeriesUnitsResult] + args : typing.Sequence[~UpdateChannelArg] ''' - results_ = [UpgradeSeriesUnitsResult.from_json(o) for o in results or []] + args_ = [UpdateChannelArg.from_json(o) for o in args or []] # Validate arguments against known Juju API types. - if results_ is not None and not isinstance(results_, (bytes, str, list)): - raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) + if args_ is not None and not isinstance(args_, (bytes, str, list)): + raise Exception("Expected args_ to be a Sequence, received: {}".format(type(args_))) - self.results = results_ + self.args = args_ self.unknown_fields = unknown_fields -class UpsertSecretArg(Type): - _toSchema = {'content': 'content', 'description': 'description', 'expire_time': 'expire-time', 'label': 'label', 'params': 'params', 'rotate_policy': 'rotate-policy'} - _toPy = {'content': 'content', 'description': 'description', 'expire-time': 'expire_time', 'label': 'label', 'params': 'params', 'rotate-policy': 'rotate_policy'} - def __init__(self, content=None, description=None, expire_time=None, label=None, params=None, rotate_policy=None, **unknown_fields): +class UpdateCloudArgs(Type): + _toSchema = {'clouds': 'clouds'} + _toPy = {'clouds': 'clouds'} + def __init__(self, clouds=None, **unknown_fields): ''' - content : SecretContentParams - description : str - expire_time : str - label : str - params : typing.Mapping[str, typing.Any] - rotate_policy : str + clouds : typing.Sequence[~AddCloudArgs] ''' - content_ = SecretContentParams.from_json(content) if content else None - description_ = description - expire_time_ = expire_time - label_ = label - params_ = params - rotate_policy_ = rotate_policy + clouds_ = [AddCloudArgs.from_json(o) for o in clouds or []] # Validate arguments against known Juju API types. - if content_ is not None and not isinstance(content_, (dict, SecretContentParams)): - raise Exception("Expected content_ to be a SecretContentParams, received: {}".format(type(content_))) + if clouds_ is not None and not isinstance(clouds_, (bytes, str, list)): + raise Exception("Expected clouds_ to be a Sequence, received: {}".format(type(clouds_))) - if description_ is not None and not isinstance(description_, (bytes, str)): - raise Exception("Expected description_ to be a str, received: {}".format(type(description_))) + self.clouds = clouds_ + self.unknown_fields = unknown_fields - if expire_time_ is not None and not isinstance(expire_time_, (bytes, str)): - raise Exception("Expected expire_time_ to be a str, received: {}".format(type(expire_time_))) - if label_ is not None and not isinstance(label_, (bytes, str)): - raise Exception("Expected label_ to be a str, received: {}".format(type(label_))) - if params_ is not None and not isinstance(params_, dict): - raise Exception("Expected params_ to be a Mapping, received: {}".format(type(params_))) +class UpdateCredentialArgs(Type): + _toSchema = {'credentials': 'credentials', 'force': 'force'} + _toPy = {'credentials': 'credentials', 'force': 'force'} + def __init__(self, credentials=None, force=None, **unknown_fields): + ''' + credentials : typing.Sequence[~TaggedCredential] + force : bool + ''' + credentials_ = [TaggedCredential.from_json(o) for o in credentials or []] + force_ = force - if rotate_policy_ is not None and not isinstance(rotate_policy_, (bytes, str)): - raise Exception("Expected rotate_policy_ to be a str, received: {}".format(type(rotate_policy_))) + # Validate arguments against known Juju API types. + if credentials_ is not None and not isinstance(credentials_, (bytes, str, list)): + raise Exception("Expected credentials_ to be a Sequence, received: {}".format(type(credentials_))) - self.content = content_ - self.description = description_ - self.expire_time = expire_time_ - self.label = label_ - self.params = params_ - self.rotate_policy = rotate_policy_ + if force_ is not None and not isinstance(force_, bool): + raise Exception("Expected force_ to be a bool, received: {}".format(type(force_))) + + self.credentials = credentials_ + self.force = force_ self.unknown_fields = unknown_fields -class UserAccess(Type): - _toSchema = {'access': 'access', 'user_tag': 'user-tag'} - _toPy = {'access': 'access', 'user-tag': 'user_tag'} - def __init__(self, access=None, user_tag=None, **unknown_fields): +class UpdateCredentialModelResult(Type): + _toSchema = {'errors': 'errors', 'name': 'name', 'uuid': 'uuid'} + _toPy = {'errors': 'errors', 'name': 'name', 'uuid': 'uuid'} + def __init__(self, errors=None, name=None, uuid=None, **unknown_fields): ''' - access : str - user_tag : str + errors : typing.Sequence[~ErrorResult] + name : str + uuid : str ''' - access_ = access - user_tag_ = user_tag + errors_ = [ErrorResult.from_json(o) for o in errors or []] + name_ = name + uuid_ = uuid # Validate arguments against known Juju API types. - if access_ is not None and not isinstance(access_, (bytes, str)): - raise Exception("Expected access_ to be a str, received: {}".format(type(access_))) + if errors_ is not None and not isinstance(errors_, (bytes, str, list)): + raise Exception("Expected errors_ to be a Sequence, received: {}".format(type(errors_))) - if user_tag_ is not None and not isinstance(user_tag_, (bytes, str)): - raise Exception("Expected user_tag_ to be a str, received: {}".format(type(user_tag_))) + if name_ is not None and not isinstance(name_, (bytes, str)): + raise Exception("Expected name_ to be a str, received: {}".format(type(name_))) - self.access = access_ - self.user_tag = user_tag_ + if uuid_ is not None and not isinstance(uuid_, (bytes, str)): + raise Exception("Expected uuid_ to be a str, received: {}".format(type(uuid_))) + + self.errors = errors_ + self.name = name_ + self.uuid = uuid_ self.unknown_fields = unknown_fields -class UserAccessResult(Type): - _toSchema = {'error': 'error', 'result': 'result'} - _toPy = {'error': 'error', 'result': 'result'} - def __init__(self, error=None, result=None, **unknown_fields): +class UpdateCredentialResult(Type): + _toSchema = {'error': 'error', 'models': 'models', 'tag': 'tag'} + _toPy = {'error': 'error', 'models': 'models', 'tag': 'tag'} + def __init__(self, error=None, models=None, tag=None, **unknown_fields): ''' error : Error - result : UserAccess + models : typing.Sequence[~UpdateCredentialModelResult] + tag : str ''' error_ = Error.from_json(error) if error else None - result_ = UserAccess.from_json(result) if result else None + models_ = [UpdateCredentialModelResult.from_json(o) for o in models or []] + tag_ = tag # Validate arguments against known Juju API types. if error_ is not None and not isinstance(error_, (dict, Error)): raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - if result_ is not None and not isinstance(result_, (dict, UserAccess)): - raise Exception("Expected result_ to be a UserAccess, received: {}".format(type(result_))) + if models_ is not None and not isinstance(models_, (bytes, str, list)): + raise Exception("Expected models_ to be a Sequence, received: {}".format(type(models_))) + + if tag_ is not None and not isinstance(tag_, (bytes, str)): + raise Exception("Expected tag_ to be a str, received: {}".format(type(tag_))) self.error = error_ - self.result = result_ + self.models = models_ + self.tag = tag_ self.unknown_fields = unknown_fields -class UserAccessResults(Type): +class UpdateCredentialResults(Type): _toSchema = {'results': 'results'} _toPy = {'results': 'results'} def __init__(self, results=None, **unknown_fields): ''' - results : typing.Sequence[~UserAccessResult] + results : typing.Sequence[~UpdateCredentialResult] ''' - results_ = [UserAccessResult.from_json(o) for o in results or []] + results_ = [UpdateCredentialResult.from_json(o) for o in results or []] # Validate arguments against known Juju API types. if results_ is not None and not isinstance(results_, (bytes, str, list)): @@ -26728,362 +15106,416 @@ def __init__(self, results=None, **unknown_fields): -class UserCloud(Type): - _toSchema = {'cloud_tag': 'cloud-tag', 'user_tag': 'user-tag'} - _toPy = {'cloud-tag': 'cloud_tag', 'user-tag': 'user_tag'} - def __init__(self, cloud_tag=None, user_tag=None, **unknown_fields): +class UpdateSecretBackendArg(Type): + _toSchema = {'config': 'config', 'force': 'force', 'name': 'name', 'name_change': 'name-change', 'reset': 'reset', 'token_rotate_interval': 'token-rotate-interval'} + _toPy = {'config': 'config', 'force': 'force', 'name': 'name', 'name-change': 'name_change', 'reset': 'reset', 'token-rotate-interval': 'token_rotate_interval'} + def __init__(self, config=None, force=None, name=None, name_change=None, reset=None, token_rotate_interval=None, **unknown_fields): ''' - cloud_tag : str - user_tag : str + config : typing.Mapping[str, typing.Any] + force : bool + name : str + name_change : str + reset : typing.Sequence[str] + token_rotate_interval : int ''' - cloud_tag_ = cloud_tag - user_tag_ = user_tag + config_ = config + force_ = force + name_ = name + name_change_ = name_change + reset_ = reset + token_rotate_interval_ = token_rotate_interval # Validate arguments against known Juju API types. - if cloud_tag_ is not None and not isinstance(cloud_tag_, (bytes, str)): - raise Exception("Expected cloud_tag_ to be a str, received: {}".format(type(cloud_tag_))) + if config_ is not None and not isinstance(config_, dict): + raise Exception("Expected config_ to be a Mapping, received: {}".format(type(config_))) - if user_tag_ is not None and not isinstance(user_tag_, (bytes, str)): - raise Exception("Expected user_tag_ to be a str, received: {}".format(type(user_tag_))) + if force_ is not None and not isinstance(force_, bool): + raise Exception("Expected force_ to be a bool, received: {}".format(type(force_))) - self.cloud_tag = cloud_tag_ - self.user_tag = user_tag_ + if name_ is not None and not isinstance(name_, (bytes, str)): + raise Exception("Expected name_ to be a str, received: {}".format(type(name_))) + + if name_change_ is not None and not isinstance(name_change_, (bytes, str)): + raise Exception("Expected name_change_ to be a str, received: {}".format(type(name_change_))) + + if reset_ is not None and not isinstance(reset_, (bytes, str, list)): + raise Exception("Expected reset_ to be a Sequence, received: {}".format(type(reset_))) + + if token_rotate_interval_ is not None and not isinstance(token_rotate_interval_, int): + raise Exception("Expected token_rotate_interval_ to be a int, received: {}".format(type(token_rotate_interval_))) + + self.config = config_ + self.force = force_ + self.name = name_ + self.name_change = name_change_ + self.reset = reset_ + self.token_rotate_interval = token_rotate_interval_ self.unknown_fields = unknown_fields -class UserClouds(Type): - _toSchema = {'user_clouds': 'user-clouds'} - _toPy = {'user-clouds': 'user_clouds'} - def __init__(self, user_clouds=None, **unknown_fields): +class UpdateSecretBackendArgs(Type): + _toSchema = {'args': 'args'} + _toPy = {'args': 'args'} + def __init__(self, args=None, **unknown_fields): ''' - user_clouds : typing.Sequence[~UserCloud] + args : typing.Sequence[~UpdateSecretBackendArg] ''' - user_clouds_ = [UserCloud.from_json(o) for o in user_clouds or []] + args_ = [UpdateSecretBackendArg.from_json(o) for o in args or []] # Validate arguments against known Juju API types. - if user_clouds_ is not None and not isinstance(user_clouds_, (bytes, str, list)): - raise Exception("Expected user_clouds_ to be a Sequence, received: {}".format(type(user_clouds_))) + if args_ is not None and not isinstance(args_, (bytes, str, list)): + raise Exception("Expected args_ to be a Sequence, received: {}".format(type(args_))) - self.user_clouds = user_clouds_ + self.args = args_ self.unknown_fields = unknown_fields -class UserInfo(Type): - _toSchema = {'access': 'access', 'created_by': 'created-by', 'date_created': 'date-created', 'disabled': 'disabled', 'display_name': 'display-name', 'last_connection': 'last-connection', 'username': 'username'} - _toPy = {'access': 'access', 'created-by': 'created_by', 'date-created': 'date_created', 'disabled': 'disabled', 'display-name': 'display_name', 'last-connection': 'last_connection', 'username': 'username'} - def __init__(self, access=None, created_by=None, date_created=None, disabled=None, display_name=None, last_connection=None, username=None, **unknown_fields): +class UpdateUserSecretArg(Type): + _toSchema = {'auto_prune': 'auto-prune', 'content': 'content', 'description': 'description', 'existing_label': 'existing-label', 'expire_time': 'expire-time', 'label': 'label', 'params': 'params', 'rotate_policy': 'rotate-policy', 'upsertsecretarg': 'UpsertSecretArg', 'uri': 'uri'} + _toPy = {'UpsertSecretArg': 'upsertsecretarg', 'auto-prune': 'auto_prune', 'content': 'content', 'description': 'description', 'existing-label': 'existing_label', 'expire-time': 'expire_time', 'label': 'label', 'params': 'params', 'rotate-policy': 'rotate_policy', 'uri': 'uri'} + def __init__(self, upsertsecretarg=None, auto_prune=None, content=None, description=None, existing_label=None, expire_time=None, label=None, params=None, rotate_policy=None, uri=None, **unknown_fields): ''' - access : str - created_by : str - date_created : str - disabled : bool - display_name : str - last_connection : str - username : str + upsertsecretarg : UpsertSecretArg + auto_prune : bool + content : SecretContentParams + description : str + existing_label : str + expire_time : str + label : str + params : typing.Mapping[str, typing.Any] + rotate_policy : str + uri : str ''' - access_ = access - created_by_ = created_by - date_created_ = date_created - disabled_ = disabled - display_name_ = display_name - last_connection_ = last_connection - username_ = username + upsertsecretarg_ = UpsertSecretArg.from_json(upsertsecretarg) if upsertsecretarg else None + auto_prune_ = auto_prune + content_ = SecretContentParams.from_json(content) if content else None + description_ = description + existing_label_ = existing_label + expire_time_ = expire_time + label_ = label + params_ = params + rotate_policy_ = rotate_policy + uri_ = uri # Validate arguments against known Juju API types. - if access_ is not None and not isinstance(access_, (bytes, str)): - raise Exception("Expected access_ to be a str, received: {}".format(type(access_))) + if upsertsecretarg_ is not None and not isinstance(upsertsecretarg_, (dict, UpsertSecretArg)): + raise Exception("Expected upsertsecretarg_ to be a UpsertSecretArg, received: {}".format(type(upsertsecretarg_))) - if created_by_ is not None and not isinstance(created_by_, (bytes, str)): - raise Exception("Expected created_by_ to be a str, received: {}".format(type(created_by_))) + if auto_prune_ is not None and not isinstance(auto_prune_, bool): + raise Exception("Expected auto_prune_ to be a bool, received: {}".format(type(auto_prune_))) - if date_created_ is not None and not isinstance(date_created_, (bytes, str)): - raise Exception("Expected date_created_ to be a str, received: {}".format(type(date_created_))) + if content_ is not None and not isinstance(content_, (dict, SecretContentParams)): + raise Exception("Expected content_ to be a SecretContentParams, received: {}".format(type(content_))) - if disabled_ is not None and not isinstance(disabled_, bool): - raise Exception("Expected disabled_ to be a bool, received: {}".format(type(disabled_))) + if description_ is not None and not isinstance(description_, (bytes, str)): + raise Exception("Expected description_ to be a str, received: {}".format(type(description_))) - if display_name_ is not None and not isinstance(display_name_, (bytes, str)): - raise Exception("Expected display_name_ to be a str, received: {}".format(type(display_name_))) + if existing_label_ is not None and not isinstance(existing_label_, (bytes, str)): + raise Exception("Expected existing_label_ to be a str, received: {}".format(type(existing_label_))) - if last_connection_ is not None and not isinstance(last_connection_, (bytes, str)): - raise Exception("Expected last_connection_ to be a str, received: {}".format(type(last_connection_))) + if expire_time_ is not None and not isinstance(expire_time_, (bytes, str)): + raise Exception("Expected expire_time_ to be a str, received: {}".format(type(expire_time_))) - if username_ is not None and not isinstance(username_, (bytes, str)): - raise Exception("Expected username_ to be a str, received: {}".format(type(username_))) + if label_ is not None and not isinstance(label_, (bytes, str)): + raise Exception("Expected label_ to be a str, received: {}".format(type(label_))) - self.access = access_ - self.created_by = created_by_ - self.date_created = date_created_ - self.disabled = disabled_ - self.display_name = display_name_ - self.last_connection = last_connection_ - self.username = username_ + if params_ is not None and not isinstance(params_, dict): + raise Exception("Expected params_ to be a Mapping, received: {}".format(type(params_))) + + if rotate_policy_ is not None and not isinstance(rotate_policy_, (bytes, str)): + raise Exception("Expected rotate_policy_ to be a str, received: {}".format(type(rotate_policy_))) + + if uri_ is not None and not isinstance(uri_, (bytes, str)): + raise Exception("Expected uri_ to be a str, received: {}".format(type(uri_))) + + self.upsertsecretarg = upsertsecretarg_ + self.auto_prune = auto_prune_ + self.content = content_ + self.description = description_ + self.existing_label = existing_label_ + self.expire_time = expire_time_ + self.label = label_ + self.params = params_ + self.rotate_policy = rotate_policy_ + self.uri = uri_ self.unknown_fields = unknown_fields -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, **unknown_fields): +class UpdateUserSecretArgs(Type): + _toSchema = {'args': 'args'} + _toPy = {'args': 'args'} + def __init__(self, args=None, **unknown_fields): + ''' + args : typing.Sequence[~UpdateUserSecretArg] + ''' + args_ = [UpdateUserSecretArg.from_json(o) for o in args or []] + + # Validate arguments against known Juju API types. + if args_ is not None and not isinstance(args_, (bytes, str, list)): + raise Exception("Expected args_ to be a Sequence, received: {}".format(type(args_))) + + self.args = args_ + self.unknown_fields = unknown_fields + + + +class UpgradeModelParams(Type): + _toSchema = {'agent_stream': 'agent-stream', 'dry_run': 'dry-run', 'ignore_agent_versions': 'ignore-agent-versions', 'model_tag': 'model-tag', 'target_version': 'target-version'} + _toPy = {'agent-stream': 'agent_stream', 'dry-run': 'dry_run', 'ignore-agent-versions': 'ignore_agent_versions', 'model-tag': 'model_tag', 'target-version': 'target_version'} + def __init__(self, agent_stream=None, dry_run=None, ignore_agent_versions=None, model_tag=None, target_version=None, **unknown_fields): ''' - entities : typing.Sequence[~Entity] - include_disabled : bool + agent_stream : str + dry_run : bool + ignore_agent_versions : bool + model_tag : str + target_version : Number ''' - entities_ = [Entity.from_json(o) for o in entities or []] - include_disabled_ = include_disabled + agent_stream_ = agent_stream + dry_run_ = dry_run + ignore_agent_versions_ = ignore_agent_versions + model_tag_ = model_tag + target_version_ = Number.from_json(target_version) if target_version else None # Validate arguments against known Juju API types. - if entities_ is not None and not isinstance(entities_, (bytes, str, list)): - raise Exception("Expected entities_ to be a Sequence, received: {}".format(type(entities_))) + if agent_stream_ is not None and not isinstance(agent_stream_, (bytes, str)): + raise Exception("Expected agent_stream_ to be a str, received: {}".format(type(agent_stream_))) - if include_disabled_ is not None and not isinstance(include_disabled_, bool): - raise Exception("Expected include_disabled_ to be a bool, received: {}".format(type(include_disabled_))) + if dry_run_ is not None and not isinstance(dry_run_, bool): + raise Exception("Expected dry_run_ to be a bool, received: {}".format(type(dry_run_))) - self.entities = entities_ - self.include_disabled = include_disabled_ + if ignore_agent_versions_ is not None and not isinstance(ignore_agent_versions_, bool): + raise Exception("Expected ignore_agent_versions_ to be a bool, received: {}".format(type(ignore_agent_versions_))) + + if model_tag_ is not None and not isinstance(model_tag_, (bytes, str)): + raise Exception("Expected model_tag_ to be a str, received: {}".format(type(model_tag_))) + + if target_version_ is not None and not isinstance(target_version_, (dict, Number)): + raise Exception("Expected target_version_ to be a Number, received: {}".format(type(target_version_))) + + self.agent_stream = agent_stream_ + self.dry_run = dry_run_ + self.ignore_agent_versions = ignore_agent_versions_ + self.model_tag = model_tag_ + self.target_version = target_version_ self.unknown_fields = unknown_fields -class UserInfoResult(Type): - _toSchema = {'error': 'error', 'result': 'result'} - _toPy = {'error': 'error', 'result': 'result'} - def __init__(self, error=None, result=None, **unknown_fields): +class UpgradeModelResult(Type): + _toSchema = {'chosen_version': 'chosen-version', 'error': 'error'} + _toPy = {'chosen-version': 'chosen_version', 'error': 'error'} + def __init__(self, chosen_version=None, error=None, **unknown_fields): ''' + chosen_version : Number error : Error - result : UserInfo ''' + chosen_version_ = Number.from_json(chosen_version) if chosen_version else None error_ = Error.from_json(error) if error else None - result_ = UserInfo.from_json(result) if result else None # Validate arguments against known Juju API types. + if chosen_version_ is not None and not isinstance(chosen_version_, (dict, Number)): + raise Exception("Expected chosen_version_ to be a Number, received: {}".format(type(chosen_version_))) + if error_ is not None and not isinstance(error_, (dict, Error)): raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - if result_ is not None and not isinstance(result_, (dict, UserInfo)): - raise Exception("Expected result_ to be a UserInfo, received: {}".format(type(result_))) - + self.chosen_version = chosen_version_ self.error = error_ - self.result = result_ self.unknown_fields = unknown_fields -class UserInfoResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None, **unknown_fields): +class UpgradeSeriesNotificationParam(Type): + _toSchema = {'entity': 'entity', 'watcher_id': 'watcher-id'} + _toPy = {'entity': 'entity', 'watcher-id': 'watcher_id'} + def __init__(self, entity=None, watcher_id=None, **unknown_fields): ''' - results : typing.Sequence[~UserInfoResult] + entity : Entity + watcher_id : str ''' - results_ = [UserInfoResult.from_json(o) for o in results or []] + entity_ = Entity.from_json(entity) if entity else None + watcher_id_ = watcher_id # Validate arguments against known Juju API types. - if results_ is not None and not isinstance(results_, (bytes, str, list)): - raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) + if entity_ is not None and not isinstance(entity_, (dict, Entity)): + raise Exception("Expected entity_ to be a Entity, received: {}".format(type(entity_))) - self.results = results_ + if watcher_id_ is not None and not isinstance(watcher_id_, (bytes, str)): + raise Exception("Expected watcher_id_ to be a str, received: {}".format(type(watcher_id_))) + + self.entity = entity_ + self.watcher_id = watcher_id_ self.unknown_fields = unknown_fields -class UserModel(Type): - _toSchema = {'last_connection': 'last-connection', 'model': 'model'} - _toPy = {'last-connection': 'last_connection', 'model': 'model'} - def __init__(self, last_connection=None, model=None, **unknown_fields): +class UpgradeSeriesNotificationParams(Type): + _toSchema = {'params': 'params'} + _toPy = {'params': 'params'} + def __init__(self, params=None, **unknown_fields): ''' - last_connection : str - model : Model + params : typing.Sequence[~UpgradeSeriesNotificationParam] ''' - last_connection_ = last_connection - model_ = Model.from_json(model) if model else None + params_ = [UpgradeSeriesNotificationParam.from_json(o) for o in params or []] # Validate arguments against known Juju API types. - if last_connection_ is not None and not isinstance(last_connection_, (bytes, str)): - raise Exception("Expected last_connection_ to be a str, received: {}".format(type(last_connection_))) - - if model_ is not None and not isinstance(model_, (dict, Model)): - raise Exception("Expected model_ to be a Model, received: {}".format(type(model_))) + if params_ is not None and not isinstance(params_, (bytes, str, list)): + raise Exception("Expected params_ to be a Sequence, received: {}".format(type(params_))) - self.last_connection = last_connection_ - self.model = model_ + self.params = params_ self.unknown_fields = unknown_fields -class UserModelList(Type): - _toSchema = {'user_models': 'user-models'} - _toPy = {'user-models': 'user_models'} - def __init__(self, user_models=None, **unknown_fields): +class UpgradeSeriesUnitsResult(Type): + _toSchema = {'error': 'error', 'unit_names': 'unit-names'} + _toPy = {'error': 'error', 'unit-names': 'unit_names'} + def __init__(self, error=None, unit_names=None, **unknown_fields): ''' - user_models : typing.Sequence[~UserModel] + error : Error + unit_names : typing.Sequence[str] ''' - user_models_ = [UserModel.from_json(o) for o in user_models or []] + error_ = Error.from_json(error) if error else None + unit_names_ = unit_names # Validate arguments against known Juju API types. - if user_models_ is not None and not isinstance(user_models_, (bytes, str, list)): - raise Exception("Expected user_models_ to be a Sequence, received: {}".format(type(user_models_))) + if error_ is not None and not isinstance(error_, (dict, Error)): + raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - self.user_models = user_models_ + if unit_names_ is not None and not isinstance(unit_names_, (bytes, str, list)): + raise Exception("Expected unit_names_ to be a Sequence, received: {}".format(type(unit_names_))) + + self.error = error_ + self.unit_names = unit_names_ self.unknown_fields = unknown_fields -class Value(Type): - _toSchema = {'allocate_public_ip': 'allocate-public-ip', 'arch': 'arch', 'container': 'container', 'cores': 'cores', 'cpu_power': 'cpu-power', 'image_id': 'image-id', 'instance_role': 'instance-role', 'instance_type': 'instance-type', 'mem': 'mem', 'root_disk': 'root-disk', 'root_disk_source': 'root-disk-source', 'spaces': 'spaces', 'tags': 'tags', 'virt_type': 'virt-type', 'zones': 'zones'} - _toPy = {'allocate-public-ip': 'allocate_public_ip', 'arch': 'arch', 'container': 'container', 'cores': 'cores', 'cpu-power': 'cpu_power', 'image-id': 'image_id', 'instance-role': 'instance_role', 'instance-type': 'instance_type', 'mem': 'mem', 'root-disk': 'root_disk', 'root-disk-source': 'root_disk_source', 'spaces': 'spaces', 'tags': 'tags', 'virt-type': 'virt_type', 'zones': 'zones'} - def __init__(self, allocate_public_ip=None, arch=None, container=None, cores=None, cpu_power=None, image_id=None, instance_role=None, instance_type=None, mem=None, root_disk=None, root_disk_source=None, spaces=None, tags=None, virt_type=None, zones=None, **unknown_fields): +class UpgradeSeriesUnitsResults(Type): + _toSchema = {'results': 'Results'} + _toPy = {'Results': 'results'} + def __init__(self, results=None, **unknown_fields): ''' - allocate_public_ip : bool - arch : str - container : str - cores : int - cpu_power : int - image_id : str - instance_role : str - instance_type : str - mem : int - root_disk : int - root_disk_source : str - spaces : typing.Sequence[str] - tags : typing.Sequence[str] - virt_type : str - zones : typing.Sequence[str] + results : typing.Sequence[~UpgradeSeriesUnitsResult] ''' - allocate_public_ip_ = allocate_public_ip - arch_ = arch - container_ = container - cores_ = cores - cpu_power_ = cpu_power - image_id_ = image_id - instance_role_ = instance_role - instance_type_ = instance_type - mem_ = mem - root_disk_ = root_disk - root_disk_source_ = root_disk_source - spaces_ = spaces - tags_ = tags - virt_type_ = virt_type - zones_ = zones + results_ = [UpgradeSeriesUnitsResult.from_json(o) for o in results or []] # Validate arguments against known Juju API types. - if allocate_public_ip_ is not None and not isinstance(allocate_public_ip_, bool): - raise Exception("Expected allocate_public_ip_ to be a bool, received: {}".format(type(allocate_public_ip_))) - - if arch_ is not None and not isinstance(arch_, (bytes, str)): - raise Exception("Expected arch_ to be a str, received: {}".format(type(arch_))) - - if container_ is not None and not isinstance(container_, (bytes, str)): - raise Exception("Expected container_ to be a str, received: {}".format(type(container_))) - - if cores_ is not None and not isinstance(cores_, int): - raise Exception("Expected cores_ to be a int, received: {}".format(type(cores_))) - - if cpu_power_ is not None and not isinstance(cpu_power_, int): - raise Exception("Expected cpu_power_ to be a int, received: {}".format(type(cpu_power_))) - - if image_id_ is not None and not isinstance(image_id_, (bytes, str)): - raise Exception("Expected image_id_ to be a str, received: {}".format(type(image_id_))) - - if instance_role_ is not None and not isinstance(instance_role_, (bytes, str)): - raise Exception("Expected instance_role_ to be a str, received: {}".format(type(instance_role_))) - - if instance_type_ is not None and not isinstance(instance_type_, (bytes, str)): - raise Exception("Expected instance_type_ to be a str, received: {}".format(type(instance_type_))) + if results_ is not None and not isinstance(results_, (bytes, str, list)): + raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) - if mem_ is not None and not isinstance(mem_, int): - raise Exception("Expected mem_ to be a int, received: {}".format(type(mem_))) + self.results = results_ + self.unknown_fields = unknown_fields - if root_disk_ is not None and not isinstance(root_disk_, int): - raise Exception("Expected root_disk_ to be a int, received: {}".format(type(root_disk_))) - if root_disk_source_ is not None and not isinstance(root_disk_source_, (bytes, str)): - raise Exception("Expected root_disk_source_ to be a str, received: {}".format(type(root_disk_source_))) - if spaces_ is not None and not isinstance(spaces_, (bytes, str, list)): - raise Exception("Expected spaces_ to be a Sequence, received: {}".format(type(spaces_))) +class UpsertSecretArg(Type): + _toSchema = {'content': 'content', 'description': 'description', 'expire_time': 'expire-time', 'label': 'label', 'params': 'params', 'rotate_policy': 'rotate-policy'} + _toPy = {'content': 'content', 'description': 'description', 'expire-time': 'expire_time', 'label': 'label', 'params': 'params', 'rotate-policy': 'rotate_policy'} + def __init__(self, content=None, description=None, expire_time=None, label=None, params=None, rotate_policy=None, **unknown_fields): + ''' + content : SecretContentParams + description : str + expire_time : str + label : str + params : typing.Mapping[str, typing.Any] + rotate_policy : str + ''' + content_ = SecretContentParams.from_json(content) if content else None + description_ = description + expire_time_ = expire_time + label_ = label + params_ = params + rotate_policy_ = rotate_policy - if tags_ is not None and not isinstance(tags_, (bytes, str, list)): - raise Exception("Expected tags_ to be a Sequence, received: {}".format(type(tags_))) + # Validate arguments against known Juju API types. + if content_ is not None and not isinstance(content_, (dict, SecretContentParams)): + raise Exception("Expected content_ to be a SecretContentParams, received: {}".format(type(content_))) - if virt_type_ is not None and not isinstance(virt_type_, (bytes, str)): - raise Exception("Expected virt_type_ to be a str, received: {}".format(type(virt_type_))) + if description_ is not None and not isinstance(description_, (bytes, str)): + raise Exception("Expected description_ to be a str, received: {}".format(type(description_))) - if zones_ is not None and not isinstance(zones_, (bytes, str, list)): - raise Exception("Expected zones_ to be a Sequence, received: {}".format(type(zones_))) + if expire_time_ is not None and not isinstance(expire_time_, (bytes, str)): + raise Exception("Expected expire_time_ to be a str, received: {}".format(type(expire_time_))) - self.allocate_public_ip = allocate_public_ip_ - self.arch = arch_ - self.container = container_ - self.cores = cores_ - self.cpu_power = cpu_power_ - self.image_id = image_id_ - self.instance_role = instance_role_ - self.instance_type = instance_type_ - self.mem = mem_ - self.root_disk = root_disk_ - self.root_disk_source = root_disk_source_ - self.spaces = spaces_ - self.tags = tags_ - self.virt_type = virt_type_ - self.zones = zones_ + if label_ is not None and not isinstance(label_, (bytes, str)): + raise Exception("Expected label_ to be a str, received: {}".format(type(label_))) + + if params_ is not None and not isinstance(params_, dict): + raise Exception("Expected params_ to be a Mapping, received: {}".format(type(params_))) + + if rotate_policy_ is not None and not isinstance(rotate_policy_, (bytes, str)): + raise Exception("Expected rotate_policy_ to be a str, received: {}".format(type(rotate_policy_))) + + self.content = content_ + self.description = description_ + self.expire_time = expire_time_ + self.label = label_ + self.params = params_ + self.rotate_policy = rotate_policy_ self.unknown_fields = unknown_fields -class Version(Type): - _toSchema = {'version': 'version'} - _toPy = {'version': 'version'} - def __init__(self, version=None, **unknown_fields): +class UserAccess(Type): + _toSchema = {'access': 'access', 'user_tag': 'user-tag'} + _toPy = {'access': 'access', 'user-tag': 'user_tag'} + def __init__(self, access=None, user_tag=None, **unknown_fields): ''' - version : Binary + access : str + user_tag : str ''' - version_ = Binary.from_json(version) if version else None + access_ = access + user_tag_ = user_tag # Validate arguments against known Juju API types. - if version_ is not None and not isinstance(version_, (dict, Binary)): - raise Exception("Expected version_ to be a Binary, received: {}".format(type(version_))) + if access_ is not None and not isinstance(access_, (bytes, str)): + raise Exception("Expected access_ to be a str, received: {}".format(type(access_))) - self.version = version_ + if user_tag_ is not None and not isinstance(user_tag_, (bytes, str)): + raise Exception("Expected user_tag_ to be a str, received: {}".format(type(user_tag_))) + + self.access = access_ + self.user_tag = user_tag_ self.unknown_fields = unknown_fields -class VersionResult(Type): - _toSchema = {'error': 'error', 'version': 'version'} - _toPy = {'error': 'error', 'version': 'version'} - def __init__(self, error=None, version=None, **unknown_fields): +class UserAccessResult(Type): + _toSchema = {'error': 'error', 'result': 'result'} + _toPy = {'error': 'error', 'result': 'result'} + def __init__(self, error=None, result=None, **unknown_fields): ''' error : Error - version : Number + result : UserAccess ''' error_ = Error.from_json(error) if error else None - version_ = Number.from_json(version) if version else None + result_ = UserAccess.from_json(result) if result else None # Validate arguments against known Juju API types. if error_ is not None and not isinstance(error_, (dict, Error)): raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - if version_ is not None and not isinstance(version_, (dict, Number)): - raise Exception("Expected version_ to be a Number, received: {}".format(type(version_))) + if result_ is not None and not isinstance(result_, (dict, UserAccess)): + raise Exception("Expected result_ to be a UserAccess, received: {}".format(type(result_))) self.error = error_ - self.version = version_ + self.result = result_ self.unknown_fields = unknown_fields -class VersionResults(Type): +class UserAccessResults(Type): _toSchema = {'results': 'results'} _toPy = {'results': 'results'} def __init__(self, results=None, **unknown_fields): ''' - results : typing.Sequence[~VersionResult] + results : typing.Sequence[~UserAccessResult] ''' - results_ = [VersionResult.from_json(o) for o in results or []] + results_ = [UserAccessResult.from_json(o) for o in results or []] # Validate arguments against known Juju API types. if results_ is not None and not isinstance(results_, (bytes, str, list)): @@ -27094,221 +15526,143 @@ def __init__(self, results=None, **unknown_fields): -class Volume(Type): - _toSchema = {'info': 'info', 'volume_tag': 'volume-tag'} - _toPy = {'info': 'info', 'volume-tag': 'volume_tag'} - def __init__(self, info=None, volume_tag=None, **unknown_fields): +class UserCloud(Type): + _toSchema = {'cloud_tag': 'cloud-tag', 'user_tag': 'user-tag'} + _toPy = {'cloud-tag': 'cloud_tag', 'user-tag': 'user_tag'} + def __init__(self, cloud_tag=None, user_tag=None, **unknown_fields): ''' - info : VolumeInfo - volume_tag : str + cloud_tag : str + user_tag : str ''' - info_ = VolumeInfo.from_json(info) if info else None - volume_tag_ = volume_tag + cloud_tag_ = cloud_tag + user_tag_ = user_tag # Validate arguments against known Juju API types. - if info_ is not None and not isinstance(info_, (dict, VolumeInfo)): - raise Exception("Expected info_ to be a VolumeInfo, received: {}".format(type(info_))) + if cloud_tag_ is not None and not isinstance(cloud_tag_, (bytes, str)): + raise Exception("Expected cloud_tag_ to be a str, received: {}".format(type(cloud_tag_))) - if volume_tag_ is not None and not isinstance(volume_tag_, (bytes, str)): - raise Exception("Expected volume_tag_ to be a str, received: {}".format(type(volume_tag_))) + if user_tag_ is not None and not isinstance(user_tag_, (bytes, str)): + raise Exception("Expected user_tag_ to be a str, received: {}".format(type(user_tag_))) - self.info = info_ - self.volume_tag = volume_tag_ + self.cloud_tag = cloud_tag_ + self.user_tag = user_tag_ self.unknown_fields = unknown_fields -class VolumeAttachment(Type): - _toSchema = {'info': 'info', 'machine_tag': 'machine-tag', 'volume_tag': 'volume-tag'} - _toPy = {'info': 'info', 'machine-tag': 'machine_tag', 'volume-tag': 'volume_tag'} - def __init__(self, info=None, machine_tag=None, volume_tag=None, **unknown_fields): +class UserClouds(Type): + _toSchema = {'user_clouds': 'user-clouds'} + _toPy = {'user-clouds': 'user_clouds'} + def __init__(self, user_clouds=None, **unknown_fields): ''' - info : VolumeAttachmentInfo - machine_tag : str - volume_tag : str + user_clouds : typing.Sequence[~UserCloud] ''' - info_ = VolumeAttachmentInfo.from_json(info) if info else None - machine_tag_ = machine_tag - volume_tag_ = volume_tag + user_clouds_ = [UserCloud.from_json(o) for o in user_clouds or []] # Validate arguments against known Juju API types. - if info_ is not None and not isinstance(info_, (dict, VolumeAttachmentInfo)): - raise Exception("Expected info_ to be a VolumeAttachmentInfo, received: {}".format(type(info_))) - - if machine_tag_ is not None and not isinstance(machine_tag_, (bytes, str)): - raise Exception("Expected machine_tag_ to be a str, received: {}".format(type(machine_tag_))) - - if volume_tag_ is not None and not isinstance(volume_tag_, (bytes, str)): - raise Exception("Expected volume_tag_ to be a str, received: {}".format(type(volume_tag_))) + if user_clouds_ is not None and not isinstance(user_clouds_, (bytes, str, list)): + raise Exception("Expected user_clouds_ to be a Sequence, received: {}".format(type(user_clouds_))) - self.info = info_ - self.machine_tag = machine_tag_ - self.volume_tag = volume_tag_ + self.user_clouds = user_clouds_ self.unknown_fields = unknown_fields -class VolumeAttachmentDetails(Type): - _toSchema = {'bus_address': 'bus-address', 'device_link': 'device-link', 'device_name': 'device-name', 'life': 'life', 'plan_info': 'plan-info', 'read_only': 'read-only', 'volumeattachmentinfo': 'VolumeAttachmentInfo'} - _toPy = {'VolumeAttachmentInfo': 'volumeattachmentinfo', 'bus-address': 'bus_address', 'device-link': 'device_link', 'device-name': 'device_name', 'life': 'life', 'plan-info': 'plan_info', 'read-only': 'read_only'} - def __init__(self, volumeattachmentinfo=None, bus_address=None, device_link=None, device_name=None, life=None, plan_info=None, read_only=None, **unknown_fields): +class UserInfo(Type): + _toSchema = {'access': 'access', 'created_by': 'created-by', 'date_created': 'date-created', 'disabled': 'disabled', 'display_name': 'display-name', 'last_connection': 'last-connection', 'username': 'username'} + _toPy = {'access': 'access', 'created-by': 'created_by', 'date-created': 'date_created', 'disabled': 'disabled', 'display-name': 'display_name', 'last-connection': 'last_connection', 'username': 'username'} + def __init__(self, access=None, created_by=None, date_created=None, disabled=None, display_name=None, last_connection=None, username=None, **unknown_fields): ''' - volumeattachmentinfo : VolumeAttachmentInfo - bus_address : str - device_link : str - device_name : str - life : str - plan_info : VolumeAttachmentPlanInfo - read_only : bool + access : str + created_by : str + date_created : str + disabled : bool + display_name : str + last_connection : str + username : str ''' - volumeattachmentinfo_ = VolumeAttachmentInfo.from_json(volumeattachmentinfo) if volumeattachmentinfo else None - bus_address_ = bus_address - device_link_ = device_link - device_name_ = device_name - life_ = life - plan_info_ = VolumeAttachmentPlanInfo.from_json(plan_info) if plan_info else None - read_only_ = read_only + access_ = access + created_by_ = created_by + date_created_ = date_created + disabled_ = disabled + display_name_ = display_name + last_connection_ = last_connection + username_ = username # Validate arguments against known Juju API types. - if volumeattachmentinfo_ is not None and not isinstance(volumeattachmentinfo_, (dict, VolumeAttachmentInfo)): - raise Exception("Expected volumeattachmentinfo_ to be a VolumeAttachmentInfo, received: {}".format(type(volumeattachmentinfo_))) - - if bus_address_ is not None and not isinstance(bus_address_, (bytes, str)): - raise Exception("Expected bus_address_ to be a str, received: {}".format(type(bus_address_))) - - if device_link_ is not None and not isinstance(device_link_, (bytes, str)): - raise Exception("Expected device_link_ to be a str, received: {}".format(type(device_link_))) - - if device_name_ is not None and not isinstance(device_name_, (bytes, str)): - raise Exception("Expected device_name_ to be a str, received: {}".format(type(device_name_))) - - if life_ is not None and not isinstance(life_, (bytes, str)): - raise Exception("Expected life_ to be a str, received: {}".format(type(life_))) - - if plan_info_ is not None and not isinstance(plan_info_, (dict, VolumeAttachmentPlanInfo)): - raise Exception("Expected plan_info_ to be a VolumeAttachmentPlanInfo, received: {}".format(type(plan_info_))) - - if read_only_ is not None and not isinstance(read_only_, bool): - raise Exception("Expected read_only_ to be a bool, received: {}".format(type(read_only_))) - - self.volumeattachmentinfo = volumeattachmentinfo_ - self.bus_address = bus_address_ - self.device_link = device_link_ - self.device_name = device_name_ - self.life = life_ - self.plan_info = plan_info_ - self.read_only = read_only_ - self.unknown_fields = unknown_fields - - + if access_ is not None and not isinstance(access_, (bytes, str)): + raise Exception("Expected access_ to be a str, received: {}".format(type(access_))) -class VolumeAttachmentInfo(Type): - _toSchema = {'bus_address': 'bus-address', 'device_link': 'device-link', 'device_name': 'device-name', 'plan_info': 'plan-info', 'read_only': 'read-only'} - _toPy = {'bus-address': 'bus_address', 'device-link': 'device_link', 'device-name': 'device_name', 'plan-info': 'plan_info', 'read-only': 'read_only'} - def __init__(self, bus_address=None, device_link=None, device_name=None, plan_info=None, read_only=None, **unknown_fields): - ''' - bus_address : str - device_link : str - device_name : str - plan_info : VolumeAttachmentPlanInfo - read_only : bool - ''' - bus_address_ = bus_address - device_link_ = device_link - device_name_ = device_name - plan_info_ = VolumeAttachmentPlanInfo.from_json(plan_info) if plan_info else None - read_only_ = read_only + if created_by_ is not None and not isinstance(created_by_, (bytes, str)): + raise Exception("Expected created_by_ to be a str, received: {}".format(type(created_by_))) - # Validate arguments against known Juju API types. - if bus_address_ is not None and not isinstance(bus_address_, (bytes, str)): - raise Exception("Expected bus_address_ to be a str, received: {}".format(type(bus_address_))) + if date_created_ is not None and not isinstance(date_created_, (bytes, str)): + raise Exception("Expected date_created_ to be a str, received: {}".format(type(date_created_))) - if device_link_ is not None and not isinstance(device_link_, (bytes, str)): - raise Exception("Expected device_link_ to be a str, received: {}".format(type(device_link_))) + if disabled_ is not None and not isinstance(disabled_, bool): + raise Exception("Expected disabled_ to be a bool, received: {}".format(type(disabled_))) - if device_name_ is not None and not isinstance(device_name_, (bytes, str)): - raise Exception("Expected device_name_ to be a str, received: {}".format(type(device_name_))) + if display_name_ is not None and not isinstance(display_name_, (bytes, str)): + raise Exception("Expected display_name_ to be a str, received: {}".format(type(display_name_))) - if plan_info_ is not None and not isinstance(plan_info_, (dict, VolumeAttachmentPlanInfo)): - raise Exception("Expected plan_info_ to be a VolumeAttachmentPlanInfo, received: {}".format(type(plan_info_))) + if last_connection_ is not None and not isinstance(last_connection_, (bytes, str)): + raise Exception("Expected last_connection_ to be a str, received: {}".format(type(last_connection_))) - if read_only_ is not None and not isinstance(read_only_, bool): - raise Exception("Expected read_only_ to be a bool, received: {}".format(type(read_only_))) + if username_ is not None and not isinstance(username_, (bytes, str)): + raise Exception("Expected username_ to be a str, received: {}".format(type(username_))) - self.bus_address = bus_address_ - self.device_link = device_link_ - self.device_name = device_name_ - self.plan_info = plan_info_ - self.read_only = read_only_ + self.access = access_ + self.created_by = created_by_ + self.date_created = date_created_ + self.disabled = disabled_ + self.display_name = display_name_ + self.last_connection = last_connection_ + self.username = username_ self.unknown_fields = unknown_fields -class VolumeAttachmentParams(Type): - _toSchema = {'instance_id': 'instance-id', 'machine_tag': 'machine-tag', 'provider': 'provider', 'read_only': 'read-only', 'volume_id': 'volume-id', 'volume_tag': 'volume-tag'} - _toPy = {'instance-id': 'instance_id', 'machine-tag': 'machine_tag', 'provider': 'provider', 'read-only': 'read_only', 'volume-id': 'volume_id', 'volume-tag': 'volume_tag'} - def __init__(self, instance_id=None, machine_tag=None, provider=None, read_only=None, volume_id=None, volume_tag=None, **unknown_fields): +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, **unknown_fields): ''' - instance_id : str - machine_tag : str - provider : str - read_only : bool - volume_id : str - volume_tag : str + entities : typing.Sequence[~Entity] + include_disabled : bool ''' - instance_id_ = instance_id - machine_tag_ = machine_tag - provider_ = provider - read_only_ = read_only - volume_id_ = volume_id - volume_tag_ = volume_tag + entities_ = [Entity.from_json(o) for o in entities or []] + include_disabled_ = include_disabled # Validate arguments against known Juju API types. - if instance_id_ is not None and not isinstance(instance_id_, (bytes, str)): - raise Exception("Expected instance_id_ to be a str, received: {}".format(type(instance_id_))) - - if machine_tag_ is not None and not isinstance(machine_tag_, (bytes, str)): - raise Exception("Expected machine_tag_ to be a str, received: {}".format(type(machine_tag_))) - - if provider_ is not None and not isinstance(provider_, (bytes, str)): - raise Exception("Expected provider_ to be a str, received: {}".format(type(provider_))) - - if read_only_ is not None and not isinstance(read_only_, bool): - raise Exception("Expected read_only_ to be a bool, received: {}".format(type(read_only_))) - - if volume_id_ is not None and not isinstance(volume_id_, (bytes, str)): - raise Exception("Expected volume_id_ to be a str, received: {}".format(type(volume_id_))) + if entities_ is not None and not isinstance(entities_, (bytes, str, list)): + raise Exception("Expected entities_ to be a Sequence, received: {}".format(type(entities_))) - if volume_tag_ is not None and not isinstance(volume_tag_, (bytes, str)): - raise Exception("Expected volume_tag_ to be a str, received: {}".format(type(volume_tag_))) + if include_disabled_ is not None and not isinstance(include_disabled_, bool): + raise Exception("Expected include_disabled_ to be a bool, received: {}".format(type(include_disabled_))) - self.instance_id = instance_id_ - self.machine_tag = machine_tag_ - self.provider = provider_ - self.read_only = read_only_ - self.volume_id = volume_id_ - self.volume_tag = volume_tag_ + self.entities = entities_ + self.include_disabled = include_disabled_ self.unknown_fields = unknown_fields -class VolumeAttachmentParamsResult(Type): +class UserInfoResult(Type): _toSchema = {'error': 'error', 'result': 'result'} _toPy = {'error': 'error', 'result': 'result'} def __init__(self, error=None, result=None, **unknown_fields): ''' error : Error - result : VolumeAttachmentParams + result : UserInfo ''' error_ = Error.from_json(error) if error else None - result_ = VolumeAttachmentParams.from_json(result) if result else None + result_ = UserInfo.from_json(result) if result else None # Validate arguments against known Juju API types. if error_ is not None and not isinstance(error_, (dict, Error)): raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - if result_ is not None and not isinstance(result_, (dict, VolumeAttachmentParams)): - raise Exception("Expected result_ to be a VolumeAttachmentParams, received: {}".format(type(result_))) + if result_ is not None and not isinstance(result_, (dict, UserInfo)): + raise Exception("Expected result_ to be a UserInfo, received: {}".format(type(result_))) self.error = error_ self.result = result_ @@ -27316,14 +15670,14 @@ def __init__(self, error=None, result=None, **unknown_fields): -class VolumeAttachmentParamsResults(Type): +class UserInfoResults(Type): _toSchema = {'results': 'results'} _toPy = {'results': 'results'} def __init__(self, results=None, **unknown_fields): ''' - results : typing.Sequence[~VolumeAttachmentParamsResult] + results : typing.Sequence[~UserInfoResult] ''' - results_ = [VolumeAttachmentParamsResult.from_json(o) for o in results or []] + results_ = [UserInfoResult.from_json(o) for o in results or []] # Validate arguments against known Juju API types. if results_ is not None and not isinstance(results_, (bytes, str, list)): @@ -27334,188 +15688,266 @@ def __init__(self, results=None, **unknown_fields): -class VolumeAttachmentPlan(Type): - _toSchema = {'block_device': 'block-device', 'life': 'life', 'machine_tag': 'machine-tag', 'plan_info': 'plan-info', 'volume_tag': 'volume-tag'} - _toPy = {'block-device': 'block_device', 'life': 'life', 'machine-tag': 'machine_tag', 'plan-info': 'plan_info', 'volume-tag': 'volume_tag'} - def __init__(self, block_device=None, life=None, machine_tag=None, plan_info=None, volume_tag=None, **unknown_fields): +class UserModel(Type): + _toSchema = {'last_connection': 'last-connection', 'model': 'model'} + _toPy = {'last-connection': 'last_connection', 'model': 'model'} + def __init__(self, last_connection=None, model=None, **unknown_fields): ''' - block_device : BlockDevice - life : str - machine_tag : str - plan_info : VolumeAttachmentPlanInfo - volume_tag : str + last_connection : str + model : Model ''' - block_device_ = BlockDevice.from_json(block_device) if block_device else None - life_ = life - machine_tag_ = machine_tag - plan_info_ = VolumeAttachmentPlanInfo.from_json(plan_info) if plan_info else None - volume_tag_ = volume_tag + last_connection_ = last_connection + model_ = Model.from_json(model) if model else None # Validate arguments against known Juju API types. - if block_device_ is not None and not isinstance(block_device_, (dict, BlockDevice)): - raise Exception("Expected block_device_ to be a BlockDevice, received: {}".format(type(block_device_))) - - if life_ is not None and not isinstance(life_, (bytes, str)): - raise Exception("Expected life_ to be a str, received: {}".format(type(life_))) - - if machine_tag_ is not None and not isinstance(machine_tag_, (bytes, str)): - raise Exception("Expected machine_tag_ to be a str, received: {}".format(type(machine_tag_))) - - if plan_info_ is not None and not isinstance(plan_info_, (dict, VolumeAttachmentPlanInfo)): - raise Exception("Expected plan_info_ to be a VolumeAttachmentPlanInfo, received: {}".format(type(plan_info_))) + if last_connection_ is not None and not isinstance(last_connection_, (bytes, str)): + raise Exception("Expected last_connection_ to be a str, received: {}".format(type(last_connection_))) - if volume_tag_ is not None and not isinstance(volume_tag_, (bytes, str)): - raise Exception("Expected volume_tag_ to be a str, received: {}".format(type(volume_tag_))) + if model_ is not None and not isinstance(model_, (dict, Model)): + raise Exception("Expected model_ to be a Model, received: {}".format(type(model_))) - self.block_device = block_device_ - self.life = life_ - self.machine_tag = machine_tag_ - self.plan_info = plan_info_ - self.volume_tag = volume_tag_ + self.last_connection = last_connection_ + self.model = model_ self.unknown_fields = unknown_fields -class VolumeAttachmentPlanInfo(Type): - _toSchema = {'device_attributes': 'device-attributes', 'device_type': 'device-type'} - _toPy = {'device-attributes': 'device_attributes', 'device-type': 'device_type'} - def __init__(self, device_attributes=None, device_type=None, **unknown_fields): +class UserModelList(Type): + _toSchema = {'user_models': 'user-models'} + _toPy = {'user-models': 'user_models'} + def __init__(self, user_models=None, **unknown_fields): ''' - device_attributes : typing.Mapping[str, str] - device_type : str + user_models : typing.Sequence[~UserModel] ''' - device_attributes_ = device_attributes - device_type_ = device_type + user_models_ = [UserModel.from_json(o) for o in user_models or []] # Validate arguments against known Juju API types. - if device_attributes_ is not None and not isinstance(device_attributes_, dict): - raise Exception("Expected device_attributes_ to be a Mapping, received: {}".format(type(device_attributes_))) - - if device_type_ is not None and not isinstance(device_type_, (bytes, str)): - raise Exception("Expected device_type_ to be a str, received: {}".format(type(device_type_))) + if user_models_ is not None and not isinstance(user_models_, (bytes, str, list)): + raise Exception("Expected user_models_ to be a Sequence, received: {}".format(type(user_models_))) - self.device_attributes = device_attributes_ - self.device_type = device_type_ + self.user_models = user_models_ self.unknown_fields = unknown_fields -class VolumeAttachmentPlanResult(Type): - _toSchema = {'error': 'error', 'result': 'result'} - _toPy = {'error': 'error', 'result': 'result'} - def __init__(self, error=None, result=None, **unknown_fields): +class Value(Type): + _toSchema = {'allocate_public_ip': 'allocate-public-ip', 'arch': 'arch', 'container': 'container', 'cores': 'cores', 'cpu_power': 'cpu-power', 'image_id': 'image-id', 'instance_role': 'instance-role', 'instance_type': 'instance-type', 'mem': 'mem', 'root_disk': 'root-disk', 'root_disk_source': 'root-disk-source', 'spaces': 'spaces', 'tags': 'tags', 'virt_type': 'virt-type', 'zones': 'zones'} + _toPy = {'allocate-public-ip': 'allocate_public_ip', 'arch': 'arch', 'container': 'container', 'cores': 'cores', 'cpu-power': 'cpu_power', 'image-id': 'image_id', 'instance-role': 'instance_role', 'instance-type': 'instance_type', 'mem': 'mem', 'root-disk': 'root_disk', 'root-disk-source': 'root_disk_source', 'spaces': 'spaces', 'tags': 'tags', 'virt-type': 'virt_type', 'zones': 'zones'} + def __init__(self, allocate_public_ip=None, arch=None, container=None, cores=None, cpu_power=None, image_id=None, instance_role=None, instance_type=None, mem=None, root_disk=None, root_disk_source=None, spaces=None, tags=None, virt_type=None, zones=None, **unknown_fields): ''' - error : Error - result : VolumeAttachmentPlan + allocate_public_ip : bool + arch : str + container : str + cores : int + cpu_power : int + image_id : str + instance_role : str + instance_type : str + mem : int + root_disk : int + root_disk_source : str + spaces : typing.Sequence[str] + tags : typing.Sequence[str] + virt_type : str + zones : typing.Sequence[str] ''' - error_ = Error.from_json(error) if error else None - result_ = VolumeAttachmentPlan.from_json(result) if result else None + allocate_public_ip_ = allocate_public_ip + arch_ = arch + container_ = container + cores_ = cores + cpu_power_ = cpu_power + image_id_ = image_id + instance_role_ = instance_role + instance_type_ = instance_type + mem_ = mem + root_disk_ = root_disk + root_disk_source_ = root_disk_source + spaces_ = spaces + tags_ = tags + virt_type_ = virt_type + zones_ = zones # Validate arguments against known Juju API types. - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) + if allocate_public_ip_ is not None and not isinstance(allocate_public_ip_, bool): + raise Exception("Expected allocate_public_ip_ to be a bool, received: {}".format(type(allocate_public_ip_))) - if result_ is not None and not isinstance(result_, (dict, VolumeAttachmentPlan)): - raise Exception("Expected result_ to be a VolumeAttachmentPlan, received: {}".format(type(result_))) + if arch_ is not None and not isinstance(arch_, (bytes, str)): + raise Exception("Expected arch_ to be a str, received: {}".format(type(arch_))) - self.error = error_ - self.result = result_ - self.unknown_fields = unknown_fields + if container_ is not None and not isinstance(container_, (bytes, str)): + raise Exception("Expected container_ to be a str, received: {}".format(type(container_))) + if cores_ is not None and not isinstance(cores_, int): + raise Exception("Expected cores_ to be a int, received: {}".format(type(cores_))) + if cpu_power_ is not None and not isinstance(cpu_power_, int): + raise Exception("Expected cpu_power_ to be a int, received: {}".format(type(cpu_power_))) -class VolumeAttachmentPlanResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None, **unknown_fields): - ''' - results : typing.Sequence[~VolumeAttachmentPlanResult] - ''' - results_ = [VolumeAttachmentPlanResult.from_json(o) for o in results or []] + if image_id_ is not None and not isinstance(image_id_, (bytes, str)): + raise Exception("Expected image_id_ to be a str, received: {}".format(type(image_id_))) - # Validate arguments against known Juju API types. - if results_ is not None and not isinstance(results_, (bytes, str, list)): - raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) + if instance_role_ is not None and not isinstance(instance_role_, (bytes, str)): + raise Exception("Expected instance_role_ to be a str, received: {}".format(type(instance_role_))) - self.results = results_ - self.unknown_fields = unknown_fields + if instance_type_ is not None and not isinstance(instance_type_, (bytes, str)): + raise Exception("Expected instance_type_ to be a str, received: {}".format(type(instance_type_))) + if mem_ is not None and not isinstance(mem_, int): + raise Exception("Expected mem_ to be a int, received: {}".format(type(mem_))) + if root_disk_ is not None and not isinstance(root_disk_, int): + raise Exception("Expected root_disk_ to be a int, received: {}".format(type(root_disk_))) -class VolumeAttachmentPlans(Type): - _toSchema = {'volume_plans': 'volume-plans'} - _toPy = {'volume-plans': 'volume_plans'} - def __init__(self, volume_plans=None, **unknown_fields): - ''' - volume_plans : typing.Sequence[~VolumeAttachmentPlan] - ''' - volume_plans_ = [VolumeAttachmentPlan.from_json(o) for o in volume_plans or []] + if root_disk_source_ is not None and not isinstance(root_disk_source_, (bytes, str)): + raise Exception("Expected root_disk_source_ to be a str, received: {}".format(type(root_disk_source_))) - # Validate arguments against known Juju API types. - if volume_plans_ is not None and not isinstance(volume_plans_, (bytes, str, list)): - raise Exception("Expected volume_plans_ to be a Sequence, received: {}".format(type(volume_plans_))) + if spaces_ is not None and not isinstance(spaces_, (bytes, str, list)): + raise Exception("Expected spaces_ to be a Sequence, received: {}".format(type(spaces_))) - self.volume_plans = volume_plans_ + if tags_ is not None and not isinstance(tags_, (bytes, str, list)): + raise Exception("Expected tags_ to be a Sequence, received: {}".format(type(tags_))) + + if virt_type_ is not None and not isinstance(virt_type_, (bytes, str)): + raise Exception("Expected virt_type_ to be a str, received: {}".format(type(virt_type_))) + + if zones_ is not None and not isinstance(zones_, (bytes, str, list)): + raise Exception("Expected zones_ to be a Sequence, received: {}".format(type(zones_))) + + self.allocate_public_ip = allocate_public_ip_ + self.arch = arch_ + self.container = container_ + self.cores = cores_ + self.cpu_power = cpu_power_ + self.image_id = image_id_ + self.instance_role = instance_role_ + self.instance_type = instance_type_ + self.mem = mem_ + self.root_disk = root_disk_ + self.root_disk_source = root_disk_source_ + self.spaces = spaces_ + self.tags = tags_ + self.virt_type = virt_type_ + self.zones = zones_ self.unknown_fields = unknown_fields -class VolumeAttachmentResult(Type): - _toSchema = {'error': 'error', 'result': 'result'} - _toPy = {'error': 'error', 'result': 'result'} - def __init__(self, error=None, result=None, **unknown_fields): +class VolumeAttachmentDetails(Type): + _toSchema = {'bus_address': 'bus-address', 'device_link': 'device-link', 'device_name': 'device-name', 'life': 'life', 'plan_info': 'plan-info', 'read_only': 'read-only', 'volumeattachmentinfo': 'VolumeAttachmentInfo'} + _toPy = {'VolumeAttachmentInfo': 'volumeattachmentinfo', 'bus-address': 'bus_address', 'device-link': 'device_link', 'device-name': 'device_name', 'life': 'life', 'plan-info': 'plan_info', 'read-only': 'read_only'} + def __init__(self, volumeattachmentinfo=None, bus_address=None, device_link=None, device_name=None, life=None, plan_info=None, read_only=None, **unknown_fields): ''' - error : Error - result : VolumeAttachment + volumeattachmentinfo : VolumeAttachmentInfo + bus_address : str + device_link : str + device_name : str + life : str + plan_info : VolumeAttachmentPlanInfo + read_only : bool ''' - error_ = Error.from_json(error) if error else None - result_ = VolumeAttachment.from_json(result) if result else None + volumeattachmentinfo_ = VolumeAttachmentInfo.from_json(volumeattachmentinfo) if volumeattachmentinfo else None + bus_address_ = bus_address + device_link_ = device_link + device_name_ = device_name + life_ = life + plan_info_ = VolumeAttachmentPlanInfo.from_json(plan_info) if plan_info else None + read_only_ = read_only # Validate arguments against known Juju API types. - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) + if volumeattachmentinfo_ is not None and not isinstance(volumeattachmentinfo_, (dict, VolumeAttachmentInfo)): + raise Exception("Expected volumeattachmentinfo_ to be a VolumeAttachmentInfo, received: {}".format(type(volumeattachmentinfo_))) - if result_ is not None and not isinstance(result_, (dict, VolumeAttachment)): - raise Exception("Expected result_ to be a VolumeAttachment, received: {}".format(type(result_))) + if bus_address_ is not None and not isinstance(bus_address_, (bytes, str)): + raise Exception("Expected bus_address_ to be a str, received: {}".format(type(bus_address_))) - self.error = error_ - self.result = result_ + if device_link_ is not None and not isinstance(device_link_, (bytes, str)): + raise Exception("Expected device_link_ to be a str, received: {}".format(type(device_link_))) + + if device_name_ is not None and not isinstance(device_name_, (bytes, str)): + raise Exception("Expected device_name_ to be a str, received: {}".format(type(device_name_))) + + if life_ is not None and not isinstance(life_, (bytes, str)): + raise Exception("Expected life_ to be a str, received: {}".format(type(life_))) + + if plan_info_ is not None and not isinstance(plan_info_, (dict, VolumeAttachmentPlanInfo)): + raise Exception("Expected plan_info_ to be a VolumeAttachmentPlanInfo, received: {}".format(type(plan_info_))) + + if read_only_ is not None and not isinstance(read_only_, bool): + raise Exception("Expected read_only_ to be a bool, received: {}".format(type(read_only_))) + + self.volumeattachmentinfo = volumeattachmentinfo_ + self.bus_address = bus_address_ + self.device_link = device_link_ + self.device_name = device_name_ + self.life = life_ + self.plan_info = plan_info_ + self.read_only = read_only_ self.unknown_fields = unknown_fields -class VolumeAttachmentResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None, **unknown_fields): - ''' - results : typing.Sequence[~VolumeAttachmentResult] - ''' - results_ = [VolumeAttachmentResult.from_json(o) for o in results or []] +class VolumeAttachmentInfo(Type): + _toSchema = {'bus_address': 'bus-address', 'device_link': 'device-link', 'device_name': 'device-name', 'plan_info': 'plan-info', 'read_only': 'read-only'} + _toPy = {'bus-address': 'bus_address', 'device-link': 'device_link', 'device-name': 'device_name', 'plan-info': 'plan_info', 'read-only': 'read_only'} + def __init__(self, bus_address=None, device_link=None, device_name=None, plan_info=None, read_only=None, **unknown_fields): + ''' + bus_address : str + device_link : str + device_name : str + plan_info : VolumeAttachmentPlanInfo + read_only : bool + ''' + bus_address_ = bus_address + device_link_ = device_link + device_name_ = device_name + plan_info_ = VolumeAttachmentPlanInfo.from_json(plan_info) if plan_info else None + read_only_ = read_only + + # Validate arguments against known Juju API types. + if bus_address_ is not None and not isinstance(bus_address_, (bytes, str)): + raise Exception("Expected bus_address_ to be a str, received: {}".format(type(bus_address_))) + + if device_link_ is not None and not isinstance(device_link_, (bytes, str)): + raise Exception("Expected device_link_ to be a str, received: {}".format(type(device_link_))) + + if device_name_ is not None and not isinstance(device_name_, (bytes, str)): + raise Exception("Expected device_name_ to be a str, received: {}".format(type(device_name_))) - # Validate arguments against known Juju API types. - if results_ is not None and not isinstance(results_, (bytes, str, list)): - raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) + if plan_info_ is not None and not isinstance(plan_info_, (dict, VolumeAttachmentPlanInfo)): + raise Exception("Expected plan_info_ to be a VolumeAttachmentPlanInfo, received: {}".format(type(plan_info_))) - self.results = results_ + if read_only_ is not None and not isinstance(read_only_, bool): + raise Exception("Expected read_only_ to be a bool, received: {}".format(type(read_only_))) + + self.bus_address = bus_address_ + self.device_link = device_link_ + self.device_name = device_name_ + self.plan_info = plan_info_ + self.read_only = read_only_ self.unknown_fields = unknown_fields -class VolumeAttachments(Type): - _toSchema = {'volume_attachments': 'volume-attachments'} - _toPy = {'volume-attachments': 'volume_attachments'} - def __init__(self, volume_attachments=None, **unknown_fields): +class VolumeAttachmentPlanInfo(Type): + _toSchema = {'device_attributes': 'device-attributes', 'device_type': 'device-type'} + _toPy = {'device-attributes': 'device_attributes', 'device-type': 'device_type'} + def __init__(self, device_attributes=None, device_type=None, **unknown_fields): ''' - volume_attachments : typing.Sequence[~VolumeAttachment] + device_attributes : typing.Mapping[str, str] + device_type : str ''' - volume_attachments_ = [VolumeAttachment.from_json(o) for o in volume_attachments or []] + device_attributes_ = device_attributes + device_type_ = device_type # Validate arguments against known Juju API types. - if volume_attachments_ is not None and not isinstance(volume_attachments_, (bytes, str, list)): - raise Exception("Expected volume_attachments_ to be a Sequence, received: {}".format(type(volume_attachments_))) + if device_attributes_ is not None and not isinstance(device_attributes_, dict): + raise Exception("Expected device_attributes_ to be a Mapping, received: {}".format(type(device_attributes_))) - self.volume_attachments = volume_attachments_ + if device_type_ is not None and not isinstance(device_type_, (bytes, str)): + raise Exception("Expected device_type_ to be a str, received: {}".format(type(device_type_))) + + self.device_attributes = device_attributes_ + self.device_type = device_type_ self.unknown_fields = unknown_fields @@ -27700,294 +16132,6 @@ def __init__(self, hardware_id=None, persistent=None, pool=None, size=None, volu -class VolumeParams(Type): - _toSchema = {'attachment': 'attachment', 'attributes': 'attributes', 'provider': 'provider', 'size': 'size', 'tags': 'tags', 'volume_tag': 'volume-tag'} - _toPy = {'attachment': 'attachment', 'attributes': 'attributes', 'provider': 'provider', 'size': 'size', 'tags': 'tags', 'volume-tag': 'volume_tag'} - def __init__(self, attachment=None, attributes=None, provider=None, size=None, tags=None, volume_tag=None, **unknown_fields): - ''' - attachment : VolumeAttachmentParams - attributes : typing.Mapping[str, typing.Any] - provider : str - size : int - tags : typing.Mapping[str, str] - volume_tag : str - ''' - attachment_ = VolumeAttachmentParams.from_json(attachment) if attachment else None - attributes_ = attributes - provider_ = provider - size_ = size - tags_ = tags - volume_tag_ = volume_tag - - # Validate arguments against known Juju API types. - if attachment_ is not None and not isinstance(attachment_, (dict, VolumeAttachmentParams)): - raise Exception("Expected attachment_ to be a VolumeAttachmentParams, received: {}".format(type(attachment_))) - - if attributes_ is not None and not isinstance(attributes_, dict): - raise Exception("Expected attributes_ to be a Mapping, received: {}".format(type(attributes_))) - - if provider_ is not None and not isinstance(provider_, (bytes, str)): - raise Exception("Expected provider_ to be a str, received: {}".format(type(provider_))) - - if size_ is not None and not isinstance(size_, int): - raise Exception("Expected size_ to be a int, received: {}".format(type(size_))) - - if tags_ is not None and not isinstance(tags_, dict): - raise Exception("Expected tags_ to be a Mapping, received: {}".format(type(tags_))) - - if volume_tag_ is not None and not isinstance(volume_tag_, (bytes, str)): - raise Exception("Expected volume_tag_ to be a str, received: {}".format(type(volume_tag_))) - - self.attachment = attachment_ - self.attributes = attributes_ - self.provider = provider_ - self.size = size_ - self.tags = tags_ - self.volume_tag = volume_tag_ - self.unknown_fields = unknown_fields - - - -class VolumeParamsResult(Type): - _toSchema = {'error': 'error', 'result': 'result'} - _toPy = {'error': 'error', 'result': 'result'} - def __init__(self, error=None, result=None, **unknown_fields): - ''' - error : Error - result : VolumeParams - ''' - error_ = Error.from_json(error) if error else None - result_ = VolumeParams.from_json(result) if result else None - - # Validate arguments against known Juju API types. - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - - if result_ is not None and not isinstance(result_, (dict, VolumeParams)): - raise Exception("Expected result_ to be a VolumeParams, received: {}".format(type(result_))) - - self.error = error_ - self.result = result_ - self.unknown_fields = unknown_fields - - - -class VolumeParamsResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None, **unknown_fields): - ''' - results : typing.Sequence[~VolumeParamsResult] - ''' - results_ = [VolumeParamsResult.from_json(o) for o in results or []] - - # Validate arguments against known Juju API types. - if results_ is not None and not isinstance(results_, (bytes, str, list)): - raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) - - self.results = results_ - self.unknown_fields = unknown_fields - - - -class VolumeResult(Type): - _toSchema = {'error': 'error', 'result': 'result'} - _toPy = {'error': 'error', 'result': 'result'} - def __init__(self, error=None, result=None, **unknown_fields): - ''' - error : Error - result : Volume - ''' - error_ = Error.from_json(error) if error else None - result_ = Volume.from_json(result) if result else None - - # Validate arguments against known Juju API types. - if error_ is not None and not isinstance(error_, (dict, Error)): - raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) - - if result_ is not None and not isinstance(result_, (dict, Volume)): - raise Exception("Expected result_ to be a Volume, received: {}".format(type(result_))) - - self.error = error_ - self.result = result_ - self.unknown_fields = unknown_fields - - - -class VolumeResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None, **unknown_fields): - ''' - results : typing.Sequence[~VolumeResult] - ''' - results_ = [VolumeResult.from_json(o) for o in results or []] - - # Validate arguments against known Juju API types. - if results_ is not None and not isinstance(results_, (bytes, str, list)): - raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) - - self.results = results_ - self.unknown_fields = unknown_fields - - - -class Volumes(Type): - _toSchema = {'volumes': 'volumes'} - _toPy = {'volumes': 'volumes'} - def __init__(self, volumes=None, **unknown_fields): - ''' - volumes : typing.Sequence[~Volume] - ''' - volumes_ = [Volume.from_json(o) for o in volumes or []] - - # Validate arguments against known Juju API types. - if volumes_ is not None and not isinstance(volumes_, (bytes, str, list)): - raise Exception("Expected volumes_ to be a Sequence, received: {}".format(type(volumes_))) - - self.volumes = volumes_ - self.unknown_fields = unknown_fields - - - -class WatchContainer(Type): - _toSchema = {'container_type': 'container-type', 'machine_tag': 'machine-tag'} - _toPy = {'container-type': 'container_type', 'machine-tag': 'machine_tag'} - def __init__(self, container_type=None, machine_tag=None, **unknown_fields): - ''' - container_type : str - machine_tag : str - ''' - container_type_ = container_type - machine_tag_ = machine_tag - - # Validate arguments against known Juju API types. - if container_type_ is not None and not isinstance(container_type_, (bytes, str)): - raise Exception("Expected container_type_ to be a str, received: {}".format(type(container_type_))) - - if machine_tag_ is not None and not isinstance(machine_tag_, (bytes, str)): - raise Exception("Expected machine_tag_ to be a str, received: {}".format(type(machine_tag_))) - - self.container_type = container_type_ - self.machine_tag = machine_tag_ - self.unknown_fields = unknown_fields - - - -class WatchContainerStartArg(Type): - _toSchema = {'container': 'container', 'entity': 'entity'} - _toPy = {'container': 'container', 'entity': 'entity'} - def __init__(self, container=None, entity=None, **unknown_fields): - ''' - container : str - entity : Entity - ''' - container_ = container - entity_ = Entity.from_json(entity) if entity else None - - # Validate arguments against known Juju API types. - if container_ is not None and not isinstance(container_, (bytes, str)): - raise Exception("Expected container_ to be a str, received: {}".format(type(container_))) - - if entity_ is not None and not isinstance(entity_, (dict, Entity)): - raise Exception("Expected entity_ to be a Entity, received: {}".format(type(entity_))) - - self.container = container_ - self.entity = entity_ - self.unknown_fields = unknown_fields - - - -class WatchContainerStartArgs(Type): - _toSchema = {'args': 'args'} - _toPy = {'args': 'args'} - def __init__(self, args=None, **unknown_fields): - ''' - args : typing.Sequence[~WatchContainerStartArg] - ''' - args_ = [WatchContainerStartArg.from_json(o) for o in args or []] - - # Validate arguments against known Juju API types. - if args_ is not None and not isinstance(args_, (bytes, str, list)): - raise Exception("Expected args_ to be a Sequence, received: {}".format(type(args_))) - - self.args = args_ - self.unknown_fields = unknown_fields - - - -class WatchContainers(Type): - _toSchema = {'params': 'params'} - _toPy = {'params': 'params'} - def __init__(self, params=None, **unknown_fields): - ''' - params : typing.Sequence[~WatchContainer] - ''' - params_ = [WatchContainer.from_json(o) for o in params or []] - - # Validate arguments against known Juju API types. - if params_ is not None and not isinstance(params_, (bytes, str, list)): - raise Exception("Expected params_ to be a Sequence, received: {}".format(type(params_))) - - self.params = params_ - self.unknown_fields = unknown_fields - - - -class WatchRemoteSecretChangesArg(Type): - _toSchema = {'application_token': 'application-token', 'bakery_version': 'bakery-version', 'macaroons': 'macaroons', 'relation_token': 'relation-token'} - _toPy = {'application-token': 'application_token', 'bakery-version': 'bakery_version', 'macaroons': 'macaroons', 'relation-token': 'relation_token'} - def __init__(self, application_token=None, bakery_version=None, macaroons=None, relation_token=None, **unknown_fields): - ''' - application_token : str - bakery_version : int - macaroons : typing.Sequence[~Macaroon] - relation_token : str - ''' - application_token_ = application_token - bakery_version_ = bakery_version - macaroons_ = [Macaroon.from_json(o) for o in macaroons or []] - relation_token_ = relation_token - - # Validate arguments against known Juju API types. - if application_token_ is not None and not isinstance(application_token_, (bytes, str)): - raise Exception("Expected application_token_ to be a str, received: {}".format(type(application_token_))) - - if bakery_version_ is not None and not isinstance(bakery_version_, int): - raise Exception("Expected bakery_version_ to be a int, received: {}".format(type(bakery_version_))) - - if macaroons_ is not None and not isinstance(macaroons_, (bytes, str, list)): - raise Exception("Expected macaroons_ to be a Sequence, received: {}".format(type(macaroons_))) - - if relation_token_ is not None and not isinstance(relation_token_, (bytes, str)): - raise Exception("Expected relation_token_ to be a str, received: {}".format(type(relation_token_))) - - self.application_token = application_token_ - self.bakery_version = bakery_version_ - self.macaroons = macaroons_ - self.relation_token = relation_token_ - self.unknown_fields = unknown_fields - - - -class WatchRemoteSecretChangesArgs(Type): - _toSchema = {'relations': 'relations'} - _toPy = {'relations': 'relations'} - def __init__(self, relations=None, **unknown_fields): - ''' - relations : typing.Sequence[~WatchRemoteSecretChangesArg] - ''' - relations_ = [WatchRemoteSecretChangesArg.from_json(o) for o in relations or []] - - # Validate arguments against known Juju API types. - if relations_ is not None and not isinstance(relations_, (bytes, str, list)): - raise Exception("Expected relations_ to be a Sequence, received: {}".format(type(relations_))) - - self.relations = relations_ - self.unknown_fields = unknown_fields - - - class ZoneResult(Type): _toSchema = {'available': 'available', 'error': 'error', 'name': 'name'} _toPy = {'available': 'available', 'error': 'error', 'name': 'name'} diff --git a/juju/client/connection.py b/juju/client/connection.py index cb87f118..c39e2dbb 100644 --- a/juju/client/connection.py +++ b/juju/client/connection.py @@ -22,46 +22,44 @@ # Please keep in alphabetical order client_facades = { - 'Action': {'versions': [2, 6, 7]}, + 'Action': {'versions': [7]}, 'ActionPruner': {'versions': [1]}, - 'Agent': {'versions': [2, 3]}, + 'Agent': {'versions': [3]}, 'AgentLifeFlag': {'versions': [1]}, 'AgentTools': {'versions': [1]}, - 'AllModelWatcher': {'versions': [2, 3, 4]}, - 'AllWatcher': {'versions': [1, 2, 3, 4]}, + 'AllModelWatcher': {'versions': [4]}, + 'AllWatcher': {'versions': [3]}, 'Annotations': {'versions': [2]}, - 'Application': {'versions': [14, 15, 16, 17, 19]}, - 'ApplicationOffers': {'versions': [1, 2, 4]}, + 'Application': {'versions': [15, 16, 17, 18, 19]}, + 'ApplicationOffers': {'versions': [4]}, 'ApplicationScaler': {'versions': [1]}, - 'Backups': {'versions': [1, 2, 3]}, + 'Backups': {'versions': [3]}, 'Block': {'versions': [2]}, - 'Bundle': {'versions': [5, 6]}, - 'CharmHub': {'versions': [1]}, - 'CharmRevisionUpdater': {'versions': [2]}, - 'CharmDownloader': {'versions': [1]}, - 'Charms': {'versions': [5, 6]}, - 'Cleaner': {'versions': [2]}, - 'Client': {'versions': [5, 6]}, - 'Cloud': {'versions': [1, 2, 3, 4, 5, 7]}, - 'Controller': {'versions': [9, 11]}, - 'CrossModelRelations': {'versions': [1, 2]}, - 'CrossModelSecrets': {'versions': [1]}, - 'CrossController': {'versions': [1]}, - 'CredentialManager': {'versions': [1]}, - 'CredentialValidator': {'versions': [1, 2]}, + 'Bundle': {'versions': [6]}, 'CAASAdmission': {'versions': [1]}, - 'CAASAgent': {'versions': [1, 2]}, + 'CAASAgent': {'versions': [2]}, 'CAASApplication': {'versions': [1]}, 'CAASApplicationProvisioner': {'versions': [1]}, 'CAASFirewaller': {'versions': [1]}, - 'CAASFirewallerEmbedded': {'versions': [1]}, 'CAASFirewallerSidecar': {'versions': [1]}, - 'CAASModelOperator': {'versions': [1]}, 'CAASModelConfigManager': {'versions': [1]}, + 'CAASModelOperator': {'versions': [1]}, 'CAASOperator': {'versions': [1]}, 'CAASOperatorProvisioner': {'versions': [1]}, 'CAASOperatorUpgrader': {'versions': [1]}, - 'CAASUnitProvisioner': {'versions': [1, 2]}, + 'CAASUnitProvisioner': {'versions': [2]}, + 'CharmDownloader': {'versions': [1]}, + 'CharmRevisionUpdater': {'versions': [2]}, + 'Charms': {'versions': [5, 6, 7]}, + 'Cleaner': {'versions': [2]}, + 'Client': {'versions': [6, 7]}, + 'Cloud': {'versions': [7]}, + 'Controller': {'versions': [11]}, + 'CredentialManager': {'versions': [1]}, + 'CredentialValidator': {'versions': [2]}, + 'CrossController': {'versions': [1]}, + 'CrossModelRelations': {'versions': [2, 3]}, + 'CrossModelSecrets': {'versions': [1]}, 'Deployer': {'versions': [1]}, 'DiskManager': {'versions': [2]}, 'EntityWatcher': {'versions': [2]}, @@ -69,37 +67,36 @@ 'ExternalControllerUpdater': {'versions': [1]}, 'FanConfigurer': {'versions': [1]}, 'FilesystemAttachmentsWatcher': {'versions': [2]}, - 'Firewaller': {'versions': [3, 4, 5, 7]}, 'FirewallRules': {'versions': [1]}, + 'Firewaller': {'versions': [7]}, 'HighAvailability': {'versions': [2]}, 'HostKeyReporter': {'versions': [1]}, - 'ImageManager': {'versions': [2]}, 'ImageMetadata': {'versions': [3]}, 'ImageMetadataManager': {'versions': [1]}, - 'InstanceMutater': {'versions': [2, 3]}, - 'InstancePoller': {'versions': [3, 4]}, + 'InstanceMutater': {'versions': [3]}, + 'InstancePoller': {'versions': [4]}, 'KeyManager': {'versions': [1]}, 'KeyUpdater': {'versions': [1]}, 'LeadershipService': {'versions': [2]}, 'LifeFlag': {'versions': [1]}, - 'Logger': {'versions': [1]}, 'LogForwarding': {'versions': [1]}, - 'Machiner': {'versions': [1, 2, 5]}, + 'Logger': {'versions': [1]}, 'MachineActions': {'versions': [1]}, 'MachineManager': {'versions': [9, 10]}, 'MachineUndertaker': {'versions': [1]}, - 'MeterStatus': {'versions': [1, 2]}, + 'Machiner': {'versions': [5]}, + 'MeterStatus': {'versions': [2]}, 'MetricsAdder': {'versions': [2]}, 'MetricsDebug': {'versions': [2]}, 'MetricsManager': {'versions': [1]}, 'MigrationFlag': {'versions': [1]}, - 'MigrationMaster': {'versions': [1, 3]}, + 'MigrationMaster': {'versions': [3]}, 'MigrationMinion': {'versions': [1]}, 'MigrationStatusWatcher': {'versions': [1]}, - 'MigrationTarget': {'versions': [1]}, - 'ModelConfig': {'versions': [1, 2, 3]}, - 'ModelGeneration': {'versions': [1, 2, 4]}, - 'ModelManager': {'versions': [2, 3, 4, 5, 9]}, + 'MigrationTarget': {'versions': [1, 2, 3]}, + 'ModelConfig': {'versions': [3]}, + 'ModelGeneration': {'versions': [4]}, + 'ModelManager': {'versions': [9]}, 'ModelSummaryWatcher': {'versions': [1]}, 'ModelUpgrader': {'versions': [1]}, 'NotifyWatcher': {'versions': [1]}, @@ -108,45 +105,43 @@ 'PayloadsHookContext': {'versions': [1]}, 'Pinger': {'versions': [1]}, 'Provisioner': {'versions': [11]}, - 'ProxyUpdater': {'versions': [1, 2]}, - 'RaftLease': {'versions': [1, 2]}, + 'ProxyUpdater': {'versions': [2]}, + 'RaftLease': {'versions': [2]}, 'Reboot': {'versions': [2]}, 'RelationStatusWatcher': {'versions': [1]}, 'RelationUnitsWatcher': {'versions': [1]}, - 'RemoteRelations': {'versions': [1, 2]}, 'RemoteRelationWatcher': {'versions': [1]}, - 'Resources': {'versions': [1, 2, 3]}, + 'RemoteRelations': {'versions': [2]}, + 'Resources': {'versions': [3]}, 'ResourcesHookContext': {'versions': [1]}, - 'Resumer': {'versions': [2]}, 'RetryStrategy': {'versions': [1]}, - 'Secrets': {'versions': [1, 2]}, - 'SecretsManager': {'versions': [1, 2]}, + 'SSHClient': {'versions': [4]}, 'SecretBackends': {'versions': [1]}, 'SecretBackendsManager': {'versions': [1]}, 'SecretBackendsRotateWatcher': {'versions': [1]}, + 'Secrets': {'versions': [1, 2]}, 'SecretsDrain': {'versions': [1]}, + 'SecretsManager': {'versions': [1, 2]}, 'SecretsRevisionWatcher': {'versions': [1]}, - 'SecretsRotationWatcher': {'versions': [1]}, 'SecretsTriggerWatcher': {'versions': [1]}, 'Singular': {'versions': [2]}, 'Spaces': {'versions': [6]}, 'StatusHistory': {'versions': [2]}, - 'Storage': {'versions': [3, 4, 6]}, - 'StorageProvisioner': {'versions': [3, 4]}, + 'Storage': {'versions': [6]}, + 'StorageProvisioner': {'versions': [4]}, 'StringsWatcher': {'versions': [1]}, - 'Subnets': {'versions': [2, 4, 5]}, - 'SSHClient': {'versions': [1, 2, 3, 4]}, + 'Subnets': {'versions': [5]}, 'Undertaker': {'versions': [1]}, 'UnitAssigner': {'versions': [1]}, - 'Uniter': {'versions': [18]}, + 'Uniter': {'versions': [18, 19]}, + 'UpgradeSeries': {'versions': [3]}, + 'UpgradeSteps': {'versions': [2]}, 'Upgrader': {'versions': [1]}, - 'UpgradeSeries': {'versions': [1, 3]}, - 'UpgradeSteps': {'versions': [1, 2]}, - 'UserManager': {'versions': [1, 2, 3]}, + 'UserManager': {'versions': [3]}, 'UserSecretsDrain': {'versions': [1]}, 'UserSecretsManager': {'versions': [1]}, - 'VolumeAttachmentsWatcher': {'versions': [2]}, 'VolumeAttachmentPlansWatcher': {'versions': [1]}, + 'VolumeAttachmentsWatcher': {'versions': [2]}, } diff --git a/juju/client/schemas-juju-3.1.0.json b/juju/client/schemas-juju-3.1.0.json deleted file mode 100644 index 87eea29a..00000000 --- a/juju/client/schemas-juju-3.1.0.json +++ /dev/null @@ -1,50534 +0,0 @@ -[ - { - "Name": "Action", - "Description": "APIv7 provides the Action API facade for version 7.", - "Version": 7, - "AvailableTo": [ - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "Actions": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ActionResults" - } - }, - "description": "Actions takes a list of ActionTags, and returns the full Action for\neach ID." - }, - "ApplicationsCharmsActions": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ApplicationsCharmActionsResults" - } - }, - "description": "ApplicationsCharmsActions returns a slice of charm Actions for a slice of\nservices." - }, - "Cancel": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ActionResults" - } - }, - "description": "Cancel attempts to cancel enqueued Actions from running." - }, - "EnqueueOperation": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Actions" - }, - "Result": { - "$ref": "#/definitions/EnqueuedActions" - } - }, - "description": "EnqueueOperation takes a list of Actions and queues them up to be executed as\nan operation, each action running as a task on the designated ActionReceiver.\nWe return the ID of the overall operation and each individual task." - }, - "ListOperations": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/OperationQueryArgs" - }, - "Result": { - "$ref": "#/definitions/OperationResults" - } - }, - "description": "ListOperations fetches the called actions for specified apps/units." - }, - "Operations": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/OperationResults" - } - }, - "description": "Operations fetches the specified operation ids." - }, - "Run": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RunParams" - }, - "Result": { - "$ref": "#/definitions/EnqueuedActions" - } - }, - "description": "Run the commands specified on the machines identified through the\nlist of machines, units and services." - }, - "RunOnAllMachines": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RunParams" - }, - "Result": { - "$ref": "#/definitions/EnqueuedActions" - } - }, - "description": "RunOnAllMachines attempts to run the specified command on all the machines." - }, - "WatchActionsProgress": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - }, - "description": "WatchActionsProgress creates a watcher that reports on action log messages." - } - }, - "definitions": { - "Action": { - "type": "object", - "properties": { - "execution-group": { - "type": "string" - }, - "name": { - "type": "string" - }, - "parallel": { - "type": "boolean" - }, - "parameters": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "receiver": { - "type": "string" - }, - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "receiver", - "name" - ] - }, - "ActionMessage": { - "type": "object", - "properties": { - "message": { - "type": "string" - }, - "timestamp": { - "type": "string", - "format": "date-time" - } - }, - "additionalProperties": false, - "required": [ - "timestamp", - "message" - ] - }, - "ActionResult": { - "type": "object", - "properties": { - "action": { - "$ref": "#/definitions/Action" - }, - "completed": { - "type": "string", - "format": "date-time" - }, - "enqueued": { - "type": "string", - "format": "date-time" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "log": { - "type": "array", - "items": { - "$ref": "#/definitions/ActionMessage" - } - }, - "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 - }, - "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" - } - } - }, - "additionalProperties": false - }, - "ApplicationCharmActionsResult": { - "type": "object", - "properties": { - "actions": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/ActionSpec" - } - } - }, - "application-tag": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ApplicationsCharmActionsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ApplicationCharmActionsResult" - } - } - }, - "additionalProperties": false - }, - "EnqueuedActions": { - "type": "object", - "properties": { - "actions": { - "type": "array", - "items": { - "$ref": "#/definitions/ActionResult" - } - }, - "operation": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "operation" - ] - }, - "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": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "OperationQueryArgs": { - "type": "object", - "properties": { - "actions": { - "type": "array", - "items": { - "type": "string" - } - }, - "applications": { - "type": "array", - "items": { - "type": "string" - } - }, - "limit": { - "type": "integer" - }, - "machines": { - "type": "array", - "items": { - "type": "string" - } - }, - "offset": { - "type": "integer" - }, - "status": { - "type": "array", - "items": { - "type": "string" - } - }, - "units": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "OperationResult": { - "type": "object", - "properties": { - "actions": { - "type": "array", - "items": { - "$ref": "#/definitions/ActionResult" - } - }, - "completed": { - "type": "string", - "format": "date-time" - }, - "enqueued": { - "type": "string", - "format": "date-time" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "fail": { - "type": "string" - }, - "operation": { - "type": "string" - }, - "started": { - "type": "string", - "format": "date-time" - }, - "status": { - "type": "string" - }, - "summary": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "operation", - "summary" - ] - }, - "OperationResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/OperationResult" - } - }, - "truncated": { - "type": "boolean" - } - }, - "additionalProperties": false - }, - "RunParams": { - "type": "object", - "properties": { - "applications": { - "type": "array", - "items": { - "type": "string" - } - }, - "commands": { - "type": "string" - }, - "execution-group": { - "type": "string" - }, - "machines": { - "type": "array", - "items": { - "type": "string" - } - }, - "parallel": { - "type": "boolean" - }, - "timeout": { - "type": "integer" - }, - "units": { - "type": "array", - "items": { - "type": "string" - } - }, - "workload-context": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "commands", - "timeout" - ] - }, - "StringsWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id" - ] - }, - "StringsWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringsWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - } - } - } - }, - { - "Name": "ActionPruner", - "Description": "API provides access to the action pruner API.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "ModelConfig": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ModelConfigResult" - } - }, - "description": "ModelConfig returns the current model's configuration." - }, - "Prune": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ActionPruneArgs" - } - }, - "description": "Prune endpoint removes action entries until\nonly the ones newer than now - p.MaxHistoryTime remain and\nthe history is smaller than p.MaxHistoryMB." - }, - "WatchForModelConfigChanges": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResult" - } - }, - "description": "WatchForModelConfigChanges returns a NotifyWatcher that observes\nchanges to the model configuration.\nNote that although the NotifyWatchResult contains an Error field,\nit's not used because we are only returning a single watcher,\nso we use the regular error return." - } - }, - "definitions": { - "ActionPruneArgs": { - "type": "object", - "properties": { - "max-history-mb": { - "type": "integer" - }, - "max-history-time": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "max-history-time", - "max-history-mb" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ModelConfigResult": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - } - } - } - }, - { - "Name": "Admin", - "Description": "admin is the only object that unlogged-in clients can access. It holds any\nmethods that are needed to log in.", - "Version": 3, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "controller-user", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "Login": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/LoginRequest" - }, - "Result": { - "$ref": "#/definitions/LoginResult" - } - }, - "description": "Login logs in with the provided credentials. All subsequent requests on the\nconnection will act as the authenticated user." - }, - "RedirectInfo": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/RedirectInfoResult" - } - }, - "description": "RedirectInfo returns redirected host information for the model.\nIn Juju it always returns an error because the Juju controller\ndoes not multiplex controllers." - } - }, - "definitions": { - "Address": { - "type": "object", - "properties": { - "cidr": { - "type": "string" - }, - "config-type": { - "type": "string" - }, - "is-secondary": { - "type": "boolean" - }, - "scope": { - "type": "string" - }, - "space-id": { - "type": "string" - }, - "space-name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "value", - "type", - "scope" - ] - }, - "AuthUserInfo": { - "type": "object", - "properties": { - "controller-access": { - "type": "string" - }, - "credentials": { - "type": "string" - }, - "display-name": { - "type": "string" - }, - "identity": { - "type": "string" - }, - "last-connection": { - "type": "string", - "format": "date-time" - }, - "model-access": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "display-name", - "identity", - "controller-access", - "model-access" - ] - }, - "FacadeVersions": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "versions": { - "type": "array", - "items": { - "type": "integer" - } - } - }, - "additionalProperties": false, - "required": [ - "name", - "versions" - ] - }, - "HostPort": { - "type": "object", - "properties": { - "Address": { - "$ref": "#/definitions/Address" - }, - "cidr": { - "type": "string" - }, - "config-type": { - "type": "string" - }, - "is-secondary": { - "type": "boolean" - }, - "port": { - "type": "integer" - }, - "scope": { - "type": "string" - }, - "space-id": { - "type": "string" - }, - "space-name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "value", - "type", - "scope", - "Address", - "port" - ] - }, - "LoginRequest": { - "type": "object", - "properties": { - "auth-tag": { - "type": "string" - }, - "bakery-version": { - "type": "integer" - }, - "cli-args": { - "type": "string" - }, - "client-version": { - "type": "string" - }, - "credentials": { - "type": "string" - }, - "macaroons": { - "type": "array", - "items": { - "type": "array", - "items": { - "$ref": "#/definitions/Macaroon" - } - } - }, - "nonce": { - "type": "string" - }, - "user-data": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "auth-tag", - "credentials", - "nonce", - "macaroons", - "user-data" - ] - }, - "LoginResult": { - "type": "object", - "properties": { - "bakery-discharge-required": { - "$ref": "#/definitions/Macaroon" - }, - "controller-tag": { - "type": "string" - }, - "discharge-required": { - "$ref": "#/definitions/Macaroon" - }, - "discharge-required-error": { - "type": "string" - }, - "facades": { - "type": "array", - "items": { - "$ref": "#/definitions/FacadeVersions" - } - }, - "model-tag": { - "type": "string" - }, - "public-dns-name": { - "type": "string" - }, - "server-version": { - "type": "string" - }, - "servers": { - "type": "array", - "items": { - "type": "array", - "items": { - "$ref": "#/definitions/HostPort" - } - } - }, - "user-info": { - "$ref": "#/definitions/AuthUserInfo" - } - }, - "additionalProperties": false - }, - "Macaroon": { - "type": "object", - "additionalProperties": false - }, - "RedirectInfoResult": { - "type": "object", - "properties": { - "ca-cert": { - "type": "string" - }, - "servers": { - "type": "array", - "items": { - "type": "array", - "items": { - "$ref": "#/definitions/HostPort" - } - } - } - }, - "additionalProperties": false, - "required": [ - "servers", - "ca-cert" - ] - } - } - } - }, - { - "Name": "Agent", - "Description": "AgentAPI implements the version 3 of the API provided to an agent.", - "Version": 3, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent" - ], - "Schema": { - "type": "object", - "properties": { - "ClearReboot": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "ClearReboot will clear the reboot flag on provided machines, if it exists." - }, - "CloudSpec": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/CloudSpecResults" - } - }, - "description": "CloudSpec returns the model's cloud spec." - }, - "ControllerAPIInfoForModels": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ControllerAPIInfoResults" - } - }, - "description": "ControllerAPIInfoForModels returns the controller api connection details for the specified models." - }, - "ControllerConfig": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ControllerConfigResult" - } - }, - "description": "ControllerConfig returns the controller's configuration." - }, - "GetCloudSpec": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ModelTag" - }, - "Result": { - "$ref": "#/definitions/CloudSpecResult" - } - }, - "description": "GetCloudSpec constructs the CloudSpec for a validated and authorized model." - }, - "GetEntities": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/AgentGetEntitiesResults" - } - } - }, - "IsMaster": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/IsMasterResult" - } - } - }, - "ModelConfig": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ModelConfigResult" - } - }, - "description": "ModelConfig returns the current model's configuration." - }, - "SetPasswords": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/EntityPasswords" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetPasswords sets the given password for each supplied entity, if possible." - }, - "StateServingInfo": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StateServingInfo" - } - } - }, - "WatchCloudSpecsChanges": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "WatchCloudSpecsChanges returns a watcher for cloud spec changes." - }, - "WatchCredentials": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "WatchCredentials watches for changes to the specified credentials." - }, - "WatchForModelConfigChanges": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResult" - } - }, - "description": "WatchForModelConfigChanges returns a NotifyWatcher that observes\nchanges to the model configuration.\nNote that although the NotifyWatchResult contains an Error field,\nit's not used because we are only returning a single watcher,\nso we use the regular error return." - } - }, - "definitions": { - "AgentGetEntitiesResult": { - "type": "object", - "properties": { - "container-type": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "jobs": { - "type": "array", - "items": { - "type": "string" - } - }, - "life": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "life", - "jobs", - "container-type" - ] - }, - "AgentGetEntitiesResults": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/AgentGetEntitiesResult" - } - } - }, - "additionalProperties": false, - "required": [ - "entities" - ] - }, - "CloudCredential": { - "type": "object", - "properties": { - "attrs": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "auth-type": { - "type": "string" - }, - "redacted": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "auth-type" - ] - }, - "CloudSpec": { - "type": "object", - "properties": { - "cacertificates": { - "type": "array", - "items": { - "type": "string" - } - }, - "credential": { - "$ref": "#/definitions/CloudCredential" - }, - "endpoint": { - "type": "string" - }, - "identity-endpoint": { - "type": "string" - }, - "is-controller-cloud": { - "type": "boolean" - }, - "name": { - "type": "string" - }, - "region": { - "type": "string" - }, - "skip-tls-verify": { - "type": "boolean" - }, - "storage-endpoint": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type", - "name" - ] - }, - "CloudSpecResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/CloudSpec" - } - }, - "additionalProperties": false - }, - "CloudSpecResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/CloudSpecResult" - } - } - }, - "additionalProperties": false - }, - "ControllerAPIInfoResult": { - "type": "object", - "properties": { - "addresses": { - "type": "array", - "items": { - "type": "string" - } - }, - "cacert": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "addresses", - "cacert" - ] - }, - "ControllerAPIInfoResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ControllerAPIInfoResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ControllerConfigResult": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "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" - ] - }, - "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" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "IsMasterResult": { - "type": "object", - "properties": { - "master": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "master" - ] - }, - "ModelConfigResult": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "ModelTag": { - "type": "object", - "additionalProperties": false - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "NotifyWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "StateServingInfo": { - "type": "object", - "properties": { - "api-port": { - "type": "integer" - }, - "ca-private-key": { - "type": "string" - }, - "cert": { - "type": "string" - }, - "controller-api-port": { - "type": "integer" - }, - "private-key": { - "type": "string" - }, - "shared-secret": { - "type": "string" - }, - "state-port": { - "type": "integer" - }, - "system-identity": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "api-port", - "state-port", - "cert", - "private-key", - "ca-private-key", - "shared-secret", - "system-identity" - ] - } - } - } - }, - { - "Name": "AgentTools", - "Description": "AgentToolsAPI implements the API used by the machine model worker.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "UpdateToolsAvailable": { - "type": "object", - "description": "UpdateToolsAvailable invokes a lookup and further update in environ\nfor new patches of the current tool versions." - } - } - } - }, - { - "Name": "AllModelWatcher", - "Description": "SrvAllWatcher defines the API methods on a state.Multiwatcher.\nwhich watches any changes to the state. Each client has its own\ncurrent set of watchers, stored in resources. It is used by both\nthe AllWatcher and AllModelWatcher facades.", - "Version": 4, - "AvailableTo": [ - "controller-user" - ], - "Schema": { - "type": "object", - "properties": { - "Next": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/AllWatcherNextResults" - } - }, - "description": "Next will return the current state of everything on the first call\nand subsequent calls will" - }, - "Stop": { - "type": "object", - "description": "Stop stops the watcher." - } - }, - "definitions": { - "AllWatcherNextResults": { - "type": "object", - "properties": { - "deltas": { - "type": "array", - "items": { - "$ref": "#/definitions/Delta" - } - } - }, - "additionalProperties": false, - "required": [ - "deltas" - ] - }, - "Delta": { - "type": "object", - "properties": { - "entity": { - "type": "object", - "additionalProperties": true - }, - "removed": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "removed", - "entity" - ] - } - } - } - }, - { - "Name": "AllWatcher", - "Description": "SrvAllWatcher defines the API methods on a state.Multiwatcher.\nwhich watches any changes to the state. Each client has its own\ncurrent set of watchers, stored in resources. It is used by both\nthe AllWatcher and AllModelWatcher facades.", - "Version": 3, - "AvailableTo": [ - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "Next": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/AllWatcherNextResults" - } - }, - "description": "Next will return the current state of everything on the first call\nand subsequent calls will" - }, - "Stop": { - "type": "object", - "description": "Stop stops the watcher." - } - }, - "definitions": { - "AllWatcherNextResults": { - "type": "object", - "properties": { - "deltas": { - "type": "array", - "items": { - "$ref": "#/definitions/Delta" - } - } - }, - "additionalProperties": false, - "required": [ - "deltas" - ] - }, - "Delta": { - "type": "object", - "properties": { - "entity": { - "type": "object", - "additionalProperties": true - }, - "removed": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "removed", - "entity" - ] - } - } - } - }, - { - "Name": "Annotations", - "Description": "API implements the service interface and is the concrete\nimplementation of the api end point.", - "Version": 2, - "AvailableTo": [ - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "Get": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/AnnotationsGetResults" - } - }, - "description": "Get returns annotations for given entities.\nIf annotations cannot be retrieved for a given entity, an error is returned.\nEach entity is treated independently and, hence, will fail or succeed independently." - }, - "Set": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/AnnotationsSet" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "Set stores annotations for given entities" - } - }, - "definitions": { - "AnnotationsGetResult": { - "type": "object", - "properties": { - "annotations": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "entity": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/ErrorResult" - } - }, - "additionalProperties": false, - "required": [ - "entity", - "annotations" - ] - }, - "AnnotationsGetResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/AnnotationsGetResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "AnnotationsSet": { - "type": "object", - "properties": { - "annotations": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityAnnotations" - } - } - }, - "additionalProperties": false, - "required": [ - "annotations" - ] - }, - "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" - ] - }, - "EntityAnnotations": { - "type": "object", - "properties": { - "annotations": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "entity": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "entity", - "annotations" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - } - } - } - }, - { - "Name": "Application", - "Description": "APIv17 provides the Application API facade for version 17.", - "Version": 17, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "AddRelation": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/AddRelation" - }, - "Result": { - "$ref": "#/definitions/AddRelationResults" - } - }, - "description": "AddRelation adds a relation between the specified endpoints and returns the relation info." - }, - "AddUnits": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/AddApplicationUnits" - }, - "Result": { - "$ref": "#/definitions/AddApplicationUnitsResults" - } - }, - "description": "AddUnits adds a given number of units to an application." - }, - "ApplicationsInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ApplicationInfoResults" - } - }, - "description": "ApplicationsInfo returns applications information." - }, - "CharmConfig": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ApplicationGetArgs" - }, - "Result": { - "$ref": "#/definitions/ApplicationGetConfigResults" - } - }, - "description": "CharmConfig returns charm config for the input list of applications and\nmodel generations." - }, - "CharmRelations": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ApplicationCharmRelations" - }, - "Result": { - "$ref": "#/definitions/ApplicationCharmRelationsResults" - } - }, - "description": "CharmRelations implements the server side of Application.CharmRelations." - }, - "Consume": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ConsumeApplicationArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "Consume adds remote applications to the model without creating any\nrelations." - }, - "Deploy": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ApplicationsDeploy" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "Deploy fetches the charms from the charm store and deploys them\nusing the specified placement directives." - }, - "DestroyApplication": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/DestroyApplicationsParams" - }, - "Result": { - "$ref": "#/definitions/DestroyApplicationResults" - } - }, - "description": "DestroyApplication removes a given set of applications." - }, - "DestroyConsumedApplications": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/DestroyConsumedApplicationsParams" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "DestroyConsumedApplications removes a given set of consumed (remote) applications." - }, - "DestroyRelation": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/DestroyRelation" - } - }, - "description": "DestroyRelation removes the relation between the\nspecified endpoints or an id." - }, - "DestroyUnit": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/DestroyUnitsParams" - }, - "Result": { - "$ref": "#/definitions/DestroyUnitResults" - } - }, - "description": "DestroyUnit removes a given set of application units." - }, - "Expose": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ApplicationExpose" - } - }, - "description": "Expose changes the juju-managed firewall to expose any ports that\nwere also explicitly marked by units as open." - }, - "Get": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ApplicationGet" - }, - "Result": { - "$ref": "#/definitions/ApplicationGetResults" - } - }, - "description": "Get returns the charm configuration for an application." - }, - "GetCharmURLOrigin": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ApplicationGet" - }, - "Result": { - "$ref": "#/definitions/CharmURLOriginResult" - } - }, - "description": "GetCharmURLOrigin returns the charm URL and charm origin the given\napplication is running at present." - }, - "GetConfig": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ApplicationGetConfigResults" - } - }, - "description": "GetConfig returns the charm config for each of the input applications." - }, - "GetConstraints": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ApplicationGetConstraintsResults" - } - }, - "description": "GetConstraints returns the constraints for a given application." - }, - "Leader": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entity" - }, - "Result": { - "$ref": "#/definitions/StringResult" - } - }, - "description": "Leader returns the unit name of the leader for the given application." - }, - "MergeBindings": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ApplicationMergeBindingsArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "MergeBindings merges operator-defined bindings with the current bindings for\none or more applications." - }, - "ResolveUnitErrors": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/UnitsResolved" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "ResolveUnitErrors marks errors on the specified units as resolved." - }, - "ScaleApplications": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ScaleApplicationsParams" - }, - "Result": { - "$ref": "#/definitions/ScaleApplicationResults" - } - }, - "description": "ScaleApplications scales the specified application to the requested number of units." - }, - "SetCharm": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ApplicationSetCharm" - } - }, - "description": "SetCharm sets the charm for a given for the application." - }, - "SetConfigs": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ConfigSetArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetConfigs implements the server side of Application.SetConfig. Both\napplication and charm config are set. It does not unset values in\nConfig map that are set to an empty string. Unset should be used for that." - }, - "SetConstraints": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetConstraints" - } - }, - "description": "SetConstraints sets the constraints for a given application." - }, - "SetMetricCredentials": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ApplicationMetricCredentials" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetMetricCredentials sets credentials on the application." - }, - "SetRelationsSuspended": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RelationSuspendedArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetRelationsSuspended sets the suspended status of the specified relations." - }, - "Unexpose": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ApplicationUnexpose" - } - }, - "description": "Unexpose changes the juju-managed firewall to unexpose any ports that\nwere also explicitly marked by units as open." - }, - "UnitsInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/UnitInfoResults" - } - }, - "description": "UnitsInfo returns unit information for the given entities (units or\napplications)." - }, - "UnsetApplicationsConfig": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ApplicationConfigUnsetArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "UnsetApplicationsConfig implements the server side of Application.UnsetApplicationsConfig." - }, - "UpdateApplicationBase": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/UpdateChannelArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "UpdateApplicationBase updates the application base.\nBase for subordinates is updated too." - } - }, - "definitions": { - "AddApplicationUnits": { - "type": "object", - "properties": { - "application": { - "type": "string" - }, - "attach-storage": { - "type": "array", - "items": { - "type": "string" - } - }, - "num-units": { - "type": "integer" - }, - "placement": { - "type": "array", - "items": { - "$ref": "#/definitions/Placement" - } - }, - "policy": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "application", - "num-units", - "placement" - ] - }, - "AddApplicationUnitsResults": { - "type": "object", - "properties": { - "units": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "units" - ] - }, - "AddRelation": { - "type": "object", - "properties": { - "endpoints": { - "type": "array", - "items": { - "type": "string" - } - }, - "via-cidrs": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "endpoints" - ] - }, - "AddRelationResults": { - "type": "object", - "properties": { - "endpoints": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmRelation" - } - } - } - }, - "additionalProperties": false, - "required": [ - "endpoints" - ] - }, - "ApplicationCharmRelations": { - "type": "object", - "properties": { - "application": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "application" - ] - }, - "ApplicationCharmRelationsResults": { - "type": "object", - "properties": { - "charm-relations": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "charm-relations" - ] - }, - "ApplicationConfigUnsetArgs": { - "type": "object", - "properties": { - "Args": { - "type": "array", - "items": { - "$ref": "#/definitions/ApplicationUnset" - } - } - }, - "additionalProperties": false, - "required": [ - "Args" - ] - }, - "ApplicationConstraint": { - "type": "object", - "properties": { - "constraints": { - "$ref": "#/definitions/Value" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "constraints" - ] - }, - "ApplicationDeploy": { - "type": "object", - "properties": { - "Force": { - "type": "boolean" - }, - "application": { - "type": "string" - }, - "attach-storage": { - "type": "array", - "items": { - "type": "string" - } - }, - "channel": { - "type": "string" - }, - "charm-origin": { - "$ref": "#/definitions/CharmOrigin" - }, - "charm-url": { - "type": "string" - }, - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "config-yaml": { - "type": "string" - }, - "constraints": { - "$ref": "#/definitions/Value" - }, - "devices": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/Constraints" - } - } - }, - "endpoint-bindings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "num-units": { - "type": "integer" - }, - "placement": { - "type": "array", - "items": { - "$ref": "#/definitions/Placement" - } - }, - "policy": { - "type": "string" - }, - "resources": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "storage": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/Constraints" - } - } - } - }, - "additionalProperties": false, - "required": [ - "application", - "charm-url", - "channel", - "num-units", - "config-yaml", - "constraints", - "Force" - ] - }, - "ApplicationExpose": { - "type": "object", - "properties": { - "application": { - "type": "string" - }, - "exposed-endpoints": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/ExposedEndpoint" - } - } - } - }, - "additionalProperties": false, - "required": [ - "application" - ] - }, - "ApplicationGet": { - "type": "object", - "properties": { - "application": { - "type": "string" - }, - "branch": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "application", - "branch" - ] - }, - "ApplicationGetArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/ApplicationGet" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "ApplicationGetConfigResults": { - "type": "object", - "properties": { - "Results": { - "type": "array", - "items": { - "$ref": "#/definitions/ConfigResult" - } - } - }, - "additionalProperties": false, - "required": [ - "Results" - ] - }, - "ApplicationGetConstraintsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ApplicationConstraint" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ApplicationGetResults": { - "type": "object", - "properties": { - "application": { - "type": "string" - }, - "application-config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "base": { - "$ref": "#/definitions/Base" - }, - "channel": { - "type": "string" - }, - "charm": { - "type": "string" - }, - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "constraints": { - "$ref": "#/definitions/Value" - }, - "endpoint-bindings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - } - }, - "additionalProperties": false, - "required": [ - "application", - "charm", - "config", - "constraints", - "base", - "channel" - ] - }, - "ApplicationInfoResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/ApplicationResult" - } - }, - "additionalProperties": false - }, - "ApplicationInfoResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ApplicationInfoResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ApplicationMergeBindings": { - "type": "object", - "properties": { - "application-tag": { - "type": "string" - }, - "bindings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "force": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "application-tag", - "bindings", - "force" - ] - }, - "ApplicationMergeBindingsArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/ApplicationMergeBindings" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "ApplicationMetricCredential": { - "type": "object", - "properties": { - "application": { - "type": "string" - }, - "metrics-credentials": { - "type": "array", - "items": { - "type": "integer" - } - } - }, - "additionalProperties": false, - "required": [ - "application", - "metrics-credentials" - ] - }, - "ApplicationMetricCredentials": { - "type": "object", - "properties": { - "creds": { - "type": "array", - "items": { - "$ref": "#/definitions/ApplicationMetricCredential" - } - } - }, - "additionalProperties": false, - "required": [ - "creds" - ] - }, - "ApplicationOfferDetails": { - "type": "object", - "properties": { - "application-description": { - "type": "string" - }, - "bindings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "endpoints": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoteEndpoint" - } - }, - "offer-name": { - "type": "string" - }, - "offer-url": { - "type": "string" - }, - "offer-uuid": { - "type": "string" - }, - "source-model-tag": { - "type": "string" - }, - "spaces": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoteSpace" - } - }, - "users": { - "type": "array", - "items": { - "$ref": "#/definitions/OfferUserDetails" - } - } - }, - "additionalProperties": false, - "required": [ - "source-model-tag", - "offer-uuid", - "offer-url", - "offer-name", - "application-description" - ] - }, - "ApplicationResult": { - "type": "object", - "properties": { - "base": { - "$ref": "#/definitions/Base" - }, - "channel": { - "type": "string" - }, - "charm": { - "type": "string" - }, - "constraints": { - "$ref": "#/definitions/Value" - }, - "endpoint-bindings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "exposed": { - "type": "boolean" - }, - "exposed-endpoints": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/ExposedEndpoint" - } - } - }, - "life": { - "type": "string" - }, - "principal": { - "type": "boolean" - }, - "remote": { - "type": "boolean" - }, - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "principal", - "exposed", - "remote", - "life" - ] - }, - "ApplicationSetCharm": { - "type": "object", - "properties": { - "application": { - "type": "string" - }, - "channel": { - "type": "string" - }, - "charm-origin": { - "$ref": "#/definitions/CharmOrigin" - }, - "charm-url": { - "type": "string" - }, - "config-settings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "config-settings-yaml": { - "type": "string" - }, - "endpoint-bindings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "force": { - "type": "boolean" - }, - "force-base": { - "type": "boolean" - }, - "force-units": { - "type": "boolean" - }, - "generation": { - "type": "string" - }, - "resource-ids": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "storage-constraints": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/StorageConstraints" - } - } - } - }, - "additionalProperties": false, - "required": [ - "application", - "generation", - "charm-url", - "channel", - "force", - "force-units", - "force-base" - ] - }, - "ApplicationUnexpose": { - "type": "object", - "properties": { - "application": { - "type": "string" - }, - "exposed-endpoints": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "application", - "exposed-endpoints" - ] - }, - "ApplicationUnset": { - "type": "object", - "properties": { - "application": { - "type": "string" - }, - "branch": { - "type": "string" - }, - "options": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "application", - "branch", - "options" - ] - }, - "ApplicationsDeploy": { - "type": "object", - "properties": { - "applications": { - "type": "array", - "items": { - "$ref": "#/definitions/ApplicationDeploy" - } - } - }, - "additionalProperties": false, - "required": [ - "applications" - ] - }, - "Base": { - "type": "object", - "properties": { - "channel": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "channel" - ] - }, - "CharmOrigin": { - "type": "object", - "properties": { - "architecture": { - "type": "string" - }, - "base": { - "$ref": "#/definitions/Base" - }, - "branch": { - "type": "string" - }, - "hash": { - "type": "string" - }, - "id": { - "type": "string" - }, - "instance-key": { - "type": "string" - }, - "revision": { - "type": "integer" - }, - "risk": { - "type": "string" - }, - "source": { - "type": "string" - }, - "track": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "source", - "type", - "id" - ] - }, - "CharmRelation": { - "type": "object", - "properties": { - "interface": { - "type": "string" - }, - "limit": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "optional": { - "type": "boolean" - }, - "role": { - "type": "string" - }, - "scope": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "role", - "interface", - "optional", - "limit", - "scope" - ] - }, - "CharmURLOriginResult": { - "type": "object", - "properties": { - "charm-origin": { - "$ref": "#/definitions/CharmOrigin" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "url": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "url", - "charm-origin" - ] - }, - "ConfigResult": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "ConfigSet": { - "type": "object", - "properties": { - "application": { - "type": "string" - }, - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "config-yaml": { - "type": "string" - }, - "generation": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "application", - "generation", - "config", - "config-yaml" - ] - }, - "ConfigSetArgs": { - "type": "object", - "properties": { - "Args": { - "type": "array", - "items": { - "$ref": "#/definitions/ConfigSet" - } - } - }, - "additionalProperties": false, - "required": [ - "Args" - ] - }, - "Constraints": { - "type": "object", - "properties": { - "Count": { - "type": "integer" - }, - "Pool": { - "type": "string" - }, - "Size": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "Pool", - "Size", - "Count" - ] - }, - "ConsumeApplicationArg": { - "type": "object", - "properties": { - "ApplicationOfferDetails": { - "$ref": "#/definitions/ApplicationOfferDetails" - }, - "application-alias": { - "type": "string" - }, - "application-description": { - "type": "string" - }, - "bindings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "endpoints": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoteEndpoint" - } - }, - "external-controller": { - "$ref": "#/definitions/ExternalControllerInfo" - }, - "macaroon": { - "$ref": "#/definitions/Macaroon" - }, - "offer-name": { - "type": "string" - }, - "offer-url": { - "type": "string" - }, - "offer-uuid": { - "type": "string" - }, - "source-model-tag": { - "type": "string" - }, - "spaces": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoteSpace" - } - }, - "users": { - "type": "array", - "items": { - "$ref": "#/definitions/OfferUserDetails" - } - } - }, - "additionalProperties": false, - "required": [ - "source-model-tag", - "offer-uuid", - "offer-url", - "offer-name", - "application-description", - "ApplicationOfferDetails" - ] - }, - "ConsumeApplicationArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/ConsumeApplicationArg" - } - } - }, - "additionalProperties": false - }, - "DestroyApplicationInfo": { - "type": "object", - "properties": { - "destroyed-storage": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } - }, - "destroyed-units": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } - }, - "detached-storage": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } - } - }, - "additionalProperties": false - }, - "DestroyApplicationParams": { - "type": "object", - "properties": { - "application-tag": { - "type": "string" - }, - "destroy-storage": { - "type": "boolean" - }, - "dry-run": { - "type": "boolean" - }, - "force": { - "type": "boolean" - }, - "max-wait": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "application-tag", - "force" - ] - }, - "DestroyApplicationResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "info": { - "$ref": "#/definitions/DestroyApplicationInfo" - } - }, - "additionalProperties": false - }, - "DestroyApplicationResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/DestroyApplicationResult" - } - } - }, - "additionalProperties": false - }, - "DestroyApplicationsParams": { - "type": "object", - "properties": { - "applications": { - "type": "array", - "items": { - "$ref": "#/definitions/DestroyApplicationParams" - } - } - }, - "additionalProperties": false, - "required": [ - "applications" - ] - }, - "DestroyConsumedApplicationParams": { - "type": "object", - "properties": { - "application-tag": { - "type": "string" - }, - "force": { - "type": "boolean" - }, - "max-wait": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "application-tag" - ] - }, - "DestroyConsumedApplicationsParams": { - "type": "object", - "properties": { - "applications": { - "type": "array", - "items": { - "$ref": "#/definitions/DestroyConsumedApplicationParams" - } - } - }, - "additionalProperties": false, - "required": [ - "applications" - ] - }, - "DestroyRelation": { - "type": "object", - "properties": { - "endpoints": { - "type": "array", - "items": { - "type": "string" - } - }, - "force": { - "type": "boolean" - }, - "max-wait": { - "type": "integer" - }, - "relation-id": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "relation-id" - ] - }, - "DestroyUnitInfo": { - "type": "object", - "properties": { - "destroyed-storage": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } - }, - "detached-storage": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } - } - }, - "additionalProperties": false - }, - "DestroyUnitParams": { - "type": "object", - "properties": { - "destroy-storage": { - "type": "boolean" - }, - "dry-run": { - "type": "boolean" - }, - "force": { - "type": "boolean" - }, - "max-wait": { - "type": "integer" - }, - "unit-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "unit-tag" - ] - }, - "DestroyUnitResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "info": { - "$ref": "#/definitions/DestroyUnitInfo" - } - }, - "additionalProperties": false - }, - "DestroyUnitResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/DestroyUnitResult" - } - } - }, - "additionalProperties": false - }, - "DestroyUnitsParams": { - "type": "object", - "properties": { - "units": { - "type": "array", - "items": { - "$ref": "#/definitions/DestroyUnitParams" - } - } - }, - "additionalProperties": false, - "required": [ - "units" - ] - }, - "EndpointRelationData": { - "type": "object", - "properties": { - "ApplicationData": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "cross-model": { - "type": "boolean" - }, - "endpoint": { - "type": "string" - }, - "related-endpoint": { - "type": "string" - }, - "relation-id": { - "type": "integer" - }, - "unit-relation-data": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/RelationData" - } - } - } - }, - "additionalProperties": false, - "required": [ - "relation-id", - "endpoint", - "cross-model", - "related-endpoint", - "ApplicationData", - "unit-relation-data" - ] - }, - "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": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ExposedEndpoint": { - "type": "object", - "properties": { - "expose-to-cidrs": { - "type": "array", - "items": { - "type": "string" - } - }, - "expose-to-spaces": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "ExternalControllerInfo": { - "type": "object", - "properties": { - "addrs": { - "type": "array", - "items": { - "type": "string" - } - }, - "ca-cert": { - "type": "string" - }, - "controller-alias": { - "type": "string" - }, - "controller-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "controller-tag", - "controller-alias", - "addrs", - "ca-cert" - ] - }, - "Macaroon": { - "type": "object", - "additionalProperties": false - }, - "OfferUserDetails": { - "type": "object", - "properties": { - "access": { - "type": "string" - }, - "display-name": { - "type": "string" - }, - "user": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "user", - "display-name", - "access" - ] - }, - "Placement": { - "type": "object", - "properties": { - "directive": { - "type": "string" - }, - "scope": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "scope", - "directive" - ] - }, - "RelationData": { - "type": "object", - "properties": { - "InScope": { - "type": "boolean" - }, - "UnitData": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "InScope", - "UnitData" - ] - }, - "RelationSuspendedArg": { - "type": "object", - "properties": { - "message": { - "type": "string" - }, - "relation-id": { - "type": "integer" - }, - "suspended": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "relation-id", - "message", - "suspended" - ] - }, - "RelationSuspendedArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/RelationSuspendedArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "RemoteEndpoint": { - "type": "object", - "properties": { - "interface": { - "type": "string" - }, - "limit": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "role": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "role", - "interface", - "limit" - ] - }, - "RemoteSpace": { - "type": "object", - "properties": { - "cloud-type": { - "type": "string" - }, - "name": { - "type": "string" - }, - "provider-attributes": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "provider-id": { - "type": "string" - }, - "subnets": { - "type": "array", - "items": { - "$ref": "#/definitions/Subnet" - } - } - }, - "additionalProperties": false, - "required": [ - "cloud-type", - "name", - "provider-id", - "provider-attributes", - "subnets" - ] - }, - "ScaleApplicationInfo": { - "type": "object", - "properties": { - "num-units": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "num-units" - ] - }, - "ScaleApplicationParams": { - "type": "object", - "properties": { - "application-tag": { - "type": "string" - }, - "force": { - "type": "boolean" - }, - "scale": { - "type": "integer" - }, - "scale-change": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "application-tag", - "scale", - "force" - ] - }, - "ScaleApplicationResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "info": { - "$ref": "#/definitions/ScaleApplicationInfo" - } - }, - "additionalProperties": false - }, - "ScaleApplicationResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ScaleApplicationResult" - } - } - }, - "additionalProperties": false - }, - "ScaleApplicationsParams": { - "type": "object", - "properties": { - "applications": { - "type": "array", - "items": { - "$ref": "#/definitions/ScaleApplicationParams" - } - } - }, - "additionalProperties": false, - "required": [ - "applications" - ] - }, - "SetConstraints": { - "type": "object", - "properties": { - "application": { - "type": "string" - }, - "constraints": { - "$ref": "#/definitions/Value" - } - }, - "additionalProperties": false, - "required": [ - "application", - "constraints" - ] - }, - "StorageConstraints": { - "type": "object", - "properties": { - "count": { - "type": "integer" - }, - "pool": { - "type": "string" - }, - "size": { - "type": "integer" - } - }, - "additionalProperties": false - }, - "StringResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "Subnet": { - "type": "object", - "properties": { - "cidr": { - "type": "string" - }, - "life": { - "type": "string" - }, - "provider-id": { - "type": "string" - }, - "provider-network-id": { - "type": "string" - }, - "provider-space-id": { - "type": "string" - }, - "space-tag": { - "type": "string" - }, - "status": { - "type": "string" - }, - "vlan-tag": { - "type": "integer" - }, - "zones": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "cidr", - "vlan-tag", - "life", - "space-tag", - "zones" - ] - }, - "UnitInfoResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/UnitResult" - } - }, - "additionalProperties": false - }, - "UnitInfoResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/UnitInfoResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "UnitResult": { - "type": "object", - "properties": { - "address": { - "type": "string" - }, - "charm": { - "type": "string" - }, - "leader": { - "type": "boolean" - }, - "life": { - "type": "string" - }, - "machine": { - "type": "string" - }, - "opened-ports": { - "type": "array", - "items": { - "type": "string" - } - }, - "provider-id": { - "type": "string" - }, - "public-address": { - "type": "string" - }, - "relation-data": { - "type": "array", - "items": { - "$ref": "#/definitions/EndpointRelationData" - } - }, - "tag": { - "type": "string" - }, - "workload-version": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "workload-version", - "opened-ports", - "charm" - ] - }, - "UnitsResolved": { - "type": "object", - "properties": { - "all": { - "type": "boolean" - }, - "retry": { - "type": "boolean" - }, - "tags": { - "$ref": "#/definitions/Entities" - } - }, - "additionalProperties": false - }, - "UpdateChannelArg": { - "type": "object", - "properties": { - "channel": { - "type": "string" - }, - "force": { - "type": "boolean" - }, - "tag": { - "$ref": "#/definitions/Entity" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "force", - "channel" - ] - }, - "UpdateChannelArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/UpdateChannelArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "Value": { - "type": "object", - "properties": { - "allocate-public-ip": { - "type": "boolean" - }, - "arch": { - "type": "string" - }, - "container": { - "type": "string" - }, - "cores": { - "type": "integer" - }, - "cpu-power": { - "type": "integer" - }, - "instance-role": { - "type": "string" - }, - "instance-type": { - "type": "string" - }, - "mem": { - "type": "integer" - }, - "root-disk": { - "type": "integer" - }, - "root-disk-source": { - "type": "string" - }, - "spaces": { - "type": "array", - "items": { - "type": "string" - } - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "virt-type": { - "type": "string" - }, - "zones": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - } - } - } - }, - { - "Name": "ApplicationOffers", - "Description": "OffersAPI implements the cross model interface and is the concrete\nimplementation of the api end point.", - "Version": 4, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "controller-user" - ], - "Schema": { - "type": "object", - "properties": { - "ApplicationOffers": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/OfferURLs" - }, - "Result": { - "$ref": "#/definitions/ApplicationOffersResults" - } - }, - "description": "ApplicationOffers gets details about remote applications that match given URLs." - }, - "DestroyOffers": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/DestroyApplicationOffers" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "DestroyOffers removes the offers specified by the given URLs, forcing if necessary." - }, - "FindApplicationOffers": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/OfferFilters" - }, - "Result": { - "$ref": "#/definitions/QueryApplicationOffersResults" - } - }, - "description": "FindApplicationOffers gets details about remote applications that match given filter." - }, - "GetConsumeDetails": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ConsumeOfferDetailsArg" - }, - "Result": { - "$ref": "#/definitions/ConsumeOfferDetailsResults" - } - }, - "description": "GetConsumeDetails returns the details necessary to pass to another model\nto allow the specified args user to consume the offers represented by the args URLs." - }, - "ListApplicationOffers": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/OfferFilters" - }, - "Result": { - "$ref": "#/definitions/QueryApplicationOffersResults" - } - }, - "description": "ListApplicationOffers gets deployed details about application offers that match given filter.\nThe results contain details about the deployed applications such as connection count." - }, - "ModifyOfferAccess": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ModifyOfferAccessRequest" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "ModifyOfferAccess changes the application offer access granted to users." - }, - "Offer": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/AddApplicationOffers" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "Offer makes application endpoints available for consumption at a specified URL." - }, - "RemoteApplicationInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/OfferURLs" - }, - "Result": { - "$ref": "#/definitions/RemoteApplicationInfoResults" - } - }, - "description": "RemoteApplicationInfo returns information about the requested remote application.\nThis call currently has no client side API, only there for the Dashboard at this stage." - } - }, - "definitions": { - "AddApplicationOffer": { - "type": "object", - "properties": { - "application-description": { - "type": "string" - }, - "application-name": { - "type": "string" - }, - "endpoints": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "model-tag": { - "type": "string" - }, - "offer-name": { - "type": "string" - }, - "owner-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "model-tag", - "offer-name", - "application-name", - "application-description", - "endpoints" - ] - }, - "AddApplicationOffers": { - "type": "object", - "properties": { - "Offers": { - "type": "array", - "items": { - "$ref": "#/definitions/AddApplicationOffer" - } - } - }, - "additionalProperties": false, - "required": [ - "Offers" - ] - }, - "ApplicationOfferAdminDetails": { - "type": "object", - "properties": { - "ApplicationOfferDetails": { - "$ref": "#/definitions/ApplicationOfferDetails" - }, - "application-description": { - "type": "string" - }, - "application-name": { - "type": "string" - }, - "bindings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "charm-url": { - "type": "string" - }, - "connections": { - "type": "array", - "items": { - "$ref": "#/definitions/OfferConnection" - } - }, - "endpoints": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoteEndpoint" - } - }, - "offer-name": { - "type": "string" - }, - "offer-url": { - "type": "string" - }, - "offer-uuid": { - "type": "string" - }, - "source-model-tag": { - "type": "string" - }, - "spaces": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoteSpace" - } - }, - "users": { - "type": "array", - "items": { - "$ref": "#/definitions/OfferUserDetails" - } - } - }, - "additionalProperties": false, - "required": [ - "source-model-tag", - "offer-uuid", - "offer-url", - "offer-name", - "application-description", - "ApplicationOfferDetails", - "application-name", - "charm-url" - ] - }, - "ApplicationOfferDetails": { - "type": "object", - "properties": { - "application-description": { - "type": "string" - }, - "bindings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "endpoints": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoteEndpoint" - } - }, - "offer-name": { - "type": "string" - }, - "offer-url": { - "type": "string" - }, - "offer-uuid": { - "type": "string" - }, - "source-model-tag": { - "type": "string" - }, - "spaces": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoteSpace" - } - }, - "users": { - "type": "array", - "items": { - "$ref": "#/definitions/OfferUserDetails" - } - } - }, - "additionalProperties": false, - "required": [ - "source-model-tag", - "offer-uuid", - "offer-url", - "offer-name", - "application-description" - ] - }, - "ApplicationOfferResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/ApplicationOfferAdminDetails" - } - }, - "additionalProperties": false - }, - "ApplicationOffersResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ApplicationOfferResult" - } - } - }, - "additionalProperties": false - }, - "ConsumeOfferDetails": { - "type": "object", - "properties": { - "external-controller": { - "$ref": "#/definitions/ExternalControllerInfo" - }, - "macaroon": { - "$ref": "#/definitions/Macaroon" - }, - "offer": { - "$ref": "#/definitions/ApplicationOfferDetails" - } - }, - "additionalProperties": false - }, - "ConsumeOfferDetailsArg": { - "type": "object", - "properties": { - "offer-urls": { - "$ref": "#/definitions/OfferURLs" - }, - "user-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "offer-urls" - ] - }, - "ConsumeOfferDetailsResult": { - "type": "object", - "properties": { - "ConsumeOfferDetails": { - "$ref": "#/definitions/ConsumeOfferDetails" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "external-controller": { - "$ref": "#/definitions/ExternalControllerInfo" - }, - "macaroon": { - "$ref": "#/definitions/Macaroon" - }, - "offer": { - "$ref": "#/definitions/ApplicationOfferDetails" - } - }, - "additionalProperties": false, - "required": [ - "ConsumeOfferDetails" - ] - }, - "ConsumeOfferDetailsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ConsumeOfferDetailsResult" - } - } - }, - "additionalProperties": false - }, - "DestroyApplicationOffers": { - "type": "object", - "properties": { - "force": { - "type": "boolean" - }, - "offer-urls": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "offer-urls" - ] - }, - "EndpointFilterAttributes": { - "type": "object", - "properties": { - "interface": { - "type": "string" - }, - "name": { - "type": "string" - }, - "role": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "role", - "interface", - "name" - ] - }, - "EntityStatus": { - "type": "object", - "properties": { - "data": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "info": { - "type": "string" - }, - "since": { - "type": "string", - "format": "date-time" - }, - "status": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "status", - "info", - "since" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ExternalControllerInfo": { - "type": "object", - "properties": { - "addrs": { - "type": "array", - "items": { - "type": "string" - } - }, - "ca-cert": { - "type": "string" - }, - "controller-alias": { - "type": "string" - }, - "controller-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "controller-tag", - "controller-alias", - "addrs", - "ca-cert" - ] - }, - "Macaroon": { - "type": "object", - "additionalProperties": false - }, - "ModifyOfferAccess": { - "type": "object", - "properties": { - "access": { - "type": "string" - }, - "action": { - "type": "string" - }, - "offer-url": { - "type": "string" - }, - "user-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "user-tag", - "action", - "access", - "offer-url" - ] - }, - "ModifyOfferAccessRequest": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "$ref": "#/definitions/ModifyOfferAccess" - } - } - }, - "additionalProperties": false, - "required": [ - "changes" - ] - }, - "OfferConnection": { - "type": "object", - "properties": { - "endpoint": { - "type": "string" - }, - "ingress-subnets": { - "type": "array", - "items": { - "type": "string" - } - }, - "relation-id": { - "type": "integer" - }, - "source-model-tag": { - "type": "string" - }, - "status": { - "$ref": "#/definitions/EntityStatus" - }, - "username": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "source-model-tag", - "relation-id", - "username", - "endpoint", - "status", - "ingress-subnets" - ] - }, - "OfferFilter": { - "type": "object", - "properties": { - "allowed-users": { - "type": "array", - "items": { - "type": "string" - } - }, - "application-description": { - "type": "string" - }, - "application-name": { - "type": "string" - }, - "application-user": { - "type": "string" - }, - "connected-users": { - "type": "array", - "items": { - "type": "string" - } - }, - "endpoints": { - "type": "array", - "items": { - "$ref": "#/definitions/EndpointFilterAttributes" - } - }, - "model-name": { - "type": "string" - }, - "offer-name": { - "type": "string" - }, - "owner-name": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "owner-name", - "model-name", - "offer-name", - "application-name", - "application-description", - "application-user", - "endpoints", - "connected-users", - "allowed-users" - ] - }, - "OfferFilters": { - "type": "object", - "properties": { - "Filters": { - "type": "array", - "items": { - "$ref": "#/definitions/OfferFilter" - } - } - }, - "additionalProperties": false, - "required": [ - "Filters" - ] - }, - "OfferURLs": { - "type": "object", - "properties": { - "bakery-version": { - "type": "integer" - }, - "offer-urls": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "OfferUserDetails": { - "type": "object", - "properties": { - "access": { - "type": "string" - }, - "display-name": { - "type": "string" - }, - "user": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "user", - "display-name", - "access" - ] - }, - "QueryApplicationOffersResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ApplicationOfferAdminDetails" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "RemoteApplicationInfo": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "endpoints": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoteEndpoint" - } - }, - "icon-url-path": { - "type": "string" - }, - "model-tag": { - "type": "string" - }, - "name": { - "type": "string" - }, - "offer-url": { - "type": "string" - }, - "source-model-label": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "model-tag", - "name", - "description", - "offer-url", - "endpoints", - "icon-url-path" - ] - }, - "RemoteApplicationInfoResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/RemoteApplicationInfo" - } - }, - "additionalProperties": false - }, - "RemoteApplicationInfoResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoteApplicationInfoResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "RemoteEndpoint": { - "type": "object", - "properties": { - "interface": { - "type": "string" - }, - "limit": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "role": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "role", - "interface", - "limit" - ] - }, - "RemoteSpace": { - "type": "object", - "properties": { - "cloud-type": { - "type": "string" - }, - "name": { - "type": "string" - }, - "provider-attributes": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "provider-id": { - "type": "string" - }, - "subnets": { - "type": "array", - "items": { - "$ref": "#/definitions/Subnet" - } - } - }, - "additionalProperties": false, - "required": [ - "cloud-type", - "name", - "provider-id", - "provider-attributes", - "subnets" - ] - }, - "Subnet": { - "type": "object", - "properties": { - "cidr": { - "type": "string" - }, - "life": { - "type": "string" - }, - "provider-id": { - "type": "string" - }, - "provider-network-id": { - "type": "string" - }, - "provider-space-id": { - "type": "string" - }, - "space-tag": { - "type": "string" - }, - "status": { - "type": "string" - }, - "vlan-tag": { - "type": "integer" - }, - "zones": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "cidr", - "vlan-tag", - "life", - "space-tag", - "zones" - ] - } - } - } - }, - { - "Name": "ApplicationScaler", - "Description": "Facade allows model-manager clients to watch and rescale services.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent" - ], - "Schema": { - "type": "object", - "properties": { - "Rescale": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "Rescale causes any supplied services to be scaled up to their\nminimum size." - }, - "Watch": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsWatchResult" - } - }, - "description": "Watch returns a watcher that sends the names of services whose\nunit count may be below their configured minimum." - } - }, - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "StringsWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id" - ] - } - } - } - }, - { - "Name": "Backups", - "Description": "API provides backup-specific API methods.", - "Version": 3, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "Create": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/BackupsCreateArgs" - }, - "Result": { - "$ref": "#/definitions/BackupsMetadataResult" - } - }, - "description": "Create is the API method that requests juju to create a new backup\nof its state." - } - }, - "definitions": { - "BackupsCreateArgs": { - "type": "object", - "properties": { - "no-download": { - "type": "boolean" - }, - "notes": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "notes", - "no-download" - ] - }, - "BackupsMetadataResult": { - "type": "object", - "properties": { - "base": { - "type": "string" - }, - "checksum": { - "type": "string" - }, - "checksum-format": { - "type": "string" - }, - "controller-machine-id": { - "type": "string" - }, - "controller-machine-inst-id": { - "type": "string" - }, - "controller-uuid": { - "type": "string" - }, - "filename": { - "type": "string" - }, - "finished": { - "type": "string", - "format": "date-time" - }, - "format-version": { - "type": "integer" - }, - "ha-nodes": { - "type": "integer" - }, - "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" - }, - "version": { - "$ref": "#/definitions/Number" - } - }, - "additionalProperties": false, - "required": [ - "id", - "checksum", - "checksum-format", - "size", - "stored", - "started", - "finished", - "notes", - "model", - "machine", - "hostname", - "version", - "base", - "filename", - "format-version", - "controller-uuid", - "controller-machine-id", - "controller-machine-inst-id", - "ha-nodes" - ] - }, - "Number": { - "type": "object", - "properties": { - "Build": { - "type": "integer" - }, - "Major": { - "type": "integer" - }, - "Minor": { - "type": "integer" - }, - "Patch": { - "type": "integer" - }, - "Tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Major", - "Minor", - "Tag", - "Patch", - "Build" - ] - } - } - } - }, - { - "Name": "Block", - "Description": "API implements Block interface and is the concrete\nimplementation of the api end point.", - "Version": 2, - "AvailableTo": [ - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "List": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/BlockResults" - } - }, - "description": "List implements Block.List()." - }, - "SwitchBlockOff": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/BlockSwitchParams" - }, - "Result": { - "$ref": "#/definitions/ErrorResult" - } - }, - "description": "SwitchBlockOff implements Block.SwitchBlockOff()." - }, - "SwitchBlockOn": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/BlockSwitchParams" - }, - "Result": { - "$ref": "#/definitions/ErrorResult" - } - }, - "description": "SwitchBlockOn implements Block.SwitchBlockOn()." - } - }, - "definitions": { - "Block": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "message": { - "type": "string" - }, - "tag": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "id", - "tag", - "type" - ] - }, - "BlockResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/Block" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "BlockResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/BlockResult" - } - } - }, - "additionalProperties": false - }, - "BlockSwitchParams": { - "type": "object", - "properties": { - "message": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - } - } - } - }, - { - "Name": "Bundle", - "Description": "APIv6 provides the Bundle API facade for version 6. It is otherwise\nidentical to V5 with the exception that the V6 adds the support for\nmulti-part yaml handling to GetChanges and GetChangesMapArgs.", - "Version": 6, - "AvailableTo": [ - "controller-user", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "ExportBundle": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ExportBundleParams" - }, - "Result": { - "$ref": "#/definitions/StringResult" - } - }, - "description": "ExportBundle exports the current model configuration as bundle." - }, - "GetChanges": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/BundleChangesParams" - }, - "Result": { - "$ref": "#/definitions/BundleChangesResults" - } - }, - "description": "GetChanges returns the list of changes required to deploy the given bundle\ndata. The changes are sorted by requirements, so that they can be applied in\norder.\nGetChanges has been superseded in favour of GetChangesMapArgs. It's\npreferable to use that new method to add new functionality and move clients\naway from this one." - }, - "GetChangesMapArgs": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/BundleChangesParams" - }, - "Result": { - "$ref": "#/definitions/BundleChangesMapArgsResults" - } - }, - "description": "GetChangesMapArgs returns the list of changes required to deploy the given\nbundle data. The changes are sorted by requirements, so that they can be\napplied in order.\nV4 GetChangesMapArgs is not supported on anything less than v4" - } - }, - "definitions": { - "BundleChange": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": true - } - }, - "id": { - "type": "string" - }, - "method": { - "type": "string" - }, - "requires": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "id", - "method", - "args", - "requires" - ] - }, - "BundleChangesMapArgs": { - "type": "object", - "properties": { - "args": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "id": { - "type": "string" - }, - "method": { - "type": "string" - }, - "requires": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "id", - "method", - "args", - "requires" - ] - }, - "BundleChangesMapArgsResults": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "$ref": "#/definitions/BundleChangesMapArgs" - } - }, - "errors": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "BundleChangesParams": { - "type": "object", - "properties": { - "bundleURL": { - "type": "string" - }, - "yaml": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "yaml", - "bundleURL" - ] - }, - "BundleChangesResults": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "$ref": "#/definitions/BundleChange" - } - }, - "errors": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ExportBundleParams": { - "type": "object", - "properties": { - "include-charm-defaults": { - "type": "boolean" - } - }, - "additionalProperties": false - }, - "StringResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - } - } - } - }, - { - "Name": "CAASAdmission", - "Description": "", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent" - ], - "Schema": { - "type": "object", - "properties": { - "ControllerAPIInfoForModels": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ControllerAPIInfoResults" - } - }, - "description": "ControllerAPIInfoForModels returns the controller api connection details for the specified models." - }, - "ControllerConfig": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ControllerConfigResult" - } - }, - "description": "ControllerConfig returns the controller's configuration." - } - }, - "definitions": { - "ControllerAPIInfoResult": { - "type": "object", - "properties": { - "addresses": { - "type": "array", - "items": { - "type": "string" - } - }, - "cacert": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "addresses", - "cacert" - ] - }, - "ControllerAPIInfoResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ControllerAPIInfoResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ControllerConfigResult": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "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": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - } - } - } - }, - { - "Name": "CAASAgent", - "Description": "FacadeV2 is the V2 facade of the caas agent", - "Version": 2, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "CloudSpec": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/CloudSpecResults" - } - }, - "description": "CloudSpec returns the model's cloud spec." - }, - "ControllerAPIInfoForModels": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ControllerAPIInfoResults" - } - }, - "description": "ControllerAPIInfoForModels returns the controller api connection details for the specified models." - }, - "ControllerConfig": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ControllerConfigResult" - } - }, - "description": "ControllerConfig returns the controller's configuration." - }, - "GetCloudSpec": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ModelTag" - }, - "Result": { - "$ref": "#/definitions/CloudSpecResult" - } - }, - "description": "GetCloudSpec constructs the CloudSpec for a validated and authorized model." - }, - "ModelConfig": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ModelConfigResult" - } - }, - "description": "ModelConfig returns the current model's configuration." - }, - "WatchCloudSpecsChanges": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "WatchCloudSpecsChanges returns a watcher for cloud spec changes." - }, - "WatchForModelConfigChanges": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResult" - } - }, - "description": "WatchForModelConfigChanges returns a NotifyWatcher that observes\nchanges to the model configuration.\nNote that although the NotifyWatchResult contains an Error field,\nit's not used because we are only returning a single watcher,\nso we use the regular error return." - } - }, - "definitions": { - "CloudCredential": { - "type": "object", - "properties": { - "attrs": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "auth-type": { - "type": "string" - }, - "redacted": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "auth-type" - ] - }, - "CloudSpec": { - "type": "object", - "properties": { - "cacertificates": { - "type": "array", - "items": { - "type": "string" - } - }, - "credential": { - "$ref": "#/definitions/CloudCredential" - }, - "endpoint": { - "type": "string" - }, - "identity-endpoint": { - "type": "string" - }, - "is-controller-cloud": { - "type": "boolean" - }, - "name": { - "type": "string" - }, - "region": { - "type": "string" - }, - "skip-tls-verify": { - "type": "boolean" - }, - "storage-endpoint": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type", - "name" - ] - }, - "CloudSpecResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/CloudSpec" - } - }, - "additionalProperties": false - }, - "CloudSpecResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/CloudSpecResult" - } - } - }, - "additionalProperties": false - }, - "ControllerAPIInfoResult": { - "type": "object", - "properties": { - "addresses": { - "type": "array", - "items": { - "type": "string" - } - }, - "cacert": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "addresses", - "cacert" - ] - }, - "ControllerAPIInfoResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ControllerAPIInfoResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ControllerConfigResult": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "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": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ModelConfigResult": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "ModelTag": { - "type": "object", - "additionalProperties": false - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "NotifyWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - } - } - } - }, - { - "Name": "CAASApplication", - "Description": "", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "UnitIntroduction": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/CAASUnitIntroductionArgs" - }, - "Result": { - "$ref": "#/definitions/CAASUnitIntroductionResult" - } - }, - "description": "UnitIntroduction sets the status of each given entity." - }, - "UnitTerminating": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entity" - }, - "Result": { - "$ref": "#/definitions/CAASUnitTerminationResult" - } - }, - "description": "UnitTerminating should be called by the CAASUnitTerminationWorker when\nthe agent receives a signal to exit. UnitTerminating will return how\nthe agent should shutdown." - } - }, - "definitions": { - "CAASUnitIntroduction": { - "type": "object", - "properties": { - "agent-conf": { - "type": "array", - "items": { - "type": "integer" - } - }, - "unit-name": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "unit-name", - "agent-conf" - ] - }, - "CAASUnitIntroductionArgs": { - "type": "object", - "properties": { - "pod-name": { - "type": "string" - }, - "pod-uuid": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "pod-name", - "pod-uuid" - ] - }, - "CAASUnitIntroductionResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/CAASUnitIntroduction" - } - }, - "additionalProperties": false - }, - "CAASUnitTerminationResult": { - "type": "object", - "properties": { - "Error": { - "$ref": "#/definitions/Error" - }, - "WillRestart": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "WillRestart", - "Error" - ] - }, - "Entity": { - "type": "object", - "properties": { - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - } - } - } - }, - { - "Name": "CAASApplicationProvisioner", - "Description": "", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "ApplicationCharmInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entity" - }, - "Result": { - "$ref": "#/definitions/Charm" - } - }, - "description": "ApplicationCharmInfo returns information about an application's charm." - }, - "ApplicationOCIResources": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/CAASApplicationOCIResourceResults" - } - }, - "description": "ApplicationOCIResources returns the OCI image resources for an application." - }, - "CAASApplicationGarbageCollect": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/CAASApplicationGarbageCollectArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "CAASApplicationGarbageCollect cleans up units that have gone away permanently.\nOnly observed units will be deleted as new units could have surfaced between\nthe capturing of kuberentes pod state/application state and this call." - }, - "CharmInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/CharmURL" - }, - "Result": { - "$ref": "#/definitions/Charm" - } - }, - "description": "CharmInfo returns information about the requested charm." - }, - "ClearApplicationsResources": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "ClearApplicationsResources clears the flags which indicate\napplications still have resources in the cluster." - }, - "Life": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/LifeResults" - } - }, - "description": "Life returns the life status of every supplied entity, where available." - }, - "ProvisioningInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/CAASApplicationProvisioningInfoResults" - } - }, - "description": "ProvisioningInfo returns the info needed to provision a caas application." - }, - "Remove": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "Remove removes every given entity from state, calling EnsureDead\nfirst, then Remove. It will fail if the entity is not present." - }, - "SetOperatorStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetStatus" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetOperatorStatus sets the status of each given entity." - }, - "SetPasswords": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/EntityPasswords" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetPasswords sets the given password for each supplied entity, if possible." - }, - "Units": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/CAASUnitsResults" - } - }, - "description": "Units returns all the units for each application specified." - }, - "UpdateApplicationsUnits": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/UpdateApplicationUnitArgs" - }, - "Result": { - "$ref": "#/definitions/UpdateApplicationUnitResults" - } - }, - "description": "UpdateApplicationsUnits updates the Juju data model to reflect the given\nunits of the specified application." - }, - "Watch": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "Watch starts an NotifyWatcher for each given entity." - }, - "WatchApplications": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsWatchResult" - } - }, - "description": "WatchApplications starts a StringsWatcher to watch applications\ndeployed to this model." - }, - "WatchProvisioningInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "WatchProvisioningInfo provides a watcher for changes that affect the\ninformation returned by ProvisioningInfo. This is useful for ensuring the\nlatest application stated is ensured." - }, - "WatchUnits": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - }, - "description": "WatchUnits starts a StringsWatcher to watch changes to the\nlifecycle states of units for the specified applications in\nthis model." - } - }, - "definitions": { - "ApplicationUnitInfo": { - "type": "object", - "properties": { - "provider-id": { - "type": "string" - }, - "unit-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "provider-id", - "unit-tag" - ] - }, - "ApplicationUnitParams": { - "type": "object", - "properties": { - "address": { - "type": "string" - }, - "data": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "filesystem-info": { - "type": "array", - "items": { - "$ref": "#/definitions/KubernetesFilesystemInfo" - } - }, - "info": { - "type": "string" - }, - "ports": { - "type": "array", - "items": { - "type": "string" - } - }, - "provider-id": { - "type": "string" - }, - "stateful": { - "type": "boolean" - }, - "status": { - "type": "string" - }, - "unit-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "provider-id", - "unit-tag", - "address", - "ports", - "status", - "info" - ] - }, - "Base": { - "type": "object", - "properties": { - "channel": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "channel" - ] - }, - "CAASApplicationGarbageCollectArg": { - "type": "object", - "properties": { - "active-pod-names": { - "type": "array", - "items": { - "type": "string" - } - }, - "application": { - "$ref": "#/definitions/Entity" - }, - "desired-replicas": { - "type": "integer" - }, - "force": { - "type": "boolean" - }, - "observed-units": { - "$ref": "#/definitions/Entities" - } - }, - "additionalProperties": false, - "required": [ - "application", - "observed-units", - "desired-replicas", - "active-pod-names", - "force" - ] - }, - "CAASApplicationGarbageCollectArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/CAASApplicationGarbageCollectArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "CAASApplicationOCIResourceResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/CAASApplicationOCIResources" - } - }, - "additionalProperties": false - }, - "CAASApplicationOCIResourceResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/CAASApplicationOCIResourceResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "CAASApplicationOCIResources": { - "type": "object", - "properties": { - "images": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/DockerImageInfo" - } - } - } - }, - "additionalProperties": false, - "required": [ - "images" - ] - }, - "CAASApplicationProvisioningInfo": { - "type": "object", - "properties": { - "api-addresses": { - "type": "array", - "items": { - "type": "string" - } - }, - "base": { - "$ref": "#/definitions/Base" - }, - "ca-cert": { - "type": "string" - }, - "charm-modified-version": { - "type": "integer" - }, - "charm-url": { - "type": "string" - }, - "constraints": { - "$ref": "#/definitions/Value" - }, - "devices": { - "type": "array", - "items": { - "$ref": "#/definitions/KubernetesDeviceParams" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "filesystems": { - "type": "array", - "items": { - "$ref": "#/definitions/KubernetesFilesystemParams" - } - }, - "image-repo": { - "$ref": "#/definitions/DockerImageInfo" - }, - "scale": { - "type": "integer" - }, - "tags": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "trust": { - "type": "boolean" - }, - "version": { - "$ref": "#/definitions/Number" - }, - "volumes": { - "type": "array", - "items": { - "$ref": "#/definitions/KubernetesVolumeParams" - } - } - }, - "additionalProperties": false, - "required": [ - "version", - "api-addresses", - "ca-cert", - "constraints" - ] - }, - "CAASApplicationProvisioningInfoResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/CAASApplicationProvisioningInfo" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "CAASUnitInfo": { - "type": "object", - "properties": { - "tag": { - "type": "string" - }, - "unit-status": { - "$ref": "#/definitions/UnitStatus" - } - }, - "additionalProperties": false, - "required": [ - "tag" - ] - }, - "CAASUnitsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "units": { - "type": "array", - "items": { - "$ref": "#/definitions/CAASUnitInfo" - } - } - }, - "additionalProperties": false - }, - "CAASUnitsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/CAASUnitsResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "Charm": { - "type": "object", - "properties": { - "actions": { - "$ref": "#/definitions/CharmActions" - }, - "config": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmOption" - } - } - }, - "lxd-profile": { - "$ref": "#/definitions/CharmLXDProfile" - }, - "manifest": { - "$ref": "#/definitions/CharmManifest" - }, - "meta": { - "$ref": "#/definitions/CharmMeta" - }, - "metrics": { - "$ref": "#/definitions/CharmMetrics" - }, - "revision": { - "type": "integer" - }, - "url": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "revision", - "url", - "config" - ] - }, - "CharmActionSpec": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "params": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "description", - "params" - ] - }, - "CharmActions": { - "type": "object", - "properties": { - "specs": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmActionSpec" - } - } - } - }, - "additionalProperties": false - }, - "CharmBase": { - "type": "object", - "properties": { - "architectures": { - "type": "array", - "items": { - "type": "string" - } - }, - "channel": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "additionalProperties": false - }, - "CharmContainer": { - "type": "object", - "properties": { - "mounts": { - "type": "array", - "items": { - "$ref": "#/definitions/CharmMount" - } - }, - "resource": { - "type": "string" - } - }, - "additionalProperties": false - }, - "CharmDeployment": { - "type": "object", - "properties": { - "min-version": { - "type": "string" - }, - "mode": { - "type": "string" - }, - "service": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type", - "mode", - "service", - "min-version" - ] - }, - "CharmDevice": { - "type": "object", - "properties": { - "CountMax": { - "type": "integer" - }, - "CountMin": { - "type": "integer" - }, - "Description": { - "type": "string" - }, - "Name": { - "type": "string" - }, - "Type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Name", - "Description", - "Type", - "CountMin", - "CountMax" - ] - }, - "CharmLXDProfile": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "description": { - "type": "string" - }, - "devices": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - } - } - } - }, - "additionalProperties": false, - "required": [ - "config", - "description", - "devices" - ] - }, - "CharmManifest": { - "type": "object", - "properties": { - "bases": { - "type": "array", - "items": { - "$ref": "#/definitions/CharmBase" - } - } - }, - "additionalProperties": false - }, - "CharmMeta": { - "type": "object", - "properties": { - "assumes-expr": { - "$ref": "#/definitions/ExpressionTree" - }, - "categories": { - "type": "array", - "items": { - "type": "string" - } - }, - "containers": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmContainer" - } - } - }, - "deployment": { - "$ref": "#/definitions/CharmDeployment" - }, - "description": { - "type": "string" - }, - "devices": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmDevice" - } - } - }, - "extra-bindings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "min-juju-version": { - "type": "string" - }, - "name": { - "type": "string" - }, - "payload-classes": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmPayloadClass" - } - } - }, - "peers": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmRelation" - } - } - }, - "provides": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmRelation" - } - } - }, - "requires": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmRelation" - } - } - }, - "resources": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmResourceMeta" - } - } - }, - "series": { - "type": "array", - "items": { - "type": "string" - } - }, - "storage": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmStorage" - } - } - }, - "subordinate": { - "type": "boolean" - }, - "summary": { - "type": "string" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "terms": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "name", - "summary", - "description", - "subordinate" - ] - }, - "CharmMetric": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type", - "description" - ] - }, - "CharmMetrics": { - "type": "object", - "properties": { - "metrics": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmMetric" - } - } - }, - "plan": { - "$ref": "#/definitions/CharmPlan" - } - }, - "additionalProperties": false, - "required": [ - "metrics", - "plan" - ] - }, - "CharmMount": { - "type": "object", - "properties": { - "location": { - "type": "string" - }, - "storage": { - "type": "string" - } - }, - "additionalProperties": false - }, - "CharmOption": { - "type": "object", - "properties": { - "default": { - "type": "object", - "additionalProperties": true - }, - "description": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type" - ] - }, - "CharmPayloadClass": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "type" - ] - }, - "CharmPlan": { - "type": "object", - "properties": { - "required": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "required" - ] - }, - "CharmRelation": { - "type": "object", - "properties": { - "interface": { - "type": "string" - }, - "limit": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "optional": { - "type": "boolean" - }, - "role": { - "type": "string" - }, - "scope": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "role", - "interface", - "optional", - "limit", - "scope" - ] - }, - "CharmResourceMeta": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "name": { - "type": "string" - }, - "path": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "type", - "path", - "description" - ] - }, - "CharmStorage": { - "type": "object", - "properties": { - "count-max": { - "type": "integer" - }, - "count-min": { - "type": "integer" - }, - "description": { - "type": "string" - }, - "location": { - "type": "string" - }, - "minimum-size": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "properties": { - "type": "array", - "items": { - "type": "string" - } - }, - "read-only": { - "type": "boolean" - }, - "shared": { - "type": "boolean" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "description", - "type", - "shared", - "read-only", - "count-min", - "count-max", - "minimum-size" - ] - }, - "CharmURL": { - "type": "object", - "properties": { - "url": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "url" - ] - }, - "DetailedStatus": { - "type": "object", - "properties": { - "data": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "err": { - "$ref": "#/definitions/Error" - }, - "info": { - "type": "string" - }, - "kind": { - "type": "string" - }, - "life": { - "type": "string" - }, - "since": { - "type": "string", - "format": "date-time" - }, - "status": { - "type": "string" - }, - "version": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "status", - "info", - "data", - "since", - "kind", - "version", - "life" - ] - }, - "DockerImageInfo": { - "type": "object", - "properties": { - "auth": { - "type": "string" - }, - "email": { - "type": "string" - }, - "identitytoken": { - "type": "string" - }, - "image-name": { - "type": "string" - }, - "password": { - "type": "string" - }, - "registrytoken": { - "type": "string" - }, - "repository": { - "type": "string" - }, - "serveraddress": { - "type": "string" - }, - "username": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "image-name" - ] - }, - "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" - ] - }, - "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" - ] - }, - "EntityStatus": { - "type": "object", - "properties": { - "data": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "info": { - "type": "string" - }, - "since": { - "type": "string", - "format": "date-time" - }, - "status": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "status", - "info", - "since" - ] - }, - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ExpressionTree": { - "type": "object", - "properties": { - "Expression": { - "type": "object", - "additionalProperties": true - } - }, - "additionalProperties": false, - "required": [ - "Expression" - ] - }, - "KubernetesDeviceParams": { - "type": "object", - "properties": { - "Attributes": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "Count": { - "type": "integer" - }, - "Type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Type", - "Count", - "Attributes" - ] - }, - "KubernetesFilesystemAttachmentParams": { - "type": "object", - "properties": { - "mount-point": { - "type": "string" - }, - "provider": { - "type": "string" - }, - "read-only": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "provider" - ] - }, - "KubernetesFilesystemInfo": { - "type": "object", - "properties": { - "data": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "filesystem-id": { - "type": "string" - }, - "info": { - "type": "string" - }, - "mount-point": { - "type": "string" - }, - "pool": { - "type": "string" - }, - "read-only": { - "type": "boolean" - }, - "size": { - "type": "integer" - }, - "status": { - "type": "string" - }, - "storagename": { - "type": "string" - }, - "volume": { - "$ref": "#/definitions/KubernetesVolumeInfo" - } - }, - "additionalProperties": false, - "required": [ - "storagename", - "pool", - "size", - "filesystem-id", - "status", - "info", - "volume" - ] - }, - "KubernetesFilesystemParams": { - "type": "object", - "properties": { - "attachment": { - "$ref": "#/definitions/KubernetesFilesystemAttachmentParams" - }, - "attributes": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "provider": { - "type": "string" - }, - "size": { - "type": "integer" - }, - "storagename": { - "type": "string" - }, - "tags": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - } - }, - "additionalProperties": false, - "required": [ - "storagename", - "size", - "provider" - ] - }, - "KubernetesVolumeAttachmentParams": { - "type": "object", - "properties": { - "provider": { - "type": "string" - }, - "read-only": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "provider" - ] - }, - "KubernetesVolumeInfo": { - "type": "object", - "properties": { - "data": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "info": { - "type": "string" - }, - "persistent": { - "type": "boolean" - }, - "pool": { - "type": "string" - }, - "size": { - "type": "integer" - }, - "status": { - "type": "string" - }, - "volume-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "volume-id", - "size", - "persistent", - "status", - "info" - ] - }, - "KubernetesVolumeParams": { - "type": "object", - "properties": { - "attachment": { - "$ref": "#/definitions/KubernetesVolumeAttachmentParams" - }, - "attributes": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "provider": { - "type": "string" - }, - "size": { - "type": "integer" - }, - "storagename": { - "type": "string" - }, - "tags": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - } - }, - "additionalProperties": false, - "required": [ - "storagename", - "size", - "provider" - ] - }, - "LifeResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "life": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "life" - ] - }, - "LifeResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/LifeResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "NotifyWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "Number": { - "type": "object", - "properties": { - "Build": { - "type": "integer" - }, - "Major": { - "type": "integer" - }, - "Minor": { - "type": "integer" - }, - "Patch": { - "type": "integer" - }, - "Tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Major", - "Minor", - "Tag", - "Patch", - "Build" - ] - }, - "SetStatus": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityStatusArgs" - } - } - }, - "additionalProperties": false, - "required": [ - "entities" - ] - }, - "StringsWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id" - ] - }, - "StringsWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringsWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "UnitStatus": { - "type": "object", - "properties": { - "address": { - "type": "string" - }, - "agent-status": { - "$ref": "#/definitions/DetailedStatus" - }, - "charm": { - "type": "string" - }, - "leader": { - "type": "boolean" - }, - "machine": { - "type": "string" - }, - "opened-ports": { - "type": "array", - "items": { - "type": "string" - } - }, - "provider-id": { - "type": "string" - }, - "public-address": { - "type": "string" - }, - "subordinates": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/UnitStatus" - } - } - }, - "workload-status": { - "$ref": "#/definitions/DetailedStatus" - }, - "workload-version": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "agent-status", - "workload-status", - "workload-version", - "machine", - "opened-ports", - "public-address", - "charm", - "subordinates" - ] - }, - "UpdateApplicationUnitArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/UpdateApplicationUnits" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "UpdateApplicationUnitResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "info": { - "$ref": "#/definitions/UpdateApplicationUnitsInfo" - } - }, - "additionalProperties": false - }, - "UpdateApplicationUnitResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/UpdateApplicationUnitResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "UpdateApplicationUnits": { - "type": "object", - "properties": { - "application-tag": { - "type": "string" - }, - "generation": { - "type": "integer" - }, - "scale": { - "type": "integer" - }, - "status": { - "$ref": "#/definitions/EntityStatus" - }, - "units": { - "type": "array", - "items": { - "$ref": "#/definitions/ApplicationUnitParams" - } - } - }, - "additionalProperties": false, - "required": [ - "application-tag", - "units" - ] - }, - "UpdateApplicationUnitsInfo": { - "type": "object", - "properties": { - "units": { - "type": "array", - "items": { - "$ref": "#/definitions/ApplicationUnitInfo" - } - } - }, - "additionalProperties": false, - "required": [ - "units" - ] - }, - "Value": { - "type": "object", - "properties": { - "allocate-public-ip": { - "type": "boolean" - }, - "arch": { - "type": "string" - }, - "container": { - "type": "string" - }, - "cores": { - "type": "integer" - }, - "cpu-power": { - "type": "integer" - }, - "instance-role": { - "type": "string" - }, - "instance-type": { - "type": "string" - }, - "mem": { - "type": "integer" - }, - "root-disk": { - "type": "integer" - }, - "root-disk-source": { - "type": "string" - }, - "spaces": { - "type": "array", - "items": { - "type": "string" - } - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "virt-type": { - "type": "string" - }, - "zones": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - } - } - } - }, - { - "Name": "CAASFirewaller", - "Description": "", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent" - ], - "Schema": { - "type": "object", - "properties": { - "ApplicationCharmInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entity" - }, - "Result": { - "$ref": "#/definitions/Charm" - } - }, - "description": "ApplicationCharmInfo returns information about an application's charm." - }, - "ApplicationsConfig": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ApplicationGetConfigResults" - } - }, - "description": "ApplicationsConfig returns the config for the specified applications." - }, - "CharmInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/CharmURL" - }, - "Result": { - "$ref": "#/definitions/Charm" - } - }, - "description": "CharmInfo returns information about the requested charm." - }, - "IsExposed": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/BoolResults" - } - }, - "description": "IsExposed returns whether the specified applications are exposed." - }, - "Life": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/LifeResults" - } - }, - "description": "Life returns the life status of every supplied entity, where available." - }, - "Watch": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "Watch starts an NotifyWatcher for each given entity." - }, - "WatchApplications": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsWatchResult" - } - }, - "description": "WatchApplications starts a StringsWatcher to watch applications\ndeployed to this model." - } - }, - "definitions": { - "ApplicationGetConfigResults": { - "type": "object", - "properties": { - "Results": { - "type": "array", - "items": { - "$ref": "#/definitions/ConfigResult" - } - } - }, - "additionalProperties": false, - "required": [ - "Results" - ] - }, - "BoolResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "BoolResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/BoolResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "Charm": { - "type": "object", - "properties": { - "actions": { - "$ref": "#/definitions/CharmActions" - }, - "config": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmOption" - } - } - }, - "lxd-profile": { - "$ref": "#/definitions/CharmLXDProfile" - }, - "manifest": { - "$ref": "#/definitions/CharmManifest" - }, - "meta": { - "$ref": "#/definitions/CharmMeta" - }, - "metrics": { - "$ref": "#/definitions/CharmMetrics" - }, - "revision": { - "type": "integer" - }, - "url": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "revision", - "url", - "config" - ] - }, - "CharmActionSpec": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "params": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "description", - "params" - ] - }, - "CharmActions": { - "type": "object", - "properties": { - "specs": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmActionSpec" - } - } - } - }, - "additionalProperties": false - }, - "CharmBase": { - "type": "object", - "properties": { - "architectures": { - "type": "array", - "items": { - "type": "string" - } - }, - "channel": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "additionalProperties": false - }, - "CharmContainer": { - "type": "object", - "properties": { - "mounts": { - "type": "array", - "items": { - "$ref": "#/definitions/CharmMount" - } - }, - "resource": { - "type": "string" - } - }, - "additionalProperties": false - }, - "CharmDeployment": { - "type": "object", - "properties": { - "min-version": { - "type": "string" - }, - "mode": { - "type": "string" - }, - "service": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type", - "mode", - "service", - "min-version" - ] - }, - "CharmDevice": { - "type": "object", - "properties": { - "CountMax": { - "type": "integer" - }, - "CountMin": { - "type": "integer" - }, - "Description": { - "type": "string" - }, - "Name": { - "type": "string" - }, - "Type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Name", - "Description", - "Type", - "CountMin", - "CountMax" - ] - }, - "CharmLXDProfile": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "description": { - "type": "string" - }, - "devices": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - } - } - } - }, - "additionalProperties": false, - "required": [ - "config", - "description", - "devices" - ] - }, - "CharmManifest": { - "type": "object", - "properties": { - "bases": { - "type": "array", - "items": { - "$ref": "#/definitions/CharmBase" - } - } - }, - "additionalProperties": false - }, - "CharmMeta": { - "type": "object", - "properties": { - "assumes-expr": { - "$ref": "#/definitions/ExpressionTree" - }, - "categories": { - "type": "array", - "items": { - "type": "string" - } - }, - "containers": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmContainer" - } - } - }, - "deployment": { - "$ref": "#/definitions/CharmDeployment" - }, - "description": { - "type": "string" - }, - "devices": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmDevice" - } - } - }, - "extra-bindings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "min-juju-version": { - "type": "string" - }, - "name": { - "type": "string" - }, - "payload-classes": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmPayloadClass" - } - } - }, - "peers": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmRelation" - } - } - }, - "provides": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmRelation" - } - } - }, - "requires": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmRelation" - } - } - }, - "resources": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmResourceMeta" - } - } - }, - "series": { - "type": "array", - "items": { - "type": "string" - } - }, - "storage": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmStorage" - } - } - }, - "subordinate": { - "type": "boolean" - }, - "summary": { - "type": "string" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "terms": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "name", - "summary", - "description", - "subordinate" - ] - }, - "CharmMetric": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type", - "description" - ] - }, - "CharmMetrics": { - "type": "object", - "properties": { - "metrics": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmMetric" - } - } - }, - "plan": { - "$ref": "#/definitions/CharmPlan" - } - }, - "additionalProperties": false, - "required": [ - "metrics", - "plan" - ] - }, - "CharmMount": { - "type": "object", - "properties": { - "location": { - "type": "string" - }, - "storage": { - "type": "string" - } - }, - "additionalProperties": false - }, - "CharmOption": { - "type": "object", - "properties": { - "default": { - "type": "object", - "additionalProperties": true - }, - "description": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type" - ] - }, - "CharmPayloadClass": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "type" - ] - }, - "CharmPlan": { - "type": "object", - "properties": { - "required": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "required" - ] - }, - "CharmRelation": { - "type": "object", - "properties": { - "interface": { - "type": "string" - }, - "limit": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "optional": { - "type": "boolean" - }, - "role": { - "type": "string" - }, - "scope": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "role", - "interface", - "optional", - "limit", - "scope" - ] - }, - "CharmResourceMeta": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "name": { - "type": "string" - }, - "path": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "type", - "path", - "description" - ] - }, - "CharmStorage": { - "type": "object", - "properties": { - "count-max": { - "type": "integer" - }, - "count-min": { - "type": "integer" - }, - "description": { - "type": "string" - }, - "location": { - "type": "string" - }, - "minimum-size": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "properties": { - "type": "array", - "items": { - "type": "string" - } - }, - "read-only": { - "type": "boolean" - }, - "shared": { - "type": "boolean" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "description", - "type", - "shared", - "read-only", - "count-min", - "count-max", - "minimum-size" - ] - }, - "CharmURL": { - "type": "object", - "properties": { - "url": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "url" - ] - }, - "ConfigResult": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "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": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ExpressionTree": { - "type": "object", - "properties": { - "Expression": { - "type": "object", - "additionalProperties": true - } - }, - "additionalProperties": false, - "required": [ - "Expression" - ] - }, - "LifeResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "life": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "life" - ] - }, - "LifeResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/LifeResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "NotifyWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "StringsWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id" - ] - } - } - } - }, - { - "Name": "CAASFirewallerSidecar", - "Description": "FacadeSidecar provides access to the CAASFirewaller API facade for sidecar applications.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent" - ], - "Schema": { - "type": "object", - "properties": { - "ApplicationCharmInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entity" - }, - "Result": { - "$ref": "#/definitions/Charm" - } - }, - "description": "ApplicationCharmInfo returns information about an application's charm." - }, - "ApplicationsConfig": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ApplicationGetConfigResults" - } - }, - "description": "ApplicationsConfig returns the config for the specified applications." - }, - "CharmInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/CharmURL" - }, - "Result": { - "$ref": "#/definitions/Charm" - } - }, - "description": "CharmInfo returns information about the requested charm." - }, - "GetApplicationOpenedPorts": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entity" - }, - "Result": { - "$ref": "#/definitions/ApplicationOpenedPortsResults" - } - }, - "description": "GetApplicationOpenedPorts returns all the opened ports for each given application tag." - }, - "IsExposed": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/BoolResults" - } - }, - "description": "IsExposed returns whether the specified applications are exposed." - }, - "Life": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/LifeResults" - } - }, - "description": "Life returns the life status of every supplied entity, where available." - }, - "Watch": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "Watch starts an NotifyWatcher for each given entity." - }, - "WatchApplications": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsWatchResult" - } - }, - "description": "WatchApplications starts a StringsWatcher to watch applications\ndeployed to this model." - }, - "WatchOpenedPorts": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - }, - "description": "WatchOpenedPorts returns a new StringsWatcher for each given\nmodel tag." - } - }, - "definitions": { - "ApplicationGetConfigResults": { - "type": "object", - "properties": { - "Results": { - "type": "array", - "items": { - "$ref": "#/definitions/ConfigResult" - } - } - }, - "additionalProperties": false, - "required": [ - "Results" - ] - }, - "ApplicationOpenedPorts": { - "type": "object", - "properties": { - "endpoint": { - "type": "string" - }, - "port-ranges": { - "type": "array", - "items": { - "$ref": "#/definitions/PortRange" - } - } - }, - "additionalProperties": false, - "required": [ - "endpoint", - "port-ranges" - ] - }, - "ApplicationOpenedPortsResult": { - "type": "object", - "properties": { - "application-port-ranges": { - "type": "array", - "items": { - "$ref": "#/definitions/ApplicationOpenedPorts" - } - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "application-port-ranges" - ] - }, - "ApplicationOpenedPortsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ApplicationOpenedPortsResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "BoolResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "BoolResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/BoolResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "Charm": { - "type": "object", - "properties": { - "actions": { - "$ref": "#/definitions/CharmActions" - }, - "config": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmOption" - } - } - }, - "lxd-profile": { - "$ref": "#/definitions/CharmLXDProfile" - }, - "manifest": { - "$ref": "#/definitions/CharmManifest" - }, - "meta": { - "$ref": "#/definitions/CharmMeta" - }, - "metrics": { - "$ref": "#/definitions/CharmMetrics" - }, - "revision": { - "type": "integer" - }, - "url": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "revision", - "url", - "config" - ] - }, - "CharmActionSpec": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "params": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "description", - "params" - ] - }, - "CharmActions": { - "type": "object", - "properties": { - "specs": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmActionSpec" - } - } - } - }, - "additionalProperties": false - }, - "CharmBase": { - "type": "object", - "properties": { - "architectures": { - "type": "array", - "items": { - "type": "string" - } - }, - "channel": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "additionalProperties": false - }, - "CharmContainer": { - "type": "object", - "properties": { - "mounts": { - "type": "array", - "items": { - "$ref": "#/definitions/CharmMount" - } - }, - "resource": { - "type": "string" - } - }, - "additionalProperties": false - }, - "CharmDeployment": { - "type": "object", - "properties": { - "min-version": { - "type": "string" - }, - "mode": { - "type": "string" - }, - "service": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type", - "mode", - "service", - "min-version" - ] - }, - "CharmDevice": { - "type": "object", - "properties": { - "CountMax": { - "type": "integer" - }, - "CountMin": { - "type": "integer" - }, - "Description": { - "type": "string" - }, - "Name": { - "type": "string" - }, - "Type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Name", - "Description", - "Type", - "CountMin", - "CountMax" - ] - }, - "CharmLXDProfile": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "description": { - "type": "string" - }, - "devices": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - } - } - } - }, - "additionalProperties": false, - "required": [ - "config", - "description", - "devices" - ] - }, - "CharmManifest": { - "type": "object", - "properties": { - "bases": { - "type": "array", - "items": { - "$ref": "#/definitions/CharmBase" - } - } - }, - "additionalProperties": false - }, - "CharmMeta": { - "type": "object", - "properties": { - "assumes-expr": { - "$ref": "#/definitions/ExpressionTree" - }, - "categories": { - "type": "array", - "items": { - "type": "string" - } - }, - "containers": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmContainer" - } - } - }, - "deployment": { - "$ref": "#/definitions/CharmDeployment" - }, - "description": { - "type": "string" - }, - "devices": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmDevice" - } - } - }, - "extra-bindings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "min-juju-version": { - "type": "string" - }, - "name": { - "type": "string" - }, - "payload-classes": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmPayloadClass" - } - } - }, - "peers": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmRelation" - } - } - }, - "provides": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmRelation" - } - } - }, - "requires": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmRelation" - } - } - }, - "resources": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmResourceMeta" - } - } - }, - "series": { - "type": "array", - "items": { - "type": "string" - } - }, - "storage": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmStorage" - } - } - }, - "subordinate": { - "type": "boolean" - }, - "summary": { - "type": "string" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "terms": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "name", - "summary", - "description", - "subordinate" - ] - }, - "CharmMetric": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type", - "description" - ] - }, - "CharmMetrics": { - "type": "object", - "properties": { - "metrics": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmMetric" - } - } - }, - "plan": { - "$ref": "#/definitions/CharmPlan" - } - }, - "additionalProperties": false, - "required": [ - "metrics", - "plan" - ] - }, - "CharmMount": { - "type": "object", - "properties": { - "location": { - "type": "string" - }, - "storage": { - "type": "string" - } - }, - "additionalProperties": false - }, - "CharmOption": { - "type": "object", - "properties": { - "default": { - "type": "object", - "additionalProperties": true - }, - "description": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type" - ] - }, - "CharmPayloadClass": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "type" - ] - }, - "CharmPlan": { - "type": "object", - "properties": { - "required": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "required" - ] - }, - "CharmRelation": { - "type": "object", - "properties": { - "interface": { - "type": "string" - }, - "limit": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "optional": { - "type": "boolean" - }, - "role": { - "type": "string" - }, - "scope": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "role", - "interface", - "optional", - "limit", - "scope" - ] - }, - "CharmResourceMeta": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "name": { - "type": "string" - }, - "path": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "type", - "path", - "description" - ] - }, - "CharmStorage": { - "type": "object", - "properties": { - "count-max": { - "type": "integer" - }, - "count-min": { - "type": "integer" - }, - "description": { - "type": "string" - }, - "location": { - "type": "string" - }, - "minimum-size": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "properties": { - "type": "array", - "items": { - "type": "string" - } - }, - "read-only": { - "type": "boolean" - }, - "shared": { - "type": "boolean" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "description", - "type", - "shared", - "read-only", - "count-min", - "count-max", - "minimum-size" - ] - }, - "CharmURL": { - "type": "object", - "properties": { - "url": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "url" - ] - }, - "ConfigResult": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "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": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ExpressionTree": { - "type": "object", - "properties": { - "Expression": { - "type": "object", - "additionalProperties": true - } - }, - "additionalProperties": false, - "required": [ - "Expression" - ] - }, - "LifeResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "life": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "life" - ] - }, - "LifeResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/LifeResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "NotifyWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "PortRange": { - "type": "object", - "properties": { - "from-port": { - "type": "integer" - }, - "protocol": { - "type": "string" - }, - "to-port": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "from-port", - "to-port", - "protocol" - ] - }, - "StringsWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id" - ] - }, - "StringsWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringsWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - } - } - } - }, - { - "Name": "CAASModelConfigManager", - "Description": "Facade allows model config manager clients to watch controller config changes and fetch controller config.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent" - ], - "Schema": { - "type": "object", - "properties": { - "ControllerConfig": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ControllerConfigResult" - } - } - } - }, - "definitions": { - "ControllerConfigResult": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - } - } - } - }, - { - "Name": "CAASModelOperator", - "Description": "API represents the controller model operator facade.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "APIAddresses": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsResult" - } - }, - "description": "APIAddresses returns the list of addresses used to connect to the API." - }, - "APIHostPorts": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/APIHostPortsResult" - } - }, - "description": "APIHostPorts returns the API server addresses." - }, - "ModelOperatorProvisioningInfo": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ModelOperatorInfo" - } - }, - "description": "ModelOperatorProvisioningInfo returns the information needed for provisioning\na new model operator into a caas cluster." - }, - "ModelUUID": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringResult" - } - }, - "description": "ModelUUID returns the model UUID that this facade is used to operate.\nIt is implemented here directly as a result of removing it from\nembedded APIAddresser *without* bumping the facade version.\nIt should be blanked when this facade version is next incremented." - }, - "SetPasswords": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/EntityPasswords" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetPasswords sets the given password for each supplied entity, if possible." - }, - "WatchAPIHostPorts": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResult" - } - }, - "description": "WatchAPIHostPorts watches the API server addresses." - } - }, - "definitions": { - "APIHostPortsResult": { - "type": "object", - "properties": { - "servers": { - "type": "array", - "items": { - "type": "array", - "items": { - "$ref": "#/definitions/HostPort" - } - } - } - }, - "additionalProperties": false, - "required": [ - "servers" - ] - }, - "Address": { - "type": "object", - "properties": { - "cidr": { - "type": "string" - }, - "config-type": { - "type": "string" - }, - "is-secondary": { - "type": "boolean" - }, - "scope": { - "type": "string" - }, - "space-id": { - "type": "string" - }, - "space-name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "value", - "type", - "scope" - ] - }, - "DockerImageInfo": { - "type": "object", - "properties": { - "auth": { - "type": "string" - }, - "email": { - "type": "string" - }, - "identitytoken": { - "type": "string" - }, - "image-name": { - "type": "string" - }, - "password": { - "type": "string" - }, - "registrytoken": { - "type": "string" - }, - "repository": { - "type": "string" - }, - "serveraddress": { - "type": "string" - }, - "username": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "image-name" - ] - }, - "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" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "HostPort": { - "type": "object", - "properties": { - "Address": { - "$ref": "#/definitions/Address" - }, - "cidr": { - "type": "string" - }, - "config-type": { - "type": "string" - }, - "is-secondary": { - "type": "boolean" - }, - "port": { - "type": "integer" - }, - "scope": { - "type": "string" - }, - "space-id": { - "type": "string" - }, - "space-name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "value", - "type", - "scope", - "Address", - "port" - ] - }, - "ModelOperatorInfo": { - "type": "object", - "properties": { - "api-addresses": { - "type": "array", - "items": { - "type": "string" - } - }, - "image-details": { - "$ref": "#/definitions/DockerImageInfo" - }, - "version": { - "$ref": "#/definitions/Number" - } - }, - "additionalProperties": false, - "required": [ - "api-addresses", - "image-details", - "version" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "Number": { - "type": "object", - "properties": { - "Build": { - "type": "integer" - }, - "Major": { - "type": "integer" - }, - "Minor": { - "type": "integer" - }, - "Patch": { - "type": "integer" - }, - "Tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Major", - "Minor", - "Tag", - "Patch", - "Build" - ] - }, - "StringResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "StringsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - } - } - } - }, - { - "Name": "CAASOperator", - "Description": "Facade is the CAAS operator API facade.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "APIAddresses": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsResult" - } - }, - "description": "APIAddresses returns the list of addresses used to connect to the API." - }, - "APIHostPorts": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/APIHostPortsResult" - } - }, - "description": "APIHostPorts returns the API server addresses." - }, - "Charm": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ApplicationCharmResults" - } - }, - "description": "Charm returns the charm info for all given applications." - }, - "CurrentModel": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ModelResult" - } - }, - "description": "CurrentModel returns the name and UUID for the current juju model." - }, - "Life": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/LifeResults" - } - }, - "description": "Life returns the life status of every supplied entity, where available." - }, - "ModelUUID": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringResult" - } - }, - "description": "ModelUUID returns the model UUID that this facade is used to operate.\nIt is implemented here directly as a result of removing it from\nembedded APIAddresser *without* bumping the facade version.\nIt should be blanked when this facade version is next incremented." - }, - "Remove": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "Remove removes every given entity from state, calling EnsureDead\nfirst, then Remove. It will fail if the entity is not present." - }, - "SetPodSpec": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetPodSpecParams" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetPodSpec sets the container specs for a set of applications.\nTODO(juju3) - remove" - }, - "SetStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetStatus" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetStatus sets the status of each given entity." - }, - "SetTools": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/EntitiesVersion" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetTools updates the recorded tools version for the agents." - }, - "Watch": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "Watch starts an NotifyWatcher for each given entity." - }, - "WatchAPIHostPorts": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResult" - } - }, - "description": "WatchAPIHostPorts watches the API server addresses." - }, - "WatchContainerStart": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/WatchContainerStartArgs" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - }, - "description": "WatchContainerStart starts a StringWatcher to watch for container start events\non the CAAS api for a specific application and container." - }, - "WatchUnits": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - }, - "description": "WatchUnits starts a StringsWatcher to watch changes to the\nlifecycle states of units for the specified applications in\nthis model." - } - }, - "definitions": { - "APIHostPortsResult": { - "type": "object", - "properties": { - "servers": { - "type": "array", - "items": { - "type": "array", - "items": { - "$ref": "#/definitions/HostPort" - } - } - } - }, - "additionalProperties": false, - "required": [ - "servers" - ] - }, - "Address": { - "type": "object", - "properties": { - "cidr": { - "type": "string" - }, - "config-type": { - "type": "string" - }, - "is-secondary": { - "type": "boolean" - }, - "scope": { - "type": "string" - }, - "space-id": { - "type": "string" - }, - "space-name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "value", - "type", - "scope" - ] - }, - "ApplicationCharm": { - "type": "object", - "properties": { - "charm-modified-version": { - "type": "integer" - }, - "deployment-mode": { - "type": "string" - }, - "force-upgrade": { - "type": "boolean" - }, - "sha256": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "url", - "sha256", - "charm-modified-version" - ] - }, - "ApplicationCharmResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/ApplicationCharm" - } - }, - "additionalProperties": false - }, - "ApplicationCharmResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ApplicationCharmResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "Binary": { - "type": "object", - "properties": { - "Arch": { - "type": "string" - }, - "Build": { - "type": "integer" - }, - "Major": { - "type": "integer" - }, - "Minor": { - "type": "integer" - }, - "Number": { - "$ref": "#/definitions/Number" - }, - "Patch": { - "type": "integer" - }, - "Release": { - "type": "string" - }, - "Tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Major", - "Minor", - "Tag", - "Patch", - "Build", - "Number", - "Release", - "Arch" - ] - }, - "Entities": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } - } - }, - "additionalProperties": false, - "required": [ - "entities" - ] - }, - "EntitiesVersion": { - "type": "object", - "properties": { - "agent-tools": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityVersion" - } - } - }, - "additionalProperties": false, - "required": [ - "agent-tools" - ] - }, - "Entity": { - "type": "object", - "properties": { - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "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" - ] - }, - "EntityString": { - "type": "object", - "properties": { - "tag": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "value" - ] - }, - "EntityVersion": { - "type": "object", - "properties": { - "tag": { - "type": "string" - }, - "tools": { - "$ref": "#/definitions/Version" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "tools" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "HostPort": { - "type": "object", - "properties": { - "Address": { - "$ref": "#/definitions/Address" - }, - "cidr": { - "type": "string" - }, - "config-type": { - "type": "string" - }, - "is-secondary": { - "type": "boolean" - }, - "port": { - "type": "integer" - }, - "scope": { - "type": "string" - }, - "space-id": { - "type": "string" - }, - "space-name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "value", - "type", - "scope", - "Address", - "port" - ] - }, - "LifeResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "life": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "life" - ] - }, - "LifeResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/LifeResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ModelResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "uuid": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "uuid", - "type" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "NotifyWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "Number": { - "type": "object", - "properties": { - "Build": { - "type": "integer" - }, - "Major": { - "type": "integer" - }, - "Minor": { - "type": "integer" - }, - "Patch": { - "type": "integer" - }, - "Tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Major", - "Minor", - "Tag", - "Patch", - "Build" - ] - }, - "SetPodSpecParams": { - "type": "object", - "properties": { - "specs": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityString" - } - } - }, - "additionalProperties": false, - "required": [ - "specs" - ] - }, - "SetStatus": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityStatusArgs" - } - } - }, - "additionalProperties": false, - "required": [ - "entities" - ] - }, - "StringResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "StringsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "StringsWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id" - ] - }, - "StringsWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringsWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "Version": { - "type": "object", - "properties": { - "version": { - "$ref": "#/definitions/Binary" - } - }, - "additionalProperties": false, - "required": [ - "version" - ] - }, - "WatchContainerStartArg": { - "type": "object", - "properties": { - "container": { - "type": "string" - }, - "entity": { - "$ref": "#/definitions/Entity" - } - }, - "additionalProperties": false, - "required": [ - "entity" - ] - }, - "WatchContainerStartArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/WatchContainerStartArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - } - } - } - }, - { - "Name": "CAASOperatorProvisioner", - "Description": "", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "APIAddresses": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsResult" - } - }, - "description": "APIAddresses returns the list of addresses used to connect to the API." - }, - "APIHostPorts": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/APIHostPortsResult" - } - }, - "description": "APIHostPorts returns the API server addresses." - }, - "ApplicationCharmInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entity" - }, - "Result": { - "$ref": "#/definitions/Charm" - } - }, - "description": "ApplicationCharmInfo returns information about an application's charm." - }, - "CharmInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/CharmURL" - }, - "Result": { - "$ref": "#/definitions/Charm" - } - }, - "description": "CharmInfo returns information about the requested charm." - }, - "IssueOperatorCertificate": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/IssueOperatorCertificateResults" - } - }, - "description": "IssueOperatorCertificate issues an x509 certificate for use by the specified application operator." - }, - "Life": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/LifeResults" - } - }, - "description": "Life returns the life status of every supplied entity, where available." - }, - "ModelUUID": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringResult" - } - }, - "description": "ModelUUID returns the model UUID that this facade is used to operate.\nIt is implemented here directly as a result of removing it from\nembedded APIAddresser *without* bumping the facade version.\nIt should be blanked when this facade version is next incremented." - }, - "OperatorProvisioningInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/OperatorProvisioningInfoResults" - } - }, - "description": "OperatorProvisioningInfo returns the info needed to provision an operator." - }, - "SetPasswords": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/EntityPasswords" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetPasswords sets the given password for each supplied entity, if possible." - }, - "WatchAPIHostPorts": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResult" - } - }, - "description": "WatchAPIHostPorts watches the API server addresses." - }, - "WatchApplications": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsWatchResult" - } - }, - "description": "WatchApplications starts a StringsWatcher to watch applications\ndeployed to this model." - } - }, - "definitions": { - "APIHostPortsResult": { - "type": "object", - "properties": { - "servers": { - "type": "array", - "items": { - "type": "array", - "items": { - "$ref": "#/definitions/HostPort" - } - } - } - }, - "additionalProperties": false, - "required": [ - "servers" - ] - }, - "Address": { - "type": "object", - "properties": { - "cidr": { - "type": "string" - }, - "config-type": { - "type": "string" - }, - "is-secondary": { - "type": "boolean" - }, - "scope": { - "type": "string" - }, - "space-id": { - "type": "string" - }, - "space-name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "value", - "type", - "scope" - ] - }, - "Charm": { - "type": "object", - "properties": { - "actions": { - "$ref": "#/definitions/CharmActions" - }, - "config": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmOption" - } - } - }, - "lxd-profile": { - "$ref": "#/definitions/CharmLXDProfile" - }, - "manifest": { - "$ref": "#/definitions/CharmManifest" - }, - "meta": { - "$ref": "#/definitions/CharmMeta" - }, - "metrics": { - "$ref": "#/definitions/CharmMetrics" - }, - "revision": { - "type": "integer" - }, - "url": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "revision", - "url", - "config" - ] - }, - "CharmActionSpec": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "params": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "description", - "params" - ] - }, - "CharmActions": { - "type": "object", - "properties": { - "specs": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmActionSpec" - } - } - } - }, - "additionalProperties": false - }, - "CharmBase": { - "type": "object", - "properties": { - "architectures": { - "type": "array", - "items": { - "type": "string" - } - }, - "channel": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "additionalProperties": false - }, - "CharmContainer": { - "type": "object", - "properties": { - "mounts": { - "type": "array", - "items": { - "$ref": "#/definitions/CharmMount" - } - }, - "resource": { - "type": "string" - } - }, - "additionalProperties": false - }, - "CharmDeployment": { - "type": "object", - "properties": { - "min-version": { - "type": "string" - }, - "mode": { - "type": "string" - }, - "service": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type", - "mode", - "service", - "min-version" - ] - }, - "CharmDevice": { - "type": "object", - "properties": { - "CountMax": { - "type": "integer" - }, - "CountMin": { - "type": "integer" - }, - "Description": { - "type": "string" - }, - "Name": { - "type": "string" - }, - "Type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Name", - "Description", - "Type", - "CountMin", - "CountMax" - ] - }, - "CharmLXDProfile": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "description": { - "type": "string" - }, - "devices": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - } - } - } - }, - "additionalProperties": false, - "required": [ - "config", - "description", - "devices" - ] - }, - "CharmManifest": { - "type": "object", - "properties": { - "bases": { - "type": "array", - "items": { - "$ref": "#/definitions/CharmBase" - } - } - }, - "additionalProperties": false - }, - "CharmMeta": { - "type": "object", - "properties": { - "assumes-expr": { - "$ref": "#/definitions/ExpressionTree" - }, - "categories": { - "type": "array", - "items": { - "type": "string" - } - }, - "containers": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmContainer" - } - } - }, - "deployment": { - "$ref": "#/definitions/CharmDeployment" - }, - "description": { - "type": "string" - }, - "devices": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmDevice" - } - } - }, - "extra-bindings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "min-juju-version": { - "type": "string" - }, - "name": { - "type": "string" - }, - "payload-classes": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmPayloadClass" - } - } - }, - "peers": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmRelation" - } - } - }, - "provides": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmRelation" - } - } - }, - "requires": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmRelation" - } - } - }, - "resources": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmResourceMeta" - } - } - }, - "series": { - "type": "array", - "items": { - "type": "string" - } - }, - "storage": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmStorage" - } - } - }, - "subordinate": { - "type": "boolean" - }, - "summary": { - "type": "string" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "terms": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "name", - "summary", - "description", - "subordinate" - ] - }, - "CharmMetric": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type", - "description" - ] - }, - "CharmMetrics": { - "type": "object", - "properties": { - "metrics": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmMetric" - } - } - }, - "plan": { - "$ref": "#/definitions/CharmPlan" - } - }, - "additionalProperties": false, - "required": [ - "metrics", - "plan" - ] - }, - "CharmMount": { - "type": "object", - "properties": { - "location": { - "type": "string" - }, - "storage": { - "type": "string" - } - }, - "additionalProperties": false - }, - "CharmOption": { - "type": "object", - "properties": { - "default": { - "type": "object", - "additionalProperties": true - }, - "description": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type" - ] - }, - "CharmPayloadClass": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "type" - ] - }, - "CharmPlan": { - "type": "object", - "properties": { - "required": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "required" - ] - }, - "CharmRelation": { - "type": "object", - "properties": { - "interface": { - "type": "string" - }, - "limit": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "optional": { - "type": "boolean" - }, - "role": { - "type": "string" - }, - "scope": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "role", - "interface", - "optional", - "limit", - "scope" - ] - }, - "CharmResourceMeta": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "name": { - "type": "string" - }, - "path": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "type", - "path", - "description" - ] - }, - "CharmStorage": { - "type": "object", - "properties": { - "count-max": { - "type": "integer" - }, - "count-min": { - "type": "integer" - }, - "description": { - "type": "string" - }, - "location": { - "type": "string" - }, - "minimum-size": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "properties": { - "type": "array", - "items": { - "type": "string" - } - }, - "read-only": { - "type": "boolean" - }, - "shared": { - "type": "boolean" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "description", - "type", - "shared", - "read-only", - "count-min", - "count-max", - "minimum-size" - ] - }, - "CharmURL": { - "type": "object", - "properties": { - "url": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "url" - ] - }, - "DockerImageInfo": { - "type": "object", - "properties": { - "auth": { - "type": "string" - }, - "email": { - "type": "string" - }, - "identitytoken": { - "type": "string" - }, - "image-name": { - "type": "string" - }, - "password": { - "type": "string" - }, - "registrytoken": { - "type": "string" - }, - "repository": { - "type": "string" - }, - "serveraddress": { - "type": "string" - }, - "username": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "image-name" - ] - }, - "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" - ] - }, - "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" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ExpressionTree": { - "type": "object", - "properties": { - "Expression": { - "type": "object", - "additionalProperties": true - } - }, - "additionalProperties": false, - "required": [ - "Expression" - ] - }, - "HostPort": { - "type": "object", - "properties": { - "Address": { - "$ref": "#/definitions/Address" - }, - "cidr": { - "type": "string" - }, - "config-type": { - "type": "string" - }, - "is-secondary": { - "type": "boolean" - }, - "port": { - "type": "integer" - }, - "scope": { - "type": "string" - }, - "space-id": { - "type": "string" - }, - "space-name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "value", - "type", - "scope", - "Address", - "port" - ] - }, - "IssueOperatorCertificateResult": { - "type": "object", - "properties": { - "ca-cert": { - "type": "string" - }, - "cert": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "private-key": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "ca-cert", - "cert", - "private-key" - ] - }, - "IssueOperatorCertificateResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/IssueOperatorCertificateResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "KubernetesFilesystemAttachmentParams": { - "type": "object", - "properties": { - "mount-point": { - "type": "string" - }, - "provider": { - "type": "string" - }, - "read-only": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "provider" - ] - }, - "KubernetesFilesystemParams": { - "type": "object", - "properties": { - "attachment": { - "$ref": "#/definitions/KubernetesFilesystemAttachmentParams" - }, - "attributes": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "provider": { - "type": "string" - }, - "size": { - "type": "integer" - }, - "storagename": { - "type": "string" - }, - "tags": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - } - }, - "additionalProperties": false, - "required": [ - "storagename", - "size", - "provider" - ] - }, - "LifeResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "life": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "life" - ] - }, - "LifeResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/LifeResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "Number": { - "type": "object", - "properties": { - "Build": { - "type": "integer" - }, - "Major": { - "type": "integer" - }, - "Minor": { - "type": "integer" - }, - "Patch": { - "type": "integer" - }, - "Tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Major", - "Minor", - "Tag", - "Patch", - "Build" - ] - }, - "OperatorProvisioningInfo": { - "type": "object", - "properties": { - "api-addresses": { - "type": "array", - "items": { - "type": "string" - } - }, - "base-image-details": { - "$ref": "#/definitions/DockerImageInfo" - }, - "charm-storage": { - "$ref": "#/definitions/KubernetesFilesystemParams" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "image-details": { - "$ref": "#/definitions/DockerImageInfo" - }, - "tags": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "version": { - "$ref": "#/definitions/Number" - } - }, - "additionalProperties": false, - "required": [ - "image-details", - "base-image-details", - "version", - "api-addresses" - ] - }, - "OperatorProvisioningInfoResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/OperatorProvisioningInfo" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "StringResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "StringsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "StringsWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id" - ] - } - } - } - }, - { - "Name": "CAASOperatorUpgrader", - "Description": "", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "UpgradeOperator": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/KubernetesUpgradeArg" - }, - "Result": { - "$ref": "#/definitions/ErrorResult" - } - }, - "description": "UpgradeOperator upgrades the operator for the specified agents." - } - }, - "definitions": { - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "KubernetesUpgradeArg": { - "type": "object", - "properties": { - "agent-tag": { - "type": "string" - }, - "version": { - "$ref": "#/definitions/Number" - } - }, - "additionalProperties": false, - "required": [ - "agent-tag", - "version" - ] - }, - "Number": { - "type": "object", - "properties": { - "Build": { - "type": "integer" - }, - "Major": { - "type": "integer" - }, - "Minor": { - "type": "integer" - }, - "Patch": { - "type": "integer" - }, - "Tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Major", - "Minor", - "Tag", - "Patch", - "Build" - ] - } - } - } - }, - { - "Name": "CAASUnitProvisioner", - "Description": "", - "Version": 2, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "ApplicationCharmInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entity" - }, - "Result": { - "$ref": "#/definitions/Charm" - } - }, - "description": "ApplicationCharmInfo returns information about an application's charm." - }, - "ApplicationsConfig": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ApplicationGetConfigResults" - } - }, - "description": "ApplicationsConfig returns the config for the specified applications." - }, - "ApplicationsScale": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/IntResults" - } - }, - "description": "ApplicationsScale returns the scaling info for specified applications in this model." - }, - "ApplicationsTrust": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/BoolResults" - } - }, - "description": "ApplicationsTrust returns the trust status for specified applications in this model." - }, - "CharmInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/CharmURL" - }, - "Result": { - "$ref": "#/definitions/Charm" - } - }, - "description": "CharmInfo returns information about the requested charm." - }, - "ClearApplicationsResources": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "ClearApplicationsResources clears the flags which indicate\napplications still have resources in the cluster." - }, - "DeploymentMode": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringResults" - } - }, - "description": "DeploymentMode returns the deployment mode of the given applications' charms." - }, - "Life": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/LifeResults" - } - }, - "description": "Life returns the life status of every supplied entity, where available." - }, - "ProvisioningInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/KubernetesProvisioningInfoResults" - } - }, - "description": "ProvisioningInfo returns the provisioning info for specified applications in this model." - }, - "SetOperatorStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetStatus" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetOperatorStatus updates the operator status for each given application." - }, - "UpdateApplicationsService": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/UpdateApplicationServiceArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "UpdateApplicationsService updates the Juju data model to reflect the given\nservice details of the specified application." - }, - "UpdateApplicationsUnits": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/UpdateApplicationUnitArgs" - }, - "Result": { - "$ref": "#/definitions/UpdateApplicationUnitResults" - } - }, - "description": "UpdateApplicationsUnits updates the Juju data model to reflect the given\nunits of the specified application." - }, - "Watch": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "Watch starts a NotifyWatcher for each entity given." - }, - "WatchApplications": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsWatchResult" - } - }, - "description": "WatchApplications starts a StringsWatcher to watch applications\ndeployed to this model." - }, - "WatchApplicationsScale": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "WatchApplicationsScale starts a NotifyWatcher to watch changes\nto the applications' scale." - }, - "WatchApplicationsTrustHash": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - }, - "description": "WatchApplicationsTrustHash starts a StringsWatcher to watch changes\nto the applications' trust status." - }, - "WatchPodSpec": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "WatchPodSpec starts a NotifyWatcher to watch changes to the\npod spec for specified units in this model." - } - }, - "definitions": { - "Address": { - "type": "object", - "properties": { - "cidr": { - "type": "string" - }, - "config-type": { - "type": "string" - }, - "is-secondary": { - "type": "boolean" - }, - "scope": { - "type": "string" - }, - "space-id": { - "type": "string" - }, - "space-name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "value", - "type", - "scope" - ] - }, - "ApplicationGetConfigResults": { - "type": "object", - "properties": { - "Results": { - "type": "array", - "items": { - "$ref": "#/definitions/ConfigResult" - } - } - }, - "additionalProperties": false, - "required": [ - "Results" - ] - }, - "ApplicationUnitInfo": { - "type": "object", - "properties": { - "provider-id": { - "type": "string" - }, - "unit-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "provider-id", - "unit-tag" - ] - }, - "ApplicationUnitParams": { - "type": "object", - "properties": { - "address": { - "type": "string" - }, - "data": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "filesystem-info": { - "type": "array", - "items": { - "$ref": "#/definitions/KubernetesFilesystemInfo" - } - }, - "info": { - "type": "string" - }, - "ports": { - "type": "array", - "items": { - "type": "string" - } - }, - "provider-id": { - "type": "string" - }, - "stateful": { - "type": "boolean" - }, - "status": { - "type": "string" - }, - "unit-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "provider-id", - "unit-tag", - "address", - "ports", - "status", - "info" - ] - }, - "BoolResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "BoolResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/BoolResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "Charm": { - "type": "object", - "properties": { - "actions": { - "$ref": "#/definitions/CharmActions" - }, - "config": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmOption" - } - } - }, - "lxd-profile": { - "$ref": "#/definitions/CharmLXDProfile" - }, - "manifest": { - "$ref": "#/definitions/CharmManifest" - }, - "meta": { - "$ref": "#/definitions/CharmMeta" - }, - "metrics": { - "$ref": "#/definitions/CharmMetrics" - }, - "revision": { - "type": "integer" - }, - "url": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "revision", - "url", - "config" - ] - }, - "CharmActionSpec": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "params": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "description", - "params" - ] - }, - "CharmActions": { - "type": "object", - "properties": { - "specs": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmActionSpec" - } - } - } - }, - "additionalProperties": false - }, - "CharmBase": { - "type": "object", - "properties": { - "architectures": { - "type": "array", - "items": { - "type": "string" - } - }, - "channel": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "additionalProperties": false - }, - "CharmContainer": { - "type": "object", - "properties": { - "mounts": { - "type": "array", - "items": { - "$ref": "#/definitions/CharmMount" - } - }, - "resource": { - "type": "string" - } - }, - "additionalProperties": false - }, - "CharmDeployment": { - "type": "object", - "properties": { - "min-version": { - "type": "string" - }, - "mode": { - "type": "string" - }, - "service": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type", - "mode", - "service", - "min-version" - ] - }, - "CharmDevice": { - "type": "object", - "properties": { - "CountMax": { - "type": "integer" - }, - "CountMin": { - "type": "integer" - }, - "Description": { - "type": "string" - }, - "Name": { - "type": "string" - }, - "Type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Name", - "Description", - "Type", - "CountMin", - "CountMax" - ] - }, - "CharmLXDProfile": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "description": { - "type": "string" - }, - "devices": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - } - } - } - }, - "additionalProperties": false, - "required": [ - "config", - "description", - "devices" - ] - }, - "CharmManifest": { - "type": "object", - "properties": { - "bases": { - "type": "array", - "items": { - "$ref": "#/definitions/CharmBase" - } - } - }, - "additionalProperties": false - }, - "CharmMeta": { - "type": "object", - "properties": { - "assumes-expr": { - "$ref": "#/definitions/ExpressionTree" - }, - "categories": { - "type": "array", - "items": { - "type": "string" - } - }, - "containers": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmContainer" - } - } - }, - "deployment": { - "$ref": "#/definitions/CharmDeployment" - }, - "description": { - "type": "string" - }, - "devices": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmDevice" - } - } - }, - "extra-bindings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "min-juju-version": { - "type": "string" - }, - "name": { - "type": "string" - }, - "payload-classes": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmPayloadClass" - } - } - }, - "peers": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmRelation" - } - } - }, - "provides": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmRelation" - } - } - }, - "requires": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmRelation" - } - } - }, - "resources": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmResourceMeta" - } - } - }, - "series": { - "type": "array", - "items": { - "type": "string" - } - }, - "storage": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmStorage" - } - } - }, - "subordinate": { - "type": "boolean" - }, - "summary": { - "type": "string" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "terms": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "name", - "summary", - "description", - "subordinate" - ] - }, - "CharmMetric": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type", - "description" - ] - }, - "CharmMetrics": { - "type": "object", - "properties": { - "metrics": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmMetric" - } - } - }, - "plan": { - "$ref": "#/definitions/CharmPlan" - } - }, - "additionalProperties": false, - "required": [ - "metrics", - "plan" - ] - }, - "CharmMount": { - "type": "object", - "properties": { - "location": { - "type": "string" - }, - "storage": { - "type": "string" - } - }, - "additionalProperties": false - }, - "CharmOption": { - "type": "object", - "properties": { - "default": { - "type": "object", - "additionalProperties": true - }, - "description": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type" - ] - }, - "CharmPayloadClass": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "type" - ] - }, - "CharmPlan": { - "type": "object", - "properties": { - "required": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "required" - ] - }, - "CharmRelation": { - "type": "object", - "properties": { - "interface": { - "type": "string" - }, - "limit": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "optional": { - "type": "boolean" - }, - "role": { - "type": "string" - }, - "scope": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "role", - "interface", - "optional", - "limit", - "scope" - ] - }, - "CharmResourceMeta": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "name": { - "type": "string" - }, - "path": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "type", - "path", - "description" - ] - }, - "CharmStorage": { - "type": "object", - "properties": { - "count-max": { - "type": "integer" - }, - "count-min": { - "type": "integer" - }, - "description": { - "type": "string" - }, - "location": { - "type": "string" - }, - "minimum-size": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "properties": { - "type": "array", - "items": { - "type": "string" - } - }, - "read-only": { - "type": "boolean" - }, - "shared": { - "type": "boolean" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "description", - "type", - "shared", - "read-only", - "count-min", - "count-max", - "minimum-size" - ] - }, - "CharmURL": { - "type": "object", - "properties": { - "url": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "url" - ] - }, - "ConfigResult": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "DockerImageInfo": { - "type": "object", - "properties": { - "auth": { - "type": "string" - }, - "email": { - "type": "string" - }, - "identitytoken": { - "type": "string" - }, - "image-name": { - "type": "string" - }, - "password": { - "type": "string" - }, - "registrytoken": { - "type": "string" - }, - "repository": { - "type": "string" - }, - "serveraddress": { - "type": "string" - }, - "username": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "image-name" - ] - }, - "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" - ] - }, - "EntityStatus": { - "type": "object", - "properties": { - "data": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "info": { - "type": "string" - }, - "since": { - "type": "string", - "format": "date-time" - }, - "status": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "status", - "info", - "since" - ] - }, - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ExpressionTree": { - "type": "object", - "properties": { - "Expression": { - "type": "object", - "additionalProperties": true - } - }, - "additionalProperties": false, - "required": [ - "Expression" - ] - }, - "IntResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "IntResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/IntResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "KubernetesDeploymentInfo": { - "type": "object", - "properties": { - "deployment-type": { - "type": "string" - }, - "service-type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "deployment-type", - "service-type" - ] - }, - "KubernetesDeviceParams": { - "type": "object", - "properties": { - "Attributes": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "Count": { - "type": "integer" - }, - "Type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Type", - "Count", - "Attributes" - ] - }, - "KubernetesFilesystemAttachmentParams": { - "type": "object", - "properties": { - "mount-point": { - "type": "string" - }, - "provider": { - "type": "string" - }, - "read-only": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "provider" - ] - }, - "KubernetesFilesystemInfo": { - "type": "object", - "properties": { - "data": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "filesystem-id": { - "type": "string" - }, - "info": { - "type": "string" - }, - "mount-point": { - "type": "string" - }, - "pool": { - "type": "string" - }, - "read-only": { - "type": "boolean" - }, - "size": { - "type": "integer" - }, - "status": { - "type": "string" - }, - "storagename": { - "type": "string" - }, - "volume": { - "$ref": "#/definitions/KubernetesVolumeInfo" - } - }, - "additionalProperties": false, - "required": [ - "storagename", - "pool", - "size", - "filesystem-id", - "status", - "info", - "volume" - ] - }, - "KubernetesFilesystemParams": { - "type": "object", - "properties": { - "attachment": { - "$ref": "#/definitions/KubernetesFilesystemAttachmentParams" - }, - "attributes": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "provider": { - "type": "string" - }, - "size": { - "type": "integer" - }, - "storagename": { - "type": "string" - }, - "tags": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - } - }, - "additionalProperties": false, - "required": [ - "storagename", - "size", - "provider" - ] - }, - "KubernetesProvisioningInfo": { - "type": "object", - "properties": { - "charm-modified-version": { - "type": "integer" - }, - "constraints": { - "$ref": "#/definitions/Value" - }, - "deployment-info": { - "$ref": "#/definitions/KubernetesDeploymentInfo" - }, - "devices": { - "type": "array", - "items": { - "$ref": "#/definitions/KubernetesDeviceParams" - } - }, - "filesystems": { - "type": "array", - "items": { - "$ref": "#/definitions/KubernetesFilesystemParams" - } - }, - "image-repo": { - "$ref": "#/definitions/DockerImageInfo" - }, - "pod-spec": { - "type": "string" - }, - "raw-k8s-spec": { - "type": "string" - }, - "tags": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "volumes": { - "type": "array", - "items": { - "$ref": "#/definitions/KubernetesVolumeParams" - } - } - }, - "additionalProperties": false, - "required": [ - "pod-spec", - "constraints" - ] - }, - "KubernetesProvisioningInfoResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/KubernetesProvisioningInfo" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "KubernetesProvisioningInfoResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/KubernetesProvisioningInfoResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "KubernetesVolumeAttachmentParams": { - "type": "object", - "properties": { - "provider": { - "type": "string" - }, - "read-only": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "provider" - ] - }, - "KubernetesVolumeInfo": { - "type": "object", - "properties": { - "data": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "info": { - "type": "string" - }, - "persistent": { - "type": "boolean" - }, - "pool": { - "type": "string" - }, - "size": { - "type": "integer" - }, - "status": { - "type": "string" - }, - "volume-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "volume-id", - "size", - "persistent", - "status", - "info" - ] - }, - "KubernetesVolumeParams": { - "type": "object", - "properties": { - "attachment": { - "$ref": "#/definitions/KubernetesVolumeAttachmentParams" - }, - "attributes": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "provider": { - "type": "string" - }, - "size": { - "type": "integer" - }, - "storagename": { - "type": "string" - }, - "tags": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - } - }, - "additionalProperties": false, - "required": [ - "storagename", - "size", - "provider" - ] - }, - "LifeResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "life": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "life" - ] - }, - "LifeResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/LifeResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "NotifyWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "SetStatus": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityStatusArgs" - } - } - }, - "additionalProperties": false, - "required": [ - "entities" - ] - }, - "StringResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "StringResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "StringsWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id" - ] - }, - "StringsWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringsWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "UpdateApplicationServiceArg": { - "type": "object", - "properties": { - "addresses": { - "type": "array", - "items": { - "$ref": "#/definitions/Address" - } - }, - "application-tag": { - "type": "string" - }, - "generation": { - "type": "integer" - }, - "provider-id": { - "type": "string" - }, - "scale": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "application-tag", - "provider-id", - "addresses" - ] - }, - "UpdateApplicationServiceArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/UpdateApplicationServiceArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "UpdateApplicationUnitArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/UpdateApplicationUnits" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "UpdateApplicationUnitResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "info": { - "$ref": "#/definitions/UpdateApplicationUnitsInfo" - } - }, - "additionalProperties": false - }, - "UpdateApplicationUnitResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/UpdateApplicationUnitResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "UpdateApplicationUnits": { - "type": "object", - "properties": { - "application-tag": { - "type": "string" - }, - "generation": { - "type": "integer" - }, - "scale": { - "type": "integer" - }, - "status": { - "$ref": "#/definitions/EntityStatus" - }, - "units": { - "type": "array", - "items": { - "$ref": "#/definitions/ApplicationUnitParams" - } - } - }, - "additionalProperties": false, - "required": [ - "application-tag", - "units" - ] - }, - "UpdateApplicationUnitsInfo": { - "type": "object", - "properties": { - "units": { - "type": "array", - "items": { - "$ref": "#/definitions/ApplicationUnitInfo" - } - } - }, - "additionalProperties": false, - "required": [ - "units" - ] - }, - "Value": { - "type": "object", - "properties": { - "allocate-public-ip": { - "type": "boolean" - }, - "arch": { - "type": "string" - }, - "container": { - "type": "string" - }, - "cores": { - "type": "integer" - }, - "cpu-power": { - "type": "integer" - }, - "instance-role": { - "type": "string" - }, - "instance-type": { - "type": "string" - }, - "mem": { - "type": "integer" - }, - "root-disk": { - "type": "integer" - }, - "root-disk-source": { - "type": "string" - }, - "spaces": { - "type": "array", - "items": { - "type": "string" - } - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "virt-type": { - "type": "string" - }, - "zones": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - } - } - } - }, - { - "Name": "CharmDownloader", - "Description": "CharmDownloaderAPI implements an API for watching the charms collection for\nany entries that have not been yet downloaded to the blobstore and for\ntriggering their download.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "DownloadApplicationCharms": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "DownloadApplicationCharms iterates the list of provided applications and\ndownloads any referenced charms that have not yet been persisted to the\nblob store." - }, - "WatchApplicationsWithPendingCharms": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsWatchResult" - } - }, - "description": "WatchApplicationsWithPendingCharms registers and returns a watcher instance\nthat reports the ID of applications that reference a charm which has not yet\nbeen downloaded." - } - }, - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "StringsWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id" - ] - } - } - } - }, - { - "Name": "CharmRevisionUpdater", - "Description": "CharmRevisionUpdaterAPI implements the CharmRevisionUpdater interface and is the concrete\nimplementation of the api end point.", - "Version": 2, - "AvailableTo": [ - "controller-machine-agent" - ], - "Schema": { - "type": "object", - "properties": { - "UpdateLatestRevisions": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ErrorResult" - } - }, - "description": "UpdateLatestRevisions retrieves the latest revision information from the charm store for all deployed charms\nand records this information in state." - } - }, - "definitions": { - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - } - } - } - }, - { - "Name": "Charms", - "Description": "APIv6 provides the Charms API facade for version 6.\nIt removes the AddCharmWithAuthorization function, as\nwe no longer support macaroons.", - "Version": 6, - "AvailableTo": [ - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "AddCharm": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/AddCharmWithOrigin" - }, - "Result": { - "$ref": "#/definitions/CharmOriginResult" - } - }, - "description": "AddCharm adds the given charm URL (which must include revision) to the\nenvironment, if it does not exist yet. Local charms are not supported,\nonly charm store and charm hub URLs. See also AddLocalCharm()." - }, - "CharmInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/CharmURL" - }, - "Result": { - "$ref": "#/definitions/Charm" - } - }, - "description": "CharmInfo returns information about the requested charm." - }, - "CheckCharmPlacement": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ApplicationCharmPlacements" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "CheckCharmPlacement checks if a charm is allowed to be placed with in a\ngiven application." - }, - "GetDownloadInfos": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/CharmURLAndOrigins" - }, - "Result": { - "$ref": "#/definitions/DownloadInfoResults" - } - }, - "description": "GetDownloadInfos attempts to get the bundle corresponding to the charm url\nand origin." - }, - "IsMetered": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/CharmURL" - }, - "Result": { - "$ref": "#/definitions/IsMeteredResult" - } - }, - "description": "IsMetered returns whether or not the charm is metered." - }, - "List": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/CharmsList" - }, - "Result": { - "$ref": "#/definitions/CharmsListResult" - } - }, - "description": "List returns a list of charm URLs currently in the state.\nIf supplied parameter contains any names, the result will\nbe filtered to return only the charms with supplied names." - }, - "ListCharmResources": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/CharmURLAndOrigins" - }, - "Result": { - "$ref": "#/definitions/CharmResourcesResults" - } - }, - "description": "ListCharmResources returns a series of resources for a given charm." - }, - "ResolveCharms": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ResolveCharmsWithChannel" - }, - "Result": { - "$ref": "#/definitions/ResolveCharmWithChannelResults" - } - }, - "description": "ResolveCharms resolves the given charm URLs with an optionally specified\npreferred channel. Channel provided via CharmOrigin." - } - }, - "definitions": { - "AddCharmWithOrigin": { - "type": "object", - "properties": { - "charm-origin": { - "$ref": "#/definitions/CharmOrigin" - }, - "force": { - "type": "boolean" - }, - "url": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "url", - "charm-origin", - "force" - ] - }, - "ApplicationCharmPlacement": { - "type": "object", - "properties": { - "application": { - "type": "string" - }, - "charm-url": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "application", - "charm-url" - ] - }, - "ApplicationCharmPlacements": { - "type": "object", - "properties": { - "placements": { - "type": "array", - "items": { - "$ref": "#/definitions/ApplicationCharmPlacement" - } - } - }, - "additionalProperties": false, - "required": [ - "placements" - ] - }, - "Base": { - "type": "object", - "properties": { - "channel": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "channel" - ] - }, - "Charm": { - "type": "object", - "properties": { - "actions": { - "$ref": "#/definitions/CharmActions" - }, - "config": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmOption" - } - } - }, - "lxd-profile": { - "$ref": "#/definitions/CharmLXDProfile" - }, - "manifest": { - "$ref": "#/definitions/CharmManifest" - }, - "meta": { - "$ref": "#/definitions/CharmMeta" - }, - "metrics": { - "$ref": "#/definitions/CharmMetrics" - }, - "revision": { - "type": "integer" - }, - "url": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "revision", - "url", - "config" - ] - }, - "CharmActionSpec": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "params": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "description", - "params" - ] - }, - "CharmActions": { - "type": "object", - "properties": { - "specs": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmActionSpec" - } - } - } - }, - "additionalProperties": false - }, - "CharmBase": { - "type": "object", - "properties": { - "architectures": { - "type": "array", - "items": { - "type": "string" - } - }, - "channel": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "additionalProperties": false - }, - "CharmContainer": { - "type": "object", - "properties": { - "mounts": { - "type": "array", - "items": { - "$ref": "#/definitions/CharmMount" - } - }, - "resource": { - "type": "string" - } - }, - "additionalProperties": false - }, - "CharmDeployment": { - "type": "object", - "properties": { - "min-version": { - "type": "string" - }, - "mode": { - "type": "string" - }, - "service": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type", - "mode", - "service", - "min-version" - ] - }, - "CharmDevice": { - "type": "object", - "properties": { - "CountMax": { - "type": "integer" - }, - "CountMin": { - "type": "integer" - }, - "Description": { - "type": "string" - }, - "Name": { - "type": "string" - }, - "Type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Name", - "Description", - "Type", - "CountMin", - "CountMax" - ] - }, - "CharmLXDProfile": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "description": { - "type": "string" - }, - "devices": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - } - } - } - }, - "additionalProperties": false, - "required": [ - "config", - "description", - "devices" - ] - }, - "CharmManifest": { - "type": "object", - "properties": { - "bases": { - "type": "array", - "items": { - "$ref": "#/definitions/CharmBase" - } - } - }, - "additionalProperties": false - }, - "CharmMeta": { - "type": "object", - "properties": { - "assumes-expr": { - "$ref": "#/definitions/ExpressionTree" - }, - "categories": { - "type": "array", - "items": { - "type": "string" - } - }, - "containers": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmContainer" - } - } - }, - "deployment": { - "$ref": "#/definitions/CharmDeployment" - }, - "description": { - "type": "string" - }, - "devices": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmDevice" - } - } - }, - "extra-bindings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "min-juju-version": { - "type": "string" - }, - "name": { - "type": "string" - }, - "payload-classes": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmPayloadClass" - } - } - }, - "peers": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmRelation" - } - } - }, - "provides": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmRelation" - } - } - }, - "requires": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmRelation" - } - } - }, - "resources": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmResourceMeta" - } - } - }, - "series": { - "type": "array", - "items": { - "type": "string" - } - }, - "storage": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmStorage" - } - } - }, - "subordinate": { - "type": "boolean" - }, - "summary": { - "type": "string" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "terms": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "name", - "summary", - "description", - "subordinate" - ] - }, - "CharmMetric": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type", - "description" - ] - }, - "CharmMetrics": { - "type": "object", - "properties": { - "metrics": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmMetric" - } - } - }, - "plan": { - "$ref": "#/definitions/CharmPlan" - } - }, - "additionalProperties": false, - "required": [ - "metrics", - "plan" - ] - }, - "CharmMount": { - "type": "object", - "properties": { - "location": { - "type": "string" - }, - "storage": { - "type": "string" - } - }, - "additionalProperties": false - }, - "CharmOption": { - "type": "object", - "properties": { - "default": { - "type": "object", - "additionalProperties": true - }, - "description": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type" - ] - }, - "CharmOrigin": { - "type": "object", - "properties": { - "architecture": { - "type": "string" - }, - "base": { - "$ref": "#/definitions/Base" - }, - "branch": { - "type": "string" - }, - "hash": { - "type": "string" - }, - "id": { - "type": "string" - }, - "instance-key": { - "type": "string" - }, - "revision": { - "type": "integer" - }, - "risk": { - "type": "string" - }, - "source": { - "type": "string" - }, - "track": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "source", - "type", - "id" - ] - }, - "CharmOriginResult": { - "type": "object", - "properties": { - "charm-origin": { - "$ref": "#/definitions/CharmOrigin" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "charm-origin" - ] - }, - "CharmPayloadClass": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "type" - ] - }, - "CharmPlan": { - "type": "object", - "properties": { - "required": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "required" - ] - }, - "CharmRelation": { - "type": "object", - "properties": { - "interface": { - "type": "string" - }, - "limit": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "optional": { - "type": "boolean" - }, - "role": { - "type": "string" - }, - "scope": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "role", - "interface", - "optional", - "limit", - "scope" - ] - }, - "CharmResource": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "fingerprint": { - "type": "array", - "items": { - "type": "integer" - } - }, - "name": { - "type": "string" - }, - "origin": { - "type": "string" - }, - "path": { - "type": "string" - }, - "revision": { - "type": "integer" - }, - "size": { - "type": "integer" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "type", - "path", - "origin", - "revision", - "fingerprint", - "size" - ] - }, - "CharmResourceMeta": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "name": { - "type": "string" - }, - "path": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "type", - "path", - "description" - ] - }, - "CharmResourceResult": { - "type": "object", - "properties": { - "CharmResource": { - "$ref": "#/definitions/CharmResource" - }, - "ErrorResult": { - "$ref": "#/definitions/ErrorResult" - }, - "description": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "fingerprint": { - "type": "array", - "items": { - "type": "integer" - } - }, - "name": { - "type": "string" - }, - "origin": { - "type": "string" - }, - "path": { - "type": "string" - }, - "revision": { - "type": "integer" - }, - "size": { - "type": "integer" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "ErrorResult", - "name", - "type", - "path", - "origin", - "revision", - "fingerprint", - "size", - "CharmResource" - ] - }, - "CharmResourcesResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "type": "array", - "items": { - "$ref": "#/definitions/CharmResourceResult" - } - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "CharmStorage": { - "type": "object", - "properties": { - "count-max": { - "type": "integer" - }, - "count-min": { - "type": "integer" - }, - "description": { - "type": "string" - }, - "location": { - "type": "string" - }, - "minimum-size": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "properties": { - "type": "array", - "items": { - "type": "string" - } - }, - "read-only": { - "type": "boolean" - }, - "shared": { - "type": "boolean" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "description", - "type", - "shared", - "read-only", - "count-min", - "count-max", - "minimum-size" - ] - }, - "CharmURL": { - "type": "object", - "properties": { - "url": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "url" - ] - }, - "CharmURLAndOrigin": { - "type": "object", - "properties": { - "charm-origin": { - "$ref": "#/definitions/CharmOrigin" - }, - "charm-url": { - "type": "string" - }, - "macaroon": { - "$ref": "#/definitions/Macaroon" - } - }, - "additionalProperties": false, - "required": [ - "charm-url", - "charm-origin" - ] - }, - "CharmURLAndOrigins": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/CharmURLAndOrigin" - } - } - }, - "additionalProperties": false, - "required": [ - "entities" - ] - }, - "CharmsList": { - "type": "object", - "properties": { - "names": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "names" - ] - }, - "CharmsListResult": { - "type": "object", - "properties": { - "charm-urls": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "charm-urls" - ] - }, - "DownloadInfoResult": { - "type": "object", - "properties": { - "charm-origin": { - "$ref": "#/definitions/CharmOrigin" - }, - "url": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "url", - "charm-origin" - ] - }, - "DownloadInfoResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/DownloadInfoResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ExpressionTree": { - "type": "object", - "properties": { - "Expression": { - "type": "object", - "additionalProperties": true - } - }, - "additionalProperties": false, - "required": [ - "Expression" - ] - }, - "IsMeteredResult": { - "type": "object", - "properties": { - "metered": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "metered" - ] - }, - "Macaroon": { - "type": "object", - "additionalProperties": false - }, - "ResolveCharmWithChannel": { - "type": "object", - "properties": { - "charm-origin": { - "$ref": "#/definitions/CharmOrigin" - }, - "reference": { - "type": "string" - }, - "switch-charm": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "reference", - "charm-origin" - ] - }, - "ResolveCharmWithChannelResult": { - "type": "object", - "properties": { - "charm-origin": { - "$ref": "#/definitions/CharmOrigin" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "supported-series": { - "type": "array", - "items": { - "type": "string" - } - }, - "url": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "url", - "charm-origin", - "supported-series" - ] - }, - "ResolveCharmWithChannelResults": { - "type": "object", - "properties": { - "Results": { - "type": "array", - "items": { - "$ref": "#/definitions/ResolveCharmWithChannelResult" - } - } - }, - "additionalProperties": false, - "required": [ - "Results" - ] - }, - "ResolveCharmsWithChannel": { - "type": "object", - "properties": { - "macaroon": { - "$ref": "#/definitions/Macaroon" - }, - "resolve": { - "type": "array", - "items": { - "$ref": "#/definitions/ResolveCharmWithChannel" - } - } - }, - "additionalProperties": false, - "required": [ - "resolve" - ] - } - } - } - }, - { - "Name": "Cleaner", - "Description": "CleanerAPI implements the API used by the cleaner worker.", - "Version": 2, - "AvailableTo": [ - "controller-machine-agent" - ], - "Schema": { - "type": "object", - "properties": { - "Cleanup": { - "type": "object", - "description": "Cleanup triggers a state cleanup" - }, - "WatchCleanups": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResult" - } - }, - "description": "WatchCleanups watches for cleanups to be performed in state." - } - }, - "definitions": { - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - } - } - } - }, - { - "Name": "Client", - "Description": "Client serves client-specific API methods.", - "Version": 6, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "FindTools": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/FindToolsParams" - }, - "Result": { - "$ref": "#/definitions/FindToolsResult" - } - }, - "description": "FindTools returns a List containing all tools matching the given parameters.\nTODO(juju 3.1) - remove, used by 2.9 client only" - }, - "FullStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/StatusParams" - }, - "Result": { - "$ref": "#/definitions/FullStatus" - } - }, - "description": "FullStatus gives the information needed for juju status over the api" - }, - "StatusHistory": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/StatusHistoryRequests" - }, - "Result": { - "$ref": "#/definitions/StatusHistoryResults" - } - }, - "description": "StatusHistory returns a slice of past statuses for several entities." - }, - "WatchAll": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/AllWatcherId" - } - }, - "description": "WatchAll initiates a watcher for entities in the connected model." - } - }, - "definitions": { - "AllWatcherId": { - "type": "object", - "properties": { - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id" - ] - }, - "ApplicationOfferStatus": { - "type": "object", - "properties": { - "active-connected-count": { - "type": "integer" - }, - "application-name": { - "type": "string" - }, - "charm": { - "type": "string" - }, - "endpoints": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/RemoteEndpoint" - } - } - }, - "err": { - "$ref": "#/definitions/Error" - }, - "offer-name": { - "type": "string" - }, - "total-connected-count": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "offer-name", - "application-name", - "charm", - "endpoints", - "active-connected-count", - "total-connected-count" - ] - }, - "ApplicationStatus": { - "type": "object", - "properties": { - "base": { - "$ref": "#/definitions/Base" - }, - "can-upgrade-to": { - "type": "string" - }, - "charm": { - "type": "string" - }, - "charm-channel": { - "type": "string" - }, - "charm-profile": { - "type": "string" - }, - "charm-version": { - "type": "string" - }, - "endpoint-bindings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "err": { - "$ref": "#/definitions/Error" - }, - "exposed": { - "type": "boolean" - }, - "exposed-endpoints": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/ExposedEndpoint" - } - } - }, - "int": { - "type": "integer" - }, - "life": { - "type": "string" - }, - "meter-statuses": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/MeterStatus" - } - } - }, - "provider-id": { - "type": "string" - }, - "public-address": { - "type": "string" - }, - "relations": { - "type": "object", - "patternProperties": { - ".*": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "status": { - "$ref": "#/definitions/DetailedStatus" - }, - "subordinate-to": { - "type": "array", - "items": { - "type": "string" - } - }, - "units": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/UnitStatus" - } - } - }, - "workload-version": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "charm", - "charm-version", - "charm-profile", - "base", - "exposed", - "life", - "relations", - "can-upgrade-to", - "subordinate-to", - "units", - "meter-statuses", - "status", - "workload-version", - "endpoint-bindings", - "public-address" - ] - }, - "Base": { - "type": "object", - "properties": { - "channel": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "channel" - ] - }, - "Binary": { - "type": "object", - "properties": { - "Arch": { - "type": "string" - }, - "Build": { - "type": "integer" - }, - "Major": { - "type": "integer" - }, - "Minor": { - "type": "integer" - }, - "Number": { - "$ref": "#/definitions/Number" - }, - "Patch": { - "type": "integer" - }, - "Release": { - "type": "string" - }, - "Tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Major", - "Minor", - "Tag", - "Patch", - "Build", - "Number", - "Release", - "Arch" - ] - }, - "BranchStatus": { - "type": "object", - "properties": { - "assigned-units": { - "type": "object", - "patternProperties": { - ".*": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "created": { - "type": "integer" - }, - "created-by": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "assigned-units", - "created", - "created-by" - ] - }, - "DetailedStatus": { - "type": "object", - "properties": { - "data": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "err": { - "$ref": "#/definitions/Error" - }, - "info": { - "type": "string" - }, - "kind": { - "type": "string" - }, - "life": { - "type": "string" - }, - "since": { - "type": "string", - "format": "date-time" - }, - "status": { - "type": "string" - }, - "version": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "status", - "info", - "data", - "since", - "kind", - "version", - "life" - ] - }, - "EndpointStatus": { - "type": "object", - "properties": { - "application": { - "type": "string" - }, - "name": { - "type": "string" - }, - "role": { - "type": "string" - }, - "subordinate": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "application", - "name", - "role", - "subordinate" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ExposedEndpoint": { - "type": "object", - "properties": { - "expose-to-cidrs": { - "type": "array", - "items": { - "type": "string" - } - }, - "expose-to-spaces": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "FindToolsParams": { - "type": "object", - "properties": { - "agentstream": { - "type": "string" - }, - "arch": { - "type": "string" - }, - "major": { - "type": "integer" - }, - "number": { - "$ref": "#/definitions/Number" - }, - "os-type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "number", - "major", - "arch", - "os-type", - "agentstream" - ] - }, - "FindToolsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "list": { - "type": "array", - "items": { - "$ref": "#/definitions/Tools" - } - } - }, - "additionalProperties": false, - "required": [ - "list" - ] - }, - "FullStatus": { - "type": "object", - "properties": { - "applications": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/ApplicationStatus" - } - } - }, - "branches": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/BranchStatus" - } - } - }, - "controller-timestamp": { - "type": "string", - "format": "date-time" - }, - "machines": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/MachineStatus" - } - } - }, - "model": { - "$ref": "#/definitions/ModelStatusInfo" - }, - "offers": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/ApplicationOfferStatus" - } - } - }, - "relations": { - "type": "array", - "items": { - "$ref": "#/definitions/RelationStatus" - } - }, - "remote-applications": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/RemoteApplicationStatus" - } - } - } - }, - "additionalProperties": false, - "required": [ - "model", - "machines", - "applications", - "remote-applications", - "offers", - "relations", - "controller-timestamp", - "branches" - ] - }, - "History": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "statuses": { - "type": "array", - "items": { - "$ref": "#/definitions/DetailedStatus" - } - } - }, - "additionalProperties": false, - "required": [ - "statuses" - ] - }, - "LXDProfile": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "description": { - "type": "string" - }, - "devices": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - } - } - } - }, - "additionalProperties": false, - "required": [ - "config", - "description", - "devices" - ] - }, - "MachineStatus": { - "type": "object", - "properties": { - "agent-status": { - "$ref": "#/definitions/DetailedStatus" - }, - "base": { - "$ref": "#/definitions/Base" - }, - "constraints": { - "type": "string" - }, - "containers": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/MachineStatus" - } - } - }, - "display-name": { - "type": "string" - }, - "dns-name": { - "type": "string" - }, - "hardware": { - "type": "string" - }, - "has-vote": { - "type": "boolean" - }, - "hostname": { - "type": "string" - }, - "id": { - "type": "string" - }, - "instance-id": { - "type": "string" - }, - "instance-status": { - "$ref": "#/definitions/DetailedStatus" - }, - "ip-addresses": { - "type": "array", - "items": { - "type": "string" - } - }, - "jobs": { - "type": "array", - "items": { - "type": "string" - } - }, - "lxd-profiles": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/LXDProfile" - } - } - }, - "modification-status": { - "$ref": "#/definitions/DetailedStatus" - }, - "network-interfaces": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/NetworkInterface" - } - } - }, - "primary-controller-machine": { - "type": "boolean" - }, - "wants-vote": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "agent-status", - "instance-status", - "modification-status", - "dns-name", - "instance-id", - "display-name", - "base", - "id", - "containers", - "constraints", - "hardware", - "jobs", - "has-vote", - "wants-vote" - ] - }, - "MeterStatus": { - "type": "object", - "properties": { - "color": { - "type": "string" - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "color", - "message" - ] - }, - "ModelStatusInfo": { - "type": "object", - "properties": { - "available-version": { - "type": "string" - }, - "cloud-tag": { - "type": "string" - }, - "meter-status": { - "$ref": "#/definitions/MeterStatus" - }, - "model-status": { - "$ref": "#/definitions/DetailedStatus" - }, - "name": { - "type": "string" - }, - "region": { - "type": "string" - }, - "sla": { - "type": "string" - }, - "type": { - "type": "string" - }, - "version": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "type", - "cloud-tag", - "version", - "available-version", - "model-status", - "meter-status", - "sla" - ] - }, - "NetworkInterface": { - "type": "object", - "properties": { - "dns-nameservers": { - "type": "array", - "items": { - "type": "string" - } - }, - "gateway": { - "type": "string" - }, - "ip-addresses": { - "type": "array", - "items": { - "type": "string" - } - }, - "is-up": { - "type": "boolean" - }, - "mac-address": { - "type": "string" - }, - "space": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "ip-addresses", - "mac-address", - "is-up" - ] - }, - "Number": { - "type": "object", - "properties": { - "Build": { - "type": "integer" - }, - "Major": { - "type": "integer" - }, - "Minor": { - "type": "integer" - }, - "Patch": { - "type": "integer" - }, - "Tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Major", - "Minor", - "Tag", - "Patch", - "Build" - ] - }, - "RelationStatus": { - "type": "object", - "properties": { - "endpoints": { - "type": "array", - "items": { - "$ref": "#/definitions/EndpointStatus" - } - }, - "id": { - "type": "integer" - }, - "interface": { - "type": "string" - }, - "key": { - "type": "string" - }, - "scope": { - "type": "string" - }, - "status": { - "$ref": "#/definitions/DetailedStatus" - } - }, - "additionalProperties": false, - "required": [ - "id", - "key", - "interface", - "scope", - "endpoints", - "status" - ] - }, - "RemoteApplicationStatus": { - "type": "object", - "properties": { - "endpoints": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoteEndpoint" - } - }, - "err": { - "$ref": "#/definitions/Error" - }, - "life": { - "type": "string" - }, - "offer-name": { - "type": "string" - }, - "offer-url": { - "type": "string" - }, - "relations": { - "type": "object", - "patternProperties": { - ".*": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "status": { - "$ref": "#/definitions/DetailedStatus" - } - }, - "additionalProperties": false, - "required": [ - "offer-url", - "offer-name", - "endpoints", - "life", - "relations", - "status" - ] - }, - "RemoteEndpoint": { - "type": "object", - "properties": { - "interface": { - "type": "string" - }, - "limit": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "role": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "role", - "interface", - "limit" - ] - }, - "StatusHistoryFilter": { - "type": "object", - "properties": { - "date": { - "type": "string", - "format": "date-time" - }, - "delta": { - "type": "integer" - }, - "exclude": { - "type": "array", - "items": { - "type": "string" - } - }, - "size": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "size", - "date", - "delta", - "exclude" - ] - }, - "StatusHistoryRequest": { - "type": "object", - "properties": { - "filter": { - "$ref": "#/definitions/StatusHistoryFilter" - }, - "historyKind": { - "type": "string" - }, - "size": { - "type": "integer" - }, - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "historyKind", - "size", - "filter", - "tag" - ] - }, - "StatusHistoryRequests": { - "type": "object", - "properties": { - "requests": { - "type": "array", - "items": { - "$ref": "#/definitions/StatusHistoryRequest" - } - } - }, - "additionalProperties": false, - "required": [ - "requests" - ] - }, - "StatusHistoryResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "history": { - "$ref": "#/definitions/History" - } - }, - "additionalProperties": false, - "required": [ - "history" - ] - }, - "StatusHistoryResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StatusHistoryResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "StatusParams": { - "type": "object", - "properties": { - "patterns": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "patterns" - ] - }, - "Tools": { - "type": "object", - "properties": { - "sha256": { - "type": "string" - }, - "size": { - "type": "integer" - }, - "url": { - "type": "string" - }, - "version": { - "$ref": "#/definitions/Binary" - } - }, - "additionalProperties": false, - "required": [ - "version", - "url", - "size" - ] - }, - "UnitStatus": { - "type": "object", - "properties": { - "address": { - "type": "string" - }, - "agent-status": { - "$ref": "#/definitions/DetailedStatus" - }, - "charm": { - "type": "string" - }, - "leader": { - "type": "boolean" - }, - "machine": { - "type": "string" - }, - "opened-ports": { - "type": "array", - "items": { - "type": "string" - } - }, - "provider-id": { - "type": "string" - }, - "public-address": { - "type": "string" - }, - "subordinates": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/UnitStatus" - } - } - }, - "workload-status": { - "$ref": "#/definitions/DetailedStatus" - }, - "workload-version": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "agent-status", - "workload-status", - "workload-version", - "machine", - "opened-ports", - "public-address", - "charm", - "subordinates" - ] - } - } - } - }, - { - "Name": "Cloud", - "Description": "CloudAPI implements the cloud interface and is the concrete implementation\nof the api end point.", - "Version": 7, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "controller-user" - ], - "Schema": { - "type": "object", - "properties": { - "AddCloud": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/AddCloudArgs" - } - }, - "description": "AddCloud adds a new cloud, different from the one managed by the controller." - }, - "AddCredentials": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/TaggedCredentials" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "AddCredentials adds new credentials.\nIn contrast to UpdateCredentials() below, the new credentials can be\nfor a cloud that the controller does not manage (this is required\nfor CAAS models)" - }, - "CheckCredentialsModels": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/TaggedCredentials" - }, - "Result": { - "$ref": "#/definitions/UpdateCredentialResults" - } - }, - "description": "CheckCredentialsModels validates supplied cloud credentials' content against\nmodels that currently use these credentials.\nIf there are any models that are using a credential and these models or their\ncloud instances are not going to be accessible with corresponding credential,\nthere will be detailed validation errors per model.\nThere's no Juju API client which uses this, but JAAS does," - }, - "Cloud": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/CloudResults" - } - }, - "description": "Cloud returns the cloud definitions for the specified clouds." - }, - "CloudInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/CloudInfoResults" - } - }, - "description": "CloudInfo returns information about the specified clouds." - }, - "Clouds": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/CloudsResult" - } - }, - "description": "Clouds returns the definitions of all clouds supported by the controller\nthat the logged in user can see." - }, - "Credential": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/CloudCredentialResults" - } - }, - "description": "Credential returns the specified cloud credential for each tag, minus secrets." - }, - "CredentialContents": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/CloudCredentialArgs" - }, - "Result": { - "$ref": "#/definitions/CredentialContentResults" - } - }, - "description": "CredentialContents returns the specified cloud credentials,\nincluding the secrets if requested.\nIf no specific credential name/cloud was passed in, all credentials for this user\nare returned.\nOnly credential owner can see its contents as well as what models use it.\nController admin has no special superpowers here and is treated the same as all other users." - }, - "InstanceTypes": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/CloudInstanceTypesConstraints" - }, - "Result": { - "$ref": "#/definitions/InstanceTypesResults" - } - }, - "description": "InstanceTypes returns instance type information for the cloud and region\nin which the current model is deployed." - }, - "ListCloudInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ListCloudsRequest" - }, - "Result": { - "$ref": "#/definitions/ListCloudInfoResults" - } - }, - "description": "ListCloudInfo returns clouds that the specified user has access to.\nController admins (superuser) can list clouds for any user.\nOther users can only ask about their own clouds." - }, - "ModifyCloudAccess": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ModifyCloudAccessRequest" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "ModifyCloudAccess changes the model access granted to users." - }, - "RemoveClouds": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "RemoveClouds removes the specified clouds from the controller.\nIf a cloud is in use (has models deployed to it), the removal will fail." - }, - "RevokeCredentialsCheckModels": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RevokeCredentialArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "RevokeCredentialsCheckModels revokes a set of cloud credentials.\nIf the credentials are used by any of the models, the credential deletion will be aborted.\nIf credential-in-use needs to be revoked nonetheless, this method allows the use of force." - }, - "UpdateCloud": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/UpdateCloudArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "UpdateCloud updates an existing cloud that the controller knows about." - }, - "UpdateCredentialsCheckModels": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/UpdateCredentialArgs" - }, - "Result": { - "$ref": "#/definitions/UpdateCredentialResults" - } - }, - "description": "UpdateCredentialsCheckModels updates a set of cloud credentials' content.\nIf there are any models that are using a credential and these models\nare not going to be visible with updated credential content,\nthere will be detailed validation errors per model. Such model errors are returned\nseparately and do not contribute to the overall method error status.\nController admins can 'force' an update of the credential\nregardless of whether it is deemed valid or not." - }, - "UserCredentials": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/UserClouds" - }, - "Result": { - "$ref": "#/definitions/StringsResults" - } - }, - "description": "UserCredentials returns the cloud credentials for a set of users." - } - }, - "definitions": { - "AddCloudArgs": { - "type": "object", - "properties": { - "cloud": { - "$ref": "#/definitions/Cloud" - }, - "force": { - "type": "boolean" - }, - "name": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "cloud", - "name" - ] - }, - "Cloud": { - "type": "object", - "properties": { - "auth-types": { - "type": "array", - "items": { - "type": "string" - } - }, - "ca-certificates": { - "type": "array", - "items": { - "type": "string" - } - }, - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "endpoint": { - "type": "string" - }, - "host-cloud-region": { - "type": "string" - }, - "identity-endpoint": { - "type": "string" - }, - "is-controller-cloud": { - "type": "boolean" - }, - "region-config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - } - }, - "regions": { - "type": "array", - "items": { - "$ref": "#/definitions/CloudRegion" - } - }, - "skip-tls-verify": { - "type": "boolean" - }, - "storage-endpoint": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type" - ] - }, - "CloudCredential": { - "type": "object", - "properties": { - "attrs": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "auth-type": { - "type": "string" - }, - "redacted": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "auth-type" - ] - }, - "CloudCredentialArg": { - "type": "object", - "properties": { - "cloud-name": { - "type": "string" - }, - "credential-name": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "cloud-name", - "credential-name" - ] - }, - "CloudCredentialArgs": { - "type": "object", - "properties": { - "credentials": { - "type": "array", - "items": { - "$ref": "#/definitions/CloudCredentialArg" - } - }, - "include-secrets": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "include-secrets" - ] - }, - "CloudCredentialResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/CloudCredential" - } - }, - "additionalProperties": false - }, - "CloudCredentialResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/CloudCredentialResult" - } - } - }, - "additionalProperties": false - }, - "CloudDetails": { - "type": "object", - "properties": { - "auth-types": { - "type": "array", - "items": { - "type": "string" - } - }, - "endpoint": { - "type": "string" - }, - "identity-endpoint": { - "type": "string" - }, - "regions": { - "type": "array", - "items": { - "$ref": "#/definitions/CloudRegion" - } - }, - "storage-endpoint": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type" - ] - }, - "CloudInfo": { - "type": "object", - "properties": { - "CloudDetails": { - "$ref": "#/definitions/CloudDetails" - }, - "users": { - "type": "array", - "items": { - "$ref": "#/definitions/CloudUserInfo" - } - } - }, - "additionalProperties": false, - "required": [ - "CloudDetails", - "users" - ] - }, - "CloudInfoResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/CloudInfo" - } - }, - "additionalProperties": false - }, - "CloudInfoResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/CloudInfoResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "CloudInstanceTypesConstraint": { - "type": "object", - "properties": { - "cloud-tag": { - "type": "string" - }, - "constraints": { - "$ref": "#/definitions/Value" - }, - "region": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "cloud-tag", - "region" - ] - }, - "CloudInstanceTypesConstraints": { - "type": "object", - "properties": { - "constraints": { - "type": "array", - "items": { - "$ref": "#/definitions/CloudInstanceTypesConstraint" - } - } - }, - "additionalProperties": false, - "required": [ - "constraints" - ] - }, - "CloudRegion": { - "type": "object", - "properties": { - "endpoint": { - "type": "string" - }, - "identity-endpoint": { - "type": "string" - }, - "name": { - "type": "string" - }, - "storage-endpoint": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name" - ] - }, - "CloudResult": { - "type": "object", - "properties": { - "cloud": { - "$ref": "#/definitions/Cloud" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "CloudResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/CloudResult" - } - } - }, - "additionalProperties": false - }, - "CloudUserInfo": { - "type": "object", - "properties": { - "access": { - "type": "string" - }, - "display-name": { - "type": "string" - }, - "user": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "user", - "display-name", - "access" - ] - }, - "CloudsResult": { - "type": "object", - "properties": { - "clouds": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/Cloud" - } - } - } - }, - "additionalProperties": false - }, - "ControllerCredentialInfo": { - "type": "object", - "properties": { - "content": { - "$ref": "#/definitions/CredentialContent" - }, - "models": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelAccess" - } - } - }, - "additionalProperties": false - }, - "CredentialContent": { - "type": "object", - "properties": { - "attrs": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "auth-type": { - "type": "string" - }, - "cloud": { - "type": "string" - }, - "name": { - "type": "string" - }, - "valid": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "name", - "cloud", - "auth-type" - ] - }, - "CredentialContentResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/ControllerCredentialInfo" - } - }, - "additionalProperties": false - }, - "CredentialContentResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/CredentialContentResult" - } - } - }, - "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": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "InstanceType": { - "type": "object", - "properties": { - "arches": { - "type": "array", - "items": { - "type": "string" - } - }, - "cost": { - "type": "integer" - }, - "cpu-cores": { - "type": "integer" - }, - "deprecated": { - "type": "boolean" - }, - "memory": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "root-disk": { - "type": "integer" - }, - "virt-type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "arches", - "cpu-cores", - "memory" - ] - }, - "InstanceTypesResult": { - "type": "object", - "properties": { - "cost-currency": { - "type": "string" - }, - "cost-divisor": { - "type": "integer" - }, - "cost-unit": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "instance-types": { - "type": "array", - "items": { - "$ref": "#/definitions/InstanceType" - } - } - }, - "additionalProperties": false - }, - "InstanceTypesResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/InstanceTypesResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ListCloudInfo": { - "type": "object", - "properties": { - "CloudDetails": { - "$ref": "#/definitions/CloudDetails" - }, - "user-access": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "CloudDetails", - "user-access" - ] - }, - "ListCloudInfoResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/ListCloudInfo" - } - }, - "additionalProperties": false - }, - "ListCloudInfoResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ListCloudInfoResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ListCloudsRequest": { - "type": "object", - "properties": { - "all": { - "type": "boolean" - }, - "user-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "user-tag" - ] - }, - "ModelAccess": { - "type": "object", - "properties": { - "access": { - "type": "string" - }, - "model": { - "type": "string" - } - }, - "additionalProperties": false - }, - "ModifyCloudAccess": { - "type": "object", - "properties": { - "access": { - "type": "string" - }, - "action": { - "type": "string" - }, - "cloud-tag": { - "type": "string" - }, - "user-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "user-tag", - "cloud-tag", - "action", - "access" - ] - }, - "ModifyCloudAccessRequest": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "$ref": "#/definitions/ModifyCloudAccess" - } - } - }, - "additionalProperties": false, - "required": [ - "changes" - ] - }, - "RevokeCredentialArg": { - "type": "object", - "properties": { - "force": { - "type": "boolean" - }, - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "force" - ] - }, - "RevokeCredentialArgs": { - "type": "object", - "properties": { - "credentials": { - "type": "array", - "items": { - "$ref": "#/definitions/RevokeCredentialArg" - } - } - }, - "additionalProperties": false, - "required": [ - "credentials" - ] - }, - "StringsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "StringsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringsResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "TaggedCredential": { - "type": "object", - "properties": { - "credential": { - "$ref": "#/definitions/CloudCredential" - }, - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "credential" - ] - }, - "TaggedCredentials": { - "type": "object", - "properties": { - "credentials": { - "type": "array", - "items": { - "$ref": "#/definitions/TaggedCredential" - } - } - }, - "additionalProperties": false - }, - "UpdateCloudArgs": { - "type": "object", - "properties": { - "clouds": { - "type": "array", - "items": { - "$ref": "#/definitions/AddCloudArgs" - } - } - }, - "additionalProperties": false, - "required": [ - "clouds" - ] - }, - "UpdateCredentialArgs": { - "type": "object", - "properties": { - "credentials": { - "type": "array", - "items": { - "$ref": "#/definitions/TaggedCredential" - } - }, - "force": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "credentials", - "force" - ] - }, - "UpdateCredentialModelResult": { - "type": "object", - "properties": { - "errors": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - }, - "name": { - "type": "string" - }, - "uuid": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "uuid", - "name" - ] - }, - "UpdateCredentialResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "models": { - "type": "array", - "items": { - "$ref": "#/definitions/UpdateCredentialModelResult" - } - }, - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag" - ] - }, - "UpdateCredentialResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/UpdateCredentialResult" - } - } - }, - "additionalProperties": false - }, - "UserCloud": { - "type": "object", - "properties": { - "cloud-tag": { - "type": "string" - }, - "user-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "user-tag", - "cloud-tag" - ] - }, - "UserClouds": { - "type": "object", - "properties": { - "user-clouds": { - "type": "array", - "items": { - "$ref": "#/definitions/UserCloud" - } - } - }, - "additionalProperties": false - }, - "Value": { - "type": "object", - "properties": { - "allocate-public-ip": { - "type": "boolean" - }, - "arch": { - "type": "string" - }, - "container": { - "type": "string" - }, - "cores": { - "type": "integer" - }, - "cpu-power": { - "type": "integer" - }, - "instance-role": { - "type": "string" - }, - "instance-type": { - "type": "string" - }, - "mem": { - "type": "integer" - }, - "root-disk": { - "type": "integer" - }, - "root-disk-source": { - "type": "string" - }, - "spaces": { - "type": "array", - "items": { - "type": "string" - } - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "virt-type": { - "type": "string" - }, - "zones": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - } - } - } - }, - { - "Name": "Controller", - "Description": "ControllerAPI provides the Controller API.", - "Version": 11, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "controller-user" - ], - "Schema": { - "type": "object", - "properties": { - "AllModels": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/UserModelList" - } - }, - "description": "AllModels allows controller administrators to get the list of all the\nmodels in the controller." - }, - "CloudSpec": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/CloudSpecResults" - } - }, - "description": "CloudSpec returns the model's cloud spec." - }, - "ConfigSet": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ControllerConfigSet" - } - }, - "description": "ConfigSet changes the value of specified controller configuration\nsettings. Only some settings can be changed after bootstrap.\nSettings that aren't specified in the params are left unchanged." - }, - "ControllerAPIInfoForModels": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ControllerAPIInfoResults" - } - }, - "description": "ControllerAPIInfoForModels returns the controller api connection details for the specified models." - }, - "ControllerConfig": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ControllerConfigResult" - } - }, - "description": "ControllerConfig returns the controller's configuration." - }, - "ControllerVersion": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ControllerVersionResults" - } - }, - "description": "ControllerVersion returns the version information associated with this\ncontroller binary.\n\nNOTE: the implementation intentionally does not check for SuperuserAccess\nas the Version is known even to users with login access." - }, - "DashboardConnectionInfo": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/DashboardConnectionInfo" - } - }, - "description": "DashboardConnectionInfo returns the connection information for a client to\nconnect to the Juju Dashboard including any proxying information." - }, - "DestroyController": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/DestroyControllerArgs" - } - }, - "description": "DestroyController destroys the controller.\n\nIf the args specify the destruction of the models, this method will\nattempt to do so. Otherwise, if the controller has any non-empty,\nnon-Dead hosted models, then an error with the code\nparams.CodeHasHostedModels will be transmitted." - }, - "GetCloudSpec": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ModelTag" - }, - "Result": { - "$ref": "#/definitions/CloudSpecResult" - } - }, - "description": "GetCloudSpec constructs the CloudSpec for a validated and authorized model." - }, - "GetControllerAccess": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/UserAccessResults" - } - }, - "description": "GetControllerAccess returns the level of access the specified users\nhave on the controller." - }, - "HostedModelConfigs": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/HostedModelConfigsResults" - } - }, - "description": "HostedModelConfigs returns all the information that the client needs in\norder to connect directly with the host model's provider and destroy it\ndirectly." - }, - "IdentityProviderURL": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringResult" - } - }, - "description": "IdentityProviderURL returns the URL of the configured external identity\nprovider for this controller or an empty string if no external identity\nprovider has been configured when the controller was bootstrapped.\n\nNOTE: the implementation intentionally does not check for SuperuserAccess\nas the URL is known even to users with login access." - }, - "InitiateMigration": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/InitiateMigrationArgs" - }, - "Result": { - "$ref": "#/definitions/InitiateMigrationResults" - } - }, - "description": "InitiateMigration attempts to begin the migration of one or\nmore models to other controllers." - }, - "ListBlockedModels": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ModelBlockInfoList" - } - }, - "description": "ListBlockedModels returns a list of all models on the controller\nwhich have a block in place. The resulting slice is sorted by model\nname, then owner. Callers must be controller administrators to retrieve the\nlist." - }, - "ModelConfig": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ModelConfigResults" - } - }, - "description": "ModelConfig returns the model config for the controller\nmodel. For information on the current model, use\nclient.ModelGet" - }, - "ModelStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ModelStatusResults" - } - }, - "description": "ModelStatus returns a summary of the model." - }, - "ModifyControllerAccess": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ModifyControllerAccessRequest" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "ModifyControllerAccess changes the model access granted to users." - }, - "MongoVersion": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringResult" - } - }, - "description": "MongoVersion allows the introspection of the mongo version per controller" - }, - "RemoveBlocks": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RemoveBlocksArgs" - } - }, - "description": "RemoveBlocks removes all the blocks in the controller." - }, - "WatchAllModelSummaries": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/SummaryWatcherID" - } - }, - "description": "WatchAllModelSummaries starts watching the summary updates from the cache.\nThis method is superuser access only, and watches all models in the\ncontroller." - }, - "WatchAllModels": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/AllWatcherId" - } - }, - "description": "WatchAllModels starts watching events for all models in the\ncontroller. The returned AllWatcherId should be used with Next on the\nAllModelWatcher endpoint to receive deltas." - }, - "WatchCloudSpecsChanges": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "WatchCloudSpecsChanges returns a watcher for cloud spec changes." - }, - "WatchModelSummaries": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/SummaryWatcherID" - } - }, - "description": "WatchModelSummaries starts watching the summary updates from the cache.\nOnly models that the user has access to are returned." - } - }, - "definitions": { - "AllWatcherId": { - "type": "object", - "properties": { - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id" - ] - }, - "CloudCredential": { - "type": "object", - "properties": { - "attrs": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "auth-type": { - "type": "string" - }, - "redacted": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "auth-type" - ] - }, - "CloudSpec": { - "type": "object", - "properties": { - "cacertificates": { - "type": "array", - "items": { - "type": "string" - } - }, - "credential": { - "$ref": "#/definitions/CloudCredential" - }, - "endpoint": { - "type": "string" - }, - "identity-endpoint": { - "type": "string" - }, - "is-controller-cloud": { - "type": "boolean" - }, - "name": { - "type": "string" - }, - "region": { - "type": "string" - }, - "skip-tls-verify": { - "type": "boolean" - }, - "storage-endpoint": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type", - "name" - ] - }, - "CloudSpecResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/CloudSpec" - } - }, - "additionalProperties": false - }, - "CloudSpecResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/CloudSpecResult" - } - } - }, - "additionalProperties": false - }, - "ConfigValue": { - "type": "object", - "properties": { - "source": { - "type": "string" - }, - "value": { - "type": "object", - "additionalProperties": true - } - }, - "additionalProperties": false, - "required": [ - "value", - "source" - ] - }, - "ControllerAPIInfoResult": { - "type": "object", - "properties": { - "addresses": { - "type": "array", - "items": { - "type": "string" - } - }, - "cacert": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "addresses", - "cacert" - ] - }, - "ControllerAPIInfoResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ControllerAPIInfoResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ControllerConfigResult": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "ControllerConfigSet": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "ControllerVersionResults": { - "type": "object", - "properties": { - "git-commit": { - "type": "string" - }, - "version": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "version", - "git-commit" - ] - }, - "DashboardConnectionInfo": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "proxy-connection": { - "$ref": "#/definitions/Proxy" - }, - "ssh-connection": { - "$ref": "#/definitions/DashboardConnectionSSHTunnel" - } - }, - "additionalProperties": false, - "required": [ - "proxy-connection", - "ssh-connection" - ] - }, - "DashboardConnectionSSHTunnel": { - "type": "object", - "properties": { - "entity": { - "type": "string" - }, - "host": { - "type": "string" - }, - "model": { - "type": "string" - }, - "port": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "host", - "port" - ] - }, - "DestroyControllerArgs": { - "type": "object", - "properties": { - "destroy-models": { - "type": "boolean" - }, - "destroy-storage": { - "type": "boolean" - }, - "force": { - "type": "boolean" - }, - "max-wait": { - "type": "integer" - }, - "model-timeout": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "destroy-models" - ] - }, - "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": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "HostedModelConfig": { - "type": "object", - "properties": { - "cloud-spec": { - "$ref": "#/definitions/CloudSpec" - }, - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "name": { - "type": "string" - }, - "owner": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "owner" - ] - }, - "HostedModelConfigsResults": { - "type": "object", - "properties": { - "models": { - "type": "array", - "items": { - "$ref": "#/definitions/HostedModelConfig" - } - } - }, - "additionalProperties": false, - "required": [ - "models" - ] - }, - "InitiateMigrationArgs": { - "type": "object", - "properties": { - "specs": { - "type": "array", - "items": { - "$ref": "#/definitions/MigrationSpec" - } - } - }, - "additionalProperties": false, - "required": [ - "specs" - ] - }, - "InitiateMigrationResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "migration-id": { - "type": "string" - }, - "model-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "model-tag", - "migration-id" - ] - }, - "InitiateMigrationResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/InitiateMigrationResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "MachineHardware": { - "type": "object", - "properties": { - "arch": { - "type": "string" - }, - "availability-zone": { - "type": "string" - }, - "cores": { - "type": "integer" - }, - "cpu-power": { - "type": "integer" - }, - "mem": { - "type": "integer" - }, - "root-disk": { - "type": "integer" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "virt-type": { - "type": "string" - } - }, - "additionalProperties": false - }, - "MigrationSpec": { - "type": "object", - "properties": { - "model-tag": { - "type": "string" - }, - "target-info": { - "$ref": "#/definitions/MigrationTargetInfo" - } - }, - "additionalProperties": false, - "required": [ - "model-tag", - "target-info" - ] - }, - "MigrationTargetInfo": { - "type": "object", - "properties": { - "addrs": { - "type": "array", - "items": { - "type": "string" - } - }, - "auth-tag": { - "type": "string" - }, - "ca-cert": { - "type": "string" - }, - "controller-alias": { - "type": "string" - }, - "controller-tag": { - "type": "string" - }, - "macaroons": { - "type": "string" - }, - "password": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "controller-tag", - "addrs", - "ca-cert", - "auth-tag" - ] - }, - "Model": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "owner-tag": { - "type": "string" - }, - "type": { - "type": "string" - }, - "uuid": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "uuid", - "type", - "owner-tag" - ] - }, - "ModelApplicationInfo": { - "type": "object", - "properties": { - "name": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name" - ] - }, - "ModelBlockInfo": { - "type": "object", - "properties": { - "blocks": { - "type": "array", - "items": { - "type": "string" - } - }, - "model-uuid": { - "type": "string" - }, - "name": { - "type": "string" - }, - "owner-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "model-uuid", - "owner-tag", - "blocks" - ] - }, - "ModelBlockInfoList": { - "type": "object", - "properties": { - "models": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelBlockInfo" - } - } - }, - "additionalProperties": false - }, - "ModelConfigResults": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/ConfigValue" - } - } - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "ModelFilesystemInfo": { - "type": "object", - "properties": { - "detachable": { - "type": "boolean" - }, - "id": { - "type": "string" - }, - "message": { - "type": "string" - }, - "provider-id": { - "type": "string" - }, - "status": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "id" - ] - }, - "ModelMachineInfo": { - "type": "object", - "properties": { - "display-name": { - "type": "string" - }, - "ha-primary": { - "type": "boolean" - }, - "hardware": { - "$ref": "#/definitions/MachineHardware" - }, - "has-vote": { - "type": "boolean" - }, - "id": { - "type": "string" - }, - "instance-id": { - "type": "string" - }, - "message": { - "type": "string" - }, - "status": { - "type": "string" - }, - "wants-vote": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "id" - ] - }, - "ModelStatus": { - "type": "object", - "properties": { - "application-count": { - "type": "integer" - }, - "applications": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelApplicationInfo" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "filesystems": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelFilesystemInfo" - } - }, - "hosted-machine-count": { - "type": "integer" - }, - "life": { - "type": "string" - }, - "machines": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelMachineInfo" - } - }, - "model-tag": { - "type": "string" - }, - "owner-tag": { - "type": "string" - }, - "type": { - "type": "string" - }, - "unit-count": { - "type": "integer" - }, - "volumes": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelVolumeInfo" - } - } - }, - "additionalProperties": false, - "required": [ - "model-tag", - "life", - "type", - "hosted-machine-count", - "application-count", - "unit-count", - "owner-tag" - ] - }, - "ModelStatusResults": { - "type": "object", - "properties": { - "models": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelStatus" - } - } - }, - "additionalProperties": false, - "required": [ - "models" - ] - }, - "ModelTag": { - "type": "object", - "additionalProperties": false - }, - "ModelVolumeInfo": { - "type": "object", - "properties": { - "detachable": { - "type": "boolean" - }, - "id": { - "type": "string" - }, - "message": { - "type": "string" - }, - "provider-id": { - "type": "string" - }, - "status": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "id" - ] - }, - "ModifyControllerAccess": { - "type": "object", - "properties": { - "access": { - "type": "string" - }, - "action": { - "type": "string" - }, - "user-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "user-tag", - "action", - "access" - ] - }, - "ModifyControllerAccessRequest": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "$ref": "#/definitions/ModifyControllerAccess" - } - } - }, - "additionalProperties": false, - "required": [ - "changes" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "NotifyWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "Proxy": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "config", - "type" - ] - }, - "RemoveBlocksArgs": { - "type": "object", - "properties": { - "all": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "all" - ] - }, - "StringResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "SummaryWatcherID": { - "type": "object", - "properties": { - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id" - ] - }, - "UserAccess": { - "type": "object", - "properties": { - "access": { - "type": "string" - }, - "user-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "user-tag", - "access" - ] - }, - "UserAccessResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/UserAccess" - } - }, - "additionalProperties": false - }, - "UserAccessResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/UserAccessResult" - } - } - }, - "additionalProperties": false - }, - "UserModel": { - "type": "object", - "properties": { - "last-connection": { - "type": "string", - "format": "date-time" - }, - "model": { - "$ref": "#/definitions/Model" - } - }, - "additionalProperties": false, - "required": [ - "model", - "last-connection" - ] - }, - "UserModelList": { - "type": "object", - "properties": { - "user-models": { - "type": "array", - "items": { - "$ref": "#/definitions/UserModel" - } - } - }, - "additionalProperties": false, - "required": [ - "user-models" - ] - } - } - } - }, - { - "Name": "CredentialManager", - "Description": "", - "Version": 1, - "AvailableTo": [ - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "InvalidateModelCredential": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/InvalidateCredentialArg" - }, - "Result": { - "$ref": "#/definitions/ErrorResult" - } - }, - "description": "InvalidateModelCredential marks the cloud credential for this model as invalid." - } - }, - "definitions": { - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "InvalidateCredentialArg": { - "type": "object", - "properties": { - "reason": { - "type": "string" - } - }, - "additionalProperties": false - } - } - } - }, - { - "Name": "CredentialValidator", - "Description": "", - "Version": 2, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "InvalidateModelCredential": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/InvalidateCredentialArg" - }, - "Result": { - "$ref": "#/definitions/ErrorResult" - } - }, - "description": "InvalidateModelCredential marks the cloud credential for this model as invalid." - }, - "ModelCredential": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ModelCredential" - } - }, - "description": "ModelCredential returns cloud credential information for a model." - }, - "WatchCredential": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entity" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResult" - } - }, - "description": "WatchCredential returns a NotifyWatcher that observes\nchanges to a given cloud credential." - }, - "WatchModelCredential": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResult" - } - }, - "description": "WatchModelCredential returns a NotifyWatcher that watches what cloud credential a model uses." - } - }, - "definitions": { - "Entity": { - "type": "object", - "properties": { - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "InvalidateCredentialArg": { - "type": "object", - "properties": { - "reason": { - "type": "string" - } - }, - "additionalProperties": false - }, - "ModelCredential": { - "type": "object", - "properties": { - "credential-tag": { - "type": "string" - }, - "exists": { - "type": "boolean" - }, - "model-tag": { - "type": "string" - }, - "valid": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "model-tag", - "credential-tag" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - } - } - } - }, - { - "Name": "CrossController", - "Description": "CrossControllerAPI provides access to the CrossModelRelations API facade.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "controller-user" - ], - "Schema": { - "type": "object", - "properties": { - "ControllerInfo": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ControllerAPIInfoResults" - } - }, - "description": "ControllerInfo returns the API info for the controller." - }, - "WatchControllerInfo": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "WatchControllerInfo creates a watcher that notifies when the API info\nfor the controller changes." - } - }, - "definitions": { - "ControllerAPIInfoResult": { - "type": "object", - "properties": { - "addresses": { - "type": "array", - "items": { - "type": "string" - } - }, - "cacert": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "addresses", - "cacert" - ] - }, - "ControllerAPIInfoResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ControllerAPIInfoResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "NotifyWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - } - } - } - }, - { - "Name": "CrossModelRelations", - "Description": "CrossModelRelationsAPI provides access to the CrossModelRelations API facade.", - "Version": 2, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "PublishIngressNetworkChanges": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/IngressNetworksChanges" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "PublishIngressNetworkChanges publishes changes to the required\ningress addresses to the model hosting the offer in the relation." - }, - "PublishRelationChanges": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RemoteRelationsChanges" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "PublishRelationChanges publishes relation changes to the\nmodel hosting the remote application involved in the relation." - }, - "RegisterRemoteRelations": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RegisterRemoteRelationArgs" - }, - "Result": { - "$ref": "#/definitions/RegisterRemoteRelationResults" - } - }, - "description": "RegisterRemoteRelations sets up the model to participate\nin the specified relations. This operation is idempotent." - }, - "WatchEgressAddressesForRelations": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RemoteEntityArgs" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - }, - "description": "WatchEgressAddressesForRelations creates a watcher that notifies when addresses, from which\nconnections will originate for the relation, change.\nEach event contains the entire set of addresses which are required for ingress for the relation." - }, - "WatchOfferStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/OfferArgs" - }, - "Result": { - "$ref": "#/definitions/OfferStatusWatchResults" - } - }, - "description": "WatchOfferStatus starts an OfferStatusWatcher for\nwatching the status of an offer." - }, - "WatchRelationChanges": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RemoteEntityArgs" - }, - "Result": { - "$ref": "#/definitions/RemoteRelationWatchResults" - } - }, - "description": "WatchRelationChanges starts a RemoteRelationChangesWatcher for each\nspecified relation, returning the watcher IDs and initial values,\nor an error if the remote relations couldn't be watched." - }, - "WatchRelationsSuspendedStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RemoteEntityArgs" - }, - "Result": { - "$ref": "#/definitions/RelationStatusWatchResults" - } - }, - "description": "WatchRelationsSuspendedStatus starts a RelationStatusWatcher for\nwatching the life and suspended status of a relation." - } - }, - "definitions": { - "EntityStatus": { - "type": "object", - "properties": { - "data": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "info": { - "type": "string" - }, - "since": { - "type": "string", - "format": "date-time" - }, - "status": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "status", - "info", - "since" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "IngressNetworksChangeEvent": { - "type": "object", - "properties": { - "application-token": { - "type": "string" - }, - "bakery-version": { - "type": "integer" - }, - "ingress-required": { - "type": "boolean" - }, - "macaroons": { - "type": "array", - "items": { - "$ref": "#/definitions/Macaroon" - } - }, - "networks": { - "type": "array", - "items": { - "type": "string" - } - }, - "relation-token": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "relation-token", - "application-token", - "ingress-required" - ] - }, - "IngressNetworksChanges": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "$ref": "#/definitions/IngressNetworksChangeEvent" - } - } - }, - "additionalProperties": false - }, - "Macaroon": { - "type": "object", - "additionalProperties": false - }, - "OfferArg": { - "type": "object", - "properties": { - "bakery-version": { - "type": "integer" - }, - "macaroons": { - "type": "array", - "items": { - "$ref": "#/definitions/Macaroon" - } - }, - "offer-uuid": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "offer-uuid" - ] - }, - "OfferArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/OfferArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "OfferStatusChange": { - "type": "object", - "properties": { - "offer-name": { - "type": "string" - }, - "status": { - "$ref": "#/definitions/EntityStatus" - } - }, - "additionalProperties": false, - "required": [ - "offer-name", - "status" - ] - }, - "OfferStatusWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "$ref": "#/definitions/OfferStatusChange" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id", - "changes" - ] - }, - "OfferStatusWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/OfferStatusWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "RegisterRemoteRelationArg": { - "type": "object", - "properties": { - "application-token": { - "type": "string" - }, - "bakery-version": { - "type": "integer" - }, - "consume-version": { - "type": "integer" - }, - "local-endpoint-name": { - "type": "string" - }, - "macaroons": { - "type": "array", - "items": { - "$ref": "#/definitions/Macaroon" - } - }, - "offer-uuid": { - "type": "string" - }, - "relation-token": { - "type": "string" - }, - "remote-endpoint": { - "$ref": "#/definitions/RemoteEndpoint" - }, - "remote-space": { - "$ref": "#/definitions/RemoteSpace" - }, - "source-model-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "application-token", - "source-model-tag", - "relation-token", - "remote-endpoint", - "remote-space", - "offer-uuid", - "local-endpoint-name" - ] - }, - "RegisterRemoteRelationArgs": { - "type": "object", - "properties": { - "relations": { - "type": "array", - "items": { - "$ref": "#/definitions/RegisterRemoteRelationArg" - } - } - }, - "additionalProperties": false, - "required": [ - "relations" - ] - }, - "RegisterRemoteRelationResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/RemoteRelationDetails" - } - }, - "additionalProperties": false - }, - "RegisterRemoteRelationResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/RegisterRemoteRelationResult" - } - } - }, - "additionalProperties": false - }, - "RelationLifeSuspendedStatusChange": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "life": { - "type": "string" - }, - "suspended": { - "type": "boolean" - }, - "suspended-reason": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "key", - "life", - "suspended", - "suspended-reason" - ] - }, - "RelationLifeSuspendedStatusWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "$ref": "#/definitions/RelationLifeSuspendedStatusChange" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id", - "changes" - ] - }, - "RelationStatusWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/RelationLifeSuspendedStatusWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "RemoteEndpoint": { - "type": "object", - "properties": { - "interface": { - "type": "string" - }, - "limit": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "role": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "role", - "interface", - "limit" - ] - }, - "RemoteEntityArg": { - "type": "object", - "properties": { - "bakery-version": { - "type": "integer" - }, - "macaroons": { - "type": "array", - "items": { - "$ref": "#/definitions/Macaroon" - } - }, - "relation-token": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "relation-token" - ] - }, - "RemoteEntityArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoteEntityArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "RemoteRelationChangeEvent": { - "type": "object", - "properties": { - "application-settings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "application-token": { - "type": "string" - }, - "bakery-version": { - "type": "integer" - }, - "changed-units": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoteRelationUnitChange" - } - }, - "departed-units": { - "type": "array", - "items": { - "type": "integer" - } - }, - "force-cleanup": { - "type": "boolean" - }, - "life": { - "type": "string" - }, - "macaroons": { - "type": "array", - "items": { - "$ref": "#/definitions/Macaroon" - } - }, - "relation-token": { - "type": "string" - }, - "suspended": { - "type": "boolean" - }, - "suspended-reason": { - "type": "string" - }, - "unit-count": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "relation-token", - "application-token", - "life", - "unit-count" - ] - }, - "RemoteRelationDetails": { - "type": "object", - "properties": { - "bakery-version": { - "type": "integer" - }, - "macaroon": { - "$ref": "#/definitions/Macaroon" - }, - "relation-token": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "relation-token" - ] - }, - "RemoteRelationUnitChange": { - "type": "object", - "properties": { - "settings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "unit-id": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "unit-id" - ] - }, - "RemoteRelationWatchResult": { - "type": "object", - "properties": { - "changes": { - "$ref": "#/definitions/RemoteRelationChangeEvent" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id", - "changes" - ] - }, - "RemoteRelationWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoteRelationWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "RemoteRelationsChanges": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoteRelationChangeEvent" - } - } - }, - "additionalProperties": false - }, - "RemoteSpace": { - "type": "object", - "properties": { - "cloud-type": { - "type": "string" - }, - "name": { - "type": "string" - }, - "provider-attributes": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "provider-id": { - "type": "string" - }, - "subnets": { - "type": "array", - "items": { - "$ref": "#/definitions/Subnet" - } - } - }, - "additionalProperties": false, - "required": [ - "cloud-type", - "name", - "provider-id", - "provider-attributes", - "subnets" - ] - }, - "StringsWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id" - ] - }, - "StringsWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringsWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "Subnet": { - "type": "object", - "properties": { - "cidr": { - "type": "string" - }, - "life": { - "type": "string" - }, - "provider-id": { - "type": "string" - }, - "provider-network-id": { - "type": "string" - }, - "provider-space-id": { - "type": "string" - }, - "space-tag": { - "type": "string" - }, - "status": { - "type": "string" - }, - "vlan-tag": { - "type": "integer" - }, - "zones": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "cidr", - "vlan-tag", - "life", - "space-tag", - "zones" - ] - } - } - } - }, - { - "Name": "Deployer", - "Description": "DeployerAPI provides access to the Deployer API facade.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent" - ], - "Schema": { - "type": "object", - "properties": { - "APIAddresses": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsResult" - } - }, - "description": "APIAddresses returns the list of addresses used to connect to the API." - }, - "APIHostPorts": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/APIHostPortsResult" - } - }, - "description": "APIHostPorts returns the API server addresses." - }, - "ConnectionInfo": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/DeployerConnectionValues" - } - }, - "description": "ConnectionInfo returns all the address information that the\ndeployer task needs in one call." - }, - "Life": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/LifeResults" - } - }, - "description": "Life returns the life status of every supplied entity, where available." - }, - "ModelUUID": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringResult" - } - }, - "description": "ModelUUID returns the model UUID that this facade is deploying into.\nIt is implemented here directly as a result of removing it from\nembedded APIAddresser *without* bumping the facade version.\nIt should be blanked when this facade version is next incremented." - }, - "Remove": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "Remove removes every given entity from state, calling EnsureDead\nfirst, then Remove. It will fail if the entity is not present." - }, - "SetPasswords": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/EntityPasswords" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetPasswords sets the given password for each supplied entity, if possible." - }, - "SetStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetStatus" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetStatus sets the status of the specified entities." - }, - "WatchAPIHostPorts": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResult" - } - }, - "description": "WatchAPIHostPorts watches the API server addresses." - }, - "WatchUnits": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - }, - "description": "WatchUnits starts a StringsWatcher to watch all units belonging to\nto any entity (machine or service) passed in args." - } - }, - "definitions": { - "APIHostPortsResult": { - "type": "object", - "properties": { - "servers": { - "type": "array", - "items": { - "type": "array", - "items": { - "$ref": "#/definitions/HostPort" - } - } - } - }, - "additionalProperties": false, - "required": [ - "servers" - ] - }, - "Address": { - "type": "object", - "properties": { - "cidr": { - "type": "string" - }, - "config-type": { - "type": "string" - }, - "is-secondary": { - "type": "boolean" - }, - "scope": { - "type": "string" - }, - "space-id": { - "type": "string" - }, - "space-name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "value", - "type", - "scope" - ] - }, - "DeployerConnectionValues": { - "type": "object", - "properties": { - "api-addresses": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "api-addresses" - ] - }, - "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" - ] - }, - "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": { - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "HostPort": { - "type": "object", - "properties": { - "Address": { - "$ref": "#/definitions/Address" - }, - "cidr": { - "type": "string" - }, - "config-type": { - "type": "string" - }, - "is-secondary": { - "type": "boolean" - }, - "port": { - "type": "integer" - }, - "scope": { - "type": "string" - }, - "space-id": { - "type": "string" - }, - "space-name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "value", - "type", - "scope", - "Address", - "port" - ] - }, - "LifeResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "life": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "life" - ] - }, - "LifeResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/LifeResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "SetStatus": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityStatusArgs" - } - } - }, - "additionalProperties": false, - "required": [ - "entities" - ] - }, - "StringResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "StringsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "StringsWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id" - ] - }, - "StringsWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringsWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - } - } - } - }, - { - "Name": "DiskManager", - "Description": "DiskManagerAPI provides access to the DiskManager API facade.", - "Version": 2, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent" - ], - "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" - }, - "SerialId": { - "type": "string" - }, - "Size": { - "type": "integer" - }, - "UUID": { - "type": "string" - }, - "WWN": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "DeviceName", - "DeviceLinks", - "Label", - "UUID", - "HardwareId", - "WWN", - "BusAddress", - "Size", - "FilesystemType", - "InUse", - "MountPoint", - "SerialId" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "MachineBlockDevices": { - "type": "object", - "properties": { - "block-devices": { - "type": "array", - "items": { - "$ref": "#/definitions/BlockDevice" - } - }, - "machine": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "machine" - ] - }, - "SetMachineBlockDevices": { - "type": "object", - "properties": { - "machine-block-devices": { - "type": "array", - "items": { - "$ref": "#/definitions/MachineBlockDevices" - } - } - }, - "additionalProperties": false, - "required": [ - "machine-block-devices" - ] - } - } - } - }, - { - "Name": "EntityWatcher", - "Description": "srvEntitiesWatcher defines the API for methods on a state.StringsWatcher.\nEach client has its own current set of watchers, stored in resources.\nsrvEntitiesWatcher notifies about changes for all entities of a given kind,\nsending the changes as a list of strings, which could be transformed\nfrom state entity ids to their corresponding entity tags.", - "Version": 2, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "Next": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/EntitiesWatchResult" - } - }, - "description": "Next returns when a change has occurred to an entity of the\ncollection being watched since the most recent call to Next\nor the Watch call that created the srvEntitiesWatcher." - }, - "Stop": { - "type": "object", - "description": "Stop stops the watcher." - } - }, - "definitions": { - "EntitiesWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - } - } - } - }, - { - "Name": "EnvironUpgrader", - "Description": "", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent" - ], - "Schema": { - "type": "object", - "properties": { - "ModelEnvironVersion": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/IntResults" - } - }, - "description": "ModelEnvironVersion returns the current version of the environ corresponding\nto each specified model." - }, - "ModelTargetEnvironVersion": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/IntResults" - } - }, - "description": "ModelTargetEnvironVersion returns the target version of the environ\ncorresponding to each specified model. The target version is the\nenviron provider's version." - }, - "SetModelEnvironVersion": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetModelEnvironVersions" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetModelEnvironVersion sets the current version of the environ corresponding\nto each specified model." - }, - "SetModelStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetStatus" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetModelStatus sets the status of each given model." - }, - "WatchModelEnvironVersion": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "WatchModelEnvironVersion watches for changes to the environ version of the\nspecified models.\n\nNOTE(axw) this is currently implemented in terms of state.Model.Watch, so\nthe client may be notified of changes unrelated to the environ version." - } - }, - "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" - ] - }, - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "IntResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "IntResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/IntResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "NotifyWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "SetModelEnvironVersion": { - "type": "object", - "properties": { - "model-tag": { - "type": "string" - }, - "version": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "model-tag", - "version" - ] - }, - "SetModelEnvironVersions": { - "type": "object", - "properties": { - "models": { - "type": "array", - "items": { - "$ref": "#/definitions/SetModelEnvironVersion" - } - } - }, - "additionalProperties": false - }, - "SetStatus": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityStatusArgs" - } - } - }, - "additionalProperties": false, - "required": [ - "entities" - ] - } - } - } - }, - { - "Name": "ExternalControllerUpdater", - "Description": "ExternalControllerUpdaterAPI provides access to the CrossModelRelations API facade.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent" - ], - "Schema": { - "type": "object", - "properties": { - "ExternalControllerInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ExternalControllerInfoResults" - } - }, - "description": "ExternalControllerInfo returns the info for the specified external controllers." - }, - "SetExternalControllerInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetExternalControllersInfoParams" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetExternalControllerInfo saves the info for the specified external controllers." - }, - "WatchExternalControllers": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - }, - "description": "WatchExternalControllers watches for the addition and removal of external\ncontroller records to the local controller's database." - } - }, - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ExternalControllerInfo": { - "type": "object", - "properties": { - "addrs": { - "type": "array", - "items": { - "type": "string" - } - }, - "ca-cert": { - "type": "string" - }, - "controller-alias": { - "type": "string" - }, - "controller-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "controller-tag", - "controller-alias", - "addrs", - "ca-cert" - ] - }, - "ExternalControllerInfoResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/ExternalControllerInfo" - } - }, - "additionalProperties": false, - "required": [ - "result", - "error" - ] - }, - "ExternalControllerInfoResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ExternalControllerInfoResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "SetExternalControllerInfoParams": { - "type": "object", - "properties": { - "info": { - "$ref": "#/definitions/ExternalControllerInfo" - } - }, - "additionalProperties": false, - "required": [ - "info" - ] - }, - "SetExternalControllersInfoParams": { - "type": "object", - "properties": { - "controllers": { - "type": "array", - "items": { - "$ref": "#/definitions/SetExternalControllerInfoParams" - } - } - }, - "additionalProperties": false, - "required": [ - "controllers" - ] - }, - "StringsWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id" - ] - }, - "StringsWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringsWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - } - } - } - }, - { - "Name": "FanConfigurer", - "Description": "", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "FanConfig": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/FanConfigResult" - } - }, - "description": "FanConfig returns current FAN configuration." - }, - "WatchForFanConfigChanges": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResult" - } - }, - "description": "WatchForFanConfigChanges returns a NotifyWatcher that observes\nchanges to the FAN configuration.\nso we use the regular error return.\nTODO(wpk) 2017-09-21 We should use Model directly, and watch only for FanConfig changes." - } - }, - "definitions": { - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "FanConfigEntry": { - "type": "object", - "properties": { - "overlay": { - "type": "string" - }, - "underlay": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "underlay", - "overlay" - ] - }, - "FanConfigResult": { - "type": "object", - "properties": { - "fans": { - "type": "array", - "items": { - "$ref": "#/definitions/FanConfigEntry" - } - } - }, - "additionalProperties": false, - "required": [ - "fans" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - } - } - } - }, - { - "Name": "FilesystemAttachmentsWatcher", - "Description": "srvMachineStorageIdsWatcher defines the API wrapping a state.StringsWatcher\nwatching machine/storage attachments. This watcher notifies about storage\nentities (volumes/filesystems) being attached to and detached from machines.\n\nTODO(axw) state needs a new watcher, this is a bt of a hack. State watchers\ncould do with some deduplication of logic, and I don't want to add to that\nspaghetti right now.", - "Version": 2, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "Next": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/MachineStorageIdsWatchResult" - } - }, - "description": "Next returns when a change has occurred to an entity of the\ncollection being watched since the most recent call to Next\nor the Watch call that created the srvMachineStorageIdsWatcher." - }, - "Stop": { - "type": "object", - "description": "Stop stops the watcher." - } - }, - "definitions": { - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "MachineStorageId": { - "type": "object", - "properties": { - "attachment-tag": { - "type": "string" - }, - "machine-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "machine-tag", - "attachment-tag" - ] - }, - "MachineStorageIdsWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "$ref": "#/definitions/MachineStorageId" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id", - "changes" - ] - } - } - } - }, - { - "Name": "FirewallRules", - "Description": "API provides the firewallrules facade APIs for v1.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "ListFirewallRules": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ListFirewallRulesResults" - } - }, - "description": "ListFirewallRules returns all the firewall rules." - }, - "SetFirewallRules": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/FirewallRuleArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetFirewallRules creates or updates the specified firewall rules." - } - }, - "definitions": { - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "FirewallRule": { - "type": "object", - "properties": { - "known-service": { - "type": "string" - }, - "whitelist-cidrs": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "known-service" - ] - }, - "FirewallRuleArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/FirewallRule" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "ListFirewallRulesResults": { - "type": "object", - "properties": { - "Rules": { - "type": "array", - "items": { - "$ref": "#/definitions/FirewallRule" - } - } - }, - "additionalProperties": false, - "required": [ - "Rules" - ] - } - } - } - }, - { - "Name": "Firewaller", - "Description": "FirewallerAPI provides access to the Firewaller API facade.", - "Version": 7, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "AreManuallyProvisioned": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/BoolResults" - } - }, - "description": "AreManuallyProvisioned returns whether each given entity is\nmanually provisioned or not. Only machine tags are accepted." - }, - "CloudSpec": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/CloudSpecResults" - } - }, - "description": "CloudSpec returns the model's cloud spec." - }, - "ControllerAPIInfoForModels": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ControllerAPIInfoResults" - } - }, - "description": "ControllerAPIInfoForModels returns the controller api connection details for the specified models." - }, - "ControllerConfig": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ControllerConfigResult" - } - }, - "description": "ControllerConfig returns the controller's configuration." - }, - "FirewallRules": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/KnownServiceArgs" - }, - "Result": { - "$ref": "#/definitions/ListFirewallRulesResults" - } - }, - "description": "FirewallRules returns the firewall rules for the specified well known service types." - }, - "GetAssignedMachine": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringResults" - } - }, - "description": "GetAssignedMachine returns the assigned machine tag (if any) for\neach given unit." - }, - "GetCloudSpec": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ModelTag" - }, - "Result": { - "$ref": "#/definitions/CloudSpecResult" - } - }, - "description": "GetCloudSpec constructs the CloudSpec for a validated and authorized model." - }, - "GetExposeInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ExposeInfoResults" - } - }, - "description": "GetExposeInfo returns the expose flag and per-endpoint expose settings\nfor the specified applications." - }, - "InstanceId": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringResults" - } - }, - "description": "InstanceId returns the provider specific instance id for each given\nmachine or an CodeNotProvisioned error, if not set." - }, - "Life": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/LifeResults" - } - }, - "description": "Life returns the life status of every supplied entity, where available." - }, - "MacaroonForRelations": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/MacaroonResults" - } - }, - "description": "MacaroonForRelations returns the macaroon for the specified relations." - }, - "ModelConfig": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ModelConfigResult" - } - }, - "description": "ModelConfig returns the current model's configuration." - }, - "OpenedMachinePortRanges": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/OpenMachinePortRangesResults" - } - }, - "description": "OpenedMachinePortRanges returns a list of the opened port ranges for the\nspecified machines where each result is broken down by unit. The list of\nopened ports for each unit is further grouped by endpoint name and includes\nthe subnet CIDRs that belong to the space that each endpoint is bound to." - }, - "SetRelationsStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetStatus" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetRelationsStatus sets the status for the specified relations." - }, - "SpaceInfos": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SpaceInfosParams" - }, - "Result": { - "$ref": "#/definitions/SpaceInfos" - } - }, - "description": "SpaceInfos returns a comprehensive representation of either all spaces or\na filtered subset of the known spaces and their associated subnet details." - }, - "Watch": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "Watch starts an NotifyWatcher for each given entity." - }, - "WatchCloudSpecsChanges": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "WatchCloudSpecsChanges returns a watcher for cloud spec changes." - }, - "WatchEgressAddressesForRelations": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - }, - "description": "WatchEgressAddressesForRelations creates a watcher that notifies when addresses, from which\nconnections will originate for the relation, change.\nEach event contains the entire set of addresses which are required for ingress for the relation." - }, - "WatchForModelConfigChanges": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResult" - } - }, - "description": "WatchForModelConfigChanges returns a NotifyWatcher that observes\nchanges to the model configuration.\nNote that although the NotifyWatchResult contains an Error field,\nit's not used because we are only returning a single watcher,\nso we use the regular error return." - }, - "WatchIngressAddressesForRelations": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - }, - "description": "WatchIngressAddressesForRelations creates a watcher that returns the ingress networks\nthat have been recorded against the specified relations." - }, - "WatchModelMachineStartTimes": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsWatchResult" - } - }, - "description": "WatchModelMachineStartTimes watches the non-container machines in the model\nfor changes to the Life or AgentStartTime fields and reports them as a batch." - }, - "WatchModelMachines": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsWatchResult" - } - }, - "description": "WatchModelMachines returns a StringsWatcher that notifies of\nchanges to the life cycles of the top level machines in the current\nmodel." - }, - "WatchOpenedPorts": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - }, - "description": "WatchOpenedPorts returns a new StringsWatcher for each given\nmodel tag." - }, - "WatchSubnets": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResult" - } - }, - "description": "WatchSubnets returns a new StringsWatcher that watches the specified\nsubnet tags or all tags if no entities are specified." - }, - "WatchUnits": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - }, - "description": "WatchUnits starts a StringsWatcher to watch all units belonging to\nto any entity (machine or service) passed in args." - } - }, - "definitions": { - "BoolResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "BoolResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/BoolResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "CloudCredential": { - "type": "object", - "properties": { - "attrs": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "auth-type": { - "type": "string" - }, - "redacted": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "auth-type" - ] - }, - "CloudSpec": { - "type": "object", - "properties": { - "cacertificates": { - "type": "array", - "items": { - "type": "string" - } - }, - "credential": { - "$ref": "#/definitions/CloudCredential" - }, - "endpoint": { - "type": "string" - }, - "identity-endpoint": { - "type": "string" - }, - "is-controller-cloud": { - "type": "boolean" - }, - "name": { - "type": "string" - }, - "region": { - "type": "string" - }, - "skip-tls-verify": { - "type": "boolean" - }, - "storage-endpoint": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type", - "name" - ] - }, - "CloudSpecResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/CloudSpec" - } - }, - "additionalProperties": false - }, - "CloudSpecResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/CloudSpecResult" - } - } - }, - "additionalProperties": false - }, - "ControllerAPIInfoResult": { - "type": "object", - "properties": { - "addresses": { - "type": "array", - "items": { - "type": "string" - } - }, - "cacert": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "addresses", - "cacert" - ] - }, - "ControllerAPIInfoResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ControllerAPIInfoResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ControllerConfigResult": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "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" - ] - }, - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ExposeInfoResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "exposed": { - "type": "boolean" - }, - "exposed-endpoints": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/ExposedEndpoint" - } - } - } - }, - "additionalProperties": false - }, - "ExposeInfoResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ExposeInfoResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ExposedEndpoint": { - "type": "object", - "properties": { - "expose-to-cidrs": { - "type": "array", - "items": { - "type": "string" - } - }, - "expose-to-spaces": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "FanConfigEntry": { - "type": "object", - "properties": { - "overlay": { - "type": "string" - }, - "underlay": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "underlay", - "overlay" - ] - }, - "FirewallRule": { - "type": "object", - "properties": { - "known-service": { - "type": "string" - }, - "whitelist-cidrs": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "known-service" - ] - }, - "KnownServiceArgs": { - "type": "object", - "properties": { - "known-services": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "known-services" - ] - }, - "LifeResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "life": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "life" - ] - }, - "LifeResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/LifeResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ListFirewallRulesResults": { - "type": "object", - "properties": { - "Rules": { - "type": "array", - "items": { - "$ref": "#/definitions/FirewallRule" - } - } - }, - "additionalProperties": false, - "required": [ - "Rules" - ] - }, - "Macaroon": { - "type": "object", - "additionalProperties": false - }, - "MacaroonResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/Macaroon" - } - }, - "additionalProperties": false - }, - "MacaroonResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/MacaroonResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ModelConfigResult": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "ModelTag": { - "type": "object", - "additionalProperties": false - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "NotifyWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "OpenMachinePortRangesResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "unit-port-ranges": { - "type": "object", - "patternProperties": { - ".*": { - "type": "array", - "items": { - "$ref": "#/definitions/OpenUnitPortRanges" - } - } - } - } - }, - "additionalProperties": false, - "required": [ - "unit-port-ranges" - ] - }, - "OpenMachinePortRangesResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/OpenMachinePortRangesResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "OpenUnitPortRanges": { - "type": "object", - "properties": { - "endpoint": { - "type": "string" - }, - "port-ranges": { - "type": "array", - "items": { - "$ref": "#/definitions/PortRange" - } - }, - "subnet-cidrs": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "endpoint", - "port-ranges", - "subnet-cidrs" - ] - }, - "PortRange": { - "type": "object", - "properties": { - "from-port": { - "type": "integer" - }, - "protocol": { - "type": "string" - }, - "to-port": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "from-port", - "to-port", - "protocol" - ] - }, - "SetStatus": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityStatusArgs" - } - } - }, - "additionalProperties": false, - "required": [ - "entities" - ] - }, - "SpaceInfo": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "provider-id": { - "type": "string" - }, - "subnets": { - "type": "array", - "items": { - "$ref": "#/definitions/SubnetV3" - } - } - }, - "additionalProperties": false, - "required": [ - "id", - "name" - ] - }, - "SpaceInfos": { - "type": "object", - "properties": { - "space-infos": { - "type": "array", - "items": { - "$ref": "#/definitions/SpaceInfo" - } - } - }, - "additionalProperties": false - }, - "SpaceInfosParams": { - "type": "object", - "properties": { - "space-ids": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "StringResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "StringResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "StringsWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id" - ] - }, - "StringsWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringsWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "Subnet": { - "type": "object", - "properties": { - "cidr": { - "type": "string" - }, - "life": { - "type": "string" - }, - "provider-id": { - "type": "string" - }, - "provider-network-id": { - "type": "string" - }, - "provider-space-id": { - "type": "string" - }, - "space-tag": { - "type": "string" - }, - "status": { - "type": "string" - }, - "vlan-tag": { - "type": "integer" - }, - "zones": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "cidr", - "vlan-tag", - "life", - "space-tag", - "zones" - ] - }, - "SubnetV2": { - "type": "object", - "properties": { - "Subnet": { - "$ref": "#/definitions/Subnet" - }, - "cidr": { - "type": "string" - }, - "id": { - "type": "string" - }, - "life": { - "type": "string" - }, - "provider-id": { - "type": "string" - }, - "provider-network-id": { - "type": "string" - }, - "provider-space-id": { - "type": "string" - }, - "space-tag": { - "type": "string" - }, - "status": { - "type": "string" - }, - "vlan-tag": { - "type": "integer" - }, - "zones": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "cidr", - "vlan-tag", - "life", - "space-tag", - "zones", - "Subnet" - ] - }, - "SubnetV3": { - "type": "object", - "properties": { - "Subnet": { - "$ref": "#/definitions/Subnet" - }, - "SubnetV2": { - "$ref": "#/definitions/SubnetV2" - }, - "cidr": { - "type": "string" - }, - "fan-info": { - "$ref": "#/definitions/FanConfigEntry" - }, - "id": { - "type": "string" - }, - "is-public": { - "type": "boolean" - }, - "life": { - "type": "string" - }, - "provider-id": { - "type": "string" - }, - "provider-network-id": { - "type": "string" - }, - "provider-space-id": { - "type": "string" - }, - "space-id": { - "type": "string" - }, - "space-tag": { - "type": "string" - }, - "status": { - "type": "string" - }, - "vlan-tag": { - "type": "integer" - }, - "zones": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "cidr", - "vlan-tag", - "life", - "space-tag", - "zones", - "Subnet", - "SubnetV2", - "space-id" - ] - } - } - } - }, - { - "Name": "HighAvailability", - "Description": "HighAvailabilityAPI implements the HighAvailability interface and is the concrete\nimplementation of the api end point.", - "Version": 2, - "AvailableTo": [ - "controller-user", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "EnableHA": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ControllersSpecs" - }, - "Result": { - "$ref": "#/definitions/ControllersChangeResults" - } - }, - "description": "EnableHA adds controller machines as necessary to ensure the\ncontroller has the number of machines specified." - } - }, - "definitions": { - "ControllersChangeResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/ControllersChanges" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "ControllersChangeResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ControllersChangeResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ControllersChanges": { - "type": "object", - "properties": { - "added": { - "type": "array", - "items": { - "type": "string" - } - }, - "converted": { - "type": "array", - "items": { - "type": "string" - } - }, - "maintained": { - "type": "array", - "items": { - "type": "string" - } - }, - "removed": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "ControllersSpec": { - "type": "object", - "properties": { - "constraints": { - "$ref": "#/definitions/Value" - }, - "num-controllers": { - "type": "integer" - }, - "placement": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "num-controllers" - ] - }, - "ControllersSpecs": { - "type": "object", - "properties": { - "specs": { - "type": "array", - "items": { - "$ref": "#/definitions/ControllersSpec" - } - } - }, - "additionalProperties": false, - "required": [ - "specs" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "Value": { - "type": "object", - "properties": { - "allocate-public-ip": { - "type": "boolean" - }, - "arch": { - "type": "string" - }, - "container": { - "type": "string" - }, - "cores": { - "type": "integer" - }, - "cpu-power": { - "type": "integer" - }, - "instance-role": { - "type": "string" - }, - "instance-type": { - "type": "string" - }, - "mem": { - "type": "integer" - }, - "root-disk": { - "type": "integer" - }, - "root-disk-source": { - "type": "string" - }, - "spaces": { - "type": "array", - "items": { - "type": "string" - } - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "virt-type": { - "type": "string" - }, - "zones": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - } - } - } - }, - { - "Name": "HostKeyReporter", - "Description": "Facade implements the API required by the hostkeyreporter worker.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "ReportKeys": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SSHHostKeySet" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "ReportKeys sets the SSH host keys for one or more entities." - } - }, - "definitions": { - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "SSHHostKeySet": { - "type": "object", - "properties": { - "entity-keys": { - "type": "array", - "items": { - "$ref": "#/definitions/SSHHostKeys" - } - } - }, - "additionalProperties": false, - "required": [ - "entity-keys" - ] - }, - "SSHHostKeys": { - "type": "object", - "properties": { - "public-keys": { - "type": "array", - "items": { - "type": "string" - } - }, - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "public-keys" - ] - } - } - } - }, - { - "Name": "ImageMetadata", - "Description": "API is a dummy struct for compatibility.", - "Version": 3, - "AvailableTo": [ - "controller-machine-agent" - ], - "Schema": { - "type": "object", - "properties": { - "UpdateFromPublishedImages": { - "type": "object", - "description": "UpdateFromPublishedImages is now a no-op.\nIt is retained for compatibility." - } - } - } - }, - { - "Name": "ImageMetadataManager", - "Description": "API is the concrete implementation of the api end point\nfor loud image metadata manipulations.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "Delete": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/MetadataImageIds" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "Delete deletes cloud image metadata for given image ids.\nIt supports bulk calls." - }, - "List": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ImageMetadataFilter" - }, - "Result": { - "$ref": "#/definitions/ListCloudImageMetadataResult" - } - }, - "description": "List returns all found cloud image metadata that satisfy\ngiven filter.\nReturned list contains metadata ordered by priority." - }, - "Save": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/MetadataSaveParams" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "Save stores given cloud image metadata.\nIt supports bulk calls." - } - }, - "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" - }, - "source": { - "type": "string" - }, - "stream": { - "type": "string" - }, - "version": { - "type": "string" - }, - "virt-type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "image-id", - "region", - "version", - "arch", - "source", - "priority" - ] - }, - "CloudImageMetadataList": { - "type": "object", - "properties": { - "metadata": { - "type": "array", - "items": { - "$ref": "#/definitions/CloudImageMetadata" - } - } - }, - "additionalProperties": false - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "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" - }, - "stream": { - "type": "string" - }, - "versions": { - "type": "array", - "items": { - "type": "string" - } - }, - "virt-type": { - "type": "string" - } - }, - "additionalProperties": false - }, - "ListCloudImageMetadataResult": { - "type": "object", - "properties": { - "result": { - "type": "array", - "items": { - "$ref": "#/definitions/CloudImageMetadata" - } - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "MetadataImageIds": { - "type": "object", - "properties": { - "image-ids": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "image-ids" - ] - }, - "MetadataSaveParams": { - "type": "object", - "properties": { - "metadata": { - "type": "array", - "items": { - "$ref": "#/definitions/CloudImageMetadataList" - } - } - }, - "additionalProperties": false - } - } - } - }, - { - "Name": "InstanceMutater", - "Description": "", - "Version": 3, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent" - ], - "Schema": { - "type": "object", - "properties": { - "CharmProfilingInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entity" - }, - "Result": { - "$ref": "#/definitions/CharmProfilingInfoResult" - } - }, - "description": "CharmProfilingInfo returns info to update lxd profiles on the machine. If\nthe machine is not provisioned, no profile change info will be returned,\nnor will an error." - }, - "ContainerType": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entity" - }, - "Result": { - "$ref": "#/definitions/ContainerTypeResult" - } - }, - "description": "ContainerType returns the container type of a machine." - }, - "Life": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/LifeResults" - } - }, - "description": "Life returns the life status of every supplied entity, where available." - }, - "SetCharmProfiles": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetProfileArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetCharmProfiles records the given slice of charm profile names." - }, - "SetModificationStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetStatus" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetModificationStatus updates the instance whilst changes are occurring. This\nis different from SetStatus and SetInstanceStatus, by the fact this holds\ninformation about the ongoing changes that are happening to instances.\nConsider LXD Profile updates that can modify a instance, but may not cause\nthe instance to be placed into a error state. This modification status\nserves the purpose of highlighting that to the operator.\nOnly machine tags are accepted." - }, - "WatchContainers": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entity" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResult" - } - }, - "description": "WatchContainers starts a watcher to track Containers on a given\nmachine." - }, - "WatchLXDProfileVerificationNeeded": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "WatchLXDProfileVerificationNeeded starts a watcher to track Applications with\nLXD Profiles." - }, - "WatchMachines": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsWatchResult" - } - }, - "description": "WatchMachines starts a watcher to track machines.\nWatchMachines does not consume the initial event of the watch response, as\nthat returns the initial set of machines that are currently available." - }, - "WatchModelMachines": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsWatchResult" - } - }, - "description": "WatchModelMachines starts a watcher to track machines, but not containers.\nWatchModelMachines does not consume the initial event of the watch response, as\nthat returns the initial set of machines that are currently available." - } - }, - "definitions": { - "CharmLXDProfile": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "description": { - "type": "string" - }, - "devices": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - } - } - } - }, - "additionalProperties": false, - "required": [ - "config", - "description", - "devices" - ] - }, - "CharmProfilingInfoResult": { - "type": "object", - "properties": { - "current-profiles": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "instance-id": { - "type": "string" - }, - "model-name": { - "type": "string" - }, - "profile-changes": { - "type": "array", - "items": { - "$ref": "#/definitions/ProfileInfoResult" - } - } - }, - "additionalProperties": false, - "required": [ - "instance-id", - "model-name", - "profile-changes", - "current-profiles", - "error" - ] - }, - "ContainerTypeResult": { - "type": "object", - "properties": { - "container-type": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "container-type", - "error" - ] - }, - "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" - ] - }, - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "LifeResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "life": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "life" - ] - }, - "LifeResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/LifeResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "NotifyWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ProfileInfoResult": { - "type": "object", - "properties": { - "application-name": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "profile": { - "$ref": "#/definitions/CharmLXDProfile" - }, - "revision": { - "type": "integer" - } - }, - "additionalProperties": false - }, - "SetProfileArg": { - "type": "object", - "properties": { - "entity": { - "$ref": "#/definitions/Entity" - }, - "profiles": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "entity", - "profiles" - ] - }, - "SetProfileArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/SetProfileArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "SetStatus": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityStatusArgs" - } - } - }, - "additionalProperties": false, - "required": [ - "entities" - ] - }, - "StringsWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id" - ] - } - } - } - }, - { - "Name": "InstancePoller", - "Description": "InstancePollerAPI provides access to the InstancePoller API facade.", - "Version": 4, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "AreManuallyProvisioned": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/BoolResults" - } - }, - "description": "AreManuallyProvisioned returns whether each given entity is\nmanually provisioned or not. Only machine tags are accepted." - }, - "InstanceId": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringResults" - } - }, - "description": "InstanceId returns the provider specific instance id for each given\nmachine or an CodeNotProvisioned error, if not set." - }, - "InstanceStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StatusResults" - } - }, - "description": "InstanceStatus returns the instance status for each given entity.\nOnly machine tags are accepted." - }, - "Life": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/LifeResults" - } - }, - "description": "Life returns the life status of every supplied entity, where available." - }, - "ModelConfig": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ModelConfigResult" - } - }, - "description": "ModelConfig returns the current model's configuration." - }, - "ProviderAddresses": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/MachineAddressesResults" - } - }, - "description": "ProviderAddresses returns the list of all known provider addresses\nfor each given entity. Only machine tags are accepted." - }, - "SetInstanceStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetStatus" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetInstanceStatus updates the instance status for each given entity.\nOnly machine tags are accepted." - }, - "SetProviderAddresses": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetMachinesAddresses" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetProviderAddresses updates the list of known provider addresses\nfor each given entity. Only machine tags are accepted." - }, - "SetProviderNetworkConfig": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetProviderNetworkConfig" - }, - "Result": { - "$ref": "#/definitions/SetProviderNetworkConfigResults" - } - }, - "description": "SetProviderNetworkConfig updates the provider addresses for one or more\nmachines.\n\nWhat's more, if the client request includes provider-specific IDs (e.g.\nnetwork, subnet or address IDs), this method will also iterate any present\nlink layer devices (and their addresses) and merge in any missing\nprovider-specific information." - }, - "Status": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StatusResults" - } - }, - "description": "Status returns the status of each given entity." - }, - "WatchForModelConfigChanges": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResult" - } - }, - "description": "WatchForModelConfigChanges returns a NotifyWatcher that observes\nchanges to the model configuration.\nNote that although the NotifyWatchResult contains an Error field,\nit's not used because we are only returning a single watcher,\nso we use the regular error return." - }, - "WatchModelMachineStartTimes": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsWatchResult" - } - }, - "description": "WatchModelMachineStartTimes watches the non-container machines in the model\nfor changes to the Life or AgentStartTime fields and reports them as a batch." - }, - "WatchModelMachines": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsWatchResult" - } - }, - "description": "WatchModelMachines returns a StringsWatcher that notifies of\nchanges to the life cycles of the top level machines in the current\nmodel." - } - }, - "definitions": { - "Address": { - "type": "object", - "properties": { - "cidr": { - "type": "string" - }, - "config-type": { - "type": "string" - }, - "is-secondary": { - "type": "boolean" - }, - "scope": { - "type": "string" - }, - "space-id": { - "type": "string" - }, - "space-name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "value", - "type", - "scope" - ] - }, - "BoolResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "BoolResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/BoolResult" - } - } - }, - "additionalProperties": false, - "required": [ - "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" - ] - }, - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "LifeResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "life": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "life" - ] - }, - "LifeResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/LifeResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "MachineAddresses": { - "type": "object", - "properties": { - "addresses": { - "type": "array", - "items": { - "$ref": "#/definitions/Address" - } - }, - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "addresses" - ] - }, - "MachineAddressesResult": { - "type": "object", - "properties": { - "addresses": { - "type": "array", - "items": { - "$ref": "#/definitions/Address" - } - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "addresses" - ] - }, - "MachineAddressesResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/MachineAddressesResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ModelConfigResult": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "NetworkConfig": { - "type": "object", - "properties": { - "address": { - "type": "string" - }, - "addresses": { - "type": "array", - "items": { - "$ref": "#/definitions/Address" - } - }, - "cidr": { - "type": "string" - }, - "config-type": { - "type": "string" - }, - "device-index": { - "type": "integer" - }, - "disabled": { - "type": "boolean" - }, - "dns-search-domains": { - "type": "array", - "items": { - "type": "string" - } - }, - "dns-servers": { - "type": "array", - "items": { - "type": "string" - } - }, - "gateway-address": { - "type": "string" - }, - "interface-name": { - "type": "string" - }, - "interface-type": { - "type": "string" - }, - "is-default-gateway": { - "type": "boolean" - }, - "mac-address": { - "type": "string" - }, - "mtu": { - "type": "integer" - }, - "no-auto-start": { - "type": "boolean" - }, - "origin": { - "type": "string" - }, - "parent-interface-name": { - "type": "string" - }, - "provider-address-id": { - "type": "string" - }, - "provider-id": { - "type": "string" - }, - "provider-network-id": { - "type": "string" - }, - "provider-space-id": { - "type": "string" - }, - "provider-subnet-id": { - "type": "string" - }, - "provider-vlan-id": { - "type": "string" - }, - "routes": { - "type": "array", - "items": { - "$ref": "#/definitions/NetworkRoute" - } - }, - "shadow-addresses": { - "type": "array", - "items": { - "$ref": "#/definitions/Address" - } - }, - "virtual-port-type": { - "type": "string" - }, - "vlan-tag": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "device-index", - "mac-address", - "cidr", - "mtu", - "provider-id", - "provider-network-id", - "provider-subnet-id", - "provider-space-id", - "provider-address-id", - "provider-vlan-id", - "vlan-tag", - "interface-name", - "parent-interface-name", - "interface-type", - "disabled" - ] - }, - "NetworkRoute": { - "type": "object", - "properties": { - "destination-cidr": { - "type": "string" - }, - "gateway-ip": { - "type": "string" - }, - "metric": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "destination-cidr", - "gateway-ip", - "metric" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "ProviderNetworkConfig": { - "type": "object", - "properties": { - "config": { - "type": "array", - "items": { - "$ref": "#/definitions/NetworkConfig" - } - }, - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "config" - ] - }, - "SetMachinesAddresses": { - "type": "object", - "properties": { - "machine-addresses": { - "type": "array", - "items": { - "$ref": "#/definitions/MachineAddresses" - } - } - }, - "additionalProperties": false, - "required": [ - "machine-addresses" - ] - }, - "SetProviderNetworkConfig": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/ProviderNetworkConfig" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "SetProviderNetworkConfigResult": { - "type": "object", - "properties": { - "addresses": { - "type": "array", - "items": { - "$ref": "#/definitions/Address" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "modified": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "addresses", - "modified" - ] - }, - "SetProviderNetworkConfigResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/SetProviderNetworkConfigResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "SetStatus": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityStatusArgs" - } - } - }, - "additionalProperties": false, - "required": [ - "entities" - ] - }, - "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": [ - "id", - "life", - "status", - "info", - "data", - "since" - ] - }, - "StatusResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StatusResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "StringResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "StringResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "StringsWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id" - ] - } - } - } - }, - { - "Name": "KeyManager", - "Description": "KeyManagerAPI implements the KeyUpdater interface and is the concrete\nimplementation of the api end point.", - "Version": 1, - "AvailableTo": [ - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "AddKeys": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ModifyUserSSHKeys" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "AddKeys adds new authorised ssh keys for the specified user." - }, - "DeleteKeys": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ModifyUserSSHKeys" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "DeleteKeys deletes the authorised ssh keys for the specified user." - }, - "ImportKeys": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ModifyUserSSHKeys" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "ImportKeys imports new authorised ssh keys from the specified key ids for the specified user." - }, - "ListKeys": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ListSSHKeys" - }, - "Result": { - "$ref": "#/definitions/StringsResults" - } - }, - "description": "ListKeys returns the authorised ssh keys for the specified users." - } - }, - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ListSSHKeys": { - "type": "object", - "properties": { - "entities": { - "$ref": "#/definitions/Entities" - }, - "mode": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "entities", - "mode" - ] - }, - "ModifyUserSSHKeys": { - "type": "object", - "properties": { - "ssh-keys": { - "type": "array", - "items": { - "type": "string" - } - }, - "user": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "user", - "ssh-keys" - ] - }, - "StringsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "StringsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringsResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - } - } - } - }, - { - "Name": "KeyUpdater", - "Description": "KeyUpdaterAPI implements the KeyUpdater interface and is the concrete\nimplementation of the api end point.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent" - ], - "Schema": { - "type": "object", - "properties": { - "AuthorisedKeys": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsResults" - } - }, - "description": "AuthorisedKeys reports the authorised ssh keys for the specified machines.\nThe current implementation relies on global authorised keys being stored in the model config.\nThis will change as new user management and authorisation functionality is added." - }, - "WatchAuthorisedKeys": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "WatchAuthorisedKeys starts a watcher to track changes to the authorised ssh keys\nfor the specified machines.\nThe current implementation relies on global authorised keys being stored in the model config.\nThis will change as new user management and authorisation functionality is added." - } - }, - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "NotifyWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "StringsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "StringsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringsResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - } - } - } - }, - { - "Name": "LeadershipService", - "Description": "LeadershipService implements a variant of leadership.Claimer for consumption\nover the API.", - "Version": 2, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "BlockUntilLeadershipReleased": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ApplicationTag" - }, - "Result": { - "$ref": "#/definitions/ErrorResult" - } - }, - "description": "BlockUntilLeadershipReleased blocks the caller until leadership is\nreleased for the given service." - }, - "ClaimLeadership": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ClaimLeadershipBulkParams" - }, - "Result": { - "$ref": "#/definitions/ClaimLeadershipBulkResults" - } - }, - "description": "ClaimLeadership makes a leadership claim with the given parameters." - } - }, - "definitions": { - "ApplicationTag": { - "type": "object", - "properties": { - "Name": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Name" - ] - }, - "ClaimLeadershipBulkParams": { - "type": "object", - "properties": { - "params": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimLeadershipParams" - } - } - }, - "additionalProperties": false, - "required": [ - "params" - ] - }, - "ClaimLeadershipBulkResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ClaimLeadershipParams": { - "type": "object", - "properties": { - "application-tag": { - "type": "string" - }, - "duration": { - "type": "number" - }, - "unit-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "application-tag", - "unit-tag", - "duration" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - } - } - } - }, - { - "Name": "LifeFlag", - "Description": "", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent" - ], - "Schema": { - "type": "object", - "properties": { - "Life": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/LifeResults" - } - }, - "description": "Life returns the life status of every supplied entity, where available." - }, - "Watch": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "Watch starts an NotifyWatcher for each given entity." - } - }, - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "LifeResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "life": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "life" - ] - }, - "LifeResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/LifeResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "NotifyWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - } - } - } - }, - { - "Name": "LogForwarding", - "Description": "LogForwardingAPI is the concrete implementation of the api end point.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent" - ], - "Schema": { - "type": "object", - "properties": { - "GetLastSent": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/LogForwardingGetLastSentParams" - }, - "Result": { - "$ref": "#/definitions/LogForwardingGetLastSentResults" - } - }, - "description": "GetLastSent is a bulk call that gets the log forwarding \"last sent\"\nrecord ID for each requested target." - }, - "SetLastSent": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/LogForwardingSetLastSentParams" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetLastSent is a bulk call that sets the log forwarding \"last sent\"\nrecord ID for each requested target." - } - }, - "definitions": { - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "LogForwardingGetLastSentParams": { - "type": "object", - "properties": { - "ids": { - "type": "array", - "items": { - "$ref": "#/definitions/LogForwardingID" - } - } - }, - "additionalProperties": false, - "required": [ - "ids" - ] - }, - "LogForwardingGetLastSentResult": { - "type": "object", - "properties": { - "err": { - "$ref": "#/definitions/Error" - }, - "record-id": { - "type": "integer" - }, - "record-timestamp": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "record-id", - "record-timestamp", - "err" - ] - }, - "LogForwardingGetLastSentResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/LogForwardingGetLastSentResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "LogForwardingID": { - "type": "object", - "properties": { - "model": { - "type": "string" - }, - "sink": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "model", - "sink" - ] - }, - "LogForwardingSetLastSentParam": { - "type": "object", - "properties": { - "LogForwardingID": { - "$ref": "#/definitions/LogForwardingID" - }, - "model": { - "type": "string" - }, - "record-id": { - "type": "integer" - }, - "record-timestamp": { - "type": "integer" - }, - "sink": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "model", - "sink", - "LogForwardingID", - "record-id", - "record-timestamp" - ] - }, - "LogForwardingSetLastSentParams": { - "type": "object", - "properties": { - "params": { - "type": "array", - "items": { - "$ref": "#/definitions/LogForwardingSetLastSentParam" - } - } - }, - "additionalProperties": false, - "required": [ - "params" - ] - } - } - } - }, - { - "Name": "Logger", - "Description": "LoggerAPI implements the Logger interface and is the concrete\nimplementation of the api end point.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "LoggingConfig": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringResults" - } - }, - "description": "LoggingConfig reports the logging configuration for the agents specified." - }, - "WatchLoggingConfig": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "WatchLoggingConfig starts a watcher to track changes to the logging config\nfor the agents specified.. Unfortunately the current infrastructure makes\nwatching parts of the config non-trivial, so currently any change to the\nconfig will cause the watcher to notify the client." - } - }, - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "NotifyWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "StringResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "StringResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - } - } - } - }, - { - "Name": "MachineActions", - "Description": "Facade implements the machineactions interface and is the concrete\nimplementation of the api end point.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent" - ], - "Schema": { - "type": "object", - "properties": { - "Actions": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ActionResults" - } - }, - "description": "Actions returns the Actions by Tags passed and ensures that the machine asking\nfor them is the machine that has the actions" - }, - "BeginActions": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "BeginActions marks the actions represented by the passed in Tags as running." - }, - "FinishActions": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ActionExecutionResults" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "FinishActions saves the result of a completed Action" - }, - "RunningActions": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ActionsByReceivers" - } - }, - "description": "RunningActions lists the actions running for the entities passed in.\nIf we end up needing more than ListRunning at some point we could follow/abstract\nwhat's done in the client actions package." - }, - "WatchActionNotifications": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - }, - "description": "WatchActionNotifications returns a StringsWatcher for observing\nincoming action calls to a machine." - } - }, - "definitions": { - "Action": { - "type": "object", - "properties": { - "execution-group": { - "type": "string" - }, - "name": { - "type": "string" - }, - "parallel": { - "type": "boolean" - }, - "parameters": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "receiver": { - "type": "string" - }, - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "receiver", - "name" - ] - }, - "ActionExecutionResult": { - "type": "object", - "properties": { - "action-tag": { - "type": "string" - }, - "message": { - "type": "string" - }, - "results": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "status": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "action-tag", - "status" - ] - }, - "ActionExecutionResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ActionExecutionResult" - } - } - }, - "additionalProperties": false - }, - "ActionMessage": { - "type": "object", - "properties": { - "message": { - "type": "string" - }, - "timestamp": { - "type": "string", - "format": "date-time" - } - }, - "additionalProperties": false, - "required": [ - "timestamp", - "message" - ] - }, - "ActionResult": { - "type": "object", - "properties": { - "action": { - "$ref": "#/definitions/Action" - }, - "completed": { - "type": "string", - "format": "date-time" - }, - "enqueued": { - "type": "string", - "format": "date-time" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "log": { - "type": "array", - "items": { - "$ref": "#/definitions/ActionMessage" - } - }, - "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": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "StringsWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id" - ] - }, - "StringsWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringsWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - } - } - } - }, - { - "Name": "MachineManager", - "Description": "MachineManagerAPI provides access to the MachineManager API facade.", - "Version": 10, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "AddMachines": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/AddMachines" - }, - "Result": { - "$ref": "#/definitions/AddMachinesResults" - } - }, - "description": "AddMachines adds new machines with the supplied parameters.\nThe args will contain Base info." - }, - "DestroyMachineWithParams": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/DestroyMachinesParams" - }, - "Result": { - "$ref": "#/definitions/DestroyMachineResults" - } - }, - "description": "DestroyMachineWithParams removes a set of machines from the model." - }, - "GetUpgradeSeriesMessages": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/UpgradeSeriesNotificationParams" - }, - "Result": { - "$ref": "#/definitions/StringsResults" - } - }, - "description": "GetUpgradeSeriesMessages returns all new messages associated with upgrade\nseries events. Messages that have already been retrieved once are not\nreturned by this method." - }, - "InstanceTypes": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ModelInstanceTypesConstraints" - }, - "Result": { - "$ref": "#/definitions/InstanceTypesResults" - } - }, - "description": "InstanceTypes returns instance type information for the cloud and region\nin which the current model is deployed." - }, - "ProvisioningScript": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ProvisioningScriptParams" - }, - "Result": { - "$ref": "#/definitions/ProvisioningScriptResult" - } - }, - "description": "ProvisioningScript returns a shell script that, when run,\nprovisions a machine agent on the machine executing the script." - }, - "RetryProvisioning": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RetryProvisioningArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "RetryProvisioning marks a provisioning error as transient on the machines." - }, - "UpgradeSeriesComplete": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/UpdateChannelArg" - }, - "Result": { - "$ref": "#/definitions/ErrorResult" - } - }, - "description": "UpgradeSeriesComplete marks a machine as having completed a managed series\nupgrade." - }, - "UpgradeSeriesPrepare": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/UpdateChannelArg" - }, - "Result": { - "$ref": "#/definitions/ErrorResult" - } - }, - "description": "UpgradeSeriesPrepare prepares a machine for a OS series upgrade." - }, - "UpgradeSeriesValidate": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/UpdateChannelArgs" - }, - "Result": { - "$ref": "#/definitions/UpgradeSeriesUnitsResults" - } - }, - "description": "UpgradeSeriesValidate validates that the incoming arguments correspond to a\nvalid series upgrade for the target machine.\nIf they do, a list of the machine's current units is returned for use in\nsoliciting user confirmation of the command." - }, - "WatchUpgradeSeriesNotifications": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "WatchUpgradeSeriesNotifications returns a watcher that fires on upgrade\nseries events." - } - }, - "definitions": { - "AddMachineParams": { - "type": "object", - "properties": { - "addresses": { - "type": "array", - "items": { - "$ref": "#/definitions/Address" - } - }, - "base": { - "$ref": "#/definitions/Base" - }, - "constraints": { - "$ref": "#/definitions/Value" - }, - "container-type": { - "type": "string" - }, - "disks": { - "type": "array", - "items": { - "$ref": "#/definitions/Constraints" - } - }, - "hardware-characteristics": { - "$ref": "#/definitions/HardwareCharacteristics" - }, - "instance-id": { - "type": "string" - }, - "jobs": { - "type": "array", - "items": { - "type": "string" - } - }, - "nonce": { - "type": "string" - }, - "parent-id": { - "type": "string" - }, - "placement": { - "$ref": "#/definitions/Placement" - } - }, - "additionalProperties": false, - "required": [ - "constraints", - "jobs", - "parent-id", - "container-type", - "instance-id", - "nonce", - "hardware-characteristics", - "addresses" - ] - }, - "AddMachines": { - "type": "object", - "properties": { - "params": { - "type": "array", - "items": { - "$ref": "#/definitions/AddMachineParams" - } - } - }, - "additionalProperties": false, - "required": [ - "params" - ] - }, - "AddMachinesResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "machine": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "machine" - ] - }, - "AddMachinesResults": { - "type": "object", - "properties": { - "machines": { - "type": "array", - "items": { - "$ref": "#/definitions/AddMachinesResult" - } - } - }, - "additionalProperties": false, - "required": [ - "machines" - ] - }, - "Address": { - "type": "object", - "properties": { - "cidr": { - "type": "string" - }, - "config-type": { - "type": "string" - }, - "is-secondary": { - "type": "boolean" - }, - "scope": { - "type": "string" - }, - "space-id": { - "type": "string" - }, - "space-name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "value", - "type", - "scope" - ] - }, - "Base": { - "type": "object", - "properties": { - "channel": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "channel" - ] - }, - "Constraints": { - "type": "object", - "properties": { - "Count": { - "type": "integer" - }, - "Pool": { - "type": "string" - }, - "Size": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "Pool", - "Size", - "Count" - ] - }, - "DestroyMachineInfo": { - "type": "object", - "properties": { - "destroyed-containers": { - "type": "array", - "items": { - "$ref": "#/definitions/DestroyMachineResult" - } - }, - "destroyed-storage": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } - }, - "destroyed-units": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } - }, - "detached-storage": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } - }, - "machine-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "machine-id" - ] - }, - "DestroyMachineResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "info": { - "$ref": "#/definitions/DestroyMachineInfo" - } - }, - "additionalProperties": false - }, - "DestroyMachineResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/DestroyMachineResult" - } - } - }, - "additionalProperties": false - }, - "DestroyMachinesParams": { - "type": "object", - "properties": { - "dry-run": { - "type": "boolean" - }, - "force": { - "type": "boolean" - }, - "keep": { - "type": "boolean" - }, - "machine-tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "max-wait": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "machine-tags" - ] - }, - "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": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "HardwareCharacteristics": { - "type": "object", - "properties": { - "arch": { - "type": "string" - }, - "availability-zone": { - "type": "string" - }, - "cpu-cores": { - "type": "integer" - }, - "cpu-power": { - "type": "integer" - }, - "mem": { - "type": "integer" - }, - "root-disk": { - "type": "integer" - }, - "root-disk-source": { - "type": "string" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "virt-type": { - "type": "string" - } - }, - "additionalProperties": false - }, - "InstanceType": { - "type": "object", - "properties": { - "arches": { - "type": "array", - "items": { - "type": "string" - } - }, - "cost": { - "type": "integer" - }, - "cpu-cores": { - "type": "integer" - }, - "deprecated": { - "type": "boolean" - }, - "memory": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "root-disk": { - "type": "integer" - }, - "virt-type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "arches", - "cpu-cores", - "memory" - ] - }, - "InstanceTypesResult": { - "type": "object", - "properties": { - "cost-currency": { - "type": "string" - }, - "cost-divisor": { - "type": "integer" - }, - "cost-unit": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "instance-types": { - "type": "array", - "items": { - "$ref": "#/definitions/InstanceType" - } - } - }, - "additionalProperties": false - }, - "InstanceTypesResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/InstanceTypesResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ModelInstanceTypesConstraint": { - "type": "object", - "properties": { - "value": { - "$ref": "#/definitions/Value" - } - }, - "additionalProperties": false - }, - "ModelInstanceTypesConstraints": { - "type": "object", - "properties": { - "constraints": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelInstanceTypesConstraint" - } - } - }, - "additionalProperties": false, - "required": [ - "constraints" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "NotifyWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "Placement": { - "type": "object", - "properties": { - "directive": { - "type": "string" - }, - "scope": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "scope", - "directive" - ] - }, - "ProvisioningScriptParams": { - "type": "object", - "properties": { - "data-dir": { - "type": "string" - }, - "disable-package-commands": { - "type": "boolean" - }, - "machine-id": { - "type": "string" - }, - "nonce": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "machine-id", - "nonce", - "data-dir", - "disable-package-commands" - ] - }, - "ProvisioningScriptResult": { - "type": "object", - "properties": { - "script": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "script" - ] - }, - "RetryProvisioningArgs": { - "type": "object", - "properties": { - "all": { - "type": "boolean" - }, - "machines": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "all" - ] - }, - "StringsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "StringsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringsResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "UpdateChannelArg": { - "type": "object", - "properties": { - "channel": { - "type": "string" - }, - "force": { - "type": "boolean" - }, - "tag": { - "$ref": "#/definitions/Entity" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "force", - "channel" - ] - }, - "UpdateChannelArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/UpdateChannelArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "UpgradeSeriesNotificationParam": { - "type": "object", - "properties": { - "entity": { - "$ref": "#/definitions/Entity" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "entity", - "watcher-id" - ] - }, - "UpgradeSeriesNotificationParams": { - "type": "object", - "properties": { - "params": { - "type": "array", - "items": { - "$ref": "#/definitions/UpgradeSeriesNotificationParam" - } - } - }, - "additionalProperties": false, - "required": [ - "params" - ] - }, - "UpgradeSeriesUnitsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "unit-names": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "unit-names" - ] - }, - "UpgradeSeriesUnitsResults": { - "type": "object", - "properties": { - "Results": { - "type": "array", - "items": { - "$ref": "#/definitions/UpgradeSeriesUnitsResult" - } - } - }, - "additionalProperties": false, - "required": [ - "Results" - ] - }, - "Value": { - "type": "object", - "properties": { - "allocate-public-ip": { - "type": "boolean" - }, - "arch": { - "type": "string" - }, - "container": { - "type": "string" - }, - "cores": { - "type": "integer" - }, - "cpu-power": { - "type": "integer" - }, - "instance-role": { - "type": "string" - }, - "instance-type": { - "type": "string" - }, - "mem": { - "type": "integer" - }, - "root-disk": { - "type": "integer" - }, - "root-disk-source": { - "type": "string" - }, - "spaces": { - "type": "array", - "items": { - "type": "string" - } - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "virt-type": { - "type": "string" - }, - "zones": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - } - } - } - }, - { - "Name": "MachineUndertaker", - "Description": "API implements the API facade used by the machine undertaker.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent" - ], - "Schema": { - "type": "object", - "properties": { - "AllMachineRemovals": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/EntitiesResults" - } - }, - "description": "AllMachineRemovals returns tags for all of the machines that have\nbeen marked for removal in the requested model." - }, - "CompleteMachineRemovals": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - } - }, - "description": "CompleteMachineRemovals removes the specified machines from the\nmodel database. It should only be called once any provider-level\ncleanup has been done for those machines." - }, - "GetMachineProviderInterfaceInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ProviderInterfaceInfoResults" - } - }, - "description": "GetMachineProviderInterfaceInfo returns the provider details for\nall network interfaces attached to the machines requested." - }, - "WatchMachineRemovals": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "WatchMachineRemovals returns a watcher that will signal each time a\nmachine is marked for removal." - } - }, - "definitions": { - "Entities": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } - } - }, - "additionalProperties": false, - "required": [ - "entities" - ] - }, - "EntitiesResult": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "entities" - ] - }, - "EntitiesResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/EntitiesResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "Entity": { - "type": "object", - "properties": { - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "NotifyWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ProviderInterfaceInfo": { - "type": "object", - "properties": { - "interface-name": { - "type": "string" - }, - "mac-address": { - "type": "string" - }, - "provider-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "interface-name", - "mac-address", - "provider-id" - ] - }, - "ProviderInterfaceInfoResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "interfaces": { - "type": "array", - "items": { - "$ref": "#/definitions/ProviderInterfaceInfo" - } - }, - "machine-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "machine-tag", - "interfaces" - ] - }, - "ProviderInterfaceInfoResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ProviderInterfaceInfoResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - } - } - } - }, - { - "Name": "Machiner", - "Description": "MachinerAPI implements the API used by the machiner worker.", - "Version": 5, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "APIAddresses": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsResult" - } - }, - "description": "APIAddresses returns the list of addresses used to connect to the API." - }, - "APIHostPorts": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/APIHostPortsResult" - } - }, - "description": "APIHostPorts returns the API server addresses." - }, - "EnsureDead": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "EnsureDead calls EnsureDead on each given entity from state. It\nwill fail if the entity is not present. If it's Alive, nothing will\nhappen (see state/EnsureDead() for units or machines)." - }, - "Jobs": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/JobsResults" - } - }, - "description": "Jobs returns the jobs assigned to the given entities." - }, - "Life": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/LifeResults" - } - }, - "description": "Life returns the life status of every supplied entity, where available." - }, - "RecordAgentStartInformation": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RecordAgentStartInformationArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "RecordAgentStartInformation syncs the machine model with information\nreported by a machine agent when it starts." - }, - "RecordAgentStartTime": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "RecordAgentStartTime updates the agent start time field in the machine doc." - }, - "SetMachineAddresses": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetMachinesAddresses" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - } - }, - "SetObservedNetworkConfig": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetMachineNetworkConfig" - } - }, - "description": "SetObservedNetworkConfig reads the network config for the machine\nidentified by the input args.\nThis config is merged with the new network config supplied in the\nsame args and updated if it has changed." - }, - "SetStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetStatus" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetStatus sets the status of each given entity." - }, - "Watch": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "Watch starts an NotifyWatcher for each given entity." - }, - "WatchAPIHostPorts": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResult" - } - }, - "description": "WatchAPIHostPorts watches the API server addresses." - } - }, - "definitions": { - "APIHostPortsResult": { - "type": "object", - "properties": { - "servers": { - "type": "array", - "items": { - "type": "array", - "items": { - "$ref": "#/definitions/HostPort" - } - } - } - }, - "additionalProperties": false, - "required": [ - "servers" - ] - }, - "Address": { - "type": "object", - "properties": { - "cidr": { - "type": "string" - }, - "config-type": { - "type": "string" - }, - "is-secondary": { - "type": "boolean" - }, - "scope": { - "type": "string" - }, - "space-id": { - "type": "string" - }, - "space-name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "value", - "type", - "scope" - ] - }, - "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" - ] - }, - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "HostPort": { - "type": "object", - "properties": { - "Address": { - "$ref": "#/definitions/Address" - }, - "cidr": { - "type": "string" - }, - "config-type": { - "type": "string" - }, - "is-secondary": { - "type": "boolean" - }, - "port": { - "type": "integer" - }, - "scope": { - "type": "string" - }, - "space-id": { - "type": "string" - }, - "space-name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "value", - "type", - "scope", - "Address", - "port" - ] - }, - "JobsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "jobs": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "jobs" - ] - }, - "JobsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/JobsResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "LifeResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "life": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "life" - ] - }, - "LifeResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/LifeResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "MachineAddresses": { - "type": "object", - "properties": { - "addresses": { - "type": "array", - "items": { - "$ref": "#/definitions/Address" - } - }, - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "addresses" - ] - }, - "NetworkConfig": { - "type": "object", - "properties": { - "address": { - "type": "string" - }, - "addresses": { - "type": "array", - "items": { - "$ref": "#/definitions/Address" - } - }, - "cidr": { - "type": "string" - }, - "config-type": { - "type": "string" - }, - "device-index": { - "type": "integer" - }, - "disabled": { - "type": "boolean" - }, - "dns-search-domains": { - "type": "array", - "items": { - "type": "string" - } - }, - "dns-servers": { - "type": "array", - "items": { - "type": "string" - } - }, - "gateway-address": { - "type": "string" - }, - "interface-name": { - "type": "string" - }, - "interface-type": { - "type": "string" - }, - "is-default-gateway": { - "type": "boolean" - }, - "mac-address": { - "type": "string" - }, - "mtu": { - "type": "integer" - }, - "no-auto-start": { - "type": "boolean" - }, - "origin": { - "type": "string" - }, - "parent-interface-name": { - "type": "string" - }, - "provider-address-id": { - "type": "string" - }, - "provider-id": { - "type": "string" - }, - "provider-network-id": { - "type": "string" - }, - "provider-space-id": { - "type": "string" - }, - "provider-subnet-id": { - "type": "string" - }, - "provider-vlan-id": { - "type": "string" - }, - "routes": { - "type": "array", - "items": { - "$ref": "#/definitions/NetworkRoute" - } - }, - "shadow-addresses": { - "type": "array", - "items": { - "$ref": "#/definitions/Address" - } - }, - "virtual-port-type": { - "type": "string" - }, - "vlan-tag": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "device-index", - "mac-address", - "cidr", - "mtu", - "provider-id", - "provider-network-id", - "provider-subnet-id", - "provider-space-id", - "provider-address-id", - "provider-vlan-id", - "vlan-tag", - "interface-name", - "parent-interface-name", - "interface-type", - "disabled" - ] - }, - "NetworkRoute": { - "type": "object", - "properties": { - "destination-cidr": { - "type": "string" - }, - "gateway-ip": { - "type": "string" - }, - "metric": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "destination-cidr", - "gateway-ip", - "metric" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "NotifyWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "RecordAgentStartInformationArg": { - "type": "object", - "properties": { - "hostname": { - "type": "string" - }, - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag" - ] - }, - "RecordAgentStartInformationArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/RecordAgentStartInformationArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "SetMachineNetworkConfig": { - "type": "object", - "properties": { - "config": { - "type": "array", - "items": { - "$ref": "#/definitions/NetworkConfig" - } - }, - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "config" - ] - }, - "SetMachinesAddresses": { - "type": "object", - "properties": { - "machine-addresses": { - "type": "array", - "items": { - "$ref": "#/definitions/MachineAddresses" - } - } - }, - "additionalProperties": false, - "required": [ - "machine-addresses" - ] - }, - "SetStatus": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityStatusArgs" - } - } - }, - "additionalProperties": false, - "required": [ - "entities" - ] - }, - "StringsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - } - } - } - }, - { - "Name": "MeterStatus", - "Description": "MeterStatusAPI implements the MeterStatus interface and is the concrete\nimplementation of the API endpoint. Additionally, it embeds\ncommon.UnitStateAPI to allow meter status workers to access their\ncontroller-backed internal state.", - "Version": 2, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "GetMeterStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/MeterStatusResults" - } - }, - "description": "GetMeterStatus returns meter status information for each unit." - }, - "SetState": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetUnitStateArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetState sets the state persisted by the charm running in this unit\nand the state internal to the uniter for this unit." - }, - "State": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/UnitStateResults" - } - }, - "description": "State returns the state persisted by the charm running in this unit\nand the state internal to the uniter for this unit." - }, - "WatchMeterStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "WatchMeterStatus returns a NotifyWatcher for observing changes\nto each unit's meter status." - } - }, - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "MeterStatusResult": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "info": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "code", - "info" - ] - }, - "MeterStatusResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/MeterStatusResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "NotifyWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "SetUnitStateArg": { - "type": "object", - "properties": { - "charm-state": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "meter-status-state": { - "type": "string" - }, - "relation-state": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "secret-state": { - "type": "string" - }, - "storage-state": { - "type": "string" - }, - "tag": { - "type": "string" - }, - "uniter-state": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag" - ] - }, - "SetUnitStateArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/SetUnitStateArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "UnitStateResult": { - "type": "object", - "properties": { - "charm-state": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "meter-status-state": { - "type": "string" - }, - "relation-state": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "secret-state": { - "type": "string" - }, - "storage-state": { - "type": "string" - }, - "uniter-state": { - "type": "string" - } - }, - "additionalProperties": false - }, - "UnitStateResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/UnitStateResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - } - } - } - }, - { - "Name": "MetricsAdder", - "Description": "MetricsAdderAPI implements the metrics adder interface and is the concrete\nimplementation of the API end point.", - "Version": 2, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent" - ], - "Schema": { - "type": "object", - "properties": { - "AddMetricBatches": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/MetricBatchParams" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "AddMetricBatches implements the MetricsAdder interface." - } - }, - "definitions": { - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "Metric": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "labels": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "time": { - "type": "string", - "format": "date-time" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "key", - "value", - "time" - ] - }, - "MetricBatch": { - "type": "object", - "properties": { - "charm-url": { - "type": "string" - }, - "created": { - "type": "string", - "format": "date-time" - }, - "metrics": { - "type": "array", - "items": { - "$ref": "#/definitions/Metric" - } - }, - "uuid": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "uuid", - "charm-url", - "created", - "metrics" - ] - }, - "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" - ] - } - } - } - }, - { - "Name": "MetricsDebug", - "Description": "MetricsDebugAPI implements the metricsdebug interface and is the concrete\nimplementation of the api end point.", - "Version": 2, - "AvailableTo": [ - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "GetMetrics": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/MetricResults" - } - }, - "description": "GetMetrics returns all metrics stored by the state server." - }, - "SetMeterStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/MeterStatusParams" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetMeterStatus sets meter statuses for entities." - } - }, - "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" - ] - }, - "EntityMetrics": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "metrics": { - "type": "array", - "items": { - "$ref": "#/definitions/MetricResult" - } - } - }, - "additionalProperties": false - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "MeterStatusParam": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "string" - }, - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "code" - ] - }, - "MeterStatusParams": { - "type": "object", - "properties": { - "statues": { - "type": "array", - "items": { - "$ref": "#/definitions/MeterStatusParam" - } - } - }, - "additionalProperties": false, - "required": [ - "statues" - ] - }, - "MetricResult": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "labels": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "time": { - "type": "string", - "format": "date-time" - }, - "unit": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "time", - "key", - "value", - "unit", - "labels" - ] - }, - "MetricResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityMetrics" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - } - } - } - }, - { - "Name": "MetricsManager", - "Description": "MetricsManagerAPI implements the metrics manager interface and is the concrete\nimplementation of the api end point.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent" - ], - "Schema": { - "type": "object", - "properties": { - "AddJujuMachineMetrics": { - "type": "object", - "description": "AddJujuMachineMetrics adds a metric that counts the number of\nnon-container machines in the current model." - }, - "CleanupOldMetrics": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "CleanupOldMetrics removes old metrics from the collection.\nThe single arg params is expected to contain and model uuid.\nEven though the call will delete all metrics across models\nit serves to validate that the connection has access to at least one model." - }, - "SendMetrics": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SendMetrics will send any unsent metrics onto the metric collection service." - } - }, - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - } - } - } - }, - { - "Name": "MigrationFlag", - "Description": "Facade lets clients watch and get models' migration phases.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "Phase": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/PhaseResults" - } - }, - "description": "Phase returns the current migration phase or an error for every\nsupplied entity." - }, - "Watch": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "Watch returns an id for use with the NotifyWatcher facade, or an\nerror, for every supplied entity." - } - }, - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "NotifyWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "PhaseResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "phase": { - "type": "string" - } - }, - "additionalProperties": false - }, - "PhaseResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/PhaseResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - } - } - } - }, - { - "Name": "MigrationMaster", - "Description": "API implements the API required for the model migration\nmaster worker.", - "Version": 3, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "Export": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/SerializedModel" - } - }, - "description": "Export serializes the model associated with the API connection." - }, - "MigrationStatus": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/MasterMigrationStatus" - } - }, - "description": "MigrationStatus returns the details and progress of the latest\nmodel migration." - }, - "MinionReportTimeout": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringResult" - } - }, - "description": "MinionReportTimeout returns the configuration value for this controller that\nindicates how long the migration master worker should wait for minions to\nreported on phases of a migration." - }, - "MinionReports": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/MinionReports" - } - }, - "description": "MinionReports returns details of the reports made by migration\nminions to the controller for the current migration phase." - }, - "ModelInfo": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/MigrationModelInfo" - } - }, - "description": "ModelInfo returns essential information about the model to be\nmigrated." - }, - "Prechecks": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/PrechecksArgs" - } - }, - "description": "Prechecks performs pre-migration checks on the model and\n(source) controller." - }, - "ProcessRelations": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ProcessRelations" - } - }, - "description": "ProcessRelations processes any relations that need updating after an export.\nThis should help fix any remoteApplications that have been migrated." - }, - "Reap": { - "type": "object", - "description": "Reap removes all documents for the model associated with the API\nconnection." - }, - "SetPhase": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetMigrationPhaseArgs" - } - }, - "description": "SetPhase sets the phase of the active model migration. The provided\nphase must be a valid phase value, for example QUIESCE\" or\n\"ABORT\". See the core/migration package for the complete list." - }, - "SetStatusMessage": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetMigrationStatusMessageArgs" - } - }, - "description": "SetStatusMessage sets a human readable status message containing\ninformation about the migration's progress. This will be shown in\nstatus output shown to the end user." - }, - "Watch": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResult" - } - }, - "description": "Watch starts watching for an active migration for the model\nassociated with the API connection. The returned id should be used\nwith the NotifyWatcher facade to receive events." - }, - "WatchMinionReports": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResult" - } - }, - "description": "WatchMinionReports sets up a watcher which reports when a report\nfor a migration minion has arrived." - } - }, - "definitions": { - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "MasterMigrationStatus": { - "type": "object", - "properties": { - "migration-id": { - "type": "string" - }, - "phase": { - "type": "string" - }, - "phase-changed-time": { - "type": "string", - "format": "date-time" - }, - "spec": { - "$ref": "#/definitions/MigrationSpec" - } - }, - "additionalProperties": false, - "required": [ - "spec", - "migration-id", - "phase", - "phase-changed-time" - ] - }, - "MigrationModelInfo": { - "type": "object", - "properties": { - "agent-version": { - "$ref": "#/definitions/Number" - }, - "controller-agent-version": { - "$ref": "#/definitions/Number" - }, - "name": { - "type": "string" - }, - "owner-tag": { - "type": "string" - }, - "uuid": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "uuid", - "name", - "owner-tag", - "agent-version", - "controller-agent-version" - ] - }, - "MigrationSpec": { - "type": "object", - "properties": { - "model-tag": { - "type": "string" - }, - "target-info": { - "$ref": "#/definitions/MigrationTargetInfo" - } - }, - "additionalProperties": false, - "required": [ - "model-tag", - "target-info" - ] - }, - "MigrationTargetInfo": { - "type": "object", - "properties": { - "addrs": { - "type": "array", - "items": { - "type": "string" - } - }, - "auth-tag": { - "type": "string" - }, - "ca-cert": { - "type": "string" - }, - "controller-alias": { - "type": "string" - }, - "controller-tag": { - "type": "string" - }, - "macaroons": { - "type": "string" - }, - "password": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "controller-tag", - "addrs", - "ca-cert", - "auth-tag" - ] - }, - "MinionReports": { - "type": "object", - "properties": { - "failed": { - "type": "array", - "items": { - "type": "string" - } - }, - "migration-id": { - "type": "string" - }, - "phase": { - "type": "string" - }, - "success-count": { - "type": "integer" - }, - "unknown-count": { - "type": "integer" - }, - "unknown-sample": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "migration-id", - "phase", - "success-count", - "unknown-count", - "unknown-sample", - "failed" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "Number": { - "type": "object", - "properties": { - "Build": { - "type": "integer" - }, - "Major": { - "type": "integer" - }, - "Minor": { - "type": "integer" - }, - "Patch": { - "type": "integer" - }, - "Tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Major", - "Minor", - "Tag", - "Patch", - "Build" - ] - }, - "PrechecksArgs": { - "type": "object", - "properties": { - "target-controller-version": { - "$ref": "#/definitions/Number" - } - }, - "additionalProperties": false, - "required": [ - "target-controller-version" - ] - }, - "ProcessRelations": { - "type": "object", - "properties": { - "controller-alias": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "controller-alias" - ] - }, - "SerializedModel": { - "type": "object", - "properties": { - "bytes": { - "type": "array", - "items": { - "type": "integer" - } - }, - "charms": { - "type": "array", - "items": { - "type": "string" - } - }, - "resources": { - "type": "array", - "items": { - "$ref": "#/definitions/SerializedModelResource" - } - }, - "tools": { - "type": "array", - "items": { - "$ref": "#/definitions/SerializedModelTools" - } - } - }, - "additionalProperties": false, - "required": [ - "bytes", - "charms", - "tools", - "resources" - ] - }, - "SerializedModelResource": { - "type": "object", - "properties": { - "application": { - "type": "string" - }, - "application-revision": { - "$ref": "#/definitions/SerializedModelResourceRevision" - }, - "charmstore-revision": { - "$ref": "#/definitions/SerializedModelResourceRevision" - }, - "name": { - "type": "string" - }, - "unit-revisions": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/SerializedModelResourceRevision" - } - } - } - }, - "additionalProperties": false, - "required": [ - "application", - "name", - "application-revision", - "charmstore-revision", - "unit-revisions" - ] - }, - "SerializedModelResourceRevision": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "fingerprint": { - "type": "string" - }, - "origin": { - "type": "string" - }, - "path": { - "type": "string" - }, - "revision": { - "type": "integer" - }, - "size": { - "type": "integer" - }, - "timestamp": { - "type": "string", - "format": "date-time" - }, - "type": { - "type": "string" - }, - "username": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "revision", - "type", - "path", - "description", - "origin", - "fingerprint", - "size", - "timestamp" - ] - }, - "SerializedModelTools": { - "type": "object", - "properties": { - "uri": { - "type": "string" - }, - "version": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "version", - "uri" - ] - }, - "SetMigrationPhaseArgs": { - "type": "object", - "properties": { - "phase": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "phase" - ] - }, - "SetMigrationStatusMessageArgs": { - "type": "object", - "properties": { - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message" - ] - }, - "StringResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - } - } - } - }, - { - "Name": "MigrationMinion", - "Description": "API implements the API required for the model migration\nmaster worker.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "Report": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/MinionReport" - } - }, - "description": "Report allows a migration minion to submit whether it succeeded or\nfailed for a specific migration phase." - }, - "Watch": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResult" - } - }, - "description": "Watch starts watching for status updates for a migration attempt\nfor the model. It will report when a migration starts and when its\nstatus changes (including when it finishes). An initial event will\nbe fired if there has ever been a migration attempt for the model.\n\nThe MigrationStatusWatcher facade must be used to receive events\nfrom the watcher." - } - }, - "definitions": { - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "MinionReport": { - "type": "object", - "properties": { - "migration-id": { - "type": "string" - }, - "phase": { - "type": "string" - }, - "success": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "migration-id", - "phase", - "success" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - } - } - } - }, - { - "Name": "MigrationStatusWatcher", - "Description": "", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "Next": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/MigrationStatus" - } - }, - "description": "Next returns when the status for a model migration for the\nassociated model changes. The current details for the active\nmigration are returned." - }, - "Stop": { - "type": "object", - "description": "Stop stops the watcher." - } - }, - "definitions": { - "MigrationStatus": { - "type": "object", - "properties": { - "attempt": { - "type": "integer" - }, - "migration-id": { - "type": "string" - }, - "phase": { - "type": "string" - }, - "source-api-addrs": { - "type": "array", - "items": { - "type": "string" - } - }, - "source-ca-cert": { - "type": "string" - }, - "target-api-addrs": { - "type": "array", - "items": { - "type": "string" - } - }, - "target-ca-cert": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "migration-id", - "attempt", - "phase", - "source-api-addrs", - "source-ca-cert", - "target-api-addrs", - "target-ca-cert" - ] - } - } - } - }, - { - "Name": "MigrationTarget", - "Description": "API implements the API required for the model migration\nmaster worker when communicating with the target controller.", - "Version": 1, - "AvailableTo": [ - "controller-user" - ], - "Schema": { - "type": "object", - "properties": { - "Abort": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ModelArgs" - } - }, - "description": "Abort removes the specified model from the database. It is an error to\nattempt to Abort a model that has a migration mode other than importing." - }, - "Activate": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ModelArgs" - } - }, - "description": "Activate sets the migration mode of the model to \"none\", meaning it\nis ready for use. It is an error to attempt to Abort a model that\nhas a migration mode other than importing." - }, - "AdoptResources": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/AdoptResourcesArgs" - } - }, - "description": "AdoptResources asks the cloud provider to update the controller\ntags for a model's resources. This prevents the resources from\nbeing destroyed if the source controller is destroyed after the\nmodel is migrated away." - }, - "CACert": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/BytesResult" - } - }, - "description": "CACert returns the certificate used to validate the state connection." - }, - "CheckMachines": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ModelArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "CheckMachines compares the machines in state with the ones reported\nby the provider and reports any discrepancies." - }, - "Import": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SerializedModel" - } - }, - "description": "Import takes a serialized Juju model, deserializes it, and\nrecreates it in the receiving controller." - }, - "LatestLogTime": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ModelArgs" - }, - "Result": { - "type": "string", - "format": "date-time" - } - }, - "description": "LatestLogTime returns the time of the most recent log record\nreceived by the logtransfer endpoint. This can be used as the start\npoint for streaming logs from the source if the transfer was\ninterrupted.\n\nFor performance reasons, not every time is tracked, so if the\ntarget controller died during the transfer the latest log time\nmight be up to 2 minutes earlier. If the transfer was interrupted\nin some other way (like the source controller going away or a\nnetwork partition) the time will be up-to-date.\n\nLog messages are assumed to be sent in time order (which is how\ndebug-log emits them). If that isn't the case then this mechanism\ncan't be used to avoid duplicates when logtransfer is restarted.\n\nReturns the zero time if no logs have been transferred." - }, - "Prechecks": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/MigrationModelInfo" - } - }, - "description": "Prechecks ensure that the target controller is ready to accept a\nmodel migration." - } - }, - "definitions": { - "AdoptResourcesArgs": { - "type": "object", - "properties": { - "model-tag": { - "type": "string" - }, - "source-controller-version": { - "$ref": "#/definitions/Number" - } - }, - "additionalProperties": false, - "required": [ - "model-tag", - "source-controller-version" - ] - }, - "BytesResult": { - "type": "object", - "properties": { - "result": { - "type": "array", - "items": { - "type": "integer" - } - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "MigrationModelInfo": { - "type": "object", - "properties": { - "agent-version": { - "$ref": "#/definitions/Number" - }, - "controller-agent-version": { - "$ref": "#/definitions/Number" - }, - "name": { - "type": "string" - }, - "owner-tag": { - "type": "string" - }, - "uuid": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "uuid", - "name", - "owner-tag", - "agent-version", - "controller-agent-version" - ] - }, - "ModelArgs": { - "type": "object", - "properties": { - "model-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "model-tag" - ] - }, - "Number": { - "type": "object", - "properties": { - "Build": { - "type": "integer" - }, - "Major": { - "type": "integer" - }, - "Minor": { - "type": "integer" - }, - "Patch": { - "type": "integer" - }, - "Tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Major", - "Minor", - "Tag", - "Patch", - "Build" - ] - }, - "SerializedModel": { - "type": "object", - "properties": { - "bytes": { - "type": "array", - "items": { - "type": "integer" - } - }, - "charms": { - "type": "array", - "items": { - "type": "string" - } - }, - "resources": { - "type": "array", - "items": { - "$ref": "#/definitions/SerializedModelResource" - } - }, - "tools": { - "type": "array", - "items": { - "$ref": "#/definitions/SerializedModelTools" - } - } - }, - "additionalProperties": false, - "required": [ - "bytes", - "charms", - "tools", - "resources" - ] - }, - "SerializedModelResource": { - "type": "object", - "properties": { - "application": { - "type": "string" - }, - "application-revision": { - "$ref": "#/definitions/SerializedModelResourceRevision" - }, - "charmstore-revision": { - "$ref": "#/definitions/SerializedModelResourceRevision" - }, - "name": { - "type": "string" - }, - "unit-revisions": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/SerializedModelResourceRevision" - } - } - } - }, - "additionalProperties": false, - "required": [ - "application", - "name", - "application-revision", - "charmstore-revision", - "unit-revisions" - ] - }, - "SerializedModelResourceRevision": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "fingerprint": { - "type": "string" - }, - "origin": { - "type": "string" - }, - "path": { - "type": "string" - }, - "revision": { - "type": "integer" - }, - "size": { - "type": "integer" - }, - "timestamp": { - "type": "string", - "format": "date-time" - }, - "type": { - "type": "string" - }, - "username": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "revision", - "type", - "path", - "description", - "origin", - "fingerprint", - "size", - "timestamp" - ] - }, - "SerializedModelTools": { - "type": "object", - "properties": { - "uri": { - "type": "string" - }, - "version": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "version", - "uri" - ] - } - } - } - }, - { - "Name": "ModelConfig", - "Description": "ModelConfigAPIV3 is currently the latest.", - "Version": 3, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "controller-user", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "GetModelConstraints": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/GetConstraintsResults" - } - }, - "description": "GetModelConstraints returns the constraints for the model." - }, - "ModelGet": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ModelConfigResults" - } - }, - "description": "ModelGet implements the server-side part of the\nmodel-config CLI command." - }, - "ModelSet": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ModelSet" - } - }, - "description": "ModelSet implements the server-side part of the\nset-model-config CLI command." - }, - "ModelUnset": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ModelUnset" - } - }, - "description": "ModelUnset implements the server-side part of the\nset-model-config CLI command." - }, - "SLALevel": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringResult" - } - }, - "description": "SLALevel returns the current sla level for the model." - }, - "Sequences": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ModelSequencesResult" - } - }, - "description": "Sequences returns the model's sequence names and next values." - }, - "SetModelConstraints": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetConstraints" - } - }, - "description": "SetModelConstraints sets the constraints for the model." - }, - "SetSLALevel": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ModelSLA" - } - }, - "description": "SetSLALevel sets the sla level on the model." - } - }, - "definitions": { - "ConfigValue": { - "type": "object", - "properties": { - "source": { - "type": "string" - }, - "value": { - "type": "object", - "additionalProperties": true - } - }, - "additionalProperties": false, - "required": [ - "value", - "source" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "GetConstraintsResults": { - "type": "object", - "properties": { - "constraints": { - "$ref": "#/definitions/Value" - } - }, - "additionalProperties": false, - "required": [ - "constraints" - ] - }, - "ModelConfigResults": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/ConfigValue" - } - } - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "ModelSLA": { - "type": "object", - "properties": { - "ModelSLAInfo": { - "$ref": "#/definitions/ModelSLAInfo" - }, - "creds": { - "type": "array", - "items": { - "type": "integer" - } - }, - "level": { - "type": "string" - }, - "owner": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "level", - "owner", - "ModelSLAInfo", - "creds" - ] - }, - "ModelSLAInfo": { - "type": "object", - "properties": { - "level": { - "type": "string" - }, - "owner": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "level", - "owner" - ] - }, - "ModelSequencesResult": { - "type": "object", - "properties": { - "sequences": { - "type": "object", - "patternProperties": { - ".*": { - "type": "integer" - } - } - } - }, - "additionalProperties": false, - "required": [ - "sequences" - ] - }, - "ModelSet": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "ModelUnset": { - "type": "object", - "properties": { - "keys": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "keys" - ] - }, - "SetConstraints": { - "type": "object", - "properties": { - "application": { - "type": "string" - }, - "constraints": { - "$ref": "#/definitions/Value" - } - }, - "additionalProperties": false, - "required": [ - "application", - "constraints" - ] - }, - "StringResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "Value": { - "type": "object", - "properties": { - "allocate-public-ip": { - "type": "boolean" - }, - "arch": { - "type": "string" - }, - "container": { - "type": "string" - }, - "cores": { - "type": "integer" - }, - "cpu-power": { - "type": "integer" - }, - "instance-role": { - "type": "string" - }, - "instance-type": { - "type": "string" - }, - "mem": { - "type": "integer" - }, - "root-disk": { - "type": "integer" - }, - "root-disk-source": { - "type": "string" - }, - "spaces": { - "type": "array", - "items": { - "type": "string" - } - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "virt-type": { - "type": "string" - }, - "zones": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - } - } - } - }, - { - "Name": "ModelGeneration", - "Description": "API is the concrete implementation of the API endpoint.", - "Version": 4, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "AbortBranch": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/BranchArg" - }, - "Result": { - "$ref": "#/definitions/ErrorResult" - } - }, - "description": "AbortBranch aborts the input branch, marking it complete. However no\nchanges are made applicable to the whole model. No units may be assigned\nto the branch when aborting." - }, - "AddBranch": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/BranchArg" - }, - "Result": { - "$ref": "#/definitions/ErrorResult" - } - }, - "description": "AddBranch adds a new branch with the input name to the model." - }, - "BranchInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/BranchInfoArgs" - }, - "Result": { - "$ref": "#/definitions/BranchResults" - } - }, - "description": "BranchInfo will return details of branch identified by the input argument,\nincluding units on the branch and the configuration disjoint with the\nmaster generation.\nAn error is returned if no in-flight branch matching in input is found." - }, - "CommitBranch": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/BranchArg" - }, - "Result": { - "$ref": "#/definitions/IntResult" - } - }, - "description": "CommitBranch commits the input branch, making its changes applicable to\nthe whole model and marking it complete." - }, - "HasActiveBranch": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/BranchArg" - }, - "Result": { - "$ref": "#/definitions/BoolResult" - } - }, - "description": "HasActiveBranch returns a true result if the input model has an \"in-flight\"\nbranch matching the input name." - }, - "ListCommits": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/BranchResults" - } - }, - "description": "ListCommits will return the commits, hence only branches with generation_id higher than 0" - }, - "ShowCommit": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/GenerationId" - }, - "Result": { - "$ref": "#/definitions/GenerationResult" - } - }, - "description": "ShowCommit will return details a commit given by its generationId\nAn error is returned if either no branch can be found corresponding to the generation id.\nOr the generation id given is below 1." - }, - "TrackBranch": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/BranchTrackArg" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "TrackBranch marks the input units and/or applications as tracking the input\nbranch, causing them to realise changes made under that branch." - } - }, - "definitions": { - "BoolResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "BranchArg": { - "type": "object", - "properties": { - "branch": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "branch" - ] - }, - "BranchInfoArgs": { - "type": "object", - "properties": { - "branches": { - "type": "array", - "items": { - "type": "string" - } - }, - "detailed": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "branches", - "detailed" - ] - }, - "BranchResults": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "generations": { - "type": "array", - "items": { - "$ref": "#/definitions/Generation" - } - } - }, - "additionalProperties": false, - "required": [ - "generations" - ] - }, - "BranchTrackArg": { - "type": "object", - "properties": { - "branch": { - "type": "string" - }, - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } - }, - "num-units": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "branch", - "entities" - ] - }, - "Entity": { - "type": "object", - "properties": { - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "Generation": { - "type": "object", - "properties": { - "applications": { - "type": "array", - "items": { - "$ref": "#/definitions/GenerationApplication" - } - }, - "branch": { - "type": "string" - }, - "completed": { - "type": "integer" - }, - "completed-by": { - "type": "string" - }, - "created": { - "type": "integer" - }, - "created-by": { - "type": "string" - }, - "generation-id": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "branch", - "created", - "created-by", - "applications" - ] - }, - "GenerationApplication": { - "type": "object", - "properties": { - "application": { - "type": "string" - }, - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "pending": { - "type": "array", - "items": { - "type": "string" - } - }, - "progress": { - "type": "string" - }, - "tracking": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "application", - "progress", - "config" - ] - }, - "GenerationId": { - "type": "object", - "properties": { - "generation-id": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "generation-id" - ] - }, - "GenerationResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "generation": { - "$ref": "#/definitions/Generation" - } - }, - "additionalProperties": false, - "required": [ - "generation" - ] - }, - "IntResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - } - } - } - }, - { - "Name": "ModelManager", - "Description": "ModelManagerAPI implements the model manager interface and is\nthe concrete implementation of the api end point.", - "Version": 9, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "controller-user" - ], - "Schema": { - "type": "object", - "properties": { - "ChangeModelCredential": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ChangeModelCredentialsParams" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "ChangeModelCredential changes cloud credential reference for models.\nThese new cloud credentials must already exist on the controller." - }, - "CreateModel": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ModelCreateArgs" - }, - "Result": { - "$ref": "#/definitions/ModelInfo" - } - }, - "description": "CreateModel creates a new model using the account and\nmodel config specified in the args." - }, - "DestroyModels": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/DestroyModelsParams" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "DestroyModels will try to destroy the specified models.\nIf there is a block on destruction, this method will return an error.\nFrom ModelManager v7 onwards, DestroyModels gains 'force' and 'max-wait' parameters." - }, - "DumpModels": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/DumpModelRequest" - }, - "Result": { - "$ref": "#/definitions/StringResults" - } - }, - "description": "DumpModels will export the models into the database agnostic\nrepresentation. The user needs to either be a controller admin, or have\nadmin privileges on the model itself." - }, - "DumpModelsDB": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/MapResults" - } - }, - "description": "DumpModelsDB will gather all documents from all model collections\nfor the specified model. The map result contains a map of collection\nnames to lists of documents represented as maps." - }, - "ListModelSummaries": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ModelSummariesRequest" - }, - "Result": { - "$ref": "#/definitions/ModelSummaryResults" - } - }, - "description": "ListModelSummaries returns models that the specified user\nhas access to in the current server. Controller admins (superuser)\ncan list models for any user. Other users\ncan only ask about their own models." - }, - "ListModels": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entity" - }, - "Result": { - "$ref": "#/definitions/UserModelList" - } - }, - "description": "ListModels returns the models that the specified user\nhas access to in the current server. Controller admins (superuser)\ncan list models for any user. Other users\ncan only ask about their own models." - }, - "ModelDefaultsForClouds": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ModelDefaultsResults" - } - }, - "description": "ModelDefaultsForClouds returns the default config values for the specified\nclouds." - }, - "ModelInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ModelInfoResults" - } - }, - "description": "ModelInfo returns information about the specified models." - }, - "ModelStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ModelStatusResults" - } - }, - "description": "ModelStatus returns a summary of the model." - }, - "ModifyModelAccess": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ModifyModelAccessRequest" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "ModifyModelAccess changes the model access granted to users." - }, - "SetModelDefaults": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetModelDefaults" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetModelDefaults writes new values for the specified default model settings." - }, - "UnsetModelDefaults": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/UnsetModelDefaults" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "UnsetModelDefaults removes the specified default model settings." - } - }, - "definitions": { - "ChangeModelCredentialParams": { - "type": "object", - "properties": { - "credential-tag": { - "type": "string" - }, - "model-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "model-tag", - "credential-tag" - ] - }, - "ChangeModelCredentialsParams": { - "type": "object", - "properties": { - "model-credentials": { - "type": "array", - "items": { - "$ref": "#/definitions/ChangeModelCredentialParams" - } - } - }, - "additionalProperties": false, - "required": [ - "model-credentials" - ] - }, - "DestroyModelParams": { - "type": "object", - "properties": { - "destroy-storage": { - "type": "boolean" - }, - "force": { - "type": "boolean" - }, - "max-wait": { - "type": "integer" - }, - "model-tag": { - "type": "string" - }, - "timeout": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "model-tag" - ] - }, - "DestroyModelsParams": { - "type": "object", - "properties": { - "models": { - "type": "array", - "items": { - "$ref": "#/definitions/DestroyModelParams" - } - } - }, - "additionalProperties": false, - "required": [ - "models" - ] - }, - "DumpModelRequest": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } - }, - "simplified": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "entities", - "simplified" - ] - }, - "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" - ] - }, - "EntityStatus": { - "type": "object", - "properties": { - "data": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "info": { - "type": "string" - }, - "since": { - "type": "string", - "format": "date-time" - }, - "status": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "status", - "info", - "since" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "MachineHardware": { - "type": "object", - "properties": { - "arch": { - "type": "string" - }, - "availability-zone": { - "type": "string" - }, - "cores": { - "type": "integer" - }, - "cpu-power": { - "type": "integer" - }, - "mem": { - "type": "integer" - }, - "root-disk": { - "type": "integer" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "virt-type": { - "type": "string" - } - }, - "additionalProperties": false - }, - "MapResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "MapResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/MapResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "Model": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "owner-tag": { - "type": "string" - }, - "type": { - "type": "string" - }, - "uuid": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "uuid", - "type", - "owner-tag" - ] - }, - "ModelApplicationInfo": { - "type": "object", - "properties": { - "name": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name" - ] - }, - "ModelCreateArgs": { - "type": "object", - "properties": { - "cloud-tag": { - "type": "string" - }, - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "credential": { - "type": "string" - }, - "name": { - "type": "string" - }, - "owner-tag": { - "type": "string" - }, - "region": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "owner-tag" - ] - }, - "ModelDefaultValues": { - "type": "object", - "properties": { - "cloud-region": { - "type": "string" - }, - "cloud-tag": { - "type": "string" - }, - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "ModelDefaults": { - "type": "object", - "properties": { - "controller": { - "type": "object", - "additionalProperties": true - }, - "default": { - "type": "object", - "additionalProperties": true - }, - "regions": { - "type": "array", - "items": { - "$ref": "#/definitions/RegionDefaults" - } - } - }, - "additionalProperties": false - }, - "ModelDefaultsResult": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/ModelDefaults" - } - } - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "ModelDefaultsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelDefaultsResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ModelEntityCount": { - "type": "object", - "properties": { - "count": { - "type": "integer" - }, - "entity": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "entity", - "count" - ] - }, - "ModelFilesystemInfo": { - "type": "object", - "properties": { - "detachable": { - "type": "boolean" - }, - "id": { - "type": "string" - }, - "message": { - "type": "string" - }, - "provider-id": { - "type": "string" - }, - "status": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "id" - ] - }, - "ModelInfo": { - "type": "object", - "properties": { - "agent-version": { - "$ref": "#/definitions/Number" - }, - "cloud-credential-tag": { - "type": "string" - }, - "cloud-credential-validity": { - "type": "boolean" - }, - "cloud-region": { - "type": "string" - }, - "cloud-tag": { - "type": "string" - }, - "controller-uuid": { - "type": "string" - }, - "default-base": { - "type": "string" - }, - "default-series": { - "type": "string" - }, - "is-controller": { - "type": "boolean" - }, - "life": { - "type": "string" - }, - "machines": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelMachineInfo" - } - }, - "migration": { - "$ref": "#/definitions/ModelMigrationStatus" - }, - "name": { - "type": "string" - }, - "owner-tag": { - "type": "string" - }, - "provider-type": { - "type": "string" - }, - "secret-backends": { - "type": "array", - "items": { - "$ref": "#/definitions/SecretBackendResult" - } - }, - "sla": { - "$ref": "#/definitions/ModelSLAInfo" - }, - "status": { - "$ref": "#/definitions/EntityStatus" - }, - "supported-features": { - "type": "array", - "items": { - "$ref": "#/definitions/SupportedFeature" - } - }, - "type": { - "type": "string" - }, - "users": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelUserInfo" - } - }, - "uuid": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "type", - "uuid", - "controller-uuid", - "is-controller", - "cloud-tag", - "owner-tag", - "life", - "users", - "machines", - "secret-backends", - "sla", - "agent-version" - ] - }, - "ModelInfoResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/ModelInfo" - } - }, - "additionalProperties": false - }, - "ModelInfoResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelInfoResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ModelMachineInfo": { - "type": "object", - "properties": { - "display-name": { - "type": "string" - }, - "ha-primary": { - "type": "boolean" - }, - "hardware": { - "$ref": "#/definitions/MachineHardware" - }, - "has-vote": { - "type": "boolean" - }, - "id": { - "type": "string" - }, - "instance-id": { - "type": "string" - }, - "message": { - "type": "string" - }, - "status": { - "type": "string" - }, - "wants-vote": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "id" - ] - }, - "ModelMigrationStatus": { - "type": "object", - "properties": { - "end": { - "type": "string", - "format": "date-time" - }, - "start": { - "type": "string", - "format": "date-time" - }, - "status": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "status", - "start" - ] - }, - "ModelSLAInfo": { - "type": "object", - "properties": { - "level": { - "type": "string" - }, - "owner": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "level", - "owner" - ] - }, - "ModelStatus": { - "type": "object", - "properties": { - "application-count": { - "type": "integer" - }, - "applications": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelApplicationInfo" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "filesystems": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelFilesystemInfo" - } - }, - "hosted-machine-count": { - "type": "integer" - }, - "life": { - "type": "string" - }, - "machines": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelMachineInfo" - } - }, - "model-tag": { - "type": "string" - }, - "owner-tag": { - "type": "string" - }, - "type": { - "type": "string" - }, - "unit-count": { - "type": "integer" - }, - "volumes": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelVolumeInfo" - } - } - }, - "additionalProperties": false, - "required": [ - "model-tag", - "life", - "type", - "hosted-machine-count", - "application-count", - "unit-count", - "owner-tag" - ] - }, - "ModelStatusResults": { - "type": "object", - "properties": { - "models": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelStatus" - } - } - }, - "additionalProperties": false, - "required": [ - "models" - ] - }, - "ModelSummariesRequest": { - "type": "object", - "properties": { - "all": { - "type": "boolean" - }, - "user-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "user-tag" - ] - }, - "ModelSummary": { - "type": "object", - "properties": { - "agent-version": { - "$ref": "#/definitions/Number" - }, - "cloud-credential-tag": { - "type": "string" - }, - "cloud-region": { - "type": "string" - }, - "cloud-tag": { - "type": "string" - }, - "controller-uuid": { - "type": "string" - }, - "counts": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelEntityCount" - } - }, - "default-series": { - "type": "string" - }, - "is-controller": { - "type": "boolean" - }, - "last-connection": { - "type": "string", - "format": "date-time" - }, - "life": { - "type": "string" - }, - "migration": { - "$ref": "#/definitions/ModelMigrationStatus" - }, - "name": { - "type": "string" - }, - "owner-tag": { - "type": "string" - }, - "provider-type": { - "type": "string" - }, - "sla": { - "$ref": "#/definitions/ModelSLAInfo" - }, - "status": { - "$ref": "#/definitions/EntityStatus" - }, - "type": { - "type": "string" - }, - "user-access": { - "type": "string" - }, - "uuid": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "uuid", - "type", - "controller-uuid", - "is-controller", - "cloud-tag", - "owner-tag", - "life", - "user-access", - "last-connection", - "counts", - "sla", - "agent-version" - ] - }, - "ModelSummaryResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/ModelSummary" - } - }, - "additionalProperties": false - }, - "ModelSummaryResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelSummaryResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ModelUnsetKeys": { - "type": "object", - "properties": { - "cloud-region": { - "type": "string" - }, - "cloud-tag": { - "type": "string" - }, - "keys": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "keys" - ] - }, - "ModelUserInfo": { - "type": "object", - "properties": { - "access": { - "type": "string" - }, - "display-name": { - "type": "string" - }, - "last-connection": { - "type": "string", - "format": "date-time" - }, - "model-tag": { - "type": "string" - }, - "user": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "model-tag", - "user", - "display-name", - "last-connection", - "access" - ] - }, - "ModelVolumeInfo": { - "type": "object", - "properties": { - "detachable": { - "type": "boolean" - }, - "id": { - "type": "string" - }, - "message": { - "type": "string" - }, - "provider-id": { - "type": "string" - }, - "status": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "id" - ] - }, - "ModifyModelAccess": { - "type": "object", - "properties": { - "access": { - "type": "string" - }, - "action": { - "type": "string" - }, - "model-tag": { - "type": "string" - }, - "user-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "user-tag", - "action", - "access", - "model-tag" - ] - }, - "ModifyModelAccessRequest": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "$ref": "#/definitions/ModifyModelAccess" - } - } - }, - "additionalProperties": false, - "required": [ - "changes" - ] - }, - "Number": { - "type": "object", - "properties": { - "Build": { - "type": "integer" - }, - "Major": { - "type": "integer" - }, - "Minor": { - "type": "integer" - }, - "Patch": { - "type": "integer" - }, - "Tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Major", - "Minor", - "Tag", - "Patch", - "Build" - ] - }, - "RegionDefaults": { - "type": "object", - "properties": { - "region-name": { - "type": "string" - }, - "value": { - "type": "object", - "additionalProperties": true - } - }, - "additionalProperties": false, - "required": [ - "region-name", - "value" - ] - }, - "SecretBackend": { - "type": "object", - "properties": { - "backend-type": { - "type": "string" - }, - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "name": { - "type": "string" - }, - "token-rotate-interval": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "name", - "backend-type", - "config" - ] - }, - "SecretBackendResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "id": { - "type": "string" - }, - "message": { - "type": "string" - }, - "num-secrets": { - "type": "integer" - }, - "result": { - "$ref": "#/definitions/SecretBackend" - }, - "status": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "result", - "id", - "num-secrets", - "status" - ] - }, - "SetModelDefaults": { - "type": "object", - "properties": { - "config": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelDefaultValues" - } - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "StringResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "StringResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "SupportedFeature": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "name": { - "type": "string" - }, - "version": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "description" - ] - }, - "UnsetModelDefaults": { - "type": "object", - "properties": { - "keys": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelUnsetKeys" - } - } - }, - "additionalProperties": false, - "required": [ - "keys" - ] - }, - "UserModel": { - "type": "object", - "properties": { - "last-connection": { - "type": "string", - "format": "date-time" - }, - "model": { - "$ref": "#/definitions/Model" - } - }, - "additionalProperties": false, - "required": [ - "model", - "last-connection" - ] - }, - "UserModelList": { - "type": "object", - "properties": { - "user-models": { - "type": "array", - "items": { - "$ref": "#/definitions/UserModel" - } - } - }, - "additionalProperties": false, - "required": [ - "user-models" - ] - } - } - } - }, - { - "Name": "ModelSummaryWatcher", - "Description": "SrvModelSummaryWatcher defines the API methods on a ModelSummaryWatcher.", - "Version": 1, - "AvailableTo": [ - "controller-user" - ], - "Schema": { - "type": "object", - "properties": { - "Next": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/SummaryWatcherNextResults" - } - }, - "description": "Next will return the current state of everything on the first call\nand subsequent calls will return just those model summaries that have\nchanged." - }, - "Stop": { - "type": "object", - "description": "Stop stops the watcher." - } - }, - "definitions": { - "ModelAbstract": { - "type": "object", - "properties": { - "admins": { - "type": "array", - "items": { - "type": "string" - } - }, - "annotations": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "cloud": { - "type": "string" - }, - "controller": { - "type": "string" - }, - "credential": { - "type": "string" - }, - "messages": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelSummaryMessage" - } - }, - "name": { - "type": "string" - }, - "region": { - "type": "string" - }, - "removed": { - "type": "boolean" - }, - "size": { - "$ref": "#/definitions/ModelSummarySize" - }, - "status": { - "type": "string" - }, - "uuid": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "uuid" - ] - }, - "ModelSummaryMessage": { - "type": "object", - "properties": { - "agent": { - "type": "string" - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "agent", - "message" - ] - }, - "ModelSummarySize": { - "type": "object", - "properties": { - "applications": { - "type": "integer" - }, - "containers": { - "type": "integer" - }, - "machines": { - "type": "integer" - }, - "relations": { - "type": "integer" - }, - "units": { - "type": "integer" - } - }, - "additionalProperties": false - }, - "SummaryWatcherNextResults": { - "type": "object", - "properties": { - "models": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelAbstract" - } - } - }, - "additionalProperties": false, - "required": [ - "models" - ] - } - } - } - }, - { - "Name": "ModelUpgrader", - "Description": "ModelUpgraderAPI implements the model upgrader interface and is\nthe concrete implementation of the api end point.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "controller-user" - ], - "Schema": { - "type": "object", - "properties": { - "AbortModelUpgrade": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ModelParam" - } - }, - "description": "AbortModelUpgrade aborts and archives the model upgrade\nsynchronisation record, if any." - }, - "UpgradeModel": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/UpgradeModelParams" - }, - "Result": { - "$ref": "#/definitions/UpgradeModelResult" - } - }, - "description": "UpgradeModel upgrades a model." - } - }, - "definitions": { - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ModelParam": { - "type": "object", - "properties": { - "model-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "model-tag" - ] - }, - "Number": { - "type": "object", - "properties": { - "Build": { - "type": "integer" - }, - "Major": { - "type": "integer" - }, - "Minor": { - "type": "integer" - }, - "Patch": { - "type": "integer" - }, - "Tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Major", - "Minor", - "Tag", - "Patch", - "Build" - ] - }, - "UpgradeModelParams": { - "type": "object", - "properties": { - "agent-stream": { - "type": "string" - }, - "dry-run": { - "type": "boolean" - }, - "ignore-agent-versions": { - "type": "boolean" - }, - "model-tag": { - "type": "string" - }, - "target-version": { - "$ref": "#/definitions/Number" - } - }, - "additionalProperties": false, - "required": [ - "model-tag", - "target-version" - ] - }, - "UpgradeModelResult": { - "type": "object", - "properties": { - "chosen-version": { - "$ref": "#/definitions/Number" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "chosen-version" - ] - } - } - } - }, - { - "Name": "NotifyWatcher", - "Description": "srvNotifyWatcher defines the API access to methods on a NotifyWatcher.\nEach client has its own current set of watchers, stored in resources.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "controller-user", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "Next": { - "type": "object", - "description": "Next returns when a change has occurred to the\nentity being watched since the most recent call to Next\nor the Watch call that created the NotifyWatcher." - }, - "Stop": { - "type": "object", - "description": "Stop stops the watcher." - } - } - } - }, - { - "Name": "OfferStatusWatcher", - "Description": "srvOfferStatusWatcher defines the API wrapping a crossmodelrelations.OfferStatusWatcher.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "Next": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/OfferStatusWatchResult" - } - }, - "description": "Next returns when a change has occurred to an entity of the\ncollection being watched since the most recent call to Next\nor the Watch call that created the srvOfferStatusWatcher." - }, - "Stop": { - "type": "object", - "description": "Stop stops the watcher." - } - }, - "definitions": { - "EntityStatus": { - "type": "object", - "properties": { - "data": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "info": { - "type": "string" - }, - "since": { - "type": "string", - "format": "date-time" - }, - "status": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "status", - "info", - "since" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "OfferStatusChange": { - "type": "object", - "properties": { - "offer-name": { - "type": "string" - }, - "status": { - "$ref": "#/definitions/EntityStatus" - } - }, - "additionalProperties": false, - "required": [ - "offer-name", - "status" - ] - }, - "OfferStatusWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "$ref": "#/definitions/OfferStatusChange" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id", - "changes" - ] - } - } - } - }, - { - "Name": "Payloads", - "Description": "API serves payload-specific API methods.", - "Version": 1, - "AvailableTo": [ - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "List": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/PayloadListArgs" - }, - "Result": { - "$ref": "#/definitions/PayloadListResults" - } - }, - "description": "List builds the list of payloads being tracked for\nthe given unit and IDs. If no IDs are provided then all tracked\npayloads for the unit are returned." - } - }, - "definitions": { - "Payload": { - "type": "object", - "properties": { - "class": { - "type": "string" - }, - "id": { - "type": "string" - }, - "labels": { - "type": "array", - "items": { - "type": "string" - } - }, - "machine": { - "type": "string" - }, - "status": { - "type": "string" - }, - "type": { - "type": "string" - }, - "unit": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "class", - "type", - "id", - "status", - "labels", - "unit", - "machine" - ] - }, - "PayloadListArgs": { - "type": "object", - "properties": { - "patterns": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "patterns" - ] - }, - "PayloadListResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/Payload" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - } - } - } - }, - { - "Name": "PayloadsHookContext", - "Description": "UnitFacade serves payload-specific API methods.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "List": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/PayloadResults" - } - }, - "description": "List builds the list of payload being tracked for\nthe given unit and IDs. If no IDs are provided then all tracked\npayloads for the unit are returned." - }, - "LookUp": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/LookUpPayloadArgs" - }, - "Result": { - "$ref": "#/definitions/PayloadResults" - } - }, - "description": "LookUp identifies the payload with the provided name and raw ID." - }, - "SetStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetPayloadStatusArgs" - }, - "Result": { - "$ref": "#/definitions/PayloadResults" - } - }, - "description": "SetStatus sets the raw status of a payload." - }, - "Track": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/TrackPayloadArgs" - }, - "Result": { - "$ref": "#/definitions/PayloadResults" - } - }, - "description": "Track stores a payload to be tracked in state." - }, - "Untrack": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/PayloadResults" - } - }, - "description": "Untrack marks the identified payload as no longer being tracked." - } - }, - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "LookUpPayloadArg": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "id" - ] - }, - "LookUpPayloadArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/LookUpPayloadArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "Payload": { - "type": "object", - "properties": { - "class": { - "type": "string" - }, - "id": { - "type": "string" - }, - "labels": { - "type": "array", - "items": { - "type": "string" - } - }, - "machine": { - "type": "string" - }, - "status": { - "type": "string" - }, - "type": { - "type": "string" - }, - "unit": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "class", - "type", - "id", - "status", - "labels", - "unit", - "machine" - ] - }, - "PayloadResult": { - "type": "object", - "properties": { - "Entity": { - "$ref": "#/definitions/Entity" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "not-found": { - "type": "boolean" - }, - "payload": { - "$ref": "#/definitions/Payload" - }, - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "Entity", - "payload", - "not-found" - ] - }, - "PayloadResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/PayloadResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "SetPayloadStatusArg": { - "type": "object", - "properties": { - "Entity": { - "$ref": "#/definitions/Entity" - }, - "status": { - "type": "string" - }, - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "Entity", - "status" - ] - }, - "SetPayloadStatusArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/SetPayloadStatusArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "TrackPayloadArgs": { - "type": "object", - "properties": { - "payloads": { - "type": "array", - "items": { - "$ref": "#/definitions/Payload" - } - } - }, - "additionalProperties": false, - "required": [ - "payloads" - ] - } - } - } - }, - { - "Name": "Pinger", - "Description": "pinger describes a resource that can be pinged and stopped.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "controller-user", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "Ping": { - "type": "object" - }, - "Stop": { - "type": "object" - } - } - } - }, - { - "Name": "Provisioner", - "Description": "ProvisionerAPIV11 provides v10 of the provisioner facade.\nIt relies on agent-set origin when calling SetHostMachineNetworkConfig.", - "Version": 11, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent" - ], - "Schema": { - "type": "object", - "properties": { - "APIAddresses": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsResult" - } - }, - "description": "APIAddresses returns the list of addresses used to connect to the API." - }, - "APIHostPorts": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/APIHostPortsResult" - } - }, - "description": "APIHostPorts returns the API server addresses." - }, - "AvailabilityZone": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringResults" - } - }, - "description": "AvailabilityZone returns a provider-specific availability zone for each given machine entity" - }, - "CACert": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/BytesResult" - } - }, - "description": "CACert returns the certificate used to validate the state connection." - }, - "Constraints": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ConstraintsResults" - } - }, - "description": "Constraints returns the constraints for each given machine entity." - }, - "ContainerConfig": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ContainerConfig" - } - }, - "description": "ContainerConfig returns information from the model config that is\nneeded for container cloud-init." - }, - "ContainerManagerConfig": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ContainerManagerConfigParams" - }, - "Result": { - "$ref": "#/definitions/ContainerManagerConfig" - } - }, - "description": "ContainerManagerConfig returns information from the model config that is\nneeded for configuring the container manager." - }, - "ControllerAPIInfoForModels": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ControllerAPIInfoResults" - } - }, - "description": "ControllerAPIInfoForModels returns the controller api connection details for the specified models." - }, - "ControllerConfig": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ControllerConfigResult" - } - }, - "description": "ControllerConfig returns the controller's configuration." - }, - "DistributionGroup": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/DistributionGroupResults" - } - }, - "description": "DistributionGroup returns, for each given machine entity,\na slice of instance.Ids that belong to the same distribution\ngroup as that machine. This information may be used to\ndistribute instances for high availability." - }, - "DistributionGroupByMachineId": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsResults" - } - }, - "description": "DistributionGroupByMachineId returns, for each given machine entity,\na slice of machine.Ids that belong to the same distribution\ngroup as that machine. This information may be used to\ndistribute instances for high availability." - }, - "EnsureDead": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "EnsureDead calls EnsureDead on each given entity from state. It\nwill fail if the entity is not present. If it's Alive, nothing will\nhappen (see state/EnsureDead() for units or machines)." - }, - "FindTools": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/FindToolsParams" - }, - "Result": { - "$ref": "#/definitions/FindToolsResult" - } - }, - "description": "FindTools returns a List containing all tools matching the given parameters." - }, - "GetContainerInterfaceInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/MachineNetworkConfigResults" - } - }, - "description": "GetContainerInterfaceInfo returns information to configure networking for a\ncontainer. It accepts container tags as arguments." - }, - "GetContainerProfileInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ContainerProfileResults" - } - }, - "description": "GetContainerProfileInfo returns information to configure a lxd profile(s) for a\ncontainer based on the charms deployed to the container. It accepts container\ntags as arguments. Unlike machineLXDProfileNames which has the environ\nwrite the lxd profiles and returns the names of profiles already written." - }, - "HostChangesForContainers": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/HostNetworkChangeResults" - } - }, - "description": "HostChangesForContainers returns the set of changes that need to be done\nto the host machine to prepare it for the containers to be created.\nPass in a list of the containers that you want the changes for." - }, - "InstanceId": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringResults" - } - }, - "description": "InstanceId returns the provider specific instance id for each given\nmachine or an CodeNotProvisioned error, if not set." - }, - "InstanceStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StatusResults" - } - }, - "description": "InstanceStatus returns the instance status for each given entity.\nOnly machine tags are accepted." - }, - "KeepInstance": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/BoolResults" - } - }, - "description": "KeepInstance returns the keep-instance value for each given machine entity." - }, - "Life": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/LifeResults" - } - }, - "description": "Life returns the life status of every supplied entity, where available." - }, - "MachinesWithTransientErrors": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StatusResults" - } - }, - "description": "MachinesWithTransientErrors returns status data for machines with provisioning\nerrors which are transient." - }, - "MarkMachinesForRemoval": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "MarkMachinesForRemoval indicates that the specified machines are\nready to have any provider-level resources cleaned up and then be\nremoved." - }, - "ModelConfig": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ModelConfigResult" - } - }, - "description": "ModelConfig returns the current model's configuration." - }, - "ModelUUID": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringResult" - } - }, - "description": "ModelUUID returns the model UUID that the current connection is for." - }, - "PrepareContainerInterfaceInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/MachineNetworkConfigResults" - } - }, - "description": "PrepareContainerInterfaceInfo allocates an address and returns information to\nconfigure networking for a container. It accepts container tags as arguments." - }, - "ProvisioningInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ProvisioningInfoResults" - } - }, - "description": "ProvisioningInfo returns the provisioning information for each given machine entity.\nIt supports all positive space constraints." - }, - "ReleaseContainerAddresses": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "ReleaseContainerAddresses finds addresses allocated to a container and marks\nthem as Dead, to be released and removed. It accepts container tags as\narguments." - }, - "Remove": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "Remove removes every given entity from state, calling EnsureDead\nfirst, then Remove. It will fail if the entity is not present." - }, - "SetCharmProfiles": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetProfileArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetCharmProfiles records the given slice of charm profile names." - }, - "SetHostMachineNetworkConfig": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetMachineNetworkConfig" - } - } - }, - "SetInstanceInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/InstancesInfo" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetInstanceInfo sets the provider specific machine id, nonce,\nmetadata and network info for each given machine. Once set, the\ninstance id cannot be changed." - }, - "SetInstanceStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetStatus" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetInstanceStatus updates the instance status for each given\nentity. Only machine tags are accepted." - }, - "SetModificationStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetStatus" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetModificationStatus updates the instance whilst changes are occurring. This\nis different from SetStatus and SetInstanceStatus, by the fact this holds\ninformation about the ongoing changes that are happening to instances.\nConsider LXD Profile updates that can modify a instance, but may not cause\nthe instance to be placed into a error state. This modification status\nserves the purpose of highlighting that to the operator.\nOnly machine tags are accepted." - }, - "SetObservedNetworkConfig": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetMachineNetworkConfig" - } - }, - "description": "SetObservedNetworkConfig reads the network config for the machine\nidentified by the input args.\nThis config is merged with the new network config supplied in the\nsame args and updated if it has changed." - }, - "SetPasswords": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/EntityPasswords" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetPasswords sets the given password for each supplied entity, if possible." - }, - "SetStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetStatus" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetStatus sets the status of each given entity." - }, - "SetSupportedContainers": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/MachineContainersParams" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetSupportedContainers updates the list of containers supported by the machines passed in args." - }, - "Status": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StatusResults" - } - }, - "description": "Status returns the status of each given entity." - }, - "SupportedContainers": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/MachineContainerResults" - } - }, - "description": "SupportedContainers returns the list of containers supported by the machines passed in args." - }, - "Tools": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ToolsResults" - } - }, - "description": "Tools finds the tools necessary for the given agents." - }, - "WatchAPIHostPorts": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResult" - } - }, - "description": "WatchAPIHostPorts watches the API server addresses." - }, - "WatchAllContainers": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/WatchContainers" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - }, - "description": "WatchAllContainers starts a StringsWatcher to watch all containers deployed to\nany machine passed in args." - }, - "WatchContainers": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/WatchContainers" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - }, - "description": "WatchContainers starts a StringsWatcher to watch containers deployed to\nany machine passed in args." - }, - "WatchForModelConfigChanges": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResult" - } - }, - "description": "WatchForModelConfigChanges returns a NotifyWatcher that observes\nchanges to the model configuration.\nNote that although the NotifyWatchResult contains an Error field,\nit's not used because we are only returning a single watcher,\nso we use the regular error return." - }, - "WatchMachineErrorRetry": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResult" - } - }, - "description": "WatchMachineErrorRetry returns a NotifyWatcher that notifies when\nthe provisioner should retry provisioning machines with transient errors." - }, - "WatchModelMachineStartTimes": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsWatchResult" - } - }, - "description": "WatchModelMachineStartTimes watches the non-container machines in the model\nfor changes to the Life or AgentStartTime fields and reports them as a batch." - }, - "WatchModelMachines": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsWatchResult" - } - }, - "description": "WatchModelMachines returns a StringsWatcher that notifies of\nchanges to the life cycles of the top level machines in the current\nmodel." - } - }, - "definitions": { - "APIHostPortsResult": { - "type": "object", - "properties": { - "servers": { - "type": "array", - "items": { - "type": "array", - "items": { - "$ref": "#/definitions/HostPort" - } - } - } - }, - "additionalProperties": false, - "required": [ - "servers" - ] - }, - "Address": { - "type": "object", - "properties": { - "cidr": { - "type": "string" - }, - "config-type": { - "type": "string" - }, - "is-secondary": { - "type": "boolean" - }, - "scope": { - "type": "string" - }, - "space-id": { - "type": "string" - }, - "space-name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "value", - "type", - "scope" - ] - }, - "Base": { - "type": "object", - "properties": { - "channel": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "channel" - ] - }, - "Binary": { - "type": "object", - "properties": { - "Arch": { - "type": "string" - }, - "Build": { - "type": "integer" - }, - "Major": { - "type": "integer" - }, - "Minor": { - "type": "integer" - }, - "Number": { - "$ref": "#/definitions/Number" - }, - "Patch": { - "type": "integer" - }, - "Release": { - "type": "string" - }, - "Tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Major", - "Minor", - "Tag", - "Patch", - "Build", - "Number", - "Release", - "Arch" - ] - }, - "BoolResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "BoolResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/BoolResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "BytesResult": { - "type": "object", - "properties": { - "result": { - "type": "array", - "items": { - "type": "integer" - } - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "CharmLXDProfile": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "description": { - "type": "string" - }, - "devices": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - } - } - } - }, - "additionalProperties": false, - "required": [ - "config", - "description", - "devices" - ] - }, - "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" - }, - "source": { - "type": "string" - }, - "stream": { - "type": "string" - }, - "version": { - "type": "string" - }, - "virt-type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "image-id", - "region", - "version", - "arch", - "source", - "priority" - ] - }, - "ConstraintsResult": { - "type": "object", - "properties": { - "constraints": { - "$ref": "#/definitions/Value" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "constraints" - ] - }, - "ConstraintsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ConstraintsResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ContainerConfig": { - "type": "object", - "properties": { - "UpdateBehavior": { - "$ref": "#/definitions/UpdateBehavior" - }, - "apt-mirror": { - "type": "string" - }, - "apt-proxy": { - "$ref": "#/definitions/Settings" - }, - "authorized-keys": { - "type": "string" - }, - "cloudinit-userdata": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "container-inherit-properties": { - "type": "string" - }, - "juju-proxy": { - "$ref": "#/definitions/Settings" - }, - "legacy-proxy": { - "$ref": "#/definitions/Settings" - }, - "provider-type": { - "type": "string" - }, - "snap-proxy": { - "$ref": "#/definitions/Settings" - }, - "snap-store-assertions": { - "type": "string" - }, - "snap-store-proxy-id": { - "type": "string" - }, - "snap-store-proxy-url": { - "type": "string" - }, - "ssl-hostname-verification": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "provider-type", - "authorized-keys", - "ssl-hostname-verification", - "legacy-proxy", - "juju-proxy", - "apt-proxy", - "snap-proxy", - "snap-store-assertions", - "snap-store-proxy-id", - "snap-store-proxy-url", - "UpdateBehavior" - ] - }, - "ContainerLXDProfile": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "profile": { - "$ref": "#/definitions/CharmLXDProfile" - } - }, - "additionalProperties": false, - "required": [ - "profile", - "name" - ] - }, - "ContainerManagerConfig": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "ContainerManagerConfigParams": { - "type": "object", - "properties": { - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type" - ] - }, - "ContainerProfileResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "lxd-profiles": { - "type": "array", - "items": { - "$ref": "#/definitions/ContainerLXDProfile" - } - } - }, - "additionalProperties": false - }, - "ContainerProfileResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ContainerProfileResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ControllerAPIInfoResult": { - "type": "object", - "properties": { - "addresses": { - "type": "array", - "items": { - "type": "string" - } - }, - "cacert": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "addresses", - "cacert" - ] - }, - "ControllerAPIInfoResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ControllerAPIInfoResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ControllerConfigResult": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "DeviceBridgeInfo": { - "type": "object", - "properties": { - "bridge-name": { - "type": "string" - }, - "host-device-name": { - "type": "string" - }, - "mac-address": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "host-device-name", - "bridge-name", - "mac-address" - ] - }, - "DistributionGroupResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "DistributionGroupResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/DistributionGroupResult" - } - } - }, - "additionalProperties": false, - "required": [ - "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" - ] - }, - "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": { - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "FindToolsParams": { - "type": "object", - "properties": { - "agentstream": { - "type": "string" - }, - "arch": { - "type": "string" - }, - "major": { - "type": "integer" - }, - "number": { - "$ref": "#/definitions/Number" - }, - "os-type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "number", - "major", - "arch", - "os-type", - "agentstream" - ] - }, - "FindToolsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "list": { - "type": "array", - "items": { - "$ref": "#/definitions/Tools" - } - } - }, - "additionalProperties": false, - "required": [ - "list" - ] - }, - "HardwareCharacteristics": { - "type": "object", - "properties": { - "arch": { - "type": "string" - }, - "availability-zone": { - "type": "string" - }, - "cpu-cores": { - "type": "integer" - }, - "cpu-power": { - "type": "integer" - }, - "mem": { - "type": "integer" - }, - "root-disk": { - "type": "integer" - }, - "root-disk-source": { - "type": "string" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "virt-type": { - "type": "string" - } - }, - "additionalProperties": false - }, - "HostNetworkChange": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "new-bridges": { - "type": "array", - "items": { - "$ref": "#/definitions/DeviceBridgeInfo" - } - }, - "reconfigure-delay": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "new-bridges", - "reconfigure-delay" - ] - }, - "HostNetworkChangeResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/HostNetworkChange" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "HostPort": { - "type": "object", - "properties": { - "Address": { - "$ref": "#/definitions/Address" - }, - "cidr": { - "type": "string" - }, - "config-type": { - "type": "string" - }, - "is-secondary": { - "type": "boolean" - }, - "port": { - "type": "integer" - }, - "scope": { - "type": "string" - }, - "space-id": { - "type": "string" - }, - "space-name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "value", - "type", - "scope", - "Address", - "port" - ] - }, - "InstanceInfo": { - "type": "object", - "properties": { - "characteristics": { - "$ref": "#/definitions/HardwareCharacteristics" - }, - "charm-profiles": { - "type": "array", - "items": { - "type": "string" - } - }, - "display-name": { - "type": "string" - }, - "instance-id": { - "type": "string" - }, - "network-config": { - "type": "array", - "items": { - "$ref": "#/definitions/NetworkConfig" - } - }, - "nonce": { - "type": "string" - }, - "tag": { - "type": "string" - }, - "volume-attachments": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/VolumeAttachmentInfo" - } - } - }, - "volumes": { - "type": "array", - "items": { - "$ref": "#/definitions/Volume" - } - } - }, - "additionalProperties": false, - "required": [ - "tag", - "instance-id", - "display-name", - "nonce", - "characteristics", - "volumes", - "volume-attachments", - "network-config", - "charm-profiles" - ] - }, - "InstancesInfo": { - "type": "object", - "properties": { - "machines": { - "type": "array", - "items": { - "$ref": "#/definitions/InstanceInfo" - } - } - }, - "additionalProperties": false, - "required": [ - "machines" - ] - }, - "LifeResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "life": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "life" - ] - }, - "LifeResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/LifeResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "MachineContainerResult": { - "type": "object", - "properties": { - "container-types": { - "type": "array", - "items": { - "type": "string" - } - }, - "determined": { - "type": "boolean" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "container-types", - "determined" - ] - }, - "MachineContainerResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/MachineContainerResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "MachineContainers": { - "type": "object", - "properties": { - "container-types": { - "type": "array", - "items": { - "type": "string" - } - }, - "machine-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "machine-tag", - "container-types" - ] - }, - "MachineContainersParams": { - "type": "object", - "properties": { - "params": { - "type": "array", - "items": { - "$ref": "#/definitions/MachineContainers" - } - } - }, - "additionalProperties": false, - "required": [ - "params" - ] - }, - "MachineNetworkConfigResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "info": { - "type": "array", - "items": { - "$ref": "#/definitions/NetworkConfig" - } - } - }, - "additionalProperties": false, - "required": [ - "info" - ] - }, - "MachineNetworkConfigResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/MachineNetworkConfigResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ModelConfigResult": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "NetworkConfig": { - "type": "object", - "properties": { - "address": { - "type": "string" - }, - "addresses": { - "type": "array", - "items": { - "$ref": "#/definitions/Address" - } - }, - "cidr": { - "type": "string" - }, - "config-type": { - "type": "string" - }, - "device-index": { - "type": "integer" - }, - "disabled": { - "type": "boolean" - }, - "dns-search-domains": { - "type": "array", - "items": { - "type": "string" - } - }, - "dns-servers": { - "type": "array", - "items": { - "type": "string" - } - }, - "gateway-address": { - "type": "string" - }, - "interface-name": { - "type": "string" - }, - "interface-type": { - "type": "string" - }, - "is-default-gateway": { - "type": "boolean" - }, - "mac-address": { - "type": "string" - }, - "mtu": { - "type": "integer" - }, - "no-auto-start": { - "type": "boolean" - }, - "origin": { - "type": "string" - }, - "parent-interface-name": { - "type": "string" - }, - "provider-address-id": { - "type": "string" - }, - "provider-id": { - "type": "string" - }, - "provider-network-id": { - "type": "string" - }, - "provider-space-id": { - "type": "string" - }, - "provider-subnet-id": { - "type": "string" - }, - "provider-vlan-id": { - "type": "string" - }, - "routes": { - "type": "array", - "items": { - "$ref": "#/definitions/NetworkRoute" - } - }, - "shadow-addresses": { - "type": "array", - "items": { - "$ref": "#/definitions/Address" - } - }, - "virtual-port-type": { - "type": "string" - }, - "vlan-tag": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "device-index", - "mac-address", - "cidr", - "mtu", - "provider-id", - "provider-network-id", - "provider-subnet-id", - "provider-space-id", - "provider-address-id", - "provider-vlan-id", - "vlan-tag", - "interface-name", - "parent-interface-name", - "interface-type", - "disabled" - ] - }, - "NetworkRoute": { - "type": "object", - "properties": { - "destination-cidr": { - "type": "string" - }, - "gateway-ip": { - "type": "string" - }, - "metric": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "destination-cidr", - "gateway-ip", - "metric" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "Number": { - "type": "object", - "properties": { - "Build": { - "type": "integer" - }, - "Major": { - "type": "integer" - }, - "Minor": { - "type": "integer" - }, - "Patch": { - "type": "integer" - }, - "Tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Major", - "Minor", - "Tag", - "Patch", - "Build" - ] - }, - "ProvisioningInfo": { - "type": "object", - "properties": { - "ProvisioningNetworkTopology": { - "$ref": "#/definitions/ProvisioningNetworkTopology" - }, - "base": { - "$ref": "#/definitions/Base" - }, - "charm-lxd-profiles": { - "type": "array", - "items": { - "type": "string" - } - }, - "cloudinit-userdata": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "constraints": { - "$ref": "#/definitions/Value" - }, - "controller-config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "endpoint-bindings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "image-metadata": { - "type": "array", - "items": { - "$ref": "#/definitions/CloudImageMetadata" - } - }, - "jobs": { - "type": "array", - "items": { - "type": "string" - } - }, - "placement": { - "type": "string" - }, - "root-disk": { - "$ref": "#/definitions/VolumeParams" - }, - "space-subnets": { - "type": "object", - "patternProperties": { - ".*": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "subnet-zones": { - "type": "object", - "patternProperties": { - ".*": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "tags": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "volume-attachments": { - "type": "array", - "items": { - "$ref": "#/definitions/VolumeAttachmentParams" - } - }, - "volumes": { - "type": "array", - "items": { - "$ref": "#/definitions/VolumeParams" - } - } - }, - "additionalProperties": false, - "required": [ - "constraints", - "base", - "placement", - "jobs", - "subnet-zones", - "space-subnets", - "ProvisioningNetworkTopology" - ] - }, - "ProvisioningInfoResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/ProvisioningInfo" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "ProvisioningInfoResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ProvisioningInfoResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ProvisioningNetworkTopology": { - "type": "object", - "properties": { - "space-subnets": { - "type": "object", - "patternProperties": { - ".*": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "subnet-zones": { - "type": "object", - "patternProperties": { - ".*": { - "type": "array", - "items": { - "type": "string" - } - } - } - } - }, - "additionalProperties": false, - "required": [ - "subnet-zones", - "space-subnets" - ] - }, - "SetMachineNetworkConfig": { - "type": "object", - "properties": { - "config": { - "type": "array", - "items": { - "$ref": "#/definitions/NetworkConfig" - } - }, - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "config" - ] - }, - "SetProfileArg": { - "type": "object", - "properties": { - "entity": { - "$ref": "#/definitions/Entity" - }, - "profiles": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "entity", - "profiles" - ] - }, - "SetProfileArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/SetProfileArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "SetStatus": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityStatusArgs" - } - } - }, - "additionalProperties": false, - "required": [ - "entities" - ] - }, - "Settings": { - "type": "object", - "properties": { - "AutoNoProxy": { - "type": "string" - }, - "Ftp": { - "type": "string" - }, - "Http": { - "type": "string" - }, - "Https": { - "type": "string" - }, - "NoProxy": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Http", - "Https", - "Ftp", - "NoProxy", - "AutoNoProxy" - ] - }, - "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": [ - "id", - "life", - "status", - "info", - "data", - "since" - ] - }, - "StatusResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StatusResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "StringResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "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": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "StringsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringsResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "StringsWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id" - ] - }, - "StringsWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringsWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "Tools": { - "type": "object", - "properties": { - "sha256": { - "type": "string" - }, - "size": { - "type": "integer" - }, - "url": { - "type": "string" - }, - "version": { - "$ref": "#/definitions/Binary" - } - }, - "additionalProperties": false, - "required": [ - "version", - "url", - "size" - ] - }, - "ToolsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "tools": { - "type": "array", - "items": { - "$ref": "#/definitions/Tools" - } - } - }, - "additionalProperties": false, - "required": [ - "tools" - ] - }, - "ToolsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ToolsResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "UpdateBehavior": { - "type": "object", - "properties": { - "enable-os-refresh-update": { - "type": "boolean" - }, - "enable-os-upgrade": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "enable-os-refresh-update", - "enable-os-upgrade" - ] - }, - "Value": { - "type": "object", - "properties": { - "allocate-public-ip": { - "type": "boolean" - }, - "arch": { - "type": "string" - }, - "container": { - "type": "string" - }, - "cores": { - "type": "integer" - }, - "cpu-power": { - "type": "integer" - }, - "instance-role": { - "type": "string" - }, - "instance-type": { - "type": "string" - }, - "mem": { - "type": "integer" - }, - "root-disk": { - "type": "integer" - }, - "root-disk-source": { - "type": "string" - }, - "spaces": { - "type": "array", - "items": { - "type": "string" - } - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "virt-type": { - "type": "string" - }, - "zones": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "Volume": { - "type": "object", - "properties": { - "info": { - "$ref": "#/definitions/VolumeInfo" - }, - "volume-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "volume-tag", - "info" - ] - }, - "VolumeAttachmentInfo": { - "type": "object", - "properties": { - "bus-address": { - "type": "string" - }, - "device-link": { - "type": "string" - }, - "device-name": { - "type": "string" - }, - "plan-info": { - "$ref": "#/definitions/VolumeAttachmentPlanInfo" - }, - "read-only": { - "type": "boolean" - } - }, - "additionalProperties": false - }, - "VolumeAttachmentParams": { - "type": "object", - "properties": { - "instance-id": { - "type": "string" - }, - "machine-tag": { - "type": "string" - }, - "provider": { - "type": "string" - }, - "read-only": { - "type": "boolean" - }, - "volume-id": { - "type": "string" - }, - "volume-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "volume-tag", - "machine-tag", - "provider" - ] - }, - "VolumeAttachmentPlanInfo": { - "type": "object", - "properties": { - "device-attributes": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "device-type": { - "type": "string" - } - }, - "additionalProperties": false - }, - "VolumeInfo": { - "type": "object", - "properties": { - "hardware-id": { - "type": "string" - }, - "persistent": { - "type": "boolean" - }, - "pool": { - "type": "string" - }, - "size": { - "type": "integer" - }, - "volume-id": { - "type": "string" - }, - "wwn": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "volume-id", - "size", - "persistent" - ] - }, - "VolumeParams": { - "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" - } - } - }, - "volume-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "volume-tag", - "size", - "provider" - ] - }, - "WatchContainer": { - "type": "object", - "properties": { - "container-type": { - "type": "string" - }, - "machine-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "machine-tag", - "container-type" - ] - }, - "WatchContainers": { - "type": "object", - "properties": { - "params": { - "type": "array", - "items": { - "$ref": "#/definitions/WatchContainer" - } - } - }, - "additionalProperties": false, - "required": [ - "params" - ] - } - } - } - }, - { - "Name": "ProxyUpdater", - "Description": "API provides the ProxyUpdater version 2 facade.", - "Version": 2, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "ProxyConfig": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ProxyConfigResults" - } - }, - "description": "ProxyConfig returns the proxy settings for the current model." - }, - "WatchForProxyConfigAndAPIHostPortChanges": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "WatchForProxyConfigAndAPIHostPortChanges watches for changes to the proxy and api host port settings." - } - }, - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "NotifyWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ProxyConfig": { - "type": "object", - "properties": { - "ftp": { - "type": "string" - }, - "http": { - "type": "string" - }, - "https": { - "type": "string" - }, - "no-proxy": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "http", - "https", - "ftp", - "no-proxy" - ] - }, - "ProxyConfigResult": { - "type": "object", - "properties": { - "apt-mirror": { - "type": "string" - }, - "apt-proxy-settings": { - "$ref": "#/definitions/ProxyConfig" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "juju-proxy-settings": { - "$ref": "#/definitions/ProxyConfig" - }, - "legacy-proxy-settings": { - "$ref": "#/definitions/ProxyConfig" - }, - "snap-proxy-settings": { - "$ref": "#/definitions/ProxyConfig" - }, - "snap-store-assertions": { - "type": "string" - }, - "snap-store-id": { - "type": "string" - }, - "snap-store-proxy-url": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "legacy-proxy-settings", - "juju-proxy-settings" - ] - }, - "ProxyConfigResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ProxyConfigResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - } - } - } - }, - { - "Name": "RaftLease", - "Description": "", - "Version": 2, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "ApplyLease": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/LeaseOperationsV2" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - } - } - }, - "definitions": { - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "LeaseOperationCommand": { - "type": "object", - "properties": { - "duration": { - "type": "integer" - }, - "holder": { - "type": "string" - }, - "lease": { - "type": "string" - }, - "model-uuid": { - "type": "string" - }, - "namespace": { - "type": "string" - }, - "new-time": { - "type": "string", - "format": "date-time" - }, - "old-time": { - "type": "string", - "format": "date-time" - }, - "operation": { - "type": "string" - }, - "pin-entity": { - "type": "string" - }, - "version": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "version", - "operation" - ] - }, - "LeaseOperationsV2": { - "type": "object", - "properties": { - "commands": { - "type": "array", - "items": { - "$ref": "#/definitions/LeaseOperationCommand" - } - } - }, - "additionalProperties": false, - "required": [ - "commands" - ] - } - } - } - }, - { - "Name": "Reboot", - "Description": "RebootAPI provides access to the Upgrader API facade.", - "Version": 2, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent" - ], - "Schema": { - "type": "object", - "properties": { - "ClearReboot": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "ClearReboot will clear the reboot flag on provided machines, if it exists." - }, - "GetRebootAction": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/RebootActionResults" - } - }, - "description": "GetRebootAction returns the action a machine agent should take.\nIf a reboot flag is set on the machine, then that machine is\nexpected to reboot (params.ShouldReboot).\na reboot flag set on the machine parent or grandparent, will\ncause the machine to shutdown (params.ShouldShutdown).\nIf no reboot flag is set, the machine should do nothing (params.ShouldDoNothing)." - }, - "RequestReboot": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "RequestReboot sets the reboot flag on the provided machines" - }, - "WatchForRebootEvent": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResult" - } - }, - "description": "WatchForRebootEvent starts a watcher to track if there is a new\nreboot request on the machines ID or any of its parents (in case we are a container)." - } - }, - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "RebootActionResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "string" - } - }, - "additionalProperties": false - }, - "RebootActionResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/RebootActionResult" - } - } - }, - "additionalProperties": false - } - } - } - }, - { - "Name": "RelationStatusWatcher", - "Description": "srvRelationStatusWatcher defines the API wrapping a state.RelationStatusWatcher.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "Next": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/RelationLifeSuspendedStatusWatchResult" - } - }, - "description": "Next returns when a change has occurred to an entity of the\ncollection being watched since the most recent call to Next\nor the Watch call that created the srvRelationStatusWatcher." - }, - "Stop": { - "type": "object", - "description": "Stop stops the watcher." - } - }, - "definitions": { - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "RelationLifeSuspendedStatusChange": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "life": { - "type": "string" - }, - "suspended": { - "type": "boolean" - }, - "suspended-reason": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "key", - "life", - "suspended", - "suspended-reason" - ] - }, - "RelationLifeSuspendedStatusWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "$ref": "#/definitions/RelationLifeSuspendedStatusChange" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id", - "changes" - ] - } - } - } - }, - { - "Name": "RelationUnitsWatcher", - "Description": "srvRelationUnitsWatcher defines the API wrapping a state.RelationUnitsWatcher.\nIt notifies about units entering and leaving the scope of a RelationUnit,\nand changes to the settings of those units known to have entered.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "Next": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/RelationUnitsWatchResult" - } - }, - "description": "Next returns when a change has occurred to an entity of the\ncollection being watched since the most recent call to Next\nor the Watch call that created the srvRelationUnitsWatcher." - }, - "Stop": { - "type": "object", - "description": "Stop stops the watcher." - } - }, - "definitions": { - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "RelationUnitsChange": { - "type": "object", - "properties": { - "app-changed": { - "type": "object", - "patternProperties": { - ".*": { - "type": "integer" - } - } - }, - "changed": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/UnitSettings" - } - } - }, - "departed": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "changed" - ] - }, - "RelationUnitsWatchResult": { - "type": "object", - "properties": { - "changes": { - "$ref": "#/definitions/RelationUnitsChange" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id", - "changes" - ] - }, - "UnitSettings": { - "type": "object", - "properties": { - "version": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "version" - ] - } - } - } - }, - { - "Name": "RemoteRelationWatcher", - "Description": "srvRemoteRelationWatcher defines the API wrapping a\nstate.RelationUnitsWatcher but serving the events it emits as\nfully-expanded params.RemoteRelationChangeEvents so they can be\nused across model/controller boundaries.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "Next": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/RemoteRelationWatchResult" - } - } - }, - "Stop": { - "type": "object", - "description": "Stop stops the watcher." - } - }, - "definitions": { - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "Macaroon": { - "type": "object", - "additionalProperties": false - }, - "RemoteRelationChangeEvent": { - "type": "object", - "properties": { - "application-settings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "application-token": { - "type": "string" - }, - "bakery-version": { - "type": "integer" - }, - "changed-units": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoteRelationUnitChange" - } - }, - "departed-units": { - "type": "array", - "items": { - "type": "integer" - } - }, - "force-cleanup": { - "type": "boolean" - }, - "life": { - "type": "string" - }, - "macaroons": { - "type": "array", - "items": { - "$ref": "#/definitions/Macaroon" - } - }, - "relation-token": { - "type": "string" - }, - "suspended": { - "type": "boolean" - }, - "suspended-reason": { - "type": "string" - }, - "unit-count": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "relation-token", - "application-token", - "life", - "unit-count" - ] - }, - "RemoteRelationUnitChange": { - "type": "object", - "properties": { - "settings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "unit-id": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "unit-id" - ] - }, - "RemoteRelationWatchResult": { - "type": "object", - "properties": { - "changes": { - "$ref": "#/definitions/RemoteRelationChangeEvent" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id", - "changes" - ] - } - } - } - }, - { - "Name": "RemoteRelations", - "Description": "API provides access to the remote relations API facade.", - "Version": 2, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "ConsumeRemoteRelationChanges": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RemoteRelationsChanges" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "ConsumeRemoteRelationChanges consumes changes to settings originating\nfrom the remote/offering side of relations." - }, - "ControllerAPIInfoForModels": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ControllerAPIInfoResults" - } - }, - "description": "ControllerAPIInfoForModels returns the controller api connection details for the specified models." - }, - "ControllerConfig": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ControllerConfigResult" - } - }, - "description": "ControllerConfig returns the controller's configuration." - }, - "ExportEntities": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/TokenResults" - } - }, - "description": "ExportEntities allocates unique, remote entity IDs for the given entities in the local model." - }, - "GetTokens": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/GetTokenArgs" - }, - "Result": { - "$ref": "#/definitions/StringResults" - } - }, - "description": "GetTokens returns the token associated with the entities with the given tags for the given models." - }, - "ImportRemoteEntities": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RemoteEntityTokenArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "ImportRemoteEntities adds entities to the remote entities collection with the specified opaque tokens." - }, - "Relations": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/RemoteRelationResults" - } - }, - "description": "Relations returns information about the cross-model relations with the specified keys\nin the local model." - }, - "RemoteApplications": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/RemoteApplicationResults" - } - }, - "description": "RemoteApplications returns the current state of the remote applications with\nthe specified names in the local model." - }, - "SaveMacaroons": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/EntityMacaroonArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SaveMacaroons saves the macaroons for the given entities." - }, - "SetRemoteApplicationsStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetStatus" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetRemoteApplicationsStatus sets the status for the specified remote applications." - }, - "UpdateControllersForModels": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/UpdateControllersForModelsParams" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "UpdateControllersForModels changes the external controller records for the\nassociated model entities. This is used when the remote relations worker gets\nredirected following migration of an offering model." - }, - "WatchLocalRelationChanges": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/RemoteRelationWatchResults" - } - }, - "description": "WatchLocalRelationChanges starts a RemoteRelationWatcher for each\nspecified relation, returning the watcher IDs and initial values,\nor an error if the remote relations couldn't be watched." - }, - "WatchRemoteApplicationRelations": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - }, - "description": "WatchRemoteApplicationRelations starts a StringsWatcher for watching the relations of\neach specified application in the local model, and returns the watcher IDs\nand initial values, or an error if the services' relations could not be\nwatched." - }, - "WatchRemoteApplications": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsWatchResult" - } - }, - "description": "WatchRemoteApplications starts a strings watcher that notifies of the addition,\nremoval, and lifecycle changes of remote applications in the model; and\nreturns the watcher ID and initial IDs of remote applications, or an error if\nwatching failed." - }, - "WatchRemoteRelations": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsWatchResult" - } - }, - "description": "WatchRemoteRelations starts a strings watcher that notifies of the addition,\nremoval, and lifecycle changes of remote relations in the model; and\nreturns the watcher ID and initial IDs of remote relations, or an error if\nwatching failed." - } - }, - "definitions": { - "ControllerAPIInfoResult": { - "type": "object", - "properties": { - "addresses": { - "type": "array", - "items": { - "type": "string" - } - }, - "cacert": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "addresses", - "cacert" - ] - }, - "ControllerAPIInfoResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ControllerAPIInfoResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ControllerConfigResult": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "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" - ] - }, - "EntityMacaroonArg": { - "type": "object", - "properties": { - "macaroon": { - "$ref": "#/definitions/Macaroon" - }, - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "macaroon", - "tag" - ] - }, - "EntityMacaroonArgs": { - "type": "object", - "properties": { - "Args": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityMacaroonArg" - } - } - }, - "additionalProperties": false, - "required": [ - "Args" - ] - }, - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ExternalControllerInfo": { - "type": "object", - "properties": { - "addrs": { - "type": "array", - "items": { - "type": "string" - } - }, - "ca-cert": { - "type": "string" - }, - "controller-alias": { - "type": "string" - }, - "controller-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "controller-tag", - "controller-alias", - "addrs", - "ca-cert" - ] - }, - "GetTokenArg": { - "type": "object", - "properties": { - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag" - ] - }, - "GetTokenArgs": { - "type": "object", - "properties": { - "Args": { - "type": "array", - "items": { - "$ref": "#/definitions/GetTokenArg" - } - } - }, - "additionalProperties": false, - "required": [ - "Args" - ] - }, - "Macaroon": { - "type": "object", - "additionalProperties": false - }, - "RemoteApplication": { - "type": "object", - "properties": { - "consume-version": { - "type": "integer" - }, - "is-consumer-proxy": { - "type": "boolean" - }, - "life": { - "type": "string" - }, - "macaroon": { - "$ref": "#/definitions/Macaroon" - }, - "model-uuid": { - "type": "string" - }, - "name": { - "type": "string" - }, - "offer-uuid": { - "type": "string" - }, - "status": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "offer-uuid", - "model-uuid", - "is-consumer-proxy" - ] - }, - "RemoteApplicationResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/RemoteApplication" - } - }, - "additionalProperties": false - }, - "RemoteApplicationResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoteApplicationResult" - } - } - }, - "additionalProperties": false - }, - "RemoteEndpoint": { - "type": "object", - "properties": { - "interface": { - "type": "string" - }, - "limit": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "role": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "role", - "interface", - "limit" - ] - }, - "RemoteEntityTokenArg": { - "type": "object", - "properties": { - "tag": { - "type": "string" - }, - "token": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag" - ] - }, - "RemoteEntityTokenArgs": { - "type": "object", - "properties": { - "Args": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoteEntityTokenArg" - } - } - }, - "additionalProperties": false, - "required": [ - "Args" - ] - }, - "RemoteRelation": { - "type": "object", - "properties": { - "application-name": { - "type": "string" - }, - "endpoint": { - "$ref": "#/definitions/RemoteEndpoint" - }, - "id": { - "type": "integer" - }, - "key": { - "type": "string" - }, - "life": { - "type": "string" - }, - "remote-application-name": { - "type": "string" - }, - "remote-endpoint-name": { - "type": "string" - }, - "source-model-uuid": { - "type": "string" - }, - "suspended": { - "type": "boolean" - }, - "unit-count": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "life", - "suspended", - "id", - "key", - "application-name", - "endpoint", - "unit-count", - "remote-application-name", - "remote-endpoint-name", - "source-model-uuid" - ] - }, - "RemoteRelationChangeEvent": { - "type": "object", - "properties": { - "application-settings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "application-token": { - "type": "string" - }, - "bakery-version": { - "type": "integer" - }, - "changed-units": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoteRelationUnitChange" - } - }, - "departed-units": { - "type": "array", - "items": { - "type": "integer" - } - }, - "force-cleanup": { - "type": "boolean" - }, - "life": { - "type": "string" - }, - "macaroons": { - "type": "array", - "items": { - "$ref": "#/definitions/Macaroon" - } - }, - "relation-token": { - "type": "string" - }, - "suspended": { - "type": "boolean" - }, - "suspended-reason": { - "type": "string" - }, - "unit-count": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "relation-token", - "application-token", - "life", - "unit-count" - ] - }, - "RemoteRelationResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/RemoteRelation" - } - }, - "additionalProperties": false - }, - "RemoteRelationResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoteRelationResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "RemoteRelationUnitChange": { - "type": "object", - "properties": { - "settings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "unit-id": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "unit-id" - ] - }, - "RemoteRelationWatchResult": { - "type": "object", - "properties": { - "changes": { - "$ref": "#/definitions/RemoteRelationChangeEvent" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id", - "changes" - ] - }, - "RemoteRelationWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoteRelationWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "RemoteRelationsChanges": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoteRelationChangeEvent" - } - } - }, - "additionalProperties": false - }, - "SetStatus": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityStatusArgs" - } - } - }, - "additionalProperties": false, - "required": [ - "entities" - ] - }, - "StringResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "StringResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "StringsWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id" - ] - }, - "StringsWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringsWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "TokenResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "token": { - "type": "string" - } - }, - "additionalProperties": false - }, - "TokenResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/TokenResult" - } - } - }, - "additionalProperties": false - }, - "UpdateControllerForModel": { - "type": "object", - "properties": { - "info": { - "$ref": "#/definitions/ExternalControllerInfo" - }, - "model-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "model-tag", - "info" - ] - }, - "UpdateControllersForModelsParams": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "$ref": "#/definitions/UpdateControllerForModel" - } - } - }, - "additionalProperties": false, - "required": [ - "changes" - ] - } - } - } - }, - { - "Name": "Resources", - "Description": "API is the public API facade for resources.", - "Version": 3, - "AvailableTo": [ - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "AddPendingResources": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/AddPendingResourcesArgsV2" - }, - "Result": { - "$ref": "#/definitions/AddPendingResourcesResult" - } - }, - "description": "AddPendingResources adds the provided resources (info) to the Juju\nmodel in a pending state, meaning they are not available until\nresolved. Handles CharmHub and Local charms." - }, - "ListResources": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ListResourcesArgs" - }, - "Result": { - "$ref": "#/definitions/ResourcesResults" - } - }, - "description": "ListResources returns the list of resources for the given application." - } - }, - "definitions": { - "AddPendingResourcesArgsV2": { - "type": "object", - "properties": { - "Entity": { - "$ref": "#/definitions/Entity" - }, - "charm-origin": { - "$ref": "#/definitions/CharmOrigin" - }, - "macaroon": { - "$ref": "#/definitions/Macaroon" - }, - "resources": { - "type": "array", - "items": { - "$ref": "#/definitions/CharmResource" - } - }, - "tag": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "Entity", - "url", - "charm-origin", - "macaroon", - "resources" - ] - }, - "AddPendingResourcesResult": { - "type": "object", - "properties": { - "ErrorResult": { - "$ref": "#/definitions/ErrorResult" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "pending-ids": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "ErrorResult", - "pending-ids" - ] - }, - "Base": { - "type": "object", - "properties": { - "channel": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "channel" - ] - }, - "CharmOrigin": { - "type": "object", - "properties": { - "architecture": { - "type": "string" - }, - "base": { - "$ref": "#/definitions/Base" - }, - "branch": { - "type": "string" - }, - "hash": { - "type": "string" - }, - "id": { - "type": "string" - }, - "instance-key": { - "type": "string" - }, - "revision": { - "type": "integer" - }, - "risk": { - "type": "string" - }, - "source": { - "type": "string" - }, - "track": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "source", - "type", - "id" - ] - }, - "CharmResource": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "fingerprint": { - "type": "array", - "items": { - "type": "integer" - } - }, - "name": { - "type": "string" - }, - "origin": { - "type": "string" - }, - "path": { - "type": "string" - }, - "revision": { - "type": "integer" - }, - "size": { - "type": "integer" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "type", - "path", - "origin", - "revision", - "fingerprint", - "size" - ] - }, - "Entity": { - "type": "object", - "properties": { - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ListResourcesArgs": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } - } - }, - "additionalProperties": false, - "required": [ - "entities" - ] - }, - "Macaroon": { - "type": "object", - "additionalProperties": false - }, - "Resource": { - "type": "object", - "properties": { - "CharmResource": { - "$ref": "#/definitions/CharmResource" - }, - "application": { - "type": "string" - }, - "description": { - "type": "string" - }, - "fingerprint": { - "type": "array", - "items": { - "type": "integer" - } - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "origin": { - "type": "string" - }, - "path": { - "type": "string" - }, - "pending-id": { - "type": "string" - }, - "revision": { - "type": "integer" - }, - "size": { - "type": "integer" - }, - "timestamp": { - "type": "string", - "format": "date-time" - }, - "type": { - "type": "string" - }, - "username": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "type", - "path", - "origin", - "revision", - "fingerprint", - "size", - "CharmResource", - "id", - "pending-id", - "application", - "username", - "timestamp" - ] - }, - "ResourcesResult": { - "type": "object", - "properties": { - "ErrorResult": { - "$ref": "#/definitions/ErrorResult" - }, - "charm-store-resources": { - "type": "array", - "items": { - "$ref": "#/definitions/CharmResource" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "resources": { - "type": "array", - "items": { - "$ref": "#/definitions/Resource" - } - }, - "unit-resources": { - "type": "array", - "items": { - "$ref": "#/definitions/UnitResources" - } - } - }, - "additionalProperties": false, - "required": [ - "ErrorResult", - "resources", - "charm-store-resources", - "unit-resources" - ] - }, - "ResourcesResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ResourcesResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "UnitResources": { - "type": "object", - "properties": { - "Entity": { - "$ref": "#/definitions/Entity" - }, - "download-progress": { - "type": "object", - "patternProperties": { - ".*": { - "type": "integer" - } - } - }, - "resources": { - "type": "array", - "items": { - "$ref": "#/definitions/Resource" - } - }, - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "Entity", - "resources", - "download-progress" - ] - } - } - } - }, - { - "Name": "ResourcesHookContext", - "Description": "UnitFacade is the resources portion of the uniter's API facade.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "GetResourceInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ListUnitResourcesArgs" - }, - "Result": { - "$ref": "#/definitions/UnitResourcesResult" - } - }, - "description": "GetResourceInfo returns the resource info for each of the given\nresource names (for the implicit application). If any one is missing then\nthe corresponding result is set with errors.NotFound." - } - }, - "definitions": { - "CharmResource": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "fingerprint": { - "type": "array", - "items": { - "type": "integer" - } - }, - "name": { - "type": "string" - }, - "origin": { - "type": "string" - }, - "path": { - "type": "string" - }, - "revision": { - "type": "integer" - }, - "size": { - "type": "integer" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "type", - "path", - "origin", - "revision", - "fingerprint", - "size" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ListUnitResourcesArgs": { - "type": "object", - "properties": { - "resource-names": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "resource-names" - ] - }, - "Resource": { - "type": "object", - "properties": { - "CharmResource": { - "$ref": "#/definitions/CharmResource" - }, - "application": { - "type": "string" - }, - "description": { - "type": "string" - }, - "fingerprint": { - "type": "array", - "items": { - "type": "integer" - } - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "origin": { - "type": "string" - }, - "path": { - "type": "string" - }, - "pending-id": { - "type": "string" - }, - "revision": { - "type": "integer" - }, - "size": { - "type": "integer" - }, - "timestamp": { - "type": "string", - "format": "date-time" - }, - "type": { - "type": "string" - }, - "username": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "type", - "path", - "origin", - "revision", - "fingerprint", - "size", - "CharmResource", - "id", - "pending-id", - "application", - "username", - "timestamp" - ] - }, - "UnitResourceResult": { - "type": "object", - "properties": { - "ErrorResult": { - "$ref": "#/definitions/ErrorResult" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "resource": { - "$ref": "#/definitions/Resource" - } - }, - "additionalProperties": false, - "required": [ - "ErrorResult", - "resource" - ] - }, - "UnitResourcesResult": { - "type": "object", - "properties": { - "ErrorResult": { - "$ref": "#/definitions/ErrorResult" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "resources": { - "type": "array", - "items": { - "$ref": "#/definitions/UnitResourceResult" - } - } - }, - "additionalProperties": false, - "required": [ - "ErrorResult", - "resources" - ] - } - } - } - }, - { - "Name": "RetryStrategy", - "Description": "RetryStrategyAPI implements RetryStrategy", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "RetryStrategy": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/RetryStrategyResults" - } - }, - "description": "RetryStrategy returns RetryStrategyResults that can be used by any code that uses\nto configure the retry timer that's currently in juju utils." - }, - "WatchRetryStrategy": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "WatchRetryStrategy watches for changes to the model. Currently we only allow\nchanges to the boolean that determines whether retries should be attempted or not." - } - }, - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "NotifyWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "RetryStrategy": { - "type": "object", - "properties": { - "jitter-retry-time": { - "type": "boolean" - }, - "max-retry-time": { - "type": "integer" - }, - "min-retry-time": { - "type": "integer" - }, - "retry-time-factor": { - "type": "integer" - }, - "should-retry": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "should-retry", - "min-retry-time", - "max-retry-time", - "jitter-retry-time", - "retry-time-factor" - ] - }, - "RetryStrategyResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/RetryStrategy" - } - }, - "additionalProperties": false - }, - "RetryStrategyResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/RetryStrategyResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - } - } - } - }, - { - "Name": "SSHClient", - "Description": "Facade implements the API required by the sshclient worker.", - "Version": 4, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "AllAddresses": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/SSHAddressesResults" - } - }, - "description": "AllAddresses reports all addresses that might have SSH listening for each\nentity in args. The result is sorted with public addresses first.\nMachines and units are supported as entity types." - }, - "ModelCredentialForSSH": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/CloudSpecResult" - } - }, - "description": "ModelCredentialForSSH returns a cloud spec for ssh purpose.\nThis facade call is only used for k8s model." - }, - "PrivateAddress": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/SSHAddressResults" - } - }, - "description": "PrivateAddress reports the preferred private network address for one or\nmore entities. Machines and units are supported." - }, - "Proxy": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/SSHProxyResult" - } - }, - "description": "Proxy returns whether SSH connections should be proxied through the\ncontroller hosts for the model associated with the API connection." - }, - "PublicAddress": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/SSHAddressResults" - } - }, - "description": "PublicAddress reports the preferred public network address for one\nor more entities. Machines and units are supported." - }, - "PublicKeys": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/SSHPublicKeysResults" - } - }, - "description": "PublicKeys returns the public SSH hosts for one or more\nentities. Machines and units are supported." - } - }, - "definitions": { - "CloudCredential": { - "type": "object", - "properties": { - "attrs": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "auth-type": { - "type": "string" - }, - "redacted": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "auth-type" - ] - }, - "CloudSpec": { - "type": "object", - "properties": { - "cacertificates": { - "type": "array", - "items": { - "type": "string" - } - }, - "credential": { - "$ref": "#/definitions/CloudCredential" - }, - "endpoint": { - "type": "string" - }, - "identity-endpoint": { - "type": "string" - }, - "is-controller-cloud": { - "type": "boolean" - }, - "name": { - "type": "string" - }, - "region": { - "type": "string" - }, - "skip-tls-verify": { - "type": "boolean" - }, - "storage-endpoint": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type", - "name" - ] - }, - "CloudSpecResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/CloudSpec" - } - }, - "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": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "SSHAddressResult": { - "type": "object", - "properties": { - "address": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "SSHAddressResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/SSHAddressResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "SSHAddressesResult": { - "type": "object", - "properties": { - "addresses": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "addresses" - ] - }, - "SSHAddressesResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/SSHAddressesResult" - } - } - }, - "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" - }, - "public-keys": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "SSHPublicKeysResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/SSHPublicKeysResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - } - } - } - }, - { - "Name": "SecretBackends", - "Description": "SecretBackendsAPI is the server implementation for the SecretBackends facade.", - "Version": 1, - "AvailableTo": [ - "controller-user" - ], - "Schema": { - "type": "object", - "properties": { - "AddSecretBackends": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/AddSecretBackendArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "AddSecretBackends adds new secret backends." - }, - "ListSecretBackends": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ListSecretBackendsArgs" - }, - "Result": { - "$ref": "#/definitions/ListSecretBackendsResults" - } - }, - "description": "ListSecretBackends lists available secret backends." - }, - "RemoveSecretBackends": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RemoveSecretBackendArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "RemoveSecretBackends removes secret backends." - }, - "UpdateSecretBackends": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/UpdateSecretBackendArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "UpdateSecretBackends updates secret backends." - } - }, - "definitions": { - "AddSecretBackendArg": { - "type": "object", - "properties": { - "SecretBackend": { - "$ref": "#/definitions/SecretBackend" - }, - "backend-type": { - "type": "string" - }, - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "token-rotate-interval": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "name", - "backend-type", - "config", - "SecretBackend" - ] - }, - "AddSecretBackendArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/AddSecretBackendArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ListSecretBackendsArgs": { - "type": "object", - "properties": { - "names": { - "type": "array", - "items": { - "type": "string" - } - }, - "reveal": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "names", - "reveal" - ] - }, - "ListSecretBackendsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/SecretBackendResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "RemoveSecretBackendArg": { - "type": "object", - "properties": { - "force": { - "type": "boolean" - }, - "name": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name" - ] - }, - "RemoveSecretBackendArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoveSecretBackendArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "SecretBackend": { - "type": "object", - "properties": { - "backend-type": { - "type": "string" - }, - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "name": { - "type": "string" - }, - "token-rotate-interval": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "name", - "backend-type", - "config" - ] - }, - "SecretBackendResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "id": { - "type": "string" - }, - "message": { - "type": "string" - }, - "num-secrets": { - "type": "integer" - }, - "result": { - "$ref": "#/definitions/SecretBackend" - }, - "status": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "result", - "id", - "num-secrets", - "status" - ] - }, - "UpdateSecretBackendArg": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "force": { - "type": "boolean" - }, - "name": { - "type": "string" - }, - "name-change": { - "type": "string" - }, - "reset": { - "type": "array", - "items": { - "type": "string" - } - }, - "token-rotate-interval": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "name", - "token-rotate-interval", - "config", - "reset" - ] - }, - "UpdateSecretBackendArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/UpdateSecretBackendArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - } - } - } - }, - { - "Name": "Secrets", - "Description": "SecretsAPI is the backend for the Secrets facade.", - "Version": 1, - "AvailableTo": [ - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "ListSecrets": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ListSecretsArgs" - }, - "Result": { - "$ref": "#/definitions/ListSecretResults" - } - }, - "description": "ListSecrets lists available secrets." - } - }, - "definitions": { - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ListSecretResult": { - "type": "object", - "properties": { - "create-time": { - "type": "string", - "format": "date-time" - }, - "description": { - "type": "string" - }, - "label": { - "type": "string" - }, - "latest-expire-time": { - "type": "string", - "format": "date-time" - }, - "latest-revision": { - "type": "integer" - }, - "next-rotate-time": { - "type": "string", - "format": "date-time" - }, - "owner-tag": { - "type": "string" - }, - "revisions": { - "type": "array", - "items": { - "$ref": "#/definitions/SecretRevision" - } - }, - "rotate-policy": { - "type": "string" - }, - "update-time": { - "type": "string", - "format": "date-time" - }, - "uri": { - "type": "string" - }, - "value": { - "$ref": "#/definitions/SecretValueResult" - }, - "version": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "uri", - "version", - "owner-tag", - "latest-revision", - "create-time", - "update-time", - "revisions" - ] - }, - "ListSecretResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ListSecretResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ListSecretsArgs": { - "type": "object", - "properties": { - "filter": { - "$ref": "#/definitions/SecretsFilter" - }, - "show-secrets": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "show-secrets", - "filter" - ] - }, - "SecretRevision": { - "type": "object", - "properties": { - "create-time": { - "type": "string", - "format": "date-time" - }, - "expire-time": { - "type": "string", - "format": "date-time" - }, - "revision": { - "type": "integer" - }, - "update-time": { - "type": "string", - "format": "date-time" - }, - "value-ref": { - "$ref": "#/definitions/SecretValueRef" - } - }, - "additionalProperties": false, - "required": [ - "revision" - ] - }, - "SecretValueRef": { - "type": "object", - "properties": { - "backend-id": { - "type": "string" - }, - "revision-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "backend-id", - "revision-id" - ] - }, - "SecretValueResult": { - "type": "object", - "properties": { - "data": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "SecretsFilter": { - "type": "object", - "properties": { - "owner-tag": { - "type": "string" - }, - "revision": { - "type": "integer" - }, - "uri": { - "type": "string" - } - }, - "additionalProperties": false - } - } - } - }, - { - "Name": "SecretsManager", - "Description": "SecretsManagerAPI is the implementation for the SecretsManager facade.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "CreateSecretURIs": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/CreateSecretURIsArg" - }, - "Result": { - "$ref": "#/definitions/StringResults" - } - }, - "description": "CreateSecretURIs creates new secret URIs." - }, - "CreateSecrets": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/CreateSecretArgs" - }, - "Result": { - "$ref": "#/definitions/StringResults" - } - }, - "description": "CreateSecrets creates new secrets." - }, - "GetConsumerSecretsRevisionInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/GetSecretConsumerInfoArgs" - }, - "Result": { - "$ref": "#/definitions/SecretConsumerInfoResults" - } - }, - "description": "GetConsumerSecretsRevisionInfo returns the latest secret revisions for the specified secrets." - }, - "GetSecretBackendConfig": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/SecretBackendConfigResults" - } - }, - "description": "GetSecretBackendConfig gets the config needed to create a client to secret backends." - }, - "GetSecretContentInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/GetSecretContentArgs" - }, - "Result": { - "$ref": "#/definitions/SecretContentResults" - } - }, - "description": "GetSecretContentInfo returns the secret values for the specified secrets." - }, - "GetSecretMetadata": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ListSecretResults" - } - }, - "description": "GetSecretMetadata returns metadata for the caller's secrets." - }, - "GetSecretRevisionContentInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SecretRevisionArg" - }, - "Result": { - "$ref": "#/definitions/SecretContentResults" - } - }, - "description": "GetSecretRevisionContentInfo returns the secret values for the specified secret revisions." - }, - "GetSecretStoreConfig": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/SecretBackendConfig" - } - }, - "description": "GetSecretStoreConfig is for 3.0.x agents.\nTODO(wallyworld) - remove when we auto upgrade migrated models." - }, - "RemoveSecrets": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/DeleteSecretArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "RemoveSecrets removes the specified secrets." - }, - "SecretsGrant": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/GrantRevokeSecretArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SecretsGrant grants access to a secret for the specified subjects." - }, - "SecretsRevoke": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/GrantRevokeSecretArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SecretsRevoke revokes access to a secret for the specified subjects." - }, - "SecretsRotated": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SecretRotatedArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SecretsRotated records when secrets were last rotated." - }, - "UpdateSecrets": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/UpdateSecretArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "UpdateSecrets updates the specified secrets." - }, - "WatchConsumedSecretsChanges": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - }, - "description": "WatchConsumedSecretsChanges sets up a watcher to notify of changes to secret revisions for the specified consumers." - }, - "WatchObsolete": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResult" - } - }, - "description": "WatchObsolete returns a watcher for notifying when:\n - a secret owned by the entity is deleted\n - a secret revision owed by the entity no longer\n has any consumers\n\nObsolete revisions results are \"uri/revno\" and deleted\nsecret results are \"uri\"." - }, - "WatchSecretRevisionsExpiryChanges": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/SecretTriggerWatchResult" - } - }, - "description": "WatchSecretRevisionsExpiryChanges sets up a watcher to notify of changes to secret revision expiry config." - }, - "WatchSecretsRotationChanges": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/SecretTriggerWatchResult" - } - }, - "description": "WatchSecretsRotationChanges sets up a watcher to notify of changes to secret rotation config." - } - }, - "definitions": { - "CreateSecretArg": { - "type": "object", - "properties": { - "UpsertSecretArg": { - "$ref": "#/definitions/UpsertSecretArg" - }, - "content": { - "$ref": "#/definitions/SecretContentParams" - }, - "description": { - "type": "string" - }, - "expire-time": { - "type": "string", - "format": "date-time" - }, - "label": { - "type": "string" - }, - "owner-tag": { - "type": "string" - }, - "params": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "rotate-policy": { - "type": "string" - }, - "uri": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "UpsertSecretArg", - "owner-tag" - ] - }, - "CreateSecretArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/CreateSecretArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "CreateSecretURIsArg": { - "type": "object", - "properties": { - "count": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "count" - ] - }, - "DeleteSecretArg": { - "type": "object", - "properties": { - "revisions": { - "type": "array", - "items": { - "type": "integer" - } - }, - "uri": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "uri" - ] - }, - "DeleteSecretArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/DeleteSecretArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "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": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "GetSecretConsumerInfoArgs": { - "type": "object", - "properties": { - "consumer-tag": { - "type": "string" - }, - "uris": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "consumer-tag", - "uris" - ] - }, - "GetSecretContentArg": { - "type": "object", - "properties": { - "label": { - "type": "string" - }, - "peek": { - "type": "boolean" - }, - "refresh": { - "type": "boolean" - }, - "uri": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "uri" - ] - }, - "GetSecretContentArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/GetSecretContentArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "GrantRevokeSecretArg": { - "type": "object", - "properties": { - "role": { - "type": "string" - }, - "scope-tag": { - "type": "string" - }, - "subject-tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "uri": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "uri", - "scope-tag", - "subject-tags", - "role" - ] - }, - "GrantRevokeSecretArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/GrantRevokeSecretArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "ListSecretResult": { - "type": "object", - "properties": { - "create-time": { - "type": "string", - "format": "date-time" - }, - "description": { - "type": "string" - }, - "label": { - "type": "string" - }, - "latest-expire-time": { - "type": "string", - "format": "date-time" - }, - "latest-revision": { - "type": "integer" - }, - "next-rotate-time": { - "type": "string", - "format": "date-time" - }, - "owner-tag": { - "type": "string" - }, - "revisions": { - "type": "array", - "items": { - "$ref": "#/definitions/SecretRevision" - } - }, - "rotate-policy": { - "type": "string" - }, - "update-time": { - "type": "string", - "format": "date-time" - }, - "uri": { - "type": "string" - }, - "value": { - "$ref": "#/definitions/SecretValueResult" - }, - "version": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "uri", - "version", - "owner-tag", - "latest-revision", - "create-time", - "update-time", - "revisions" - ] - }, - "ListSecretResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ListSecretResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "SecretBackendConfig": { - "type": "object", - "properties": { - "params": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type" - ] - }, - "SecretBackendConfigResults": { - "type": "object", - "properties": { - "active-id": { - "type": "string" - }, - "configs": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/SecretBackendConfig" - } - } - }, - "model-controller": { - "type": "string" - }, - "model-name": { - "type": "string" - }, - "model-uuid": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "model-controller", - "model-uuid", - "model-name", - "active-id" - ] - }, - "SecretConsumerInfoResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "label": { - "type": "string" - }, - "revision": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "revision", - "label" - ] - }, - "SecretConsumerInfoResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/SecretConsumerInfoResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "SecretContentParams": { - "type": "object", - "properties": { - "data": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "value-ref": { - "$ref": "#/definitions/SecretValueRef" - } - }, - "additionalProperties": false - }, - "SecretContentResult": { - "type": "object", - "properties": { - "content": { - "$ref": "#/definitions/SecretContentParams" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "content" - ] - }, - "SecretContentResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/SecretContentResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "SecretRevision": { - "type": "object", - "properties": { - "create-time": { - "type": "string", - "format": "date-time" - }, - "expire-time": { - "type": "string", - "format": "date-time" - }, - "revision": { - "type": "integer" - }, - "update-time": { - "type": "string", - "format": "date-time" - }, - "value-ref": { - "$ref": "#/definitions/SecretValueRef" - } - }, - "additionalProperties": false, - "required": [ - "revision" - ] - }, - "SecretRevisionArg": { - "type": "object", - "properties": { - "pending-delete": { - "type": "boolean" - }, - "revisions": { - "type": "array", - "items": { - "type": "integer" - } - }, - "uri": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "uri", - "revisions", - "pending-delete" - ] - }, - "SecretRotatedArg": { - "type": "object", - "properties": { - "original-revision": { - "type": "integer" - }, - "skip": { - "type": "boolean" - }, - "uri": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "uri", - "original-revision", - "skip" - ] - }, - "SecretRotatedArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/SecretRotatedArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "SecretTriggerChange": { - "type": "object", - "properties": { - "next-trigger-time": { - "type": "string", - "format": "date-time" - }, - "revision": { - "type": "integer" - }, - "uri": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "uri", - "next-trigger-time" - ] - }, - "SecretTriggerWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "$ref": "#/definitions/SecretTriggerChange" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id", - "changes" - ] - }, - "SecretValueRef": { - "type": "object", - "properties": { - "backend-id": { - "type": "string" - }, - "revision-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "backend-id", - "revision-id" - ] - }, - "SecretValueResult": { - "type": "object", - "properties": { - "data": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "StringResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "StringResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "StringsWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id" - ] - }, - "StringsWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringsWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "UpdateSecretArg": { - "type": "object", - "properties": { - "UpsertSecretArg": { - "$ref": "#/definitions/UpsertSecretArg" - }, - "content": { - "$ref": "#/definitions/SecretContentParams" - }, - "description": { - "type": "string" - }, - "expire-time": { - "type": "string", - "format": "date-time" - }, - "label": { - "type": "string" - }, - "params": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "rotate-policy": { - "type": "string" - }, - "uri": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "UpsertSecretArg", - "uri" - ] - }, - "UpdateSecretArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/UpdateSecretArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "UpsertSecretArg": { - "type": "object", - "properties": { - "content": { - "$ref": "#/definitions/SecretContentParams" - }, - "description": { - "type": "string" - }, - "expire-time": { - "type": "string", - "format": "date-time" - }, - "label": { - "type": "string" - }, - "params": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "rotate-policy": { - "type": "string" - } - }, - "additionalProperties": false - } - } - } - }, - { - "Name": "SecretsTriggerWatcher", - "Description": "srvSecretTriggerWatcher defines the API wrapping a SecretsTriggerWatcher.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "Next": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/SecretTriggerWatchResult" - } - }, - "description": "Next returns when a change has occurred to an entity of the\ncollection being watched since the most recent call to Next\nor the Watch call that created the srvSecretRotationWatcher." - }, - "Stop": { - "type": "object", - "description": "Stop stops the watcher." - } - }, - "definitions": { - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "SecretTriggerChange": { - "type": "object", - "properties": { - "next-trigger-time": { - "type": "string", - "format": "date-time" - }, - "revision": { - "type": "integer" - }, - "uri": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "uri", - "next-trigger-time" - ] - }, - "SecretTriggerWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "$ref": "#/definitions/SecretTriggerChange" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id", - "changes" - ] - } - } - } - }, - { - "Name": "Singular", - "Description": "Facade allows controller machines to request exclusive rights to administer\nsome specific model or controller for a limited time.", - "Version": 2, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "Claim": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SingularClaims" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "Claim makes the supplied singular-controller lease requests. (In practice,\nany requests not for the connection's model or controller, or not on behalf\nof the connected ModelManager machine, will be rejected.)" - }, - "Wait": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "Wait waits for the singular-controller lease to expire for all supplied\nentities. (In practice, any requests that do not refer to the connection's\nmodel or controller will be rejected.)" - } - }, - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "SingularClaim": { - "type": "object", - "properties": { - "claimant-tag": { - "type": "string" - }, - "duration": { - "type": "integer" - }, - "entity-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "entity-tag", - "claimant-tag", - "duration" - ] - }, - "SingularClaims": { - "type": "object", - "properties": { - "claims": { - "type": "array", - "items": { - "$ref": "#/definitions/SingularClaim" - } - } - }, - "additionalProperties": false, - "required": [ - "claims" - ] - } - } - } - }, - { - "Name": "Spaces", - "Description": "API provides the spaces API facade for version 6.", - "Version": 6, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "CreateSpaces": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/CreateSpacesParams" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "CreateSpaces creates a new Juju network space, associating the\nspecified subnets with it (optional; can be empty)." - }, - "ListSpaces": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ListSpacesResults" - } - }, - "description": "ListSpaces lists all the available spaces and their associated subnets." - }, - "MoveSubnets": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/MoveSubnetsParams" - }, - "Result": { - "$ref": "#/definitions/MoveSubnetsResults" - } - }, - "description": "MoveSubnets ensures that the input subnets are in the input space." - }, - "ReloadSpaces": { - "type": "object", - "description": "ReloadSpaces refreshes spaces from substrate" - }, - "RemoveSpace": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RemoveSpaceParams" - }, - "Result": { - "$ref": "#/definitions/RemoveSpaceResults" - } - }, - "description": "RemoveSpace removes a space.\nReturns SpaceResults if entities/settings are found which makes the deletion not possible." - }, - "RenameSpace": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RenameSpacesParams" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "RenameSpace renames a space." - }, - "ShowSpace": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ShowSpaceResults" - } - }, - "description": "ShowSpace shows the spaces for a set of given entities." - } - }, - "definitions": { - "CreateSpaceParams": { - "type": "object", - "properties": { - "cidrs": { - "type": "array", - "items": { - "type": "string" - } - }, - "provider-id": { - "type": "string" - }, - "public": { - "type": "boolean" - }, - "space-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "cidrs", - "space-tag", - "public" - ] - }, - "CreateSpacesParams": { - "type": "object", - "properties": { - "spaces": { - "type": "array", - "items": { - "$ref": "#/definitions/CreateSpaceParams" - } - } - }, - "additionalProperties": false, - "required": [ - "spaces" - ] - }, - "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": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ListSpacesResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/Space" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "MoveSubnetsParam": { - "type": "object", - "properties": { - "force": { - "type": "boolean" - }, - "space-tag": { - "type": "string" - }, - "subnets": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "subnets", - "space-tag", - "force" - ] - }, - "MoveSubnetsParams": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/MoveSubnetsParam" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "MoveSubnetsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "moved-subnets": { - "type": "array", - "items": { - "$ref": "#/definitions/MovedSubnet" - } - }, - "new-space": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "new-space" - ] - }, - "MoveSubnetsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/MoveSubnetsResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "MovedSubnet": { - "type": "object", - "properties": { - "cidr": { - "type": "string" - }, - "old-space": { - "type": "string" - }, - "subnet": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "subnet", - "old-space", - "cidr" - ] - }, - "RemoveSpaceParam": { - "type": "object", - "properties": { - "dry-run": { - "type": "boolean" - }, - "force": { - "type": "boolean" - }, - "space": { - "$ref": "#/definitions/Entity" - } - }, - "additionalProperties": false, - "required": [ - "space" - ] - }, - "RemoveSpaceParams": { - "type": "object", - "properties": { - "space-param": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoveSpaceParam" - } - } - }, - "additionalProperties": false, - "required": [ - "space-param" - ] - }, - "RemoveSpaceResult": { - "type": "object", - "properties": { - "bindings": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } - }, - "constraints": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } - }, - "controller-settings": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "RemoveSpaceResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoveSpaceResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "RenameSpaceParams": { - "type": "object", - "properties": { - "from-space-tag": { - "type": "string" - }, - "to-space-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "from-space-tag", - "to-space-tag" - ] - }, - "RenameSpacesParams": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "$ref": "#/definitions/RenameSpaceParams" - } - } - }, - "additionalProperties": false, - "required": [ - "changes" - ] - }, - "ShowSpaceResult": { - "type": "object", - "properties": { - "applications": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "machine-count": { - "type": "integer" - }, - "space": { - "$ref": "#/definitions/Space" - } - }, - "additionalProperties": false, - "required": [ - "space", - "applications", - "machine-count" - ] - }, - "ShowSpaceResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ShowSpaceResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "Space": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "subnets": { - "type": "array", - "items": { - "$ref": "#/definitions/Subnet" - } - } - }, - "additionalProperties": false, - "required": [ - "id", - "name", - "subnets" - ] - }, - "Subnet": { - "type": "object", - "properties": { - "cidr": { - "type": "string" - }, - "life": { - "type": "string" - }, - "provider-id": { - "type": "string" - }, - "provider-network-id": { - "type": "string" - }, - "provider-space-id": { - "type": "string" - }, - "space-tag": { - "type": "string" - }, - "status": { - "type": "string" - }, - "vlan-tag": { - "type": "integer" - }, - "zones": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "cidr", - "vlan-tag", - "life", - "space-tag", - "zones" - ] - } - } - } - }, - { - "Name": "StatusHistory", - "Description": "API is the concrete implementation of the Pruner endpoint.", - "Version": 2, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "ModelConfig": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ModelConfigResult" - } - }, - "description": "ModelConfig returns the current model's configuration." - }, - "Prune": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/StatusHistoryPruneArgs" - } - }, - "description": "Prune endpoint removes status history entries until\nonly the ones newer than now - p.MaxHistoryTime remain and\nthe history is smaller than p.MaxHistoryMB." - }, - "WatchForModelConfigChanges": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResult" - } - }, - "description": "WatchForModelConfigChanges returns a NotifyWatcher that observes\nchanges to the model configuration.\nNote that although the NotifyWatchResult contains an Error field,\nit's not used because we are only returning a single watcher,\nso we use the regular error return." - } - }, - "definitions": { - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ModelConfigResult": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "StatusHistoryPruneArgs": { - "type": "object", - "properties": { - "max-history-mb": { - "type": "integer" - }, - "max-history-time": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "max-history-time", - "max-history-mb" - ] - } - } - } - }, - { - "Name": "Storage", - "Description": "StorageAPI implements the latest version (v6) of the Storage API.", - "Version": 6, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "AddToUnit": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/StoragesAddParams" - }, - "Result": { - "$ref": "#/definitions/AddStorageResults" - } - }, - "description": "AddToUnit validates and creates additional storage instances for units.\nA \"CHANGE\" block can block this operation." - }, - "Attach": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/StorageAttachmentIds" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "Attach attaches existing storage instances to units.\nA \"CHANGE\" block can block this operation." - }, - "CreatePool": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/StoragePoolArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "CreatePool creates a new pool with specified parameters." - }, - "DetachStorage": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/StorageDetachmentParams" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "DetachStorage sets the specified storage attachments to Dying, unless they are\nalready Dying or Dead. Any associated, persistent storage will remain\nalive. This call can be forced." - }, - "Import": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/BulkImportStorageParams" - }, - "Result": { - "$ref": "#/definitions/ImportStorageResults" - } - }, - "description": "Import imports existing storage into the model.\nA \"CHANGE\" block can block this operation." - }, - "ListFilesystems": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/FilesystemFilters" - }, - "Result": { - "$ref": "#/definitions/FilesystemDetailsListResults" - } - }, - "description": "ListFilesystems returns a list of filesystems in the environment matching\nthe provided filter. Each result describes a filesystem in detail, including\nthe filesystem's attachments." - }, - "ListPools": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/StoragePoolFilters" - }, - "Result": { - "$ref": "#/definitions/StoragePoolsResults" - } - }, - "description": "ListPools returns a list of pools.\nIf filter is provided, returned list only contains pools that match\nthe filter.\nPools can be filtered on names and provider types.\nIf both names and types are provided as filter,\npools that match either are returned.\nThis method lists union of pools and environment provider types.\nIf no filter is provided, all pools are returned." - }, - "ListStorageDetails": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/StorageFilters" - }, - "Result": { - "$ref": "#/definitions/StorageDetailsListResults" - } - }, - "description": "ListStorageDetails returns storage matching a filter." - }, - "ListVolumes": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/VolumeFilters" - }, - "Result": { - "$ref": "#/definitions/VolumeDetailsListResults" - } - }, - "description": "ListVolumes lists volumes with the given filters. Each filter produces\nan independent list of volumes, or an error if the filter is invalid\nor the volumes could not be listed." - }, - "Remove": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RemoveStorage" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "Remove sets the specified storage entities to Dying, unless they are\nalready Dying or Dead, such that the storage will eventually be removed\nfrom the model. If the arguments specify that the storage should be\ndestroyed, then the associated cloud storage will be destroyed first;\notherwise it will only be released from Juju's control." - }, - "RemovePool": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/StoragePoolDeleteArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "RemovePool deletes the named pool" - }, - "StorageDetails": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StorageDetailsResults" - } - }, - "description": "StorageDetails retrieves and returns detailed information about desired\nstorage identified by supplied tags. If specified storage cannot be\nretrieved, individual error is returned instead of storage information." - }, - "UpdatePool": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/StoragePoolArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "UpdatePool deletes the named pool" - } - }, - "definitions": { - "AddStorageDetails": { - "type": "object", - "properties": { - "storage-tags": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "storage-tags" - ] - }, - "AddStorageResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/AddStorageDetails" - } - }, - "additionalProperties": false - }, - "AddStorageResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/AddStorageResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "BulkImportStorageParams": { - "type": "object", - "properties": { - "storage": { - "type": "array", - "items": { - "$ref": "#/definitions/ImportStorageParams" - } - } - }, - "additionalProperties": false, - "required": [ - "storage" - ] - }, - "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" - ] - }, - "EntityStatus": { - "type": "object", - "properties": { - "data": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "info": { - "type": "string" - }, - "since": { - "type": "string", - "format": "date-time" - }, - "status": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "status", - "info", - "since" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "FilesystemAttachmentDetails": { - "type": "object", - "properties": { - "FilesystemAttachmentInfo": { - "$ref": "#/definitions/FilesystemAttachmentInfo" - }, - "life": { - "type": "string" - }, - "mount-point": { - "type": "string" - }, - "read-only": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "FilesystemAttachmentInfo" - ] - }, - "FilesystemAttachmentInfo": { - "type": "object", - "properties": { - "mount-point": { - "type": "string" - }, - "read-only": { - "type": "boolean" - } - }, - "additionalProperties": false - }, - "FilesystemDetails": { - "type": "object", - "properties": { - "filesystem-tag": { - "type": "string" - }, - "info": { - "$ref": "#/definitions/FilesystemInfo" - }, - "life": { - "type": "string" - }, - "machine-attachments": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/FilesystemAttachmentDetails" - } - } - }, - "status": { - "$ref": "#/definitions/EntityStatus" - }, - "storage": { - "$ref": "#/definitions/StorageDetails" - }, - "unit-attachments": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/FilesystemAttachmentDetails" - } - } - }, - "volume-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "filesystem-tag", - "info", - "status" - ] - }, - "FilesystemDetailsListResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "array", - "items": { - "$ref": "#/definitions/FilesystemDetails" - } - } - }, - "additionalProperties": false - }, - "FilesystemDetailsListResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/FilesystemDetailsListResult" - } - } - }, - "additionalProperties": false - }, - "FilesystemFilter": { - "type": "object", - "properties": { - "machines": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "FilesystemFilters": { - "type": "object", - "properties": { - "filters": { - "type": "array", - "items": { - "$ref": "#/definitions/FilesystemFilter" - } - } - }, - "additionalProperties": false - }, - "FilesystemInfo": { - "type": "object", - "properties": { - "filesystem-id": { - "type": "string" - }, - "pool": { - "type": "string" - }, - "size": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "filesystem-id", - "pool", - "size" - ] - }, - "ImportStorageDetails": { - "type": "object", - "properties": { - "storage-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "storage-tag" - ] - }, - "ImportStorageParams": { - "type": "object", - "properties": { - "kind": { - "type": "integer" - }, - "pool": { - "type": "string" - }, - "provider-id": { - "type": "string" - }, - "storage-name": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "kind", - "pool", - "provider-id", - "storage-name" - ] - }, - "ImportStorageResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/ImportStorageDetails" - } - }, - "additionalProperties": false - }, - "ImportStorageResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ImportStorageResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "RemoveStorage": { - "type": "object", - "properties": { - "storage": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoveStorageInstance" - } - } - }, - "additionalProperties": false, - "required": [ - "storage" - ] - }, - "RemoveStorageInstance": { - "type": "object", - "properties": { - "destroy-attachments": { - "type": "boolean" - }, - "destroy-storage": { - "type": "boolean" - }, - "force": { - "type": "boolean" - }, - "max-wait": { - "type": "integer" - }, - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag" - ] - }, - "StorageAddParams": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "storage": { - "$ref": "#/definitions/StorageConstraints" - }, - "unit": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "unit", - "name", - "storage" - ] - }, - "StorageAttachmentDetails": { - "type": "object", - "properties": { - "life": { - "type": "string" - }, - "location": { - "type": "string" - }, - "machine-tag": { - "type": "string" - }, - "storage-tag": { - "type": "string" - }, - "unit-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "storage-tag", - "unit-tag", - "machine-tag" - ] - }, - "StorageAttachmentId": { - "type": "object", - "properties": { - "storage-tag": { - "type": "string" - }, - "unit-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "storage-tag", - "unit-tag" - ] - }, - "StorageAttachmentIds": { - "type": "object", - "properties": { - "ids": { - "type": "array", - "items": { - "$ref": "#/definitions/StorageAttachmentId" - } - } - }, - "additionalProperties": false, - "required": [ - "ids" - ] - }, - "StorageConstraints": { - "type": "object", - "properties": { - "count": { - "type": "integer" - }, - "pool": { - "type": "string" - }, - "size": { - "type": "integer" - } - }, - "additionalProperties": false - }, - "StorageDetachmentParams": { - "type": "object", - "properties": { - "force": { - "type": "boolean" - }, - "ids": { - "$ref": "#/definitions/StorageAttachmentIds" - }, - "max-wait": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "ids" - ] - }, - "StorageDetails": { - "type": "object", - "properties": { - "attachments": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/StorageAttachmentDetails" - } - } - }, - "kind": { - "type": "integer" - }, - "life": { - "type": "string" - }, - "owner-tag": { - "type": "string" - }, - "persistent": { - "type": "boolean" - }, - "status": { - "$ref": "#/definitions/EntityStatus" - }, - "storage-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "storage-tag", - "owner-tag", - "kind", - "status", - "persistent" - ] - }, - "StorageDetailsListResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "array", - "items": { - "$ref": "#/definitions/StorageDetails" - } - } - }, - "additionalProperties": false - }, - "StorageDetailsListResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StorageDetailsListResult" - } - } - }, - "additionalProperties": false - }, - "StorageDetailsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/StorageDetails" - } - }, - "additionalProperties": false - }, - "StorageDetailsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StorageDetailsResult" - } - } - }, - "additionalProperties": false - }, - "StorageFilter": { - "type": "object", - "additionalProperties": false - }, - "StorageFilters": { - "type": "object", - "properties": { - "filters": { - "type": "array", - "items": { - "$ref": "#/definitions/StorageFilter" - } - } - }, - "additionalProperties": false - }, - "StoragePool": { - "type": "object", - "properties": { - "attrs": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "name": { - "type": "string" - }, - "provider": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "provider", - "attrs" - ] - }, - "StoragePoolArgs": { - "type": "object", - "properties": { - "pools": { - "type": "array", - "items": { - "$ref": "#/definitions/StoragePool" - } - } - }, - "additionalProperties": false, - "required": [ - "pools" - ] - }, - "StoragePoolDeleteArg": { - "type": "object", - "properties": { - "name": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name" - ] - }, - "StoragePoolDeleteArgs": { - "type": "object", - "properties": { - "pools": { - "type": "array", - "items": { - "$ref": "#/definitions/StoragePoolDeleteArg" - } - } - }, - "additionalProperties": false, - "required": [ - "pools" - ] - }, - "StoragePoolFilter": { - "type": "object", - "properties": { - "names": { - "type": "array", - "items": { - "type": "string" - } - }, - "providers": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "StoragePoolFilters": { - "type": "object", - "properties": { - "filters": { - "type": "array", - "items": { - "$ref": "#/definitions/StoragePoolFilter" - } - } - }, - "additionalProperties": false - }, - "StoragePoolsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "storage-pools": { - "type": "array", - "items": { - "$ref": "#/definitions/StoragePool" - } - } - }, - "additionalProperties": false - }, - "StoragePoolsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StoragePoolsResult" - } - } - }, - "additionalProperties": false - }, - "StoragesAddParams": { - "type": "object", - "properties": { - "storages": { - "type": "array", - "items": { - "$ref": "#/definitions/StorageAddParams" - } - } - }, - "additionalProperties": false, - "required": [ - "storages" - ] - }, - "VolumeAttachmentDetails": { - "type": "object", - "properties": { - "VolumeAttachmentInfo": { - "$ref": "#/definitions/VolumeAttachmentInfo" - }, - "bus-address": { - "type": "string" - }, - "device-link": { - "type": "string" - }, - "device-name": { - "type": "string" - }, - "life": { - "type": "string" - }, - "plan-info": { - "$ref": "#/definitions/VolumeAttachmentPlanInfo" - }, - "read-only": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "VolumeAttachmentInfo" - ] - }, - "VolumeAttachmentInfo": { - "type": "object", - "properties": { - "bus-address": { - "type": "string" - }, - "device-link": { - "type": "string" - }, - "device-name": { - "type": "string" - }, - "plan-info": { - "$ref": "#/definitions/VolumeAttachmentPlanInfo" - }, - "read-only": { - "type": "boolean" - } - }, - "additionalProperties": false - }, - "VolumeAttachmentPlanInfo": { - "type": "object", - "properties": { - "device-attributes": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "device-type": { - "type": "string" - } - }, - "additionalProperties": false - }, - "VolumeDetails": { - "type": "object", - "properties": { - "info": { - "$ref": "#/definitions/VolumeInfo" - }, - "life": { - "type": "string" - }, - "machine-attachments": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/VolumeAttachmentDetails" - } - } - }, - "status": { - "$ref": "#/definitions/EntityStatus" - }, - "storage": { - "$ref": "#/definitions/StorageDetails" - }, - "unit-attachments": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/VolumeAttachmentDetails" - } - } - }, - "volume-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "volume-tag", - "info", - "status" - ] - }, - "VolumeDetailsListResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "array", - "items": { - "$ref": "#/definitions/VolumeDetails" - } - } - }, - "additionalProperties": false - }, - "VolumeDetailsListResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/VolumeDetailsListResult" - } - } - }, - "additionalProperties": false - }, - "VolumeFilter": { - "type": "object", - "properties": { - "machines": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "VolumeFilters": { - "type": "object", - "properties": { - "filters": { - "type": "array", - "items": { - "$ref": "#/definitions/VolumeFilter" - } - } - }, - "additionalProperties": false - }, - "VolumeInfo": { - "type": "object", - "properties": { - "hardware-id": { - "type": "string" - }, - "persistent": { - "type": "boolean" - }, - "pool": { - "type": "string" - }, - "size": { - "type": "integer" - }, - "volume-id": { - "type": "string" - }, - "wwn": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "volume-id", - "size", - "persistent" - ] - } - } - } - }, - { - "Name": "StorageProvisioner", - "Description": "StorageProvisionerAPIv4 provides the StorageProvisioner API v4 facade.", - "Version": 4, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "AttachmentLife": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/MachineStorageIds" - }, - "Result": { - "$ref": "#/definitions/LifeResults" - } - }, - "description": "AttachmentLife returns the lifecycle state of each specified machine\nstorage attachment." - }, - "CreateVolumeAttachmentPlans": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/VolumeAttachmentPlans" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - } - }, - "EnsureDead": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "EnsureDead calls EnsureDead on each given entity from state. It\nwill fail if the entity is not present. If it's Alive, nothing will\nhappen (see state/EnsureDead() for units or machines)." - }, - "FilesystemAttachmentParams": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/MachineStorageIds" - }, - "Result": { - "$ref": "#/definitions/FilesystemAttachmentParamsResults" - } - }, - "description": "FilesystemAttachmentParams returns the parameters for creating the filesystem\nattachments with the specified IDs." - }, - "FilesystemAttachments": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/MachineStorageIds" - }, - "Result": { - "$ref": "#/definitions/FilesystemAttachmentResults" - } - }, - "description": "FilesystemAttachments returns details of filesystem attachments with the specified IDs." - }, - "FilesystemParams": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/FilesystemParamsResults" - } - }, - "description": "FilesystemParams returns the parameters for creating the filesystems\nwith the specified tags." - }, - "Filesystems": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/FilesystemResults" - } - }, - "description": "Filesystems returns details of filesystems with the specified tags." - }, - "InstanceId": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringResults" - } - }, - "description": "InstanceId returns the provider specific instance id for each given\nmachine or an CodeNotProvisioned error, if not set." - }, - "Life": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/LifeResults" - } - }, - "description": "Life returns the life status of every supplied entity, where available." - }, - "Remove": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "Remove removes volumes and filesystems from state." - }, - "RemoveAttachment": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/MachineStorageIds" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "RemoveAttachment removes the specified machine storage attachments\nfrom state." - }, - "RemoveFilesystemParams": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/RemoveFilesystemParamsResults" - } - }, - "description": "RemoveFilesystemParams returns the parameters for destroying or\nreleasing the filesystems with the specified tags." - }, - "RemoveVolumeAttachmentPlan": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/MachineStorageIds" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - } - }, - "RemoveVolumeParams": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/RemoveVolumeParamsResults" - } - }, - "description": "RemoveVolumeParams returns the parameters for destroying\nor releasing the volumes with the specified tags." - }, - "SetFilesystemAttachmentInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/FilesystemAttachments" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetFilesystemAttachmentInfo records the details of newly provisioned filesystem\nattachments." - }, - "SetFilesystemInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Filesystems" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetFilesystemInfo records the details of newly provisioned filesystems." - }, - "SetStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetStatus" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetStatus sets the status of each given entity." - }, - "SetVolumeAttachmentInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/VolumeAttachments" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetVolumeAttachmentInfo records the details of newly provisioned volume\nattachments." - }, - "SetVolumeAttachmentPlanBlockInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/VolumeAttachmentPlans" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - } - }, - "SetVolumeInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Volumes" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetVolumeInfo records the details of newly provisioned volumes." - }, - "VolumeAttachmentParams": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/MachineStorageIds" - }, - "Result": { - "$ref": "#/definitions/VolumeAttachmentParamsResults" - } - }, - "description": "VolumeAttachmentParams returns the parameters for creating the volume\nattachments with the specified IDs." - }, - "VolumeAttachmentPlans": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/MachineStorageIds" - }, - "Result": { - "$ref": "#/definitions/VolumeAttachmentPlanResults" - } - }, - "description": "VolumeAttachmentPlans returns details of volume attachment plans with the specified IDs." - }, - "VolumeAttachments": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/MachineStorageIds" - }, - "Result": { - "$ref": "#/definitions/VolumeAttachmentResults" - } - }, - "description": "VolumeAttachments returns details of volume attachments with the specified IDs." - }, - "VolumeBlockDevices": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/MachineStorageIds" - }, - "Result": { - "$ref": "#/definitions/BlockDeviceResults" - } - }, - "description": "VolumeBlockDevices returns details of the block devices corresponding to the\nvolume attachments with the specified IDs." - }, - "VolumeParams": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/VolumeParamsResults" - } - }, - "description": "VolumeParams returns the parameters for creating or destroying\nthe volumes with the specified tags." - }, - "Volumes": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/VolumeResults" - } - }, - "description": "Volumes returns details of volumes with the specified tags." - }, - "WatchApplications": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsWatchResult" - } - }, - "description": "WatchApplications starts a StringsWatcher to watch CAAS applications\ndeployed to this model." - }, - "WatchBlockDevices": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "WatchBlockDevices watches for changes to the specified machines' block devices." - }, - "WatchFilesystemAttachments": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/MachineStorageIdsWatchResults" - } - }, - "description": "WatchFilesystemAttachments watches for changes to filesystem attachments\nscoped to the entity with the tag passed to NewState." - }, - "WatchFilesystems": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - }, - "description": "WatchFilesystems watches for changes to filesystems scoped\nto the entity with the tag passed to NewState." - }, - "WatchMachines": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "WatchMachines watches for changes to the specified machines." - }, - "WatchVolumeAttachmentPlans": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/MachineStorageIdsWatchResults" - } - }, - "description": "WatchVolumeAttachmentPlans watches for changes to volume attachments for a machine for the purpose of allowing\nthat machine to run any initialization needed, for that volume to actually appear as a block device (ie: iSCSI)" - }, - "WatchVolumeAttachments": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/MachineStorageIdsWatchResults" - } - }, - "description": "WatchVolumeAttachments watches for changes to volume attachments scoped to\nthe entity with the tag passed to NewState." - }, - "WatchVolumes": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - }, - "description": "WatchVolumes watches for changes to volumes scoped to the\nentity with the tag passed to NewState." - } - }, - "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" - }, - "SerialId": { - "type": "string" - }, - "Size": { - "type": "integer" - }, - "UUID": { - "type": "string" - }, - "WWN": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "DeviceName", - "DeviceLinks", - "Label", - "UUID", - "HardwareId", - "WWN", - "BusAddress", - "Size", - "FilesystemType", - "InUse", - "MountPoint", - "SerialId" - ] - }, - "BlockDeviceResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/BlockDevice" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "BlockDeviceResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/BlockDeviceResult" - } - } - }, - "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" - ] - }, - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "Filesystem": { - "type": "object", - "properties": { - "filesystem-tag": { - "type": "string" - }, - "info": { - "$ref": "#/definitions/FilesystemInfo" - }, - "volume-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "filesystem-tag", - "info" - ] - }, - "FilesystemAttachment": { - "type": "object", - "properties": { - "filesystem-tag": { - "type": "string" - }, - "info": { - "$ref": "#/definitions/FilesystemAttachmentInfo" - }, - "machine-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "filesystem-tag", - "machine-tag", - "info" - ] - }, - "FilesystemAttachmentInfo": { - "type": "object", - "properties": { - "mount-point": { - "type": "string" - }, - "read-only": { - "type": "boolean" - } - }, - "additionalProperties": false - }, - "FilesystemAttachmentParams": { - "type": "object", - "properties": { - "filesystem-id": { - "type": "string" - }, - "filesystem-tag": { - "type": "string" - }, - "instance-id": { - "type": "string" - }, - "machine-tag": { - "type": "string" - }, - "mount-point": { - "type": "string" - }, - "provider": { - "type": "string" - }, - "read-only": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "filesystem-tag", - "machine-tag", - "provider" - ] - }, - "FilesystemAttachmentParamsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/FilesystemAttachmentParams" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "FilesystemAttachmentParamsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/FilesystemAttachmentParamsResult" - } - } - }, - "additionalProperties": false - }, - "FilesystemAttachmentResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/FilesystemAttachment" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "FilesystemAttachmentResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/FilesystemAttachmentResult" - } - } - }, - "additionalProperties": false - }, - "FilesystemAttachments": { - "type": "object", - "properties": { - "filesystem-attachments": { - "type": "array", - "items": { - "$ref": "#/definitions/FilesystemAttachment" - } - } - }, - "additionalProperties": false, - "required": [ - "filesystem-attachments" - ] - }, - "FilesystemInfo": { - "type": "object", - "properties": { - "filesystem-id": { - "type": "string" - }, - "pool": { - "type": "string" - }, - "size": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "filesystem-id", - "pool", - "size" - ] - }, - "FilesystemParams": { - "type": "object", - "properties": { - "attachment": { - "$ref": "#/definitions/FilesystemAttachmentParams" - }, - "attributes": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "filesystem-tag": { - "type": "string" - }, - "provider": { - "type": "string" - }, - "size": { - "type": "integer" - }, - "tags": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "volume-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "filesystem-tag", - "size", - "provider" - ] - }, - "FilesystemParamsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/FilesystemParams" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "FilesystemParamsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/FilesystemParamsResult" - } - } - }, - "additionalProperties": false - }, - "FilesystemResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/Filesystem" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "FilesystemResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/FilesystemResult" - } - } - }, - "additionalProperties": false - }, - "Filesystems": { - "type": "object", - "properties": { - "filesystems": { - "type": "array", - "items": { - "$ref": "#/definitions/Filesystem" - } - } - }, - "additionalProperties": false, - "required": [ - "filesystems" - ] - }, - "LifeResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "life": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "life" - ] - }, - "LifeResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/LifeResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "MachineStorageId": { - "type": "object", - "properties": { - "attachment-tag": { - "type": "string" - }, - "machine-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "machine-tag", - "attachment-tag" - ] - }, - "MachineStorageIds": { - "type": "object", - "properties": { - "ids": { - "type": "array", - "items": { - "$ref": "#/definitions/MachineStorageId" - } - } - }, - "additionalProperties": false, - "required": [ - "ids" - ] - }, - "MachineStorageIdsWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "$ref": "#/definitions/MachineStorageId" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id", - "changes" - ] - }, - "MachineStorageIdsWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/MachineStorageIdsWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "NotifyWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "RemoveFilesystemParams": { - "type": "object", - "properties": { - "destroy": { - "type": "boolean" - }, - "filesystem-id": { - "type": "string" - }, - "provider": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "provider", - "filesystem-id" - ] - }, - "RemoveFilesystemParamsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/RemoveFilesystemParams" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "RemoveFilesystemParamsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoveFilesystemParamsResult" - } - } - }, - "additionalProperties": false - }, - "RemoveVolumeParams": { - "type": "object", - "properties": { - "destroy": { - "type": "boolean" - }, - "provider": { - "type": "string" - }, - "volume-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "provider", - "volume-id" - ] - }, - "RemoveVolumeParamsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/RemoveVolumeParams" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "RemoveVolumeParamsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoveVolumeParamsResult" - } - } - }, - "additionalProperties": false - }, - "SetStatus": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityStatusArgs" - } - } - }, - "additionalProperties": false, - "required": [ - "entities" - ] - }, - "StringResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "StringResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "StringsWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id" - ] - }, - "StringsWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringsWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "Volume": { - "type": "object", - "properties": { - "info": { - "$ref": "#/definitions/VolumeInfo" - }, - "volume-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "volume-tag", - "info" - ] - }, - "VolumeAttachment": { - "type": "object", - "properties": { - "info": { - "$ref": "#/definitions/VolumeAttachmentInfo" - }, - "machine-tag": { - "type": "string" - }, - "volume-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "volume-tag", - "machine-tag", - "info" - ] - }, - "VolumeAttachmentInfo": { - "type": "object", - "properties": { - "bus-address": { - "type": "string" - }, - "device-link": { - "type": "string" - }, - "device-name": { - "type": "string" - }, - "plan-info": { - "$ref": "#/definitions/VolumeAttachmentPlanInfo" - }, - "read-only": { - "type": "boolean" - } - }, - "additionalProperties": false - }, - "VolumeAttachmentParams": { - "type": "object", - "properties": { - "instance-id": { - "type": "string" - }, - "machine-tag": { - "type": "string" - }, - "provider": { - "type": "string" - }, - "read-only": { - "type": "boolean" - }, - "volume-id": { - "type": "string" - }, - "volume-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "volume-tag", - "machine-tag", - "provider" - ] - }, - "VolumeAttachmentParamsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/VolumeAttachmentParams" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "VolumeAttachmentParamsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/VolumeAttachmentParamsResult" - } - } - }, - "additionalProperties": false - }, - "VolumeAttachmentPlan": { - "type": "object", - "properties": { - "block-device": { - "$ref": "#/definitions/BlockDevice" - }, - "life": { - "type": "string" - }, - "machine-tag": { - "type": "string" - }, - "plan-info": { - "$ref": "#/definitions/VolumeAttachmentPlanInfo" - }, - "volume-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "volume-tag", - "machine-tag", - "plan-info" - ] - }, - "VolumeAttachmentPlanInfo": { - "type": "object", - "properties": { - "device-attributes": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "device-type": { - "type": "string" - } - }, - "additionalProperties": false - }, - "VolumeAttachmentPlanResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/VolumeAttachmentPlan" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "VolumeAttachmentPlanResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/VolumeAttachmentPlanResult" - } - } - }, - "additionalProperties": false - }, - "VolumeAttachmentPlans": { - "type": "object", - "properties": { - "volume-plans": { - "type": "array", - "items": { - "$ref": "#/definitions/VolumeAttachmentPlan" - } - } - }, - "additionalProperties": false, - "required": [ - "volume-plans" - ] - }, - "VolumeAttachmentResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/VolumeAttachment" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "VolumeAttachmentResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/VolumeAttachmentResult" - } - } - }, - "additionalProperties": false - }, - "VolumeAttachments": { - "type": "object", - "properties": { - "volume-attachments": { - "type": "array", - "items": { - "$ref": "#/definitions/VolumeAttachment" - } - } - }, - "additionalProperties": false, - "required": [ - "volume-attachments" - ] - }, - "VolumeInfo": { - "type": "object", - "properties": { - "hardware-id": { - "type": "string" - }, - "persistent": { - "type": "boolean" - }, - "pool": { - "type": "string" - }, - "size": { - "type": "integer" - }, - "volume-id": { - "type": "string" - }, - "wwn": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "volume-id", - "size", - "persistent" - ] - }, - "VolumeParams": { - "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" - } - } - }, - "volume-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "volume-tag", - "size", - "provider" - ] - }, - "VolumeParamsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/VolumeParams" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "VolumeParamsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/VolumeParamsResult" - } - } - }, - "additionalProperties": false - }, - "VolumeResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/Volume" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "VolumeResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/VolumeResult" - } - } - }, - "additionalProperties": false - }, - "Volumes": { - "type": "object", - "properties": { - "volumes": { - "type": "array", - "items": { - "$ref": "#/definitions/Volume" - } - } - }, - "additionalProperties": false, - "required": [ - "volumes" - ] - } - } - } - }, - { - "Name": "StringsWatcher", - "Description": "srvStringsWatcher defines the API for methods on a state.StringsWatcher.\nEach client has its own current set of watchers, stored in resources.\nsrvStringsWatcher notifies about changes for all entities of a given kind,\nsending the changes as a list of strings.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "Next": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsWatchResult" - } - }, - "description": "Next returns when a change has occurred to an entity of the\ncollection being watched since the most recent call to Next\nor the Watch call that created the srvStringsWatcher." - }, - "Stop": { - "type": "object", - "description": "Stop stops the watcher." - } - }, - "definitions": { - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "StringsWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id" - ] - } - } - } - }, - { - "Name": "Subnets", - "Description": "API provides the subnets API facade for version 5.", - "Version": 5, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "AllZones": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ZoneResults" - } - }, - "description": "AllZones returns all availability zones known to Juju. If a\nzone is unusable, unavailable, or deprecated the Available\nfield will be false." - }, - "ListSubnets": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SubnetsFilters" - }, - "Result": { - "$ref": "#/definitions/ListSubnetsResults" - } - }, - "description": "ListSubnets returns the matching subnets after applying\noptional filters." - }, - "SubnetsByCIDR": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/CIDRParams" - }, - "Result": { - "$ref": "#/definitions/SubnetsResults" - } - }, - "description": "SubnetsByCIDR returns the collection of subnets matching each CIDR in the input." - } - }, - "definitions": { - "CIDRParams": { - "type": "object", - "properties": { - "cidrs": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "cidrs" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ListSubnetsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/Subnet" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "Subnet": { - "type": "object", - "properties": { - "cidr": { - "type": "string" - }, - "life": { - "type": "string" - }, - "provider-id": { - "type": "string" - }, - "provider-network-id": { - "type": "string" - }, - "provider-space-id": { - "type": "string" - }, - "space-tag": { - "type": "string" - }, - "status": { - "type": "string" - }, - "vlan-tag": { - "type": "integer" - }, - "zones": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "cidr", - "vlan-tag", - "life", - "space-tag", - "zones" - ] - }, - "SubnetV2": { - "type": "object", - "properties": { - "Subnet": { - "$ref": "#/definitions/Subnet" - }, - "cidr": { - "type": "string" - }, - "id": { - "type": "string" - }, - "life": { - "type": "string" - }, - "provider-id": { - "type": "string" - }, - "provider-network-id": { - "type": "string" - }, - "provider-space-id": { - "type": "string" - }, - "space-tag": { - "type": "string" - }, - "status": { - "type": "string" - }, - "vlan-tag": { - "type": "integer" - }, - "zones": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "cidr", - "vlan-tag", - "life", - "space-tag", - "zones", - "Subnet" - ] - }, - "SubnetsFilters": { - "type": "object", - "properties": { - "space-tag": { - "type": "string" - }, - "zone": { - "type": "string" - } - }, - "additionalProperties": false - }, - "SubnetsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "subnets": { - "type": "array", - "items": { - "$ref": "#/definitions/SubnetV2" - } - } - }, - "additionalProperties": false - }, - "SubnetsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/SubnetsResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ZoneResult": { - "type": "object", - "properties": { - "available": { - "type": "boolean" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "name": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "available" - ] - }, - "ZoneResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ZoneResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - } - } - } - }, - { - "Name": "Undertaker", - "Description": "UndertakerAPI implements the API used by the model undertaker worker.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "ModelConfig": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ModelConfigResult" - } - }, - "description": "ModelConfig returns the model's configuration." - }, - "ModelInfo": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/UndertakerModelInfoResult" - } - }, - "description": "ModelInfo returns information on the model needed by the undertaker worker." - }, - "ProcessDyingModel": { - "type": "object", - "description": "ProcessDyingModel checks if a dying model has any machines or applications.\nIf there are none, the model's life is changed from dying to dead." - }, - "RemoveModel": { - "type": "object", - "description": "RemoveModel removes any records of this model from Juju." - }, - "SetStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetStatus" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetStatus sets the status of each given entity." - }, - "WatchModelResources": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "WatchModelResources creates watchers for changes to the lifecycle of an\nmodel's machines and applications and storage." - } - }, - "definitions": { - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ModelConfigResult": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "NotifyWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "SetStatus": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityStatusArgs" - } - } - }, - "additionalProperties": false, - "required": [ - "entities" - ] - }, - "UndertakerModelInfo": { - "type": "object", - "properties": { - "destroy-timeout": { - "type": "integer" - }, - "force-destroyed": { - "type": "boolean" - }, - "global-name": { - "type": "string" - }, - "is-system": { - "type": "boolean" - }, - "life": { - "type": "string" - }, - "name": { - "type": "string" - }, - "uuid": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "uuid", - "name", - "global-name", - "is-system", - "life" - ] - }, - "UndertakerModelInfoResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/UndertakerModelInfo" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - } - } - } - }, - { - "Name": "UnitAssigner", - "Description": "API implements the functionality for assigning units to machines.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "AssignUnits": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "AssignUnits assigns the units with the given ids to the correct machine. The\nerror results are returned in the same order as the given entities." - }, - "SetAgentStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetStatus" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetAgentStatus will set status for agents of Units passed in args, if one\nof the args is not an Unit it will fail." - }, - "WatchUnitAssignments": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsWatchResult" - } - }, - "description": "WatchUnitAssignments returns a strings watcher that is notified when new unit\nassignments are added to the db." - } - }, - "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" - ] - }, - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "SetStatus": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityStatusArgs" - } - } - }, - "additionalProperties": false, - "required": [ - "entities" - ] - }, - "StringsWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id" - ] - } - } - } - }, - { - "Name": "Uniter", - "Description": "UniterAPI implements the latest version (v18) of the Uniter API.", - "Version": 18, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "APIAddresses": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsResult" - } - }, - "description": "APIAddresses returns the list of addresses used to connect to the API." - }, - "APIHostPorts": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/APIHostPortsResult" - } - }, - "description": "APIHostPorts returns the API server addresses." - }, - "ActionStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringResults" - } - }, - "description": "ActionStatus returns the status of Actions by Tags passed in." - }, - "Actions": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ActionResults" - } - }, - "description": "Actions returns the Actions by Tags passed and ensures that the Unit asking\nfor them is the same Unit that has the Actions." - }, - "AddMetricBatches": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/MetricBatchParams" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "AddMetricBatches adds the metrics for the specified unit." - }, - "ApplicationStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ApplicationStatusResults" - } - }, - "description": "ApplicationStatus returns the status of the Applications and its workloads\nif the given unit is the leader." - }, - "AssignedMachine": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringResults" - } - }, - "description": "AssignedMachine returns the machine tag for each given unit tag, or\nan error satisfying params.IsCodeNotAssigned when a unit has no\nassigned machine." - }, - "AvailabilityZone": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringResults" - } - }, - "description": "AvailabilityZone returns the availability zone for each given unit, if applicable." - }, - "BeginActions": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "BeginActions marks the actions represented by the passed in Tags as running." - }, - "CanApplyLXDProfile": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/BoolResults" - } - }, - "description": "CanApplyLXDProfile is a shim to call the LXDProfileAPIv2 version of this method." - }, - "CharmArchiveSha256": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/CharmURLs" - }, - "Result": { - "$ref": "#/definitions/StringResults" - } - }, - "description": "CharmArchiveSha256 returns the SHA256 digest of the charm archive\n(bundle) data for each charm url in the given parameters." - }, - "CharmModifiedVersion": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/IntResults" - } - }, - "description": "CharmModifiedVersion returns the most CharmModifiedVersion for all given\nunits or applications." - }, - "CharmURL": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringBoolResults" - } - }, - "description": "CharmURL returns the charm URL for all given units or applications." - }, - "ClearResolved": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "ClearResolved removes any resolved setting from each given unit." - }, - "CloudAPIVersion": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringResult" - } - }, - "description": "CloudAPIVersion returns the cloud API version, if available." - }, - "CloudSpec": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/CloudSpecResult" - } - }, - "description": "CloudSpec returns the cloud spec used by the model in which the\nauthenticated unit or application resides.\nA check is made beforehand to ensure that the request is made by an entity\nthat has been granted the appropriate trust." - }, - "CommitHookChanges": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/CommitHookChangesArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "CommitHookChanges batches together all required API calls for applying\na set of changes after a hook successfully completes and executes them in a\nsingle transaction." - }, - "ConfigSettings": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ConfigSettingsResults" - } - }, - "description": "ConfigSettings returns the complete set of application charm config\nsettings available to each given unit." - }, - "CreateSecretURIs": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/CreateSecretURIsArg" - }, - "Result": { - "$ref": "#/definitions/StringResults" - } - }, - "description": "CreateSecretURIs creates new secret URIs." - }, - "CreateSecrets": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/CreateSecretArgs" - }, - "Result": { - "$ref": "#/definitions/StringResults" - } - }, - "description": "CreateSecrets creates new secrets." - }, - "CurrentModel": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ModelResult" - } - }, - "description": "CurrentModel returns the name and UUID for the current juju model." - }, - "Destroy": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "Destroy advances all given Alive units' lifecycles as far as\npossible. See state/Unit.Destroy()." - }, - "DestroyAllSubordinates": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "DestroyAllSubordinates destroys all subordinates of each given unit." - }, - "DestroyUnitStorageAttachments": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "DestroyUnitStorageAttachments marks each storage attachment of the\nspecified units as Dying." - }, - "EnsureDead": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "EnsureDead calls EnsureDead on each given entity from state. It\nwill fail if the entity is not present. If it's Alive, nothing will\nhappen (see state/EnsureDead() for units or machines)." - }, - "EnterScope": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RelationUnits" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "EnterScope ensures each unit has entered its scope in the relation,\nfor all of the given relation/unit pairs. See also\nstate.RelationUnit.EnterScope()." - }, - "FinishActions": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ActionExecutionResults" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "FinishActions saves the result of a completed Action" - }, - "GetConsumerSecretsRevisionInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/GetSecretConsumerInfoArgs" - }, - "Result": { - "$ref": "#/definitions/SecretConsumerInfoResults" - } - }, - "description": "GetConsumerSecretsRevisionInfo returns the latest secret revisions for the specified secrets." - }, - "GetMeterStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/MeterStatusResults" - } - } - }, - "GetPodSpec": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringResults" - } - }, - "description": "GetPodSpec gets the pod specs for a set of applications." - }, - "GetPrincipal": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringBoolResults" - } - }, - "description": "GetPrincipal returns the result of calling PrincipalName() and\nconverting it to a tag, on each given unit." - }, - "GetRawK8sSpec": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringResults" - } - }, - "description": "GetRawK8sSpec gets the raw k8s specs for a set of applications." - }, - "GetSecretBackendConfig": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/SecretBackendConfigResults" - } - }, - "description": "GetSecretBackendConfig gets the config needed to create a client to secret backends." - }, - "GetSecretContentInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/GetSecretContentArgs" - }, - "Result": { - "$ref": "#/definitions/SecretContentResults" - } - }, - "description": "GetSecretContentInfo returns the secret values for the specified secrets." - }, - "GetSecretMetadata": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ListSecretResults" - } - }, - "description": "GetSecretMetadata returns metadata for the caller's secrets." - }, - "GetSecretRevisionContentInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SecretRevisionArg" - }, - "Result": { - "$ref": "#/definitions/SecretContentResults" - } - }, - "description": "GetSecretRevisionContentInfo returns the secret values for the specified secret revisions." - }, - "GetSecretStoreConfig": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/SecretBackendConfig" - } - }, - "description": "GetSecretStoreConfig is for 3.0.x agents.\nTODO(wallyworld) - remove when we auto upgrade migrated models." - }, - "GoalStates": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/GoalStateResults" - } - }, - "description": "GoalStates returns information of charm units and relations." - }, - "HasSubordinates": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/BoolResults" - } - }, - "description": "HasSubordinates returns the whether each given unit has any subordinates." - }, - "LXDProfileName": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringResults" - } - }, - "description": "LXDProfileName is a shim to call the LXDProfileAPIv2 version of this method." - }, - "LXDProfileRequired": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/CharmURLs" - }, - "Result": { - "$ref": "#/definitions/BoolResults" - } - }, - "description": "LXDProfileRequired is a shim to call the LXDProfileAPIv2 version of this method." - }, - "LeaveScope": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RelationUnits" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "LeaveScope signals each unit has left its scope in the relation,\nfor all of the given relation/unit pairs. See also\nstate.RelationUnit.LeaveScope()." - }, - "Life": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/LifeResults" - } - }, - "description": "Life returns the life status of every supplied entity, where available." - }, - "LogActionsMessages": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ActionMessageParams" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "LogActionsMessages records the log messages against the specified actions." - }, - "Merge": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/MergeLeadershipSettingsBulkParams" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "Merge merges in the provided leadership settings. Only leaders for\nthe given service may perform this operation." - }, - "ModelConfig": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ModelConfigResult" - } - }, - "description": "ModelConfig returns the current model's configuration." - }, - "ModelUUID": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringResult" - } - }, - "description": "ModelUUID returns the model UUID that this unit resides in.\nIt is implemented here directly as a result of removing it from\nembedded APIAddresser *without* bumping the facade version.\nIt should be blanked when this facade version is next incremented." - }, - "NetworkInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/NetworkInfoParams" - }, - "Result": { - "$ref": "#/definitions/NetworkInfoResults" - } - }, - "description": "NetworkInfo returns network interfaces/addresses for specified bindings." - }, - "OpenedApplicationPortRangesByEndpoint": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entity" - }, - "Result": { - "$ref": "#/definitions/ApplicationOpenedPortsResults" - } - }, - "description": "OpenedApplicationPortRangesByEndpoint returns the port ranges opened by each\napplication grouped by application endpoint." - }, - "OpenedMachinePortRangesByEndpoint": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/OpenMachinePortRangesByEndpointResults" - } - }, - "description": "OpenedMachinePortRangesByEndpoint returns the port ranges opened by each\nunit on the provided machines grouped by application endpoint." - }, - "PrivateAddress": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringResults" - } - }, - "description": "PrivateAddress returns the private address for each given unit, if set." - }, - "ProviderType": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringResult" - } - }, - "description": "ProviderType returns the provider type used by the current juju\nmodel.\n\nTODO(dimitern): Refactor the uniter to call this instead of calling\nModelConfig() just to get the provider type. Once we have machine\naddresses, this might be completely unnecessary though." - }, - "PublicAddress": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringResults" - } - }, - "description": "PublicAddress returns the public address for each given unit, if set." - }, - "Read": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/GetLeadershipSettingsBulkResults" - } - }, - "description": "Read reads leadership settings for the provided service ID. Any\nunit of the service may perform this operation." - }, - "ReadLocalApplicationSettings": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RelationUnit" - }, - "Result": { - "$ref": "#/definitions/SettingsResult" - } - }, - "description": "ReadLocalApplicationSettings returns the local application settings for a\nparticular relation when invoked by the leader unit." - }, - "ReadRemoteSettings": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RelationUnitPairs" - }, - "Result": { - "$ref": "#/definitions/SettingsResults" - } - }, - "description": "ReadRemoteSettings returns the remote settings of each given set of\nrelation/local unit/remote unit." - }, - "ReadSettings": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RelationUnits" - }, - "Result": { - "$ref": "#/definitions/SettingsResults" - } - }, - "description": "ReadSettings returns the local settings of each given set of\nrelation/unit.\n\nNOTE(achilleasa): Using this call to read application data is deprecated\nand will not work for k8s charms (see LP1876097). Instead, clients should\nuse ReadLocalApplicationSettings." - }, - "Refresh": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/UnitRefreshResults" - } - }, - "description": "Refresh retrieves the latest values for attributes on this unit." - }, - "Relation": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RelationUnits" - }, - "Result": { - "$ref": "#/definitions/RelationResults" - } - }, - "description": "Relation returns information about all given relation/unit pairs,\nincluding their id, key and the local endpoint." - }, - "RelationById": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RelationIds" - }, - "Result": { - "$ref": "#/definitions/RelationResults" - } - }, - "description": "RelationById returns information about all given relations,\nspecified by their ids, including their key and the local\nendpoint." - }, - "RelationsStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/RelationUnitStatusResults" - } - }, - "description": "RelationsStatus returns for each unit the corresponding relation and status information." - }, - "RemoveSecrets": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/DeleteSecretArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "RemoveSecrets removes the specified secrets." - }, - "RemoveStorageAttachments": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/StorageAttachmentIds" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "RemoveStorageAttachments removes the specified storage\nattachments from state." - }, - "RequestReboot": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "RequestReboot sets the reboot flag on the provided machines" - }, - "Resolved": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ResolvedModeResults" - } - }, - "description": "Resolved returns the current resolved setting for each given unit." - }, - "SLALevel": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringResult" - } - }, - "description": "SLALevel returns the model's SLA level." - }, - "SecretsGrant": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/GrantRevokeSecretArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SecretsGrant grants access to a secret for the specified subjects." - }, - "SecretsRevoke": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/GrantRevokeSecretArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SecretsRevoke revokes access to a secret for the specified subjects." - }, - "SecretsRotated": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SecretRotatedArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SecretsRotated records when secrets were last rotated." - }, - "SetAgentStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetStatus" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetAgentStatus will set status for agents of Units passed in args, if one\nof the args is not an Unit it will fail." - }, - "SetApplicationStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetStatus" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetApplicationStatus sets the status for all the Applications in args if the given Unit is\nthe leader." - }, - "SetCharmURL": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/EntitiesCharmURL" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetCharmURL sets the charm URL for each given unit. An error will\nbe returned if a unit is dead, or the charm URL is not known." - }, - "SetRelationStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RelationStatusArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetRelationStatus updates the status of the specified relations." - }, - "SetState": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetUnitStateArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetState sets the state persisted by the charm running in this unit\nand the state internal to the uniter for this unit." - }, - "SetStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetStatus" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetStatus will set status for a entities passed in args. If the entity is\na Unit it will instead set status to its agent, to emulate backwards\ncompatibility." - }, - "SetUnitStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetStatus" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetUnitStatus sets status for all elements passed in args, the difference\nwith SetStatus is that if an entity is a Unit it will set its status instead\nof its agent." - }, - "SetUpgradeSeriesUnitStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/UpgradeSeriesStatusParams" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetUpgradeSeriesUnitStatus sets the upgrade series status of the unit.\nIf no upgrade is in progress an error is returned instead." - }, - "SetWorkloadVersion": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/EntityWorkloadVersions" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetWorkloadVersion sets the workload version for each given unit. An error will\nbe returned if a unit is dead." - }, - "State": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/UnitStateResults" - } - }, - "description": "State returns the state persisted by the charm running in this unit\nand the state internal to the uniter for this unit." - }, - "StorageAttachmentLife": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/StorageAttachmentIds" - }, - "Result": { - "$ref": "#/definitions/LifeResults" - } - }, - "description": "StorageAttachmentLife returns the lifecycle state of the storage attachments\nwith the specified tags." - }, - "StorageAttachments": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/StorageAttachmentIds" - }, - "Result": { - "$ref": "#/definitions/StorageAttachmentResults" - } - }, - "description": "StorageAttachments returns the storage attachments with the specified tags." - }, - "UnitStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StatusResults" - } - }, - "description": "UnitStatus returns the workload status information for the unit." - }, - "UnitStorageAttachments": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StorageAttachmentIdsResults" - } - }, - "description": "UnitStorageAttachments returns the IDs of storage attachments for a collection of units." - }, - "UpdateNetworkInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "UpdateNetworkInfo refreshes the network settings for a unit's bound\nendpoints." - }, - "UpdateSecrets": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/UpdateSecretArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "UpdateSecrets updates the specified secrets." - }, - "UpgradeSeriesUnitStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/UpgradeSeriesStatusResults" - } - }, - "description": "UpgradeSeriesUnitStatus returns the current preparation status of an\nupgrading unit.\nIf no series upgrade is in progress an error is returned instead." - }, - "Watch": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "Watch starts an NotifyWatcher for each given entity." - }, - "WatchAPIHostPorts": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResult" - } - }, - "description": "WatchAPIHostPorts watches the API server addresses." - }, - "WatchActionNotifications": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - }, - "description": "WatchActionNotifications returns a StringsWatcher for observing\nincoming action calls to a unit. See also state/watcher.go\nUnit.WatchActionNotifications(). This method is called from\napi/uniter/uniter.go WatchActionNotifications()." - }, - "WatchConfigSettingsHash": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - }, - "description": "WatchConfigSettingsHash returns a StringsWatcher that yields a hash\nof the config values every time the config changes. The uniter can\nsave this hash and use it to decide whether the config-changed hook\nneeds to be run (or whether this was just an agent restart with no\nsubstantive config change)." - }, - "WatchConsumedSecretsChanges": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - }, - "description": "WatchConsumedSecretsChanges sets up a watcher to notify of changes to secret revisions for the specified consumers." - }, - "WatchForModelConfigChanges": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResult" - } - }, - "description": "WatchForModelConfigChanges returns a NotifyWatcher that observes\nchanges to the model configuration.\nNote that although the NotifyWatchResult contains an Error field,\nit's not used because we are only returning a single watcher,\nso we use the regular error return." - }, - "WatchInstanceData": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "WatchInstanceData is a shim to call the LXDProfileAPIv2 version of this method." - }, - "WatchLeadershipSettings": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "WatchLeadershipSettings will block the caller until leadership settings\nfor the given service ID change." - }, - "WatchMeterStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - } - }, - "WatchObsolete": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResult" - } - }, - "description": "WatchObsolete returns a watcher for notifying when:\n - a secret owned by the entity is deleted\n - a secret revision owed by the entity no longer\n has any consumers\n\nObsolete revisions results are \"uri/revno\" and deleted\nsecret results are \"uri\"." - }, - "WatchRelationUnits": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RelationUnits" - }, - "Result": { - "$ref": "#/definitions/RelationUnitsWatchResults" - } - }, - "description": "WatchRelationUnits returns a RelationUnitsWatcher for observing\nchanges to every unit in the supplied relation that is visible to\nthe supplied unit. See also state/watcher.go:RelationUnit.Watch()." - }, - "WatchSecretRevisionsExpiryChanges": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/SecretTriggerWatchResult" - } - }, - "description": "WatchSecretRevisionsExpiryChanges sets up a watcher to notify of changes to secret revision expiry config." - }, - "WatchSecretsRotationChanges": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/SecretTriggerWatchResult" - } - }, - "description": "WatchSecretsRotationChanges sets up a watcher to notify of changes to secret rotation config." - }, - "WatchStorageAttachments": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/StorageAttachmentIds" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "WatchStorageAttachments creates watchers for a collection of storage\nattachments, each of which can be used to watch changes to storage\nattachment info." - }, - "WatchTrustConfigSettingsHash": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - }, - "description": "WatchTrustConfigSettingsHash returns a StringsWatcher that yields a\nhash of the application config values whenever they change. The\nuniter can use the hash to determine whether the actual values have\nchanged since it last saw the config." - }, - "WatchUnitAddressesHash": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - }, - "description": "WatchUnitAddressesHash returns a StringsWatcher that yields the\nhashes of the addresses for the unit whenever the addresses\nchange. The uniter can use the hash to determine whether the actual\naddress values have changed since it last saw the config." - }, - "WatchUnitRelations": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - }, - "description": "WatchUnitRelations returns a StringsWatcher, for each given\nunit, that notifies of changes to the lifecycles of relations\nrelevant to that unit. For principal units, this will be all of the\nrelations for the application. For subordinate units, only\nrelations with the principal unit's application will be monitored." - }, - "WatchUnitStorageAttachments": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - }, - "description": "WatchUnitStorageAttachments creates watchers for a collection of units,\neach of which can be used to watch for lifecycle changes to the corresponding\nunit's storage attachments." - }, - "WatchUpgradeSeriesNotifications": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "WatchUpgradeSeriesNotifications returns a NotifyWatcher for observing changes to upgrade series locks." - }, - "WorkloadVersion": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringResults" - } - }, - "description": "WorkloadVersion returns the workload version for all given units or applications." - } - }, - "definitions": { - "APIHostPortsResult": { - "type": "object", - "properties": { - "servers": { - "type": "array", - "items": { - "type": "array", - "items": { - "$ref": "#/definitions/HostPort" - } - } - } - }, - "additionalProperties": false, - "required": [ - "servers" - ] - }, - "Action": { - "type": "object", - "properties": { - "execution-group": { - "type": "string" - }, - "name": { - "type": "string" - }, - "parallel": { - "type": "boolean" - }, - "parameters": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "receiver": { - "type": "string" - }, - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "receiver", - "name" - ] - }, - "ActionExecutionResult": { - "type": "object", - "properties": { - "action-tag": { - "type": "string" - }, - "message": { - "type": "string" - }, - "results": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "status": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "action-tag", - "status" - ] - }, - "ActionExecutionResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ActionExecutionResult" - } - } - }, - "additionalProperties": false - }, - "ActionMessage": { - "type": "object", - "properties": { - "message": { - "type": "string" - }, - "timestamp": { - "type": "string", - "format": "date-time" - } - }, - "additionalProperties": false, - "required": [ - "timestamp", - "message" - ] - }, - "ActionMessageParams": { - "type": "object", - "properties": { - "messages": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityString" - } - } - }, - "additionalProperties": false, - "required": [ - "messages" - ] - }, - "ActionResult": { - "type": "object", - "properties": { - "action": { - "$ref": "#/definitions/Action" - }, - "completed": { - "type": "string", - "format": "date-time" - }, - "enqueued": { - "type": "string", - "format": "date-time" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "log": { - "type": "array", - "items": { - "$ref": "#/definitions/ActionMessage" - } - }, - "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 - }, - "Address": { - "type": "object", - "properties": { - "cidr": { - "type": "string" - }, - "config-type": { - "type": "string" - }, - "is-secondary": { - "type": "boolean" - }, - "scope": { - "type": "string" - }, - "space-id": { - "type": "string" - }, - "space-name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "value", - "type", - "scope" - ] - }, - "ApplicationOpenedPorts": { - "type": "object", - "properties": { - "endpoint": { - "type": "string" - }, - "port-ranges": { - "type": "array", - "items": { - "$ref": "#/definitions/PortRange" - } - } - }, - "additionalProperties": false, - "required": [ - "endpoint", - "port-ranges" - ] - }, - "ApplicationOpenedPortsResult": { - "type": "object", - "properties": { - "application-port-ranges": { - "type": "array", - "items": { - "$ref": "#/definitions/ApplicationOpenedPorts" - } - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "application-port-ranges" - ] - }, - "ApplicationOpenedPortsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ApplicationOpenedPortsResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ApplicationStatusResult": { - "type": "object", - "properties": { - "application": { - "$ref": "#/definitions/StatusResult" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "units": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/StatusResult" - } - } - } - }, - "additionalProperties": false, - "required": [ - "application", - "units" - ] - }, - "ApplicationStatusResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ApplicationStatusResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "BoolResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "BoolResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/BoolResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "CharmRelation": { - "type": "object", - "properties": { - "interface": { - "type": "string" - }, - "limit": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "optional": { - "type": "boolean" - }, - "role": { - "type": "string" - }, - "scope": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "role", - "interface", - "optional", - "limit", - "scope" - ] - }, - "CharmURL": { - "type": "object", - "properties": { - "url": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "url" - ] - }, - "CharmURLs": { - "type": "object", - "properties": { - "urls": { - "type": "array", - "items": { - "$ref": "#/definitions/CharmURL" - } - } - }, - "additionalProperties": false, - "required": [ - "urls" - ] - }, - "CloudCredential": { - "type": "object", - "properties": { - "attrs": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "auth-type": { - "type": "string" - }, - "redacted": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "auth-type" - ] - }, - "CloudSpec": { - "type": "object", - "properties": { - "cacertificates": { - "type": "array", - "items": { - "type": "string" - } - }, - "credential": { - "$ref": "#/definitions/CloudCredential" - }, - "endpoint": { - "type": "string" - }, - "identity-endpoint": { - "type": "string" - }, - "is-controller-cloud": { - "type": "boolean" - }, - "name": { - "type": "string" - }, - "region": { - "type": "string" - }, - "skip-tls-verify": { - "type": "boolean" - }, - "storage-endpoint": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type", - "name" - ] - }, - "CloudSpecResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/CloudSpec" - } - }, - "additionalProperties": false - }, - "CommitHookChangesArg": { - "type": "object", - "properties": { - "add-storage": { - "type": "array", - "items": { - "$ref": "#/definitions/StorageAddParams" - } - }, - "close-ports": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityPortRange" - } - }, - "open-ports": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityPortRange" - } - }, - "pod-spec": { - "$ref": "#/definitions/PodSpec" - }, - "relation-unit-settings": { - "type": "array", - "items": { - "$ref": "#/definitions/RelationUnitSettings" - } - }, - "secret-creates": { - "type": "array", - "items": { - "$ref": "#/definitions/CreateSecretArg" - } - }, - "secret-deletes": { - "type": "array", - "items": { - "$ref": "#/definitions/DeleteSecretArg" - } - }, - "secret-grants": { - "type": "array", - "items": { - "$ref": "#/definitions/GrantRevokeSecretArg" - } - }, - "secret-revokes": { - "type": "array", - "items": { - "$ref": "#/definitions/GrantRevokeSecretArg" - } - }, - "secret-updates": { - "type": "array", - "items": { - "$ref": "#/definitions/UpdateSecretArg" - } - }, - "set-raw-k8s-spec": { - "$ref": "#/definitions/PodSpec" - }, - "tag": { - "type": "string" - }, - "unit-state": { - "$ref": "#/definitions/SetUnitStateArg" - }, - "update-network-info": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "update-network-info" - ] - }, - "CommitHookChangesArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/CommitHookChangesArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "ConfigSettingsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "settings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "settings" - ] - }, - "ConfigSettingsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ConfigSettingsResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "CreateSecretArg": { - "type": "object", - "properties": { - "UpsertSecretArg": { - "$ref": "#/definitions/UpsertSecretArg" - }, - "content": { - "$ref": "#/definitions/SecretContentParams" - }, - "description": { - "type": "string" - }, - "expire-time": { - "type": "string", - "format": "date-time" - }, - "label": { - "type": "string" - }, - "owner-tag": { - "type": "string" - }, - "params": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "rotate-policy": { - "type": "string" - }, - "uri": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "UpsertSecretArg", - "owner-tag" - ] - }, - "CreateSecretArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/CreateSecretArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "CreateSecretURIsArg": { - "type": "object", - "properties": { - "count": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "count" - ] - }, - "DeleteSecretArg": { - "type": "object", - "properties": { - "revisions": { - "type": "array", - "items": { - "type": "integer" - } - }, - "uri": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "uri" - ] - }, - "DeleteSecretArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/DeleteSecretArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "Endpoint": { - "type": "object", - "properties": { - "application-name": { - "type": "string" - }, - "relation": { - "$ref": "#/definitions/CharmRelation" - } - }, - "additionalProperties": false, - "required": [ - "application-name", - "relation" - ] - }, - "Entities": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } - } - }, - "additionalProperties": false, - "required": [ - "entities" - ] - }, - "EntitiesCharmURL": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityCharmURL" - } - } - }, - "additionalProperties": false, - "required": [ - "entities" - ] - }, - "Entity": { - "type": "object", - "properties": { - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag" - ] - }, - "EntityCharmURL": { - "type": "object", - "properties": { - "charm-url": { - "type": "string" - }, - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "charm-url" - ] - }, - "EntityPortRange": { - "type": "object", - "properties": { - "endpoint": { - "type": "string" - }, - "from-port": { - "type": "integer" - }, - "protocol": { - "type": "string" - }, - "tag": { - "type": "string" - }, - "to-port": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "protocol", - "from-port", - "to-port", - "endpoint" - ] - }, - "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" - ] - }, - "EntityString": { - "type": "object", - "properties": { - "tag": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "value" - ] - }, - "EntityWorkloadVersion": { - "type": "object", - "properties": { - "tag": { - "type": "string" - }, - "workload-version": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "workload-version" - ] - }, - "EntityWorkloadVersions": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityWorkloadVersion" - } - } - }, - "additionalProperties": false, - "required": [ - "entities" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "GetLeadershipSettingsBulkResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/GetLeadershipSettingsResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "GetLeadershipSettingsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "settings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - } - }, - "additionalProperties": false, - "required": [ - "settings" - ] - }, - "GetSecretConsumerInfoArgs": { - "type": "object", - "properties": { - "consumer-tag": { - "type": "string" - }, - "uris": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "consumer-tag", - "uris" - ] - }, - "GetSecretContentArg": { - "type": "object", - "properties": { - "label": { - "type": "string" - }, - "peek": { - "type": "boolean" - }, - "refresh": { - "type": "boolean" - }, - "uri": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "uri" - ] - }, - "GetSecretContentArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/GetSecretContentArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "GoalState": { - "type": "object", - "properties": { - "relations": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/GoalStateStatus" - } - } - } - } - }, - "units": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/GoalStateStatus" - } - } - } - }, - "additionalProperties": false, - "required": [ - "units", - "relations" - ] - }, - "GoalStateResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/GoalState" - } - }, - "additionalProperties": false, - "required": [ - "result", - "error" - ] - }, - "GoalStateResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/GoalStateResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "GoalStateStatus": { - "type": "object", - "properties": { - "since": { - "type": "string", - "format": "date-time" - }, - "status": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "status", - "since" - ] - }, - "GrantRevokeSecretArg": { - "type": "object", - "properties": { - "role": { - "type": "string" - }, - "scope-tag": { - "type": "string" - }, - "subject-tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "uri": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "uri", - "scope-tag", - "subject-tags", - "role" - ] - }, - "GrantRevokeSecretArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/GrantRevokeSecretArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "HostPort": { - "type": "object", - "properties": { - "Address": { - "$ref": "#/definitions/Address" - }, - "cidr": { - "type": "string" - }, - "config-type": { - "type": "string" - }, - "is-secondary": { - "type": "boolean" - }, - "port": { - "type": "integer" - }, - "scope": { - "type": "string" - }, - "space-id": { - "type": "string" - }, - "space-name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "value", - "type", - "scope", - "Address", - "port" - ] - }, - "IntResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "IntResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/IntResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "InterfaceAddress": { - "type": "object", - "properties": { - "cidr": { - "type": "string" - }, - "hostname": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "hostname", - "value", - "cidr" - ] - }, - "LifeResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "life": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "life" - ] - }, - "LifeResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/LifeResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ListSecretResult": { - "type": "object", - "properties": { - "create-time": { - "type": "string", - "format": "date-time" - }, - "description": { - "type": "string" - }, - "label": { - "type": "string" - }, - "latest-expire-time": { - "type": "string", - "format": "date-time" - }, - "latest-revision": { - "type": "integer" - }, - "next-rotate-time": { - "type": "string", - "format": "date-time" - }, - "owner-tag": { - "type": "string" - }, - "revisions": { - "type": "array", - "items": { - "$ref": "#/definitions/SecretRevision" - } - }, - "rotate-policy": { - "type": "string" - }, - "update-time": { - "type": "string", - "format": "date-time" - }, - "uri": { - "type": "string" - }, - "value": { - "$ref": "#/definitions/SecretValueResult" - }, - "version": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "uri", - "version", - "owner-tag", - "latest-revision", - "create-time", - "update-time", - "revisions" - ] - }, - "ListSecretResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ListSecretResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "MergeLeadershipSettingsBulkParams": { - "type": "object", - "properties": { - "params": { - "type": "array", - "items": { - "$ref": "#/definitions/MergeLeadershipSettingsParam" - } - } - }, - "additionalProperties": false, - "required": [ - "params" - ] - }, - "MergeLeadershipSettingsParam": { - "type": "object", - "properties": { - "application-tag": { - "type": "string" - }, - "settings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "unit-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "settings" - ] - }, - "MeterStatusResult": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "info": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "code", - "info" - ] - }, - "MeterStatusResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/MeterStatusResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "Metric": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "labels": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "time": { - "type": "string", - "format": "date-time" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "key", - "value", - "time" - ] - }, - "MetricBatch": { - "type": "object", - "properties": { - "charm-url": { - "type": "string" - }, - "created": { - "type": "string", - "format": "date-time" - }, - "metrics": { - "type": "array", - "items": { - "$ref": "#/definitions/Metric" - } - }, - "uuid": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "uuid", - "charm-url", - "created", - "metrics" - ] - }, - "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" - ] - }, - "ModelConfigResult": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "ModelResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "uuid": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "uuid", - "type" - ] - }, - "NetworkInfo": { - "type": "object", - "properties": { - "addresses": { - "type": "array", - "items": { - "$ref": "#/definitions/InterfaceAddress" - } - }, - "interface-name": { - "type": "string" - }, - "mac-address": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "mac-address", - "interface-name", - "addresses" - ] - }, - "NetworkInfoParams": { - "type": "object", - "properties": { - "bindings": { - "type": "array", - "items": { - "type": "string" - } - }, - "relation-id": { - "type": "integer" - }, - "unit": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "unit", - "bindings" - ] - }, - "NetworkInfoResult": { - "type": "object", - "properties": { - "bind-addresses": { - "type": "array", - "items": { - "$ref": "#/definitions/NetworkInfo" - } - }, - "egress-subnets": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "ingress-addresses": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "NetworkInfoResults": { - "type": "object", - "properties": { - "results": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/NetworkInfoResult" - } - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "NotifyWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "OpenMachinePortRangesByEndpointResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "unit-port-ranges": { - "type": "object", - "patternProperties": { - ".*": { - "type": "array", - "items": { - "$ref": "#/definitions/OpenUnitPortRangesByEndpoint" - } - } - } - } - }, - "additionalProperties": false, - "required": [ - "unit-port-ranges" - ] - }, - "OpenMachinePortRangesByEndpointResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/OpenMachinePortRangesByEndpointResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "OpenUnitPortRangesByEndpoint": { - "type": "object", - "properties": { - "endpoint": { - "type": "string" - }, - "port-ranges": { - "type": "array", - "items": { - "$ref": "#/definitions/PortRange" - } - } - }, - "additionalProperties": false, - "required": [ - "endpoint", - "port-ranges" - ] - }, - "PodSpec": { - "type": "object", - "properties": { - "spec": { - "type": "string" - }, - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag" - ] - }, - "PortRange": { - "type": "object", - "properties": { - "from-port": { - "type": "integer" - }, - "protocol": { - "type": "string" - }, - "to-port": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "from-port", - "to-port", - "protocol" - ] - }, - "RelationIds": { - "type": "object", - "properties": { - "relation-ids": { - "type": "array", - "items": { - "type": "integer" - } - } - }, - "additionalProperties": false, - "required": [ - "relation-ids" - ] - }, - "RelationResult": { - "type": "object", - "properties": { - "bool": { - "type": "boolean" - }, - "endpoint": { - "$ref": "#/definitions/Endpoint" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "id": { - "type": "integer" - }, - "key": { - "type": "string" - }, - "life": { - "type": "string" - }, - "other-application": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "life", - "id", - "key", - "endpoint" - ] - }, - "RelationResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/RelationResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "RelationStatusArg": { - "type": "object", - "properties": { - "message": { - "type": "string" - }, - "relation-id": { - "type": "integer" - }, - "status": { - "type": "string" - }, - "unit-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "unit-tag", - "relation-id", - "status", - "message" - ] - }, - "RelationStatusArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/RelationStatusArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "RelationUnit": { - "type": "object", - "properties": { - "relation": { - "type": "string" - }, - "unit": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "relation", - "unit" - ] - }, - "RelationUnitPair": { - "type": "object", - "properties": { - "local-unit": { - "type": "string" - }, - "relation": { - "type": "string" - }, - "remote-unit": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "relation", - "local-unit", - "remote-unit" - ] - }, - "RelationUnitPairs": { - "type": "object", - "properties": { - "relation-unit-pairs": { - "type": "array", - "items": { - "$ref": "#/definitions/RelationUnitPair" - } - } - }, - "additionalProperties": false, - "required": [ - "relation-unit-pairs" - ] - }, - "RelationUnitSettings": { - "type": "object", - "properties": { - "application-settings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "relation": { - "type": "string" - }, - "settings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "unit": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "relation", - "unit", - "settings", - "application-settings" - ] - }, - "RelationUnitStatus": { - "type": "object", - "properties": { - "in-scope": { - "type": "boolean" - }, - "relation-tag": { - "type": "string" - }, - "suspended": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "relation-tag", - "in-scope", - "suspended" - ] - }, - "RelationUnitStatusResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/RelationUnitStatus" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "RelationUnitStatusResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/RelationUnitStatusResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "RelationUnits": { - "type": "object", - "properties": { - "relation-units": { - "type": "array", - "items": { - "$ref": "#/definitions/RelationUnit" - } - } - }, - "additionalProperties": false, - "required": [ - "relation-units" - ] - }, - "RelationUnitsChange": { - "type": "object", - "properties": { - "app-changed": { - "type": "object", - "patternProperties": { - ".*": { - "type": "integer" - } - } - }, - "changed": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/UnitSettings" - } - } - }, - "departed": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "changed" - ] - }, - "RelationUnitsWatchResult": { - "type": "object", - "properties": { - "changes": { - "$ref": "#/definitions/RelationUnitsChange" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id", - "changes" - ] - }, - "RelationUnitsWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/RelationUnitsWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ResolvedModeResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "mode": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "mode" - ] - }, - "ResolvedModeResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ResolvedModeResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "SecretBackendConfig": { - "type": "object", - "properties": { - "params": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type" - ] - }, - "SecretBackendConfigResults": { - "type": "object", - "properties": { - "active-id": { - "type": "string" - }, - "configs": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/SecretBackendConfig" - } - } - }, - "model-controller": { - "type": "string" - }, - "model-name": { - "type": "string" - }, - "model-uuid": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "model-controller", - "model-uuid", - "model-name", - "active-id" - ] - }, - "SecretConsumerInfoResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "label": { - "type": "string" - }, - "revision": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "revision", - "label" - ] - }, - "SecretConsumerInfoResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/SecretConsumerInfoResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "SecretContentParams": { - "type": "object", - "properties": { - "data": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "value-ref": { - "$ref": "#/definitions/SecretValueRef" - } - }, - "additionalProperties": false - }, - "SecretContentResult": { - "type": "object", - "properties": { - "content": { - "$ref": "#/definitions/SecretContentParams" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "content" - ] - }, - "SecretContentResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/SecretContentResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "SecretRevision": { - "type": "object", - "properties": { - "create-time": { - "type": "string", - "format": "date-time" - }, - "expire-time": { - "type": "string", - "format": "date-time" - }, - "revision": { - "type": "integer" - }, - "update-time": { - "type": "string", - "format": "date-time" - }, - "value-ref": { - "$ref": "#/definitions/SecretValueRef" - } - }, - "additionalProperties": false, - "required": [ - "revision" - ] - }, - "SecretRevisionArg": { - "type": "object", - "properties": { - "pending-delete": { - "type": "boolean" - }, - "revisions": { - "type": "array", - "items": { - "type": "integer" - } - }, - "uri": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "uri", - "revisions", - "pending-delete" - ] - }, - "SecretRotatedArg": { - "type": "object", - "properties": { - "original-revision": { - "type": "integer" - }, - "skip": { - "type": "boolean" - }, - "uri": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "uri", - "original-revision", - "skip" - ] - }, - "SecretRotatedArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/SecretRotatedArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "SecretTriggerChange": { - "type": "object", - "properties": { - "next-trigger-time": { - "type": "string", - "format": "date-time" - }, - "revision": { - "type": "integer" - }, - "uri": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "uri", - "next-trigger-time" - ] - }, - "SecretTriggerWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "$ref": "#/definitions/SecretTriggerChange" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id", - "changes" - ] - }, - "SecretValueRef": { - "type": "object", - "properties": { - "backend-id": { - "type": "string" - }, - "revision-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "backend-id", - "revision-id" - ] - }, - "SecretValueResult": { - "type": "object", - "properties": { - "data": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "SetStatus": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityStatusArgs" - } - } - }, - "additionalProperties": false, - "required": [ - "entities" - ] - }, - "SetUnitStateArg": { - "type": "object", - "properties": { - "charm-state": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "meter-status-state": { - "type": "string" - }, - "relation-state": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "secret-state": { - "type": "string" - }, - "storage-state": { - "type": "string" - }, - "tag": { - "type": "string" - }, - "uniter-state": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag" - ] - }, - "SetUnitStateArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/SetUnitStateArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "SettingsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "settings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - } - }, - "additionalProperties": false, - "required": [ - "settings" - ] - }, - "SettingsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/SettingsResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "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": [ - "id", - "life", - "status", - "info", - "data", - "since" - ] - }, - "StatusResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StatusResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "StorageAddParams": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "storage": { - "$ref": "#/definitions/StorageConstraints" - }, - "unit": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "unit", - "name", - "storage" - ] - }, - "StorageAttachment": { - "type": "object", - "properties": { - "kind": { - "type": "integer" - }, - "life": { - "type": "string" - }, - "location": { - "type": "string" - }, - "owner-tag": { - "type": "string" - }, - "storage-tag": { - "type": "string" - }, - "unit-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "storage-tag", - "owner-tag", - "unit-tag", - "kind", - "location", - "life" - ] - }, - "StorageAttachmentId": { - "type": "object", - "properties": { - "storage-tag": { - "type": "string" - }, - "unit-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "storage-tag", - "unit-tag" - ] - }, - "StorageAttachmentIds": { - "type": "object", - "properties": { - "ids": { - "type": "array", - "items": { - "$ref": "#/definitions/StorageAttachmentId" - } - } - }, - "additionalProperties": false, - "required": [ - "ids" - ] - }, - "StorageAttachmentIdsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/StorageAttachmentIds" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "StorageAttachmentIdsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StorageAttachmentIdsResult" - } - } - }, - "additionalProperties": false - }, - "StorageAttachmentResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/StorageAttachment" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "StorageAttachmentResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StorageAttachmentResult" - } - } - }, - "additionalProperties": false - }, - "StorageConstraints": { - "type": "object", - "properties": { - "count": { - "type": "integer" - }, - "pool": { - "type": "string" - }, - "size": { - "type": "integer" - } - }, - "additionalProperties": false - }, - "StringBoolResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "ok": { - "type": "boolean" - }, - "result": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "result", - "ok" - ] - }, - "StringBoolResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringBoolResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "StringResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "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": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "StringsWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id" - ] - }, - "StringsWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringsWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "UnitRefreshResult": { - "type": "object", - "properties": { - "Error": { - "$ref": "#/definitions/Error" - }, - "Life": { - "type": "string" - }, - "Resolved": { - "type": "string" - }, - "provider-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Life", - "Resolved", - "Error" - ] - }, - "UnitRefreshResults": { - "type": "object", - "properties": { - "Results": { - "type": "array", - "items": { - "$ref": "#/definitions/UnitRefreshResult" - } - } - }, - "additionalProperties": false, - "required": [ - "Results" - ] - }, - "UnitSettings": { - "type": "object", - "properties": { - "version": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "version" - ] - }, - "UnitStateResult": { - "type": "object", - "properties": { - "charm-state": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "meter-status-state": { - "type": "string" - }, - "relation-state": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "secret-state": { - "type": "string" - }, - "storage-state": { - "type": "string" - }, - "uniter-state": { - "type": "string" - } - }, - "additionalProperties": false - }, - "UnitStateResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/UnitStateResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "UpdateSecretArg": { - "type": "object", - "properties": { - "UpsertSecretArg": { - "$ref": "#/definitions/UpsertSecretArg" - }, - "content": { - "$ref": "#/definitions/SecretContentParams" - }, - "description": { - "type": "string" - }, - "expire-time": { - "type": "string", - "format": "date-time" - }, - "label": { - "type": "string" - }, - "params": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "rotate-policy": { - "type": "string" - }, - "uri": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "UpsertSecretArg", - "uri" - ] - }, - "UpdateSecretArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/UpdateSecretArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "UpgradeSeriesStatusParam": { - "type": "object", - "properties": { - "entity": { - "$ref": "#/definitions/Entity" - }, - "message": { - "type": "string" - }, - "status": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "entity", - "status", - "message" - ] - }, - "UpgradeSeriesStatusParams": { - "type": "object", - "properties": { - "params": { - "type": "array", - "items": { - "$ref": "#/definitions/UpgradeSeriesStatusParam" - } - } - }, - "additionalProperties": false, - "required": [ - "params" - ] - }, - "UpgradeSeriesStatusResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "status": { - "type": "string" - }, - "target": { - "type": "string" - } - }, - "additionalProperties": false - }, - "UpgradeSeriesStatusResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/UpgradeSeriesStatusResult" - } - } - }, - "additionalProperties": false - }, - "UpsertSecretArg": { - "type": "object", - "properties": { - "content": { - "$ref": "#/definitions/SecretContentParams" - }, - "description": { - "type": "string" - }, - "expire-time": { - "type": "string", - "format": "date-time" - }, - "label": { - "type": "string" - }, - "params": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "rotate-policy": { - "type": "string" - } - }, - "additionalProperties": false - } - } - } - }, - { - "Name": "UpgradeSeries", - "Description": "API serves methods required by the machine agent upgrade-machine worker.", - "Version": 3, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "CurrentSeries": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringResults" - } - }, - "description": "CurrentSeries returns what Juju thinks the current series of the machine is.\nNote that a machine could have been upgraded out-of-band by running\ndo-release-upgrade outside of the upgrade-machine workflow,\nmaking this value incorrect." - }, - "FinishUpgradeSeries": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/UpdateChannelArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "FinishUpgradeSeries is the last action in the upgrade workflow and is\ncalled after all machine and unit statuses are \"completed\".\nIt updates the machine series to reflect the completed upgrade, then\nremoves the upgrade-machine lock." - }, - "MachineStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/UpgradeSeriesStatusResults" - } - }, - "description": "MachineStatus gets the current upgrade-machine status of a machine." - }, - "PinMachineApplications": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/PinApplicationsResults" - } - }, - "description": "PinMachineApplications pins leadership for applications represented by units\nrunning on the auth'd machine." - }, - "PinnedLeadership": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/PinnedLeadershipResult" - } - }, - "description": "PinnedLeadership returns all pinned applications and the entities that\nrequire their pinned behaviour, for leadership in the current model." - }, - "SetInstanceStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetStatus" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetInstanceStatus sets the status of the machine." - }, - "SetMachineStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/UpgradeSeriesStatusParams" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetMachineStatus sets the current upgrade-machine status of a machine." - }, - "SetUpgradeSeriesUnitStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/UpgradeSeriesStatusParams" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetUpgradeSeriesUnitStatus sets the upgrade series status of the unit.\nIf no upgrade is in progress an error is returned instead." - }, - "StartUnitCompletion": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/UpgradeSeriesStartUnitCompletionParam" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "StartUnitCompletion starts the upgrade series completion phase for all subordinate\nunits of a given machine." - }, - "TargetSeries": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringResults" - } - }, - "description": "TargetSeries returns the series that a machine has been locked\nfor upgrading to." - }, - "UnitsCompleted": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/EntitiesResults" - } - }, - "description": "UnitsCompleted returns the units running on this machine that have completed\nthe upgrade-machine workflow and are in their normal running state." - }, - "UnitsPrepared": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/EntitiesResults" - } - }, - "description": "UnitsPrepared returns the units running on this machine that have completed\ntheir upgrade-machine preparation, and are ready to be stopped and have their\nunit agent services converted for the target series." - }, - "UnpinMachineApplications": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/PinApplicationsResults" - } - }, - "description": "UnpinMachineApplications unpins leadership for applications represented by\nunits running on the auth'd machine." - }, - "UpgradeSeriesUnitStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/UpgradeSeriesStatusResults" - } - }, - "description": "UpgradeSeriesUnitStatus returns the current preparation status of an\nupgrading unit.\nIf no series upgrade is in progress an error is returned instead." - }, - "WatchUpgradeSeriesNotifications": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "WatchUpgradeSeriesNotifications returns a NotifyWatcher for observing changes to upgrade series locks." - } - }, - "definitions": { - "Entities": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } - } - }, - "additionalProperties": false, - "required": [ - "entities" - ] - }, - "EntitiesResult": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "entities" - ] - }, - "EntitiesResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/EntitiesResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "Entity": { - "type": "object", - "properties": { - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "NotifyWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "PinApplicationResult": { - "type": "object", - "properties": { - "application-name": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "application-name" - ] - }, - "PinApplicationsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/PinApplicationResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "PinnedLeadershipResult": { - "type": "object", - "properties": { - "result": { - "type": "object", - "patternProperties": { - ".*": { - "type": "array", - "items": { - "type": "string" - } - } - } - } - }, - "additionalProperties": false - }, - "SetStatus": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityStatusArgs" - } - } - }, - "additionalProperties": false, - "required": [ - "entities" - ] - }, - "StringResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "StringResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "UpdateChannelArg": { - "type": "object", - "properties": { - "channel": { - "type": "string" - }, - "force": { - "type": "boolean" - }, - "tag": { - "$ref": "#/definitions/Entity" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "force", - "channel" - ] - }, - "UpdateChannelArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/UpdateChannelArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "UpgradeSeriesStartUnitCompletionParam": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "entities", - "message" - ] - }, - "UpgradeSeriesStatusParam": { - "type": "object", - "properties": { - "entity": { - "$ref": "#/definitions/Entity" - }, - "message": { - "type": "string" - }, - "status": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "entity", - "status", - "message" - ] - }, - "UpgradeSeriesStatusParams": { - "type": "object", - "properties": { - "params": { - "type": "array", - "items": { - "$ref": "#/definitions/UpgradeSeriesStatusParam" - } - } - }, - "additionalProperties": false, - "required": [ - "params" - ] - }, - "UpgradeSeriesStatusResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "status": { - "type": "string" - }, - "target": { - "type": "string" - } - }, - "additionalProperties": false - }, - "UpgradeSeriesStatusResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/UpgradeSeriesStatusResult" - } - } - }, - "additionalProperties": false - } - } - } - }, - { - "Name": "UpgradeSteps", - "Description": "UpgradeStepsAPI implements version 2 of the Upgrade Steps API,\nwhich adds WriteUniterState.", - "Version": 2, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent" - ], - "Schema": { - "type": "object", - "properties": { - "ResetKVMMachineModificationStatusIdle": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entity" - }, - "Result": { - "$ref": "#/definitions/ErrorResult" - } - }, - "description": "ResetKVMMachineModificationStatusIdle sets the modification status\nof a kvm machine to idle if it is in an error state before upgrade.\nRelated to lp:1829393." - }, - "WriteAgentState": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetUnitStateArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "WriteAgentState writes the agent state for the set of units provided. This\ncall presently deals with the state for the unit agent." - } - }, - "definitions": { - "Entity": { - "type": "object", - "properties": { - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "SetUnitStateArg": { - "type": "object", - "properties": { - "charm-state": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "meter-status-state": { - "type": "string" - }, - "relation-state": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "secret-state": { - "type": "string" - }, - "storage-state": { - "type": "string" - }, - "tag": { - "type": "string" - }, - "uniter-state": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag" - ] - }, - "SetUnitStateArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/SetUnitStateArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - } - } - } - }, - { - "Name": "Upgrader", - "Description": "", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "DesiredVersion": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/VersionResults" - } - } - }, - "SetTools": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/EntitiesVersion" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - } - }, - "Tools": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ToolsResults" - } - } - }, - "WatchAPIVersion": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - } - } - }, - "definitions": { - "Binary": { - "type": "object", - "properties": { - "Arch": { - "type": "string" - }, - "Build": { - "type": "integer" - }, - "Major": { - "type": "integer" - }, - "Minor": { - "type": "integer" - }, - "Number": { - "$ref": "#/definitions/Number" - }, - "Patch": { - "type": "integer" - }, - "Release": { - "type": "string" - }, - "Tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Major", - "Minor", - "Tag", - "Patch", - "Build", - "Number", - "Release", - "Arch" - ] - }, - "Entities": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } - } - }, - "additionalProperties": false, - "required": [ - "entities" - ] - }, - "EntitiesVersion": { - "type": "object", - "properties": { - "agent-tools": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityVersion" - } - } - }, - "additionalProperties": false, - "required": [ - "agent-tools" - ] - }, - "Entity": { - "type": "object", - "properties": { - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag" - ] - }, - "EntityVersion": { - "type": "object", - "properties": { - "tag": { - "type": "string" - }, - "tools": { - "$ref": "#/definitions/Version" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "tools" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "NotifyWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "Number": { - "type": "object", - "properties": { - "Build": { - "type": "integer" - }, - "Major": { - "type": "integer" - }, - "Minor": { - "type": "integer" - }, - "Patch": { - "type": "integer" - }, - "Tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Major", - "Minor", - "Tag", - "Patch", - "Build" - ] - }, - "Tools": { - "type": "object", - "properties": { - "sha256": { - "type": "string" - }, - "size": { - "type": "integer" - }, - "url": { - "type": "string" - }, - "version": { - "$ref": "#/definitions/Binary" - } - }, - "additionalProperties": false, - "required": [ - "version", - "url", - "size" - ] - }, - "ToolsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "tools": { - "type": "array", - "items": { - "$ref": "#/definitions/Tools" - } - } - }, - "additionalProperties": false, - "required": [ - "tools" - ] - }, - "ToolsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ToolsResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "Version": { - "type": "object", - "properties": { - "version": { - "$ref": "#/definitions/Binary" - } - }, - "additionalProperties": false, - "required": [ - "version" - ] - }, - "VersionResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "version": { - "$ref": "#/definitions/Number" - } - }, - "additionalProperties": false - }, - "VersionResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/VersionResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - } - } - } - }, - { - "Name": "UserManager", - "Description": "UserManagerAPI implements the user manager interface and is the concrete\nimplementation of the api end point.", - "Version": 3, - "AvailableTo": [ - "controller-user" - ], - "Schema": { - "type": "object", - "properties": { - "AddUser": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/AddUsers" - }, - "Result": { - "$ref": "#/definitions/AddUserResults" - } - }, - "description": "AddUser adds a user with a username, and either a password or\na randomly generated secret key which will be returned." - }, - "DisableUser": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "DisableUser disables one or more users. If the user is already disabled,\nthe action is considered a success." - }, - "EnableUser": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "EnableUser enables one or more users. If the user is already enabled,\nthe action is considered a success." - }, - "ModelUserInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ModelUserInfoResults" - } - }, - "description": "ModelUserInfo returns information on all users in the model." - }, - "RemoveUser": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "RemoveUser permanently removes a user from the current controller for each\nentity provided. While the user is permanently removed we keep it's\ninformation around for auditing purposes.\nTODO(redir): Add information about getting deleted user information when we\nadd that capability." - }, - "ResetPassword": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/AddUserResults" - } - }, - "description": "ResetPassword resets password for supplied users by\ninvalidating current passwords (if any) and generating\nnew random secret keys which will be returned.\nUsers cannot reset their own password." - }, - "SetPassword": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/EntityPasswords" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetPassword changes the stored password for the specified users." - }, - "UserInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/UserInfoRequest" - }, - "Result": { - "$ref": "#/definitions/UserInfoResults" - } - }, - "description": "UserInfo returns information on a user." - } - }, - "definitions": { - "AddUser": { - "type": "object", - "properties": { - "display-name": { - "type": "string" - }, - "password": { - "type": "string" - }, - "username": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "username", - "display-name" - ] - }, - "AddUserResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "secret-key": { - "type": "array", - "items": { - "type": "integer" - } - }, - "tag": { - "type": "string" - } - }, - "additionalProperties": false - }, - "AddUserResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/AddUserResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "AddUsers": { - "type": "object", - "properties": { - "users": { - "type": "array", - "items": { - "$ref": "#/definitions/AddUser" - } - } - }, - "additionalProperties": false, - "required": [ - "users" - ] - }, - "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" - ] - }, - "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" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ModelUserInfo": { - "type": "object", - "properties": { - "access": { - "type": "string" - }, - "display-name": { - "type": "string" - }, - "last-connection": { - "type": "string", - "format": "date-time" - }, - "model-tag": { - "type": "string" - }, - "user": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "model-tag", - "user", - "display-name", - "last-connection", - "access" - ] - }, - "ModelUserInfoResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/ModelUserInfo" - } - }, - "additionalProperties": false - }, - "ModelUserInfoResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelUserInfoResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "UserInfo": { - "type": "object", - "properties": { - "access": { - "type": "string" - }, - "created-by": { - "type": "string" - }, - "date-created": { - "type": "string", - "format": "date-time" - }, - "disabled": { - "type": "boolean" - }, - "display-name": { - "type": "string" - }, - "last-connection": { - "type": "string", - "format": "date-time" - }, - "username": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "username", - "display-name", - "access", - "created-by", - "date-created", - "disabled" - ] - }, - "UserInfoRequest": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } - }, - "include-disabled": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "entities", - "include-disabled" - ] - }, - "UserInfoResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/UserInfo" - } - }, - "additionalProperties": false - }, - "UserInfoResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/UserInfoResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - } - } - } - }, - { - "Name": "VolumeAttachmentPlansWatcher", - "Description": "srvMachineStorageIdsWatcher defines the API wrapping a state.StringsWatcher\nwatching machine/storage attachments. This watcher notifies about storage\nentities (volumes/filesystems) being attached to and detached from machines.\n\nTODO(axw) state needs a new watcher, this is a bt of a hack. State watchers\ncould do with some deduplication of logic, and I don't want to add to that\nspaghetti right now.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "Next": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/MachineStorageIdsWatchResult" - } - }, - "description": "Next returns when a change has occurred to an entity of the\ncollection being watched since the most recent call to Next\nor the Watch call that created the srvMachineStorageIdsWatcher." - }, - "Stop": { - "type": "object", - "description": "Stop stops the watcher." - } - }, - "definitions": { - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "MachineStorageId": { - "type": "object", - "properties": { - "attachment-tag": { - "type": "string" - }, - "machine-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "machine-tag", - "attachment-tag" - ] - }, - "MachineStorageIdsWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "$ref": "#/definitions/MachineStorageId" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id", - "changes" - ] - } - } - } - }, - { - "Name": "VolumeAttachmentsWatcher", - "Description": "srvMachineStorageIdsWatcher defines the API wrapping a state.StringsWatcher\nwatching machine/storage attachments. This watcher notifies about storage\nentities (volumes/filesystems) being attached to and detached from machines.\n\nTODO(axw) state needs a new watcher, this is a bt of a hack. State watchers\ncould do with some deduplication of logic, and I don't want to add to that\nspaghetti right now.", - "Version": 2, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "Next": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/MachineStorageIdsWatchResult" - } - }, - "description": "Next returns when a change has occurred to an entity of the\ncollection being watched since the most recent call to Next\nor the Watch call that created the srvMachineStorageIdsWatcher." - }, - "Stop": { - "type": "object", - "description": "Stop stops the watcher." - } - }, - "definitions": { - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "MachineStorageId": { - "type": "object", - "properties": { - "attachment-tag": { - "type": "string" - }, - "machine-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "machine-tag", - "attachment-tag" - ] - }, - "MachineStorageIdsWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "$ref": "#/definitions/MachineStorageId" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id", - "changes" - ] - } - } - } - } -] \ No newline at end of file diff --git a/juju/client/schemas-juju-3.1.1.json b/juju/client/schemas-juju-3.1.1.json deleted file mode 100644 index 29f722a9..00000000 --- a/juju/client/schemas-juju-3.1.1.json +++ /dev/null @@ -1,51231 +0,0 @@ -[ - { - "Name": "Action", - "Description": "APIv7 provides the Action API facade for version 7.", - "Version": 7, - "AvailableTo": [ - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "Actions": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ActionResults" - } - }, - "description": "Actions takes a list of ActionTags, and returns the full Action for\neach ID." - }, - "ApplicationsCharmsActions": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ApplicationsCharmActionsResults" - } - }, - "description": "ApplicationsCharmsActions returns a slice of charm Actions for a slice of\nservices." - }, - "Cancel": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ActionResults" - } - }, - "description": "Cancel attempts to cancel enqueued Actions from running." - }, - "EnqueueOperation": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Actions" - }, - "Result": { - "$ref": "#/definitions/EnqueuedActions" - } - }, - "description": "EnqueueOperation takes a list of Actions and queues them up to be executed as\nan operation, each action running as a task on the designated ActionReceiver.\nWe return the ID of the overall operation and each individual task." - }, - "ListOperations": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/OperationQueryArgs" - }, - "Result": { - "$ref": "#/definitions/OperationResults" - } - }, - "description": "ListOperations fetches the called actions for specified apps/units." - }, - "Operations": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/OperationResults" - } - }, - "description": "Operations fetches the specified operation ids." - }, - "Run": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RunParams" - }, - "Result": { - "$ref": "#/definitions/EnqueuedActions" - } - }, - "description": "Run the commands specified on the machines identified through the\nlist of machines, units and services." - }, - "RunOnAllMachines": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RunParams" - }, - "Result": { - "$ref": "#/definitions/EnqueuedActions" - } - }, - "description": "RunOnAllMachines attempts to run the specified command on all the machines." - }, - "WatchActionsProgress": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - }, - "description": "WatchActionsProgress creates a watcher that reports on action log messages." - } - }, - "definitions": { - "Action": { - "type": "object", - "properties": { - "execution-group": { - "type": "string" - }, - "name": { - "type": "string" - }, - "parallel": { - "type": "boolean" - }, - "parameters": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "receiver": { - "type": "string" - }, - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "receiver", - "name" - ] - }, - "ActionMessage": { - "type": "object", - "properties": { - "message": { - "type": "string" - }, - "timestamp": { - "type": "string", - "format": "date-time" - } - }, - "additionalProperties": false, - "required": [ - "timestamp", - "message" - ] - }, - "ActionResult": { - "type": "object", - "properties": { - "action": { - "$ref": "#/definitions/Action" - }, - "completed": { - "type": "string", - "format": "date-time" - }, - "enqueued": { - "type": "string", - "format": "date-time" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "log": { - "type": "array", - "items": { - "$ref": "#/definitions/ActionMessage" - } - }, - "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 - }, - "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" - } - } - }, - "additionalProperties": false - }, - "ApplicationCharmActionsResult": { - "type": "object", - "properties": { - "actions": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/ActionSpec" - } - } - }, - "application-tag": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ApplicationsCharmActionsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ApplicationCharmActionsResult" - } - } - }, - "additionalProperties": false - }, - "EnqueuedActions": { - "type": "object", - "properties": { - "actions": { - "type": "array", - "items": { - "$ref": "#/definitions/ActionResult" - } - }, - "operation": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "operation" - ] - }, - "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": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "OperationQueryArgs": { - "type": "object", - "properties": { - "actions": { - "type": "array", - "items": { - "type": "string" - } - }, - "applications": { - "type": "array", - "items": { - "type": "string" - } - }, - "limit": { - "type": "integer" - }, - "machines": { - "type": "array", - "items": { - "type": "string" - } - }, - "offset": { - "type": "integer" - }, - "status": { - "type": "array", - "items": { - "type": "string" - } - }, - "units": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "OperationResult": { - "type": "object", - "properties": { - "actions": { - "type": "array", - "items": { - "$ref": "#/definitions/ActionResult" - } - }, - "completed": { - "type": "string", - "format": "date-time" - }, - "enqueued": { - "type": "string", - "format": "date-time" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "fail": { - "type": "string" - }, - "operation": { - "type": "string" - }, - "started": { - "type": "string", - "format": "date-time" - }, - "status": { - "type": "string" - }, - "summary": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "operation", - "summary" - ] - }, - "OperationResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/OperationResult" - } - }, - "truncated": { - "type": "boolean" - } - }, - "additionalProperties": false - }, - "RunParams": { - "type": "object", - "properties": { - "applications": { - "type": "array", - "items": { - "type": "string" - } - }, - "commands": { - "type": "string" - }, - "execution-group": { - "type": "string" - }, - "machines": { - "type": "array", - "items": { - "type": "string" - } - }, - "parallel": { - "type": "boolean" - }, - "timeout": { - "type": "integer" - }, - "units": { - "type": "array", - "items": { - "type": "string" - } - }, - "workload-context": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "commands", - "timeout" - ] - }, - "StringsWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id" - ] - }, - "StringsWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringsWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - } - } - } - }, - { - "Name": "ActionPruner", - "Description": "API provides access to the action pruner API.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "ModelConfig": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ModelConfigResult" - } - }, - "description": "ModelConfig returns the current model's configuration." - }, - "Prune": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ActionPruneArgs" - } - }, - "description": "Prune endpoint removes action entries until\nonly the ones newer than now - p.MaxHistoryTime remain and\nthe history is smaller than p.MaxHistoryMB." - }, - "WatchForModelConfigChanges": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResult" - } - }, - "description": "WatchForModelConfigChanges returns a NotifyWatcher that observes\nchanges to the model configuration.\nNote that although the NotifyWatchResult contains an Error field,\nit's not used because we are only returning a single watcher,\nso we use the regular error return." - } - }, - "definitions": { - "ActionPruneArgs": { - "type": "object", - "properties": { - "max-history-mb": { - "type": "integer" - }, - "max-history-time": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "max-history-time", - "max-history-mb" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ModelConfigResult": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - } - } - } - }, - { - "Name": "Admin", - "Description": "admin is the only object that unlogged-in clients can access. It holds any\nmethods that are needed to log in.", - "Version": 3, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "controller-user", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "Login": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/LoginRequest" - }, - "Result": { - "$ref": "#/definitions/LoginResult" - } - }, - "description": "Login logs in with the provided credentials. All subsequent requests on the\nconnection will act as the authenticated user." - }, - "RedirectInfo": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/RedirectInfoResult" - } - }, - "description": "RedirectInfo returns redirected host information for the model.\nIn Juju it always returns an error because the Juju controller\ndoes not multiplex controllers." - } - }, - "definitions": { - "Address": { - "type": "object", - "properties": { - "cidr": { - "type": "string" - }, - "config-type": { - "type": "string" - }, - "is-secondary": { - "type": "boolean" - }, - "scope": { - "type": "string" - }, - "space-id": { - "type": "string" - }, - "space-name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "value", - "type", - "scope" - ] - }, - "AuthUserInfo": { - "type": "object", - "properties": { - "controller-access": { - "type": "string" - }, - "credentials": { - "type": "string" - }, - "display-name": { - "type": "string" - }, - "identity": { - "type": "string" - }, - "last-connection": { - "type": "string", - "format": "date-time" - }, - "model-access": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "display-name", - "identity", - "controller-access", - "model-access" - ] - }, - "FacadeVersions": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "versions": { - "type": "array", - "items": { - "type": "integer" - } - } - }, - "additionalProperties": false, - "required": [ - "name", - "versions" - ] - }, - "HostPort": { - "type": "object", - "properties": { - "Address": { - "$ref": "#/definitions/Address" - }, - "cidr": { - "type": "string" - }, - "config-type": { - "type": "string" - }, - "is-secondary": { - "type": "boolean" - }, - "port": { - "type": "integer" - }, - "scope": { - "type": "string" - }, - "space-id": { - "type": "string" - }, - "space-name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "value", - "type", - "scope", - "Address", - "port" - ] - }, - "LoginRequest": { - "type": "object", - "properties": { - "auth-tag": { - "type": "string" - }, - "bakery-version": { - "type": "integer" - }, - "cli-args": { - "type": "string" - }, - "client-version": { - "type": "string" - }, - "credentials": { - "type": "string" - }, - "macaroons": { - "type": "array", - "items": { - "type": "array", - "items": { - "$ref": "#/definitions/Macaroon" - } - } - }, - "nonce": { - "type": "string" - }, - "user-data": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "auth-tag", - "credentials", - "nonce", - "macaroons", - "user-data" - ] - }, - "LoginResult": { - "type": "object", - "properties": { - "bakery-discharge-required": { - "$ref": "#/definitions/Macaroon" - }, - "controller-tag": { - "type": "string" - }, - "discharge-required": { - "$ref": "#/definitions/Macaroon" - }, - "discharge-required-error": { - "type": "string" - }, - "facades": { - "type": "array", - "items": { - "$ref": "#/definitions/FacadeVersions" - } - }, - "model-tag": { - "type": "string" - }, - "public-dns-name": { - "type": "string" - }, - "server-version": { - "type": "string" - }, - "servers": { - "type": "array", - "items": { - "type": "array", - "items": { - "$ref": "#/definitions/HostPort" - } - } - }, - "user-info": { - "$ref": "#/definitions/AuthUserInfo" - } - }, - "additionalProperties": false - }, - "Macaroon": { - "type": "object", - "additionalProperties": false - }, - "RedirectInfoResult": { - "type": "object", - "properties": { - "ca-cert": { - "type": "string" - }, - "servers": { - "type": "array", - "items": { - "type": "array", - "items": { - "$ref": "#/definitions/HostPort" - } - } - } - }, - "additionalProperties": false, - "required": [ - "servers", - "ca-cert" - ] - } - } - } - }, - { - "Name": "Agent", - "Description": "AgentAPI implements the version 3 of the API provided to an agent.", - "Version": 3, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent" - ], - "Schema": { - "type": "object", - "properties": { - "ClearReboot": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "ClearReboot will clear the reboot flag on provided machines, if it exists." - }, - "CloudSpec": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/CloudSpecResults" - } - }, - "description": "CloudSpec returns the model's cloud spec." - }, - "ControllerAPIInfoForModels": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ControllerAPIInfoResults" - } - }, - "description": "ControllerAPIInfoForModels returns the controller api connection details for the specified models." - }, - "ControllerConfig": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ControllerConfigResult" - } - }, - "description": "ControllerConfig returns the controller's configuration." - }, - "GetCloudSpec": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ModelTag" - }, - "Result": { - "$ref": "#/definitions/CloudSpecResult" - } - }, - "description": "GetCloudSpec constructs the CloudSpec for a validated and authorized model." - }, - "GetEntities": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/AgentGetEntitiesResults" - } - } - }, - "IsMaster": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/IsMasterResult" - } - } - }, - "ModelConfig": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ModelConfigResult" - } - }, - "description": "ModelConfig returns the current model's configuration." - }, - "SetPasswords": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/EntityPasswords" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetPasswords sets the given password for each supplied entity, if possible." - }, - "StateServingInfo": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StateServingInfo" - } - } - }, - "WatchCloudSpecsChanges": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "WatchCloudSpecsChanges returns a watcher for cloud spec changes." - }, - "WatchCredentials": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "WatchCredentials watches for changes to the specified credentials." - }, - "WatchForModelConfigChanges": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResult" - } - }, - "description": "WatchForModelConfigChanges returns a NotifyWatcher that observes\nchanges to the model configuration.\nNote that although the NotifyWatchResult contains an Error field,\nit's not used because we are only returning a single watcher,\nso we use the regular error return." - } - }, - "definitions": { - "AgentGetEntitiesResult": { - "type": "object", - "properties": { - "container-type": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "jobs": { - "type": "array", - "items": { - "type": "string" - } - }, - "life": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "life", - "jobs", - "container-type" - ] - }, - "AgentGetEntitiesResults": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/AgentGetEntitiesResult" - } - } - }, - "additionalProperties": false, - "required": [ - "entities" - ] - }, - "CloudCredential": { - "type": "object", - "properties": { - "attrs": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "auth-type": { - "type": "string" - }, - "redacted": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "auth-type" - ] - }, - "CloudSpec": { - "type": "object", - "properties": { - "cacertificates": { - "type": "array", - "items": { - "type": "string" - } - }, - "credential": { - "$ref": "#/definitions/CloudCredential" - }, - "endpoint": { - "type": "string" - }, - "identity-endpoint": { - "type": "string" - }, - "is-controller-cloud": { - "type": "boolean" - }, - "name": { - "type": "string" - }, - "region": { - "type": "string" - }, - "skip-tls-verify": { - "type": "boolean" - }, - "storage-endpoint": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type", - "name" - ] - }, - "CloudSpecResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/CloudSpec" - } - }, - "additionalProperties": false - }, - "CloudSpecResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/CloudSpecResult" - } - } - }, - "additionalProperties": false - }, - "ControllerAPIInfoResult": { - "type": "object", - "properties": { - "addresses": { - "type": "array", - "items": { - "type": "string" - } - }, - "cacert": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "addresses", - "cacert" - ] - }, - "ControllerAPIInfoResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ControllerAPIInfoResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ControllerConfigResult": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "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" - ] - }, - "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" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "IsMasterResult": { - "type": "object", - "properties": { - "master": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "master" - ] - }, - "ModelConfigResult": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "ModelTag": { - "type": "object", - "additionalProperties": false - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "NotifyWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "StateServingInfo": { - "type": "object", - "properties": { - "api-port": { - "type": "integer" - }, - "ca-private-key": { - "type": "string" - }, - "cert": { - "type": "string" - }, - "controller-api-port": { - "type": "integer" - }, - "private-key": { - "type": "string" - }, - "shared-secret": { - "type": "string" - }, - "state-port": { - "type": "integer" - }, - "system-identity": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "api-port", - "state-port", - "cert", - "private-key", - "ca-private-key", - "shared-secret", - "system-identity" - ] - } - } - } - }, - { - "Name": "AgentTools", - "Description": "AgentToolsAPI implements the API used by the machine model worker.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "UpdateToolsAvailable": { - "type": "object", - "description": "UpdateToolsAvailable invokes a lookup and further update in environ\nfor new patches of the current tool versions." - } - } - } - }, - { - "Name": "AllModelWatcher", - "Description": "SrvAllWatcher defines the API methods on a state.Multiwatcher.\nwhich watches any changes to the state. Each client has its own\ncurrent set of watchers, stored in resources. It is used by both\nthe AllWatcher and AllModelWatcher facades.", - "Version": 4, - "AvailableTo": [ - "controller-user" - ], - "Schema": { - "type": "object", - "properties": { - "Next": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/AllWatcherNextResults" - } - }, - "description": "Next will return the current state of everything on the first call\nand subsequent calls will" - }, - "Stop": { - "type": "object", - "description": "Stop stops the watcher." - } - }, - "definitions": { - "AllWatcherNextResults": { - "type": "object", - "properties": { - "deltas": { - "type": "array", - "items": { - "$ref": "#/definitions/Delta" - } - } - }, - "additionalProperties": false, - "required": [ - "deltas" - ] - }, - "Delta": { - "type": "object", - "properties": { - "entity": { - "type": "object", - "additionalProperties": true - }, - "removed": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "removed", - "entity" - ] - } - } - } - }, - { - "Name": "AllWatcher", - "Description": "SrvAllWatcher defines the API methods on a state.Multiwatcher.\nwhich watches any changes to the state. Each client has its own\ncurrent set of watchers, stored in resources. It is used by both\nthe AllWatcher and AllModelWatcher facades.", - "Version": 3, - "AvailableTo": [ - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "Next": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/AllWatcherNextResults" - } - }, - "description": "Next will return the current state of everything on the first call\nand subsequent calls will" - }, - "Stop": { - "type": "object", - "description": "Stop stops the watcher." - } - }, - "definitions": { - "AllWatcherNextResults": { - "type": "object", - "properties": { - "deltas": { - "type": "array", - "items": { - "$ref": "#/definitions/Delta" - } - } - }, - "additionalProperties": false, - "required": [ - "deltas" - ] - }, - "Delta": { - "type": "object", - "properties": { - "entity": { - "type": "object", - "additionalProperties": true - }, - "removed": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "removed", - "entity" - ] - } - } - } - }, - { - "Name": "Annotations", - "Description": "API implements the service interface and is the concrete\nimplementation of the api end point.", - "Version": 2, - "AvailableTo": [ - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "Get": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/AnnotationsGetResults" - } - }, - "description": "Get returns annotations for given entities.\nIf annotations cannot be retrieved for a given entity, an error is returned.\nEach entity is treated independently and, hence, will fail or succeed independently." - }, - "Set": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/AnnotationsSet" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "Set stores annotations for given entities" - } - }, - "definitions": { - "AnnotationsGetResult": { - "type": "object", - "properties": { - "annotations": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "entity": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/ErrorResult" - } - }, - "additionalProperties": false, - "required": [ - "entity", - "annotations" - ] - }, - "AnnotationsGetResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/AnnotationsGetResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "AnnotationsSet": { - "type": "object", - "properties": { - "annotations": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityAnnotations" - } - } - }, - "additionalProperties": false, - "required": [ - "annotations" - ] - }, - "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" - ] - }, - "EntityAnnotations": { - "type": "object", - "properties": { - "annotations": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "entity": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "entity", - "annotations" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - } - } - } - }, - { - "Name": "Application", - "Description": "APIv18 provides the Application API facade for version 18.", - "Version": 18, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "AddRelation": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/AddRelation" - }, - "Result": { - "$ref": "#/definitions/AddRelationResults" - } - }, - "description": "AddRelation adds a relation between the specified endpoints and returns the relation info." - }, - "AddUnits": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/AddApplicationUnits" - }, - "Result": { - "$ref": "#/definitions/AddApplicationUnitsResults" - } - }, - "description": "AddUnits adds a given number of units to an application." - }, - "ApplicationsInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ApplicationInfoResults" - } - }, - "description": "ApplicationsInfo returns applications information." - }, - "CharmConfig": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ApplicationGetArgs" - }, - "Result": { - "$ref": "#/definitions/ApplicationGetConfigResults" - } - }, - "description": "CharmConfig returns charm config for the input list of applications and\nmodel generations." - }, - "CharmRelations": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ApplicationCharmRelations" - }, - "Result": { - "$ref": "#/definitions/ApplicationCharmRelationsResults" - } - }, - "description": "CharmRelations implements the server side of Application.CharmRelations." - }, - "Consume": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ConsumeApplicationArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "Consume adds remote applications to the model without creating any\nrelations." - }, - "Deploy": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ApplicationsDeploy" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "Deploy fetches the charms from the charm store and deploys them\nusing the specified placement directives." - }, - "DeployFromRepository": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/DeployFromRepositoryArgs" - }, - "Result": { - "$ref": "#/definitions/DeployFromRepositoryResults" - } - }, - "description": "DeployFromRepository is a one-stop deployment method for repository\ncharms. Only a charm name is required to deploy. If argument validation\nfails, a list of all errors found in validation will be returned. If a\nlocal resource is provided, details required for uploading the validated\nresource will be returned." - }, - "DestroyApplication": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/DestroyApplicationsParams" - }, - "Result": { - "$ref": "#/definitions/DestroyApplicationResults" - } - }, - "description": "DestroyApplication removes a given set of applications." - }, - "DestroyConsumedApplications": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/DestroyConsumedApplicationsParams" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "DestroyConsumedApplications removes a given set of consumed (remote) applications." - }, - "DestroyRelation": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/DestroyRelation" - } - }, - "description": "DestroyRelation removes the relation between the\nspecified endpoints or an id." - }, - "DestroyUnit": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/DestroyUnitsParams" - }, - "Result": { - "$ref": "#/definitions/DestroyUnitResults" - } - }, - "description": "DestroyUnit removes a given set of application units." - }, - "Expose": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ApplicationExpose" - } - }, - "description": "Expose changes the juju-managed firewall to expose any ports that\nwere also explicitly marked by units as open." - }, - "Get": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ApplicationGet" - }, - "Result": { - "$ref": "#/definitions/ApplicationGetResults" - } - }, - "description": "Get returns the charm configuration for an application." - }, - "GetCharmURLOrigin": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ApplicationGet" - }, - "Result": { - "$ref": "#/definitions/CharmURLOriginResult" - } - }, - "description": "GetCharmURLOrigin returns the charm URL and charm origin the given\napplication is running at present." - }, - "GetConfig": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ApplicationGetConfigResults" - } - }, - "description": "GetConfig returns the charm config for each of the input applications." - }, - "GetConstraints": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ApplicationGetConstraintsResults" - } - }, - "description": "GetConstraints returns the constraints for a given application." - }, - "Leader": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entity" - }, - "Result": { - "$ref": "#/definitions/StringResult" - } - }, - "description": "Leader returns the unit name of the leader for the given application." - }, - "MergeBindings": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ApplicationMergeBindingsArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "MergeBindings merges operator-defined bindings with the current bindings for\none or more applications." - }, - "ResolveUnitErrors": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/UnitsResolved" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "ResolveUnitErrors marks errors on the specified units as resolved." - }, - "ScaleApplications": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ScaleApplicationsParams" - }, - "Result": { - "$ref": "#/definitions/ScaleApplicationResults" - } - }, - "description": "ScaleApplications scales the specified application to the requested number of units." - }, - "SetCharm": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ApplicationSetCharm" - } - }, - "description": "SetCharm sets the charm for a given for the application." - }, - "SetConfigs": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ConfigSetArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetConfigs implements the server side of Application.SetConfig. Both\napplication and charm config are set. It does not unset values in\nConfig map that are set to an empty string. Unset should be used for that." - }, - "SetConstraints": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetConstraints" - } - }, - "description": "SetConstraints sets the constraints for a given application." - }, - "SetMetricCredentials": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ApplicationMetricCredentials" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetMetricCredentials sets credentials on the application." - }, - "SetRelationsSuspended": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RelationSuspendedArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetRelationsSuspended sets the suspended status of the specified relations." - }, - "Unexpose": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ApplicationUnexpose" - } - }, - "description": "Unexpose changes the juju-managed firewall to unexpose any ports that\nwere also explicitly marked by units as open." - }, - "UnitsInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/UnitInfoResults" - } - }, - "description": "UnitsInfo returns unit information for the given entities (units or\napplications)." - }, - "UnsetApplicationsConfig": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ApplicationConfigUnsetArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "UnsetApplicationsConfig implements the server side of Application.UnsetApplicationsConfig." - }, - "UpdateApplicationBase": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/UpdateChannelArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "UpdateApplicationBase updates the application base.\nBase for subordinates is updated too." - } - }, - "definitions": { - "AddApplicationUnits": { - "type": "object", - "properties": { - "application": { - "type": "string" - }, - "attach-storage": { - "type": "array", - "items": { - "type": "string" - } - }, - "num-units": { - "type": "integer" - }, - "placement": { - "type": "array", - "items": { - "$ref": "#/definitions/Placement" - } - }, - "policy": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "application", - "num-units", - "placement" - ] - }, - "AddApplicationUnitsResults": { - "type": "object", - "properties": { - "units": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "units" - ] - }, - "AddRelation": { - "type": "object", - "properties": { - "endpoints": { - "type": "array", - "items": { - "type": "string" - } - }, - "via-cidrs": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "endpoints" - ] - }, - "AddRelationResults": { - "type": "object", - "properties": { - "endpoints": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmRelation" - } - } - } - }, - "additionalProperties": false, - "required": [ - "endpoints" - ] - }, - "ApplicationCharmRelations": { - "type": "object", - "properties": { - "application": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "application" - ] - }, - "ApplicationCharmRelationsResults": { - "type": "object", - "properties": { - "charm-relations": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "charm-relations" - ] - }, - "ApplicationConfigUnsetArgs": { - "type": "object", - "properties": { - "Args": { - "type": "array", - "items": { - "$ref": "#/definitions/ApplicationUnset" - } - } - }, - "additionalProperties": false, - "required": [ - "Args" - ] - }, - "ApplicationConstraint": { - "type": "object", - "properties": { - "constraints": { - "$ref": "#/definitions/Value" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "constraints" - ] - }, - "ApplicationDeploy": { - "type": "object", - "properties": { - "Force": { - "type": "boolean" - }, - "application": { - "type": "string" - }, - "attach-storage": { - "type": "array", - "items": { - "type": "string" - } - }, - "channel": { - "type": "string" - }, - "charm-origin": { - "$ref": "#/definitions/CharmOrigin" - }, - "charm-url": { - "type": "string" - }, - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "config-yaml": { - "type": "string" - }, - "constraints": { - "$ref": "#/definitions/Value" - }, - "devices": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/Constraints" - } - } - }, - "endpoint-bindings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "num-units": { - "type": "integer" - }, - "placement": { - "type": "array", - "items": { - "$ref": "#/definitions/Placement" - } - }, - "policy": { - "type": "string" - }, - "resources": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "storage": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/Constraints" - } - } - } - }, - "additionalProperties": false, - "required": [ - "application", - "charm-url", - "channel", - "num-units", - "config-yaml", - "constraints", - "Force" - ] - }, - "ApplicationExpose": { - "type": "object", - "properties": { - "application": { - "type": "string" - }, - "exposed-endpoints": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/ExposedEndpoint" - } - } - } - }, - "additionalProperties": false, - "required": [ - "application" - ] - }, - "ApplicationGet": { - "type": "object", - "properties": { - "application": { - "type": "string" - }, - "branch": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "application", - "branch" - ] - }, - "ApplicationGetArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/ApplicationGet" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "ApplicationGetConfigResults": { - "type": "object", - "properties": { - "Results": { - "type": "array", - "items": { - "$ref": "#/definitions/ConfigResult" - } - } - }, - "additionalProperties": false, - "required": [ - "Results" - ] - }, - "ApplicationGetConstraintsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ApplicationConstraint" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ApplicationGetResults": { - "type": "object", - "properties": { - "application": { - "type": "string" - }, - "application-config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "base": { - "$ref": "#/definitions/Base" - }, - "channel": { - "type": "string" - }, - "charm": { - "type": "string" - }, - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "constraints": { - "$ref": "#/definitions/Value" - }, - "endpoint-bindings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - } - }, - "additionalProperties": false, - "required": [ - "application", - "charm", - "config", - "constraints", - "base", - "channel" - ] - }, - "ApplicationInfoResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/ApplicationResult" - } - }, - "additionalProperties": false - }, - "ApplicationInfoResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ApplicationInfoResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ApplicationMergeBindings": { - "type": "object", - "properties": { - "application-tag": { - "type": "string" - }, - "bindings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "force": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "application-tag", - "bindings", - "force" - ] - }, - "ApplicationMergeBindingsArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/ApplicationMergeBindings" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "ApplicationMetricCredential": { - "type": "object", - "properties": { - "application": { - "type": "string" - }, - "metrics-credentials": { - "type": "array", - "items": { - "type": "integer" - } - } - }, - "additionalProperties": false, - "required": [ - "application", - "metrics-credentials" - ] - }, - "ApplicationMetricCredentials": { - "type": "object", - "properties": { - "creds": { - "type": "array", - "items": { - "$ref": "#/definitions/ApplicationMetricCredential" - } - } - }, - "additionalProperties": false, - "required": [ - "creds" - ] - }, - "ApplicationOfferDetails": { - "type": "object", - "properties": { - "application-description": { - "type": "string" - }, - "bindings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "endpoints": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoteEndpoint" - } - }, - "offer-name": { - "type": "string" - }, - "offer-url": { - "type": "string" - }, - "offer-uuid": { - "type": "string" - }, - "source-model-tag": { - "type": "string" - }, - "spaces": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoteSpace" - } - }, - "users": { - "type": "array", - "items": { - "$ref": "#/definitions/OfferUserDetails" - } - } - }, - "additionalProperties": false, - "required": [ - "source-model-tag", - "offer-uuid", - "offer-url", - "offer-name", - "application-description" - ] - }, - "ApplicationResult": { - "type": "object", - "properties": { - "base": { - "$ref": "#/definitions/Base" - }, - "channel": { - "type": "string" - }, - "charm": { - "type": "string" - }, - "constraints": { - "$ref": "#/definitions/Value" - }, - "endpoint-bindings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "exposed": { - "type": "boolean" - }, - "exposed-endpoints": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/ExposedEndpoint" - } - } - }, - "life": { - "type": "string" - }, - "principal": { - "type": "boolean" - }, - "remote": { - "type": "boolean" - }, - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "principal", - "exposed", - "remote", - "life" - ] - }, - "ApplicationSetCharm": { - "type": "object", - "properties": { - "application": { - "type": "string" - }, - "channel": { - "type": "string" - }, - "charm-origin": { - "$ref": "#/definitions/CharmOrigin" - }, - "charm-url": { - "type": "string" - }, - "config-settings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "config-settings-yaml": { - "type": "string" - }, - "endpoint-bindings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "force": { - "type": "boolean" - }, - "force-base": { - "type": "boolean" - }, - "force-units": { - "type": "boolean" - }, - "generation": { - "type": "string" - }, - "resource-ids": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "storage-constraints": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/StorageConstraints" - } - } - } - }, - "additionalProperties": false, - "required": [ - "application", - "generation", - "charm-url", - "channel", - "force", - "force-units", - "force-base" - ] - }, - "ApplicationUnexpose": { - "type": "object", - "properties": { - "application": { - "type": "string" - }, - "exposed-endpoints": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "application", - "exposed-endpoints" - ] - }, - "ApplicationUnset": { - "type": "object", - "properties": { - "application": { - "type": "string" - }, - "branch": { - "type": "string" - }, - "options": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "application", - "branch", - "options" - ] - }, - "ApplicationsDeploy": { - "type": "object", - "properties": { - "applications": { - "type": "array", - "items": { - "$ref": "#/definitions/ApplicationDeploy" - } - } - }, - "additionalProperties": false, - "required": [ - "applications" - ] - }, - "Base": { - "type": "object", - "properties": { - "channel": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "channel" - ] - }, - "Channel": { - "type": "object", - "properties": { - "branch": { - "type": "string" - }, - "risk": { - "type": "string" - }, - "track": { - "type": "string" - } - }, - "additionalProperties": false - }, - "CharmOrigin": { - "type": "object", - "properties": { - "architecture": { - "type": "string" - }, - "base": { - "$ref": "#/definitions/Base" - }, - "branch": { - "type": "string" - }, - "hash": { - "type": "string" - }, - "id": { - "type": "string" - }, - "instance-key": { - "type": "string" - }, - "revision": { - "type": "integer" - }, - "risk": { - "type": "string" - }, - "source": { - "type": "string" - }, - "track": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "source", - "type", - "id" - ] - }, - "CharmRelation": { - "type": "object", - "properties": { - "interface": { - "type": "string" - }, - "limit": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "optional": { - "type": "boolean" - }, - "role": { - "type": "string" - }, - "scope": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "role", - "interface", - "optional", - "limit", - "scope" - ] - }, - "CharmURLOriginResult": { - "type": "object", - "properties": { - "charm-origin": { - "$ref": "#/definitions/CharmOrigin" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "url": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "url", - "charm-origin" - ] - }, - "ConfigResult": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "ConfigSet": { - "type": "object", - "properties": { - "application": { - "type": "string" - }, - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "config-yaml": { - "type": "string" - }, - "generation": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "application", - "generation", - "config", - "config-yaml" - ] - }, - "ConfigSetArgs": { - "type": "object", - "properties": { - "Args": { - "type": "array", - "items": { - "$ref": "#/definitions/ConfigSet" - } - } - }, - "additionalProperties": false, - "required": [ - "Args" - ] - }, - "Constraints": { - "type": "object", - "properties": { - "Count": { - "type": "integer" - }, - "Pool": { - "type": "string" - }, - "Size": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "Pool", - "Size", - "Count" - ] - }, - "ConsumeApplicationArg": { - "type": "object", - "properties": { - "ApplicationOfferDetails": { - "$ref": "#/definitions/ApplicationOfferDetails" - }, - "application-alias": { - "type": "string" - }, - "application-description": { - "type": "string" - }, - "bindings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "endpoints": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoteEndpoint" - } - }, - "external-controller": { - "$ref": "#/definitions/ExternalControllerInfo" - }, - "macaroon": { - "$ref": "#/definitions/Macaroon" - }, - "offer-name": { - "type": "string" - }, - "offer-url": { - "type": "string" - }, - "offer-uuid": { - "type": "string" - }, - "source-model-tag": { - "type": "string" - }, - "spaces": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoteSpace" - } - }, - "users": { - "type": "array", - "items": { - "$ref": "#/definitions/OfferUserDetails" - } - } - }, - "additionalProperties": false, - "required": [ - "source-model-tag", - "offer-uuid", - "offer-url", - "offer-name", - "application-description", - "ApplicationOfferDetails" - ] - }, - "ConsumeApplicationArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/ConsumeApplicationArg" - } - } - }, - "additionalProperties": false - }, - "DeployFromRepositoryArg": { - "type": "object", - "properties": { - "ApplicationName": { - "type": "string" - }, - "AttachStorage": { - "type": "array", - "items": { - "type": "string" - } - }, - "Base": { - "$ref": "#/definitions/Base" - }, - "Channel": { - "$ref": "#/definitions/Channel" - }, - "CharmName": { - "type": "string" - }, - "ConfigYAML": { - "type": "string" - }, - "Cons": { - "$ref": "#/definitions/Value" - }, - "Devices": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/Constraints" - } - } - }, - "DryRun": { - "type": "boolean" - }, - "EndpointBindings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "Force": { - "type": "boolean" - }, - "NumUnits": { - "type": "integer" - }, - "Placement": { - "type": "array", - "items": { - "$ref": "#/definitions/Placement" - } - }, - "Resources": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "Revision": { - "type": "integer" - }, - "Storage": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/Constraints" - } - } - }, - "Trust": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "CharmName", - "ApplicationName", - "AttachStorage", - "Base", - "Channel", - "ConfigYAML", - "Cons", - "Devices", - "DryRun", - "EndpointBindings", - "Force", - "NumUnits", - "Placement", - "Revision", - "Resources", - "Storage", - "Trust" - ] - }, - "DeployFromRepositoryArgs": { - "type": "object", - "properties": { - "Args": { - "type": "array", - "items": { - "$ref": "#/definitions/DeployFromRepositoryArg" - } - } - }, - "additionalProperties": false, - "required": [ - "Args" - ] - }, - "DeployFromRepositoryResult": { - "type": "object", - "properties": { - "Errors": { - "type": "array", - "items": { - "$ref": "#/definitions/Error" - } - }, - "Info": { - "type": "array", - "items": { - "type": "string" - } - }, - "PendingResourceUploads": { - "type": "array", - "items": { - "$ref": "#/definitions/PendingResourceUpload" - } - } - }, - "additionalProperties": false, - "required": [ - "Errors", - "Info", - "PendingResourceUploads" - ] - }, - "DeployFromRepositoryResults": { - "type": "object", - "properties": { - "Results": { - "type": "array", - "items": { - "$ref": "#/definitions/DeployFromRepositoryResult" - } - } - }, - "additionalProperties": false, - "required": [ - "Results" - ] - }, - "DestroyApplicationInfo": { - "type": "object", - "properties": { - "destroyed-storage": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } - }, - "destroyed-units": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } - }, - "detached-storage": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } - } - }, - "additionalProperties": false - }, - "DestroyApplicationParams": { - "type": "object", - "properties": { - "application-tag": { - "type": "string" - }, - "destroy-storage": { - "type": "boolean" - }, - "dry-run": { - "type": "boolean" - }, - "force": { - "type": "boolean" - }, - "max-wait": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "application-tag", - "force" - ] - }, - "DestroyApplicationResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "info": { - "$ref": "#/definitions/DestroyApplicationInfo" - } - }, - "additionalProperties": false - }, - "DestroyApplicationResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/DestroyApplicationResult" - } - } - }, - "additionalProperties": false - }, - "DestroyApplicationsParams": { - "type": "object", - "properties": { - "applications": { - "type": "array", - "items": { - "$ref": "#/definitions/DestroyApplicationParams" - } - } - }, - "additionalProperties": false, - "required": [ - "applications" - ] - }, - "DestroyConsumedApplicationParams": { - "type": "object", - "properties": { - "application-tag": { - "type": "string" - }, - "force": { - "type": "boolean" - }, - "max-wait": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "application-tag" - ] - }, - "DestroyConsumedApplicationsParams": { - "type": "object", - "properties": { - "applications": { - "type": "array", - "items": { - "$ref": "#/definitions/DestroyConsumedApplicationParams" - } - } - }, - "additionalProperties": false, - "required": [ - "applications" - ] - }, - "DestroyRelation": { - "type": "object", - "properties": { - "endpoints": { - "type": "array", - "items": { - "type": "string" - } - }, - "force": { - "type": "boolean" - }, - "max-wait": { - "type": "integer" - }, - "relation-id": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "relation-id" - ] - }, - "DestroyUnitInfo": { - "type": "object", - "properties": { - "destroyed-storage": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } - }, - "detached-storage": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } - } - }, - "additionalProperties": false - }, - "DestroyUnitParams": { - "type": "object", - "properties": { - "destroy-storage": { - "type": "boolean" - }, - "dry-run": { - "type": "boolean" - }, - "force": { - "type": "boolean" - }, - "max-wait": { - "type": "integer" - }, - "unit-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "unit-tag" - ] - }, - "DestroyUnitResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "info": { - "$ref": "#/definitions/DestroyUnitInfo" - } - }, - "additionalProperties": false - }, - "DestroyUnitResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/DestroyUnitResult" - } - } - }, - "additionalProperties": false - }, - "DestroyUnitsParams": { - "type": "object", - "properties": { - "units": { - "type": "array", - "items": { - "$ref": "#/definitions/DestroyUnitParams" - } - } - }, - "additionalProperties": false, - "required": [ - "units" - ] - }, - "EndpointRelationData": { - "type": "object", - "properties": { - "ApplicationData": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "cross-model": { - "type": "boolean" - }, - "endpoint": { - "type": "string" - }, - "related-endpoint": { - "type": "string" - }, - "relation-id": { - "type": "integer" - }, - "unit-relation-data": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/RelationData" - } - } - } - }, - "additionalProperties": false, - "required": [ - "relation-id", - "endpoint", - "cross-model", - "related-endpoint", - "ApplicationData", - "unit-relation-data" - ] - }, - "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": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ExposedEndpoint": { - "type": "object", - "properties": { - "expose-to-cidrs": { - "type": "array", - "items": { - "type": "string" - } - }, - "expose-to-spaces": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "ExternalControllerInfo": { - "type": "object", - "properties": { - "addrs": { - "type": "array", - "items": { - "type": "string" - } - }, - "ca-cert": { - "type": "string" - }, - "controller-alias": { - "type": "string" - }, - "controller-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "controller-tag", - "controller-alias", - "addrs", - "ca-cert" - ] - }, - "Macaroon": { - "type": "object", - "additionalProperties": false - }, - "OfferUserDetails": { - "type": "object", - "properties": { - "access": { - "type": "string" - }, - "display-name": { - "type": "string" - }, - "user": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "user", - "display-name", - "access" - ] - }, - "PendingResourceUpload": { - "type": "object", - "properties": { - "Filename": { - "type": "string" - }, - "Name": { - "type": "string" - }, - "PendingID": { - "type": "string" - }, - "Type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Name", - "Filename", - "PendingID", - "Type" - ] - }, - "Placement": { - "type": "object", - "properties": { - "directive": { - "type": "string" - }, - "scope": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "scope", - "directive" - ] - }, - "RelationData": { - "type": "object", - "properties": { - "InScope": { - "type": "boolean" - }, - "UnitData": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "InScope", - "UnitData" - ] - }, - "RelationSuspendedArg": { - "type": "object", - "properties": { - "message": { - "type": "string" - }, - "relation-id": { - "type": "integer" - }, - "suspended": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "relation-id", - "message", - "suspended" - ] - }, - "RelationSuspendedArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/RelationSuspendedArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "RemoteEndpoint": { - "type": "object", - "properties": { - "interface": { - "type": "string" - }, - "limit": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "role": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "role", - "interface", - "limit" - ] - }, - "RemoteSpace": { - "type": "object", - "properties": { - "cloud-type": { - "type": "string" - }, - "name": { - "type": "string" - }, - "provider-attributes": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "provider-id": { - "type": "string" - }, - "subnets": { - "type": "array", - "items": { - "$ref": "#/definitions/Subnet" - } - } - }, - "additionalProperties": false, - "required": [ - "cloud-type", - "name", - "provider-id", - "provider-attributes", - "subnets" - ] - }, - "ScaleApplicationInfo": { - "type": "object", - "properties": { - "num-units": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "num-units" - ] - }, - "ScaleApplicationParams": { - "type": "object", - "properties": { - "application-tag": { - "type": "string" - }, - "force": { - "type": "boolean" - }, - "scale": { - "type": "integer" - }, - "scale-change": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "application-tag", - "scale", - "force" - ] - }, - "ScaleApplicationResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "info": { - "$ref": "#/definitions/ScaleApplicationInfo" - } - }, - "additionalProperties": false - }, - "ScaleApplicationResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ScaleApplicationResult" - } - } - }, - "additionalProperties": false - }, - "ScaleApplicationsParams": { - "type": "object", - "properties": { - "applications": { - "type": "array", - "items": { - "$ref": "#/definitions/ScaleApplicationParams" - } - } - }, - "additionalProperties": false, - "required": [ - "applications" - ] - }, - "SetConstraints": { - "type": "object", - "properties": { - "application": { - "type": "string" - }, - "constraints": { - "$ref": "#/definitions/Value" - } - }, - "additionalProperties": false, - "required": [ - "application", - "constraints" - ] - }, - "StorageConstraints": { - "type": "object", - "properties": { - "count": { - "type": "integer" - }, - "pool": { - "type": "string" - }, - "size": { - "type": "integer" - } - }, - "additionalProperties": false - }, - "StringResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "Subnet": { - "type": "object", - "properties": { - "cidr": { - "type": "string" - }, - "life": { - "type": "string" - }, - "provider-id": { - "type": "string" - }, - "provider-network-id": { - "type": "string" - }, - "provider-space-id": { - "type": "string" - }, - "space-tag": { - "type": "string" - }, - "status": { - "type": "string" - }, - "vlan-tag": { - "type": "integer" - }, - "zones": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "cidr", - "vlan-tag", - "life", - "space-tag", - "zones" - ] - }, - "UnitInfoResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/UnitResult" - } - }, - "additionalProperties": false - }, - "UnitInfoResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/UnitInfoResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "UnitResult": { - "type": "object", - "properties": { - "address": { - "type": "string" - }, - "charm": { - "type": "string" - }, - "leader": { - "type": "boolean" - }, - "life": { - "type": "string" - }, - "machine": { - "type": "string" - }, - "opened-ports": { - "type": "array", - "items": { - "type": "string" - } - }, - "provider-id": { - "type": "string" - }, - "public-address": { - "type": "string" - }, - "relation-data": { - "type": "array", - "items": { - "$ref": "#/definitions/EndpointRelationData" - } - }, - "tag": { - "type": "string" - }, - "workload-version": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "workload-version", - "opened-ports", - "charm" - ] - }, - "UnitsResolved": { - "type": "object", - "properties": { - "all": { - "type": "boolean" - }, - "retry": { - "type": "boolean" - }, - "tags": { - "$ref": "#/definitions/Entities" - } - }, - "additionalProperties": false - }, - "UpdateChannelArg": { - "type": "object", - "properties": { - "channel": { - "type": "string" - }, - "force": { - "type": "boolean" - }, - "tag": { - "$ref": "#/definitions/Entity" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "force", - "channel" - ] - }, - "UpdateChannelArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/UpdateChannelArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "Value": { - "type": "object", - "properties": { - "allocate-public-ip": { - "type": "boolean" - }, - "arch": { - "type": "string" - }, - "container": { - "type": "string" - }, - "cores": { - "type": "integer" - }, - "cpu-power": { - "type": "integer" - }, - "instance-role": { - "type": "string" - }, - "instance-type": { - "type": "string" - }, - "mem": { - "type": "integer" - }, - "root-disk": { - "type": "integer" - }, - "root-disk-source": { - "type": "string" - }, - "spaces": { - "type": "array", - "items": { - "type": "string" - } - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "virt-type": { - "type": "string" - }, - "zones": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - } - } - } - }, - { - "Name": "ApplicationOffers", - "Description": "OffersAPI implements the cross model interface and is the concrete\nimplementation of the api end point.", - "Version": 4, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "controller-user" - ], - "Schema": { - "type": "object", - "properties": { - "ApplicationOffers": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/OfferURLs" - }, - "Result": { - "$ref": "#/definitions/ApplicationOffersResults" - } - }, - "description": "ApplicationOffers gets details about remote applications that match given URLs." - }, - "DestroyOffers": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/DestroyApplicationOffers" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "DestroyOffers removes the offers specified by the given URLs, forcing if necessary." - }, - "FindApplicationOffers": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/OfferFilters" - }, - "Result": { - "$ref": "#/definitions/QueryApplicationOffersResults" - } - }, - "description": "FindApplicationOffers gets details about remote applications that match given filter." - }, - "GetConsumeDetails": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ConsumeOfferDetailsArg" - }, - "Result": { - "$ref": "#/definitions/ConsumeOfferDetailsResults" - } - }, - "description": "GetConsumeDetails returns the details necessary to pass to another model\nto allow the specified args user to consume the offers represented by the args URLs." - }, - "ListApplicationOffers": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/OfferFilters" - }, - "Result": { - "$ref": "#/definitions/QueryApplicationOffersResults" - } - }, - "description": "ListApplicationOffers gets deployed details about application offers that match given filter.\nThe results contain details about the deployed applications such as connection count." - }, - "ModifyOfferAccess": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ModifyOfferAccessRequest" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "ModifyOfferAccess changes the application offer access granted to users." - }, - "Offer": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/AddApplicationOffers" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "Offer makes application endpoints available for consumption at a specified URL." - }, - "RemoteApplicationInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/OfferURLs" - }, - "Result": { - "$ref": "#/definitions/RemoteApplicationInfoResults" - } - }, - "description": "RemoteApplicationInfo returns information about the requested remote application.\nThis call currently has no client side API, only there for the Dashboard at this stage." - } - }, - "definitions": { - "AddApplicationOffer": { - "type": "object", - "properties": { - "application-description": { - "type": "string" - }, - "application-name": { - "type": "string" - }, - "endpoints": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "model-tag": { - "type": "string" - }, - "offer-name": { - "type": "string" - }, - "owner-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "model-tag", - "offer-name", - "application-name", - "application-description", - "endpoints" - ] - }, - "AddApplicationOffers": { - "type": "object", - "properties": { - "Offers": { - "type": "array", - "items": { - "$ref": "#/definitions/AddApplicationOffer" - } - } - }, - "additionalProperties": false, - "required": [ - "Offers" - ] - }, - "ApplicationOfferAdminDetails": { - "type": "object", - "properties": { - "ApplicationOfferDetails": { - "$ref": "#/definitions/ApplicationOfferDetails" - }, - "application-description": { - "type": "string" - }, - "application-name": { - "type": "string" - }, - "bindings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "charm-url": { - "type": "string" - }, - "connections": { - "type": "array", - "items": { - "$ref": "#/definitions/OfferConnection" - } - }, - "endpoints": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoteEndpoint" - } - }, - "offer-name": { - "type": "string" - }, - "offer-url": { - "type": "string" - }, - "offer-uuid": { - "type": "string" - }, - "source-model-tag": { - "type": "string" - }, - "spaces": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoteSpace" - } - }, - "users": { - "type": "array", - "items": { - "$ref": "#/definitions/OfferUserDetails" - } - } - }, - "additionalProperties": false, - "required": [ - "source-model-tag", - "offer-uuid", - "offer-url", - "offer-name", - "application-description", - "ApplicationOfferDetails", - "application-name", - "charm-url" - ] - }, - "ApplicationOfferDetails": { - "type": "object", - "properties": { - "application-description": { - "type": "string" - }, - "bindings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "endpoints": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoteEndpoint" - } - }, - "offer-name": { - "type": "string" - }, - "offer-url": { - "type": "string" - }, - "offer-uuid": { - "type": "string" - }, - "source-model-tag": { - "type": "string" - }, - "spaces": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoteSpace" - } - }, - "users": { - "type": "array", - "items": { - "$ref": "#/definitions/OfferUserDetails" - } - } - }, - "additionalProperties": false, - "required": [ - "source-model-tag", - "offer-uuid", - "offer-url", - "offer-name", - "application-description" - ] - }, - "ApplicationOfferResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/ApplicationOfferAdminDetails" - } - }, - "additionalProperties": false - }, - "ApplicationOffersResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ApplicationOfferResult" - } - } - }, - "additionalProperties": false - }, - "ConsumeOfferDetails": { - "type": "object", - "properties": { - "external-controller": { - "$ref": "#/definitions/ExternalControllerInfo" - }, - "macaroon": { - "$ref": "#/definitions/Macaroon" - }, - "offer": { - "$ref": "#/definitions/ApplicationOfferDetails" - } - }, - "additionalProperties": false - }, - "ConsumeOfferDetailsArg": { - "type": "object", - "properties": { - "offer-urls": { - "$ref": "#/definitions/OfferURLs" - }, - "user-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "offer-urls" - ] - }, - "ConsumeOfferDetailsResult": { - "type": "object", - "properties": { - "ConsumeOfferDetails": { - "$ref": "#/definitions/ConsumeOfferDetails" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "external-controller": { - "$ref": "#/definitions/ExternalControllerInfo" - }, - "macaroon": { - "$ref": "#/definitions/Macaroon" - }, - "offer": { - "$ref": "#/definitions/ApplicationOfferDetails" - } - }, - "additionalProperties": false, - "required": [ - "ConsumeOfferDetails" - ] - }, - "ConsumeOfferDetailsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ConsumeOfferDetailsResult" - } - } - }, - "additionalProperties": false - }, - "DestroyApplicationOffers": { - "type": "object", - "properties": { - "force": { - "type": "boolean" - }, - "offer-urls": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "offer-urls" - ] - }, - "EndpointFilterAttributes": { - "type": "object", - "properties": { - "interface": { - "type": "string" - }, - "name": { - "type": "string" - }, - "role": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "role", - "interface", - "name" - ] - }, - "EntityStatus": { - "type": "object", - "properties": { - "data": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "info": { - "type": "string" - }, - "since": { - "type": "string", - "format": "date-time" - }, - "status": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "status", - "info", - "since" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ExternalControllerInfo": { - "type": "object", - "properties": { - "addrs": { - "type": "array", - "items": { - "type": "string" - } - }, - "ca-cert": { - "type": "string" - }, - "controller-alias": { - "type": "string" - }, - "controller-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "controller-tag", - "controller-alias", - "addrs", - "ca-cert" - ] - }, - "Macaroon": { - "type": "object", - "additionalProperties": false - }, - "ModifyOfferAccess": { - "type": "object", - "properties": { - "access": { - "type": "string" - }, - "action": { - "type": "string" - }, - "offer-url": { - "type": "string" - }, - "user-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "user-tag", - "action", - "access", - "offer-url" - ] - }, - "ModifyOfferAccessRequest": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "$ref": "#/definitions/ModifyOfferAccess" - } - } - }, - "additionalProperties": false, - "required": [ - "changes" - ] - }, - "OfferConnection": { - "type": "object", - "properties": { - "endpoint": { - "type": "string" - }, - "ingress-subnets": { - "type": "array", - "items": { - "type": "string" - } - }, - "relation-id": { - "type": "integer" - }, - "source-model-tag": { - "type": "string" - }, - "status": { - "$ref": "#/definitions/EntityStatus" - }, - "username": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "source-model-tag", - "relation-id", - "username", - "endpoint", - "status", - "ingress-subnets" - ] - }, - "OfferFilter": { - "type": "object", - "properties": { - "allowed-users": { - "type": "array", - "items": { - "type": "string" - } - }, - "application-description": { - "type": "string" - }, - "application-name": { - "type": "string" - }, - "application-user": { - "type": "string" - }, - "connected-users": { - "type": "array", - "items": { - "type": "string" - } - }, - "endpoints": { - "type": "array", - "items": { - "$ref": "#/definitions/EndpointFilterAttributes" - } - }, - "model-name": { - "type": "string" - }, - "offer-name": { - "type": "string" - }, - "owner-name": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "owner-name", - "model-name", - "offer-name", - "application-name", - "application-description", - "application-user", - "endpoints", - "connected-users", - "allowed-users" - ] - }, - "OfferFilters": { - "type": "object", - "properties": { - "Filters": { - "type": "array", - "items": { - "$ref": "#/definitions/OfferFilter" - } - } - }, - "additionalProperties": false, - "required": [ - "Filters" - ] - }, - "OfferURLs": { - "type": "object", - "properties": { - "bakery-version": { - "type": "integer" - }, - "offer-urls": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "OfferUserDetails": { - "type": "object", - "properties": { - "access": { - "type": "string" - }, - "display-name": { - "type": "string" - }, - "user": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "user", - "display-name", - "access" - ] - }, - "QueryApplicationOffersResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ApplicationOfferAdminDetails" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "RemoteApplicationInfo": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "endpoints": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoteEndpoint" - } - }, - "icon-url-path": { - "type": "string" - }, - "model-tag": { - "type": "string" - }, - "name": { - "type": "string" - }, - "offer-url": { - "type": "string" - }, - "source-model-label": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "model-tag", - "name", - "description", - "offer-url", - "endpoints", - "icon-url-path" - ] - }, - "RemoteApplicationInfoResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/RemoteApplicationInfo" - } - }, - "additionalProperties": false - }, - "RemoteApplicationInfoResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoteApplicationInfoResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "RemoteEndpoint": { - "type": "object", - "properties": { - "interface": { - "type": "string" - }, - "limit": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "role": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "role", - "interface", - "limit" - ] - }, - "RemoteSpace": { - "type": "object", - "properties": { - "cloud-type": { - "type": "string" - }, - "name": { - "type": "string" - }, - "provider-attributes": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "provider-id": { - "type": "string" - }, - "subnets": { - "type": "array", - "items": { - "$ref": "#/definitions/Subnet" - } - } - }, - "additionalProperties": false, - "required": [ - "cloud-type", - "name", - "provider-id", - "provider-attributes", - "subnets" - ] - }, - "Subnet": { - "type": "object", - "properties": { - "cidr": { - "type": "string" - }, - "life": { - "type": "string" - }, - "provider-id": { - "type": "string" - }, - "provider-network-id": { - "type": "string" - }, - "provider-space-id": { - "type": "string" - }, - "space-tag": { - "type": "string" - }, - "status": { - "type": "string" - }, - "vlan-tag": { - "type": "integer" - }, - "zones": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "cidr", - "vlan-tag", - "life", - "space-tag", - "zones" - ] - } - } - } - }, - { - "Name": "ApplicationScaler", - "Description": "Facade allows model-manager clients to watch and rescale services.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent" - ], - "Schema": { - "type": "object", - "properties": { - "Rescale": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "Rescale causes any supplied services to be scaled up to their\nminimum size." - }, - "Watch": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsWatchResult" - } - }, - "description": "Watch returns a watcher that sends the names of services whose\nunit count may be below their configured minimum." - } - }, - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "StringsWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id" - ] - } - } - } - }, - { - "Name": "Backups", - "Description": "API provides backup-specific API methods.", - "Version": 3, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "Create": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/BackupsCreateArgs" - }, - "Result": { - "$ref": "#/definitions/BackupsMetadataResult" - } - }, - "description": "Create is the API method that requests juju to create a new backup\nof its state." - } - }, - "definitions": { - "BackupsCreateArgs": { - "type": "object", - "properties": { - "no-download": { - "type": "boolean" - }, - "notes": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "notes", - "no-download" - ] - }, - "BackupsMetadataResult": { - "type": "object", - "properties": { - "base": { - "type": "string" - }, - "checksum": { - "type": "string" - }, - "checksum-format": { - "type": "string" - }, - "controller-machine-id": { - "type": "string" - }, - "controller-machine-inst-id": { - "type": "string" - }, - "controller-uuid": { - "type": "string" - }, - "filename": { - "type": "string" - }, - "finished": { - "type": "string", - "format": "date-time" - }, - "format-version": { - "type": "integer" - }, - "ha-nodes": { - "type": "integer" - }, - "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" - }, - "version": { - "$ref": "#/definitions/Number" - } - }, - "additionalProperties": false, - "required": [ - "id", - "checksum", - "checksum-format", - "size", - "stored", - "started", - "finished", - "notes", - "model", - "machine", - "hostname", - "version", - "base", - "filename", - "format-version", - "controller-uuid", - "controller-machine-id", - "controller-machine-inst-id", - "ha-nodes" - ] - }, - "Number": { - "type": "object", - "properties": { - "Build": { - "type": "integer" - }, - "Major": { - "type": "integer" - }, - "Minor": { - "type": "integer" - }, - "Patch": { - "type": "integer" - }, - "Tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Major", - "Minor", - "Tag", - "Patch", - "Build" - ] - } - } - } - }, - { - "Name": "Block", - "Description": "API implements Block interface and is the concrete\nimplementation of the api end point.", - "Version": 2, - "AvailableTo": [ - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "List": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/BlockResults" - } - }, - "description": "List implements Block.List()." - }, - "SwitchBlockOff": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/BlockSwitchParams" - }, - "Result": { - "$ref": "#/definitions/ErrorResult" - } - }, - "description": "SwitchBlockOff implements Block.SwitchBlockOff()." - }, - "SwitchBlockOn": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/BlockSwitchParams" - }, - "Result": { - "$ref": "#/definitions/ErrorResult" - } - }, - "description": "SwitchBlockOn implements Block.SwitchBlockOn()." - } - }, - "definitions": { - "Block": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "message": { - "type": "string" - }, - "tag": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "id", - "tag", - "type" - ] - }, - "BlockResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/Block" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "BlockResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/BlockResult" - } - } - }, - "additionalProperties": false - }, - "BlockSwitchParams": { - "type": "object", - "properties": { - "message": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - } - } - } - }, - { - "Name": "Bundle", - "Description": "APIv6 provides the Bundle API facade for version 6. It is otherwise\nidentical to V5 with the exception that the V6 adds the support for\nmulti-part yaml handling to GetChanges and GetChangesMapArgs.", - "Version": 6, - "AvailableTo": [ - "controller-user", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "ExportBundle": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ExportBundleParams" - }, - "Result": { - "$ref": "#/definitions/StringResult" - } - }, - "description": "ExportBundle exports the current model configuration as bundle." - }, - "GetChanges": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/BundleChangesParams" - }, - "Result": { - "$ref": "#/definitions/BundleChangesResults" - } - }, - "description": "GetChanges returns the list of changes required to deploy the given bundle\ndata. The changes are sorted by requirements, so that they can be applied in\norder.\nGetChanges has been superseded in favour of GetChangesMapArgs. It's\npreferable to use that new method to add new functionality and move clients\naway from this one." - }, - "GetChangesMapArgs": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/BundleChangesParams" - }, - "Result": { - "$ref": "#/definitions/BundleChangesMapArgsResults" - } - }, - "description": "GetChangesMapArgs returns the list of changes required to deploy the given\nbundle data. The changes are sorted by requirements, so that they can be\napplied in order.\nV4 GetChangesMapArgs is not supported on anything less than v4" - } - }, - "definitions": { - "BundleChange": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": true - } - }, - "id": { - "type": "string" - }, - "method": { - "type": "string" - }, - "requires": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "id", - "method", - "args", - "requires" - ] - }, - "BundleChangesMapArgs": { - "type": "object", - "properties": { - "args": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "id": { - "type": "string" - }, - "method": { - "type": "string" - }, - "requires": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "id", - "method", - "args", - "requires" - ] - }, - "BundleChangesMapArgsResults": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "$ref": "#/definitions/BundleChangesMapArgs" - } - }, - "errors": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "BundleChangesParams": { - "type": "object", - "properties": { - "bundleURL": { - "type": "string" - }, - "yaml": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "yaml", - "bundleURL" - ] - }, - "BundleChangesResults": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "$ref": "#/definitions/BundleChange" - } - }, - "errors": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ExportBundleParams": { - "type": "object", - "properties": { - "include-charm-defaults": { - "type": "boolean" - } - }, - "additionalProperties": false - }, - "StringResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - } - } - } - }, - { - "Name": "CAASAdmission", - "Description": "", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent" - ], - "Schema": { - "type": "object", - "properties": { - "ControllerAPIInfoForModels": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ControllerAPIInfoResults" - } - }, - "description": "ControllerAPIInfoForModels returns the controller api connection details for the specified models." - }, - "ControllerConfig": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ControllerConfigResult" - } - }, - "description": "ControllerConfig returns the controller's configuration." - } - }, - "definitions": { - "ControllerAPIInfoResult": { - "type": "object", - "properties": { - "addresses": { - "type": "array", - "items": { - "type": "string" - } - }, - "cacert": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "addresses", - "cacert" - ] - }, - "ControllerAPIInfoResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ControllerAPIInfoResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ControllerConfigResult": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "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": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - } - } - } - }, - { - "Name": "CAASAgent", - "Description": "FacadeV2 is the V2 facade of the caas agent", - "Version": 2, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "CloudSpec": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/CloudSpecResults" - } - }, - "description": "CloudSpec returns the model's cloud spec." - }, - "ControllerAPIInfoForModels": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ControllerAPIInfoResults" - } - }, - "description": "ControllerAPIInfoForModels returns the controller api connection details for the specified models." - }, - "ControllerConfig": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ControllerConfigResult" - } - }, - "description": "ControllerConfig returns the controller's configuration." - }, - "GetCloudSpec": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ModelTag" - }, - "Result": { - "$ref": "#/definitions/CloudSpecResult" - } - }, - "description": "GetCloudSpec constructs the CloudSpec for a validated and authorized model." - }, - "ModelConfig": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ModelConfigResult" - } - }, - "description": "ModelConfig returns the current model's configuration." - }, - "WatchCloudSpecsChanges": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "WatchCloudSpecsChanges returns a watcher for cloud spec changes." - }, - "WatchForModelConfigChanges": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResult" - } - }, - "description": "WatchForModelConfigChanges returns a NotifyWatcher that observes\nchanges to the model configuration.\nNote that although the NotifyWatchResult contains an Error field,\nit's not used because we are only returning a single watcher,\nso we use the regular error return." - } - }, - "definitions": { - "CloudCredential": { - "type": "object", - "properties": { - "attrs": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "auth-type": { - "type": "string" - }, - "redacted": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "auth-type" - ] - }, - "CloudSpec": { - "type": "object", - "properties": { - "cacertificates": { - "type": "array", - "items": { - "type": "string" - } - }, - "credential": { - "$ref": "#/definitions/CloudCredential" - }, - "endpoint": { - "type": "string" - }, - "identity-endpoint": { - "type": "string" - }, - "is-controller-cloud": { - "type": "boolean" - }, - "name": { - "type": "string" - }, - "region": { - "type": "string" - }, - "skip-tls-verify": { - "type": "boolean" - }, - "storage-endpoint": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type", - "name" - ] - }, - "CloudSpecResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/CloudSpec" - } - }, - "additionalProperties": false - }, - "CloudSpecResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/CloudSpecResult" - } - } - }, - "additionalProperties": false - }, - "ControllerAPIInfoResult": { - "type": "object", - "properties": { - "addresses": { - "type": "array", - "items": { - "type": "string" - } - }, - "cacert": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "addresses", - "cacert" - ] - }, - "ControllerAPIInfoResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ControllerAPIInfoResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ControllerConfigResult": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "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": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ModelConfigResult": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "ModelTag": { - "type": "object", - "additionalProperties": false - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "NotifyWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - } - } - } - }, - { - "Name": "CAASApplication", - "Description": "", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "UnitIntroduction": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/CAASUnitIntroductionArgs" - }, - "Result": { - "$ref": "#/definitions/CAASUnitIntroductionResult" - } - }, - "description": "UnitIntroduction sets the status of each given entity." - }, - "UnitTerminating": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entity" - }, - "Result": { - "$ref": "#/definitions/CAASUnitTerminationResult" - } - }, - "description": "UnitTerminating should be called by the CAASUnitTerminationWorker when\nthe agent receives a signal to exit. UnitTerminating will return how\nthe agent should shutdown." - } - }, - "definitions": { - "CAASUnitIntroduction": { - "type": "object", - "properties": { - "agent-conf": { - "type": "array", - "items": { - "type": "integer" - } - }, - "unit-name": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "unit-name", - "agent-conf" - ] - }, - "CAASUnitIntroductionArgs": { - "type": "object", - "properties": { - "pod-name": { - "type": "string" - }, - "pod-uuid": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "pod-name", - "pod-uuid" - ] - }, - "CAASUnitIntroductionResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/CAASUnitIntroduction" - } - }, - "additionalProperties": false - }, - "CAASUnitTerminationResult": { - "type": "object", - "properties": { - "Error": { - "$ref": "#/definitions/Error" - }, - "WillRestart": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "WillRestart", - "Error" - ] - }, - "Entity": { - "type": "object", - "properties": { - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - } - } - } - }, - { - "Name": "CAASApplicationProvisioner", - "Description": "", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "ApplicationCharmInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entity" - }, - "Result": { - "$ref": "#/definitions/Charm" - } - }, - "description": "ApplicationCharmInfo returns information about an application's charm." - }, - "ApplicationOCIResources": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/CAASApplicationOCIResourceResults" - } - }, - "description": "ApplicationOCIResources returns the OCI image resources for an application." - }, - "CAASApplicationGarbageCollect": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/CAASApplicationGarbageCollectArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "CAASApplicationGarbageCollect cleans up units that have gone away permanently.\nOnly observed units will be deleted as new units could have surfaced between\nthe capturing of kuberentes pod state/application state and this call." - }, - "CharmInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/CharmURL" - }, - "Result": { - "$ref": "#/definitions/Charm" - } - }, - "description": "CharmInfo returns information about the requested charm." - }, - "ClearApplicationsResources": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "ClearApplicationsResources clears the flags which indicate\napplications still have resources in the cluster." - }, - "Life": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/LifeResults" - } - }, - "description": "Life returns the life status of every supplied entity, where available." - }, - "ProvisioningInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/CAASApplicationProvisioningInfoResults" - } - }, - "description": "ProvisioningInfo returns the info needed to provision a caas application." - }, - "Remove": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "Remove removes every given entity from state, calling EnsureDead\nfirst, then Remove. It will fail if the entity is not present." - }, - "SetOperatorStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetStatus" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetOperatorStatus sets the status of each given entity." - }, - "SetPasswords": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/EntityPasswords" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetPasswords sets the given password for each supplied entity, if possible." - }, - "Units": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/CAASUnitsResults" - } - }, - "description": "Units returns all the units for each application specified." - }, - "UpdateApplicationsUnits": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/UpdateApplicationUnitArgs" - }, - "Result": { - "$ref": "#/definitions/UpdateApplicationUnitResults" - } - }, - "description": "UpdateApplicationsUnits updates the Juju data model to reflect the given\nunits of the specified application." - }, - "Watch": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "Watch starts an NotifyWatcher for each given entity." - }, - "WatchApplications": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsWatchResult" - } - }, - "description": "WatchApplications starts a StringsWatcher to watch applications\ndeployed to this model." - }, - "WatchProvisioningInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "WatchProvisioningInfo provides a watcher for changes that affect the\ninformation returned by ProvisioningInfo. This is useful for ensuring the\nlatest application stated is ensured." - }, - "WatchUnits": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - }, - "description": "WatchUnits starts a StringsWatcher to watch changes to the\nlifecycle states of units for the specified applications in\nthis model." - } - }, - "definitions": { - "ApplicationUnitInfo": { - "type": "object", - "properties": { - "provider-id": { - "type": "string" - }, - "unit-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "provider-id", - "unit-tag" - ] - }, - "ApplicationUnitParams": { - "type": "object", - "properties": { - "address": { - "type": "string" - }, - "data": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "filesystem-info": { - "type": "array", - "items": { - "$ref": "#/definitions/KubernetesFilesystemInfo" - } - }, - "info": { - "type": "string" - }, - "ports": { - "type": "array", - "items": { - "type": "string" - } - }, - "provider-id": { - "type": "string" - }, - "stateful": { - "type": "boolean" - }, - "status": { - "type": "string" - }, - "unit-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "provider-id", - "unit-tag", - "address", - "ports", - "status", - "info" - ] - }, - "Base": { - "type": "object", - "properties": { - "channel": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "channel" - ] - }, - "CAASApplicationGarbageCollectArg": { - "type": "object", - "properties": { - "active-pod-names": { - "type": "array", - "items": { - "type": "string" - } - }, - "application": { - "$ref": "#/definitions/Entity" - }, - "desired-replicas": { - "type": "integer" - }, - "force": { - "type": "boolean" - }, - "observed-units": { - "$ref": "#/definitions/Entities" - } - }, - "additionalProperties": false, - "required": [ - "application", - "observed-units", - "desired-replicas", - "active-pod-names", - "force" - ] - }, - "CAASApplicationGarbageCollectArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/CAASApplicationGarbageCollectArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "CAASApplicationOCIResourceResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/CAASApplicationOCIResources" - } - }, - "additionalProperties": false - }, - "CAASApplicationOCIResourceResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/CAASApplicationOCIResourceResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "CAASApplicationOCIResources": { - "type": "object", - "properties": { - "images": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/DockerImageInfo" - } - } - } - }, - "additionalProperties": false, - "required": [ - "images" - ] - }, - "CAASApplicationProvisioningInfo": { - "type": "object", - "properties": { - "api-addresses": { - "type": "array", - "items": { - "type": "string" - } - }, - "base": { - "$ref": "#/definitions/Base" - }, - "ca-cert": { - "type": "string" - }, - "charm-modified-version": { - "type": "integer" - }, - "charm-url": { - "type": "string" - }, - "constraints": { - "$ref": "#/definitions/Value" - }, - "devices": { - "type": "array", - "items": { - "$ref": "#/definitions/KubernetesDeviceParams" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "filesystems": { - "type": "array", - "items": { - "$ref": "#/definitions/KubernetesFilesystemParams" - } - }, - "image-repo": { - "$ref": "#/definitions/DockerImageInfo" - }, - "scale": { - "type": "integer" - }, - "tags": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "trust": { - "type": "boolean" - }, - "version": { - "$ref": "#/definitions/Number" - }, - "volumes": { - "type": "array", - "items": { - "$ref": "#/definitions/KubernetesVolumeParams" - } - } - }, - "additionalProperties": false, - "required": [ - "version", - "api-addresses", - "ca-cert", - "constraints" - ] - }, - "CAASApplicationProvisioningInfoResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/CAASApplicationProvisioningInfo" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "CAASUnitInfo": { - "type": "object", - "properties": { - "tag": { - "type": "string" - }, - "unit-status": { - "$ref": "#/definitions/UnitStatus" - } - }, - "additionalProperties": false, - "required": [ - "tag" - ] - }, - "CAASUnitsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "units": { - "type": "array", - "items": { - "$ref": "#/definitions/CAASUnitInfo" - } - } - }, - "additionalProperties": false - }, - "CAASUnitsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/CAASUnitsResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "Charm": { - "type": "object", - "properties": { - "actions": { - "$ref": "#/definitions/CharmActions" - }, - "config": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmOption" - } - } - }, - "lxd-profile": { - "$ref": "#/definitions/CharmLXDProfile" - }, - "manifest": { - "$ref": "#/definitions/CharmManifest" - }, - "meta": { - "$ref": "#/definitions/CharmMeta" - }, - "metrics": { - "$ref": "#/definitions/CharmMetrics" - }, - "revision": { - "type": "integer" - }, - "url": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "revision", - "url", - "config" - ] - }, - "CharmActionSpec": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "params": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "description", - "params" - ] - }, - "CharmActions": { - "type": "object", - "properties": { - "specs": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmActionSpec" - } - } - } - }, - "additionalProperties": false - }, - "CharmBase": { - "type": "object", - "properties": { - "architectures": { - "type": "array", - "items": { - "type": "string" - } - }, - "channel": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "additionalProperties": false - }, - "CharmContainer": { - "type": "object", - "properties": { - "mounts": { - "type": "array", - "items": { - "$ref": "#/definitions/CharmMount" - } - }, - "resource": { - "type": "string" - } - }, - "additionalProperties": false - }, - "CharmDeployment": { - "type": "object", - "properties": { - "min-version": { - "type": "string" - }, - "mode": { - "type": "string" - }, - "service": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type", - "mode", - "service", - "min-version" - ] - }, - "CharmDevice": { - "type": "object", - "properties": { - "CountMax": { - "type": "integer" - }, - "CountMin": { - "type": "integer" - }, - "Description": { - "type": "string" - }, - "Name": { - "type": "string" - }, - "Type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Name", - "Description", - "Type", - "CountMin", - "CountMax" - ] - }, - "CharmLXDProfile": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "description": { - "type": "string" - }, - "devices": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - } - } - } - }, - "additionalProperties": false, - "required": [ - "config", - "description", - "devices" - ] - }, - "CharmManifest": { - "type": "object", - "properties": { - "bases": { - "type": "array", - "items": { - "$ref": "#/definitions/CharmBase" - } - } - }, - "additionalProperties": false - }, - "CharmMeta": { - "type": "object", - "properties": { - "assumes-expr": { - "$ref": "#/definitions/ExpressionTree" - }, - "categories": { - "type": "array", - "items": { - "type": "string" - } - }, - "containers": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmContainer" - } - } - }, - "deployment": { - "$ref": "#/definitions/CharmDeployment" - }, - "description": { - "type": "string" - }, - "devices": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmDevice" - } - } - }, - "extra-bindings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "min-juju-version": { - "type": "string" - }, - "name": { - "type": "string" - }, - "payload-classes": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmPayloadClass" - } - } - }, - "peers": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmRelation" - } - } - }, - "provides": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmRelation" - } - } - }, - "requires": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmRelation" - } - } - }, - "resources": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmResourceMeta" - } - } - }, - "series": { - "type": "array", - "items": { - "type": "string" - } - }, - "storage": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmStorage" - } - } - }, - "subordinate": { - "type": "boolean" - }, - "summary": { - "type": "string" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "terms": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "name", - "summary", - "description", - "subordinate" - ] - }, - "CharmMetric": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type", - "description" - ] - }, - "CharmMetrics": { - "type": "object", - "properties": { - "metrics": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmMetric" - } - } - }, - "plan": { - "$ref": "#/definitions/CharmPlan" - } - }, - "additionalProperties": false, - "required": [ - "metrics", - "plan" - ] - }, - "CharmMount": { - "type": "object", - "properties": { - "location": { - "type": "string" - }, - "storage": { - "type": "string" - } - }, - "additionalProperties": false - }, - "CharmOption": { - "type": "object", - "properties": { - "default": { - "type": "object", - "additionalProperties": true - }, - "description": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type" - ] - }, - "CharmPayloadClass": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "type" - ] - }, - "CharmPlan": { - "type": "object", - "properties": { - "required": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "required" - ] - }, - "CharmRelation": { - "type": "object", - "properties": { - "interface": { - "type": "string" - }, - "limit": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "optional": { - "type": "boolean" - }, - "role": { - "type": "string" - }, - "scope": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "role", - "interface", - "optional", - "limit", - "scope" - ] - }, - "CharmResourceMeta": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "name": { - "type": "string" - }, - "path": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "type", - "path", - "description" - ] - }, - "CharmStorage": { - "type": "object", - "properties": { - "count-max": { - "type": "integer" - }, - "count-min": { - "type": "integer" - }, - "description": { - "type": "string" - }, - "location": { - "type": "string" - }, - "minimum-size": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "properties": { - "type": "array", - "items": { - "type": "string" - } - }, - "read-only": { - "type": "boolean" - }, - "shared": { - "type": "boolean" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "description", - "type", - "shared", - "read-only", - "count-min", - "count-max", - "minimum-size" - ] - }, - "CharmURL": { - "type": "object", - "properties": { - "url": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "url" - ] - }, - "DetailedStatus": { - "type": "object", - "properties": { - "data": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "err": { - "$ref": "#/definitions/Error" - }, - "info": { - "type": "string" - }, - "kind": { - "type": "string" - }, - "life": { - "type": "string" - }, - "since": { - "type": "string", - "format": "date-time" - }, - "status": { - "type": "string" - }, - "version": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "status", - "info", - "data", - "since", - "kind", - "version", - "life" - ] - }, - "DockerImageInfo": { - "type": "object", - "properties": { - "auth": { - "type": "string" - }, - "email": { - "type": "string" - }, - "identitytoken": { - "type": "string" - }, - "image-name": { - "type": "string" - }, - "password": { - "type": "string" - }, - "registrytoken": { - "type": "string" - }, - "repository": { - "type": "string" - }, - "serveraddress": { - "type": "string" - }, - "username": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "image-name" - ] - }, - "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" - ] - }, - "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" - ] - }, - "EntityStatus": { - "type": "object", - "properties": { - "data": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "info": { - "type": "string" - }, - "since": { - "type": "string", - "format": "date-time" - }, - "status": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "status", - "info", - "since" - ] - }, - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ExpressionTree": { - "type": "object", - "properties": { - "Expression": { - "type": "object", - "additionalProperties": true - } - }, - "additionalProperties": false, - "required": [ - "Expression" - ] - }, - "KubernetesDeviceParams": { - "type": "object", - "properties": { - "Attributes": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "Count": { - "type": "integer" - }, - "Type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Type", - "Count", - "Attributes" - ] - }, - "KubernetesFilesystemAttachmentParams": { - "type": "object", - "properties": { - "mount-point": { - "type": "string" - }, - "provider": { - "type": "string" - }, - "read-only": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "provider" - ] - }, - "KubernetesFilesystemInfo": { - "type": "object", - "properties": { - "data": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "filesystem-id": { - "type": "string" - }, - "info": { - "type": "string" - }, - "mount-point": { - "type": "string" - }, - "pool": { - "type": "string" - }, - "read-only": { - "type": "boolean" - }, - "size": { - "type": "integer" - }, - "status": { - "type": "string" - }, - "storagename": { - "type": "string" - }, - "volume": { - "$ref": "#/definitions/KubernetesVolumeInfo" - } - }, - "additionalProperties": false, - "required": [ - "storagename", - "pool", - "size", - "filesystem-id", - "status", - "info", - "volume" - ] - }, - "KubernetesFilesystemParams": { - "type": "object", - "properties": { - "attachment": { - "$ref": "#/definitions/KubernetesFilesystemAttachmentParams" - }, - "attributes": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "provider": { - "type": "string" - }, - "size": { - "type": "integer" - }, - "storagename": { - "type": "string" - }, - "tags": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - } - }, - "additionalProperties": false, - "required": [ - "storagename", - "size", - "provider" - ] - }, - "KubernetesVolumeAttachmentParams": { - "type": "object", - "properties": { - "provider": { - "type": "string" - }, - "read-only": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "provider" - ] - }, - "KubernetesVolumeInfo": { - "type": "object", - "properties": { - "data": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "info": { - "type": "string" - }, - "persistent": { - "type": "boolean" - }, - "pool": { - "type": "string" - }, - "size": { - "type": "integer" - }, - "status": { - "type": "string" - }, - "volume-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "volume-id", - "size", - "persistent", - "status", - "info" - ] - }, - "KubernetesVolumeParams": { - "type": "object", - "properties": { - "attachment": { - "$ref": "#/definitions/KubernetesVolumeAttachmentParams" - }, - "attributes": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "provider": { - "type": "string" - }, - "size": { - "type": "integer" - }, - "storagename": { - "type": "string" - }, - "tags": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - } - }, - "additionalProperties": false, - "required": [ - "storagename", - "size", - "provider" - ] - }, - "LifeResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "life": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "life" - ] - }, - "LifeResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/LifeResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "NotifyWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "Number": { - "type": "object", - "properties": { - "Build": { - "type": "integer" - }, - "Major": { - "type": "integer" - }, - "Minor": { - "type": "integer" - }, - "Patch": { - "type": "integer" - }, - "Tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Major", - "Minor", - "Tag", - "Patch", - "Build" - ] - }, - "SetStatus": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityStatusArgs" - } - } - }, - "additionalProperties": false, - "required": [ - "entities" - ] - }, - "StringsWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id" - ] - }, - "StringsWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringsWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "UnitStatus": { - "type": "object", - "properties": { - "address": { - "type": "string" - }, - "agent-status": { - "$ref": "#/definitions/DetailedStatus" - }, - "charm": { - "type": "string" - }, - "leader": { - "type": "boolean" - }, - "machine": { - "type": "string" - }, - "opened-ports": { - "type": "array", - "items": { - "type": "string" - } - }, - "provider-id": { - "type": "string" - }, - "public-address": { - "type": "string" - }, - "subordinates": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/UnitStatus" - } - } - }, - "workload-status": { - "$ref": "#/definitions/DetailedStatus" - }, - "workload-version": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "agent-status", - "workload-status", - "workload-version", - "machine", - "opened-ports", - "public-address", - "charm", - "subordinates" - ] - }, - "UpdateApplicationUnitArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/UpdateApplicationUnits" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "UpdateApplicationUnitResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "info": { - "$ref": "#/definitions/UpdateApplicationUnitsInfo" - } - }, - "additionalProperties": false - }, - "UpdateApplicationUnitResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/UpdateApplicationUnitResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "UpdateApplicationUnits": { - "type": "object", - "properties": { - "application-tag": { - "type": "string" - }, - "generation": { - "type": "integer" - }, - "scale": { - "type": "integer" - }, - "status": { - "$ref": "#/definitions/EntityStatus" - }, - "units": { - "type": "array", - "items": { - "$ref": "#/definitions/ApplicationUnitParams" - } - } - }, - "additionalProperties": false, - "required": [ - "application-tag", - "units" - ] - }, - "UpdateApplicationUnitsInfo": { - "type": "object", - "properties": { - "units": { - "type": "array", - "items": { - "$ref": "#/definitions/ApplicationUnitInfo" - } - } - }, - "additionalProperties": false, - "required": [ - "units" - ] - }, - "Value": { - "type": "object", - "properties": { - "allocate-public-ip": { - "type": "boolean" - }, - "arch": { - "type": "string" - }, - "container": { - "type": "string" - }, - "cores": { - "type": "integer" - }, - "cpu-power": { - "type": "integer" - }, - "instance-role": { - "type": "string" - }, - "instance-type": { - "type": "string" - }, - "mem": { - "type": "integer" - }, - "root-disk": { - "type": "integer" - }, - "root-disk-source": { - "type": "string" - }, - "spaces": { - "type": "array", - "items": { - "type": "string" - } - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "virt-type": { - "type": "string" - }, - "zones": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - } - } - } - }, - { - "Name": "CAASFirewaller", - "Description": "", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent" - ], - "Schema": { - "type": "object", - "properties": { - "ApplicationCharmInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entity" - }, - "Result": { - "$ref": "#/definitions/Charm" - } - }, - "description": "ApplicationCharmInfo returns information about an application's charm." - }, - "ApplicationsConfig": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ApplicationGetConfigResults" - } - }, - "description": "ApplicationsConfig returns the config for the specified applications." - }, - "CharmInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/CharmURL" - }, - "Result": { - "$ref": "#/definitions/Charm" - } - }, - "description": "CharmInfo returns information about the requested charm." - }, - "IsExposed": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/BoolResults" - } - }, - "description": "IsExposed returns whether the specified applications are exposed." - }, - "Life": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/LifeResults" - } - }, - "description": "Life returns the life status of every supplied entity, where available." - }, - "Watch": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "Watch starts an NotifyWatcher for each given entity." - }, - "WatchApplications": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsWatchResult" - } - }, - "description": "WatchApplications starts a StringsWatcher to watch applications\ndeployed to this model." - } - }, - "definitions": { - "ApplicationGetConfigResults": { - "type": "object", - "properties": { - "Results": { - "type": "array", - "items": { - "$ref": "#/definitions/ConfigResult" - } - } - }, - "additionalProperties": false, - "required": [ - "Results" - ] - }, - "BoolResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "BoolResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/BoolResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "Charm": { - "type": "object", - "properties": { - "actions": { - "$ref": "#/definitions/CharmActions" - }, - "config": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmOption" - } - } - }, - "lxd-profile": { - "$ref": "#/definitions/CharmLXDProfile" - }, - "manifest": { - "$ref": "#/definitions/CharmManifest" - }, - "meta": { - "$ref": "#/definitions/CharmMeta" - }, - "metrics": { - "$ref": "#/definitions/CharmMetrics" - }, - "revision": { - "type": "integer" - }, - "url": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "revision", - "url", - "config" - ] - }, - "CharmActionSpec": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "params": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "description", - "params" - ] - }, - "CharmActions": { - "type": "object", - "properties": { - "specs": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmActionSpec" - } - } - } - }, - "additionalProperties": false - }, - "CharmBase": { - "type": "object", - "properties": { - "architectures": { - "type": "array", - "items": { - "type": "string" - } - }, - "channel": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "additionalProperties": false - }, - "CharmContainer": { - "type": "object", - "properties": { - "mounts": { - "type": "array", - "items": { - "$ref": "#/definitions/CharmMount" - } - }, - "resource": { - "type": "string" - } - }, - "additionalProperties": false - }, - "CharmDeployment": { - "type": "object", - "properties": { - "min-version": { - "type": "string" - }, - "mode": { - "type": "string" - }, - "service": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type", - "mode", - "service", - "min-version" - ] - }, - "CharmDevice": { - "type": "object", - "properties": { - "CountMax": { - "type": "integer" - }, - "CountMin": { - "type": "integer" - }, - "Description": { - "type": "string" - }, - "Name": { - "type": "string" - }, - "Type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Name", - "Description", - "Type", - "CountMin", - "CountMax" - ] - }, - "CharmLXDProfile": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "description": { - "type": "string" - }, - "devices": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - } - } - } - }, - "additionalProperties": false, - "required": [ - "config", - "description", - "devices" - ] - }, - "CharmManifest": { - "type": "object", - "properties": { - "bases": { - "type": "array", - "items": { - "$ref": "#/definitions/CharmBase" - } - } - }, - "additionalProperties": false - }, - "CharmMeta": { - "type": "object", - "properties": { - "assumes-expr": { - "$ref": "#/definitions/ExpressionTree" - }, - "categories": { - "type": "array", - "items": { - "type": "string" - } - }, - "containers": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmContainer" - } - } - }, - "deployment": { - "$ref": "#/definitions/CharmDeployment" - }, - "description": { - "type": "string" - }, - "devices": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmDevice" - } - } - }, - "extra-bindings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "min-juju-version": { - "type": "string" - }, - "name": { - "type": "string" - }, - "payload-classes": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmPayloadClass" - } - } - }, - "peers": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmRelation" - } - } - }, - "provides": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmRelation" - } - } - }, - "requires": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmRelation" - } - } - }, - "resources": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmResourceMeta" - } - } - }, - "series": { - "type": "array", - "items": { - "type": "string" - } - }, - "storage": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmStorage" - } - } - }, - "subordinate": { - "type": "boolean" - }, - "summary": { - "type": "string" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "terms": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "name", - "summary", - "description", - "subordinate" - ] - }, - "CharmMetric": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type", - "description" - ] - }, - "CharmMetrics": { - "type": "object", - "properties": { - "metrics": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmMetric" - } - } - }, - "plan": { - "$ref": "#/definitions/CharmPlan" - } - }, - "additionalProperties": false, - "required": [ - "metrics", - "plan" - ] - }, - "CharmMount": { - "type": "object", - "properties": { - "location": { - "type": "string" - }, - "storage": { - "type": "string" - } - }, - "additionalProperties": false - }, - "CharmOption": { - "type": "object", - "properties": { - "default": { - "type": "object", - "additionalProperties": true - }, - "description": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type" - ] - }, - "CharmPayloadClass": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "type" - ] - }, - "CharmPlan": { - "type": "object", - "properties": { - "required": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "required" - ] - }, - "CharmRelation": { - "type": "object", - "properties": { - "interface": { - "type": "string" - }, - "limit": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "optional": { - "type": "boolean" - }, - "role": { - "type": "string" - }, - "scope": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "role", - "interface", - "optional", - "limit", - "scope" - ] - }, - "CharmResourceMeta": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "name": { - "type": "string" - }, - "path": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "type", - "path", - "description" - ] - }, - "CharmStorage": { - "type": "object", - "properties": { - "count-max": { - "type": "integer" - }, - "count-min": { - "type": "integer" - }, - "description": { - "type": "string" - }, - "location": { - "type": "string" - }, - "minimum-size": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "properties": { - "type": "array", - "items": { - "type": "string" - } - }, - "read-only": { - "type": "boolean" - }, - "shared": { - "type": "boolean" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "description", - "type", - "shared", - "read-only", - "count-min", - "count-max", - "minimum-size" - ] - }, - "CharmURL": { - "type": "object", - "properties": { - "url": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "url" - ] - }, - "ConfigResult": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "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": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ExpressionTree": { - "type": "object", - "properties": { - "Expression": { - "type": "object", - "additionalProperties": true - } - }, - "additionalProperties": false, - "required": [ - "Expression" - ] - }, - "LifeResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "life": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "life" - ] - }, - "LifeResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/LifeResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "NotifyWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "StringsWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id" - ] - } - } - } - }, - { - "Name": "CAASFirewallerSidecar", - "Description": "FacadeSidecar provides access to the CAASFirewaller API facade for sidecar applications.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent" - ], - "Schema": { - "type": "object", - "properties": { - "ApplicationCharmInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entity" - }, - "Result": { - "$ref": "#/definitions/Charm" - } - }, - "description": "ApplicationCharmInfo returns information about an application's charm." - }, - "ApplicationsConfig": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ApplicationGetConfigResults" - } - }, - "description": "ApplicationsConfig returns the config for the specified applications." - }, - "CharmInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/CharmURL" - }, - "Result": { - "$ref": "#/definitions/Charm" - } - }, - "description": "CharmInfo returns information about the requested charm." - }, - "GetApplicationOpenedPorts": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entity" - }, - "Result": { - "$ref": "#/definitions/ApplicationOpenedPortsResults" - } - }, - "description": "GetApplicationOpenedPorts returns all the opened ports for each given application tag." - }, - "IsExposed": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/BoolResults" - } - }, - "description": "IsExposed returns whether the specified applications are exposed." - }, - "Life": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/LifeResults" - } - }, - "description": "Life returns the life status of every supplied entity, where available." - }, - "Watch": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "Watch starts an NotifyWatcher for each given entity." - }, - "WatchApplications": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsWatchResult" - } - }, - "description": "WatchApplications starts a StringsWatcher to watch applications\ndeployed to this model." - }, - "WatchOpenedPorts": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - }, - "description": "WatchOpenedPorts returns a new StringsWatcher for each given\nmodel tag." - } - }, - "definitions": { - "ApplicationGetConfigResults": { - "type": "object", - "properties": { - "Results": { - "type": "array", - "items": { - "$ref": "#/definitions/ConfigResult" - } - } - }, - "additionalProperties": false, - "required": [ - "Results" - ] - }, - "ApplicationOpenedPorts": { - "type": "object", - "properties": { - "endpoint": { - "type": "string" - }, - "port-ranges": { - "type": "array", - "items": { - "$ref": "#/definitions/PortRange" - } - } - }, - "additionalProperties": false, - "required": [ - "endpoint", - "port-ranges" - ] - }, - "ApplicationOpenedPortsResult": { - "type": "object", - "properties": { - "application-port-ranges": { - "type": "array", - "items": { - "$ref": "#/definitions/ApplicationOpenedPorts" - } - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "application-port-ranges" - ] - }, - "ApplicationOpenedPortsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ApplicationOpenedPortsResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "BoolResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "BoolResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/BoolResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "Charm": { - "type": "object", - "properties": { - "actions": { - "$ref": "#/definitions/CharmActions" - }, - "config": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmOption" - } - } - }, - "lxd-profile": { - "$ref": "#/definitions/CharmLXDProfile" - }, - "manifest": { - "$ref": "#/definitions/CharmManifest" - }, - "meta": { - "$ref": "#/definitions/CharmMeta" - }, - "metrics": { - "$ref": "#/definitions/CharmMetrics" - }, - "revision": { - "type": "integer" - }, - "url": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "revision", - "url", - "config" - ] - }, - "CharmActionSpec": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "params": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "description", - "params" - ] - }, - "CharmActions": { - "type": "object", - "properties": { - "specs": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmActionSpec" - } - } - } - }, - "additionalProperties": false - }, - "CharmBase": { - "type": "object", - "properties": { - "architectures": { - "type": "array", - "items": { - "type": "string" - } - }, - "channel": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "additionalProperties": false - }, - "CharmContainer": { - "type": "object", - "properties": { - "mounts": { - "type": "array", - "items": { - "$ref": "#/definitions/CharmMount" - } - }, - "resource": { - "type": "string" - } - }, - "additionalProperties": false - }, - "CharmDeployment": { - "type": "object", - "properties": { - "min-version": { - "type": "string" - }, - "mode": { - "type": "string" - }, - "service": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type", - "mode", - "service", - "min-version" - ] - }, - "CharmDevice": { - "type": "object", - "properties": { - "CountMax": { - "type": "integer" - }, - "CountMin": { - "type": "integer" - }, - "Description": { - "type": "string" - }, - "Name": { - "type": "string" - }, - "Type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Name", - "Description", - "Type", - "CountMin", - "CountMax" - ] - }, - "CharmLXDProfile": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "description": { - "type": "string" - }, - "devices": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - } - } - } - }, - "additionalProperties": false, - "required": [ - "config", - "description", - "devices" - ] - }, - "CharmManifest": { - "type": "object", - "properties": { - "bases": { - "type": "array", - "items": { - "$ref": "#/definitions/CharmBase" - } - } - }, - "additionalProperties": false - }, - "CharmMeta": { - "type": "object", - "properties": { - "assumes-expr": { - "$ref": "#/definitions/ExpressionTree" - }, - "categories": { - "type": "array", - "items": { - "type": "string" - } - }, - "containers": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmContainer" - } - } - }, - "deployment": { - "$ref": "#/definitions/CharmDeployment" - }, - "description": { - "type": "string" - }, - "devices": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmDevice" - } - } - }, - "extra-bindings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "min-juju-version": { - "type": "string" - }, - "name": { - "type": "string" - }, - "payload-classes": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmPayloadClass" - } - } - }, - "peers": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmRelation" - } - } - }, - "provides": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmRelation" - } - } - }, - "requires": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmRelation" - } - } - }, - "resources": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmResourceMeta" - } - } - }, - "series": { - "type": "array", - "items": { - "type": "string" - } - }, - "storage": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmStorage" - } - } - }, - "subordinate": { - "type": "boolean" - }, - "summary": { - "type": "string" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "terms": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "name", - "summary", - "description", - "subordinate" - ] - }, - "CharmMetric": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type", - "description" - ] - }, - "CharmMetrics": { - "type": "object", - "properties": { - "metrics": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmMetric" - } - } - }, - "plan": { - "$ref": "#/definitions/CharmPlan" - } - }, - "additionalProperties": false, - "required": [ - "metrics", - "plan" - ] - }, - "CharmMount": { - "type": "object", - "properties": { - "location": { - "type": "string" - }, - "storage": { - "type": "string" - } - }, - "additionalProperties": false - }, - "CharmOption": { - "type": "object", - "properties": { - "default": { - "type": "object", - "additionalProperties": true - }, - "description": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type" - ] - }, - "CharmPayloadClass": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "type" - ] - }, - "CharmPlan": { - "type": "object", - "properties": { - "required": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "required" - ] - }, - "CharmRelation": { - "type": "object", - "properties": { - "interface": { - "type": "string" - }, - "limit": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "optional": { - "type": "boolean" - }, - "role": { - "type": "string" - }, - "scope": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "role", - "interface", - "optional", - "limit", - "scope" - ] - }, - "CharmResourceMeta": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "name": { - "type": "string" - }, - "path": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "type", - "path", - "description" - ] - }, - "CharmStorage": { - "type": "object", - "properties": { - "count-max": { - "type": "integer" - }, - "count-min": { - "type": "integer" - }, - "description": { - "type": "string" - }, - "location": { - "type": "string" - }, - "minimum-size": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "properties": { - "type": "array", - "items": { - "type": "string" - } - }, - "read-only": { - "type": "boolean" - }, - "shared": { - "type": "boolean" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "description", - "type", - "shared", - "read-only", - "count-min", - "count-max", - "minimum-size" - ] - }, - "CharmURL": { - "type": "object", - "properties": { - "url": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "url" - ] - }, - "ConfigResult": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "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": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ExpressionTree": { - "type": "object", - "properties": { - "Expression": { - "type": "object", - "additionalProperties": true - } - }, - "additionalProperties": false, - "required": [ - "Expression" - ] - }, - "LifeResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "life": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "life" - ] - }, - "LifeResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/LifeResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "NotifyWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "PortRange": { - "type": "object", - "properties": { - "from-port": { - "type": "integer" - }, - "protocol": { - "type": "string" - }, - "to-port": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "from-port", - "to-port", - "protocol" - ] - }, - "StringsWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id" - ] - }, - "StringsWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringsWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - } - } - } - }, - { - "Name": "CAASModelConfigManager", - "Description": "Facade allows model config manager clients to watch controller config changes and fetch controller config.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent" - ], - "Schema": { - "type": "object", - "properties": { - "ControllerConfig": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ControllerConfigResult" - } - } - } - }, - "definitions": { - "ControllerConfigResult": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - } - } - } - }, - { - "Name": "CAASModelOperator", - "Description": "API represents the controller model operator facade.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "APIAddresses": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsResult" - } - }, - "description": "APIAddresses returns the list of addresses used to connect to the API." - }, - "APIHostPorts": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/APIHostPortsResult" - } - }, - "description": "APIHostPorts returns the API server addresses." - }, - "ModelOperatorProvisioningInfo": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ModelOperatorInfo" - } - }, - "description": "ModelOperatorProvisioningInfo returns the information needed for provisioning\na new model operator into a caas cluster." - }, - "ModelUUID": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringResult" - } - }, - "description": "ModelUUID returns the model UUID that this facade is used to operate.\nIt is implemented here directly as a result of removing it from\nembedded APIAddresser *without* bumping the facade version.\nIt should be blanked when this facade version is next incremented." - }, - "SetPasswords": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/EntityPasswords" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetPasswords sets the given password for each supplied entity, if possible." - }, - "WatchAPIHostPorts": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResult" - } - }, - "description": "WatchAPIHostPorts watches the API server addresses." - } - }, - "definitions": { - "APIHostPortsResult": { - "type": "object", - "properties": { - "servers": { - "type": "array", - "items": { - "type": "array", - "items": { - "$ref": "#/definitions/HostPort" - } - } - } - }, - "additionalProperties": false, - "required": [ - "servers" - ] - }, - "Address": { - "type": "object", - "properties": { - "cidr": { - "type": "string" - }, - "config-type": { - "type": "string" - }, - "is-secondary": { - "type": "boolean" - }, - "scope": { - "type": "string" - }, - "space-id": { - "type": "string" - }, - "space-name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "value", - "type", - "scope" - ] - }, - "DockerImageInfo": { - "type": "object", - "properties": { - "auth": { - "type": "string" - }, - "email": { - "type": "string" - }, - "identitytoken": { - "type": "string" - }, - "image-name": { - "type": "string" - }, - "password": { - "type": "string" - }, - "registrytoken": { - "type": "string" - }, - "repository": { - "type": "string" - }, - "serveraddress": { - "type": "string" - }, - "username": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "image-name" - ] - }, - "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" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "HostPort": { - "type": "object", - "properties": { - "Address": { - "$ref": "#/definitions/Address" - }, - "cidr": { - "type": "string" - }, - "config-type": { - "type": "string" - }, - "is-secondary": { - "type": "boolean" - }, - "port": { - "type": "integer" - }, - "scope": { - "type": "string" - }, - "space-id": { - "type": "string" - }, - "space-name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "value", - "type", - "scope", - "Address", - "port" - ] - }, - "ModelOperatorInfo": { - "type": "object", - "properties": { - "api-addresses": { - "type": "array", - "items": { - "type": "string" - } - }, - "image-details": { - "$ref": "#/definitions/DockerImageInfo" - }, - "version": { - "$ref": "#/definitions/Number" - } - }, - "additionalProperties": false, - "required": [ - "api-addresses", - "image-details", - "version" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "Number": { - "type": "object", - "properties": { - "Build": { - "type": "integer" - }, - "Major": { - "type": "integer" - }, - "Minor": { - "type": "integer" - }, - "Patch": { - "type": "integer" - }, - "Tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Major", - "Minor", - "Tag", - "Patch", - "Build" - ] - }, - "StringResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "StringsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - } - } - } - }, - { - "Name": "CAASOperator", - "Description": "Facade is the CAAS operator API facade.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "APIAddresses": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsResult" - } - }, - "description": "APIAddresses returns the list of addresses used to connect to the API." - }, - "APIHostPorts": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/APIHostPortsResult" - } - }, - "description": "APIHostPorts returns the API server addresses." - }, - "Charm": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ApplicationCharmResults" - } - }, - "description": "Charm returns the charm info for all given applications." - }, - "CurrentModel": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ModelResult" - } - }, - "description": "CurrentModel returns the name and UUID for the current juju model." - }, - "Life": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/LifeResults" - } - }, - "description": "Life returns the life status of every supplied entity, where available." - }, - "ModelUUID": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringResult" - } - }, - "description": "ModelUUID returns the model UUID that this facade is used to operate.\nIt is implemented here directly as a result of removing it from\nembedded APIAddresser *without* bumping the facade version.\nIt should be blanked when this facade version is next incremented." - }, - "Remove": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "Remove removes every given entity from state, calling EnsureDead\nfirst, then Remove. It will fail if the entity is not present." - }, - "SetPodSpec": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetPodSpecParams" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetPodSpec sets the container specs for a set of applications.\nTODO(juju3) - remove" - }, - "SetStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetStatus" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetStatus sets the status of each given entity." - }, - "SetTools": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/EntitiesVersion" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetTools updates the recorded tools version for the agents." - }, - "Watch": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "Watch starts an NotifyWatcher for each given entity." - }, - "WatchAPIHostPorts": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResult" - } - }, - "description": "WatchAPIHostPorts watches the API server addresses." - }, - "WatchContainerStart": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/WatchContainerStartArgs" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - }, - "description": "WatchContainerStart starts a StringWatcher to watch for container start events\non the CAAS api for a specific application and container." - }, - "WatchUnits": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - }, - "description": "WatchUnits starts a StringsWatcher to watch changes to the\nlifecycle states of units for the specified applications in\nthis model." - } - }, - "definitions": { - "APIHostPortsResult": { - "type": "object", - "properties": { - "servers": { - "type": "array", - "items": { - "type": "array", - "items": { - "$ref": "#/definitions/HostPort" - } - } - } - }, - "additionalProperties": false, - "required": [ - "servers" - ] - }, - "Address": { - "type": "object", - "properties": { - "cidr": { - "type": "string" - }, - "config-type": { - "type": "string" - }, - "is-secondary": { - "type": "boolean" - }, - "scope": { - "type": "string" - }, - "space-id": { - "type": "string" - }, - "space-name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "value", - "type", - "scope" - ] - }, - "ApplicationCharm": { - "type": "object", - "properties": { - "charm-modified-version": { - "type": "integer" - }, - "deployment-mode": { - "type": "string" - }, - "force-upgrade": { - "type": "boolean" - }, - "sha256": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "url", - "sha256", - "charm-modified-version" - ] - }, - "ApplicationCharmResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/ApplicationCharm" - } - }, - "additionalProperties": false - }, - "ApplicationCharmResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ApplicationCharmResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "Binary": { - "type": "object", - "properties": { - "Arch": { - "type": "string" - }, - "Build": { - "type": "integer" - }, - "Major": { - "type": "integer" - }, - "Minor": { - "type": "integer" - }, - "Number": { - "$ref": "#/definitions/Number" - }, - "Patch": { - "type": "integer" - }, - "Release": { - "type": "string" - }, - "Tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Major", - "Minor", - "Tag", - "Patch", - "Build", - "Number", - "Release", - "Arch" - ] - }, - "Entities": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } - } - }, - "additionalProperties": false, - "required": [ - "entities" - ] - }, - "EntitiesVersion": { - "type": "object", - "properties": { - "agent-tools": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityVersion" - } - } - }, - "additionalProperties": false, - "required": [ - "agent-tools" - ] - }, - "Entity": { - "type": "object", - "properties": { - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "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" - ] - }, - "EntityString": { - "type": "object", - "properties": { - "tag": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "value" - ] - }, - "EntityVersion": { - "type": "object", - "properties": { - "tag": { - "type": "string" - }, - "tools": { - "$ref": "#/definitions/Version" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "tools" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "HostPort": { - "type": "object", - "properties": { - "Address": { - "$ref": "#/definitions/Address" - }, - "cidr": { - "type": "string" - }, - "config-type": { - "type": "string" - }, - "is-secondary": { - "type": "boolean" - }, - "port": { - "type": "integer" - }, - "scope": { - "type": "string" - }, - "space-id": { - "type": "string" - }, - "space-name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "value", - "type", - "scope", - "Address", - "port" - ] - }, - "LifeResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "life": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "life" - ] - }, - "LifeResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/LifeResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ModelResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "uuid": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "uuid", - "type" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "NotifyWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "Number": { - "type": "object", - "properties": { - "Build": { - "type": "integer" - }, - "Major": { - "type": "integer" - }, - "Minor": { - "type": "integer" - }, - "Patch": { - "type": "integer" - }, - "Tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Major", - "Minor", - "Tag", - "Patch", - "Build" - ] - }, - "SetPodSpecParams": { - "type": "object", - "properties": { - "specs": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityString" - } - } - }, - "additionalProperties": false, - "required": [ - "specs" - ] - }, - "SetStatus": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityStatusArgs" - } - } - }, - "additionalProperties": false, - "required": [ - "entities" - ] - }, - "StringResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "StringsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "StringsWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id" - ] - }, - "StringsWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringsWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "Version": { - "type": "object", - "properties": { - "version": { - "$ref": "#/definitions/Binary" - } - }, - "additionalProperties": false, - "required": [ - "version" - ] - }, - "WatchContainerStartArg": { - "type": "object", - "properties": { - "container": { - "type": "string" - }, - "entity": { - "$ref": "#/definitions/Entity" - } - }, - "additionalProperties": false, - "required": [ - "entity" - ] - }, - "WatchContainerStartArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/WatchContainerStartArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - } - } - } - }, - { - "Name": "CAASOperatorProvisioner", - "Description": "", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "APIAddresses": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsResult" - } - }, - "description": "APIAddresses returns the list of addresses used to connect to the API." - }, - "APIHostPorts": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/APIHostPortsResult" - } - }, - "description": "APIHostPorts returns the API server addresses." - }, - "ApplicationCharmInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entity" - }, - "Result": { - "$ref": "#/definitions/Charm" - } - }, - "description": "ApplicationCharmInfo returns information about an application's charm." - }, - "CharmInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/CharmURL" - }, - "Result": { - "$ref": "#/definitions/Charm" - } - }, - "description": "CharmInfo returns information about the requested charm." - }, - "IssueOperatorCertificate": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/IssueOperatorCertificateResults" - } - }, - "description": "IssueOperatorCertificate issues an x509 certificate for use by the specified application operator." - }, - "Life": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/LifeResults" - } - }, - "description": "Life returns the life status of every supplied entity, where available." - }, - "ModelUUID": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringResult" - } - }, - "description": "ModelUUID returns the model UUID that this facade is used to operate.\nIt is implemented here directly as a result of removing it from\nembedded APIAddresser *without* bumping the facade version.\nIt should be blanked when this facade version is next incremented." - }, - "OperatorProvisioningInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/OperatorProvisioningInfoResults" - } - }, - "description": "OperatorProvisioningInfo returns the info needed to provision an operator." - }, - "SetPasswords": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/EntityPasswords" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetPasswords sets the given password for each supplied entity, if possible." - }, - "WatchAPIHostPorts": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResult" - } - }, - "description": "WatchAPIHostPorts watches the API server addresses." - }, - "WatchApplications": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsWatchResult" - } - }, - "description": "WatchApplications starts a StringsWatcher to watch applications\ndeployed to this model." - } - }, - "definitions": { - "APIHostPortsResult": { - "type": "object", - "properties": { - "servers": { - "type": "array", - "items": { - "type": "array", - "items": { - "$ref": "#/definitions/HostPort" - } - } - } - }, - "additionalProperties": false, - "required": [ - "servers" - ] - }, - "Address": { - "type": "object", - "properties": { - "cidr": { - "type": "string" - }, - "config-type": { - "type": "string" - }, - "is-secondary": { - "type": "boolean" - }, - "scope": { - "type": "string" - }, - "space-id": { - "type": "string" - }, - "space-name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "value", - "type", - "scope" - ] - }, - "Charm": { - "type": "object", - "properties": { - "actions": { - "$ref": "#/definitions/CharmActions" - }, - "config": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmOption" - } - } - }, - "lxd-profile": { - "$ref": "#/definitions/CharmLXDProfile" - }, - "manifest": { - "$ref": "#/definitions/CharmManifest" - }, - "meta": { - "$ref": "#/definitions/CharmMeta" - }, - "metrics": { - "$ref": "#/definitions/CharmMetrics" - }, - "revision": { - "type": "integer" - }, - "url": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "revision", - "url", - "config" - ] - }, - "CharmActionSpec": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "params": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "description", - "params" - ] - }, - "CharmActions": { - "type": "object", - "properties": { - "specs": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmActionSpec" - } - } - } - }, - "additionalProperties": false - }, - "CharmBase": { - "type": "object", - "properties": { - "architectures": { - "type": "array", - "items": { - "type": "string" - } - }, - "channel": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "additionalProperties": false - }, - "CharmContainer": { - "type": "object", - "properties": { - "mounts": { - "type": "array", - "items": { - "$ref": "#/definitions/CharmMount" - } - }, - "resource": { - "type": "string" - } - }, - "additionalProperties": false - }, - "CharmDeployment": { - "type": "object", - "properties": { - "min-version": { - "type": "string" - }, - "mode": { - "type": "string" - }, - "service": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type", - "mode", - "service", - "min-version" - ] - }, - "CharmDevice": { - "type": "object", - "properties": { - "CountMax": { - "type": "integer" - }, - "CountMin": { - "type": "integer" - }, - "Description": { - "type": "string" - }, - "Name": { - "type": "string" - }, - "Type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Name", - "Description", - "Type", - "CountMin", - "CountMax" - ] - }, - "CharmLXDProfile": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "description": { - "type": "string" - }, - "devices": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - } - } - } - }, - "additionalProperties": false, - "required": [ - "config", - "description", - "devices" - ] - }, - "CharmManifest": { - "type": "object", - "properties": { - "bases": { - "type": "array", - "items": { - "$ref": "#/definitions/CharmBase" - } - } - }, - "additionalProperties": false - }, - "CharmMeta": { - "type": "object", - "properties": { - "assumes-expr": { - "$ref": "#/definitions/ExpressionTree" - }, - "categories": { - "type": "array", - "items": { - "type": "string" - } - }, - "containers": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmContainer" - } - } - }, - "deployment": { - "$ref": "#/definitions/CharmDeployment" - }, - "description": { - "type": "string" - }, - "devices": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmDevice" - } - } - }, - "extra-bindings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "min-juju-version": { - "type": "string" - }, - "name": { - "type": "string" - }, - "payload-classes": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmPayloadClass" - } - } - }, - "peers": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmRelation" - } - } - }, - "provides": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmRelation" - } - } - }, - "requires": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmRelation" - } - } - }, - "resources": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmResourceMeta" - } - } - }, - "series": { - "type": "array", - "items": { - "type": "string" - } - }, - "storage": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmStorage" - } - } - }, - "subordinate": { - "type": "boolean" - }, - "summary": { - "type": "string" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "terms": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "name", - "summary", - "description", - "subordinate" - ] - }, - "CharmMetric": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type", - "description" - ] - }, - "CharmMetrics": { - "type": "object", - "properties": { - "metrics": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmMetric" - } - } - }, - "plan": { - "$ref": "#/definitions/CharmPlan" - } - }, - "additionalProperties": false, - "required": [ - "metrics", - "plan" - ] - }, - "CharmMount": { - "type": "object", - "properties": { - "location": { - "type": "string" - }, - "storage": { - "type": "string" - } - }, - "additionalProperties": false - }, - "CharmOption": { - "type": "object", - "properties": { - "default": { - "type": "object", - "additionalProperties": true - }, - "description": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type" - ] - }, - "CharmPayloadClass": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "type" - ] - }, - "CharmPlan": { - "type": "object", - "properties": { - "required": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "required" - ] - }, - "CharmRelation": { - "type": "object", - "properties": { - "interface": { - "type": "string" - }, - "limit": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "optional": { - "type": "boolean" - }, - "role": { - "type": "string" - }, - "scope": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "role", - "interface", - "optional", - "limit", - "scope" - ] - }, - "CharmResourceMeta": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "name": { - "type": "string" - }, - "path": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "type", - "path", - "description" - ] - }, - "CharmStorage": { - "type": "object", - "properties": { - "count-max": { - "type": "integer" - }, - "count-min": { - "type": "integer" - }, - "description": { - "type": "string" - }, - "location": { - "type": "string" - }, - "minimum-size": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "properties": { - "type": "array", - "items": { - "type": "string" - } - }, - "read-only": { - "type": "boolean" - }, - "shared": { - "type": "boolean" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "description", - "type", - "shared", - "read-only", - "count-min", - "count-max", - "minimum-size" - ] - }, - "CharmURL": { - "type": "object", - "properties": { - "url": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "url" - ] - }, - "DockerImageInfo": { - "type": "object", - "properties": { - "auth": { - "type": "string" - }, - "email": { - "type": "string" - }, - "identitytoken": { - "type": "string" - }, - "image-name": { - "type": "string" - }, - "password": { - "type": "string" - }, - "registrytoken": { - "type": "string" - }, - "repository": { - "type": "string" - }, - "serveraddress": { - "type": "string" - }, - "username": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "image-name" - ] - }, - "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" - ] - }, - "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" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ExpressionTree": { - "type": "object", - "properties": { - "Expression": { - "type": "object", - "additionalProperties": true - } - }, - "additionalProperties": false, - "required": [ - "Expression" - ] - }, - "HostPort": { - "type": "object", - "properties": { - "Address": { - "$ref": "#/definitions/Address" - }, - "cidr": { - "type": "string" - }, - "config-type": { - "type": "string" - }, - "is-secondary": { - "type": "boolean" - }, - "port": { - "type": "integer" - }, - "scope": { - "type": "string" - }, - "space-id": { - "type": "string" - }, - "space-name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "value", - "type", - "scope", - "Address", - "port" - ] - }, - "IssueOperatorCertificateResult": { - "type": "object", - "properties": { - "ca-cert": { - "type": "string" - }, - "cert": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "private-key": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "ca-cert", - "cert", - "private-key" - ] - }, - "IssueOperatorCertificateResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/IssueOperatorCertificateResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "KubernetesFilesystemAttachmentParams": { - "type": "object", - "properties": { - "mount-point": { - "type": "string" - }, - "provider": { - "type": "string" - }, - "read-only": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "provider" - ] - }, - "KubernetesFilesystemParams": { - "type": "object", - "properties": { - "attachment": { - "$ref": "#/definitions/KubernetesFilesystemAttachmentParams" - }, - "attributes": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "provider": { - "type": "string" - }, - "size": { - "type": "integer" - }, - "storagename": { - "type": "string" - }, - "tags": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - } - }, - "additionalProperties": false, - "required": [ - "storagename", - "size", - "provider" - ] - }, - "LifeResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "life": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "life" - ] - }, - "LifeResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/LifeResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "Number": { - "type": "object", - "properties": { - "Build": { - "type": "integer" - }, - "Major": { - "type": "integer" - }, - "Minor": { - "type": "integer" - }, - "Patch": { - "type": "integer" - }, - "Tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Major", - "Minor", - "Tag", - "Patch", - "Build" - ] - }, - "OperatorProvisioningInfo": { - "type": "object", - "properties": { - "api-addresses": { - "type": "array", - "items": { - "type": "string" - } - }, - "base-image-details": { - "$ref": "#/definitions/DockerImageInfo" - }, - "charm-storage": { - "$ref": "#/definitions/KubernetesFilesystemParams" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "image-details": { - "$ref": "#/definitions/DockerImageInfo" - }, - "tags": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "version": { - "$ref": "#/definitions/Number" - } - }, - "additionalProperties": false, - "required": [ - "image-details", - "base-image-details", - "version", - "api-addresses" - ] - }, - "OperatorProvisioningInfoResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/OperatorProvisioningInfo" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "StringResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "StringsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "StringsWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id" - ] - } - } - } - }, - { - "Name": "CAASOperatorUpgrader", - "Description": "", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "UpgradeOperator": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/KubernetesUpgradeArg" - }, - "Result": { - "$ref": "#/definitions/ErrorResult" - } - }, - "description": "UpgradeOperator upgrades the operator for the specified agents." - } - }, - "definitions": { - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "KubernetesUpgradeArg": { - "type": "object", - "properties": { - "agent-tag": { - "type": "string" - }, - "version": { - "$ref": "#/definitions/Number" - } - }, - "additionalProperties": false, - "required": [ - "agent-tag", - "version" - ] - }, - "Number": { - "type": "object", - "properties": { - "Build": { - "type": "integer" - }, - "Major": { - "type": "integer" - }, - "Minor": { - "type": "integer" - }, - "Patch": { - "type": "integer" - }, - "Tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Major", - "Minor", - "Tag", - "Patch", - "Build" - ] - } - } - } - }, - { - "Name": "CAASUnitProvisioner", - "Description": "", - "Version": 2, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "ApplicationCharmInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entity" - }, - "Result": { - "$ref": "#/definitions/Charm" - } - }, - "description": "ApplicationCharmInfo returns information about an application's charm." - }, - "ApplicationsConfig": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ApplicationGetConfigResults" - } - }, - "description": "ApplicationsConfig returns the config for the specified applications." - }, - "ApplicationsScale": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/IntResults" - } - }, - "description": "ApplicationsScale returns the scaling info for specified applications in this model." - }, - "ApplicationsTrust": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/BoolResults" - } - }, - "description": "ApplicationsTrust returns the trust status for specified applications in this model." - }, - "CharmInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/CharmURL" - }, - "Result": { - "$ref": "#/definitions/Charm" - } - }, - "description": "CharmInfo returns information about the requested charm." - }, - "ClearApplicationsResources": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "ClearApplicationsResources clears the flags which indicate\napplications still have resources in the cluster." - }, - "DeploymentMode": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringResults" - } - }, - "description": "DeploymentMode returns the deployment mode of the given applications' charms." - }, - "Life": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/LifeResults" - } - }, - "description": "Life returns the life status of every supplied entity, where available." - }, - "ProvisioningInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/KubernetesProvisioningInfoResults" - } - }, - "description": "ProvisioningInfo returns the provisioning info for specified applications in this model." - }, - "SetOperatorStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetStatus" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetOperatorStatus updates the operator status for each given application." - }, - "UpdateApplicationsService": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/UpdateApplicationServiceArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "UpdateApplicationsService updates the Juju data model to reflect the given\nservice details of the specified application." - }, - "UpdateApplicationsUnits": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/UpdateApplicationUnitArgs" - }, - "Result": { - "$ref": "#/definitions/UpdateApplicationUnitResults" - } - }, - "description": "UpdateApplicationsUnits updates the Juju data model to reflect the given\nunits of the specified application." - }, - "Watch": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "Watch starts a NotifyWatcher for each entity given." - }, - "WatchApplications": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsWatchResult" - } - }, - "description": "WatchApplications starts a StringsWatcher to watch applications\ndeployed to this model." - }, - "WatchApplicationsScale": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "WatchApplicationsScale starts a NotifyWatcher to watch changes\nto the applications' scale." - }, - "WatchApplicationsTrustHash": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - }, - "description": "WatchApplicationsTrustHash starts a StringsWatcher to watch changes\nto the applications' trust status." - }, - "WatchPodSpec": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "WatchPodSpec starts a NotifyWatcher to watch changes to the\npod spec for specified units in this model." - } - }, - "definitions": { - "Address": { - "type": "object", - "properties": { - "cidr": { - "type": "string" - }, - "config-type": { - "type": "string" - }, - "is-secondary": { - "type": "boolean" - }, - "scope": { - "type": "string" - }, - "space-id": { - "type": "string" - }, - "space-name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "value", - "type", - "scope" - ] - }, - "ApplicationGetConfigResults": { - "type": "object", - "properties": { - "Results": { - "type": "array", - "items": { - "$ref": "#/definitions/ConfigResult" - } - } - }, - "additionalProperties": false, - "required": [ - "Results" - ] - }, - "ApplicationUnitInfo": { - "type": "object", - "properties": { - "provider-id": { - "type": "string" - }, - "unit-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "provider-id", - "unit-tag" - ] - }, - "ApplicationUnitParams": { - "type": "object", - "properties": { - "address": { - "type": "string" - }, - "data": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "filesystem-info": { - "type": "array", - "items": { - "$ref": "#/definitions/KubernetesFilesystemInfo" - } - }, - "info": { - "type": "string" - }, - "ports": { - "type": "array", - "items": { - "type": "string" - } - }, - "provider-id": { - "type": "string" - }, - "stateful": { - "type": "boolean" - }, - "status": { - "type": "string" - }, - "unit-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "provider-id", - "unit-tag", - "address", - "ports", - "status", - "info" - ] - }, - "BoolResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "BoolResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/BoolResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "Charm": { - "type": "object", - "properties": { - "actions": { - "$ref": "#/definitions/CharmActions" - }, - "config": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmOption" - } - } - }, - "lxd-profile": { - "$ref": "#/definitions/CharmLXDProfile" - }, - "manifest": { - "$ref": "#/definitions/CharmManifest" - }, - "meta": { - "$ref": "#/definitions/CharmMeta" - }, - "metrics": { - "$ref": "#/definitions/CharmMetrics" - }, - "revision": { - "type": "integer" - }, - "url": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "revision", - "url", - "config" - ] - }, - "CharmActionSpec": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "params": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "description", - "params" - ] - }, - "CharmActions": { - "type": "object", - "properties": { - "specs": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmActionSpec" - } - } - } - }, - "additionalProperties": false - }, - "CharmBase": { - "type": "object", - "properties": { - "architectures": { - "type": "array", - "items": { - "type": "string" - } - }, - "channel": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "additionalProperties": false - }, - "CharmContainer": { - "type": "object", - "properties": { - "mounts": { - "type": "array", - "items": { - "$ref": "#/definitions/CharmMount" - } - }, - "resource": { - "type": "string" - } - }, - "additionalProperties": false - }, - "CharmDeployment": { - "type": "object", - "properties": { - "min-version": { - "type": "string" - }, - "mode": { - "type": "string" - }, - "service": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type", - "mode", - "service", - "min-version" - ] - }, - "CharmDevice": { - "type": "object", - "properties": { - "CountMax": { - "type": "integer" - }, - "CountMin": { - "type": "integer" - }, - "Description": { - "type": "string" - }, - "Name": { - "type": "string" - }, - "Type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Name", - "Description", - "Type", - "CountMin", - "CountMax" - ] - }, - "CharmLXDProfile": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "description": { - "type": "string" - }, - "devices": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - } - } - } - }, - "additionalProperties": false, - "required": [ - "config", - "description", - "devices" - ] - }, - "CharmManifest": { - "type": "object", - "properties": { - "bases": { - "type": "array", - "items": { - "$ref": "#/definitions/CharmBase" - } - } - }, - "additionalProperties": false - }, - "CharmMeta": { - "type": "object", - "properties": { - "assumes-expr": { - "$ref": "#/definitions/ExpressionTree" - }, - "categories": { - "type": "array", - "items": { - "type": "string" - } - }, - "containers": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmContainer" - } - } - }, - "deployment": { - "$ref": "#/definitions/CharmDeployment" - }, - "description": { - "type": "string" - }, - "devices": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmDevice" - } - } - }, - "extra-bindings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "min-juju-version": { - "type": "string" - }, - "name": { - "type": "string" - }, - "payload-classes": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmPayloadClass" - } - } - }, - "peers": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmRelation" - } - } - }, - "provides": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmRelation" - } - } - }, - "requires": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmRelation" - } - } - }, - "resources": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmResourceMeta" - } - } - }, - "series": { - "type": "array", - "items": { - "type": "string" - } - }, - "storage": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmStorage" - } - } - }, - "subordinate": { - "type": "boolean" - }, - "summary": { - "type": "string" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "terms": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "name", - "summary", - "description", - "subordinate" - ] - }, - "CharmMetric": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type", - "description" - ] - }, - "CharmMetrics": { - "type": "object", - "properties": { - "metrics": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmMetric" - } - } - }, - "plan": { - "$ref": "#/definitions/CharmPlan" - } - }, - "additionalProperties": false, - "required": [ - "metrics", - "plan" - ] - }, - "CharmMount": { - "type": "object", - "properties": { - "location": { - "type": "string" - }, - "storage": { - "type": "string" - } - }, - "additionalProperties": false - }, - "CharmOption": { - "type": "object", - "properties": { - "default": { - "type": "object", - "additionalProperties": true - }, - "description": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type" - ] - }, - "CharmPayloadClass": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "type" - ] - }, - "CharmPlan": { - "type": "object", - "properties": { - "required": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "required" - ] - }, - "CharmRelation": { - "type": "object", - "properties": { - "interface": { - "type": "string" - }, - "limit": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "optional": { - "type": "boolean" - }, - "role": { - "type": "string" - }, - "scope": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "role", - "interface", - "optional", - "limit", - "scope" - ] - }, - "CharmResourceMeta": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "name": { - "type": "string" - }, - "path": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "type", - "path", - "description" - ] - }, - "CharmStorage": { - "type": "object", - "properties": { - "count-max": { - "type": "integer" - }, - "count-min": { - "type": "integer" - }, - "description": { - "type": "string" - }, - "location": { - "type": "string" - }, - "minimum-size": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "properties": { - "type": "array", - "items": { - "type": "string" - } - }, - "read-only": { - "type": "boolean" - }, - "shared": { - "type": "boolean" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "description", - "type", - "shared", - "read-only", - "count-min", - "count-max", - "minimum-size" - ] - }, - "CharmURL": { - "type": "object", - "properties": { - "url": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "url" - ] - }, - "ConfigResult": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "DockerImageInfo": { - "type": "object", - "properties": { - "auth": { - "type": "string" - }, - "email": { - "type": "string" - }, - "identitytoken": { - "type": "string" - }, - "image-name": { - "type": "string" - }, - "password": { - "type": "string" - }, - "registrytoken": { - "type": "string" - }, - "repository": { - "type": "string" - }, - "serveraddress": { - "type": "string" - }, - "username": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "image-name" - ] - }, - "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" - ] - }, - "EntityStatus": { - "type": "object", - "properties": { - "data": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "info": { - "type": "string" - }, - "since": { - "type": "string", - "format": "date-time" - }, - "status": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "status", - "info", - "since" - ] - }, - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ExpressionTree": { - "type": "object", - "properties": { - "Expression": { - "type": "object", - "additionalProperties": true - } - }, - "additionalProperties": false, - "required": [ - "Expression" - ] - }, - "IntResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "IntResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/IntResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "KubernetesDeploymentInfo": { - "type": "object", - "properties": { - "deployment-type": { - "type": "string" - }, - "service-type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "deployment-type", - "service-type" - ] - }, - "KubernetesDeviceParams": { - "type": "object", - "properties": { - "Attributes": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "Count": { - "type": "integer" - }, - "Type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Type", - "Count", - "Attributes" - ] - }, - "KubernetesFilesystemAttachmentParams": { - "type": "object", - "properties": { - "mount-point": { - "type": "string" - }, - "provider": { - "type": "string" - }, - "read-only": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "provider" - ] - }, - "KubernetesFilesystemInfo": { - "type": "object", - "properties": { - "data": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "filesystem-id": { - "type": "string" - }, - "info": { - "type": "string" - }, - "mount-point": { - "type": "string" - }, - "pool": { - "type": "string" - }, - "read-only": { - "type": "boolean" - }, - "size": { - "type": "integer" - }, - "status": { - "type": "string" - }, - "storagename": { - "type": "string" - }, - "volume": { - "$ref": "#/definitions/KubernetesVolumeInfo" - } - }, - "additionalProperties": false, - "required": [ - "storagename", - "pool", - "size", - "filesystem-id", - "status", - "info", - "volume" - ] - }, - "KubernetesFilesystemParams": { - "type": "object", - "properties": { - "attachment": { - "$ref": "#/definitions/KubernetesFilesystemAttachmentParams" - }, - "attributes": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "provider": { - "type": "string" - }, - "size": { - "type": "integer" - }, - "storagename": { - "type": "string" - }, - "tags": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - } - }, - "additionalProperties": false, - "required": [ - "storagename", - "size", - "provider" - ] - }, - "KubernetesProvisioningInfo": { - "type": "object", - "properties": { - "charm-modified-version": { - "type": "integer" - }, - "constraints": { - "$ref": "#/definitions/Value" - }, - "deployment-info": { - "$ref": "#/definitions/KubernetesDeploymentInfo" - }, - "devices": { - "type": "array", - "items": { - "$ref": "#/definitions/KubernetesDeviceParams" - } - }, - "filesystems": { - "type": "array", - "items": { - "$ref": "#/definitions/KubernetesFilesystemParams" - } - }, - "image-repo": { - "$ref": "#/definitions/DockerImageInfo" - }, - "pod-spec": { - "type": "string" - }, - "raw-k8s-spec": { - "type": "string" - }, - "tags": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "volumes": { - "type": "array", - "items": { - "$ref": "#/definitions/KubernetesVolumeParams" - } - } - }, - "additionalProperties": false, - "required": [ - "pod-spec", - "constraints" - ] - }, - "KubernetesProvisioningInfoResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/KubernetesProvisioningInfo" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "KubernetesProvisioningInfoResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/KubernetesProvisioningInfoResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "KubernetesVolumeAttachmentParams": { - "type": "object", - "properties": { - "provider": { - "type": "string" - }, - "read-only": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "provider" - ] - }, - "KubernetesVolumeInfo": { - "type": "object", - "properties": { - "data": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "info": { - "type": "string" - }, - "persistent": { - "type": "boolean" - }, - "pool": { - "type": "string" - }, - "size": { - "type": "integer" - }, - "status": { - "type": "string" - }, - "volume-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "volume-id", - "size", - "persistent", - "status", - "info" - ] - }, - "KubernetesVolumeParams": { - "type": "object", - "properties": { - "attachment": { - "$ref": "#/definitions/KubernetesVolumeAttachmentParams" - }, - "attributes": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "provider": { - "type": "string" - }, - "size": { - "type": "integer" - }, - "storagename": { - "type": "string" - }, - "tags": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - } - }, - "additionalProperties": false, - "required": [ - "storagename", - "size", - "provider" - ] - }, - "LifeResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "life": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "life" - ] - }, - "LifeResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/LifeResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "NotifyWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "SetStatus": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityStatusArgs" - } - } - }, - "additionalProperties": false, - "required": [ - "entities" - ] - }, - "StringResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "StringResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "StringsWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id" - ] - }, - "StringsWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringsWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "UpdateApplicationServiceArg": { - "type": "object", - "properties": { - "addresses": { - "type": "array", - "items": { - "$ref": "#/definitions/Address" - } - }, - "application-tag": { - "type": "string" - }, - "generation": { - "type": "integer" - }, - "provider-id": { - "type": "string" - }, - "scale": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "application-tag", - "provider-id", - "addresses" - ] - }, - "UpdateApplicationServiceArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/UpdateApplicationServiceArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "UpdateApplicationUnitArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/UpdateApplicationUnits" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "UpdateApplicationUnitResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "info": { - "$ref": "#/definitions/UpdateApplicationUnitsInfo" - } - }, - "additionalProperties": false - }, - "UpdateApplicationUnitResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/UpdateApplicationUnitResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "UpdateApplicationUnits": { - "type": "object", - "properties": { - "application-tag": { - "type": "string" - }, - "generation": { - "type": "integer" - }, - "scale": { - "type": "integer" - }, - "status": { - "$ref": "#/definitions/EntityStatus" - }, - "units": { - "type": "array", - "items": { - "$ref": "#/definitions/ApplicationUnitParams" - } - } - }, - "additionalProperties": false, - "required": [ - "application-tag", - "units" - ] - }, - "UpdateApplicationUnitsInfo": { - "type": "object", - "properties": { - "units": { - "type": "array", - "items": { - "$ref": "#/definitions/ApplicationUnitInfo" - } - } - }, - "additionalProperties": false, - "required": [ - "units" - ] - }, - "Value": { - "type": "object", - "properties": { - "allocate-public-ip": { - "type": "boolean" - }, - "arch": { - "type": "string" - }, - "container": { - "type": "string" - }, - "cores": { - "type": "integer" - }, - "cpu-power": { - "type": "integer" - }, - "instance-role": { - "type": "string" - }, - "instance-type": { - "type": "string" - }, - "mem": { - "type": "integer" - }, - "root-disk": { - "type": "integer" - }, - "root-disk-source": { - "type": "string" - }, - "spaces": { - "type": "array", - "items": { - "type": "string" - } - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "virt-type": { - "type": "string" - }, - "zones": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - } - } - } - }, - { - "Name": "CharmDownloader", - "Description": "CharmDownloaderAPI implements an API for watching the charms collection for\nany entries that have not been yet downloaded to the blobstore and for\ntriggering their download.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "DownloadApplicationCharms": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "DownloadApplicationCharms iterates the list of provided applications and\ndownloads any referenced charms that have not yet been persisted to the\nblob store." - }, - "WatchApplicationsWithPendingCharms": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsWatchResult" - } - }, - "description": "WatchApplicationsWithPendingCharms registers and returns a watcher instance\nthat reports the ID of applications that reference a charm which has not yet\nbeen downloaded." - } - }, - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "StringsWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id" - ] - } - } - } - }, - { - "Name": "CharmRevisionUpdater", - "Description": "CharmRevisionUpdaterAPI implements the CharmRevisionUpdater interface and is the concrete\nimplementation of the api end point.", - "Version": 2, - "AvailableTo": [ - "controller-machine-agent" - ], - "Schema": { - "type": "object", - "properties": { - "UpdateLatestRevisions": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ErrorResult" - } - }, - "description": "UpdateLatestRevisions retrieves the latest revision information from the charm store for all deployed charms\nand records this information in state." - } - }, - "definitions": { - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - } - } - } - }, - { - "Name": "Charms", - "Description": "APIv6 provides the Charms API facade for version 6.\nIt removes the AddCharmWithAuthorization function, as\nwe no longer support macaroons.", - "Version": 6, - "AvailableTo": [ - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "AddCharm": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/AddCharmWithOrigin" - }, - "Result": { - "$ref": "#/definitions/CharmOriginResult" - } - }, - "description": "AddCharm adds the given charm URL (which must include revision) to the\nenvironment, if it does not exist yet. Local charms are not supported,\nonly charm store and charm hub URLs. See also AddLocalCharm()." - }, - "CharmInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/CharmURL" - }, - "Result": { - "$ref": "#/definitions/Charm" - } - }, - "description": "CharmInfo returns information about the requested charm." - }, - "CheckCharmPlacement": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ApplicationCharmPlacements" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "CheckCharmPlacement checks if a charm is allowed to be placed with in a\ngiven application." - }, - "GetDownloadInfos": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/CharmURLAndOrigins" - }, - "Result": { - "$ref": "#/definitions/DownloadInfoResults" - } - }, - "description": "GetDownloadInfos attempts to get the bundle corresponding to the charm url\nand origin." - }, - "IsMetered": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/CharmURL" - }, - "Result": { - "$ref": "#/definitions/IsMeteredResult" - } - }, - "description": "IsMetered returns whether or not the charm is metered." - }, - "List": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/CharmsList" - }, - "Result": { - "$ref": "#/definitions/CharmsListResult" - } - }, - "description": "List returns a list of charm URLs currently in the state.\nIf supplied parameter contains any names, the result will\nbe filtered to return only the charms with supplied names." - }, - "ListCharmResources": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/CharmURLAndOrigins" - }, - "Result": { - "$ref": "#/definitions/CharmResourcesResults" - } - }, - "description": "ListCharmResources returns a series of resources for a given charm." - }, - "ResolveCharms": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ResolveCharmsWithChannel" - }, - "Result": { - "$ref": "#/definitions/ResolveCharmWithChannelResults" - } - }, - "description": "ResolveCharms resolves the given charm URLs with an optionally specified\npreferred channel. Channel provided via CharmOrigin." - } - }, - "definitions": { - "AddCharmWithOrigin": { - "type": "object", - "properties": { - "charm-origin": { - "$ref": "#/definitions/CharmOrigin" - }, - "force": { - "type": "boolean" - }, - "url": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "url", - "charm-origin", - "force" - ] - }, - "ApplicationCharmPlacement": { - "type": "object", - "properties": { - "application": { - "type": "string" - }, - "charm-url": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "application", - "charm-url" - ] - }, - "ApplicationCharmPlacements": { - "type": "object", - "properties": { - "placements": { - "type": "array", - "items": { - "$ref": "#/definitions/ApplicationCharmPlacement" - } - } - }, - "additionalProperties": false, - "required": [ - "placements" - ] - }, - "Base": { - "type": "object", - "properties": { - "channel": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "channel" - ] - }, - "Charm": { - "type": "object", - "properties": { - "actions": { - "$ref": "#/definitions/CharmActions" - }, - "config": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmOption" - } - } - }, - "lxd-profile": { - "$ref": "#/definitions/CharmLXDProfile" - }, - "manifest": { - "$ref": "#/definitions/CharmManifest" - }, - "meta": { - "$ref": "#/definitions/CharmMeta" - }, - "metrics": { - "$ref": "#/definitions/CharmMetrics" - }, - "revision": { - "type": "integer" - }, - "url": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "revision", - "url", - "config" - ] - }, - "CharmActionSpec": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "params": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "description", - "params" - ] - }, - "CharmActions": { - "type": "object", - "properties": { - "specs": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmActionSpec" - } - } - } - }, - "additionalProperties": false - }, - "CharmBase": { - "type": "object", - "properties": { - "architectures": { - "type": "array", - "items": { - "type": "string" - } - }, - "channel": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "additionalProperties": false - }, - "CharmContainer": { - "type": "object", - "properties": { - "mounts": { - "type": "array", - "items": { - "$ref": "#/definitions/CharmMount" - } - }, - "resource": { - "type": "string" - } - }, - "additionalProperties": false - }, - "CharmDeployment": { - "type": "object", - "properties": { - "min-version": { - "type": "string" - }, - "mode": { - "type": "string" - }, - "service": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type", - "mode", - "service", - "min-version" - ] - }, - "CharmDevice": { - "type": "object", - "properties": { - "CountMax": { - "type": "integer" - }, - "CountMin": { - "type": "integer" - }, - "Description": { - "type": "string" - }, - "Name": { - "type": "string" - }, - "Type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Name", - "Description", - "Type", - "CountMin", - "CountMax" - ] - }, - "CharmLXDProfile": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "description": { - "type": "string" - }, - "devices": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - } - } - } - }, - "additionalProperties": false, - "required": [ - "config", - "description", - "devices" - ] - }, - "CharmManifest": { - "type": "object", - "properties": { - "bases": { - "type": "array", - "items": { - "$ref": "#/definitions/CharmBase" - } - } - }, - "additionalProperties": false - }, - "CharmMeta": { - "type": "object", - "properties": { - "assumes-expr": { - "$ref": "#/definitions/ExpressionTree" - }, - "categories": { - "type": "array", - "items": { - "type": "string" - } - }, - "containers": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmContainer" - } - } - }, - "deployment": { - "$ref": "#/definitions/CharmDeployment" - }, - "description": { - "type": "string" - }, - "devices": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmDevice" - } - } - }, - "extra-bindings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "min-juju-version": { - "type": "string" - }, - "name": { - "type": "string" - }, - "payload-classes": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmPayloadClass" - } - } - }, - "peers": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmRelation" - } - } - }, - "provides": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmRelation" - } - } - }, - "requires": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmRelation" - } - } - }, - "resources": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmResourceMeta" - } - } - }, - "series": { - "type": "array", - "items": { - "type": "string" - } - }, - "storage": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmStorage" - } - } - }, - "subordinate": { - "type": "boolean" - }, - "summary": { - "type": "string" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "terms": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "name", - "summary", - "description", - "subordinate" - ] - }, - "CharmMetric": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type", - "description" - ] - }, - "CharmMetrics": { - "type": "object", - "properties": { - "metrics": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmMetric" - } - } - }, - "plan": { - "$ref": "#/definitions/CharmPlan" - } - }, - "additionalProperties": false, - "required": [ - "metrics", - "plan" - ] - }, - "CharmMount": { - "type": "object", - "properties": { - "location": { - "type": "string" - }, - "storage": { - "type": "string" - } - }, - "additionalProperties": false - }, - "CharmOption": { - "type": "object", - "properties": { - "default": { - "type": "object", - "additionalProperties": true - }, - "description": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type" - ] - }, - "CharmOrigin": { - "type": "object", - "properties": { - "architecture": { - "type": "string" - }, - "base": { - "$ref": "#/definitions/Base" - }, - "branch": { - "type": "string" - }, - "hash": { - "type": "string" - }, - "id": { - "type": "string" - }, - "instance-key": { - "type": "string" - }, - "revision": { - "type": "integer" - }, - "risk": { - "type": "string" - }, - "source": { - "type": "string" - }, - "track": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "source", - "type", - "id" - ] - }, - "CharmOriginResult": { - "type": "object", - "properties": { - "charm-origin": { - "$ref": "#/definitions/CharmOrigin" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "charm-origin" - ] - }, - "CharmPayloadClass": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "type" - ] - }, - "CharmPlan": { - "type": "object", - "properties": { - "required": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "required" - ] - }, - "CharmRelation": { - "type": "object", - "properties": { - "interface": { - "type": "string" - }, - "limit": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "optional": { - "type": "boolean" - }, - "role": { - "type": "string" - }, - "scope": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "role", - "interface", - "optional", - "limit", - "scope" - ] - }, - "CharmResource": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "fingerprint": { - "type": "array", - "items": { - "type": "integer" - } - }, - "name": { - "type": "string" - }, - "origin": { - "type": "string" - }, - "path": { - "type": "string" - }, - "revision": { - "type": "integer" - }, - "size": { - "type": "integer" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "type", - "path", - "origin", - "revision", - "fingerprint", - "size" - ] - }, - "CharmResourceMeta": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "name": { - "type": "string" - }, - "path": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "type", - "path", - "description" - ] - }, - "CharmResourceResult": { - "type": "object", - "properties": { - "CharmResource": { - "$ref": "#/definitions/CharmResource" - }, - "ErrorResult": { - "$ref": "#/definitions/ErrorResult" - }, - "description": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "fingerprint": { - "type": "array", - "items": { - "type": "integer" - } - }, - "name": { - "type": "string" - }, - "origin": { - "type": "string" - }, - "path": { - "type": "string" - }, - "revision": { - "type": "integer" - }, - "size": { - "type": "integer" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "ErrorResult", - "name", - "type", - "path", - "origin", - "revision", - "fingerprint", - "size", - "CharmResource" - ] - }, - "CharmResourcesResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "type": "array", - "items": { - "$ref": "#/definitions/CharmResourceResult" - } - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "CharmStorage": { - "type": "object", - "properties": { - "count-max": { - "type": "integer" - }, - "count-min": { - "type": "integer" - }, - "description": { - "type": "string" - }, - "location": { - "type": "string" - }, - "minimum-size": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "properties": { - "type": "array", - "items": { - "type": "string" - } - }, - "read-only": { - "type": "boolean" - }, - "shared": { - "type": "boolean" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "description", - "type", - "shared", - "read-only", - "count-min", - "count-max", - "minimum-size" - ] - }, - "CharmURL": { - "type": "object", - "properties": { - "url": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "url" - ] - }, - "CharmURLAndOrigin": { - "type": "object", - "properties": { - "charm-origin": { - "$ref": "#/definitions/CharmOrigin" - }, - "charm-url": { - "type": "string" - }, - "macaroon": { - "$ref": "#/definitions/Macaroon" - } - }, - "additionalProperties": false, - "required": [ - "charm-url", - "charm-origin" - ] - }, - "CharmURLAndOrigins": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/CharmURLAndOrigin" - } - } - }, - "additionalProperties": false, - "required": [ - "entities" - ] - }, - "CharmsList": { - "type": "object", - "properties": { - "names": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "names" - ] - }, - "CharmsListResult": { - "type": "object", - "properties": { - "charm-urls": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "charm-urls" - ] - }, - "DownloadInfoResult": { - "type": "object", - "properties": { - "charm-origin": { - "$ref": "#/definitions/CharmOrigin" - }, - "url": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "url", - "charm-origin" - ] - }, - "DownloadInfoResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/DownloadInfoResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ExpressionTree": { - "type": "object", - "properties": { - "Expression": { - "type": "object", - "additionalProperties": true - } - }, - "additionalProperties": false, - "required": [ - "Expression" - ] - }, - "IsMeteredResult": { - "type": "object", - "properties": { - "metered": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "metered" - ] - }, - "Macaroon": { - "type": "object", - "additionalProperties": false - }, - "ResolveCharmWithChannel": { - "type": "object", - "properties": { - "charm-origin": { - "$ref": "#/definitions/CharmOrigin" - }, - "reference": { - "type": "string" - }, - "switch-charm": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "reference", - "charm-origin" - ] - }, - "ResolveCharmWithChannelResult": { - "type": "object", - "properties": { - "charm-origin": { - "$ref": "#/definitions/CharmOrigin" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "supported-series": { - "type": "array", - "items": { - "type": "string" - } - }, - "url": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "url", - "charm-origin", - "supported-series" - ] - }, - "ResolveCharmWithChannelResults": { - "type": "object", - "properties": { - "Results": { - "type": "array", - "items": { - "$ref": "#/definitions/ResolveCharmWithChannelResult" - } - } - }, - "additionalProperties": false, - "required": [ - "Results" - ] - }, - "ResolveCharmsWithChannel": { - "type": "object", - "properties": { - "macaroon": { - "$ref": "#/definitions/Macaroon" - }, - "resolve": { - "type": "array", - "items": { - "$ref": "#/definitions/ResolveCharmWithChannel" - } - } - }, - "additionalProperties": false, - "required": [ - "resolve" - ] - } - } - } - }, - { - "Name": "Cleaner", - "Description": "CleanerAPI implements the API used by the cleaner worker.", - "Version": 2, - "AvailableTo": [ - "controller-machine-agent" - ], - "Schema": { - "type": "object", - "properties": { - "Cleanup": { - "type": "object", - "description": "Cleanup triggers a state cleanup" - }, - "WatchCleanups": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResult" - } - }, - "description": "WatchCleanups watches for cleanups to be performed in state." - } - }, - "definitions": { - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - } - } - } - }, - { - "Name": "Client", - "Description": "Client serves client-specific API methods.", - "Version": 6, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "FindTools": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/FindToolsParams" - }, - "Result": { - "$ref": "#/definitions/FindToolsResult" - } - }, - "description": "FindTools returns a List containing all tools matching the given parameters.\nTODO(juju 3.1) - remove, used by 2.9 client only" - }, - "FullStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/StatusParams" - }, - "Result": { - "$ref": "#/definitions/FullStatus" - } - }, - "description": "FullStatus gives the information needed for juju status over the api" - }, - "StatusHistory": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/StatusHistoryRequests" - }, - "Result": { - "$ref": "#/definitions/StatusHistoryResults" - } - }, - "description": "StatusHistory returns a slice of past statuses for several entities." - }, - "WatchAll": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/AllWatcherId" - } - }, - "description": "WatchAll initiates a watcher for entities in the connected model." - } - }, - "definitions": { - "AllWatcherId": { - "type": "object", - "properties": { - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id" - ] - }, - "ApplicationOfferStatus": { - "type": "object", - "properties": { - "active-connected-count": { - "type": "integer" - }, - "application-name": { - "type": "string" - }, - "charm": { - "type": "string" - }, - "endpoints": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/RemoteEndpoint" - } - } - }, - "err": { - "$ref": "#/definitions/Error" - }, - "offer-name": { - "type": "string" - }, - "total-connected-count": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "offer-name", - "application-name", - "charm", - "endpoints", - "active-connected-count", - "total-connected-count" - ] - }, - "ApplicationStatus": { - "type": "object", - "properties": { - "base": { - "$ref": "#/definitions/Base" - }, - "can-upgrade-to": { - "type": "string" - }, - "charm": { - "type": "string" - }, - "charm-channel": { - "type": "string" - }, - "charm-profile": { - "type": "string" - }, - "charm-version": { - "type": "string" - }, - "endpoint-bindings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "err": { - "$ref": "#/definitions/Error" - }, - "exposed": { - "type": "boolean" - }, - "exposed-endpoints": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/ExposedEndpoint" - } - } - }, - "int": { - "type": "integer" - }, - "life": { - "type": "string" - }, - "meter-statuses": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/MeterStatus" - } - } - }, - "provider-id": { - "type": "string" - }, - "public-address": { - "type": "string" - }, - "relations": { - "type": "object", - "patternProperties": { - ".*": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "status": { - "$ref": "#/definitions/DetailedStatus" - }, - "subordinate-to": { - "type": "array", - "items": { - "type": "string" - } - }, - "units": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/UnitStatus" - } - } - }, - "workload-version": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "charm", - "charm-version", - "charm-profile", - "base", - "exposed", - "life", - "relations", - "can-upgrade-to", - "subordinate-to", - "units", - "meter-statuses", - "status", - "workload-version", - "endpoint-bindings", - "public-address" - ] - }, - "Base": { - "type": "object", - "properties": { - "channel": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "channel" - ] - }, - "Binary": { - "type": "object", - "properties": { - "Arch": { - "type": "string" - }, - "Build": { - "type": "integer" - }, - "Major": { - "type": "integer" - }, - "Minor": { - "type": "integer" - }, - "Number": { - "$ref": "#/definitions/Number" - }, - "Patch": { - "type": "integer" - }, - "Release": { - "type": "string" - }, - "Tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Major", - "Minor", - "Tag", - "Patch", - "Build", - "Number", - "Release", - "Arch" - ] - }, - "BranchStatus": { - "type": "object", - "properties": { - "assigned-units": { - "type": "object", - "patternProperties": { - ".*": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "created": { - "type": "integer" - }, - "created-by": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "assigned-units", - "created", - "created-by" - ] - }, - "DetailedStatus": { - "type": "object", - "properties": { - "data": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "err": { - "$ref": "#/definitions/Error" - }, - "info": { - "type": "string" - }, - "kind": { - "type": "string" - }, - "life": { - "type": "string" - }, - "since": { - "type": "string", - "format": "date-time" - }, - "status": { - "type": "string" - }, - "version": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "status", - "info", - "data", - "since", - "kind", - "version", - "life" - ] - }, - "EndpointStatus": { - "type": "object", - "properties": { - "application": { - "type": "string" - }, - "name": { - "type": "string" - }, - "role": { - "type": "string" - }, - "subordinate": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "application", - "name", - "role", - "subordinate" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ExposedEndpoint": { - "type": "object", - "properties": { - "expose-to-cidrs": { - "type": "array", - "items": { - "type": "string" - } - }, - "expose-to-spaces": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "FindToolsParams": { - "type": "object", - "properties": { - "agentstream": { - "type": "string" - }, - "arch": { - "type": "string" - }, - "major": { - "type": "integer" - }, - "number": { - "$ref": "#/definitions/Number" - }, - "os-type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "number", - "major", - "arch", - "os-type", - "agentstream" - ] - }, - "FindToolsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "list": { - "type": "array", - "items": { - "$ref": "#/definitions/Tools" - } - } - }, - "additionalProperties": false, - "required": [ - "list" - ] - }, - "FullStatus": { - "type": "object", - "properties": { - "applications": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/ApplicationStatus" - } - } - }, - "branches": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/BranchStatus" - } - } - }, - "controller-timestamp": { - "type": "string", - "format": "date-time" - }, - "machines": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/MachineStatus" - } - } - }, - "model": { - "$ref": "#/definitions/ModelStatusInfo" - }, - "offers": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/ApplicationOfferStatus" - } - } - }, - "relations": { - "type": "array", - "items": { - "$ref": "#/definitions/RelationStatus" - } - }, - "remote-applications": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/RemoteApplicationStatus" - } - } - } - }, - "additionalProperties": false, - "required": [ - "model", - "machines", - "applications", - "remote-applications", - "offers", - "relations", - "controller-timestamp", - "branches" - ] - }, - "History": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "statuses": { - "type": "array", - "items": { - "$ref": "#/definitions/DetailedStatus" - } - } - }, - "additionalProperties": false, - "required": [ - "statuses" - ] - }, - "LXDProfile": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "description": { - "type": "string" - }, - "devices": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - } - } - } - }, - "additionalProperties": false, - "required": [ - "config", - "description", - "devices" - ] - }, - "MachineStatus": { - "type": "object", - "properties": { - "agent-status": { - "$ref": "#/definitions/DetailedStatus" - }, - "base": { - "$ref": "#/definitions/Base" - }, - "constraints": { - "type": "string" - }, - "containers": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/MachineStatus" - } - } - }, - "display-name": { - "type": "string" - }, - "dns-name": { - "type": "string" - }, - "hardware": { - "type": "string" - }, - "has-vote": { - "type": "boolean" - }, - "hostname": { - "type": "string" - }, - "id": { - "type": "string" - }, - "instance-id": { - "type": "string" - }, - "instance-status": { - "$ref": "#/definitions/DetailedStatus" - }, - "ip-addresses": { - "type": "array", - "items": { - "type": "string" - } - }, - "jobs": { - "type": "array", - "items": { - "type": "string" - } - }, - "lxd-profiles": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/LXDProfile" - } - } - }, - "modification-status": { - "$ref": "#/definitions/DetailedStatus" - }, - "network-interfaces": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/NetworkInterface" - } - } - }, - "primary-controller-machine": { - "type": "boolean" - }, - "wants-vote": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "agent-status", - "instance-status", - "modification-status", - "dns-name", - "instance-id", - "display-name", - "base", - "id", - "containers", - "constraints", - "hardware", - "jobs", - "has-vote", - "wants-vote" - ] - }, - "MeterStatus": { - "type": "object", - "properties": { - "color": { - "type": "string" - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "color", - "message" - ] - }, - "ModelStatusInfo": { - "type": "object", - "properties": { - "available-version": { - "type": "string" - }, - "cloud-tag": { - "type": "string" - }, - "meter-status": { - "$ref": "#/definitions/MeterStatus" - }, - "model-status": { - "$ref": "#/definitions/DetailedStatus" - }, - "name": { - "type": "string" - }, - "region": { - "type": "string" - }, - "sla": { - "type": "string" - }, - "type": { - "type": "string" - }, - "version": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "type", - "cloud-tag", - "version", - "available-version", - "model-status", - "meter-status", - "sla" - ] - }, - "NetworkInterface": { - "type": "object", - "properties": { - "dns-nameservers": { - "type": "array", - "items": { - "type": "string" - } - }, - "gateway": { - "type": "string" - }, - "ip-addresses": { - "type": "array", - "items": { - "type": "string" - } - }, - "is-up": { - "type": "boolean" - }, - "mac-address": { - "type": "string" - }, - "space": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "ip-addresses", - "mac-address", - "is-up" - ] - }, - "Number": { - "type": "object", - "properties": { - "Build": { - "type": "integer" - }, - "Major": { - "type": "integer" - }, - "Minor": { - "type": "integer" - }, - "Patch": { - "type": "integer" - }, - "Tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Major", - "Minor", - "Tag", - "Patch", - "Build" - ] - }, - "RelationStatus": { - "type": "object", - "properties": { - "endpoints": { - "type": "array", - "items": { - "$ref": "#/definitions/EndpointStatus" - } - }, - "id": { - "type": "integer" - }, - "interface": { - "type": "string" - }, - "key": { - "type": "string" - }, - "scope": { - "type": "string" - }, - "status": { - "$ref": "#/definitions/DetailedStatus" - } - }, - "additionalProperties": false, - "required": [ - "id", - "key", - "interface", - "scope", - "endpoints", - "status" - ] - }, - "RemoteApplicationStatus": { - "type": "object", - "properties": { - "endpoints": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoteEndpoint" - } - }, - "err": { - "$ref": "#/definitions/Error" - }, - "life": { - "type": "string" - }, - "offer-name": { - "type": "string" - }, - "offer-url": { - "type": "string" - }, - "relations": { - "type": "object", - "patternProperties": { - ".*": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "status": { - "$ref": "#/definitions/DetailedStatus" - } - }, - "additionalProperties": false, - "required": [ - "offer-url", - "offer-name", - "endpoints", - "life", - "relations", - "status" - ] - }, - "RemoteEndpoint": { - "type": "object", - "properties": { - "interface": { - "type": "string" - }, - "limit": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "role": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "role", - "interface", - "limit" - ] - }, - "StatusHistoryFilter": { - "type": "object", - "properties": { - "date": { - "type": "string", - "format": "date-time" - }, - "delta": { - "type": "integer" - }, - "exclude": { - "type": "array", - "items": { - "type": "string" - } - }, - "size": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "size", - "date", - "delta", - "exclude" - ] - }, - "StatusHistoryRequest": { - "type": "object", - "properties": { - "filter": { - "$ref": "#/definitions/StatusHistoryFilter" - }, - "historyKind": { - "type": "string" - }, - "size": { - "type": "integer" - }, - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "historyKind", - "size", - "filter", - "tag" - ] - }, - "StatusHistoryRequests": { - "type": "object", - "properties": { - "requests": { - "type": "array", - "items": { - "$ref": "#/definitions/StatusHistoryRequest" - } - } - }, - "additionalProperties": false, - "required": [ - "requests" - ] - }, - "StatusHistoryResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "history": { - "$ref": "#/definitions/History" - } - }, - "additionalProperties": false, - "required": [ - "history" - ] - }, - "StatusHistoryResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StatusHistoryResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "StatusParams": { - "type": "object", - "properties": { - "patterns": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "patterns" - ] - }, - "Tools": { - "type": "object", - "properties": { - "sha256": { - "type": "string" - }, - "size": { - "type": "integer" - }, - "url": { - "type": "string" - }, - "version": { - "$ref": "#/definitions/Binary" - } - }, - "additionalProperties": false, - "required": [ - "version", - "url", - "size" - ] - }, - "UnitStatus": { - "type": "object", - "properties": { - "address": { - "type": "string" - }, - "agent-status": { - "$ref": "#/definitions/DetailedStatus" - }, - "charm": { - "type": "string" - }, - "leader": { - "type": "boolean" - }, - "machine": { - "type": "string" - }, - "opened-ports": { - "type": "array", - "items": { - "type": "string" - } - }, - "provider-id": { - "type": "string" - }, - "public-address": { - "type": "string" - }, - "subordinates": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/UnitStatus" - } - } - }, - "workload-status": { - "$ref": "#/definitions/DetailedStatus" - }, - "workload-version": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "agent-status", - "workload-status", - "workload-version", - "machine", - "opened-ports", - "public-address", - "charm", - "subordinates" - ] - } - } - } - }, - { - "Name": "Cloud", - "Description": "CloudAPI implements the cloud interface and is the concrete implementation\nof the api end point.", - "Version": 7, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "controller-user" - ], - "Schema": { - "type": "object", - "properties": { - "AddCloud": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/AddCloudArgs" - } - }, - "description": "AddCloud adds a new cloud, different from the one managed by the controller." - }, - "AddCredentials": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/TaggedCredentials" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "AddCredentials adds new credentials.\nIn contrast to UpdateCredentials() below, the new credentials can be\nfor a cloud that the controller does not manage (this is required\nfor CAAS models)" - }, - "CheckCredentialsModels": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/TaggedCredentials" - }, - "Result": { - "$ref": "#/definitions/UpdateCredentialResults" - } - }, - "description": "CheckCredentialsModels validates supplied cloud credentials' content against\nmodels that currently use these credentials.\nIf there are any models that are using a credential and these models or their\ncloud instances are not going to be accessible with corresponding credential,\nthere will be detailed validation errors per model.\nThere's no Juju API client which uses this, but JAAS does," - }, - "Cloud": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/CloudResults" - } - }, - "description": "Cloud returns the cloud definitions for the specified clouds." - }, - "CloudInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/CloudInfoResults" - } - }, - "description": "CloudInfo returns information about the specified clouds." - }, - "Clouds": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/CloudsResult" - } - }, - "description": "Clouds returns the definitions of all clouds supported by the controller\nthat the logged in user can see." - }, - "Credential": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/CloudCredentialResults" - } - }, - "description": "Credential returns the specified cloud credential for each tag, minus secrets." - }, - "CredentialContents": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/CloudCredentialArgs" - }, - "Result": { - "$ref": "#/definitions/CredentialContentResults" - } - }, - "description": "CredentialContents returns the specified cloud credentials,\nincluding the secrets if requested.\nIf no specific credential name/cloud was passed in, all credentials for this user\nare returned.\nOnly credential owner can see its contents as well as what models use it.\nController admin has no special superpowers here and is treated the same as all other users." - }, - "InstanceTypes": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/CloudInstanceTypesConstraints" - }, - "Result": { - "$ref": "#/definitions/InstanceTypesResults" - } - }, - "description": "InstanceTypes returns instance type information for the cloud and region\nin which the current model is deployed." - }, - "ListCloudInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ListCloudsRequest" - }, - "Result": { - "$ref": "#/definitions/ListCloudInfoResults" - } - }, - "description": "ListCloudInfo returns clouds that the specified user has access to.\nController admins (superuser) can list clouds for any user.\nOther users can only ask about their own clouds." - }, - "ModifyCloudAccess": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ModifyCloudAccessRequest" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "ModifyCloudAccess changes the model access granted to users." - }, - "RemoveClouds": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "RemoveClouds removes the specified clouds from the controller.\nIf a cloud is in use (has models deployed to it), the removal will fail." - }, - "RevokeCredentialsCheckModels": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RevokeCredentialArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "RevokeCredentialsCheckModels revokes a set of cloud credentials.\nIf the credentials are used by any of the models, the credential deletion will be aborted.\nIf credential-in-use needs to be revoked nonetheless, this method allows the use of force." - }, - "UpdateCloud": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/UpdateCloudArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "UpdateCloud updates an existing cloud that the controller knows about." - }, - "UpdateCredentialsCheckModels": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/UpdateCredentialArgs" - }, - "Result": { - "$ref": "#/definitions/UpdateCredentialResults" - } - }, - "description": "UpdateCredentialsCheckModels updates a set of cloud credentials' content.\nIf there are any models that are using a credential and these models\nare not going to be visible with updated credential content,\nthere will be detailed validation errors per model. Such model errors are returned\nseparately and do not contribute to the overall method error status.\nController admins can 'force' an update of the credential\nregardless of whether it is deemed valid or not." - }, - "UserCredentials": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/UserClouds" - }, - "Result": { - "$ref": "#/definitions/StringsResults" - } - }, - "description": "UserCredentials returns the cloud credentials for a set of users." - } - }, - "definitions": { - "AddCloudArgs": { - "type": "object", - "properties": { - "cloud": { - "$ref": "#/definitions/Cloud" - }, - "force": { - "type": "boolean" - }, - "name": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "cloud", - "name" - ] - }, - "Cloud": { - "type": "object", - "properties": { - "auth-types": { - "type": "array", - "items": { - "type": "string" - } - }, - "ca-certificates": { - "type": "array", - "items": { - "type": "string" - } - }, - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "endpoint": { - "type": "string" - }, - "host-cloud-region": { - "type": "string" - }, - "identity-endpoint": { - "type": "string" - }, - "is-controller-cloud": { - "type": "boolean" - }, - "region-config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - } - }, - "regions": { - "type": "array", - "items": { - "$ref": "#/definitions/CloudRegion" - } - }, - "skip-tls-verify": { - "type": "boolean" - }, - "storage-endpoint": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type" - ] - }, - "CloudCredential": { - "type": "object", - "properties": { - "attrs": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "auth-type": { - "type": "string" - }, - "redacted": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "auth-type" - ] - }, - "CloudCredentialArg": { - "type": "object", - "properties": { - "cloud-name": { - "type": "string" - }, - "credential-name": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "cloud-name", - "credential-name" - ] - }, - "CloudCredentialArgs": { - "type": "object", - "properties": { - "credentials": { - "type": "array", - "items": { - "$ref": "#/definitions/CloudCredentialArg" - } - }, - "include-secrets": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "include-secrets" - ] - }, - "CloudCredentialResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/CloudCredential" - } - }, - "additionalProperties": false - }, - "CloudCredentialResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/CloudCredentialResult" - } - } - }, - "additionalProperties": false - }, - "CloudDetails": { - "type": "object", - "properties": { - "auth-types": { - "type": "array", - "items": { - "type": "string" - } - }, - "endpoint": { - "type": "string" - }, - "identity-endpoint": { - "type": "string" - }, - "regions": { - "type": "array", - "items": { - "$ref": "#/definitions/CloudRegion" - } - }, - "storage-endpoint": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type" - ] - }, - "CloudInfo": { - "type": "object", - "properties": { - "CloudDetails": { - "$ref": "#/definitions/CloudDetails" - }, - "users": { - "type": "array", - "items": { - "$ref": "#/definitions/CloudUserInfo" - } - } - }, - "additionalProperties": false, - "required": [ - "CloudDetails", - "users" - ] - }, - "CloudInfoResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/CloudInfo" - } - }, - "additionalProperties": false - }, - "CloudInfoResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/CloudInfoResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "CloudInstanceTypesConstraint": { - "type": "object", - "properties": { - "cloud-tag": { - "type": "string" - }, - "constraints": { - "$ref": "#/definitions/Value" - }, - "region": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "cloud-tag", - "region" - ] - }, - "CloudInstanceTypesConstraints": { - "type": "object", - "properties": { - "constraints": { - "type": "array", - "items": { - "$ref": "#/definitions/CloudInstanceTypesConstraint" - } - } - }, - "additionalProperties": false, - "required": [ - "constraints" - ] - }, - "CloudRegion": { - "type": "object", - "properties": { - "endpoint": { - "type": "string" - }, - "identity-endpoint": { - "type": "string" - }, - "name": { - "type": "string" - }, - "storage-endpoint": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name" - ] - }, - "CloudResult": { - "type": "object", - "properties": { - "cloud": { - "$ref": "#/definitions/Cloud" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "CloudResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/CloudResult" - } - } - }, - "additionalProperties": false - }, - "CloudUserInfo": { - "type": "object", - "properties": { - "access": { - "type": "string" - }, - "display-name": { - "type": "string" - }, - "user": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "user", - "display-name", - "access" - ] - }, - "CloudsResult": { - "type": "object", - "properties": { - "clouds": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/Cloud" - } - } - } - }, - "additionalProperties": false - }, - "ControllerCredentialInfo": { - "type": "object", - "properties": { - "content": { - "$ref": "#/definitions/CredentialContent" - }, - "models": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelAccess" - } - } - }, - "additionalProperties": false - }, - "CredentialContent": { - "type": "object", - "properties": { - "attrs": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "auth-type": { - "type": "string" - }, - "cloud": { - "type": "string" - }, - "name": { - "type": "string" - }, - "valid": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "name", - "cloud", - "auth-type" - ] - }, - "CredentialContentResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/ControllerCredentialInfo" - } - }, - "additionalProperties": false - }, - "CredentialContentResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/CredentialContentResult" - } - } - }, - "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": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "InstanceType": { - "type": "object", - "properties": { - "arches": { - "type": "array", - "items": { - "type": "string" - } - }, - "cost": { - "type": "integer" - }, - "cpu-cores": { - "type": "integer" - }, - "deprecated": { - "type": "boolean" - }, - "memory": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "root-disk": { - "type": "integer" - }, - "virt-type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "arches", - "cpu-cores", - "memory" - ] - }, - "InstanceTypesResult": { - "type": "object", - "properties": { - "cost-currency": { - "type": "string" - }, - "cost-divisor": { - "type": "integer" - }, - "cost-unit": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "instance-types": { - "type": "array", - "items": { - "$ref": "#/definitions/InstanceType" - } - } - }, - "additionalProperties": false - }, - "InstanceTypesResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/InstanceTypesResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ListCloudInfo": { - "type": "object", - "properties": { - "CloudDetails": { - "$ref": "#/definitions/CloudDetails" - }, - "user-access": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "CloudDetails", - "user-access" - ] - }, - "ListCloudInfoResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/ListCloudInfo" - } - }, - "additionalProperties": false - }, - "ListCloudInfoResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ListCloudInfoResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ListCloudsRequest": { - "type": "object", - "properties": { - "all": { - "type": "boolean" - }, - "user-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "user-tag" - ] - }, - "ModelAccess": { - "type": "object", - "properties": { - "access": { - "type": "string" - }, - "model": { - "type": "string" - } - }, - "additionalProperties": false - }, - "ModifyCloudAccess": { - "type": "object", - "properties": { - "access": { - "type": "string" - }, - "action": { - "type": "string" - }, - "cloud-tag": { - "type": "string" - }, - "user-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "user-tag", - "cloud-tag", - "action", - "access" - ] - }, - "ModifyCloudAccessRequest": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "$ref": "#/definitions/ModifyCloudAccess" - } - } - }, - "additionalProperties": false, - "required": [ - "changes" - ] - }, - "RevokeCredentialArg": { - "type": "object", - "properties": { - "force": { - "type": "boolean" - }, - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "force" - ] - }, - "RevokeCredentialArgs": { - "type": "object", - "properties": { - "credentials": { - "type": "array", - "items": { - "$ref": "#/definitions/RevokeCredentialArg" - } - } - }, - "additionalProperties": false, - "required": [ - "credentials" - ] - }, - "StringsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "StringsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringsResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "TaggedCredential": { - "type": "object", - "properties": { - "credential": { - "$ref": "#/definitions/CloudCredential" - }, - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "credential" - ] - }, - "TaggedCredentials": { - "type": "object", - "properties": { - "credentials": { - "type": "array", - "items": { - "$ref": "#/definitions/TaggedCredential" - } - } - }, - "additionalProperties": false - }, - "UpdateCloudArgs": { - "type": "object", - "properties": { - "clouds": { - "type": "array", - "items": { - "$ref": "#/definitions/AddCloudArgs" - } - } - }, - "additionalProperties": false, - "required": [ - "clouds" - ] - }, - "UpdateCredentialArgs": { - "type": "object", - "properties": { - "credentials": { - "type": "array", - "items": { - "$ref": "#/definitions/TaggedCredential" - } - }, - "force": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "credentials", - "force" - ] - }, - "UpdateCredentialModelResult": { - "type": "object", - "properties": { - "errors": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - }, - "name": { - "type": "string" - }, - "uuid": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "uuid", - "name" - ] - }, - "UpdateCredentialResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "models": { - "type": "array", - "items": { - "$ref": "#/definitions/UpdateCredentialModelResult" - } - }, - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag" - ] - }, - "UpdateCredentialResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/UpdateCredentialResult" - } - } - }, - "additionalProperties": false - }, - "UserCloud": { - "type": "object", - "properties": { - "cloud-tag": { - "type": "string" - }, - "user-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "user-tag", - "cloud-tag" - ] - }, - "UserClouds": { - "type": "object", - "properties": { - "user-clouds": { - "type": "array", - "items": { - "$ref": "#/definitions/UserCloud" - } - } - }, - "additionalProperties": false - }, - "Value": { - "type": "object", - "properties": { - "allocate-public-ip": { - "type": "boolean" - }, - "arch": { - "type": "string" - }, - "container": { - "type": "string" - }, - "cores": { - "type": "integer" - }, - "cpu-power": { - "type": "integer" - }, - "instance-role": { - "type": "string" - }, - "instance-type": { - "type": "string" - }, - "mem": { - "type": "integer" - }, - "root-disk": { - "type": "integer" - }, - "root-disk-source": { - "type": "string" - }, - "spaces": { - "type": "array", - "items": { - "type": "string" - } - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "virt-type": { - "type": "string" - }, - "zones": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - } - } - } - }, - { - "Name": "Controller", - "Description": "ControllerAPI provides the Controller API.", - "Version": 11, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "controller-user" - ], - "Schema": { - "type": "object", - "properties": { - "AllModels": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/UserModelList" - } - }, - "description": "AllModels allows controller administrators to get the list of all the\nmodels in the controller." - }, - "CloudSpec": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/CloudSpecResults" - } - }, - "description": "CloudSpec returns the model's cloud spec." - }, - "ConfigSet": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ControllerConfigSet" - } - }, - "description": "ConfigSet changes the value of specified controller configuration\nsettings. Only some settings can be changed after bootstrap.\nSettings that aren't specified in the params are left unchanged." - }, - "ControllerAPIInfoForModels": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ControllerAPIInfoResults" - } - }, - "description": "ControllerAPIInfoForModels returns the controller api connection details for the specified models." - }, - "ControllerConfig": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ControllerConfigResult" - } - }, - "description": "ControllerConfig returns the controller's configuration." - }, - "ControllerVersion": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ControllerVersionResults" - } - }, - "description": "ControllerVersion returns the version information associated with this\ncontroller binary.\n\nNOTE: the implementation intentionally does not check for SuperuserAccess\nas the Version is known even to users with login access." - }, - "DashboardConnectionInfo": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/DashboardConnectionInfo" - } - }, - "description": "DashboardConnectionInfo returns the connection information for a client to\nconnect to the Juju Dashboard including any proxying information." - }, - "DestroyController": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/DestroyControllerArgs" - } - }, - "description": "DestroyController destroys the controller.\n\nIf the args specify the destruction of the models, this method will\nattempt to do so. Otherwise, if the controller has any non-empty,\nnon-Dead hosted models, then an error with the code\nparams.CodeHasHostedModels will be transmitted." - }, - "GetCloudSpec": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ModelTag" - }, - "Result": { - "$ref": "#/definitions/CloudSpecResult" - } - }, - "description": "GetCloudSpec constructs the CloudSpec for a validated and authorized model." - }, - "GetControllerAccess": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/UserAccessResults" - } - }, - "description": "GetControllerAccess returns the level of access the specified users\nhave on the controller." - }, - "HostedModelConfigs": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/HostedModelConfigsResults" - } - }, - "description": "HostedModelConfigs returns all the information that the client needs in\norder to connect directly with the host model's provider and destroy it\ndirectly." - }, - "IdentityProviderURL": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringResult" - } - }, - "description": "IdentityProviderURL returns the URL of the configured external identity\nprovider for this controller or an empty string if no external identity\nprovider has been configured when the controller was bootstrapped.\n\nNOTE: the implementation intentionally does not check for SuperuserAccess\nas the URL is known even to users with login access." - }, - "InitiateMigration": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/InitiateMigrationArgs" - }, - "Result": { - "$ref": "#/definitions/InitiateMigrationResults" - } - }, - "description": "InitiateMigration attempts to begin the migration of one or\nmore models to other controllers." - }, - "ListBlockedModels": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ModelBlockInfoList" - } - }, - "description": "ListBlockedModels returns a list of all models on the controller\nwhich have a block in place. The resulting slice is sorted by model\nname, then owner. Callers must be controller administrators to retrieve the\nlist." - }, - "ModelConfig": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ModelConfigResults" - } - }, - "description": "ModelConfig returns the model config for the controller\nmodel. For information on the current model, use\nclient.ModelGet" - }, - "ModelStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ModelStatusResults" - } - }, - "description": "ModelStatus returns a summary of the model." - }, - "ModifyControllerAccess": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ModifyControllerAccessRequest" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "ModifyControllerAccess changes the model access granted to users." - }, - "MongoVersion": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringResult" - } - }, - "description": "MongoVersion allows the introspection of the mongo version per controller" - }, - "RemoveBlocks": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RemoveBlocksArgs" - } - }, - "description": "RemoveBlocks removes all the blocks in the controller." - }, - "WatchAllModelSummaries": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/SummaryWatcherID" - } - }, - "description": "WatchAllModelSummaries starts watching the summary updates from the cache.\nThis method is superuser access only, and watches all models in the\ncontroller." - }, - "WatchAllModels": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/AllWatcherId" - } - }, - "description": "WatchAllModels starts watching events for all models in the\ncontroller. The returned AllWatcherId should be used with Next on the\nAllModelWatcher endpoint to receive deltas." - }, - "WatchCloudSpecsChanges": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "WatchCloudSpecsChanges returns a watcher for cloud spec changes." - }, - "WatchModelSummaries": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/SummaryWatcherID" - } - }, - "description": "WatchModelSummaries starts watching the summary updates from the cache.\nOnly models that the user has access to are returned." - } - }, - "definitions": { - "AllWatcherId": { - "type": "object", - "properties": { - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id" - ] - }, - "CloudCredential": { - "type": "object", - "properties": { - "attrs": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "auth-type": { - "type": "string" - }, - "redacted": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "auth-type" - ] - }, - "CloudSpec": { - "type": "object", - "properties": { - "cacertificates": { - "type": "array", - "items": { - "type": "string" - } - }, - "credential": { - "$ref": "#/definitions/CloudCredential" - }, - "endpoint": { - "type": "string" - }, - "identity-endpoint": { - "type": "string" - }, - "is-controller-cloud": { - "type": "boolean" - }, - "name": { - "type": "string" - }, - "region": { - "type": "string" - }, - "skip-tls-verify": { - "type": "boolean" - }, - "storage-endpoint": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type", - "name" - ] - }, - "CloudSpecResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/CloudSpec" - } - }, - "additionalProperties": false - }, - "CloudSpecResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/CloudSpecResult" - } - } - }, - "additionalProperties": false - }, - "ConfigValue": { - "type": "object", - "properties": { - "source": { - "type": "string" - }, - "value": { - "type": "object", - "additionalProperties": true - } - }, - "additionalProperties": false, - "required": [ - "value", - "source" - ] - }, - "ControllerAPIInfoResult": { - "type": "object", - "properties": { - "addresses": { - "type": "array", - "items": { - "type": "string" - } - }, - "cacert": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "addresses", - "cacert" - ] - }, - "ControllerAPIInfoResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ControllerAPIInfoResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ControllerConfigResult": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "ControllerConfigSet": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "ControllerVersionResults": { - "type": "object", - "properties": { - "git-commit": { - "type": "string" - }, - "version": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "version", - "git-commit" - ] - }, - "DashboardConnectionInfo": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "proxy-connection": { - "$ref": "#/definitions/Proxy" - }, - "ssh-connection": { - "$ref": "#/definitions/DashboardConnectionSSHTunnel" - } - }, - "additionalProperties": false, - "required": [ - "proxy-connection", - "ssh-connection" - ] - }, - "DashboardConnectionSSHTunnel": { - "type": "object", - "properties": { - "entity": { - "type": "string" - }, - "host": { - "type": "string" - }, - "model": { - "type": "string" - }, - "port": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "host", - "port" - ] - }, - "DestroyControllerArgs": { - "type": "object", - "properties": { - "destroy-models": { - "type": "boolean" - }, - "destroy-storage": { - "type": "boolean" - }, - "force": { - "type": "boolean" - }, - "max-wait": { - "type": "integer" - }, - "model-timeout": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "destroy-models" - ] - }, - "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": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "HostedModelConfig": { - "type": "object", - "properties": { - "cloud-spec": { - "$ref": "#/definitions/CloudSpec" - }, - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "name": { - "type": "string" - }, - "owner": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "owner" - ] - }, - "HostedModelConfigsResults": { - "type": "object", - "properties": { - "models": { - "type": "array", - "items": { - "$ref": "#/definitions/HostedModelConfig" - } - } - }, - "additionalProperties": false, - "required": [ - "models" - ] - }, - "InitiateMigrationArgs": { - "type": "object", - "properties": { - "specs": { - "type": "array", - "items": { - "$ref": "#/definitions/MigrationSpec" - } - } - }, - "additionalProperties": false, - "required": [ - "specs" - ] - }, - "InitiateMigrationResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "migration-id": { - "type": "string" - }, - "model-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "model-tag", - "migration-id" - ] - }, - "InitiateMigrationResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/InitiateMigrationResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "MachineHardware": { - "type": "object", - "properties": { - "arch": { - "type": "string" - }, - "availability-zone": { - "type": "string" - }, - "cores": { - "type": "integer" - }, - "cpu-power": { - "type": "integer" - }, - "mem": { - "type": "integer" - }, - "root-disk": { - "type": "integer" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "virt-type": { - "type": "string" - } - }, - "additionalProperties": false - }, - "MigrationSpec": { - "type": "object", - "properties": { - "model-tag": { - "type": "string" - }, - "target-info": { - "$ref": "#/definitions/MigrationTargetInfo" - } - }, - "additionalProperties": false, - "required": [ - "model-tag", - "target-info" - ] - }, - "MigrationTargetInfo": { - "type": "object", - "properties": { - "addrs": { - "type": "array", - "items": { - "type": "string" - } - }, - "auth-tag": { - "type": "string" - }, - "ca-cert": { - "type": "string" - }, - "controller-alias": { - "type": "string" - }, - "controller-tag": { - "type": "string" - }, - "macaroons": { - "type": "string" - }, - "password": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "controller-tag", - "addrs", - "ca-cert", - "auth-tag" - ] - }, - "Model": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "owner-tag": { - "type": "string" - }, - "type": { - "type": "string" - }, - "uuid": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "uuid", - "type", - "owner-tag" - ] - }, - "ModelApplicationInfo": { - "type": "object", - "properties": { - "name": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name" - ] - }, - "ModelBlockInfo": { - "type": "object", - "properties": { - "blocks": { - "type": "array", - "items": { - "type": "string" - } - }, - "model-uuid": { - "type": "string" - }, - "name": { - "type": "string" - }, - "owner-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "model-uuid", - "owner-tag", - "blocks" - ] - }, - "ModelBlockInfoList": { - "type": "object", - "properties": { - "models": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelBlockInfo" - } - } - }, - "additionalProperties": false - }, - "ModelConfigResults": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/ConfigValue" - } - } - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "ModelFilesystemInfo": { - "type": "object", - "properties": { - "detachable": { - "type": "boolean" - }, - "id": { - "type": "string" - }, - "message": { - "type": "string" - }, - "provider-id": { - "type": "string" - }, - "status": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "id" - ] - }, - "ModelMachineInfo": { - "type": "object", - "properties": { - "display-name": { - "type": "string" - }, - "ha-primary": { - "type": "boolean" - }, - "hardware": { - "$ref": "#/definitions/MachineHardware" - }, - "has-vote": { - "type": "boolean" - }, - "id": { - "type": "string" - }, - "instance-id": { - "type": "string" - }, - "message": { - "type": "string" - }, - "status": { - "type": "string" - }, - "wants-vote": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "id" - ] - }, - "ModelStatus": { - "type": "object", - "properties": { - "application-count": { - "type": "integer" - }, - "applications": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelApplicationInfo" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "filesystems": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelFilesystemInfo" - } - }, - "hosted-machine-count": { - "type": "integer" - }, - "life": { - "type": "string" - }, - "machines": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelMachineInfo" - } - }, - "model-tag": { - "type": "string" - }, - "owner-tag": { - "type": "string" - }, - "type": { - "type": "string" - }, - "unit-count": { - "type": "integer" - }, - "volumes": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelVolumeInfo" - } - } - }, - "additionalProperties": false, - "required": [ - "model-tag", - "life", - "type", - "hosted-machine-count", - "application-count", - "unit-count", - "owner-tag" - ] - }, - "ModelStatusResults": { - "type": "object", - "properties": { - "models": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelStatus" - } - } - }, - "additionalProperties": false, - "required": [ - "models" - ] - }, - "ModelTag": { - "type": "object", - "additionalProperties": false - }, - "ModelVolumeInfo": { - "type": "object", - "properties": { - "detachable": { - "type": "boolean" - }, - "id": { - "type": "string" - }, - "message": { - "type": "string" - }, - "provider-id": { - "type": "string" - }, - "status": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "id" - ] - }, - "ModifyControllerAccess": { - "type": "object", - "properties": { - "access": { - "type": "string" - }, - "action": { - "type": "string" - }, - "user-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "user-tag", - "action", - "access" - ] - }, - "ModifyControllerAccessRequest": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "$ref": "#/definitions/ModifyControllerAccess" - } - } - }, - "additionalProperties": false, - "required": [ - "changes" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "NotifyWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "Proxy": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "config", - "type" - ] - }, - "RemoveBlocksArgs": { - "type": "object", - "properties": { - "all": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "all" - ] - }, - "StringResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "SummaryWatcherID": { - "type": "object", - "properties": { - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id" - ] - }, - "UserAccess": { - "type": "object", - "properties": { - "access": { - "type": "string" - }, - "user-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "user-tag", - "access" - ] - }, - "UserAccessResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/UserAccess" - } - }, - "additionalProperties": false - }, - "UserAccessResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/UserAccessResult" - } - } - }, - "additionalProperties": false - }, - "UserModel": { - "type": "object", - "properties": { - "last-connection": { - "type": "string", - "format": "date-time" - }, - "model": { - "$ref": "#/definitions/Model" - } - }, - "additionalProperties": false, - "required": [ - "model", - "last-connection" - ] - }, - "UserModelList": { - "type": "object", - "properties": { - "user-models": { - "type": "array", - "items": { - "$ref": "#/definitions/UserModel" - } - } - }, - "additionalProperties": false, - "required": [ - "user-models" - ] - } - } - } - }, - { - "Name": "CredentialManager", - "Description": "", - "Version": 1, - "AvailableTo": [ - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "InvalidateModelCredential": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/InvalidateCredentialArg" - }, - "Result": { - "$ref": "#/definitions/ErrorResult" - } - }, - "description": "InvalidateModelCredential marks the cloud credential for this model as invalid." - } - }, - "definitions": { - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "InvalidateCredentialArg": { - "type": "object", - "properties": { - "reason": { - "type": "string" - } - }, - "additionalProperties": false - } - } - } - }, - { - "Name": "CredentialValidator", - "Description": "", - "Version": 2, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "InvalidateModelCredential": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/InvalidateCredentialArg" - }, - "Result": { - "$ref": "#/definitions/ErrorResult" - } - }, - "description": "InvalidateModelCredential marks the cloud credential for this model as invalid." - }, - "ModelCredential": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ModelCredential" - } - }, - "description": "ModelCredential returns cloud credential information for a model." - }, - "WatchCredential": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entity" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResult" - } - }, - "description": "WatchCredential returns a NotifyWatcher that observes\nchanges to a given cloud credential." - }, - "WatchModelCredential": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResult" - } - }, - "description": "WatchModelCredential returns a NotifyWatcher that watches what cloud credential a model uses." - } - }, - "definitions": { - "Entity": { - "type": "object", - "properties": { - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "InvalidateCredentialArg": { - "type": "object", - "properties": { - "reason": { - "type": "string" - } - }, - "additionalProperties": false - }, - "ModelCredential": { - "type": "object", - "properties": { - "credential-tag": { - "type": "string" - }, - "exists": { - "type": "boolean" - }, - "model-tag": { - "type": "string" - }, - "valid": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "model-tag", - "credential-tag" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - } - } - } - }, - { - "Name": "CrossController", - "Description": "CrossControllerAPI provides access to the CrossModelRelations API facade.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "controller-user" - ], - "Schema": { - "type": "object", - "properties": { - "ControllerInfo": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ControllerAPIInfoResults" - } - }, - "description": "ControllerInfo returns the API info for the controller." - }, - "WatchControllerInfo": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "WatchControllerInfo creates a watcher that notifies when the API info\nfor the controller changes." - } - }, - "definitions": { - "ControllerAPIInfoResult": { - "type": "object", - "properties": { - "addresses": { - "type": "array", - "items": { - "type": "string" - } - }, - "cacert": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "addresses", - "cacert" - ] - }, - "ControllerAPIInfoResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ControllerAPIInfoResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "NotifyWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - } - } - } - }, - { - "Name": "CrossModelRelations", - "Description": "CrossModelRelationsAPI provides access to the CrossModelRelations API facade.", - "Version": 2, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "PublishIngressNetworkChanges": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/IngressNetworksChanges" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "PublishIngressNetworkChanges publishes changes to the required\ningress addresses to the model hosting the offer in the relation." - }, - "PublishRelationChanges": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RemoteRelationsChanges" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "PublishRelationChanges publishes relation changes to the\nmodel hosting the remote application involved in the relation." - }, - "RegisterRemoteRelations": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RegisterRemoteRelationArgs" - }, - "Result": { - "$ref": "#/definitions/RegisterRemoteRelationResults" - } - }, - "description": "RegisterRemoteRelations sets up the model to participate\nin the specified relations. This operation is idempotent." - }, - "WatchEgressAddressesForRelations": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RemoteEntityArgs" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - }, - "description": "WatchEgressAddressesForRelations creates a watcher that notifies when addresses, from which\nconnections will originate for the relation, change.\nEach event contains the entire set of addresses which are required for ingress for the relation." - }, - "WatchOfferStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/OfferArgs" - }, - "Result": { - "$ref": "#/definitions/OfferStatusWatchResults" - } - }, - "description": "WatchOfferStatus starts an OfferStatusWatcher for\nwatching the status of an offer." - }, - "WatchRelationChanges": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RemoteEntityArgs" - }, - "Result": { - "$ref": "#/definitions/RemoteRelationWatchResults" - } - }, - "description": "WatchRelationChanges starts a RemoteRelationChangesWatcher for each\nspecified relation, returning the watcher IDs and initial values,\nor an error if the remote relations couldn't be watched." - }, - "WatchRelationsSuspendedStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RemoteEntityArgs" - }, - "Result": { - "$ref": "#/definitions/RelationStatusWatchResults" - } - }, - "description": "WatchRelationsSuspendedStatus starts a RelationStatusWatcher for\nwatching the life and suspended status of a relation." - } - }, - "definitions": { - "EntityStatus": { - "type": "object", - "properties": { - "data": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "info": { - "type": "string" - }, - "since": { - "type": "string", - "format": "date-time" - }, - "status": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "status", - "info", - "since" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "IngressNetworksChangeEvent": { - "type": "object", - "properties": { - "application-token": { - "type": "string" - }, - "bakery-version": { - "type": "integer" - }, - "ingress-required": { - "type": "boolean" - }, - "macaroons": { - "type": "array", - "items": { - "$ref": "#/definitions/Macaroon" - } - }, - "networks": { - "type": "array", - "items": { - "type": "string" - } - }, - "relation-token": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "relation-token", - "application-token", - "ingress-required" - ] - }, - "IngressNetworksChanges": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "$ref": "#/definitions/IngressNetworksChangeEvent" - } - } - }, - "additionalProperties": false - }, - "Macaroon": { - "type": "object", - "additionalProperties": false - }, - "OfferArg": { - "type": "object", - "properties": { - "bakery-version": { - "type": "integer" - }, - "macaroons": { - "type": "array", - "items": { - "$ref": "#/definitions/Macaroon" - } - }, - "offer-uuid": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "offer-uuid" - ] - }, - "OfferArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/OfferArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "OfferStatusChange": { - "type": "object", - "properties": { - "offer-name": { - "type": "string" - }, - "status": { - "$ref": "#/definitions/EntityStatus" - } - }, - "additionalProperties": false, - "required": [ - "offer-name", - "status" - ] - }, - "OfferStatusWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "$ref": "#/definitions/OfferStatusChange" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id", - "changes" - ] - }, - "OfferStatusWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/OfferStatusWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "RegisterRemoteRelationArg": { - "type": "object", - "properties": { - "application-token": { - "type": "string" - }, - "bakery-version": { - "type": "integer" - }, - "consume-version": { - "type": "integer" - }, - "local-endpoint-name": { - "type": "string" - }, - "macaroons": { - "type": "array", - "items": { - "$ref": "#/definitions/Macaroon" - } - }, - "offer-uuid": { - "type": "string" - }, - "relation-token": { - "type": "string" - }, - "remote-endpoint": { - "$ref": "#/definitions/RemoteEndpoint" - }, - "remote-space": { - "$ref": "#/definitions/RemoteSpace" - }, - "source-model-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "application-token", - "source-model-tag", - "relation-token", - "remote-endpoint", - "remote-space", - "offer-uuid", - "local-endpoint-name" - ] - }, - "RegisterRemoteRelationArgs": { - "type": "object", - "properties": { - "relations": { - "type": "array", - "items": { - "$ref": "#/definitions/RegisterRemoteRelationArg" - } - } - }, - "additionalProperties": false, - "required": [ - "relations" - ] - }, - "RegisterRemoteRelationResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/RemoteRelationDetails" - } - }, - "additionalProperties": false - }, - "RegisterRemoteRelationResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/RegisterRemoteRelationResult" - } - } - }, - "additionalProperties": false - }, - "RelationLifeSuspendedStatusChange": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "life": { - "type": "string" - }, - "suspended": { - "type": "boolean" - }, - "suspended-reason": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "key", - "life", - "suspended", - "suspended-reason" - ] - }, - "RelationLifeSuspendedStatusWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "$ref": "#/definitions/RelationLifeSuspendedStatusChange" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id", - "changes" - ] - }, - "RelationStatusWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/RelationLifeSuspendedStatusWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "RemoteEndpoint": { - "type": "object", - "properties": { - "interface": { - "type": "string" - }, - "limit": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "role": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "role", - "interface", - "limit" - ] - }, - "RemoteEntityArg": { - "type": "object", - "properties": { - "bakery-version": { - "type": "integer" - }, - "macaroons": { - "type": "array", - "items": { - "$ref": "#/definitions/Macaroon" - } - }, - "relation-token": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "relation-token" - ] - }, - "RemoteEntityArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoteEntityArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "RemoteRelationChangeEvent": { - "type": "object", - "properties": { - "application-settings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "application-token": { - "type": "string" - }, - "bakery-version": { - "type": "integer" - }, - "changed-units": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoteRelationUnitChange" - } - }, - "departed-units": { - "type": "array", - "items": { - "type": "integer" - } - }, - "force-cleanup": { - "type": "boolean" - }, - "life": { - "type": "string" - }, - "macaroons": { - "type": "array", - "items": { - "$ref": "#/definitions/Macaroon" - } - }, - "relation-token": { - "type": "string" - }, - "suspended": { - "type": "boolean" - }, - "suspended-reason": { - "type": "string" - }, - "unit-count": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "relation-token", - "application-token", - "life", - "unit-count" - ] - }, - "RemoteRelationDetails": { - "type": "object", - "properties": { - "bakery-version": { - "type": "integer" - }, - "macaroon": { - "$ref": "#/definitions/Macaroon" - }, - "relation-token": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "relation-token" - ] - }, - "RemoteRelationUnitChange": { - "type": "object", - "properties": { - "settings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "unit-id": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "unit-id" - ] - }, - "RemoteRelationWatchResult": { - "type": "object", - "properties": { - "changes": { - "$ref": "#/definitions/RemoteRelationChangeEvent" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id", - "changes" - ] - }, - "RemoteRelationWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoteRelationWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "RemoteRelationsChanges": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoteRelationChangeEvent" - } - } - }, - "additionalProperties": false - }, - "RemoteSpace": { - "type": "object", - "properties": { - "cloud-type": { - "type": "string" - }, - "name": { - "type": "string" - }, - "provider-attributes": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "provider-id": { - "type": "string" - }, - "subnets": { - "type": "array", - "items": { - "$ref": "#/definitions/Subnet" - } - } - }, - "additionalProperties": false, - "required": [ - "cloud-type", - "name", - "provider-id", - "provider-attributes", - "subnets" - ] - }, - "StringsWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id" - ] - }, - "StringsWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringsWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "Subnet": { - "type": "object", - "properties": { - "cidr": { - "type": "string" - }, - "life": { - "type": "string" - }, - "provider-id": { - "type": "string" - }, - "provider-network-id": { - "type": "string" - }, - "provider-space-id": { - "type": "string" - }, - "space-tag": { - "type": "string" - }, - "status": { - "type": "string" - }, - "vlan-tag": { - "type": "integer" - }, - "zones": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "cidr", - "vlan-tag", - "life", - "space-tag", - "zones" - ] - } - } - } - }, - { - "Name": "CrossModelSecrets", - "Description": "CrossModelSecretsAPI provides access to the CrossModelSecrets API facade.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "GetSecretAccessScope": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/GetRemoteSecretAccessArgs" - }, - "Result": { - "$ref": "#/definitions/StringResults" - } - }, - "description": "GetSecretAccessScope returns the tokens for the access scope of the specified secrets and consumers." - }, - "GetSecretContentInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/GetRemoteSecretContentArgs" - }, - "Result": { - "$ref": "#/definitions/SecretContentResults" - } - }, - "description": "GetSecretContentInfo returns the secret values for the specified secrets." - } - }, - "definitions": { - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "GetRemoteSecretAccessArg": { - "type": "object", - "properties": { - "application-token": { - "type": "string" - }, - "unit-id": { - "type": "integer" - }, - "uri": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "application-token", - "unit-id", - "uri" - ] - }, - "GetRemoteSecretAccessArgs": { - "type": "object", - "properties": { - "relations": { - "type": "array", - "items": { - "$ref": "#/definitions/GetRemoteSecretAccessArg" - } - } - }, - "additionalProperties": false, - "required": [ - "relations" - ] - }, - "GetRemoteSecretContentArg": { - "type": "object", - "properties": { - "application-token": { - "type": "string" - }, - "bakery-version": { - "type": "integer" - }, - "macaroons": { - "type": "array", - "items": { - "$ref": "#/definitions/Macaroon" - } - }, - "peek": { - "type": "boolean" - }, - "refresh": { - "type": "boolean" - }, - "revision": { - "type": "integer" - }, - "unit-id": { - "type": "integer" - }, - "uri": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "application-token", - "unit-id", - "uri" - ] - }, - "GetRemoteSecretContentArgs": { - "type": "object", - "properties": { - "relations": { - "type": "array", - "items": { - "$ref": "#/definitions/GetRemoteSecretContentArg" - } - } - }, - "additionalProperties": false, - "required": [ - "relations" - ] - }, - "Macaroon": { - "type": "object", - "additionalProperties": false - }, - "SecretBackendConfig": { - "type": "object", - "properties": { - "params": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type" - ] - }, - "SecretBackendConfigResult": { - "type": "object", - "properties": { - "config": { - "$ref": "#/definitions/SecretBackendConfig" - }, - "draining": { - "type": "boolean" - }, - "model-controller": { - "type": "string" - }, - "model-name": { - "type": "string" - }, - "model-uuid": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "model-controller", - "model-uuid", - "model-name", - "draining" - ] - }, - "SecretContentParams": { - "type": "object", - "properties": { - "data": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "value-ref": { - "$ref": "#/definitions/SecretValueRef" - } - }, - "additionalProperties": false - }, - "SecretContentResult": { - "type": "object", - "properties": { - "backend-config": { - "$ref": "#/definitions/SecretBackendConfigResult" - }, - "content": { - "$ref": "#/definitions/SecretContentParams" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "latest-revision": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "content" - ] - }, - "SecretContentResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/SecretContentResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "SecretValueRef": { - "type": "object", - "properties": { - "backend-id": { - "type": "string" - }, - "revision-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "backend-id", - "revision-id" - ] - }, - "StringResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "StringResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - } - } - } - }, - { - "Name": "Deployer", - "Description": "DeployerAPI provides access to the Deployer API facade.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent" - ], - "Schema": { - "type": "object", - "properties": { - "APIAddresses": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsResult" - } - }, - "description": "APIAddresses returns the list of addresses used to connect to the API." - }, - "APIHostPorts": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/APIHostPortsResult" - } - }, - "description": "APIHostPorts returns the API server addresses." - }, - "ConnectionInfo": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/DeployerConnectionValues" - } - }, - "description": "ConnectionInfo returns all the address information that the\ndeployer task needs in one call." - }, - "Life": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/LifeResults" - } - }, - "description": "Life returns the life status of every supplied entity, where available." - }, - "ModelUUID": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringResult" - } - }, - "description": "ModelUUID returns the model UUID that this facade is deploying into.\nIt is implemented here directly as a result of removing it from\nembedded APIAddresser *without* bumping the facade version.\nIt should be blanked when this facade version is next incremented." - }, - "Remove": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "Remove removes every given entity from state, calling EnsureDead\nfirst, then Remove. It will fail if the entity is not present." - }, - "SetPasswords": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/EntityPasswords" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetPasswords sets the given password for each supplied entity, if possible." - }, - "SetStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetStatus" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetStatus sets the status of the specified entities." - }, - "WatchAPIHostPorts": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResult" - } - }, - "description": "WatchAPIHostPorts watches the API server addresses." - }, - "WatchUnits": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - }, - "description": "WatchUnits starts a StringsWatcher to watch all units belonging to\nto any entity (machine or service) passed in args." - } - }, - "definitions": { - "APIHostPortsResult": { - "type": "object", - "properties": { - "servers": { - "type": "array", - "items": { - "type": "array", - "items": { - "$ref": "#/definitions/HostPort" - } - } - } - }, - "additionalProperties": false, - "required": [ - "servers" - ] - }, - "Address": { - "type": "object", - "properties": { - "cidr": { - "type": "string" - }, - "config-type": { - "type": "string" - }, - "is-secondary": { - "type": "boolean" - }, - "scope": { - "type": "string" - }, - "space-id": { - "type": "string" - }, - "space-name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "value", - "type", - "scope" - ] - }, - "DeployerConnectionValues": { - "type": "object", - "properties": { - "api-addresses": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "api-addresses" - ] - }, - "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" - ] - }, - "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": { - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "HostPort": { - "type": "object", - "properties": { - "Address": { - "$ref": "#/definitions/Address" - }, - "cidr": { - "type": "string" - }, - "config-type": { - "type": "string" - }, - "is-secondary": { - "type": "boolean" - }, - "port": { - "type": "integer" - }, - "scope": { - "type": "string" - }, - "space-id": { - "type": "string" - }, - "space-name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "value", - "type", - "scope", - "Address", - "port" - ] - }, - "LifeResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "life": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "life" - ] - }, - "LifeResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/LifeResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "SetStatus": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityStatusArgs" - } - } - }, - "additionalProperties": false, - "required": [ - "entities" - ] - }, - "StringResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "StringsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "StringsWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id" - ] - }, - "StringsWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringsWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - } - } - } - }, - { - "Name": "DiskManager", - "Description": "DiskManagerAPI provides access to the DiskManager API facade.", - "Version": 2, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent" - ], - "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" - }, - "SerialId": { - "type": "string" - }, - "Size": { - "type": "integer" - }, - "UUID": { - "type": "string" - }, - "WWN": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "DeviceName", - "DeviceLinks", - "Label", - "UUID", - "HardwareId", - "WWN", - "BusAddress", - "Size", - "FilesystemType", - "InUse", - "MountPoint", - "SerialId" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "MachineBlockDevices": { - "type": "object", - "properties": { - "block-devices": { - "type": "array", - "items": { - "$ref": "#/definitions/BlockDevice" - } - }, - "machine": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "machine" - ] - }, - "SetMachineBlockDevices": { - "type": "object", - "properties": { - "machine-block-devices": { - "type": "array", - "items": { - "$ref": "#/definitions/MachineBlockDevices" - } - } - }, - "additionalProperties": false, - "required": [ - "machine-block-devices" - ] - } - } - } - }, - { - "Name": "EntityWatcher", - "Description": "srvEntitiesWatcher defines the API for methods on a state.StringsWatcher.\nEach client has its own current set of watchers, stored in resources.\nsrvEntitiesWatcher notifies about changes for all entities of a given kind,\nsending the changes as a list of strings, which could be transformed\nfrom state entity ids to their corresponding entity tags.", - "Version": 2, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "Next": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/EntitiesWatchResult" - } - }, - "description": "Next returns when a change has occurred to an entity of the\ncollection being watched since the most recent call to Next\nor the Watch call that created the srvEntitiesWatcher." - }, - "Stop": { - "type": "object", - "description": "Stop stops the watcher." - } - }, - "definitions": { - "EntitiesWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - } - } - } - }, - { - "Name": "EnvironUpgrader", - "Description": "", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent" - ], - "Schema": { - "type": "object", - "properties": { - "ModelEnvironVersion": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/IntResults" - } - }, - "description": "ModelEnvironVersion returns the current version of the environ corresponding\nto each specified model." - }, - "ModelTargetEnvironVersion": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/IntResults" - } - }, - "description": "ModelTargetEnvironVersion returns the target version of the environ\ncorresponding to each specified model. The target version is the\nenviron provider's version." - }, - "SetModelEnvironVersion": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetModelEnvironVersions" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetModelEnvironVersion sets the current version of the environ corresponding\nto each specified model." - }, - "SetModelStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetStatus" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetModelStatus sets the status of each given model." - }, - "WatchModelEnvironVersion": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "WatchModelEnvironVersion watches for changes to the environ version of the\nspecified models.\n\nNOTE(axw) this is currently implemented in terms of state.Model.Watch, so\nthe client may be notified of changes unrelated to the environ version." - } - }, - "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" - ] - }, - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "IntResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "IntResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/IntResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "NotifyWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "SetModelEnvironVersion": { - "type": "object", - "properties": { - "model-tag": { - "type": "string" - }, - "version": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "model-tag", - "version" - ] - }, - "SetModelEnvironVersions": { - "type": "object", - "properties": { - "models": { - "type": "array", - "items": { - "$ref": "#/definitions/SetModelEnvironVersion" - } - } - }, - "additionalProperties": false - }, - "SetStatus": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityStatusArgs" - } - } - }, - "additionalProperties": false, - "required": [ - "entities" - ] - } - } - } - }, - { - "Name": "ExternalControllerUpdater", - "Description": "ExternalControllerUpdaterAPI provides access to the CrossModelRelations API facade.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent" - ], - "Schema": { - "type": "object", - "properties": { - "ExternalControllerInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ExternalControllerInfoResults" - } - }, - "description": "ExternalControllerInfo returns the info for the specified external controllers." - }, - "SetExternalControllerInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetExternalControllersInfoParams" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetExternalControllerInfo saves the info for the specified external controllers." - }, - "WatchExternalControllers": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - }, - "description": "WatchExternalControllers watches for the addition and removal of external\ncontroller records to the local controller's database." - } - }, - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ExternalControllerInfo": { - "type": "object", - "properties": { - "addrs": { - "type": "array", - "items": { - "type": "string" - } - }, - "ca-cert": { - "type": "string" - }, - "controller-alias": { - "type": "string" - }, - "controller-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "controller-tag", - "controller-alias", - "addrs", - "ca-cert" - ] - }, - "ExternalControllerInfoResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/ExternalControllerInfo" - } - }, - "additionalProperties": false, - "required": [ - "result", - "error" - ] - }, - "ExternalControllerInfoResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ExternalControllerInfoResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "SetExternalControllerInfoParams": { - "type": "object", - "properties": { - "info": { - "$ref": "#/definitions/ExternalControllerInfo" - } - }, - "additionalProperties": false, - "required": [ - "info" - ] - }, - "SetExternalControllersInfoParams": { - "type": "object", - "properties": { - "controllers": { - "type": "array", - "items": { - "$ref": "#/definitions/SetExternalControllerInfoParams" - } - } - }, - "additionalProperties": false, - "required": [ - "controllers" - ] - }, - "StringsWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id" - ] - }, - "StringsWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringsWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - } - } - } - }, - { - "Name": "FanConfigurer", - "Description": "", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "FanConfig": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/FanConfigResult" - } - }, - "description": "FanConfig returns current FAN configuration." - }, - "WatchForFanConfigChanges": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResult" - } - }, - "description": "WatchForFanConfigChanges returns a NotifyWatcher that observes\nchanges to the FAN configuration.\nso we use the regular error return.\nTODO(wpk) 2017-09-21 We should use Model directly, and watch only for FanConfig changes." - } - }, - "definitions": { - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "FanConfigEntry": { - "type": "object", - "properties": { - "overlay": { - "type": "string" - }, - "underlay": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "underlay", - "overlay" - ] - }, - "FanConfigResult": { - "type": "object", - "properties": { - "fans": { - "type": "array", - "items": { - "$ref": "#/definitions/FanConfigEntry" - } - } - }, - "additionalProperties": false, - "required": [ - "fans" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - } - } - } - }, - { - "Name": "FilesystemAttachmentsWatcher", - "Description": "srvMachineStorageIdsWatcher defines the API wrapping a state.StringsWatcher\nwatching machine/storage attachments. This watcher notifies about storage\nentities (volumes/filesystems) being attached to and detached from machines.\n\nTODO(axw) state needs a new watcher, this is a bt of a hack. State watchers\ncould do with some deduplication of logic, and I don't want to add to that\nspaghetti right now.", - "Version": 2, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "Next": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/MachineStorageIdsWatchResult" - } - }, - "description": "Next returns when a change has occurred to an entity of the\ncollection being watched since the most recent call to Next\nor the Watch call that created the srvMachineStorageIdsWatcher." - }, - "Stop": { - "type": "object", - "description": "Stop stops the watcher." - } - }, - "definitions": { - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "MachineStorageId": { - "type": "object", - "properties": { - "attachment-tag": { - "type": "string" - }, - "machine-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "machine-tag", - "attachment-tag" - ] - }, - "MachineStorageIdsWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "$ref": "#/definitions/MachineStorageId" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id", - "changes" - ] - } - } - } - }, - { - "Name": "FirewallRules", - "Description": "API provides the firewallrules facade APIs for v1.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "ListFirewallRules": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ListFirewallRulesResults" - } - }, - "description": "ListFirewallRules returns all the firewall rules." - }, - "SetFirewallRules": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/FirewallRuleArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetFirewallRules creates or updates the specified firewall rules." - } - }, - "definitions": { - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "FirewallRule": { - "type": "object", - "properties": { - "known-service": { - "type": "string" - }, - "whitelist-cidrs": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "known-service" - ] - }, - "FirewallRuleArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/FirewallRule" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "ListFirewallRulesResults": { - "type": "object", - "properties": { - "Rules": { - "type": "array", - "items": { - "$ref": "#/definitions/FirewallRule" - } - } - }, - "additionalProperties": false, - "required": [ - "Rules" - ] - } - } - } - }, - { - "Name": "Firewaller", - "Description": "FirewallerAPI provides access to the Firewaller API facade.", - "Version": 7, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "AreManuallyProvisioned": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/BoolResults" - } - }, - "description": "AreManuallyProvisioned returns whether each given entity is\nmanually provisioned or not. Only machine tags are accepted." - }, - "CloudSpec": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/CloudSpecResults" - } - }, - "description": "CloudSpec returns the model's cloud spec." - }, - "ControllerAPIInfoForModels": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ControllerAPIInfoResults" - } - }, - "description": "ControllerAPIInfoForModels returns the controller api connection details for the specified models." - }, - "ControllerConfig": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ControllerConfigResult" - } - }, - "description": "ControllerConfig returns the controller's configuration." - }, - "FirewallRules": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/KnownServiceArgs" - }, - "Result": { - "$ref": "#/definitions/ListFirewallRulesResults" - } - }, - "description": "FirewallRules returns the firewall rules for the specified well known service types." - }, - "GetAssignedMachine": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringResults" - } - }, - "description": "GetAssignedMachine returns the assigned machine tag (if any) for\neach given unit." - }, - "GetCloudSpec": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ModelTag" - }, - "Result": { - "$ref": "#/definitions/CloudSpecResult" - } - }, - "description": "GetCloudSpec constructs the CloudSpec for a validated and authorized model." - }, - "GetExposeInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ExposeInfoResults" - } - }, - "description": "GetExposeInfo returns the expose flag and per-endpoint expose settings\nfor the specified applications." - }, - "InstanceId": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringResults" - } - }, - "description": "InstanceId returns the provider specific instance id for each given\nmachine or an CodeNotProvisioned error, if not set." - }, - "Life": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/LifeResults" - } - }, - "description": "Life returns the life status of every supplied entity, where available." - }, - "MacaroonForRelations": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/MacaroonResults" - } - }, - "description": "MacaroonForRelations returns the macaroon for the specified relations." - }, - "ModelConfig": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ModelConfigResult" - } - }, - "description": "ModelConfig returns the current model's configuration." - }, - "OpenedMachinePortRanges": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/OpenMachinePortRangesResults" - } - }, - "description": "OpenedMachinePortRanges returns a list of the opened port ranges for the\nspecified machines where each result is broken down by unit. The list of\nopened ports for each unit is further grouped by endpoint name and includes\nthe subnet CIDRs that belong to the space that each endpoint is bound to." - }, - "SetRelationsStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetStatus" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetRelationsStatus sets the status for the specified relations." - }, - "SpaceInfos": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SpaceInfosParams" - }, - "Result": { - "$ref": "#/definitions/SpaceInfos" - } - }, - "description": "SpaceInfos returns a comprehensive representation of either all spaces or\na filtered subset of the known spaces and their associated subnet details." - }, - "Watch": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "Watch starts an NotifyWatcher for each given entity." - }, - "WatchCloudSpecsChanges": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "WatchCloudSpecsChanges returns a watcher for cloud spec changes." - }, - "WatchEgressAddressesForRelations": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - }, - "description": "WatchEgressAddressesForRelations creates a watcher that notifies when addresses, from which\nconnections will originate for the relation, change.\nEach event contains the entire set of addresses which are required for ingress for the relation." - }, - "WatchForModelConfigChanges": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResult" - } - }, - "description": "WatchForModelConfigChanges returns a NotifyWatcher that observes\nchanges to the model configuration.\nNote that although the NotifyWatchResult contains an Error field,\nit's not used because we are only returning a single watcher,\nso we use the regular error return." - }, - "WatchIngressAddressesForRelations": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - }, - "description": "WatchIngressAddressesForRelations creates a watcher that returns the ingress networks\nthat have been recorded against the specified relations." - }, - "WatchModelMachineStartTimes": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsWatchResult" - } - }, - "description": "WatchModelMachineStartTimes watches the non-container machines in the model\nfor changes to the Life or AgentStartTime fields and reports them as a batch." - }, - "WatchModelMachines": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsWatchResult" - } - }, - "description": "WatchModelMachines returns a StringsWatcher that notifies of\nchanges to the life cycles of the top level machines in the current\nmodel." - }, - "WatchOpenedPorts": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - }, - "description": "WatchOpenedPorts returns a new StringsWatcher for each given\nmodel tag." - }, - "WatchSubnets": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResult" - } - }, - "description": "WatchSubnets returns a new StringsWatcher that watches the specified\nsubnet tags or all tags if no entities are specified." - }, - "WatchUnits": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - }, - "description": "WatchUnits starts a StringsWatcher to watch all units belonging to\nto any entity (machine or service) passed in args." - } - }, - "definitions": { - "BoolResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "BoolResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/BoolResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "CloudCredential": { - "type": "object", - "properties": { - "attrs": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "auth-type": { - "type": "string" - }, - "redacted": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "auth-type" - ] - }, - "CloudSpec": { - "type": "object", - "properties": { - "cacertificates": { - "type": "array", - "items": { - "type": "string" - } - }, - "credential": { - "$ref": "#/definitions/CloudCredential" - }, - "endpoint": { - "type": "string" - }, - "identity-endpoint": { - "type": "string" - }, - "is-controller-cloud": { - "type": "boolean" - }, - "name": { - "type": "string" - }, - "region": { - "type": "string" - }, - "skip-tls-verify": { - "type": "boolean" - }, - "storage-endpoint": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type", - "name" - ] - }, - "CloudSpecResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/CloudSpec" - } - }, - "additionalProperties": false - }, - "CloudSpecResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/CloudSpecResult" - } - } - }, - "additionalProperties": false - }, - "ControllerAPIInfoResult": { - "type": "object", - "properties": { - "addresses": { - "type": "array", - "items": { - "type": "string" - } - }, - "cacert": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "addresses", - "cacert" - ] - }, - "ControllerAPIInfoResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ControllerAPIInfoResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ControllerConfigResult": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "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" - ] - }, - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ExposeInfoResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "exposed": { - "type": "boolean" - }, - "exposed-endpoints": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/ExposedEndpoint" - } - } - } - }, - "additionalProperties": false - }, - "ExposeInfoResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ExposeInfoResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ExposedEndpoint": { - "type": "object", - "properties": { - "expose-to-cidrs": { - "type": "array", - "items": { - "type": "string" - } - }, - "expose-to-spaces": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "FanConfigEntry": { - "type": "object", - "properties": { - "overlay": { - "type": "string" - }, - "underlay": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "underlay", - "overlay" - ] - }, - "FirewallRule": { - "type": "object", - "properties": { - "known-service": { - "type": "string" - }, - "whitelist-cidrs": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "known-service" - ] - }, - "KnownServiceArgs": { - "type": "object", - "properties": { - "known-services": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "known-services" - ] - }, - "LifeResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "life": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "life" - ] - }, - "LifeResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/LifeResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ListFirewallRulesResults": { - "type": "object", - "properties": { - "Rules": { - "type": "array", - "items": { - "$ref": "#/definitions/FirewallRule" - } - } - }, - "additionalProperties": false, - "required": [ - "Rules" - ] - }, - "Macaroon": { - "type": "object", - "additionalProperties": false - }, - "MacaroonResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/Macaroon" - } - }, - "additionalProperties": false - }, - "MacaroonResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/MacaroonResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ModelConfigResult": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "ModelTag": { - "type": "object", - "additionalProperties": false - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "NotifyWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "OpenMachinePortRangesResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "unit-port-ranges": { - "type": "object", - "patternProperties": { - ".*": { - "type": "array", - "items": { - "$ref": "#/definitions/OpenUnitPortRanges" - } - } - } - } - }, - "additionalProperties": false, - "required": [ - "unit-port-ranges" - ] - }, - "OpenMachinePortRangesResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/OpenMachinePortRangesResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "OpenUnitPortRanges": { - "type": "object", - "properties": { - "endpoint": { - "type": "string" - }, - "port-ranges": { - "type": "array", - "items": { - "$ref": "#/definitions/PortRange" - } - }, - "subnet-cidrs": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "endpoint", - "port-ranges", - "subnet-cidrs" - ] - }, - "PortRange": { - "type": "object", - "properties": { - "from-port": { - "type": "integer" - }, - "protocol": { - "type": "string" - }, - "to-port": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "from-port", - "to-port", - "protocol" - ] - }, - "SetStatus": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityStatusArgs" - } - } - }, - "additionalProperties": false, - "required": [ - "entities" - ] - }, - "SpaceInfo": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "provider-id": { - "type": "string" - }, - "subnets": { - "type": "array", - "items": { - "$ref": "#/definitions/SubnetV3" - } - } - }, - "additionalProperties": false, - "required": [ - "id", - "name" - ] - }, - "SpaceInfos": { - "type": "object", - "properties": { - "space-infos": { - "type": "array", - "items": { - "$ref": "#/definitions/SpaceInfo" - } - } - }, - "additionalProperties": false - }, - "SpaceInfosParams": { - "type": "object", - "properties": { - "space-ids": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "StringResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "StringResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "StringsWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id" - ] - }, - "StringsWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringsWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "Subnet": { - "type": "object", - "properties": { - "cidr": { - "type": "string" - }, - "life": { - "type": "string" - }, - "provider-id": { - "type": "string" - }, - "provider-network-id": { - "type": "string" - }, - "provider-space-id": { - "type": "string" - }, - "space-tag": { - "type": "string" - }, - "status": { - "type": "string" - }, - "vlan-tag": { - "type": "integer" - }, - "zones": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "cidr", - "vlan-tag", - "life", - "space-tag", - "zones" - ] - }, - "SubnetV2": { - "type": "object", - "properties": { - "Subnet": { - "$ref": "#/definitions/Subnet" - }, - "cidr": { - "type": "string" - }, - "id": { - "type": "string" - }, - "life": { - "type": "string" - }, - "provider-id": { - "type": "string" - }, - "provider-network-id": { - "type": "string" - }, - "provider-space-id": { - "type": "string" - }, - "space-tag": { - "type": "string" - }, - "status": { - "type": "string" - }, - "vlan-tag": { - "type": "integer" - }, - "zones": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "cidr", - "vlan-tag", - "life", - "space-tag", - "zones", - "Subnet" - ] - }, - "SubnetV3": { - "type": "object", - "properties": { - "Subnet": { - "$ref": "#/definitions/Subnet" - }, - "SubnetV2": { - "$ref": "#/definitions/SubnetV2" - }, - "cidr": { - "type": "string" - }, - "fan-info": { - "$ref": "#/definitions/FanConfigEntry" - }, - "id": { - "type": "string" - }, - "is-public": { - "type": "boolean" - }, - "life": { - "type": "string" - }, - "provider-id": { - "type": "string" - }, - "provider-network-id": { - "type": "string" - }, - "provider-space-id": { - "type": "string" - }, - "space-id": { - "type": "string" - }, - "space-tag": { - "type": "string" - }, - "status": { - "type": "string" - }, - "vlan-tag": { - "type": "integer" - }, - "zones": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "cidr", - "vlan-tag", - "life", - "space-tag", - "zones", - "Subnet", - "SubnetV2", - "space-id" - ] - } - } - } - }, - { - "Name": "HighAvailability", - "Description": "HighAvailabilityAPI implements the HighAvailability interface and is the concrete\nimplementation of the api end point.", - "Version": 2, - "AvailableTo": [ - "controller-user", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "EnableHA": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ControllersSpecs" - }, - "Result": { - "$ref": "#/definitions/ControllersChangeResults" - } - }, - "description": "EnableHA adds controller machines as necessary to ensure the\ncontroller has the number of machines specified." - } - }, - "definitions": { - "ControllersChangeResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/ControllersChanges" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "ControllersChangeResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ControllersChangeResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ControllersChanges": { - "type": "object", - "properties": { - "added": { - "type": "array", - "items": { - "type": "string" - } - }, - "converted": { - "type": "array", - "items": { - "type": "string" - } - }, - "maintained": { - "type": "array", - "items": { - "type": "string" - } - }, - "removed": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "ControllersSpec": { - "type": "object", - "properties": { - "constraints": { - "$ref": "#/definitions/Value" - }, - "num-controllers": { - "type": "integer" - }, - "placement": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "num-controllers" - ] - }, - "ControllersSpecs": { - "type": "object", - "properties": { - "specs": { - "type": "array", - "items": { - "$ref": "#/definitions/ControllersSpec" - } - } - }, - "additionalProperties": false, - "required": [ - "specs" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "Value": { - "type": "object", - "properties": { - "allocate-public-ip": { - "type": "boolean" - }, - "arch": { - "type": "string" - }, - "container": { - "type": "string" - }, - "cores": { - "type": "integer" - }, - "cpu-power": { - "type": "integer" - }, - "instance-role": { - "type": "string" - }, - "instance-type": { - "type": "string" - }, - "mem": { - "type": "integer" - }, - "root-disk": { - "type": "integer" - }, - "root-disk-source": { - "type": "string" - }, - "spaces": { - "type": "array", - "items": { - "type": "string" - } - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "virt-type": { - "type": "string" - }, - "zones": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - } - } - } - }, - { - "Name": "HostKeyReporter", - "Description": "Facade implements the API required by the hostkeyreporter worker.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "ReportKeys": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SSHHostKeySet" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "ReportKeys sets the SSH host keys for one or more entities." - } - }, - "definitions": { - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "SSHHostKeySet": { - "type": "object", - "properties": { - "entity-keys": { - "type": "array", - "items": { - "$ref": "#/definitions/SSHHostKeys" - } - } - }, - "additionalProperties": false, - "required": [ - "entity-keys" - ] - }, - "SSHHostKeys": { - "type": "object", - "properties": { - "public-keys": { - "type": "array", - "items": { - "type": "string" - } - }, - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "public-keys" - ] - } - } - } - }, - { - "Name": "ImageMetadata", - "Description": "API is a dummy struct for compatibility.", - "Version": 3, - "AvailableTo": [ - "controller-machine-agent" - ], - "Schema": { - "type": "object", - "properties": { - "UpdateFromPublishedImages": { - "type": "object", - "description": "UpdateFromPublishedImages is now a no-op.\nIt is retained for compatibility." - } - } - } - }, - { - "Name": "ImageMetadataManager", - "Description": "API is the concrete implementation of the api end point\nfor loud image metadata manipulations.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "Delete": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/MetadataImageIds" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "Delete deletes cloud image metadata for given image ids.\nIt supports bulk calls." - }, - "List": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ImageMetadataFilter" - }, - "Result": { - "$ref": "#/definitions/ListCloudImageMetadataResult" - } - }, - "description": "List returns all found cloud image metadata that satisfy\ngiven filter.\nReturned list contains metadata ordered by priority." - }, - "Save": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/MetadataSaveParams" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "Save stores given cloud image metadata.\nIt supports bulk calls." - } - }, - "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" - }, - "source": { - "type": "string" - }, - "stream": { - "type": "string" - }, - "version": { - "type": "string" - }, - "virt-type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "image-id", - "region", - "version", - "arch", - "source", - "priority" - ] - }, - "CloudImageMetadataList": { - "type": "object", - "properties": { - "metadata": { - "type": "array", - "items": { - "$ref": "#/definitions/CloudImageMetadata" - } - } - }, - "additionalProperties": false - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "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" - }, - "stream": { - "type": "string" - }, - "versions": { - "type": "array", - "items": { - "type": "string" - } - }, - "virt-type": { - "type": "string" - } - }, - "additionalProperties": false - }, - "ListCloudImageMetadataResult": { - "type": "object", - "properties": { - "result": { - "type": "array", - "items": { - "$ref": "#/definitions/CloudImageMetadata" - } - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "MetadataImageIds": { - "type": "object", - "properties": { - "image-ids": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "image-ids" - ] - }, - "MetadataSaveParams": { - "type": "object", - "properties": { - "metadata": { - "type": "array", - "items": { - "$ref": "#/definitions/CloudImageMetadataList" - } - } - }, - "additionalProperties": false - } - } - } - }, - { - "Name": "InstanceMutater", - "Description": "", - "Version": 3, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent" - ], - "Schema": { - "type": "object", - "properties": { - "CharmProfilingInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entity" - }, - "Result": { - "$ref": "#/definitions/CharmProfilingInfoResult" - } - }, - "description": "CharmProfilingInfo returns info to update lxd profiles on the machine. If\nthe machine is not provisioned, no profile change info will be returned,\nnor will an error." - }, - "ContainerType": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entity" - }, - "Result": { - "$ref": "#/definitions/ContainerTypeResult" - } - }, - "description": "ContainerType returns the container type of a machine." - }, - "Life": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/LifeResults" - } - }, - "description": "Life returns the life status of every supplied entity, where available." - }, - "SetCharmProfiles": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetProfileArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetCharmProfiles records the given slice of charm profile names." - }, - "SetModificationStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetStatus" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetModificationStatus updates the instance whilst changes are occurring. This\nis different from SetStatus and SetInstanceStatus, by the fact this holds\ninformation about the ongoing changes that are happening to instances.\nConsider LXD Profile updates that can modify a instance, but may not cause\nthe instance to be placed into a error state. This modification status\nserves the purpose of highlighting that to the operator.\nOnly machine tags are accepted." - }, - "WatchContainers": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entity" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResult" - } - }, - "description": "WatchContainers starts a watcher to track Containers on a given\nmachine." - }, - "WatchLXDProfileVerificationNeeded": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "WatchLXDProfileVerificationNeeded starts a watcher to track Applications with\nLXD Profiles." - }, - "WatchMachines": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsWatchResult" - } - }, - "description": "WatchMachines starts a watcher to track machines.\nWatchMachines does not consume the initial event of the watch response, as\nthat returns the initial set of machines that are currently available." - }, - "WatchModelMachines": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsWatchResult" - } - }, - "description": "WatchModelMachines starts a watcher to track machines, but not containers.\nWatchModelMachines does not consume the initial event of the watch response, as\nthat returns the initial set of machines that are currently available." - } - }, - "definitions": { - "CharmLXDProfile": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "description": { - "type": "string" - }, - "devices": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - } - } - } - }, - "additionalProperties": false, - "required": [ - "config", - "description", - "devices" - ] - }, - "CharmProfilingInfoResult": { - "type": "object", - "properties": { - "current-profiles": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "instance-id": { - "type": "string" - }, - "model-name": { - "type": "string" - }, - "profile-changes": { - "type": "array", - "items": { - "$ref": "#/definitions/ProfileInfoResult" - } - } - }, - "additionalProperties": false, - "required": [ - "instance-id", - "model-name", - "profile-changes", - "current-profiles", - "error" - ] - }, - "ContainerTypeResult": { - "type": "object", - "properties": { - "container-type": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "container-type", - "error" - ] - }, - "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" - ] - }, - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "LifeResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "life": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "life" - ] - }, - "LifeResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/LifeResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "NotifyWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ProfileInfoResult": { - "type": "object", - "properties": { - "application-name": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "profile": { - "$ref": "#/definitions/CharmLXDProfile" - }, - "revision": { - "type": "integer" - } - }, - "additionalProperties": false - }, - "SetProfileArg": { - "type": "object", - "properties": { - "entity": { - "$ref": "#/definitions/Entity" - }, - "profiles": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "entity", - "profiles" - ] - }, - "SetProfileArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/SetProfileArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "SetStatus": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityStatusArgs" - } - } - }, - "additionalProperties": false, - "required": [ - "entities" - ] - }, - "StringsWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id" - ] - } - } - } - }, - { - "Name": "InstancePoller", - "Description": "InstancePollerAPI provides access to the InstancePoller API facade.", - "Version": 4, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "AreManuallyProvisioned": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/BoolResults" - } - }, - "description": "AreManuallyProvisioned returns whether each given entity is\nmanually provisioned or not. Only machine tags are accepted." - }, - "InstanceId": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringResults" - } - }, - "description": "InstanceId returns the provider specific instance id for each given\nmachine or an CodeNotProvisioned error, if not set." - }, - "InstanceStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StatusResults" - } - }, - "description": "InstanceStatus returns the instance status for each given entity.\nOnly machine tags are accepted." - }, - "Life": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/LifeResults" - } - }, - "description": "Life returns the life status of every supplied entity, where available." - }, - "ModelConfig": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ModelConfigResult" - } - }, - "description": "ModelConfig returns the current model's configuration." - }, - "ProviderAddresses": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/MachineAddressesResults" - } - }, - "description": "ProviderAddresses returns the list of all known provider addresses\nfor each given entity. Only machine tags are accepted." - }, - "SetInstanceStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetStatus" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetInstanceStatus updates the instance status for each given entity.\nOnly machine tags are accepted." - }, - "SetProviderAddresses": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetMachinesAddresses" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetProviderAddresses updates the list of known provider addresses\nfor each given entity. Only machine tags are accepted." - }, - "SetProviderNetworkConfig": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetProviderNetworkConfig" - }, - "Result": { - "$ref": "#/definitions/SetProviderNetworkConfigResults" - } - }, - "description": "SetProviderNetworkConfig updates the provider addresses for one or more\nmachines.\n\nWhat's more, if the client request includes provider-specific IDs (e.g.\nnetwork, subnet or address IDs), this method will also iterate any present\nlink layer devices (and their addresses) and merge in any missing\nprovider-specific information." - }, - "Status": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StatusResults" - } - }, - "description": "Status returns the status of each given entity." - }, - "WatchForModelConfigChanges": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResult" - } - }, - "description": "WatchForModelConfigChanges returns a NotifyWatcher that observes\nchanges to the model configuration.\nNote that although the NotifyWatchResult contains an Error field,\nit's not used because we are only returning a single watcher,\nso we use the regular error return." - }, - "WatchModelMachineStartTimes": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsWatchResult" - } - }, - "description": "WatchModelMachineStartTimes watches the non-container machines in the model\nfor changes to the Life or AgentStartTime fields and reports them as a batch." - }, - "WatchModelMachines": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsWatchResult" - } - }, - "description": "WatchModelMachines returns a StringsWatcher that notifies of\nchanges to the life cycles of the top level machines in the current\nmodel." - } - }, - "definitions": { - "Address": { - "type": "object", - "properties": { - "cidr": { - "type": "string" - }, - "config-type": { - "type": "string" - }, - "is-secondary": { - "type": "boolean" - }, - "scope": { - "type": "string" - }, - "space-id": { - "type": "string" - }, - "space-name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "value", - "type", - "scope" - ] - }, - "BoolResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "BoolResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/BoolResult" - } - } - }, - "additionalProperties": false, - "required": [ - "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" - ] - }, - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "LifeResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "life": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "life" - ] - }, - "LifeResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/LifeResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "MachineAddresses": { - "type": "object", - "properties": { - "addresses": { - "type": "array", - "items": { - "$ref": "#/definitions/Address" - } - }, - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "addresses" - ] - }, - "MachineAddressesResult": { - "type": "object", - "properties": { - "addresses": { - "type": "array", - "items": { - "$ref": "#/definitions/Address" - } - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "addresses" - ] - }, - "MachineAddressesResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/MachineAddressesResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ModelConfigResult": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "NetworkConfig": { - "type": "object", - "properties": { - "address": { - "type": "string" - }, - "addresses": { - "type": "array", - "items": { - "$ref": "#/definitions/Address" - } - }, - "cidr": { - "type": "string" - }, - "config-type": { - "type": "string" - }, - "device-index": { - "type": "integer" - }, - "disabled": { - "type": "boolean" - }, - "dns-search-domains": { - "type": "array", - "items": { - "type": "string" - } - }, - "dns-servers": { - "type": "array", - "items": { - "type": "string" - } - }, - "gateway-address": { - "type": "string" - }, - "interface-name": { - "type": "string" - }, - "interface-type": { - "type": "string" - }, - "is-default-gateway": { - "type": "boolean" - }, - "mac-address": { - "type": "string" - }, - "mtu": { - "type": "integer" - }, - "no-auto-start": { - "type": "boolean" - }, - "origin": { - "type": "string" - }, - "parent-interface-name": { - "type": "string" - }, - "provider-address-id": { - "type": "string" - }, - "provider-id": { - "type": "string" - }, - "provider-network-id": { - "type": "string" - }, - "provider-space-id": { - "type": "string" - }, - "provider-subnet-id": { - "type": "string" - }, - "provider-vlan-id": { - "type": "string" - }, - "routes": { - "type": "array", - "items": { - "$ref": "#/definitions/NetworkRoute" - } - }, - "shadow-addresses": { - "type": "array", - "items": { - "$ref": "#/definitions/Address" - } - }, - "virtual-port-type": { - "type": "string" - }, - "vlan-tag": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "device-index", - "mac-address", - "cidr", - "mtu", - "provider-id", - "provider-network-id", - "provider-subnet-id", - "provider-space-id", - "provider-address-id", - "provider-vlan-id", - "vlan-tag", - "interface-name", - "parent-interface-name", - "interface-type", - "disabled" - ] - }, - "NetworkRoute": { - "type": "object", - "properties": { - "destination-cidr": { - "type": "string" - }, - "gateway-ip": { - "type": "string" - }, - "metric": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "destination-cidr", - "gateway-ip", - "metric" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "ProviderNetworkConfig": { - "type": "object", - "properties": { - "config": { - "type": "array", - "items": { - "$ref": "#/definitions/NetworkConfig" - } - }, - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "config" - ] - }, - "SetMachinesAddresses": { - "type": "object", - "properties": { - "machine-addresses": { - "type": "array", - "items": { - "$ref": "#/definitions/MachineAddresses" - } - } - }, - "additionalProperties": false, - "required": [ - "machine-addresses" - ] - }, - "SetProviderNetworkConfig": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/ProviderNetworkConfig" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "SetProviderNetworkConfigResult": { - "type": "object", - "properties": { - "addresses": { - "type": "array", - "items": { - "$ref": "#/definitions/Address" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "modified": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "addresses", - "modified" - ] - }, - "SetProviderNetworkConfigResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/SetProviderNetworkConfigResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "SetStatus": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityStatusArgs" - } - } - }, - "additionalProperties": false, - "required": [ - "entities" - ] - }, - "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": [ - "id", - "life", - "status", - "info", - "data", - "since" - ] - }, - "StatusResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StatusResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "StringResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "StringResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "StringsWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id" - ] - } - } - } - }, - { - "Name": "KeyManager", - "Description": "KeyManagerAPI provides api endpoints for manipulating ssh keys", - "Version": 1, - "AvailableTo": [ - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "AddKeys": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ModifyUserSSHKeys" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "AddKeys adds new authorised ssh keys for the specified user." - }, - "DeleteKeys": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ModifyUserSSHKeys" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "DeleteKeys deletes the authorised ssh keys for the specified user." - }, - "ImportKeys": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ModifyUserSSHKeys" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "ImportKeys imports new authorised ssh keys from the specified key ids for the specified user." - }, - "ListKeys": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ListSSHKeys" - }, - "Result": { - "$ref": "#/definitions/StringsResults" - } - }, - "description": "ListKeys returns the authorised ssh keys for the specified users." - } - }, - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ListSSHKeys": { - "type": "object", - "properties": { - "entities": { - "$ref": "#/definitions/Entities" - }, - "mode": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "entities", - "mode" - ] - }, - "ModifyUserSSHKeys": { - "type": "object", - "properties": { - "ssh-keys": { - "type": "array", - "items": { - "type": "string" - } - }, - "user": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "user", - "ssh-keys" - ] - }, - "StringsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "StringsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringsResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - } - } - } - }, - { - "Name": "KeyUpdater", - "Description": "KeyUpdaterAPI implements the KeyUpdater interface and is the concrete\nimplementation of the api end point.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent" - ], - "Schema": { - "type": "object", - "properties": { - "AuthorisedKeys": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsResults" - } - }, - "description": "AuthorisedKeys reports the authorised ssh keys for the specified machines.\nThe current implementation relies on global authorised keys being stored in the model config.\nThis will change as new user management and authorisation functionality is added." - }, - "WatchAuthorisedKeys": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "WatchAuthorisedKeys starts a watcher to track changes to the authorised ssh keys\nfor the specified machines.\nThe current implementation relies on global authorised keys being stored in the model config.\nThis will change as new user management and authorisation functionality is added." - } - }, - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "NotifyWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "StringsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "StringsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringsResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - } - } - } - }, - { - "Name": "LeadershipService", - "Description": "LeadershipService implements a variant of leadership.Claimer for consumption\nover the API.", - "Version": 2, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "BlockUntilLeadershipReleased": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ApplicationTag" - }, - "Result": { - "$ref": "#/definitions/ErrorResult" - } - }, - "description": "BlockUntilLeadershipReleased blocks the caller until leadership is\nreleased for the given service." - }, - "ClaimLeadership": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ClaimLeadershipBulkParams" - }, - "Result": { - "$ref": "#/definitions/ClaimLeadershipBulkResults" - } - }, - "description": "ClaimLeadership makes a leadership claim with the given parameters." - } - }, - "definitions": { - "ApplicationTag": { - "type": "object", - "properties": { - "Name": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Name" - ] - }, - "ClaimLeadershipBulkParams": { - "type": "object", - "properties": { - "params": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimLeadershipParams" - } - } - }, - "additionalProperties": false, - "required": [ - "params" - ] - }, - "ClaimLeadershipBulkResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ClaimLeadershipParams": { - "type": "object", - "properties": { - "application-tag": { - "type": "string" - }, - "duration": { - "type": "number" - }, - "unit-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "application-tag", - "unit-tag", - "duration" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - } - } - } - }, - { - "Name": "LifeFlag", - "Description": "", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent" - ], - "Schema": { - "type": "object", - "properties": { - "Life": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/LifeResults" - } - }, - "description": "Life returns the life status of every supplied entity, where available." - }, - "Watch": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "Watch starts an NotifyWatcher for each given entity." - } - }, - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "LifeResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "life": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "life" - ] - }, - "LifeResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/LifeResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "NotifyWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - } - } - } - }, - { - "Name": "LogForwarding", - "Description": "LogForwardingAPI is the concrete implementation of the api end point.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent" - ], - "Schema": { - "type": "object", - "properties": { - "GetLastSent": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/LogForwardingGetLastSentParams" - }, - "Result": { - "$ref": "#/definitions/LogForwardingGetLastSentResults" - } - }, - "description": "GetLastSent is a bulk call that gets the log forwarding \"last sent\"\nrecord ID for each requested target." - }, - "SetLastSent": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/LogForwardingSetLastSentParams" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetLastSent is a bulk call that sets the log forwarding \"last sent\"\nrecord ID for each requested target." - } - }, - "definitions": { - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "LogForwardingGetLastSentParams": { - "type": "object", - "properties": { - "ids": { - "type": "array", - "items": { - "$ref": "#/definitions/LogForwardingID" - } - } - }, - "additionalProperties": false, - "required": [ - "ids" - ] - }, - "LogForwardingGetLastSentResult": { - "type": "object", - "properties": { - "err": { - "$ref": "#/definitions/Error" - }, - "record-id": { - "type": "integer" - }, - "record-timestamp": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "record-id", - "record-timestamp", - "err" - ] - }, - "LogForwardingGetLastSentResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/LogForwardingGetLastSentResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "LogForwardingID": { - "type": "object", - "properties": { - "model": { - "type": "string" - }, - "sink": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "model", - "sink" - ] - }, - "LogForwardingSetLastSentParam": { - "type": "object", - "properties": { - "LogForwardingID": { - "$ref": "#/definitions/LogForwardingID" - }, - "model": { - "type": "string" - }, - "record-id": { - "type": "integer" - }, - "record-timestamp": { - "type": "integer" - }, - "sink": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "model", - "sink", - "LogForwardingID", - "record-id", - "record-timestamp" - ] - }, - "LogForwardingSetLastSentParams": { - "type": "object", - "properties": { - "params": { - "type": "array", - "items": { - "$ref": "#/definitions/LogForwardingSetLastSentParam" - } - } - }, - "additionalProperties": false, - "required": [ - "params" - ] - } - } - } - }, - { - "Name": "Logger", - "Description": "LoggerAPI implements the Logger interface and is the concrete\nimplementation of the api end point.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "LoggingConfig": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringResults" - } - }, - "description": "LoggingConfig reports the logging configuration for the agents specified." - }, - "WatchLoggingConfig": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "WatchLoggingConfig starts a watcher to track changes to the logging config\nfor the agents specified.. Unfortunately the current infrastructure makes\nwatching parts of the config non-trivial, so currently any change to the\nconfig will cause the watcher to notify the client." - } - }, - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "NotifyWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "StringResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "StringResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - } - } - } - }, - { - "Name": "MachineActions", - "Description": "Facade implements the machineactions interface and is the concrete\nimplementation of the api end point.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent" - ], - "Schema": { - "type": "object", - "properties": { - "Actions": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ActionResults" - } - }, - "description": "Actions returns the Actions by Tags passed and ensures that the machine asking\nfor them is the machine that has the actions" - }, - "BeginActions": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "BeginActions marks the actions represented by the passed in Tags as running." - }, - "FinishActions": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ActionExecutionResults" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "FinishActions saves the result of a completed Action" - }, - "RunningActions": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ActionsByReceivers" - } - }, - "description": "RunningActions lists the actions running for the entities passed in.\nIf we end up needing more than ListRunning at some point we could follow/abstract\nwhat's done in the client actions package." - }, - "WatchActionNotifications": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - }, - "description": "WatchActionNotifications returns a StringsWatcher for observing\nincoming action calls to a machine." - } - }, - "definitions": { - "Action": { - "type": "object", - "properties": { - "execution-group": { - "type": "string" - }, - "name": { - "type": "string" - }, - "parallel": { - "type": "boolean" - }, - "parameters": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "receiver": { - "type": "string" - }, - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "receiver", - "name" - ] - }, - "ActionExecutionResult": { - "type": "object", - "properties": { - "action-tag": { - "type": "string" - }, - "message": { - "type": "string" - }, - "results": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "status": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "action-tag", - "status" - ] - }, - "ActionExecutionResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ActionExecutionResult" - } - } - }, - "additionalProperties": false - }, - "ActionMessage": { - "type": "object", - "properties": { - "message": { - "type": "string" - }, - "timestamp": { - "type": "string", - "format": "date-time" - } - }, - "additionalProperties": false, - "required": [ - "timestamp", - "message" - ] - }, - "ActionResult": { - "type": "object", - "properties": { - "action": { - "$ref": "#/definitions/Action" - }, - "completed": { - "type": "string", - "format": "date-time" - }, - "enqueued": { - "type": "string", - "format": "date-time" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "log": { - "type": "array", - "items": { - "$ref": "#/definitions/ActionMessage" - } - }, - "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": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "StringsWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id" - ] - }, - "StringsWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringsWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - } - } - } - }, - { - "Name": "MachineManager", - "Description": "MachineManagerAPI provides access to the MachineManager API facade.", - "Version": 10, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "AddMachines": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/AddMachines" - }, - "Result": { - "$ref": "#/definitions/AddMachinesResults" - } - }, - "description": "AddMachines adds new machines with the supplied parameters.\nThe args will contain Base info." - }, - "DestroyMachineWithParams": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/DestroyMachinesParams" - }, - "Result": { - "$ref": "#/definitions/DestroyMachineResults" - } - }, - "description": "DestroyMachineWithParams removes a set of machines from the model." - }, - "GetUpgradeSeriesMessages": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/UpgradeSeriesNotificationParams" - }, - "Result": { - "$ref": "#/definitions/StringsResults" - } - }, - "description": "GetUpgradeSeriesMessages returns all new messages associated with upgrade\nseries events. Messages that have already been retrieved once are not\nreturned by this method." - }, - "InstanceTypes": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ModelInstanceTypesConstraints" - }, - "Result": { - "$ref": "#/definitions/InstanceTypesResults" - } - }, - "description": "InstanceTypes returns instance type information for the cloud and region\nin which the current model is deployed." - }, - "ProvisioningScript": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ProvisioningScriptParams" - }, - "Result": { - "$ref": "#/definitions/ProvisioningScriptResult" - } - }, - "description": "ProvisioningScript returns a shell script that, when run,\nprovisions a machine agent on the machine executing the script." - }, - "RetryProvisioning": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RetryProvisioningArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "RetryProvisioning marks a provisioning error as transient on the machines." - }, - "UpgradeSeriesComplete": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/UpdateChannelArg" - }, - "Result": { - "$ref": "#/definitions/ErrorResult" - } - }, - "description": "UpgradeSeriesComplete marks a machine as having completed a managed series\nupgrade." - }, - "UpgradeSeriesPrepare": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/UpdateChannelArg" - }, - "Result": { - "$ref": "#/definitions/ErrorResult" - } - }, - "description": "UpgradeSeriesPrepare prepares a machine for a OS series upgrade." - }, - "UpgradeSeriesValidate": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/UpdateChannelArgs" - }, - "Result": { - "$ref": "#/definitions/UpgradeSeriesUnitsResults" - } - }, - "description": "UpgradeSeriesValidate validates that the incoming arguments correspond to a\nvalid series upgrade for the target machine.\nIf they do, a list of the machine's current units is returned for use in\nsoliciting user confirmation of the command." - }, - "WatchUpgradeSeriesNotifications": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "WatchUpgradeSeriesNotifications returns a watcher that fires on upgrade\nseries events." - } - }, - "definitions": { - "AddMachineParams": { - "type": "object", - "properties": { - "addresses": { - "type": "array", - "items": { - "$ref": "#/definitions/Address" - } - }, - "base": { - "$ref": "#/definitions/Base" - }, - "constraints": { - "$ref": "#/definitions/Value" - }, - "container-type": { - "type": "string" - }, - "disks": { - "type": "array", - "items": { - "$ref": "#/definitions/Constraints" - } - }, - "hardware-characteristics": { - "$ref": "#/definitions/HardwareCharacteristics" - }, - "instance-id": { - "type": "string" - }, - "jobs": { - "type": "array", - "items": { - "type": "string" - } - }, - "nonce": { - "type": "string" - }, - "parent-id": { - "type": "string" - }, - "placement": { - "$ref": "#/definitions/Placement" - } - }, - "additionalProperties": false, - "required": [ - "constraints", - "jobs", - "parent-id", - "container-type", - "instance-id", - "nonce", - "hardware-characteristics", - "addresses" - ] - }, - "AddMachines": { - "type": "object", - "properties": { - "params": { - "type": "array", - "items": { - "$ref": "#/definitions/AddMachineParams" - } - } - }, - "additionalProperties": false, - "required": [ - "params" - ] - }, - "AddMachinesResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "machine": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "machine" - ] - }, - "AddMachinesResults": { - "type": "object", - "properties": { - "machines": { - "type": "array", - "items": { - "$ref": "#/definitions/AddMachinesResult" - } - } - }, - "additionalProperties": false, - "required": [ - "machines" - ] - }, - "Address": { - "type": "object", - "properties": { - "cidr": { - "type": "string" - }, - "config-type": { - "type": "string" - }, - "is-secondary": { - "type": "boolean" - }, - "scope": { - "type": "string" - }, - "space-id": { - "type": "string" - }, - "space-name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "value", - "type", - "scope" - ] - }, - "Base": { - "type": "object", - "properties": { - "channel": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "channel" - ] - }, - "Constraints": { - "type": "object", - "properties": { - "Count": { - "type": "integer" - }, - "Pool": { - "type": "string" - }, - "Size": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "Pool", - "Size", - "Count" - ] - }, - "DestroyMachineInfo": { - "type": "object", - "properties": { - "destroyed-containers": { - "type": "array", - "items": { - "$ref": "#/definitions/DestroyMachineResult" - } - }, - "destroyed-storage": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } - }, - "destroyed-units": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } - }, - "detached-storage": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } - }, - "machine-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "machine-id" - ] - }, - "DestroyMachineResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "info": { - "$ref": "#/definitions/DestroyMachineInfo" - } - }, - "additionalProperties": false - }, - "DestroyMachineResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/DestroyMachineResult" - } - } - }, - "additionalProperties": false - }, - "DestroyMachinesParams": { - "type": "object", - "properties": { - "dry-run": { - "type": "boolean" - }, - "force": { - "type": "boolean" - }, - "keep": { - "type": "boolean" - }, - "machine-tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "max-wait": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "machine-tags" - ] - }, - "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": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "HardwareCharacteristics": { - "type": "object", - "properties": { - "arch": { - "type": "string" - }, - "availability-zone": { - "type": "string" - }, - "cpu-cores": { - "type": "integer" - }, - "cpu-power": { - "type": "integer" - }, - "mem": { - "type": "integer" - }, - "root-disk": { - "type": "integer" - }, - "root-disk-source": { - "type": "string" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "virt-type": { - "type": "string" - } - }, - "additionalProperties": false - }, - "InstanceType": { - "type": "object", - "properties": { - "arches": { - "type": "array", - "items": { - "type": "string" - } - }, - "cost": { - "type": "integer" - }, - "cpu-cores": { - "type": "integer" - }, - "deprecated": { - "type": "boolean" - }, - "memory": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "root-disk": { - "type": "integer" - }, - "virt-type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "arches", - "cpu-cores", - "memory" - ] - }, - "InstanceTypesResult": { - "type": "object", - "properties": { - "cost-currency": { - "type": "string" - }, - "cost-divisor": { - "type": "integer" - }, - "cost-unit": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "instance-types": { - "type": "array", - "items": { - "$ref": "#/definitions/InstanceType" - } - } - }, - "additionalProperties": false - }, - "InstanceTypesResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/InstanceTypesResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ModelInstanceTypesConstraint": { - "type": "object", - "properties": { - "value": { - "$ref": "#/definitions/Value" - } - }, - "additionalProperties": false - }, - "ModelInstanceTypesConstraints": { - "type": "object", - "properties": { - "constraints": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelInstanceTypesConstraint" - } - } - }, - "additionalProperties": false, - "required": [ - "constraints" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "NotifyWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "Placement": { - "type": "object", - "properties": { - "directive": { - "type": "string" - }, - "scope": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "scope", - "directive" - ] - }, - "ProvisioningScriptParams": { - "type": "object", - "properties": { - "data-dir": { - "type": "string" - }, - "disable-package-commands": { - "type": "boolean" - }, - "machine-id": { - "type": "string" - }, - "nonce": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "machine-id", - "nonce", - "data-dir", - "disable-package-commands" - ] - }, - "ProvisioningScriptResult": { - "type": "object", - "properties": { - "script": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "script" - ] - }, - "RetryProvisioningArgs": { - "type": "object", - "properties": { - "all": { - "type": "boolean" - }, - "machines": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "all" - ] - }, - "StringsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "StringsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringsResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "UpdateChannelArg": { - "type": "object", - "properties": { - "channel": { - "type": "string" - }, - "force": { - "type": "boolean" - }, - "tag": { - "$ref": "#/definitions/Entity" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "force", - "channel" - ] - }, - "UpdateChannelArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/UpdateChannelArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "UpgradeSeriesNotificationParam": { - "type": "object", - "properties": { - "entity": { - "$ref": "#/definitions/Entity" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "entity", - "watcher-id" - ] - }, - "UpgradeSeriesNotificationParams": { - "type": "object", - "properties": { - "params": { - "type": "array", - "items": { - "$ref": "#/definitions/UpgradeSeriesNotificationParam" - } - } - }, - "additionalProperties": false, - "required": [ - "params" - ] - }, - "UpgradeSeriesUnitsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "unit-names": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "unit-names" - ] - }, - "UpgradeSeriesUnitsResults": { - "type": "object", - "properties": { - "Results": { - "type": "array", - "items": { - "$ref": "#/definitions/UpgradeSeriesUnitsResult" - } - } - }, - "additionalProperties": false, - "required": [ - "Results" - ] - }, - "Value": { - "type": "object", - "properties": { - "allocate-public-ip": { - "type": "boolean" - }, - "arch": { - "type": "string" - }, - "container": { - "type": "string" - }, - "cores": { - "type": "integer" - }, - "cpu-power": { - "type": "integer" - }, - "instance-role": { - "type": "string" - }, - "instance-type": { - "type": "string" - }, - "mem": { - "type": "integer" - }, - "root-disk": { - "type": "integer" - }, - "root-disk-source": { - "type": "string" - }, - "spaces": { - "type": "array", - "items": { - "type": "string" - } - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "virt-type": { - "type": "string" - }, - "zones": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - } - } - } - }, - { - "Name": "MachineUndertaker", - "Description": "API implements the API facade used by the machine undertaker.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent" - ], - "Schema": { - "type": "object", - "properties": { - "AllMachineRemovals": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/EntitiesResults" - } - }, - "description": "AllMachineRemovals returns tags for all of the machines that have\nbeen marked for removal in the requested model." - }, - "CompleteMachineRemovals": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - } - }, - "description": "CompleteMachineRemovals removes the specified machines from the\nmodel database. It should only be called once any provider-level\ncleanup has been done for those machines." - }, - "GetMachineProviderInterfaceInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ProviderInterfaceInfoResults" - } - }, - "description": "GetMachineProviderInterfaceInfo returns the provider details for\nall network interfaces attached to the machines requested." - }, - "WatchMachineRemovals": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "WatchMachineRemovals returns a watcher that will signal each time a\nmachine is marked for removal." - } - }, - "definitions": { - "Entities": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } - } - }, - "additionalProperties": false, - "required": [ - "entities" - ] - }, - "EntitiesResult": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "entities" - ] - }, - "EntitiesResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/EntitiesResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "Entity": { - "type": "object", - "properties": { - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "NotifyWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ProviderInterfaceInfo": { - "type": "object", - "properties": { - "interface-name": { - "type": "string" - }, - "mac-address": { - "type": "string" - }, - "provider-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "interface-name", - "mac-address", - "provider-id" - ] - }, - "ProviderInterfaceInfoResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "interfaces": { - "type": "array", - "items": { - "$ref": "#/definitions/ProviderInterfaceInfo" - } - }, - "machine-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "machine-tag", - "interfaces" - ] - }, - "ProviderInterfaceInfoResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ProviderInterfaceInfoResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - } - } - } - }, - { - "Name": "Machiner", - "Description": "MachinerAPI implements the API used by the machiner worker.", - "Version": 5, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "APIAddresses": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsResult" - } - }, - "description": "APIAddresses returns the list of addresses used to connect to the API." - }, - "APIHostPorts": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/APIHostPortsResult" - } - }, - "description": "APIHostPorts returns the API server addresses." - }, - "EnsureDead": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "EnsureDead calls EnsureDead on each given entity from state. It\nwill fail if the entity is not present. If it's Alive, nothing will\nhappen (see state/EnsureDead() for units or machines)." - }, - "Jobs": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/JobsResults" - } - }, - "description": "Jobs returns the jobs assigned to the given entities." - }, - "Life": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/LifeResults" - } - }, - "description": "Life returns the life status of every supplied entity, where available." - }, - "RecordAgentStartInformation": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RecordAgentStartInformationArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "RecordAgentStartInformation syncs the machine model with information\nreported by a machine agent when it starts." - }, - "RecordAgentStartTime": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "RecordAgentStartTime updates the agent start time field in the machine doc." - }, - "SetMachineAddresses": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetMachinesAddresses" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - } - }, - "SetObservedNetworkConfig": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetMachineNetworkConfig" - } - }, - "description": "SetObservedNetworkConfig reads the network config for the machine\nidentified by the input args.\nThis config is merged with the new network config supplied in the\nsame args and updated if it has changed." - }, - "SetStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetStatus" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetStatus sets the status of each given entity." - }, - "Watch": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "Watch starts an NotifyWatcher for each given entity." - }, - "WatchAPIHostPorts": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResult" - } - }, - "description": "WatchAPIHostPorts watches the API server addresses." - } - }, - "definitions": { - "APIHostPortsResult": { - "type": "object", - "properties": { - "servers": { - "type": "array", - "items": { - "type": "array", - "items": { - "$ref": "#/definitions/HostPort" - } - } - } - }, - "additionalProperties": false, - "required": [ - "servers" - ] - }, - "Address": { - "type": "object", - "properties": { - "cidr": { - "type": "string" - }, - "config-type": { - "type": "string" - }, - "is-secondary": { - "type": "boolean" - }, - "scope": { - "type": "string" - }, - "space-id": { - "type": "string" - }, - "space-name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "value", - "type", - "scope" - ] - }, - "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" - ] - }, - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "HostPort": { - "type": "object", - "properties": { - "Address": { - "$ref": "#/definitions/Address" - }, - "cidr": { - "type": "string" - }, - "config-type": { - "type": "string" - }, - "is-secondary": { - "type": "boolean" - }, - "port": { - "type": "integer" - }, - "scope": { - "type": "string" - }, - "space-id": { - "type": "string" - }, - "space-name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "value", - "type", - "scope", - "Address", - "port" - ] - }, - "JobsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "jobs": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "jobs" - ] - }, - "JobsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/JobsResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "LifeResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "life": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "life" - ] - }, - "LifeResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/LifeResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "MachineAddresses": { - "type": "object", - "properties": { - "addresses": { - "type": "array", - "items": { - "$ref": "#/definitions/Address" - } - }, - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "addresses" - ] - }, - "NetworkConfig": { - "type": "object", - "properties": { - "address": { - "type": "string" - }, - "addresses": { - "type": "array", - "items": { - "$ref": "#/definitions/Address" - } - }, - "cidr": { - "type": "string" - }, - "config-type": { - "type": "string" - }, - "device-index": { - "type": "integer" - }, - "disabled": { - "type": "boolean" - }, - "dns-search-domains": { - "type": "array", - "items": { - "type": "string" - } - }, - "dns-servers": { - "type": "array", - "items": { - "type": "string" - } - }, - "gateway-address": { - "type": "string" - }, - "interface-name": { - "type": "string" - }, - "interface-type": { - "type": "string" - }, - "is-default-gateway": { - "type": "boolean" - }, - "mac-address": { - "type": "string" - }, - "mtu": { - "type": "integer" - }, - "no-auto-start": { - "type": "boolean" - }, - "origin": { - "type": "string" - }, - "parent-interface-name": { - "type": "string" - }, - "provider-address-id": { - "type": "string" - }, - "provider-id": { - "type": "string" - }, - "provider-network-id": { - "type": "string" - }, - "provider-space-id": { - "type": "string" - }, - "provider-subnet-id": { - "type": "string" - }, - "provider-vlan-id": { - "type": "string" - }, - "routes": { - "type": "array", - "items": { - "$ref": "#/definitions/NetworkRoute" - } - }, - "shadow-addresses": { - "type": "array", - "items": { - "$ref": "#/definitions/Address" - } - }, - "virtual-port-type": { - "type": "string" - }, - "vlan-tag": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "device-index", - "mac-address", - "cidr", - "mtu", - "provider-id", - "provider-network-id", - "provider-subnet-id", - "provider-space-id", - "provider-address-id", - "provider-vlan-id", - "vlan-tag", - "interface-name", - "parent-interface-name", - "interface-type", - "disabled" - ] - }, - "NetworkRoute": { - "type": "object", - "properties": { - "destination-cidr": { - "type": "string" - }, - "gateway-ip": { - "type": "string" - }, - "metric": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "destination-cidr", - "gateway-ip", - "metric" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "NotifyWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "RecordAgentStartInformationArg": { - "type": "object", - "properties": { - "hostname": { - "type": "string" - }, - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag" - ] - }, - "RecordAgentStartInformationArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/RecordAgentStartInformationArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "SetMachineNetworkConfig": { - "type": "object", - "properties": { - "config": { - "type": "array", - "items": { - "$ref": "#/definitions/NetworkConfig" - } - }, - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "config" - ] - }, - "SetMachinesAddresses": { - "type": "object", - "properties": { - "machine-addresses": { - "type": "array", - "items": { - "$ref": "#/definitions/MachineAddresses" - } - } - }, - "additionalProperties": false, - "required": [ - "machine-addresses" - ] - }, - "SetStatus": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityStatusArgs" - } - } - }, - "additionalProperties": false, - "required": [ - "entities" - ] - }, - "StringsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - } - } - } - }, - { - "Name": "MeterStatus", - "Description": "MeterStatusAPI implements the MeterStatus interface and is the concrete\nimplementation of the API endpoint. Additionally, it embeds\ncommon.UnitStateAPI to allow meter status workers to access their\ncontroller-backed internal state.", - "Version": 2, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "GetMeterStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/MeterStatusResults" - } - }, - "description": "GetMeterStatus returns meter status information for each unit." - }, - "SetState": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetUnitStateArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetState sets the state persisted by the charm running in this unit\nand the state internal to the uniter for this unit." - }, - "State": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/UnitStateResults" - } - }, - "description": "State returns the state persisted by the charm running in this unit\nand the state internal to the uniter for this unit." - }, - "WatchMeterStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "WatchMeterStatus returns a NotifyWatcher for observing changes\nto each unit's meter status." - } - }, - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "MeterStatusResult": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "info": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "code", - "info" - ] - }, - "MeterStatusResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/MeterStatusResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "NotifyWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "SetUnitStateArg": { - "type": "object", - "properties": { - "charm-state": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "meter-status-state": { - "type": "string" - }, - "relation-state": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "secret-state": { - "type": "string" - }, - "storage-state": { - "type": "string" - }, - "tag": { - "type": "string" - }, - "uniter-state": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag" - ] - }, - "SetUnitStateArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/SetUnitStateArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "UnitStateResult": { - "type": "object", - "properties": { - "charm-state": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "meter-status-state": { - "type": "string" - }, - "relation-state": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "secret-state": { - "type": "string" - }, - "storage-state": { - "type": "string" - }, - "uniter-state": { - "type": "string" - } - }, - "additionalProperties": false - }, - "UnitStateResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/UnitStateResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - } - } - } - }, - { - "Name": "MetricsAdder", - "Description": "MetricsAdderAPI implements the metrics adder interface and is the concrete\nimplementation of the API end point.", - "Version": 2, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent" - ], - "Schema": { - "type": "object", - "properties": { - "AddMetricBatches": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/MetricBatchParams" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "AddMetricBatches implements the MetricsAdder interface." - } - }, - "definitions": { - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "Metric": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "labels": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "time": { - "type": "string", - "format": "date-time" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "key", - "value", - "time" - ] - }, - "MetricBatch": { - "type": "object", - "properties": { - "charm-url": { - "type": "string" - }, - "created": { - "type": "string", - "format": "date-time" - }, - "metrics": { - "type": "array", - "items": { - "$ref": "#/definitions/Metric" - } - }, - "uuid": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "uuid", - "charm-url", - "created", - "metrics" - ] - }, - "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" - ] - } - } - } - }, - { - "Name": "MetricsDebug", - "Description": "MetricsDebugAPI implements the metricsdebug interface and is the concrete\nimplementation of the api end point.", - "Version": 2, - "AvailableTo": [ - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "GetMetrics": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/MetricResults" - } - }, - "description": "GetMetrics returns all metrics stored by the state server." - }, - "SetMeterStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/MeterStatusParams" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetMeterStatus sets meter statuses for entities." - } - }, - "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" - ] - }, - "EntityMetrics": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "metrics": { - "type": "array", - "items": { - "$ref": "#/definitions/MetricResult" - } - } - }, - "additionalProperties": false - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "MeterStatusParam": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "string" - }, - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "code" - ] - }, - "MeterStatusParams": { - "type": "object", - "properties": { - "statues": { - "type": "array", - "items": { - "$ref": "#/definitions/MeterStatusParam" - } - } - }, - "additionalProperties": false, - "required": [ - "statues" - ] - }, - "MetricResult": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "labels": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "time": { - "type": "string", - "format": "date-time" - }, - "unit": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "time", - "key", - "value", - "unit", - "labels" - ] - }, - "MetricResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityMetrics" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - } - } - } - }, - { - "Name": "MetricsManager", - "Description": "MetricsManagerAPI implements the metrics manager interface and is the concrete\nimplementation of the api end point.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent" - ], - "Schema": { - "type": "object", - "properties": { - "AddJujuMachineMetrics": { - "type": "object", - "description": "AddJujuMachineMetrics adds a metric that counts the number of\nnon-container machines in the current model." - }, - "CleanupOldMetrics": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "CleanupOldMetrics removes old metrics from the collection.\nThe single arg params is expected to contain and model uuid.\nEven though the call will delete all metrics across models\nit serves to validate that the connection has access to at least one model." - }, - "SendMetrics": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SendMetrics will send any unsent metrics onto the metric collection service." - } - }, - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - } - } - } - }, - { - "Name": "MigrationFlag", - "Description": "Facade lets clients watch and get models' migration phases.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "Phase": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/PhaseResults" - } - }, - "description": "Phase returns the current migration phase or an error for every\nsupplied entity." - }, - "Watch": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "Watch returns an id for use with the NotifyWatcher facade, or an\nerror, for every supplied entity." - } - }, - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "NotifyWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "PhaseResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "phase": { - "type": "string" - } - }, - "additionalProperties": false - }, - "PhaseResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/PhaseResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - } - } - } - }, - { - "Name": "MigrationMaster", - "Description": "API implements the API required for the model migration\nmaster worker.", - "Version": 3, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "Export": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/SerializedModel" - } - }, - "description": "Export serializes the model associated with the API connection." - }, - "MigrationStatus": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/MasterMigrationStatus" - } - }, - "description": "MigrationStatus returns the details and progress of the latest\nmodel migration." - }, - "MinionReportTimeout": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringResult" - } - }, - "description": "MinionReportTimeout returns the configuration value for this controller that\nindicates how long the migration master worker should wait for minions to\nreported on phases of a migration." - }, - "MinionReports": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/MinionReports" - } - }, - "description": "MinionReports returns details of the reports made by migration\nminions to the controller for the current migration phase." - }, - "ModelInfo": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/MigrationModelInfo" - } - }, - "description": "ModelInfo returns essential information about the model to be\nmigrated." - }, - "Prechecks": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/PrechecksArgs" - } - }, - "description": "Prechecks performs pre-migration checks on the model and\n(source) controller." - }, - "ProcessRelations": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ProcessRelations" - } - }, - "description": "ProcessRelations processes any relations that need updating after an export.\nThis should help fix any remoteApplications that have been migrated." - }, - "Reap": { - "type": "object", - "description": "Reap removes all documents for the model associated with the API\nconnection." - }, - "SetPhase": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetMigrationPhaseArgs" - } - }, - "description": "SetPhase sets the phase of the active model migration. The provided\nphase must be a valid phase value, for example QUIESCE\" or\n\"ABORT\". See the core/migration package for the complete list." - }, - "SetStatusMessage": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetMigrationStatusMessageArgs" - } - }, - "description": "SetStatusMessage sets a human readable status message containing\ninformation about the migration's progress. This will be shown in\nstatus output shown to the end user." - }, - "Watch": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResult" - } - }, - "description": "Watch starts watching for an active migration for the model\nassociated with the API connection. The returned id should be used\nwith the NotifyWatcher facade to receive events." - }, - "WatchMinionReports": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResult" - } - }, - "description": "WatchMinionReports sets up a watcher which reports when a report\nfor a migration minion has arrived." - } - }, - "definitions": { - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "MasterMigrationStatus": { - "type": "object", - "properties": { - "migration-id": { - "type": "string" - }, - "phase": { - "type": "string" - }, - "phase-changed-time": { - "type": "string", - "format": "date-time" - }, - "spec": { - "$ref": "#/definitions/MigrationSpec" - } - }, - "additionalProperties": false, - "required": [ - "spec", - "migration-id", - "phase", - "phase-changed-time" - ] - }, - "MigrationModelInfo": { - "type": "object", - "properties": { - "agent-version": { - "$ref": "#/definitions/Number" - }, - "controller-agent-version": { - "$ref": "#/definitions/Number" - }, - "name": { - "type": "string" - }, - "owner-tag": { - "type": "string" - }, - "uuid": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "uuid", - "name", - "owner-tag", - "agent-version", - "controller-agent-version" - ] - }, - "MigrationSpec": { - "type": "object", - "properties": { - "model-tag": { - "type": "string" - }, - "target-info": { - "$ref": "#/definitions/MigrationTargetInfo" - } - }, - "additionalProperties": false, - "required": [ - "model-tag", - "target-info" - ] - }, - "MigrationTargetInfo": { - "type": "object", - "properties": { - "addrs": { - "type": "array", - "items": { - "type": "string" - } - }, - "auth-tag": { - "type": "string" - }, - "ca-cert": { - "type": "string" - }, - "controller-alias": { - "type": "string" - }, - "controller-tag": { - "type": "string" - }, - "macaroons": { - "type": "string" - }, - "password": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "controller-tag", - "addrs", - "ca-cert", - "auth-tag" - ] - }, - "MinionReports": { - "type": "object", - "properties": { - "failed": { - "type": "array", - "items": { - "type": "string" - } - }, - "migration-id": { - "type": "string" - }, - "phase": { - "type": "string" - }, - "success-count": { - "type": "integer" - }, - "unknown-count": { - "type": "integer" - }, - "unknown-sample": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "migration-id", - "phase", - "success-count", - "unknown-count", - "unknown-sample", - "failed" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "Number": { - "type": "object", - "properties": { - "Build": { - "type": "integer" - }, - "Major": { - "type": "integer" - }, - "Minor": { - "type": "integer" - }, - "Patch": { - "type": "integer" - }, - "Tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Major", - "Minor", - "Tag", - "Patch", - "Build" - ] - }, - "PrechecksArgs": { - "type": "object", - "properties": { - "target-controller-version": { - "$ref": "#/definitions/Number" - } - }, - "additionalProperties": false, - "required": [ - "target-controller-version" - ] - }, - "ProcessRelations": { - "type": "object", - "properties": { - "controller-alias": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "controller-alias" - ] - }, - "SerializedModel": { - "type": "object", - "properties": { - "bytes": { - "type": "array", - "items": { - "type": "integer" - } - }, - "charms": { - "type": "array", - "items": { - "type": "string" - } - }, - "resources": { - "type": "array", - "items": { - "$ref": "#/definitions/SerializedModelResource" - } - }, - "tools": { - "type": "array", - "items": { - "$ref": "#/definitions/SerializedModelTools" - } - } - }, - "additionalProperties": false, - "required": [ - "bytes", - "charms", - "tools", - "resources" - ] - }, - "SerializedModelResource": { - "type": "object", - "properties": { - "application": { - "type": "string" - }, - "application-revision": { - "$ref": "#/definitions/SerializedModelResourceRevision" - }, - "charmstore-revision": { - "$ref": "#/definitions/SerializedModelResourceRevision" - }, - "name": { - "type": "string" - }, - "unit-revisions": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/SerializedModelResourceRevision" - } - } - } - }, - "additionalProperties": false, - "required": [ - "application", - "name", - "application-revision", - "charmstore-revision", - "unit-revisions" - ] - }, - "SerializedModelResourceRevision": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "fingerprint": { - "type": "string" - }, - "origin": { - "type": "string" - }, - "path": { - "type": "string" - }, - "revision": { - "type": "integer" - }, - "size": { - "type": "integer" - }, - "timestamp": { - "type": "string", - "format": "date-time" - }, - "type": { - "type": "string" - }, - "username": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "revision", - "type", - "path", - "description", - "origin", - "fingerprint", - "size", - "timestamp" - ] - }, - "SerializedModelTools": { - "type": "object", - "properties": { - "uri": { - "type": "string" - }, - "version": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "version", - "uri" - ] - }, - "SetMigrationPhaseArgs": { - "type": "object", - "properties": { - "phase": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "phase" - ] - }, - "SetMigrationStatusMessageArgs": { - "type": "object", - "properties": { - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message" - ] - }, - "StringResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - } - } - } - }, - { - "Name": "MigrationMinion", - "Description": "API implements the API required for the model migration\nmaster worker.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "Report": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/MinionReport" - } - }, - "description": "Report allows a migration minion to submit whether it succeeded or\nfailed for a specific migration phase." - }, - "Watch": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResult" - } - }, - "description": "Watch starts watching for status updates for a migration attempt\nfor the model. It will report when a migration starts and when its\nstatus changes (including when it finishes). An initial event will\nbe fired if there has ever been a migration attempt for the model.\n\nThe MigrationStatusWatcher facade must be used to receive events\nfrom the watcher." - } - }, - "definitions": { - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "MinionReport": { - "type": "object", - "properties": { - "migration-id": { - "type": "string" - }, - "phase": { - "type": "string" - }, - "success": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "migration-id", - "phase", - "success" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - } - } - } - }, - { - "Name": "MigrationStatusWatcher", - "Description": "", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "Next": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/MigrationStatus" - } - }, - "description": "Next returns when the status for a model migration for the\nassociated model changes. The current details for the active\nmigration are returned." - }, - "Stop": { - "type": "object", - "description": "Stop stops the watcher." - } - }, - "definitions": { - "MigrationStatus": { - "type": "object", - "properties": { - "attempt": { - "type": "integer" - }, - "migration-id": { - "type": "string" - }, - "phase": { - "type": "string" - }, - "source-api-addrs": { - "type": "array", - "items": { - "type": "string" - } - }, - "source-ca-cert": { - "type": "string" - }, - "target-api-addrs": { - "type": "array", - "items": { - "type": "string" - } - }, - "target-ca-cert": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "migration-id", - "attempt", - "phase", - "source-api-addrs", - "source-ca-cert", - "target-api-addrs", - "target-ca-cert" - ] - } - } - } - }, - { - "Name": "MigrationTarget", - "Description": "API implements the API required for the model migration\nmaster worker when communicating with the target controller.", - "Version": 1, - "AvailableTo": [ - "controller-user" - ], - "Schema": { - "type": "object", - "properties": { - "Abort": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ModelArgs" - } - }, - "description": "Abort removes the specified model from the database. It is an error to\nattempt to Abort a model that has a migration mode other than importing." - }, - "Activate": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ModelArgs" - } - }, - "description": "Activate sets the migration mode of the model to \"none\", meaning it\nis ready for use. It is an error to attempt to Abort a model that\nhas a migration mode other than importing." - }, - "AdoptResources": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/AdoptResourcesArgs" - } - }, - "description": "AdoptResources asks the cloud provider to update the controller\ntags for a model's resources. This prevents the resources from\nbeing destroyed if the source controller is destroyed after the\nmodel is migrated away." - }, - "CACert": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/BytesResult" - } - }, - "description": "CACert returns the certificate used to validate the state connection." - }, - "CheckMachines": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ModelArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "CheckMachines compares the machines in state with the ones reported\nby the provider and reports any discrepancies." - }, - "Import": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SerializedModel" - } - }, - "description": "Import takes a serialized Juju model, deserializes it, and\nrecreates it in the receiving controller." - }, - "LatestLogTime": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ModelArgs" - }, - "Result": { - "type": "string", - "format": "date-time" - } - }, - "description": "LatestLogTime returns the time of the most recent log record\nreceived by the logtransfer endpoint. This can be used as the start\npoint for streaming logs from the source if the transfer was\ninterrupted.\n\nFor performance reasons, not every time is tracked, so if the\ntarget controller died during the transfer the latest log time\nmight be up to 2 minutes earlier. If the transfer was interrupted\nin some other way (like the source controller going away or a\nnetwork partition) the time will be up-to-date.\n\nLog messages are assumed to be sent in time order (which is how\ndebug-log emits them). If that isn't the case then this mechanism\ncan't be used to avoid duplicates when logtransfer is restarted.\n\nReturns the zero time if no logs have been transferred." - }, - "Prechecks": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/MigrationModelInfo" - } - }, - "description": "Prechecks ensure that the target controller is ready to accept a\nmodel migration." - } - }, - "definitions": { - "AdoptResourcesArgs": { - "type": "object", - "properties": { - "model-tag": { - "type": "string" - }, - "source-controller-version": { - "$ref": "#/definitions/Number" - } - }, - "additionalProperties": false, - "required": [ - "model-tag", - "source-controller-version" - ] - }, - "BytesResult": { - "type": "object", - "properties": { - "result": { - "type": "array", - "items": { - "type": "integer" - } - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "MigrationModelInfo": { - "type": "object", - "properties": { - "agent-version": { - "$ref": "#/definitions/Number" - }, - "controller-agent-version": { - "$ref": "#/definitions/Number" - }, - "name": { - "type": "string" - }, - "owner-tag": { - "type": "string" - }, - "uuid": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "uuid", - "name", - "owner-tag", - "agent-version", - "controller-agent-version" - ] - }, - "ModelArgs": { - "type": "object", - "properties": { - "model-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "model-tag" - ] - }, - "Number": { - "type": "object", - "properties": { - "Build": { - "type": "integer" - }, - "Major": { - "type": "integer" - }, - "Minor": { - "type": "integer" - }, - "Patch": { - "type": "integer" - }, - "Tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Major", - "Minor", - "Tag", - "Patch", - "Build" - ] - }, - "SerializedModel": { - "type": "object", - "properties": { - "bytes": { - "type": "array", - "items": { - "type": "integer" - } - }, - "charms": { - "type": "array", - "items": { - "type": "string" - } - }, - "resources": { - "type": "array", - "items": { - "$ref": "#/definitions/SerializedModelResource" - } - }, - "tools": { - "type": "array", - "items": { - "$ref": "#/definitions/SerializedModelTools" - } - } - }, - "additionalProperties": false, - "required": [ - "bytes", - "charms", - "tools", - "resources" - ] - }, - "SerializedModelResource": { - "type": "object", - "properties": { - "application": { - "type": "string" - }, - "application-revision": { - "$ref": "#/definitions/SerializedModelResourceRevision" - }, - "charmstore-revision": { - "$ref": "#/definitions/SerializedModelResourceRevision" - }, - "name": { - "type": "string" - }, - "unit-revisions": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/SerializedModelResourceRevision" - } - } - } - }, - "additionalProperties": false, - "required": [ - "application", - "name", - "application-revision", - "charmstore-revision", - "unit-revisions" - ] - }, - "SerializedModelResourceRevision": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "fingerprint": { - "type": "string" - }, - "origin": { - "type": "string" - }, - "path": { - "type": "string" - }, - "revision": { - "type": "integer" - }, - "size": { - "type": "integer" - }, - "timestamp": { - "type": "string", - "format": "date-time" - }, - "type": { - "type": "string" - }, - "username": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "revision", - "type", - "path", - "description", - "origin", - "fingerprint", - "size", - "timestamp" - ] - }, - "SerializedModelTools": { - "type": "object", - "properties": { - "uri": { - "type": "string" - }, - "version": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "version", - "uri" - ] - } - } - } - }, - { - "Name": "ModelConfig", - "Description": "ModelConfigAPIV3 is currently the latest.", - "Version": 3, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "controller-user", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "GetModelConstraints": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/GetConstraintsResults" - } - }, - "description": "GetModelConstraints returns the constraints for the model." - }, - "ModelGet": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ModelConfigResults" - } - }, - "description": "ModelGet implements the server-side part of the\nmodel-config CLI command." - }, - "ModelSet": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ModelSet" - } - }, - "description": "ModelSet implements the server-side part of the\nset-model-config CLI command." - }, - "ModelUnset": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ModelUnset" - } - }, - "description": "ModelUnset implements the server-side part of the\nset-model-config CLI command." - }, - "SLALevel": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringResult" - } - }, - "description": "SLALevel returns the current sla level for the model." - }, - "Sequences": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ModelSequencesResult" - } - }, - "description": "Sequences returns the model's sequence names and next values." - }, - "SetModelConstraints": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetConstraints" - } - }, - "description": "SetModelConstraints sets the constraints for the model." - }, - "SetSLALevel": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ModelSLA" - } - }, - "description": "SetSLALevel sets the sla level on the model." - } - }, - "definitions": { - "ConfigValue": { - "type": "object", - "properties": { - "source": { - "type": "string" - }, - "value": { - "type": "object", - "additionalProperties": true - } - }, - "additionalProperties": false, - "required": [ - "value", - "source" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "GetConstraintsResults": { - "type": "object", - "properties": { - "constraints": { - "$ref": "#/definitions/Value" - } - }, - "additionalProperties": false, - "required": [ - "constraints" - ] - }, - "ModelConfigResults": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/ConfigValue" - } - } - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "ModelSLA": { - "type": "object", - "properties": { - "ModelSLAInfo": { - "$ref": "#/definitions/ModelSLAInfo" - }, - "creds": { - "type": "array", - "items": { - "type": "integer" - } - }, - "level": { - "type": "string" - }, - "owner": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "level", - "owner", - "ModelSLAInfo", - "creds" - ] - }, - "ModelSLAInfo": { - "type": "object", - "properties": { - "level": { - "type": "string" - }, - "owner": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "level", - "owner" - ] - }, - "ModelSequencesResult": { - "type": "object", - "properties": { - "sequences": { - "type": "object", - "patternProperties": { - ".*": { - "type": "integer" - } - } - } - }, - "additionalProperties": false, - "required": [ - "sequences" - ] - }, - "ModelSet": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "ModelUnset": { - "type": "object", - "properties": { - "keys": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "keys" - ] - }, - "SetConstraints": { - "type": "object", - "properties": { - "application": { - "type": "string" - }, - "constraints": { - "$ref": "#/definitions/Value" - } - }, - "additionalProperties": false, - "required": [ - "application", - "constraints" - ] - }, - "StringResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "Value": { - "type": "object", - "properties": { - "allocate-public-ip": { - "type": "boolean" - }, - "arch": { - "type": "string" - }, - "container": { - "type": "string" - }, - "cores": { - "type": "integer" - }, - "cpu-power": { - "type": "integer" - }, - "instance-role": { - "type": "string" - }, - "instance-type": { - "type": "string" - }, - "mem": { - "type": "integer" - }, - "root-disk": { - "type": "integer" - }, - "root-disk-source": { - "type": "string" - }, - "spaces": { - "type": "array", - "items": { - "type": "string" - } - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "virt-type": { - "type": "string" - }, - "zones": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - } - } - } - }, - { - "Name": "ModelGeneration", - "Description": "API is the concrete implementation of the API endpoint.", - "Version": 4, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "AbortBranch": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/BranchArg" - }, - "Result": { - "$ref": "#/definitions/ErrorResult" - } - }, - "description": "AbortBranch aborts the input branch, marking it complete. However no\nchanges are made applicable to the whole model. No units may be assigned\nto the branch when aborting." - }, - "AddBranch": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/BranchArg" - }, - "Result": { - "$ref": "#/definitions/ErrorResult" - } - }, - "description": "AddBranch adds a new branch with the input name to the model." - }, - "BranchInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/BranchInfoArgs" - }, - "Result": { - "$ref": "#/definitions/BranchResults" - } - }, - "description": "BranchInfo will return details of branch identified by the input argument,\nincluding units on the branch and the configuration disjoint with the\nmaster generation.\nAn error is returned if no in-flight branch matching in input is found." - }, - "CommitBranch": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/BranchArg" - }, - "Result": { - "$ref": "#/definitions/IntResult" - } - }, - "description": "CommitBranch commits the input branch, making its changes applicable to\nthe whole model and marking it complete." - }, - "HasActiveBranch": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/BranchArg" - }, - "Result": { - "$ref": "#/definitions/BoolResult" - } - }, - "description": "HasActiveBranch returns a true result if the input model has an \"in-flight\"\nbranch matching the input name." - }, - "ListCommits": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/BranchResults" - } - }, - "description": "ListCommits will return the commits, hence only branches with generation_id higher than 0" - }, - "ShowCommit": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/GenerationId" - }, - "Result": { - "$ref": "#/definitions/GenerationResult" - } - }, - "description": "ShowCommit will return details a commit given by its generationId\nAn error is returned if either no branch can be found corresponding to the generation id.\nOr the generation id given is below 1." - }, - "TrackBranch": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/BranchTrackArg" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "TrackBranch marks the input units and/or applications as tracking the input\nbranch, causing them to realise changes made under that branch." - } - }, - "definitions": { - "BoolResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "BranchArg": { - "type": "object", - "properties": { - "branch": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "branch" - ] - }, - "BranchInfoArgs": { - "type": "object", - "properties": { - "branches": { - "type": "array", - "items": { - "type": "string" - } - }, - "detailed": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "branches", - "detailed" - ] - }, - "BranchResults": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "generations": { - "type": "array", - "items": { - "$ref": "#/definitions/Generation" - } - } - }, - "additionalProperties": false, - "required": [ - "generations" - ] - }, - "BranchTrackArg": { - "type": "object", - "properties": { - "branch": { - "type": "string" - }, - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } - }, - "num-units": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "branch", - "entities" - ] - }, - "Entity": { - "type": "object", - "properties": { - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "Generation": { - "type": "object", - "properties": { - "applications": { - "type": "array", - "items": { - "$ref": "#/definitions/GenerationApplication" - } - }, - "branch": { - "type": "string" - }, - "completed": { - "type": "integer" - }, - "completed-by": { - "type": "string" - }, - "created": { - "type": "integer" - }, - "created-by": { - "type": "string" - }, - "generation-id": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "branch", - "created", - "created-by", - "applications" - ] - }, - "GenerationApplication": { - "type": "object", - "properties": { - "application": { - "type": "string" - }, - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "pending": { - "type": "array", - "items": { - "type": "string" - } - }, - "progress": { - "type": "string" - }, - "tracking": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "application", - "progress", - "config" - ] - }, - "GenerationId": { - "type": "object", - "properties": { - "generation-id": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "generation-id" - ] - }, - "GenerationResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "generation": { - "$ref": "#/definitions/Generation" - } - }, - "additionalProperties": false, - "required": [ - "generation" - ] - }, - "IntResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - } - } - } - }, - { - "Name": "ModelManager", - "Description": "ModelManagerAPI implements the model manager interface and is\nthe concrete implementation of the api end point.", - "Version": 9, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "controller-user" - ], - "Schema": { - "type": "object", - "properties": { - "ChangeModelCredential": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ChangeModelCredentialsParams" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "ChangeModelCredential changes cloud credential reference for models.\nThese new cloud credentials must already exist on the controller." - }, - "CreateModel": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ModelCreateArgs" - }, - "Result": { - "$ref": "#/definitions/ModelInfo" - } - }, - "description": "CreateModel creates a new model using the account and\nmodel config specified in the args." - }, - "DestroyModels": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/DestroyModelsParams" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "DestroyModels will try to destroy the specified models.\nIf there is a block on destruction, this method will return an error.\nFrom ModelManager v7 onwards, DestroyModels gains 'force' and 'max-wait' parameters." - }, - "DumpModels": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/DumpModelRequest" - }, - "Result": { - "$ref": "#/definitions/StringResults" - } - }, - "description": "DumpModels will export the models into the database agnostic\nrepresentation. The user needs to either be a controller admin, or have\nadmin privileges on the model itself." - }, - "DumpModelsDB": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/MapResults" - } - }, - "description": "DumpModelsDB will gather all documents from all model collections\nfor the specified model. The map result contains a map of collection\nnames to lists of documents represented as maps." - }, - "ListModelSummaries": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ModelSummariesRequest" - }, - "Result": { - "$ref": "#/definitions/ModelSummaryResults" - } - }, - "description": "ListModelSummaries returns models that the specified user\nhas access to in the current server. Controller admins (superuser)\ncan list models for any user. Other users\ncan only ask about their own models." - }, - "ListModels": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entity" - }, - "Result": { - "$ref": "#/definitions/UserModelList" - } - }, - "description": "ListModels returns the models that the specified user\nhas access to in the current server. Controller admins (superuser)\ncan list models for any user. Other users\ncan only ask about their own models." - }, - "ModelDefaultsForClouds": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ModelDefaultsResults" - } - }, - "description": "ModelDefaultsForClouds returns the default config values for the specified\nclouds." - }, - "ModelInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ModelInfoResults" - } - }, - "description": "ModelInfo returns information about the specified models." - }, - "ModelStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ModelStatusResults" - } - }, - "description": "ModelStatus returns a summary of the model." - }, - "ModifyModelAccess": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ModifyModelAccessRequest" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "ModifyModelAccess changes the model access granted to users." - }, - "SetModelDefaults": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetModelDefaults" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetModelDefaults writes new values for the specified default model settings." - }, - "UnsetModelDefaults": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/UnsetModelDefaults" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "UnsetModelDefaults removes the specified default model settings." - } - }, - "definitions": { - "ChangeModelCredentialParams": { - "type": "object", - "properties": { - "credential-tag": { - "type": "string" - }, - "model-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "model-tag", - "credential-tag" - ] - }, - "ChangeModelCredentialsParams": { - "type": "object", - "properties": { - "model-credentials": { - "type": "array", - "items": { - "$ref": "#/definitions/ChangeModelCredentialParams" - } - } - }, - "additionalProperties": false, - "required": [ - "model-credentials" - ] - }, - "DestroyModelParams": { - "type": "object", - "properties": { - "destroy-storage": { - "type": "boolean" - }, - "force": { - "type": "boolean" - }, - "max-wait": { - "type": "integer" - }, - "model-tag": { - "type": "string" - }, - "timeout": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "model-tag" - ] - }, - "DestroyModelsParams": { - "type": "object", - "properties": { - "models": { - "type": "array", - "items": { - "$ref": "#/definitions/DestroyModelParams" - } - } - }, - "additionalProperties": false, - "required": [ - "models" - ] - }, - "DumpModelRequest": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } - }, - "simplified": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "entities", - "simplified" - ] - }, - "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" - ] - }, - "EntityStatus": { - "type": "object", - "properties": { - "data": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "info": { - "type": "string" - }, - "since": { - "type": "string", - "format": "date-time" - }, - "status": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "status", - "info", - "since" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "MachineHardware": { - "type": "object", - "properties": { - "arch": { - "type": "string" - }, - "availability-zone": { - "type": "string" - }, - "cores": { - "type": "integer" - }, - "cpu-power": { - "type": "integer" - }, - "mem": { - "type": "integer" - }, - "root-disk": { - "type": "integer" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "virt-type": { - "type": "string" - } - }, - "additionalProperties": false - }, - "MapResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "MapResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/MapResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "Model": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "owner-tag": { - "type": "string" - }, - "type": { - "type": "string" - }, - "uuid": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "uuid", - "type", - "owner-tag" - ] - }, - "ModelApplicationInfo": { - "type": "object", - "properties": { - "name": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name" - ] - }, - "ModelCreateArgs": { - "type": "object", - "properties": { - "cloud-tag": { - "type": "string" - }, - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "credential": { - "type": "string" - }, - "name": { - "type": "string" - }, - "owner-tag": { - "type": "string" - }, - "region": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "owner-tag" - ] - }, - "ModelDefaultValues": { - "type": "object", - "properties": { - "cloud-region": { - "type": "string" - }, - "cloud-tag": { - "type": "string" - }, - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "ModelDefaults": { - "type": "object", - "properties": { - "controller": { - "type": "object", - "additionalProperties": true - }, - "default": { - "type": "object", - "additionalProperties": true - }, - "regions": { - "type": "array", - "items": { - "$ref": "#/definitions/RegionDefaults" - } - } - }, - "additionalProperties": false - }, - "ModelDefaultsResult": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/ModelDefaults" - } - } - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "ModelDefaultsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelDefaultsResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ModelEntityCount": { - "type": "object", - "properties": { - "count": { - "type": "integer" - }, - "entity": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "entity", - "count" - ] - }, - "ModelFilesystemInfo": { - "type": "object", - "properties": { - "detachable": { - "type": "boolean" - }, - "id": { - "type": "string" - }, - "message": { - "type": "string" - }, - "provider-id": { - "type": "string" - }, - "status": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "id" - ] - }, - "ModelInfo": { - "type": "object", - "properties": { - "agent-version": { - "$ref": "#/definitions/Number" - }, - "cloud-credential-tag": { - "type": "string" - }, - "cloud-credential-validity": { - "type": "boolean" - }, - "cloud-region": { - "type": "string" - }, - "cloud-tag": { - "type": "string" - }, - "controller-uuid": { - "type": "string" - }, - "default-base": { - "type": "string" - }, - "default-series": { - "type": "string" - }, - "is-controller": { - "type": "boolean" - }, - "life": { - "type": "string" - }, - "machines": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelMachineInfo" - } - }, - "migration": { - "$ref": "#/definitions/ModelMigrationStatus" - }, - "name": { - "type": "string" - }, - "owner-tag": { - "type": "string" - }, - "provider-type": { - "type": "string" - }, - "secret-backends": { - "type": "array", - "items": { - "$ref": "#/definitions/SecretBackendResult" - } - }, - "sla": { - "$ref": "#/definitions/ModelSLAInfo" - }, - "status": { - "$ref": "#/definitions/EntityStatus" - }, - "supported-features": { - "type": "array", - "items": { - "$ref": "#/definitions/SupportedFeature" - } - }, - "type": { - "type": "string" - }, - "users": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelUserInfo" - } - }, - "uuid": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "type", - "uuid", - "controller-uuid", - "is-controller", - "cloud-tag", - "owner-tag", - "life", - "users", - "machines", - "secret-backends", - "sla", - "agent-version" - ] - }, - "ModelInfoResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/ModelInfo" - } - }, - "additionalProperties": false - }, - "ModelInfoResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelInfoResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ModelMachineInfo": { - "type": "object", - "properties": { - "display-name": { - "type": "string" - }, - "ha-primary": { - "type": "boolean" - }, - "hardware": { - "$ref": "#/definitions/MachineHardware" - }, - "has-vote": { - "type": "boolean" - }, - "id": { - "type": "string" - }, - "instance-id": { - "type": "string" - }, - "message": { - "type": "string" - }, - "status": { - "type": "string" - }, - "wants-vote": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "id" - ] - }, - "ModelMigrationStatus": { - "type": "object", - "properties": { - "end": { - "type": "string", - "format": "date-time" - }, - "start": { - "type": "string", - "format": "date-time" - }, - "status": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "status", - "start" - ] - }, - "ModelSLAInfo": { - "type": "object", - "properties": { - "level": { - "type": "string" - }, - "owner": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "level", - "owner" - ] - }, - "ModelStatus": { - "type": "object", - "properties": { - "application-count": { - "type": "integer" - }, - "applications": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelApplicationInfo" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "filesystems": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelFilesystemInfo" - } - }, - "hosted-machine-count": { - "type": "integer" - }, - "life": { - "type": "string" - }, - "machines": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelMachineInfo" - } - }, - "model-tag": { - "type": "string" - }, - "owner-tag": { - "type": "string" - }, - "type": { - "type": "string" - }, - "unit-count": { - "type": "integer" - }, - "volumes": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelVolumeInfo" - } - } - }, - "additionalProperties": false, - "required": [ - "model-tag", - "life", - "type", - "hosted-machine-count", - "application-count", - "unit-count", - "owner-tag" - ] - }, - "ModelStatusResults": { - "type": "object", - "properties": { - "models": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelStatus" - } - } - }, - "additionalProperties": false, - "required": [ - "models" - ] - }, - "ModelSummariesRequest": { - "type": "object", - "properties": { - "all": { - "type": "boolean" - }, - "user-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "user-tag" - ] - }, - "ModelSummary": { - "type": "object", - "properties": { - "agent-version": { - "$ref": "#/definitions/Number" - }, - "cloud-credential-tag": { - "type": "string" - }, - "cloud-region": { - "type": "string" - }, - "cloud-tag": { - "type": "string" - }, - "controller-uuid": { - "type": "string" - }, - "counts": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelEntityCount" - } - }, - "default-series": { - "type": "string" - }, - "is-controller": { - "type": "boolean" - }, - "last-connection": { - "type": "string", - "format": "date-time" - }, - "life": { - "type": "string" - }, - "migration": { - "$ref": "#/definitions/ModelMigrationStatus" - }, - "name": { - "type": "string" - }, - "owner-tag": { - "type": "string" - }, - "provider-type": { - "type": "string" - }, - "sla": { - "$ref": "#/definitions/ModelSLAInfo" - }, - "status": { - "$ref": "#/definitions/EntityStatus" - }, - "type": { - "type": "string" - }, - "user-access": { - "type": "string" - }, - "uuid": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "uuid", - "type", - "controller-uuid", - "is-controller", - "cloud-tag", - "owner-tag", - "life", - "user-access", - "last-connection", - "counts", - "sla", - "agent-version" - ] - }, - "ModelSummaryResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/ModelSummary" - } - }, - "additionalProperties": false - }, - "ModelSummaryResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelSummaryResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ModelUnsetKeys": { - "type": "object", - "properties": { - "cloud-region": { - "type": "string" - }, - "cloud-tag": { - "type": "string" - }, - "keys": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "keys" - ] - }, - "ModelUserInfo": { - "type": "object", - "properties": { - "access": { - "type": "string" - }, - "display-name": { - "type": "string" - }, - "last-connection": { - "type": "string", - "format": "date-time" - }, - "model-tag": { - "type": "string" - }, - "user": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "model-tag", - "user", - "display-name", - "last-connection", - "access" - ] - }, - "ModelVolumeInfo": { - "type": "object", - "properties": { - "detachable": { - "type": "boolean" - }, - "id": { - "type": "string" - }, - "message": { - "type": "string" - }, - "provider-id": { - "type": "string" - }, - "status": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "id" - ] - }, - "ModifyModelAccess": { - "type": "object", - "properties": { - "access": { - "type": "string" - }, - "action": { - "type": "string" - }, - "model-tag": { - "type": "string" - }, - "user-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "user-tag", - "action", - "access", - "model-tag" - ] - }, - "ModifyModelAccessRequest": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "$ref": "#/definitions/ModifyModelAccess" - } - } - }, - "additionalProperties": false, - "required": [ - "changes" - ] - }, - "Number": { - "type": "object", - "properties": { - "Build": { - "type": "integer" - }, - "Major": { - "type": "integer" - }, - "Minor": { - "type": "integer" - }, - "Patch": { - "type": "integer" - }, - "Tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Major", - "Minor", - "Tag", - "Patch", - "Build" - ] - }, - "RegionDefaults": { - "type": "object", - "properties": { - "region-name": { - "type": "string" - }, - "value": { - "type": "object", - "additionalProperties": true - } - }, - "additionalProperties": false, - "required": [ - "region-name", - "value" - ] - }, - "SecretBackend": { - "type": "object", - "properties": { - "backend-type": { - "type": "string" - }, - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "name": { - "type": "string" - }, - "token-rotate-interval": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "name", - "backend-type", - "config" - ] - }, - "SecretBackendResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "id": { - "type": "string" - }, - "message": { - "type": "string" - }, - "num-secrets": { - "type": "integer" - }, - "result": { - "$ref": "#/definitions/SecretBackend" - }, - "status": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "result", - "id", - "num-secrets", - "status" - ] - }, - "SetModelDefaults": { - "type": "object", - "properties": { - "config": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelDefaultValues" - } - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "StringResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "StringResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "SupportedFeature": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "name": { - "type": "string" - }, - "version": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "description" - ] - }, - "UnsetModelDefaults": { - "type": "object", - "properties": { - "keys": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelUnsetKeys" - } - } - }, - "additionalProperties": false, - "required": [ - "keys" - ] - }, - "UserModel": { - "type": "object", - "properties": { - "last-connection": { - "type": "string", - "format": "date-time" - }, - "model": { - "$ref": "#/definitions/Model" - } - }, - "additionalProperties": false, - "required": [ - "model", - "last-connection" - ] - }, - "UserModelList": { - "type": "object", - "properties": { - "user-models": { - "type": "array", - "items": { - "$ref": "#/definitions/UserModel" - } - } - }, - "additionalProperties": false, - "required": [ - "user-models" - ] - } - } - } - }, - { - "Name": "ModelSummaryWatcher", - "Description": "SrvModelSummaryWatcher defines the API methods on a ModelSummaryWatcher.", - "Version": 1, - "AvailableTo": [ - "controller-user" - ], - "Schema": { - "type": "object", - "properties": { - "Next": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/SummaryWatcherNextResults" - } - }, - "description": "Next will return the current state of everything on the first call\nand subsequent calls will return just those model summaries that have\nchanged." - }, - "Stop": { - "type": "object", - "description": "Stop stops the watcher." - } - }, - "definitions": { - "ModelAbstract": { - "type": "object", - "properties": { - "admins": { - "type": "array", - "items": { - "type": "string" - } - }, - "annotations": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "cloud": { - "type": "string" - }, - "controller": { - "type": "string" - }, - "credential": { - "type": "string" - }, - "messages": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelSummaryMessage" - } - }, - "name": { - "type": "string" - }, - "region": { - "type": "string" - }, - "removed": { - "type": "boolean" - }, - "size": { - "$ref": "#/definitions/ModelSummarySize" - }, - "status": { - "type": "string" - }, - "uuid": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "uuid" - ] - }, - "ModelSummaryMessage": { - "type": "object", - "properties": { - "agent": { - "type": "string" - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "agent", - "message" - ] - }, - "ModelSummarySize": { - "type": "object", - "properties": { - "applications": { - "type": "integer" - }, - "containers": { - "type": "integer" - }, - "machines": { - "type": "integer" - }, - "relations": { - "type": "integer" - }, - "units": { - "type": "integer" - } - }, - "additionalProperties": false - }, - "SummaryWatcherNextResults": { - "type": "object", - "properties": { - "models": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelAbstract" - } - } - }, - "additionalProperties": false, - "required": [ - "models" - ] - } - } - } - }, - { - "Name": "ModelUpgrader", - "Description": "ModelUpgraderAPI implements the model upgrader interface and is\nthe concrete implementation of the api end point.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "controller-user" - ], - "Schema": { - "type": "object", - "properties": { - "AbortModelUpgrade": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ModelParam" - } - }, - "description": "AbortModelUpgrade aborts and archives the model upgrade\nsynchronisation record, if any." - }, - "UpgradeModel": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/UpgradeModelParams" - }, - "Result": { - "$ref": "#/definitions/UpgradeModelResult" - } - }, - "description": "UpgradeModel upgrades a model." - } - }, - "definitions": { - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ModelParam": { - "type": "object", - "properties": { - "model-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "model-tag" - ] - }, - "Number": { - "type": "object", - "properties": { - "Build": { - "type": "integer" - }, - "Major": { - "type": "integer" - }, - "Minor": { - "type": "integer" - }, - "Patch": { - "type": "integer" - }, - "Tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Major", - "Minor", - "Tag", - "Patch", - "Build" - ] - }, - "UpgradeModelParams": { - "type": "object", - "properties": { - "agent-stream": { - "type": "string" - }, - "dry-run": { - "type": "boolean" - }, - "ignore-agent-versions": { - "type": "boolean" - }, - "model-tag": { - "type": "string" - }, - "target-version": { - "$ref": "#/definitions/Number" - } - }, - "additionalProperties": false, - "required": [ - "model-tag", - "target-version" - ] - }, - "UpgradeModelResult": { - "type": "object", - "properties": { - "chosen-version": { - "$ref": "#/definitions/Number" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "chosen-version" - ] - } - } - } - }, - { - "Name": "NotifyWatcher", - "Description": "srvNotifyWatcher defines the API access to methods on a NotifyWatcher.\nEach client has its own current set of watchers, stored in resources.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "controller-user", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "Next": { - "type": "object", - "description": "Next returns when a change has occurred to the\nentity being watched since the most recent call to Next\nor the Watch call that created the NotifyWatcher." - }, - "Stop": { - "type": "object", - "description": "Stop stops the watcher." - } - } - } - }, - { - "Name": "OfferStatusWatcher", - "Description": "srvOfferStatusWatcher defines the API wrapping a crossmodelrelations.OfferStatusWatcher.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "Next": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/OfferStatusWatchResult" - } - }, - "description": "Next returns when a change has occurred to an entity of the\ncollection being watched since the most recent call to Next\nor the Watch call that created the srvOfferStatusWatcher." - }, - "Stop": { - "type": "object", - "description": "Stop stops the watcher." - } - }, - "definitions": { - "EntityStatus": { - "type": "object", - "properties": { - "data": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "info": { - "type": "string" - }, - "since": { - "type": "string", - "format": "date-time" - }, - "status": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "status", - "info", - "since" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "OfferStatusChange": { - "type": "object", - "properties": { - "offer-name": { - "type": "string" - }, - "status": { - "$ref": "#/definitions/EntityStatus" - } - }, - "additionalProperties": false, - "required": [ - "offer-name", - "status" - ] - }, - "OfferStatusWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "$ref": "#/definitions/OfferStatusChange" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id", - "changes" - ] - } - } - } - }, - { - "Name": "Payloads", - "Description": "API serves payload-specific API methods.", - "Version": 1, - "AvailableTo": [ - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "List": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/PayloadListArgs" - }, - "Result": { - "$ref": "#/definitions/PayloadListResults" - } - }, - "description": "List builds the list of payloads being tracked for\nthe given unit and IDs. If no IDs are provided then all tracked\npayloads for the unit are returned." - } - }, - "definitions": { - "Payload": { - "type": "object", - "properties": { - "class": { - "type": "string" - }, - "id": { - "type": "string" - }, - "labels": { - "type": "array", - "items": { - "type": "string" - } - }, - "machine": { - "type": "string" - }, - "status": { - "type": "string" - }, - "type": { - "type": "string" - }, - "unit": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "class", - "type", - "id", - "status", - "labels", - "unit", - "machine" - ] - }, - "PayloadListArgs": { - "type": "object", - "properties": { - "patterns": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "patterns" - ] - }, - "PayloadListResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/Payload" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - } - } - } - }, - { - "Name": "PayloadsHookContext", - "Description": "UnitFacade serves payload-specific API methods.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "List": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/PayloadResults" - } - }, - "description": "List builds the list of payload being tracked for\nthe given unit and IDs. If no IDs are provided then all tracked\npayloads for the unit are returned." - }, - "LookUp": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/LookUpPayloadArgs" - }, - "Result": { - "$ref": "#/definitions/PayloadResults" - } - }, - "description": "LookUp identifies the payload with the provided name and raw ID." - }, - "SetStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetPayloadStatusArgs" - }, - "Result": { - "$ref": "#/definitions/PayloadResults" - } - }, - "description": "SetStatus sets the raw status of a payload." - }, - "Track": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/TrackPayloadArgs" - }, - "Result": { - "$ref": "#/definitions/PayloadResults" - } - }, - "description": "Track stores a payload to be tracked in state." - }, - "Untrack": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/PayloadResults" - } - }, - "description": "Untrack marks the identified payload as no longer being tracked." - } - }, - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "LookUpPayloadArg": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "id" - ] - }, - "LookUpPayloadArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/LookUpPayloadArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "Payload": { - "type": "object", - "properties": { - "class": { - "type": "string" - }, - "id": { - "type": "string" - }, - "labels": { - "type": "array", - "items": { - "type": "string" - } - }, - "machine": { - "type": "string" - }, - "status": { - "type": "string" - }, - "type": { - "type": "string" - }, - "unit": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "class", - "type", - "id", - "status", - "labels", - "unit", - "machine" - ] - }, - "PayloadResult": { - "type": "object", - "properties": { - "Entity": { - "$ref": "#/definitions/Entity" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "not-found": { - "type": "boolean" - }, - "payload": { - "$ref": "#/definitions/Payload" - }, - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "Entity", - "payload", - "not-found" - ] - }, - "PayloadResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/PayloadResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "SetPayloadStatusArg": { - "type": "object", - "properties": { - "Entity": { - "$ref": "#/definitions/Entity" - }, - "status": { - "type": "string" - }, - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "Entity", - "status" - ] - }, - "SetPayloadStatusArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/SetPayloadStatusArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "TrackPayloadArgs": { - "type": "object", - "properties": { - "payloads": { - "type": "array", - "items": { - "$ref": "#/definitions/Payload" - } - } - }, - "additionalProperties": false, - "required": [ - "payloads" - ] - } - } - } - }, - { - "Name": "Pinger", - "Description": "pinger describes a resource that can be pinged and stopped.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "controller-user", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "Ping": { - "type": "object" - }, - "Stop": { - "type": "object" - } - } - } - }, - { - "Name": "Provisioner", - "Description": "ProvisionerAPIV11 provides v10 of the provisioner facade.\nIt relies on agent-set origin when calling SetHostMachineNetworkConfig.", - "Version": 11, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent" - ], - "Schema": { - "type": "object", - "properties": { - "APIAddresses": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsResult" - } - }, - "description": "APIAddresses returns the list of addresses used to connect to the API." - }, - "APIHostPorts": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/APIHostPortsResult" - } - }, - "description": "APIHostPorts returns the API server addresses." - }, - "AvailabilityZone": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringResults" - } - }, - "description": "AvailabilityZone returns a provider-specific availability zone for each given machine entity" - }, - "CACert": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/BytesResult" - } - }, - "description": "CACert returns the certificate used to validate the state connection." - }, - "Constraints": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ConstraintsResults" - } - }, - "description": "Constraints returns the constraints for each given machine entity." - }, - "ContainerConfig": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ContainerConfig" - } - }, - "description": "ContainerConfig returns information from the model config that is\nneeded for container cloud-init." - }, - "ContainerManagerConfig": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ContainerManagerConfigParams" - }, - "Result": { - "$ref": "#/definitions/ContainerManagerConfig" - } - }, - "description": "ContainerManagerConfig returns information from the model config that is\nneeded for configuring the container manager." - }, - "ControllerAPIInfoForModels": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ControllerAPIInfoResults" - } - }, - "description": "ControllerAPIInfoForModels returns the controller api connection details for the specified models." - }, - "ControllerConfig": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ControllerConfigResult" - } - }, - "description": "ControllerConfig returns the controller's configuration." - }, - "DistributionGroup": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/DistributionGroupResults" - } - }, - "description": "DistributionGroup returns, for each given machine entity,\na slice of instance.Ids that belong to the same distribution\ngroup as that machine. This information may be used to\ndistribute instances for high availability." - }, - "DistributionGroupByMachineId": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsResults" - } - }, - "description": "DistributionGroupByMachineId returns, for each given machine entity,\na slice of machine.Ids that belong to the same distribution\ngroup as that machine. This information may be used to\ndistribute instances for high availability." - }, - "EnsureDead": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "EnsureDead calls EnsureDead on each given entity from state. It\nwill fail if the entity is not present. If it's Alive, nothing will\nhappen (see state/EnsureDead() for units or machines)." - }, - "FindTools": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/FindToolsParams" - }, - "Result": { - "$ref": "#/definitions/FindToolsResult" - } - }, - "description": "FindTools returns a List containing all tools matching the given parameters." - }, - "GetContainerInterfaceInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/MachineNetworkConfigResults" - } - }, - "description": "GetContainerInterfaceInfo returns information to configure networking for a\ncontainer. It accepts container tags as arguments." - }, - "GetContainerProfileInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ContainerProfileResults" - } - }, - "description": "GetContainerProfileInfo returns information to configure a lxd profile(s) for a\ncontainer based on the charms deployed to the container. It accepts container\ntags as arguments. Unlike machineLXDProfileNames which has the environ\nwrite the lxd profiles and returns the names of profiles already written." - }, - "HostChangesForContainers": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/HostNetworkChangeResults" - } - }, - "description": "HostChangesForContainers returns the set of changes that need to be done\nto the host machine to prepare it for the containers to be created.\nPass in a list of the containers that you want the changes for." - }, - "InstanceId": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringResults" - } - }, - "description": "InstanceId returns the provider specific instance id for each given\nmachine or an CodeNotProvisioned error, if not set." - }, - "InstanceStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StatusResults" - } - }, - "description": "InstanceStatus returns the instance status for each given entity.\nOnly machine tags are accepted." - }, - "KeepInstance": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/BoolResults" - } - }, - "description": "KeepInstance returns the keep-instance value for each given machine entity." - }, - "Life": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/LifeResults" - } - }, - "description": "Life returns the life status of every supplied entity, where available." - }, - "MachinesWithTransientErrors": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StatusResults" - } - }, - "description": "MachinesWithTransientErrors returns status data for machines with provisioning\nerrors which are transient." - }, - "MarkMachinesForRemoval": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "MarkMachinesForRemoval indicates that the specified machines are\nready to have any provider-level resources cleaned up and then be\nremoved." - }, - "ModelConfig": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ModelConfigResult" - } - }, - "description": "ModelConfig returns the current model's configuration." - }, - "ModelUUID": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringResult" - } - }, - "description": "ModelUUID returns the model UUID that the current connection is for." - }, - "PrepareContainerInterfaceInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/MachineNetworkConfigResults" - } - }, - "description": "PrepareContainerInterfaceInfo allocates an address and returns information to\nconfigure networking for a container. It accepts container tags as arguments." - }, - "ProvisioningInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ProvisioningInfoResults" - } - }, - "description": "ProvisioningInfo returns the provisioning information for each given machine entity.\nIt supports all positive space constraints." - }, - "ReleaseContainerAddresses": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "ReleaseContainerAddresses finds addresses allocated to a container and marks\nthem as Dead, to be released and removed. It accepts container tags as\narguments." - }, - "Remove": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "Remove removes every given entity from state, calling EnsureDead\nfirst, then Remove. It will fail if the entity is not present." - }, - "SetCharmProfiles": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetProfileArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetCharmProfiles records the given slice of charm profile names." - }, - "SetHostMachineNetworkConfig": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetMachineNetworkConfig" - } - } - }, - "SetInstanceInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/InstancesInfo" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetInstanceInfo sets the provider specific machine id, nonce,\nmetadata and network info for each given machine. Once set, the\ninstance id cannot be changed." - }, - "SetInstanceStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetStatus" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetInstanceStatus updates the instance status for each given\nentity. Only machine tags are accepted." - }, - "SetModificationStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetStatus" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetModificationStatus updates the instance whilst changes are occurring. This\nis different from SetStatus and SetInstanceStatus, by the fact this holds\ninformation about the ongoing changes that are happening to instances.\nConsider LXD Profile updates that can modify a instance, but may not cause\nthe instance to be placed into a error state. This modification status\nserves the purpose of highlighting that to the operator.\nOnly machine tags are accepted." - }, - "SetObservedNetworkConfig": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetMachineNetworkConfig" - } - }, - "description": "SetObservedNetworkConfig reads the network config for the machine\nidentified by the input args.\nThis config is merged with the new network config supplied in the\nsame args and updated if it has changed." - }, - "SetPasswords": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/EntityPasswords" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetPasswords sets the given password for each supplied entity, if possible." - }, - "SetStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetStatus" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetStatus sets the status of each given entity." - }, - "SetSupportedContainers": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/MachineContainersParams" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetSupportedContainers updates the list of containers supported by the machines passed in args." - }, - "Status": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StatusResults" - } - }, - "description": "Status returns the status of each given entity." - }, - "SupportedContainers": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/MachineContainerResults" - } - }, - "description": "SupportedContainers returns the list of containers supported by the machines passed in args." - }, - "Tools": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ToolsResults" - } - }, - "description": "Tools finds the tools necessary for the given agents." - }, - "WatchAPIHostPorts": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResult" - } - }, - "description": "WatchAPIHostPorts watches the API server addresses." - }, - "WatchAllContainers": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/WatchContainers" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - }, - "description": "WatchAllContainers starts a StringsWatcher to watch all containers deployed to\nany machine passed in args." - }, - "WatchContainers": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/WatchContainers" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - }, - "description": "WatchContainers starts a StringsWatcher to watch containers deployed to\nany machine passed in args." - }, - "WatchForModelConfigChanges": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResult" - } - }, - "description": "WatchForModelConfigChanges returns a NotifyWatcher that observes\nchanges to the model configuration.\nNote that although the NotifyWatchResult contains an Error field,\nit's not used because we are only returning a single watcher,\nso we use the regular error return." - }, - "WatchMachineErrorRetry": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResult" - } - }, - "description": "WatchMachineErrorRetry returns a NotifyWatcher that notifies when\nthe provisioner should retry provisioning machines with transient errors." - }, - "WatchModelMachineStartTimes": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsWatchResult" - } - }, - "description": "WatchModelMachineStartTimes watches the non-container machines in the model\nfor changes to the Life or AgentStartTime fields and reports them as a batch." - }, - "WatchModelMachines": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsWatchResult" - } - }, - "description": "WatchModelMachines returns a StringsWatcher that notifies of\nchanges to the life cycles of the top level machines in the current\nmodel." - } - }, - "definitions": { - "APIHostPortsResult": { - "type": "object", - "properties": { - "servers": { - "type": "array", - "items": { - "type": "array", - "items": { - "$ref": "#/definitions/HostPort" - } - } - } - }, - "additionalProperties": false, - "required": [ - "servers" - ] - }, - "Address": { - "type": "object", - "properties": { - "cidr": { - "type": "string" - }, - "config-type": { - "type": "string" - }, - "is-secondary": { - "type": "boolean" - }, - "scope": { - "type": "string" - }, - "space-id": { - "type": "string" - }, - "space-name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "value", - "type", - "scope" - ] - }, - "Base": { - "type": "object", - "properties": { - "channel": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "channel" - ] - }, - "Binary": { - "type": "object", - "properties": { - "Arch": { - "type": "string" - }, - "Build": { - "type": "integer" - }, - "Major": { - "type": "integer" - }, - "Minor": { - "type": "integer" - }, - "Number": { - "$ref": "#/definitions/Number" - }, - "Patch": { - "type": "integer" - }, - "Release": { - "type": "string" - }, - "Tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Major", - "Minor", - "Tag", - "Patch", - "Build", - "Number", - "Release", - "Arch" - ] - }, - "BoolResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "BoolResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/BoolResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "BytesResult": { - "type": "object", - "properties": { - "result": { - "type": "array", - "items": { - "type": "integer" - } - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "CharmLXDProfile": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "description": { - "type": "string" - }, - "devices": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - } - } - } - }, - "additionalProperties": false, - "required": [ - "config", - "description", - "devices" - ] - }, - "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" - }, - "source": { - "type": "string" - }, - "stream": { - "type": "string" - }, - "version": { - "type": "string" - }, - "virt-type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "image-id", - "region", - "version", - "arch", - "source", - "priority" - ] - }, - "ConstraintsResult": { - "type": "object", - "properties": { - "constraints": { - "$ref": "#/definitions/Value" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "constraints" - ] - }, - "ConstraintsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ConstraintsResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ContainerConfig": { - "type": "object", - "properties": { - "UpdateBehavior": { - "$ref": "#/definitions/UpdateBehavior" - }, - "apt-mirror": { - "type": "string" - }, - "apt-proxy": { - "$ref": "#/definitions/Settings" - }, - "authorized-keys": { - "type": "string" - }, - "cloudinit-userdata": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "container-inherit-properties": { - "type": "string" - }, - "juju-proxy": { - "$ref": "#/definitions/Settings" - }, - "legacy-proxy": { - "$ref": "#/definitions/Settings" - }, - "provider-type": { - "type": "string" - }, - "snap-proxy": { - "$ref": "#/definitions/Settings" - }, - "snap-store-assertions": { - "type": "string" - }, - "snap-store-proxy-id": { - "type": "string" - }, - "snap-store-proxy-url": { - "type": "string" - }, - "ssl-hostname-verification": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "provider-type", - "authorized-keys", - "ssl-hostname-verification", - "legacy-proxy", - "juju-proxy", - "apt-proxy", - "snap-proxy", - "snap-store-assertions", - "snap-store-proxy-id", - "snap-store-proxy-url", - "UpdateBehavior" - ] - }, - "ContainerLXDProfile": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "profile": { - "$ref": "#/definitions/CharmLXDProfile" - } - }, - "additionalProperties": false, - "required": [ - "profile", - "name" - ] - }, - "ContainerManagerConfig": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "ContainerManagerConfigParams": { - "type": "object", - "properties": { - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type" - ] - }, - "ContainerProfileResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "lxd-profiles": { - "type": "array", - "items": { - "$ref": "#/definitions/ContainerLXDProfile" - } - } - }, - "additionalProperties": false - }, - "ContainerProfileResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ContainerProfileResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ControllerAPIInfoResult": { - "type": "object", - "properties": { - "addresses": { - "type": "array", - "items": { - "type": "string" - } - }, - "cacert": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "addresses", - "cacert" - ] - }, - "ControllerAPIInfoResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ControllerAPIInfoResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ControllerConfigResult": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "DeviceBridgeInfo": { - "type": "object", - "properties": { - "bridge-name": { - "type": "string" - }, - "host-device-name": { - "type": "string" - }, - "mac-address": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "host-device-name", - "bridge-name", - "mac-address" - ] - }, - "DistributionGroupResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "DistributionGroupResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/DistributionGroupResult" - } - } - }, - "additionalProperties": false, - "required": [ - "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" - ] - }, - "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": { - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "FindToolsParams": { - "type": "object", - "properties": { - "agentstream": { - "type": "string" - }, - "arch": { - "type": "string" - }, - "major": { - "type": "integer" - }, - "number": { - "$ref": "#/definitions/Number" - }, - "os-type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "number", - "major", - "arch", - "os-type", - "agentstream" - ] - }, - "FindToolsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "list": { - "type": "array", - "items": { - "$ref": "#/definitions/Tools" - } - } - }, - "additionalProperties": false, - "required": [ - "list" - ] - }, - "HardwareCharacteristics": { - "type": "object", - "properties": { - "arch": { - "type": "string" - }, - "availability-zone": { - "type": "string" - }, - "cpu-cores": { - "type": "integer" - }, - "cpu-power": { - "type": "integer" - }, - "mem": { - "type": "integer" - }, - "root-disk": { - "type": "integer" - }, - "root-disk-source": { - "type": "string" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "virt-type": { - "type": "string" - } - }, - "additionalProperties": false - }, - "HostNetworkChange": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "new-bridges": { - "type": "array", - "items": { - "$ref": "#/definitions/DeviceBridgeInfo" - } - }, - "reconfigure-delay": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "new-bridges", - "reconfigure-delay" - ] - }, - "HostNetworkChangeResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/HostNetworkChange" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "HostPort": { - "type": "object", - "properties": { - "Address": { - "$ref": "#/definitions/Address" - }, - "cidr": { - "type": "string" - }, - "config-type": { - "type": "string" - }, - "is-secondary": { - "type": "boolean" - }, - "port": { - "type": "integer" - }, - "scope": { - "type": "string" - }, - "space-id": { - "type": "string" - }, - "space-name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "value", - "type", - "scope", - "Address", - "port" - ] - }, - "InstanceInfo": { - "type": "object", - "properties": { - "characteristics": { - "$ref": "#/definitions/HardwareCharacteristics" - }, - "charm-profiles": { - "type": "array", - "items": { - "type": "string" - } - }, - "display-name": { - "type": "string" - }, - "instance-id": { - "type": "string" - }, - "network-config": { - "type": "array", - "items": { - "$ref": "#/definitions/NetworkConfig" - } - }, - "nonce": { - "type": "string" - }, - "tag": { - "type": "string" - }, - "volume-attachments": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/VolumeAttachmentInfo" - } - } - }, - "volumes": { - "type": "array", - "items": { - "$ref": "#/definitions/Volume" - } - } - }, - "additionalProperties": false, - "required": [ - "tag", - "instance-id", - "display-name", - "nonce", - "characteristics", - "volumes", - "volume-attachments", - "network-config", - "charm-profiles" - ] - }, - "InstancesInfo": { - "type": "object", - "properties": { - "machines": { - "type": "array", - "items": { - "$ref": "#/definitions/InstanceInfo" - } - } - }, - "additionalProperties": false, - "required": [ - "machines" - ] - }, - "LifeResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "life": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "life" - ] - }, - "LifeResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/LifeResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "MachineContainerResult": { - "type": "object", - "properties": { - "container-types": { - "type": "array", - "items": { - "type": "string" - } - }, - "determined": { - "type": "boolean" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "container-types", - "determined" - ] - }, - "MachineContainerResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/MachineContainerResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "MachineContainers": { - "type": "object", - "properties": { - "container-types": { - "type": "array", - "items": { - "type": "string" - } - }, - "machine-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "machine-tag", - "container-types" - ] - }, - "MachineContainersParams": { - "type": "object", - "properties": { - "params": { - "type": "array", - "items": { - "$ref": "#/definitions/MachineContainers" - } - } - }, - "additionalProperties": false, - "required": [ - "params" - ] - }, - "MachineNetworkConfigResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "info": { - "type": "array", - "items": { - "$ref": "#/definitions/NetworkConfig" - } - } - }, - "additionalProperties": false, - "required": [ - "info" - ] - }, - "MachineNetworkConfigResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/MachineNetworkConfigResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ModelConfigResult": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "NetworkConfig": { - "type": "object", - "properties": { - "address": { - "type": "string" - }, - "addresses": { - "type": "array", - "items": { - "$ref": "#/definitions/Address" - } - }, - "cidr": { - "type": "string" - }, - "config-type": { - "type": "string" - }, - "device-index": { - "type": "integer" - }, - "disabled": { - "type": "boolean" - }, - "dns-search-domains": { - "type": "array", - "items": { - "type": "string" - } - }, - "dns-servers": { - "type": "array", - "items": { - "type": "string" - } - }, - "gateway-address": { - "type": "string" - }, - "interface-name": { - "type": "string" - }, - "interface-type": { - "type": "string" - }, - "is-default-gateway": { - "type": "boolean" - }, - "mac-address": { - "type": "string" - }, - "mtu": { - "type": "integer" - }, - "no-auto-start": { - "type": "boolean" - }, - "origin": { - "type": "string" - }, - "parent-interface-name": { - "type": "string" - }, - "provider-address-id": { - "type": "string" - }, - "provider-id": { - "type": "string" - }, - "provider-network-id": { - "type": "string" - }, - "provider-space-id": { - "type": "string" - }, - "provider-subnet-id": { - "type": "string" - }, - "provider-vlan-id": { - "type": "string" - }, - "routes": { - "type": "array", - "items": { - "$ref": "#/definitions/NetworkRoute" - } - }, - "shadow-addresses": { - "type": "array", - "items": { - "$ref": "#/definitions/Address" - } - }, - "virtual-port-type": { - "type": "string" - }, - "vlan-tag": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "device-index", - "mac-address", - "cidr", - "mtu", - "provider-id", - "provider-network-id", - "provider-subnet-id", - "provider-space-id", - "provider-address-id", - "provider-vlan-id", - "vlan-tag", - "interface-name", - "parent-interface-name", - "interface-type", - "disabled" - ] - }, - "NetworkRoute": { - "type": "object", - "properties": { - "destination-cidr": { - "type": "string" - }, - "gateway-ip": { - "type": "string" - }, - "metric": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "destination-cidr", - "gateway-ip", - "metric" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "Number": { - "type": "object", - "properties": { - "Build": { - "type": "integer" - }, - "Major": { - "type": "integer" - }, - "Minor": { - "type": "integer" - }, - "Patch": { - "type": "integer" - }, - "Tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Major", - "Minor", - "Tag", - "Patch", - "Build" - ] - }, - "ProvisioningInfo": { - "type": "object", - "properties": { - "ProvisioningNetworkTopology": { - "$ref": "#/definitions/ProvisioningNetworkTopology" - }, - "base": { - "$ref": "#/definitions/Base" - }, - "charm-lxd-profiles": { - "type": "array", - "items": { - "type": "string" - } - }, - "cloudinit-userdata": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "constraints": { - "$ref": "#/definitions/Value" - }, - "controller-config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "endpoint-bindings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "image-metadata": { - "type": "array", - "items": { - "$ref": "#/definitions/CloudImageMetadata" - } - }, - "jobs": { - "type": "array", - "items": { - "type": "string" - } - }, - "placement": { - "type": "string" - }, - "root-disk": { - "$ref": "#/definitions/VolumeParams" - }, - "space-subnets": { - "type": "object", - "patternProperties": { - ".*": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "subnet-zones": { - "type": "object", - "patternProperties": { - ".*": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "tags": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "volume-attachments": { - "type": "array", - "items": { - "$ref": "#/definitions/VolumeAttachmentParams" - } - }, - "volumes": { - "type": "array", - "items": { - "$ref": "#/definitions/VolumeParams" - } - } - }, - "additionalProperties": false, - "required": [ - "constraints", - "base", - "placement", - "jobs", - "subnet-zones", - "space-subnets", - "ProvisioningNetworkTopology" - ] - }, - "ProvisioningInfoResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/ProvisioningInfo" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "ProvisioningInfoResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ProvisioningInfoResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ProvisioningNetworkTopology": { - "type": "object", - "properties": { - "space-subnets": { - "type": "object", - "patternProperties": { - ".*": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "subnet-zones": { - "type": "object", - "patternProperties": { - ".*": { - "type": "array", - "items": { - "type": "string" - } - } - } - } - }, - "additionalProperties": false, - "required": [ - "subnet-zones", - "space-subnets" - ] - }, - "SetMachineNetworkConfig": { - "type": "object", - "properties": { - "config": { - "type": "array", - "items": { - "$ref": "#/definitions/NetworkConfig" - } - }, - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "config" - ] - }, - "SetProfileArg": { - "type": "object", - "properties": { - "entity": { - "$ref": "#/definitions/Entity" - }, - "profiles": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "entity", - "profiles" - ] - }, - "SetProfileArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/SetProfileArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "SetStatus": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityStatusArgs" - } - } - }, - "additionalProperties": false, - "required": [ - "entities" - ] - }, - "Settings": { - "type": "object", - "properties": { - "AutoNoProxy": { - "type": "string" - }, - "Ftp": { - "type": "string" - }, - "Http": { - "type": "string" - }, - "Https": { - "type": "string" - }, - "NoProxy": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Http", - "Https", - "Ftp", - "NoProxy", - "AutoNoProxy" - ] - }, - "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": [ - "id", - "life", - "status", - "info", - "data", - "since" - ] - }, - "StatusResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StatusResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "StringResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "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": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "StringsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringsResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "StringsWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id" - ] - }, - "StringsWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringsWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "Tools": { - "type": "object", - "properties": { - "sha256": { - "type": "string" - }, - "size": { - "type": "integer" - }, - "url": { - "type": "string" - }, - "version": { - "$ref": "#/definitions/Binary" - } - }, - "additionalProperties": false, - "required": [ - "version", - "url", - "size" - ] - }, - "ToolsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "tools": { - "type": "array", - "items": { - "$ref": "#/definitions/Tools" - } - } - }, - "additionalProperties": false, - "required": [ - "tools" - ] - }, - "ToolsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ToolsResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "UpdateBehavior": { - "type": "object", - "properties": { - "enable-os-refresh-update": { - "type": "boolean" - }, - "enable-os-upgrade": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "enable-os-refresh-update", - "enable-os-upgrade" - ] - }, - "Value": { - "type": "object", - "properties": { - "allocate-public-ip": { - "type": "boolean" - }, - "arch": { - "type": "string" - }, - "container": { - "type": "string" - }, - "cores": { - "type": "integer" - }, - "cpu-power": { - "type": "integer" - }, - "instance-role": { - "type": "string" - }, - "instance-type": { - "type": "string" - }, - "mem": { - "type": "integer" - }, - "root-disk": { - "type": "integer" - }, - "root-disk-source": { - "type": "string" - }, - "spaces": { - "type": "array", - "items": { - "type": "string" - } - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "virt-type": { - "type": "string" - }, - "zones": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "Volume": { - "type": "object", - "properties": { - "info": { - "$ref": "#/definitions/VolumeInfo" - }, - "volume-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "volume-tag", - "info" - ] - }, - "VolumeAttachmentInfo": { - "type": "object", - "properties": { - "bus-address": { - "type": "string" - }, - "device-link": { - "type": "string" - }, - "device-name": { - "type": "string" - }, - "plan-info": { - "$ref": "#/definitions/VolumeAttachmentPlanInfo" - }, - "read-only": { - "type": "boolean" - } - }, - "additionalProperties": false - }, - "VolumeAttachmentParams": { - "type": "object", - "properties": { - "instance-id": { - "type": "string" - }, - "machine-tag": { - "type": "string" - }, - "provider": { - "type": "string" - }, - "read-only": { - "type": "boolean" - }, - "volume-id": { - "type": "string" - }, - "volume-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "volume-tag", - "machine-tag", - "provider" - ] - }, - "VolumeAttachmentPlanInfo": { - "type": "object", - "properties": { - "device-attributes": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "device-type": { - "type": "string" - } - }, - "additionalProperties": false - }, - "VolumeInfo": { - "type": "object", - "properties": { - "hardware-id": { - "type": "string" - }, - "persistent": { - "type": "boolean" - }, - "pool": { - "type": "string" - }, - "size": { - "type": "integer" - }, - "volume-id": { - "type": "string" - }, - "wwn": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "volume-id", - "size", - "persistent" - ] - }, - "VolumeParams": { - "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" - } - } - }, - "volume-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "volume-tag", - "size", - "provider" - ] - }, - "WatchContainer": { - "type": "object", - "properties": { - "container-type": { - "type": "string" - }, - "machine-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "machine-tag", - "container-type" - ] - }, - "WatchContainers": { - "type": "object", - "properties": { - "params": { - "type": "array", - "items": { - "$ref": "#/definitions/WatchContainer" - } - } - }, - "additionalProperties": false, - "required": [ - "params" - ] - } - } - } - }, - { - "Name": "ProxyUpdater", - "Description": "API provides the ProxyUpdater version 2 facade.", - "Version": 2, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "ProxyConfig": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ProxyConfigResults" - } - }, - "description": "ProxyConfig returns the proxy settings for the current model." - }, - "WatchForProxyConfigAndAPIHostPortChanges": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "WatchForProxyConfigAndAPIHostPortChanges watches for changes to the proxy and api host port settings." - } - }, - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "NotifyWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ProxyConfig": { - "type": "object", - "properties": { - "ftp": { - "type": "string" - }, - "http": { - "type": "string" - }, - "https": { - "type": "string" - }, - "no-proxy": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "http", - "https", - "ftp", - "no-proxy" - ] - }, - "ProxyConfigResult": { - "type": "object", - "properties": { - "apt-mirror": { - "type": "string" - }, - "apt-proxy-settings": { - "$ref": "#/definitions/ProxyConfig" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "juju-proxy-settings": { - "$ref": "#/definitions/ProxyConfig" - }, - "legacy-proxy-settings": { - "$ref": "#/definitions/ProxyConfig" - }, - "snap-proxy-settings": { - "$ref": "#/definitions/ProxyConfig" - }, - "snap-store-assertions": { - "type": "string" - }, - "snap-store-id": { - "type": "string" - }, - "snap-store-proxy-url": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "legacy-proxy-settings", - "juju-proxy-settings" - ] - }, - "ProxyConfigResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ProxyConfigResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - } - } - } - }, - { - "Name": "Reboot", - "Description": "RebootAPI provides access to the Upgrader API facade.", - "Version": 2, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent" - ], - "Schema": { - "type": "object", - "properties": { - "ClearReboot": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "ClearReboot will clear the reboot flag on provided machines, if it exists." - }, - "GetRebootAction": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/RebootActionResults" - } - }, - "description": "GetRebootAction returns the action a machine agent should take.\nIf a reboot flag is set on the machine, then that machine is\nexpected to reboot (params.ShouldReboot).\na reboot flag set on the machine parent or grandparent, will\ncause the machine to shutdown (params.ShouldShutdown).\nIf no reboot flag is set, the machine should do nothing (params.ShouldDoNothing)." - }, - "RequestReboot": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "RequestReboot sets the reboot flag on the provided machines" - }, - "WatchForRebootEvent": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResult" - } - }, - "description": "WatchForRebootEvent starts a watcher to track if there is a new\nreboot request on the machines ID or any of its parents (in case we are a container)." - } - }, - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "RebootActionResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "string" - } - }, - "additionalProperties": false - }, - "RebootActionResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/RebootActionResult" - } - } - }, - "additionalProperties": false - } - } - } - }, - { - "Name": "RelationStatusWatcher", - "Description": "srvRelationStatusWatcher defines the API wrapping a state.RelationStatusWatcher.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "Next": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/RelationLifeSuspendedStatusWatchResult" - } - }, - "description": "Next returns when a change has occurred to an entity of the\ncollection being watched since the most recent call to Next\nor the Watch call that created the srvRelationStatusWatcher." - }, - "Stop": { - "type": "object", - "description": "Stop stops the watcher." - } - }, - "definitions": { - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "RelationLifeSuspendedStatusChange": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "life": { - "type": "string" - }, - "suspended": { - "type": "boolean" - }, - "suspended-reason": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "key", - "life", - "suspended", - "suspended-reason" - ] - }, - "RelationLifeSuspendedStatusWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "$ref": "#/definitions/RelationLifeSuspendedStatusChange" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id", - "changes" - ] - } - } - } - }, - { - "Name": "RelationUnitsWatcher", - "Description": "srvRelationUnitsWatcher defines the API wrapping a state.RelationUnitsWatcher.\nIt notifies about units entering and leaving the scope of a RelationUnit,\nand changes to the settings of those units known to have entered.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "Next": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/RelationUnitsWatchResult" - } - }, - "description": "Next returns when a change has occurred to an entity of the\ncollection being watched since the most recent call to Next\nor the Watch call that created the srvRelationUnitsWatcher." - }, - "Stop": { - "type": "object", - "description": "Stop stops the watcher." - } - }, - "definitions": { - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "RelationUnitsChange": { - "type": "object", - "properties": { - "app-changed": { - "type": "object", - "patternProperties": { - ".*": { - "type": "integer" - } - } - }, - "changed": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/UnitSettings" - } - } - }, - "departed": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "changed" - ] - }, - "RelationUnitsWatchResult": { - "type": "object", - "properties": { - "changes": { - "$ref": "#/definitions/RelationUnitsChange" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id", - "changes" - ] - }, - "UnitSettings": { - "type": "object", - "properties": { - "version": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "version" - ] - } - } - } - }, - { - "Name": "RemoteRelationWatcher", - "Description": "srvRemoteRelationWatcher defines the API wrapping a\nstate.RelationUnitsWatcher but serving the events it emits as\nfully-expanded params.RemoteRelationChangeEvents so they can be\nused across model/controller boundaries.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "Next": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/RemoteRelationWatchResult" - } - } - }, - "Stop": { - "type": "object", - "description": "Stop stops the watcher." - } - }, - "definitions": { - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "Macaroon": { - "type": "object", - "additionalProperties": false - }, - "RemoteRelationChangeEvent": { - "type": "object", - "properties": { - "application-settings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "application-token": { - "type": "string" - }, - "bakery-version": { - "type": "integer" - }, - "changed-units": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoteRelationUnitChange" - } - }, - "departed-units": { - "type": "array", - "items": { - "type": "integer" - } - }, - "force-cleanup": { - "type": "boolean" - }, - "life": { - "type": "string" - }, - "macaroons": { - "type": "array", - "items": { - "$ref": "#/definitions/Macaroon" - } - }, - "relation-token": { - "type": "string" - }, - "suspended": { - "type": "boolean" - }, - "suspended-reason": { - "type": "string" - }, - "unit-count": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "relation-token", - "application-token", - "life", - "unit-count" - ] - }, - "RemoteRelationUnitChange": { - "type": "object", - "properties": { - "settings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "unit-id": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "unit-id" - ] - }, - "RemoteRelationWatchResult": { - "type": "object", - "properties": { - "changes": { - "$ref": "#/definitions/RemoteRelationChangeEvent" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id", - "changes" - ] - } - } - } - }, - { - "Name": "RemoteRelations", - "Description": "API provides access to the remote relations API facade.", - "Version": 2, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "ConsumeRemoteRelationChanges": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RemoteRelationsChanges" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "ConsumeRemoteRelationChanges consumes changes to settings originating\nfrom the remote/offering side of relations." - }, - "ControllerAPIInfoForModels": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ControllerAPIInfoResults" - } - }, - "description": "ControllerAPIInfoForModels returns the controller api connection details for the specified models." - }, - "ControllerConfig": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ControllerConfigResult" - } - }, - "description": "ControllerConfig returns the controller's configuration." - }, - "ExportEntities": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/TokenResults" - } - }, - "description": "ExportEntities allocates unique, remote entity IDs for the given entities in the local model." - }, - "GetTokens": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/GetTokenArgs" - }, - "Result": { - "$ref": "#/definitions/StringResults" - } - }, - "description": "GetTokens returns the token associated with the entities with the given tags for the given models." - }, - "ImportRemoteEntities": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RemoteEntityTokenArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "ImportRemoteEntities adds entities to the remote entities collection with the specified opaque tokens." - }, - "Relations": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/RemoteRelationResults" - } - }, - "description": "Relations returns information about the cross-model relations with the specified keys\nin the local model." - }, - "RemoteApplications": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/RemoteApplicationResults" - } - }, - "description": "RemoteApplications returns the current state of the remote applications with\nthe specified names in the local model." - }, - "SaveMacaroons": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/EntityMacaroonArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SaveMacaroons saves the macaroons for the given entities." - }, - "SetRemoteApplicationsStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetStatus" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetRemoteApplicationsStatus sets the status for the specified remote applications." - }, - "UpdateControllersForModels": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/UpdateControllersForModelsParams" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "UpdateControllersForModels changes the external controller records for the\nassociated model entities. This is used when the remote relations worker gets\nredirected following migration of an offering model." - }, - "WatchLocalRelationChanges": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/RemoteRelationWatchResults" - } - }, - "description": "WatchLocalRelationChanges starts a RemoteRelationWatcher for each\nspecified relation, returning the watcher IDs and initial values,\nor an error if the remote relations couldn't be watched." - }, - "WatchRemoteApplicationRelations": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - }, - "description": "WatchRemoteApplicationRelations starts a StringsWatcher for watching the relations of\neach specified application in the local model, and returns the watcher IDs\nand initial values, or an error if the services' relations could not be\nwatched." - }, - "WatchRemoteApplications": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsWatchResult" - } - }, - "description": "WatchRemoteApplications starts a strings watcher that notifies of the addition,\nremoval, and lifecycle changes of remote applications in the model; and\nreturns the watcher ID and initial IDs of remote applications, or an error if\nwatching failed." - }, - "WatchRemoteRelations": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsWatchResult" - } - }, - "description": "WatchRemoteRelations starts a strings watcher that notifies of the addition,\nremoval, and lifecycle changes of remote relations in the model; and\nreturns the watcher ID and initial IDs of remote relations, or an error if\nwatching failed." - } - }, - "definitions": { - "ControllerAPIInfoResult": { - "type": "object", - "properties": { - "addresses": { - "type": "array", - "items": { - "type": "string" - } - }, - "cacert": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "addresses", - "cacert" - ] - }, - "ControllerAPIInfoResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ControllerAPIInfoResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ControllerConfigResult": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "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" - ] - }, - "EntityMacaroonArg": { - "type": "object", - "properties": { - "macaroon": { - "$ref": "#/definitions/Macaroon" - }, - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "macaroon", - "tag" - ] - }, - "EntityMacaroonArgs": { - "type": "object", - "properties": { - "Args": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityMacaroonArg" - } - } - }, - "additionalProperties": false, - "required": [ - "Args" - ] - }, - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ExternalControllerInfo": { - "type": "object", - "properties": { - "addrs": { - "type": "array", - "items": { - "type": "string" - } - }, - "ca-cert": { - "type": "string" - }, - "controller-alias": { - "type": "string" - }, - "controller-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "controller-tag", - "controller-alias", - "addrs", - "ca-cert" - ] - }, - "GetTokenArg": { - "type": "object", - "properties": { - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag" - ] - }, - "GetTokenArgs": { - "type": "object", - "properties": { - "Args": { - "type": "array", - "items": { - "$ref": "#/definitions/GetTokenArg" - } - } - }, - "additionalProperties": false, - "required": [ - "Args" - ] - }, - "Macaroon": { - "type": "object", - "additionalProperties": false - }, - "RemoteApplication": { - "type": "object", - "properties": { - "consume-version": { - "type": "integer" - }, - "is-consumer-proxy": { - "type": "boolean" - }, - "life": { - "type": "string" - }, - "macaroon": { - "$ref": "#/definitions/Macaroon" - }, - "model-uuid": { - "type": "string" - }, - "name": { - "type": "string" - }, - "offer-uuid": { - "type": "string" - }, - "status": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "offer-uuid", - "model-uuid", - "is-consumer-proxy" - ] - }, - "RemoteApplicationResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/RemoteApplication" - } - }, - "additionalProperties": false - }, - "RemoteApplicationResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoteApplicationResult" - } - } - }, - "additionalProperties": false - }, - "RemoteEndpoint": { - "type": "object", - "properties": { - "interface": { - "type": "string" - }, - "limit": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "role": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "role", - "interface", - "limit" - ] - }, - "RemoteEntityTokenArg": { - "type": "object", - "properties": { - "tag": { - "type": "string" - }, - "token": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag" - ] - }, - "RemoteEntityTokenArgs": { - "type": "object", - "properties": { - "Args": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoteEntityTokenArg" - } - } - }, - "additionalProperties": false, - "required": [ - "Args" - ] - }, - "RemoteRelation": { - "type": "object", - "properties": { - "application-name": { - "type": "string" - }, - "endpoint": { - "$ref": "#/definitions/RemoteEndpoint" - }, - "id": { - "type": "integer" - }, - "key": { - "type": "string" - }, - "life": { - "type": "string" - }, - "remote-application-name": { - "type": "string" - }, - "remote-endpoint-name": { - "type": "string" - }, - "source-model-uuid": { - "type": "string" - }, - "suspended": { - "type": "boolean" - }, - "unit-count": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "life", - "suspended", - "id", - "key", - "application-name", - "endpoint", - "unit-count", - "remote-application-name", - "remote-endpoint-name", - "source-model-uuid" - ] - }, - "RemoteRelationChangeEvent": { - "type": "object", - "properties": { - "application-settings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "application-token": { - "type": "string" - }, - "bakery-version": { - "type": "integer" - }, - "changed-units": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoteRelationUnitChange" - } - }, - "departed-units": { - "type": "array", - "items": { - "type": "integer" - } - }, - "force-cleanup": { - "type": "boolean" - }, - "life": { - "type": "string" - }, - "macaroons": { - "type": "array", - "items": { - "$ref": "#/definitions/Macaroon" - } - }, - "relation-token": { - "type": "string" - }, - "suspended": { - "type": "boolean" - }, - "suspended-reason": { - "type": "string" - }, - "unit-count": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "relation-token", - "application-token", - "life", - "unit-count" - ] - }, - "RemoteRelationResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/RemoteRelation" - } - }, - "additionalProperties": false - }, - "RemoteRelationResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoteRelationResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "RemoteRelationUnitChange": { - "type": "object", - "properties": { - "settings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "unit-id": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "unit-id" - ] - }, - "RemoteRelationWatchResult": { - "type": "object", - "properties": { - "changes": { - "$ref": "#/definitions/RemoteRelationChangeEvent" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id", - "changes" - ] - }, - "RemoteRelationWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoteRelationWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "RemoteRelationsChanges": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoteRelationChangeEvent" - } - } - }, - "additionalProperties": false - }, - "SetStatus": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityStatusArgs" - } - } - }, - "additionalProperties": false, - "required": [ - "entities" - ] - }, - "StringResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "StringResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "StringsWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id" - ] - }, - "StringsWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringsWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "TokenResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "token": { - "type": "string" - } - }, - "additionalProperties": false - }, - "TokenResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/TokenResult" - } - } - }, - "additionalProperties": false - }, - "UpdateControllerForModel": { - "type": "object", - "properties": { - "info": { - "$ref": "#/definitions/ExternalControllerInfo" - }, - "model-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "model-tag", - "info" - ] - }, - "UpdateControllersForModelsParams": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "$ref": "#/definitions/UpdateControllerForModel" - } - } - }, - "additionalProperties": false, - "required": [ - "changes" - ] - } - } - } - }, - { - "Name": "Resources", - "Description": "API is the public API facade for resources.", - "Version": 3, - "AvailableTo": [ - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "AddPendingResources": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/AddPendingResourcesArgsV2" - }, - "Result": { - "$ref": "#/definitions/AddPendingResourcesResult" - } - }, - "description": "AddPendingResources adds the provided resources (info) to the Juju\nmodel in a pending state, meaning they are not available until\nresolved. Handles CharmHub and Local charms." - }, - "ListResources": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ListResourcesArgs" - }, - "Result": { - "$ref": "#/definitions/ResourcesResults" - } - }, - "description": "ListResources returns the list of resources for the given application." - } - }, - "definitions": { - "AddPendingResourcesArgsV2": { - "type": "object", - "properties": { - "Entity": { - "$ref": "#/definitions/Entity" - }, - "charm-origin": { - "$ref": "#/definitions/CharmOrigin" - }, - "macaroon": { - "$ref": "#/definitions/Macaroon" - }, - "resources": { - "type": "array", - "items": { - "$ref": "#/definitions/CharmResource" - } - }, - "tag": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "Entity", - "url", - "charm-origin", - "macaroon", - "resources" - ] - }, - "AddPendingResourcesResult": { - "type": "object", - "properties": { - "ErrorResult": { - "$ref": "#/definitions/ErrorResult" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "pending-ids": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "ErrorResult", - "pending-ids" - ] - }, - "Base": { - "type": "object", - "properties": { - "channel": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "channel" - ] - }, - "CharmOrigin": { - "type": "object", - "properties": { - "architecture": { - "type": "string" - }, - "base": { - "$ref": "#/definitions/Base" - }, - "branch": { - "type": "string" - }, - "hash": { - "type": "string" - }, - "id": { - "type": "string" - }, - "instance-key": { - "type": "string" - }, - "revision": { - "type": "integer" - }, - "risk": { - "type": "string" - }, - "source": { - "type": "string" - }, - "track": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "source", - "type", - "id" - ] - }, - "CharmResource": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "fingerprint": { - "type": "array", - "items": { - "type": "integer" - } - }, - "name": { - "type": "string" - }, - "origin": { - "type": "string" - }, - "path": { - "type": "string" - }, - "revision": { - "type": "integer" - }, - "size": { - "type": "integer" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "type", - "path", - "origin", - "revision", - "fingerprint", - "size" - ] - }, - "Entity": { - "type": "object", - "properties": { - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ListResourcesArgs": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } - } - }, - "additionalProperties": false, - "required": [ - "entities" - ] - }, - "Macaroon": { - "type": "object", - "additionalProperties": false - }, - "Resource": { - "type": "object", - "properties": { - "CharmResource": { - "$ref": "#/definitions/CharmResource" - }, - "application": { - "type": "string" - }, - "description": { - "type": "string" - }, - "fingerprint": { - "type": "array", - "items": { - "type": "integer" - } - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "origin": { - "type": "string" - }, - "path": { - "type": "string" - }, - "pending-id": { - "type": "string" - }, - "revision": { - "type": "integer" - }, - "size": { - "type": "integer" - }, - "timestamp": { - "type": "string", - "format": "date-time" - }, - "type": { - "type": "string" - }, - "username": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "type", - "path", - "origin", - "revision", - "fingerprint", - "size", - "CharmResource", - "id", - "pending-id", - "application", - "username", - "timestamp" - ] - }, - "ResourcesResult": { - "type": "object", - "properties": { - "ErrorResult": { - "$ref": "#/definitions/ErrorResult" - }, - "charm-store-resources": { - "type": "array", - "items": { - "$ref": "#/definitions/CharmResource" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "resources": { - "type": "array", - "items": { - "$ref": "#/definitions/Resource" - } - }, - "unit-resources": { - "type": "array", - "items": { - "$ref": "#/definitions/UnitResources" - } - } - }, - "additionalProperties": false, - "required": [ - "ErrorResult", - "resources", - "charm-store-resources", - "unit-resources" - ] - }, - "ResourcesResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ResourcesResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "UnitResources": { - "type": "object", - "properties": { - "Entity": { - "$ref": "#/definitions/Entity" - }, - "download-progress": { - "type": "object", - "patternProperties": { - ".*": { - "type": "integer" - } - } - }, - "resources": { - "type": "array", - "items": { - "$ref": "#/definitions/Resource" - } - }, - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "Entity", - "resources", - "download-progress" - ] - } - } - } - }, - { - "Name": "ResourcesHookContext", - "Description": "UnitFacade is the resources portion of the uniter's API facade.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "GetResourceInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ListUnitResourcesArgs" - }, - "Result": { - "$ref": "#/definitions/UnitResourcesResult" - } - }, - "description": "GetResourceInfo returns the resource info for each of the given\nresource names (for the implicit application). If any one is missing then\nthe corresponding result is set with errors.NotFound." - } - }, - "definitions": { - "CharmResource": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "fingerprint": { - "type": "array", - "items": { - "type": "integer" - } - }, - "name": { - "type": "string" - }, - "origin": { - "type": "string" - }, - "path": { - "type": "string" - }, - "revision": { - "type": "integer" - }, - "size": { - "type": "integer" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "type", - "path", - "origin", - "revision", - "fingerprint", - "size" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ListUnitResourcesArgs": { - "type": "object", - "properties": { - "resource-names": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "resource-names" - ] - }, - "Resource": { - "type": "object", - "properties": { - "CharmResource": { - "$ref": "#/definitions/CharmResource" - }, - "application": { - "type": "string" - }, - "description": { - "type": "string" - }, - "fingerprint": { - "type": "array", - "items": { - "type": "integer" - } - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "origin": { - "type": "string" - }, - "path": { - "type": "string" - }, - "pending-id": { - "type": "string" - }, - "revision": { - "type": "integer" - }, - "size": { - "type": "integer" - }, - "timestamp": { - "type": "string", - "format": "date-time" - }, - "type": { - "type": "string" - }, - "username": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "type", - "path", - "origin", - "revision", - "fingerprint", - "size", - "CharmResource", - "id", - "pending-id", - "application", - "username", - "timestamp" - ] - }, - "UnitResourceResult": { - "type": "object", - "properties": { - "ErrorResult": { - "$ref": "#/definitions/ErrorResult" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "resource": { - "$ref": "#/definitions/Resource" - } - }, - "additionalProperties": false, - "required": [ - "ErrorResult", - "resource" - ] - }, - "UnitResourcesResult": { - "type": "object", - "properties": { - "ErrorResult": { - "$ref": "#/definitions/ErrorResult" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "resources": { - "type": "array", - "items": { - "$ref": "#/definitions/UnitResourceResult" - } - } - }, - "additionalProperties": false, - "required": [ - "ErrorResult", - "resources" - ] - } - } - } - }, - { - "Name": "RetryStrategy", - "Description": "RetryStrategyAPI implements RetryStrategy", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "RetryStrategy": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/RetryStrategyResults" - } - }, - "description": "RetryStrategy returns RetryStrategyResults that can be used by any code that uses\nto configure the retry timer that's currently in juju utils." - }, - "WatchRetryStrategy": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "WatchRetryStrategy watches for changes to the model. Currently we only allow\nchanges to the boolean that determines whether retries should be attempted or not." - } - }, - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "NotifyWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "RetryStrategy": { - "type": "object", - "properties": { - "jitter-retry-time": { - "type": "boolean" - }, - "max-retry-time": { - "type": "integer" - }, - "min-retry-time": { - "type": "integer" - }, - "retry-time-factor": { - "type": "integer" - }, - "should-retry": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "should-retry", - "min-retry-time", - "max-retry-time", - "jitter-retry-time", - "retry-time-factor" - ] - }, - "RetryStrategyResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/RetryStrategy" - } - }, - "additionalProperties": false - }, - "RetryStrategyResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/RetryStrategyResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - } - } - } - }, - { - "Name": "SSHClient", - "Description": "Facade implements the API required by the sshclient worker.", - "Version": 4, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "AllAddresses": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/SSHAddressesResults" - } - }, - "description": "AllAddresses reports all addresses that might have SSH listening for each\nentity in args. The result is sorted with public addresses first.\nMachines and units are supported as entity types." - }, - "ModelCredentialForSSH": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/CloudSpecResult" - } - }, - "description": "ModelCredentialForSSH returns a cloud spec for ssh purpose.\nThis facade call is only used for k8s model." - }, - "PrivateAddress": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/SSHAddressResults" - } - }, - "description": "PrivateAddress reports the preferred private network address for one or\nmore entities. Machines and units are supported." - }, - "Proxy": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/SSHProxyResult" - } - }, - "description": "Proxy returns whether SSH connections should be proxied through the\ncontroller hosts for the model associated with the API connection." - }, - "PublicAddress": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/SSHAddressResults" - } - }, - "description": "PublicAddress reports the preferred public network address for one\nor more entities. Machines and units are supported." - }, - "PublicKeys": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/SSHPublicKeysResults" - } - }, - "description": "PublicKeys returns the public SSH hosts for one or more\nentities. Machines and units are supported." - } - }, - "definitions": { - "CloudCredential": { - "type": "object", - "properties": { - "attrs": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "auth-type": { - "type": "string" - }, - "redacted": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "auth-type" - ] - }, - "CloudSpec": { - "type": "object", - "properties": { - "cacertificates": { - "type": "array", - "items": { - "type": "string" - } - }, - "credential": { - "$ref": "#/definitions/CloudCredential" - }, - "endpoint": { - "type": "string" - }, - "identity-endpoint": { - "type": "string" - }, - "is-controller-cloud": { - "type": "boolean" - }, - "name": { - "type": "string" - }, - "region": { - "type": "string" - }, - "skip-tls-verify": { - "type": "boolean" - }, - "storage-endpoint": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type", - "name" - ] - }, - "CloudSpecResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/CloudSpec" - } - }, - "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": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "SSHAddressResult": { - "type": "object", - "properties": { - "address": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "SSHAddressResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/SSHAddressResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "SSHAddressesResult": { - "type": "object", - "properties": { - "addresses": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "addresses" - ] - }, - "SSHAddressesResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/SSHAddressesResult" - } - } - }, - "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" - }, - "public-keys": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "SSHPublicKeysResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/SSHPublicKeysResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - } - } - } - }, - { - "Name": "SecretBackends", - "Description": "SecretBackendsAPI is the server implementation for the SecretBackends facade.", - "Version": 1, - "AvailableTo": [ - "controller-user" - ], - "Schema": { - "type": "object", - "properties": { - "AddSecretBackends": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/AddSecretBackendArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "AddSecretBackends adds new secret backends." - }, - "ListSecretBackends": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ListSecretBackendsArgs" - }, - "Result": { - "$ref": "#/definitions/ListSecretBackendsResults" - } - }, - "description": "ListSecretBackends lists available secret backends." - }, - "RemoveSecretBackends": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RemoveSecretBackendArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "RemoveSecretBackends removes secret backends." - }, - "UpdateSecretBackends": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/UpdateSecretBackendArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "UpdateSecretBackends updates secret backends." - } - }, - "definitions": { - "AddSecretBackendArg": { - "type": "object", - "properties": { - "SecretBackend": { - "$ref": "#/definitions/SecretBackend" - }, - "backend-type": { - "type": "string" - }, - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "token-rotate-interval": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "name", - "backend-type", - "config", - "SecretBackend" - ] - }, - "AddSecretBackendArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/AddSecretBackendArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ListSecretBackendsArgs": { - "type": "object", - "properties": { - "names": { - "type": "array", - "items": { - "type": "string" - } - }, - "reveal": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "names", - "reveal" - ] - }, - "ListSecretBackendsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/SecretBackendResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "RemoveSecretBackendArg": { - "type": "object", - "properties": { - "force": { - "type": "boolean" - }, - "name": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name" - ] - }, - "RemoveSecretBackendArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoveSecretBackendArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "SecretBackend": { - "type": "object", - "properties": { - "backend-type": { - "type": "string" - }, - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "name": { - "type": "string" - }, - "token-rotate-interval": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "name", - "backend-type", - "config" - ] - }, - "SecretBackendResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "id": { - "type": "string" - }, - "message": { - "type": "string" - }, - "num-secrets": { - "type": "integer" - }, - "result": { - "$ref": "#/definitions/SecretBackend" - }, - "status": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "result", - "id", - "num-secrets", - "status" - ] - }, - "UpdateSecretBackendArg": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "force": { - "type": "boolean" - }, - "name": { - "type": "string" - }, - "name-change": { - "type": "string" - }, - "reset": { - "type": "array", - "items": { - "type": "string" - } - }, - "token-rotate-interval": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "name", - "token-rotate-interval", - "config", - "reset" - ] - }, - "UpdateSecretBackendArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/UpdateSecretBackendArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - } - } - } - }, - { - "Name": "SecretBackendsManager", - "Description": "SecretBackendsManagerAPI is the implementation for the SecretsManager facade.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent" - ], - "Schema": { - "type": "object", - "properties": { - "RotateBackendTokens": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RotateSecretBackendArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "RotateBackendTokens rotates the tokens for the specified backends." - }, - "WatchSecretBackendsRotateChanges": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/SecretBackendRotateWatchResult" - } - }, - "description": "WatchSecretBackendsRotateChanges sets up a watcher to notify of changes to secret backend rotations." - } - }, - "definitions": { - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "RotateSecretBackendArgs": { - "type": "object", - "properties": { - "backend-ids": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "backend-ids" - ] - }, - "SecretBackendRotateChange": { - "type": "object", - "properties": { - "backend-name": { - "type": "string" - }, - "id": { - "type": "string" - }, - "next-trigger-time": { - "type": "string", - "format": "date-time" - } - }, - "additionalProperties": false, - "required": [ - "id", - "backend-name", - "next-trigger-time" - ] - }, - "SecretBackendRotateWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "$ref": "#/definitions/SecretBackendRotateChange" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id", - "changes" - ] - } - } - } - }, - { - "Name": "SecretBackendsRotateWatcher", - "Description": "srvSecretBackendsRotateWatcher defines the API wrapping a SecretBackendsRotateWatcher.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "Next": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/SecretBackendRotateWatchResult" - } - }, - "description": "Next returns when a change has occurred to an entity of the\ncollection being watched since the most recent call to Next\nor the Watch call that created the srvSecretRotationWatcher." - }, - "Stop": { - "type": "object", - "description": "Stop stops the watcher." - } - }, - "definitions": { - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "SecretBackendRotateChange": { - "type": "object", - "properties": { - "backend-name": { - "type": "string" - }, - "id": { - "type": "string" - }, - "next-trigger-time": { - "type": "string", - "format": "date-time" - } - }, - "additionalProperties": false, - "required": [ - "id", - "backend-name", - "next-trigger-time" - ] - }, - "SecretBackendRotateWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "$ref": "#/definitions/SecretBackendRotateChange" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id", - "changes" - ] - } - } - } - }, - { - "Name": "Secrets", - "Description": "SecretsAPI is the backend for the Secrets facade.", - "Version": 1, - "AvailableTo": [ - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "ListSecrets": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ListSecretsArgs" - }, - "Result": { - "$ref": "#/definitions/ListSecretResults" - } - }, - "description": "ListSecrets lists available secrets." - } - }, - "definitions": { - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ListSecretResult": { - "type": "object", - "properties": { - "create-time": { - "type": "string", - "format": "date-time" - }, - "description": { - "type": "string" - }, - "label": { - "type": "string" - }, - "latest-expire-time": { - "type": "string", - "format": "date-time" - }, - "latest-revision": { - "type": "integer" - }, - "next-rotate-time": { - "type": "string", - "format": "date-time" - }, - "owner-tag": { - "type": "string" - }, - "revisions": { - "type": "array", - "items": { - "$ref": "#/definitions/SecretRevision" - } - }, - "rotate-policy": { - "type": "string" - }, - "update-time": { - "type": "string", - "format": "date-time" - }, - "uri": { - "type": "string" - }, - "value": { - "$ref": "#/definitions/SecretValueResult" - }, - "version": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "uri", - "version", - "owner-tag", - "latest-revision", - "create-time", - "update-time", - "revisions" - ] - }, - "ListSecretResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ListSecretResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ListSecretsArgs": { - "type": "object", - "properties": { - "filter": { - "$ref": "#/definitions/SecretsFilter" - }, - "show-secrets": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "show-secrets", - "filter" - ] - }, - "SecretRevision": { - "type": "object", - "properties": { - "backend-name": { - "type": "string" - }, - "create-time": { - "type": "string", - "format": "date-time" - }, - "expire-time": { - "type": "string", - "format": "date-time" - }, - "revision": { - "type": "integer" - }, - "update-time": { - "type": "string", - "format": "date-time" - }, - "value-ref": { - "$ref": "#/definitions/SecretValueRef" - } - }, - "additionalProperties": false, - "required": [ - "revision" - ] - }, - "SecretValueRef": { - "type": "object", - "properties": { - "backend-id": { - "type": "string" - }, - "revision-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "backend-id", - "revision-id" - ] - }, - "SecretValueResult": { - "type": "object", - "properties": { - "data": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "SecretsFilter": { - "type": "object", - "properties": { - "owner-tag": { - "type": "string" - }, - "revision": { - "type": "integer" - }, - "uri": { - "type": "string" - } - }, - "additionalProperties": false - } - } - } - }, - { - "Name": "SecretsManager", - "Description": "SecretsManagerAPI is the implementation for the SecretsManager facade.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "CreateSecretURIs": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/CreateSecretURIsArg" - }, - "Result": { - "$ref": "#/definitions/StringResults" - } - }, - "description": "CreateSecretURIs creates new secret URIs." - }, - "CreateSecrets": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/CreateSecretArgs" - }, - "Result": { - "$ref": "#/definitions/StringResults" - } - }, - "description": "CreateSecrets creates new secrets." - }, - "GetConsumerSecretsRevisionInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/GetSecretConsumerInfoArgs" - }, - "Result": { - "$ref": "#/definitions/SecretConsumerInfoResults" - } - }, - "description": "GetConsumerSecretsRevisionInfo returns the latest secret revisions for the specified secrets." - }, - "GetSecretBackendConfig": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SecretBackendArgs" - }, - "Result": { - "$ref": "#/definitions/SecretBackendConfigResults" - } - }, - "description": "GetSecretBackendConfig gets the config needed to create a client to secret backends." - }, - "GetSecretContentInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/GetSecretContentArgs" - }, - "Result": { - "$ref": "#/definitions/SecretContentResults" - } - }, - "description": "GetSecretContentInfo returns the secret values for the specified secrets." - }, - "GetSecretMetadata": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ListSecretResults" - } - }, - "description": "GetSecretMetadata returns metadata for the caller's secrets." - }, - "GetSecretRevisionContentInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SecretRevisionArg" - }, - "Result": { - "$ref": "#/definitions/SecretContentResults" - } - }, - "description": "GetSecretRevisionContentInfo returns the secret values for the specified secret revisions.\nUsed when deleting a secret; only returns external revision info." - }, - "RemoveSecrets": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/DeleteSecretArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "RemoveSecrets removes the specified secrets." - }, - "SecretsGrant": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/GrantRevokeSecretArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SecretsGrant grants access to a secret for the specified subjects." - }, - "SecretsRevoke": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/GrantRevokeSecretArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SecretsRevoke revokes access to a secret for the specified subjects." - }, - "SecretsRotated": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SecretRotatedArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SecretsRotated records when secrets were last rotated." - }, - "UpdateSecrets": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/UpdateSecretArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "UpdateSecrets updates the specified secrets." - }, - "WatchConsumedSecretsChanges": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - }, - "description": "WatchConsumedSecretsChanges sets up a watcher to notify of changes to secret revisions for the specified consumers." - }, - "WatchObsolete": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResult" - } - }, - "description": "WatchObsolete returns a watcher for notifying when:\n - a secret owned by the entity is deleted\n - a secret revision owed by the entity no longer\n has any consumers\n\nObsolete revisions results are \"uri/revno\" and deleted\nsecret results are \"uri\"." - }, - "WatchSecretRevisionsExpiryChanges": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/SecretTriggerWatchResult" - } - }, - "description": "WatchSecretRevisionsExpiryChanges sets up a watcher to notify of changes to secret revision expiry config." - }, - "WatchSecretsRotationChanges": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/SecretTriggerWatchResult" - } - }, - "description": "WatchSecretsRotationChanges sets up a watcher to notify of changes to secret rotation config." - } - }, - "definitions": { - "CreateSecretArg": { - "type": "object", - "properties": { - "UpsertSecretArg": { - "$ref": "#/definitions/UpsertSecretArg" - }, - "content": { - "$ref": "#/definitions/SecretContentParams" - }, - "description": { - "type": "string" - }, - "expire-time": { - "type": "string", - "format": "date-time" - }, - "label": { - "type": "string" - }, - "owner-tag": { - "type": "string" - }, - "params": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "rotate-policy": { - "type": "string" - }, - "uri": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "UpsertSecretArg", - "owner-tag" - ] - }, - "CreateSecretArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/CreateSecretArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "CreateSecretURIsArg": { - "type": "object", - "properties": { - "count": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "count" - ] - }, - "DeleteSecretArg": { - "type": "object", - "properties": { - "revisions": { - "type": "array", - "items": { - "type": "integer" - } - }, - "uri": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "uri" - ] - }, - "DeleteSecretArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/DeleteSecretArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "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": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "GetSecretConsumerInfoArgs": { - "type": "object", - "properties": { - "consumer-tag": { - "type": "string" - }, - "uris": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "consumer-tag", - "uris" - ] - }, - "GetSecretContentArg": { - "type": "object", - "properties": { - "label": { - "type": "string" - }, - "peek": { - "type": "boolean" - }, - "refresh": { - "type": "boolean" - }, - "uri": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "uri" - ] - }, - "GetSecretContentArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/GetSecretContentArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "GrantRevokeSecretArg": { - "type": "object", - "properties": { - "role": { - "type": "string" - }, - "scope-tag": { - "type": "string" - }, - "subject-tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "uri": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "uri", - "scope-tag", - "subject-tags", - "role" - ] - }, - "GrantRevokeSecretArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/GrantRevokeSecretArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "ListSecretResult": { - "type": "object", - "properties": { - "create-time": { - "type": "string", - "format": "date-time" - }, - "description": { - "type": "string" - }, - "label": { - "type": "string" - }, - "latest-expire-time": { - "type": "string", - "format": "date-time" - }, - "latest-revision": { - "type": "integer" - }, - "next-rotate-time": { - "type": "string", - "format": "date-time" - }, - "owner-tag": { - "type": "string" - }, - "revisions": { - "type": "array", - "items": { - "$ref": "#/definitions/SecretRevision" - } - }, - "rotate-policy": { - "type": "string" - }, - "update-time": { - "type": "string", - "format": "date-time" - }, - "uri": { - "type": "string" - }, - "value": { - "$ref": "#/definitions/SecretValueResult" - }, - "version": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "uri", - "version", - "owner-tag", - "latest-revision", - "create-time", - "update-time", - "revisions" - ] - }, - "ListSecretResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ListSecretResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "SecretBackendArgs": { - "type": "object", - "properties": { - "backend-ids": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "backend-ids" - ] - }, - "SecretBackendConfig": { - "type": "object", - "properties": { - "params": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type" - ] - }, - "SecretBackendConfigResult": { - "type": "object", - "properties": { - "config": { - "$ref": "#/definitions/SecretBackendConfig" - }, - "draining": { - "type": "boolean" - }, - "model-controller": { - "type": "string" - }, - "model-name": { - "type": "string" - }, - "model-uuid": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "model-controller", - "model-uuid", - "model-name", - "draining" - ] - }, - "SecretBackendConfigResults": { - "type": "object", - "properties": { - "active-id": { - "type": "string" - }, - "results": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/SecretBackendConfigResult" - } - } - } - }, - "additionalProperties": false, - "required": [ - "active-id" - ] - }, - "SecretConsumerInfoResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "label": { - "type": "string" - }, - "revision": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "revision", - "label" - ] - }, - "SecretConsumerInfoResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/SecretConsumerInfoResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "SecretContentParams": { - "type": "object", - "properties": { - "data": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "value-ref": { - "$ref": "#/definitions/SecretValueRef" - } - }, - "additionalProperties": false - }, - "SecretContentResult": { - "type": "object", - "properties": { - "backend-config": { - "$ref": "#/definitions/SecretBackendConfigResult" - }, - "content": { - "$ref": "#/definitions/SecretContentParams" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "latest-revision": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "content" - ] - }, - "SecretContentResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/SecretContentResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "SecretRevision": { - "type": "object", - "properties": { - "backend-name": { - "type": "string" - }, - "create-time": { - "type": "string", - "format": "date-time" - }, - "expire-time": { - "type": "string", - "format": "date-time" - }, - "revision": { - "type": "integer" - }, - "update-time": { - "type": "string", - "format": "date-time" - }, - "value-ref": { - "$ref": "#/definitions/SecretValueRef" - } - }, - "additionalProperties": false, - "required": [ - "revision" - ] - }, - "SecretRevisionArg": { - "type": "object", - "properties": { - "pending-delete": { - "type": "boolean" - }, - "revisions": { - "type": "array", - "items": { - "type": "integer" - } - }, - "uri": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "uri", - "revisions", - "pending-delete" - ] - }, - "SecretRotatedArg": { - "type": "object", - "properties": { - "original-revision": { - "type": "integer" - }, - "skip": { - "type": "boolean" - }, - "uri": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "uri", - "original-revision", - "skip" - ] - }, - "SecretRotatedArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/SecretRotatedArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "SecretTriggerChange": { - "type": "object", - "properties": { - "next-trigger-time": { - "type": "string", - "format": "date-time" - }, - "revision": { - "type": "integer" - }, - "uri": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "uri", - "next-trigger-time" - ] - }, - "SecretTriggerWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "$ref": "#/definitions/SecretTriggerChange" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id", - "changes" - ] - }, - "SecretValueRef": { - "type": "object", - "properties": { - "backend-id": { - "type": "string" - }, - "revision-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "backend-id", - "revision-id" - ] - }, - "SecretValueResult": { - "type": "object", - "properties": { - "data": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "StringResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "StringResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "StringsWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id" - ] - }, - "StringsWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringsWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "UpdateSecretArg": { - "type": "object", - "properties": { - "UpsertSecretArg": { - "$ref": "#/definitions/UpsertSecretArg" - }, - "content": { - "$ref": "#/definitions/SecretContentParams" - }, - "description": { - "type": "string" - }, - "expire-time": { - "type": "string", - "format": "date-time" - }, - "label": { - "type": "string" - }, - "params": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "rotate-policy": { - "type": "string" - }, - "uri": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "UpsertSecretArg", - "uri" - ] - }, - "UpdateSecretArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/UpdateSecretArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "UpsertSecretArg": { - "type": "object", - "properties": { - "content": { - "$ref": "#/definitions/SecretContentParams" - }, - "description": { - "type": "string" - }, - "expire-time": { - "type": "string", - "format": "date-time" - }, - "label": { - "type": "string" - }, - "params": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "rotate-policy": { - "type": "string" - } - }, - "additionalProperties": false - } - } - } - }, - { - "Name": "SecretsTriggerWatcher", - "Description": "srvSecretTriggerWatcher defines the API wrapping a SecretsTriggerWatcher.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "Next": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/SecretTriggerWatchResult" - } - }, - "description": "Next returns when a change has occurred to an entity of the\ncollection being watched since the most recent call to Next\nor the Watch call that created the srvSecretRotationWatcher." - }, - "Stop": { - "type": "object", - "description": "Stop stops the watcher." - } - }, - "definitions": { - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "SecretTriggerChange": { - "type": "object", - "properties": { - "next-trigger-time": { - "type": "string", - "format": "date-time" - }, - "revision": { - "type": "integer" - }, - "uri": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "uri", - "next-trigger-time" - ] - }, - "SecretTriggerWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "$ref": "#/definitions/SecretTriggerChange" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id", - "changes" - ] - } - } - } - }, - { - "Name": "Singular", - "Description": "Facade allows controller machines to request exclusive rights to administer\nsome specific model or controller for a limited time.", - "Version": 2, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "Claim": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SingularClaims" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "Claim makes the supplied singular-controller lease requests. (In practice,\nany requests not for the connection's model or controller, or not on behalf\nof the connected ModelManager machine, will be rejected.)" - }, - "Wait": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "Wait waits for the singular-controller lease to expire for all supplied\nentities. (In practice, any requests that do not refer to the connection's\nmodel or controller will be rejected.)" - } - }, - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "SingularClaim": { - "type": "object", - "properties": { - "claimant-tag": { - "type": "string" - }, - "duration": { - "type": "integer" - }, - "entity-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "entity-tag", - "claimant-tag", - "duration" - ] - }, - "SingularClaims": { - "type": "object", - "properties": { - "claims": { - "type": "array", - "items": { - "$ref": "#/definitions/SingularClaim" - } - } - }, - "additionalProperties": false, - "required": [ - "claims" - ] - } - } - } - }, - { - "Name": "Spaces", - "Description": "API provides the spaces API facade for version 6.", - "Version": 6, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "CreateSpaces": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/CreateSpacesParams" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "CreateSpaces creates a new Juju network space, associating the\nspecified subnets with it (optional; can be empty)." - }, - "ListSpaces": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ListSpacesResults" - } - }, - "description": "ListSpaces lists all the available spaces and their associated subnets." - }, - "MoveSubnets": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/MoveSubnetsParams" - }, - "Result": { - "$ref": "#/definitions/MoveSubnetsResults" - } - }, - "description": "MoveSubnets ensures that the input subnets are in the input space." - }, - "ReloadSpaces": { - "type": "object", - "description": "ReloadSpaces refreshes spaces from substrate" - }, - "RemoveSpace": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RemoveSpaceParams" - }, - "Result": { - "$ref": "#/definitions/RemoveSpaceResults" - } - }, - "description": "RemoveSpace removes a space.\nReturns SpaceResults if entities/settings are found which makes the deletion not possible." - }, - "RenameSpace": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RenameSpacesParams" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "RenameSpace renames a space." - }, - "ShowSpace": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ShowSpaceResults" - } - }, - "description": "ShowSpace shows the spaces for a set of given entities." - } - }, - "definitions": { - "CreateSpaceParams": { - "type": "object", - "properties": { - "cidrs": { - "type": "array", - "items": { - "type": "string" - } - }, - "provider-id": { - "type": "string" - }, - "public": { - "type": "boolean" - }, - "space-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "cidrs", - "space-tag", - "public" - ] - }, - "CreateSpacesParams": { - "type": "object", - "properties": { - "spaces": { - "type": "array", - "items": { - "$ref": "#/definitions/CreateSpaceParams" - } - } - }, - "additionalProperties": false, - "required": [ - "spaces" - ] - }, - "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": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ListSpacesResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/Space" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "MoveSubnetsParam": { - "type": "object", - "properties": { - "force": { - "type": "boolean" - }, - "space-tag": { - "type": "string" - }, - "subnets": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "subnets", - "space-tag", - "force" - ] - }, - "MoveSubnetsParams": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/MoveSubnetsParam" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "MoveSubnetsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "moved-subnets": { - "type": "array", - "items": { - "$ref": "#/definitions/MovedSubnet" - } - }, - "new-space": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "new-space" - ] - }, - "MoveSubnetsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/MoveSubnetsResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "MovedSubnet": { - "type": "object", - "properties": { - "cidr": { - "type": "string" - }, - "old-space": { - "type": "string" - }, - "subnet": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "subnet", - "old-space", - "cidr" - ] - }, - "RemoveSpaceParam": { - "type": "object", - "properties": { - "dry-run": { - "type": "boolean" - }, - "force": { - "type": "boolean" - }, - "space": { - "$ref": "#/definitions/Entity" - } - }, - "additionalProperties": false, - "required": [ - "space" - ] - }, - "RemoveSpaceParams": { - "type": "object", - "properties": { - "space-param": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoveSpaceParam" - } - } - }, - "additionalProperties": false, - "required": [ - "space-param" - ] - }, - "RemoveSpaceResult": { - "type": "object", - "properties": { - "bindings": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } - }, - "constraints": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } - }, - "controller-settings": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "RemoveSpaceResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoveSpaceResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "RenameSpaceParams": { - "type": "object", - "properties": { - "from-space-tag": { - "type": "string" - }, - "to-space-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "from-space-tag", - "to-space-tag" - ] - }, - "RenameSpacesParams": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "$ref": "#/definitions/RenameSpaceParams" - } - } - }, - "additionalProperties": false, - "required": [ - "changes" - ] - }, - "ShowSpaceResult": { - "type": "object", - "properties": { - "applications": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "machine-count": { - "type": "integer" - }, - "space": { - "$ref": "#/definitions/Space" - } - }, - "additionalProperties": false, - "required": [ - "space", - "applications", - "machine-count" - ] - }, - "ShowSpaceResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ShowSpaceResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "Space": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "subnets": { - "type": "array", - "items": { - "$ref": "#/definitions/Subnet" - } - } - }, - "additionalProperties": false, - "required": [ - "id", - "name", - "subnets" - ] - }, - "Subnet": { - "type": "object", - "properties": { - "cidr": { - "type": "string" - }, - "life": { - "type": "string" - }, - "provider-id": { - "type": "string" - }, - "provider-network-id": { - "type": "string" - }, - "provider-space-id": { - "type": "string" - }, - "space-tag": { - "type": "string" - }, - "status": { - "type": "string" - }, - "vlan-tag": { - "type": "integer" - }, - "zones": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "cidr", - "vlan-tag", - "life", - "space-tag", - "zones" - ] - } - } - } - }, - { - "Name": "StatusHistory", - "Description": "API is the concrete implementation of the Pruner endpoint.", - "Version": 2, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "ModelConfig": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ModelConfigResult" - } - }, - "description": "ModelConfig returns the current model's configuration." - }, - "Prune": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/StatusHistoryPruneArgs" - } - }, - "description": "Prune endpoint removes status history entries until\nonly the ones newer than now - p.MaxHistoryTime remain and\nthe history is smaller than p.MaxHistoryMB." - }, - "WatchForModelConfigChanges": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResult" - } - }, - "description": "WatchForModelConfigChanges returns a NotifyWatcher that observes\nchanges to the model configuration.\nNote that although the NotifyWatchResult contains an Error field,\nit's not used because we are only returning a single watcher,\nso we use the regular error return." - } - }, - "definitions": { - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ModelConfigResult": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "StatusHistoryPruneArgs": { - "type": "object", - "properties": { - "max-history-mb": { - "type": "integer" - }, - "max-history-time": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "max-history-time", - "max-history-mb" - ] - } - } - } - }, - { - "Name": "Storage", - "Description": "StorageAPI implements the latest version (v6) of the Storage API.", - "Version": 6, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "AddToUnit": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/StoragesAddParams" - }, - "Result": { - "$ref": "#/definitions/AddStorageResults" - } - }, - "description": "AddToUnit validates and creates additional storage instances for units.\nA \"CHANGE\" block can block this operation." - }, - "Attach": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/StorageAttachmentIds" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "Attach attaches existing storage instances to units.\nA \"CHANGE\" block can block this operation." - }, - "CreatePool": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/StoragePoolArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "CreatePool creates a new pool with specified parameters." - }, - "DetachStorage": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/StorageDetachmentParams" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "DetachStorage sets the specified storage attachments to Dying, unless they are\nalready Dying or Dead. Any associated, persistent storage will remain\nalive. This call can be forced." - }, - "Import": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/BulkImportStorageParams" - }, - "Result": { - "$ref": "#/definitions/ImportStorageResults" - } - }, - "description": "Import imports existing storage into the model.\nA \"CHANGE\" block can block this operation." - }, - "ListFilesystems": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/FilesystemFilters" - }, - "Result": { - "$ref": "#/definitions/FilesystemDetailsListResults" - } - }, - "description": "ListFilesystems returns a list of filesystems in the environment matching\nthe provided filter. Each result describes a filesystem in detail, including\nthe filesystem's attachments." - }, - "ListPools": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/StoragePoolFilters" - }, - "Result": { - "$ref": "#/definitions/StoragePoolsResults" - } - }, - "description": "ListPools returns a list of pools.\nIf filter is provided, returned list only contains pools that match\nthe filter.\nPools can be filtered on names and provider types.\nIf both names and types are provided as filter,\npools that match either are returned.\nThis method lists union of pools and environment provider types.\nIf no filter is provided, all pools are returned." - }, - "ListStorageDetails": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/StorageFilters" - }, - "Result": { - "$ref": "#/definitions/StorageDetailsListResults" - } - }, - "description": "ListStorageDetails returns storage matching a filter." - }, - "ListVolumes": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/VolumeFilters" - }, - "Result": { - "$ref": "#/definitions/VolumeDetailsListResults" - } - }, - "description": "ListVolumes lists volumes with the given filters. Each filter produces\nan independent list of volumes, or an error if the filter is invalid\nor the volumes could not be listed." - }, - "Remove": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RemoveStorage" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "Remove sets the specified storage entities to Dying, unless they are\nalready Dying or Dead, such that the storage will eventually be removed\nfrom the model. If the arguments specify that the storage should be\ndestroyed, then the associated cloud storage will be destroyed first;\notherwise it will only be released from Juju's control." - }, - "RemovePool": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/StoragePoolDeleteArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "RemovePool deletes the named pool" - }, - "StorageDetails": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StorageDetailsResults" - } - }, - "description": "StorageDetails retrieves and returns detailed information about desired\nstorage identified by supplied tags. If specified storage cannot be\nretrieved, individual error is returned instead of storage information." - }, - "UpdatePool": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/StoragePoolArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "UpdatePool deletes the named pool" - } - }, - "definitions": { - "AddStorageDetails": { - "type": "object", - "properties": { - "storage-tags": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "storage-tags" - ] - }, - "AddStorageResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/AddStorageDetails" - } - }, - "additionalProperties": false - }, - "AddStorageResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/AddStorageResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "BulkImportStorageParams": { - "type": "object", - "properties": { - "storage": { - "type": "array", - "items": { - "$ref": "#/definitions/ImportStorageParams" - } - } - }, - "additionalProperties": false, - "required": [ - "storage" - ] - }, - "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" - ] - }, - "EntityStatus": { - "type": "object", - "properties": { - "data": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "info": { - "type": "string" - }, - "since": { - "type": "string", - "format": "date-time" - }, - "status": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "status", - "info", - "since" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "FilesystemAttachmentDetails": { - "type": "object", - "properties": { - "FilesystemAttachmentInfo": { - "$ref": "#/definitions/FilesystemAttachmentInfo" - }, - "life": { - "type": "string" - }, - "mount-point": { - "type": "string" - }, - "read-only": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "FilesystemAttachmentInfo" - ] - }, - "FilesystemAttachmentInfo": { - "type": "object", - "properties": { - "mount-point": { - "type": "string" - }, - "read-only": { - "type": "boolean" - } - }, - "additionalProperties": false - }, - "FilesystemDetails": { - "type": "object", - "properties": { - "filesystem-tag": { - "type": "string" - }, - "info": { - "$ref": "#/definitions/FilesystemInfo" - }, - "life": { - "type": "string" - }, - "machine-attachments": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/FilesystemAttachmentDetails" - } - } - }, - "status": { - "$ref": "#/definitions/EntityStatus" - }, - "storage": { - "$ref": "#/definitions/StorageDetails" - }, - "unit-attachments": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/FilesystemAttachmentDetails" - } - } - }, - "volume-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "filesystem-tag", - "info", - "status" - ] - }, - "FilesystemDetailsListResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "array", - "items": { - "$ref": "#/definitions/FilesystemDetails" - } - } - }, - "additionalProperties": false - }, - "FilesystemDetailsListResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/FilesystemDetailsListResult" - } - } - }, - "additionalProperties": false - }, - "FilesystemFilter": { - "type": "object", - "properties": { - "machines": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "FilesystemFilters": { - "type": "object", - "properties": { - "filters": { - "type": "array", - "items": { - "$ref": "#/definitions/FilesystemFilter" - } - } - }, - "additionalProperties": false - }, - "FilesystemInfo": { - "type": "object", - "properties": { - "filesystem-id": { - "type": "string" - }, - "pool": { - "type": "string" - }, - "size": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "filesystem-id", - "pool", - "size" - ] - }, - "ImportStorageDetails": { - "type": "object", - "properties": { - "storage-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "storage-tag" - ] - }, - "ImportStorageParams": { - "type": "object", - "properties": { - "kind": { - "type": "integer" - }, - "pool": { - "type": "string" - }, - "provider-id": { - "type": "string" - }, - "storage-name": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "kind", - "pool", - "provider-id", - "storage-name" - ] - }, - "ImportStorageResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/ImportStorageDetails" - } - }, - "additionalProperties": false - }, - "ImportStorageResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ImportStorageResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "RemoveStorage": { - "type": "object", - "properties": { - "storage": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoveStorageInstance" - } - } - }, - "additionalProperties": false, - "required": [ - "storage" - ] - }, - "RemoveStorageInstance": { - "type": "object", - "properties": { - "destroy-attachments": { - "type": "boolean" - }, - "destroy-storage": { - "type": "boolean" - }, - "force": { - "type": "boolean" - }, - "max-wait": { - "type": "integer" - }, - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag" - ] - }, - "StorageAddParams": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "storage": { - "$ref": "#/definitions/StorageConstraints" - }, - "unit": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "unit", - "name", - "storage" - ] - }, - "StorageAttachmentDetails": { - "type": "object", - "properties": { - "life": { - "type": "string" - }, - "location": { - "type": "string" - }, - "machine-tag": { - "type": "string" - }, - "storage-tag": { - "type": "string" - }, - "unit-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "storage-tag", - "unit-tag", - "machine-tag" - ] - }, - "StorageAttachmentId": { - "type": "object", - "properties": { - "storage-tag": { - "type": "string" - }, - "unit-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "storage-tag", - "unit-tag" - ] - }, - "StorageAttachmentIds": { - "type": "object", - "properties": { - "ids": { - "type": "array", - "items": { - "$ref": "#/definitions/StorageAttachmentId" - } - } - }, - "additionalProperties": false, - "required": [ - "ids" - ] - }, - "StorageConstraints": { - "type": "object", - "properties": { - "count": { - "type": "integer" - }, - "pool": { - "type": "string" - }, - "size": { - "type": "integer" - } - }, - "additionalProperties": false - }, - "StorageDetachmentParams": { - "type": "object", - "properties": { - "force": { - "type": "boolean" - }, - "ids": { - "$ref": "#/definitions/StorageAttachmentIds" - }, - "max-wait": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "ids" - ] - }, - "StorageDetails": { - "type": "object", - "properties": { - "attachments": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/StorageAttachmentDetails" - } - } - }, - "kind": { - "type": "integer" - }, - "life": { - "type": "string" - }, - "owner-tag": { - "type": "string" - }, - "persistent": { - "type": "boolean" - }, - "status": { - "$ref": "#/definitions/EntityStatus" - }, - "storage-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "storage-tag", - "owner-tag", - "kind", - "status", - "persistent" - ] - }, - "StorageDetailsListResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "array", - "items": { - "$ref": "#/definitions/StorageDetails" - } - } - }, - "additionalProperties": false - }, - "StorageDetailsListResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StorageDetailsListResult" - } - } - }, - "additionalProperties": false - }, - "StorageDetailsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/StorageDetails" - } - }, - "additionalProperties": false - }, - "StorageDetailsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StorageDetailsResult" - } - } - }, - "additionalProperties": false - }, - "StorageFilter": { - "type": "object", - "additionalProperties": false - }, - "StorageFilters": { - "type": "object", - "properties": { - "filters": { - "type": "array", - "items": { - "$ref": "#/definitions/StorageFilter" - } - } - }, - "additionalProperties": false - }, - "StoragePool": { - "type": "object", - "properties": { - "attrs": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "name": { - "type": "string" - }, - "provider": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "provider", - "attrs" - ] - }, - "StoragePoolArgs": { - "type": "object", - "properties": { - "pools": { - "type": "array", - "items": { - "$ref": "#/definitions/StoragePool" - } - } - }, - "additionalProperties": false, - "required": [ - "pools" - ] - }, - "StoragePoolDeleteArg": { - "type": "object", - "properties": { - "name": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name" - ] - }, - "StoragePoolDeleteArgs": { - "type": "object", - "properties": { - "pools": { - "type": "array", - "items": { - "$ref": "#/definitions/StoragePoolDeleteArg" - } - } - }, - "additionalProperties": false, - "required": [ - "pools" - ] - }, - "StoragePoolFilter": { - "type": "object", - "properties": { - "names": { - "type": "array", - "items": { - "type": "string" - } - }, - "providers": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "StoragePoolFilters": { - "type": "object", - "properties": { - "filters": { - "type": "array", - "items": { - "$ref": "#/definitions/StoragePoolFilter" - } - } - }, - "additionalProperties": false - }, - "StoragePoolsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "storage-pools": { - "type": "array", - "items": { - "$ref": "#/definitions/StoragePool" - } - } - }, - "additionalProperties": false - }, - "StoragePoolsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StoragePoolsResult" - } - } - }, - "additionalProperties": false - }, - "StoragesAddParams": { - "type": "object", - "properties": { - "storages": { - "type": "array", - "items": { - "$ref": "#/definitions/StorageAddParams" - } - } - }, - "additionalProperties": false, - "required": [ - "storages" - ] - }, - "VolumeAttachmentDetails": { - "type": "object", - "properties": { - "VolumeAttachmentInfo": { - "$ref": "#/definitions/VolumeAttachmentInfo" - }, - "bus-address": { - "type": "string" - }, - "device-link": { - "type": "string" - }, - "device-name": { - "type": "string" - }, - "life": { - "type": "string" - }, - "plan-info": { - "$ref": "#/definitions/VolumeAttachmentPlanInfo" - }, - "read-only": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "VolumeAttachmentInfo" - ] - }, - "VolumeAttachmentInfo": { - "type": "object", - "properties": { - "bus-address": { - "type": "string" - }, - "device-link": { - "type": "string" - }, - "device-name": { - "type": "string" - }, - "plan-info": { - "$ref": "#/definitions/VolumeAttachmentPlanInfo" - }, - "read-only": { - "type": "boolean" - } - }, - "additionalProperties": false - }, - "VolumeAttachmentPlanInfo": { - "type": "object", - "properties": { - "device-attributes": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "device-type": { - "type": "string" - } - }, - "additionalProperties": false - }, - "VolumeDetails": { - "type": "object", - "properties": { - "info": { - "$ref": "#/definitions/VolumeInfo" - }, - "life": { - "type": "string" - }, - "machine-attachments": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/VolumeAttachmentDetails" - } - } - }, - "status": { - "$ref": "#/definitions/EntityStatus" - }, - "storage": { - "$ref": "#/definitions/StorageDetails" - }, - "unit-attachments": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/VolumeAttachmentDetails" - } - } - }, - "volume-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "volume-tag", - "info", - "status" - ] - }, - "VolumeDetailsListResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "array", - "items": { - "$ref": "#/definitions/VolumeDetails" - } - } - }, - "additionalProperties": false - }, - "VolumeDetailsListResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/VolumeDetailsListResult" - } - } - }, - "additionalProperties": false - }, - "VolumeFilter": { - "type": "object", - "properties": { - "machines": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "VolumeFilters": { - "type": "object", - "properties": { - "filters": { - "type": "array", - "items": { - "$ref": "#/definitions/VolumeFilter" - } - } - }, - "additionalProperties": false - }, - "VolumeInfo": { - "type": "object", - "properties": { - "hardware-id": { - "type": "string" - }, - "persistent": { - "type": "boolean" - }, - "pool": { - "type": "string" - }, - "size": { - "type": "integer" - }, - "volume-id": { - "type": "string" - }, - "wwn": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "volume-id", - "size", - "persistent" - ] - } - } - } - }, - { - "Name": "StorageProvisioner", - "Description": "StorageProvisionerAPIv4 provides the StorageProvisioner API v4 facade.", - "Version": 4, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "AttachmentLife": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/MachineStorageIds" - }, - "Result": { - "$ref": "#/definitions/LifeResults" - } - }, - "description": "AttachmentLife returns the lifecycle state of each specified machine\nstorage attachment." - }, - "CreateVolumeAttachmentPlans": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/VolumeAttachmentPlans" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - } - }, - "EnsureDead": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "EnsureDead calls EnsureDead on each given entity from state. It\nwill fail if the entity is not present. If it's Alive, nothing will\nhappen (see state/EnsureDead() for units or machines)." - }, - "FilesystemAttachmentParams": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/MachineStorageIds" - }, - "Result": { - "$ref": "#/definitions/FilesystemAttachmentParamsResults" - } - }, - "description": "FilesystemAttachmentParams returns the parameters for creating the filesystem\nattachments with the specified IDs." - }, - "FilesystemAttachments": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/MachineStorageIds" - }, - "Result": { - "$ref": "#/definitions/FilesystemAttachmentResults" - } - }, - "description": "FilesystemAttachments returns details of filesystem attachments with the specified IDs." - }, - "FilesystemParams": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/FilesystemParamsResults" - } - }, - "description": "FilesystemParams returns the parameters for creating the filesystems\nwith the specified tags." - }, - "Filesystems": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/FilesystemResults" - } - }, - "description": "Filesystems returns details of filesystems with the specified tags." - }, - "InstanceId": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringResults" - } - }, - "description": "InstanceId returns the provider specific instance id for each given\nmachine or an CodeNotProvisioned error, if not set." - }, - "Life": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/LifeResults" - } - }, - "description": "Life returns the life status of every supplied entity, where available." - }, - "Remove": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "Remove removes volumes and filesystems from state." - }, - "RemoveAttachment": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/MachineStorageIds" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "RemoveAttachment removes the specified machine storage attachments\nfrom state." - }, - "RemoveFilesystemParams": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/RemoveFilesystemParamsResults" - } - }, - "description": "RemoveFilesystemParams returns the parameters for destroying or\nreleasing the filesystems with the specified tags." - }, - "RemoveVolumeAttachmentPlan": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/MachineStorageIds" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - } - }, - "RemoveVolumeParams": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/RemoveVolumeParamsResults" - } - }, - "description": "RemoveVolumeParams returns the parameters for destroying\nor releasing the volumes with the specified tags." - }, - "SetFilesystemAttachmentInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/FilesystemAttachments" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetFilesystemAttachmentInfo records the details of newly provisioned filesystem\nattachments." - }, - "SetFilesystemInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Filesystems" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetFilesystemInfo records the details of newly provisioned filesystems." - }, - "SetStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetStatus" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetStatus sets the status of each given entity." - }, - "SetVolumeAttachmentInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/VolumeAttachments" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetVolumeAttachmentInfo records the details of newly provisioned volume\nattachments." - }, - "SetVolumeAttachmentPlanBlockInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/VolumeAttachmentPlans" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - } - }, - "SetVolumeInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Volumes" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetVolumeInfo records the details of newly provisioned volumes." - }, - "VolumeAttachmentParams": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/MachineStorageIds" - }, - "Result": { - "$ref": "#/definitions/VolumeAttachmentParamsResults" - } - }, - "description": "VolumeAttachmentParams returns the parameters for creating the volume\nattachments with the specified IDs." - }, - "VolumeAttachmentPlans": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/MachineStorageIds" - }, - "Result": { - "$ref": "#/definitions/VolumeAttachmentPlanResults" - } - }, - "description": "VolumeAttachmentPlans returns details of volume attachment plans with the specified IDs." - }, - "VolumeAttachments": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/MachineStorageIds" - }, - "Result": { - "$ref": "#/definitions/VolumeAttachmentResults" - } - }, - "description": "VolumeAttachments returns details of volume attachments with the specified IDs." - }, - "VolumeBlockDevices": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/MachineStorageIds" - }, - "Result": { - "$ref": "#/definitions/BlockDeviceResults" - } - }, - "description": "VolumeBlockDevices returns details of the block devices corresponding to the\nvolume attachments with the specified IDs." - }, - "VolumeParams": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/VolumeParamsResults" - } - }, - "description": "VolumeParams returns the parameters for creating or destroying\nthe volumes with the specified tags." - }, - "Volumes": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/VolumeResults" - } - }, - "description": "Volumes returns details of volumes with the specified tags." - }, - "WatchApplications": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsWatchResult" - } - }, - "description": "WatchApplications starts a StringsWatcher to watch CAAS applications\ndeployed to this model." - }, - "WatchBlockDevices": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "WatchBlockDevices watches for changes to the specified machines' block devices." - }, - "WatchFilesystemAttachments": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/MachineStorageIdsWatchResults" - } - }, - "description": "WatchFilesystemAttachments watches for changes to filesystem attachments\nscoped to the entity with the tag passed to NewState." - }, - "WatchFilesystems": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - }, - "description": "WatchFilesystems watches for changes to filesystems scoped\nto the entity with the tag passed to NewState." - }, - "WatchMachines": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "WatchMachines watches for changes to the specified machines." - }, - "WatchVolumeAttachmentPlans": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/MachineStorageIdsWatchResults" - } - }, - "description": "WatchVolumeAttachmentPlans watches for changes to volume attachments for a machine for the purpose of allowing\nthat machine to run any initialization needed, for that volume to actually appear as a block device (ie: iSCSI)" - }, - "WatchVolumeAttachments": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/MachineStorageIdsWatchResults" - } - }, - "description": "WatchVolumeAttachments watches for changes to volume attachments scoped to\nthe entity with the tag passed to NewState." - }, - "WatchVolumes": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - }, - "description": "WatchVolumes watches for changes to volumes scoped to the\nentity with the tag passed to NewState." - } - }, - "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" - }, - "SerialId": { - "type": "string" - }, - "Size": { - "type": "integer" - }, - "UUID": { - "type": "string" - }, - "WWN": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "DeviceName", - "DeviceLinks", - "Label", - "UUID", - "HardwareId", - "WWN", - "BusAddress", - "Size", - "FilesystemType", - "InUse", - "MountPoint", - "SerialId" - ] - }, - "BlockDeviceResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/BlockDevice" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "BlockDeviceResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/BlockDeviceResult" - } - } - }, - "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" - ] - }, - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "Filesystem": { - "type": "object", - "properties": { - "filesystem-tag": { - "type": "string" - }, - "info": { - "$ref": "#/definitions/FilesystemInfo" - }, - "volume-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "filesystem-tag", - "info" - ] - }, - "FilesystemAttachment": { - "type": "object", - "properties": { - "filesystem-tag": { - "type": "string" - }, - "info": { - "$ref": "#/definitions/FilesystemAttachmentInfo" - }, - "machine-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "filesystem-tag", - "machine-tag", - "info" - ] - }, - "FilesystemAttachmentInfo": { - "type": "object", - "properties": { - "mount-point": { - "type": "string" - }, - "read-only": { - "type": "boolean" - } - }, - "additionalProperties": false - }, - "FilesystemAttachmentParams": { - "type": "object", - "properties": { - "filesystem-id": { - "type": "string" - }, - "filesystem-tag": { - "type": "string" - }, - "instance-id": { - "type": "string" - }, - "machine-tag": { - "type": "string" - }, - "mount-point": { - "type": "string" - }, - "provider": { - "type": "string" - }, - "read-only": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "filesystem-tag", - "machine-tag", - "provider" - ] - }, - "FilesystemAttachmentParamsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/FilesystemAttachmentParams" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "FilesystemAttachmentParamsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/FilesystemAttachmentParamsResult" - } - } - }, - "additionalProperties": false - }, - "FilesystemAttachmentResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/FilesystemAttachment" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "FilesystemAttachmentResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/FilesystemAttachmentResult" - } - } - }, - "additionalProperties": false - }, - "FilesystemAttachments": { - "type": "object", - "properties": { - "filesystem-attachments": { - "type": "array", - "items": { - "$ref": "#/definitions/FilesystemAttachment" - } - } - }, - "additionalProperties": false, - "required": [ - "filesystem-attachments" - ] - }, - "FilesystemInfo": { - "type": "object", - "properties": { - "filesystem-id": { - "type": "string" - }, - "pool": { - "type": "string" - }, - "size": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "filesystem-id", - "pool", - "size" - ] - }, - "FilesystemParams": { - "type": "object", - "properties": { - "attachment": { - "$ref": "#/definitions/FilesystemAttachmentParams" - }, - "attributes": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "filesystem-tag": { - "type": "string" - }, - "provider": { - "type": "string" - }, - "size": { - "type": "integer" - }, - "tags": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "volume-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "filesystem-tag", - "size", - "provider" - ] - }, - "FilesystemParamsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/FilesystemParams" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "FilesystemParamsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/FilesystemParamsResult" - } - } - }, - "additionalProperties": false - }, - "FilesystemResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/Filesystem" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "FilesystemResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/FilesystemResult" - } - } - }, - "additionalProperties": false - }, - "Filesystems": { - "type": "object", - "properties": { - "filesystems": { - "type": "array", - "items": { - "$ref": "#/definitions/Filesystem" - } - } - }, - "additionalProperties": false, - "required": [ - "filesystems" - ] - }, - "LifeResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "life": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "life" - ] - }, - "LifeResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/LifeResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "MachineStorageId": { - "type": "object", - "properties": { - "attachment-tag": { - "type": "string" - }, - "machine-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "machine-tag", - "attachment-tag" - ] - }, - "MachineStorageIds": { - "type": "object", - "properties": { - "ids": { - "type": "array", - "items": { - "$ref": "#/definitions/MachineStorageId" - } - } - }, - "additionalProperties": false, - "required": [ - "ids" - ] - }, - "MachineStorageIdsWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "$ref": "#/definitions/MachineStorageId" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id", - "changes" - ] - }, - "MachineStorageIdsWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/MachineStorageIdsWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "NotifyWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "RemoveFilesystemParams": { - "type": "object", - "properties": { - "destroy": { - "type": "boolean" - }, - "filesystem-id": { - "type": "string" - }, - "provider": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "provider", - "filesystem-id" - ] - }, - "RemoveFilesystemParamsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/RemoveFilesystemParams" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "RemoveFilesystemParamsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoveFilesystemParamsResult" - } - } - }, - "additionalProperties": false - }, - "RemoveVolumeParams": { - "type": "object", - "properties": { - "destroy": { - "type": "boolean" - }, - "provider": { - "type": "string" - }, - "volume-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "provider", - "volume-id" - ] - }, - "RemoveVolumeParamsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/RemoveVolumeParams" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "RemoveVolumeParamsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoveVolumeParamsResult" - } - } - }, - "additionalProperties": false - }, - "SetStatus": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityStatusArgs" - } - } - }, - "additionalProperties": false, - "required": [ - "entities" - ] - }, - "StringResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "StringResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "StringsWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id" - ] - }, - "StringsWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringsWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "Volume": { - "type": "object", - "properties": { - "info": { - "$ref": "#/definitions/VolumeInfo" - }, - "volume-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "volume-tag", - "info" - ] - }, - "VolumeAttachment": { - "type": "object", - "properties": { - "info": { - "$ref": "#/definitions/VolumeAttachmentInfo" - }, - "machine-tag": { - "type": "string" - }, - "volume-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "volume-tag", - "machine-tag", - "info" - ] - }, - "VolumeAttachmentInfo": { - "type": "object", - "properties": { - "bus-address": { - "type": "string" - }, - "device-link": { - "type": "string" - }, - "device-name": { - "type": "string" - }, - "plan-info": { - "$ref": "#/definitions/VolumeAttachmentPlanInfo" - }, - "read-only": { - "type": "boolean" - } - }, - "additionalProperties": false - }, - "VolumeAttachmentParams": { - "type": "object", - "properties": { - "instance-id": { - "type": "string" - }, - "machine-tag": { - "type": "string" - }, - "provider": { - "type": "string" - }, - "read-only": { - "type": "boolean" - }, - "volume-id": { - "type": "string" - }, - "volume-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "volume-tag", - "machine-tag", - "provider" - ] - }, - "VolumeAttachmentParamsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/VolumeAttachmentParams" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "VolumeAttachmentParamsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/VolumeAttachmentParamsResult" - } - } - }, - "additionalProperties": false - }, - "VolumeAttachmentPlan": { - "type": "object", - "properties": { - "block-device": { - "$ref": "#/definitions/BlockDevice" - }, - "life": { - "type": "string" - }, - "machine-tag": { - "type": "string" - }, - "plan-info": { - "$ref": "#/definitions/VolumeAttachmentPlanInfo" - }, - "volume-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "volume-tag", - "machine-tag", - "plan-info" - ] - }, - "VolumeAttachmentPlanInfo": { - "type": "object", - "properties": { - "device-attributes": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "device-type": { - "type": "string" - } - }, - "additionalProperties": false - }, - "VolumeAttachmentPlanResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/VolumeAttachmentPlan" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "VolumeAttachmentPlanResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/VolumeAttachmentPlanResult" - } - } - }, - "additionalProperties": false - }, - "VolumeAttachmentPlans": { - "type": "object", - "properties": { - "volume-plans": { - "type": "array", - "items": { - "$ref": "#/definitions/VolumeAttachmentPlan" - } - } - }, - "additionalProperties": false, - "required": [ - "volume-plans" - ] - }, - "VolumeAttachmentResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/VolumeAttachment" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "VolumeAttachmentResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/VolumeAttachmentResult" - } - } - }, - "additionalProperties": false - }, - "VolumeAttachments": { - "type": "object", - "properties": { - "volume-attachments": { - "type": "array", - "items": { - "$ref": "#/definitions/VolumeAttachment" - } - } - }, - "additionalProperties": false, - "required": [ - "volume-attachments" - ] - }, - "VolumeInfo": { - "type": "object", - "properties": { - "hardware-id": { - "type": "string" - }, - "persistent": { - "type": "boolean" - }, - "pool": { - "type": "string" - }, - "size": { - "type": "integer" - }, - "volume-id": { - "type": "string" - }, - "wwn": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "volume-id", - "size", - "persistent" - ] - }, - "VolumeParams": { - "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" - } - } - }, - "volume-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "volume-tag", - "size", - "provider" - ] - }, - "VolumeParamsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/VolumeParams" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "VolumeParamsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/VolumeParamsResult" - } - } - }, - "additionalProperties": false - }, - "VolumeResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/Volume" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "VolumeResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/VolumeResult" - } - } - }, - "additionalProperties": false - }, - "Volumes": { - "type": "object", - "properties": { - "volumes": { - "type": "array", - "items": { - "$ref": "#/definitions/Volume" - } - } - }, - "additionalProperties": false, - "required": [ - "volumes" - ] - } - } - } - }, - { - "Name": "StringsWatcher", - "Description": "srvStringsWatcher defines the API for methods on a state.StringsWatcher.\nEach client has its own current set of watchers, stored in resources.\nsrvStringsWatcher notifies about changes for all entities of a given kind,\nsending the changes as a list of strings.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "Next": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsWatchResult" - } - }, - "description": "Next returns when a change has occurred to an entity of the\ncollection being watched since the most recent call to Next\nor the Watch call that created the srvStringsWatcher." - }, - "Stop": { - "type": "object", - "description": "Stop stops the watcher." - } - }, - "definitions": { - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "StringsWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id" - ] - } - } - } - }, - { - "Name": "Subnets", - "Description": "API provides the subnets API facade for version 5.", - "Version": 5, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "AllZones": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ZoneResults" - } - }, - "description": "AllZones returns all availability zones known to Juju. If a\nzone is unusable, unavailable, or deprecated the Available\nfield will be false." - }, - "ListSubnets": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SubnetsFilters" - }, - "Result": { - "$ref": "#/definitions/ListSubnetsResults" - } - }, - "description": "ListSubnets returns the matching subnets after applying\noptional filters." - }, - "SubnetsByCIDR": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/CIDRParams" - }, - "Result": { - "$ref": "#/definitions/SubnetsResults" - } - }, - "description": "SubnetsByCIDR returns the collection of subnets matching each CIDR in the input." - } - }, - "definitions": { - "CIDRParams": { - "type": "object", - "properties": { - "cidrs": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "cidrs" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ListSubnetsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/Subnet" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "Subnet": { - "type": "object", - "properties": { - "cidr": { - "type": "string" - }, - "life": { - "type": "string" - }, - "provider-id": { - "type": "string" - }, - "provider-network-id": { - "type": "string" - }, - "provider-space-id": { - "type": "string" - }, - "space-tag": { - "type": "string" - }, - "status": { - "type": "string" - }, - "vlan-tag": { - "type": "integer" - }, - "zones": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "cidr", - "vlan-tag", - "life", - "space-tag", - "zones" - ] - }, - "SubnetV2": { - "type": "object", - "properties": { - "Subnet": { - "$ref": "#/definitions/Subnet" - }, - "cidr": { - "type": "string" - }, - "id": { - "type": "string" - }, - "life": { - "type": "string" - }, - "provider-id": { - "type": "string" - }, - "provider-network-id": { - "type": "string" - }, - "provider-space-id": { - "type": "string" - }, - "space-tag": { - "type": "string" - }, - "status": { - "type": "string" - }, - "vlan-tag": { - "type": "integer" - }, - "zones": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "cidr", - "vlan-tag", - "life", - "space-tag", - "zones", - "Subnet" - ] - }, - "SubnetsFilters": { - "type": "object", - "properties": { - "space-tag": { - "type": "string" - }, - "zone": { - "type": "string" - } - }, - "additionalProperties": false - }, - "SubnetsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "subnets": { - "type": "array", - "items": { - "$ref": "#/definitions/SubnetV2" - } - } - }, - "additionalProperties": false - }, - "SubnetsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/SubnetsResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ZoneResult": { - "type": "object", - "properties": { - "available": { - "type": "boolean" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "name": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "available" - ] - }, - "ZoneResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ZoneResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - } - } - } - }, - { - "Name": "Undertaker", - "Description": "UndertakerAPI implements the API used by the model undertaker worker.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "ModelConfig": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ModelConfigResult" - } - }, - "description": "ModelConfig returns the model's configuration." - }, - "ModelInfo": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/UndertakerModelInfoResult" - } - }, - "description": "ModelInfo returns information on the model needed by the undertaker worker." - }, - "ProcessDyingModel": { - "type": "object", - "description": "ProcessDyingModel checks if a dying model has any machines or applications.\nIf there are none, the model's life is changed from dying to dead." - }, - "RemoveModel": { - "type": "object", - "description": "RemoveModel removes any records of this model from Juju." - }, - "SetStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetStatus" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetStatus sets the status of each given entity." - }, - "WatchModelResources": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "WatchModelResources creates watchers for changes to the lifecycle of an\nmodel's machines and applications and storage." - } - }, - "definitions": { - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ModelConfigResult": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "NotifyWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "SetStatus": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityStatusArgs" - } - } - }, - "additionalProperties": false, - "required": [ - "entities" - ] - }, - "UndertakerModelInfo": { - "type": "object", - "properties": { - "destroy-timeout": { - "type": "integer" - }, - "force-destroyed": { - "type": "boolean" - }, - "global-name": { - "type": "string" - }, - "is-system": { - "type": "boolean" - }, - "life": { - "type": "string" - }, - "name": { - "type": "string" - }, - "uuid": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "uuid", - "name", - "global-name", - "is-system", - "life" - ] - }, - "UndertakerModelInfoResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/UndertakerModelInfo" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - } - } - } - }, - { - "Name": "UnitAssigner", - "Description": "API implements the functionality for assigning units to machines.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "AssignUnits": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "AssignUnits assigns the units with the given ids to the correct machine. The\nerror results are returned in the same order as the given entities." - }, - "SetAgentStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetStatus" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetAgentStatus will set status for agents of Units passed in args, if one\nof the args is not an Unit it will fail." - }, - "WatchUnitAssignments": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsWatchResult" - } - }, - "description": "WatchUnitAssignments returns a strings watcher that is notified when new unit\nassignments are added to the db." - } - }, - "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" - ] - }, - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "SetStatus": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityStatusArgs" - } - } - }, - "additionalProperties": false, - "required": [ - "entities" - ] - }, - "StringsWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id" - ] - } - } - } - }, - { - "Name": "Uniter", - "Description": "UniterAPI implements the latest version (v18) of the Uniter API.", - "Version": 18, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "APIAddresses": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsResult" - } - }, - "description": "APIAddresses returns the list of addresses used to connect to the API." - }, - "APIHostPorts": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/APIHostPortsResult" - } - }, - "description": "APIHostPorts returns the API server addresses." - }, - "ActionStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringResults" - } - }, - "description": "ActionStatus returns the status of Actions by Tags passed in." - }, - "Actions": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ActionResults" - } - }, - "description": "Actions returns the Actions by Tags passed and ensures that the Unit asking\nfor them is the same Unit that has the Actions." - }, - "AddMetricBatches": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/MetricBatchParams" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "AddMetricBatches adds the metrics for the specified unit." - }, - "ApplicationStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ApplicationStatusResults" - } - }, - "description": "ApplicationStatus returns the status of the Applications and its workloads\nif the given unit is the leader." - }, - "AssignedMachine": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringResults" - } - }, - "description": "AssignedMachine returns the machine tag for each given unit tag, or\nan error satisfying params.IsCodeNotAssigned when a unit has no\nassigned machine." - }, - "AvailabilityZone": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringResults" - } - }, - "description": "AvailabilityZone returns the availability zone for each given unit, if applicable." - }, - "BeginActions": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "BeginActions marks the actions represented by the passed in Tags as running." - }, - "CanApplyLXDProfile": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/BoolResults" - } - }, - "description": "CanApplyLXDProfile is a shim to call the LXDProfileAPIv2 version of this method." - }, - "CharmArchiveSha256": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/CharmURLs" - }, - "Result": { - "$ref": "#/definitions/StringResults" - } - }, - "description": "CharmArchiveSha256 returns the SHA256 digest of the charm archive\n(bundle) data for each charm url in the given parameters." - }, - "CharmModifiedVersion": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/IntResults" - } - }, - "description": "CharmModifiedVersion returns the most CharmModifiedVersion for all given\nunits or applications." - }, - "CharmURL": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringBoolResults" - } - }, - "description": "CharmURL returns the charm URL for all given units or applications." - }, - "ClearResolved": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "ClearResolved removes any resolved setting from each given unit." - }, - "CloudAPIVersion": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringResult" - } - }, - "description": "CloudAPIVersion returns the cloud API version, if available." - }, - "CloudSpec": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/CloudSpecResult" - } - }, - "description": "CloudSpec returns the cloud spec used by the model in which the\nauthenticated unit or application resides.\nA check is made beforehand to ensure that the request is made by an entity\nthat has been granted the appropriate trust." - }, - "CommitHookChanges": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/CommitHookChangesArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "CommitHookChanges batches together all required API calls for applying\na set of changes after a hook successfully completes and executes them in a\nsingle transaction." - }, - "ConfigSettings": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ConfigSettingsResults" - } - }, - "description": "ConfigSettings returns the complete set of application charm config\nsettings available to each given unit." - }, - "CreateSecretURIs": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/CreateSecretURIsArg" - }, - "Result": { - "$ref": "#/definitions/StringResults" - } - }, - "description": "CreateSecretURIs creates new secret URIs." - }, - "CreateSecrets": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/CreateSecretArgs" - }, - "Result": { - "$ref": "#/definitions/StringResults" - } - }, - "description": "CreateSecrets creates new secrets." - }, - "CurrentModel": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ModelResult" - } - }, - "description": "CurrentModel returns the name and UUID for the current juju model." - }, - "Destroy": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "Destroy advances all given Alive units' lifecycles as far as\npossible. See state/Unit.Destroy()." - }, - "DestroyAllSubordinates": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "DestroyAllSubordinates destroys all subordinates of each given unit." - }, - "DestroyUnitStorageAttachments": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "DestroyUnitStorageAttachments marks each storage attachment of the\nspecified units as Dying." - }, - "EnsureDead": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "EnsureDead calls EnsureDead on each given entity from state. It\nwill fail if the entity is not present. If it's Alive, nothing will\nhappen (see state/EnsureDead() for units or machines)." - }, - "EnterScope": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RelationUnits" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "EnterScope ensures each unit has entered its scope in the relation,\nfor all of the given relation/unit pairs. See also\nstate.RelationUnit.EnterScope()." - }, - "FinishActions": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ActionExecutionResults" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "FinishActions saves the result of a completed Action" - }, - "GetConsumerSecretsRevisionInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/GetSecretConsumerInfoArgs" - }, - "Result": { - "$ref": "#/definitions/SecretConsumerInfoResults" - } - }, - "description": "GetConsumerSecretsRevisionInfo returns the latest secret revisions for the specified secrets." - }, - "GetMeterStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/MeterStatusResults" - } - } - }, - "GetPodSpec": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringResults" - } - }, - "description": "GetPodSpec gets the pod specs for a set of applications." - }, - "GetPrincipal": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringBoolResults" - } - }, - "description": "GetPrincipal returns the result of calling PrincipalName() and\nconverting it to a tag, on each given unit." - }, - "GetRawK8sSpec": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringResults" - } - }, - "description": "GetRawK8sSpec gets the raw k8s specs for a set of applications." - }, - "GetSecretBackendConfig": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SecretBackendArgs" - }, - "Result": { - "$ref": "#/definitions/SecretBackendConfigResults" - } - }, - "description": "GetSecretBackendConfig gets the config needed to create a client to secret backends." - }, - "GetSecretContentInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/GetSecretContentArgs" - }, - "Result": { - "$ref": "#/definitions/SecretContentResults" - } - }, - "description": "GetSecretContentInfo returns the secret values for the specified secrets." - }, - "GetSecretMetadata": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ListSecretResults" - } - }, - "description": "GetSecretMetadata returns metadata for the caller's secrets." - }, - "GetSecretRevisionContentInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SecretRevisionArg" - }, - "Result": { - "$ref": "#/definitions/SecretContentResults" - } - }, - "description": "GetSecretRevisionContentInfo returns the secret values for the specified secret revisions.\nUsed when deleting a secret; only returns external revision info." - }, - "GoalStates": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/GoalStateResults" - } - }, - "description": "GoalStates returns information of charm units and relations." - }, - "HasSubordinates": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/BoolResults" - } - }, - "description": "HasSubordinates returns the whether each given unit has any subordinates." - }, - "LXDProfileName": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringResults" - } - }, - "description": "LXDProfileName is a shim to call the LXDProfileAPIv2 version of this method." - }, - "LXDProfileRequired": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/CharmURLs" - }, - "Result": { - "$ref": "#/definitions/BoolResults" - } - }, - "description": "LXDProfileRequired is a shim to call the LXDProfileAPIv2 version of this method." - }, - "LeaveScope": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RelationUnits" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "LeaveScope signals each unit has left its scope in the relation,\nfor all of the given relation/unit pairs. See also\nstate.RelationUnit.LeaveScope()." - }, - "Life": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/LifeResults" - } - }, - "description": "Life returns the life status of every supplied entity, where available." - }, - "LogActionsMessages": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ActionMessageParams" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "LogActionsMessages records the log messages against the specified actions." - }, - "Merge": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/MergeLeadershipSettingsBulkParams" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "Merge merges in the provided leadership settings. Only leaders for\nthe given service may perform this operation." - }, - "ModelConfig": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ModelConfigResult" - } - }, - "description": "ModelConfig returns the current model's configuration." - }, - "ModelUUID": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringResult" - } - }, - "description": "ModelUUID returns the model UUID that this unit resides in.\nIt is implemented here directly as a result of removing it from\nembedded APIAddresser *without* bumping the facade version.\nIt should be blanked when this facade version is next incremented." - }, - "NetworkInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/NetworkInfoParams" - }, - "Result": { - "$ref": "#/definitions/NetworkInfoResults" - } - }, - "description": "NetworkInfo returns network interfaces/addresses for specified bindings." - }, - "OpenedApplicationPortRangesByEndpoint": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entity" - }, - "Result": { - "$ref": "#/definitions/ApplicationOpenedPortsResults" - } - }, - "description": "OpenedApplicationPortRangesByEndpoint returns the port ranges opened by each\napplication grouped by application endpoint." - }, - "OpenedMachinePortRangesByEndpoint": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/OpenMachinePortRangesByEndpointResults" - } - }, - "description": "OpenedMachinePortRangesByEndpoint returns the port ranges opened by each\nunit on the provided machines grouped by application endpoint." - }, - "PrivateAddress": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringResults" - } - }, - "description": "PrivateAddress returns the private address for each given unit, if set." - }, - "ProviderType": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringResult" - } - }, - "description": "ProviderType returns the provider type used by the current juju\nmodel.\n\nTODO(dimitern): Refactor the uniter to call this instead of calling\nModelConfig() just to get the provider type. Once we have machine\naddresses, this might be completely unnecessary though." - }, - "PublicAddress": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringResults" - } - }, - "description": "PublicAddress returns the public address for each given unit, if set." - }, - "Read": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/GetLeadershipSettingsBulkResults" - } - }, - "description": "Read reads leadership settings for the provided service ID. Any\nunit of the service may perform this operation." - }, - "ReadLocalApplicationSettings": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RelationUnit" - }, - "Result": { - "$ref": "#/definitions/SettingsResult" - } - }, - "description": "ReadLocalApplicationSettings returns the local application settings for a\nparticular relation when invoked by the leader unit." - }, - "ReadRemoteSettings": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RelationUnitPairs" - }, - "Result": { - "$ref": "#/definitions/SettingsResults" - } - }, - "description": "ReadRemoteSettings returns the remote settings of each given set of\nrelation/local unit/remote unit." - }, - "ReadSettings": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RelationUnits" - }, - "Result": { - "$ref": "#/definitions/SettingsResults" - } - }, - "description": "ReadSettings returns the local settings of each given set of\nrelation/unit.\n\nNOTE(achilleasa): Using this call to read application data is deprecated\nand will not work for k8s charms (see LP1876097). Instead, clients should\nuse ReadLocalApplicationSettings." - }, - "Refresh": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/UnitRefreshResults" - } - }, - "description": "Refresh retrieves the latest values for attributes on this unit." - }, - "Relation": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RelationUnits" - }, - "Result": { - "$ref": "#/definitions/RelationResults" - } - }, - "description": "Relation returns information about all given relation/unit pairs,\nincluding their id, key and the local endpoint." - }, - "RelationById": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RelationIds" - }, - "Result": { - "$ref": "#/definitions/RelationResults" - } - }, - "description": "RelationById returns information about all given relations,\nspecified by their ids, including their key and the local\nendpoint." - }, - "RelationsStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/RelationUnitStatusResults" - } - }, - "description": "RelationsStatus returns for each unit the corresponding relation and status information." - }, - "RemoveSecrets": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/DeleteSecretArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "RemoveSecrets removes the specified secrets." - }, - "RemoveStorageAttachments": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/StorageAttachmentIds" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "RemoveStorageAttachments removes the specified storage\nattachments from state." - }, - "RequestReboot": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "RequestReboot sets the reboot flag on the provided machines" - }, - "Resolved": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ResolvedModeResults" - } - }, - "description": "Resolved returns the current resolved setting for each given unit." - }, - "SLALevel": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringResult" - } - }, - "description": "SLALevel returns the model's SLA level." - }, - "SecretsGrant": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/GrantRevokeSecretArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SecretsGrant grants access to a secret for the specified subjects." - }, - "SecretsRevoke": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/GrantRevokeSecretArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SecretsRevoke revokes access to a secret for the specified subjects." - }, - "SecretsRotated": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SecretRotatedArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SecretsRotated records when secrets were last rotated." - }, - "SetAgentStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetStatus" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetAgentStatus will set status for agents of Units passed in args, if one\nof the args is not an Unit it will fail." - }, - "SetApplicationStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetStatus" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetApplicationStatus sets the status for all the Applications in args if the given Unit is\nthe leader." - }, - "SetCharmURL": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/EntitiesCharmURL" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetCharmURL sets the charm URL for each given unit. An error will\nbe returned if a unit is dead, or the charm URL is not known." - }, - "SetRelationStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RelationStatusArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetRelationStatus updates the status of the specified relations." - }, - "SetState": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetUnitStateArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetState sets the state persisted by the charm running in this unit\nand the state internal to the uniter for this unit." - }, - "SetStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetStatus" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetStatus will set status for a entities passed in args. If the entity is\na Unit it will instead set status to its agent, to emulate backwards\ncompatibility." - }, - "SetUnitStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetStatus" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetUnitStatus sets status for all elements passed in args, the difference\nwith SetStatus is that if an entity is a Unit it will set its status instead\nof its agent." - }, - "SetUpgradeSeriesUnitStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/UpgradeSeriesStatusParams" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetUpgradeSeriesUnitStatus sets the upgrade series status of the unit.\nIf no upgrade is in progress an error is returned instead." - }, - "SetWorkloadVersion": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/EntityWorkloadVersions" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetWorkloadVersion sets the workload version for each given unit. An error will\nbe returned if a unit is dead." - }, - "State": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/UnitStateResults" - } - }, - "description": "State returns the state persisted by the charm running in this unit\nand the state internal to the uniter for this unit." - }, - "StorageAttachmentLife": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/StorageAttachmentIds" - }, - "Result": { - "$ref": "#/definitions/LifeResults" - } - }, - "description": "StorageAttachmentLife returns the lifecycle state of the storage attachments\nwith the specified tags." - }, - "StorageAttachments": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/StorageAttachmentIds" - }, - "Result": { - "$ref": "#/definitions/StorageAttachmentResults" - } - }, - "description": "StorageAttachments returns the storage attachments with the specified tags." - }, - "UnitStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StatusResults" - } - }, - "description": "UnitStatus returns the workload status information for the unit." - }, - "UnitStorageAttachments": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StorageAttachmentIdsResults" - } - }, - "description": "UnitStorageAttachments returns the IDs of storage attachments for a collection of units." - }, - "UpdateNetworkInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "UpdateNetworkInfo refreshes the network settings for a unit's bound\nendpoints." - }, - "UpdateSecrets": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/UpdateSecretArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "UpdateSecrets updates the specified secrets." - }, - "UpgradeSeriesUnitStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/UpgradeSeriesStatusResults" - } - }, - "description": "UpgradeSeriesUnitStatus returns the current preparation status of an\nupgrading unit.\nIf no series upgrade is in progress an error is returned instead." - }, - "Watch": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "Watch starts an NotifyWatcher for each given entity." - }, - "WatchAPIHostPorts": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResult" - } - }, - "description": "WatchAPIHostPorts watches the API server addresses." - }, - "WatchActionNotifications": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - }, - "description": "WatchActionNotifications returns a StringsWatcher for observing\nincoming action calls to a unit. See also state/watcher.go\nUnit.WatchActionNotifications(). This method is called from\napi/uniter/uniter.go WatchActionNotifications()." - }, - "WatchConfigSettingsHash": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - }, - "description": "WatchConfigSettingsHash returns a StringsWatcher that yields a hash\nof the config values every time the config changes. The uniter can\nsave this hash and use it to decide whether the config-changed hook\nneeds to be run (or whether this was just an agent restart with no\nsubstantive config change)." - }, - "WatchConsumedSecretsChanges": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - }, - "description": "WatchConsumedSecretsChanges sets up a watcher to notify of changes to secret revisions for the specified consumers." - }, - "WatchForModelConfigChanges": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResult" - } - }, - "description": "WatchForModelConfigChanges returns a NotifyWatcher that observes\nchanges to the model configuration.\nNote that although the NotifyWatchResult contains an Error field,\nit's not used because we are only returning a single watcher,\nso we use the regular error return." - }, - "WatchInstanceData": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "WatchInstanceData is a shim to call the LXDProfileAPIv2 version of this method." - }, - "WatchLeadershipSettings": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "WatchLeadershipSettings will block the caller until leadership settings\nfor the given service ID change." - }, - "WatchMeterStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - } - }, - "WatchObsolete": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResult" - } - }, - "description": "WatchObsolete returns a watcher for notifying when:\n - a secret owned by the entity is deleted\n - a secret revision owed by the entity no longer\n has any consumers\n\nObsolete revisions results are \"uri/revno\" and deleted\nsecret results are \"uri\"." - }, - "WatchRelationUnits": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RelationUnits" - }, - "Result": { - "$ref": "#/definitions/RelationUnitsWatchResults" - } - }, - "description": "WatchRelationUnits returns a RelationUnitsWatcher for observing\nchanges to every unit in the supplied relation that is visible to\nthe supplied unit. See also state/watcher.go:RelationUnit.Watch()." - }, - "WatchSecretRevisionsExpiryChanges": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/SecretTriggerWatchResult" - } - }, - "description": "WatchSecretRevisionsExpiryChanges sets up a watcher to notify of changes to secret revision expiry config." - }, - "WatchSecretsRotationChanges": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/SecretTriggerWatchResult" - } - }, - "description": "WatchSecretsRotationChanges sets up a watcher to notify of changes to secret rotation config." - }, - "WatchStorageAttachments": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/StorageAttachmentIds" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "WatchStorageAttachments creates watchers for a collection of storage\nattachments, each of which can be used to watch changes to storage\nattachment info." - }, - "WatchTrustConfigSettingsHash": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - }, - "description": "WatchTrustConfigSettingsHash returns a StringsWatcher that yields a\nhash of the application config values whenever they change. The\nuniter can use the hash to determine whether the actual values have\nchanged since it last saw the config." - }, - "WatchUnitAddressesHash": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - }, - "description": "WatchUnitAddressesHash returns a StringsWatcher that yields the\nhashes of the addresses for the unit whenever the addresses\nchange. The uniter can use the hash to determine whether the actual\naddress values have changed since it last saw the config." - }, - "WatchUnitRelations": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - }, - "description": "WatchUnitRelations returns a StringsWatcher, for each given\nunit, that notifies of changes to the lifecycles of relations\nrelevant to that unit. For principal units, this will be all of the\nrelations for the application. For subordinate units, only\nrelations with the principal unit's application will be monitored." - }, - "WatchUnitStorageAttachments": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - }, - "description": "WatchUnitStorageAttachments creates watchers for a collection of units,\neach of which can be used to watch for lifecycle changes to the corresponding\nunit's storage attachments." - }, - "WatchUpgradeSeriesNotifications": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "WatchUpgradeSeriesNotifications returns a NotifyWatcher for observing changes to upgrade series locks." - }, - "WorkloadVersion": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringResults" - } - }, - "description": "WorkloadVersion returns the workload version for all given units or applications." - } - }, - "definitions": { - "APIHostPortsResult": { - "type": "object", - "properties": { - "servers": { - "type": "array", - "items": { - "type": "array", - "items": { - "$ref": "#/definitions/HostPort" - } - } - } - }, - "additionalProperties": false, - "required": [ - "servers" - ] - }, - "Action": { - "type": "object", - "properties": { - "execution-group": { - "type": "string" - }, - "name": { - "type": "string" - }, - "parallel": { - "type": "boolean" - }, - "parameters": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "receiver": { - "type": "string" - }, - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "receiver", - "name" - ] - }, - "ActionExecutionResult": { - "type": "object", - "properties": { - "action-tag": { - "type": "string" - }, - "message": { - "type": "string" - }, - "results": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "status": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "action-tag", - "status" - ] - }, - "ActionExecutionResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ActionExecutionResult" - } - } - }, - "additionalProperties": false - }, - "ActionMessage": { - "type": "object", - "properties": { - "message": { - "type": "string" - }, - "timestamp": { - "type": "string", - "format": "date-time" - } - }, - "additionalProperties": false, - "required": [ - "timestamp", - "message" - ] - }, - "ActionMessageParams": { - "type": "object", - "properties": { - "messages": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityString" - } - } - }, - "additionalProperties": false, - "required": [ - "messages" - ] - }, - "ActionResult": { - "type": "object", - "properties": { - "action": { - "$ref": "#/definitions/Action" - }, - "completed": { - "type": "string", - "format": "date-time" - }, - "enqueued": { - "type": "string", - "format": "date-time" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "log": { - "type": "array", - "items": { - "$ref": "#/definitions/ActionMessage" - } - }, - "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 - }, - "Address": { - "type": "object", - "properties": { - "cidr": { - "type": "string" - }, - "config-type": { - "type": "string" - }, - "is-secondary": { - "type": "boolean" - }, - "scope": { - "type": "string" - }, - "space-id": { - "type": "string" - }, - "space-name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "value", - "type", - "scope" - ] - }, - "ApplicationOpenedPorts": { - "type": "object", - "properties": { - "endpoint": { - "type": "string" - }, - "port-ranges": { - "type": "array", - "items": { - "$ref": "#/definitions/PortRange" - } - } - }, - "additionalProperties": false, - "required": [ - "endpoint", - "port-ranges" - ] - }, - "ApplicationOpenedPortsResult": { - "type": "object", - "properties": { - "application-port-ranges": { - "type": "array", - "items": { - "$ref": "#/definitions/ApplicationOpenedPorts" - } - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "application-port-ranges" - ] - }, - "ApplicationOpenedPortsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ApplicationOpenedPortsResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ApplicationStatusResult": { - "type": "object", - "properties": { - "application": { - "$ref": "#/definitions/StatusResult" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "units": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/StatusResult" - } - } - } - }, - "additionalProperties": false, - "required": [ - "application", - "units" - ] - }, - "ApplicationStatusResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ApplicationStatusResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "BoolResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "BoolResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/BoolResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "CharmRelation": { - "type": "object", - "properties": { - "interface": { - "type": "string" - }, - "limit": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "optional": { - "type": "boolean" - }, - "role": { - "type": "string" - }, - "scope": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "role", - "interface", - "optional", - "limit", - "scope" - ] - }, - "CharmURL": { - "type": "object", - "properties": { - "url": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "url" - ] - }, - "CharmURLs": { - "type": "object", - "properties": { - "urls": { - "type": "array", - "items": { - "$ref": "#/definitions/CharmURL" - } - } - }, - "additionalProperties": false, - "required": [ - "urls" - ] - }, - "CloudCredential": { - "type": "object", - "properties": { - "attrs": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "auth-type": { - "type": "string" - }, - "redacted": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "auth-type" - ] - }, - "CloudSpec": { - "type": "object", - "properties": { - "cacertificates": { - "type": "array", - "items": { - "type": "string" - } - }, - "credential": { - "$ref": "#/definitions/CloudCredential" - }, - "endpoint": { - "type": "string" - }, - "identity-endpoint": { - "type": "string" - }, - "is-controller-cloud": { - "type": "boolean" - }, - "name": { - "type": "string" - }, - "region": { - "type": "string" - }, - "skip-tls-verify": { - "type": "boolean" - }, - "storage-endpoint": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type", - "name" - ] - }, - "CloudSpecResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/CloudSpec" - } - }, - "additionalProperties": false - }, - "CommitHookChangesArg": { - "type": "object", - "properties": { - "add-storage": { - "type": "array", - "items": { - "$ref": "#/definitions/StorageAddParams" - } - }, - "close-ports": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityPortRange" - } - }, - "open-ports": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityPortRange" - } - }, - "pod-spec": { - "$ref": "#/definitions/PodSpec" - }, - "relation-unit-settings": { - "type": "array", - "items": { - "$ref": "#/definitions/RelationUnitSettings" - } - }, - "secret-creates": { - "type": "array", - "items": { - "$ref": "#/definitions/CreateSecretArg" - } - }, - "secret-deletes": { - "type": "array", - "items": { - "$ref": "#/definitions/DeleteSecretArg" - } - }, - "secret-grants": { - "type": "array", - "items": { - "$ref": "#/definitions/GrantRevokeSecretArg" - } - }, - "secret-revokes": { - "type": "array", - "items": { - "$ref": "#/definitions/GrantRevokeSecretArg" - } - }, - "secret-updates": { - "type": "array", - "items": { - "$ref": "#/definitions/UpdateSecretArg" - } - }, - "set-raw-k8s-spec": { - "$ref": "#/definitions/PodSpec" - }, - "tag": { - "type": "string" - }, - "unit-state": { - "$ref": "#/definitions/SetUnitStateArg" - }, - "update-network-info": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "update-network-info" - ] - }, - "CommitHookChangesArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/CommitHookChangesArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "ConfigSettingsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "settings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "settings" - ] - }, - "ConfigSettingsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ConfigSettingsResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "CreateSecretArg": { - "type": "object", - "properties": { - "UpsertSecretArg": { - "$ref": "#/definitions/UpsertSecretArg" - }, - "content": { - "$ref": "#/definitions/SecretContentParams" - }, - "description": { - "type": "string" - }, - "expire-time": { - "type": "string", - "format": "date-time" - }, - "label": { - "type": "string" - }, - "owner-tag": { - "type": "string" - }, - "params": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "rotate-policy": { - "type": "string" - }, - "uri": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "UpsertSecretArg", - "owner-tag" - ] - }, - "CreateSecretArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/CreateSecretArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "CreateSecretURIsArg": { - "type": "object", - "properties": { - "count": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "count" - ] - }, - "DeleteSecretArg": { - "type": "object", - "properties": { - "revisions": { - "type": "array", - "items": { - "type": "integer" - } - }, - "uri": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "uri" - ] - }, - "DeleteSecretArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/DeleteSecretArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "Endpoint": { - "type": "object", - "properties": { - "application-name": { - "type": "string" - }, - "relation": { - "$ref": "#/definitions/CharmRelation" - } - }, - "additionalProperties": false, - "required": [ - "application-name", - "relation" - ] - }, - "Entities": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } - } - }, - "additionalProperties": false, - "required": [ - "entities" - ] - }, - "EntitiesCharmURL": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityCharmURL" - } - } - }, - "additionalProperties": false, - "required": [ - "entities" - ] - }, - "Entity": { - "type": "object", - "properties": { - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag" - ] - }, - "EntityCharmURL": { - "type": "object", - "properties": { - "charm-url": { - "type": "string" - }, - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "charm-url" - ] - }, - "EntityPortRange": { - "type": "object", - "properties": { - "endpoint": { - "type": "string" - }, - "from-port": { - "type": "integer" - }, - "protocol": { - "type": "string" - }, - "tag": { - "type": "string" - }, - "to-port": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "protocol", - "from-port", - "to-port", - "endpoint" - ] - }, - "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" - ] - }, - "EntityString": { - "type": "object", - "properties": { - "tag": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "value" - ] - }, - "EntityWorkloadVersion": { - "type": "object", - "properties": { - "tag": { - "type": "string" - }, - "workload-version": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "workload-version" - ] - }, - "EntityWorkloadVersions": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityWorkloadVersion" - } - } - }, - "additionalProperties": false, - "required": [ - "entities" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "GetLeadershipSettingsBulkResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/GetLeadershipSettingsResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "GetLeadershipSettingsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "settings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - } - }, - "additionalProperties": false, - "required": [ - "settings" - ] - }, - "GetSecretConsumerInfoArgs": { - "type": "object", - "properties": { - "consumer-tag": { - "type": "string" - }, - "uris": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "consumer-tag", - "uris" - ] - }, - "GetSecretContentArg": { - "type": "object", - "properties": { - "label": { - "type": "string" - }, - "peek": { - "type": "boolean" - }, - "refresh": { - "type": "boolean" - }, - "uri": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "uri" - ] - }, - "GetSecretContentArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/GetSecretContentArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "GoalState": { - "type": "object", - "properties": { - "relations": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/GoalStateStatus" - } - } - } - } - }, - "units": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/GoalStateStatus" - } - } - } - }, - "additionalProperties": false, - "required": [ - "units", - "relations" - ] - }, - "GoalStateResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/GoalState" - } - }, - "additionalProperties": false, - "required": [ - "result", - "error" - ] - }, - "GoalStateResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/GoalStateResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "GoalStateStatus": { - "type": "object", - "properties": { - "since": { - "type": "string", - "format": "date-time" - }, - "status": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "status", - "since" - ] - }, - "GrantRevokeSecretArg": { - "type": "object", - "properties": { - "role": { - "type": "string" - }, - "scope-tag": { - "type": "string" - }, - "subject-tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "uri": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "uri", - "scope-tag", - "subject-tags", - "role" - ] - }, - "GrantRevokeSecretArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/GrantRevokeSecretArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "HostPort": { - "type": "object", - "properties": { - "Address": { - "$ref": "#/definitions/Address" - }, - "cidr": { - "type": "string" - }, - "config-type": { - "type": "string" - }, - "is-secondary": { - "type": "boolean" - }, - "port": { - "type": "integer" - }, - "scope": { - "type": "string" - }, - "space-id": { - "type": "string" - }, - "space-name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "value", - "type", - "scope", - "Address", - "port" - ] - }, - "IntResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "IntResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/IntResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "InterfaceAddress": { - "type": "object", - "properties": { - "cidr": { - "type": "string" - }, - "hostname": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "hostname", - "value", - "cidr" - ] - }, - "LifeResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "life": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "life" - ] - }, - "LifeResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/LifeResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ListSecretResult": { - "type": "object", - "properties": { - "create-time": { - "type": "string", - "format": "date-time" - }, - "description": { - "type": "string" - }, - "label": { - "type": "string" - }, - "latest-expire-time": { - "type": "string", - "format": "date-time" - }, - "latest-revision": { - "type": "integer" - }, - "next-rotate-time": { - "type": "string", - "format": "date-time" - }, - "owner-tag": { - "type": "string" - }, - "revisions": { - "type": "array", - "items": { - "$ref": "#/definitions/SecretRevision" - } - }, - "rotate-policy": { - "type": "string" - }, - "update-time": { - "type": "string", - "format": "date-time" - }, - "uri": { - "type": "string" - }, - "value": { - "$ref": "#/definitions/SecretValueResult" - }, - "version": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "uri", - "version", - "owner-tag", - "latest-revision", - "create-time", - "update-time", - "revisions" - ] - }, - "ListSecretResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ListSecretResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "MergeLeadershipSettingsBulkParams": { - "type": "object", - "properties": { - "params": { - "type": "array", - "items": { - "$ref": "#/definitions/MergeLeadershipSettingsParam" - } - } - }, - "additionalProperties": false, - "required": [ - "params" - ] - }, - "MergeLeadershipSettingsParam": { - "type": "object", - "properties": { - "application-tag": { - "type": "string" - }, - "settings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "unit-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "settings" - ] - }, - "MeterStatusResult": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "info": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "code", - "info" - ] - }, - "MeterStatusResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/MeterStatusResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "Metric": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "labels": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "time": { - "type": "string", - "format": "date-time" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "key", - "value", - "time" - ] - }, - "MetricBatch": { - "type": "object", - "properties": { - "charm-url": { - "type": "string" - }, - "created": { - "type": "string", - "format": "date-time" - }, - "metrics": { - "type": "array", - "items": { - "$ref": "#/definitions/Metric" - } - }, - "uuid": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "uuid", - "charm-url", - "created", - "metrics" - ] - }, - "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" - ] - }, - "ModelConfigResult": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "ModelResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "uuid": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "uuid", - "type" - ] - }, - "NetworkInfo": { - "type": "object", - "properties": { - "addresses": { - "type": "array", - "items": { - "$ref": "#/definitions/InterfaceAddress" - } - }, - "interface-name": { - "type": "string" - }, - "mac-address": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "mac-address", - "interface-name", - "addresses" - ] - }, - "NetworkInfoParams": { - "type": "object", - "properties": { - "bindings": { - "type": "array", - "items": { - "type": "string" - } - }, - "relation-id": { - "type": "integer" - }, - "unit": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "unit", - "bindings" - ] - }, - "NetworkInfoResult": { - "type": "object", - "properties": { - "bind-addresses": { - "type": "array", - "items": { - "$ref": "#/definitions/NetworkInfo" - } - }, - "egress-subnets": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "ingress-addresses": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "NetworkInfoResults": { - "type": "object", - "properties": { - "results": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/NetworkInfoResult" - } - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "NotifyWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "OpenMachinePortRangesByEndpointResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "unit-port-ranges": { - "type": "object", - "patternProperties": { - ".*": { - "type": "array", - "items": { - "$ref": "#/definitions/OpenUnitPortRangesByEndpoint" - } - } - } - } - }, - "additionalProperties": false, - "required": [ - "unit-port-ranges" - ] - }, - "OpenMachinePortRangesByEndpointResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/OpenMachinePortRangesByEndpointResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "OpenUnitPortRangesByEndpoint": { - "type": "object", - "properties": { - "endpoint": { - "type": "string" - }, - "port-ranges": { - "type": "array", - "items": { - "$ref": "#/definitions/PortRange" - } - } - }, - "additionalProperties": false, - "required": [ - "endpoint", - "port-ranges" - ] - }, - "PodSpec": { - "type": "object", - "properties": { - "spec": { - "type": "string" - }, - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag" - ] - }, - "PortRange": { - "type": "object", - "properties": { - "from-port": { - "type": "integer" - }, - "protocol": { - "type": "string" - }, - "to-port": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "from-port", - "to-port", - "protocol" - ] - }, - "RelationIds": { - "type": "object", - "properties": { - "relation-ids": { - "type": "array", - "items": { - "type": "integer" - } - } - }, - "additionalProperties": false, - "required": [ - "relation-ids" - ] - }, - "RelationResult": { - "type": "object", - "properties": { - "bool": { - "type": "boolean" - }, - "endpoint": { - "$ref": "#/definitions/Endpoint" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "id": { - "type": "integer" - }, - "key": { - "type": "string" - }, - "life": { - "type": "string" - }, - "other-application": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "life", - "id", - "key", - "endpoint" - ] - }, - "RelationResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/RelationResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "RelationStatusArg": { - "type": "object", - "properties": { - "message": { - "type": "string" - }, - "relation-id": { - "type": "integer" - }, - "status": { - "type": "string" - }, - "unit-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "unit-tag", - "relation-id", - "status", - "message" - ] - }, - "RelationStatusArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/RelationStatusArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "RelationUnit": { - "type": "object", - "properties": { - "relation": { - "type": "string" - }, - "unit": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "relation", - "unit" - ] - }, - "RelationUnitPair": { - "type": "object", - "properties": { - "local-unit": { - "type": "string" - }, - "relation": { - "type": "string" - }, - "remote-unit": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "relation", - "local-unit", - "remote-unit" - ] - }, - "RelationUnitPairs": { - "type": "object", - "properties": { - "relation-unit-pairs": { - "type": "array", - "items": { - "$ref": "#/definitions/RelationUnitPair" - } - } - }, - "additionalProperties": false, - "required": [ - "relation-unit-pairs" - ] - }, - "RelationUnitSettings": { - "type": "object", - "properties": { - "application-settings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "relation": { - "type": "string" - }, - "settings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "unit": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "relation", - "unit", - "settings", - "application-settings" - ] - }, - "RelationUnitStatus": { - "type": "object", - "properties": { - "in-scope": { - "type": "boolean" - }, - "relation-tag": { - "type": "string" - }, - "suspended": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "relation-tag", - "in-scope", - "suspended" - ] - }, - "RelationUnitStatusResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/RelationUnitStatus" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "RelationUnitStatusResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/RelationUnitStatusResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "RelationUnits": { - "type": "object", - "properties": { - "relation-units": { - "type": "array", - "items": { - "$ref": "#/definitions/RelationUnit" - } - } - }, - "additionalProperties": false, - "required": [ - "relation-units" - ] - }, - "RelationUnitsChange": { - "type": "object", - "properties": { - "app-changed": { - "type": "object", - "patternProperties": { - ".*": { - "type": "integer" - } - } - }, - "changed": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/UnitSettings" - } - } - }, - "departed": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "changed" - ] - }, - "RelationUnitsWatchResult": { - "type": "object", - "properties": { - "changes": { - "$ref": "#/definitions/RelationUnitsChange" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id", - "changes" - ] - }, - "RelationUnitsWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/RelationUnitsWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ResolvedModeResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "mode": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "mode" - ] - }, - "ResolvedModeResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ResolvedModeResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "SecretBackendArgs": { - "type": "object", - "properties": { - "backend-ids": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "backend-ids" - ] - }, - "SecretBackendConfig": { - "type": "object", - "properties": { - "params": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type" - ] - }, - "SecretBackendConfigResult": { - "type": "object", - "properties": { - "config": { - "$ref": "#/definitions/SecretBackendConfig" - }, - "draining": { - "type": "boolean" - }, - "model-controller": { - "type": "string" - }, - "model-name": { - "type": "string" - }, - "model-uuid": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "model-controller", - "model-uuid", - "model-name", - "draining" - ] - }, - "SecretBackendConfigResults": { - "type": "object", - "properties": { - "active-id": { - "type": "string" - }, - "results": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/SecretBackendConfigResult" - } - } - } - }, - "additionalProperties": false, - "required": [ - "active-id" - ] - }, - "SecretConsumerInfoResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "label": { - "type": "string" - }, - "revision": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "revision", - "label" - ] - }, - "SecretConsumerInfoResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/SecretConsumerInfoResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "SecretContentParams": { - "type": "object", - "properties": { - "data": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "value-ref": { - "$ref": "#/definitions/SecretValueRef" - } - }, - "additionalProperties": false - }, - "SecretContentResult": { - "type": "object", - "properties": { - "backend-config": { - "$ref": "#/definitions/SecretBackendConfigResult" - }, - "content": { - "$ref": "#/definitions/SecretContentParams" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "latest-revision": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "content" - ] - }, - "SecretContentResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/SecretContentResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "SecretRevision": { - "type": "object", - "properties": { - "backend-name": { - "type": "string" - }, - "create-time": { - "type": "string", - "format": "date-time" - }, - "expire-time": { - "type": "string", - "format": "date-time" - }, - "revision": { - "type": "integer" - }, - "update-time": { - "type": "string", - "format": "date-time" - }, - "value-ref": { - "$ref": "#/definitions/SecretValueRef" - } - }, - "additionalProperties": false, - "required": [ - "revision" - ] - }, - "SecretRevisionArg": { - "type": "object", - "properties": { - "pending-delete": { - "type": "boolean" - }, - "revisions": { - "type": "array", - "items": { - "type": "integer" - } - }, - "uri": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "uri", - "revisions", - "pending-delete" - ] - }, - "SecretRotatedArg": { - "type": "object", - "properties": { - "original-revision": { - "type": "integer" - }, - "skip": { - "type": "boolean" - }, - "uri": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "uri", - "original-revision", - "skip" - ] - }, - "SecretRotatedArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/SecretRotatedArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "SecretTriggerChange": { - "type": "object", - "properties": { - "next-trigger-time": { - "type": "string", - "format": "date-time" - }, - "revision": { - "type": "integer" - }, - "uri": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "uri", - "next-trigger-time" - ] - }, - "SecretTriggerWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "$ref": "#/definitions/SecretTriggerChange" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id", - "changes" - ] - }, - "SecretValueRef": { - "type": "object", - "properties": { - "backend-id": { - "type": "string" - }, - "revision-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "backend-id", - "revision-id" - ] - }, - "SecretValueResult": { - "type": "object", - "properties": { - "data": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "SetStatus": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityStatusArgs" - } - } - }, - "additionalProperties": false, - "required": [ - "entities" - ] - }, - "SetUnitStateArg": { - "type": "object", - "properties": { - "charm-state": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "meter-status-state": { - "type": "string" - }, - "relation-state": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "secret-state": { - "type": "string" - }, - "storage-state": { - "type": "string" - }, - "tag": { - "type": "string" - }, - "uniter-state": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag" - ] - }, - "SetUnitStateArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/SetUnitStateArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "SettingsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "settings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - } - }, - "additionalProperties": false, - "required": [ - "settings" - ] - }, - "SettingsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/SettingsResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "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": [ - "id", - "life", - "status", - "info", - "data", - "since" - ] - }, - "StatusResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StatusResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "StorageAddParams": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "storage": { - "$ref": "#/definitions/StorageConstraints" - }, - "unit": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "unit", - "name", - "storage" - ] - }, - "StorageAttachment": { - "type": "object", - "properties": { - "kind": { - "type": "integer" - }, - "life": { - "type": "string" - }, - "location": { - "type": "string" - }, - "owner-tag": { - "type": "string" - }, - "storage-tag": { - "type": "string" - }, - "unit-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "storage-tag", - "owner-tag", - "unit-tag", - "kind", - "location", - "life" - ] - }, - "StorageAttachmentId": { - "type": "object", - "properties": { - "storage-tag": { - "type": "string" - }, - "unit-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "storage-tag", - "unit-tag" - ] - }, - "StorageAttachmentIds": { - "type": "object", - "properties": { - "ids": { - "type": "array", - "items": { - "$ref": "#/definitions/StorageAttachmentId" - } - } - }, - "additionalProperties": false, - "required": [ - "ids" - ] - }, - "StorageAttachmentIdsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/StorageAttachmentIds" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "StorageAttachmentIdsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StorageAttachmentIdsResult" - } - } - }, - "additionalProperties": false - }, - "StorageAttachmentResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/StorageAttachment" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "StorageAttachmentResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StorageAttachmentResult" - } - } - }, - "additionalProperties": false - }, - "StorageConstraints": { - "type": "object", - "properties": { - "count": { - "type": "integer" - }, - "pool": { - "type": "string" - }, - "size": { - "type": "integer" - } - }, - "additionalProperties": false - }, - "StringBoolResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "ok": { - "type": "boolean" - }, - "result": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "result", - "ok" - ] - }, - "StringBoolResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringBoolResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "StringResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "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": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "StringsWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id" - ] - }, - "StringsWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringsWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "UnitRefreshResult": { - "type": "object", - "properties": { - "Error": { - "$ref": "#/definitions/Error" - }, - "Life": { - "type": "string" - }, - "Resolved": { - "type": "string" - }, - "provider-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Life", - "Resolved", - "Error" - ] - }, - "UnitRefreshResults": { - "type": "object", - "properties": { - "Results": { - "type": "array", - "items": { - "$ref": "#/definitions/UnitRefreshResult" - } - } - }, - "additionalProperties": false, - "required": [ - "Results" - ] - }, - "UnitSettings": { - "type": "object", - "properties": { - "version": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "version" - ] - }, - "UnitStateResult": { - "type": "object", - "properties": { - "charm-state": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "meter-status-state": { - "type": "string" - }, - "relation-state": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "secret-state": { - "type": "string" - }, - "storage-state": { - "type": "string" - }, - "uniter-state": { - "type": "string" - } - }, - "additionalProperties": false - }, - "UnitStateResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/UnitStateResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "UpdateSecretArg": { - "type": "object", - "properties": { - "UpsertSecretArg": { - "$ref": "#/definitions/UpsertSecretArg" - }, - "content": { - "$ref": "#/definitions/SecretContentParams" - }, - "description": { - "type": "string" - }, - "expire-time": { - "type": "string", - "format": "date-time" - }, - "label": { - "type": "string" - }, - "params": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "rotate-policy": { - "type": "string" - }, - "uri": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "UpsertSecretArg", - "uri" - ] - }, - "UpdateSecretArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/UpdateSecretArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "UpgradeSeriesStatusParam": { - "type": "object", - "properties": { - "entity": { - "$ref": "#/definitions/Entity" - }, - "message": { - "type": "string" - }, - "status": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "entity", - "status", - "message" - ] - }, - "UpgradeSeriesStatusParams": { - "type": "object", - "properties": { - "params": { - "type": "array", - "items": { - "$ref": "#/definitions/UpgradeSeriesStatusParam" - } - } - }, - "additionalProperties": false, - "required": [ - "params" - ] - }, - "UpgradeSeriesStatusResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "status": { - "type": "string" - }, - "target": { - "type": "string" - } - }, - "additionalProperties": false - }, - "UpgradeSeriesStatusResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/UpgradeSeriesStatusResult" - } - } - }, - "additionalProperties": false - }, - "UpsertSecretArg": { - "type": "object", - "properties": { - "content": { - "$ref": "#/definitions/SecretContentParams" - }, - "description": { - "type": "string" - }, - "expire-time": { - "type": "string", - "format": "date-time" - }, - "label": { - "type": "string" - }, - "params": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "rotate-policy": { - "type": "string" - } - }, - "additionalProperties": false - } - } - } - }, - { - "Name": "UpgradeSeries", - "Description": "API serves methods required by the machine agent upgrade-machine worker.", - "Version": 3, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "CurrentSeries": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringResults" - } - }, - "description": "CurrentSeries returns what Juju thinks the current series of the machine is.\nNote that a machine could have been upgraded out-of-band by running\ndo-release-upgrade outside of the upgrade-machine workflow,\nmaking this value incorrect." - }, - "FinishUpgradeSeries": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/UpdateChannelArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "FinishUpgradeSeries is the last action in the upgrade workflow and is\ncalled after all machine and unit statuses are \"completed\".\nIt updates the machine series to reflect the completed upgrade, then\nremoves the upgrade-machine lock." - }, - "MachineStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/UpgradeSeriesStatusResults" - } - }, - "description": "MachineStatus gets the current upgrade-machine status of a machine." - }, - "PinMachineApplications": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/PinApplicationsResults" - } - }, - "description": "PinMachineApplications pins leadership for applications represented by units\nrunning on the auth'd machine." - }, - "PinnedLeadership": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/PinnedLeadershipResult" - } - }, - "description": "PinnedLeadership returns all pinned applications and the entities that\nrequire their pinned behaviour, for leadership in the current model." - }, - "SetInstanceStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetStatus" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetInstanceStatus sets the status of the machine." - }, - "SetMachineStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/UpgradeSeriesStatusParams" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetMachineStatus sets the current upgrade-machine status of a machine." - }, - "SetUpgradeSeriesUnitStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/UpgradeSeriesStatusParams" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetUpgradeSeriesUnitStatus sets the upgrade series status of the unit.\nIf no upgrade is in progress an error is returned instead." - }, - "StartUnitCompletion": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/UpgradeSeriesStartUnitCompletionParam" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "StartUnitCompletion starts the upgrade series completion phase for all subordinate\nunits of a given machine." - }, - "TargetSeries": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringResults" - } - }, - "description": "TargetSeries returns the series that a machine has been locked\nfor upgrading to." - }, - "UnitsCompleted": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/EntitiesResults" - } - }, - "description": "UnitsCompleted returns the units running on this machine that have completed\nthe upgrade-machine workflow and are in their normal running state." - }, - "UnitsPrepared": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/EntitiesResults" - } - }, - "description": "UnitsPrepared returns the units running on this machine that have completed\ntheir upgrade-machine preparation, and are ready to be stopped and have their\nunit agent services converted for the target series." - }, - "UnpinMachineApplications": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/PinApplicationsResults" - } - }, - "description": "UnpinMachineApplications unpins leadership for applications represented by\nunits running on the auth'd machine." - }, - "UpgradeSeriesUnitStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/UpgradeSeriesStatusResults" - } - }, - "description": "UpgradeSeriesUnitStatus returns the current preparation status of an\nupgrading unit.\nIf no series upgrade is in progress an error is returned instead." - }, - "WatchUpgradeSeriesNotifications": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "WatchUpgradeSeriesNotifications returns a NotifyWatcher for observing changes to upgrade series locks." - } - }, - "definitions": { - "Entities": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } - } - }, - "additionalProperties": false, - "required": [ - "entities" - ] - }, - "EntitiesResult": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "entities" - ] - }, - "EntitiesResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/EntitiesResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "Entity": { - "type": "object", - "properties": { - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "NotifyWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "PinApplicationResult": { - "type": "object", - "properties": { - "application-name": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "application-name" - ] - }, - "PinApplicationsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/PinApplicationResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "PinnedLeadershipResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "object", - "patternProperties": { - ".*": { - "type": "array", - "items": { - "type": "string" - } - } - } - } - }, - "additionalProperties": false - }, - "SetStatus": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityStatusArgs" - } - } - }, - "additionalProperties": false, - "required": [ - "entities" - ] - }, - "StringResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "StringResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "UpdateChannelArg": { - "type": "object", - "properties": { - "channel": { - "type": "string" - }, - "force": { - "type": "boolean" - }, - "tag": { - "$ref": "#/definitions/Entity" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "force", - "channel" - ] - }, - "UpdateChannelArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/UpdateChannelArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "UpgradeSeriesStartUnitCompletionParam": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "entities", - "message" - ] - }, - "UpgradeSeriesStatusParam": { - "type": "object", - "properties": { - "entity": { - "$ref": "#/definitions/Entity" - }, - "message": { - "type": "string" - }, - "status": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "entity", - "status", - "message" - ] - }, - "UpgradeSeriesStatusParams": { - "type": "object", - "properties": { - "params": { - "type": "array", - "items": { - "$ref": "#/definitions/UpgradeSeriesStatusParam" - } - } - }, - "additionalProperties": false, - "required": [ - "params" - ] - }, - "UpgradeSeriesStatusResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "status": { - "type": "string" - }, - "target": { - "type": "string" - } - }, - "additionalProperties": false - }, - "UpgradeSeriesStatusResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/UpgradeSeriesStatusResult" - } - } - }, - "additionalProperties": false - } - } - } - }, - { - "Name": "UpgradeSteps", - "Description": "UpgradeStepsAPI implements version 2 of the Upgrade Steps API,\nwhich adds WriteUniterState.", - "Version": 2, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent" - ], - "Schema": { - "type": "object", - "properties": { - "ResetKVMMachineModificationStatusIdle": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entity" - }, - "Result": { - "$ref": "#/definitions/ErrorResult" - } - }, - "description": "ResetKVMMachineModificationStatusIdle sets the modification status\nof a kvm machine to idle if it is in an error state before upgrade.\nRelated to lp:1829393." - }, - "WriteAgentState": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetUnitStateArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "WriteAgentState writes the agent state for the set of units provided. This\ncall presently deals with the state for the unit agent." - } - }, - "definitions": { - "Entity": { - "type": "object", - "properties": { - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "SetUnitStateArg": { - "type": "object", - "properties": { - "charm-state": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "meter-status-state": { - "type": "string" - }, - "relation-state": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "secret-state": { - "type": "string" - }, - "storage-state": { - "type": "string" - }, - "tag": { - "type": "string" - }, - "uniter-state": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag" - ] - }, - "SetUnitStateArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/SetUnitStateArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - } - } - } - }, - { - "Name": "Upgrader", - "Description": "", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "DesiredVersion": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/VersionResults" - } - } - }, - "SetTools": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/EntitiesVersion" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - } - }, - "Tools": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ToolsResults" - } - } - }, - "WatchAPIVersion": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - } - } - }, - "definitions": { - "Binary": { - "type": "object", - "properties": { - "Arch": { - "type": "string" - }, - "Build": { - "type": "integer" - }, - "Major": { - "type": "integer" - }, - "Minor": { - "type": "integer" - }, - "Number": { - "$ref": "#/definitions/Number" - }, - "Patch": { - "type": "integer" - }, - "Release": { - "type": "string" - }, - "Tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Major", - "Minor", - "Tag", - "Patch", - "Build", - "Number", - "Release", - "Arch" - ] - }, - "Entities": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } - } - }, - "additionalProperties": false, - "required": [ - "entities" - ] - }, - "EntitiesVersion": { - "type": "object", - "properties": { - "agent-tools": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityVersion" - } - } - }, - "additionalProperties": false, - "required": [ - "agent-tools" - ] - }, - "Entity": { - "type": "object", - "properties": { - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag" - ] - }, - "EntityVersion": { - "type": "object", - "properties": { - "tag": { - "type": "string" - }, - "tools": { - "$ref": "#/definitions/Version" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "tools" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "NotifyWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "Number": { - "type": "object", - "properties": { - "Build": { - "type": "integer" - }, - "Major": { - "type": "integer" - }, - "Minor": { - "type": "integer" - }, - "Patch": { - "type": "integer" - }, - "Tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Major", - "Minor", - "Tag", - "Patch", - "Build" - ] - }, - "Tools": { - "type": "object", - "properties": { - "sha256": { - "type": "string" - }, - "size": { - "type": "integer" - }, - "url": { - "type": "string" - }, - "version": { - "$ref": "#/definitions/Binary" - } - }, - "additionalProperties": false, - "required": [ - "version", - "url", - "size" - ] - }, - "ToolsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "tools": { - "type": "array", - "items": { - "$ref": "#/definitions/Tools" - } - } - }, - "additionalProperties": false, - "required": [ - "tools" - ] - }, - "ToolsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ToolsResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "Version": { - "type": "object", - "properties": { - "version": { - "$ref": "#/definitions/Binary" - } - }, - "additionalProperties": false, - "required": [ - "version" - ] - }, - "VersionResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "version": { - "$ref": "#/definitions/Number" - } - }, - "additionalProperties": false - }, - "VersionResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/VersionResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - } - } - } - }, - { - "Name": "UserManager", - "Description": "UserManagerAPI implements the user manager interface and is the concrete\nimplementation of the api end point.", - "Version": 3, - "AvailableTo": [ - "controller-user" - ], - "Schema": { - "type": "object", - "properties": { - "AddUser": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/AddUsers" - }, - "Result": { - "$ref": "#/definitions/AddUserResults" - } - }, - "description": "AddUser adds a user with a username, and either a password or\na randomly generated secret key which will be returned." - }, - "DisableUser": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "DisableUser disables one or more users. If the user is already disabled,\nthe action is considered a success." - }, - "EnableUser": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "EnableUser enables one or more users. If the user is already enabled,\nthe action is considered a success." - }, - "ModelUserInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ModelUserInfoResults" - } - }, - "description": "ModelUserInfo returns information on all users in the model." - }, - "RemoveUser": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "RemoveUser permanently removes a user from the current controller for each\nentity provided. While the user is permanently removed we keep it's\ninformation around for auditing purposes.\nTODO(redir): Add information about getting deleted user information when we\nadd that capability." - }, - "ResetPassword": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/AddUserResults" - } - }, - "description": "ResetPassword resets password for supplied users by\ninvalidating current passwords (if any) and generating\nnew random secret keys which will be returned.\nUsers cannot reset their own password." - }, - "SetPassword": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/EntityPasswords" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetPassword changes the stored password for the specified users." - }, - "UserInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/UserInfoRequest" - }, - "Result": { - "$ref": "#/definitions/UserInfoResults" - } - }, - "description": "UserInfo returns information on a user." - } - }, - "definitions": { - "AddUser": { - "type": "object", - "properties": { - "display-name": { - "type": "string" - }, - "password": { - "type": "string" - }, - "username": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "username", - "display-name" - ] - }, - "AddUserResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "secret-key": { - "type": "array", - "items": { - "type": "integer" - } - }, - "tag": { - "type": "string" - } - }, - "additionalProperties": false - }, - "AddUserResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/AddUserResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "AddUsers": { - "type": "object", - "properties": { - "users": { - "type": "array", - "items": { - "$ref": "#/definitions/AddUser" - } - } - }, - "additionalProperties": false, - "required": [ - "users" - ] - }, - "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" - ] - }, - "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" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ModelUserInfo": { - "type": "object", - "properties": { - "access": { - "type": "string" - }, - "display-name": { - "type": "string" - }, - "last-connection": { - "type": "string", - "format": "date-time" - }, - "model-tag": { - "type": "string" - }, - "user": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "model-tag", - "user", - "display-name", - "last-connection", - "access" - ] - }, - "ModelUserInfoResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/ModelUserInfo" - } - }, - "additionalProperties": false - }, - "ModelUserInfoResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelUserInfoResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "UserInfo": { - "type": "object", - "properties": { - "access": { - "type": "string" - }, - "created-by": { - "type": "string" - }, - "date-created": { - "type": "string", - "format": "date-time" - }, - "disabled": { - "type": "boolean" - }, - "display-name": { - "type": "string" - }, - "last-connection": { - "type": "string", - "format": "date-time" - }, - "username": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "username", - "display-name", - "access", - "created-by", - "date-created", - "disabled" - ] - }, - "UserInfoRequest": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } - }, - "include-disabled": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "entities", - "include-disabled" - ] - }, - "UserInfoResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/UserInfo" - } - }, - "additionalProperties": false - }, - "UserInfoResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/UserInfoResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - } - } - } - }, - { - "Name": "VolumeAttachmentPlansWatcher", - "Description": "srvMachineStorageIdsWatcher defines the API wrapping a state.StringsWatcher\nwatching machine/storage attachments. This watcher notifies about storage\nentities (volumes/filesystems) being attached to and detached from machines.\n\nTODO(axw) state needs a new watcher, this is a bt of a hack. State watchers\ncould do with some deduplication of logic, and I don't want to add to that\nspaghetti right now.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "Next": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/MachineStorageIdsWatchResult" - } - }, - "description": "Next returns when a change has occurred to an entity of the\ncollection being watched since the most recent call to Next\nor the Watch call that created the srvMachineStorageIdsWatcher." - }, - "Stop": { - "type": "object", - "description": "Stop stops the watcher." - } - }, - "definitions": { - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "MachineStorageId": { - "type": "object", - "properties": { - "attachment-tag": { - "type": "string" - }, - "machine-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "machine-tag", - "attachment-tag" - ] - }, - "MachineStorageIdsWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "$ref": "#/definitions/MachineStorageId" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id", - "changes" - ] - } - } - } - }, - { - "Name": "VolumeAttachmentsWatcher", - "Description": "srvMachineStorageIdsWatcher defines the API wrapping a state.StringsWatcher\nwatching machine/storage attachments. This watcher notifies about storage\nentities (volumes/filesystems) being attached to and detached from machines.\n\nTODO(axw) state needs a new watcher, this is a bt of a hack. State watchers\ncould do with some deduplication of logic, and I don't want to add to that\nspaghetti right now.", - "Version": 2, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "Next": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/MachineStorageIdsWatchResult" - } - }, - "description": "Next returns when a change has occurred to an entity of the\ncollection being watched since the most recent call to Next\nor the Watch call that created the srvMachineStorageIdsWatcher." - }, - "Stop": { - "type": "object", - "description": "Stop stops the watcher." - } - }, - "definitions": { - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "MachineStorageId": { - "type": "object", - "properties": { - "attachment-tag": { - "type": "string" - }, - "machine-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "machine-tag", - "attachment-tag" - ] - }, - "MachineStorageIdsWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "$ref": "#/definitions/MachineStorageId" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id", - "changes" - ] - } - } - } - } -] \ No newline at end of file diff --git a/juju/client/schemas-juju-3.1.2.json b/juju/client/schemas-juju-3.1.2.json deleted file mode 100644 index 13067048..00000000 --- a/juju/client/schemas-juju-3.1.2.json +++ /dev/null @@ -1,50873 +0,0 @@ -[ - { - "Name": "Action", - "Description": "APIv7 provides the Action API facade for version 7.", - "Version": 7, - "AvailableTo": [ - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "Actions": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ActionResults" - } - }, - "description": "Actions takes a list of ActionTags, and returns the full Action for\neach ID." - }, - "ApplicationsCharmsActions": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ApplicationsCharmActionsResults" - } - }, - "description": "ApplicationsCharmsActions returns a slice of charm Actions for a slice of\nservices." - }, - "Cancel": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ActionResults" - } - }, - "description": "Cancel attempts to cancel enqueued Actions from running." - }, - "EnqueueOperation": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Actions" - }, - "Result": { - "$ref": "#/definitions/EnqueuedActions" - } - }, - "description": "EnqueueOperation takes a list of Actions and queues them up to be executed as\nan operation, each action running as a task on the designated ActionReceiver.\nWe return the ID of the overall operation and each individual task." - }, - "ListOperations": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/OperationQueryArgs" - }, - "Result": { - "$ref": "#/definitions/OperationResults" - } - }, - "description": "ListOperations fetches the called actions for specified apps/units." - }, - "Operations": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/OperationResults" - } - }, - "description": "Operations fetches the specified operation ids." - }, - "Run": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RunParams" - }, - "Result": { - "$ref": "#/definitions/EnqueuedActions" - } - }, - "description": "Run the commands specified on the machines identified through the\nlist of machines, units and services." - }, - "RunOnAllMachines": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RunParams" - }, - "Result": { - "$ref": "#/definitions/EnqueuedActions" - } - }, - "description": "RunOnAllMachines attempts to run the specified command on all the machines." - }, - "WatchActionsProgress": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - }, - "description": "WatchActionsProgress creates a watcher that reports on action log messages." - } - }, - "definitions": { - "Action": { - "type": "object", - "properties": { - "execution-group": { - "type": "string" - }, - "name": { - "type": "string" - }, - "parallel": { - "type": "boolean" - }, - "parameters": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "receiver": { - "type": "string" - }, - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "receiver", - "name" - ] - }, - "ActionMessage": { - "type": "object", - "properties": { - "message": { - "type": "string" - }, - "timestamp": { - "type": "string", - "format": "date-time" - } - }, - "additionalProperties": false, - "required": [ - "timestamp", - "message" - ] - }, - "ActionResult": { - "type": "object", - "properties": { - "action": { - "$ref": "#/definitions/Action" - }, - "completed": { - "type": "string", - "format": "date-time" - }, - "enqueued": { - "type": "string", - "format": "date-time" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "log": { - "type": "array", - "items": { - "$ref": "#/definitions/ActionMessage" - } - }, - "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 - }, - "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" - } - } - }, - "additionalProperties": false - }, - "ApplicationCharmActionsResult": { - "type": "object", - "properties": { - "actions": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/ActionSpec" - } - } - }, - "application-tag": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ApplicationsCharmActionsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ApplicationCharmActionsResult" - } - } - }, - "additionalProperties": false - }, - "EnqueuedActions": { - "type": "object", - "properties": { - "actions": { - "type": "array", - "items": { - "$ref": "#/definitions/ActionResult" - } - }, - "operation": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "operation" - ] - }, - "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": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "OperationQueryArgs": { - "type": "object", - "properties": { - "actions": { - "type": "array", - "items": { - "type": "string" - } - }, - "applications": { - "type": "array", - "items": { - "type": "string" - } - }, - "limit": { - "type": "integer" - }, - "machines": { - "type": "array", - "items": { - "type": "string" - } - }, - "offset": { - "type": "integer" - }, - "status": { - "type": "array", - "items": { - "type": "string" - } - }, - "units": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "OperationResult": { - "type": "object", - "properties": { - "actions": { - "type": "array", - "items": { - "$ref": "#/definitions/ActionResult" - } - }, - "completed": { - "type": "string", - "format": "date-time" - }, - "enqueued": { - "type": "string", - "format": "date-time" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "fail": { - "type": "string" - }, - "operation": { - "type": "string" - }, - "started": { - "type": "string", - "format": "date-time" - }, - "status": { - "type": "string" - }, - "summary": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "operation", - "summary" - ] - }, - "OperationResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/OperationResult" - } - }, - "truncated": { - "type": "boolean" - } - }, - "additionalProperties": false - }, - "RunParams": { - "type": "object", - "properties": { - "applications": { - "type": "array", - "items": { - "type": "string" - } - }, - "commands": { - "type": "string" - }, - "execution-group": { - "type": "string" - }, - "machines": { - "type": "array", - "items": { - "type": "string" - } - }, - "parallel": { - "type": "boolean" - }, - "timeout": { - "type": "integer" - }, - "units": { - "type": "array", - "items": { - "type": "string" - } - }, - "workload-context": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "commands", - "timeout" - ] - }, - "StringsWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id" - ] - }, - "StringsWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringsWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - } - } - } - }, - { - "Name": "ActionPruner", - "Description": "API provides access to the action pruner API.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "ModelConfig": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ModelConfigResult" - } - }, - "description": "ModelConfig returns the current model's configuration." - }, - "Prune": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ActionPruneArgs" - } - }, - "description": "Prune endpoint removes action entries until\nonly the ones newer than now - p.MaxHistoryTime remain and\nthe history is smaller than p.MaxHistoryMB." - }, - "WatchForModelConfigChanges": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResult" - } - }, - "description": "WatchForModelConfigChanges returns a NotifyWatcher that observes\nchanges to the model configuration.\nNote that although the NotifyWatchResult contains an Error field,\nit's not used because we are only returning a single watcher,\nso we use the regular error return." - } - }, - "definitions": { - "ActionPruneArgs": { - "type": "object", - "properties": { - "max-history-mb": { - "type": "integer" - }, - "max-history-time": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "max-history-time", - "max-history-mb" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ModelConfigResult": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - } - } - } - }, - { - "Name": "Admin", - "Description": "admin is the only object that unlogged-in clients can access. It holds any\nmethods that are needed to log in.", - "Version": 3, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "controller-user", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "Login": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/LoginRequest" - }, - "Result": { - "$ref": "#/definitions/LoginResult" - } - }, - "description": "Login logs in with the provided credentials. All subsequent requests on the\nconnection will act as the authenticated user." - }, - "RedirectInfo": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/RedirectInfoResult" - } - }, - "description": "RedirectInfo returns redirected host information for the model.\nIn Juju it always returns an error because the Juju controller\ndoes not multiplex controllers." - } - }, - "definitions": { - "Address": { - "type": "object", - "properties": { - "cidr": { - "type": "string" - }, - "config-type": { - "type": "string" - }, - "is-secondary": { - "type": "boolean" - }, - "scope": { - "type": "string" - }, - "space-id": { - "type": "string" - }, - "space-name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "value", - "type", - "scope" - ] - }, - "AuthUserInfo": { - "type": "object", - "properties": { - "controller-access": { - "type": "string" - }, - "credentials": { - "type": "string" - }, - "display-name": { - "type": "string" - }, - "identity": { - "type": "string" - }, - "last-connection": { - "type": "string", - "format": "date-time" - }, - "model-access": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "display-name", - "identity", - "controller-access", - "model-access" - ] - }, - "FacadeVersions": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "versions": { - "type": "array", - "items": { - "type": "integer" - } - } - }, - "additionalProperties": false, - "required": [ - "name", - "versions" - ] - }, - "HostPort": { - "type": "object", - "properties": { - "Address": { - "$ref": "#/definitions/Address" - }, - "cidr": { - "type": "string" - }, - "config-type": { - "type": "string" - }, - "is-secondary": { - "type": "boolean" - }, - "port": { - "type": "integer" - }, - "scope": { - "type": "string" - }, - "space-id": { - "type": "string" - }, - "space-name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "value", - "type", - "scope", - "Address", - "port" - ] - }, - "LoginRequest": { - "type": "object", - "properties": { - "auth-tag": { - "type": "string" - }, - "bakery-version": { - "type": "integer" - }, - "cli-args": { - "type": "string" - }, - "client-version": { - "type": "string" - }, - "credentials": { - "type": "string" - }, - "macaroons": { - "type": "array", - "items": { - "type": "array", - "items": { - "$ref": "#/definitions/Macaroon" - } - } - }, - "nonce": { - "type": "string" - }, - "user-data": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "auth-tag", - "credentials", - "nonce", - "macaroons", - "user-data" - ] - }, - "LoginResult": { - "type": "object", - "properties": { - "bakery-discharge-required": { - "$ref": "#/definitions/Macaroon" - }, - "controller-tag": { - "type": "string" - }, - "discharge-required": { - "$ref": "#/definitions/Macaroon" - }, - "discharge-required-error": { - "type": "string" - }, - "facades": { - "type": "array", - "items": { - "$ref": "#/definitions/FacadeVersions" - } - }, - "model-tag": { - "type": "string" - }, - "public-dns-name": { - "type": "string" - }, - "server-version": { - "type": "string" - }, - "servers": { - "type": "array", - "items": { - "type": "array", - "items": { - "$ref": "#/definitions/HostPort" - } - } - }, - "user-info": { - "$ref": "#/definitions/AuthUserInfo" - } - }, - "additionalProperties": false - }, - "Macaroon": { - "type": "object", - "additionalProperties": false - }, - "RedirectInfoResult": { - "type": "object", - "properties": { - "ca-cert": { - "type": "string" - }, - "servers": { - "type": "array", - "items": { - "type": "array", - "items": { - "$ref": "#/definitions/HostPort" - } - } - } - }, - "additionalProperties": false, - "required": [ - "servers", - "ca-cert" - ] - } - } - } - }, - { - "Name": "Agent", - "Description": "AgentAPI implements the version 3 of the API provided to an agent.", - "Version": 3, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent" - ], - "Schema": { - "type": "object", - "properties": { - "ClearReboot": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "ClearReboot will clear the reboot flag on provided machines, if it exists." - }, - "CloudSpec": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/CloudSpecResults" - } - }, - "description": "CloudSpec returns the model's cloud spec." - }, - "ControllerAPIInfoForModels": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ControllerAPIInfoResults" - } - }, - "description": "ControllerAPIInfoForModels returns the controller api connection details for the specified models." - }, - "ControllerConfig": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ControllerConfigResult" - } - }, - "description": "ControllerConfig returns the controller's configuration." - }, - "GetCloudSpec": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ModelTag" - }, - "Result": { - "$ref": "#/definitions/CloudSpecResult" - } - }, - "description": "GetCloudSpec constructs the CloudSpec for a validated and authorized model." - }, - "GetEntities": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/AgentGetEntitiesResults" - } - } - }, - "IsMaster": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/IsMasterResult" - } - } - }, - "ModelConfig": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ModelConfigResult" - } - }, - "description": "ModelConfig returns the current model's configuration." - }, - "SetPasswords": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/EntityPasswords" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetPasswords sets the given password for each supplied entity, if possible." - }, - "StateServingInfo": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StateServingInfo" - } - } - }, - "WatchCloudSpecsChanges": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "WatchCloudSpecsChanges returns a watcher for cloud spec changes." - }, - "WatchCredentials": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "WatchCredentials watches for changes to the specified credentials." - }, - "WatchForModelConfigChanges": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResult" - } - }, - "description": "WatchForModelConfigChanges returns a NotifyWatcher that observes\nchanges to the model configuration.\nNote that although the NotifyWatchResult contains an Error field,\nit's not used because we are only returning a single watcher,\nso we use the regular error return." - } - }, - "definitions": { - "AgentGetEntitiesResult": { - "type": "object", - "properties": { - "container-type": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "jobs": { - "type": "array", - "items": { - "type": "string" - } - }, - "life": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "life", - "jobs", - "container-type" - ] - }, - "AgentGetEntitiesResults": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/AgentGetEntitiesResult" - } - } - }, - "additionalProperties": false, - "required": [ - "entities" - ] - }, - "CloudCredential": { - "type": "object", - "properties": { - "attrs": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "auth-type": { - "type": "string" - }, - "redacted": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "auth-type" - ] - }, - "CloudSpec": { - "type": "object", - "properties": { - "cacertificates": { - "type": "array", - "items": { - "type": "string" - } - }, - "credential": { - "$ref": "#/definitions/CloudCredential" - }, - "endpoint": { - "type": "string" - }, - "identity-endpoint": { - "type": "string" - }, - "is-controller-cloud": { - "type": "boolean" - }, - "name": { - "type": "string" - }, - "region": { - "type": "string" - }, - "skip-tls-verify": { - "type": "boolean" - }, - "storage-endpoint": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type", - "name" - ] - }, - "CloudSpecResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/CloudSpec" - } - }, - "additionalProperties": false - }, - "CloudSpecResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/CloudSpecResult" - } - } - }, - "additionalProperties": false - }, - "ControllerAPIInfoResult": { - "type": "object", - "properties": { - "addresses": { - "type": "array", - "items": { - "type": "string" - } - }, - "cacert": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "addresses", - "cacert" - ] - }, - "ControllerAPIInfoResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ControllerAPIInfoResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ControllerConfigResult": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "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" - ] - }, - "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" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "IsMasterResult": { - "type": "object", - "properties": { - "master": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "master" - ] - }, - "ModelConfigResult": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "ModelTag": { - "type": "object", - "additionalProperties": false - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "NotifyWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "StateServingInfo": { - "type": "object", - "properties": { - "api-port": { - "type": "integer" - }, - "ca-private-key": { - "type": "string" - }, - "cert": { - "type": "string" - }, - "controller-api-port": { - "type": "integer" - }, - "private-key": { - "type": "string" - }, - "shared-secret": { - "type": "string" - }, - "state-port": { - "type": "integer" - }, - "system-identity": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "api-port", - "state-port", - "cert", - "private-key", - "ca-private-key", - "shared-secret", - "system-identity" - ] - } - } - } - }, - { - "Name": "AgentTools", - "Description": "AgentToolsAPI implements the API used by the machine model worker.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "UpdateToolsAvailable": { - "type": "object", - "description": "UpdateToolsAvailable invokes a lookup and further update in environ\nfor new patches of the current tool versions." - } - } - } - }, - { - "Name": "AllModelWatcher", - "Description": "SrvAllWatcher defines the API methods on a state.Multiwatcher.\nwhich watches any changes to the state. Each client has its own\ncurrent set of watchers, stored in resources. It is used by both\nthe AllWatcher and AllModelWatcher facades.", - "Version": 4, - "AvailableTo": [ - "controller-user" - ], - "Schema": { - "type": "object", - "properties": { - "Next": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/AllWatcherNextResults" - } - }, - "description": "Next will return the current state of everything on the first call\nand subsequent calls will" - }, - "Stop": { - "type": "object", - "description": "Stop stops the watcher." - } - }, - "definitions": { - "AllWatcherNextResults": { - "type": "object", - "properties": { - "deltas": { - "type": "array", - "items": { - "$ref": "#/definitions/Delta" - } - } - }, - "additionalProperties": false, - "required": [ - "deltas" - ] - }, - "Delta": { - "type": "object", - "properties": { - "entity": { - "type": "object", - "additionalProperties": true - }, - "removed": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "removed", - "entity" - ] - } - } - } - }, - { - "Name": "AllWatcher", - "Description": "SrvAllWatcher defines the API methods on a state.Multiwatcher.\nwhich watches any changes to the state. Each client has its own\ncurrent set of watchers, stored in resources. It is used by both\nthe AllWatcher and AllModelWatcher facades.", - "Version": 3, - "AvailableTo": [ - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "Next": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/AllWatcherNextResults" - } - }, - "description": "Next will return the current state of everything on the first call\nand subsequent calls will" - }, - "Stop": { - "type": "object", - "description": "Stop stops the watcher." - } - }, - "definitions": { - "AllWatcherNextResults": { - "type": "object", - "properties": { - "deltas": { - "type": "array", - "items": { - "$ref": "#/definitions/Delta" - } - } - }, - "additionalProperties": false, - "required": [ - "deltas" - ] - }, - "Delta": { - "type": "object", - "properties": { - "entity": { - "type": "object", - "additionalProperties": true - }, - "removed": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "removed", - "entity" - ] - } - } - } - }, - { - "Name": "Annotations", - "Description": "API implements the service interface and is the concrete\nimplementation of the api end point.", - "Version": 2, - "AvailableTo": [ - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "Get": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/AnnotationsGetResults" - } - }, - "description": "Get returns annotations for given entities.\nIf annotations cannot be retrieved for a given entity, an error is returned.\nEach entity is treated independently and, hence, will fail or succeed independently." - }, - "Set": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/AnnotationsSet" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "Set stores annotations for given entities" - } - }, - "definitions": { - "AnnotationsGetResult": { - "type": "object", - "properties": { - "annotations": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "entity": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/ErrorResult" - } - }, - "additionalProperties": false, - "required": [ - "entity", - "annotations" - ] - }, - "AnnotationsGetResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/AnnotationsGetResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "AnnotationsSet": { - "type": "object", - "properties": { - "annotations": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityAnnotations" - } - } - }, - "additionalProperties": false, - "required": [ - "annotations" - ] - }, - "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" - ] - }, - "EntityAnnotations": { - "type": "object", - "properties": { - "annotations": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "entity": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "entity", - "annotations" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - } - } - } - }, - { - "Name": "Application", - "Description": "APIv17 provides the Application API facade for version 17.", - "Version": 17, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "AddRelation": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/AddRelation" - }, - "Result": { - "$ref": "#/definitions/AddRelationResults" - } - }, - "description": "AddRelation adds a relation between the specified endpoints and returns the relation info." - }, - "AddUnits": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/AddApplicationUnits" - }, - "Result": { - "$ref": "#/definitions/AddApplicationUnitsResults" - } - }, - "description": "AddUnits adds a given number of units to an application." - }, - "ApplicationsInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ApplicationInfoResults" - } - }, - "description": "ApplicationsInfo returns applications information." - }, - "CharmConfig": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ApplicationGetArgs" - }, - "Result": { - "$ref": "#/definitions/ApplicationGetConfigResults" - } - }, - "description": "CharmConfig returns charm config for the input list of applications and\nmodel generations." - }, - "CharmRelations": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ApplicationCharmRelations" - }, - "Result": { - "$ref": "#/definitions/ApplicationCharmRelationsResults" - } - }, - "description": "CharmRelations implements the server side of Application.CharmRelations." - }, - "Consume": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ConsumeApplicationArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "Consume adds remote applications to the model without creating any\nrelations." - }, - "Deploy": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ApplicationsDeploy" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "Deploy fetches the charms from the charm store and deploys them\nusing the specified placement directives." - }, - "DestroyApplication": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/DestroyApplicationsParams" - }, - "Result": { - "$ref": "#/definitions/DestroyApplicationResults" - } - }, - "description": "DestroyApplication removes a given set of applications." - }, - "DestroyConsumedApplications": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/DestroyConsumedApplicationsParams" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "DestroyConsumedApplications removes a given set of consumed (remote) applications." - }, - "DestroyRelation": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/DestroyRelation" - } - }, - "description": "DestroyRelation removes the relation between the\nspecified endpoints or an id." - }, - "DestroyUnit": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/DestroyUnitsParams" - }, - "Result": { - "$ref": "#/definitions/DestroyUnitResults" - } - }, - "description": "DestroyUnit removes a given set of application units." - }, - "Expose": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ApplicationExpose" - } - }, - "description": "Expose changes the juju-managed firewall to expose any ports that\nwere also explicitly marked by units as open." - }, - "Get": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ApplicationGet" - }, - "Result": { - "$ref": "#/definitions/ApplicationGetResults" - } - }, - "description": "Get returns the charm configuration for an application." - }, - "GetCharmURLOrigin": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ApplicationGet" - }, - "Result": { - "$ref": "#/definitions/CharmURLOriginResult" - } - }, - "description": "GetCharmURLOrigin returns the charm URL and charm origin the given\napplication is running at present." - }, - "GetConfig": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ApplicationGetConfigResults" - } - }, - "description": "GetConfig returns the charm config for each of the input applications." - }, - "GetConstraints": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ApplicationGetConstraintsResults" - } - }, - "description": "GetConstraints returns the constraints for a given application." - }, - "Leader": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entity" - }, - "Result": { - "$ref": "#/definitions/StringResult" - } - }, - "description": "Leader returns the unit name of the leader for the given application." - }, - "MergeBindings": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ApplicationMergeBindingsArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "MergeBindings merges operator-defined bindings with the current bindings for\none or more applications." - }, - "ResolveUnitErrors": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/UnitsResolved" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "ResolveUnitErrors marks errors on the specified units as resolved." - }, - "ScaleApplications": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ScaleApplicationsParams" - }, - "Result": { - "$ref": "#/definitions/ScaleApplicationResults" - } - }, - "description": "ScaleApplications scales the specified application to the requested number of units." - }, - "SetCharm": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ApplicationSetCharm" - } - }, - "description": "SetCharm sets the charm for a given for the application." - }, - "SetConfigs": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ConfigSetArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetConfigs implements the server side of Application.SetConfig. Both\napplication and charm config are set. It does not unset values in\nConfig map that are set to an empty string. Unset should be used for that." - }, - "SetConstraints": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetConstraints" - } - }, - "description": "SetConstraints sets the constraints for a given application." - }, - "SetMetricCredentials": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ApplicationMetricCredentials" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetMetricCredentials sets credentials on the application." - }, - "SetRelationsSuspended": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RelationSuspendedArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetRelationsSuspended sets the suspended status of the specified relations." - }, - "Unexpose": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ApplicationUnexpose" - } - }, - "description": "Unexpose changes the juju-managed firewall to unexpose any ports that\nwere also explicitly marked by units as open." - }, - "UnitsInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/UnitInfoResults" - } - }, - "description": "UnitsInfo returns unit information for the given entities (units or\napplications)." - }, - "UnsetApplicationsConfig": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ApplicationConfigUnsetArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "UnsetApplicationsConfig implements the server side of Application.UnsetApplicationsConfig." - }, - "UpdateApplicationBase": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/UpdateChannelArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "UpdateApplicationBase updates the application base.\nBase for subordinates is updated too." - } - }, - "definitions": { - "AddApplicationUnits": { - "type": "object", - "properties": { - "application": { - "type": "string" - }, - "attach-storage": { - "type": "array", - "items": { - "type": "string" - } - }, - "num-units": { - "type": "integer" - }, - "placement": { - "type": "array", - "items": { - "$ref": "#/definitions/Placement" - } - }, - "policy": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "application", - "num-units", - "placement" - ] - }, - "AddApplicationUnitsResults": { - "type": "object", - "properties": { - "units": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "units" - ] - }, - "AddRelation": { - "type": "object", - "properties": { - "endpoints": { - "type": "array", - "items": { - "type": "string" - } - }, - "via-cidrs": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "endpoints" - ] - }, - "AddRelationResults": { - "type": "object", - "properties": { - "endpoints": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmRelation" - } - } - } - }, - "additionalProperties": false, - "required": [ - "endpoints" - ] - }, - "ApplicationCharmRelations": { - "type": "object", - "properties": { - "application": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "application" - ] - }, - "ApplicationCharmRelationsResults": { - "type": "object", - "properties": { - "charm-relations": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "charm-relations" - ] - }, - "ApplicationConfigUnsetArgs": { - "type": "object", - "properties": { - "Args": { - "type": "array", - "items": { - "$ref": "#/definitions/ApplicationUnset" - } - } - }, - "additionalProperties": false, - "required": [ - "Args" - ] - }, - "ApplicationConstraint": { - "type": "object", - "properties": { - "constraints": { - "$ref": "#/definitions/Value" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "constraints" - ] - }, - "ApplicationDeploy": { - "type": "object", - "properties": { - "Force": { - "type": "boolean" - }, - "application": { - "type": "string" - }, - "attach-storage": { - "type": "array", - "items": { - "type": "string" - } - }, - "channel": { - "type": "string" - }, - "charm-origin": { - "$ref": "#/definitions/CharmOrigin" - }, - "charm-url": { - "type": "string" - }, - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "config-yaml": { - "type": "string" - }, - "constraints": { - "$ref": "#/definitions/Value" - }, - "devices": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/Constraints" - } - } - }, - "endpoint-bindings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "num-units": { - "type": "integer" - }, - "placement": { - "type": "array", - "items": { - "$ref": "#/definitions/Placement" - } - }, - "policy": { - "type": "string" - }, - "resources": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "storage": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/Constraints" - } - } - } - }, - "additionalProperties": false, - "required": [ - "application", - "charm-url", - "channel", - "num-units", - "config-yaml", - "constraints", - "Force" - ] - }, - "ApplicationExpose": { - "type": "object", - "properties": { - "application": { - "type": "string" - }, - "exposed-endpoints": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/ExposedEndpoint" - } - } - } - }, - "additionalProperties": false, - "required": [ - "application" - ] - }, - "ApplicationGet": { - "type": "object", - "properties": { - "application": { - "type": "string" - }, - "branch": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "application", - "branch" - ] - }, - "ApplicationGetArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/ApplicationGet" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "ApplicationGetConfigResults": { - "type": "object", - "properties": { - "Results": { - "type": "array", - "items": { - "$ref": "#/definitions/ConfigResult" - } - } - }, - "additionalProperties": false, - "required": [ - "Results" - ] - }, - "ApplicationGetConstraintsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ApplicationConstraint" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ApplicationGetResults": { - "type": "object", - "properties": { - "application": { - "type": "string" - }, - "application-config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "base": { - "$ref": "#/definitions/Base" - }, - "channel": { - "type": "string" - }, - "charm": { - "type": "string" - }, - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "constraints": { - "$ref": "#/definitions/Value" - }, - "endpoint-bindings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - } - }, - "additionalProperties": false, - "required": [ - "application", - "charm", - "config", - "constraints", - "base", - "channel" - ] - }, - "ApplicationInfoResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/ApplicationResult" - } - }, - "additionalProperties": false - }, - "ApplicationInfoResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ApplicationInfoResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ApplicationMergeBindings": { - "type": "object", - "properties": { - "application-tag": { - "type": "string" - }, - "bindings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "force": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "application-tag", - "bindings", - "force" - ] - }, - "ApplicationMergeBindingsArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/ApplicationMergeBindings" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "ApplicationMetricCredential": { - "type": "object", - "properties": { - "application": { - "type": "string" - }, - "metrics-credentials": { - "type": "array", - "items": { - "type": "integer" - } - } - }, - "additionalProperties": false, - "required": [ - "application", - "metrics-credentials" - ] - }, - "ApplicationMetricCredentials": { - "type": "object", - "properties": { - "creds": { - "type": "array", - "items": { - "$ref": "#/definitions/ApplicationMetricCredential" - } - } - }, - "additionalProperties": false, - "required": [ - "creds" - ] - }, - "ApplicationOfferDetails": { - "type": "object", - "properties": { - "application-description": { - "type": "string" - }, - "bindings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "endpoints": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoteEndpoint" - } - }, - "offer-name": { - "type": "string" - }, - "offer-url": { - "type": "string" - }, - "offer-uuid": { - "type": "string" - }, - "source-model-tag": { - "type": "string" - }, - "spaces": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoteSpace" - } - }, - "users": { - "type": "array", - "items": { - "$ref": "#/definitions/OfferUserDetails" - } - } - }, - "additionalProperties": false, - "required": [ - "source-model-tag", - "offer-uuid", - "offer-url", - "offer-name", - "application-description" - ] - }, - "ApplicationResult": { - "type": "object", - "properties": { - "base": { - "$ref": "#/definitions/Base" - }, - "channel": { - "type": "string" - }, - "charm": { - "type": "string" - }, - "constraints": { - "$ref": "#/definitions/Value" - }, - "endpoint-bindings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "exposed": { - "type": "boolean" - }, - "exposed-endpoints": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/ExposedEndpoint" - } - } - }, - "life": { - "type": "string" - }, - "principal": { - "type": "boolean" - }, - "remote": { - "type": "boolean" - }, - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "principal", - "exposed", - "remote", - "life" - ] - }, - "ApplicationSetCharm": { - "type": "object", - "properties": { - "application": { - "type": "string" - }, - "channel": { - "type": "string" - }, - "charm-origin": { - "$ref": "#/definitions/CharmOrigin" - }, - "charm-url": { - "type": "string" - }, - "config-settings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "config-settings-yaml": { - "type": "string" - }, - "endpoint-bindings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "force": { - "type": "boolean" - }, - "force-base": { - "type": "boolean" - }, - "force-units": { - "type": "boolean" - }, - "generation": { - "type": "string" - }, - "resource-ids": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "storage-constraints": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/StorageConstraints" - } - } - } - }, - "additionalProperties": false, - "required": [ - "application", - "generation", - "charm-url", - "channel", - "force", - "force-units", - "force-base" - ] - }, - "ApplicationUnexpose": { - "type": "object", - "properties": { - "application": { - "type": "string" - }, - "exposed-endpoints": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "application", - "exposed-endpoints" - ] - }, - "ApplicationUnset": { - "type": "object", - "properties": { - "application": { - "type": "string" - }, - "branch": { - "type": "string" - }, - "options": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "application", - "branch", - "options" - ] - }, - "ApplicationsDeploy": { - "type": "object", - "properties": { - "applications": { - "type": "array", - "items": { - "$ref": "#/definitions/ApplicationDeploy" - } - } - }, - "additionalProperties": false, - "required": [ - "applications" - ] - }, - "Base": { - "type": "object", - "properties": { - "channel": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "channel" - ] - }, - "CharmOrigin": { - "type": "object", - "properties": { - "architecture": { - "type": "string" - }, - "base": { - "$ref": "#/definitions/Base" - }, - "branch": { - "type": "string" - }, - "hash": { - "type": "string" - }, - "id": { - "type": "string" - }, - "instance-key": { - "type": "string" - }, - "revision": { - "type": "integer" - }, - "risk": { - "type": "string" - }, - "source": { - "type": "string" - }, - "track": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "source", - "type", - "id" - ] - }, - "CharmRelation": { - "type": "object", - "properties": { - "interface": { - "type": "string" - }, - "limit": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "optional": { - "type": "boolean" - }, - "role": { - "type": "string" - }, - "scope": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "role", - "interface", - "optional", - "limit", - "scope" - ] - }, - "CharmURLOriginResult": { - "type": "object", - "properties": { - "charm-origin": { - "$ref": "#/definitions/CharmOrigin" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "url": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "url", - "charm-origin" - ] - }, - "ConfigResult": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "ConfigSet": { - "type": "object", - "properties": { - "application": { - "type": "string" - }, - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "config-yaml": { - "type": "string" - }, - "generation": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "application", - "generation", - "config", - "config-yaml" - ] - }, - "ConfigSetArgs": { - "type": "object", - "properties": { - "Args": { - "type": "array", - "items": { - "$ref": "#/definitions/ConfigSet" - } - } - }, - "additionalProperties": false, - "required": [ - "Args" - ] - }, - "Constraints": { - "type": "object", - "properties": { - "Count": { - "type": "integer" - }, - "Pool": { - "type": "string" - }, - "Size": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "Pool", - "Size", - "Count" - ] - }, - "ConsumeApplicationArg": { - "type": "object", - "properties": { - "ApplicationOfferDetails": { - "$ref": "#/definitions/ApplicationOfferDetails" - }, - "application-alias": { - "type": "string" - }, - "application-description": { - "type": "string" - }, - "bindings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "endpoints": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoteEndpoint" - } - }, - "external-controller": { - "$ref": "#/definitions/ExternalControllerInfo" - }, - "macaroon": { - "$ref": "#/definitions/Macaroon" - }, - "offer-name": { - "type": "string" - }, - "offer-url": { - "type": "string" - }, - "offer-uuid": { - "type": "string" - }, - "source-model-tag": { - "type": "string" - }, - "spaces": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoteSpace" - } - }, - "users": { - "type": "array", - "items": { - "$ref": "#/definitions/OfferUserDetails" - } - } - }, - "additionalProperties": false, - "required": [ - "source-model-tag", - "offer-uuid", - "offer-url", - "offer-name", - "application-description", - "ApplicationOfferDetails" - ] - }, - "ConsumeApplicationArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/ConsumeApplicationArg" - } - } - }, - "additionalProperties": false - }, - "DestroyApplicationInfo": { - "type": "object", - "properties": { - "destroyed-storage": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } - }, - "destroyed-units": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } - }, - "detached-storage": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } - } - }, - "additionalProperties": false - }, - "DestroyApplicationParams": { - "type": "object", - "properties": { - "application-tag": { - "type": "string" - }, - "destroy-storage": { - "type": "boolean" - }, - "dry-run": { - "type": "boolean" - }, - "force": { - "type": "boolean" - }, - "max-wait": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "application-tag", - "force" - ] - }, - "DestroyApplicationResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "info": { - "$ref": "#/definitions/DestroyApplicationInfo" - } - }, - "additionalProperties": false - }, - "DestroyApplicationResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/DestroyApplicationResult" - } - } - }, - "additionalProperties": false - }, - "DestroyApplicationsParams": { - "type": "object", - "properties": { - "applications": { - "type": "array", - "items": { - "$ref": "#/definitions/DestroyApplicationParams" - } - } - }, - "additionalProperties": false, - "required": [ - "applications" - ] - }, - "DestroyConsumedApplicationParams": { - "type": "object", - "properties": { - "application-tag": { - "type": "string" - }, - "force": { - "type": "boolean" - }, - "max-wait": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "application-tag" - ] - }, - "DestroyConsumedApplicationsParams": { - "type": "object", - "properties": { - "applications": { - "type": "array", - "items": { - "$ref": "#/definitions/DestroyConsumedApplicationParams" - } - } - }, - "additionalProperties": false, - "required": [ - "applications" - ] - }, - "DestroyRelation": { - "type": "object", - "properties": { - "endpoints": { - "type": "array", - "items": { - "type": "string" - } - }, - "force": { - "type": "boolean" - }, - "max-wait": { - "type": "integer" - }, - "relation-id": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "relation-id" - ] - }, - "DestroyUnitInfo": { - "type": "object", - "properties": { - "destroyed-storage": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } - }, - "detached-storage": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } - } - }, - "additionalProperties": false - }, - "DestroyUnitParams": { - "type": "object", - "properties": { - "destroy-storage": { - "type": "boolean" - }, - "dry-run": { - "type": "boolean" - }, - "force": { - "type": "boolean" - }, - "max-wait": { - "type": "integer" - }, - "unit-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "unit-tag" - ] - }, - "DestroyUnitResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "info": { - "$ref": "#/definitions/DestroyUnitInfo" - } - }, - "additionalProperties": false - }, - "DestroyUnitResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/DestroyUnitResult" - } - } - }, - "additionalProperties": false - }, - "DestroyUnitsParams": { - "type": "object", - "properties": { - "units": { - "type": "array", - "items": { - "$ref": "#/definitions/DestroyUnitParams" - } - } - }, - "additionalProperties": false, - "required": [ - "units" - ] - }, - "EndpointRelationData": { - "type": "object", - "properties": { - "ApplicationData": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "cross-model": { - "type": "boolean" - }, - "endpoint": { - "type": "string" - }, - "related-endpoint": { - "type": "string" - }, - "relation-id": { - "type": "integer" - }, - "unit-relation-data": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/RelationData" - } - } - } - }, - "additionalProperties": false, - "required": [ - "relation-id", - "endpoint", - "cross-model", - "related-endpoint", - "ApplicationData", - "unit-relation-data" - ] - }, - "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": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ExposedEndpoint": { - "type": "object", - "properties": { - "expose-to-cidrs": { - "type": "array", - "items": { - "type": "string" - } - }, - "expose-to-spaces": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "ExternalControllerInfo": { - "type": "object", - "properties": { - "addrs": { - "type": "array", - "items": { - "type": "string" - } - }, - "ca-cert": { - "type": "string" - }, - "controller-alias": { - "type": "string" - }, - "controller-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "controller-tag", - "controller-alias", - "addrs", - "ca-cert" - ] - }, - "Macaroon": { - "type": "object", - "additionalProperties": false - }, - "OfferUserDetails": { - "type": "object", - "properties": { - "access": { - "type": "string" - }, - "display-name": { - "type": "string" - }, - "user": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "user", - "display-name", - "access" - ] - }, - "Placement": { - "type": "object", - "properties": { - "directive": { - "type": "string" - }, - "scope": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "scope", - "directive" - ] - }, - "RelationData": { - "type": "object", - "properties": { - "InScope": { - "type": "boolean" - }, - "UnitData": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "InScope", - "UnitData" - ] - }, - "RelationSuspendedArg": { - "type": "object", - "properties": { - "message": { - "type": "string" - }, - "relation-id": { - "type": "integer" - }, - "suspended": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "relation-id", - "message", - "suspended" - ] - }, - "RelationSuspendedArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/RelationSuspendedArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "RemoteEndpoint": { - "type": "object", - "properties": { - "interface": { - "type": "string" - }, - "limit": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "role": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "role", - "interface", - "limit" - ] - }, - "RemoteSpace": { - "type": "object", - "properties": { - "cloud-type": { - "type": "string" - }, - "name": { - "type": "string" - }, - "provider-attributes": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "provider-id": { - "type": "string" - }, - "subnets": { - "type": "array", - "items": { - "$ref": "#/definitions/Subnet" - } - } - }, - "additionalProperties": false, - "required": [ - "cloud-type", - "name", - "provider-id", - "provider-attributes", - "subnets" - ] - }, - "ScaleApplicationInfo": { - "type": "object", - "properties": { - "num-units": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "num-units" - ] - }, - "ScaleApplicationParams": { - "type": "object", - "properties": { - "application-tag": { - "type": "string" - }, - "force": { - "type": "boolean" - }, - "scale": { - "type": "integer" - }, - "scale-change": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "application-tag", - "scale", - "force" - ] - }, - "ScaleApplicationResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "info": { - "$ref": "#/definitions/ScaleApplicationInfo" - } - }, - "additionalProperties": false - }, - "ScaleApplicationResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ScaleApplicationResult" - } - } - }, - "additionalProperties": false - }, - "ScaleApplicationsParams": { - "type": "object", - "properties": { - "applications": { - "type": "array", - "items": { - "$ref": "#/definitions/ScaleApplicationParams" - } - } - }, - "additionalProperties": false, - "required": [ - "applications" - ] - }, - "SetConstraints": { - "type": "object", - "properties": { - "application": { - "type": "string" - }, - "constraints": { - "$ref": "#/definitions/Value" - } - }, - "additionalProperties": false, - "required": [ - "application", - "constraints" - ] - }, - "StorageConstraints": { - "type": "object", - "properties": { - "count": { - "type": "integer" - }, - "pool": { - "type": "string" - }, - "size": { - "type": "integer" - } - }, - "additionalProperties": false - }, - "StringResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "Subnet": { - "type": "object", - "properties": { - "cidr": { - "type": "string" - }, - "life": { - "type": "string" - }, - "provider-id": { - "type": "string" - }, - "provider-network-id": { - "type": "string" - }, - "provider-space-id": { - "type": "string" - }, - "space-tag": { - "type": "string" - }, - "status": { - "type": "string" - }, - "vlan-tag": { - "type": "integer" - }, - "zones": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "cidr", - "vlan-tag", - "life", - "space-tag", - "zones" - ] - }, - "UnitInfoResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/UnitResult" - } - }, - "additionalProperties": false - }, - "UnitInfoResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/UnitInfoResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "UnitResult": { - "type": "object", - "properties": { - "address": { - "type": "string" - }, - "charm": { - "type": "string" - }, - "leader": { - "type": "boolean" - }, - "life": { - "type": "string" - }, - "machine": { - "type": "string" - }, - "opened-ports": { - "type": "array", - "items": { - "type": "string" - } - }, - "provider-id": { - "type": "string" - }, - "public-address": { - "type": "string" - }, - "relation-data": { - "type": "array", - "items": { - "$ref": "#/definitions/EndpointRelationData" - } - }, - "tag": { - "type": "string" - }, - "workload-version": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "workload-version", - "opened-ports", - "charm" - ] - }, - "UnitsResolved": { - "type": "object", - "properties": { - "all": { - "type": "boolean" - }, - "retry": { - "type": "boolean" - }, - "tags": { - "$ref": "#/definitions/Entities" - } - }, - "additionalProperties": false - }, - "UpdateChannelArg": { - "type": "object", - "properties": { - "channel": { - "type": "string" - }, - "force": { - "type": "boolean" - }, - "tag": { - "$ref": "#/definitions/Entity" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "force", - "channel" - ] - }, - "UpdateChannelArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/UpdateChannelArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "Value": { - "type": "object", - "properties": { - "allocate-public-ip": { - "type": "boolean" - }, - "arch": { - "type": "string" - }, - "container": { - "type": "string" - }, - "cores": { - "type": "integer" - }, - "cpu-power": { - "type": "integer" - }, - "instance-role": { - "type": "string" - }, - "instance-type": { - "type": "string" - }, - "mem": { - "type": "integer" - }, - "root-disk": { - "type": "integer" - }, - "root-disk-source": { - "type": "string" - }, - "spaces": { - "type": "array", - "items": { - "type": "string" - } - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "virt-type": { - "type": "string" - }, - "zones": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - } - } - } - }, - { - "Name": "ApplicationOffers", - "Description": "OffersAPI implements the cross model interface and is the concrete\nimplementation of the api end point.", - "Version": 4, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "controller-user" - ], - "Schema": { - "type": "object", - "properties": { - "ApplicationOffers": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/OfferURLs" - }, - "Result": { - "$ref": "#/definitions/ApplicationOffersResults" - } - }, - "description": "ApplicationOffers gets details about remote applications that match given URLs." - }, - "DestroyOffers": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/DestroyApplicationOffers" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "DestroyOffers removes the offers specified by the given URLs, forcing if necessary." - }, - "FindApplicationOffers": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/OfferFilters" - }, - "Result": { - "$ref": "#/definitions/QueryApplicationOffersResults" - } - }, - "description": "FindApplicationOffers gets details about remote applications that match given filter." - }, - "GetConsumeDetails": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ConsumeOfferDetailsArg" - }, - "Result": { - "$ref": "#/definitions/ConsumeOfferDetailsResults" - } - }, - "description": "GetConsumeDetails returns the details necessary to pass to another model\nto allow the specified args user to consume the offers represented by the args URLs." - }, - "ListApplicationOffers": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/OfferFilters" - }, - "Result": { - "$ref": "#/definitions/QueryApplicationOffersResults" - } - }, - "description": "ListApplicationOffers gets deployed details about application offers that match given filter.\nThe results contain details about the deployed applications such as connection count." - }, - "ModifyOfferAccess": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ModifyOfferAccessRequest" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "ModifyOfferAccess changes the application offer access granted to users." - }, - "Offer": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/AddApplicationOffers" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "Offer makes application endpoints available for consumption at a specified URL." - }, - "RemoteApplicationInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/OfferURLs" - }, - "Result": { - "$ref": "#/definitions/RemoteApplicationInfoResults" - } - }, - "description": "RemoteApplicationInfo returns information about the requested remote application.\nThis call currently has no client side API, only there for the Dashboard at this stage." - } - }, - "definitions": { - "AddApplicationOffer": { - "type": "object", - "properties": { - "application-description": { - "type": "string" - }, - "application-name": { - "type": "string" - }, - "endpoints": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "model-tag": { - "type": "string" - }, - "offer-name": { - "type": "string" - }, - "owner-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "model-tag", - "offer-name", - "application-name", - "application-description", - "endpoints" - ] - }, - "AddApplicationOffers": { - "type": "object", - "properties": { - "Offers": { - "type": "array", - "items": { - "$ref": "#/definitions/AddApplicationOffer" - } - } - }, - "additionalProperties": false, - "required": [ - "Offers" - ] - }, - "ApplicationOfferAdminDetails": { - "type": "object", - "properties": { - "ApplicationOfferDetails": { - "$ref": "#/definitions/ApplicationOfferDetails" - }, - "application-description": { - "type": "string" - }, - "application-name": { - "type": "string" - }, - "bindings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "charm-url": { - "type": "string" - }, - "connections": { - "type": "array", - "items": { - "$ref": "#/definitions/OfferConnection" - } - }, - "endpoints": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoteEndpoint" - } - }, - "offer-name": { - "type": "string" - }, - "offer-url": { - "type": "string" - }, - "offer-uuid": { - "type": "string" - }, - "source-model-tag": { - "type": "string" - }, - "spaces": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoteSpace" - } - }, - "users": { - "type": "array", - "items": { - "$ref": "#/definitions/OfferUserDetails" - } - } - }, - "additionalProperties": false, - "required": [ - "source-model-tag", - "offer-uuid", - "offer-url", - "offer-name", - "application-description", - "ApplicationOfferDetails", - "application-name", - "charm-url" - ] - }, - "ApplicationOfferDetails": { - "type": "object", - "properties": { - "application-description": { - "type": "string" - }, - "bindings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "endpoints": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoteEndpoint" - } - }, - "offer-name": { - "type": "string" - }, - "offer-url": { - "type": "string" - }, - "offer-uuid": { - "type": "string" - }, - "source-model-tag": { - "type": "string" - }, - "spaces": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoteSpace" - } - }, - "users": { - "type": "array", - "items": { - "$ref": "#/definitions/OfferUserDetails" - } - } - }, - "additionalProperties": false, - "required": [ - "source-model-tag", - "offer-uuid", - "offer-url", - "offer-name", - "application-description" - ] - }, - "ApplicationOfferResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/ApplicationOfferAdminDetails" - } - }, - "additionalProperties": false - }, - "ApplicationOffersResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ApplicationOfferResult" - } - } - }, - "additionalProperties": false - }, - "ConsumeOfferDetails": { - "type": "object", - "properties": { - "external-controller": { - "$ref": "#/definitions/ExternalControllerInfo" - }, - "macaroon": { - "$ref": "#/definitions/Macaroon" - }, - "offer": { - "$ref": "#/definitions/ApplicationOfferDetails" - } - }, - "additionalProperties": false - }, - "ConsumeOfferDetailsArg": { - "type": "object", - "properties": { - "offer-urls": { - "$ref": "#/definitions/OfferURLs" - }, - "user-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "offer-urls" - ] - }, - "ConsumeOfferDetailsResult": { - "type": "object", - "properties": { - "ConsumeOfferDetails": { - "$ref": "#/definitions/ConsumeOfferDetails" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "external-controller": { - "$ref": "#/definitions/ExternalControllerInfo" - }, - "macaroon": { - "$ref": "#/definitions/Macaroon" - }, - "offer": { - "$ref": "#/definitions/ApplicationOfferDetails" - } - }, - "additionalProperties": false, - "required": [ - "ConsumeOfferDetails" - ] - }, - "ConsumeOfferDetailsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ConsumeOfferDetailsResult" - } - } - }, - "additionalProperties": false - }, - "DestroyApplicationOffers": { - "type": "object", - "properties": { - "force": { - "type": "boolean" - }, - "offer-urls": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "offer-urls" - ] - }, - "EndpointFilterAttributes": { - "type": "object", - "properties": { - "interface": { - "type": "string" - }, - "name": { - "type": "string" - }, - "role": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "role", - "interface", - "name" - ] - }, - "EntityStatus": { - "type": "object", - "properties": { - "data": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "info": { - "type": "string" - }, - "since": { - "type": "string", - "format": "date-time" - }, - "status": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "status", - "info", - "since" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ExternalControllerInfo": { - "type": "object", - "properties": { - "addrs": { - "type": "array", - "items": { - "type": "string" - } - }, - "ca-cert": { - "type": "string" - }, - "controller-alias": { - "type": "string" - }, - "controller-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "controller-tag", - "controller-alias", - "addrs", - "ca-cert" - ] - }, - "Macaroon": { - "type": "object", - "additionalProperties": false - }, - "ModifyOfferAccess": { - "type": "object", - "properties": { - "access": { - "type": "string" - }, - "action": { - "type": "string" - }, - "offer-url": { - "type": "string" - }, - "user-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "user-tag", - "action", - "access", - "offer-url" - ] - }, - "ModifyOfferAccessRequest": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "$ref": "#/definitions/ModifyOfferAccess" - } - } - }, - "additionalProperties": false, - "required": [ - "changes" - ] - }, - "OfferConnection": { - "type": "object", - "properties": { - "endpoint": { - "type": "string" - }, - "ingress-subnets": { - "type": "array", - "items": { - "type": "string" - } - }, - "relation-id": { - "type": "integer" - }, - "source-model-tag": { - "type": "string" - }, - "status": { - "$ref": "#/definitions/EntityStatus" - }, - "username": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "source-model-tag", - "relation-id", - "username", - "endpoint", - "status", - "ingress-subnets" - ] - }, - "OfferFilter": { - "type": "object", - "properties": { - "allowed-users": { - "type": "array", - "items": { - "type": "string" - } - }, - "application-description": { - "type": "string" - }, - "application-name": { - "type": "string" - }, - "application-user": { - "type": "string" - }, - "connected-users": { - "type": "array", - "items": { - "type": "string" - } - }, - "endpoints": { - "type": "array", - "items": { - "$ref": "#/definitions/EndpointFilterAttributes" - } - }, - "model-name": { - "type": "string" - }, - "offer-name": { - "type": "string" - }, - "owner-name": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "owner-name", - "model-name", - "offer-name", - "application-name", - "application-description", - "application-user", - "endpoints", - "connected-users", - "allowed-users" - ] - }, - "OfferFilters": { - "type": "object", - "properties": { - "Filters": { - "type": "array", - "items": { - "$ref": "#/definitions/OfferFilter" - } - } - }, - "additionalProperties": false, - "required": [ - "Filters" - ] - }, - "OfferURLs": { - "type": "object", - "properties": { - "bakery-version": { - "type": "integer" - }, - "offer-urls": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "OfferUserDetails": { - "type": "object", - "properties": { - "access": { - "type": "string" - }, - "display-name": { - "type": "string" - }, - "user": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "user", - "display-name", - "access" - ] - }, - "QueryApplicationOffersResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ApplicationOfferAdminDetails" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "RemoteApplicationInfo": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "endpoints": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoteEndpoint" - } - }, - "icon-url-path": { - "type": "string" - }, - "model-tag": { - "type": "string" - }, - "name": { - "type": "string" - }, - "offer-url": { - "type": "string" - }, - "source-model-label": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "model-tag", - "name", - "description", - "offer-url", - "endpoints", - "icon-url-path" - ] - }, - "RemoteApplicationInfoResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/RemoteApplicationInfo" - } - }, - "additionalProperties": false - }, - "RemoteApplicationInfoResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoteApplicationInfoResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "RemoteEndpoint": { - "type": "object", - "properties": { - "interface": { - "type": "string" - }, - "limit": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "role": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "role", - "interface", - "limit" - ] - }, - "RemoteSpace": { - "type": "object", - "properties": { - "cloud-type": { - "type": "string" - }, - "name": { - "type": "string" - }, - "provider-attributes": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "provider-id": { - "type": "string" - }, - "subnets": { - "type": "array", - "items": { - "$ref": "#/definitions/Subnet" - } - } - }, - "additionalProperties": false, - "required": [ - "cloud-type", - "name", - "provider-id", - "provider-attributes", - "subnets" - ] - }, - "Subnet": { - "type": "object", - "properties": { - "cidr": { - "type": "string" - }, - "life": { - "type": "string" - }, - "provider-id": { - "type": "string" - }, - "provider-network-id": { - "type": "string" - }, - "provider-space-id": { - "type": "string" - }, - "space-tag": { - "type": "string" - }, - "status": { - "type": "string" - }, - "vlan-tag": { - "type": "integer" - }, - "zones": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "cidr", - "vlan-tag", - "life", - "space-tag", - "zones" - ] - } - } - } - }, - { - "Name": "ApplicationScaler", - "Description": "Facade allows model-manager clients to watch and rescale services.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent" - ], - "Schema": { - "type": "object", - "properties": { - "Rescale": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "Rescale causes any supplied services to be scaled up to their\nminimum size." - }, - "Watch": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsWatchResult" - } - }, - "description": "Watch returns a watcher that sends the names of services whose\nunit count may be below their configured minimum." - } - }, - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "StringsWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id" - ] - } - } - } - }, - { - "Name": "Backups", - "Description": "API provides backup-specific API methods.", - "Version": 3, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "Create": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/BackupsCreateArgs" - }, - "Result": { - "$ref": "#/definitions/BackupsMetadataResult" - } - }, - "description": "Create is the API method that requests juju to create a new backup\nof its state." - } - }, - "definitions": { - "BackupsCreateArgs": { - "type": "object", - "properties": { - "no-download": { - "type": "boolean" - }, - "notes": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "notes", - "no-download" - ] - }, - "BackupsMetadataResult": { - "type": "object", - "properties": { - "base": { - "type": "string" - }, - "checksum": { - "type": "string" - }, - "checksum-format": { - "type": "string" - }, - "controller-machine-id": { - "type": "string" - }, - "controller-machine-inst-id": { - "type": "string" - }, - "controller-uuid": { - "type": "string" - }, - "filename": { - "type": "string" - }, - "finished": { - "type": "string", - "format": "date-time" - }, - "format-version": { - "type": "integer" - }, - "ha-nodes": { - "type": "integer" - }, - "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" - }, - "version": { - "$ref": "#/definitions/Number" - } - }, - "additionalProperties": false, - "required": [ - "id", - "checksum", - "checksum-format", - "size", - "stored", - "started", - "finished", - "notes", - "model", - "machine", - "hostname", - "version", - "base", - "filename", - "format-version", - "controller-uuid", - "controller-machine-id", - "controller-machine-inst-id", - "ha-nodes" - ] - }, - "Number": { - "type": "object", - "properties": { - "Build": { - "type": "integer" - }, - "Major": { - "type": "integer" - }, - "Minor": { - "type": "integer" - }, - "Patch": { - "type": "integer" - }, - "Tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Major", - "Minor", - "Tag", - "Patch", - "Build" - ] - } - } - } - }, - { - "Name": "Block", - "Description": "API implements Block interface and is the concrete\nimplementation of the api end point.", - "Version": 2, - "AvailableTo": [ - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "List": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/BlockResults" - } - }, - "description": "List implements Block.List()." - }, - "SwitchBlockOff": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/BlockSwitchParams" - }, - "Result": { - "$ref": "#/definitions/ErrorResult" - } - }, - "description": "SwitchBlockOff implements Block.SwitchBlockOff()." - }, - "SwitchBlockOn": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/BlockSwitchParams" - }, - "Result": { - "$ref": "#/definitions/ErrorResult" - } - }, - "description": "SwitchBlockOn implements Block.SwitchBlockOn()." - } - }, - "definitions": { - "Block": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "message": { - "type": "string" - }, - "tag": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "id", - "tag", - "type" - ] - }, - "BlockResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/Block" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "BlockResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/BlockResult" - } - } - }, - "additionalProperties": false - }, - "BlockSwitchParams": { - "type": "object", - "properties": { - "message": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - } - } - } - }, - { - "Name": "Bundle", - "Description": "APIv6 provides the Bundle API facade for version 6. It is otherwise\nidentical to V5 with the exception that the V6 adds the support for\nmulti-part yaml handling to GetChanges and GetChangesMapArgs.", - "Version": 6, - "AvailableTo": [ - "controller-user", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "ExportBundle": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ExportBundleParams" - }, - "Result": { - "$ref": "#/definitions/StringResult" - } - }, - "description": "ExportBundle exports the current model configuration as bundle." - }, - "GetChanges": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/BundleChangesParams" - }, - "Result": { - "$ref": "#/definitions/BundleChangesResults" - } - }, - "description": "GetChanges returns the list of changes required to deploy the given bundle\ndata. The changes are sorted by requirements, so that they can be applied in\norder.\nGetChanges has been superseded in favour of GetChangesMapArgs. It's\npreferable to use that new method to add new functionality and move clients\naway from this one." - }, - "GetChangesMapArgs": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/BundleChangesParams" - }, - "Result": { - "$ref": "#/definitions/BundleChangesMapArgsResults" - } - }, - "description": "GetChangesMapArgs returns the list of changes required to deploy the given\nbundle data. The changes are sorted by requirements, so that they can be\napplied in order.\nV4 GetChangesMapArgs is not supported on anything less than v4" - } - }, - "definitions": { - "BundleChange": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": true - } - }, - "id": { - "type": "string" - }, - "method": { - "type": "string" - }, - "requires": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "id", - "method", - "args", - "requires" - ] - }, - "BundleChangesMapArgs": { - "type": "object", - "properties": { - "args": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "id": { - "type": "string" - }, - "method": { - "type": "string" - }, - "requires": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "id", - "method", - "args", - "requires" - ] - }, - "BundleChangesMapArgsResults": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "$ref": "#/definitions/BundleChangesMapArgs" - } - }, - "errors": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "BundleChangesParams": { - "type": "object", - "properties": { - "bundleURL": { - "type": "string" - }, - "yaml": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "yaml", - "bundleURL" - ] - }, - "BundleChangesResults": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "$ref": "#/definitions/BundleChange" - } - }, - "errors": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ExportBundleParams": { - "type": "object", - "properties": { - "include-charm-defaults": { - "type": "boolean" - } - }, - "additionalProperties": false - }, - "StringResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - } - } - } - }, - { - "Name": "CAASAdmission", - "Description": "", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent" - ], - "Schema": { - "type": "object", - "properties": { - "ControllerAPIInfoForModels": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ControllerAPIInfoResults" - } - }, - "description": "ControllerAPIInfoForModels returns the controller api connection details for the specified models." - }, - "ControllerConfig": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ControllerConfigResult" - } - }, - "description": "ControllerConfig returns the controller's configuration." - } - }, - "definitions": { - "ControllerAPIInfoResult": { - "type": "object", - "properties": { - "addresses": { - "type": "array", - "items": { - "type": "string" - } - }, - "cacert": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "addresses", - "cacert" - ] - }, - "ControllerAPIInfoResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ControllerAPIInfoResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ControllerConfigResult": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "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": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - } - } - } - }, - { - "Name": "CAASAgent", - "Description": "FacadeV2 is the V2 facade of the caas agent", - "Version": 2, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "CloudSpec": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/CloudSpecResults" - } - }, - "description": "CloudSpec returns the model's cloud spec." - }, - "ControllerAPIInfoForModels": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ControllerAPIInfoResults" - } - }, - "description": "ControllerAPIInfoForModels returns the controller api connection details for the specified models." - }, - "ControllerConfig": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ControllerConfigResult" - } - }, - "description": "ControllerConfig returns the controller's configuration." - }, - "GetCloudSpec": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ModelTag" - }, - "Result": { - "$ref": "#/definitions/CloudSpecResult" - } - }, - "description": "GetCloudSpec constructs the CloudSpec for a validated and authorized model." - }, - "ModelConfig": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ModelConfigResult" - } - }, - "description": "ModelConfig returns the current model's configuration." - }, - "WatchCloudSpecsChanges": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "WatchCloudSpecsChanges returns a watcher for cloud spec changes." - }, - "WatchForModelConfigChanges": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResult" - } - }, - "description": "WatchForModelConfigChanges returns a NotifyWatcher that observes\nchanges to the model configuration.\nNote that although the NotifyWatchResult contains an Error field,\nit's not used because we are only returning a single watcher,\nso we use the regular error return." - } - }, - "definitions": { - "CloudCredential": { - "type": "object", - "properties": { - "attrs": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "auth-type": { - "type": "string" - }, - "redacted": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "auth-type" - ] - }, - "CloudSpec": { - "type": "object", - "properties": { - "cacertificates": { - "type": "array", - "items": { - "type": "string" - } - }, - "credential": { - "$ref": "#/definitions/CloudCredential" - }, - "endpoint": { - "type": "string" - }, - "identity-endpoint": { - "type": "string" - }, - "is-controller-cloud": { - "type": "boolean" - }, - "name": { - "type": "string" - }, - "region": { - "type": "string" - }, - "skip-tls-verify": { - "type": "boolean" - }, - "storage-endpoint": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type", - "name" - ] - }, - "CloudSpecResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/CloudSpec" - } - }, - "additionalProperties": false - }, - "CloudSpecResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/CloudSpecResult" - } - } - }, - "additionalProperties": false - }, - "ControllerAPIInfoResult": { - "type": "object", - "properties": { - "addresses": { - "type": "array", - "items": { - "type": "string" - } - }, - "cacert": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "addresses", - "cacert" - ] - }, - "ControllerAPIInfoResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ControllerAPIInfoResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ControllerConfigResult": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "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": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ModelConfigResult": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "ModelTag": { - "type": "object", - "additionalProperties": false - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "NotifyWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - } - } - } - }, - { - "Name": "CAASApplication", - "Description": "", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "UnitIntroduction": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/CAASUnitIntroductionArgs" - }, - "Result": { - "$ref": "#/definitions/CAASUnitIntroductionResult" - } - }, - "description": "UnitIntroduction sets the status of each given entity." - }, - "UnitTerminating": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entity" - }, - "Result": { - "$ref": "#/definitions/CAASUnitTerminationResult" - } - }, - "description": "UnitTerminating should be called by the CAASUnitTerminationWorker when\nthe agent receives a signal to exit. UnitTerminating will return how\nthe agent should shutdown." - } - }, - "definitions": { - "CAASUnitIntroduction": { - "type": "object", - "properties": { - "agent-conf": { - "type": "array", - "items": { - "type": "integer" - } - }, - "unit-name": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "unit-name", - "agent-conf" - ] - }, - "CAASUnitIntroductionArgs": { - "type": "object", - "properties": { - "pod-name": { - "type": "string" - }, - "pod-uuid": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "pod-name", - "pod-uuid" - ] - }, - "CAASUnitIntroductionResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/CAASUnitIntroduction" - } - }, - "additionalProperties": false - }, - "CAASUnitTerminationResult": { - "type": "object", - "properties": { - "Error": { - "$ref": "#/definitions/Error" - }, - "WillRestart": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "WillRestart", - "Error" - ] - }, - "Entity": { - "type": "object", - "properties": { - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - } - } - } - }, - { - "Name": "CAASApplicationProvisioner", - "Description": "", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "ApplicationCharmInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entity" - }, - "Result": { - "$ref": "#/definitions/Charm" - } - }, - "description": "ApplicationCharmInfo returns information about an application's charm." - }, - "ApplicationOCIResources": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/CAASApplicationOCIResourceResults" - } - }, - "description": "ApplicationOCIResources returns the OCI image resources for an application." - }, - "CAASApplicationGarbageCollect": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/CAASApplicationGarbageCollectArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "CAASApplicationGarbageCollect cleans up units that have gone away permanently.\nOnly observed units will be deleted as new units could have surfaced between\nthe capturing of kuberentes pod state/application state and this call." - }, - "CharmInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/CharmURL" - }, - "Result": { - "$ref": "#/definitions/Charm" - } - }, - "description": "CharmInfo returns information about the requested charm." - }, - "ClearApplicationsResources": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "ClearApplicationsResources clears the flags which indicate\napplications still have resources in the cluster." - }, - "Life": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/LifeResults" - } - }, - "description": "Life returns the life status of every supplied entity, where available." - }, - "ProvisioningInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/CAASApplicationProvisioningInfoResults" - } - }, - "description": "ProvisioningInfo returns the info needed to provision a caas application." - }, - "Remove": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "Remove removes every given entity from state, calling EnsureDead\nfirst, then Remove. It will fail if the entity is not present." - }, - "SetOperatorStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetStatus" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetOperatorStatus sets the status of each given entity." - }, - "SetPasswords": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/EntityPasswords" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetPasswords sets the given password for each supplied entity, if possible." - }, - "Units": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/CAASUnitsResults" - } - }, - "description": "Units returns all the units for each application specified." - }, - "UpdateApplicationsUnits": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/UpdateApplicationUnitArgs" - }, - "Result": { - "$ref": "#/definitions/UpdateApplicationUnitResults" - } - }, - "description": "UpdateApplicationsUnits updates the Juju data model to reflect the given\nunits of the specified application." - }, - "Watch": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "Watch starts an NotifyWatcher for each given entity." - }, - "WatchApplications": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsWatchResult" - } - }, - "description": "WatchApplications starts a StringsWatcher to watch applications\ndeployed to this model." - }, - "WatchProvisioningInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "WatchProvisioningInfo provides a watcher for changes that affect the\ninformation returned by ProvisioningInfo. This is useful for ensuring the\nlatest application stated is ensured." - }, - "WatchUnits": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - }, - "description": "WatchUnits starts a StringsWatcher to watch changes to the\nlifecycle states of units for the specified applications in\nthis model." - } - }, - "definitions": { - "ApplicationUnitInfo": { - "type": "object", - "properties": { - "provider-id": { - "type": "string" - }, - "unit-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "provider-id", - "unit-tag" - ] - }, - "ApplicationUnitParams": { - "type": "object", - "properties": { - "address": { - "type": "string" - }, - "data": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "filesystem-info": { - "type": "array", - "items": { - "$ref": "#/definitions/KubernetesFilesystemInfo" - } - }, - "info": { - "type": "string" - }, - "ports": { - "type": "array", - "items": { - "type": "string" - } - }, - "provider-id": { - "type": "string" - }, - "stateful": { - "type": "boolean" - }, - "status": { - "type": "string" - }, - "unit-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "provider-id", - "unit-tag", - "address", - "ports", - "status", - "info" - ] - }, - "Base": { - "type": "object", - "properties": { - "channel": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "channel" - ] - }, - "CAASApplicationGarbageCollectArg": { - "type": "object", - "properties": { - "active-pod-names": { - "type": "array", - "items": { - "type": "string" - } - }, - "application": { - "$ref": "#/definitions/Entity" - }, - "desired-replicas": { - "type": "integer" - }, - "force": { - "type": "boolean" - }, - "observed-units": { - "$ref": "#/definitions/Entities" - } - }, - "additionalProperties": false, - "required": [ - "application", - "observed-units", - "desired-replicas", - "active-pod-names", - "force" - ] - }, - "CAASApplicationGarbageCollectArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/CAASApplicationGarbageCollectArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "CAASApplicationOCIResourceResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/CAASApplicationOCIResources" - } - }, - "additionalProperties": false - }, - "CAASApplicationOCIResourceResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/CAASApplicationOCIResourceResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "CAASApplicationOCIResources": { - "type": "object", - "properties": { - "images": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/DockerImageInfo" - } - } - } - }, - "additionalProperties": false, - "required": [ - "images" - ] - }, - "CAASApplicationProvisioningInfo": { - "type": "object", - "properties": { - "api-addresses": { - "type": "array", - "items": { - "type": "string" - } - }, - "base": { - "$ref": "#/definitions/Base" - }, - "ca-cert": { - "type": "string" - }, - "charm-modified-version": { - "type": "integer" - }, - "charm-url": { - "type": "string" - }, - "constraints": { - "$ref": "#/definitions/Value" - }, - "devices": { - "type": "array", - "items": { - "$ref": "#/definitions/KubernetesDeviceParams" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "filesystems": { - "type": "array", - "items": { - "$ref": "#/definitions/KubernetesFilesystemParams" - } - }, - "image-repo": { - "$ref": "#/definitions/DockerImageInfo" - }, - "scale": { - "type": "integer" - }, - "tags": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "trust": { - "type": "boolean" - }, - "version": { - "$ref": "#/definitions/Number" - }, - "volumes": { - "type": "array", - "items": { - "$ref": "#/definitions/KubernetesVolumeParams" - } - } - }, - "additionalProperties": false, - "required": [ - "version", - "api-addresses", - "ca-cert", - "constraints" - ] - }, - "CAASApplicationProvisioningInfoResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/CAASApplicationProvisioningInfo" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "CAASUnitInfo": { - "type": "object", - "properties": { - "tag": { - "type": "string" - }, - "unit-status": { - "$ref": "#/definitions/UnitStatus" - } - }, - "additionalProperties": false, - "required": [ - "tag" - ] - }, - "CAASUnitsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "units": { - "type": "array", - "items": { - "$ref": "#/definitions/CAASUnitInfo" - } - } - }, - "additionalProperties": false - }, - "CAASUnitsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/CAASUnitsResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "Charm": { - "type": "object", - "properties": { - "actions": { - "$ref": "#/definitions/CharmActions" - }, - "config": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmOption" - } - } - }, - "lxd-profile": { - "$ref": "#/definitions/CharmLXDProfile" - }, - "manifest": { - "$ref": "#/definitions/CharmManifest" - }, - "meta": { - "$ref": "#/definitions/CharmMeta" - }, - "metrics": { - "$ref": "#/definitions/CharmMetrics" - }, - "revision": { - "type": "integer" - }, - "url": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "revision", - "url", - "config" - ] - }, - "CharmActionSpec": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "params": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "description", - "params" - ] - }, - "CharmActions": { - "type": "object", - "properties": { - "specs": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmActionSpec" - } - } - } - }, - "additionalProperties": false - }, - "CharmBase": { - "type": "object", - "properties": { - "architectures": { - "type": "array", - "items": { - "type": "string" - } - }, - "channel": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "additionalProperties": false - }, - "CharmContainer": { - "type": "object", - "properties": { - "mounts": { - "type": "array", - "items": { - "$ref": "#/definitions/CharmMount" - } - }, - "resource": { - "type": "string" - } - }, - "additionalProperties": false - }, - "CharmDeployment": { - "type": "object", - "properties": { - "min-version": { - "type": "string" - }, - "mode": { - "type": "string" - }, - "service": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type", - "mode", - "service", - "min-version" - ] - }, - "CharmDevice": { - "type": "object", - "properties": { - "CountMax": { - "type": "integer" - }, - "CountMin": { - "type": "integer" - }, - "Description": { - "type": "string" - }, - "Name": { - "type": "string" - }, - "Type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Name", - "Description", - "Type", - "CountMin", - "CountMax" - ] - }, - "CharmLXDProfile": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "description": { - "type": "string" - }, - "devices": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - } - } - } - }, - "additionalProperties": false, - "required": [ - "config", - "description", - "devices" - ] - }, - "CharmManifest": { - "type": "object", - "properties": { - "bases": { - "type": "array", - "items": { - "$ref": "#/definitions/CharmBase" - } - } - }, - "additionalProperties": false - }, - "CharmMeta": { - "type": "object", - "properties": { - "assumes-expr": { - "$ref": "#/definitions/ExpressionTree" - }, - "categories": { - "type": "array", - "items": { - "type": "string" - } - }, - "containers": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmContainer" - } - } - }, - "deployment": { - "$ref": "#/definitions/CharmDeployment" - }, - "description": { - "type": "string" - }, - "devices": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmDevice" - } - } - }, - "extra-bindings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "min-juju-version": { - "type": "string" - }, - "name": { - "type": "string" - }, - "payload-classes": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmPayloadClass" - } - } - }, - "peers": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmRelation" - } - } - }, - "provides": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmRelation" - } - } - }, - "requires": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmRelation" - } - } - }, - "resources": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmResourceMeta" - } - } - }, - "series": { - "type": "array", - "items": { - "type": "string" - } - }, - "storage": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmStorage" - } - } - }, - "subordinate": { - "type": "boolean" - }, - "summary": { - "type": "string" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "terms": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "name", - "summary", - "description", - "subordinate" - ] - }, - "CharmMetric": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type", - "description" - ] - }, - "CharmMetrics": { - "type": "object", - "properties": { - "metrics": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmMetric" - } - } - }, - "plan": { - "$ref": "#/definitions/CharmPlan" - } - }, - "additionalProperties": false, - "required": [ - "metrics", - "plan" - ] - }, - "CharmMount": { - "type": "object", - "properties": { - "location": { - "type": "string" - }, - "storage": { - "type": "string" - } - }, - "additionalProperties": false - }, - "CharmOption": { - "type": "object", - "properties": { - "default": { - "type": "object", - "additionalProperties": true - }, - "description": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type" - ] - }, - "CharmPayloadClass": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "type" - ] - }, - "CharmPlan": { - "type": "object", - "properties": { - "required": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "required" - ] - }, - "CharmRelation": { - "type": "object", - "properties": { - "interface": { - "type": "string" - }, - "limit": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "optional": { - "type": "boolean" - }, - "role": { - "type": "string" - }, - "scope": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "role", - "interface", - "optional", - "limit", - "scope" - ] - }, - "CharmResourceMeta": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "name": { - "type": "string" - }, - "path": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "type", - "path", - "description" - ] - }, - "CharmStorage": { - "type": "object", - "properties": { - "count-max": { - "type": "integer" - }, - "count-min": { - "type": "integer" - }, - "description": { - "type": "string" - }, - "location": { - "type": "string" - }, - "minimum-size": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "properties": { - "type": "array", - "items": { - "type": "string" - } - }, - "read-only": { - "type": "boolean" - }, - "shared": { - "type": "boolean" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "description", - "type", - "shared", - "read-only", - "count-min", - "count-max", - "minimum-size" - ] - }, - "CharmURL": { - "type": "object", - "properties": { - "url": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "url" - ] - }, - "DetailedStatus": { - "type": "object", - "properties": { - "data": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "err": { - "$ref": "#/definitions/Error" - }, - "info": { - "type": "string" - }, - "kind": { - "type": "string" - }, - "life": { - "type": "string" - }, - "since": { - "type": "string", - "format": "date-time" - }, - "status": { - "type": "string" - }, - "version": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "status", - "info", - "data", - "since", - "kind", - "version", - "life" - ] - }, - "DockerImageInfo": { - "type": "object", - "properties": { - "auth": { - "type": "string" - }, - "email": { - "type": "string" - }, - "identitytoken": { - "type": "string" - }, - "image-name": { - "type": "string" - }, - "password": { - "type": "string" - }, - "registrytoken": { - "type": "string" - }, - "repository": { - "type": "string" - }, - "serveraddress": { - "type": "string" - }, - "username": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "image-name" - ] - }, - "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" - ] - }, - "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" - ] - }, - "EntityStatus": { - "type": "object", - "properties": { - "data": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "info": { - "type": "string" - }, - "since": { - "type": "string", - "format": "date-time" - }, - "status": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "status", - "info", - "since" - ] - }, - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ExpressionTree": { - "type": "object", - "properties": { - "Expression": { - "type": "object", - "additionalProperties": true - } - }, - "additionalProperties": false, - "required": [ - "Expression" - ] - }, - "KubernetesDeviceParams": { - "type": "object", - "properties": { - "Attributes": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "Count": { - "type": "integer" - }, - "Type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Type", - "Count", - "Attributes" - ] - }, - "KubernetesFilesystemAttachmentParams": { - "type": "object", - "properties": { - "mount-point": { - "type": "string" - }, - "provider": { - "type": "string" - }, - "read-only": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "provider" - ] - }, - "KubernetesFilesystemInfo": { - "type": "object", - "properties": { - "data": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "filesystem-id": { - "type": "string" - }, - "info": { - "type": "string" - }, - "mount-point": { - "type": "string" - }, - "pool": { - "type": "string" - }, - "read-only": { - "type": "boolean" - }, - "size": { - "type": "integer" - }, - "status": { - "type": "string" - }, - "storagename": { - "type": "string" - }, - "volume": { - "$ref": "#/definitions/KubernetesVolumeInfo" - } - }, - "additionalProperties": false, - "required": [ - "storagename", - "pool", - "size", - "filesystem-id", - "status", - "info", - "volume" - ] - }, - "KubernetesFilesystemParams": { - "type": "object", - "properties": { - "attachment": { - "$ref": "#/definitions/KubernetesFilesystemAttachmentParams" - }, - "attributes": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "provider": { - "type": "string" - }, - "size": { - "type": "integer" - }, - "storagename": { - "type": "string" - }, - "tags": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - } - }, - "additionalProperties": false, - "required": [ - "storagename", - "size", - "provider" - ] - }, - "KubernetesVolumeAttachmentParams": { - "type": "object", - "properties": { - "provider": { - "type": "string" - }, - "read-only": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "provider" - ] - }, - "KubernetesVolumeInfo": { - "type": "object", - "properties": { - "data": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "info": { - "type": "string" - }, - "persistent": { - "type": "boolean" - }, - "pool": { - "type": "string" - }, - "size": { - "type": "integer" - }, - "status": { - "type": "string" - }, - "volume-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "volume-id", - "size", - "persistent", - "status", - "info" - ] - }, - "KubernetesVolumeParams": { - "type": "object", - "properties": { - "attachment": { - "$ref": "#/definitions/KubernetesVolumeAttachmentParams" - }, - "attributes": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "provider": { - "type": "string" - }, - "size": { - "type": "integer" - }, - "storagename": { - "type": "string" - }, - "tags": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - } - }, - "additionalProperties": false, - "required": [ - "storagename", - "size", - "provider" - ] - }, - "LifeResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "life": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "life" - ] - }, - "LifeResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/LifeResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "NotifyWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "Number": { - "type": "object", - "properties": { - "Build": { - "type": "integer" - }, - "Major": { - "type": "integer" - }, - "Minor": { - "type": "integer" - }, - "Patch": { - "type": "integer" - }, - "Tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Major", - "Minor", - "Tag", - "Patch", - "Build" - ] - }, - "SetStatus": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityStatusArgs" - } - } - }, - "additionalProperties": false, - "required": [ - "entities" - ] - }, - "StringsWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id" - ] - }, - "StringsWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringsWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "UnitStatus": { - "type": "object", - "properties": { - "address": { - "type": "string" - }, - "agent-status": { - "$ref": "#/definitions/DetailedStatus" - }, - "charm": { - "type": "string" - }, - "leader": { - "type": "boolean" - }, - "machine": { - "type": "string" - }, - "opened-ports": { - "type": "array", - "items": { - "type": "string" - } - }, - "provider-id": { - "type": "string" - }, - "public-address": { - "type": "string" - }, - "subordinates": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/UnitStatus" - } - } - }, - "workload-status": { - "$ref": "#/definitions/DetailedStatus" - }, - "workload-version": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "agent-status", - "workload-status", - "workload-version", - "machine", - "opened-ports", - "public-address", - "charm", - "subordinates" - ] - }, - "UpdateApplicationUnitArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/UpdateApplicationUnits" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "UpdateApplicationUnitResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "info": { - "$ref": "#/definitions/UpdateApplicationUnitsInfo" - } - }, - "additionalProperties": false - }, - "UpdateApplicationUnitResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/UpdateApplicationUnitResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "UpdateApplicationUnits": { - "type": "object", - "properties": { - "application-tag": { - "type": "string" - }, - "generation": { - "type": "integer" - }, - "scale": { - "type": "integer" - }, - "status": { - "$ref": "#/definitions/EntityStatus" - }, - "units": { - "type": "array", - "items": { - "$ref": "#/definitions/ApplicationUnitParams" - } - } - }, - "additionalProperties": false, - "required": [ - "application-tag", - "units" - ] - }, - "UpdateApplicationUnitsInfo": { - "type": "object", - "properties": { - "units": { - "type": "array", - "items": { - "$ref": "#/definitions/ApplicationUnitInfo" - } - } - }, - "additionalProperties": false, - "required": [ - "units" - ] - }, - "Value": { - "type": "object", - "properties": { - "allocate-public-ip": { - "type": "boolean" - }, - "arch": { - "type": "string" - }, - "container": { - "type": "string" - }, - "cores": { - "type": "integer" - }, - "cpu-power": { - "type": "integer" - }, - "instance-role": { - "type": "string" - }, - "instance-type": { - "type": "string" - }, - "mem": { - "type": "integer" - }, - "root-disk": { - "type": "integer" - }, - "root-disk-source": { - "type": "string" - }, - "spaces": { - "type": "array", - "items": { - "type": "string" - } - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "virt-type": { - "type": "string" - }, - "zones": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - } - } - } - }, - { - "Name": "CAASFirewaller", - "Description": "", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent" - ], - "Schema": { - "type": "object", - "properties": { - "ApplicationCharmInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entity" - }, - "Result": { - "$ref": "#/definitions/Charm" - } - }, - "description": "ApplicationCharmInfo returns information about an application's charm." - }, - "ApplicationsConfig": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ApplicationGetConfigResults" - } - }, - "description": "ApplicationsConfig returns the config for the specified applications." - }, - "CharmInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/CharmURL" - }, - "Result": { - "$ref": "#/definitions/Charm" - } - }, - "description": "CharmInfo returns information about the requested charm." - }, - "IsExposed": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/BoolResults" - } - }, - "description": "IsExposed returns whether the specified applications are exposed." - }, - "Life": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/LifeResults" - } - }, - "description": "Life returns the life status of every supplied entity, where available." - }, - "Watch": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "Watch starts an NotifyWatcher for each given entity." - }, - "WatchApplications": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsWatchResult" - } - }, - "description": "WatchApplications starts a StringsWatcher to watch applications\ndeployed to this model." - } - }, - "definitions": { - "ApplicationGetConfigResults": { - "type": "object", - "properties": { - "Results": { - "type": "array", - "items": { - "$ref": "#/definitions/ConfigResult" - } - } - }, - "additionalProperties": false, - "required": [ - "Results" - ] - }, - "BoolResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "BoolResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/BoolResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "Charm": { - "type": "object", - "properties": { - "actions": { - "$ref": "#/definitions/CharmActions" - }, - "config": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmOption" - } - } - }, - "lxd-profile": { - "$ref": "#/definitions/CharmLXDProfile" - }, - "manifest": { - "$ref": "#/definitions/CharmManifest" - }, - "meta": { - "$ref": "#/definitions/CharmMeta" - }, - "metrics": { - "$ref": "#/definitions/CharmMetrics" - }, - "revision": { - "type": "integer" - }, - "url": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "revision", - "url", - "config" - ] - }, - "CharmActionSpec": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "params": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "description", - "params" - ] - }, - "CharmActions": { - "type": "object", - "properties": { - "specs": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmActionSpec" - } - } - } - }, - "additionalProperties": false - }, - "CharmBase": { - "type": "object", - "properties": { - "architectures": { - "type": "array", - "items": { - "type": "string" - } - }, - "channel": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "additionalProperties": false - }, - "CharmContainer": { - "type": "object", - "properties": { - "mounts": { - "type": "array", - "items": { - "$ref": "#/definitions/CharmMount" - } - }, - "resource": { - "type": "string" - } - }, - "additionalProperties": false - }, - "CharmDeployment": { - "type": "object", - "properties": { - "min-version": { - "type": "string" - }, - "mode": { - "type": "string" - }, - "service": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type", - "mode", - "service", - "min-version" - ] - }, - "CharmDevice": { - "type": "object", - "properties": { - "CountMax": { - "type": "integer" - }, - "CountMin": { - "type": "integer" - }, - "Description": { - "type": "string" - }, - "Name": { - "type": "string" - }, - "Type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Name", - "Description", - "Type", - "CountMin", - "CountMax" - ] - }, - "CharmLXDProfile": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "description": { - "type": "string" - }, - "devices": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - } - } - } - }, - "additionalProperties": false, - "required": [ - "config", - "description", - "devices" - ] - }, - "CharmManifest": { - "type": "object", - "properties": { - "bases": { - "type": "array", - "items": { - "$ref": "#/definitions/CharmBase" - } - } - }, - "additionalProperties": false - }, - "CharmMeta": { - "type": "object", - "properties": { - "assumes-expr": { - "$ref": "#/definitions/ExpressionTree" - }, - "categories": { - "type": "array", - "items": { - "type": "string" - } - }, - "containers": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmContainer" - } - } - }, - "deployment": { - "$ref": "#/definitions/CharmDeployment" - }, - "description": { - "type": "string" - }, - "devices": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmDevice" - } - } - }, - "extra-bindings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "min-juju-version": { - "type": "string" - }, - "name": { - "type": "string" - }, - "payload-classes": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmPayloadClass" - } - } - }, - "peers": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmRelation" - } - } - }, - "provides": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmRelation" - } - } - }, - "requires": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmRelation" - } - } - }, - "resources": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmResourceMeta" - } - } - }, - "series": { - "type": "array", - "items": { - "type": "string" - } - }, - "storage": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmStorage" - } - } - }, - "subordinate": { - "type": "boolean" - }, - "summary": { - "type": "string" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "terms": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "name", - "summary", - "description", - "subordinate" - ] - }, - "CharmMetric": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type", - "description" - ] - }, - "CharmMetrics": { - "type": "object", - "properties": { - "metrics": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmMetric" - } - } - }, - "plan": { - "$ref": "#/definitions/CharmPlan" - } - }, - "additionalProperties": false, - "required": [ - "metrics", - "plan" - ] - }, - "CharmMount": { - "type": "object", - "properties": { - "location": { - "type": "string" - }, - "storage": { - "type": "string" - } - }, - "additionalProperties": false - }, - "CharmOption": { - "type": "object", - "properties": { - "default": { - "type": "object", - "additionalProperties": true - }, - "description": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type" - ] - }, - "CharmPayloadClass": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "type" - ] - }, - "CharmPlan": { - "type": "object", - "properties": { - "required": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "required" - ] - }, - "CharmRelation": { - "type": "object", - "properties": { - "interface": { - "type": "string" - }, - "limit": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "optional": { - "type": "boolean" - }, - "role": { - "type": "string" - }, - "scope": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "role", - "interface", - "optional", - "limit", - "scope" - ] - }, - "CharmResourceMeta": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "name": { - "type": "string" - }, - "path": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "type", - "path", - "description" - ] - }, - "CharmStorage": { - "type": "object", - "properties": { - "count-max": { - "type": "integer" - }, - "count-min": { - "type": "integer" - }, - "description": { - "type": "string" - }, - "location": { - "type": "string" - }, - "minimum-size": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "properties": { - "type": "array", - "items": { - "type": "string" - } - }, - "read-only": { - "type": "boolean" - }, - "shared": { - "type": "boolean" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "description", - "type", - "shared", - "read-only", - "count-min", - "count-max", - "minimum-size" - ] - }, - "CharmURL": { - "type": "object", - "properties": { - "url": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "url" - ] - }, - "ConfigResult": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "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": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ExpressionTree": { - "type": "object", - "properties": { - "Expression": { - "type": "object", - "additionalProperties": true - } - }, - "additionalProperties": false, - "required": [ - "Expression" - ] - }, - "LifeResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "life": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "life" - ] - }, - "LifeResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/LifeResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "NotifyWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "StringsWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id" - ] - } - } - } - }, - { - "Name": "CAASFirewallerSidecar", - "Description": "FacadeSidecar provides access to the CAASFirewaller API facade for sidecar applications.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent" - ], - "Schema": { - "type": "object", - "properties": { - "ApplicationCharmInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entity" - }, - "Result": { - "$ref": "#/definitions/Charm" - } - }, - "description": "ApplicationCharmInfo returns information about an application's charm." - }, - "ApplicationsConfig": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ApplicationGetConfigResults" - } - }, - "description": "ApplicationsConfig returns the config for the specified applications." - }, - "CharmInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/CharmURL" - }, - "Result": { - "$ref": "#/definitions/Charm" - } - }, - "description": "CharmInfo returns information about the requested charm." - }, - "GetOpenedPorts": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entity" - }, - "Result": { - "$ref": "#/definitions/ApplicationOpenedPortsResults" - } - }, - "description": "GetOpenedPorts returns all the opened ports for each given application tag." - }, - "IsExposed": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/BoolResults" - } - }, - "description": "IsExposed returns whether the specified applications are exposed." - }, - "Life": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/LifeResults" - } - }, - "description": "Life returns the life status of every supplied entity, where available." - }, - "Watch": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "Watch starts an NotifyWatcher for each given entity." - }, - "WatchApplications": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsWatchResult" - } - }, - "description": "WatchApplications starts a StringsWatcher to watch applications\ndeployed to this model." - }, - "WatchOpenedPorts": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - }, - "description": "WatchOpenedPorts returns a new StringsWatcher for each given\nmodel tag." - } - }, - "definitions": { - "ApplicationGetConfigResults": { - "type": "object", - "properties": { - "Results": { - "type": "array", - "items": { - "$ref": "#/definitions/ConfigResult" - } - } - }, - "additionalProperties": false, - "required": [ - "Results" - ] - }, - "ApplicationOpenedPorts": { - "type": "object", - "properties": { - "endpoint": { - "type": "string" - }, - "port-ranges": { - "type": "array", - "items": { - "$ref": "#/definitions/PortRange" - } - } - }, - "additionalProperties": false, - "required": [ - "endpoint", - "port-ranges" - ] - }, - "ApplicationOpenedPortsResult": { - "type": "object", - "properties": { - "application-port-ranges": { - "type": "array", - "items": { - "$ref": "#/definitions/ApplicationOpenedPorts" - } - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "application-port-ranges" - ] - }, - "ApplicationOpenedPortsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ApplicationOpenedPortsResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "BoolResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "BoolResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/BoolResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "Charm": { - "type": "object", - "properties": { - "actions": { - "$ref": "#/definitions/CharmActions" - }, - "config": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmOption" - } - } - }, - "lxd-profile": { - "$ref": "#/definitions/CharmLXDProfile" - }, - "manifest": { - "$ref": "#/definitions/CharmManifest" - }, - "meta": { - "$ref": "#/definitions/CharmMeta" - }, - "metrics": { - "$ref": "#/definitions/CharmMetrics" - }, - "revision": { - "type": "integer" - }, - "url": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "revision", - "url", - "config" - ] - }, - "CharmActionSpec": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "params": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "description", - "params" - ] - }, - "CharmActions": { - "type": "object", - "properties": { - "specs": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmActionSpec" - } - } - } - }, - "additionalProperties": false - }, - "CharmBase": { - "type": "object", - "properties": { - "architectures": { - "type": "array", - "items": { - "type": "string" - } - }, - "channel": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "additionalProperties": false - }, - "CharmContainer": { - "type": "object", - "properties": { - "mounts": { - "type": "array", - "items": { - "$ref": "#/definitions/CharmMount" - } - }, - "resource": { - "type": "string" - } - }, - "additionalProperties": false - }, - "CharmDeployment": { - "type": "object", - "properties": { - "min-version": { - "type": "string" - }, - "mode": { - "type": "string" - }, - "service": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type", - "mode", - "service", - "min-version" - ] - }, - "CharmDevice": { - "type": "object", - "properties": { - "CountMax": { - "type": "integer" - }, - "CountMin": { - "type": "integer" - }, - "Description": { - "type": "string" - }, - "Name": { - "type": "string" - }, - "Type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Name", - "Description", - "Type", - "CountMin", - "CountMax" - ] - }, - "CharmLXDProfile": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "description": { - "type": "string" - }, - "devices": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - } - } - } - }, - "additionalProperties": false, - "required": [ - "config", - "description", - "devices" - ] - }, - "CharmManifest": { - "type": "object", - "properties": { - "bases": { - "type": "array", - "items": { - "$ref": "#/definitions/CharmBase" - } - } - }, - "additionalProperties": false - }, - "CharmMeta": { - "type": "object", - "properties": { - "assumes-expr": { - "$ref": "#/definitions/ExpressionTree" - }, - "categories": { - "type": "array", - "items": { - "type": "string" - } - }, - "containers": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmContainer" - } - } - }, - "deployment": { - "$ref": "#/definitions/CharmDeployment" - }, - "description": { - "type": "string" - }, - "devices": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmDevice" - } - } - }, - "extra-bindings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "min-juju-version": { - "type": "string" - }, - "name": { - "type": "string" - }, - "payload-classes": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmPayloadClass" - } - } - }, - "peers": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmRelation" - } - } - }, - "provides": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmRelation" - } - } - }, - "requires": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmRelation" - } - } - }, - "resources": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmResourceMeta" - } - } - }, - "series": { - "type": "array", - "items": { - "type": "string" - } - }, - "storage": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmStorage" - } - } - }, - "subordinate": { - "type": "boolean" - }, - "summary": { - "type": "string" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "terms": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "name", - "summary", - "description", - "subordinate" - ] - }, - "CharmMetric": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type", - "description" - ] - }, - "CharmMetrics": { - "type": "object", - "properties": { - "metrics": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmMetric" - } - } - }, - "plan": { - "$ref": "#/definitions/CharmPlan" - } - }, - "additionalProperties": false, - "required": [ - "metrics", - "plan" - ] - }, - "CharmMount": { - "type": "object", - "properties": { - "location": { - "type": "string" - }, - "storage": { - "type": "string" - } - }, - "additionalProperties": false - }, - "CharmOption": { - "type": "object", - "properties": { - "default": { - "type": "object", - "additionalProperties": true - }, - "description": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type" - ] - }, - "CharmPayloadClass": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "type" - ] - }, - "CharmPlan": { - "type": "object", - "properties": { - "required": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "required" - ] - }, - "CharmRelation": { - "type": "object", - "properties": { - "interface": { - "type": "string" - }, - "limit": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "optional": { - "type": "boolean" - }, - "role": { - "type": "string" - }, - "scope": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "role", - "interface", - "optional", - "limit", - "scope" - ] - }, - "CharmResourceMeta": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "name": { - "type": "string" - }, - "path": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "type", - "path", - "description" - ] - }, - "CharmStorage": { - "type": "object", - "properties": { - "count-max": { - "type": "integer" - }, - "count-min": { - "type": "integer" - }, - "description": { - "type": "string" - }, - "location": { - "type": "string" - }, - "minimum-size": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "properties": { - "type": "array", - "items": { - "type": "string" - } - }, - "read-only": { - "type": "boolean" - }, - "shared": { - "type": "boolean" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "description", - "type", - "shared", - "read-only", - "count-min", - "count-max", - "minimum-size" - ] - }, - "CharmURL": { - "type": "object", - "properties": { - "url": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "url" - ] - }, - "ConfigResult": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "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": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ExpressionTree": { - "type": "object", - "properties": { - "Expression": { - "type": "object", - "additionalProperties": true - } - }, - "additionalProperties": false, - "required": [ - "Expression" - ] - }, - "LifeResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "life": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "life" - ] - }, - "LifeResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/LifeResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "NotifyWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "PortRange": { - "type": "object", - "properties": { - "from-port": { - "type": "integer" - }, - "protocol": { - "type": "string" - }, - "to-port": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "from-port", - "to-port", - "protocol" - ] - }, - "StringsWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id" - ] - }, - "StringsWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringsWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - } - } - } - }, - { - "Name": "CAASModelConfigManager", - "Description": "Facade allows model config manager clients to watch controller config changes and fetch controller config.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent" - ], - "Schema": { - "type": "object", - "properties": { - "ControllerConfig": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ControllerConfigResult" - } - } - } - }, - "definitions": { - "ControllerConfigResult": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - } - } - } - }, - { - "Name": "CAASModelOperator", - "Description": "API represents the controller model operator facade.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "APIAddresses": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsResult" - } - }, - "description": "APIAddresses returns the list of addresses used to connect to the API." - }, - "APIHostPorts": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/APIHostPortsResult" - } - }, - "description": "APIHostPorts returns the API server addresses." - }, - "ModelOperatorProvisioningInfo": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ModelOperatorInfo" - } - }, - "description": "ModelOperatorProvisioningInfo returns the information needed for provisioning\na new model operator into a caas cluster." - }, - "ModelUUID": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringResult" - } - }, - "description": "ModelUUID returns the model UUID that this facade is used to operate.\nIt is implemented here directly as a result of removing it from\nembedded APIAddresser *without* bumping the facade version.\nIt should be blanked when this facade version is next incremented." - }, - "SetPasswords": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/EntityPasswords" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetPasswords sets the given password for each supplied entity, if possible." - }, - "WatchAPIHostPorts": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResult" - } - }, - "description": "WatchAPIHostPorts watches the API server addresses." - } - }, - "definitions": { - "APIHostPortsResult": { - "type": "object", - "properties": { - "servers": { - "type": "array", - "items": { - "type": "array", - "items": { - "$ref": "#/definitions/HostPort" - } - } - } - }, - "additionalProperties": false, - "required": [ - "servers" - ] - }, - "Address": { - "type": "object", - "properties": { - "cidr": { - "type": "string" - }, - "config-type": { - "type": "string" - }, - "is-secondary": { - "type": "boolean" - }, - "scope": { - "type": "string" - }, - "space-id": { - "type": "string" - }, - "space-name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "value", - "type", - "scope" - ] - }, - "DockerImageInfo": { - "type": "object", - "properties": { - "auth": { - "type": "string" - }, - "email": { - "type": "string" - }, - "identitytoken": { - "type": "string" - }, - "image-name": { - "type": "string" - }, - "password": { - "type": "string" - }, - "registrytoken": { - "type": "string" - }, - "repository": { - "type": "string" - }, - "serveraddress": { - "type": "string" - }, - "username": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "image-name" - ] - }, - "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" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "HostPort": { - "type": "object", - "properties": { - "Address": { - "$ref": "#/definitions/Address" - }, - "cidr": { - "type": "string" - }, - "config-type": { - "type": "string" - }, - "is-secondary": { - "type": "boolean" - }, - "port": { - "type": "integer" - }, - "scope": { - "type": "string" - }, - "space-id": { - "type": "string" - }, - "space-name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "value", - "type", - "scope", - "Address", - "port" - ] - }, - "ModelOperatorInfo": { - "type": "object", - "properties": { - "api-addresses": { - "type": "array", - "items": { - "type": "string" - } - }, - "image-details": { - "$ref": "#/definitions/DockerImageInfo" - }, - "version": { - "$ref": "#/definitions/Number" - } - }, - "additionalProperties": false, - "required": [ - "api-addresses", - "image-details", - "version" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "Number": { - "type": "object", - "properties": { - "Build": { - "type": "integer" - }, - "Major": { - "type": "integer" - }, - "Minor": { - "type": "integer" - }, - "Patch": { - "type": "integer" - }, - "Tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Major", - "Minor", - "Tag", - "Patch", - "Build" - ] - }, - "StringResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "StringsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - } - } - } - }, - { - "Name": "CAASOperator", - "Description": "Facade is the CAAS operator API facade.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "APIAddresses": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsResult" - } - }, - "description": "APIAddresses returns the list of addresses used to connect to the API." - }, - "APIHostPorts": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/APIHostPortsResult" - } - }, - "description": "APIHostPorts returns the API server addresses." - }, - "Charm": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ApplicationCharmResults" - } - }, - "description": "Charm returns the charm info for all given applications." - }, - "CurrentModel": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ModelResult" - } - }, - "description": "CurrentModel returns the name and UUID for the current juju model." - }, - "Life": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/LifeResults" - } - }, - "description": "Life returns the life status of every supplied entity, where available." - }, - "ModelUUID": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringResult" - } - }, - "description": "ModelUUID returns the model UUID that this facade is used to operate.\nIt is implemented here directly as a result of removing it from\nembedded APIAddresser *without* bumping the facade version.\nIt should be blanked when this facade version is next incremented." - }, - "Remove": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "Remove removes every given entity from state, calling EnsureDead\nfirst, then Remove. It will fail if the entity is not present." - }, - "SetPodSpec": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetPodSpecParams" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetPodSpec sets the container specs for a set of applications.\nTODO(juju3) - remove" - }, - "SetStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetStatus" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetStatus sets the status of each given entity." - }, - "SetTools": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/EntitiesVersion" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetTools updates the recorded tools version for the agents." - }, - "Watch": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "Watch starts an NotifyWatcher for each given entity." - }, - "WatchAPIHostPorts": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResult" - } - }, - "description": "WatchAPIHostPorts watches the API server addresses." - }, - "WatchContainerStart": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/WatchContainerStartArgs" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - }, - "description": "WatchContainerStart starts a StringWatcher to watch for container start events\non the CAAS api for a specific application and container." - }, - "WatchUnits": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - }, - "description": "WatchUnits starts a StringsWatcher to watch changes to the\nlifecycle states of units for the specified applications in\nthis model." - } - }, - "definitions": { - "APIHostPortsResult": { - "type": "object", - "properties": { - "servers": { - "type": "array", - "items": { - "type": "array", - "items": { - "$ref": "#/definitions/HostPort" - } - } - } - }, - "additionalProperties": false, - "required": [ - "servers" - ] - }, - "Address": { - "type": "object", - "properties": { - "cidr": { - "type": "string" - }, - "config-type": { - "type": "string" - }, - "is-secondary": { - "type": "boolean" - }, - "scope": { - "type": "string" - }, - "space-id": { - "type": "string" - }, - "space-name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "value", - "type", - "scope" - ] - }, - "ApplicationCharm": { - "type": "object", - "properties": { - "charm-modified-version": { - "type": "integer" - }, - "deployment-mode": { - "type": "string" - }, - "force-upgrade": { - "type": "boolean" - }, - "sha256": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "url", - "sha256", - "charm-modified-version" - ] - }, - "ApplicationCharmResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/ApplicationCharm" - } - }, - "additionalProperties": false - }, - "ApplicationCharmResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ApplicationCharmResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "Binary": { - "type": "object", - "properties": { - "Arch": { - "type": "string" - }, - "Build": { - "type": "integer" - }, - "Major": { - "type": "integer" - }, - "Minor": { - "type": "integer" - }, - "Number": { - "$ref": "#/definitions/Number" - }, - "Patch": { - "type": "integer" - }, - "Release": { - "type": "string" - }, - "Tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Major", - "Minor", - "Tag", - "Patch", - "Build", - "Number", - "Release", - "Arch" - ] - }, - "Entities": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } - } - }, - "additionalProperties": false, - "required": [ - "entities" - ] - }, - "EntitiesVersion": { - "type": "object", - "properties": { - "agent-tools": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityVersion" - } - } - }, - "additionalProperties": false, - "required": [ - "agent-tools" - ] - }, - "Entity": { - "type": "object", - "properties": { - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "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" - ] - }, - "EntityString": { - "type": "object", - "properties": { - "tag": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "value" - ] - }, - "EntityVersion": { - "type": "object", - "properties": { - "tag": { - "type": "string" - }, - "tools": { - "$ref": "#/definitions/Version" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "tools" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "HostPort": { - "type": "object", - "properties": { - "Address": { - "$ref": "#/definitions/Address" - }, - "cidr": { - "type": "string" - }, - "config-type": { - "type": "string" - }, - "is-secondary": { - "type": "boolean" - }, - "port": { - "type": "integer" - }, - "scope": { - "type": "string" - }, - "space-id": { - "type": "string" - }, - "space-name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "value", - "type", - "scope", - "Address", - "port" - ] - }, - "LifeResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "life": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "life" - ] - }, - "LifeResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/LifeResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ModelResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "uuid": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "uuid", - "type" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "NotifyWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "Number": { - "type": "object", - "properties": { - "Build": { - "type": "integer" - }, - "Major": { - "type": "integer" - }, - "Minor": { - "type": "integer" - }, - "Patch": { - "type": "integer" - }, - "Tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Major", - "Minor", - "Tag", - "Patch", - "Build" - ] - }, - "SetPodSpecParams": { - "type": "object", - "properties": { - "specs": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityString" - } - } - }, - "additionalProperties": false, - "required": [ - "specs" - ] - }, - "SetStatus": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityStatusArgs" - } - } - }, - "additionalProperties": false, - "required": [ - "entities" - ] - }, - "StringResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "StringsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "StringsWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id" - ] - }, - "StringsWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringsWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "Version": { - "type": "object", - "properties": { - "version": { - "$ref": "#/definitions/Binary" - } - }, - "additionalProperties": false, - "required": [ - "version" - ] - }, - "WatchContainerStartArg": { - "type": "object", - "properties": { - "container": { - "type": "string" - }, - "entity": { - "$ref": "#/definitions/Entity" - } - }, - "additionalProperties": false, - "required": [ - "entity" - ] - }, - "WatchContainerStartArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/WatchContainerStartArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - } - } - } - }, - { - "Name": "CAASOperatorProvisioner", - "Description": "", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "APIAddresses": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsResult" - } - }, - "description": "APIAddresses returns the list of addresses used to connect to the API." - }, - "APIHostPorts": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/APIHostPortsResult" - } - }, - "description": "APIHostPorts returns the API server addresses." - }, - "ApplicationCharmInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entity" - }, - "Result": { - "$ref": "#/definitions/Charm" - } - }, - "description": "ApplicationCharmInfo returns information about an application's charm." - }, - "CharmInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/CharmURL" - }, - "Result": { - "$ref": "#/definitions/Charm" - } - }, - "description": "CharmInfo returns information about the requested charm." - }, - "IssueOperatorCertificate": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/IssueOperatorCertificateResults" - } - }, - "description": "IssueOperatorCertificate issues an x509 certificate for use by the specified application operator." - }, - "Life": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/LifeResults" - } - }, - "description": "Life returns the life status of every supplied entity, where available." - }, - "ModelUUID": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringResult" - } - }, - "description": "ModelUUID returns the model UUID that this facade is used to operate.\nIt is implemented here directly as a result of removing it from\nembedded APIAddresser *without* bumping the facade version.\nIt should be blanked when this facade version is next incremented." - }, - "OperatorProvisioningInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/OperatorProvisioningInfoResults" - } - }, - "description": "OperatorProvisioningInfo returns the info needed to provision an operator." - }, - "SetPasswords": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/EntityPasswords" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetPasswords sets the given password for each supplied entity, if possible." - }, - "WatchAPIHostPorts": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResult" - } - }, - "description": "WatchAPIHostPorts watches the API server addresses." - }, - "WatchApplications": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsWatchResult" - } - }, - "description": "WatchApplications starts a StringsWatcher to watch applications\ndeployed to this model." - } - }, - "definitions": { - "APIHostPortsResult": { - "type": "object", - "properties": { - "servers": { - "type": "array", - "items": { - "type": "array", - "items": { - "$ref": "#/definitions/HostPort" - } - } - } - }, - "additionalProperties": false, - "required": [ - "servers" - ] - }, - "Address": { - "type": "object", - "properties": { - "cidr": { - "type": "string" - }, - "config-type": { - "type": "string" - }, - "is-secondary": { - "type": "boolean" - }, - "scope": { - "type": "string" - }, - "space-id": { - "type": "string" - }, - "space-name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "value", - "type", - "scope" - ] - }, - "Charm": { - "type": "object", - "properties": { - "actions": { - "$ref": "#/definitions/CharmActions" - }, - "config": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmOption" - } - } - }, - "lxd-profile": { - "$ref": "#/definitions/CharmLXDProfile" - }, - "manifest": { - "$ref": "#/definitions/CharmManifest" - }, - "meta": { - "$ref": "#/definitions/CharmMeta" - }, - "metrics": { - "$ref": "#/definitions/CharmMetrics" - }, - "revision": { - "type": "integer" - }, - "url": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "revision", - "url", - "config" - ] - }, - "CharmActionSpec": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "params": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "description", - "params" - ] - }, - "CharmActions": { - "type": "object", - "properties": { - "specs": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmActionSpec" - } - } - } - }, - "additionalProperties": false - }, - "CharmBase": { - "type": "object", - "properties": { - "architectures": { - "type": "array", - "items": { - "type": "string" - } - }, - "channel": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "additionalProperties": false - }, - "CharmContainer": { - "type": "object", - "properties": { - "mounts": { - "type": "array", - "items": { - "$ref": "#/definitions/CharmMount" - } - }, - "resource": { - "type": "string" - } - }, - "additionalProperties": false - }, - "CharmDeployment": { - "type": "object", - "properties": { - "min-version": { - "type": "string" - }, - "mode": { - "type": "string" - }, - "service": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type", - "mode", - "service", - "min-version" - ] - }, - "CharmDevice": { - "type": "object", - "properties": { - "CountMax": { - "type": "integer" - }, - "CountMin": { - "type": "integer" - }, - "Description": { - "type": "string" - }, - "Name": { - "type": "string" - }, - "Type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Name", - "Description", - "Type", - "CountMin", - "CountMax" - ] - }, - "CharmLXDProfile": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "description": { - "type": "string" - }, - "devices": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - } - } - } - }, - "additionalProperties": false, - "required": [ - "config", - "description", - "devices" - ] - }, - "CharmManifest": { - "type": "object", - "properties": { - "bases": { - "type": "array", - "items": { - "$ref": "#/definitions/CharmBase" - } - } - }, - "additionalProperties": false - }, - "CharmMeta": { - "type": "object", - "properties": { - "assumes-expr": { - "$ref": "#/definitions/ExpressionTree" - }, - "categories": { - "type": "array", - "items": { - "type": "string" - } - }, - "containers": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmContainer" - } - } - }, - "deployment": { - "$ref": "#/definitions/CharmDeployment" - }, - "description": { - "type": "string" - }, - "devices": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmDevice" - } - } - }, - "extra-bindings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "min-juju-version": { - "type": "string" - }, - "name": { - "type": "string" - }, - "payload-classes": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmPayloadClass" - } - } - }, - "peers": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmRelation" - } - } - }, - "provides": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmRelation" - } - } - }, - "requires": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmRelation" - } - } - }, - "resources": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmResourceMeta" - } - } - }, - "series": { - "type": "array", - "items": { - "type": "string" - } - }, - "storage": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmStorage" - } - } - }, - "subordinate": { - "type": "boolean" - }, - "summary": { - "type": "string" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "terms": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "name", - "summary", - "description", - "subordinate" - ] - }, - "CharmMetric": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type", - "description" - ] - }, - "CharmMetrics": { - "type": "object", - "properties": { - "metrics": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmMetric" - } - } - }, - "plan": { - "$ref": "#/definitions/CharmPlan" - } - }, - "additionalProperties": false, - "required": [ - "metrics", - "plan" - ] - }, - "CharmMount": { - "type": "object", - "properties": { - "location": { - "type": "string" - }, - "storage": { - "type": "string" - } - }, - "additionalProperties": false - }, - "CharmOption": { - "type": "object", - "properties": { - "default": { - "type": "object", - "additionalProperties": true - }, - "description": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type" - ] - }, - "CharmPayloadClass": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "type" - ] - }, - "CharmPlan": { - "type": "object", - "properties": { - "required": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "required" - ] - }, - "CharmRelation": { - "type": "object", - "properties": { - "interface": { - "type": "string" - }, - "limit": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "optional": { - "type": "boolean" - }, - "role": { - "type": "string" - }, - "scope": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "role", - "interface", - "optional", - "limit", - "scope" - ] - }, - "CharmResourceMeta": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "name": { - "type": "string" - }, - "path": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "type", - "path", - "description" - ] - }, - "CharmStorage": { - "type": "object", - "properties": { - "count-max": { - "type": "integer" - }, - "count-min": { - "type": "integer" - }, - "description": { - "type": "string" - }, - "location": { - "type": "string" - }, - "minimum-size": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "properties": { - "type": "array", - "items": { - "type": "string" - } - }, - "read-only": { - "type": "boolean" - }, - "shared": { - "type": "boolean" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "description", - "type", - "shared", - "read-only", - "count-min", - "count-max", - "minimum-size" - ] - }, - "CharmURL": { - "type": "object", - "properties": { - "url": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "url" - ] - }, - "DockerImageInfo": { - "type": "object", - "properties": { - "auth": { - "type": "string" - }, - "email": { - "type": "string" - }, - "identitytoken": { - "type": "string" - }, - "image-name": { - "type": "string" - }, - "password": { - "type": "string" - }, - "registrytoken": { - "type": "string" - }, - "repository": { - "type": "string" - }, - "serveraddress": { - "type": "string" - }, - "username": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "image-name" - ] - }, - "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" - ] - }, - "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" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ExpressionTree": { - "type": "object", - "properties": { - "Expression": { - "type": "object", - "additionalProperties": true - } - }, - "additionalProperties": false, - "required": [ - "Expression" - ] - }, - "HostPort": { - "type": "object", - "properties": { - "Address": { - "$ref": "#/definitions/Address" - }, - "cidr": { - "type": "string" - }, - "config-type": { - "type": "string" - }, - "is-secondary": { - "type": "boolean" - }, - "port": { - "type": "integer" - }, - "scope": { - "type": "string" - }, - "space-id": { - "type": "string" - }, - "space-name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "value", - "type", - "scope", - "Address", - "port" - ] - }, - "IssueOperatorCertificateResult": { - "type": "object", - "properties": { - "ca-cert": { - "type": "string" - }, - "cert": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "private-key": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "ca-cert", - "cert", - "private-key" - ] - }, - "IssueOperatorCertificateResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/IssueOperatorCertificateResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "KubernetesFilesystemAttachmentParams": { - "type": "object", - "properties": { - "mount-point": { - "type": "string" - }, - "provider": { - "type": "string" - }, - "read-only": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "provider" - ] - }, - "KubernetesFilesystemParams": { - "type": "object", - "properties": { - "attachment": { - "$ref": "#/definitions/KubernetesFilesystemAttachmentParams" - }, - "attributes": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "provider": { - "type": "string" - }, - "size": { - "type": "integer" - }, - "storagename": { - "type": "string" - }, - "tags": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - } - }, - "additionalProperties": false, - "required": [ - "storagename", - "size", - "provider" - ] - }, - "LifeResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "life": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "life" - ] - }, - "LifeResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/LifeResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "Number": { - "type": "object", - "properties": { - "Build": { - "type": "integer" - }, - "Major": { - "type": "integer" - }, - "Minor": { - "type": "integer" - }, - "Patch": { - "type": "integer" - }, - "Tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Major", - "Minor", - "Tag", - "Patch", - "Build" - ] - }, - "OperatorProvisioningInfo": { - "type": "object", - "properties": { - "api-addresses": { - "type": "array", - "items": { - "type": "string" - } - }, - "base-image-details": { - "$ref": "#/definitions/DockerImageInfo" - }, - "charm-storage": { - "$ref": "#/definitions/KubernetesFilesystemParams" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "image-details": { - "$ref": "#/definitions/DockerImageInfo" - }, - "tags": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "version": { - "$ref": "#/definitions/Number" - } - }, - "additionalProperties": false, - "required": [ - "image-details", - "base-image-details", - "version", - "api-addresses" - ] - }, - "OperatorProvisioningInfoResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/OperatorProvisioningInfo" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "StringResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "StringsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "StringsWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id" - ] - } - } - } - }, - { - "Name": "CAASOperatorUpgrader", - "Description": "", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "UpgradeOperator": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/KubernetesUpgradeArg" - }, - "Result": { - "$ref": "#/definitions/ErrorResult" - } - }, - "description": "UpgradeOperator upgrades the operator for the specified agents." - } - }, - "definitions": { - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "KubernetesUpgradeArg": { - "type": "object", - "properties": { - "agent-tag": { - "type": "string" - }, - "version": { - "$ref": "#/definitions/Number" - } - }, - "additionalProperties": false, - "required": [ - "agent-tag", - "version" - ] - }, - "Number": { - "type": "object", - "properties": { - "Build": { - "type": "integer" - }, - "Major": { - "type": "integer" - }, - "Minor": { - "type": "integer" - }, - "Patch": { - "type": "integer" - }, - "Tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Major", - "Minor", - "Tag", - "Patch", - "Build" - ] - } - } - } - }, - { - "Name": "CAASUnitProvisioner", - "Description": "", - "Version": 2, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "ApplicationCharmInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entity" - }, - "Result": { - "$ref": "#/definitions/Charm" - } - }, - "description": "ApplicationCharmInfo returns information about an application's charm." - }, - "ApplicationsConfig": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ApplicationGetConfigResults" - } - }, - "description": "ApplicationsConfig returns the config for the specified applications." - }, - "ApplicationsScale": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/IntResults" - } - }, - "description": "ApplicationsScale returns the scaling info for specified applications in this model." - }, - "ApplicationsTrust": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/BoolResults" - } - }, - "description": "ApplicationsTrust returns the trust status for specified applications in this model." - }, - "CharmInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/CharmURL" - }, - "Result": { - "$ref": "#/definitions/Charm" - } - }, - "description": "CharmInfo returns information about the requested charm." - }, - "ClearApplicationsResources": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "ClearApplicationsResources clears the flags which indicate\napplications still have resources in the cluster." - }, - "DeploymentMode": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringResults" - } - }, - "description": "DeploymentMode returns the deployment mode of the given applications' charms." - }, - "Life": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/LifeResults" - } - }, - "description": "Life returns the life status of every supplied entity, where available." - }, - "ProvisioningInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/KubernetesProvisioningInfoResults" - } - }, - "description": "ProvisioningInfo returns the provisioning info for specified applications in this model." - }, - "SetOperatorStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetStatus" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetOperatorStatus updates the operator status for each given application." - }, - "UpdateApplicationsService": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/UpdateApplicationServiceArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "UpdateApplicationsService updates the Juju data model to reflect the given\nservice details of the specified application." - }, - "UpdateApplicationsUnits": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/UpdateApplicationUnitArgs" - }, - "Result": { - "$ref": "#/definitions/UpdateApplicationUnitResults" - } - }, - "description": "UpdateApplicationsUnits updates the Juju data model to reflect the given\nunits of the specified application." - }, - "Watch": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "Watch starts a NotifyWatcher for each entity given." - }, - "WatchApplications": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsWatchResult" - } - }, - "description": "WatchApplications starts a StringsWatcher to watch applications\ndeployed to this model." - }, - "WatchApplicationsScale": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "WatchApplicationsScale starts a NotifyWatcher to watch changes\nto the applications' scale." - }, - "WatchApplicationsTrustHash": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - }, - "description": "WatchApplicationsTrustHash starts a StringsWatcher to watch changes\nto the applications' trust status." - }, - "WatchPodSpec": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "WatchPodSpec starts a NotifyWatcher to watch changes to the\npod spec for specified units in this model." - } - }, - "definitions": { - "Address": { - "type": "object", - "properties": { - "cidr": { - "type": "string" - }, - "config-type": { - "type": "string" - }, - "is-secondary": { - "type": "boolean" - }, - "scope": { - "type": "string" - }, - "space-id": { - "type": "string" - }, - "space-name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "value", - "type", - "scope" - ] - }, - "ApplicationGetConfigResults": { - "type": "object", - "properties": { - "Results": { - "type": "array", - "items": { - "$ref": "#/definitions/ConfigResult" - } - } - }, - "additionalProperties": false, - "required": [ - "Results" - ] - }, - "ApplicationUnitInfo": { - "type": "object", - "properties": { - "provider-id": { - "type": "string" - }, - "unit-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "provider-id", - "unit-tag" - ] - }, - "ApplicationUnitParams": { - "type": "object", - "properties": { - "address": { - "type": "string" - }, - "data": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "filesystem-info": { - "type": "array", - "items": { - "$ref": "#/definitions/KubernetesFilesystemInfo" - } - }, - "info": { - "type": "string" - }, - "ports": { - "type": "array", - "items": { - "type": "string" - } - }, - "provider-id": { - "type": "string" - }, - "stateful": { - "type": "boolean" - }, - "status": { - "type": "string" - }, - "unit-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "provider-id", - "unit-tag", - "address", - "ports", - "status", - "info" - ] - }, - "BoolResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "BoolResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/BoolResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "Charm": { - "type": "object", - "properties": { - "actions": { - "$ref": "#/definitions/CharmActions" - }, - "config": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmOption" - } - } - }, - "lxd-profile": { - "$ref": "#/definitions/CharmLXDProfile" - }, - "manifest": { - "$ref": "#/definitions/CharmManifest" - }, - "meta": { - "$ref": "#/definitions/CharmMeta" - }, - "metrics": { - "$ref": "#/definitions/CharmMetrics" - }, - "revision": { - "type": "integer" - }, - "url": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "revision", - "url", - "config" - ] - }, - "CharmActionSpec": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "params": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "description", - "params" - ] - }, - "CharmActions": { - "type": "object", - "properties": { - "specs": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmActionSpec" - } - } - } - }, - "additionalProperties": false - }, - "CharmBase": { - "type": "object", - "properties": { - "architectures": { - "type": "array", - "items": { - "type": "string" - } - }, - "channel": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "additionalProperties": false - }, - "CharmContainer": { - "type": "object", - "properties": { - "mounts": { - "type": "array", - "items": { - "$ref": "#/definitions/CharmMount" - } - }, - "resource": { - "type": "string" - } - }, - "additionalProperties": false - }, - "CharmDeployment": { - "type": "object", - "properties": { - "min-version": { - "type": "string" - }, - "mode": { - "type": "string" - }, - "service": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type", - "mode", - "service", - "min-version" - ] - }, - "CharmDevice": { - "type": "object", - "properties": { - "CountMax": { - "type": "integer" - }, - "CountMin": { - "type": "integer" - }, - "Description": { - "type": "string" - }, - "Name": { - "type": "string" - }, - "Type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Name", - "Description", - "Type", - "CountMin", - "CountMax" - ] - }, - "CharmLXDProfile": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "description": { - "type": "string" - }, - "devices": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - } - } - } - }, - "additionalProperties": false, - "required": [ - "config", - "description", - "devices" - ] - }, - "CharmManifest": { - "type": "object", - "properties": { - "bases": { - "type": "array", - "items": { - "$ref": "#/definitions/CharmBase" - } - } - }, - "additionalProperties": false - }, - "CharmMeta": { - "type": "object", - "properties": { - "assumes-expr": { - "$ref": "#/definitions/ExpressionTree" - }, - "categories": { - "type": "array", - "items": { - "type": "string" - } - }, - "containers": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmContainer" - } - } - }, - "deployment": { - "$ref": "#/definitions/CharmDeployment" - }, - "description": { - "type": "string" - }, - "devices": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmDevice" - } - } - }, - "extra-bindings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "min-juju-version": { - "type": "string" - }, - "name": { - "type": "string" - }, - "payload-classes": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmPayloadClass" - } - } - }, - "peers": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmRelation" - } - } - }, - "provides": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmRelation" - } - } - }, - "requires": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmRelation" - } - } - }, - "resources": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmResourceMeta" - } - } - }, - "series": { - "type": "array", - "items": { - "type": "string" - } - }, - "storage": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmStorage" - } - } - }, - "subordinate": { - "type": "boolean" - }, - "summary": { - "type": "string" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "terms": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "name", - "summary", - "description", - "subordinate" - ] - }, - "CharmMetric": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type", - "description" - ] - }, - "CharmMetrics": { - "type": "object", - "properties": { - "metrics": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmMetric" - } - } - }, - "plan": { - "$ref": "#/definitions/CharmPlan" - } - }, - "additionalProperties": false, - "required": [ - "metrics", - "plan" - ] - }, - "CharmMount": { - "type": "object", - "properties": { - "location": { - "type": "string" - }, - "storage": { - "type": "string" - } - }, - "additionalProperties": false - }, - "CharmOption": { - "type": "object", - "properties": { - "default": { - "type": "object", - "additionalProperties": true - }, - "description": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type" - ] - }, - "CharmPayloadClass": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "type" - ] - }, - "CharmPlan": { - "type": "object", - "properties": { - "required": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "required" - ] - }, - "CharmRelation": { - "type": "object", - "properties": { - "interface": { - "type": "string" - }, - "limit": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "optional": { - "type": "boolean" - }, - "role": { - "type": "string" - }, - "scope": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "role", - "interface", - "optional", - "limit", - "scope" - ] - }, - "CharmResourceMeta": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "name": { - "type": "string" - }, - "path": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "type", - "path", - "description" - ] - }, - "CharmStorage": { - "type": "object", - "properties": { - "count-max": { - "type": "integer" - }, - "count-min": { - "type": "integer" - }, - "description": { - "type": "string" - }, - "location": { - "type": "string" - }, - "minimum-size": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "properties": { - "type": "array", - "items": { - "type": "string" - } - }, - "read-only": { - "type": "boolean" - }, - "shared": { - "type": "boolean" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "description", - "type", - "shared", - "read-only", - "count-min", - "count-max", - "minimum-size" - ] - }, - "CharmURL": { - "type": "object", - "properties": { - "url": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "url" - ] - }, - "ConfigResult": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "DockerImageInfo": { - "type": "object", - "properties": { - "auth": { - "type": "string" - }, - "email": { - "type": "string" - }, - "identitytoken": { - "type": "string" - }, - "image-name": { - "type": "string" - }, - "password": { - "type": "string" - }, - "registrytoken": { - "type": "string" - }, - "repository": { - "type": "string" - }, - "serveraddress": { - "type": "string" - }, - "username": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "image-name" - ] - }, - "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" - ] - }, - "EntityStatus": { - "type": "object", - "properties": { - "data": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "info": { - "type": "string" - }, - "since": { - "type": "string", - "format": "date-time" - }, - "status": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "status", - "info", - "since" - ] - }, - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ExpressionTree": { - "type": "object", - "properties": { - "Expression": { - "type": "object", - "additionalProperties": true - } - }, - "additionalProperties": false, - "required": [ - "Expression" - ] - }, - "IntResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "IntResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/IntResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "KubernetesDeploymentInfo": { - "type": "object", - "properties": { - "deployment-type": { - "type": "string" - }, - "service-type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "deployment-type", - "service-type" - ] - }, - "KubernetesDeviceParams": { - "type": "object", - "properties": { - "Attributes": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "Count": { - "type": "integer" - }, - "Type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Type", - "Count", - "Attributes" - ] - }, - "KubernetesFilesystemAttachmentParams": { - "type": "object", - "properties": { - "mount-point": { - "type": "string" - }, - "provider": { - "type": "string" - }, - "read-only": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "provider" - ] - }, - "KubernetesFilesystemInfo": { - "type": "object", - "properties": { - "data": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "filesystem-id": { - "type": "string" - }, - "info": { - "type": "string" - }, - "mount-point": { - "type": "string" - }, - "pool": { - "type": "string" - }, - "read-only": { - "type": "boolean" - }, - "size": { - "type": "integer" - }, - "status": { - "type": "string" - }, - "storagename": { - "type": "string" - }, - "volume": { - "$ref": "#/definitions/KubernetesVolumeInfo" - } - }, - "additionalProperties": false, - "required": [ - "storagename", - "pool", - "size", - "filesystem-id", - "status", - "info", - "volume" - ] - }, - "KubernetesFilesystemParams": { - "type": "object", - "properties": { - "attachment": { - "$ref": "#/definitions/KubernetesFilesystemAttachmentParams" - }, - "attributes": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "provider": { - "type": "string" - }, - "size": { - "type": "integer" - }, - "storagename": { - "type": "string" - }, - "tags": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - } - }, - "additionalProperties": false, - "required": [ - "storagename", - "size", - "provider" - ] - }, - "KubernetesProvisioningInfo": { - "type": "object", - "properties": { - "charm-modified-version": { - "type": "integer" - }, - "constraints": { - "$ref": "#/definitions/Value" - }, - "deployment-info": { - "$ref": "#/definitions/KubernetesDeploymentInfo" - }, - "devices": { - "type": "array", - "items": { - "$ref": "#/definitions/KubernetesDeviceParams" - } - }, - "filesystems": { - "type": "array", - "items": { - "$ref": "#/definitions/KubernetesFilesystemParams" - } - }, - "image-repo": { - "$ref": "#/definitions/DockerImageInfo" - }, - "pod-spec": { - "type": "string" - }, - "raw-k8s-spec": { - "type": "string" - }, - "tags": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "volumes": { - "type": "array", - "items": { - "$ref": "#/definitions/KubernetesVolumeParams" - } - } - }, - "additionalProperties": false, - "required": [ - "pod-spec", - "constraints" - ] - }, - "KubernetesProvisioningInfoResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/KubernetesProvisioningInfo" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "KubernetesProvisioningInfoResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/KubernetesProvisioningInfoResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "KubernetesVolumeAttachmentParams": { - "type": "object", - "properties": { - "provider": { - "type": "string" - }, - "read-only": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "provider" - ] - }, - "KubernetesVolumeInfo": { - "type": "object", - "properties": { - "data": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "info": { - "type": "string" - }, - "persistent": { - "type": "boolean" - }, - "pool": { - "type": "string" - }, - "size": { - "type": "integer" - }, - "status": { - "type": "string" - }, - "volume-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "volume-id", - "size", - "persistent", - "status", - "info" - ] - }, - "KubernetesVolumeParams": { - "type": "object", - "properties": { - "attachment": { - "$ref": "#/definitions/KubernetesVolumeAttachmentParams" - }, - "attributes": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "provider": { - "type": "string" - }, - "size": { - "type": "integer" - }, - "storagename": { - "type": "string" - }, - "tags": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - } - }, - "additionalProperties": false, - "required": [ - "storagename", - "size", - "provider" - ] - }, - "LifeResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "life": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "life" - ] - }, - "LifeResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/LifeResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "NotifyWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "SetStatus": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityStatusArgs" - } - } - }, - "additionalProperties": false, - "required": [ - "entities" - ] - }, - "StringResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "StringResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "StringsWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id" - ] - }, - "StringsWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringsWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "UpdateApplicationServiceArg": { - "type": "object", - "properties": { - "addresses": { - "type": "array", - "items": { - "$ref": "#/definitions/Address" - } - }, - "application-tag": { - "type": "string" - }, - "generation": { - "type": "integer" - }, - "provider-id": { - "type": "string" - }, - "scale": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "application-tag", - "provider-id", - "addresses" - ] - }, - "UpdateApplicationServiceArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/UpdateApplicationServiceArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "UpdateApplicationUnitArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/UpdateApplicationUnits" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "UpdateApplicationUnitResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "info": { - "$ref": "#/definitions/UpdateApplicationUnitsInfo" - } - }, - "additionalProperties": false - }, - "UpdateApplicationUnitResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/UpdateApplicationUnitResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "UpdateApplicationUnits": { - "type": "object", - "properties": { - "application-tag": { - "type": "string" - }, - "generation": { - "type": "integer" - }, - "scale": { - "type": "integer" - }, - "status": { - "$ref": "#/definitions/EntityStatus" - }, - "units": { - "type": "array", - "items": { - "$ref": "#/definitions/ApplicationUnitParams" - } - } - }, - "additionalProperties": false, - "required": [ - "application-tag", - "units" - ] - }, - "UpdateApplicationUnitsInfo": { - "type": "object", - "properties": { - "units": { - "type": "array", - "items": { - "$ref": "#/definitions/ApplicationUnitInfo" - } - } - }, - "additionalProperties": false, - "required": [ - "units" - ] - }, - "Value": { - "type": "object", - "properties": { - "allocate-public-ip": { - "type": "boolean" - }, - "arch": { - "type": "string" - }, - "container": { - "type": "string" - }, - "cores": { - "type": "integer" - }, - "cpu-power": { - "type": "integer" - }, - "instance-role": { - "type": "string" - }, - "instance-type": { - "type": "string" - }, - "mem": { - "type": "integer" - }, - "root-disk": { - "type": "integer" - }, - "root-disk-source": { - "type": "string" - }, - "spaces": { - "type": "array", - "items": { - "type": "string" - } - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "virt-type": { - "type": "string" - }, - "zones": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - } - } - } - }, - { - "Name": "CharmDownloader", - "Description": "CharmDownloaderAPI implements an API for watching the charms collection for\nany entries that have not been yet downloaded to the blobstore and for\ntriggering their download.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "DownloadApplicationCharms": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "DownloadApplicationCharms iterates the list of provided applications and\ndownloads any referenced charms that have not yet been persisted to the\nblob store." - }, - "WatchApplicationsWithPendingCharms": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsWatchResult" - } - }, - "description": "WatchApplicationsWithPendingCharms registers and returns a watcher instance\nthat reports the ID of applications that reference a charm which has not yet\nbeen downloaded." - } - }, - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "StringsWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id" - ] - } - } - } - }, - { - "Name": "CharmRevisionUpdater", - "Description": "CharmRevisionUpdaterAPI implements the CharmRevisionUpdater interface and is the concrete\nimplementation of the api end point.", - "Version": 2, - "AvailableTo": [ - "controller-machine-agent" - ], - "Schema": { - "type": "object", - "properties": { - "UpdateLatestRevisions": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ErrorResult" - } - }, - "description": "UpdateLatestRevisions retrieves the latest revision information from the charm store for all deployed charms\nand records this information in state." - } - }, - "definitions": { - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - } - } - } - }, - { - "Name": "Charms", - "Description": "APIv6 provides the Charms API facade for version 6.\nIt removes the AddCharmWithAuthorization function, as\nwe no longer support macaroons.", - "Version": 6, - "AvailableTo": [ - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "AddCharm": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/AddCharmWithOrigin" - }, - "Result": { - "$ref": "#/definitions/CharmOriginResult" - } - }, - "description": "AddCharm adds the given charm URL (which must include revision) to the\nenvironment, if it does not exist yet. Local charms are not supported,\nonly charm store and charm hub URLs. See also AddLocalCharm()." - }, - "CharmInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/CharmURL" - }, - "Result": { - "$ref": "#/definitions/Charm" - } - }, - "description": "CharmInfo returns information about the requested charm." - }, - "CheckCharmPlacement": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ApplicationCharmPlacements" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "CheckCharmPlacement checks if a charm is allowed to be placed with in a\ngiven application." - }, - "GetDownloadInfos": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/CharmURLAndOrigins" - }, - "Result": { - "$ref": "#/definitions/DownloadInfoResults" - } - }, - "description": "GetDownloadInfos attempts to get the bundle corresponding to the charm url\nand origin." - }, - "IsMetered": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/CharmURL" - }, - "Result": { - "$ref": "#/definitions/IsMeteredResult" - } - }, - "description": "IsMetered returns whether or not the charm is metered." - }, - "List": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/CharmsList" - }, - "Result": { - "$ref": "#/definitions/CharmsListResult" - } - }, - "description": "List returns a list of charm URLs currently in the state.\nIf supplied parameter contains any names, the result will\nbe filtered to return only the charms with supplied names." - }, - "ListCharmResources": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/CharmURLAndOrigins" - }, - "Result": { - "$ref": "#/definitions/CharmResourcesResults" - } - }, - "description": "ListCharmResources returns a series of resources for a given charm." - }, - "ResolveCharms": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ResolveCharmsWithChannel" - }, - "Result": { - "$ref": "#/definitions/ResolveCharmWithChannelResults" - } - }, - "description": "ResolveCharms resolves the given charm URLs with an optionally specified\npreferred channel. Channel provided via CharmOrigin." - } - }, - "definitions": { - "AddCharmWithOrigin": { - "type": "object", - "properties": { - "charm-origin": { - "$ref": "#/definitions/CharmOrigin" - }, - "force": { - "type": "boolean" - }, - "url": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "url", - "charm-origin", - "force" - ] - }, - "ApplicationCharmPlacement": { - "type": "object", - "properties": { - "application": { - "type": "string" - }, - "charm-url": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "application", - "charm-url" - ] - }, - "ApplicationCharmPlacements": { - "type": "object", - "properties": { - "placements": { - "type": "array", - "items": { - "$ref": "#/definitions/ApplicationCharmPlacement" - } - } - }, - "additionalProperties": false, - "required": [ - "placements" - ] - }, - "Base": { - "type": "object", - "properties": { - "channel": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "channel" - ] - }, - "Charm": { - "type": "object", - "properties": { - "actions": { - "$ref": "#/definitions/CharmActions" - }, - "config": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmOption" - } - } - }, - "lxd-profile": { - "$ref": "#/definitions/CharmLXDProfile" - }, - "manifest": { - "$ref": "#/definitions/CharmManifest" - }, - "meta": { - "$ref": "#/definitions/CharmMeta" - }, - "metrics": { - "$ref": "#/definitions/CharmMetrics" - }, - "revision": { - "type": "integer" - }, - "url": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "revision", - "url", - "config" - ] - }, - "CharmActionSpec": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "params": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "description", - "params" - ] - }, - "CharmActions": { - "type": "object", - "properties": { - "specs": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmActionSpec" - } - } - } - }, - "additionalProperties": false - }, - "CharmBase": { - "type": "object", - "properties": { - "architectures": { - "type": "array", - "items": { - "type": "string" - } - }, - "channel": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "additionalProperties": false - }, - "CharmContainer": { - "type": "object", - "properties": { - "mounts": { - "type": "array", - "items": { - "$ref": "#/definitions/CharmMount" - } - }, - "resource": { - "type": "string" - } - }, - "additionalProperties": false - }, - "CharmDeployment": { - "type": "object", - "properties": { - "min-version": { - "type": "string" - }, - "mode": { - "type": "string" - }, - "service": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type", - "mode", - "service", - "min-version" - ] - }, - "CharmDevice": { - "type": "object", - "properties": { - "CountMax": { - "type": "integer" - }, - "CountMin": { - "type": "integer" - }, - "Description": { - "type": "string" - }, - "Name": { - "type": "string" - }, - "Type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Name", - "Description", - "Type", - "CountMin", - "CountMax" - ] - }, - "CharmLXDProfile": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "description": { - "type": "string" - }, - "devices": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - } - } - } - }, - "additionalProperties": false, - "required": [ - "config", - "description", - "devices" - ] - }, - "CharmManifest": { - "type": "object", - "properties": { - "bases": { - "type": "array", - "items": { - "$ref": "#/definitions/CharmBase" - } - } - }, - "additionalProperties": false - }, - "CharmMeta": { - "type": "object", - "properties": { - "assumes-expr": { - "$ref": "#/definitions/ExpressionTree" - }, - "categories": { - "type": "array", - "items": { - "type": "string" - } - }, - "containers": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmContainer" - } - } - }, - "deployment": { - "$ref": "#/definitions/CharmDeployment" - }, - "description": { - "type": "string" - }, - "devices": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmDevice" - } - } - }, - "extra-bindings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "min-juju-version": { - "type": "string" - }, - "name": { - "type": "string" - }, - "payload-classes": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmPayloadClass" - } - } - }, - "peers": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmRelation" - } - } - }, - "provides": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmRelation" - } - } - }, - "requires": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmRelation" - } - } - }, - "resources": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmResourceMeta" - } - } - }, - "series": { - "type": "array", - "items": { - "type": "string" - } - }, - "storage": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmStorage" - } - } - }, - "subordinate": { - "type": "boolean" - }, - "summary": { - "type": "string" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "terms": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "name", - "summary", - "description", - "subordinate" - ] - }, - "CharmMetric": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type", - "description" - ] - }, - "CharmMetrics": { - "type": "object", - "properties": { - "metrics": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmMetric" - } - } - }, - "plan": { - "$ref": "#/definitions/CharmPlan" - } - }, - "additionalProperties": false, - "required": [ - "metrics", - "plan" - ] - }, - "CharmMount": { - "type": "object", - "properties": { - "location": { - "type": "string" - }, - "storage": { - "type": "string" - } - }, - "additionalProperties": false - }, - "CharmOption": { - "type": "object", - "properties": { - "default": { - "type": "object", - "additionalProperties": true - }, - "description": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type" - ] - }, - "CharmOrigin": { - "type": "object", - "properties": { - "architecture": { - "type": "string" - }, - "base": { - "$ref": "#/definitions/Base" - }, - "branch": { - "type": "string" - }, - "hash": { - "type": "string" - }, - "id": { - "type": "string" - }, - "instance-key": { - "type": "string" - }, - "revision": { - "type": "integer" - }, - "risk": { - "type": "string" - }, - "source": { - "type": "string" - }, - "track": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "source", - "type", - "id" - ] - }, - "CharmOriginResult": { - "type": "object", - "properties": { - "charm-origin": { - "$ref": "#/definitions/CharmOrigin" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "charm-origin" - ] - }, - "CharmPayloadClass": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "type" - ] - }, - "CharmPlan": { - "type": "object", - "properties": { - "required": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "required" - ] - }, - "CharmRelation": { - "type": "object", - "properties": { - "interface": { - "type": "string" - }, - "limit": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "optional": { - "type": "boolean" - }, - "role": { - "type": "string" - }, - "scope": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "role", - "interface", - "optional", - "limit", - "scope" - ] - }, - "CharmResource": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "fingerprint": { - "type": "array", - "items": { - "type": "integer" - } - }, - "name": { - "type": "string" - }, - "origin": { - "type": "string" - }, - "path": { - "type": "string" - }, - "revision": { - "type": "integer" - }, - "size": { - "type": "integer" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "type", - "path", - "origin", - "revision", - "fingerprint", - "size" - ] - }, - "CharmResourceMeta": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "name": { - "type": "string" - }, - "path": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "type", - "path", - "description" - ] - }, - "CharmResourceResult": { - "type": "object", - "properties": { - "CharmResource": { - "$ref": "#/definitions/CharmResource" - }, - "ErrorResult": { - "$ref": "#/definitions/ErrorResult" - }, - "description": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "fingerprint": { - "type": "array", - "items": { - "type": "integer" - } - }, - "name": { - "type": "string" - }, - "origin": { - "type": "string" - }, - "path": { - "type": "string" - }, - "revision": { - "type": "integer" - }, - "size": { - "type": "integer" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "ErrorResult", - "name", - "type", - "path", - "origin", - "revision", - "fingerprint", - "size", - "CharmResource" - ] - }, - "CharmResourcesResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "type": "array", - "items": { - "$ref": "#/definitions/CharmResourceResult" - } - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "CharmStorage": { - "type": "object", - "properties": { - "count-max": { - "type": "integer" - }, - "count-min": { - "type": "integer" - }, - "description": { - "type": "string" - }, - "location": { - "type": "string" - }, - "minimum-size": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "properties": { - "type": "array", - "items": { - "type": "string" - } - }, - "read-only": { - "type": "boolean" - }, - "shared": { - "type": "boolean" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "description", - "type", - "shared", - "read-only", - "count-min", - "count-max", - "minimum-size" - ] - }, - "CharmURL": { - "type": "object", - "properties": { - "url": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "url" - ] - }, - "CharmURLAndOrigin": { - "type": "object", - "properties": { - "charm-origin": { - "$ref": "#/definitions/CharmOrigin" - }, - "charm-url": { - "type": "string" - }, - "macaroon": { - "$ref": "#/definitions/Macaroon" - } - }, - "additionalProperties": false, - "required": [ - "charm-url", - "charm-origin" - ] - }, - "CharmURLAndOrigins": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/CharmURLAndOrigin" - } - } - }, - "additionalProperties": false, - "required": [ - "entities" - ] - }, - "CharmsList": { - "type": "object", - "properties": { - "names": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "names" - ] - }, - "CharmsListResult": { - "type": "object", - "properties": { - "charm-urls": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "charm-urls" - ] - }, - "DownloadInfoResult": { - "type": "object", - "properties": { - "charm-origin": { - "$ref": "#/definitions/CharmOrigin" - }, - "url": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "url", - "charm-origin" - ] - }, - "DownloadInfoResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/DownloadInfoResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ExpressionTree": { - "type": "object", - "properties": { - "Expression": { - "type": "object", - "additionalProperties": true - } - }, - "additionalProperties": false, - "required": [ - "Expression" - ] - }, - "IsMeteredResult": { - "type": "object", - "properties": { - "metered": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "metered" - ] - }, - "Macaroon": { - "type": "object", - "additionalProperties": false - }, - "ResolveCharmWithChannel": { - "type": "object", - "properties": { - "charm-origin": { - "$ref": "#/definitions/CharmOrigin" - }, - "reference": { - "type": "string" - }, - "switch-charm": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "reference", - "charm-origin" - ] - }, - "ResolveCharmWithChannelResult": { - "type": "object", - "properties": { - "charm-origin": { - "$ref": "#/definitions/CharmOrigin" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "supported-series": { - "type": "array", - "items": { - "type": "string" - } - }, - "url": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "url", - "charm-origin", - "supported-series" - ] - }, - "ResolveCharmWithChannelResults": { - "type": "object", - "properties": { - "Results": { - "type": "array", - "items": { - "$ref": "#/definitions/ResolveCharmWithChannelResult" - } - } - }, - "additionalProperties": false, - "required": [ - "Results" - ] - }, - "ResolveCharmsWithChannel": { - "type": "object", - "properties": { - "macaroon": { - "$ref": "#/definitions/Macaroon" - }, - "resolve": { - "type": "array", - "items": { - "$ref": "#/definitions/ResolveCharmWithChannel" - } - } - }, - "additionalProperties": false, - "required": [ - "resolve" - ] - } - } - } - }, - { - "Name": "Cleaner", - "Description": "CleanerAPI implements the API used by the cleaner worker.", - "Version": 2, - "AvailableTo": [ - "controller-machine-agent" - ], - "Schema": { - "type": "object", - "properties": { - "Cleanup": { - "type": "object", - "description": "Cleanup triggers a state cleanup" - }, - "WatchCleanups": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResult" - } - }, - "description": "WatchCleanups watches for cleanups to be performed in state." - } - }, - "definitions": { - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - } - } - } - }, - { - "Name": "Client", - "Description": "Client serves client-specific API methods.", - "Version": 6, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "FindTools": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/FindToolsParams" - }, - "Result": { - "$ref": "#/definitions/FindToolsResult" - } - }, - "description": "FindTools returns a List containing all tools matching the given parameters.\nTODO(juju 3.1) - remove, used by 2.9 client only" - }, - "FullStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/StatusParams" - }, - "Result": { - "$ref": "#/definitions/FullStatus" - } - }, - "description": "FullStatus gives the information needed for juju status over the api" - }, - "StatusHistory": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/StatusHistoryRequests" - }, - "Result": { - "$ref": "#/definitions/StatusHistoryResults" - } - }, - "description": "StatusHistory returns a slice of past statuses for several entities." - }, - "WatchAll": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/AllWatcherId" - } - }, - "description": "WatchAll initiates a watcher for entities in the connected model." - } - }, - "definitions": { - "AllWatcherId": { - "type": "object", - "properties": { - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id" - ] - }, - "ApplicationOfferStatus": { - "type": "object", - "properties": { - "active-connected-count": { - "type": "integer" - }, - "application-name": { - "type": "string" - }, - "charm": { - "type": "string" - }, - "endpoints": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/RemoteEndpoint" - } - } - }, - "err": { - "$ref": "#/definitions/Error" - }, - "offer-name": { - "type": "string" - }, - "total-connected-count": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "offer-name", - "application-name", - "charm", - "endpoints", - "active-connected-count", - "total-connected-count" - ] - }, - "ApplicationStatus": { - "type": "object", - "properties": { - "base": { - "$ref": "#/definitions/Base" - }, - "can-upgrade-to": { - "type": "string" - }, - "charm": { - "type": "string" - }, - "charm-channel": { - "type": "string" - }, - "charm-profile": { - "type": "string" - }, - "charm-version": { - "type": "string" - }, - "endpoint-bindings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "err": { - "$ref": "#/definitions/Error" - }, - "exposed": { - "type": "boolean" - }, - "exposed-endpoints": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/ExposedEndpoint" - } - } - }, - "int": { - "type": "integer" - }, - "life": { - "type": "string" - }, - "meter-statuses": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/MeterStatus" - } - } - }, - "provider-id": { - "type": "string" - }, - "public-address": { - "type": "string" - }, - "relations": { - "type": "object", - "patternProperties": { - ".*": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "status": { - "$ref": "#/definitions/DetailedStatus" - }, - "subordinate-to": { - "type": "array", - "items": { - "type": "string" - } - }, - "units": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/UnitStatus" - } - } - }, - "workload-version": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "charm", - "charm-version", - "charm-profile", - "base", - "exposed", - "life", - "relations", - "can-upgrade-to", - "subordinate-to", - "units", - "meter-statuses", - "status", - "workload-version", - "endpoint-bindings", - "public-address" - ] - }, - "Base": { - "type": "object", - "properties": { - "channel": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "channel" - ] - }, - "Binary": { - "type": "object", - "properties": { - "Arch": { - "type": "string" - }, - "Build": { - "type": "integer" - }, - "Major": { - "type": "integer" - }, - "Minor": { - "type": "integer" - }, - "Number": { - "$ref": "#/definitions/Number" - }, - "Patch": { - "type": "integer" - }, - "Release": { - "type": "string" - }, - "Tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Major", - "Minor", - "Tag", - "Patch", - "Build", - "Number", - "Release", - "Arch" - ] - }, - "BranchStatus": { - "type": "object", - "properties": { - "assigned-units": { - "type": "object", - "patternProperties": { - ".*": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "created": { - "type": "integer" - }, - "created-by": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "assigned-units", - "created", - "created-by" - ] - }, - "DetailedStatus": { - "type": "object", - "properties": { - "data": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "err": { - "$ref": "#/definitions/Error" - }, - "info": { - "type": "string" - }, - "kind": { - "type": "string" - }, - "life": { - "type": "string" - }, - "since": { - "type": "string", - "format": "date-time" - }, - "status": { - "type": "string" - }, - "version": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "status", - "info", - "data", - "since", - "kind", - "version", - "life" - ] - }, - "EndpointStatus": { - "type": "object", - "properties": { - "application": { - "type": "string" - }, - "name": { - "type": "string" - }, - "role": { - "type": "string" - }, - "subordinate": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "application", - "name", - "role", - "subordinate" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ExposedEndpoint": { - "type": "object", - "properties": { - "expose-to-cidrs": { - "type": "array", - "items": { - "type": "string" - } - }, - "expose-to-spaces": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "FindToolsParams": { - "type": "object", - "properties": { - "agentstream": { - "type": "string" - }, - "arch": { - "type": "string" - }, - "major": { - "type": "integer" - }, - "number": { - "$ref": "#/definitions/Number" - }, - "os-type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "number", - "major", - "arch", - "os-type", - "agentstream" - ] - }, - "FindToolsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "list": { - "type": "array", - "items": { - "$ref": "#/definitions/Tools" - } - } - }, - "additionalProperties": false, - "required": [ - "list" - ] - }, - "FullStatus": { - "type": "object", - "properties": { - "applications": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/ApplicationStatus" - } - } - }, - "branches": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/BranchStatus" - } - } - }, - "controller-timestamp": { - "type": "string", - "format": "date-time" - }, - "machines": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/MachineStatus" - } - } - }, - "model": { - "$ref": "#/definitions/ModelStatusInfo" - }, - "offers": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/ApplicationOfferStatus" - } - } - }, - "relations": { - "type": "array", - "items": { - "$ref": "#/definitions/RelationStatus" - } - }, - "remote-applications": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/RemoteApplicationStatus" - } - } - } - }, - "additionalProperties": false, - "required": [ - "model", - "machines", - "applications", - "remote-applications", - "offers", - "relations", - "controller-timestamp", - "branches" - ] - }, - "History": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "statuses": { - "type": "array", - "items": { - "$ref": "#/definitions/DetailedStatus" - } - } - }, - "additionalProperties": false, - "required": [ - "statuses" - ] - }, - "LXDProfile": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "description": { - "type": "string" - }, - "devices": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - } - } - } - }, - "additionalProperties": false, - "required": [ - "config", - "description", - "devices" - ] - }, - "MachineStatus": { - "type": "object", - "properties": { - "agent-status": { - "$ref": "#/definitions/DetailedStatus" - }, - "base": { - "$ref": "#/definitions/Base" - }, - "constraints": { - "type": "string" - }, - "containers": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/MachineStatus" - } - } - }, - "display-name": { - "type": "string" - }, - "dns-name": { - "type": "string" - }, - "hardware": { - "type": "string" - }, - "has-vote": { - "type": "boolean" - }, - "hostname": { - "type": "string" - }, - "id": { - "type": "string" - }, - "instance-id": { - "type": "string" - }, - "instance-status": { - "$ref": "#/definitions/DetailedStatus" - }, - "ip-addresses": { - "type": "array", - "items": { - "type": "string" - } - }, - "jobs": { - "type": "array", - "items": { - "type": "string" - } - }, - "lxd-profiles": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/LXDProfile" - } - } - }, - "modification-status": { - "$ref": "#/definitions/DetailedStatus" - }, - "network-interfaces": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/NetworkInterface" - } - } - }, - "primary-controller-machine": { - "type": "boolean" - }, - "wants-vote": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "agent-status", - "instance-status", - "modification-status", - "dns-name", - "instance-id", - "display-name", - "base", - "id", - "containers", - "constraints", - "hardware", - "jobs", - "has-vote", - "wants-vote" - ] - }, - "MeterStatus": { - "type": "object", - "properties": { - "color": { - "type": "string" - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "color", - "message" - ] - }, - "ModelStatusInfo": { - "type": "object", - "properties": { - "available-version": { - "type": "string" - }, - "cloud-tag": { - "type": "string" - }, - "meter-status": { - "$ref": "#/definitions/MeterStatus" - }, - "model-status": { - "$ref": "#/definitions/DetailedStatus" - }, - "name": { - "type": "string" - }, - "region": { - "type": "string" - }, - "sla": { - "type": "string" - }, - "type": { - "type": "string" - }, - "version": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "type", - "cloud-tag", - "version", - "available-version", - "model-status", - "meter-status", - "sla" - ] - }, - "NetworkInterface": { - "type": "object", - "properties": { - "dns-nameservers": { - "type": "array", - "items": { - "type": "string" - } - }, - "gateway": { - "type": "string" - }, - "ip-addresses": { - "type": "array", - "items": { - "type": "string" - } - }, - "is-up": { - "type": "boolean" - }, - "mac-address": { - "type": "string" - }, - "space": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "ip-addresses", - "mac-address", - "is-up" - ] - }, - "Number": { - "type": "object", - "properties": { - "Build": { - "type": "integer" - }, - "Major": { - "type": "integer" - }, - "Minor": { - "type": "integer" - }, - "Patch": { - "type": "integer" - }, - "Tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Major", - "Minor", - "Tag", - "Patch", - "Build" - ] - }, - "RelationStatus": { - "type": "object", - "properties": { - "endpoints": { - "type": "array", - "items": { - "$ref": "#/definitions/EndpointStatus" - } - }, - "id": { - "type": "integer" - }, - "interface": { - "type": "string" - }, - "key": { - "type": "string" - }, - "scope": { - "type": "string" - }, - "status": { - "$ref": "#/definitions/DetailedStatus" - } - }, - "additionalProperties": false, - "required": [ - "id", - "key", - "interface", - "scope", - "endpoints", - "status" - ] - }, - "RemoteApplicationStatus": { - "type": "object", - "properties": { - "endpoints": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoteEndpoint" - } - }, - "err": { - "$ref": "#/definitions/Error" - }, - "life": { - "type": "string" - }, - "offer-name": { - "type": "string" - }, - "offer-url": { - "type": "string" - }, - "relations": { - "type": "object", - "patternProperties": { - ".*": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "status": { - "$ref": "#/definitions/DetailedStatus" - } - }, - "additionalProperties": false, - "required": [ - "offer-url", - "offer-name", - "endpoints", - "life", - "relations", - "status" - ] - }, - "RemoteEndpoint": { - "type": "object", - "properties": { - "interface": { - "type": "string" - }, - "limit": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "role": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "role", - "interface", - "limit" - ] - }, - "StatusHistoryFilter": { - "type": "object", - "properties": { - "date": { - "type": "string", - "format": "date-time" - }, - "delta": { - "type": "integer" - }, - "exclude": { - "type": "array", - "items": { - "type": "string" - } - }, - "size": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "size", - "date", - "delta", - "exclude" - ] - }, - "StatusHistoryRequest": { - "type": "object", - "properties": { - "filter": { - "$ref": "#/definitions/StatusHistoryFilter" - }, - "historyKind": { - "type": "string" - }, - "size": { - "type": "integer" - }, - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "historyKind", - "size", - "filter", - "tag" - ] - }, - "StatusHistoryRequests": { - "type": "object", - "properties": { - "requests": { - "type": "array", - "items": { - "$ref": "#/definitions/StatusHistoryRequest" - } - } - }, - "additionalProperties": false, - "required": [ - "requests" - ] - }, - "StatusHistoryResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "history": { - "$ref": "#/definitions/History" - } - }, - "additionalProperties": false, - "required": [ - "history" - ] - }, - "StatusHistoryResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StatusHistoryResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "StatusParams": { - "type": "object", - "properties": { - "patterns": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "patterns" - ] - }, - "Tools": { - "type": "object", - "properties": { - "sha256": { - "type": "string" - }, - "size": { - "type": "integer" - }, - "url": { - "type": "string" - }, - "version": { - "$ref": "#/definitions/Binary" - } - }, - "additionalProperties": false, - "required": [ - "version", - "url", - "size" - ] - }, - "UnitStatus": { - "type": "object", - "properties": { - "address": { - "type": "string" - }, - "agent-status": { - "$ref": "#/definitions/DetailedStatus" - }, - "charm": { - "type": "string" - }, - "leader": { - "type": "boolean" - }, - "machine": { - "type": "string" - }, - "opened-ports": { - "type": "array", - "items": { - "type": "string" - } - }, - "provider-id": { - "type": "string" - }, - "public-address": { - "type": "string" - }, - "subordinates": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/UnitStatus" - } - } - }, - "workload-status": { - "$ref": "#/definitions/DetailedStatus" - }, - "workload-version": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "agent-status", - "workload-status", - "workload-version", - "machine", - "opened-ports", - "public-address", - "charm", - "subordinates" - ] - } - } - } - }, - { - "Name": "Cloud", - "Description": "CloudAPI implements the cloud interface and is the concrete implementation\nof the api end point.", - "Version": 7, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "controller-user" - ], - "Schema": { - "type": "object", - "properties": { - "AddCloud": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/AddCloudArgs" - } - }, - "description": "AddCloud adds a new cloud, different from the one managed by the controller." - }, - "AddCredentials": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/TaggedCredentials" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "AddCredentials adds new credentials.\nIn contrast to UpdateCredentials() below, the new credentials can be\nfor a cloud that the controller does not manage (this is required\nfor CAAS models)" - }, - "CheckCredentialsModels": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/TaggedCredentials" - }, - "Result": { - "$ref": "#/definitions/UpdateCredentialResults" - } - }, - "description": "CheckCredentialsModels validates supplied cloud credentials' content against\nmodels that currently use these credentials.\nIf there are any models that are using a credential and these models or their\ncloud instances are not going to be accessible with corresponding credential,\nthere will be detailed validation errors per model.\nThere's no Juju API client which uses this, but JAAS does," - }, - "Cloud": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/CloudResults" - } - }, - "description": "Cloud returns the cloud definitions for the specified clouds." - }, - "CloudInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/CloudInfoResults" - } - }, - "description": "CloudInfo returns information about the specified clouds." - }, - "Clouds": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/CloudsResult" - } - }, - "description": "Clouds returns the definitions of all clouds supported by the controller\nthat the logged in user can see." - }, - "Credential": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/CloudCredentialResults" - } - }, - "description": "Credential returns the specified cloud credential for each tag, minus secrets." - }, - "CredentialContents": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/CloudCredentialArgs" - }, - "Result": { - "$ref": "#/definitions/CredentialContentResults" - } - }, - "description": "CredentialContents returns the specified cloud credentials,\nincluding the secrets if requested.\nIf no specific credential name/cloud was passed in, all credentials for this user\nare returned.\nOnly credential owner can see its contents as well as what models use it.\nController admin has no special superpowers here and is treated the same as all other users." - }, - "InstanceTypes": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/CloudInstanceTypesConstraints" - }, - "Result": { - "$ref": "#/definitions/InstanceTypesResults" - } - }, - "description": "InstanceTypes returns instance type information for the cloud and region\nin which the current model is deployed." - }, - "ListCloudInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ListCloudsRequest" - }, - "Result": { - "$ref": "#/definitions/ListCloudInfoResults" - } - }, - "description": "ListCloudInfo returns clouds that the specified user has access to.\nController admins (superuser) can list clouds for any user.\nOther users can only ask about their own clouds." - }, - "ModifyCloudAccess": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ModifyCloudAccessRequest" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "ModifyCloudAccess changes the model access granted to users." - }, - "RemoveClouds": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "RemoveClouds removes the specified clouds from the controller.\nIf a cloud is in use (has models deployed to it), the removal will fail." - }, - "RevokeCredentialsCheckModels": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RevokeCredentialArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "RevokeCredentialsCheckModels revokes a set of cloud credentials.\nIf the credentials are used by any of the models, the credential deletion will be aborted.\nIf credential-in-use needs to be revoked nonetheless, this method allows the use of force." - }, - "UpdateCloud": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/UpdateCloudArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "UpdateCloud updates an existing cloud that the controller knows about." - }, - "UpdateCredentialsCheckModels": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/UpdateCredentialArgs" - }, - "Result": { - "$ref": "#/definitions/UpdateCredentialResults" - } - }, - "description": "UpdateCredentialsCheckModels updates a set of cloud credentials' content.\nIf there are any models that are using a credential and these models\nare not going to be visible with updated credential content,\nthere will be detailed validation errors per model. Such model errors are returned\nseparately and do not contribute to the overall method error status.\nController admins can 'force' an update of the credential\nregardless of whether it is deemed valid or not." - }, - "UserCredentials": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/UserClouds" - }, - "Result": { - "$ref": "#/definitions/StringsResults" - } - }, - "description": "UserCredentials returns the cloud credentials for a set of users." - } - }, - "definitions": { - "AddCloudArgs": { - "type": "object", - "properties": { - "cloud": { - "$ref": "#/definitions/Cloud" - }, - "force": { - "type": "boolean" - }, - "name": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "cloud", - "name" - ] - }, - "Cloud": { - "type": "object", - "properties": { - "auth-types": { - "type": "array", - "items": { - "type": "string" - } - }, - "ca-certificates": { - "type": "array", - "items": { - "type": "string" - } - }, - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "endpoint": { - "type": "string" - }, - "host-cloud-region": { - "type": "string" - }, - "identity-endpoint": { - "type": "string" - }, - "is-controller-cloud": { - "type": "boolean" - }, - "region-config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - } - }, - "regions": { - "type": "array", - "items": { - "$ref": "#/definitions/CloudRegion" - } - }, - "skip-tls-verify": { - "type": "boolean" - }, - "storage-endpoint": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type" - ] - }, - "CloudCredential": { - "type": "object", - "properties": { - "attrs": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "auth-type": { - "type": "string" - }, - "redacted": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "auth-type" - ] - }, - "CloudCredentialArg": { - "type": "object", - "properties": { - "cloud-name": { - "type": "string" - }, - "credential-name": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "cloud-name", - "credential-name" - ] - }, - "CloudCredentialArgs": { - "type": "object", - "properties": { - "credentials": { - "type": "array", - "items": { - "$ref": "#/definitions/CloudCredentialArg" - } - }, - "include-secrets": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "include-secrets" - ] - }, - "CloudCredentialResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/CloudCredential" - } - }, - "additionalProperties": false - }, - "CloudCredentialResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/CloudCredentialResult" - } - } - }, - "additionalProperties": false - }, - "CloudDetails": { - "type": "object", - "properties": { - "auth-types": { - "type": "array", - "items": { - "type": "string" - } - }, - "endpoint": { - "type": "string" - }, - "identity-endpoint": { - "type": "string" - }, - "regions": { - "type": "array", - "items": { - "$ref": "#/definitions/CloudRegion" - } - }, - "storage-endpoint": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type" - ] - }, - "CloudInfo": { - "type": "object", - "properties": { - "CloudDetails": { - "$ref": "#/definitions/CloudDetails" - }, - "users": { - "type": "array", - "items": { - "$ref": "#/definitions/CloudUserInfo" - } - } - }, - "additionalProperties": false, - "required": [ - "CloudDetails", - "users" - ] - }, - "CloudInfoResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/CloudInfo" - } - }, - "additionalProperties": false - }, - "CloudInfoResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/CloudInfoResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "CloudInstanceTypesConstraint": { - "type": "object", - "properties": { - "cloud-tag": { - "type": "string" - }, - "constraints": { - "$ref": "#/definitions/Value" - }, - "region": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "cloud-tag", - "region" - ] - }, - "CloudInstanceTypesConstraints": { - "type": "object", - "properties": { - "constraints": { - "type": "array", - "items": { - "$ref": "#/definitions/CloudInstanceTypesConstraint" - } - } - }, - "additionalProperties": false, - "required": [ - "constraints" - ] - }, - "CloudRegion": { - "type": "object", - "properties": { - "endpoint": { - "type": "string" - }, - "identity-endpoint": { - "type": "string" - }, - "name": { - "type": "string" - }, - "storage-endpoint": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name" - ] - }, - "CloudResult": { - "type": "object", - "properties": { - "cloud": { - "$ref": "#/definitions/Cloud" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "CloudResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/CloudResult" - } - } - }, - "additionalProperties": false - }, - "CloudUserInfo": { - "type": "object", - "properties": { - "access": { - "type": "string" - }, - "display-name": { - "type": "string" - }, - "user": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "user", - "display-name", - "access" - ] - }, - "CloudsResult": { - "type": "object", - "properties": { - "clouds": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/Cloud" - } - } - } - }, - "additionalProperties": false - }, - "ControllerCredentialInfo": { - "type": "object", - "properties": { - "content": { - "$ref": "#/definitions/CredentialContent" - }, - "models": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelAccess" - } - } - }, - "additionalProperties": false - }, - "CredentialContent": { - "type": "object", - "properties": { - "attrs": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "auth-type": { - "type": "string" - }, - "cloud": { - "type": "string" - }, - "name": { - "type": "string" - }, - "valid": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "name", - "cloud", - "auth-type" - ] - }, - "CredentialContentResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/ControllerCredentialInfo" - } - }, - "additionalProperties": false - }, - "CredentialContentResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/CredentialContentResult" - } - } - }, - "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": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "InstanceType": { - "type": "object", - "properties": { - "arches": { - "type": "array", - "items": { - "type": "string" - } - }, - "cost": { - "type": "integer" - }, - "cpu-cores": { - "type": "integer" - }, - "deprecated": { - "type": "boolean" - }, - "memory": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "root-disk": { - "type": "integer" - }, - "virt-type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "arches", - "cpu-cores", - "memory" - ] - }, - "InstanceTypesResult": { - "type": "object", - "properties": { - "cost-currency": { - "type": "string" - }, - "cost-divisor": { - "type": "integer" - }, - "cost-unit": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "instance-types": { - "type": "array", - "items": { - "$ref": "#/definitions/InstanceType" - } - } - }, - "additionalProperties": false - }, - "InstanceTypesResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/InstanceTypesResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ListCloudInfo": { - "type": "object", - "properties": { - "CloudDetails": { - "$ref": "#/definitions/CloudDetails" - }, - "user-access": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "CloudDetails", - "user-access" - ] - }, - "ListCloudInfoResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/ListCloudInfo" - } - }, - "additionalProperties": false - }, - "ListCloudInfoResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ListCloudInfoResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ListCloudsRequest": { - "type": "object", - "properties": { - "all": { - "type": "boolean" - }, - "user-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "user-tag" - ] - }, - "ModelAccess": { - "type": "object", - "properties": { - "access": { - "type": "string" - }, - "model": { - "type": "string" - } - }, - "additionalProperties": false - }, - "ModifyCloudAccess": { - "type": "object", - "properties": { - "access": { - "type": "string" - }, - "action": { - "type": "string" - }, - "cloud-tag": { - "type": "string" - }, - "user-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "user-tag", - "cloud-tag", - "action", - "access" - ] - }, - "ModifyCloudAccessRequest": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "$ref": "#/definitions/ModifyCloudAccess" - } - } - }, - "additionalProperties": false, - "required": [ - "changes" - ] - }, - "RevokeCredentialArg": { - "type": "object", - "properties": { - "force": { - "type": "boolean" - }, - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "force" - ] - }, - "RevokeCredentialArgs": { - "type": "object", - "properties": { - "credentials": { - "type": "array", - "items": { - "$ref": "#/definitions/RevokeCredentialArg" - } - } - }, - "additionalProperties": false, - "required": [ - "credentials" - ] - }, - "StringsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "StringsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringsResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "TaggedCredential": { - "type": "object", - "properties": { - "credential": { - "$ref": "#/definitions/CloudCredential" - }, - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "credential" - ] - }, - "TaggedCredentials": { - "type": "object", - "properties": { - "credentials": { - "type": "array", - "items": { - "$ref": "#/definitions/TaggedCredential" - } - } - }, - "additionalProperties": false - }, - "UpdateCloudArgs": { - "type": "object", - "properties": { - "clouds": { - "type": "array", - "items": { - "$ref": "#/definitions/AddCloudArgs" - } - } - }, - "additionalProperties": false, - "required": [ - "clouds" - ] - }, - "UpdateCredentialArgs": { - "type": "object", - "properties": { - "credentials": { - "type": "array", - "items": { - "$ref": "#/definitions/TaggedCredential" - } - }, - "force": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "credentials", - "force" - ] - }, - "UpdateCredentialModelResult": { - "type": "object", - "properties": { - "errors": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - }, - "name": { - "type": "string" - }, - "uuid": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "uuid", - "name" - ] - }, - "UpdateCredentialResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "models": { - "type": "array", - "items": { - "$ref": "#/definitions/UpdateCredentialModelResult" - } - }, - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag" - ] - }, - "UpdateCredentialResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/UpdateCredentialResult" - } - } - }, - "additionalProperties": false - }, - "UserCloud": { - "type": "object", - "properties": { - "cloud-tag": { - "type": "string" - }, - "user-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "user-tag", - "cloud-tag" - ] - }, - "UserClouds": { - "type": "object", - "properties": { - "user-clouds": { - "type": "array", - "items": { - "$ref": "#/definitions/UserCloud" - } - } - }, - "additionalProperties": false - }, - "Value": { - "type": "object", - "properties": { - "allocate-public-ip": { - "type": "boolean" - }, - "arch": { - "type": "string" - }, - "container": { - "type": "string" - }, - "cores": { - "type": "integer" - }, - "cpu-power": { - "type": "integer" - }, - "instance-role": { - "type": "string" - }, - "instance-type": { - "type": "string" - }, - "mem": { - "type": "integer" - }, - "root-disk": { - "type": "integer" - }, - "root-disk-source": { - "type": "string" - }, - "spaces": { - "type": "array", - "items": { - "type": "string" - } - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "virt-type": { - "type": "string" - }, - "zones": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - } - } - } - }, - { - "Name": "Controller", - "Description": "ControllerAPI provides the Controller API.", - "Version": 11, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "controller-user" - ], - "Schema": { - "type": "object", - "properties": { - "AllModels": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/UserModelList" - } - }, - "description": "AllModels allows controller administrators to get the list of all the\nmodels in the controller." - }, - "CloudSpec": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/CloudSpecResults" - } - }, - "description": "CloudSpec returns the model's cloud spec." - }, - "ConfigSet": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ControllerConfigSet" - } - }, - "description": "ConfigSet changes the value of specified controller configuration\nsettings. Only some settings can be changed after bootstrap.\nSettings that aren't specified in the params are left unchanged." - }, - "ControllerAPIInfoForModels": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ControllerAPIInfoResults" - } - }, - "description": "ControllerAPIInfoForModels returns the controller api connection details for the specified models." - }, - "ControllerConfig": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ControllerConfigResult" - } - }, - "description": "ControllerConfig returns the controller's configuration." - }, - "ControllerVersion": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ControllerVersionResults" - } - }, - "description": "ControllerVersion returns the version information associated with this\ncontroller binary.\n\nNOTE: the implementation intentionally does not check for SuperuserAccess\nas the Version is known even to users with login access." - }, - "DashboardConnectionInfo": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/DashboardConnectionInfo" - } - }, - "description": "DashboardConnectionInfo returns the connection information for a client to\nconnect to the Juju Dashboard including any proxying information." - }, - "DestroyController": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/DestroyControllerArgs" - } - }, - "description": "DestroyController destroys the controller.\n\nIf the args specify the destruction of the models, this method will\nattempt to do so. Otherwise, if the controller has any non-empty,\nnon-Dead hosted models, then an error with the code\nparams.CodeHasHostedModels will be transmitted." - }, - "GetCloudSpec": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ModelTag" - }, - "Result": { - "$ref": "#/definitions/CloudSpecResult" - } - }, - "description": "GetCloudSpec constructs the CloudSpec for a validated and authorized model." - }, - "GetControllerAccess": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/UserAccessResults" - } - }, - "description": "GetControllerAccess returns the level of access the specified users\nhave on the controller." - }, - "HostedModelConfigs": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/HostedModelConfigsResults" - } - }, - "description": "HostedModelConfigs returns all the information that the client needs in\norder to connect directly with the host model's provider and destroy it\ndirectly." - }, - "IdentityProviderURL": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringResult" - } - }, - "description": "IdentityProviderURL returns the URL of the configured external identity\nprovider for this controller or an empty string if no external identity\nprovider has been configured when the controller was bootstrapped.\n\nNOTE: the implementation intentionally does not check for SuperuserAccess\nas the URL is known even to users with login access." - }, - "InitiateMigration": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/InitiateMigrationArgs" - }, - "Result": { - "$ref": "#/definitions/InitiateMigrationResults" - } - }, - "description": "InitiateMigration attempts to begin the migration of one or\nmore models to other controllers." - }, - "ListBlockedModels": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ModelBlockInfoList" - } - }, - "description": "ListBlockedModels returns a list of all models on the controller\nwhich have a block in place. The resulting slice is sorted by model\nname, then owner. Callers must be controller administrators to retrieve the\nlist." - }, - "ModelConfig": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ModelConfigResults" - } - }, - "description": "ModelConfig returns the model config for the controller\nmodel. For information on the current model, use\nclient.ModelGet" - }, - "ModelStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ModelStatusResults" - } - }, - "description": "ModelStatus returns a summary of the model." - }, - "ModifyControllerAccess": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ModifyControllerAccessRequest" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "ModifyControllerAccess changes the model access granted to users." - }, - "MongoVersion": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringResult" - } - }, - "description": "MongoVersion allows the introspection of the mongo version per controller" - }, - "RemoveBlocks": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RemoveBlocksArgs" - } - }, - "description": "RemoveBlocks removes all the blocks in the controller." - }, - "WatchAllModelSummaries": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/SummaryWatcherID" - } - }, - "description": "WatchAllModelSummaries starts watching the summary updates from the cache.\nThis method is superuser access only, and watches all models in the\ncontroller." - }, - "WatchAllModels": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/AllWatcherId" - } - }, - "description": "WatchAllModels starts watching events for all models in the\ncontroller. The returned AllWatcherId should be used with Next on the\nAllModelWatcher endpoint to receive deltas." - }, - "WatchCloudSpecsChanges": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "WatchCloudSpecsChanges returns a watcher for cloud spec changes." - }, - "WatchModelSummaries": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/SummaryWatcherID" - } - }, - "description": "WatchModelSummaries starts watching the summary updates from the cache.\nOnly models that the user has access to are returned." - } - }, - "definitions": { - "AllWatcherId": { - "type": "object", - "properties": { - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id" - ] - }, - "CloudCredential": { - "type": "object", - "properties": { - "attrs": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "auth-type": { - "type": "string" - }, - "redacted": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "auth-type" - ] - }, - "CloudSpec": { - "type": "object", - "properties": { - "cacertificates": { - "type": "array", - "items": { - "type": "string" - } - }, - "credential": { - "$ref": "#/definitions/CloudCredential" - }, - "endpoint": { - "type": "string" - }, - "identity-endpoint": { - "type": "string" - }, - "is-controller-cloud": { - "type": "boolean" - }, - "name": { - "type": "string" - }, - "region": { - "type": "string" - }, - "skip-tls-verify": { - "type": "boolean" - }, - "storage-endpoint": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type", - "name" - ] - }, - "CloudSpecResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/CloudSpec" - } - }, - "additionalProperties": false - }, - "CloudSpecResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/CloudSpecResult" - } - } - }, - "additionalProperties": false - }, - "ConfigValue": { - "type": "object", - "properties": { - "source": { - "type": "string" - }, - "value": { - "type": "object", - "additionalProperties": true - } - }, - "additionalProperties": false, - "required": [ - "value", - "source" - ] - }, - "ControllerAPIInfoResult": { - "type": "object", - "properties": { - "addresses": { - "type": "array", - "items": { - "type": "string" - } - }, - "cacert": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "addresses", - "cacert" - ] - }, - "ControllerAPIInfoResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ControllerAPIInfoResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ControllerConfigResult": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "ControllerConfigSet": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "ControllerVersionResults": { - "type": "object", - "properties": { - "git-commit": { - "type": "string" - }, - "version": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "version", - "git-commit" - ] - }, - "DashboardConnectionInfo": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "proxy-connection": { - "$ref": "#/definitions/Proxy" - }, - "ssh-connection": { - "$ref": "#/definitions/DashboardConnectionSSHTunnel" - } - }, - "additionalProperties": false, - "required": [ - "proxy-connection", - "ssh-connection" - ] - }, - "DashboardConnectionSSHTunnel": { - "type": "object", - "properties": { - "entity": { - "type": "string" - }, - "host": { - "type": "string" - }, - "model": { - "type": "string" - }, - "port": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "host", - "port" - ] - }, - "DestroyControllerArgs": { - "type": "object", - "properties": { - "destroy-models": { - "type": "boolean" - }, - "destroy-storage": { - "type": "boolean" - }, - "force": { - "type": "boolean" - }, - "max-wait": { - "type": "integer" - }, - "model-timeout": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "destroy-models" - ] - }, - "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": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "HostedModelConfig": { - "type": "object", - "properties": { - "cloud-spec": { - "$ref": "#/definitions/CloudSpec" - }, - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "name": { - "type": "string" - }, - "owner": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "owner" - ] - }, - "HostedModelConfigsResults": { - "type": "object", - "properties": { - "models": { - "type": "array", - "items": { - "$ref": "#/definitions/HostedModelConfig" - } - } - }, - "additionalProperties": false, - "required": [ - "models" - ] - }, - "InitiateMigrationArgs": { - "type": "object", - "properties": { - "specs": { - "type": "array", - "items": { - "$ref": "#/definitions/MigrationSpec" - } - } - }, - "additionalProperties": false, - "required": [ - "specs" - ] - }, - "InitiateMigrationResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "migration-id": { - "type": "string" - }, - "model-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "model-tag", - "migration-id" - ] - }, - "InitiateMigrationResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/InitiateMigrationResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "MachineHardware": { - "type": "object", - "properties": { - "arch": { - "type": "string" - }, - "availability-zone": { - "type": "string" - }, - "cores": { - "type": "integer" - }, - "cpu-power": { - "type": "integer" - }, - "mem": { - "type": "integer" - }, - "root-disk": { - "type": "integer" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "virt-type": { - "type": "string" - } - }, - "additionalProperties": false - }, - "MigrationSpec": { - "type": "object", - "properties": { - "model-tag": { - "type": "string" - }, - "target-info": { - "$ref": "#/definitions/MigrationTargetInfo" - } - }, - "additionalProperties": false, - "required": [ - "model-tag", - "target-info" - ] - }, - "MigrationTargetInfo": { - "type": "object", - "properties": { - "addrs": { - "type": "array", - "items": { - "type": "string" - } - }, - "auth-tag": { - "type": "string" - }, - "ca-cert": { - "type": "string" - }, - "controller-alias": { - "type": "string" - }, - "controller-tag": { - "type": "string" - }, - "macaroons": { - "type": "string" - }, - "password": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "controller-tag", - "addrs", - "ca-cert", - "auth-tag" - ] - }, - "Model": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "owner-tag": { - "type": "string" - }, - "type": { - "type": "string" - }, - "uuid": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "uuid", - "type", - "owner-tag" - ] - }, - "ModelApplicationInfo": { - "type": "object", - "properties": { - "name": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name" - ] - }, - "ModelBlockInfo": { - "type": "object", - "properties": { - "blocks": { - "type": "array", - "items": { - "type": "string" - } - }, - "model-uuid": { - "type": "string" - }, - "name": { - "type": "string" - }, - "owner-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "model-uuid", - "owner-tag", - "blocks" - ] - }, - "ModelBlockInfoList": { - "type": "object", - "properties": { - "models": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelBlockInfo" - } - } - }, - "additionalProperties": false - }, - "ModelConfigResults": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/ConfigValue" - } - } - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "ModelFilesystemInfo": { - "type": "object", - "properties": { - "detachable": { - "type": "boolean" - }, - "id": { - "type": "string" - }, - "message": { - "type": "string" - }, - "provider-id": { - "type": "string" - }, - "status": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "id" - ] - }, - "ModelMachineInfo": { - "type": "object", - "properties": { - "display-name": { - "type": "string" - }, - "ha-primary": { - "type": "boolean" - }, - "hardware": { - "$ref": "#/definitions/MachineHardware" - }, - "has-vote": { - "type": "boolean" - }, - "id": { - "type": "string" - }, - "instance-id": { - "type": "string" - }, - "message": { - "type": "string" - }, - "status": { - "type": "string" - }, - "wants-vote": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "id" - ] - }, - "ModelStatus": { - "type": "object", - "properties": { - "application-count": { - "type": "integer" - }, - "applications": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelApplicationInfo" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "filesystems": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelFilesystemInfo" - } - }, - "hosted-machine-count": { - "type": "integer" - }, - "life": { - "type": "string" - }, - "machines": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelMachineInfo" - } - }, - "model-tag": { - "type": "string" - }, - "owner-tag": { - "type": "string" - }, - "type": { - "type": "string" - }, - "unit-count": { - "type": "integer" - }, - "volumes": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelVolumeInfo" - } - } - }, - "additionalProperties": false, - "required": [ - "model-tag", - "life", - "type", - "hosted-machine-count", - "application-count", - "unit-count", - "owner-tag" - ] - }, - "ModelStatusResults": { - "type": "object", - "properties": { - "models": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelStatus" - } - } - }, - "additionalProperties": false, - "required": [ - "models" - ] - }, - "ModelTag": { - "type": "object", - "additionalProperties": false - }, - "ModelVolumeInfo": { - "type": "object", - "properties": { - "detachable": { - "type": "boolean" - }, - "id": { - "type": "string" - }, - "message": { - "type": "string" - }, - "provider-id": { - "type": "string" - }, - "status": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "id" - ] - }, - "ModifyControllerAccess": { - "type": "object", - "properties": { - "access": { - "type": "string" - }, - "action": { - "type": "string" - }, - "user-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "user-tag", - "action", - "access" - ] - }, - "ModifyControllerAccessRequest": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "$ref": "#/definitions/ModifyControllerAccess" - } - } - }, - "additionalProperties": false, - "required": [ - "changes" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "NotifyWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "Proxy": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "config", - "type" - ] - }, - "RemoveBlocksArgs": { - "type": "object", - "properties": { - "all": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "all" - ] - }, - "StringResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "SummaryWatcherID": { - "type": "object", - "properties": { - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id" - ] - }, - "UserAccess": { - "type": "object", - "properties": { - "access": { - "type": "string" - }, - "user-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "user-tag", - "access" - ] - }, - "UserAccessResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/UserAccess" - } - }, - "additionalProperties": false - }, - "UserAccessResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/UserAccessResult" - } - } - }, - "additionalProperties": false - }, - "UserModel": { - "type": "object", - "properties": { - "last-connection": { - "type": "string", - "format": "date-time" - }, - "model": { - "$ref": "#/definitions/Model" - } - }, - "additionalProperties": false, - "required": [ - "model", - "last-connection" - ] - }, - "UserModelList": { - "type": "object", - "properties": { - "user-models": { - "type": "array", - "items": { - "$ref": "#/definitions/UserModel" - } - } - }, - "additionalProperties": false, - "required": [ - "user-models" - ] - } - } - } - }, - { - "Name": "CredentialManager", - "Description": "", - "Version": 1, - "AvailableTo": [ - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "InvalidateModelCredential": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/InvalidateCredentialArg" - }, - "Result": { - "$ref": "#/definitions/ErrorResult" - } - }, - "description": "InvalidateModelCredential marks the cloud credential for this model as invalid." - } - }, - "definitions": { - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "InvalidateCredentialArg": { - "type": "object", - "properties": { - "reason": { - "type": "string" - } - }, - "additionalProperties": false - } - } - } - }, - { - "Name": "CredentialValidator", - "Description": "", - "Version": 2, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "InvalidateModelCredential": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/InvalidateCredentialArg" - }, - "Result": { - "$ref": "#/definitions/ErrorResult" - } - }, - "description": "InvalidateModelCredential marks the cloud credential for this model as invalid." - }, - "ModelCredential": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ModelCredential" - } - }, - "description": "ModelCredential returns cloud credential information for a model." - }, - "WatchCredential": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entity" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResult" - } - }, - "description": "WatchCredential returns a NotifyWatcher that observes\nchanges to a given cloud credential." - }, - "WatchModelCredential": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResult" - } - }, - "description": "WatchModelCredential returns a NotifyWatcher that watches what cloud credential a model uses." - } - }, - "definitions": { - "Entity": { - "type": "object", - "properties": { - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "InvalidateCredentialArg": { - "type": "object", - "properties": { - "reason": { - "type": "string" - } - }, - "additionalProperties": false - }, - "ModelCredential": { - "type": "object", - "properties": { - "credential-tag": { - "type": "string" - }, - "exists": { - "type": "boolean" - }, - "model-tag": { - "type": "string" - }, - "valid": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "model-tag", - "credential-tag" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - } - } - } - }, - { - "Name": "CrossController", - "Description": "CrossControllerAPI provides access to the CrossModelRelations API facade.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "controller-user" - ], - "Schema": { - "type": "object", - "properties": { - "ControllerInfo": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ControllerAPIInfoResults" - } - }, - "description": "ControllerInfo returns the API info for the controller." - }, - "WatchControllerInfo": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "WatchControllerInfo creates a watcher that notifies when the API info\nfor the controller changes." - } - }, - "definitions": { - "ControllerAPIInfoResult": { - "type": "object", - "properties": { - "addresses": { - "type": "array", - "items": { - "type": "string" - } - }, - "cacert": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "addresses", - "cacert" - ] - }, - "ControllerAPIInfoResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ControllerAPIInfoResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "NotifyWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - } - } - } - }, - { - "Name": "CrossModelRelations", - "Description": "CrossModelRelationsAPI provides access to the CrossModelRelations API facade.", - "Version": 2, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "PublishIngressNetworkChanges": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/IngressNetworksChanges" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "PublishIngressNetworkChanges publishes changes to the required\ningress addresses to the model hosting the offer in the relation." - }, - "PublishRelationChanges": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RemoteRelationsChanges" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "PublishRelationChanges publishes relation changes to the\nmodel hosting the remote application involved in the relation." - }, - "RegisterRemoteRelations": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RegisterRemoteRelationArgs" - }, - "Result": { - "$ref": "#/definitions/RegisterRemoteRelationResults" - } - }, - "description": "RegisterRemoteRelations sets up the model to participate\nin the specified relations. This operation is idempotent." - }, - "WatchEgressAddressesForRelations": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RemoteEntityArgs" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - }, - "description": "WatchEgressAddressesForRelations creates a watcher that notifies when addresses, from which\nconnections will originate for the relation, change.\nEach event contains the entire set of addresses which are required for ingress for the relation." - }, - "WatchOfferStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/OfferArgs" - }, - "Result": { - "$ref": "#/definitions/OfferStatusWatchResults" - } - }, - "description": "WatchOfferStatus starts an OfferStatusWatcher for\nwatching the status of an offer." - }, - "WatchRelationChanges": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RemoteEntityArgs" - }, - "Result": { - "$ref": "#/definitions/RemoteRelationWatchResults" - } - }, - "description": "WatchRelationChanges starts a RemoteRelationChangesWatcher for each\nspecified relation, returning the watcher IDs and initial values,\nor an error if the remote relations couldn't be watched." - }, - "WatchRelationsSuspendedStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RemoteEntityArgs" - }, - "Result": { - "$ref": "#/definitions/RelationStatusWatchResults" - } - }, - "description": "WatchRelationsSuspendedStatus starts a RelationStatusWatcher for\nwatching the life and suspended status of a relation." - } - }, - "definitions": { - "EntityStatus": { - "type": "object", - "properties": { - "data": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "info": { - "type": "string" - }, - "since": { - "type": "string", - "format": "date-time" - }, - "status": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "status", - "info", - "since" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "IngressNetworksChangeEvent": { - "type": "object", - "properties": { - "application-token": { - "type": "string" - }, - "bakery-version": { - "type": "integer" - }, - "ingress-required": { - "type": "boolean" - }, - "macaroons": { - "type": "array", - "items": { - "$ref": "#/definitions/Macaroon" - } - }, - "networks": { - "type": "array", - "items": { - "type": "string" - } - }, - "relation-token": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "relation-token", - "application-token", - "ingress-required" - ] - }, - "IngressNetworksChanges": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "$ref": "#/definitions/IngressNetworksChangeEvent" - } - } - }, - "additionalProperties": false - }, - "Macaroon": { - "type": "object", - "additionalProperties": false - }, - "OfferArg": { - "type": "object", - "properties": { - "bakery-version": { - "type": "integer" - }, - "macaroons": { - "type": "array", - "items": { - "$ref": "#/definitions/Macaroon" - } - }, - "offer-uuid": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "offer-uuid" - ] - }, - "OfferArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/OfferArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "OfferStatusChange": { - "type": "object", - "properties": { - "offer-name": { - "type": "string" - }, - "status": { - "$ref": "#/definitions/EntityStatus" - } - }, - "additionalProperties": false, - "required": [ - "offer-name", - "status" - ] - }, - "OfferStatusWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "$ref": "#/definitions/OfferStatusChange" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id", - "changes" - ] - }, - "OfferStatusWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/OfferStatusWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "RegisterRemoteRelationArg": { - "type": "object", - "properties": { - "application-token": { - "type": "string" - }, - "bakery-version": { - "type": "integer" - }, - "consume-version": { - "type": "integer" - }, - "local-endpoint-name": { - "type": "string" - }, - "macaroons": { - "type": "array", - "items": { - "$ref": "#/definitions/Macaroon" - } - }, - "offer-uuid": { - "type": "string" - }, - "relation-token": { - "type": "string" - }, - "remote-endpoint": { - "$ref": "#/definitions/RemoteEndpoint" - }, - "remote-space": { - "$ref": "#/definitions/RemoteSpace" - }, - "source-model-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "application-token", - "source-model-tag", - "relation-token", - "remote-endpoint", - "remote-space", - "offer-uuid", - "local-endpoint-name" - ] - }, - "RegisterRemoteRelationArgs": { - "type": "object", - "properties": { - "relations": { - "type": "array", - "items": { - "$ref": "#/definitions/RegisterRemoteRelationArg" - } - } - }, - "additionalProperties": false, - "required": [ - "relations" - ] - }, - "RegisterRemoteRelationResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/RemoteRelationDetails" - } - }, - "additionalProperties": false - }, - "RegisterRemoteRelationResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/RegisterRemoteRelationResult" - } - } - }, - "additionalProperties": false - }, - "RelationLifeSuspendedStatusChange": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "life": { - "type": "string" - }, - "suspended": { - "type": "boolean" - }, - "suspended-reason": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "key", - "life", - "suspended", - "suspended-reason" - ] - }, - "RelationLifeSuspendedStatusWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "$ref": "#/definitions/RelationLifeSuspendedStatusChange" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id", - "changes" - ] - }, - "RelationStatusWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/RelationLifeSuspendedStatusWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "RemoteEndpoint": { - "type": "object", - "properties": { - "interface": { - "type": "string" - }, - "limit": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "role": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "role", - "interface", - "limit" - ] - }, - "RemoteEntityArg": { - "type": "object", - "properties": { - "bakery-version": { - "type": "integer" - }, - "macaroons": { - "type": "array", - "items": { - "$ref": "#/definitions/Macaroon" - } - }, - "relation-token": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "relation-token" - ] - }, - "RemoteEntityArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoteEntityArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "RemoteRelationChangeEvent": { - "type": "object", - "properties": { - "application-settings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "application-token": { - "type": "string" - }, - "bakery-version": { - "type": "integer" - }, - "changed-units": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoteRelationUnitChange" - } - }, - "departed-units": { - "type": "array", - "items": { - "type": "integer" - } - }, - "force-cleanup": { - "type": "boolean" - }, - "life": { - "type": "string" - }, - "macaroons": { - "type": "array", - "items": { - "$ref": "#/definitions/Macaroon" - } - }, - "relation-token": { - "type": "string" - }, - "suspended": { - "type": "boolean" - }, - "suspended-reason": { - "type": "string" - }, - "unit-count": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "relation-token", - "application-token", - "life", - "unit-count" - ] - }, - "RemoteRelationDetails": { - "type": "object", - "properties": { - "bakery-version": { - "type": "integer" - }, - "macaroon": { - "$ref": "#/definitions/Macaroon" - }, - "relation-token": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "relation-token" - ] - }, - "RemoteRelationUnitChange": { - "type": "object", - "properties": { - "settings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "unit-id": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "unit-id" - ] - }, - "RemoteRelationWatchResult": { - "type": "object", - "properties": { - "changes": { - "$ref": "#/definitions/RemoteRelationChangeEvent" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id", - "changes" - ] - }, - "RemoteRelationWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoteRelationWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "RemoteRelationsChanges": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoteRelationChangeEvent" - } - } - }, - "additionalProperties": false - }, - "RemoteSpace": { - "type": "object", - "properties": { - "cloud-type": { - "type": "string" - }, - "name": { - "type": "string" - }, - "provider-attributes": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "provider-id": { - "type": "string" - }, - "subnets": { - "type": "array", - "items": { - "$ref": "#/definitions/Subnet" - } - } - }, - "additionalProperties": false, - "required": [ - "cloud-type", - "name", - "provider-id", - "provider-attributes", - "subnets" - ] - }, - "StringsWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id" - ] - }, - "StringsWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringsWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "Subnet": { - "type": "object", - "properties": { - "cidr": { - "type": "string" - }, - "life": { - "type": "string" - }, - "provider-id": { - "type": "string" - }, - "provider-network-id": { - "type": "string" - }, - "provider-space-id": { - "type": "string" - }, - "space-tag": { - "type": "string" - }, - "status": { - "type": "string" - }, - "vlan-tag": { - "type": "integer" - }, - "zones": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "cidr", - "vlan-tag", - "life", - "space-tag", - "zones" - ] - } - } - } - }, - { - "Name": "Deployer", - "Description": "DeployerAPI provides access to the Deployer API facade.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent" - ], - "Schema": { - "type": "object", - "properties": { - "APIAddresses": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsResult" - } - }, - "description": "APIAddresses returns the list of addresses used to connect to the API." - }, - "APIHostPorts": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/APIHostPortsResult" - } - }, - "description": "APIHostPorts returns the API server addresses." - }, - "ConnectionInfo": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/DeployerConnectionValues" - } - }, - "description": "ConnectionInfo returns all the address information that the\ndeployer task needs in one call." - }, - "Life": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/LifeResults" - } - }, - "description": "Life returns the life status of every supplied entity, where available." - }, - "ModelUUID": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringResult" - } - }, - "description": "ModelUUID returns the model UUID that this facade is deploying into.\nIt is implemented here directly as a result of removing it from\nembedded APIAddresser *without* bumping the facade version.\nIt should be blanked when this facade version is next incremented." - }, - "Remove": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "Remove removes every given entity from state, calling EnsureDead\nfirst, then Remove. It will fail if the entity is not present." - }, - "SetPasswords": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/EntityPasswords" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetPasswords sets the given password for each supplied entity, if possible." - }, - "SetStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetStatus" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetStatus sets the status of the specified entities." - }, - "WatchAPIHostPorts": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResult" - } - }, - "description": "WatchAPIHostPorts watches the API server addresses." - }, - "WatchUnits": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - }, - "description": "WatchUnits starts a StringsWatcher to watch all units belonging to\nto any entity (machine or service) passed in args." - } - }, - "definitions": { - "APIHostPortsResult": { - "type": "object", - "properties": { - "servers": { - "type": "array", - "items": { - "type": "array", - "items": { - "$ref": "#/definitions/HostPort" - } - } - } - }, - "additionalProperties": false, - "required": [ - "servers" - ] - }, - "Address": { - "type": "object", - "properties": { - "cidr": { - "type": "string" - }, - "config-type": { - "type": "string" - }, - "is-secondary": { - "type": "boolean" - }, - "scope": { - "type": "string" - }, - "space-id": { - "type": "string" - }, - "space-name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "value", - "type", - "scope" - ] - }, - "DeployerConnectionValues": { - "type": "object", - "properties": { - "api-addresses": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "api-addresses" - ] - }, - "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" - ] - }, - "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": { - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "HostPort": { - "type": "object", - "properties": { - "Address": { - "$ref": "#/definitions/Address" - }, - "cidr": { - "type": "string" - }, - "config-type": { - "type": "string" - }, - "is-secondary": { - "type": "boolean" - }, - "port": { - "type": "integer" - }, - "scope": { - "type": "string" - }, - "space-id": { - "type": "string" - }, - "space-name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "value", - "type", - "scope", - "Address", - "port" - ] - }, - "LifeResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "life": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "life" - ] - }, - "LifeResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/LifeResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "SetStatus": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityStatusArgs" - } - } - }, - "additionalProperties": false, - "required": [ - "entities" - ] - }, - "StringResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "StringsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "StringsWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id" - ] - }, - "StringsWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringsWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - } - } - } - }, - { - "Name": "DiskManager", - "Description": "DiskManagerAPI provides access to the DiskManager API facade.", - "Version": 2, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent" - ], - "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" - }, - "SerialId": { - "type": "string" - }, - "Size": { - "type": "integer" - }, - "UUID": { - "type": "string" - }, - "WWN": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "DeviceName", - "DeviceLinks", - "Label", - "UUID", - "HardwareId", - "WWN", - "BusAddress", - "Size", - "FilesystemType", - "InUse", - "MountPoint", - "SerialId" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "MachineBlockDevices": { - "type": "object", - "properties": { - "block-devices": { - "type": "array", - "items": { - "$ref": "#/definitions/BlockDevice" - } - }, - "machine": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "machine" - ] - }, - "SetMachineBlockDevices": { - "type": "object", - "properties": { - "machine-block-devices": { - "type": "array", - "items": { - "$ref": "#/definitions/MachineBlockDevices" - } - } - }, - "additionalProperties": false, - "required": [ - "machine-block-devices" - ] - } - } - } - }, - { - "Name": "EntityWatcher", - "Description": "srvEntitiesWatcher defines the API for methods on a state.StringsWatcher.\nEach client has its own current set of watchers, stored in resources.\nsrvEntitiesWatcher notifies about changes for all entities of a given kind,\nsending the changes as a list of strings, which could be transformed\nfrom state entity ids to their corresponding entity tags.", - "Version": 2, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "Next": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/EntitiesWatchResult" - } - }, - "description": "Next returns when a change has occurred to an entity of the\ncollection being watched since the most recent call to Next\nor the Watch call that created the srvEntitiesWatcher." - }, - "Stop": { - "type": "object", - "description": "Stop stops the watcher." - } - }, - "definitions": { - "EntitiesWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - } - } - } - }, - { - "Name": "EnvironUpgrader", - "Description": "", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent" - ], - "Schema": { - "type": "object", - "properties": { - "ModelEnvironVersion": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/IntResults" - } - }, - "description": "ModelEnvironVersion returns the current version of the environ corresponding\nto each specified model." - }, - "ModelTargetEnvironVersion": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/IntResults" - } - }, - "description": "ModelTargetEnvironVersion returns the target version of the environ\ncorresponding to each specified model. The target version is the\nenviron provider's version." - }, - "SetModelEnvironVersion": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetModelEnvironVersions" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetModelEnvironVersion sets the current version of the environ corresponding\nto each specified model." - }, - "SetModelStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetStatus" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetModelStatus sets the status of each given model." - }, - "WatchModelEnvironVersion": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "WatchModelEnvironVersion watches for changes to the environ version of the\nspecified models.\n\nNOTE(axw) this is currently implemented in terms of state.Model.Watch, so\nthe client may be notified of changes unrelated to the environ version." - } - }, - "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" - ] - }, - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "IntResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "IntResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/IntResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "NotifyWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "SetModelEnvironVersion": { - "type": "object", - "properties": { - "model-tag": { - "type": "string" - }, - "version": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "model-tag", - "version" - ] - }, - "SetModelEnvironVersions": { - "type": "object", - "properties": { - "models": { - "type": "array", - "items": { - "$ref": "#/definitions/SetModelEnvironVersion" - } - } - }, - "additionalProperties": false - }, - "SetStatus": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityStatusArgs" - } - } - }, - "additionalProperties": false, - "required": [ - "entities" - ] - } - } - } - }, - { - "Name": "ExternalControllerUpdater", - "Description": "ExternalControllerUpdaterAPI provides access to the CrossModelRelations API facade.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent" - ], - "Schema": { - "type": "object", - "properties": { - "ExternalControllerInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ExternalControllerInfoResults" - } - }, - "description": "ExternalControllerInfo returns the info for the specified external controllers." - }, - "SetExternalControllerInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetExternalControllersInfoParams" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetExternalControllerInfo saves the info for the specified external controllers." - }, - "WatchExternalControllers": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - }, - "description": "WatchExternalControllers watches for the addition and removal of external\ncontroller records to the local controller's database." - } - }, - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ExternalControllerInfo": { - "type": "object", - "properties": { - "addrs": { - "type": "array", - "items": { - "type": "string" - } - }, - "ca-cert": { - "type": "string" - }, - "controller-alias": { - "type": "string" - }, - "controller-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "controller-tag", - "controller-alias", - "addrs", - "ca-cert" - ] - }, - "ExternalControllerInfoResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/ExternalControllerInfo" - } - }, - "additionalProperties": false, - "required": [ - "result", - "error" - ] - }, - "ExternalControllerInfoResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ExternalControllerInfoResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "SetExternalControllerInfoParams": { - "type": "object", - "properties": { - "info": { - "$ref": "#/definitions/ExternalControllerInfo" - } - }, - "additionalProperties": false, - "required": [ - "info" - ] - }, - "SetExternalControllersInfoParams": { - "type": "object", - "properties": { - "controllers": { - "type": "array", - "items": { - "$ref": "#/definitions/SetExternalControllerInfoParams" - } - } - }, - "additionalProperties": false, - "required": [ - "controllers" - ] - }, - "StringsWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id" - ] - }, - "StringsWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringsWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - } - } - } - }, - { - "Name": "FanConfigurer", - "Description": "", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "FanConfig": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/FanConfigResult" - } - }, - "description": "FanConfig returns current FAN configuration." - }, - "WatchForFanConfigChanges": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResult" - } - }, - "description": "WatchForFanConfigChanges returns a NotifyWatcher that observes\nchanges to the FAN configuration.\nso we use the regular error return.\nTODO(wpk) 2017-09-21 We should use Model directly, and watch only for FanConfig changes." - } - }, - "definitions": { - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "FanConfigEntry": { - "type": "object", - "properties": { - "overlay": { - "type": "string" - }, - "underlay": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "underlay", - "overlay" - ] - }, - "FanConfigResult": { - "type": "object", - "properties": { - "fans": { - "type": "array", - "items": { - "$ref": "#/definitions/FanConfigEntry" - } - } - }, - "additionalProperties": false, - "required": [ - "fans" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - } - } - } - }, - { - "Name": "FilesystemAttachmentsWatcher", - "Description": "srvMachineStorageIdsWatcher defines the API wrapping a state.StringsWatcher\nwatching machine/storage attachments. This watcher notifies about storage\nentities (volumes/filesystems) being attached to and detached from machines.\n\nTODO(axw) state needs a new watcher, this is a bt of a hack. State watchers\ncould do with some deduplication of logic, and I don't want to add to that\nspaghetti right now.", - "Version": 2, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "Next": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/MachineStorageIdsWatchResult" - } - }, - "description": "Next returns when a change has occurred to an entity of the\ncollection being watched since the most recent call to Next\nor the Watch call that created the srvMachineStorageIdsWatcher." - }, - "Stop": { - "type": "object", - "description": "Stop stops the watcher." - } - }, - "definitions": { - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "MachineStorageId": { - "type": "object", - "properties": { - "attachment-tag": { - "type": "string" - }, - "machine-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "machine-tag", - "attachment-tag" - ] - }, - "MachineStorageIdsWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "$ref": "#/definitions/MachineStorageId" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id", - "changes" - ] - } - } - } - }, - { - "Name": "FirewallRules", - "Description": "API provides the firewallrules facade APIs for v1.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "ListFirewallRules": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ListFirewallRulesResults" - } - }, - "description": "ListFirewallRules returns all the firewall rules." - }, - "SetFirewallRules": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/FirewallRuleArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetFirewallRules creates or updates the specified firewall rules." - } - }, - "definitions": { - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "FirewallRule": { - "type": "object", - "properties": { - "known-service": { - "type": "string" - }, - "whitelist-cidrs": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "known-service" - ] - }, - "FirewallRuleArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/FirewallRule" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "ListFirewallRulesResults": { - "type": "object", - "properties": { - "Rules": { - "type": "array", - "items": { - "$ref": "#/definitions/FirewallRule" - } - } - }, - "additionalProperties": false, - "required": [ - "Rules" - ] - } - } - } - }, - { - "Name": "Firewaller", - "Description": "FirewallerAPI provides access to the Firewaller API facade.", - "Version": 7, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "AreManuallyProvisioned": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/BoolResults" - } - }, - "description": "AreManuallyProvisioned returns whether each given entity is\nmanually provisioned or not. Only machine tags are accepted." - }, - "CloudSpec": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/CloudSpecResults" - } - }, - "description": "CloudSpec returns the model's cloud spec." - }, - "ControllerAPIInfoForModels": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ControllerAPIInfoResults" - } - }, - "description": "ControllerAPIInfoForModels returns the controller api connection details for the specified models." - }, - "ControllerConfig": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ControllerConfigResult" - } - }, - "description": "ControllerConfig returns the controller's configuration." - }, - "FirewallRules": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/KnownServiceArgs" - }, - "Result": { - "$ref": "#/definitions/ListFirewallRulesResults" - } - }, - "description": "FirewallRules returns the firewall rules for the specified well known service types." - }, - "GetAssignedMachine": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringResults" - } - }, - "description": "GetAssignedMachine returns the assigned machine tag (if any) for\neach given unit." - }, - "GetCloudSpec": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ModelTag" - }, - "Result": { - "$ref": "#/definitions/CloudSpecResult" - } - }, - "description": "GetCloudSpec constructs the CloudSpec for a validated and authorized model." - }, - "GetExposeInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ExposeInfoResults" - } - }, - "description": "GetExposeInfo returns the expose flag and per-endpoint expose settings\nfor the specified applications." - }, - "InstanceId": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringResults" - } - }, - "description": "InstanceId returns the provider specific instance id for each given\nmachine or an CodeNotProvisioned error, if not set." - }, - "Life": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/LifeResults" - } - }, - "description": "Life returns the life status of every supplied entity, where available." - }, - "MacaroonForRelations": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/MacaroonResults" - } - }, - "description": "MacaroonForRelations returns the macaroon for the specified relations." - }, - "ModelConfig": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ModelConfigResult" - } - }, - "description": "ModelConfig returns the current model's configuration." - }, - "OpenedMachinePortRanges": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/OpenMachinePortRangesResults" - } - }, - "description": "OpenedMachinePortRanges returns a list of the opened port ranges for the\nspecified machines where each result is broken down by unit. The list of\nopened ports for each unit is further grouped by endpoint name and includes\nthe subnet CIDRs that belong to the space that each endpoint is bound to." - }, - "SetRelationsStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetStatus" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetRelationsStatus sets the status for the specified relations." - }, - "SpaceInfos": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SpaceInfosParams" - }, - "Result": { - "$ref": "#/definitions/SpaceInfos" - } - }, - "description": "SpaceInfos returns a comprehensive representation of either all spaces or\na filtered subset of the known spaces and their associated subnet details." - }, - "Watch": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "Watch starts an NotifyWatcher for each given entity." - }, - "WatchCloudSpecsChanges": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "WatchCloudSpecsChanges returns a watcher for cloud spec changes." - }, - "WatchEgressAddressesForRelations": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - }, - "description": "WatchEgressAddressesForRelations creates a watcher that notifies when addresses, from which\nconnections will originate for the relation, change.\nEach event contains the entire set of addresses which are required for ingress for the relation." - }, - "WatchForModelConfigChanges": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResult" - } - }, - "description": "WatchForModelConfigChanges returns a NotifyWatcher that observes\nchanges to the model configuration.\nNote that although the NotifyWatchResult contains an Error field,\nit's not used because we are only returning a single watcher,\nso we use the regular error return." - }, - "WatchIngressAddressesForRelations": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - }, - "description": "WatchIngressAddressesForRelations creates a watcher that returns the ingress networks\nthat have been recorded against the specified relations." - }, - "WatchModelMachineStartTimes": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsWatchResult" - } - }, - "description": "WatchModelMachineStartTimes watches the non-container machines in the model\nfor changes to the Life or AgentStartTime fields and reports them as a batch." - }, - "WatchModelMachines": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsWatchResult" - } - }, - "description": "WatchModelMachines returns a StringsWatcher that notifies of\nchanges to the life cycles of the top level machines in the current\nmodel." - }, - "WatchOpenedPorts": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - }, - "description": "WatchOpenedPorts returns a new StringsWatcher for each given\nmodel tag." - }, - "WatchSubnets": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResult" - } - }, - "description": "WatchSubnets returns a new StringsWatcher that watches the specified\nsubnet tags or all tags if no entities are specified." - }, - "WatchUnits": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - }, - "description": "WatchUnits starts a StringsWatcher to watch all units belonging to\nto any entity (machine or service) passed in args." - } - }, - "definitions": { - "BoolResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "BoolResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/BoolResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "CloudCredential": { - "type": "object", - "properties": { - "attrs": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "auth-type": { - "type": "string" - }, - "redacted": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "auth-type" - ] - }, - "CloudSpec": { - "type": "object", - "properties": { - "cacertificates": { - "type": "array", - "items": { - "type": "string" - } - }, - "credential": { - "$ref": "#/definitions/CloudCredential" - }, - "endpoint": { - "type": "string" - }, - "identity-endpoint": { - "type": "string" - }, - "is-controller-cloud": { - "type": "boolean" - }, - "name": { - "type": "string" - }, - "region": { - "type": "string" - }, - "skip-tls-verify": { - "type": "boolean" - }, - "storage-endpoint": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type", - "name" - ] - }, - "CloudSpecResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/CloudSpec" - } - }, - "additionalProperties": false - }, - "CloudSpecResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/CloudSpecResult" - } - } - }, - "additionalProperties": false - }, - "ControllerAPIInfoResult": { - "type": "object", - "properties": { - "addresses": { - "type": "array", - "items": { - "type": "string" - } - }, - "cacert": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "addresses", - "cacert" - ] - }, - "ControllerAPIInfoResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ControllerAPIInfoResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ControllerConfigResult": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "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" - ] - }, - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ExposeInfoResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "exposed": { - "type": "boolean" - }, - "exposed-endpoints": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/ExposedEndpoint" - } - } - } - }, - "additionalProperties": false - }, - "ExposeInfoResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ExposeInfoResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ExposedEndpoint": { - "type": "object", - "properties": { - "expose-to-cidrs": { - "type": "array", - "items": { - "type": "string" - } - }, - "expose-to-spaces": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "FanConfigEntry": { - "type": "object", - "properties": { - "overlay": { - "type": "string" - }, - "underlay": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "underlay", - "overlay" - ] - }, - "FirewallRule": { - "type": "object", - "properties": { - "known-service": { - "type": "string" - }, - "whitelist-cidrs": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "known-service" - ] - }, - "KnownServiceArgs": { - "type": "object", - "properties": { - "known-services": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "known-services" - ] - }, - "LifeResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "life": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "life" - ] - }, - "LifeResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/LifeResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ListFirewallRulesResults": { - "type": "object", - "properties": { - "Rules": { - "type": "array", - "items": { - "$ref": "#/definitions/FirewallRule" - } - } - }, - "additionalProperties": false, - "required": [ - "Rules" - ] - }, - "Macaroon": { - "type": "object", - "additionalProperties": false - }, - "MacaroonResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/Macaroon" - } - }, - "additionalProperties": false - }, - "MacaroonResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/MacaroonResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ModelConfigResult": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "ModelTag": { - "type": "object", - "additionalProperties": false - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "NotifyWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "OpenMachinePortRangesResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "unit-port-ranges": { - "type": "object", - "patternProperties": { - ".*": { - "type": "array", - "items": { - "$ref": "#/definitions/OpenUnitPortRanges" - } - } - } - } - }, - "additionalProperties": false, - "required": [ - "unit-port-ranges" - ] - }, - "OpenMachinePortRangesResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/OpenMachinePortRangesResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "OpenUnitPortRanges": { - "type": "object", - "properties": { - "endpoint": { - "type": "string" - }, - "port-ranges": { - "type": "array", - "items": { - "$ref": "#/definitions/PortRange" - } - }, - "subnet-cidrs": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "endpoint", - "port-ranges", - "subnet-cidrs" - ] - }, - "PortRange": { - "type": "object", - "properties": { - "from-port": { - "type": "integer" - }, - "protocol": { - "type": "string" - }, - "to-port": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "from-port", - "to-port", - "protocol" - ] - }, - "SetStatus": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityStatusArgs" - } - } - }, - "additionalProperties": false, - "required": [ - "entities" - ] - }, - "SpaceInfo": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "provider-id": { - "type": "string" - }, - "subnets": { - "type": "array", - "items": { - "$ref": "#/definitions/SubnetV3" - } - } - }, - "additionalProperties": false, - "required": [ - "id", - "name" - ] - }, - "SpaceInfos": { - "type": "object", - "properties": { - "space-infos": { - "type": "array", - "items": { - "$ref": "#/definitions/SpaceInfo" - } - } - }, - "additionalProperties": false - }, - "SpaceInfosParams": { - "type": "object", - "properties": { - "space-ids": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "StringResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "StringResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "StringsWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id" - ] - }, - "StringsWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringsWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "Subnet": { - "type": "object", - "properties": { - "cidr": { - "type": "string" - }, - "life": { - "type": "string" - }, - "provider-id": { - "type": "string" - }, - "provider-network-id": { - "type": "string" - }, - "provider-space-id": { - "type": "string" - }, - "space-tag": { - "type": "string" - }, - "status": { - "type": "string" - }, - "vlan-tag": { - "type": "integer" - }, - "zones": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "cidr", - "vlan-tag", - "life", - "space-tag", - "zones" - ] - }, - "SubnetV2": { - "type": "object", - "properties": { - "Subnet": { - "$ref": "#/definitions/Subnet" - }, - "cidr": { - "type": "string" - }, - "id": { - "type": "string" - }, - "life": { - "type": "string" - }, - "provider-id": { - "type": "string" - }, - "provider-network-id": { - "type": "string" - }, - "provider-space-id": { - "type": "string" - }, - "space-tag": { - "type": "string" - }, - "status": { - "type": "string" - }, - "vlan-tag": { - "type": "integer" - }, - "zones": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "cidr", - "vlan-tag", - "life", - "space-tag", - "zones", - "Subnet" - ] - }, - "SubnetV3": { - "type": "object", - "properties": { - "Subnet": { - "$ref": "#/definitions/Subnet" - }, - "SubnetV2": { - "$ref": "#/definitions/SubnetV2" - }, - "cidr": { - "type": "string" - }, - "fan-info": { - "$ref": "#/definitions/FanConfigEntry" - }, - "id": { - "type": "string" - }, - "is-public": { - "type": "boolean" - }, - "life": { - "type": "string" - }, - "provider-id": { - "type": "string" - }, - "provider-network-id": { - "type": "string" - }, - "provider-space-id": { - "type": "string" - }, - "space-id": { - "type": "string" - }, - "space-tag": { - "type": "string" - }, - "status": { - "type": "string" - }, - "vlan-tag": { - "type": "integer" - }, - "zones": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "cidr", - "vlan-tag", - "life", - "space-tag", - "zones", - "Subnet", - "SubnetV2", - "space-id" - ] - } - } - } - }, - { - "Name": "HighAvailability", - "Description": "HighAvailabilityAPI implements the HighAvailability interface and is the concrete\nimplementation of the api end point.", - "Version": 2, - "AvailableTo": [ - "controller-user", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "EnableHA": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ControllersSpecs" - }, - "Result": { - "$ref": "#/definitions/ControllersChangeResults" - } - }, - "description": "EnableHA adds controller machines as necessary to ensure the\ncontroller has the number of machines specified." - } - }, - "definitions": { - "ControllersChangeResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/ControllersChanges" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "ControllersChangeResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ControllersChangeResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ControllersChanges": { - "type": "object", - "properties": { - "added": { - "type": "array", - "items": { - "type": "string" - } - }, - "converted": { - "type": "array", - "items": { - "type": "string" - } - }, - "maintained": { - "type": "array", - "items": { - "type": "string" - } - }, - "removed": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "ControllersSpec": { - "type": "object", - "properties": { - "constraints": { - "$ref": "#/definitions/Value" - }, - "num-controllers": { - "type": "integer" - }, - "placement": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "num-controllers" - ] - }, - "ControllersSpecs": { - "type": "object", - "properties": { - "specs": { - "type": "array", - "items": { - "$ref": "#/definitions/ControllersSpec" - } - } - }, - "additionalProperties": false, - "required": [ - "specs" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "Value": { - "type": "object", - "properties": { - "allocate-public-ip": { - "type": "boolean" - }, - "arch": { - "type": "string" - }, - "container": { - "type": "string" - }, - "cores": { - "type": "integer" - }, - "cpu-power": { - "type": "integer" - }, - "instance-role": { - "type": "string" - }, - "instance-type": { - "type": "string" - }, - "mem": { - "type": "integer" - }, - "root-disk": { - "type": "integer" - }, - "root-disk-source": { - "type": "string" - }, - "spaces": { - "type": "array", - "items": { - "type": "string" - } - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "virt-type": { - "type": "string" - }, - "zones": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - } - } - } - }, - { - "Name": "HostKeyReporter", - "Description": "Facade implements the API required by the hostkeyreporter worker.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "ReportKeys": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SSHHostKeySet" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "ReportKeys sets the SSH host keys for one or more entities." - } - }, - "definitions": { - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "SSHHostKeySet": { - "type": "object", - "properties": { - "entity-keys": { - "type": "array", - "items": { - "$ref": "#/definitions/SSHHostKeys" - } - } - }, - "additionalProperties": false, - "required": [ - "entity-keys" - ] - }, - "SSHHostKeys": { - "type": "object", - "properties": { - "public-keys": { - "type": "array", - "items": { - "type": "string" - } - }, - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "public-keys" - ] - } - } - } - }, - { - "Name": "ImageMetadata", - "Description": "API is a dummy struct for compatibility.", - "Version": 3, - "AvailableTo": [ - "controller-machine-agent" - ], - "Schema": { - "type": "object", - "properties": { - "UpdateFromPublishedImages": { - "type": "object", - "description": "UpdateFromPublishedImages is now a no-op.\nIt is retained for compatibility." - } - } - } - }, - { - "Name": "ImageMetadataManager", - "Description": "API is the concrete implementation of the api end point\nfor loud image metadata manipulations.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "Delete": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/MetadataImageIds" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "Delete deletes cloud image metadata for given image ids.\nIt supports bulk calls." - }, - "List": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ImageMetadataFilter" - }, - "Result": { - "$ref": "#/definitions/ListCloudImageMetadataResult" - } - }, - "description": "List returns all found cloud image metadata that satisfy\ngiven filter.\nReturned list contains metadata ordered by priority." - }, - "Save": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/MetadataSaveParams" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "Save stores given cloud image metadata.\nIt supports bulk calls." - } - }, - "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" - }, - "source": { - "type": "string" - }, - "stream": { - "type": "string" - }, - "version": { - "type": "string" - }, - "virt-type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "image-id", - "region", - "version", - "arch", - "source", - "priority" - ] - }, - "CloudImageMetadataList": { - "type": "object", - "properties": { - "metadata": { - "type": "array", - "items": { - "$ref": "#/definitions/CloudImageMetadata" - } - } - }, - "additionalProperties": false - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "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" - }, - "stream": { - "type": "string" - }, - "versions": { - "type": "array", - "items": { - "type": "string" - } - }, - "virt-type": { - "type": "string" - } - }, - "additionalProperties": false - }, - "ListCloudImageMetadataResult": { - "type": "object", - "properties": { - "result": { - "type": "array", - "items": { - "$ref": "#/definitions/CloudImageMetadata" - } - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "MetadataImageIds": { - "type": "object", - "properties": { - "image-ids": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "image-ids" - ] - }, - "MetadataSaveParams": { - "type": "object", - "properties": { - "metadata": { - "type": "array", - "items": { - "$ref": "#/definitions/CloudImageMetadataList" - } - } - }, - "additionalProperties": false - } - } - } - }, - { - "Name": "InstanceMutater", - "Description": "", - "Version": 3, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent" - ], - "Schema": { - "type": "object", - "properties": { - "CharmProfilingInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entity" - }, - "Result": { - "$ref": "#/definitions/CharmProfilingInfoResult" - } - }, - "description": "CharmProfilingInfo returns info to update lxd profiles on the machine. If\nthe machine is not provisioned, no profile change info will be returned,\nnor will an error." - }, - "ContainerType": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entity" - }, - "Result": { - "$ref": "#/definitions/ContainerTypeResult" - } - }, - "description": "ContainerType returns the container type of a machine." - }, - "Life": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/LifeResults" - } - }, - "description": "Life returns the life status of every supplied entity, where available." - }, - "SetCharmProfiles": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetProfileArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetCharmProfiles records the given slice of charm profile names." - }, - "SetModificationStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetStatus" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetModificationStatus updates the instance whilst changes are occurring. This\nis different from SetStatus and SetInstanceStatus, by the fact this holds\ninformation about the ongoing changes that are happening to instances.\nConsider LXD Profile updates that can modify a instance, but may not cause\nthe instance to be placed into a error state. This modification status\nserves the purpose of highlighting that to the operator.\nOnly machine tags are accepted." - }, - "WatchContainers": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entity" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResult" - } - }, - "description": "WatchContainers starts a watcher to track Containers on a given\nmachine." - }, - "WatchLXDProfileVerificationNeeded": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "WatchLXDProfileVerificationNeeded starts a watcher to track Applications with\nLXD Profiles." - }, - "WatchMachines": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsWatchResult" - } - }, - "description": "WatchMachines starts a watcher to track machines.\nWatchMachines does not consume the initial event of the watch response, as\nthat returns the initial set of machines that are currently available." - }, - "WatchModelMachines": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsWatchResult" - } - }, - "description": "WatchModelMachines starts a watcher to track machines, but not containers.\nWatchModelMachines does not consume the initial event of the watch response, as\nthat returns the initial set of machines that are currently available." - } - }, - "definitions": { - "CharmLXDProfile": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "description": { - "type": "string" - }, - "devices": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - } - } - } - }, - "additionalProperties": false, - "required": [ - "config", - "description", - "devices" - ] - }, - "CharmProfilingInfoResult": { - "type": "object", - "properties": { - "current-profiles": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "instance-id": { - "type": "string" - }, - "model-name": { - "type": "string" - }, - "profile-changes": { - "type": "array", - "items": { - "$ref": "#/definitions/ProfileInfoResult" - } - } - }, - "additionalProperties": false, - "required": [ - "instance-id", - "model-name", - "profile-changes", - "current-profiles", - "error" - ] - }, - "ContainerTypeResult": { - "type": "object", - "properties": { - "container-type": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "container-type", - "error" - ] - }, - "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" - ] - }, - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "LifeResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "life": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "life" - ] - }, - "LifeResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/LifeResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "NotifyWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ProfileInfoResult": { - "type": "object", - "properties": { - "application-name": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "profile": { - "$ref": "#/definitions/CharmLXDProfile" - }, - "revision": { - "type": "integer" - } - }, - "additionalProperties": false - }, - "SetProfileArg": { - "type": "object", - "properties": { - "entity": { - "$ref": "#/definitions/Entity" - }, - "profiles": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "entity", - "profiles" - ] - }, - "SetProfileArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/SetProfileArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "SetStatus": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityStatusArgs" - } - } - }, - "additionalProperties": false, - "required": [ - "entities" - ] - }, - "StringsWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id" - ] - } - } - } - }, - { - "Name": "InstancePoller", - "Description": "InstancePollerAPI provides access to the InstancePoller API facade.", - "Version": 4, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "AreManuallyProvisioned": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/BoolResults" - } - }, - "description": "AreManuallyProvisioned returns whether each given entity is\nmanually provisioned or not. Only machine tags are accepted." - }, - "InstanceId": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringResults" - } - }, - "description": "InstanceId returns the provider specific instance id for each given\nmachine or an CodeNotProvisioned error, if not set." - }, - "InstanceStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StatusResults" - } - }, - "description": "InstanceStatus returns the instance status for each given entity.\nOnly machine tags are accepted." - }, - "Life": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/LifeResults" - } - }, - "description": "Life returns the life status of every supplied entity, where available." - }, - "ModelConfig": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ModelConfigResult" - } - }, - "description": "ModelConfig returns the current model's configuration." - }, - "ProviderAddresses": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/MachineAddressesResults" - } - }, - "description": "ProviderAddresses returns the list of all known provider addresses\nfor each given entity. Only machine tags are accepted." - }, - "SetInstanceStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetStatus" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetInstanceStatus updates the instance status for each given entity.\nOnly machine tags are accepted." - }, - "SetProviderAddresses": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetMachinesAddresses" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetProviderAddresses updates the list of known provider addresses\nfor each given entity. Only machine tags are accepted." - }, - "SetProviderNetworkConfig": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetProviderNetworkConfig" - }, - "Result": { - "$ref": "#/definitions/SetProviderNetworkConfigResults" - } - }, - "description": "SetProviderNetworkConfig updates the provider addresses for one or more\nmachines.\n\nWhat's more, if the client request includes provider-specific IDs (e.g.\nnetwork, subnet or address IDs), this method will also iterate any present\nlink layer devices (and their addresses) and merge in any missing\nprovider-specific information." - }, - "Status": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StatusResults" - } - }, - "description": "Status returns the status of each given entity." - }, - "WatchForModelConfigChanges": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResult" - } - }, - "description": "WatchForModelConfigChanges returns a NotifyWatcher that observes\nchanges to the model configuration.\nNote that although the NotifyWatchResult contains an Error field,\nit's not used because we are only returning a single watcher,\nso we use the regular error return." - }, - "WatchModelMachineStartTimes": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsWatchResult" - } - }, - "description": "WatchModelMachineStartTimes watches the non-container machines in the model\nfor changes to the Life or AgentStartTime fields and reports them as a batch." - }, - "WatchModelMachines": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsWatchResult" - } - }, - "description": "WatchModelMachines returns a StringsWatcher that notifies of\nchanges to the life cycles of the top level machines in the current\nmodel." - } - }, - "definitions": { - "Address": { - "type": "object", - "properties": { - "cidr": { - "type": "string" - }, - "config-type": { - "type": "string" - }, - "is-secondary": { - "type": "boolean" - }, - "scope": { - "type": "string" - }, - "space-id": { - "type": "string" - }, - "space-name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "value", - "type", - "scope" - ] - }, - "BoolResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "BoolResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/BoolResult" - } - } - }, - "additionalProperties": false, - "required": [ - "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" - ] - }, - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "LifeResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "life": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "life" - ] - }, - "LifeResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/LifeResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "MachineAddresses": { - "type": "object", - "properties": { - "addresses": { - "type": "array", - "items": { - "$ref": "#/definitions/Address" - } - }, - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "addresses" - ] - }, - "MachineAddressesResult": { - "type": "object", - "properties": { - "addresses": { - "type": "array", - "items": { - "$ref": "#/definitions/Address" - } - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "addresses" - ] - }, - "MachineAddressesResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/MachineAddressesResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ModelConfigResult": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "NetworkConfig": { - "type": "object", - "properties": { - "address": { - "type": "string" - }, - "addresses": { - "type": "array", - "items": { - "$ref": "#/definitions/Address" - } - }, - "cidr": { - "type": "string" - }, - "config-type": { - "type": "string" - }, - "device-index": { - "type": "integer" - }, - "disabled": { - "type": "boolean" - }, - "dns-search-domains": { - "type": "array", - "items": { - "type": "string" - } - }, - "dns-servers": { - "type": "array", - "items": { - "type": "string" - } - }, - "gateway-address": { - "type": "string" - }, - "interface-name": { - "type": "string" - }, - "interface-type": { - "type": "string" - }, - "is-default-gateway": { - "type": "boolean" - }, - "mac-address": { - "type": "string" - }, - "mtu": { - "type": "integer" - }, - "no-auto-start": { - "type": "boolean" - }, - "origin": { - "type": "string" - }, - "parent-interface-name": { - "type": "string" - }, - "provider-address-id": { - "type": "string" - }, - "provider-id": { - "type": "string" - }, - "provider-network-id": { - "type": "string" - }, - "provider-space-id": { - "type": "string" - }, - "provider-subnet-id": { - "type": "string" - }, - "provider-vlan-id": { - "type": "string" - }, - "routes": { - "type": "array", - "items": { - "$ref": "#/definitions/NetworkRoute" - } - }, - "shadow-addresses": { - "type": "array", - "items": { - "$ref": "#/definitions/Address" - } - }, - "virtual-port-type": { - "type": "string" - }, - "vlan-tag": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "device-index", - "mac-address", - "cidr", - "mtu", - "provider-id", - "provider-network-id", - "provider-subnet-id", - "provider-space-id", - "provider-address-id", - "provider-vlan-id", - "vlan-tag", - "interface-name", - "parent-interface-name", - "interface-type", - "disabled" - ] - }, - "NetworkRoute": { - "type": "object", - "properties": { - "destination-cidr": { - "type": "string" - }, - "gateway-ip": { - "type": "string" - }, - "metric": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "destination-cidr", - "gateway-ip", - "metric" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "ProviderNetworkConfig": { - "type": "object", - "properties": { - "config": { - "type": "array", - "items": { - "$ref": "#/definitions/NetworkConfig" - } - }, - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "config" - ] - }, - "SetMachinesAddresses": { - "type": "object", - "properties": { - "machine-addresses": { - "type": "array", - "items": { - "$ref": "#/definitions/MachineAddresses" - } - } - }, - "additionalProperties": false, - "required": [ - "machine-addresses" - ] - }, - "SetProviderNetworkConfig": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/ProviderNetworkConfig" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "SetProviderNetworkConfigResult": { - "type": "object", - "properties": { - "addresses": { - "type": "array", - "items": { - "$ref": "#/definitions/Address" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "modified": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "addresses", - "modified" - ] - }, - "SetProviderNetworkConfigResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/SetProviderNetworkConfigResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "SetStatus": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityStatusArgs" - } - } - }, - "additionalProperties": false, - "required": [ - "entities" - ] - }, - "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": [ - "id", - "life", - "status", - "info", - "data", - "since" - ] - }, - "StatusResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StatusResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "StringResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "StringResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "StringsWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id" - ] - } - } - } - }, - { - "Name": "KeyManager", - "Description": "KeyManagerAPI provides api endpoints for manipulating ssh keys", - "Version": 1, - "AvailableTo": [ - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "AddKeys": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ModifyUserSSHKeys" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "AddKeys adds new authorised ssh keys for the specified user." - }, - "DeleteKeys": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ModifyUserSSHKeys" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "DeleteKeys deletes the authorised ssh keys for the specified user." - }, - "ImportKeys": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ModifyUserSSHKeys" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "ImportKeys imports new authorised ssh keys from the specified key ids for the specified user." - }, - "ListKeys": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ListSSHKeys" - }, - "Result": { - "$ref": "#/definitions/StringsResults" - } - }, - "description": "ListKeys returns the authorised ssh keys for the specified users." - } - }, - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ListSSHKeys": { - "type": "object", - "properties": { - "entities": { - "$ref": "#/definitions/Entities" - }, - "mode": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "entities", - "mode" - ] - }, - "ModifyUserSSHKeys": { - "type": "object", - "properties": { - "ssh-keys": { - "type": "array", - "items": { - "type": "string" - } - }, - "user": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "user", - "ssh-keys" - ] - }, - "StringsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "StringsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringsResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - } - } - } - }, - { - "Name": "KeyUpdater", - "Description": "KeyUpdaterAPI implements the KeyUpdater interface and is the concrete\nimplementation of the api end point.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent" - ], - "Schema": { - "type": "object", - "properties": { - "AuthorisedKeys": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsResults" - } - }, - "description": "AuthorisedKeys reports the authorised ssh keys for the specified machines.\nThe current implementation relies on global authorised keys being stored in the model config.\nThis will change as new user management and authorisation functionality is added." - }, - "WatchAuthorisedKeys": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "WatchAuthorisedKeys starts a watcher to track changes to the authorised ssh keys\nfor the specified machines.\nThe current implementation relies on global authorised keys being stored in the model config.\nThis will change as new user management and authorisation functionality is added." - } - }, - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "NotifyWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "StringsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "StringsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringsResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - } - } - } - }, - { - "Name": "LeadershipService", - "Description": "LeadershipService implements a variant of leadership.Claimer for consumption\nover the API.", - "Version": 2, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "BlockUntilLeadershipReleased": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ApplicationTag" - }, - "Result": { - "$ref": "#/definitions/ErrorResult" - } - }, - "description": "BlockUntilLeadershipReleased blocks the caller until leadership is\nreleased for the given service." - }, - "ClaimLeadership": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ClaimLeadershipBulkParams" - }, - "Result": { - "$ref": "#/definitions/ClaimLeadershipBulkResults" - } - }, - "description": "ClaimLeadership makes a leadership claim with the given parameters." - } - }, - "definitions": { - "ApplicationTag": { - "type": "object", - "properties": { - "Name": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Name" - ] - }, - "ClaimLeadershipBulkParams": { - "type": "object", - "properties": { - "params": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimLeadershipParams" - } - } - }, - "additionalProperties": false, - "required": [ - "params" - ] - }, - "ClaimLeadershipBulkResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ClaimLeadershipParams": { - "type": "object", - "properties": { - "application-tag": { - "type": "string" - }, - "duration": { - "type": "number" - }, - "unit-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "application-tag", - "unit-tag", - "duration" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - } - } - } - }, - { - "Name": "LifeFlag", - "Description": "", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent" - ], - "Schema": { - "type": "object", - "properties": { - "Life": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/LifeResults" - } - }, - "description": "Life returns the life status of every supplied entity, where available." - }, - "Watch": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "Watch starts an NotifyWatcher for each given entity." - } - }, - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "LifeResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "life": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "life" - ] - }, - "LifeResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/LifeResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "NotifyWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - } - } - } - }, - { - "Name": "LogForwarding", - "Description": "LogForwardingAPI is the concrete implementation of the api end point.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent" - ], - "Schema": { - "type": "object", - "properties": { - "GetLastSent": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/LogForwardingGetLastSentParams" - }, - "Result": { - "$ref": "#/definitions/LogForwardingGetLastSentResults" - } - }, - "description": "GetLastSent is a bulk call that gets the log forwarding \"last sent\"\nrecord ID for each requested target." - }, - "SetLastSent": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/LogForwardingSetLastSentParams" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetLastSent is a bulk call that sets the log forwarding \"last sent\"\nrecord ID for each requested target." - } - }, - "definitions": { - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "LogForwardingGetLastSentParams": { - "type": "object", - "properties": { - "ids": { - "type": "array", - "items": { - "$ref": "#/definitions/LogForwardingID" - } - } - }, - "additionalProperties": false, - "required": [ - "ids" - ] - }, - "LogForwardingGetLastSentResult": { - "type": "object", - "properties": { - "err": { - "$ref": "#/definitions/Error" - }, - "record-id": { - "type": "integer" - }, - "record-timestamp": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "record-id", - "record-timestamp", - "err" - ] - }, - "LogForwardingGetLastSentResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/LogForwardingGetLastSentResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "LogForwardingID": { - "type": "object", - "properties": { - "model": { - "type": "string" - }, - "sink": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "model", - "sink" - ] - }, - "LogForwardingSetLastSentParam": { - "type": "object", - "properties": { - "LogForwardingID": { - "$ref": "#/definitions/LogForwardingID" - }, - "model": { - "type": "string" - }, - "record-id": { - "type": "integer" - }, - "record-timestamp": { - "type": "integer" - }, - "sink": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "model", - "sink", - "LogForwardingID", - "record-id", - "record-timestamp" - ] - }, - "LogForwardingSetLastSentParams": { - "type": "object", - "properties": { - "params": { - "type": "array", - "items": { - "$ref": "#/definitions/LogForwardingSetLastSentParam" - } - } - }, - "additionalProperties": false, - "required": [ - "params" - ] - } - } - } - }, - { - "Name": "Logger", - "Description": "LoggerAPI implements the Logger interface and is the concrete\nimplementation of the api end point.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "LoggingConfig": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringResults" - } - }, - "description": "LoggingConfig reports the logging configuration for the agents specified." - }, - "WatchLoggingConfig": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "WatchLoggingConfig starts a watcher to track changes to the logging config\nfor the agents specified.. Unfortunately the current infrastructure makes\nwatching parts of the config non-trivial, so currently any change to the\nconfig will cause the watcher to notify the client." - } - }, - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "NotifyWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "StringResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "StringResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - } - } - } - }, - { - "Name": "MachineActions", - "Description": "Facade implements the machineactions interface and is the concrete\nimplementation of the api end point.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent" - ], - "Schema": { - "type": "object", - "properties": { - "Actions": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ActionResults" - } - }, - "description": "Actions returns the Actions by Tags passed and ensures that the machine asking\nfor them is the machine that has the actions" - }, - "BeginActions": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "BeginActions marks the actions represented by the passed in Tags as running." - }, - "FinishActions": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ActionExecutionResults" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "FinishActions saves the result of a completed Action" - }, - "RunningActions": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ActionsByReceivers" - } - }, - "description": "RunningActions lists the actions running for the entities passed in.\nIf we end up needing more than ListRunning at some point we could follow/abstract\nwhat's done in the client actions package." - }, - "WatchActionNotifications": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - }, - "description": "WatchActionNotifications returns a StringsWatcher for observing\nincoming action calls to a machine." - } - }, - "definitions": { - "Action": { - "type": "object", - "properties": { - "execution-group": { - "type": "string" - }, - "name": { - "type": "string" - }, - "parallel": { - "type": "boolean" - }, - "parameters": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "receiver": { - "type": "string" - }, - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "receiver", - "name" - ] - }, - "ActionExecutionResult": { - "type": "object", - "properties": { - "action-tag": { - "type": "string" - }, - "message": { - "type": "string" - }, - "results": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "status": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "action-tag", - "status" - ] - }, - "ActionExecutionResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ActionExecutionResult" - } - } - }, - "additionalProperties": false - }, - "ActionMessage": { - "type": "object", - "properties": { - "message": { - "type": "string" - }, - "timestamp": { - "type": "string", - "format": "date-time" - } - }, - "additionalProperties": false, - "required": [ - "timestamp", - "message" - ] - }, - "ActionResult": { - "type": "object", - "properties": { - "action": { - "$ref": "#/definitions/Action" - }, - "completed": { - "type": "string", - "format": "date-time" - }, - "enqueued": { - "type": "string", - "format": "date-time" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "log": { - "type": "array", - "items": { - "$ref": "#/definitions/ActionMessage" - } - }, - "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": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "StringsWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id" - ] - }, - "StringsWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringsWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - } - } - } - }, - { - "Name": "MachineManager", - "Description": "MachineManagerAPI provides access to the MachineManager API facade.", - "Version": 10, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "AddMachines": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/AddMachines" - }, - "Result": { - "$ref": "#/definitions/AddMachinesResults" - } - }, - "description": "AddMachines adds new machines with the supplied parameters.\nThe args will contain Base info." - }, - "DestroyMachineWithParams": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/DestroyMachinesParams" - }, - "Result": { - "$ref": "#/definitions/DestroyMachineResults" - } - }, - "description": "DestroyMachineWithParams removes a set of machines from the model." - }, - "GetUpgradeSeriesMessages": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/UpgradeSeriesNotificationParams" - }, - "Result": { - "$ref": "#/definitions/StringsResults" - } - }, - "description": "GetUpgradeSeriesMessages returns all new messages associated with upgrade\nseries events. Messages that have already been retrieved once are not\nreturned by this method." - }, - "InstanceTypes": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ModelInstanceTypesConstraints" - }, - "Result": { - "$ref": "#/definitions/InstanceTypesResults" - } - }, - "description": "InstanceTypes returns instance type information for the cloud and region\nin which the current model is deployed." - }, - "ProvisioningScript": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ProvisioningScriptParams" - }, - "Result": { - "$ref": "#/definitions/ProvisioningScriptResult" - } - }, - "description": "ProvisioningScript returns a shell script that, when run,\nprovisions a machine agent on the machine executing the script." - }, - "RetryProvisioning": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RetryProvisioningArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "RetryProvisioning marks a provisioning error as transient on the machines." - }, - "UpgradeSeriesComplete": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/UpdateChannelArg" - }, - "Result": { - "$ref": "#/definitions/ErrorResult" - } - }, - "description": "UpgradeSeriesComplete marks a machine as having completed a managed series\nupgrade." - }, - "UpgradeSeriesPrepare": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/UpdateChannelArg" - }, - "Result": { - "$ref": "#/definitions/ErrorResult" - } - }, - "description": "UpgradeSeriesPrepare prepares a machine for a OS series upgrade." - }, - "UpgradeSeriesValidate": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/UpdateChannelArgs" - }, - "Result": { - "$ref": "#/definitions/UpgradeSeriesUnitsResults" - } - }, - "description": "UpgradeSeriesValidate validates that the incoming arguments correspond to a\nvalid series upgrade for the target machine.\nIf they do, a list of the machine's current units is returned for use in\nsoliciting user confirmation of the command." - }, - "WatchUpgradeSeriesNotifications": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "WatchUpgradeSeriesNotifications returns a watcher that fires on upgrade\nseries events." - } - }, - "definitions": { - "AddMachineParams": { - "type": "object", - "properties": { - "addresses": { - "type": "array", - "items": { - "$ref": "#/definitions/Address" - } - }, - "base": { - "$ref": "#/definitions/Base" - }, - "constraints": { - "$ref": "#/definitions/Value" - }, - "container-type": { - "type": "string" - }, - "disks": { - "type": "array", - "items": { - "$ref": "#/definitions/Constraints" - } - }, - "hardware-characteristics": { - "$ref": "#/definitions/HardwareCharacteristics" - }, - "instance-id": { - "type": "string" - }, - "jobs": { - "type": "array", - "items": { - "type": "string" - } - }, - "nonce": { - "type": "string" - }, - "parent-id": { - "type": "string" - }, - "placement": { - "$ref": "#/definitions/Placement" - } - }, - "additionalProperties": false, - "required": [ - "constraints", - "jobs", - "parent-id", - "container-type", - "instance-id", - "nonce", - "hardware-characteristics", - "addresses" - ] - }, - "AddMachines": { - "type": "object", - "properties": { - "params": { - "type": "array", - "items": { - "$ref": "#/definitions/AddMachineParams" - } - } - }, - "additionalProperties": false, - "required": [ - "params" - ] - }, - "AddMachinesResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "machine": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "machine" - ] - }, - "AddMachinesResults": { - "type": "object", - "properties": { - "machines": { - "type": "array", - "items": { - "$ref": "#/definitions/AddMachinesResult" - } - } - }, - "additionalProperties": false, - "required": [ - "machines" - ] - }, - "Address": { - "type": "object", - "properties": { - "cidr": { - "type": "string" - }, - "config-type": { - "type": "string" - }, - "is-secondary": { - "type": "boolean" - }, - "scope": { - "type": "string" - }, - "space-id": { - "type": "string" - }, - "space-name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "value", - "type", - "scope" - ] - }, - "Base": { - "type": "object", - "properties": { - "channel": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "channel" - ] - }, - "Constraints": { - "type": "object", - "properties": { - "Count": { - "type": "integer" - }, - "Pool": { - "type": "string" - }, - "Size": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "Pool", - "Size", - "Count" - ] - }, - "DestroyMachineInfo": { - "type": "object", - "properties": { - "destroyed-containers": { - "type": "array", - "items": { - "$ref": "#/definitions/DestroyMachineResult" - } - }, - "destroyed-storage": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } - }, - "destroyed-units": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } - }, - "detached-storage": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } - }, - "machine-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "machine-id" - ] - }, - "DestroyMachineResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "info": { - "$ref": "#/definitions/DestroyMachineInfo" - } - }, - "additionalProperties": false - }, - "DestroyMachineResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/DestroyMachineResult" - } - } - }, - "additionalProperties": false - }, - "DestroyMachinesParams": { - "type": "object", - "properties": { - "dry-run": { - "type": "boolean" - }, - "force": { - "type": "boolean" - }, - "keep": { - "type": "boolean" - }, - "machine-tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "max-wait": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "machine-tags" - ] - }, - "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": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "HardwareCharacteristics": { - "type": "object", - "properties": { - "arch": { - "type": "string" - }, - "availability-zone": { - "type": "string" - }, - "cpu-cores": { - "type": "integer" - }, - "cpu-power": { - "type": "integer" - }, - "mem": { - "type": "integer" - }, - "root-disk": { - "type": "integer" - }, - "root-disk-source": { - "type": "string" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "virt-type": { - "type": "string" - } - }, - "additionalProperties": false - }, - "InstanceType": { - "type": "object", - "properties": { - "arches": { - "type": "array", - "items": { - "type": "string" - } - }, - "cost": { - "type": "integer" - }, - "cpu-cores": { - "type": "integer" - }, - "deprecated": { - "type": "boolean" - }, - "memory": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "root-disk": { - "type": "integer" - }, - "virt-type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "arches", - "cpu-cores", - "memory" - ] - }, - "InstanceTypesResult": { - "type": "object", - "properties": { - "cost-currency": { - "type": "string" - }, - "cost-divisor": { - "type": "integer" - }, - "cost-unit": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "instance-types": { - "type": "array", - "items": { - "$ref": "#/definitions/InstanceType" - } - } - }, - "additionalProperties": false - }, - "InstanceTypesResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/InstanceTypesResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ModelInstanceTypesConstraint": { - "type": "object", - "properties": { - "value": { - "$ref": "#/definitions/Value" - } - }, - "additionalProperties": false - }, - "ModelInstanceTypesConstraints": { - "type": "object", - "properties": { - "constraints": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelInstanceTypesConstraint" - } - } - }, - "additionalProperties": false, - "required": [ - "constraints" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "NotifyWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "Placement": { - "type": "object", - "properties": { - "directive": { - "type": "string" - }, - "scope": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "scope", - "directive" - ] - }, - "ProvisioningScriptParams": { - "type": "object", - "properties": { - "data-dir": { - "type": "string" - }, - "disable-package-commands": { - "type": "boolean" - }, - "machine-id": { - "type": "string" - }, - "nonce": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "machine-id", - "nonce", - "data-dir", - "disable-package-commands" - ] - }, - "ProvisioningScriptResult": { - "type": "object", - "properties": { - "script": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "script" - ] - }, - "RetryProvisioningArgs": { - "type": "object", - "properties": { - "all": { - "type": "boolean" - }, - "machines": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "all" - ] - }, - "StringsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "StringsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringsResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "UpdateChannelArg": { - "type": "object", - "properties": { - "channel": { - "type": "string" - }, - "force": { - "type": "boolean" - }, - "tag": { - "$ref": "#/definitions/Entity" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "force", - "channel" - ] - }, - "UpdateChannelArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/UpdateChannelArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "UpgradeSeriesNotificationParam": { - "type": "object", - "properties": { - "entity": { - "$ref": "#/definitions/Entity" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "entity", - "watcher-id" - ] - }, - "UpgradeSeriesNotificationParams": { - "type": "object", - "properties": { - "params": { - "type": "array", - "items": { - "$ref": "#/definitions/UpgradeSeriesNotificationParam" - } - } - }, - "additionalProperties": false, - "required": [ - "params" - ] - }, - "UpgradeSeriesUnitsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "unit-names": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "unit-names" - ] - }, - "UpgradeSeriesUnitsResults": { - "type": "object", - "properties": { - "Results": { - "type": "array", - "items": { - "$ref": "#/definitions/UpgradeSeriesUnitsResult" - } - } - }, - "additionalProperties": false, - "required": [ - "Results" - ] - }, - "Value": { - "type": "object", - "properties": { - "allocate-public-ip": { - "type": "boolean" - }, - "arch": { - "type": "string" - }, - "container": { - "type": "string" - }, - "cores": { - "type": "integer" - }, - "cpu-power": { - "type": "integer" - }, - "instance-role": { - "type": "string" - }, - "instance-type": { - "type": "string" - }, - "mem": { - "type": "integer" - }, - "root-disk": { - "type": "integer" - }, - "root-disk-source": { - "type": "string" - }, - "spaces": { - "type": "array", - "items": { - "type": "string" - } - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "virt-type": { - "type": "string" - }, - "zones": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - } - } - } - }, - { - "Name": "MachineUndertaker", - "Description": "API implements the API facade used by the machine undertaker.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent" - ], - "Schema": { - "type": "object", - "properties": { - "AllMachineRemovals": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/EntitiesResults" - } - }, - "description": "AllMachineRemovals returns tags for all of the machines that have\nbeen marked for removal in the requested model." - }, - "CompleteMachineRemovals": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - } - }, - "description": "CompleteMachineRemovals removes the specified machines from the\nmodel database. It should only be called once any provider-level\ncleanup has been done for those machines." - }, - "GetMachineProviderInterfaceInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ProviderInterfaceInfoResults" - } - }, - "description": "GetMachineProviderInterfaceInfo returns the provider details for\nall network interfaces attached to the machines requested." - }, - "WatchMachineRemovals": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "WatchMachineRemovals returns a watcher that will signal each time a\nmachine is marked for removal." - } - }, - "definitions": { - "Entities": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } - } - }, - "additionalProperties": false, - "required": [ - "entities" - ] - }, - "EntitiesResult": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "entities" - ] - }, - "EntitiesResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/EntitiesResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "Entity": { - "type": "object", - "properties": { - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "NotifyWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ProviderInterfaceInfo": { - "type": "object", - "properties": { - "interface-name": { - "type": "string" - }, - "mac-address": { - "type": "string" - }, - "provider-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "interface-name", - "mac-address", - "provider-id" - ] - }, - "ProviderInterfaceInfoResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "interfaces": { - "type": "array", - "items": { - "$ref": "#/definitions/ProviderInterfaceInfo" - } - }, - "machine-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "machine-tag", - "interfaces" - ] - }, - "ProviderInterfaceInfoResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ProviderInterfaceInfoResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - } - } - } - }, - { - "Name": "Machiner", - "Description": "MachinerAPI implements the API used by the machiner worker.", - "Version": 5, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "APIAddresses": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsResult" - } - }, - "description": "APIAddresses returns the list of addresses used to connect to the API." - }, - "APIHostPorts": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/APIHostPortsResult" - } - }, - "description": "APIHostPorts returns the API server addresses." - }, - "EnsureDead": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "EnsureDead calls EnsureDead on each given entity from state. It\nwill fail if the entity is not present. If it's Alive, nothing will\nhappen (see state/EnsureDead() for units or machines)." - }, - "Jobs": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/JobsResults" - } - }, - "description": "Jobs returns the jobs assigned to the given entities." - }, - "Life": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/LifeResults" - } - }, - "description": "Life returns the life status of every supplied entity, where available." - }, - "RecordAgentStartInformation": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RecordAgentStartInformationArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "RecordAgentStartInformation syncs the machine model with information\nreported by a machine agent when it starts." - }, - "RecordAgentStartTime": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "RecordAgentStartTime updates the agent start time field in the machine doc." - }, - "SetMachineAddresses": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetMachinesAddresses" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - } - }, - "SetObservedNetworkConfig": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetMachineNetworkConfig" - } - }, - "description": "SetObservedNetworkConfig reads the network config for the machine\nidentified by the input args.\nThis config is merged with the new network config supplied in the\nsame args and updated if it has changed." - }, - "SetStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetStatus" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetStatus sets the status of each given entity." - }, - "Watch": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "Watch starts an NotifyWatcher for each given entity." - }, - "WatchAPIHostPorts": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResult" - } - }, - "description": "WatchAPIHostPorts watches the API server addresses." - } - }, - "definitions": { - "APIHostPortsResult": { - "type": "object", - "properties": { - "servers": { - "type": "array", - "items": { - "type": "array", - "items": { - "$ref": "#/definitions/HostPort" - } - } - } - }, - "additionalProperties": false, - "required": [ - "servers" - ] - }, - "Address": { - "type": "object", - "properties": { - "cidr": { - "type": "string" - }, - "config-type": { - "type": "string" - }, - "is-secondary": { - "type": "boolean" - }, - "scope": { - "type": "string" - }, - "space-id": { - "type": "string" - }, - "space-name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "value", - "type", - "scope" - ] - }, - "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" - ] - }, - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "HostPort": { - "type": "object", - "properties": { - "Address": { - "$ref": "#/definitions/Address" - }, - "cidr": { - "type": "string" - }, - "config-type": { - "type": "string" - }, - "is-secondary": { - "type": "boolean" - }, - "port": { - "type": "integer" - }, - "scope": { - "type": "string" - }, - "space-id": { - "type": "string" - }, - "space-name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "value", - "type", - "scope", - "Address", - "port" - ] - }, - "JobsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "jobs": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "jobs" - ] - }, - "JobsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/JobsResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "LifeResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "life": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "life" - ] - }, - "LifeResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/LifeResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "MachineAddresses": { - "type": "object", - "properties": { - "addresses": { - "type": "array", - "items": { - "$ref": "#/definitions/Address" - } - }, - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "addresses" - ] - }, - "NetworkConfig": { - "type": "object", - "properties": { - "address": { - "type": "string" - }, - "addresses": { - "type": "array", - "items": { - "$ref": "#/definitions/Address" - } - }, - "cidr": { - "type": "string" - }, - "config-type": { - "type": "string" - }, - "device-index": { - "type": "integer" - }, - "disabled": { - "type": "boolean" - }, - "dns-search-domains": { - "type": "array", - "items": { - "type": "string" - } - }, - "dns-servers": { - "type": "array", - "items": { - "type": "string" - } - }, - "gateway-address": { - "type": "string" - }, - "interface-name": { - "type": "string" - }, - "interface-type": { - "type": "string" - }, - "is-default-gateway": { - "type": "boolean" - }, - "mac-address": { - "type": "string" - }, - "mtu": { - "type": "integer" - }, - "no-auto-start": { - "type": "boolean" - }, - "origin": { - "type": "string" - }, - "parent-interface-name": { - "type": "string" - }, - "provider-address-id": { - "type": "string" - }, - "provider-id": { - "type": "string" - }, - "provider-network-id": { - "type": "string" - }, - "provider-space-id": { - "type": "string" - }, - "provider-subnet-id": { - "type": "string" - }, - "provider-vlan-id": { - "type": "string" - }, - "routes": { - "type": "array", - "items": { - "$ref": "#/definitions/NetworkRoute" - } - }, - "shadow-addresses": { - "type": "array", - "items": { - "$ref": "#/definitions/Address" - } - }, - "virtual-port-type": { - "type": "string" - }, - "vlan-tag": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "device-index", - "mac-address", - "cidr", - "mtu", - "provider-id", - "provider-network-id", - "provider-subnet-id", - "provider-space-id", - "provider-address-id", - "provider-vlan-id", - "vlan-tag", - "interface-name", - "parent-interface-name", - "interface-type", - "disabled" - ] - }, - "NetworkRoute": { - "type": "object", - "properties": { - "destination-cidr": { - "type": "string" - }, - "gateway-ip": { - "type": "string" - }, - "metric": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "destination-cidr", - "gateway-ip", - "metric" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "NotifyWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "RecordAgentStartInformationArg": { - "type": "object", - "properties": { - "hostname": { - "type": "string" - }, - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag" - ] - }, - "RecordAgentStartInformationArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/RecordAgentStartInformationArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "SetMachineNetworkConfig": { - "type": "object", - "properties": { - "config": { - "type": "array", - "items": { - "$ref": "#/definitions/NetworkConfig" - } - }, - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "config" - ] - }, - "SetMachinesAddresses": { - "type": "object", - "properties": { - "machine-addresses": { - "type": "array", - "items": { - "$ref": "#/definitions/MachineAddresses" - } - } - }, - "additionalProperties": false, - "required": [ - "machine-addresses" - ] - }, - "SetStatus": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityStatusArgs" - } - } - }, - "additionalProperties": false, - "required": [ - "entities" - ] - }, - "StringsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - } - } - } - }, - { - "Name": "MeterStatus", - "Description": "MeterStatusAPI implements the MeterStatus interface and is the concrete\nimplementation of the API endpoint. Additionally, it embeds\ncommon.UnitStateAPI to allow meter status workers to access their\ncontroller-backed internal state.", - "Version": 2, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "GetMeterStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/MeterStatusResults" - } - }, - "description": "GetMeterStatus returns meter status information for each unit." - }, - "SetState": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetUnitStateArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetState sets the state persisted by the charm running in this unit\nand the state internal to the uniter for this unit." - }, - "State": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/UnitStateResults" - } - }, - "description": "State returns the state persisted by the charm running in this unit\nand the state internal to the uniter for this unit." - }, - "WatchMeterStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "WatchMeterStatus returns a NotifyWatcher for observing changes\nto each unit's meter status." - } - }, - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "MeterStatusResult": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "info": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "code", - "info" - ] - }, - "MeterStatusResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/MeterStatusResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "NotifyWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "SetUnitStateArg": { - "type": "object", - "properties": { - "charm-state": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "meter-status-state": { - "type": "string" - }, - "relation-state": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "secret-state": { - "type": "string" - }, - "storage-state": { - "type": "string" - }, - "tag": { - "type": "string" - }, - "uniter-state": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag" - ] - }, - "SetUnitStateArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/SetUnitStateArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "UnitStateResult": { - "type": "object", - "properties": { - "charm-state": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "meter-status-state": { - "type": "string" - }, - "relation-state": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "secret-state": { - "type": "string" - }, - "storage-state": { - "type": "string" - }, - "uniter-state": { - "type": "string" - } - }, - "additionalProperties": false - }, - "UnitStateResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/UnitStateResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - } - } - } - }, - { - "Name": "MetricsAdder", - "Description": "MetricsAdderAPI implements the metrics adder interface and is the concrete\nimplementation of the API end point.", - "Version": 2, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent" - ], - "Schema": { - "type": "object", - "properties": { - "AddMetricBatches": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/MetricBatchParams" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "AddMetricBatches implements the MetricsAdder interface." - } - }, - "definitions": { - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "Metric": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "labels": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "time": { - "type": "string", - "format": "date-time" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "key", - "value", - "time" - ] - }, - "MetricBatch": { - "type": "object", - "properties": { - "charm-url": { - "type": "string" - }, - "created": { - "type": "string", - "format": "date-time" - }, - "metrics": { - "type": "array", - "items": { - "$ref": "#/definitions/Metric" - } - }, - "uuid": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "uuid", - "charm-url", - "created", - "metrics" - ] - }, - "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" - ] - } - } - } - }, - { - "Name": "MetricsDebug", - "Description": "MetricsDebugAPI implements the metricsdebug interface and is the concrete\nimplementation of the api end point.", - "Version": 2, - "AvailableTo": [ - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "GetMetrics": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/MetricResults" - } - }, - "description": "GetMetrics returns all metrics stored by the state server." - }, - "SetMeterStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/MeterStatusParams" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetMeterStatus sets meter statuses for entities." - } - }, - "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" - ] - }, - "EntityMetrics": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "metrics": { - "type": "array", - "items": { - "$ref": "#/definitions/MetricResult" - } - } - }, - "additionalProperties": false - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "MeterStatusParam": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "string" - }, - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "code" - ] - }, - "MeterStatusParams": { - "type": "object", - "properties": { - "statues": { - "type": "array", - "items": { - "$ref": "#/definitions/MeterStatusParam" - } - } - }, - "additionalProperties": false, - "required": [ - "statues" - ] - }, - "MetricResult": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "labels": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "time": { - "type": "string", - "format": "date-time" - }, - "unit": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "time", - "key", - "value", - "unit", - "labels" - ] - }, - "MetricResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityMetrics" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - } - } - } - }, - { - "Name": "MetricsManager", - "Description": "MetricsManagerAPI implements the metrics manager interface and is the concrete\nimplementation of the api end point.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent" - ], - "Schema": { - "type": "object", - "properties": { - "AddJujuMachineMetrics": { - "type": "object", - "description": "AddJujuMachineMetrics adds a metric that counts the number of\nnon-container machines in the current model." - }, - "CleanupOldMetrics": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "CleanupOldMetrics removes old metrics from the collection.\nThe single arg params is expected to contain and model uuid.\nEven though the call will delete all metrics across models\nit serves to validate that the connection has access to at least one model." - }, - "SendMetrics": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SendMetrics will send any unsent metrics onto the metric collection service." - } - }, - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - } - } - } - }, - { - "Name": "MigrationFlag", - "Description": "Facade lets clients watch and get models' migration phases.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "Phase": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/PhaseResults" - } - }, - "description": "Phase returns the current migration phase or an error for every\nsupplied entity." - }, - "Watch": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "Watch returns an id for use with the NotifyWatcher facade, or an\nerror, for every supplied entity." - } - }, - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "NotifyWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "PhaseResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "phase": { - "type": "string" - } - }, - "additionalProperties": false - }, - "PhaseResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/PhaseResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - } - } - } - }, - { - "Name": "MigrationMaster", - "Description": "API implements the API required for the model migration\nmaster worker.", - "Version": 3, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "Export": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/SerializedModel" - } - }, - "description": "Export serializes the model associated with the API connection." - }, - "MigrationStatus": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/MasterMigrationStatus" - } - }, - "description": "MigrationStatus returns the details and progress of the latest\nmodel migration." - }, - "MinionReportTimeout": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringResult" - } - }, - "description": "MinionReportTimeout returns the configuration value for this controller that\nindicates how long the migration master worker should wait for minions to\nreported on phases of a migration." - }, - "MinionReports": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/MinionReports" - } - }, - "description": "MinionReports returns details of the reports made by migration\nminions to the controller for the current migration phase." - }, - "ModelInfo": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/MigrationModelInfo" - } - }, - "description": "ModelInfo returns essential information about the model to be\nmigrated." - }, - "Prechecks": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/PrechecksArgs" - } - }, - "description": "Prechecks performs pre-migration checks on the model and\n(source) controller." - }, - "ProcessRelations": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ProcessRelations" - } - }, - "description": "ProcessRelations processes any relations that need updating after an export.\nThis should help fix any remoteApplications that have been migrated." - }, - "Reap": { - "type": "object", - "description": "Reap removes all documents for the model associated with the API\nconnection." - }, - "SetPhase": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetMigrationPhaseArgs" - } - }, - "description": "SetPhase sets the phase of the active model migration. The provided\nphase must be a valid phase value, for example QUIESCE\" or\n\"ABORT\". See the core/migration package for the complete list." - }, - "SetStatusMessage": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetMigrationStatusMessageArgs" - } - }, - "description": "SetStatusMessage sets a human readable status message containing\ninformation about the migration's progress. This will be shown in\nstatus output shown to the end user." - }, - "SourceControllerInfo": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/MigrationSourceInfo" - } - }, - "description": "SourceControllerInfo returns the details required to connect to\nthe source controller for model migration." - }, - "Watch": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResult" - } - }, - "description": "Watch starts watching for an active migration for the model\nassociated with the API connection. The returned id should be used\nwith the NotifyWatcher facade to receive events." - }, - "WatchMinionReports": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResult" - } - }, - "description": "WatchMinionReports sets up a watcher which reports when a report\nfor a migration minion has arrived." - } - }, - "definitions": { - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "MasterMigrationStatus": { - "type": "object", - "properties": { - "migration-id": { - "type": "string" - }, - "phase": { - "type": "string" - }, - "phase-changed-time": { - "type": "string", - "format": "date-time" - }, - "spec": { - "$ref": "#/definitions/MigrationSpec" - } - }, - "additionalProperties": false, - "required": [ - "spec", - "migration-id", - "phase", - "phase-changed-time" - ] - }, - "MigrationModelInfo": { - "type": "object", - "properties": { - "agent-version": { - "$ref": "#/definitions/Number" - }, - "controller-agent-version": { - "$ref": "#/definitions/Number" - }, - "name": { - "type": "string" - }, - "owner-tag": { - "type": "string" - }, - "uuid": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "uuid", - "name", - "owner-tag", - "agent-version", - "controller-agent-version" - ] - }, - "MigrationSourceInfo": { - "type": "object", - "properties": { - "addrs": { - "type": "array", - "items": { - "type": "string" - } - }, - "ca-cert": { - "type": "string" - }, - "controller-alias": { - "type": "string" - }, - "controller-tag": { - "type": "string" - }, - "local-related-models": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "local-related-models", - "controller-tag", - "addrs", - "ca-cert" - ] - }, - "MigrationSpec": { - "type": "object", - "properties": { - "model-tag": { - "type": "string" - }, - "target-info": { - "$ref": "#/definitions/MigrationTargetInfo" - } - }, - "additionalProperties": false, - "required": [ - "model-tag", - "target-info" - ] - }, - "MigrationTargetInfo": { - "type": "object", - "properties": { - "addrs": { - "type": "array", - "items": { - "type": "string" - } - }, - "auth-tag": { - "type": "string" - }, - "ca-cert": { - "type": "string" - }, - "controller-alias": { - "type": "string" - }, - "controller-tag": { - "type": "string" - }, - "macaroons": { - "type": "string" - }, - "password": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "controller-tag", - "addrs", - "ca-cert", - "auth-tag" - ] - }, - "MinionReports": { - "type": "object", - "properties": { - "failed": { - "type": "array", - "items": { - "type": "string" - } - }, - "migration-id": { - "type": "string" - }, - "phase": { - "type": "string" - }, - "success-count": { - "type": "integer" - }, - "unknown-count": { - "type": "integer" - }, - "unknown-sample": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "migration-id", - "phase", - "success-count", - "unknown-count", - "unknown-sample", - "failed" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "Number": { - "type": "object", - "properties": { - "Build": { - "type": "integer" - }, - "Major": { - "type": "integer" - }, - "Minor": { - "type": "integer" - }, - "Patch": { - "type": "integer" - }, - "Tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Major", - "Minor", - "Tag", - "Patch", - "Build" - ] - }, - "PrechecksArgs": { - "type": "object", - "properties": { - "target-controller-version": { - "$ref": "#/definitions/Number" - } - }, - "additionalProperties": false, - "required": [ - "target-controller-version" - ] - }, - "ProcessRelations": { - "type": "object", - "properties": { - "controller-alias": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "controller-alias" - ] - }, - "SerializedModel": { - "type": "object", - "properties": { - "bytes": { - "type": "array", - "items": { - "type": "integer" - } - }, - "charms": { - "type": "array", - "items": { - "type": "string" - } - }, - "resources": { - "type": "array", - "items": { - "$ref": "#/definitions/SerializedModelResource" - } - }, - "tools": { - "type": "array", - "items": { - "$ref": "#/definitions/SerializedModelTools" - } - } - }, - "additionalProperties": false, - "required": [ - "bytes", - "charms", - "tools", - "resources" - ] - }, - "SerializedModelResource": { - "type": "object", - "properties": { - "application": { - "type": "string" - }, - "application-revision": { - "$ref": "#/definitions/SerializedModelResourceRevision" - }, - "charmstore-revision": { - "$ref": "#/definitions/SerializedModelResourceRevision" - }, - "name": { - "type": "string" - }, - "unit-revisions": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/SerializedModelResourceRevision" - } - } - } - }, - "additionalProperties": false, - "required": [ - "application", - "name", - "application-revision", - "charmstore-revision", - "unit-revisions" - ] - }, - "SerializedModelResourceRevision": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "fingerprint": { - "type": "string" - }, - "origin": { - "type": "string" - }, - "path": { - "type": "string" - }, - "revision": { - "type": "integer" - }, - "size": { - "type": "integer" - }, - "timestamp": { - "type": "string", - "format": "date-time" - }, - "type": { - "type": "string" - }, - "username": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "revision", - "type", - "path", - "description", - "origin", - "fingerprint", - "size", - "timestamp" - ] - }, - "SerializedModelTools": { - "type": "object", - "properties": { - "uri": { - "type": "string" - }, - "version": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "version", - "uri" - ] - }, - "SetMigrationPhaseArgs": { - "type": "object", - "properties": { - "phase": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "phase" - ] - }, - "SetMigrationStatusMessageArgs": { - "type": "object", - "properties": { - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message" - ] - }, - "StringResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - } - } - } - }, - { - "Name": "MigrationMinion", - "Description": "API implements the API required for the model migration\nmaster worker.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "Report": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/MinionReport" - } - }, - "description": "Report allows a migration minion to submit whether it succeeded or\nfailed for a specific migration phase." - }, - "Watch": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResult" - } - }, - "description": "Watch starts watching for status updates for a migration attempt\nfor the model. It will report when a migration starts and when its\nstatus changes (including when it finishes). An initial event will\nbe fired if there has ever been a migration attempt for the model.\n\nThe MigrationStatusWatcher facade must be used to receive events\nfrom the watcher." - } - }, - "definitions": { - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "MinionReport": { - "type": "object", - "properties": { - "migration-id": { - "type": "string" - }, - "phase": { - "type": "string" - }, - "success": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "migration-id", - "phase", - "success" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - } - } - } - }, - { - "Name": "MigrationStatusWatcher", - "Description": "", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "Next": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/MigrationStatus" - } - }, - "description": "Next returns when the status for a model migration for the\nassociated model changes. The current details for the active\nmigration are returned." - }, - "Stop": { - "type": "object", - "description": "Stop stops the watcher." - } - }, - "definitions": { - "MigrationStatus": { - "type": "object", - "properties": { - "attempt": { - "type": "integer" - }, - "migration-id": { - "type": "string" - }, - "phase": { - "type": "string" - }, - "source-api-addrs": { - "type": "array", - "items": { - "type": "string" - } - }, - "source-ca-cert": { - "type": "string" - }, - "target-api-addrs": { - "type": "array", - "items": { - "type": "string" - } - }, - "target-ca-cert": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "migration-id", - "attempt", - "phase", - "source-api-addrs", - "source-ca-cert", - "target-api-addrs", - "target-ca-cert" - ] - } - } - } - }, - { - "Name": "MigrationTarget", - "Description": "API implements the API required for the model migration\nmaster worker when communicating with the target controller.", - "Version": 2, - "AvailableTo": [ - "controller-user" - ], - "Schema": { - "type": "object", - "properties": { - "Abort": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ModelArgs" - } - }, - "description": "Abort removes the specified model from the database. It is an error to\nattempt to Abort a model that has a migration mode other than importing." - }, - "Activate": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ActivateModelArgs" - } - }, - "description": "Activate sets the migration mode of the model to \"none\", meaning it\nis ready for use. It is an error to attempt to Abort a model that\nhas a migration mode other than importing. It also adds any required\nexternal controller records for those controllers hosting offers used\nby the model." - }, - "AdoptResources": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/AdoptResourcesArgs" - } - }, - "description": "AdoptResources asks the cloud provider to update the controller\ntags for a model's resources. This prevents the resources from\nbeing destroyed if the source controller is destroyed after the\nmodel is migrated away." - }, - "CACert": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/BytesResult" - } - }, - "description": "CACert returns the certificate used to validate the state connection." - }, - "CheckMachines": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ModelArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "CheckMachines compares the machines in state with the ones reported\nby the provider and reports any discrepancies." - }, - "Import": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SerializedModel" - } - }, - "description": "Import takes a serialized Juju model, deserializes it, and\nrecreates it in the receiving controller." - }, - "LatestLogTime": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ModelArgs" - }, - "Result": { - "type": "string", - "format": "date-time" - } - }, - "description": "LatestLogTime returns the time of the most recent log record\nreceived by the logtransfer endpoint. This can be used as the start\npoint for streaming logs from the source if the transfer was\ninterrupted.\n\nFor performance reasons, not every time is tracked, so if the\ntarget controller died during the transfer the latest log time\nmight be up to 2 minutes earlier. If the transfer was interrupted\nin some other way (like the source controller going away or a\nnetwork partition) the time will be up-to-date.\n\nLog messages are assumed to be sent in time order (which is how\ndebug-log emits them). If that isn't the case then this mechanism\ncan't be used to avoid duplicates when logtransfer is restarted.\n\nReturns the zero time if no logs have been transferred." - }, - "Prechecks": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/MigrationModelInfo" - } - }, - "description": "Prechecks ensure that the target controller is ready to accept a\nmodel migration." - } - }, - "definitions": { - "ActivateModelArgs": { - "type": "object", - "properties": { - "controller-alias": { - "type": "string" - }, - "controller-tag": { - "type": "string" - }, - "cross-model-uuids": { - "type": "array", - "items": { - "type": "string" - } - }, - "model-tag": { - "type": "string" - }, - "source-api-addrs": { - "type": "array", - "items": { - "type": "string" - } - }, - "source-ca-cert": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "model-tag", - "controller-tag", - "source-api-addrs", - "source-ca-cert", - "cross-model-uuids" - ] - }, - "AdoptResourcesArgs": { - "type": "object", - "properties": { - "model-tag": { - "type": "string" - }, - "source-controller-version": { - "$ref": "#/definitions/Number" - } - }, - "additionalProperties": false, - "required": [ - "model-tag", - "source-controller-version" - ] - }, - "BytesResult": { - "type": "object", - "properties": { - "result": { - "type": "array", - "items": { - "type": "integer" - } - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "MigrationModelInfo": { - "type": "object", - "properties": { - "agent-version": { - "$ref": "#/definitions/Number" - }, - "controller-agent-version": { - "$ref": "#/definitions/Number" - }, - "name": { - "type": "string" - }, - "owner-tag": { - "type": "string" - }, - "uuid": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "uuid", - "name", - "owner-tag", - "agent-version", - "controller-agent-version" - ] - }, - "ModelArgs": { - "type": "object", - "properties": { - "model-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "model-tag" - ] - }, - "Number": { - "type": "object", - "properties": { - "Build": { - "type": "integer" - }, - "Major": { - "type": "integer" - }, - "Minor": { - "type": "integer" - }, - "Patch": { - "type": "integer" - }, - "Tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Major", - "Minor", - "Tag", - "Patch", - "Build" - ] - }, - "SerializedModel": { - "type": "object", - "properties": { - "bytes": { - "type": "array", - "items": { - "type": "integer" - } - }, - "charms": { - "type": "array", - "items": { - "type": "string" - } - }, - "resources": { - "type": "array", - "items": { - "$ref": "#/definitions/SerializedModelResource" - } - }, - "tools": { - "type": "array", - "items": { - "$ref": "#/definitions/SerializedModelTools" - } - } - }, - "additionalProperties": false, - "required": [ - "bytes", - "charms", - "tools", - "resources" - ] - }, - "SerializedModelResource": { - "type": "object", - "properties": { - "application": { - "type": "string" - }, - "application-revision": { - "$ref": "#/definitions/SerializedModelResourceRevision" - }, - "charmstore-revision": { - "$ref": "#/definitions/SerializedModelResourceRevision" - }, - "name": { - "type": "string" - }, - "unit-revisions": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/SerializedModelResourceRevision" - } - } - } - }, - "additionalProperties": false, - "required": [ - "application", - "name", - "application-revision", - "charmstore-revision", - "unit-revisions" - ] - }, - "SerializedModelResourceRevision": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "fingerprint": { - "type": "string" - }, - "origin": { - "type": "string" - }, - "path": { - "type": "string" - }, - "revision": { - "type": "integer" - }, - "size": { - "type": "integer" - }, - "timestamp": { - "type": "string", - "format": "date-time" - }, - "type": { - "type": "string" - }, - "username": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "revision", - "type", - "path", - "description", - "origin", - "fingerprint", - "size", - "timestamp" - ] - }, - "SerializedModelTools": { - "type": "object", - "properties": { - "uri": { - "type": "string" - }, - "version": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "version", - "uri" - ] - } - } - } - }, - { - "Name": "ModelConfig", - "Description": "ModelConfigAPIV3 is currently the latest.", - "Version": 3, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "controller-user", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "GetModelConstraints": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/GetConstraintsResults" - } - }, - "description": "GetModelConstraints returns the constraints for the model." - }, - "ModelGet": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ModelConfigResults" - } - }, - "description": "ModelGet implements the server-side part of the\nmodel-config CLI command." - }, - "ModelSet": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ModelSet" - } - }, - "description": "ModelSet implements the server-side part of the\nset-model-config CLI command." - }, - "ModelUnset": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ModelUnset" - } - }, - "description": "ModelUnset implements the server-side part of the\nset-model-config CLI command." - }, - "SLALevel": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringResult" - } - }, - "description": "SLALevel returns the current sla level for the model." - }, - "Sequences": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ModelSequencesResult" - } - }, - "description": "Sequences returns the model's sequence names and next values." - }, - "SetModelConstraints": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetConstraints" - } - }, - "description": "SetModelConstraints sets the constraints for the model." - }, - "SetSLALevel": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ModelSLA" - } - }, - "description": "SetSLALevel sets the sla level on the model." - } - }, - "definitions": { - "ConfigValue": { - "type": "object", - "properties": { - "source": { - "type": "string" - }, - "value": { - "type": "object", - "additionalProperties": true - } - }, - "additionalProperties": false, - "required": [ - "value", - "source" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "GetConstraintsResults": { - "type": "object", - "properties": { - "constraints": { - "$ref": "#/definitions/Value" - } - }, - "additionalProperties": false, - "required": [ - "constraints" - ] - }, - "ModelConfigResults": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/ConfigValue" - } - } - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "ModelSLA": { - "type": "object", - "properties": { - "ModelSLAInfo": { - "$ref": "#/definitions/ModelSLAInfo" - }, - "creds": { - "type": "array", - "items": { - "type": "integer" - } - }, - "level": { - "type": "string" - }, - "owner": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "level", - "owner", - "ModelSLAInfo", - "creds" - ] - }, - "ModelSLAInfo": { - "type": "object", - "properties": { - "level": { - "type": "string" - }, - "owner": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "level", - "owner" - ] - }, - "ModelSequencesResult": { - "type": "object", - "properties": { - "sequences": { - "type": "object", - "patternProperties": { - ".*": { - "type": "integer" - } - } - } - }, - "additionalProperties": false, - "required": [ - "sequences" - ] - }, - "ModelSet": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "ModelUnset": { - "type": "object", - "properties": { - "keys": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "keys" - ] - }, - "SetConstraints": { - "type": "object", - "properties": { - "application": { - "type": "string" - }, - "constraints": { - "$ref": "#/definitions/Value" - } - }, - "additionalProperties": false, - "required": [ - "application", - "constraints" - ] - }, - "StringResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "Value": { - "type": "object", - "properties": { - "allocate-public-ip": { - "type": "boolean" - }, - "arch": { - "type": "string" - }, - "container": { - "type": "string" - }, - "cores": { - "type": "integer" - }, - "cpu-power": { - "type": "integer" - }, - "instance-role": { - "type": "string" - }, - "instance-type": { - "type": "string" - }, - "mem": { - "type": "integer" - }, - "root-disk": { - "type": "integer" - }, - "root-disk-source": { - "type": "string" - }, - "spaces": { - "type": "array", - "items": { - "type": "string" - } - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "virt-type": { - "type": "string" - }, - "zones": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - } - } - } - }, - { - "Name": "ModelGeneration", - "Description": "API is the concrete implementation of the API endpoint.", - "Version": 4, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "AbortBranch": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/BranchArg" - }, - "Result": { - "$ref": "#/definitions/ErrorResult" - } - }, - "description": "AbortBranch aborts the input branch, marking it complete. However no\nchanges are made applicable to the whole model. No units may be assigned\nto the branch when aborting." - }, - "AddBranch": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/BranchArg" - }, - "Result": { - "$ref": "#/definitions/ErrorResult" - } - }, - "description": "AddBranch adds a new branch with the input name to the model." - }, - "BranchInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/BranchInfoArgs" - }, - "Result": { - "$ref": "#/definitions/BranchResults" - } - }, - "description": "BranchInfo will return details of branch identified by the input argument,\nincluding units on the branch and the configuration disjoint with the\nmaster generation.\nAn error is returned if no in-flight branch matching in input is found." - }, - "CommitBranch": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/BranchArg" - }, - "Result": { - "$ref": "#/definitions/IntResult" - } - }, - "description": "CommitBranch commits the input branch, making its changes applicable to\nthe whole model and marking it complete." - }, - "HasActiveBranch": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/BranchArg" - }, - "Result": { - "$ref": "#/definitions/BoolResult" - } - }, - "description": "HasActiveBranch returns a true result if the input model has an \"in-flight\"\nbranch matching the input name." - }, - "ListCommits": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/BranchResults" - } - }, - "description": "ListCommits will return the commits, hence only branches with generation_id higher than 0" - }, - "ShowCommit": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/GenerationId" - }, - "Result": { - "$ref": "#/definitions/GenerationResult" - } - }, - "description": "ShowCommit will return details a commit given by its generationId\nAn error is returned if either no branch can be found corresponding to the generation id.\nOr the generation id given is below 1." - }, - "TrackBranch": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/BranchTrackArg" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "TrackBranch marks the input units and/or applications as tracking the input\nbranch, causing them to realise changes made under that branch." - } - }, - "definitions": { - "BoolResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "BranchArg": { - "type": "object", - "properties": { - "branch": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "branch" - ] - }, - "BranchInfoArgs": { - "type": "object", - "properties": { - "branches": { - "type": "array", - "items": { - "type": "string" - } - }, - "detailed": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "branches", - "detailed" - ] - }, - "BranchResults": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "generations": { - "type": "array", - "items": { - "$ref": "#/definitions/Generation" - } - } - }, - "additionalProperties": false, - "required": [ - "generations" - ] - }, - "BranchTrackArg": { - "type": "object", - "properties": { - "branch": { - "type": "string" - }, - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } - }, - "num-units": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "branch", - "entities" - ] - }, - "Entity": { - "type": "object", - "properties": { - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "Generation": { - "type": "object", - "properties": { - "applications": { - "type": "array", - "items": { - "$ref": "#/definitions/GenerationApplication" - } - }, - "branch": { - "type": "string" - }, - "completed": { - "type": "integer" - }, - "completed-by": { - "type": "string" - }, - "created": { - "type": "integer" - }, - "created-by": { - "type": "string" - }, - "generation-id": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "branch", - "created", - "created-by", - "applications" - ] - }, - "GenerationApplication": { - "type": "object", - "properties": { - "application": { - "type": "string" - }, - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "pending": { - "type": "array", - "items": { - "type": "string" - } - }, - "progress": { - "type": "string" - }, - "tracking": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "application", - "progress", - "config" - ] - }, - "GenerationId": { - "type": "object", - "properties": { - "generation-id": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "generation-id" - ] - }, - "GenerationResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "generation": { - "$ref": "#/definitions/Generation" - } - }, - "additionalProperties": false, - "required": [ - "generation" - ] - }, - "IntResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - } - } - } - }, - { - "Name": "ModelManager", - "Description": "ModelManagerAPI implements the model manager interface and is\nthe concrete implementation of the api end point.", - "Version": 9, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "controller-user" - ], - "Schema": { - "type": "object", - "properties": { - "ChangeModelCredential": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ChangeModelCredentialsParams" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "ChangeModelCredential changes cloud credential reference for models.\nThese new cloud credentials must already exist on the controller." - }, - "CreateModel": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ModelCreateArgs" - }, - "Result": { - "$ref": "#/definitions/ModelInfo" - } - }, - "description": "CreateModel creates a new model using the account and\nmodel config specified in the args." - }, - "DestroyModels": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/DestroyModelsParams" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "DestroyModels will try to destroy the specified models.\nIf there is a block on destruction, this method will return an error.\nFrom ModelManager v7 onwards, DestroyModels gains 'force' and 'max-wait' parameters." - }, - "DumpModels": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/DumpModelRequest" - }, - "Result": { - "$ref": "#/definitions/StringResults" - } - }, - "description": "DumpModels will export the models into the database agnostic\nrepresentation. The user needs to either be a controller admin, or have\nadmin privileges on the model itself." - }, - "DumpModelsDB": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/MapResults" - } - }, - "description": "DumpModelsDB will gather all documents from all model collections\nfor the specified model. The map result contains a map of collection\nnames to lists of documents represented as maps." - }, - "ListModelSummaries": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ModelSummariesRequest" - }, - "Result": { - "$ref": "#/definitions/ModelSummaryResults" - } - }, - "description": "ListModelSummaries returns models that the specified user\nhas access to in the current server. Controller admins (superuser)\ncan list models for any user. Other users\ncan only ask about their own models." - }, - "ListModels": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entity" - }, - "Result": { - "$ref": "#/definitions/UserModelList" - } - }, - "description": "ListModels returns the models that the specified user\nhas access to in the current server. Controller admins (superuser)\ncan list models for any user. Other users\ncan only ask about their own models." - }, - "ModelDefaultsForClouds": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ModelDefaultsResults" - } - }, - "description": "ModelDefaultsForClouds returns the default config values for the specified\nclouds." - }, - "ModelInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ModelInfoResults" - } - }, - "description": "ModelInfo returns information about the specified models." - }, - "ModelStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ModelStatusResults" - } - }, - "description": "ModelStatus returns a summary of the model." - }, - "ModifyModelAccess": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ModifyModelAccessRequest" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "ModifyModelAccess changes the model access granted to users." - }, - "SetModelDefaults": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetModelDefaults" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetModelDefaults writes new values for the specified default model settings." - }, - "UnsetModelDefaults": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/UnsetModelDefaults" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "UnsetModelDefaults removes the specified default model settings." - } - }, - "definitions": { - "ChangeModelCredentialParams": { - "type": "object", - "properties": { - "credential-tag": { - "type": "string" - }, - "model-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "model-tag", - "credential-tag" - ] - }, - "ChangeModelCredentialsParams": { - "type": "object", - "properties": { - "model-credentials": { - "type": "array", - "items": { - "$ref": "#/definitions/ChangeModelCredentialParams" - } - } - }, - "additionalProperties": false, - "required": [ - "model-credentials" - ] - }, - "DestroyModelParams": { - "type": "object", - "properties": { - "destroy-storage": { - "type": "boolean" - }, - "force": { - "type": "boolean" - }, - "max-wait": { - "type": "integer" - }, - "model-tag": { - "type": "string" - }, - "timeout": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "model-tag" - ] - }, - "DestroyModelsParams": { - "type": "object", - "properties": { - "models": { - "type": "array", - "items": { - "$ref": "#/definitions/DestroyModelParams" - } - } - }, - "additionalProperties": false, - "required": [ - "models" - ] - }, - "DumpModelRequest": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } - }, - "simplified": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "entities", - "simplified" - ] - }, - "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" - ] - }, - "EntityStatus": { - "type": "object", - "properties": { - "data": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "info": { - "type": "string" - }, - "since": { - "type": "string", - "format": "date-time" - }, - "status": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "status", - "info", - "since" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "MachineHardware": { - "type": "object", - "properties": { - "arch": { - "type": "string" - }, - "availability-zone": { - "type": "string" - }, - "cores": { - "type": "integer" - }, - "cpu-power": { - "type": "integer" - }, - "mem": { - "type": "integer" - }, - "root-disk": { - "type": "integer" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "virt-type": { - "type": "string" - } - }, - "additionalProperties": false - }, - "MapResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "MapResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/MapResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "Model": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "owner-tag": { - "type": "string" - }, - "type": { - "type": "string" - }, - "uuid": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "uuid", - "type", - "owner-tag" - ] - }, - "ModelApplicationInfo": { - "type": "object", - "properties": { - "name": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name" - ] - }, - "ModelCreateArgs": { - "type": "object", - "properties": { - "cloud-tag": { - "type": "string" - }, - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "credential": { - "type": "string" - }, - "name": { - "type": "string" - }, - "owner-tag": { - "type": "string" - }, - "region": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "owner-tag" - ] - }, - "ModelDefaultValues": { - "type": "object", - "properties": { - "cloud-region": { - "type": "string" - }, - "cloud-tag": { - "type": "string" - }, - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "ModelDefaults": { - "type": "object", - "properties": { - "controller": { - "type": "object", - "additionalProperties": true - }, - "default": { - "type": "object", - "additionalProperties": true - }, - "regions": { - "type": "array", - "items": { - "$ref": "#/definitions/RegionDefaults" - } - } - }, - "additionalProperties": false - }, - "ModelDefaultsResult": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/ModelDefaults" - } - } - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "ModelDefaultsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelDefaultsResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ModelEntityCount": { - "type": "object", - "properties": { - "count": { - "type": "integer" - }, - "entity": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "entity", - "count" - ] - }, - "ModelFilesystemInfo": { - "type": "object", - "properties": { - "detachable": { - "type": "boolean" - }, - "id": { - "type": "string" - }, - "message": { - "type": "string" - }, - "provider-id": { - "type": "string" - }, - "status": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "id" - ] - }, - "ModelInfo": { - "type": "object", - "properties": { - "agent-version": { - "$ref": "#/definitions/Number" - }, - "cloud-credential-tag": { - "type": "string" - }, - "cloud-credential-validity": { - "type": "boolean" - }, - "cloud-region": { - "type": "string" - }, - "cloud-tag": { - "type": "string" - }, - "controller-uuid": { - "type": "string" - }, - "default-base": { - "type": "string" - }, - "default-series": { - "type": "string" - }, - "is-controller": { - "type": "boolean" - }, - "life": { - "type": "string" - }, - "machines": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelMachineInfo" - } - }, - "migration": { - "$ref": "#/definitions/ModelMigrationStatus" - }, - "name": { - "type": "string" - }, - "owner-tag": { - "type": "string" - }, - "provider-type": { - "type": "string" - }, - "secret-backends": { - "type": "array", - "items": { - "$ref": "#/definitions/SecretBackendResult" - } - }, - "sla": { - "$ref": "#/definitions/ModelSLAInfo" - }, - "status": { - "$ref": "#/definitions/EntityStatus" - }, - "supported-features": { - "type": "array", - "items": { - "$ref": "#/definitions/SupportedFeature" - } - }, - "type": { - "type": "string" - }, - "users": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelUserInfo" - } - }, - "uuid": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "type", - "uuid", - "controller-uuid", - "is-controller", - "cloud-tag", - "owner-tag", - "life", - "users", - "machines", - "secret-backends", - "sla", - "agent-version" - ] - }, - "ModelInfoResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/ModelInfo" - } - }, - "additionalProperties": false - }, - "ModelInfoResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelInfoResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ModelMachineInfo": { - "type": "object", - "properties": { - "display-name": { - "type": "string" - }, - "ha-primary": { - "type": "boolean" - }, - "hardware": { - "$ref": "#/definitions/MachineHardware" - }, - "has-vote": { - "type": "boolean" - }, - "id": { - "type": "string" - }, - "instance-id": { - "type": "string" - }, - "message": { - "type": "string" - }, - "status": { - "type": "string" - }, - "wants-vote": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "id" - ] - }, - "ModelMigrationStatus": { - "type": "object", - "properties": { - "end": { - "type": "string", - "format": "date-time" - }, - "start": { - "type": "string", - "format": "date-time" - }, - "status": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "status", - "start" - ] - }, - "ModelSLAInfo": { - "type": "object", - "properties": { - "level": { - "type": "string" - }, - "owner": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "level", - "owner" - ] - }, - "ModelStatus": { - "type": "object", - "properties": { - "application-count": { - "type": "integer" - }, - "applications": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelApplicationInfo" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "filesystems": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelFilesystemInfo" - } - }, - "hosted-machine-count": { - "type": "integer" - }, - "life": { - "type": "string" - }, - "machines": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelMachineInfo" - } - }, - "model-tag": { - "type": "string" - }, - "owner-tag": { - "type": "string" - }, - "type": { - "type": "string" - }, - "unit-count": { - "type": "integer" - }, - "volumes": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelVolumeInfo" - } - } - }, - "additionalProperties": false, - "required": [ - "model-tag", - "life", - "type", - "hosted-machine-count", - "application-count", - "unit-count", - "owner-tag" - ] - }, - "ModelStatusResults": { - "type": "object", - "properties": { - "models": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelStatus" - } - } - }, - "additionalProperties": false, - "required": [ - "models" - ] - }, - "ModelSummariesRequest": { - "type": "object", - "properties": { - "all": { - "type": "boolean" - }, - "user-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "user-tag" - ] - }, - "ModelSummary": { - "type": "object", - "properties": { - "agent-version": { - "$ref": "#/definitions/Number" - }, - "cloud-credential-tag": { - "type": "string" - }, - "cloud-region": { - "type": "string" - }, - "cloud-tag": { - "type": "string" - }, - "controller-uuid": { - "type": "string" - }, - "counts": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelEntityCount" - } - }, - "default-series": { - "type": "string" - }, - "is-controller": { - "type": "boolean" - }, - "last-connection": { - "type": "string", - "format": "date-time" - }, - "life": { - "type": "string" - }, - "migration": { - "$ref": "#/definitions/ModelMigrationStatus" - }, - "name": { - "type": "string" - }, - "owner-tag": { - "type": "string" - }, - "provider-type": { - "type": "string" - }, - "sla": { - "$ref": "#/definitions/ModelSLAInfo" - }, - "status": { - "$ref": "#/definitions/EntityStatus" - }, - "type": { - "type": "string" - }, - "user-access": { - "type": "string" - }, - "uuid": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "uuid", - "type", - "controller-uuid", - "is-controller", - "cloud-tag", - "owner-tag", - "life", - "user-access", - "last-connection", - "counts", - "sla", - "agent-version" - ] - }, - "ModelSummaryResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/ModelSummary" - } - }, - "additionalProperties": false - }, - "ModelSummaryResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelSummaryResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ModelUnsetKeys": { - "type": "object", - "properties": { - "cloud-region": { - "type": "string" - }, - "cloud-tag": { - "type": "string" - }, - "keys": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "keys" - ] - }, - "ModelUserInfo": { - "type": "object", - "properties": { - "access": { - "type": "string" - }, - "display-name": { - "type": "string" - }, - "last-connection": { - "type": "string", - "format": "date-time" - }, - "model-tag": { - "type": "string" - }, - "user": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "model-tag", - "user", - "display-name", - "last-connection", - "access" - ] - }, - "ModelVolumeInfo": { - "type": "object", - "properties": { - "detachable": { - "type": "boolean" - }, - "id": { - "type": "string" - }, - "message": { - "type": "string" - }, - "provider-id": { - "type": "string" - }, - "status": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "id" - ] - }, - "ModifyModelAccess": { - "type": "object", - "properties": { - "access": { - "type": "string" - }, - "action": { - "type": "string" - }, - "model-tag": { - "type": "string" - }, - "user-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "user-tag", - "action", - "access", - "model-tag" - ] - }, - "ModifyModelAccessRequest": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "$ref": "#/definitions/ModifyModelAccess" - } - } - }, - "additionalProperties": false, - "required": [ - "changes" - ] - }, - "Number": { - "type": "object", - "properties": { - "Build": { - "type": "integer" - }, - "Major": { - "type": "integer" - }, - "Minor": { - "type": "integer" - }, - "Patch": { - "type": "integer" - }, - "Tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Major", - "Minor", - "Tag", - "Patch", - "Build" - ] - }, - "RegionDefaults": { - "type": "object", - "properties": { - "region-name": { - "type": "string" - }, - "value": { - "type": "object", - "additionalProperties": true - } - }, - "additionalProperties": false, - "required": [ - "region-name", - "value" - ] - }, - "SecretBackend": { - "type": "object", - "properties": { - "backend-type": { - "type": "string" - }, - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "name": { - "type": "string" - }, - "token-rotate-interval": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "name", - "backend-type", - "config" - ] - }, - "SecretBackendResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "id": { - "type": "string" - }, - "message": { - "type": "string" - }, - "num-secrets": { - "type": "integer" - }, - "result": { - "$ref": "#/definitions/SecretBackend" - }, - "status": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "result", - "id", - "num-secrets", - "status" - ] - }, - "SetModelDefaults": { - "type": "object", - "properties": { - "config": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelDefaultValues" - } - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "StringResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "StringResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "SupportedFeature": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "name": { - "type": "string" - }, - "version": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "description" - ] - }, - "UnsetModelDefaults": { - "type": "object", - "properties": { - "keys": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelUnsetKeys" - } - } - }, - "additionalProperties": false, - "required": [ - "keys" - ] - }, - "UserModel": { - "type": "object", - "properties": { - "last-connection": { - "type": "string", - "format": "date-time" - }, - "model": { - "$ref": "#/definitions/Model" - } - }, - "additionalProperties": false, - "required": [ - "model", - "last-connection" - ] - }, - "UserModelList": { - "type": "object", - "properties": { - "user-models": { - "type": "array", - "items": { - "$ref": "#/definitions/UserModel" - } - } - }, - "additionalProperties": false, - "required": [ - "user-models" - ] - } - } - } - }, - { - "Name": "ModelSummaryWatcher", - "Description": "SrvModelSummaryWatcher defines the API methods on a ModelSummaryWatcher.", - "Version": 1, - "AvailableTo": [ - "controller-user" - ], - "Schema": { - "type": "object", - "properties": { - "Next": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/SummaryWatcherNextResults" - } - }, - "description": "Next will return the current state of everything on the first call\nand subsequent calls will return just those model summaries that have\nchanged." - }, - "Stop": { - "type": "object", - "description": "Stop stops the watcher." - } - }, - "definitions": { - "ModelAbstract": { - "type": "object", - "properties": { - "admins": { - "type": "array", - "items": { - "type": "string" - } - }, - "annotations": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "cloud": { - "type": "string" - }, - "controller": { - "type": "string" - }, - "credential": { - "type": "string" - }, - "messages": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelSummaryMessage" - } - }, - "name": { - "type": "string" - }, - "region": { - "type": "string" - }, - "removed": { - "type": "boolean" - }, - "size": { - "$ref": "#/definitions/ModelSummarySize" - }, - "status": { - "type": "string" - }, - "uuid": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "uuid" - ] - }, - "ModelSummaryMessage": { - "type": "object", - "properties": { - "agent": { - "type": "string" - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "agent", - "message" - ] - }, - "ModelSummarySize": { - "type": "object", - "properties": { - "applications": { - "type": "integer" - }, - "containers": { - "type": "integer" - }, - "machines": { - "type": "integer" - }, - "relations": { - "type": "integer" - }, - "units": { - "type": "integer" - } - }, - "additionalProperties": false - }, - "SummaryWatcherNextResults": { - "type": "object", - "properties": { - "models": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelAbstract" - } - } - }, - "additionalProperties": false, - "required": [ - "models" - ] - } - } - } - }, - { - "Name": "ModelUpgrader", - "Description": "ModelUpgraderAPI implements the model upgrader interface and is\nthe concrete implementation of the api end point.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "controller-user" - ], - "Schema": { - "type": "object", - "properties": { - "AbortModelUpgrade": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ModelParam" - } - }, - "description": "AbortModelUpgrade aborts and archives the model upgrade\nsynchronisation record, if any." - }, - "UpgradeModel": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/UpgradeModelParams" - }, - "Result": { - "$ref": "#/definitions/UpgradeModelResult" - } - }, - "description": "UpgradeModel upgrades a model." - } - }, - "definitions": { - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ModelParam": { - "type": "object", - "properties": { - "model-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "model-tag" - ] - }, - "Number": { - "type": "object", - "properties": { - "Build": { - "type": "integer" - }, - "Major": { - "type": "integer" - }, - "Minor": { - "type": "integer" - }, - "Patch": { - "type": "integer" - }, - "Tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Major", - "Minor", - "Tag", - "Patch", - "Build" - ] - }, - "UpgradeModelParams": { - "type": "object", - "properties": { - "agent-stream": { - "type": "string" - }, - "dry-run": { - "type": "boolean" - }, - "ignore-agent-versions": { - "type": "boolean" - }, - "model-tag": { - "type": "string" - }, - "target-version": { - "$ref": "#/definitions/Number" - } - }, - "additionalProperties": false, - "required": [ - "model-tag", - "target-version" - ] - }, - "UpgradeModelResult": { - "type": "object", - "properties": { - "chosen-version": { - "$ref": "#/definitions/Number" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "chosen-version" - ] - } - } - } - }, - { - "Name": "NotifyWatcher", - "Description": "srvNotifyWatcher defines the API access to methods on a NotifyWatcher.\nEach client has its own current set of watchers, stored in resources.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "controller-user", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "Next": { - "type": "object", - "description": "Next returns when a change has occurred to the\nentity being watched since the most recent call to Next\nor the Watch call that created the NotifyWatcher." - }, - "Stop": { - "type": "object", - "description": "Stop stops the watcher." - } - } - } - }, - { - "Name": "OfferStatusWatcher", - "Description": "srvOfferStatusWatcher defines the API wrapping a crossmodelrelations.OfferStatusWatcher.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "Next": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/OfferStatusWatchResult" - } - }, - "description": "Next returns when a change has occurred to an entity of the\ncollection being watched since the most recent call to Next\nor the Watch call that created the srvOfferStatusWatcher." - }, - "Stop": { - "type": "object", - "description": "Stop stops the watcher." - } - }, - "definitions": { - "EntityStatus": { - "type": "object", - "properties": { - "data": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "info": { - "type": "string" - }, - "since": { - "type": "string", - "format": "date-time" - }, - "status": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "status", - "info", - "since" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "OfferStatusChange": { - "type": "object", - "properties": { - "offer-name": { - "type": "string" - }, - "status": { - "$ref": "#/definitions/EntityStatus" - } - }, - "additionalProperties": false, - "required": [ - "offer-name", - "status" - ] - }, - "OfferStatusWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "$ref": "#/definitions/OfferStatusChange" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id", - "changes" - ] - } - } - } - }, - { - "Name": "Payloads", - "Description": "API serves payload-specific API methods.", - "Version": 1, - "AvailableTo": [ - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "List": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/PayloadListArgs" - }, - "Result": { - "$ref": "#/definitions/PayloadListResults" - } - }, - "description": "List builds the list of payloads being tracked for\nthe given unit and IDs. If no IDs are provided then all tracked\npayloads for the unit are returned." - } - }, - "definitions": { - "Payload": { - "type": "object", - "properties": { - "class": { - "type": "string" - }, - "id": { - "type": "string" - }, - "labels": { - "type": "array", - "items": { - "type": "string" - } - }, - "machine": { - "type": "string" - }, - "status": { - "type": "string" - }, - "type": { - "type": "string" - }, - "unit": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "class", - "type", - "id", - "status", - "labels", - "unit", - "machine" - ] - }, - "PayloadListArgs": { - "type": "object", - "properties": { - "patterns": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "patterns" - ] - }, - "PayloadListResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/Payload" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - } - } - } - }, - { - "Name": "PayloadsHookContext", - "Description": "UnitFacade serves payload-specific API methods.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "List": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/PayloadResults" - } - }, - "description": "List builds the list of payload being tracked for\nthe given unit and IDs. If no IDs are provided then all tracked\npayloads for the unit are returned." - }, - "LookUp": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/LookUpPayloadArgs" - }, - "Result": { - "$ref": "#/definitions/PayloadResults" - } - }, - "description": "LookUp identifies the payload with the provided name and raw ID." - }, - "SetStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetPayloadStatusArgs" - }, - "Result": { - "$ref": "#/definitions/PayloadResults" - } - }, - "description": "SetStatus sets the raw status of a payload." - }, - "Track": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/TrackPayloadArgs" - }, - "Result": { - "$ref": "#/definitions/PayloadResults" - } - }, - "description": "Track stores a payload to be tracked in state." - }, - "Untrack": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/PayloadResults" - } - }, - "description": "Untrack marks the identified payload as no longer being tracked." - } - }, - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "LookUpPayloadArg": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "id" - ] - }, - "LookUpPayloadArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/LookUpPayloadArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "Payload": { - "type": "object", - "properties": { - "class": { - "type": "string" - }, - "id": { - "type": "string" - }, - "labels": { - "type": "array", - "items": { - "type": "string" - } - }, - "machine": { - "type": "string" - }, - "status": { - "type": "string" - }, - "type": { - "type": "string" - }, - "unit": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "class", - "type", - "id", - "status", - "labels", - "unit", - "machine" - ] - }, - "PayloadResult": { - "type": "object", - "properties": { - "Entity": { - "$ref": "#/definitions/Entity" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "not-found": { - "type": "boolean" - }, - "payload": { - "$ref": "#/definitions/Payload" - }, - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "Entity", - "payload", - "not-found" - ] - }, - "PayloadResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/PayloadResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "SetPayloadStatusArg": { - "type": "object", - "properties": { - "Entity": { - "$ref": "#/definitions/Entity" - }, - "status": { - "type": "string" - }, - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "Entity", - "status" - ] - }, - "SetPayloadStatusArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/SetPayloadStatusArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "TrackPayloadArgs": { - "type": "object", - "properties": { - "payloads": { - "type": "array", - "items": { - "$ref": "#/definitions/Payload" - } - } - }, - "additionalProperties": false, - "required": [ - "payloads" - ] - } - } - } - }, - { - "Name": "Pinger", - "Description": "pinger describes a resource that can be pinged and stopped.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "controller-user", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "Ping": { - "type": "object" - }, - "Stop": { - "type": "object" - } - } - } - }, - { - "Name": "Provisioner", - "Description": "ProvisionerAPIV11 provides v10 of the provisioner facade.\nIt relies on agent-set origin when calling SetHostMachineNetworkConfig.", - "Version": 11, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent" - ], - "Schema": { - "type": "object", - "properties": { - "APIAddresses": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsResult" - } - }, - "description": "APIAddresses returns the list of addresses used to connect to the API." - }, - "APIHostPorts": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/APIHostPortsResult" - } - }, - "description": "APIHostPorts returns the API server addresses." - }, - "AvailabilityZone": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringResults" - } - }, - "description": "AvailabilityZone returns a provider-specific availability zone for each given machine entity" - }, - "CACert": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/BytesResult" - } - }, - "description": "CACert returns the certificate used to validate the state connection." - }, - "Constraints": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ConstraintsResults" - } - }, - "description": "Constraints returns the constraints for each given machine entity." - }, - "ContainerConfig": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ContainerConfig" - } - }, - "description": "ContainerConfig returns information from the model config that is\nneeded for container cloud-init." - }, - "ContainerManagerConfig": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ContainerManagerConfigParams" - }, - "Result": { - "$ref": "#/definitions/ContainerManagerConfig" - } - }, - "description": "ContainerManagerConfig returns information from the model config that is\nneeded for configuring the container manager." - }, - "ControllerAPIInfoForModels": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ControllerAPIInfoResults" - } - }, - "description": "ControllerAPIInfoForModels returns the controller api connection details for the specified models." - }, - "ControllerConfig": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ControllerConfigResult" - } - }, - "description": "ControllerConfig returns the controller's configuration." - }, - "DistributionGroup": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/DistributionGroupResults" - } - }, - "description": "DistributionGroup returns, for each given machine entity,\na slice of instance.Ids that belong to the same distribution\ngroup as that machine. This information may be used to\ndistribute instances for high availability." - }, - "DistributionGroupByMachineId": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsResults" - } - }, - "description": "DistributionGroupByMachineId returns, for each given machine entity,\na slice of machine.Ids that belong to the same distribution\ngroup as that machine. This information may be used to\ndistribute instances for high availability." - }, - "EnsureDead": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "EnsureDead calls EnsureDead on each given entity from state. It\nwill fail if the entity is not present. If it's Alive, nothing will\nhappen (see state/EnsureDead() for units or machines)." - }, - "FindTools": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/FindToolsParams" - }, - "Result": { - "$ref": "#/definitions/FindToolsResult" - } - }, - "description": "FindTools returns a List containing all tools matching the given parameters." - }, - "GetContainerInterfaceInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/MachineNetworkConfigResults" - } - }, - "description": "GetContainerInterfaceInfo returns information to configure networking for a\ncontainer. It accepts container tags as arguments." - }, - "GetContainerProfileInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ContainerProfileResults" - } - }, - "description": "GetContainerProfileInfo returns information to configure a lxd profile(s) for a\ncontainer based on the charms deployed to the container. It accepts container\ntags as arguments. Unlike machineLXDProfileNames which has the environ\nwrite the lxd profiles and returns the names of profiles already written." - }, - "HostChangesForContainers": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/HostNetworkChangeResults" - } - }, - "description": "HostChangesForContainers returns the set of changes that need to be done\nto the host machine to prepare it for the containers to be created.\nPass in a list of the containers that you want the changes for." - }, - "InstanceId": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringResults" - } - }, - "description": "InstanceId returns the provider specific instance id for each given\nmachine or an CodeNotProvisioned error, if not set." - }, - "InstanceStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StatusResults" - } - }, - "description": "InstanceStatus returns the instance status for each given entity.\nOnly machine tags are accepted." - }, - "KeepInstance": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/BoolResults" - } - }, - "description": "KeepInstance returns the keep-instance value for each given machine entity." - }, - "Life": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/LifeResults" - } - }, - "description": "Life returns the life status of every supplied entity, where available." - }, - "MachinesWithTransientErrors": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StatusResults" - } - }, - "description": "MachinesWithTransientErrors returns status data for machines with provisioning\nerrors which are transient." - }, - "MarkMachinesForRemoval": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "MarkMachinesForRemoval indicates that the specified machines are\nready to have any provider-level resources cleaned up and then be\nremoved." - }, - "ModelConfig": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ModelConfigResult" - } - }, - "description": "ModelConfig returns the current model's configuration." - }, - "ModelUUID": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringResult" - } - }, - "description": "ModelUUID returns the model UUID that the current connection is for." - }, - "PrepareContainerInterfaceInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/MachineNetworkConfigResults" - } - }, - "description": "PrepareContainerInterfaceInfo allocates an address and returns information to\nconfigure networking for a container. It accepts container tags as arguments." - }, - "ProvisioningInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ProvisioningInfoResults" - } - }, - "description": "ProvisioningInfo returns the provisioning information for each given machine entity.\nIt supports all positive space constraints." - }, - "ReleaseContainerAddresses": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "ReleaseContainerAddresses finds addresses allocated to a container and marks\nthem as Dead, to be released and removed. It accepts container tags as\narguments." - }, - "Remove": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "Remove removes every given entity from state, calling EnsureDead\nfirst, then Remove. It will fail if the entity is not present." - }, - "SetCharmProfiles": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetProfileArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetCharmProfiles records the given slice of charm profile names." - }, - "SetHostMachineNetworkConfig": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetMachineNetworkConfig" - } - } - }, - "SetInstanceInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/InstancesInfo" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetInstanceInfo sets the provider specific machine id, nonce,\nmetadata and network info for each given machine. Once set, the\ninstance id cannot be changed." - }, - "SetInstanceStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetStatus" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetInstanceStatus updates the instance status for each given\nentity. Only machine tags are accepted." - }, - "SetModificationStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetStatus" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetModificationStatus updates the instance whilst changes are occurring. This\nis different from SetStatus and SetInstanceStatus, by the fact this holds\ninformation about the ongoing changes that are happening to instances.\nConsider LXD Profile updates that can modify a instance, but may not cause\nthe instance to be placed into a error state. This modification status\nserves the purpose of highlighting that to the operator.\nOnly machine tags are accepted." - }, - "SetObservedNetworkConfig": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetMachineNetworkConfig" - } - }, - "description": "SetObservedNetworkConfig reads the network config for the machine\nidentified by the input args.\nThis config is merged with the new network config supplied in the\nsame args and updated if it has changed." - }, - "SetPasswords": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/EntityPasswords" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetPasswords sets the given password for each supplied entity, if possible." - }, - "SetStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetStatus" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetStatus sets the status of each given entity." - }, - "SetSupportedContainers": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/MachineContainersParams" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetSupportedContainers updates the list of containers supported by the machines passed in args." - }, - "Status": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StatusResults" - } - }, - "description": "Status returns the status of each given entity." - }, - "SupportedContainers": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/MachineContainerResults" - } - }, - "description": "SupportedContainers returns the list of containers supported by the machines passed in args." - }, - "Tools": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ToolsResults" - } - }, - "description": "Tools finds the tools necessary for the given agents." - }, - "WatchAPIHostPorts": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResult" - } - }, - "description": "WatchAPIHostPorts watches the API server addresses." - }, - "WatchAllContainers": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/WatchContainers" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - }, - "description": "WatchAllContainers starts a StringsWatcher to watch all containers deployed to\nany machine passed in args." - }, - "WatchContainers": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/WatchContainers" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - }, - "description": "WatchContainers starts a StringsWatcher to watch containers deployed to\nany machine passed in args." - }, - "WatchForModelConfigChanges": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResult" - } - }, - "description": "WatchForModelConfigChanges returns a NotifyWatcher that observes\nchanges to the model configuration.\nNote that although the NotifyWatchResult contains an Error field,\nit's not used because we are only returning a single watcher,\nso we use the regular error return." - }, - "WatchMachineErrorRetry": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResult" - } - }, - "description": "WatchMachineErrorRetry returns a NotifyWatcher that notifies when\nthe provisioner should retry provisioning machines with transient errors." - }, - "WatchModelMachineStartTimes": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsWatchResult" - } - }, - "description": "WatchModelMachineStartTimes watches the non-container machines in the model\nfor changes to the Life or AgentStartTime fields and reports them as a batch." - }, - "WatchModelMachines": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsWatchResult" - } - }, - "description": "WatchModelMachines returns a StringsWatcher that notifies of\nchanges to the life cycles of the top level machines in the current\nmodel." - } - }, - "definitions": { - "APIHostPortsResult": { - "type": "object", - "properties": { - "servers": { - "type": "array", - "items": { - "type": "array", - "items": { - "$ref": "#/definitions/HostPort" - } - } - } - }, - "additionalProperties": false, - "required": [ - "servers" - ] - }, - "Address": { - "type": "object", - "properties": { - "cidr": { - "type": "string" - }, - "config-type": { - "type": "string" - }, - "is-secondary": { - "type": "boolean" - }, - "scope": { - "type": "string" - }, - "space-id": { - "type": "string" - }, - "space-name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "value", - "type", - "scope" - ] - }, - "Base": { - "type": "object", - "properties": { - "channel": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "channel" - ] - }, - "Binary": { - "type": "object", - "properties": { - "Arch": { - "type": "string" - }, - "Build": { - "type": "integer" - }, - "Major": { - "type": "integer" - }, - "Minor": { - "type": "integer" - }, - "Number": { - "$ref": "#/definitions/Number" - }, - "Patch": { - "type": "integer" - }, - "Release": { - "type": "string" - }, - "Tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Major", - "Minor", - "Tag", - "Patch", - "Build", - "Number", - "Release", - "Arch" - ] - }, - "BoolResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "BoolResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/BoolResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "BytesResult": { - "type": "object", - "properties": { - "result": { - "type": "array", - "items": { - "type": "integer" - } - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "CharmLXDProfile": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "description": { - "type": "string" - }, - "devices": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - } - } - } - }, - "additionalProperties": false, - "required": [ - "config", - "description", - "devices" - ] - }, - "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" - }, - "source": { - "type": "string" - }, - "stream": { - "type": "string" - }, - "version": { - "type": "string" - }, - "virt-type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "image-id", - "region", - "version", - "arch", - "source", - "priority" - ] - }, - "ConstraintsResult": { - "type": "object", - "properties": { - "constraints": { - "$ref": "#/definitions/Value" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "constraints" - ] - }, - "ConstraintsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ConstraintsResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ContainerConfig": { - "type": "object", - "properties": { - "UpdateBehavior": { - "$ref": "#/definitions/UpdateBehavior" - }, - "apt-mirror": { - "type": "string" - }, - "apt-proxy": { - "$ref": "#/definitions/Settings" - }, - "authorized-keys": { - "type": "string" - }, - "cloudinit-userdata": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "container-inherit-properties": { - "type": "string" - }, - "juju-proxy": { - "$ref": "#/definitions/Settings" - }, - "legacy-proxy": { - "$ref": "#/definitions/Settings" - }, - "provider-type": { - "type": "string" - }, - "snap-proxy": { - "$ref": "#/definitions/Settings" - }, - "snap-store-assertions": { - "type": "string" - }, - "snap-store-proxy-id": { - "type": "string" - }, - "snap-store-proxy-url": { - "type": "string" - }, - "ssl-hostname-verification": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "provider-type", - "authorized-keys", - "ssl-hostname-verification", - "legacy-proxy", - "juju-proxy", - "apt-proxy", - "snap-proxy", - "snap-store-assertions", - "snap-store-proxy-id", - "snap-store-proxy-url", - "UpdateBehavior" - ] - }, - "ContainerLXDProfile": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "profile": { - "$ref": "#/definitions/CharmLXDProfile" - } - }, - "additionalProperties": false, - "required": [ - "profile", - "name" - ] - }, - "ContainerManagerConfig": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "ContainerManagerConfigParams": { - "type": "object", - "properties": { - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type" - ] - }, - "ContainerProfileResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "lxd-profiles": { - "type": "array", - "items": { - "$ref": "#/definitions/ContainerLXDProfile" - } - } - }, - "additionalProperties": false - }, - "ContainerProfileResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ContainerProfileResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ControllerAPIInfoResult": { - "type": "object", - "properties": { - "addresses": { - "type": "array", - "items": { - "type": "string" - } - }, - "cacert": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "addresses", - "cacert" - ] - }, - "ControllerAPIInfoResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ControllerAPIInfoResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ControllerConfigResult": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "DeviceBridgeInfo": { - "type": "object", - "properties": { - "bridge-name": { - "type": "string" - }, - "host-device-name": { - "type": "string" - }, - "mac-address": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "host-device-name", - "bridge-name", - "mac-address" - ] - }, - "DistributionGroupResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "DistributionGroupResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/DistributionGroupResult" - } - } - }, - "additionalProperties": false, - "required": [ - "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" - ] - }, - "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": { - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "FindToolsParams": { - "type": "object", - "properties": { - "agentstream": { - "type": "string" - }, - "arch": { - "type": "string" - }, - "major": { - "type": "integer" - }, - "number": { - "$ref": "#/definitions/Number" - }, - "os-type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "number", - "major", - "arch", - "os-type", - "agentstream" - ] - }, - "FindToolsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "list": { - "type": "array", - "items": { - "$ref": "#/definitions/Tools" - } - } - }, - "additionalProperties": false, - "required": [ - "list" - ] - }, - "HardwareCharacteristics": { - "type": "object", - "properties": { - "arch": { - "type": "string" - }, - "availability-zone": { - "type": "string" - }, - "cpu-cores": { - "type": "integer" - }, - "cpu-power": { - "type": "integer" - }, - "mem": { - "type": "integer" - }, - "root-disk": { - "type": "integer" - }, - "root-disk-source": { - "type": "string" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "virt-type": { - "type": "string" - } - }, - "additionalProperties": false - }, - "HostNetworkChange": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "new-bridges": { - "type": "array", - "items": { - "$ref": "#/definitions/DeviceBridgeInfo" - } - }, - "reconfigure-delay": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "new-bridges", - "reconfigure-delay" - ] - }, - "HostNetworkChangeResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/HostNetworkChange" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "HostPort": { - "type": "object", - "properties": { - "Address": { - "$ref": "#/definitions/Address" - }, - "cidr": { - "type": "string" - }, - "config-type": { - "type": "string" - }, - "is-secondary": { - "type": "boolean" - }, - "port": { - "type": "integer" - }, - "scope": { - "type": "string" - }, - "space-id": { - "type": "string" - }, - "space-name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "value", - "type", - "scope", - "Address", - "port" - ] - }, - "InstanceInfo": { - "type": "object", - "properties": { - "characteristics": { - "$ref": "#/definitions/HardwareCharacteristics" - }, - "charm-profiles": { - "type": "array", - "items": { - "type": "string" - } - }, - "display-name": { - "type": "string" - }, - "instance-id": { - "type": "string" - }, - "network-config": { - "type": "array", - "items": { - "$ref": "#/definitions/NetworkConfig" - } - }, - "nonce": { - "type": "string" - }, - "tag": { - "type": "string" - }, - "volume-attachments": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/VolumeAttachmentInfo" - } - } - }, - "volumes": { - "type": "array", - "items": { - "$ref": "#/definitions/Volume" - } - } - }, - "additionalProperties": false, - "required": [ - "tag", - "instance-id", - "display-name", - "nonce", - "characteristics", - "volumes", - "volume-attachments", - "network-config", - "charm-profiles" - ] - }, - "InstancesInfo": { - "type": "object", - "properties": { - "machines": { - "type": "array", - "items": { - "$ref": "#/definitions/InstanceInfo" - } - } - }, - "additionalProperties": false, - "required": [ - "machines" - ] - }, - "LifeResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "life": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "life" - ] - }, - "LifeResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/LifeResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "MachineContainerResult": { - "type": "object", - "properties": { - "container-types": { - "type": "array", - "items": { - "type": "string" - } - }, - "determined": { - "type": "boolean" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "container-types", - "determined" - ] - }, - "MachineContainerResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/MachineContainerResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "MachineContainers": { - "type": "object", - "properties": { - "container-types": { - "type": "array", - "items": { - "type": "string" - } - }, - "machine-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "machine-tag", - "container-types" - ] - }, - "MachineContainersParams": { - "type": "object", - "properties": { - "params": { - "type": "array", - "items": { - "$ref": "#/definitions/MachineContainers" - } - } - }, - "additionalProperties": false, - "required": [ - "params" - ] - }, - "MachineNetworkConfigResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "info": { - "type": "array", - "items": { - "$ref": "#/definitions/NetworkConfig" - } - } - }, - "additionalProperties": false, - "required": [ - "info" - ] - }, - "MachineNetworkConfigResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/MachineNetworkConfigResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ModelConfigResult": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "NetworkConfig": { - "type": "object", - "properties": { - "address": { - "type": "string" - }, - "addresses": { - "type": "array", - "items": { - "$ref": "#/definitions/Address" - } - }, - "cidr": { - "type": "string" - }, - "config-type": { - "type": "string" - }, - "device-index": { - "type": "integer" - }, - "disabled": { - "type": "boolean" - }, - "dns-search-domains": { - "type": "array", - "items": { - "type": "string" - } - }, - "dns-servers": { - "type": "array", - "items": { - "type": "string" - } - }, - "gateway-address": { - "type": "string" - }, - "interface-name": { - "type": "string" - }, - "interface-type": { - "type": "string" - }, - "is-default-gateway": { - "type": "boolean" - }, - "mac-address": { - "type": "string" - }, - "mtu": { - "type": "integer" - }, - "no-auto-start": { - "type": "boolean" - }, - "origin": { - "type": "string" - }, - "parent-interface-name": { - "type": "string" - }, - "provider-address-id": { - "type": "string" - }, - "provider-id": { - "type": "string" - }, - "provider-network-id": { - "type": "string" - }, - "provider-space-id": { - "type": "string" - }, - "provider-subnet-id": { - "type": "string" - }, - "provider-vlan-id": { - "type": "string" - }, - "routes": { - "type": "array", - "items": { - "$ref": "#/definitions/NetworkRoute" - } - }, - "shadow-addresses": { - "type": "array", - "items": { - "$ref": "#/definitions/Address" - } - }, - "virtual-port-type": { - "type": "string" - }, - "vlan-tag": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "device-index", - "mac-address", - "cidr", - "mtu", - "provider-id", - "provider-network-id", - "provider-subnet-id", - "provider-space-id", - "provider-address-id", - "provider-vlan-id", - "vlan-tag", - "interface-name", - "parent-interface-name", - "interface-type", - "disabled" - ] - }, - "NetworkRoute": { - "type": "object", - "properties": { - "destination-cidr": { - "type": "string" - }, - "gateway-ip": { - "type": "string" - }, - "metric": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "destination-cidr", - "gateway-ip", - "metric" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "Number": { - "type": "object", - "properties": { - "Build": { - "type": "integer" - }, - "Major": { - "type": "integer" - }, - "Minor": { - "type": "integer" - }, - "Patch": { - "type": "integer" - }, - "Tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Major", - "Minor", - "Tag", - "Patch", - "Build" - ] - }, - "ProvisioningInfo": { - "type": "object", - "properties": { - "ProvisioningNetworkTopology": { - "$ref": "#/definitions/ProvisioningNetworkTopology" - }, - "base": { - "$ref": "#/definitions/Base" - }, - "charm-lxd-profiles": { - "type": "array", - "items": { - "type": "string" - } - }, - "cloudinit-userdata": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "constraints": { - "$ref": "#/definitions/Value" - }, - "controller-config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "endpoint-bindings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "image-metadata": { - "type": "array", - "items": { - "$ref": "#/definitions/CloudImageMetadata" - } - }, - "jobs": { - "type": "array", - "items": { - "type": "string" - } - }, - "placement": { - "type": "string" - }, - "root-disk": { - "$ref": "#/definitions/VolumeParams" - }, - "space-subnets": { - "type": "object", - "patternProperties": { - ".*": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "subnet-zones": { - "type": "object", - "patternProperties": { - ".*": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "tags": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "volume-attachments": { - "type": "array", - "items": { - "$ref": "#/definitions/VolumeAttachmentParams" - } - }, - "volumes": { - "type": "array", - "items": { - "$ref": "#/definitions/VolumeParams" - } - } - }, - "additionalProperties": false, - "required": [ - "constraints", - "base", - "placement", - "jobs", - "subnet-zones", - "space-subnets", - "ProvisioningNetworkTopology" - ] - }, - "ProvisioningInfoResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/ProvisioningInfo" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "ProvisioningInfoResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ProvisioningInfoResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ProvisioningNetworkTopology": { - "type": "object", - "properties": { - "space-subnets": { - "type": "object", - "patternProperties": { - ".*": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "subnet-zones": { - "type": "object", - "patternProperties": { - ".*": { - "type": "array", - "items": { - "type": "string" - } - } - } - } - }, - "additionalProperties": false, - "required": [ - "subnet-zones", - "space-subnets" - ] - }, - "SetMachineNetworkConfig": { - "type": "object", - "properties": { - "config": { - "type": "array", - "items": { - "$ref": "#/definitions/NetworkConfig" - } - }, - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "config" - ] - }, - "SetProfileArg": { - "type": "object", - "properties": { - "entity": { - "$ref": "#/definitions/Entity" - }, - "profiles": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "entity", - "profiles" - ] - }, - "SetProfileArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/SetProfileArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "SetStatus": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityStatusArgs" - } - } - }, - "additionalProperties": false, - "required": [ - "entities" - ] - }, - "Settings": { - "type": "object", - "properties": { - "AutoNoProxy": { - "type": "string" - }, - "Ftp": { - "type": "string" - }, - "Http": { - "type": "string" - }, - "Https": { - "type": "string" - }, - "NoProxy": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Http", - "Https", - "Ftp", - "NoProxy", - "AutoNoProxy" - ] - }, - "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": [ - "id", - "life", - "status", - "info", - "data", - "since" - ] - }, - "StatusResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StatusResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "StringResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "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": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "StringsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringsResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "StringsWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id" - ] - }, - "StringsWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringsWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "Tools": { - "type": "object", - "properties": { - "sha256": { - "type": "string" - }, - "size": { - "type": "integer" - }, - "url": { - "type": "string" - }, - "version": { - "$ref": "#/definitions/Binary" - } - }, - "additionalProperties": false, - "required": [ - "version", - "url", - "size" - ] - }, - "ToolsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "tools": { - "type": "array", - "items": { - "$ref": "#/definitions/Tools" - } - } - }, - "additionalProperties": false, - "required": [ - "tools" - ] - }, - "ToolsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ToolsResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "UpdateBehavior": { - "type": "object", - "properties": { - "enable-os-refresh-update": { - "type": "boolean" - }, - "enable-os-upgrade": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "enable-os-refresh-update", - "enable-os-upgrade" - ] - }, - "Value": { - "type": "object", - "properties": { - "allocate-public-ip": { - "type": "boolean" - }, - "arch": { - "type": "string" - }, - "container": { - "type": "string" - }, - "cores": { - "type": "integer" - }, - "cpu-power": { - "type": "integer" - }, - "instance-role": { - "type": "string" - }, - "instance-type": { - "type": "string" - }, - "mem": { - "type": "integer" - }, - "root-disk": { - "type": "integer" - }, - "root-disk-source": { - "type": "string" - }, - "spaces": { - "type": "array", - "items": { - "type": "string" - } - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "virt-type": { - "type": "string" - }, - "zones": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "Volume": { - "type": "object", - "properties": { - "info": { - "$ref": "#/definitions/VolumeInfo" - }, - "volume-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "volume-tag", - "info" - ] - }, - "VolumeAttachmentInfo": { - "type": "object", - "properties": { - "bus-address": { - "type": "string" - }, - "device-link": { - "type": "string" - }, - "device-name": { - "type": "string" - }, - "plan-info": { - "$ref": "#/definitions/VolumeAttachmentPlanInfo" - }, - "read-only": { - "type": "boolean" - } - }, - "additionalProperties": false - }, - "VolumeAttachmentParams": { - "type": "object", - "properties": { - "instance-id": { - "type": "string" - }, - "machine-tag": { - "type": "string" - }, - "provider": { - "type": "string" - }, - "read-only": { - "type": "boolean" - }, - "volume-id": { - "type": "string" - }, - "volume-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "volume-tag", - "machine-tag", - "provider" - ] - }, - "VolumeAttachmentPlanInfo": { - "type": "object", - "properties": { - "device-attributes": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "device-type": { - "type": "string" - } - }, - "additionalProperties": false - }, - "VolumeInfo": { - "type": "object", - "properties": { - "hardware-id": { - "type": "string" - }, - "persistent": { - "type": "boolean" - }, - "pool": { - "type": "string" - }, - "size": { - "type": "integer" - }, - "volume-id": { - "type": "string" - }, - "wwn": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "volume-id", - "size", - "persistent" - ] - }, - "VolumeParams": { - "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" - } - } - }, - "volume-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "volume-tag", - "size", - "provider" - ] - }, - "WatchContainer": { - "type": "object", - "properties": { - "container-type": { - "type": "string" - }, - "machine-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "machine-tag", - "container-type" - ] - }, - "WatchContainers": { - "type": "object", - "properties": { - "params": { - "type": "array", - "items": { - "$ref": "#/definitions/WatchContainer" - } - } - }, - "additionalProperties": false, - "required": [ - "params" - ] - } - } - } - }, - { - "Name": "ProxyUpdater", - "Description": "API provides the ProxyUpdater version 2 facade.", - "Version": 2, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "ProxyConfig": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ProxyConfigResults" - } - }, - "description": "ProxyConfig returns the proxy settings for the current model." - }, - "WatchForProxyConfigAndAPIHostPortChanges": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "WatchForProxyConfigAndAPIHostPortChanges watches for changes to the proxy and api host port settings." - } - }, - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "NotifyWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ProxyConfig": { - "type": "object", - "properties": { - "ftp": { - "type": "string" - }, - "http": { - "type": "string" - }, - "https": { - "type": "string" - }, - "no-proxy": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "http", - "https", - "ftp", - "no-proxy" - ] - }, - "ProxyConfigResult": { - "type": "object", - "properties": { - "apt-mirror": { - "type": "string" - }, - "apt-proxy-settings": { - "$ref": "#/definitions/ProxyConfig" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "juju-proxy-settings": { - "$ref": "#/definitions/ProxyConfig" - }, - "legacy-proxy-settings": { - "$ref": "#/definitions/ProxyConfig" - }, - "snap-proxy-settings": { - "$ref": "#/definitions/ProxyConfig" - }, - "snap-store-assertions": { - "type": "string" - }, - "snap-store-id": { - "type": "string" - }, - "snap-store-proxy-url": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "legacy-proxy-settings", - "juju-proxy-settings" - ] - }, - "ProxyConfigResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ProxyConfigResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - } - } - } - }, - { - "Name": "RaftLease", - "Description": "", - "Version": 2, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "ApplyLease": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/LeaseOperationsV2" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - } - } - }, - "definitions": { - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "LeaseOperationCommand": { - "type": "object", - "properties": { - "duration": { - "type": "integer" - }, - "holder": { - "type": "string" - }, - "lease": { - "type": "string" - }, - "model-uuid": { - "type": "string" - }, - "namespace": { - "type": "string" - }, - "new-time": { - "type": "string", - "format": "date-time" - }, - "old-time": { - "type": "string", - "format": "date-time" - }, - "operation": { - "type": "string" - }, - "pin-entity": { - "type": "string" - }, - "version": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "version", - "operation" - ] - }, - "LeaseOperationsV2": { - "type": "object", - "properties": { - "commands": { - "type": "array", - "items": { - "$ref": "#/definitions/LeaseOperationCommand" - } - } - }, - "additionalProperties": false, - "required": [ - "commands" - ] - } - } - } - }, - { - "Name": "Reboot", - "Description": "RebootAPI provides access to the Upgrader API facade.", - "Version": 2, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent" - ], - "Schema": { - "type": "object", - "properties": { - "ClearReboot": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "ClearReboot will clear the reboot flag on provided machines, if it exists." - }, - "GetRebootAction": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/RebootActionResults" - } - }, - "description": "GetRebootAction returns the action a machine agent should take.\nIf a reboot flag is set on the machine, then that machine is\nexpected to reboot (params.ShouldReboot).\na reboot flag set on the machine parent or grandparent, will\ncause the machine to shutdown (params.ShouldShutdown).\nIf no reboot flag is set, the machine should do nothing (params.ShouldDoNothing)." - }, - "RequestReboot": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "RequestReboot sets the reboot flag on the provided machines" - }, - "WatchForRebootEvent": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResult" - } - }, - "description": "WatchForRebootEvent starts a watcher to track if there is a new\nreboot request on the machines ID or any of its parents (in case we are a container)." - } - }, - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "RebootActionResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "string" - } - }, - "additionalProperties": false - }, - "RebootActionResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/RebootActionResult" - } - } - }, - "additionalProperties": false - } - } - } - }, - { - "Name": "RelationStatusWatcher", - "Description": "srvRelationStatusWatcher defines the API wrapping a state.RelationStatusWatcher.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "Next": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/RelationLifeSuspendedStatusWatchResult" - } - }, - "description": "Next returns when a change has occurred to an entity of the\ncollection being watched since the most recent call to Next\nor the Watch call that created the srvRelationStatusWatcher." - }, - "Stop": { - "type": "object", - "description": "Stop stops the watcher." - } - }, - "definitions": { - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "RelationLifeSuspendedStatusChange": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "life": { - "type": "string" - }, - "suspended": { - "type": "boolean" - }, - "suspended-reason": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "key", - "life", - "suspended", - "suspended-reason" - ] - }, - "RelationLifeSuspendedStatusWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "$ref": "#/definitions/RelationLifeSuspendedStatusChange" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id", - "changes" - ] - } - } - } - }, - { - "Name": "RelationUnitsWatcher", - "Description": "srvRelationUnitsWatcher defines the API wrapping a state.RelationUnitsWatcher.\nIt notifies about units entering and leaving the scope of a RelationUnit,\nand changes to the settings of those units known to have entered.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "Next": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/RelationUnitsWatchResult" - } - }, - "description": "Next returns when a change has occurred to an entity of the\ncollection being watched since the most recent call to Next\nor the Watch call that created the srvRelationUnitsWatcher." - }, - "Stop": { - "type": "object", - "description": "Stop stops the watcher." - } - }, - "definitions": { - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "RelationUnitsChange": { - "type": "object", - "properties": { - "app-changed": { - "type": "object", - "patternProperties": { - ".*": { - "type": "integer" - } - } - }, - "changed": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/UnitSettings" - } - } - }, - "departed": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "changed" - ] - }, - "RelationUnitsWatchResult": { - "type": "object", - "properties": { - "changes": { - "$ref": "#/definitions/RelationUnitsChange" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id", - "changes" - ] - }, - "UnitSettings": { - "type": "object", - "properties": { - "version": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "version" - ] - } - } - } - }, - { - "Name": "RemoteRelationWatcher", - "Description": "srvRemoteRelationWatcher defines the API wrapping a\nstate.RelationUnitsWatcher but serving the events it emits as\nfully-expanded params.RemoteRelationChangeEvents so they can be\nused across model/controller boundaries.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "Next": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/RemoteRelationWatchResult" - } - } - }, - "Stop": { - "type": "object", - "description": "Stop stops the watcher." - } - }, - "definitions": { - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "Macaroon": { - "type": "object", - "additionalProperties": false - }, - "RemoteRelationChangeEvent": { - "type": "object", - "properties": { - "application-settings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "application-token": { - "type": "string" - }, - "bakery-version": { - "type": "integer" - }, - "changed-units": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoteRelationUnitChange" - } - }, - "departed-units": { - "type": "array", - "items": { - "type": "integer" - } - }, - "force-cleanup": { - "type": "boolean" - }, - "life": { - "type": "string" - }, - "macaroons": { - "type": "array", - "items": { - "$ref": "#/definitions/Macaroon" - } - }, - "relation-token": { - "type": "string" - }, - "suspended": { - "type": "boolean" - }, - "suspended-reason": { - "type": "string" - }, - "unit-count": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "relation-token", - "application-token", - "life", - "unit-count" - ] - }, - "RemoteRelationUnitChange": { - "type": "object", - "properties": { - "settings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "unit-id": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "unit-id" - ] - }, - "RemoteRelationWatchResult": { - "type": "object", - "properties": { - "changes": { - "$ref": "#/definitions/RemoteRelationChangeEvent" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id", - "changes" - ] - } - } - } - }, - { - "Name": "RemoteRelations", - "Description": "API provides access to the remote relations API facade.", - "Version": 2, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "ConsumeRemoteRelationChanges": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RemoteRelationsChanges" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "ConsumeRemoteRelationChanges consumes changes to settings originating\nfrom the remote/offering side of relations." - }, - "ControllerAPIInfoForModels": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ControllerAPIInfoResults" - } - }, - "description": "ControllerAPIInfoForModels returns the controller api connection details for the specified models." - }, - "ControllerConfig": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ControllerConfigResult" - } - }, - "description": "ControllerConfig returns the controller's configuration." - }, - "ExportEntities": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/TokenResults" - } - }, - "description": "ExportEntities allocates unique, remote entity IDs for the given entities in the local model." - }, - "GetTokens": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/GetTokenArgs" - }, - "Result": { - "$ref": "#/definitions/StringResults" - } - }, - "description": "GetTokens returns the token associated with the entities with the given tags for the given models." - }, - "ImportRemoteEntities": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RemoteEntityTokenArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "ImportRemoteEntities adds entities to the remote entities collection with the specified opaque tokens." - }, - "Relations": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/RemoteRelationResults" - } - }, - "description": "Relations returns information about the cross-model relations with the specified keys\nin the local model." - }, - "RemoteApplications": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/RemoteApplicationResults" - } - }, - "description": "RemoteApplications returns the current state of the remote applications with\nthe specified names in the local model." - }, - "SaveMacaroons": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/EntityMacaroonArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SaveMacaroons saves the macaroons for the given entities." - }, - "SetRemoteApplicationsStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetStatus" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetRemoteApplicationsStatus sets the status for the specified remote applications." - }, - "UpdateControllersForModels": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/UpdateControllersForModelsParams" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "UpdateControllersForModels changes the external controller records for the\nassociated model entities. This is used when the remote relations worker gets\nredirected following migration of an offering model." - }, - "WatchLocalRelationChanges": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/RemoteRelationWatchResults" - } - }, - "description": "WatchLocalRelationChanges starts a RemoteRelationWatcher for each\nspecified relation, returning the watcher IDs and initial values,\nor an error if the remote relations couldn't be watched." - }, - "WatchRemoteApplicationRelations": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - }, - "description": "WatchRemoteApplicationRelations starts a StringsWatcher for watching the relations of\neach specified application in the local model, and returns the watcher IDs\nand initial values, or an error if the services' relations could not be\nwatched." - }, - "WatchRemoteApplications": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsWatchResult" - } - }, - "description": "WatchRemoteApplications starts a strings watcher that notifies of the addition,\nremoval, and lifecycle changes of remote applications in the model; and\nreturns the watcher ID and initial IDs of remote applications, or an error if\nwatching failed." - }, - "WatchRemoteRelations": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsWatchResult" - } - }, - "description": "WatchRemoteRelations starts a strings watcher that notifies of the addition,\nremoval, and lifecycle changes of remote relations in the model; and\nreturns the watcher ID and initial IDs of remote relations, or an error if\nwatching failed." - } - }, - "definitions": { - "ControllerAPIInfoResult": { - "type": "object", - "properties": { - "addresses": { - "type": "array", - "items": { - "type": "string" - } - }, - "cacert": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "addresses", - "cacert" - ] - }, - "ControllerAPIInfoResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ControllerAPIInfoResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ControllerConfigResult": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "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" - ] - }, - "EntityMacaroonArg": { - "type": "object", - "properties": { - "macaroon": { - "$ref": "#/definitions/Macaroon" - }, - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "macaroon", - "tag" - ] - }, - "EntityMacaroonArgs": { - "type": "object", - "properties": { - "Args": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityMacaroonArg" - } - } - }, - "additionalProperties": false, - "required": [ - "Args" - ] - }, - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ExternalControllerInfo": { - "type": "object", - "properties": { - "addrs": { - "type": "array", - "items": { - "type": "string" - } - }, - "ca-cert": { - "type": "string" - }, - "controller-alias": { - "type": "string" - }, - "controller-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "controller-tag", - "controller-alias", - "addrs", - "ca-cert" - ] - }, - "GetTokenArg": { - "type": "object", - "properties": { - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag" - ] - }, - "GetTokenArgs": { - "type": "object", - "properties": { - "Args": { - "type": "array", - "items": { - "$ref": "#/definitions/GetTokenArg" - } - } - }, - "additionalProperties": false, - "required": [ - "Args" - ] - }, - "Macaroon": { - "type": "object", - "additionalProperties": false - }, - "RemoteApplication": { - "type": "object", - "properties": { - "consume-version": { - "type": "integer" - }, - "is-consumer-proxy": { - "type": "boolean" - }, - "life": { - "type": "string" - }, - "macaroon": { - "$ref": "#/definitions/Macaroon" - }, - "model-uuid": { - "type": "string" - }, - "name": { - "type": "string" - }, - "offer-uuid": { - "type": "string" - }, - "status": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "offer-uuid", - "model-uuid", - "is-consumer-proxy" - ] - }, - "RemoteApplicationResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/RemoteApplication" - } - }, - "additionalProperties": false - }, - "RemoteApplicationResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoteApplicationResult" - } - } - }, - "additionalProperties": false - }, - "RemoteEndpoint": { - "type": "object", - "properties": { - "interface": { - "type": "string" - }, - "limit": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "role": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "role", - "interface", - "limit" - ] - }, - "RemoteEntityTokenArg": { - "type": "object", - "properties": { - "tag": { - "type": "string" - }, - "token": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag" - ] - }, - "RemoteEntityTokenArgs": { - "type": "object", - "properties": { - "Args": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoteEntityTokenArg" - } - } - }, - "additionalProperties": false, - "required": [ - "Args" - ] - }, - "RemoteRelation": { - "type": "object", - "properties": { - "application-name": { - "type": "string" - }, - "endpoint": { - "$ref": "#/definitions/RemoteEndpoint" - }, - "id": { - "type": "integer" - }, - "key": { - "type": "string" - }, - "life": { - "type": "string" - }, - "remote-application-name": { - "type": "string" - }, - "remote-endpoint-name": { - "type": "string" - }, - "source-model-uuid": { - "type": "string" - }, - "suspended": { - "type": "boolean" - }, - "unit-count": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "life", - "suspended", - "id", - "key", - "application-name", - "endpoint", - "unit-count", - "remote-application-name", - "remote-endpoint-name", - "source-model-uuid" - ] - }, - "RemoteRelationChangeEvent": { - "type": "object", - "properties": { - "application-settings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "application-token": { - "type": "string" - }, - "bakery-version": { - "type": "integer" - }, - "changed-units": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoteRelationUnitChange" - } - }, - "departed-units": { - "type": "array", - "items": { - "type": "integer" - } - }, - "force-cleanup": { - "type": "boolean" - }, - "life": { - "type": "string" - }, - "macaroons": { - "type": "array", - "items": { - "$ref": "#/definitions/Macaroon" - } - }, - "relation-token": { - "type": "string" - }, - "suspended": { - "type": "boolean" - }, - "suspended-reason": { - "type": "string" - }, - "unit-count": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "relation-token", - "application-token", - "life", - "unit-count" - ] - }, - "RemoteRelationResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/RemoteRelation" - } - }, - "additionalProperties": false - }, - "RemoteRelationResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoteRelationResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "RemoteRelationUnitChange": { - "type": "object", - "properties": { - "settings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "unit-id": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "unit-id" - ] - }, - "RemoteRelationWatchResult": { - "type": "object", - "properties": { - "changes": { - "$ref": "#/definitions/RemoteRelationChangeEvent" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id", - "changes" - ] - }, - "RemoteRelationWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoteRelationWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "RemoteRelationsChanges": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoteRelationChangeEvent" - } - } - }, - "additionalProperties": false - }, - "SetStatus": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityStatusArgs" - } - } - }, - "additionalProperties": false, - "required": [ - "entities" - ] - }, - "StringResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "StringResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "StringsWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id" - ] - }, - "StringsWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringsWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "TokenResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "token": { - "type": "string" - } - }, - "additionalProperties": false - }, - "TokenResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/TokenResult" - } - } - }, - "additionalProperties": false - }, - "UpdateControllerForModel": { - "type": "object", - "properties": { - "info": { - "$ref": "#/definitions/ExternalControllerInfo" - }, - "model-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "model-tag", - "info" - ] - }, - "UpdateControllersForModelsParams": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "$ref": "#/definitions/UpdateControllerForModel" - } - } - }, - "additionalProperties": false, - "required": [ - "changes" - ] - } - } - } - }, - { - "Name": "Resources", - "Description": "API is the public API facade for resources.", - "Version": 3, - "AvailableTo": [ - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "AddPendingResources": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/AddPendingResourcesArgsV2" - }, - "Result": { - "$ref": "#/definitions/AddPendingResourcesResult" - } - }, - "description": "AddPendingResources adds the provided resources (info) to the Juju\nmodel in a pending state, meaning they are not available until\nresolved. Handles CharmHub and Local charms." - }, - "ListResources": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ListResourcesArgs" - }, - "Result": { - "$ref": "#/definitions/ResourcesResults" - } - }, - "description": "ListResources returns the list of resources for the given application." - } - }, - "definitions": { - "AddPendingResourcesArgsV2": { - "type": "object", - "properties": { - "Entity": { - "$ref": "#/definitions/Entity" - }, - "charm-origin": { - "$ref": "#/definitions/CharmOrigin" - }, - "macaroon": { - "$ref": "#/definitions/Macaroon" - }, - "resources": { - "type": "array", - "items": { - "$ref": "#/definitions/CharmResource" - } - }, - "tag": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "Entity", - "url", - "charm-origin", - "macaroon", - "resources" - ] - }, - "AddPendingResourcesResult": { - "type": "object", - "properties": { - "ErrorResult": { - "$ref": "#/definitions/ErrorResult" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "pending-ids": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "ErrorResult", - "pending-ids" - ] - }, - "Base": { - "type": "object", - "properties": { - "channel": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "channel" - ] - }, - "CharmOrigin": { - "type": "object", - "properties": { - "architecture": { - "type": "string" - }, - "base": { - "$ref": "#/definitions/Base" - }, - "branch": { - "type": "string" - }, - "hash": { - "type": "string" - }, - "id": { - "type": "string" - }, - "instance-key": { - "type": "string" - }, - "revision": { - "type": "integer" - }, - "risk": { - "type": "string" - }, - "source": { - "type": "string" - }, - "track": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "source", - "type", - "id" - ] - }, - "CharmResource": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "fingerprint": { - "type": "array", - "items": { - "type": "integer" - } - }, - "name": { - "type": "string" - }, - "origin": { - "type": "string" - }, - "path": { - "type": "string" - }, - "revision": { - "type": "integer" - }, - "size": { - "type": "integer" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "type", - "path", - "origin", - "revision", - "fingerprint", - "size" - ] - }, - "Entity": { - "type": "object", - "properties": { - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ListResourcesArgs": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } - } - }, - "additionalProperties": false, - "required": [ - "entities" - ] - }, - "Macaroon": { - "type": "object", - "additionalProperties": false - }, - "Resource": { - "type": "object", - "properties": { - "CharmResource": { - "$ref": "#/definitions/CharmResource" - }, - "application": { - "type": "string" - }, - "description": { - "type": "string" - }, - "fingerprint": { - "type": "array", - "items": { - "type": "integer" - } - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "origin": { - "type": "string" - }, - "path": { - "type": "string" - }, - "pending-id": { - "type": "string" - }, - "revision": { - "type": "integer" - }, - "size": { - "type": "integer" - }, - "timestamp": { - "type": "string", - "format": "date-time" - }, - "type": { - "type": "string" - }, - "username": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "type", - "path", - "origin", - "revision", - "fingerprint", - "size", - "CharmResource", - "id", - "pending-id", - "application", - "username", - "timestamp" - ] - }, - "ResourcesResult": { - "type": "object", - "properties": { - "ErrorResult": { - "$ref": "#/definitions/ErrorResult" - }, - "charm-store-resources": { - "type": "array", - "items": { - "$ref": "#/definitions/CharmResource" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "resources": { - "type": "array", - "items": { - "$ref": "#/definitions/Resource" - } - }, - "unit-resources": { - "type": "array", - "items": { - "$ref": "#/definitions/UnitResources" - } - } - }, - "additionalProperties": false, - "required": [ - "ErrorResult", - "resources", - "charm-store-resources", - "unit-resources" - ] - }, - "ResourcesResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ResourcesResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "UnitResources": { - "type": "object", - "properties": { - "Entity": { - "$ref": "#/definitions/Entity" - }, - "download-progress": { - "type": "object", - "patternProperties": { - ".*": { - "type": "integer" - } - } - }, - "resources": { - "type": "array", - "items": { - "$ref": "#/definitions/Resource" - } - }, - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "Entity", - "resources", - "download-progress" - ] - } - } - } - }, - { - "Name": "ResourcesHookContext", - "Description": "UnitFacade is the resources portion of the uniter's API facade.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "GetResourceInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ListUnitResourcesArgs" - }, - "Result": { - "$ref": "#/definitions/UnitResourcesResult" - } - }, - "description": "GetResourceInfo returns the resource info for each of the given\nresource names (for the implicit application). If any one is missing then\nthe corresponding result is set with errors.NotFound." - } - }, - "definitions": { - "CharmResource": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "fingerprint": { - "type": "array", - "items": { - "type": "integer" - } - }, - "name": { - "type": "string" - }, - "origin": { - "type": "string" - }, - "path": { - "type": "string" - }, - "revision": { - "type": "integer" - }, - "size": { - "type": "integer" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "type", - "path", - "origin", - "revision", - "fingerprint", - "size" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ListUnitResourcesArgs": { - "type": "object", - "properties": { - "resource-names": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "resource-names" - ] - }, - "Resource": { - "type": "object", - "properties": { - "CharmResource": { - "$ref": "#/definitions/CharmResource" - }, - "application": { - "type": "string" - }, - "description": { - "type": "string" - }, - "fingerprint": { - "type": "array", - "items": { - "type": "integer" - } - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "origin": { - "type": "string" - }, - "path": { - "type": "string" - }, - "pending-id": { - "type": "string" - }, - "revision": { - "type": "integer" - }, - "size": { - "type": "integer" - }, - "timestamp": { - "type": "string", - "format": "date-time" - }, - "type": { - "type": "string" - }, - "username": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "type", - "path", - "origin", - "revision", - "fingerprint", - "size", - "CharmResource", - "id", - "pending-id", - "application", - "username", - "timestamp" - ] - }, - "UnitResourceResult": { - "type": "object", - "properties": { - "ErrorResult": { - "$ref": "#/definitions/ErrorResult" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "resource": { - "$ref": "#/definitions/Resource" - } - }, - "additionalProperties": false, - "required": [ - "ErrorResult", - "resource" - ] - }, - "UnitResourcesResult": { - "type": "object", - "properties": { - "ErrorResult": { - "$ref": "#/definitions/ErrorResult" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "resources": { - "type": "array", - "items": { - "$ref": "#/definitions/UnitResourceResult" - } - } - }, - "additionalProperties": false, - "required": [ - "ErrorResult", - "resources" - ] - } - } - } - }, - { - "Name": "RetryStrategy", - "Description": "RetryStrategyAPI implements RetryStrategy", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "RetryStrategy": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/RetryStrategyResults" - } - }, - "description": "RetryStrategy returns RetryStrategyResults that can be used by any code that uses\nto configure the retry timer that's currently in juju utils." - }, - "WatchRetryStrategy": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "WatchRetryStrategy watches for changes to the model. Currently we only allow\nchanges to the boolean that determines whether retries should be attempted or not." - } - }, - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "NotifyWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "RetryStrategy": { - "type": "object", - "properties": { - "jitter-retry-time": { - "type": "boolean" - }, - "max-retry-time": { - "type": "integer" - }, - "min-retry-time": { - "type": "integer" - }, - "retry-time-factor": { - "type": "integer" - }, - "should-retry": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "should-retry", - "min-retry-time", - "max-retry-time", - "jitter-retry-time", - "retry-time-factor" - ] - }, - "RetryStrategyResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/RetryStrategy" - } - }, - "additionalProperties": false - }, - "RetryStrategyResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/RetryStrategyResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - } - } - } - }, - { - "Name": "SSHClient", - "Description": "Facade implements the API required by the sshclient worker.", - "Version": 4, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "AllAddresses": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/SSHAddressesResults" - } - }, - "description": "AllAddresses reports all addresses that might have SSH listening for each\nentity in args. The result is sorted with public addresses first.\nMachines and units are supported as entity types." - }, - "ModelCredentialForSSH": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/CloudSpecResult" - } - }, - "description": "ModelCredentialForSSH returns a cloud spec for ssh purpose.\nThis facade call is only used for k8s model." - }, - "PrivateAddress": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/SSHAddressResults" - } - }, - "description": "PrivateAddress reports the preferred private network address for one or\nmore entities. Machines and units are supported." - }, - "Proxy": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/SSHProxyResult" - } - }, - "description": "Proxy returns whether SSH connections should be proxied through the\ncontroller hosts for the model associated with the API connection." - }, - "PublicAddress": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/SSHAddressResults" - } - }, - "description": "PublicAddress reports the preferred public network address for one\nor more entities. Machines and units are supported." - }, - "PublicKeys": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/SSHPublicKeysResults" - } - }, - "description": "PublicKeys returns the public SSH hosts for one or more\nentities. Machines and units are supported." - } - }, - "definitions": { - "CloudCredential": { - "type": "object", - "properties": { - "attrs": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "auth-type": { - "type": "string" - }, - "redacted": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "auth-type" - ] - }, - "CloudSpec": { - "type": "object", - "properties": { - "cacertificates": { - "type": "array", - "items": { - "type": "string" - } - }, - "credential": { - "$ref": "#/definitions/CloudCredential" - }, - "endpoint": { - "type": "string" - }, - "identity-endpoint": { - "type": "string" - }, - "is-controller-cloud": { - "type": "boolean" - }, - "name": { - "type": "string" - }, - "region": { - "type": "string" - }, - "skip-tls-verify": { - "type": "boolean" - }, - "storage-endpoint": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type", - "name" - ] - }, - "CloudSpecResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/CloudSpec" - } - }, - "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": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "SSHAddressResult": { - "type": "object", - "properties": { - "address": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "SSHAddressResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/SSHAddressResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "SSHAddressesResult": { - "type": "object", - "properties": { - "addresses": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "addresses" - ] - }, - "SSHAddressesResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/SSHAddressesResult" - } - } - }, - "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" - }, - "public-keys": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "SSHPublicKeysResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/SSHPublicKeysResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - } - } - } - }, - { - "Name": "SecretBackends", - "Description": "SecretBackendsAPI is the server implementation for the SecretBackends facade.", - "Version": 1, - "AvailableTo": [ - "controller-user" - ], - "Schema": { - "type": "object", - "properties": { - "AddSecretBackends": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/AddSecretBackendArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "AddSecretBackends adds new secret backends." - }, - "ListSecretBackends": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ListSecretBackendsArgs" - }, - "Result": { - "$ref": "#/definitions/ListSecretBackendsResults" - } - }, - "description": "ListSecretBackends lists available secret backends." - }, - "RemoveSecretBackends": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RemoveSecretBackendArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "RemoveSecretBackends removes secret backends." - }, - "UpdateSecretBackends": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/UpdateSecretBackendArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "UpdateSecretBackends updates secret backends." - } - }, - "definitions": { - "AddSecretBackendArg": { - "type": "object", - "properties": { - "SecretBackend": { - "$ref": "#/definitions/SecretBackend" - }, - "backend-type": { - "type": "string" - }, - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "token-rotate-interval": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "name", - "backend-type", - "config", - "SecretBackend" - ] - }, - "AddSecretBackendArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/AddSecretBackendArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ListSecretBackendsArgs": { - "type": "object", - "properties": { - "names": { - "type": "array", - "items": { - "type": "string" - } - }, - "reveal": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "names", - "reveal" - ] - }, - "ListSecretBackendsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/SecretBackendResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "RemoveSecretBackendArg": { - "type": "object", - "properties": { - "force": { - "type": "boolean" - }, - "name": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name" - ] - }, - "RemoveSecretBackendArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoveSecretBackendArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "SecretBackend": { - "type": "object", - "properties": { - "backend-type": { - "type": "string" - }, - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "name": { - "type": "string" - }, - "token-rotate-interval": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "name", - "backend-type", - "config" - ] - }, - "SecretBackendResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "id": { - "type": "string" - }, - "message": { - "type": "string" - }, - "num-secrets": { - "type": "integer" - }, - "result": { - "$ref": "#/definitions/SecretBackend" - }, - "status": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "result", - "id", - "num-secrets", - "status" - ] - }, - "UpdateSecretBackendArg": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "force": { - "type": "boolean" - }, - "name": { - "type": "string" - }, - "name-change": { - "type": "string" - }, - "reset": { - "type": "array", - "items": { - "type": "string" - } - }, - "token-rotate-interval": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "name", - "token-rotate-interval", - "config", - "reset" - ] - }, - "UpdateSecretBackendArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/UpdateSecretBackendArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - } - } - } - }, - { - "Name": "SecretBackendsManager", - "Description": "SecretBackendsManagerAPI is the implementation for the SecretsManager facade.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent" - ], - "Schema": { - "type": "object", - "properties": { - "RotateBackendTokens": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RotateSecretBackendArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "RotateBackendTokens rotates the tokens for the specified backends." - }, - "WatchSecretBackendsRotateChanges": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/SecretBackendRotateWatchResult" - } - }, - "description": "WatchSecretBackendsRotateChanges sets up a watcher to notify of changes to secret backend rotations." - } - }, - "definitions": { - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "RotateSecretBackendArgs": { - "type": "object", - "properties": { - "backend-ids": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "backend-ids" - ] - }, - "SecretBackendRotateChange": { - "type": "object", - "properties": { - "backend-name": { - "type": "string" - }, - "id": { - "type": "string" - }, - "next-trigger-time": { - "type": "string", - "format": "date-time" - } - }, - "additionalProperties": false, - "required": [ - "id", - "backend-name", - "next-trigger-time" - ] - }, - "SecretBackendRotateWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "$ref": "#/definitions/SecretBackendRotateChange" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id", - "changes" - ] - } - } - } - }, - { - "Name": "SecretBackendsRotateWatcher", - "Description": "srvSecretBackendsRotateWatcher defines the API wrapping a SecretBackendsRotateWatcher.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "Next": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/SecretBackendRotateWatchResult" - } - }, - "description": "Next returns when a change has occurred to an entity of the\ncollection being watched since the most recent call to Next\nor the Watch call that created the srvSecretRotationWatcher." - }, - "Stop": { - "type": "object", - "description": "Stop stops the watcher." - } - }, - "definitions": { - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "SecretBackendRotateChange": { - "type": "object", - "properties": { - "backend-name": { - "type": "string" - }, - "id": { - "type": "string" - }, - "next-trigger-time": { - "type": "string", - "format": "date-time" - } - }, - "additionalProperties": false, - "required": [ - "id", - "backend-name", - "next-trigger-time" - ] - }, - "SecretBackendRotateWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "$ref": "#/definitions/SecretBackendRotateChange" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id", - "changes" - ] - } - } - } - }, - { - "Name": "Secrets", - "Description": "SecretsAPI is the backend for the Secrets facade.", - "Version": 1, - "AvailableTo": [ - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "ListSecrets": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ListSecretsArgs" - }, - "Result": { - "$ref": "#/definitions/ListSecretResults" - } - }, - "description": "ListSecrets lists available secrets." - } - }, - "definitions": { - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ListSecretResult": { - "type": "object", - "properties": { - "create-time": { - "type": "string", - "format": "date-time" - }, - "description": { - "type": "string" - }, - "label": { - "type": "string" - }, - "latest-expire-time": { - "type": "string", - "format": "date-time" - }, - "latest-revision": { - "type": "integer" - }, - "next-rotate-time": { - "type": "string", - "format": "date-time" - }, - "owner-tag": { - "type": "string" - }, - "revisions": { - "type": "array", - "items": { - "$ref": "#/definitions/SecretRevision" - } - }, - "rotate-policy": { - "type": "string" - }, - "update-time": { - "type": "string", - "format": "date-time" - }, - "uri": { - "type": "string" - }, - "value": { - "$ref": "#/definitions/SecretValueResult" - }, - "version": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "uri", - "version", - "owner-tag", - "latest-revision", - "create-time", - "update-time", - "revisions" - ] - }, - "ListSecretResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ListSecretResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ListSecretsArgs": { - "type": "object", - "properties": { - "filter": { - "$ref": "#/definitions/SecretsFilter" - }, - "show-secrets": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "show-secrets", - "filter" - ] - }, - "SecretRevision": { - "type": "object", - "properties": { - "backend-name": { - "type": "string" - }, - "create-time": { - "type": "string", - "format": "date-time" - }, - "expire-time": { - "type": "string", - "format": "date-time" - }, - "revision": { - "type": "integer" - }, - "update-time": { - "type": "string", - "format": "date-time" - }, - "value-ref": { - "$ref": "#/definitions/SecretValueRef" - } - }, - "additionalProperties": false, - "required": [ - "revision" - ] - }, - "SecretValueRef": { - "type": "object", - "properties": { - "backend-id": { - "type": "string" - }, - "revision-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "backend-id", - "revision-id" - ] - }, - "SecretValueResult": { - "type": "object", - "properties": { - "data": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "SecretsFilter": { - "type": "object", - "properties": { - "owner-tag": { - "type": "string" - }, - "revision": { - "type": "integer" - }, - "uri": { - "type": "string" - } - }, - "additionalProperties": false - } - } - } - }, - { - "Name": "SecretsManager", - "Description": "SecretsManagerAPI is the implementation for the SecretsManager facade.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "CreateSecretURIs": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/CreateSecretURIsArg" - }, - "Result": { - "$ref": "#/definitions/StringResults" - } - }, - "description": "CreateSecretURIs creates new secret URIs." - }, - "CreateSecrets": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/CreateSecretArgs" - }, - "Result": { - "$ref": "#/definitions/StringResults" - } - }, - "description": "CreateSecrets creates new secrets." - }, - "GetConsumerSecretsRevisionInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/GetSecretConsumerInfoArgs" - }, - "Result": { - "$ref": "#/definitions/SecretConsumerInfoResults" - } - }, - "description": "GetConsumerSecretsRevisionInfo returns the latest secret revisions for the specified secrets.\nThis facade method is used for remote watcher to get the latest secret revisions and labels for a secret changed hook." - }, - "GetSecretBackendConfig": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/SecretBackendConfigResults" - } - }, - "description": "GetSecretBackendConfig gets the config needed to create a client to secret backends." - }, - "GetSecretContentInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/GetSecretContentArgs" - }, - "Result": { - "$ref": "#/definitions/SecretContentResults" - } - }, - "description": "GetSecretContentInfo returns the secret values for the specified secrets." - }, - "GetSecretMetadata": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ListSecretResults" - } - }, - "description": "GetSecretMetadata returns metadata for the caller's secrets." - }, - "GetSecretRevisionContentInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SecretRevisionArg" - }, - "Result": { - "$ref": "#/definitions/SecretContentResults" - } - }, - "description": "GetSecretRevisionContentInfo returns the secret values for the specified secret revisions." - }, - "GetSecretStoreConfig": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/SecretBackendConfig" - } - }, - "description": "GetSecretStoreConfig is for 3.0.x agents.\nTODO(wallyworld) - remove when we auto upgrade migrated models." - }, - "RemoveSecrets": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/DeleteSecretArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "RemoveSecrets removes the specified secrets." - }, - "SecretsGrant": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/GrantRevokeSecretArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SecretsGrant grants access to a secret for the specified subjects." - }, - "SecretsRevoke": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/GrantRevokeSecretArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SecretsRevoke revokes access to a secret for the specified subjects." - }, - "SecretsRotated": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SecretRotatedArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SecretsRotated records when secrets were last rotated." - }, - "UpdateSecrets": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/UpdateSecretArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "UpdateSecrets updates the specified secrets." - }, - "WatchConsumedSecretsChanges": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - }, - "description": "WatchConsumedSecretsChanges sets up a watcher to notify of changes to secret revisions for the specified consumers." - }, - "WatchObsolete": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResult" - } - }, - "description": "WatchObsolete returns a watcher for notifying when:\n - a secret owned by the entity is deleted\n - a secret revision owed by the entity no longer\n has any consumers\n\nObsolete revisions results are \"uri/revno\" and deleted\nsecret results are \"uri\"." - }, - "WatchSecretRevisionsExpiryChanges": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/SecretTriggerWatchResult" - } - }, - "description": "WatchSecretRevisionsExpiryChanges sets up a watcher to notify of changes to secret revision expiry config." - }, - "WatchSecretsRotationChanges": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/SecretTriggerWatchResult" - } - }, - "description": "WatchSecretsRotationChanges sets up a watcher to notify of changes to secret rotation config." - } - }, - "definitions": { - "CreateSecretArg": { - "type": "object", - "properties": { - "UpsertSecretArg": { - "$ref": "#/definitions/UpsertSecretArg" - }, - "content": { - "$ref": "#/definitions/SecretContentParams" - }, - "description": { - "type": "string" - }, - "expire-time": { - "type": "string", - "format": "date-time" - }, - "label": { - "type": "string" - }, - "owner-tag": { - "type": "string" - }, - "params": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "rotate-policy": { - "type": "string" - }, - "uri": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "UpsertSecretArg", - "owner-tag" - ] - }, - "CreateSecretArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/CreateSecretArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "CreateSecretURIsArg": { - "type": "object", - "properties": { - "count": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "count" - ] - }, - "DeleteSecretArg": { - "type": "object", - "properties": { - "revisions": { - "type": "array", - "items": { - "type": "integer" - } - }, - "uri": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "uri" - ] - }, - "DeleteSecretArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/DeleteSecretArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "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": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "GetSecretConsumerInfoArgs": { - "type": "object", - "properties": { - "consumer-tag": { - "type": "string" - }, - "uris": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "consumer-tag", - "uris" - ] - }, - "GetSecretContentArg": { - "type": "object", - "properties": { - "label": { - "type": "string" - }, - "peek": { - "type": "boolean" - }, - "refresh": { - "type": "boolean" - }, - "uri": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "uri" - ] - }, - "GetSecretContentArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/GetSecretContentArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "GrantRevokeSecretArg": { - "type": "object", - "properties": { - "role": { - "type": "string" - }, - "scope-tag": { - "type": "string" - }, - "subject-tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "uri": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "uri", - "scope-tag", - "subject-tags", - "role" - ] - }, - "GrantRevokeSecretArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/GrantRevokeSecretArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "ListSecretResult": { - "type": "object", - "properties": { - "create-time": { - "type": "string", - "format": "date-time" - }, - "description": { - "type": "string" - }, - "label": { - "type": "string" - }, - "latest-expire-time": { - "type": "string", - "format": "date-time" - }, - "latest-revision": { - "type": "integer" - }, - "next-rotate-time": { - "type": "string", - "format": "date-time" - }, - "owner-tag": { - "type": "string" - }, - "revisions": { - "type": "array", - "items": { - "$ref": "#/definitions/SecretRevision" - } - }, - "rotate-policy": { - "type": "string" - }, - "update-time": { - "type": "string", - "format": "date-time" - }, - "uri": { - "type": "string" - }, - "value": { - "$ref": "#/definitions/SecretValueResult" - }, - "version": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "uri", - "version", - "owner-tag", - "latest-revision", - "create-time", - "update-time", - "revisions" - ] - }, - "ListSecretResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ListSecretResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "SecretBackendConfig": { - "type": "object", - "properties": { - "params": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type" - ] - }, - "SecretBackendConfigResults": { - "type": "object", - "properties": { - "active-id": { - "type": "string" - }, - "configs": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/SecretBackendConfig" - } - } - }, - "model-controller": { - "type": "string" - }, - "model-name": { - "type": "string" - }, - "model-uuid": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "model-controller", - "model-uuid", - "model-name", - "active-id" - ] - }, - "SecretConsumerInfoResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "label": { - "type": "string" - }, - "revision": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "revision", - "label" - ] - }, - "SecretConsumerInfoResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/SecretConsumerInfoResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "SecretContentParams": { - "type": "object", - "properties": { - "data": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "value-ref": { - "$ref": "#/definitions/SecretValueRef" - } - }, - "additionalProperties": false - }, - "SecretContentResult": { - "type": "object", - "properties": { - "content": { - "$ref": "#/definitions/SecretContentParams" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "content" - ] - }, - "SecretContentResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/SecretContentResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "SecretRevision": { - "type": "object", - "properties": { - "backend-name": { - "type": "string" - }, - "create-time": { - "type": "string", - "format": "date-time" - }, - "expire-time": { - "type": "string", - "format": "date-time" - }, - "revision": { - "type": "integer" - }, - "update-time": { - "type": "string", - "format": "date-time" - }, - "value-ref": { - "$ref": "#/definitions/SecretValueRef" - } - }, - "additionalProperties": false, - "required": [ - "revision" - ] - }, - "SecretRevisionArg": { - "type": "object", - "properties": { - "pending-delete": { - "type": "boolean" - }, - "revisions": { - "type": "array", - "items": { - "type": "integer" - } - }, - "uri": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "uri", - "revisions", - "pending-delete" - ] - }, - "SecretRotatedArg": { - "type": "object", - "properties": { - "original-revision": { - "type": "integer" - }, - "skip": { - "type": "boolean" - }, - "uri": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "uri", - "original-revision", - "skip" - ] - }, - "SecretRotatedArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/SecretRotatedArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "SecretTriggerChange": { - "type": "object", - "properties": { - "next-trigger-time": { - "type": "string", - "format": "date-time" - }, - "revision": { - "type": "integer" - }, - "uri": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "uri", - "next-trigger-time" - ] - }, - "SecretTriggerWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "$ref": "#/definitions/SecretTriggerChange" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id", - "changes" - ] - }, - "SecretValueRef": { - "type": "object", - "properties": { - "backend-id": { - "type": "string" - }, - "revision-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "backend-id", - "revision-id" - ] - }, - "SecretValueResult": { - "type": "object", - "properties": { - "data": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "StringResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "StringResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "StringsWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id" - ] - }, - "StringsWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringsWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "UpdateSecretArg": { - "type": "object", - "properties": { - "UpsertSecretArg": { - "$ref": "#/definitions/UpsertSecretArg" - }, - "content": { - "$ref": "#/definitions/SecretContentParams" - }, - "description": { - "type": "string" - }, - "expire-time": { - "type": "string", - "format": "date-time" - }, - "label": { - "type": "string" - }, - "params": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "rotate-policy": { - "type": "string" - }, - "uri": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "UpsertSecretArg", - "uri" - ] - }, - "UpdateSecretArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/UpdateSecretArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "UpsertSecretArg": { - "type": "object", - "properties": { - "content": { - "$ref": "#/definitions/SecretContentParams" - }, - "description": { - "type": "string" - }, - "expire-time": { - "type": "string", - "format": "date-time" - }, - "label": { - "type": "string" - }, - "params": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "rotate-policy": { - "type": "string" - } - }, - "additionalProperties": false - } - } - } - }, - { - "Name": "SecretsTriggerWatcher", - "Description": "srvSecretTriggerWatcher defines the API wrapping a SecretsTriggerWatcher.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "Next": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/SecretTriggerWatchResult" - } - }, - "description": "Next returns when a change has occurred to an entity of the\ncollection being watched since the most recent call to Next\nor the Watch call that created the srvSecretRotationWatcher." - }, - "Stop": { - "type": "object", - "description": "Stop stops the watcher." - } - }, - "definitions": { - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "SecretTriggerChange": { - "type": "object", - "properties": { - "next-trigger-time": { - "type": "string", - "format": "date-time" - }, - "revision": { - "type": "integer" - }, - "uri": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "uri", - "next-trigger-time" - ] - }, - "SecretTriggerWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "$ref": "#/definitions/SecretTriggerChange" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id", - "changes" - ] - } - } - } - }, - { - "Name": "Singular", - "Description": "Facade allows controller machines to request exclusive rights to administer\nsome specific model or controller for a limited time.", - "Version": 2, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "Claim": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SingularClaims" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "Claim makes the supplied singular-controller lease requests. (In practice,\nany requests not for the connection's model or controller, or not on behalf\nof the connected ModelManager machine, will be rejected.)" - }, - "Wait": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "Wait waits for the singular-controller lease to expire for all supplied\nentities. (In practice, any requests that do not refer to the connection's\nmodel or controller will be rejected.)" - } - }, - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "SingularClaim": { - "type": "object", - "properties": { - "claimant-tag": { - "type": "string" - }, - "duration": { - "type": "integer" - }, - "entity-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "entity-tag", - "claimant-tag", - "duration" - ] - }, - "SingularClaims": { - "type": "object", - "properties": { - "claims": { - "type": "array", - "items": { - "$ref": "#/definitions/SingularClaim" - } - } - }, - "additionalProperties": false, - "required": [ - "claims" - ] - } - } - } - }, - { - "Name": "Spaces", - "Description": "API provides the spaces API facade for version 6.", - "Version": 6, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "CreateSpaces": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/CreateSpacesParams" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "CreateSpaces creates a new Juju network space, associating the\nspecified subnets with it (optional; can be empty)." - }, - "ListSpaces": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ListSpacesResults" - } - }, - "description": "ListSpaces lists all the available spaces and their associated subnets." - }, - "MoveSubnets": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/MoveSubnetsParams" - }, - "Result": { - "$ref": "#/definitions/MoveSubnetsResults" - } - }, - "description": "MoveSubnets ensures that the input subnets are in the input space." - }, - "ReloadSpaces": { - "type": "object", - "description": "ReloadSpaces refreshes spaces from substrate" - }, - "RemoveSpace": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RemoveSpaceParams" - }, - "Result": { - "$ref": "#/definitions/RemoveSpaceResults" - } - }, - "description": "RemoveSpace removes a space.\nReturns SpaceResults if entities/settings are found which makes the deletion not possible." - }, - "RenameSpace": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RenameSpacesParams" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "RenameSpace renames a space." - }, - "ShowSpace": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ShowSpaceResults" - } - }, - "description": "ShowSpace shows the spaces for a set of given entities." - } - }, - "definitions": { - "CreateSpaceParams": { - "type": "object", - "properties": { - "cidrs": { - "type": "array", - "items": { - "type": "string" - } - }, - "provider-id": { - "type": "string" - }, - "public": { - "type": "boolean" - }, - "space-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "cidrs", - "space-tag", - "public" - ] - }, - "CreateSpacesParams": { - "type": "object", - "properties": { - "spaces": { - "type": "array", - "items": { - "$ref": "#/definitions/CreateSpaceParams" - } - } - }, - "additionalProperties": false, - "required": [ - "spaces" - ] - }, - "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": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ListSpacesResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/Space" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "MoveSubnetsParam": { - "type": "object", - "properties": { - "force": { - "type": "boolean" - }, - "space-tag": { - "type": "string" - }, - "subnets": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "subnets", - "space-tag", - "force" - ] - }, - "MoveSubnetsParams": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/MoveSubnetsParam" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "MoveSubnetsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "moved-subnets": { - "type": "array", - "items": { - "$ref": "#/definitions/MovedSubnet" - } - }, - "new-space": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "new-space" - ] - }, - "MoveSubnetsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/MoveSubnetsResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "MovedSubnet": { - "type": "object", - "properties": { - "cidr": { - "type": "string" - }, - "old-space": { - "type": "string" - }, - "subnet": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "subnet", - "old-space", - "cidr" - ] - }, - "RemoveSpaceParam": { - "type": "object", - "properties": { - "dry-run": { - "type": "boolean" - }, - "force": { - "type": "boolean" - }, - "space": { - "$ref": "#/definitions/Entity" - } - }, - "additionalProperties": false, - "required": [ - "space" - ] - }, - "RemoveSpaceParams": { - "type": "object", - "properties": { - "space-param": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoveSpaceParam" - } - } - }, - "additionalProperties": false, - "required": [ - "space-param" - ] - }, - "RemoveSpaceResult": { - "type": "object", - "properties": { - "bindings": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } - }, - "constraints": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } - }, - "controller-settings": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "RemoveSpaceResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoveSpaceResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "RenameSpaceParams": { - "type": "object", - "properties": { - "from-space-tag": { - "type": "string" - }, - "to-space-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "from-space-tag", - "to-space-tag" - ] - }, - "RenameSpacesParams": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "$ref": "#/definitions/RenameSpaceParams" - } - } - }, - "additionalProperties": false, - "required": [ - "changes" - ] - }, - "ShowSpaceResult": { - "type": "object", - "properties": { - "applications": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "machine-count": { - "type": "integer" - }, - "space": { - "$ref": "#/definitions/Space" - } - }, - "additionalProperties": false, - "required": [ - "space", - "applications", - "machine-count" - ] - }, - "ShowSpaceResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ShowSpaceResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "Space": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "subnets": { - "type": "array", - "items": { - "$ref": "#/definitions/Subnet" - } - } - }, - "additionalProperties": false, - "required": [ - "id", - "name", - "subnets" - ] - }, - "Subnet": { - "type": "object", - "properties": { - "cidr": { - "type": "string" - }, - "life": { - "type": "string" - }, - "provider-id": { - "type": "string" - }, - "provider-network-id": { - "type": "string" - }, - "provider-space-id": { - "type": "string" - }, - "space-tag": { - "type": "string" - }, - "status": { - "type": "string" - }, - "vlan-tag": { - "type": "integer" - }, - "zones": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "cidr", - "vlan-tag", - "life", - "space-tag", - "zones" - ] - } - } - } - }, - { - "Name": "StatusHistory", - "Description": "API is the concrete implementation of the Pruner endpoint.", - "Version": 2, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "ModelConfig": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ModelConfigResult" - } - }, - "description": "ModelConfig returns the current model's configuration." - }, - "Prune": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/StatusHistoryPruneArgs" - } - }, - "description": "Prune endpoint removes status history entries until\nonly the ones newer than now - p.MaxHistoryTime remain and\nthe history is smaller than p.MaxHistoryMB." - }, - "WatchForModelConfigChanges": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResult" - } - }, - "description": "WatchForModelConfigChanges returns a NotifyWatcher that observes\nchanges to the model configuration.\nNote that although the NotifyWatchResult contains an Error field,\nit's not used because we are only returning a single watcher,\nso we use the regular error return." - } - }, - "definitions": { - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ModelConfigResult": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "StatusHistoryPruneArgs": { - "type": "object", - "properties": { - "max-history-mb": { - "type": "integer" - }, - "max-history-time": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "max-history-time", - "max-history-mb" - ] - } - } - } - }, - { - "Name": "Storage", - "Description": "StorageAPI implements the latest version (v6) of the Storage API.", - "Version": 6, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "AddToUnit": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/StoragesAddParams" - }, - "Result": { - "$ref": "#/definitions/AddStorageResults" - } - }, - "description": "AddToUnit validates and creates additional storage instances for units.\nA \"CHANGE\" block can block this operation." - }, - "Attach": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/StorageAttachmentIds" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "Attach attaches existing storage instances to units.\nA \"CHANGE\" block can block this operation." - }, - "CreatePool": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/StoragePoolArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "CreatePool creates a new pool with specified parameters." - }, - "DetachStorage": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/StorageDetachmentParams" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "DetachStorage sets the specified storage attachments to Dying, unless they are\nalready Dying or Dead. Any associated, persistent storage will remain\nalive. This call can be forced." - }, - "Import": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/BulkImportStorageParams" - }, - "Result": { - "$ref": "#/definitions/ImportStorageResults" - } - }, - "description": "Import imports existing storage into the model.\nA \"CHANGE\" block can block this operation." - }, - "ListFilesystems": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/FilesystemFilters" - }, - "Result": { - "$ref": "#/definitions/FilesystemDetailsListResults" - } - }, - "description": "ListFilesystems returns a list of filesystems in the environment matching\nthe provided filter. Each result describes a filesystem in detail, including\nthe filesystem's attachments." - }, - "ListPools": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/StoragePoolFilters" - }, - "Result": { - "$ref": "#/definitions/StoragePoolsResults" - } - }, - "description": "ListPools returns a list of pools.\nIf filter is provided, returned list only contains pools that match\nthe filter.\nPools can be filtered on names and provider types.\nIf both names and types are provided as filter,\npools that match either are returned.\nThis method lists union of pools and environment provider types.\nIf no filter is provided, all pools are returned." - }, - "ListStorageDetails": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/StorageFilters" - }, - "Result": { - "$ref": "#/definitions/StorageDetailsListResults" - } - }, - "description": "ListStorageDetails returns storage matching a filter." - }, - "ListVolumes": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/VolumeFilters" - }, - "Result": { - "$ref": "#/definitions/VolumeDetailsListResults" - } - }, - "description": "ListVolumes lists volumes with the given filters. Each filter produces\nan independent list of volumes, or an error if the filter is invalid\nor the volumes could not be listed." - }, - "Remove": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RemoveStorage" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "Remove sets the specified storage entities to Dying, unless they are\nalready Dying or Dead, such that the storage will eventually be removed\nfrom the model. If the arguments specify that the storage should be\ndestroyed, then the associated cloud storage will be destroyed first;\notherwise it will only be released from Juju's control." - }, - "RemovePool": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/StoragePoolDeleteArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "RemovePool deletes the named pool" - }, - "StorageDetails": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StorageDetailsResults" - } - }, - "description": "StorageDetails retrieves and returns detailed information about desired\nstorage identified by supplied tags. If specified storage cannot be\nretrieved, individual error is returned instead of storage information." - }, - "UpdatePool": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/StoragePoolArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "UpdatePool deletes the named pool" - } - }, - "definitions": { - "AddStorageDetails": { - "type": "object", - "properties": { - "storage-tags": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "storage-tags" - ] - }, - "AddStorageResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/AddStorageDetails" - } - }, - "additionalProperties": false - }, - "AddStorageResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/AddStorageResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "BulkImportStorageParams": { - "type": "object", - "properties": { - "storage": { - "type": "array", - "items": { - "$ref": "#/definitions/ImportStorageParams" - } - } - }, - "additionalProperties": false, - "required": [ - "storage" - ] - }, - "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" - ] - }, - "EntityStatus": { - "type": "object", - "properties": { - "data": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "info": { - "type": "string" - }, - "since": { - "type": "string", - "format": "date-time" - }, - "status": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "status", - "info", - "since" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "FilesystemAttachmentDetails": { - "type": "object", - "properties": { - "FilesystemAttachmentInfo": { - "$ref": "#/definitions/FilesystemAttachmentInfo" - }, - "life": { - "type": "string" - }, - "mount-point": { - "type": "string" - }, - "read-only": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "FilesystemAttachmentInfo" - ] - }, - "FilesystemAttachmentInfo": { - "type": "object", - "properties": { - "mount-point": { - "type": "string" - }, - "read-only": { - "type": "boolean" - } - }, - "additionalProperties": false - }, - "FilesystemDetails": { - "type": "object", - "properties": { - "filesystem-tag": { - "type": "string" - }, - "info": { - "$ref": "#/definitions/FilesystemInfo" - }, - "life": { - "type": "string" - }, - "machine-attachments": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/FilesystemAttachmentDetails" - } - } - }, - "status": { - "$ref": "#/definitions/EntityStatus" - }, - "storage": { - "$ref": "#/definitions/StorageDetails" - }, - "unit-attachments": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/FilesystemAttachmentDetails" - } - } - }, - "volume-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "filesystem-tag", - "info", - "status" - ] - }, - "FilesystemDetailsListResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "array", - "items": { - "$ref": "#/definitions/FilesystemDetails" - } - } - }, - "additionalProperties": false - }, - "FilesystemDetailsListResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/FilesystemDetailsListResult" - } - } - }, - "additionalProperties": false - }, - "FilesystemFilter": { - "type": "object", - "properties": { - "machines": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "FilesystemFilters": { - "type": "object", - "properties": { - "filters": { - "type": "array", - "items": { - "$ref": "#/definitions/FilesystemFilter" - } - } - }, - "additionalProperties": false - }, - "FilesystemInfo": { - "type": "object", - "properties": { - "filesystem-id": { - "type": "string" - }, - "pool": { - "type": "string" - }, - "size": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "filesystem-id", - "pool", - "size" - ] - }, - "ImportStorageDetails": { - "type": "object", - "properties": { - "storage-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "storage-tag" - ] - }, - "ImportStorageParams": { - "type": "object", - "properties": { - "kind": { - "type": "integer" - }, - "pool": { - "type": "string" - }, - "provider-id": { - "type": "string" - }, - "storage-name": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "kind", - "pool", - "provider-id", - "storage-name" - ] - }, - "ImportStorageResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/ImportStorageDetails" - } - }, - "additionalProperties": false - }, - "ImportStorageResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ImportStorageResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "RemoveStorage": { - "type": "object", - "properties": { - "storage": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoveStorageInstance" - } - } - }, - "additionalProperties": false, - "required": [ - "storage" - ] - }, - "RemoveStorageInstance": { - "type": "object", - "properties": { - "destroy-attachments": { - "type": "boolean" - }, - "destroy-storage": { - "type": "boolean" - }, - "force": { - "type": "boolean" - }, - "max-wait": { - "type": "integer" - }, - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag" - ] - }, - "StorageAddParams": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "storage": { - "$ref": "#/definitions/StorageConstraints" - }, - "unit": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "unit", - "name", - "storage" - ] - }, - "StorageAttachmentDetails": { - "type": "object", - "properties": { - "life": { - "type": "string" - }, - "location": { - "type": "string" - }, - "machine-tag": { - "type": "string" - }, - "storage-tag": { - "type": "string" - }, - "unit-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "storage-tag", - "unit-tag", - "machine-tag" - ] - }, - "StorageAttachmentId": { - "type": "object", - "properties": { - "storage-tag": { - "type": "string" - }, - "unit-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "storage-tag", - "unit-tag" - ] - }, - "StorageAttachmentIds": { - "type": "object", - "properties": { - "ids": { - "type": "array", - "items": { - "$ref": "#/definitions/StorageAttachmentId" - } - } - }, - "additionalProperties": false, - "required": [ - "ids" - ] - }, - "StorageConstraints": { - "type": "object", - "properties": { - "count": { - "type": "integer" - }, - "pool": { - "type": "string" - }, - "size": { - "type": "integer" - } - }, - "additionalProperties": false - }, - "StorageDetachmentParams": { - "type": "object", - "properties": { - "force": { - "type": "boolean" - }, - "ids": { - "$ref": "#/definitions/StorageAttachmentIds" - }, - "max-wait": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "ids" - ] - }, - "StorageDetails": { - "type": "object", - "properties": { - "attachments": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/StorageAttachmentDetails" - } - } - }, - "kind": { - "type": "integer" - }, - "life": { - "type": "string" - }, - "owner-tag": { - "type": "string" - }, - "persistent": { - "type": "boolean" - }, - "status": { - "$ref": "#/definitions/EntityStatus" - }, - "storage-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "storage-tag", - "owner-tag", - "kind", - "status", - "persistent" - ] - }, - "StorageDetailsListResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "array", - "items": { - "$ref": "#/definitions/StorageDetails" - } - } - }, - "additionalProperties": false - }, - "StorageDetailsListResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StorageDetailsListResult" - } - } - }, - "additionalProperties": false - }, - "StorageDetailsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/StorageDetails" - } - }, - "additionalProperties": false - }, - "StorageDetailsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StorageDetailsResult" - } - } - }, - "additionalProperties": false - }, - "StorageFilter": { - "type": "object", - "additionalProperties": false - }, - "StorageFilters": { - "type": "object", - "properties": { - "filters": { - "type": "array", - "items": { - "$ref": "#/definitions/StorageFilter" - } - } - }, - "additionalProperties": false - }, - "StoragePool": { - "type": "object", - "properties": { - "attrs": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "name": { - "type": "string" - }, - "provider": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "provider", - "attrs" - ] - }, - "StoragePoolArgs": { - "type": "object", - "properties": { - "pools": { - "type": "array", - "items": { - "$ref": "#/definitions/StoragePool" - } - } - }, - "additionalProperties": false, - "required": [ - "pools" - ] - }, - "StoragePoolDeleteArg": { - "type": "object", - "properties": { - "name": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name" - ] - }, - "StoragePoolDeleteArgs": { - "type": "object", - "properties": { - "pools": { - "type": "array", - "items": { - "$ref": "#/definitions/StoragePoolDeleteArg" - } - } - }, - "additionalProperties": false, - "required": [ - "pools" - ] - }, - "StoragePoolFilter": { - "type": "object", - "properties": { - "names": { - "type": "array", - "items": { - "type": "string" - } - }, - "providers": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "StoragePoolFilters": { - "type": "object", - "properties": { - "filters": { - "type": "array", - "items": { - "$ref": "#/definitions/StoragePoolFilter" - } - } - }, - "additionalProperties": false - }, - "StoragePoolsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "storage-pools": { - "type": "array", - "items": { - "$ref": "#/definitions/StoragePool" - } - } - }, - "additionalProperties": false - }, - "StoragePoolsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StoragePoolsResult" - } - } - }, - "additionalProperties": false - }, - "StoragesAddParams": { - "type": "object", - "properties": { - "storages": { - "type": "array", - "items": { - "$ref": "#/definitions/StorageAddParams" - } - } - }, - "additionalProperties": false, - "required": [ - "storages" - ] - }, - "VolumeAttachmentDetails": { - "type": "object", - "properties": { - "VolumeAttachmentInfo": { - "$ref": "#/definitions/VolumeAttachmentInfo" - }, - "bus-address": { - "type": "string" - }, - "device-link": { - "type": "string" - }, - "device-name": { - "type": "string" - }, - "life": { - "type": "string" - }, - "plan-info": { - "$ref": "#/definitions/VolumeAttachmentPlanInfo" - }, - "read-only": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "VolumeAttachmentInfo" - ] - }, - "VolumeAttachmentInfo": { - "type": "object", - "properties": { - "bus-address": { - "type": "string" - }, - "device-link": { - "type": "string" - }, - "device-name": { - "type": "string" - }, - "plan-info": { - "$ref": "#/definitions/VolumeAttachmentPlanInfo" - }, - "read-only": { - "type": "boolean" - } - }, - "additionalProperties": false - }, - "VolumeAttachmentPlanInfo": { - "type": "object", - "properties": { - "device-attributes": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "device-type": { - "type": "string" - } - }, - "additionalProperties": false - }, - "VolumeDetails": { - "type": "object", - "properties": { - "info": { - "$ref": "#/definitions/VolumeInfo" - }, - "life": { - "type": "string" - }, - "machine-attachments": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/VolumeAttachmentDetails" - } - } - }, - "status": { - "$ref": "#/definitions/EntityStatus" - }, - "storage": { - "$ref": "#/definitions/StorageDetails" - }, - "unit-attachments": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/VolumeAttachmentDetails" - } - } - }, - "volume-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "volume-tag", - "info", - "status" - ] - }, - "VolumeDetailsListResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "array", - "items": { - "$ref": "#/definitions/VolumeDetails" - } - } - }, - "additionalProperties": false - }, - "VolumeDetailsListResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/VolumeDetailsListResult" - } - } - }, - "additionalProperties": false - }, - "VolumeFilter": { - "type": "object", - "properties": { - "machines": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "VolumeFilters": { - "type": "object", - "properties": { - "filters": { - "type": "array", - "items": { - "$ref": "#/definitions/VolumeFilter" - } - } - }, - "additionalProperties": false - }, - "VolumeInfo": { - "type": "object", - "properties": { - "hardware-id": { - "type": "string" - }, - "persistent": { - "type": "boolean" - }, - "pool": { - "type": "string" - }, - "size": { - "type": "integer" - }, - "volume-id": { - "type": "string" - }, - "wwn": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "volume-id", - "size", - "persistent" - ] - } - } - } - }, - { - "Name": "StorageProvisioner", - "Description": "StorageProvisionerAPIv4 provides the StorageProvisioner API v4 facade.", - "Version": 4, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "AttachmentLife": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/MachineStorageIds" - }, - "Result": { - "$ref": "#/definitions/LifeResults" - } - }, - "description": "AttachmentLife returns the lifecycle state of each specified machine\nstorage attachment." - }, - "CreateVolumeAttachmentPlans": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/VolumeAttachmentPlans" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - } - }, - "EnsureDead": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "EnsureDead calls EnsureDead on each given entity from state. It\nwill fail if the entity is not present. If it's Alive, nothing will\nhappen (see state/EnsureDead() for units or machines)." - }, - "FilesystemAttachmentParams": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/MachineStorageIds" - }, - "Result": { - "$ref": "#/definitions/FilesystemAttachmentParamsResults" - } - }, - "description": "FilesystemAttachmentParams returns the parameters for creating the filesystem\nattachments with the specified IDs." - }, - "FilesystemAttachments": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/MachineStorageIds" - }, - "Result": { - "$ref": "#/definitions/FilesystemAttachmentResults" - } - }, - "description": "FilesystemAttachments returns details of filesystem attachments with the specified IDs." - }, - "FilesystemParams": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/FilesystemParamsResults" - } - }, - "description": "FilesystemParams returns the parameters for creating the filesystems\nwith the specified tags." - }, - "Filesystems": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/FilesystemResults" - } - }, - "description": "Filesystems returns details of filesystems with the specified tags." - }, - "InstanceId": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringResults" - } - }, - "description": "InstanceId returns the provider specific instance id for each given\nmachine or an CodeNotProvisioned error, if not set." - }, - "Life": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/LifeResults" - } - }, - "description": "Life returns the life status of every supplied entity, where available." - }, - "Remove": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "Remove removes volumes and filesystems from state." - }, - "RemoveAttachment": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/MachineStorageIds" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "RemoveAttachment removes the specified machine storage attachments\nfrom state." - }, - "RemoveFilesystemParams": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/RemoveFilesystemParamsResults" - } - }, - "description": "RemoveFilesystemParams returns the parameters for destroying or\nreleasing the filesystems with the specified tags." - }, - "RemoveVolumeAttachmentPlan": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/MachineStorageIds" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - } - }, - "RemoveVolumeParams": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/RemoveVolumeParamsResults" - } - }, - "description": "RemoveVolumeParams returns the parameters for destroying\nor releasing the volumes with the specified tags." - }, - "SetFilesystemAttachmentInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/FilesystemAttachments" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetFilesystemAttachmentInfo records the details of newly provisioned filesystem\nattachments." - }, - "SetFilesystemInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Filesystems" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetFilesystemInfo records the details of newly provisioned filesystems." - }, - "SetStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetStatus" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetStatus sets the status of each given entity." - }, - "SetVolumeAttachmentInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/VolumeAttachments" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetVolumeAttachmentInfo records the details of newly provisioned volume\nattachments." - }, - "SetVolumeAttachmentPlanBlockInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/VolumeAttachmentPlans" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - } - }, - "SetVolumeInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Volumes" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetVolumeInfo records the details of newly provisioned volumes." - }, - "VolumeAttachmentParams": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/MachineStorageIds" - }, - "Result": { - "$ref": "#/definitions/VolumeAttachmentParamsResults" - } - }, - "description": "VolumeAttachmentParams returns the parameters for creating the volume\nattachments with the specified IDs." - }, - "VolumeAttachmentPlans": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/MachineStorageIds" - }, - "Result": { - "$ref": "#/definitions/VolumeAttachmentPlanResults" - } - }, - "description": "VolumeAttachmentPlans returns details of volume attachment plans with the specified IDs." - }, - "VolumeAttachments": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/MachineStorageIds" - }, - "Result": { - "$ref": "#/definitions/VolumeAttachmentResults" - } - }, - "description": "VolumeAttachments returns details of volume attachments with the specified IDs." - }, - "VolumeBlockDevices": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/MachineStorageIds" - }, - "Result": { - "$ref": "#/definitions/BlockDeviceResults" - } - }, - "description": "VolumeBlockDevices returns details of the block devices corresponding to the\nvolume attachments with the specified IDs." - }, - "VolumeParams": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/VolumeParamsResults" - } - }, - "description": "VolumeParams returns the parameters for creating or destroying\nthe volumes with the specified tags." - }, - "Volumes": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/VolumeResults" - } - }, - "description": "Volumes returns details of volumes with the specified tags." - }, - "WatchApplications": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsWatchResult" - } - }, - "description": "WatchApplications starts a StringsWatcher to watch CAAS applications\ndeployed to this model." - }, - "WatchBlockDevices": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "WatchBlockDevices watches for changes to the specified machines' block devices." - }, - "WatchFilesystemAttachments": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/MachineStorageIdsWatchResults" - } - }, - "description": "WatchFilesystemAttachments watches for changes to filesystem attachments\nscoped to the entity with the tag passed to NewState." - }, - "WatchFilesystems": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - }, - "description": "WatchFilesystems watches for changes to filesystems scoped\nto the entity with the tag passed to NewState." - }, - "WatchMachines": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "WatchMachines watches for changes to the specified machines." - }, - "WatchVolumeAttachmentPlans": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/MachineStorageIdsWatchResults" - } - }, - "description": "WatchVolumeAttachmentPlans watches for changes to volume attachments for a machine for the purpose of allowing\nthat machine to run any initialization needed, for that volume to actually appear as a block device (ie: iSCSI)" - }, - "WatchVolumeAttachments": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/MachineStorageIdsWatchResults" - } - }, - "description": "WatchVolumeAttachments watches for changes to volume attachments scoped to\nthe entity with the tag passed to NewState." - }, - "WatchVolumes": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - }, - "description": "WatchVolumes watches for changes to volumes scoped to the\nentity with the tag passed to NewState." - } - }, - "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" - }, - "SerialId": { - "type": "string" - }, - "Size": { - "type": "integer" - }, - "UUID": { - "type": "string" - }, - "WWN": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "DeviceName", - "DeviceLinks", - "Label", - "UUID", - "HardwareId", - "WWN", - "BusAddress", - "Size", - "FilesystemType", - "InUse", - "MountPoint", - "SerialId" - ] - }, - "BlockDeviceResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/BlockDevice" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "BlockDeviceResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/BlockDeviceResult" - } - } - }, - "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" - ] - }, - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "Filesystem": { - "type": "object", - "properties": { - "filesystem-tag": { - "type": "string" - }, - "info": { - "$ref": "#/definitions/FilesystemInfo" - }, - "volume-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "filesystem-tag", - "info" - ] - }, - "FilesystemAttachment": { - "type": "object", - "properties": { - "filesystem-tag": { - "type": "string" - }, - "info": { - "$ref": "#/definitions/FilesystemAttachmentInfo" - }, - "machine-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "filesystem-tag", - "machine-tag", - "info" - ] - }, - "FilesystemAttachmentInfo": { - "type": "object", - "properties": { - "mount-point": { - "type": "string" - }, - "read-only": { - "type": "boolean" - } - }, - "additionalProperties": false - }, - "FilesystemAttachmentParams": { - "type": "object", - "properties": { - "filesystem-id": { - "type": "string" - }, - "filesystem-tag": { - "type": "string" - }, - "instance-id": { - "type": "string" - }, - "machine-tag": { - "type": "string" - }, - "mount-point": { - "type": "string" - }, - "provider": { - "type": "string" - }, - "read-only": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "filesystem-tag", - "machine-tag", - "provider" - ] - }, - "FilesystemAttachmentParamsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/FilesystemAttachmentParams" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "FilesystemAttachmentParamsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/FilesystemAttachmentParamsResult" - } - } - }, - "additionalProperties": false - }, - "FilesystemAttachmentResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/FilesystemAttachment" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "FilesystemAttachmentResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/FilesystemAttachmentResult" - } - } - }, - "additionalProperties": false - }, - "FilesystemAttachments": { - "type": "object", - "properties": { - "filesystem-attachments": { - "type": "array", - "items": { - "$ref": "#/definitions/FilesystemAttachment" - } - } - }, - "additionalProperties": false, - "required": [ - "filesystem-attachments" - ] - }, - "FilesystemInfo": { - "type": "object", - "properties": { - "filesystem-id": { - "type": "string" - }, - "pool": { - "type": "string" - }, - "size": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "filesystem-id", - "pool", - "size" - ] - }, - "FilesystemParams": { - "type": "object", - "properties": { - "attachment": { - "$ref": "#/definitions/FilesystemAttachmentParams" - }, - "attributes": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "filesystem-tag": { - "type": "string" - }, - "provider": { - "type": "string" - }, - "size": { - "type": "integer" - }, - "tags": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "volume-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "filesystem-tag", - "size", - "provider" - ] - }, - "FilesystemParamsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/FilesystemParams" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "FilesystemParamsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/FilesystemParamsResult" - } - } - }, - "additionalProperties": false - }, - "FilesystemResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/Filesystem" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "FilesystemResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/FilesystemResult" - } - } - }, - "additionalProperties": false - }, - "Filesystems": { - "type": "object", - "properties": { - "filesystems": { - "type": "array", - "items": { - "$ref": "#/definitions/Filesystem" - } - } - }, - "additionalProperties": false, - "required": [ - "filesystems" - ] - }, - "LifeResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "life": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "life" - ] - }, - "LifeResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/LifeResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "MachineStorageId": { - "type": "object", - "properties": { - "attachment-tag": { - "type": "string" - }, - "machine-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "machine-tag", - "attachment-tag" - ] - }, - "MachineStorageIds": { - "type": "object", - "properties": { - "ids": { - "type": "array", - "items": { - "$ref": "#/definitions/MachineStorageId" - } - } - }, - "additionalProperties": false, - "required": [ - "ids" - ] - }, - "MachineStorageIdsWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "$ref": "#/definitions/MachineStorageId" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id", - "changes" - ] - }, - "MachineStorageIdsWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/MachineStorageIdsWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "NotifyWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "RemoveFilesystemParams": { - "type": "object", - "properties": { - "destroy": { - "type": "boolean" - }, - "filesystem-id": { - "type": "string" - }, - "provider": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "provider", - "filesystem-id" - ] - }, - "RemoveFilesystemParamsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/RemoveFilesystemParams" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "RemoveFilesystemParamsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoveFilesystemParamsResult" - } - } - }, - "additionalProperties": false - }, - "RemoveVolumeParams": { - "type": "object", - "properties": { - "destroy": { - "type": "boolean" - }, - "provider": { - "type": "string" - }, - "volume-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "provider", - "volume-id" - ] - }, - "RemoveVolumeParamsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/RemoveVolumeParams" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "RemoveVolumeParamsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoveVolumeParamsResult" - } - } - }, - "additionalProperties": false - }, - "SetStatus": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityStatusArgs" - } - } - }, - "additionalProperties": false, - "required": [ - "entities" - ] - }, - "StringResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "StringResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "StringsWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id" - ] - }, - "StringsWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringsWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "Volume": { - "type": "object", - "properties": { - "info": { - "$ref": "#/definitions/VolumeInfo" - }, - "volume-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "volume-tag", - "info" - ] - }, - "VolumeAttachment": { - "type": "object", - "properties": { - "info": { - "$ref": "#/definitions/VolumeAttachmentInfo" - }, - "machine-tag": { - "type": "string" - }, - "volume-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "volume-tag", - "machine-tag", - "info" - ] - }, - "VolumeAttachmentInfo": { - "type": "object", - "properties": { - "bus-address": { - "type": "string" - }, - "device-link": { - "type": "string" - }, - "device-name": { - "type": "string" - }, - "plan-info": { - "$ref": "#/definitions/VolumeAttachmentPlanInfo" - }, - "read-only": { - "type": "boolean" - } - }, - "additionalProperties": false - }, - "VolumeAttachmentParams": { - "type": "object", - "properties": { - "instance-id": { - "type": "string" - }, - "machine-tag": { - "type": "string" - }, - "provider": { - "type": "string" - }, - "read-only": { - "type": "boolean" - }, - "volume-id": { - "type": "string" - }, - "volume-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "volume-tag", - "machine-tag", - "provider" - ] - }, - "VolumeAttachmentParamsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/VolumeAttachmentParams" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "VolumeAttachmentParamsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/VolumeAttachmentParamsResult" - } - } - }, - "additionalProperties": false - }, - "VolumeAttachmentPlan": { - "type": "object", - "properties": { - "block-device": { - "$ref": "#/definitions/BlockDevice" - }, - "life": { - "type": "string" - }, - "machine-tag": { - "type": "string" - }, - "plan-info": { - "$ref": "#/definitions/VolumeAttachmentPlanInfo" - }, - "volume-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "volume-tag", - "machine-tag", - "plan-info" - ] - }, - "VolumeAttachmentPlanInfo": { - "type": "object", - "properties": { - "device-attributes": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "device-type": { - "type": "string" - } - }, - "additionalProperties": false - }, - "VolumeAttachmentPlanResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/VolumeAttachmentPlan" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "VolumeAttachmentPlanResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/VolumeAttachmentPlanResult" - } - } - }, - "additionalProperties": false - }, - "VolumeAttachmentPlans": { - "type": "object", - "properties": { - "volume-plans": { - "type": "array", - "items": { - "$ref": "#/definitions/VolumeAttachmentPlan" - } - } - }, - "additionalProperties": false, - "required": [ - "volume-plans" - ] - }, - "VolumeAttachmentResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/VolumeAttachment" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "VolumeAttachmentResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/VolumeAttachmentResult" - } - } - }, - "additionalProperties": false - }, - "VolumeAttachments": { - "type": "object", - "properties": { - "volume-attachments": { - "type": "array", - "items": { - "$ref": "#/definitions/VolumeAttachment" - } - } - }, - "additionalProperties": false, - "required": [ - "volume-attachments" - ] - }, - "VolumeInfo": { - "type": "object", - "properties": { - "hardware-id": { - "type": "string" - }, - "persistent": { - "type": "boolean" - }, - "pool": { - "type": "string" - }, - "size": { - "type": "integer" - }, - "volume-id": { - "type": "string" - }, - "wwn": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "volume-id", - "size", - "persistent" - ] - }, - "VolumeParams": { - "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" - } - } - }, - "volume-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "volume-tag", - "size", - "provider" - ] - }, - "VolumeParamsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/VolumeParams" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "VolumeParamsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/VolumeParamsResult" - } - } - }, - "additionalProperties": false - }, - "VolumeResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/Volume" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "VolumeResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/VolumeResult" - } - } - }, - "additionalProperties": false - }, - "Volumes": { - "type": "object", - "properties": { - "volumes": { - "type": "array", - "items": { - "$ref": "#/definitions/Volume" - } - } - }, - "additionalProperties": false, - "required": [ - "volumes" - ] - } - } - } - }, - { - "Name": "StringsWatcher", - "Description": "srvStringsWatcher defines the API for methods on a state.StringsWatcher.\nEach client has its own current set of watchers, stored in resources.\nsrvStringsWatcher notifies about changes for all entities of a given kind,\nsending the changes as a list of strings.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "Next": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsWatchResult" - } - }, - "description": "Next returns when a change has occurred to an entity of the\ncollection being watched since the most recent call to Next\nor the Watch call that created the srvStringsWatcher." - }, - "Stop": { - "type": "object", - "description": "Stop stops the watcher." - } - }, - "definitions": { - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "StringsWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id" - ] - } - } - } - }, - { - "Name": "Subnets", - "Description": "API provides the subnets API facade for version 5.", - "Version": 5, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "AllZones": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ZoneResults" - } - }, - "description": "AllZones returns all availability zones known to Juju. If a\nzone is unusable, unavailable, or deprecated the Available\nfield will be false." - }, - "ListSubnets": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SubnetsFilters" - }, - "Result": { - "$ref": "#/definitions/ListSubnetsResults" - } - }, - "description": "ListSubnets returns the matching subnets after applying\noptional filters." - }, - "SubnetsByCIDR": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/CIDRParams" - }, - "Result": { - "$ref": "#/definitions/SubnetsResults" - } - }, - "description": "SubnetsByCIDR returns the collection of subnets matching each CIDR in the input." - } - }, - "definitions": { - "CIDRParams": { - "type": "object", - "properties": { - "cidrs": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "cidrs" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ListSubnetsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/Subnet" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "Subnet": { - "type": "object", - "properties": { - "cidr": { - "type": "string" - }, - "life": { - "type": "string" - }, - "provider-id": { - "type": "string" - }, - "provider-network-id": { - "type": "string" - }, - "provider-space-id": { - "type": "string" - }, - "space-tag": { - "type": "string" - }, - "status": { - "type": "string" - }, - "vlan-tag": { - "type": "integer" - }, - "zones": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "cidr", - "vlan-tag", - "life", - "space-tag", - "zones" - ] - }, - "SubnetV2": { - "type": "object", - "properties": { - "Subnet": { - "$ref": "#/definitions/Subnet" - }, - "cidr": { - "type": "string" - }, - "id": { - "type": "string" - }, - "life": { - "type": "string" - }, - "provider-id": { - "type": "string" - }, - "provider-network-id": { - "type": "string" - }, - "provider-space-id": { - "type": "string" - }, - "space-tag": { - "type": "string" - }, - "status": { - "type": "string" - }, - "vlan-tag": { - "type": "integer" - }, - "zones": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "cidr", - "vlan-tag", - "life", - "space-tag", - "zones", - "Subnet" - ] - }, - "SubnetsFilters": { - "type": "object", - "properties": { - "space-tag": { - "type": "string" - }, - "zone": { - "type": "string" - } - }, - "additionalProperties": false - }, - "SubnetsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "subnets": { - "type": "array", - "items": { - "$ref": "#/definitions/SubnetV2" - } - } - }, - "additionalProperties": false - }, - "SubnetsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/SubnetsResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ZoneResult": { - "type": "object", - "properties": { - "available": { - "type": "boolean" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "name": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "available" - ] - }, - "ZoneResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ZoneResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - } - } - } - }, - { - "Name": "Undertaker", - "Description": "UndertakerAPI implements the API used by the model undertaker worker.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "ModelConfig": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ModelConfigResult" - } - }, - "description": "ModelConfig returns the model's configuration." - }, - "ModelInfo": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/UndertakerModelInfoResult" - } - }, - "description": "ModelInfo returns information on the model needed by the undertaker worker." - }, - "ProcessDyingModel": { - "type": "object", - "description": "ProcessDyingModel checks if a dying model has any machines or applications.\nIf there are none, the model's life is changed from dying to dead." - }, - "RemoveModel": { - "type": "object", - "description": "RemoveModel removes any records of this model from Juju." - }, - "SetStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetStatus" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetStatus sets the status of each given entity." - }, - "WatchModelResources": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "WatchModelResources creates watchers for changes to the lifecycle of an\nmodel's machines and applications and storage." - } - }, - "definitions": { - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ModelConfigResult": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "NotifyWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "SetStatus": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityStatusArgs" - } - } - }, - "additionalProperties": false, - "required": [ - "entities" - ] - }, - "UndertakerModelInfo": { - "type": "object", - "properties": { - "destroy-timeout": { - "type": "integer" - }, - "force-destroyed": { - "type": "boolean" - }, - "global-name": { - "type": "string" - }, - "is-system": { - "type": "boolean" - }, - "life": { - "type": "string" - }, - "name": { - "type": "string" - }, - "uuid": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "uuid", - "name", - "global-name", - "is-system", - "life" - ] - }, - "UndertakerModelInfoResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/UndertakerModelInfo" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - } - } - } - }, - { - "Name": "UnitAssigner", - "Description": "API implements the functionality for assigning units to machines.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "AssignUnits": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "AssignUnits assigns the units with the given ids to the correct machine. The\nerror results are returned in the same order as the given entities." - }, - "SetAgentStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetStatus" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetAgentStatus will set status for agents of Units passed in args, if one\nof the args is not an Unit it will fail." - }, - "WatchUnitAssignments": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsWatchResult" - } - }, - "description": "WatchUnitAssignments returns a strings watcher that is notified when new unit\nassignments are added to the db." - } - }, - "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" - ] - }, - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "SetStatus": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityStatusArgs" - } - } - }, - "additionalProperties": false, - "required": [ - "entities" - ] - }, - "StringsWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id" - ] - } - } - } - }, - { - "Name": "Uniter", - "Description": "UniterAPI implements the latest version (v18) of the Uniter API.", - "Version": 18, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "APIAddresses": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsResult" - } - }, - "description": "APIAddresses returns the list of addresses used to connect to the API." - }, - "APIHostPorts": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/APIHostPortsResult" - } - }, - "description": "APIHostPorts returns the API server addresses." - }, - "ActionStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringResults" - } - }, - "description": "ActionStatus returns the status of Actions by Tags passed in." - }, - "Actions": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ActionResults" - } - }, - "description": "Actions returns the Actions by Tags passed and ensures that the Unit asking\nfor them is the same Unit that has the Actions." - }, - "AddMetricBatches": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/MetricBatchParams" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "AddMetricBatches adds the metrics for the specified unit." - }, - "ApplicationStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ApplicationStatusResults" - } - }, - "description": "ApplicationStatus returns the status of the Applications and its workloads\nif the given unit is the leader." - }, - "AssignedMachine": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringResults" - } - }, - "description": "AssignedMachine returns the machine tag for each given unit tag, or\nan error satisfying params.IsCodeNotAssigned when a unit has no\nassigned machine." - }, - "AvailabilityZone": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringResults" - } - }, - "description": "AvailabilityZone returns the availability zone for each given unit, if applicable." - }, - "BeginActions": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "BeginActions marks the actions represented by the passed in Tags as running." - }, - "CanApplyLXDProfile": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/BoolResults" - } - }, - "description": "CanApplyLXDProfile is a shim to call the LXDProfileAPIv2 version of this method." - }, - "CharmArchiveSha256": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/CharmURLs" - }, - "Result": { - "$ref": "#/definitions/StringResults" - } - }, - "description": "CharmArchiveSha256 returns the SHA256 digest of the charm archive\n(bundle) data for each charm url in the given parameters." - }, - "CharmModifiedVersion": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/IntResults" - } - }, - "description": "CharmModifiedVersion returns the most CharmModifiedVersion for all given\nunits or applications." - }, - "CharmURL": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringBoolResults" - } - }, - "description": "CharmURL returns the charm URL for all given units or applications." - }, - "ClearResolved": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "ClearResolved removes any resolved setting from each given unit." - }, - "CloudAPIVersion": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringResult" - } - }, - "description": "CloudAPIVersion returns the cloud API version, if available." - }, - "CloudSpec": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/CloudSpecResult" - } - }, - "description": "CloudSpec returns the cloud spec used by the model in which the\nauthenticated unit or application resides.\nA check is made beforehand to ensure that the request is made by an entity\nthat has been granted the appropriate trust." - }, - "CommitHookChanges": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/CommitHookChangesArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "CommitHookChanges batches together all required API calls for applying\na set of changes after a hook successfully completes and executes them in a\nsingle transaction." - }, - "ConfigSettings": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ConfigSettingsResults" - } - }, - "description": "ConfigSettings returns the complete set of application charm config\nsettings available to each given unit." - }, - "CreateSecretURIs": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/CreateSecretURIsArg" - }, - "Result": { - "$ref": "#/definitions/StringResults" - } - }, - "description": "CreateSecretURIs creates new secret URIs." - }, - "CreateSecrets": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/CreateSecretArgs" - }, - "Result": { - "$ref": "#/definitions/StringResults" - } - }, - "description": "CreateSecrets creates new secrets." - }, - "CurrentModel": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ModelResult" - } - }, - "description": "CurrentModel returns the name and UUID for the current juju model." - }, - "Destroy": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "Destroy advances all given Alive units' lifecycles as far as\npossible. See state/Unit.Destroy()." - }, - "DestroyAllSubordinates": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "DestroyAllSubordinates destroys all subordinates of each given unit." - }, - "DestroyUnitStorageAttachments": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "DestroyUnitStorageAttachments marks each storage attachment of the\nspecified units as Dying." - }, - "EnsureDead": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "EnsureDead calls EnsureDead on each given entity from state. It\nwill fail if the entity is not present. If it's Alive, nothing will\nhappen (see state/EnsureDead() for units or machines)." - }, - "EnterScope": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RelationUnits" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "EnterScope ensures each unit has entered its scope in the relation,\nfor all of the given relation/unit pairs. See also\nstate.RelationUnit.EnterScope()." - }, - "FinishActions": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ActionExecutionResults" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "FinishActions saves the result of a completed Action" - }, - "GetConsumerSecretsRevisionInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/GetSecretConsumerInfoArgs" - }, - "Result": { - "$ref": "#/definitions/SecretConsumerInfoResults" - } - }, - "description": "GetConsumerSecretsRevisionInfo returns the latest secret revisions for the specified secrets.\nThis facade method is used for remote watcher to get the latest secret revisions and labels for a secret changed hook." - }, - "GetMeterStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/MeterStatusResults" - } - } - }, - "GetPodSpec": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringResults" - } - }, - "description": "GetPodSpec gets the pod specs for a set of applications." - }, - "GetPrincipal": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringBoolResults" - } - }, - "description": "GetPrincipal returns the result of calling PrincipalName() and\nconverting it to a tag, on each given unit." - }, - "GetRawK8sSpec": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringResults" - } - }, - "description": "GetRawK8sSpec gets the raw k8s specs for a set of applications." - }, - "GetSecretBackendConfig": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/SecretBackendConfigResults" - } - }, - "description": "GetSecretBackendConfig gets the config needed to create a client to secret backends." - }, - "GetSecretContentInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/GetSecretContentArgs" - }, - "Result": { - "$ref": "#/definitions/SecretContentResults" - } - }, - "description": "GetSecretContentInfo returns the secret values for the specified secrets." - }, - "GetSecretMetadata": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ListSecretResults" - } - }, - "description": "GetSecretMetadata returns metadata for the caller's secrets." - }, - "GetSecretRevisionContentInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SecretRevisionArg" - }, - "Result": { - "$ref": "#/definitions/SecretContentResults" - } - }, - "description": "GetSecretRevisionContentInfo returns the secret values for the specified secret revisions." - }, - "GetSecretStoreConfig": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/SecretBackendConfig" - } - }, - "description": "GetSecretStoreConfig is for 3.0.x agents.\nTODO(wallyworld) - remove when we auto upgrade migrated models." - }, - "GoalStates": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/GoalStateResults" - } - }, - "description": "GoalStates returns information of charm units and relations." - }, - "HasSubordinates": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/BoolResults" - } - }, - "description": "HasSubordinates returns the whether each given unit has any subordinates." - }, - "LXDProfileName": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringResults" - } - }, - "description": "LXDProfileName is a shim to call the LXDProfileAPIv2 version of this method." - }, - "LXDProfileRequired": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/CharmURLs" - }, - "Result": { - "$ref": "#/definitions/BoolResults" - } - }, - "description": "LXDProfileRequired is a shim to call the LXDProfileAPIv2 version of this method." - }, - "LeaveScope": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RelationUnits" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "LeaveScope signals each unit has left its scope in the relation,\nfor all of the given relation/unit pairs. See also\nstate.RelationUnit.LeaveScope()." - }, - "Life": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/LifeResults" - } - }, - "description": "Life returns the life status of every supplied entity, where available." - }, - "LogActionsMessages": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ActionMessageParams" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "LogActionsMessages records the log messages against the specified actions." - }, - "Merge": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/MergeLeadershipSettingsBulkParams" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "Merge merges in the provided leadership settings. Only leaders for\nthe given service may perform this operation." - }, - "ModelConfig": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ModelConfigResult" - } - }, - "description": "ModelConfig returns the current model's configuration." - }, - "ModelUUID": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringResult" - } - }, - "description": "ModelUUID returns the model UUID that this unit resides in.\nIt is implemented here directly as a result of removing it from\nembedded APIAddresser *without* bumping the facade version.\nIt should be blanked when this facade version is next incremented." - }, - "NetworkInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/NetworkInfoParams" - }, - "Result": { - "$ref": "#/definitions/NetworkInfoResults" - } - }, - "description": "NetworkInfo returns network interfaces/addresses for specified bindings." - }, - "OpenedApplicationPortRangesByEndpoint": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entity" - }, - "Result": { - "$ref": "#/definitions/ApplicationOpenedPortsResults" - } - }, - "description": "OpenedApplicationPortRangesByEndpoint returns the port ranges opened by each application." - }, - "OpenedMachinePortRangesByEndpoint": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/OpenPortRangesByEndpointResults" - } - }, - "description": "OpenedMachinePortRangesByEndpoint returns the port ranges opened by each\nunit on the provided machines grouped by application endpoint." - }, - "OpenedPortRangesByEndpoint": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/OpenPortRangesByEndpointResults" - } - }, - "description": "OpenedPortRangesByEndpoint returns the port ranges opened by the unit." - }, - "PrivateAddress": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringResults" - } - }, - "description": "PrivateAddress returns the private address for each given unit, if set." - }, - "ProviderType": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringResult" - } - }, - "description": "ProviderType returns the provider type used by the current juju\nmodel.\n\nTODO(dimitern): Refactor the uniter to call this instead of calling\nModelConfig() just to get the provider type. Once we have machine\naddresses, this might be completely unnecessary though." - }, - "PublicAddress": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringResults" - } - }, - "description": "PublicAddress returns the public address for each given unit, if set." - }, - "Read": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/GetLeadershipSettingsBulkResults" - } - }, - "description": "Read reads leadership settings for the provided service ID. Any\nunit of the service may perform this operation." - }, - "ReadLocalApplicationSettings": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RelationUnit" - }, - "Result": { - "$ref": "#/definitions/SettingsResult" - } - }, - "description": "ReadLocalApplicationSettings returns the local application settings for a\nparticular relation when invoked by the leader unit." - }, - "ReadRemoteSettings": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RelationUnitPairs" - }, - "Result": { - "$ref": "#/definitions/SettingsResults" - } - }, - "description": "ReadRemoteSettings returns the remote settings of each given set of\nrelation/local unit/remote unit." - }, - "ReadSettings": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RelationUnits" - }, - "Result": { - "$ref": "#/definitions/SettingsResults" - } - }, - "description": "ReadSettings returns the local settings of each given set of\nrelation/unit.\n\nNOTE(achilleasa): Using this call to read application data is deprecated\nand will not work for k8s charms (see LP1876097). Instead, clients should\nuse ReadLocalApplicationSettings." - }, - "Refresh": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/UnitRefreshResults" - } - }, - "description": "Refresh retrieves the latest values for attributes on this unit." - }, - "Relation": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RelationUnits" - }, - "Result": { - "$ref": "#/definitions/RelationResults" - } - }, - "description": "Relation returns information about all given relation/unit pairs,\nincluding their id, key and the local endpoint." - }, - "RelationById": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RelationIds" - }, - "Result": { - "$ref": "#/definitions/RelationResults" - } - }, - "description": "RelationById returns information about all given relations,\nspecified by their ids, including their key and the local\nendpoint." - }, - "RelationsStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/RelationUnitStatusResults" - } - }, - "description": "RelationsStatus returns for each unit the corresponding relation and status information." - }, - "RemoveSecrets": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/DeleteSecretArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "RemoveSecrets removes the specified secrets." - }, - "RemoveStorageAttachments": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/StorageAttachmentIds" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "RemoveStorageAttachments removes the specified storage\nattachments from state." - }, - "RequestReboot": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "RequestReboot sets the reboot flag on the provided machines" - }, - "Resolved": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ResolvedModeResults" - } - }, - "description": "Resolved returns the current resolved setting for each given unit." - }, - "SLALevel": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringResult" - } - }, - "description": "SLALevel returns the model's SLA level." - }, - "SecretsGrant": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/GrantRevokeSecretArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SecretsGrant grants access to a secret for the specified subjects." - }, - "SecretsRevoke": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/GrantRevokeSecretArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SecretsRevoke revokes access to a secret for the specified subjects." - }, - "SecretsRotated": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SecretRotatedArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SecretsRotated records when secrets were last rotated." - }, - "SetAgentStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetStatus" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetAgentStatus will set status for agents of Units passed in args, if one\nof the args is not an Unit it will fail." - }, - "SetApplicationStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetStatus" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetApplicationStatus sets the status for all the Applications in args if the given Unit is\nthe leader." - }, - "SetCharmURL": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/EntitiesCharmURL" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetCharmURL sets the charm URL for each given unit. An error will\nbe returned if a unit is dead, or the charm URL is not known." - }, - "SetRelationStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RelationStatusArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetRelationStatus updates the status of the specified relations." - }, - "SetState": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetUnitStateArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetState sets the state persisted by the charm running in this unit\nand the state internal to the uniter for this unit." - }, - "SetStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetStatus" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetStatus will set status for a entities passed in args. If the entity is\na Unit it will instead set status to its agent, to emulate backwards\ncompatibility." - }, - "SetUnitStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetStatus" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetUnitStatus sets status for all elements passed in args, the difference\nwith SetStatus is that if an entity is a Unit it will set its status instead\nof its agent." - }, - "SetUpgradeSeriesUnitStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/UpgradeSeriesStatusParams" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetUpgradeSeriesUnitStatus sets the upgrade series status of the unit.\nIf no upgrade is in progress an error is returned instead." - }, - "SetWorkloadVersion": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/EntityWorkloadVersions" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetWorkloadVersion sets the workload version for each given unit. An error will\nbe returned if a unit is dead." - }, - "State": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/UnitStateResults" - } - }, - "description": "State returns the state persisted by the charm running in this unit\nand the state internal to the uniter for this unit." - }, - "StorageAttachmentLife": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/StorageAttachmentIds" - }, - "Result": { - "$ref": "#/definitions/LifeResults" - } - }, - "description": "StorageAttachmentLife returns the lifecycle state of the storage attachments\nwith the specified tags." - }, - "StorageAttachments": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/StorageAttachmentIds" - }, - "Result": { - "$ref": "#/definitions/StorageAttachmentResults" - } - }, - "description": "StorageAttachments returns the storage attachments with the specified tags." - }, - "UnitStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StatusResults" - } - }, - "description": "UnitStatus returns the workload status information for the unit." - }, - "UnitStorageAttachments": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StorageAttachmentIdsResults" - } - }, - "description": "UnitStorageAttachments returns the IDs of storage attachments for a collection of units." - }, - "UpdateNetworkInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "UpdateNetworkInfo refreshes the network settings for a unit's bound\nendpoints." - }, - "UpdateSecrets": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/UpdateSecretArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "UpdateSecrets updates the specified secrets." - }, - "UpgradeSeriesUnitStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/UpgradeSeriesStatusResults" - } - }, - "description": "UpgradeSeriesUnitStatus returns the current preparation status of an\nupgrading unit.\nIf no series upgrade is in progress an error is returned instead." - }, - "Watch": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "Watch starts an NotifyWatcher for each given entity." - }, - "WatchAPIHostPorts": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResult" - } - }, - "description": "WatchAPIHostPorts watches the API server addresses." - }, - "WatchActionNotifications": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - }, - "description": "WatchActionNotifications returns a StringsWatcher for observing\nincoming action calls to a unit. See also state/watcher.go\nUnit.WatchActionNotifications(). This method is called from\napi/uniter/uniter.go WatchActionNotifications()." - }, - "WatchConfigSettingsHash": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - }, - "description": "WatchConfigSettingsHash returns a StringsWatcher that yields a hash\nof the config values every time the config changes. The uniter can\nsave this hash and use it to decide whether the config-changed hook\nneeds to be run (or whether this was just an agent restart with no\nsubstantive config change)." - }, - "WatchConsumedSecretsChanges": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - }, - "description": "WatchConsumedSecretsChanges sets up a watcher to notify of changes to secret revisions for the specified consumers." - }, - "WatchForModelConfigChanges": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResult" - } - }, - "description": "WatchForModelConfigChanges returns a NotifyWatcher that observes\nchanges to the model configuration.\nNote that although the NotifyWatchResult contains an Error field,\nit's not used because we are only returning a single watcher,\nso we use the regular error return." - }, - "WatchInstanceData": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "WatchInstanceData is a shim to call the LXDProfileAPIv2 version of this method." - }, - "WatchLeadershipSettings": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "WatchLeadershipSettings will block the caller until leadership settings\nfor the given service ID change." - }, - "WatchMeterStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - } - }, - "WatchObsolete": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResult" - } - }, - "description": "WatchObsolete returns a watcher for notifying when:\n - a secret owned by the entity is deleted\n - a secret revision owed by the entity no longer\n has any consumers\n\nObsolete revisions results are \"uri/revno\" and deleted\nsecret results are \"uri\"." - }, - "WatchRelationUnits": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RelationUnits" - }, - "Result": { - "$ref": "#/definitions/RelationUnitsWatchResults" - } - }, - "description": "WatchRelationUnits returns a RelationUnitsWatcher for observing\nchanges to every unit in the supplied relation that is visible to\nthe supplied unit. See also state/watcher.go:RelationUnit.Watch()." - }, - "WatchSecretRevisionsExpiryChanges": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/SecretTriggerWatchResult" - } - }, - "description": "WatchSecretRevisionsExpiryChanges sets up a watcher to notify of changes to secret revision expiry config." - }, - "WatchSecretsRotationChanges": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/SecretTriggerWatchResult" - } - }, - "description": "WatchSecretsRotationChanges sets up a watcher to notify of changes to secret rotation config." - }, - "WatchStorageAttachments": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/StorageAttachmentIds" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "WatchStorageAttachments creates watchers for a collection of storage\nattachments, each of which can be used to watch changes to storage\nattachment info." - }, - "WatchTrustConfigSettingsHash": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - }, - "description": "WatchTrustConfigSettingsHash returns a StringsWatcher that yields a\nhash of the application config values whenever they change. The\nuniter can use the hash to determine whether the actual values have\nchanged since it last saw the config." - }, - "WatchUnitAddressesHash": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - }, - "description": "WatchUnitAddressesHash returns a StringsWatcher that yields the\nhashes of the addresses for the unit whenever the addresses\nchange. The uniter can use the hash to determine whether the actual\naddress values have changed since it last saw the config." - }, - "WatchUnitRelations": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - }, - "description": "WatchUnitRelations returns a StringsWatcher, for each given\nunit, that notifies of changes to the lifecycles of relations\nrelevant to that unit. For principal units, this will be all of the\nrelations for the application. For subordinate units, only\nrelations with the principal unit's application will be monitored." - }, - "WatchUnitStorageAttachments": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - }, - "description": "WatchUnitStorageAttachments creates watchers for a collection of units,\neach of which can be used to watch for lifecycle changes to the corresponding\nunit's storage attachments." - }, - "WatchUpgradeSeriesNotifications": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "WatchUpgradeSeriesNotifications returns a NotifyWatcher for observing changes to upgrade series locks." - }, - "WorkloadVersion": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringResults" - } - }, - "description": "WorkloadVersion returns the workload version for all given units or applications." - } - }, - "definitions": { - "APIHostPortsResult": { - "type": "object", - "properties": { - "servers": { - "type": "array", - "items": { - "type": "array", - "items": { - "$ref": "#/definitions/HostPort" - } - } - } - }, - "additionalProperties": false, - "required": [ - "servers" - ] - }, - "Action": { - "type": "object", - "properties": { - "execution-group": { - "type": "string" - }, - "name": { - "type": "string" - }, - "parallel": { - "type": "boolean" - }, - "parameters": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "receiver": { - "type": "string" - }, - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "receiver", - "name" - ] - }, - "ActionExecutionResult": { - "type": "object", - "properties": { - "action-tag": { - "type": "string" - }, - "message": { - "type": "string" - }, - "results": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "status": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "action-tag", - "status" - ] - }, - "ActionExecutionResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ActionExecutionResult" - } - } - }, - "additionalProperties": false - }, - "ActionMessage": { - "type": "object", - "properties": { - "message": { - "type": "string" - }, - "timestamp": { - "type": "string", - "format": "date-time" - } - }, - "additionalProperties": false, - "required": [ - "timestamp", - "message" - ] - }, - "ActionMessageParams": { - "type": "object", - "properties": { - "messages": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityString" - } - } - }, - "additionalProperties": false, - "required": [ - "messages" - ] - }, - "ActionResult": { - "type": "object", - "properties": { - "action": { - "$ref": "#/definitions/Action" - }, - "completed": { - "type": "string", - "format": "date-time" - }, - "enqueued": { - "type": "string", - "format": "date-time" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "log": { - "type": "array", - "items": { - "$ref": "#/definitions/ActionMessage" - } - }, - "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 - }, - "Address": { - "type": "object", - "properties": { - "cidr": { - "type": "string" - }, - "config-type": { - "type": "string" - }, - "is-secondary": { - "type": "boolean" - }, - "scope": { - "type": "string" - }, - "space-id": { - "type": "string" - }, - "space-name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "value", - "type", - "scope" - ] - }, - "ApplicationOpenedPorts": { - "type": "object", - "properties": { - "endpoint": { - "type": "string" - }, - "port-ranges": { - "type": "array", - "items": { - "$ref": "#/definitions/PortRange" - } - } - }, - "additionalProperties": false, - "required": [ - "endpoint", - "port-ranges" - ] - }, - "ApplicationOpenedPortsResult": { - "type": "object", - "properties": { - "application-port-ranges": { - "type": "array", - "items": { - "$ref": "#/definitions/ApplicationOpenedPorts" - } - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "application-port-ranges" - ] - }, - "ApplicationOpenedPortsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ApplicationOpenedPortsResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ApplicationStatusResult": { - "type": "object", - "properties": { - "application": { - "$ref": "#/definitions/StatusResult" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "units": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/StatusResult" - } - } - } - }, - "additionalProperties": false, - "required": [ - "application", - "units" - ] - }, - "ApplicationStatusResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ApplicationStatusResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "BoolResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "BoolResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/BoolResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "CharmRelation": { - "type": "object", - "properties": { - "interface": { - "type": "string" - }, - "limit": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "optional": { - "type": "boolean" - }, - "role": { - "type": "string" - }, - "scope": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "role", - "interface", - "optional", - "limit", - "scope" - ] - }, - "CharmURL": { - "type": "object", - "properties": { - "url": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "url" - ] - }, - "CharmURLs": { - "type": "object", - "properties": { - "urls": { - "type": "array", - "items": { - "$ref": "#/definitions/CharmURL" - } - } - }, - "additionalProperties": false, - "required": [ - "urls" - ] - }, - "CloudCredential": { - "type": "object", - "properties": { - "attrs": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "auth-type": { - "type": "string" - }, - "redacted": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "auth-type" - ] - }, - "CloudSpec": { - "type": "object", - "properties": { - "cacertificates": { - "type": "array", - "items": { - "type": "string" - } - }, - "credential": { - "$ref": "#/definitions/CloudCredential" - }, - "endpoint": { - "type": "string" - }, - "identity-endpoint": { - "type": "string" - }, - "is-controller-cloud": { - "type": "boolean" - }, - "name": { - "type": "string" - }, - "region": { - "type": "string" - }, - "skip-tls-verify": { - "type": "boolean" - }, - "storage-endpoint": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type", - "name" - ] - }, - "CloudSpecResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/CloudSpec" - } - }, - "additionalProperties": false - }, - "CommitHookChangesArg": { - "type": "object", - "properties": { - "add-storage": { - "type": "array", - "items": { - "$ref": "#/definitions/StorageAddParams" - } - }, - "close-ports": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityPortRange" - } - }, - "open-ports": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityPortRange" - } - }, - "pod-spec": { - "$ref": "#/definitions/PodSpec" - }, - "relation-unit-settings": { - "type": "array", - "items": { - "$ref": "#/definitions/RelationUnitSettings" - } - }, - "secret-creates": { - "type": "array", - "items": { - "$ref": "#/definitions/CreateSecretArg" - } - }, - "secret-deletes": { - "type": "array", - "items": { - "$ref": "#/definitions/DeleteSecretArg" - } - }, - "secret-grants": { - "type": "array", - "items": { - "$ref": "#/definitions/GrantRevokeSecretArg" - } - }, - "secret-revokes": { - "type": "array", - "items": { - "$ref": "#/definitions/GrantRevokeSecretArg" - } - }, - "secret-updates": { - "type": "array", - "items": { - "$ref": "#/definitions/UpdateSecretArg" - } - }, - "set-raw-k8s-spec": { - "$ref": "#/definitions/PodSpec" - }, - "tag": { - "type": "string" - }, - "unit-state": { - "$ref": "#/definitions/SetUnitStateArg" - }, - "update-network-info": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "update-network-info" - ] - }, - "CommitHookChangesArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/CommitHookChangesArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "ConfigSettingsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "settings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "settings" - ] - }, - "ConfigSettingsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ConfigSettingsResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "CreateSecretArg": { - "type": "object", - "properties": { - "UpsertSecretArg": { - "$ref": "#/definitions/UpsertSecretArg" - }, - "content": { - "$ref": "#/definitions/SecretContentParams" - }, - "description": { - "type": "string" - }, - "expire-time": { - "type": "string", - "format": "date-time" - }, - "label": { - "type": "string" - }, - "owner-tag": { - "type": "string" - }, - "params": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "rotate-policy": { - "type": "string" - }, - "uri": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "UpsertSecretArg", - "owner-tag" - ] - }, - "CreateSecretArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/CreateSecretArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "CreateSecretURIsArg": { - "type": "object", - "properties": { - "count": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "count" - ] - }, - "DeleteSecretArg": { - "type": "object", - "properties": { - "revisions": { - "type": "array", - "items": { - "type": "integer" - } - }, - "uri": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "uri" - ] - }, - "DeleteSecretArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/DeleteSecretArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "Endpoint": { - "type": "object", - "properties": { - "application-name": { - "type": "string" - }, - "relation": { - "$ref": "#/definitions/CharmRelation" - } - }, - "additionalProperties": false, - "required": [ - "application-name", - "relation" - ] - }, - "Entities": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } - } - }, - "additionalProperties": false, - "required": [ - "entities" - ] - }, - "EntitiesCharmURL": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityCharmURL" - } - } - }, - "additionalProperties": false, - "required": [ - "entities" - ] - }, - "Entity": { - "type": "object", - "properties": { - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag" - ] - }, - "EntityCharmURL": { - "type": "object", - "properties": { - "charm-url": { - "type": "string" - }, - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "charm-url" - ] - }, - "EntityPortRange": { - "type": "object", - "properties": { - "endpoint": { - "type": "string" - }, - "from-port": { - "type": "integer" - }, - "protocol": { - "type": "string" - }, - "tag": { - "type": "string" - }, - "to-port": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "protocol", - "from-port", - "to-port", - "endpoint" - ] - }, - "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" - ] - }, - "EntityString": { - "type": "object", - "properties": { - "tag": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "value" - ] - }, - "EntityWorkloadVersion": { - "type": "object", - "properties": { - "tag": { - "type": "string" - }, - "workload-version": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "workload-version" - ] - }, - "EntityWorkloadVersions": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityWorkloadVersion" - } - } - }, - "additionalProperties": false, - "required": [ - "entities" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "GetLeadershipSettingsBulkResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/GetLeadershipSettingsResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "GetLeadershipSettingsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "settings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - } - }, - "additionalProperties": false, - "required": [ - "settings" - ] - }, - "GetSecretConsumerInfoArgs": { - "type": "object", - "properties": { - "consumer-tag": { - "type": "string" - }, - "uris": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "consumer-tag", - "uris" - ] - }, - "GetSecretContentArg": { - "type": "object", - "properties": { - "label": { - "type": "string" - }, - "peek": { - "type": "boolean" - }, - "refresh": { - "type": "boolean" - }, - "uri": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "uri" - ] - }, - "GetSecretContentArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/GetSecretContentArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "GoalState": { - "type": "object", - "properties": { - "relations": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/GoalStateStatus" - } - } - } - } - }, - "units": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/GoalStateStatus" - } - } - } - }, - "additionalProperties": false, - "required": [ - "units", - "relations" - ] - }, - "GoalStateResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/GoalState" - } - }, - "additionalProperties": false, - "required": [ - "result", - "error" - ] - }, - "GoalStateResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/GoalStateResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "GoalStateStatus": { - "type": "object", - "properties": { - "since": { - "type": "string", - "format": "date-time" - }, - "status": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "status", - "since" - ] - }, - "GrantRevokeSecretArg": { - "type": "object", - "properties": { - "role": { - "type": "string" - }, - "scope-tag": { - "type": "string" - }, - "subject-tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "uri": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "uri", - "scope-tag", - "subject-tags", - "role" - ] - }, - "GrantRevokeSecretArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/GrantRevokeSecretArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "HostPort": { - "type": "object", - "properties": { - "Address": { - "$ref": "#/definitions/Address" - }, - "cidr": { - "type": "string" - }, - "config-type": { - "type": "string" - }, - "is-secondary": { - "type": "boolean" - }, - "port": { - "type": "integer" - }, - "scope": { - "type": "string" - }, - "space-id": { - "type": "string" - }, - "space-name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "value", - "type", - "scope", - "Address", - "port" - ] - }, - "IntResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "IntResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/IntResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "InterfaceAddress": { - "type": "object", - "properties": { - "cidr": { - "type": "string" - }, - "hostname": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "hostname", - "value", - "cidr" - ] - }, - "LifeResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "life": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "life" - ] - }, - "LifeResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/LifeResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ListSecretResult": { - "type": "object", - "properties": { - "create-time": { - "type": "string", - "format": "date-time" - }, - "description": { - "type": "string" - }, - "label": { - "type": "string" - }, - "latest-expire-time": { - "type": "string", - "format": "date-time" - }, - "latest-revision": { - "type": "integer" - }, - "next-rotate-time": { - "type": "string", - "format": "date-time" - }, - "owner-tag": { - "type": "string" - }, - "revisions": { - "type": "array", - "items": { - "$ref": "#/definitions/SecretRevision" - } - }, - "rotate-policy": { - "type": "string" - }, - "update-time": { - "type": "string", - "format": "date-time" - }, - "uri": { - "type": "string" - }, - "value": { - "$ref": "#/definitions/SecretValueResult" - }, - "version": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "uri", - "version", - "owner-tag", - "latest-revision", - "create-time", - "update-time", - "revisions" - ] - }, - "ListSecretResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ListSecretResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "MergeLeadershipSettingsBulkParams": { - "type": "object", - "properties": { - "params": { - "type": "array", - "items": { - "$ref": "#/definitions/MergeLeadershipSettingsParam" - } - } - }, - "additionalProperties": false, - "required": [ - "params" - ] - }, - "MergeLeadershipSettingsParam": { - "type": "object", - "properties": { - "application-tag": { - "type": "string" - }, - "settings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "unit-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "settings" - ] - }, - "MeterStatusResult": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "info": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "code", - "info" - ] - }, - "MeterStatusResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/MeterStatusResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "Metric": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "labels": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "time": { - "type": "string", - "format": "date-time" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "key", - "value", - "time" - ] - }, - "MetricBatch": { - "type": "object", - "properties": { - "charm-url": { - "type": "string" - }, - "created": { - "type": "string", - "format": "date-time" - }, - "metrics": { - "type": "array", - "items": { - "$ref": "#/definitions/Metric" - } - }, - "uuid": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "uuid", - "charm-url", - "created", - "metrics" - ] - }, - "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" - ] - }, - "ModelConfigResult": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "ModelResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "uuid": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "uuid", - "type" - ] - }, - "NetworkInfo": { - "type": "object", - "properties": { - "addresses": { - "type": "array", - "items": { - "$ref": "#/definitions/InterfaceAddress" - } - }, - "interface-name": { - "type": "string" - }, - "mac-address": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "mac-address", - "interface-name", - "addresses" - ] - }, - "NetworkInfoParams": { - "type": "object", - "properties": { - "bindings": { - "type": "array", - "items": { - "type": "string" - } - }, - "relation-id": { - "type": "integer" - }, - "unit": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "unit", - "bindings" - ] - }, - "NetworkInfoResult": { - "type": "object", - "properties": { - "bind-addresses": { - "type": "array", - "items": { - "$ref": "#/definitions/NetworkInfo" - } - }, - "egress-subnets": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "ingress-addresses": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "NetworkInfoResults": { - "type": "object", - "properties": { - "results": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/NetworkInfoResult" - } - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "NotifyWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "OpenPortRangesByEndpointResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "unit-port-ranges": { - "type": "object", - "patternProperties": { - ".*": { - "type": "array", - "items": { - "$ref": "#/definitions/OpenUnitPortRangesByEndpoint" - } - } - } - } - }, - "additionalProperties": false, - "required": [ - "unit-port-ranges" - ] - }, - "OpenPortRangesByEndpointResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/OpenPortRangesByEndpointResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "OpenUnitPortRangesByEndpoint": { - "type": "object", - "properties": { - "endpoint": { - "type": "string" - }, - "port-ranges": { - "type": "array", - "items": { - "$ref": "#/definitions/PortRange" - } - } - }, - "additionalProperties": false, - "required": [ - "endpoint", - "port-ranges" - ] - }, - "PodSpec": { - "type": "object", - "properties": { - "spec": { - "type": "string" - }, - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag" - ] - }, - "PortRange": { - "type": "object", - "properties": { - "from-port": { - "type": "integer" - }, - "protocol": { - "type": "string" - }, - "to-port": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "from-port", - "to-port", - "protocol" - ] - }, - "RelationIds": { - "type": "object", - "properties": { - "relation-ids": { - "type": "array", - "items": { - "type": "integer" - } - } - }, - "additionalProperties": false, - "required": [ - "relation-ids" - ] - }, - "RelationResult": { - "type": "object", - "properties": { - "bool": { - "type": "boolean" - }, - "endpoint": { - "$ref": "#/definitions/Endpoint" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "id": { - "type": "integer" - }, - "key": { - "type": "string" - }, - "life": { - "type": "string" - }, - "other-application": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "life", - "id", - "key", - "endpoint" - ] - }, - "RelationResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/RelationResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "RelationStatusArg": { - "type": "object", - "properties": { - "message": { - "type": "string" - }, - "relation-id": { - "type": "integer" - }, - "status": { - "type": "string" - }, - "unit-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "unit-tag", - "relation-id", - "status", - "message" - ] - }, - "RelationStatusArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/RelationStatusArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "RelationUnit": { - "type": "object", - "properties": { - "relation": { - "type": "string" - }, - "unit": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "relation", - "unit" - ] - }, - "RelationUnitPair": { - "type": "object", - "properties": { - "local-unit": { - "type": "string" - }, - "relation": { - "type": "string" - }, - "remote-unit": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "relation", - "local-unit", - "remote-unit" - ] - }, - "RelationUnitPairs": { - "type": "object", - "properties": { - "relation-unit-pairs": { - "type": "array", - "items": { - "$ref": "#/definitions/RelationUnitPair" - } - } - }, - "additionalProperties": false, - "required": [ - "relation-unit-pairs" - ] - }, - "RelationUnitSettings": { - "type": "object", - "properties": { - "application-settings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "relation": { - "type": "string" - }, - "settings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "unit": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "relation", - "unit", - "settings", - "application-settings" - ] - }, - "RelationUnitStatus": { - "type": "object", - "properties": { - "in-scope": { - "type": "boolean" - }, - "relation-tag": { - "type": "string" - }, - "suspended": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "relation-tag", - "in-scope", - "suspended" - ] - }, - "RelationUnitStatusResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/RelationUnitStatus" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "RelationUnitStatusResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/RelationUnitStatusResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "RelationUnits": { - "type": "object", - "properties": { - "relation-units": { - "type": "array", - "items": { - "$ref": "#/definitions/RelationUnit" - } - } - }, - "additionalProperties": false, - "required": [ - "relation-units" - ] - }, - "RelationUnitsChange": { - "type": "object", - "properties": { - "app-changed": { - "type": "object", - "patternProperties": { - ".*": { - "type": "integer" - } - } - }, - "changed": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/UnitSettings" - } - } - }, - "departed": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "changed" - ] - }, - "RelationUnitsWatchResult": { - "type": "object", - "properties": { - "changes": { - "$ref": "#/definitions/RelationUnitsChange" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id", - "changes" - ] - }, - "RelationUnitsWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/RelationUnitsWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ResolvedModeResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "mode": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "mode" - ] - }, - "ResolvedModeResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ResolvedModeResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "SecretBackendConfig": { - "type": "object", - "properties": { - "params": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type" - ] - }, - "SecretBackendConfigResults": { - "type": "object", - "properties": { - "active-id": { - "type": "string" - }, - "configs": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/SecretBackendConfig" - } - } - }, - "model-controller": { - "type": "string" - }, - "model-name": { - "type": "string" - }, - "model-uuid": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "model-controller", - "model-uuid", - "model-name", - "active-id" - ] - }, - "SecretConsumerInfoResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "label": { - "type": "string" - }, - "revision": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "revision", - "label" - ] - }, - "SecretConsumerInfoResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/SecretConsumerInfoResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "SecretContentParams": { - "type": "object", - "properties": { - "data": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "value-ref": { - "$ref": "#/definitions/SecretValueRef" - } - }, - "additionalProperties": false - }, - "SecretContentResult": { - "type": "object", - "properties": { - "content": { - "$ref": "#/definitions/SecretContentParams" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "content" - ] - }, - "SecretContentResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/SecretContentResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "SecretRevision": { - "type": "object", - "properties": { - "backend-name": { - "type": "string" - }, - "create-time": { - "type": "string", - "format": "date-time" - }, - "expire-time": { - "type": "string", - "format": "date-time" - }, - "revision": { - "type": "integer" - }, - "update-time": { - "type": "string", - "format": "date-time" - }, - "value-ref": { - "$ref": "#/definitions/SecretValueRef" - } - }, - "additionalProperties": false, - "required": [ - "revision" - ] - }, - "SecretRevisionArg": { - "type": "object", - "properties": { - "pending-delete": { - "type": "boolean" - }, - "revisions": { - "type": "array", - "items": { - "type": "integer" - } - }, - "uri": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "uri", - "revisions", - "pending-delete" - ] - }, - "SecretRotatedArg": { - "type": "object", - "properties": { - "original-revision": { - "type": "integer" - }, - "skip": { - "type": "boolean" - }, - "uri": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "uri", - "original-revision", - "skip" - ] - }, - "SecretRotatedArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/SecretRotatedArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "SecretTriggerChange": { - "type": "object", - "properties": { - "next-trigger-time": { - "type": "string", - "format": "date-time" - }, - "revision": { - "type": "integer" - }, - "uri": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "uri", - "next-trigger-time" - ] - }, - "SecretTriggerWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "$ref": "#/definitions/SecretTriggerChange" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id", - "changes" - ] - }, - "SecretValueRef": { - "type": "object", - "properties": { - "backend-id": { - "type": "string" - }, - "revision-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "backend-id", - "revision-id" - ] - }, - "SecretValueResult": { - "type": "object", - "properties": { - "data": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "SetStatus": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityStatusArgs" - } - } - }, - "additionalProperties": false, - "required": [ - "entities" - ] - }, - "SetUnitStateArg": { - "type": "object", - "properties": { - "charm-state": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "meter-status-state": { - "type": "string" - }, - "relation-state": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "secret-state": { - "type": "string" - }, - "storage-state": { - "type": "string" - }, - "tag": { - "type": "string" - }, - "uniter-state": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag" - ] - }, - "SetUnitStateArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/SetUnitStateArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "SettingsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "settings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - } - }, - "additionalProperties": false, - "required": [ - "settings" - ] - }, - "SettingsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/SettingsResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "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": [ - "id", - "life", - "status", - "info", - "data", - "since" - ] - }, - "StatusResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StatusResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "StorageAddParams": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "storage": { - "$ref": "#/definitions/StorageConstraints" - }, - "unit": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "unit", - "name", - "storage" - ] - }, - "StorageAttachment": { - "type": "object", - "properties": { - "kind": { - "type": "integer" - }, - "life": { - "type": "string" - }, - "location": { - "type": "string" - }, - "owner-tag": { - "type": "string" - }, - "storage-tag": { - "type": "string" - }, - "unit-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "storage-tag", - "owner-tag", - "unit-tag", - "kind", - "location", - "life" - ] - }, - "StorageAttachmentId": { - "type": "object", - "properties": { - "storage-tag": { - "type": "string" - }, - "unit-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "storage-tag", - "unit-tag" - ] - }, - "StorageAttachmentIds": { - "type": "object", - "properties": { - "ids": { - "type": "array", - "items": { - "$ref": "#/definitions/StorageAttachmentId" - } - } - }, - "additionalProperties": false, - "required": [ - "ids" - ] - }, - "StorageAttachmentIdsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/StorageAttachmentIds" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "StorageAttachmentIdsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StorageAttachmentIdsResult" - } - } - }, - "additionalProperties": false - }, - "StorageAttachmentResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/StorageAttachment" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "StorageAttachmentResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StorageAttachmentResult" - } - } - }, - "additionalProperties": false - }, - "StorageConstraints": { - "type": "object", - "properties": { - "count": { - "type": "integer" - }, - "pool": { - "type": "string" - }, - "size": { - "type": "integer" - } - }, - "additionalProperties": false - }, - "StringBoolResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "ok": { - "type": "boolean" - }, - "result": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "result", - "ok" - ] - }, - "StringBoolResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringBoolResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "StringResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "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": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "StringsWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id" - ] - }, - "StringsWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringsWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "UnitRefreshResult": { - "type": "object", - "properties": { - "Error": { - "$ref": "#/definitions/Error" - }, - "Life": { - "type": "string" - }, - "Resolved": { - "type": "string" - }, - "provider-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Life", - "Resolved", - "Error" - ] - }, - "UnitRefreshResults": { - "type": "object", - "properties": { - "Results": { - "type": "array", - "items": { - "$ref": "#/definitions/UnitRefreshResult" - } - } - }, - "additionalProperties": false, - "required": [ - "Results" - ] - }, - "UnitSettings": { - "type": "object", - "properties": { - "version": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "version" - ] - }, - "UnitStateResult": { - "type": "object", - "properties": { - "charm-state": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "meter-status-state": { - "type": "string" - }, - "relation-state": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "secret-state": { - "type": "string" - }, - "storage-state": { - "type": "string" - }, - "uniter-state": { - "type": "string" - } - }, - "additionalProperties": false - }, - "UnitStateResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/UnitStateResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "UpdateSecretArg": { - "type": "object", - "properties": { - "UpsertSecretArg": { - "$ref": "#/definitions/UpsertSecretArg" - }, - "content": { - "$ref": "#/definitions/SecretContentParams" - }, - "description": { - "type": "string" - }, - "expire-time": { - "type": "string", - "format": "date-time" - }, - "label": { - "type": "string" - }, - "params": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "rotate-policy": { - "type": "string" - }, - "uri": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "UpsertSecretArg", - "uri" - ] - }, - "UpdateSecretArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/UpdateSecretArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "UpgradeSeriesStatusParam": { - "type": "object", - "properties": { - "entity": { - "$ref": "#/definitions/Entity" - }, - "message": { - "type": "string" - }, - "status": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "entity", - "status", - "message" - ] - }, - "UpgradeSeriesStatusParams": { - "type": "object", - "properties": { - "params": { - "type": "array", - "items": { - "$ref": "#/definitions/UpgradeSeriesStatusParam" - } - } - }, - "additionalProperties": false, - "required": [ - "params" - ] - }, - "UpgradeSeriesStatusResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "status": { - "type": "string" - }, - "target": { - "type": "string" - } - }, - "additionalProperties": false - }, - "UpgradeSeriesStatusResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/UpgradeSeriesStatusResult" - } - } - }, - "additionalProperties": false - }, - "UpsertSecretArg": { - "type": "object", - "properties": { - "content": { - "$ref": "#/definitions/SecretContentParams" - }, - "description": { - "type": "string" - }, - "expire-time": { - "type": "string", - "format": "date-time" - }, - "label": { - "type": "string" - }, - "params": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "rotate-policy": { - "type": "string" - } - }, - "additionalProperties": false - } - } - } - }, - { - "Name": "UpgradeSeries", - "Description": "API serves methods required by the machine agent upgrade-machine worker.", - "Version": 3, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "CurrentSeries": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringResults" - } - }, - "description": "CurrentSeries returns what Juju thinks the current series of the machine is.\nNote that a machine could have been upgraded out-of-band by running\ndo-release-upgrade outside of the upgrade-machine workflow,\nmaking this value incorrect." - }, - "FinishUpgradeSeries": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/UpdateChannelArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "FinishUpgradeSeries is the last action in the upgrade workflow and is\ncalled after all machine and unit statuses are \"completed\".\nIt updates the machine series to reflect the completed upgrade, then\nremoves the upgrade-machine lock." - }, - "MachineStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/UpgradeSeriesStatusResults" - } - }, - "description": "MachineStatus gets the current upgrade-machine status of a machine." - }, - "PinMachineApplications": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/PinApplicationsResults" - } - }, - "description": "PinMachineApplications pins leadership for applications represented by units\nrunning on the auth'd machine." - }, - "PinnedLeadership": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/PinnedLeadershipResult" - } - }, - "description": "PinnedLeadership returns all pinned applications and the entities that\nrequire their pinned behaviour, for leadership in the current model." - }, - "SetInstanceStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetStatus" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetInstanceStatus sets the status of the machine." - }, - "SetMachineStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/UpgradeSeriesStatusParams" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetMachineStatus sets the current upgrade-machine status of a machine." - }, - "SetUpgradeSeriesUnitStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/UpgradeSeriesStatusParams" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetUpgradeSeriesUnitStatus sets the upgrade series status of the unit.\nIf no upgrade is in progress an error is returned instead." - }, - "StartUnitCompletion": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/UpgradeSeriesStartUnitCompletionParam" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "StartUnitCompletion starts the upgrade series completion phase for all subordinate\nunits of a given machine." - }, - "TargetSeries": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringResults" - } - }, - "description": "TargetSeries returns the series that a machine has been locked\nfor upgrading to." - }, - "UnitsCompleted": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/EntitiesResults" - } - }, - "description": "UnitsCompleted returns the units running on this machine that have completed\nthe upgrade-machine workflow and are in their normal running state." - }, - "UnitsPrepared": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/EntitiesResults" - } - }, - "description": "UnitsPrepared returns the units running on this machine that have completed\ntheir upgrade-machine preparation, and are ready to be stopped and have their\nunit agent services converted for the target series." - }, - "UnpinMachineApplications": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/PinApplicationsResults" - } - }, - "description": "UnpinMachineApplications unpins leadership for applications represented by\nunits running on the auth'd machine." - }, - "UpgradeSeriesUnitStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/UpgradeSeriesStatusResults" - } - }, - "description": "UpgradeSeriesUnitStatus returns the current preparation status of an\nupgrading unit.\nIf no series upgrade is in progress an error is returned instead." - }, - "WatchUpgradeSeriesNotifications": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "WatchUpgradeSeriesNotifications returns a NotifyWatcher for observing changes to upgrade series locks." - } - }, - "definitions": { - "Entities": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } - } - }, - "additionalProperties": false, - "required": [ - "entities" - ] - }, - "EntitiesResult": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "entities" - ] - }, - "EntitiesResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/EntitiesResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "Entity": { - "type": "object", - "properties": { - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "NotifyWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "PinApplicationResult": { - "type": "object", - "properties": { - "application-name": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "application-name" - ] - }, - "PinApplicationsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/PinApplicationResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "PinnedLeadershipResult": { - "type": "object", - "properties": { - "result": { - "type": "object", - "patternProperties": { - ".*": { - "type": "array", - "items": { - "type": "string" - } - } - } - } - }, - "additionalProperties": false - }, - "SetStatus": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityStatusArgs" - } - } - }, - "additionalProperties": false, - "required": [ - "entities" - ] - }, - "StringResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "StringResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "UpdateChannelArg": { - "type": "object", - "properties": { - "channel": { - "type": "string" - }, - "force": { - "type": "boolean" - }, - "tag": { - "$ref": "#/definitions/Entity" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "force", - "channel" - ] - }, - "UpdateChannelArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/UpdateChannelArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "UpgradeSeriesStartUnitCompletionParam": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "entities", - "message" - ] - }, - "UpgradeSeriesStatusParam": { - "type": "object", - "properties": { - "entity": { - "$ref": "#/definitions/Entity" - }, - "message": { - "type": "string" - }, - "status": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "entity", - "status", - "message" - ] - }, - "UpgradeSeriesStatusParams": { - "type": "object", - "properties": { - "params": { - "type": "array", - "items": { - "$ref": "#/definitions/UpgradeSeriesStatusParam" - } - } - }, - "additionalProperties": false, - "required": [ - "params" - ] - }, - "UpgradeSeriesStatusResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "status": { - "type": "string" - }, - "target": { - "type": "string" - } - }, - "additionalProperties": false - }, - "UpgradeSeriesStatusResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/UpgradeSeriesStatusResult" - } - } - }, - "additionalProperties": false - } - } - } - }, - { - "Name": "UpgradeSteps", - "Description": "UpgradeStepsAPI implements version 2 of the Upgrade Steps API,\nwhich adds WriteUniterState.", - "Version": 2, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent" - ], - "Schema": { - "type": "object", - "properties": { - "ResetKVMMachineModificationStatusIdle": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entity" - }, - "Result": { - "$ref": "#/definitions/ErrorResult" - } - }, - "description": "ResetKVMMachineModificationStatusIdle sets the modification status\nof a kvm machine to idle if it is in an error state before upgrade.\nRelated to lp:1829393." - }, - "WriteAgentState": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetUnitStateArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "WriteAgentState writes the agent state for the set of units provided. This\ncall presently deals with the state for the unit agent." - } - }, - "definitions": { - "Entity": { - "type": "object", - "properties": { - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "SetUnitStateArg": { - "type": "object", - "properties": { - "charm-state": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "meter-status-state": { - "type": "string" - }, - "relation-state": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "secret-state": { - "type": "string" - }, - "storage-state": { - "type": "string" - }, - "tag": { - "type": "string" - }, - "uniter-state": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag" - ] - }, - "SetUnitStateArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/SetUnitStateArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - } - } - } - }, - { - "Name": "Upgrader", - "Description": "", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "DesiredVersion": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/VersionResults" - } - } - }, - "SetTools": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/EntitiesVersion" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - } - }, - "Tools": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ToolsResults" - } - } - }, - "WatchAPIVersion": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - } - } - }, - "definitions": { - "Binary": { - "type": "object", - "properties": { - "Arch": { - "type": "string" - }, - "Build": { - "type": "integer" - }, - "Major": { - "type": "integer" - }, - "Minor": { - "type": "integer" - }, - "Number": { - "$ref": "#/definitions/Number" - }, - "Patch": { - "type": "integer" - }, - "Release": { - "type": "string" - }, - "Tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Major", - "Minor", - "Tag", - "Patch", - "Build", - "Number", - "Release", - "Arch" - ] - }, - "Entities": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } - } - }, - "additionalProperties": false, - "required": [ - "entities" - ] - }, - "EntitiesVersion": { - "type": "object", - "properties": { - "agent-tools": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityVersion" - } - } - }, - "additionalProperties": false, - "required": [ - "agent-tools" - ] - }, - "Entity": { - "type": "object", - "properties": { - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag" - ] - }, - "EntityVersion": { - "type": "object", - "properties": { - "tag": { - "type": "string" - }, - "tools": { - "$ref": "#/definitions/Version" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "tools" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "NotifyWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "Number": { - "type": "object", - "properties": { - "Build": { - "type": "integer" - }, - "Major": { - "type": "integer" - }, - "Minor": { - "type": "integer" - }, - "Patch": { - "type": "integer" - }, - "Tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Major", - "Minor", - "Tag", - "Patch", - "Build" - ] - }, - "Tools": { - "type": "object", - "properties": { - "sha256": { - "type": "string" - }, - "size": { - "type": "integer" - }, - "url": { - "type": "string" - }, - "version": { - "$ref": "#/definitions/Binary" - } - }, - "additionalProperties": false, - "required": [ - "version", - "url", - "size" - ] - }, - "ToolsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "tools": { - "type": "array", - "items": { - "$ref": "#/definitions/Tools" - } - } - }, - "additionalProperties": false, - "required": [ - "tools" - ] - }, - "ToolsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ToolsResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "Version": { - "type": "object", - "properties": { - "version": { - "$ref": "#/definitions/Binary" - } - }, - "additionalProperties": false, - "required": [ - "version" - ] - }, - "VersionResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "version": { - "$ref": "#/definitions/Number" - } - }, - "additionalProperties": false - }, - "VersionResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/VersionResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - } - } - } - }, - { - "Name": "UserManager", - "Description": "UserManagerAPI implements the user manager interface and is the concrete\nimplementation of the api end point.", - "Version": 3, - "AvailableTo": [ - "controller-user" - ], - "Schema": { - "type": "object", - "properties": { - "AddUser": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/AddUsers" - }, - "Result": { - "$ref": "#/definitions/AddUserResults" - } - }, - "description": "AddUser adds a user with a username, and either a password or\na randomly generated secret key which will be returned." - }, - "DisableUser": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "DisableUser disables one or more users. If the user is already disabled,\nthe action is considered a success." - }, - "EnableUser": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "EnableUser enables one or more users. If the user is already enabled,\nthe action is considered a success." - }, - "ModelUserInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ModelUserInfoResults" - } - }, - "description": "ModelUserInfo returns information on all users in the model." - }, - "RemoveUser": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "RemoveUser permanently removes a user from the current controller for each\nentity provided. While the user is permanently removed we keep it's\ninformation around for auditing purposes.\nTODO(redir): Add information about getting deleted user information when we\nadd that capability." - }, - "ResetPassword": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/AddUserResults" - } - }, - "description": "ResetPassword resets password for supplied users by\ninvalidating current passwords (if any) and generating\nnew random secret keys which will be returned.\nUsers cannot reset their own password." - }, - "SetPassword": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/EntityPasswords" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetPassword changes the stored password for the specified users." - }, - "UserInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/UserInfoRequest" - }, - "Result": { - "$ref": "#/definitions/UserInfoResults" - } - }, - "description": "UserInfo returns information on a user." - } - }, - "definitions": { - "AddUser": { - "type": "object", - "properties": { - "display-name": { - "type": "string" - }, - "password": { - "type": "string" - }, - "username": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "username", - "display-name" - ] - }, - "AddUserResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "secret-key": { - "type": "array", - "items": { - "type": "integer" - } - }, - "tag": { - "type": "string" - } - }, - "additionalProperties": false - }, - "AddUserResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/AddUserResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "AddUsers": { - "type": "object", - "properties": { - "users": { - "type": "array", - "items": { - "$ref": "#/definitions/AddUser" - } - } - }, - "additionalProperties": false, - "required": [ - "users" - ] - }, - "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" - ] - }, - "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" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ModelUserInfo": { - "type": "object", - "properties": { - "access": { - "type": "string" - }, - "display-name": { - "type": "string" - }, - "last-connection": { - "type": "string", - "format": "date-time" - }, - "model-tag": { - "type": "string" - }, - "user": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "model-tag", - "user", - "display-name", - "last-connection", - "access" - ] - }, - "ModelUserInfoResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/ModelUserInfo" - } - }, - "additionalProperties": false - }, - "ModelUserInfoResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelUserInfoResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "UserInfo": { - "type": "object", - "properties": { - "access": { - "type": "string" - }, - "created-by": { - "type": "string" - }, - "date-created": { - "type": "string", - "format": "date-time" - }, - "disabled": { - "type": "boolean" - }, - "display-name": { - "type": "string" - }, - "last-connection": { - "type": "string", - "format": "date-time" - }, - "username": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "username", - "display-name", - "access", - "created-by", - "date-created", - "disabled" - ] - }, - "UserInfoRequest": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } - }, - "include-disabled": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "entities", - "include-disabled" - ] - }, - "UserInfoResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/UserInfo" - } - }, - "additionalProperties": false - }, - "UserInfoResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/UserInfoResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - } - } - } - }, - { - "Name": "VolumeAttachmentPlansWatcher", - "Description": "srvMachineStorageIdsWatcher defines the API wrapping a state.StringsWatcher\nwatching machine/storage attachments. This watcher notifies about storage\nentities (volumes/filesystems) being attached to and detached from machines.\n\nTODO(axw) state needs a new watcher, this is a bt of a hack. State watchers\ncould do with some deduplication of logic, and I don't want to add to that\nspaghetti right now.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "Next": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/MachineStorageIdsWatchResult" - } - }, - "description": "Next returns when a change has occurred to an entity of the\ncollection being watched since the most recent call to Next\nor the Watch call that created the srvMachineStorageIdsWatcher." - }, - "Stop": { - "type": "object", - "description": "Stop stops the watcher." - } - }, - "definitions": { - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "MachineStorageId": { - "type": "object", - "properties": { - "attachment-tag": { - "type": "string" - }, - "machine-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "machine-tag", - "attachment-tag" - ] - }, - "MachineStorageIdsWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "$ref": "#/definitions/MachineStorageId" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id", - "changes" - ] - } - } - } - }, - { - "Name": "VolumeAttachmentsWatcher", - "Description": "srvMachineStorageIdsWatcher defines the API wrapping a state.StringsWatcher\nwatching machine/storage attachments. This watcher notifies about storage\nentities (volumes/filesystems) being attached to and detached from machines.\n\nTODO(axw) state needs a new watcher, this is a bt of a hack. State watchers\ncould do with some deduplication of logic, and I don't want to add to that\nspaghetti right now.", - "Version": 2, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "Next": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/MachineStorageIdsWatchResult" - } - }, - "description": "Next returns when a change has occurred to an entity of the\ncollection being watched since the most recent call to Next\nor the Watch call that created the srvMachineStorageIdsWatcher." - }, - "Stop": { - "type": "object", - "description": "Stop stops the watcher." - } - }, - "definitions": { - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "MachineStorageId": { - "type": "object", - "properties": { - "attachment-tag": { - "type": "string" - }, - "machine-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "machine-tag", - "attachment-tag" - ] - }, - "MachineStorageIdsWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "$ref": "#/definitions/MachineStorageId" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id", - "changes" - ] - } - } - } - } -] \ No newline at end of file diff --git a/juju/client/schemas-juju-3.1.9.json b/juju/client/schemas-juju-3.1.9.json new file mode 100644 index 00000000..bd18742b --- /dev/null +++ b/juju/client/schemas-juju-3.1.9.json @@ -0,0 +1,17406 @@ +[ + { + "Name": "Action", + "Description": "APIv7 provides the Action API facade for version 7.", + "Version": 7, + "AvailableTo": [ + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "Actions": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ActionResults" + } + }, + "description": "Actions takes a list of ActionTags, and returns the full Action for\neach ID." + }, + "ApplicationsCharmsActions": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ApplicationsCharmActionsResults" + } + }, + "description": "ApplicationsCharmsActions returns a slice of charm Actions for a slice of\nservices." + }, + "Cancel": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ActionResults" + } + }, + "description": "Cancel attempts to cancel enqueued Actions from running." + }, + "EnqueueOperation": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Actions" + }, + "Result": { + "$ref": "#/definitions/EnqueuedActions" + } + }, + "description": "EnqueueOperation takes a list of Actions and queues them up to be executed as\nan operation, each action running as a task on the designated ActionReceiver.\nWe return the ID of the overall operation and each individual task." + }, + "ListOperations": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/OperationQueryArgs" + }, + "Result": { + "$ref": "#/definitions/OperationResults" + } + }, + "description": "ListOperations fetches the called actions for specified apps/units." + }, + "Operations": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/OperationResults" + } + }, + "description": "Operations fetches the specified operation ids." + }, + "Run": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/RunParams" + }, + "Result": { + "$ref": "#/definitions/EnqueuedActions" + } + }, + "description": "Run the commands specified on the machines identified through the\nlist of machines, units and services." + }, + "RunOnAllMachines": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/RunParams" + }, + "Result": { + "$ref": "#/definitions/EnqueuedActions" + } + }, + "description": "RunOnAllMachines attempts to run the specified command on all the machines." + }, + "WatchActionsProgress": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/StringsWatchResults" + } + }, + "description": "WatchActionsProgress creates a watcher that reports on action log messages." + } + }, + "definitions": { + "Action": { + "type": "object", + "properties": { + "execution-group": { + "type": "string" + }, + "name": { + "type": "string" + }, + "parallel": { + "type": "boolean" + }, + "parameters": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "receiver": { + "type": "string" + }, + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag", + "receiver", + "name" + ] + }, + "ActionMessage": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + } + }, + "additionalProperties": false, + "required": [ + "timestamp", + "message" + ] + }, + "ActionResult": { + "type": "object", + "properties": { + "action": { + "$ref": "#/definitions/Action" + }, + "completed": { + "type": "string", + "format": "date-time" + }, + "enqueued": { + "type": "string", + "format": "date-time" + }, + "error": { + "$ref": "#/definitions/Error" + }, + "log": { + "type": "array", + "items": { + "$ref": "#/definitions/ActionMessage" + } + }, + "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 + }, + "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" + } + } + }, + "additionalProperties": false + }, + "ApplicationCharmActionsResult": { + "type": "object", + "properties": { + "actions": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/ActionSpec" + } + } + }, + "application-tag": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ApplicationsCharmActionsResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ApplicationCharmActionsResult" + } + } + }, + "additionalProperties": false + }, + "EnqueuedActions": { + "type": "object", + "properties": { + "actions": { + "type": "array", + "items": { + "$ref": "#/definitions/ActionResult" + } + }, + "operation": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "operation" + ] + }, + "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": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "OperationQueryArgs": { + "type": "object", + "properties": { + "actions": { + "type": "array", + "items": { + "type": "string" + } + }, + "applications": { + "type": "array", + "items": { + "type": "string" + } + }, + "limit": { + "type": "integer" + }, + "machines": { + "type": "array", + "items": { + "type": "string" + } + }, + "offset": { + "type": "integer" + }, + "status": { + "type": "array", + "items": { + "type": "string" + } + }, + "units": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "OperationResult": { + "type": "object", + "properties": { + "actions": { + "type": "array", + "items": { + "$ref": "#/definitions/ActionResult" + } + }, + "completed": { + "type": "string", + "format": "date-time" + }, + "enqueued": { + "type": "string", + "format": "date-time" + }, + "error": { + "$ref": "#/definitions/Error" + }, + "fail": { + "type": "string" + }, + "operation": { + "type": "string" + }, + "started": { + "type": "string", + "format": "date-time" + }, + "status": { + "type": "string" + }, + "summary": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "operation", + "summary" + ] + }, + "OperationResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/OperationResult" + } + }, + "truncated": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "RunParams": { + "type": "object", + "properties": { + "applications": { + "type": "array", + "items": { + "type": "string" + } + }, + "commands": { + "type": "string" + }, + "execution-group": { + "type": "string" + }, + "machines": { + "type": "array", + "items": { + "type": "string" + } + }, + "parallel": { + "type": "boolean" + }, + "timeout": { + "type": "integer" + }, + "units": { + "type": "array", + "items": { + "type": "string" + } + }, + "workload-context": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "commands", + "timeout" + ] + }, + "StringsWatchResult": { + "type": "object", + "properties": { + "changes": { + "type": "array", + "items": { + "type": "string" + } + }, + "error": { + "$ref": "#/definitions/Error" + }, + "watcher-id": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "watcher-id" + ] + }, + "StringsWatchResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/StringsWatchResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + } + } + } + }, + { + "Name": "Admin", + "Description": "admin is the only object that unlogged-in clients can access. It holds any\nmethods that are needed to log in.", + "Version": 3, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "controller-user", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "Login": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/LoginRequest" + }, + "Result": { + "$ref": "#/definitions/LoginResult" + } + }, + "description": "Login logs in with the provided credentials. All subsequent requests on the\nconnection will act as the authenticated user." + }, + "RedirectInfo": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/RedirectInfoResult" + } + }, + "description": "RedirectInfo returns redirected host information for the model.\nIn Juju it always returns an error because the Juju controller\ndoes not multiplex controllers." + } + }, + "definitions": { + "Address": { + "type": "object", + "properties": { + "cidr": { + "type": "string" + }, + "config-type": { + "type": "string" + }, + "is-secondary": { + "type": "boolean" + }, + "scope": { + "type": "string" + }, + "space-id": { + "type": "string" + }, + "space-name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "value", + "type", + "scope" + ] + }, + "AuthUserInfo": { + "type": "object", + "properties": { + "controller-access": { + "type": "string" + }, + "credentials": { + "type": "string" + }, + "display-name": { + "type": "string" + }, + "identity": { + "type": "string" + }, + "last-connection": { + "type": "string", + "format": "date-time" + }, + "model-access": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "display-name", + "identity", + "controller-access", + "model-access" + ] + }, + "FacadeVersions": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "versions": { + "type": "array", + "items": { + "type": "integer" + } + } + }, + "additionalProperties": false, + "required": [ + "name", + "versions" + ] + }, + "HostPort": { + "type": "object", + "properties": { + "Address": { + "$ref": "#/definitions/Address" + }, + "cidr": { + "type": "string" + }, + "config-type": { + "type": "string" + }, + "is-secondary": { + "type": "boolean" + }, + "port": { + "type": "integer" + }, + "scope": { + "type": "string" + }, + "space-id": { + "type": "string" + }, + "space-name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "value", + "type", + "scope", + "Address", + "port" + ] + }, + "LoginRequest": { + "type": "object", + "properties": { + "auth-tag": { + "type": "string" + }, + "bakery-version": { + "type": "integer" + }, + "cli-args": { + "type": "string" + }, + "client-version": { + "type": "string" + }, + "credentials": { + "type": "string" + }, + "macaroons": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/Macaroon" + } + } + }, + "nonce": { + "type": "string" + }, + "user-data": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "auth-tag", + "credentials", + "nonce", + "macaroons", + "user-data" + ] + }, + "LoginResult": { + "type": "object", + "properties": { + "bakery-discharge-required": { + "$ref": "#/definitions/Macaroon" + }, + "controller-tag": { + "type": "string" + }, + "discharge-required": { + "$ref": "#/definitions/Macaroon" + }, + "discharge-required-error": { + "type": "string" + }, + "facades": { + "type": "array", + "items": { + "$ref": "#/definitions/FacadeVersions" + } + }, + "model-tag": { + "type": "string" + }, + "public-dns-name": { + "type": "string" + }, + "server-version": { + "type": "string" + }, + "servers": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/HostPort" + } + } + }, + "user-info": { + "$ref": "#/definitions/AuthUserInfo" + } + }, + "additionalProperties": false + }, + "Macaroon": { + "type": "object", + "additionalProperties": false + }, + "RedirectInfoResult": { + "type": "object", + "properties": { + "ca-cert": { + "type": "string" + }, + "servers": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/HostPort" + } + } + } + }, + "additionalProperties": false, + "required": [ + "servers", + "ca-cert" + ] + } + } + } + }, + { + "Name": "AllModelWatcher", + "Description": "SrvAllWatcher defines the API methods on a state.Multiwatcher.\nwhich watches any changes to the state. Each client has its own\ncurrent set of watchers, stored in resources. It is used by both\nthe AllWatcher and AllModelWatcher facades.", + "Version": 4, + "AvailableTo": [ + "controller-user" + ], + "Schema": { + "type": "object", + "properties": { + "Next": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/AllWatcherNextResults" + } + }, + "description": "Next will return the current state of everything on the first call\nand subsequent calls will" + }, + "Stop": { + "type": "object", + "description": "Stop stops the watcher." + } + }, + "definitions": { + "AllWatcherNextResults": { + "type": "object", + "properties": { + "deltas": { + "type": "array", + "items": { + "$ref": "#/definitions/Delta" + } + } + }, + "additionalProperties": false, + "required": [ + "deltas" + ] + }, + "Delta": { + "type": "object", + "properties": { + "entity": { + "type": "object", + "additionalProperties": true + }, + "removed": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "removed", + "entity" + ] + } + } + } + }, + { + "Name": "AllWatcher", + "Description": "SrvAllWatcher defines the API methods on a state.Multiwatcher.\nwhich watches any changes to the state. Each client has its own\ncurrent set of watchers, stored in resources. It is used by both\nthe AllWatcher and AllModelWatcher facades.", + "Version": 3, + "AvailableTo": [ + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "Next": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/AllWatcherNextResults" + } + }, + "description": "Next will return the current state of everything on the first call\nand subsequent calls will" + }, + "Stop": { + "type": "object", + "description": "Stop stops the watcher." + } + }, + "definitions": { + "AllWatcherNextResults": { + "type": "object", + "properties": { + "deltas": { + "type": "array", + "items": { + "$ref": "#/definitions/Delta" + } + } + }, + "additionalProperties": false, + "required": [ + "deltas" + ] + }, + "Delta": { + "type": "object", + "properties": { + "entity": { + "type": "object", + "additionalProperties": true + }, + "removed": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "removed", + "entity" + ] + } + } + } + }, + { + "Name": "Annotations", + "Description": "API implements the service interface and is the concrete\nimplementation of the api end point.", + "Version": 2, + "AvailableTo": [ + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "Get": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/AnnotationsGetResults" + } + }, + "description": "Get returns annotations for given entities.\nIf annotations cannot be retrieved for a given entity, an error is returned.\nEach entity is treated independently and, hence, will fail or succeed independently." + }, + "Set": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/AnnotationsSet" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "Set stores annotations for given entities" + } + }, + "definitions": { + "AnnotationsGetResult": { + "type": "object", + "properties": { + "annotations": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "entity": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/ErrorResult" + } + }, + "additionalProperties": false, + "required": [ + "entity", + "annotations" + ] + }, + "AnnotationsGetResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/AnnotationsGetResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "AnnotationsSet": { + "type": "object", + "properties": { + "annotations": { + "type": "array", + "items": { + "$ref": "#/definitions/EntityAnnotations" + } + } + }, + "additionalProperties": false, + "required": [ + "annotations" + ] + }, + "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" + ] + }, + "EntityAnnotations": { + "type": "object", + "properties": { + "annotations": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "entity": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "entity", + "annotations" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ErrorResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + } + } + } + }, + { + "Name": "Application", + "Description": "APIv17 provides the Application API facade for version 17.", + "Version": 17, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "AddRelation": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/AddRelation" + }, + "Result": { + "$ref": "#/definitions/AddRelationResults" + } + }, + "description": "AddRelation adds a relation between the specified endpoints and returns the relation info." + }, + "AddUnits": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/AddApplicationUnits" + }, + "Result": { + "$ref": "#/definitions/AddApplicationUnitsResults" + } + }, + "description": "AddUnits adds a given number of units to an application." + }, + "ApplicationsInfo": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ApplicationInfoResults" + } + }, + "description": "ApplicationsInfo returns applications information." + }, + "CharmConfig": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ApplicationGetArgs" + }, + "Result": { + "$ref": "#/definitions/ApplicationGetConfigResults" + } + }, + "description": "CharmConfig returns charm config for the input list of applications and\nmodel generations." + }, + "CharmRelations": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ApplicationCharmRelations" + }, + "Result": { + "$ref": "#/definitions/ApplicationCharmRelationsResults" + } + }, + "description": "CharmRelations implements the server side of Application.CharmRelations." + }, + "Consume": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ConsumeApplicationArgs" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "Consume adds remote applications to the model without creating any\nrelations." + }, + "Deploy": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ApplicationsDeploy" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "Deploy fetches the charms from the charm store and deploys them\nusing the specified placement directives." + }, + "DestroyApplication": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/DestroyApplicationsParams" + }, + "Result": { + "$ref": "#/definitions/DestroyApplicationResults" + } + }, + "description": "DestroyApplication removes a given set of applications." + }, + "DestroyConsumedApplications": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/DestroyConsumedApplicationsParams" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "DestroyConsumedApplications removes a given set of consumed (remote) applications." + }, + "DestroyRelation": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/DestroyRelation" + } + }, + "description": "DestroyRelation removes the relation between the\nspecified endpoints or an id." + }, + "DestroyUnit": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/DestroyUnitsParams" + }, + "Result": { + "$ref": "#/definitions/DestroyUnitResults" + } + }, + "description": "DestroyUnit removes a given set of application units." + }, + "Expose": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ApplicationExpose" + } + }, + "description": "Expose changes the juju-managed firewall to expose any ports that\nwere also explicitly marked by units as open." + }, + "Get": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ApplicationGet" + }, + "Result": { + "$ref": "#/definitions/ApplicationGetResults" + } + }, + "description": "Get returns the charm configuration for an application." + }, + "GetCharmURLOrigin": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ApplicationGet" + }, + "Result": { + "$ref": "#/definitions/CharmURLOriginResult" + } + }, + "description": "GetCharmURLOrigin returns the charm URL and charm origin the given\napplication is running at present." + }, + "GetConfig": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ApplicationGetConfigResults" + } + }, + "description": "GetConfig returns the charm config for each of the input applications." + }, + "GetConstraints": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ApplicationGetConstraintsResults" + } + }, + "description": "GetConstraints returns the constraints for a given application." + }, + "Leader": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entity" + }, + "Result": { + "$ref": "#/definitions/StringResult" + } + }, + "description": "Leader returns the unit name of the leader for the given application." + }, + "MergeBindings": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ApplicationMergeBindingsArgs" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "MergeBindings merges operator-defined bindings with the current bindings for\none or more applications." + }, + "ResolveUnitErrors": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/UnitsResolved" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "ResolveUnitErrors marks errors on the specified units as resolved." + }, + "ScaleApplications": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ScaleApplicationsParams" + }, + "Result": { + "$ref": "#/definitions/ScaleApplicationResults" + } + }, + "description": "ScaleApplications scales the specified application to the requested number of units." + }, + "SetCharm": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ApplicationSetCharm" + } + }, + "description": "SetCharm sets the charm for a given for the application." + }, + "SetConfigs": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ConfigSetArgs" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "SetConfigs implements the server side of Application.SetConfig. Both\napplication and charm config are set. It does not unset values in\nConfig map that are set to an empty string. Unset should be used for that." + }, + "SetConstraints": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/SetConstraints" + } + }, + "description": "SetConstraints sets the constraints for a given application." + }, + "SetMetricCredentials": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ApplicationMetricCredentials" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "SetMetricCredentials sets credentials on the application." + }, + "SetRelationsSuspended": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/RelationSuspendedArgs" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "SetRelationsSuspended sets the suspended status of the specified relations." + }, + "Unexpose": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ApplicationUnexpose" + } + }, + "description": "Unexpose changes the juju-managed firewall to unexpose any ports that\nwere also explicitly marked by units as open." + }, + "UnitsInfo": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/UnitInfoResults" + } + }, + "description": "UnitsInfo returns unit information for the given entities (units or\napplications)." + }, + "UnsetApplicationsConfig": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ApplicationConfigUnsetArgs" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "UnsetApplicationsConfig implements the server side of Application.UnsetApplicationsConfig." + }, + "UpdateApplicationBase": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/UpdateChannelArgs" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "UpdateApplicationBase updates the application base.\nBase for subordinates is updated too." + } + }, + "definitions": { + "AddApplicationUnits": { + "type": "object", + "properties": { + "application": { + "type": "string" + }, + "attach-storage": { + "type": "array", + "items": { + "type": "string" + } + }, + "num-units": { + "type": "integer" + }, + "placement": { + "type": "array", + "items": { + "$ref": "#/definitions/Placement" + } + }, + "policy": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "application", + "num-units", + "placement" + ] + }, + "AddApplicationUnitsResults": { + "type": "object", + "properties": { + "units": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "units" + ] + }, + "AddRelation": { + "type": "object", + "properties": { + "endpoints": { + "type": "array", + "items": { + "type": "string" + } + }, + "via-cidrs": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "endpoints" + ] + }, + "AddRelationResults": { + "type": "object", + "properties": { + "endpoints": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmRelation" + } + } + } + }, + "additionalProperties": false, + "required": [ + "endpoints" + ] + }, + "ApplicationCharmRelations": { + "type": "object", + "properties": { + "application": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "application" + ] + }, + "ApplicationCharmRelationsResults": { + "type": "object", + "properties": { + "charm-relations": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "charm-relations" + ] + }, + "ApplicationConfigUnsetArgs": { + "type": "object", + "properties": { + "Args": { + "type": "array", + "items": { + "$ref": "#/definitions/ApplicationUnset" + } + } + }, + "additionalProperties": false, + "required": [ + "Args" + ] + }, + "ApplicationConstraint": { + "type": "object", + "properties": { + "constraints": { + "$ref": "#/definitions/Value" + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "constraints" + ] + }, + "ApplicationDeploy": { + "type": "object", + "properties": { + "Force": { + "type": "boolean" + }, + "application": { + "type": "string" + }, + "attach-storage": { + "type": "array", + "items": { + "type": "string" + } + }, + "channel": { + "type": "string" + }, + "charm-origin": { + "$ref": "#/definitions/CharmOrigin" + }, + "charm-url": { + "type": "string" + }, + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "config-yaml": { + "type": "string" + }, + "constraints": { + "$ref": "#/definitions/Value" + }, + "devices": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/Constraints" + } + } + }, + "endpoint-bindings": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "num-units": { + "type": "integer" + }, + "placement": { + "type": "array", + "items": { + "$ref": "#/definitions/Placement" + } + }, + "policy": { + "type": "string" + }, + "resources": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "storage": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/Constraints" + } + } + } + }, + "additionalProperties": false, + "required": [ + "application", + "charm-url", + "channel", + "num-units", + "config-yaml", + "constraints", + "Force" + ] + }, + "ApplicationExpose": { + "type": "object", + "properties": { + "application": { + "type": "string" + }, + "exposed-endpoints": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/ExposedEndpoint" + } + } + } + }, + "additionalProperties": false, + "required": [ + "application" + ] + }, + "ApplicationGet": { + "type": "object", + "properties": { + "application": { + "type": "string" + }, + "branch": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "application", + "branch" + ] + }, + "ApplicationGetArgs": { + "type": "object", + "properties": { + "args": { + "type": "array", + "items": { + "$ref": "#/definitions/ApplicationGet" + } + } + }, + "additionalProperties": false, + "required": [ + "args" + ] + }, + "ApplicationGetConfigResults": { + "type": "object", + "properties": { + "Results": { + "type": "array", + "items": { + "$ref": "#/definitions/ConfigResult" + } + } + }, + "additionalProperties": false, + "required": [ + "Results" + ] + }, + "ApplicationGetConstraintsResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ApplicationConstraint" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "ApplicationGetResults": { + "type": "object", + "properties": { + "application": { + "type": "string" + }, + "application-config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "base": { + "$ref": "#/definitions/Base" + }, + "channel": { + "type": "string" + }, + "charm": { + "type": "string" + }, + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "constraints": { + "$ref": "#/definitions/Value" + }, + "endpoint-bindings": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + } + }, + "additionalProperties": false, + "required": [ + "application", + "charm", + "config", + "constraints", + "base", + "channel" + ] + }, + "ApplicationInfoResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "$ref": "#/definitions/ApplicationResult" + } + }, + "additionalProperties": false + }, + "ApplicationInfoResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ApplicationInfoResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "ApplicationMergeBindings": { + "type": "object", + "properties": { + "application-tag": { + "type": "string" + }, + "bindings": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "force": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "application-tag", + "bindings", + "force" + ] + }, + "ApplicationMergeBindingsArgs": { + "type": "object", + "properties": { + "args": { + "type": "array", + "items": { + "$ref": "#/definitions/ApplicationMergeBindings" + } + } + }, + "additionalProperties": false, + "required": [ + "args" + ] + }, + "ApplicationMetricCredential": { + "type": "object", + "properties": { + "application": { + "type": "string" + }, + "metrics-credentials": { + "type": "array", + "items": { + "type": "integer" + } + } + }, + "additionalProperties": false, + "required": [ + "application", + "metrics-credentials" + ] + }, + "ApplicationMetricCredentials": { + "type": "object", + "properties": { + "creds": { + "type": "array", + "items": { + "$ref": "#/definitions/ApplicationMetricCredential" + } + } + }, + "additionalProperties": false, + "required": [ + "creds" + ] + }, + "ApplicationOfferDetails": { + "type": "object", + "properties": { + "application-description": { + "type": "string" + }, + "bindings": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "endpoints": { + "type": "array", + "items": { + "$ref": "#/definitions/RemoteEndpoint" + } + }, + "offer-name": { + "type": "string" + }, + "offer-url": { + "type": "string" + }, + "offer-uuid": { + "type": "string" + }, + "source-model-tag": { + "type": "string" + }, + "spaces": { + "type": "array", + "items": { + "$ref": "#/definitions/RemoteSpace" + } + }, + "users": { + "type": "array", + "items": { + "$ref": "#/definitions/OfferUserDetails" + } + } + }, + "additionalProperties": false, + "required": [ + "source-model-tag", + "offer-uuid", + "offer-url", + "offer-name", + "application-description" + ] + }, + "ApplicationResult": { + "type": "object", + "properties": { + "base": { + "$ref": "#/definitions/Base" + }, + "channel": { + "type": "string" + }, + "charm": { + "type": "string" + }, + "constraints": { + "$ref": "#/definitions/Value" + }, + "endpoint-bindings": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "exposed": { + "type": "boolean" + }, + "exposed-endpoints": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/ExposedEndpoint" + } + } + }, + "life": { + "type": "string" + }, + "principal": { + "type": "boolean" + }, + "remote": { + "type": "boolean" + }, + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag", + "principal", + "exposed", + "remote", + "life" + ] + }, + "ApplicationSetCharm": { + "type": "object", + "properties": { + "application": { + "type": "string" + }, + "channel": { + "type": "string" + }, + "charm-origin": { + "$ref": "#/definitions/CharmOrigin" + }, + "charm-url": { + "type": "string" + }, + "config-settings": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "config-settings-yaml": { + "type": "string" + }, + "endpoint-bindings": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "force": { + "type": "boolean" + }, + "force-base": { + "type": "boolean" + }, + "force-units": { + "type": "boolean" + }, + "generation": { + "type": "string" + }, + "resource-ids": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "storage-constraints": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/StorageConstraints" + } + } + } + }, + "additionalProperties": false, + "required": [ + "application", + "generation", + "charm-url", + "channel", + "force", + "force-units", + "force-base" + ] + }, + "ApplicationUnexpose": { + "type": "object", + "properties": { + "application": { + "type": "string" + }, + "exposed-endpoints": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "application", + "exposed-endpoints" + ] + }, + "ApplicationUnset": { + "type": "object", + "properties": { + "application": { + "type": "string" + }, + "branch": { + "type": "string" + }, + "options": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "application", + "branch", + "options" + ] + }, + "ApplicationsDeploy": { + "type": "object", + "properties": { + "applications": { + "type": "array", + "items": { + "$ref": "#/definitions/ApplicationDeploy" + } + } + }, + "additionalProperties": false, + "required": [ + "applications" + ] + }, + "Base": { + "type": "object", + "properties": { + "channel": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "channel" + ] + }, + "CharmOrigin": { + "type": "object", + "properties": { + "architecture": { + "type": "string" + }, + "base": { + "$ref": "#/definitions/Base" + }, + "branch": { + "type": "string" + }, + "hash": { + "type": "string" + }, + "id": { + "type": "string" + }, + "instance-key": { + "type": "string" + }, + "revision": { + "type": "integer" + }, + "risk": { + "type": "string" + }, + "source": { + "type": "string" + }, + "track": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "source", + "type", + "id" + ] + }, + "CharmRelation": { + "type": "object", + "properties": { + "interface": { + "type": "string" + }, + "limit": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "optional": { + "type": "boolean" + }, + "role": { + "type": "string" + }, + "scope": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "role", + "interface", + "optional", + "limit", + "scope" + ] + }, + "CharmURLOriginResult": { + "type": "object", + "properties": { + "charm-origin": { + "$ref": "#/definitions/CharmOrigin" + }, + "error": { + "$ref": "#/definitions/Error" + }, + "url": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "url", + "charm-origin" + ] + }, + "ConfigResult": { + "type": "object", + "properties": { + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "config" + ] + }, + "ConfigSet": { + "type": "object", + "properties": { + "application": { + "type": "string" + }, + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "config-yaml": { + "type": "string" + }, + "generation": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "application", + "generation", + "config", + "config-yaml" + ] + }, + "ConfigSetArgs": { + "type": "object", + "properties": { + "Args": { + "type": "array", + "items": { + "$ref": "#/definitions/ConfigSet" + } + } + }, + "additionalProperties": false, + "required": [ + "Args" + ] + }, + "Constraints": { + "type": "object", + "properties": { + "Count": { + "type": "integer" + }, + "Pool": { + "type": "string" + }, + "Size": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "Pool", + "Size", + "Count" + ] + }, + "ConsumeApplicationArg": { + "type": "object", + "properties": { + "ApplicationOfferDetails": { + "$ref": "#/definitions/ApplicationOfferDetails" + }, + "application-alias": { + "type": "string" + }, + "application-description": { + "type": "string" + }, + "bindings": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "endpoints": { + "type": "array", + "items": { + "$ref": "#/definitions/RemoteEndpoint" + } + }, + "external-controller": { + "$ref": "#/definitions/ExternalControllerInfo" + }, + "macaroon": { + "$ref": "#/definitions/Macaroon" + }, + "offer-name": { + "type": "string" + }, + "offer-url": { + "type": "string" + }, + "offer-uuid": { + "type": "string" + }, + "source-model-tag": { + "type": "string" + }, + "spaces": { + "type": "array", + "items": { + "$ref": "#/definitions/RemoteSpace" + } + }, + "users": { + "type": "array", + "items": { + "$ref": "#/definitions/OfferUserDetails" + } + } + }, + "additionalProperties": false, + "required": [ + "source-model-tag", + "offer-uuid", + "offer-url", + "offer-name", + "application-description", + "ApplicationOfferDetails" + ] + }, + "ConsumeApplicationArgs": { + "type": "object", + "properties": { + "args": { + "type": "array", + "items": { + "$ref": "#/definitions/ConsumeApplicationArg" + } + } + }, + "additionalProperties": false + }, + "DestroyApplicationInfo": { + "type": "object", + "properties": { + "destroyed-storage": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + }, + "destroyed-units": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + }, + "detached-storage": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + } + }, + "additionalProperties": false + }, + "DestroyApplicationParams": { + "type": "object", + "properties": { + "application-tag": { + "type": "string" + }, + "destroy-storage": { + "type": "boolean" + }, + "dry-run": { + "type": "boolean" + }, + "force": { + "type": "boolean" + }, + "max-wait": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "application-tag", + "force" + ] + }, + "DestroyApplicationResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "info": { + "$ref": "#/definitions/DestroyApplicationInfo" + } + }, + "additionalProperties": false + }, + "DestroyApplicationResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/DestroyApplicationResult" + } + } + }, + "additionalProperties": false + }, + "DestroyApplicationsParams": { + "type": "object", + "properties": { + "applications": { + "type": "array", + "items": { + "$ref": "#/definitions/DestroyApplicationParams" + } + } + }, + "additionalProperties": false, + "required": [ + "applications" + ] + }, + "DestroyConsumedApplicationParams": { + "type": "object", + "properties": { + "application-tag": { + "type": "string" + }, + "force": { + "type": "boolean" + }, + "max-wait": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "application-tag" + ] + }, + "DestroyConsumedApplicationsParams": { + "type": "object", + "properties": { + "applications": { + "type": "array", + "items": { + "$ref": "#/definitions/DestroyConsumedApplicationParams" + } + } + }, + "additionalProperties": false, + "required": [ + "applications" + ] + }, + "DestroyRelation": { + "type": "object", + "properties": { + "endpoints": { + "type": "array", + "items": { + "type": "string" + } + }, + "force": { + "type": "boolean" + }, + "max-wait": { + "type": "integer" + }, + "relation-id": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "relation-id" + ] + }, + "DestroyUnitInfo": { + "type": "object", + "properties": { + "destroyed-storage": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + }, + "detached-storage": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + } + }, + "additionalProperties": false + }, + "DestroyUnitParams": { + "type": "object", + "properties": { + "destroy-storage": { + "type": "boolean" + }, + "dry-run": { + "type": "boolean" + }, + "force": { + "type": "boolean" + }, + "max-wait": { + "type": "integer" + }, + "unit-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "unit-tag" + ] + }, + "DestroyUnitResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "info": { + "$ref": "#/definitions/DestroyUnitInfo" + } + }, + "additionalProperties": false + }, + "DestroyUnitResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/DestroyUnitResult" + } + } + }, + "additionalProperties": false + }, + "DestroyUnitsParams": { + "type": "object", + "properties": { + "units": { + "type": "array", + "items": { + "$ref": "#/definitions/DestroyUnitParams" + } + } + }, + "additionalProperties": false, + "required": [ + "units" + ] + }, + "EndpointRelationData": { + "type": "object", + "properties": { + "ApplicationData": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "cross-model": { + "type": "boolean" + }, + "endpoint": { + "type": "string" + }, + "related-endpoint": { + "type": "string" + }, + "relation-id": { + "type": "integer" + }, + "unit-relation-data": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/RelationData" + } + } + } + }, + "additionalProperties": false, + "required": [ + "relation-id", + "endpoint", + "cross-model", + "related-endpoint", + "ApplicationData", + "unit-relation-data" + ] + }, + "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": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ErrorResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "ExposedEndpoint": { + "type": "object", + "properties": { + "expose-to-cidrs": { + "type": "array", + "items": { + "type": "string" + } + }, + "expose-to-spaces": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "ExternalControllerInfo": { + "type": "object", + "properties": { + "addrs": { + "type": "array", + "items": { + "type": "string" + } + }, + "ca-cert": { + "type": "string" + }, + "controller-alias": { + "type": "string" + }, + "controller-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "controller-tag", + "controller-alias", + "addrs", + "ca-cert" + ] + }, + "Macaroon": { + "type": "object", + "additionalProperties": false + }, + "OfferUserDetails": { + "type": "object", + "properties": { + "access": { + "type": "string" + }, + "display-name": { + "type": "string" + }, + "user": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "user", + "display-name", + "access" + ] + }, + "Placement": { + "type": "object", + "properties": { + "directive": { + "type": "string" + }, + "scope": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "scope", + "directive" + ] + }, + "RelationData": { + "type": "object", + "properties": { + "InScope": { + "type": "boolean" + }, + "UnitData": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + } + }, + "additionalProperties": false, + "required": [ + "InScope", + "UnitData" + ] + }, + "RelationSuspendedArg": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "relation-id": { + "type": "integer" + }, + "suspended": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "relation-id", + "message", + "suspended" + ] + }, + "RelationSuspendedArgs": { + "type": "object", + "properties": { + "args": { + "type": "array", + "items": { + "$ref": "#/definitions/RelationSuspendedArg" + } + } + }, + "additionalProperties": false, + "required": [ + "args" + ] + }, + "RemoteEndpoint": { + "type": "object", + "properties": { + "interface": { + "type": "string" + }, + "limit": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "role": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "role", + "interface", + "limit" + ] + }, + "RemoteSpace": { + "type": "object", + "properties": { + "cloud-type": { + "type": "string" + }, + "name": { + "type": "string" + }, + "provider-attributes": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "provider-id": { + "type": "string" + }, + "subnets": { + "type": "array", + "items": { + "$ref": "#/definitions/Subnet" + } + } + }, + "additionalProperties": false, + "required": [ + "cloud-type", + "name", + "provider-id", + "provider-attributes", + "subnets" + ] + }, + "ScaleApplicationInfo": { + "type": "object", + "properties": { + "num-units": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "num-units" + ] + }, + "ScaleApplicationParams": { + "type": "object", + "properties": { + "application-tag": { + "type": "string" + }, + "force": { + "type": "boolean" + }, + "scale": { + "type": "integer" + }, + "scale-change": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "application-tag", + "scale", + "force" + ] + }, + "ScaleApplicationResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "info": { + "$ref": "#/definitions/ScaleApplicationInfo" + } + }, + "additionalProperties": false + }, + "ScaleApplicationResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ScaleApplicationResult" + } + } + }, + "additionalProperties": false + }, + "ScaleApplicationsParams": { + "type": "object", + "properties": { + "applications": { + "type": "array", + "items": { + "$ref": "#/definitions/ScaleApplicationParams" + } + } + }, + "additionalProperties": false, + "required": [ + "applications" + ] + }, + "SetConstraints": { + "type": "object", + "properties": { + "application": { + "type": "string" + }, + "constraints": { + "$ref": "#/definitions/Value" + } + }, + "additionalProperties": false, + "required": [ + "application", + "constraints" + ] + }, + "StorageConstraints": { + "type": "object", + "properties": { + "count": { + "type": "integer" + }, + "pool": { + "type": "string" + }, + "size": { + "type": "integer" + } + }, + "additionalProperties": false + }, + "StringResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "result" + ] + }, + "Subnet": { + "type": "object", + "properties": { + "cidr": { + "type": "string" + }, + "life": { + "type": "string" + }, + "provider-id": { + "type": "string" + }, + "provider-network-id": { + "type": "string" + }, + "provider-space-id": { + "type": "string" + }, + "space-tag": { + "type": "string" + }, + "status": { + "type": "string" + }, + "vlan-tag": { + "type": "integer" + }, + "zones": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "cidr", + "vlan-tag", + "life", + "space-tag", + "zones" + ] + }, + "UnitInfoResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "$ref": "#/definitions/UnitResult" + } + }, + "additionalProperties": false + }, + "UnitInfoResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/UnitInfoResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "UnitResult": { + "type": "object", + "properties": { + "address": { + "type": "string" + }, + "charm": { + "type": "string" + }, + "leader": { + "type": "boolean" + }, + "life": { + "type": "string" + }, + "machine": { + "type": "string" + }, + "opened-ports": { + "type": "array", + "items": { + "type": "string" + } + }, + "provider-id": { + "type": "string" + }, + "public-address": { + "type": "string" + }, + "relation-data": { + "type": "array", + "items": { + "$ref": "#/definitions/EndpointRelationData" + } + }, + "tag": { + "type": "string" + }, + "workload-version": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag", + "workload-version", + "opened-ports", + "charm" + ] + }, + "UnitsResolved": { + "type": "object", + "properties": { + "all": { + "type": "boolean" + }, + "retry": { + "type": "boolean" + }, + "tags": { + "$ref": "#/definitions/Entities" + } + }, + "additionalProperties": false + }, + "UpdateChannelArg": { + "type": "object", + "properties": { + "channel": { + "type": "string" + }, + "force": { + "type": "boolean" + }, + "tag": { + "$ref": "#/definitions/Entity" + } + }, + "additionalProperties": false, + "required": [ + "tag", + "force", + "channel" + ] + }, + "UpdateChannelArgs": { + "type": "object", + "properties": { + "args": { + "type": "array", + "items": { + "$ref": "#/definitions/UpdateChannelArg" + } + } + }, + "additionalProperties": false, + "required": [ + "args" + ] + }, + "Value": { + "type": "object", + "properties": { + "allocate-public-ip": { + "type": "boolean" + }, + "arch": { + "type": "string" + }, + "container": { + "type": "string" + }, + "cores": { + "type": "integer" + }, + "cpu-power": { + "type": "integer" + }, + "instance-role": { + "type": "string" + }, + "instance-type": { + "type": "string" + }, + "mem": { + "type": "integer" + }, + "root-disk": { + "type": "integer" + }, + "root-disk-source": { + "type": "string" + }, + "spaces": { + "type": "array", + "items": { + "type": "string" + } + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "virt-type": { + "type": "string" + }, + "zones": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + } + } + } + }, + { + "Name": "ApplicationOffers", + "Description": "OffersAPI implements the cross model interface and is the concrete\nimplementation of the api end point.", + "Version": 4, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "controller-user" + ], + "Schema": { + "type": "object", + "properties": { + "ApplicationOffers": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/OfferURLs" + }, + "Result": { + "$ref": "#/definitions/ApplicationOffersResults" + } + }, + "description": "ApplicationOffers gets details about remote applications that match given URLs." + }, + "DestroyOffers": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/DestroyApplicationOffers" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "DestroyOffers removes the offers specified by the given URLs, forcing if necessary." + }, + "FindApplicationOffers": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/OfferFilters" + }, + "Result": { + "$ref": "#/definitions/QueryApplicationOffersResults" + } + }, + "description": "FindApplicationOffers gets details about remote applications that match given filter." + }, + "GetConsumeDetails": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ConsumeOfferDetailsArg" + }, + "Result": { + "$ref": "#/definitions/ConsumeOfferDetailsResults" + } + }, + "description": "GetConsumeDetails returns the details necessary to pass to another model\nto allow the specified args user to consume the offers represented by the args URLs." + }, + "ListApplicationOffers": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/OfferFilters" + }, + "Result": { + "$ref": "#/definitions/QueryApplicationOffersResults" + } + }, + "description": "ListApplicationOffers gets deployed details about application offers that match given filter.\nThe results contain details about the deployed applications such as connection count." + }, + "ModifyOfferAccess": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ModifyOfferAccessRequest" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "ModifyOfferAccess changes the application offer access granted to users." + }, + "Offer": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/AddApplicationOffers" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "Offer makes application endpoints available for consumption at a specified URL." + }, + "RemoteApplicationInfo": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/OfferURLs" + }, + "Result": { + "$ref": "#/definitions/RemoteApplicationInfoResults" + } + }, + "description": "RemoteApplicationInfo returns information about the requested remote application.\nThis call currently has no client side API, only there for the Dashboard at this stage." + } + }, + "definitions": { + "AddApplicationOffer": { + "type": "object", + "properties": { + "application-description": { + "type": "string" + }, + "application-name": { + "type": "string" + }, + "endpoints": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "model-tag": { + "type": "string" + }, + "offer-name": { + "type": "string" + }, + "owner-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "model-tag", + "offer-name", + "application-name", + "application-description", + "endpoints" + ] + }, + "AddApplicationOffers": { + "type": "object", + "properties": { + "Offers": { + "type": "array", + "items": { + "$ref": "#/definitions/AddApplicationOffer" + } + } + }, + "additionalProperties": false, + "required": [ + "Offers" + ] + }, + "ApplicationOfferAdminDetails": { + "type": "object", + "properties": { + "ApplicationOfferDetails": { + "$ref": "#/definitions/ApplicationOfferDetails" + }, + "application-description": { + "type": "string" + }, + "application-name": { + "type": "string" + }, + "bindings": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "charm-url": { + "type": "string" + }, + "connections": { + "type": "array", + "items": { + "$ref": "#/definitions/OfferConnection" + } + }, + "endpoints": { + "type": "array", + "items": { + "$ref": "#/definitions/RemoteEndpoint" + } + }, + "offer-name": { + "type": "string" + }, + "offer-url": { + "type": "string" + }, + "offer-uuid": { + "type": "string" + }, + "source-model-tag": { + "type": "string" + }, + "spaces": { + "type": "array", + "items": { + "$ref": "#/definitions/RemoteSpace" + } + }, + "users": { + "type": "array", + "items": { + "$ref": "#/definitions/OfferUserDetails" + } + } + }, + "additionalProperties": false, + "required": [ + "source-model-tag", + "offer-uuid", + "offer-url", + "offer-name", + "application-description", + "ApplicationOfferDetails", + "application-name", + "charm-url" + ] + }, + "ApplicationOfferDetails": { + "type": "object", + "properties": { + "application-description": { + "type": "string" + }, + "bindings": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "endpoints": { + "type": "array", + "items": { + "$ref": "#/definitions/RemoteEndpoint" + } + }, + "offer-name": { + "type": "string" + }, + "offer-url": { + "type": "string" + }, + "offer-uuid": { + "type": "string" + }, + "source-model-tag": { + "type": "string" + }, + "spaces": { + "type": "array", + "items": { + "$ref": "#/definitions/RemoteSpace" + } + }, + "users": { + "type": "array", + "items": { + "$ref": "#/definitions/OfferUserDetails" + } + } + }, + "additionalProperties": false, + "required": [ + "source-model-tag", + "offer-uuid", + "offer-url", + "offer-name", + "application-description" + ] + }, + "ApplicationOfferResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "$ref": "#/definitions/ApplicationOfferAdminDetails" + } + }, + "additionalProperties": false + }, + "ApplicationOffersResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ApplicationOfferResult" + } + } + }, + "additionalProperties": false + }, + "ConsumeOfferDetails": { + "type": "object", + "properties": { + "external-controller": { + "$ref": "#/definitions/ExternalControllerInfo" + }, + "macaroon": { + "$ref": "#/definitions/Macaroon" + }, + "offer": { + "$ref": "#/definitions/ApplicationOfferDetails" + } + }, + "additionalProperties": false + }, + "ConsumeOfferDetailsArg": { + "type": "object", + "properties": { + "offer-urls": { + "$ref": "#/definitions/OfferURLs" + }, + "user-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "offer-urls" + ] + }, + "ConsumeOfferDetailsResult": { + "type": "object", + "properties": { + "ConsumeOfferDetails": { + "$ref": "#/definitions/ConsumeOfferDetails" + }, + "error": { + "$ref": "#/definitions/Error" + }, + "external-controller": { + "$ref": "#/definitions/ExternalControllerInfo" + }, + "macaroon": { + "$ref": "#/definitions/Macaroon" + }, + "offer": { + "$ref": "#/definitions/ApplicationOfferDetails" + } + }, + "additionalProperties": false, + "required": [ + "ConsumeOfferDetails" + ] + }, + "ConsumeOfferDetailsResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ConsumeOfferDetailsResult" + } + } + }, + "additionalProperties": false + }, + "DestroyApplicationOffers": { + "type": "object", + "properties": { + "force": { + "type": "boolean" + }, + "offer-urls": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "offer-urls" + ] + }, + "EndpointFilterAttributes": { + "type": "object", + "properties": { + "interface": { + "type": "string" + }, + "name": { + "type": "string" + }, + "role": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "role", + "interface", + "name" + ] + }, + "EntityStatus": { + "type": "object", + "properties": { + "data": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "info": { + "type": "string" + }, + "since": { + "type": "string", + "format": "date-time" + }, + "status": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "status", + "info", + "since" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ErrorResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "ExternalControllerInfo": { + "type": "object", + "properties": { + "addrs": { + "type": "array", + "items": { + "type": "string" + } + }, + "ca-cert": { + "type": "string" + }, + "controller-alias": { + "type": "string" + }, + "controller-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "controller-tag", + "controller-alias", + "addrs", + "ca-cert" + ] + }, + "Macaroon": { + "type": "object", + "additionalProperties": false + }, + "ModifyOfferAccess": { + "type": "object", + "properties": { + "access": { + "type": "string" + }, + "action": { + "type": "string" + }, + "offer-url": { + "type": "string" + }, + "user-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "user-tag", + "action", + "access", + "offer-url" + ] + }, + "ModifyOfferAccessRequest": { + "type": "object", + "properties": { + "changes": { + "type": "array", + "items": { + "$ref": "#/definitions/ModifyOfferAccess" + } + } + }, + "additionalProperties": false, + "required": [ + "changes" + ] + }, + "OfferConnection": { + "type": "object", + "properties": { + "endpoint": { + "type": "string" + }, + "ingress-subnets": { + "type": "array", + "items": { + "type": "string" + } + }, + "relation-id": { + "type": "integer" + }, + "source-model-tag": { + "type": "string" + }, + "status": { + "$ref": "#/definitions/EntityStatus" + }, + "username": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "source-model-tag", + "relation-id", + "username", + "endpoint", + "status", + "ingress-subnets" + ] + }, + "OfferFilter": { + "type": "object", + "properties": { + "allowed-users": { + "type": "array", + "items": { + "type": "string" + } + }, + "application-description": { + "type": "string" + }, + "application-name": { + "type": "string" + }, + "application-user": { + "type": "string" + }, + "connected-users": { + "type": "array", + "items": { + "type": "string" + } + }, + "endpoints": { + "type": "array", + "items": { + "$ref": "#/definitions/EndpointFilterAttributes" + } + }, + "model-name": { + "type": "string" + }, + "offer-name": { + "type": "string" + }, + "owner-name": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "owner-name", + "model-name", + "offer-name", + "application-name", + "application-description", + "application-user", + "endpoints", + "connected-users", + "allowed-users" + ] + }, + "OfferFilters": { + "type": "object", + "properties": { + "Filters": { + "type": "array", + "items": { + "$ref": "#/definitions/OfferFilter" + } + } + }, + "additionalProperties": false, + "required": [ + "Filters" + ] + }, + "OfferURLs": { + "type": "object", + "properties": { + "bakery-version": { + "type": "integer" + }, + "offer-urls": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "OfferUserDetails": { + "type": "object", + "properties": { + "access": { + "type": "string" + }, + "display-name": { + "type": "string" + }, + "user": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "user", + "display-name", + "access" + ] + }, + "QueryApplicationOffersResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ApplicationOfferAdminDetails" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "RemoteApplicationInfo": { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "endpoints": { + "type": "array", + "items": { + "$ref": "#/definitions/RemoteEndpoint" + } + }, + "icon-url-path": { + "type": "string" + }, + "model-tag": { + "type": "string" + }, + "name": { + "type": "string" + }, + "offer-url": { + "type": "string" + }, + "source-model-label": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "model-tag", + "name", + "description", + "offer-url", + "endpoints", + "icon-url-path" + ] + }, + "RemoteApplicationInfoResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "$ref": "#/definitions/RemoteApplicationInfo" + } + }, + "additionalProperties": false + }, + "RemoteApplicationInfoResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/RemoteApplicationInfoResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "RemoteEndpoint": { + "type": "object", + "properties": { + "interface": { + "type": "string" + }, + "limit": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "role": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "role", + "interface", + "limit" + ] + }, + "RemoteSpace": { + "type": "object", + "properties": { + "cloud-type": { + "type": "string" + }, + "name": { + "type": "string" + }, + "provider-attributes": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "provider-id": { + "type": "string" + }, + "subnets": { + "type": "array", + "items": { + "$ref": "#/definitions/Subnet" + } + } + }, + "additionalProperties": false, + "required": [ + "cloud-type", + "name", + "provider-id", + "provider-attributes", + "subnets" + ] + }, + "Subnet": { + "type": "object", + "properties": { + "cidr": { + "type": "string" + }, + "life": { + "type": "string" + }, + "provider-id": { + "type": "string" + }, + "provider-network-id": { + "type": "string" + }, + "provider-space-id": { + "type": "string" + }, + "space-tag": { + "type": "string" + }, + "status": { + "type": "string" + }, + "vlan-tag": { + "type": "integer" + }, + "zones": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "cidr", + "vlan-tag", + "life", + "space-tag", + "zones" + ] + } + } + } + }, + { + "Name": "Backups", + "Description": "API provides backup-specific API methods.", + "Version": 3, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "Create": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/BackupsCreateArgs" + }, + "Result": { + "$ref": "#/definitions/BackupsMetadataResult" + } + }, + "description": "Create is the API method that requests juju to create a new backup\nof its state." + } + }, + "definitions": { + "BackupsCreateArgs": { + "type": "object", + "properties": { + "no-download": { + "type": "boolean" + }, + "notes": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "notes", + "no-download" + ] + }, + "BackupsMetadataResult": { + "type": "object", + "properties": { + "base": { + "type": "string" + }, + "checksum": { + "type": "string" + }, + "checksum-format": { + "type": "string" + }, + "controller-machine-id": { + "type": "string" + }, + "controller-machine-inst-id": { + "type": "string" + }, + "controller-uuid": { + "type": "string" + }, + "filename": { + "type": "string" + }, + "finished": { + "type": "string", + "format": "date-time" + }, + "format-version": { + "type": "integer" + }, + "ha-nodes": { + "type": "integer" + }, + "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" + }, + "version": { + "$ref": "#/definitions/Number" + } + }, + "additionalProperties": false, + "required": [ + "id", + "checksum", + "checksum-format", + "size", + "stored", + "started", + "finished", + "notes", + "model", + "machine", + "hostname", + "version", + "base", + "filename", + "format-version", + "controller-uuid", + "controller-machine-id", + "controller-machine-inst-id", + "ha-nodes" + ] + }, + "Number": { + "type": "object", + "properties": { + "Build": { + "type": "integer" + }, + "Major": { + "type": "integer" + }, + "Minor": { + "type": "integer" + }, + "Patch": { + "type": "integer" + }, + "Tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "Major", + "Minor", + "Tag", + "Patch", + "Build" + ] + } + } + } + }, + { + "Name": "Block", + "Description": "API implements Block interface and is the concrete\nimplementation of the api end point.", + "Version": 2, + "AvailableTo": [ + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "List": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/BlockResults" + } + }, + "description": "List implements Block.List()." + }, + "SwitchBlockOff": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/BlockSwitchParams" + }, + "Result": { + "$ref": "#/definitions/ErrorResult" + } + }, + "description": "SwitchBlockOff implements Block.SwitchBlockOff()." + }, + "SwitchBlockOn": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/BlockSwitchParams" + }, + "Result": { + "$ref": "#/definitions/ErrorResult" + } + }, + "description": "SwitchBlockOn implements Block.SwitchBlockOn()." + } + }, + "definitions": { + "Block": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "message": { + "type": "string" + }, + "tag": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "id", + "tag", + "type" + ] + }, + "BlockResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "$ref": "#/definitions/Block" + } + }, + "additionalProperties": false, + "required": [ + "result" + ] + }, + "BlockResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/BlockResult" + } + } + }, + "additionalProperties": false + }, + "BlockSwitchParams": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "type" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + } + } + } + }, + { + "Name": "Bundle", + "Description": "APIv6 provides the Bundle API facade for version 6. It is otherwise\nidentical to V5 with the exception that the V6 adds the support for\nmulti-part yaml handling to GetChanges and GetChangesMapArgs.", + "Version": 6, + "AvailableTo": [ + "controller-user", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "ExportBundle": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ExportBundleParams" + }, + "Result": { + "$ref": "#/definitions/StringResult" + } + }, + "description": "ExportBundle exports the current model configuration as bundle." + }, + "GetChanges": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/BundleChangesParams" + }, + "Result": { + "$ref": "#/definitions/BundleChangesResults" + } + }, + "description": "GetChanges returns the list of changes required to deploy the given bundle\ndata. The changes are sorted by requirements, so that they can be applied in\norder.\nGetChanges has been superseded in favour of GetChangesMapArgs. It's\npreferable to use that new method to add new functionality and move clients\naway from this one." + }, + "GetChangesMapArgs": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/BundleChangesParams" + }, + "Result": { + "$ref": "#/definitions/BundleChangesMapArgsResults" + } + }, + "description": "GetChangesMapArgs returns the list of changes required to deploy the given\nbundle data. The changes are sorted by requirements, so that they can be\napplied in order.\nV4 GetChangesMapArgs is not supported on anything less than v4" + } + }, + "definitions": { + "BundleChange": { + "type": "object", + "properties": { + "args": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true + } + }, + "id": { + "type": "string" + }, + "method": { + "type": "string" + }, + "requires": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "id", + "method", + "args", + "requires" + ] + }, + "BundleChangesMapArgs": { + "type": "object", + "properties": { + "args": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "id": { + "type": "string" + }, + "method": { + "type": "string" + }, + "requires": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "id", + "method", + "args", + "requires" + ] + }, + "BundleChangesMapArgsResults": { + "type": "object", + "properties": { + "changes": { + "type": "array", + "items": { + "$ref": "#/definitions/BundleChangesMapArgs" + } + }, + "errors": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "BundleChangesParams": { + "type": "object", + "properties": { + "bundleURL": { + "type": "string" + }, + "yaml": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "yaml", + "bundleURL" + ] + }, + "BundleChangesResults": { + "type": "object", + "properties": { + "changes": { + "type": "array", + "items": { + "$ref": "#/definitions/BundleChange" + } + }, + "errors": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ExportBundleParams": { + "type": "object", + "properties": { + "include-charm-defaults": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "StringResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "result" + ] + } + } + } + }, + { + "Name": "Charms", + "Description": "APIv6 provides the Charms API facade for version 6.\nIt removes the AddCharmWithAuthorization function, as\nwe no longer support macaroons.", + "Version": 6, + "AvailableTo": [ + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "AddCharm": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/AddCharmWithOrigin" + }, + "Result": { + "$ref": "#/definitions/CharmOriginResult" + } + }, + "description": "AddCharm adds the given charm URL (which must include revision) to the\nenvironment, if it does not exist yet. Local charms are not supported,\nonly charm store and charm hub URLs. See also AddLocalCharm()." + }, + "CharmInfo": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/CharmURL" + }, + "Result": { + "$ref": "#/definitions/Charm" + } + }, + "description": "CharmInfo returns information about the requested charm." + }, + "CheckCharmPlacement": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ApplicationCharmPlacements" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "CheckCharmPlacement checks if a charm is allowed to be placed with in a\ngiven application." + }, + "GetDownloadInfos": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/CharmURLAndOrigins" + }, + "Result": { + "$ref": "#/definitions/DownloadInfoResults" + } + }, + "description": "GetDownloadInfos attempts to get the bundle corresponding to the charm url\nand origin." + }, + "IsMetered": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/CharmURL" + }, + "Result": { + "$ref": "#/definitions/IsMeteredResult" + } + }, + "description": "IsMetered returns whether or not the charm is metered." + }, + "List": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/CharmsList" + }, + "Result": { + "$ref": "#/definitions/CharmsListResult" + } + }, + "description": "List returns a list of charm URLs currently in the state.\nIf supplied parameter contains any names, the result will\nbe filtered to return only the charms with supplied names." + }, + "ListCharmResources": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/CharmURLAndOrigins" + }, + "Result": { + "$ref": "#/definitions/CharmResourcesResults" + } + }, + "description": "ListCharmResources returns a series of resources for a given charm." + }, + "ResolveCharms": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ResolveCharmsWithChannel" + }, + "Result": { + "$ref": "#/definitions/ResolveCharmWithChannelResults" + } + }, + "description": "ResolveCharms resolves the given charm URLs with an optionally specified\npreferred channel. Channel provided via CharmOrigin." + } + }, + "definitions": { + "AddCharmWithOrigin": { + "type": "object", + "properties": { + "charm-origin": { + "$ref": "#/definitions/CharmOrigin" + }, + "force": { + "type": "boolean" + }, + "url": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "url", + "charm-origin", + "force" + ] + }, + "ApplicationCharmPlacement": { + "type": "object", + "properties": { + "application": { + "type": "string" + }, + "charm-url": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "application", + "charm-url" + ] + }, + "ApplicationCharmPlacements": { + "type": "object", + "properties": { + "placements": { + "type": "array", + "items": { + "$ref": "#/definitions/ApplicationCharmPlacement" + } + } + }, + "additionalProperties": false, + "required": [ + "placements" + ] + }, + "Base": { + "type": "object", + "properties": { + "channel": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "channel" + ] + }, + "Charm": { + "type": "object", + "properties": { + "actions": { + "$ref": "#/definitions/CharmActions" + }, + "config": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmOption" + } + } + }, + "lxd-profile": { + "$ref": "#/definitions/CharmLXDProfile" + }, + "manifest": { + "$ref": "#/definitions/CharmManifest" + }, + "meta": { + "$ref": "#/definitions/CharmMeta" + }, + "metrics": { + "$ref": "#/definitions/CharmMetrics" + }, + "revision": { + "type": "integer" + }, + "url": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "revision", + "url", + "config" + ] + }, + "CharmActionSpec": { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "params": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + } + }, + "additionalProperties": false, + "required": [ + "description", + "params" + ] + }, + "CharmActions": { + "type": "object", + "properties": { + "specs": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmActionSpec" + } + } + } + }, + "additionalProperties": false + }, + "CharmBase": { + "type": "object", + "properties": { + "architectures": { + "type": "array", + "items": { + "type": "string" + } + }, + "channel": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "additionalProperties": false + }, + "CharmContainer": { + "type": "object", + "properties": { + "mounts": { + "type": "array", + "items": { + "$ref": "#/definitions/CharmMount" + } + }, + "resource": { + "type": "string" + } + }, + "additionalProperties": false + }, + "CharmDeployment": { + "type": "object", + "properties": { + "min-version": { + "type": "string" + }, + "mode": { + "type": "string" + }, + "service": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "type", + "mode", + "service", + "min-version" + ] + }, + "CharmDevice": { + "type": "object", + "properties": { + "CountMax": { + "type": "integer" + }, + "CountMin": { + "type": "integer" + }, + "Description": { + "type": "string" + }, + "Name": { + "type": "string" + }, + "Type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "Name", + "Description", + "Type", + "CountMin", + "CountMax" + ] + }, + "CharmLXDProfile": { + "type": "object", + "properties": { + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "description": { + "type": "string" + }, + "devices": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + } + } + } + }, + "additionalProperties": false, + "required": [ + "config", + "description", + "devices" + ] + }, + "CharmManifest": { + "type": "object", + "properties": { + "bases": { + "type": "array", + "items": { + "$ref": "#/definitions/CharmBase" + } + } + }, + "additionalProperties": false + }, + "CharmMeta": { + "type": "object", + "properties": { + "assumes-expr": { + "$ref": "#/definitions/ExpressionTree" + }, + "categories": { + "type": "array", + "items": { + "type": "string" + } + }, + "containers": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmContainer" + } + } + }, + "deployment": { + "$ref": "#/definitions/CharmDeployment" + }, + "description": { + "type": "string" + }, + "devices": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmDevice" + } + } + }, + "extra-bindings": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "min-juju-version": { + "type": "string" + }, + "name": { + "type": "string" + }, + "payload-classes": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmPayloadClass" + } + } + }, + "peers": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmRelation" + } + } + }, + "provides": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmRelation" + } + } + }, + "requires": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmRelation" + } + } + }, + "resources": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmResourceMeta" + } + } + }, + "series": { + "type": "array", + "items": { + "type": "string" + } + }, + "storage": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmStorage" + } + } + }, + "subordinate": { + "type": "boolean" + }, + "summary": { + "type": "string" + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "terms": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "name", + "summary", + "description", + "subordinate" + ] + }, + "CharmMetric": { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "type", + "description" + ] + }, + "CharmMetrics": { + "type": "object", + "properties": { + "metrics": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmMetric" + } + } + }, + "plan": { + "$ref": "#/definitions/CharmPlan" + } + }, + "additionalProperties": false, + "required": [ + "metrics", + "plan" + ] + }, + "CharmMount": { + "type": "object", + "properties": { + "location": { + "type": "string" + }, + "storage": { + "type": "string" + } + }, + "additionalProperties": false + }, + "CharmOption": { + "type": "object", + "properties": { + "default": { + "type": "object", + "additionalProperties": true + }, + "description": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "type" + ] + }, + "CharmOrigin": { + "type": "object", + "properties": { + "architecture": { + "type": "string" + }, + "base": { + "$ref": "#/definitions/Base" + }, + "branch": { + "type": "string" + }, + "hash": { + "type": "string" + }, + "id": { + "type": "string" + }, + "instance-key": { + "type": "string" + }, + "revision": { + "type": "integer" + }, + "risk": { + "type": "string" + }, + "source": { + "type": "string" + }, + "track": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "source", + "type", + "id" + ] + }, + "CharmOriginResult": { + "type": "object", + "properties": { + "charm-origin": { + "$ref": "#/definitions/CharmOrigin" + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "charm-origin" + ] + }, + "CharmPayloadClass": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "type" + ] + }, + "CharmPlan": { + "type": "object", + "properties": { + "required": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "required" + ] + }, + "CharmRelation": { + "type": "object", + "properties": { + "interface": { + "type": "string" + }, + "limit": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "optional": { + "type": "boolean" + }, + "role": { + "type": "string" + }, + "scope": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "role", + "interface", + "optional", + "limit", + "scope" + ] + }, + "CharmResource": { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "fingerprint": { + "type": "array", + "items": { + "type": "integer" + } + }, + "name": { + "type": "string" + }, + "origin": { + "type": "string" + }, + "path": { + "type": "string" + }, + "revision": { + "type": "integer" + }, + "size": { + "type": "integer" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "type", + "path", + "origin", + "revision", + "fingerprint", + "size" + ] + }, + "CharmResourceMeta": { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "type", + "path", + "description" + ] + }, + "CharmResourceResult": { + "type": "object", + "properties": { + "CharmResource": { + "$ref": "#/definitions/CharmResource" + }, + "ErrorResult": { + "$ref": "#/definitions/ErrorResult" + }, + "description": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" + }, + "fingerprint": { + "type": "array", + "items": { + "type": "integer" + } + }, + "name": { + "type": "string" + }, + "origin": { + "type": "string" + }, + "path": { + "type": "string" + }, + "revision": { + "type": "integer" + }, + "size": { + "type": "integer" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "ErrorResult", + "name", + "type", + "path", + "origin", + "revision", + "fingerprint", + "size", + "CharmResource" + ] + }, + "CharmResourcesResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/CharmResourceResult" + } + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "CharmStorage": { + "type": "object", + "properties": { + "count-max": { + "type": "integer" + }, + "count-min": { + "type": "integer" + }, + "description": { + "type": "string" + }, + "location": { + "type": "string" + }, + "minimum-size": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "properties": { + "type": "array", + "items": { + "type": "string" + } + }, + "read-only": { + "type": "boolean" + }, + "shared": { + "type": "boolean" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "description", + "type", + "shared", + "read-only", + "count-min", + "count-max", + "minimum-size" + ] + }, + "CharmURL": { + "type": "object", + "properties": { + "url": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "url" + ] + }, + "CharmURLAndOrigin": { + "type": "object", + "properties": { + "charm-origin": { + "$ref": "#/definitions/CharmOrigin" + }, + "charm-url": { + "type": "string" + }, + "macaroon": { + "$ref": "#/definitions/Macaroon" + } + }, + "additionalProperties": false, + "required": [ + "charm-url", + "charm-origin" + ] + }, + "CharmURLAndOrigins": { + "type": "object", + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/CharmURLAndOrigin" + } + } + }, + "additionalProperties": false, + "required": [ + "entities" + ] + }, + "CharmsList": { + "type": "object", + "properties": { + "names": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "names" + ] + }, + "CharmsListResult": { + "type": "object", + "properties": { + "charm-urls": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "charm-urls" + ] + }, + "DownloadInfoResult": { + "type": "object", + "properties": { + "charm-origin": { + "$ref": "#/definitions/CharmOrigin" + }, + "url": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "url", + "charm-origin" + ] + }, + "DownloadInfoResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/DownloadInfoResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ErrorResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "ExpressionTree": { + "type": "object", + "properties": { + "Expression": { + "type": "object", + "additionalProperties": true + } + }, + "additionalProperties": false, + "required": [ + "Expression" + ] + }, + "IsMeteredResult": { + "type": "object", + "properties": { + "metered": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "metered" + ] + }, + "Macaroon": { + "type": "object", + "additionalProperties": false + }, + "ResolveCharmWithChannel": { + "type": "object", + "properties": { + "charm-origin": { + "$ref": "#/definitions/CharmOrigin" + }, + "reference": { + "type": "string" + }, + "switch-charm": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "reference", + "charm-origin" + ] + }, + "ResolveCharmWithChannelResult": { + "type": "object", + "properties": { + "charm-origin": { + "$ref": "#/definitions/CharmOrigin" + }, + "error": { + "$ref": "#/definitions/Error" + }, + "supported-series": { + "type": "array", + "items": { + "type": "string" + } + }, + "url": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "url", + "charm-origin", + "supported-series" + ] + }, + "ResolveCharmWithChannelResults": { + "type": "object", + "properties": { + "Results": { + "type": "array", + "items": { + "$ref": "#/definitions/ResolveCharmWithChannelResult" + } + } + }, + "additionalProperties": false, + "required": [ + "Results" + ] + }, + "ResolveCharmsWithChannel": { + "type": "object", + "properties": { + "macaroon": { + "$ref": "#/definitions/Macaroon" + }, + "resolve": { + "type": "array", + "items": { + "$ref": "#/definitions/ResolveCharmWithChannel" + } + } + }, + "additionalProperties": false, + "required": [ + "resolve" + ] + } + } + } + }, + { + "Name": "Client", + "Description": "Client serves client-specific API methods.", + "Version": 6, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "FindTools": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/FindToolsParams" + }, + "Result": { + "$ref": "#/definitions/FindToolsResult" + } + }, + "description": "FindTools returns a List containing all tools matching the given parameters.\nTODO(juju 3.1) - remove, used by 2.9 client only" + }, + "FullStatus": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/StatusParams" + }, + "Result": { + "$ref": "#/definitions/FullStatus" + } + }, + "description": "FullStatus gives the information needed for juju status over the api" + }, + "StatusHistory": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/StatusHistoryRequests" + }, + "Result": { + "$ref": "#/definitions/StatusHistoryResults" + } + }, + "description": "StatusHistory returns a slice of past statuses for several entities." + }, + "WatchAll": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/AllWatcherId" + } + }, + "description": "WatchAll initiates a watcher for entities in the connected model." + } + }, + "definitions": { + "AllWatcherId": { + "type": "object", + "properties": { + "watcher-id": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "watcher-id" + ] + }, + "ApplicationOfferStatus": { + "type": "object", + "properties": { + "active-connected-count": { + "type": "integer" + }, + "application-name": { + "type": "string" + }, + "charm": { + "type": "string" + }, + "endpoints": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/RemoteEndpoint" + } + } + }, + "err": { + "$ref": "#/definitions/Error" + }, + "offer-name": { + "type": "string" + }, + "total-connected-count": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "offer-name", + "application-name", + "charm", + "endpoints", + "active-connected-count", + "total-connected-count" + ] + }, + "ApplicationStatus": { + "type": "object", + "properties": { + "base": { + "$ref": "#/definitions/Base" + }, + "can-upgrade-to": { + "type": "string" + }, + "charm": { + "type": "string" + }, + "charm-channel": { + "type": "string" + }, + "charm-profile": { + "type": "string" + }, + "charm-version": { + "type": "string" + }, + "endpoint-bindings": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "err": { + "$ref": "#/definitions/Error" + }, + "exposed": { + "type": "boolean" + }, + "exposed-endpoints": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/ExposedEndpoint" + } + } + }, + "int": { + "type": "integer" + }, + "life": { + "type": "string" + }, + "meter-statuses": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/MeterStatus" + } + } + }, + "provider-id": { + "type": "string" + }, + "public-address": { + "type": "string" + }, + "relations": { + "type": "object", + "patternProperties": { + ".*": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "status": { + "$ref": "#/definitions/DetailedStatus" + }, + "subordinate-to": { + "type": "array", + "items": { + "type": "string" + } + }, + "units": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/UnitStatus" + } + } + }, + "workload-version": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "charm", + "charm-version", + "charm-profile", + "base", + "exposed", + "life", + "relations", + "can-upgrade-to", + "subordinate-to", + "units", + "meter-statuses", + "status", + "workload-version", + "endpoint-bindings", + "public-address" + ] + }, + "Base": { + "type": "object", + "properties": { + "channel": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "channel" + ] + }, + "Binary": { + "type": "object", + "properties": { + "Arch": { + "type": "string" + }, + "Build": { + "type": "integer" + }, + "Major": { + "type": "integer" + }, + "Minor": { + "type": "integer" + }, + "Number": { + "$ref": "#/definitions/Number" + }, + "Patch": { + "type": "integer" + }, + "Release": { + "type": "string" + }, + "Tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "Major", + "Minor", + "Tag", + "Patch", + "Build", + "Number", + "Release", + "Arch" + ] + }, + "BranchStatus": { + "type": "object", + "properties": { + "assigned-units": { + "type": "object", + "patternProperties": { + ".*": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "created": { + "type": "integer" + }, + "created-by": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "assigned-units", + "created", + "created-by" + ] + }, + "DetailedStatus": { + "type": "object", + "properties": { + "data": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "err": { + "$ref": "#/definitions/Error" + }, + "info": { + "type": "string" + }, + "kind": { + "type": "string" + }, + "life": { + "type": "string" + }, + "since": { + "type": "string", + "format": "date-time" + }, + "status": { + "type": "string" + }, + "version": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "status", + "info", + "data", + "since", + "kind", + "version", + "life" + ] + }, + "EndpointStatus": { + "type": "object", + "properties": { + "application": { + "type": "string" + }, + "name": { + "type": "string" + }, + "role": { + "type": "string" + }, + "subordinate": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "application", + "name", + "role", + "subordinate" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ExposedEndpoint": { + "type": "object", + "properties": { + "expose-to-cidrs": { + "type": "array", + "items": { + "type": "string" + } + }, + "expose-to-spaces": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "FindToolsParams": { + "type": "object", + "properties": { + "agentstream": { + "type": "string" + }, + "arch": { + "type": "string" + }, + "major": { + "type": "integer" + }, + "number": { + "$ref": "#/definitions/Number" + }, + "os-type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "number", + "major", + "arch", + "os-type", + "agentstream" + ] + }, + "FindToolsResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "list": { + "type": "array", + "items": { + "$ref": "#/definitions/Tools" + } + } + }, + "additionalProperties": false, + "required": [ + "list" + ] + }, + "FullStatus": { + "type": "object", + "properties": { + "applications": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/ApplicationStatus" + } + } + }, + "branches": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/BranchStatus" + } + } + }, + "controller-timestamp": { + "type": "string", + "format": "date-time" + }, + "machines": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/MachineStatus" + } + } + }, + "model": { + "$ref": "#/definitions/ModelStatusInfo" + }, + "offers": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/ApplicationOfferStatus" + } + } + }, + "relations": { + "type": "array", + "items": { + "$ref": "#/definitions/RelationStatus" + } + }, + "remote-applications": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/RemoteApplicationStatus" + } + } + } + }, + "additionalProperties": false, + "required": [ + "model", + "machines", + "applications", + "remote-applications", + "offers", + "relations", + "controller-timestamp", + "branches" + ] + }, + "History": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "statuses": { + "type": "array", + "items": { + "$ref": "#/definitions/DetailedStatus" + } + } + }, + "additionalProperties": false, + "required": [ + "statuses" + ] + }, + "LXDProfile": { + "type": "object", + "properties": { + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "description": { + "type": "string" + }, + "devices": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + } + } + } + }, + "additionalProperties": false, + "required": [ + "config", + "description", + "devices" + ] + }, + "MachineStatus": { + "type": "object", + "properties": { + "agent-status": { + "$ref": "#/definitions/DetailedStatus" + }, + "base": { + "$ref": "#/definitions/Base" + }, + "constraints": { + "type": "string" + }, + "containers": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/MachineStatus" + } + } + }, + "display-name": { + "type": "string" + }, + "dns-name": { + "type": "string" + }, + "hardware": { + "type": "string" + }, + "has-vote": { + "type": "boolean" + }, + "hostname": { + "type": "string" + }, + "id": { + "type": "string" + }, + "instance-id": { + "type": "string" + }, + "instance-status": { + "$ref": "#/definitions/DetailedStatus" + }, + "ip-addresses": { + "type": "array", + "items": { + "type": "string" + } + }, + "jobs": { + "type": "array", + "items": { + "type": "string" + } + }, + "lxd-profiles": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/LXDProfile" + } + } + }, + "modification-status": { + "$ref": "#/definitions/DetailedStatus" + }, + "network-interfaces": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/NetworkInterface" + } + } + }, + "primary-controller-machine": { + "type": "boolean" + }, + "wants-vote": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "agent-status", + "instance-status", + "modification-status", + "dns-name", + "instance-id", + "display-name", + "base", + "id", + "containers", + "constraints", + "hardware", + "jobs", + "has-vote", + "wants-vote" + ] + }, + "MeterStatus": { + "type": "object", + "properties": { + "color": { + "type": "string" + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "color", + "message" + ] + }, + "ModelStatusInfo": { + "type": "object", + "properties": { + "available-version": { + "type": "string" + }, + "cloud-tag": { + "type": "string" + }, + "meter-status": { + "$ref": "#/definitions/MeterStatus" + }, + "model-status": { + "$ref": "#/definitions/DetailedStatus" + }, + "name": { + "type": "string" + }, + "region": { + "type": "string" + }, + "sla": { + "type": "string" + }, + "type": { + "type": "string" + }, + "version": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "type", + "cloud-tag", + "version", + "available-version", + "model-status", + "meter-status", + "sla" + ] + }, + "NetworkInterface": { + "type": "object", + "properties": { + "dns-nameservers": { + "type": "array", + "items": { + "type": "string" + } + }, + "gateway": { + "type": "string" + }, + "ip-addresses": { + "type": "array", + "items": { + "type": "string" + } + }, + "is-up": { + "type": "boolean" + }, + "mac-address": { + "type": "string" + }, + "space": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "ip-addresses", + "mac-address", + "is-up" + ] + }, + "Number": { + "type": "object", + "properties": { + "Build": { + "type": "integer" + }, + "Major": { + "type": "integer" + }, + "Minor": { + "type": "integer" + }, + "Patch": { + "type": "integer" + }, + "Tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "Major", + "Minor", + "Tag", + "Patch", + "Build" + ] + }, + "RelationStatus": { + "type": "object", + "properties": { + "endpoints": { + "type": "array", + "items": { + "$ref": "#/definitions/EndpointStatus" + } + }, + "id": { + "type": "integer" + }, + "interface": { + "type": "string" + }, + "key": { + "type": "string" + }, + "scope": { + "type": "string" + }, + "status": { + "$ref": "#/definitions/DetailedStatus" + } + }, + "additionalProperties": false, + "required": [ + "id", + "key", + "interface", + "scope", + "endpoints", + "status" + ] + }, + "RemoteApplicationStatus": { + "type": "object", + "properties": { + "endpoints": { + "type": "array", + "items": { + "$ref": "#/definitions/RemoteEndpoint" + } + }, + "err": { + "$ref": "#/definitions/Error" + }, + "life": { + "type": "string" + }, + "offer-name": { + "type": "string" + }, + "offer-url": { + "type": "string" + }, + "relations": { + "type": "object", + "patternProperties": { + ".*": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "status": { + "$ref": "#/definitions/DetailedStatus" + } + }, + "additionalProperties": false, + "required": [ + "offer-url", + "offer-name", + "endpoints", + "life", + "relations", + "status" + ] + }, + "RemoteEndpoint": { + "type": "object", + "properties": { + "interface": { + "type": "string" + }, + "limit": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "role": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "role", + "interface", + "limit" + ] + }, + "StatusHistoryFilter": { + "type": "object", + "properties": { + "date": { + "type": "string", + "format": "date-time" + }, + "delta": { + "type": "integer" + }, + "exclude": { + "type": "array", + "items": { + "type": "string" + } + }, + "size": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "size", + "date", + "delta", + "exclude" + ] + }, + "StatusHistoryRequest": { + "type": "object", + "properties": { + "filter": { + "$ref": "#/definitions/StatusHistoryFilter" + }, + "historyKind": { + "type": "string" + }, + "size": { + "type": "integer" + }, + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "historyKind", + "size", + "filter", + "tag" + ] + }, + "StatusHistoryRequests": { + "type": "object", + "properties": { + "requests": { + "type": "array", + "items": { + "$ref": "#/definitions/StatusHistoryRequest" + } + } + }, + "additionalProperties": false, + "required": [ + "requests" + ] + }, + "StatusHistoryResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "history": { + "$ref": "#/definitions/History" + } + }, + "additionalProperties": false, + "required": [ + "history" + ] + }, + "StatusHistoryResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/StatusHistoryResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "StatusParams": { + "type": "object", + "properties": { + "patterns": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "patterns" + ] + }, + "Tools": { + "type": "object", + "properties": { + "sha256": { + "type": "string" + }, + "size": { + "type": "integer" + }, + "url": { + "type": "string" + }, + "version": { + "$ref": "#/definitions/Binary" + } + }, + "additionalProperties": false, + "required": [ + "version", + "url", + "size" + ] + }, + "UnitStatus": { + "type": "object", + "properties": { + "address": { + "type": "string" + }, + "agent-status": { + "$ref": "#/definitions/DetailedStatus" + }, + "charm": { + "type": "string" + }, + "leader": { + "type": "boolean" + }, + "machine": { + "type": "string" + }, + "opened-ports": { + "type": "array", + "items": { + "type": "string" + } + }, + "provider-id": { + "type": "string" + }, + "public-address": { + "type": "string" + }, + "subordinates": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/UnitStatus" + } + } + }, + "workload-status": { + "$ref": "#/definitions/DetailedStatus" + }, + "workload-version": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "agent-status", + "workload-status", + "workload-version", + "machine", + "opened-ports", + "public-address", + "charm", + "subordinates" + ] + } + } + } + }, + { + "Name": "Cloud", + "Description": "CloudAPI implements the cloud interface and is the concrete implementation\nof the api end point.", + "Version": 7, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "controller-user" + ], + "Schema": { + "type": "object", + "properties": { + "AddCloud": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/AddCloudArgs" + } + }, + "description": "AddCloud adds a new cloud, different from the one managed by the controller." + }, + "AddCredentials": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/TaggedCredentials" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "AddCredentials adds new credentials.\nIn contrast to UpdateCredentials() below, the new credentials can be\nfor a cloud that the controller does not manage (this is required\nfor CAAS models)" + }, + "CheckCredentialsModels": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/TaggedCredentials" + }, + "Result": { + "$ref": "#/definitions/UpdateCredentialResults" + } + }, + "description": "CheckCredentialsModels validates supplied cloud credentials' content against\nmodels that currently use these credentials.\nIf there are any models that are using a credential and these models or their\ncloud instances are not going to be accessible with corresponding credential,\nthere will be detailed validation errors per model.\nThere's no Juju API client which uses this, but JAAS does," + }, + "Cloud": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/CloudResults" + } + }, + "description": "Cloud returns the cloud definitions for the specified clouds." + }, + "CloudInfo": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/CloudInfoResults" + } + }, + "description": "CloudInfo returns information about the specified clouds." + }, + "Clouds": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/CloudsResult" + } + }, + "description": "Clouds returns the definitions of all clouds supported by the controller\nthat the logged in user can see." + }, + "Credential": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/CloudCredentialResults" + } + }, + "description": "Credential returns the specified cloud credential for each tag, minus secrets." + }, + "CredentialContents": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/CloudCredentialArgs" + }, + "Result": { + "$ref": "#/definitions/CredentialContentResults" + } + }, + "description": "CredentialContents returns the specified cloud credentials,\nincluding the secrets if requested.\nIf no specific credential name/cloud was passed in, all credentials for this user\nare returned.\nOnly credential owner can see its contents as well as what models use it.\nController admin has no special superpowers here and is treated the same as all other users." + }, + "InstanceTypes": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/CloudInstanceTypesConstraints" + }, + "Result": { + "$ref": "#/definitions/InstanceTypesResults" + } + }, + "description": "InstanceTypes returns instance type information for the cloud and region\nin which the current model is deployed." + }, + "ListCloudInfo": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ListCloudsRequest" + }, + "Result": { + "$ref": "#/definitions/ListCloudInfoResults" + } + }, + "description": "ListCloudInfo returns clouds that the specified user has access to.\nController admins (superuser) can list clouds for any user.\nOther users can only ask about their own clouds." + }, + "ModifyCloudAccess": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ModifyCloudAccessRequest" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "ModifyCloudAccess changes the model access granted to users." + }, + "RemoveClouds": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "RemoveClouds removes the specified clouds from the controller.\nIf a cloud is in use (has models deployed to it), the removal will fail." + }, + "RevokeCredentialsCheckModels": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/RevokeCredentialArgs" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "RevokeCredentialsCheckModels revokes a set of cloud credentials.\nIf the credentials are used by any of the models, the credential deletion will be aborted.\nIf credential-in-use needs to be revoked nonetheless, this method allows the use of force." + }, + "UpdateCloud": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/UpdateCloudArgs" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "UpdateCloud updates an existing cloud that the controller knows about." + }, + "UpdateCredentialsCheckModels": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/UpdateCredentialArgs" + }, + "Result": { + "$ref": "#/definitions/UpdateCredentialResults" + } + }, + "description": "UpdateCredentialsCheckModels updates a set of cloud credentials' content.\nIf there are any models that are using a credential and these models\nare not going to be visible with updated credential content,\nthere will be detailed validation errors per model. Such model errors are returned\nseparately and do not contribute to the overall method error status.\nController admins can 'force' an update of the credential\nregardless of whether it is deemed valid or not." + }, + "UserCredentials": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/UserClouds" + }, + "Result": { + "$ref": "#/definitions/StringsResults" + } + }, + "description": "UserCredentials returns the cloud credentials for a set of users." + } + }, + "definitions": { + "AddCloudArgs": { + "type": "object", + "properties": { + "cloud": { + "$ref": "#/definitions/Cloud" + }, + "force": { + "type": "boolean" + }, + "name": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "cloud", + "name" + ] + }, + "Cloud": { + "type": "object", + "properties": { + "auth-types": { + "type": "array", + "items": { + "type": "string" + } + }, + "ca-certificates": { + "type": "array", + "items": { + "type": "string" + } + }, + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "endpoint": { + "type": "string" + }, + "host-cloud-region": { + "type": "string" + }, + "identity-endpoint": { + "type": "string" + }, + "is-controller-cloud": { + "type": "boolean" + }, + "region-config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + } + } + }, + "regions": { + "type": "array", + "items": { + "$ref": "#/definitions/CloudRegion" + } + }, + "skip-tls-verify": { + "type": "boolean" + }, + "storage-endpoint": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "type" + ] + }, + "CloudCredential": { + "type": "object", + "properties": { + "attrs": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "auth-type": { + "type": "string" + }, + "redacted": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "auth-type" + ] + }, + "CloudCredentialArg": { + "type": "object", + "properties": { + "cloud-name": { + "type": "string" + }, + "credential-name": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "cloud-name", + "credential-name" + ] + }, + "CloudCredentialArgs": { + "type": "object", + "properties": { + "credentials": { + "type": "array", + "items": { + "$ref": "#/definitions/CloudCredentialArg" + } + }, + "include-secrets": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "include-secrets" + ] + }, + "CloudCredentialResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "$ref": "#/definitions/CloudCredential" + } + }, + "additionalProperties": false + }, + "CloudCredentialResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/CloudCredentialResult" + } + } + }, + "additionalProperties": false + }, + "CloudDetails": { + "type": "object", + "properties": { + "auth-types": { + "type": "array", + "items": { + "type": "string" + } + }, + "endpoint": { + "type": "string" + }, + "identity-endpoint": { + "type": "string" + }, + "regions": { + "type": "array", + "items": { + "$ref": "#/definitions/CloudRegion" + } + }, + "storage-endpoint": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "type" + ] + }, + "CloudInfo": { + "type": "object", + "properties": { + "CloudDetails": { + "$ref": "#/definitions/CloudDetails" + }, + "users": { + "type": "array", + "items": { + "$ref": "#/definitions/CloudUserInfo" + } + } + }, + "additionalProperties": false, + "required": [ + "CloudDetails", + "users" + ] + }, + "CloudInfoResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "$ref": "#/definitions/CloudInfo" + } + }, + "additionalProperties": false + }, + "CloudInfoResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/CloudInfoResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "CloudInstanceTypesConstraint": { + "type": "object", + "properties": { + "cloud-tag": { + "type": "string" + }, + "constraints": { + "$ref": "#/definitions/Value" + }, + "region": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "cloud-tag", + "region" + ] + }, + "CloudInstanceTypesConstraints": { + "type": "object", + "properties": { + "constraints": { + "type": "array", + "items": { + "$ref": "#/definitions/CloudInstanceTypesConstraint" + } + } + }, + "additionalProperties": false, + "required": [ + "constraints" + ] + }, + "CloudRegion": { + "type": "object", + "properties": { + "endpoint": { + "type": "string" + }, + "identity-endpoint": { + "type": "string" + }, + "name": { + "type": "string" + }, + "storage-endpoint": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name" + ] + }, + "CloudResult": { + "type": "object", + "properties": { + "cloud": { + "$ref": "#/definitions/Cloud" + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "CloudResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/CloudResult" + } + } + }, + "additionalProperties": false + }, + "CloudUserInfo": { + "type": "object", + "properties": { + "access": { + "type": "string" + }, + "display-name": { + "type": "string" + }, + "user": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "user", + "display-name", + "access" + ] + }, + "CloudsResult": { + "type": "object", + "properties": { + "clouds": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/Cloud" + } + } + } + }, + "additionalProperties": false + }, + "ControllerCredentialInfo": { + "type": "object", + "properties": { + "content": { + "$ref": "#/definitions/CredentialContent" + }, + "models": { + "type": "array", + "items": { + "$ref": "#/definitions/ModelAccess" + } + } + }, + "additionalProperties": false + }, + "CredentialContent": { + "type": "object", + "properties": { + "attrs": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "auth-type": { + "type": "string" + }, + "cloud": { + "type": "string" + }, + "name": { + "type": "string" + }, + "valid": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "name", + "cloud", + "auth-type" + ] + }, + "CredentialContentResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "$ref": "#/definitions/ControllerCredentialInfo" + } + }, + "additionalProperties": false + }, + "CredentialContentResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/CredentialContentResult" + } + } + }, + "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": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ErrorResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "InstanceType": { + "type": "object", + "properties": { + "arches": { + "type": "array", + "items": { + "type": "string" + } + }, + "cost": { + "type": "integer" + }, + "cpu-cores": { + "type": "integer" + }, + "memory": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "root-disk": { + "type": "integer" + }, + "virt-type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "arches", + "cpu-cores", + "memory" + ] + }, + "InstanceTypesResult": { + "type": "object", + "properties": { + "cost-currency": { + "type": "string" + }, + "cost-divisor": { + "type": "integer" + }, + "cost-unit": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" + }, + "instance-types": { + "type": "array", + "items": { + "$ref": "#/definitions/InstanceType" + } + } + }, + "additionalProperties": false + }, + "InstanceTypesResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/InstanceTypesResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "ListCloudInfo": { + "type": "object", + "properties": { + "CloudDetails": { + "$ref": "#/definitions/CloudDetails" + }, + "user-access": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "CloudDetails", + "user-access" + ] + }, + "ListCloudInfoResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "$ref": "#/definitions/ListCloudInfo" + } + }, + "additionalProperties": false + }, + "ListCloudInfoResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ListCloudInfoResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "ListCloudsRequest": { + "type": "object", + "properties": { + "all": { + "type": "boolean" + }, + "user-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "user-tag" + ] + }, + "ModelAccess": { + "type": "object", + "properties": { + "access": { + "type": "string" + }, + "model": { + "type": "string" + } + }, + "additionalProperties": false + }, + "ModifyCloudAccess": { + "type": "object", + "properties": { + "access": { + "type": "string" + }, + "action": { + "type": "string" + }, + "cloud-tag": { + "type": "string" + }, + "user-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "user-tag", + "cloud-tag", + "action", + "access" + ] + }, + "ModifyCloudAccessRequest": { + "type": "object", + "properties": { + "changes": { + "type": "array", + "items": { + "$ref": "#/definitions/ModifyCloudAccess" + } + } + }, + "additionalProperties": false, + "required": [ + "changes" + ] + }, + "RevokeCredentialArg": { + "type": "object", + "properties": { + "force": { + "type": "boolean" + }, + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag", + "force" + ] + }, + "RevokeCredentialArgs": { + "type": "object", + "properties": { + "credentials": { + "type": "array", + "items": { + "$ref": "#/definitions/RevokeCredentialArg" + } + } + }, + "additionalProperties": false, + "required": [ + "credentials" + ] + }, + "StringsResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "StringsResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/StringsResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "TaggedCredential": { + "type": "object", + "properties": { + "credential": { + "$ref": "#/definitions/CloudCredential" + }, + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag", + "credential" + ] + }, + "TaggedCredentials": { + "type": "object", + "properties": { + "credentials": { + "type": "array", + "items": { + "$ref": "#/definitions/TaggedCredential" + } + } + }, + "additionalProperties": false + }, + "UpdateCloudArgs": { + "type": "object", + "properties": { + "clouds": { + "type": "array", + "items": { + "$ref": "#/definitions/AddCloudArgs" + } + } + }, + "additionalProperties": false, + "required": [ + "clouds" + ] + }, + "UpdateCredentialArgs": { + "type": "object", + "properties": { + "credentials": { + "type": "array", + "items": { + "$ref": "#/definitions/TaggedCredential" + } + }, + "force": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "credentials", + "force" + ] + }, + "UpdateCredentialModelResult": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + }, + "name": { + "type": "string" + }, + "uuid": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uuid", + "name" + ] + }, + "UpdateCredentialResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "models": { + "type": "array", + "items": { + "$ref": "#/definitions/UpdateCredentialModelResult" + } + }, + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag" + ] + }, + "UpdateCredentialResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/UpdateCredentialResult" + } + } + }, + "additionalProperties": false + }, + "UserCloud": { + "type": "object", + "properties": { + "cloud-tag": { + "type": "string" + }, + "user-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "user-tag", + "cloud-tag" + ] + }, + "UserClouds": { + "type": "object", + "properties": { + "user-clouds": { + "type": "array", + "items": { + "$ref": "#/definitions/UserCloud" + } + } + }, + "additionalProperties": false + }, + "Value": { + "type": "object", + "properties": { + "allocate-public-ip": { + "type": "boolean" + }, + "arch": { + "type": "string" + }, + "container": { + "type": "string" + }, + "cores": { + "type": "integer" + }, + "cpu-power": { + "type": "integer" + }, + "instance-role": { + "type": "string" + }, + "instance-type": { + "type": "string" + }, + "mem": { + "type": "integer" + }, + "root-disk": { + "type": "integer" + }, + "root-disk-source": { + "type": "string" + }, + "spaces": { + "type": "array", + "items": { + "type": "string" + } + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "virt-type": { + "type": "string" + }, + "zones": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + } + } + } + }, + { + "Name": "Controller", + "Description": "ControllerAPI provides the Controller API.", + "Version": 11, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "controller-user" + ], + "Schema": { + "type": "object", + "properties": { + "AllModels": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/UserModelList" + } + }, + "description": "AllModels allows controller administrators to get the list of all the\nmodels in the controller." + }, + "CloudSpec": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/CloudSpecResults" + } + }, + "description": "CloudSpec returns the model's cloud spec." + }, + "ConfigSet": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ControllerConfigSet" + } + }, + "description": "ConfigSet changes the value of specified controller configuration\nsettings. Only some settings can be changed after bootstrap.\nSettings that aren't specified in the params are left unchanged." + }, + "ControllerAPIInfoForModels": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ControllerAPIInfoResults" + } + }, + "description": "ControllerAPIInfoForModels returns the controller api connection details for the specified models." + }, + "ControllerConfig": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/ControllerConfigResult" + } + }, + "description": "ControllerConfig returns the controller's configuration." + }, + "ControllerVersion": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/ControllerVersionResults" + } + }, + "description": "ControllerVersion returns the version information associated with this\ncontroller binary.\n\nNOTE: the implementation intentionally does not check for SuperuserAccess\nas the Version is known even to users with login access." + }, + "DashboardConnectionInfo": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/DashboardConnectionInfo" + } + }, + "description": "DashboardConnectionInfo returns the connection information for a client to\nconnect to the Juju Dashboard including any proxying information." + }, + "DestroyController": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/DestroyControllerArgs" + } + }, + "description": "DestroyController destroys the controller.\n\nIf the args specify the destruction of the models, this method will\nattempt to do so. Otherwise, if the controller has any non-empty,\nnon-Dead hosted models, then an error with the code\nparams.CodeHasHostedModels will be transmitted." + }, + "GetCloudSpec": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ModelTag" + }, + "Result": { + "$ref": "#/definitions/CloudSpecResult" + } + }, + "description": "GetCloudSpec constructs the CloudSpec for a validated and authorized model." + }, + "GetControllerAccess": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/UserAccessResults" + } + }, + "description": "GetControllerAccess returns the level of access the specified users\nhave on the controller." + }, + "HostedModelConfigs": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/HostedModelConfigsResults" + } + }, + "description": "HostedModelConfigs returns all the information that the client needs in\norder to connect directly with the host model's provider and destroy it\ndirectly." + }, + "IdentityProviderURL": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/StringResult" + } + }, + "description": "IdentityProviderURL returns the URL of the configured external identity\nprovider for this controller or an empty string if no external identity\nprovider has been configured when the controller was bootstrapped.\n\nNOTE: the implementation intentionally does not check for SuperuserAccess\nas the URL is known even to users with login access." + }, + "InitiateMigration": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/InitiateMigrationArgs" + }, + "Result": { + "$ref": "#/definitions/InitiateMigrationResults" + } + }, + "description": "InitiateMigration attempts to begin the migration of one or\nmore models to other controllers." + }, + "ListBlockedModels": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/ModelBlockInfoList" + } + }, + "description": "ListBlockedModels returns a list of all models on the controller\nwhich have a block in place. The resulting slice is sorted by model\nname, then owner. Callers must be controller administrators to retrieve the\nlist." + }, + "ModelConfig": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/ModelConfigResults" + } + }, + "description": "ModelConfig returns the model config for the controller\nmodel. For information on the current model, use\nclient.ModelGet" + }, + "ModelStatus": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ModelStatusResults" + } + }, + "description": "ModelStatus returns a summary of the model." + }, + "ModifyControllerAccess": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ModifyControllerAccessRequest" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "ModifyControllerAccess changes the model access granted to users." + }, + "MongoVersion": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/StringResult" + } + }, + "description": "MongoVersion allows the introspection of the mongo version per controller" + }, + "RemoveBlocks": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/RemoveBlocksArgs" + } + }, + "description": "RemoveBlocks removes all the blocks in the controller." + }, + "WatchAllModelSummaries": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/SummaryWatcherID" + } + }, + "description": "WatchAllModelSummaries starts watching the summary updates from the cache.\nThis method is superuser access only, and watches all models in the\ncontroller." + }, + "WatchAllModels": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/AllWatcherId" + } + }, + "description": "WatchAllModels starts watching events for all models in the\ncontroller. The returned AllWatcherId should be used with Next on the\nAllModelWatcher endpoint to receive deltas." + }, + "WatchCloudSpecsChanges": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/NotifyWatchResults" + } + }, + "description": "WatchCloudSpecsChanges returns a watcher for cloud spec changes." + }, + "WatchModelSummaries": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/SummaryWatcherID" + } + }, + "description": "WatchModelSummaries starts watching the summary updates from the cache.\nOnly models that the user has access to are returned." + } + }, + "definitions": { + "AllWatcherId": { + "type": "object", + "properties": { + "watcher-id": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "watcher-id" + ] + }, + "CloudCredential": { + "type": "object", + "properties": { + "attrs": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "auth-type": { + "type": "string" + }, + "redacted": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "auth-type" + ] + }, + "CloudSpec": { + "type": "object", + "properties": { + "cacertificates": { + "type": "array", + "items": { + "type": "string" + } + }, + "credential": { + "$ref": "#/definitions/CloudCredential" + }, + "endpoint": { + "type": "string" + }, + "identity-endpoint": { + "type": "string" + }, + "is-controller-cloud": { + "type": "boolean" + }, + "name": { + "type": "string" + }, + "region": { + "type": "string" + }, + "skip-tls-verify": { + "type": "boolean" + }, + "storage-endpoint": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "type", + "name" + ] + }, + "CloudSpecResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "$ref": "#/definitions/CloudSpec" + } + }, + "additionalProperties": false + }, + "CloudSpecResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/CloudSpecResult" + } + } + }, + "additionalProperties": false + }, + "ConfigValue": { + "type": "object", + "properties": { + "source": { + "type": "string" + }, + "value": { + "type": "object", + "additionalProperties": true + } + }, + "additionalProperties": false, + "required": [ + "value", + "source" + ] + }, + "ControllerAPIInfoResult": { + "type": "object", + "properties": { + "addresses": { + "type": "array", + "items": { + "type": "string" + } + }, + "cacert": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "addresses", + "cacert" + ] + }, + "ControllerAPIInfoResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ControllerAPIInfoResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "ControllerConfigResult": { + "type": "object", + "properties": { + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + } + }, + "additionalProperties": false, + "required": [ + "config" + ] + }, + "ControllerConfigSet": { + "type": "object", + "properties": { + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + } + }, + "additionalProperties": false, + "required": [ + "config" + ] + }, + "ControllerVersionResults": { + "type": "object", + "properties": { + "git-commit": { + "type": "string" + }, + "version": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "version", + "git-commit" + ] + }, + "DashboardConnectionInfo": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "proxy-connection": { + "$ref": "#/definitions/Proxy" + }, + "ssh-connection": { + "$ref": "#/definitions/DashboardConnectionSSHTunnel" + } + }, + "additionalProperties": false, + "required": [ + "proxy-connection", + "ssh-connection" + ] + }, + "DashboardConnectionSSHTunnel": { + "type": "object", + "properties": { + "entity": { + "type": "string" + }, + "host": { + "type": "string" + }, + "model": { + "type": "string" + }, + "port": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "host", + "port" + ] + }, + "DestroyControllerArgs": { + "type": "object", + "properties": { + "destroy-models": { + "type": "boolean" + }, + "destroy-storage": { + "type": "boolean" + }, + "force": { + "type": "boolean" + }, + "max-wait": { + "type": "integer" + }, + "model-timeout": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "destroy-models" + ] + }, + "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": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ErrorResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "HostedModelConfig": { + "type": "object", + "properties": { + "cloud-spec": { + "$ref": "#/definitions/CloudSpec" + }, + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "error": { + "$ref": "#/definitions/Error" + }, + "name": { + "type": "string" + }, + "owner": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "owner" + ] + }, + "HostedModelConfigsResults": { + "type": "object", + "properties": { + "models": { + "type": "array", + "items": { + "$ref": "#/definitions/HostedModelConfig" + } + } + }, + "additionalProperties": false, + "required": [ + "models" + ] + }, + "InitiateMigrationArgs": { + "type": "object", + "properties": { + "specs": { + "type": "array", + "items": { + "$ref": "#/definitions/MigrationSpec" + } + } + }, + "additionalProperties": false, + "required": [ + "specs" + ] + }, + "InitiateMigrationResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "migration-id": { + "type": "string" + }, + "model-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "model-tag", + "migration-id" + ] + }, + "InitiateMigrationResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/InitiateMigrationResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "MachineHardware": { + "type": "object", + "properties": { + "arch": { + "type": "string" + }, + "availability-zone": { + "type": "string" + }, + "cores": { + "type": "integer" + }, + "cpu-power": { + "type": "integer" + }, + "mem": { + "type": "integer" + }, + "root-disk": { + "type": "integer" + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "virt-type": { + "type": "string" + } + }, + "additionalProperties": false + }, + "MigrationSpec": { + "type": "object", + "properties": { + "model-tag": { + "type": "string" + }, + "target-info": { + "$ref": "#/definitions/MigrationTargetInfo" + } + }, + "additionalProperties": false, + "required": [ + "model-tag", + "target-info" + ] + }, + "MigrationTargetInfo": { + "type": "object", + "properties": { + "addrs": { + "type": "array", + "items": { + "type": "string" + } + }, + "auth-tag": { + "type": "string" + }, + "ca-cert": { + "type": "string" + }, + "controller-alias": { + "type": "string" + }, + "controller-tag": { + "type": "string" + }, + "macaroons": { + "type": "string" + }, + "password": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "controller-tag", + "addrs", + "ca-cert", + "auth-tag" + ] + }, + "Model": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "owner-tag": { + "type": "string" + }, + "type": { + "type": "string" + }, + "uuid": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "uuid", + "type", + "owner-tag" + ] + }, + "ModelApplicationInfo": { + "type": "object", + "properties": { + "name": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name" + ] + }, + "ModelBlockInfo": { + "type": "object", + "properties": { + "blocks": { + "type": "array", + "items": { + "type": "string" + } + }, + "model-uuid": { + "type": "string" + }, + "name": { + "type": "string" + }, + "owner-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "model-uuid", + "owner-tag", + "blocks" + ] + }, + "ModelBlockInfoList": { + "type": "object", + "properties": { + "models": { + "type": "array", + "items": { + "$ref": "#/definitions/ModelBlockInfo" + } + } + }, + "additionalProperties": false + }, + "ModelConfigResults": { + "type": "object", + "properties": { + "config": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/ConfigValue" + } + } + } + }, + "additionalProperties": false, + "required": [ + "config" + ] + }, + "ModelFilesystemInfo": { + "type": "object", + "properties": { + "detachable": { + "type": "boolean" + }, + "id": { + "type": "string" + }, + "message": { + "type": "string" + }, + "provider-id": { + "type": "string" + }, + "status": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "id" + ] + }, + "ModelMachineInfo": { + "type": "object", + "properties": { + "display-name": { + "type": "string" + }, + "ha-primary": { + "type": "boolean" + }, + "hardware": { + "$ref": "#/definitions/MachineHardware" + }, + "has-vote": { + "type": "boolean" + }, + "id": { + "type": "string" + }, + "instance-id": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "string" + }, + "wants-vote": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "id" + ] + }, + "ModelStatus": { + "type": "object", + "properties": { + "application-count": { + "type": "integer" + }, + "applications": { + "type": "array", + "items": { + "$ref": "#/definitions/ModelApplicationInfo" + } + }, + "error": { + "$ref": "#/definitions/Error" + }, + "filesystems": { + "type": "array", + "items": { + "$ref": "#/definitions/ModelFilesystemInfo" + } + }, + "hosted-machine-count": { + "type": "integer" + }, + "life": { + "type": "string" + }, + "machines": { + "type": "array", + "items": { + "$ref": "#/definitions/ModelMachineInfo" + } + }, + "model-tag": { + "type": "string" + }, + "owner-tag": { + "type": "string" + }, + "type": { + "type": "string" + }, + "unit-count": { + "type": "integer" + }, + "volumes": { + "type": "array", + "items": { + "$ref": "#/definitions/ModelVolumeInfo" + } + } + }, + "additionalProperties": false, + "required": [ + "model-tag", + "life", + "type", + "hosted-machine-count", + "application-count", + "unit-count", + "owner-tag" + ] + }, + "ModelStatusResults": { + "type": "object", + "properties": { + "models": { + "type": "array", + "items": { + "$ref": "#/definitions/ModelStatus" + } + } + }, + "additionalProperties": false, + "required": [ + "models" + ] + }, + "ModelTag": { + "type": "object", + "additionalProperties": false + }, + "ModelVolumeInfo": { + "type": "object", + "properties": { + "detachable": { + "type": "boolean" + }, + "id": { + "type": "string" + }, + "message": { + "type": "string" + }, + "provider-id": { + "type": "string" + }, + "status": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "id" + ] + }, + "ModifyControllerAccess": { + "type": "object", + "properties": { + "access": { + "type": "string" + }, + "action": { + "type": "string" + }, + "user-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "user-tag", + "action", + "access" + ] + }, + "ModifyControllerAccessRequest": { + "type": "object", + "properties": { + "changes": { + "type": "array", + "items": { + "$ref": "#/definitions/ModifyControllerAccess" + } + } + }, + "additionalProperties": false, + "required": [ + "changes" + ] + }, + "NotifyWatchResult": { + "type": "object", + "properties": { + "NotifyWatcherId": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "NotifyWatcherId" + ] + }, + "NotifyWatchResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/NotifyWatchResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "Proxy": { + "type": "object", + "properties": { + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "config", + "type" + ] + }, + "RemoveBlocksArgs": { + "type": "object", + "properties": { + "all": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "all" + ] + }, + "StringResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "result" + ] + }, + "SummaryWatcherID": { + "type": "object", + "properties": { + "watcher-id": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "watcher-id" + ] + }, + "UserAccess": { + "type": "object", + "properties": { + "access": { + "type": "string" + }, + "user-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "user-tag", + "access" + ] + }, + "UserAccessResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "$ref": "#/definitions/UserAccess" + } + }, + "additionalProperties": false + }, + "UserAccessResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/UserAccessResult" + } + } + }, + "additionalProperties": false + }, + "UserModel": { + "type": "object", + "properties": { + "last-connection": { + "type": "string", + "format": "date-time" + }, + "model": { + "$ref": "#/definitions/Model" + } + }, + "additionalProperties": false, + "required": [ + "model", + "last-connection" + ] + }, + "UserModelList": { + "type": "object", + "properties": { + "user-models": { + "type": "array", + "items": { + "$ref": "#/definitions/UserModel" + } + } + }, + "additionalProperties": false, + "required": [ + "user-models" + ] + } + } + } + }, + { + "Name": "CredentialManager", + "Description": "", + "Version": 1, + "AvailableTo": [ + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "InvalidateModelCredential": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/InvalidateCredentialArg" + }, + "Result": { + "$ref": "#/definitions/ErrorResult" + } + }, + "description": "InvalidateModelCredential marks the cloud credential for this model as invalid." + } + }, + "definitions": { + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "InvalidateCredentialArg": { + "type": "object", + "properties": { + "reason": { + "type": "string" + } + }, + "additionalProperties": false + } + } + } + }, + { + "Name": "FirewallRules", + "Description": "API provides the firewallrules facade APIs for v1.", + "Version": 1, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "ListFirewallRules": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/ListFirewallRulesResults" + } + }, + "description": "ListFirewallRules returns all the firewall rules." + }, + "SetFirewallRules": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/FirewallRuleArgs" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "SetFirewallRules creates or updates the specified firewall rules." + } + }, + "definitions": { + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ErrorResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "FirewallRule": { + "type": "object", + "properties": { + "known-service": { + "type": "string" + }, + "whitelist-cidrs": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "known-service" + ] + }, + "FirewallRuleArgs": { + "type": "object", + "properties": { + "args": { + "type": "array", + "items": { + "$ref": "#/definitions/FirewallRule" + } + } + }, + "additionalProperties": false, + "required": [ + "args" + ] + }, + "ListFirewallRulesResults": { + "type": "object", + "properties": { + "Rules": { + "type": "array", + "items": { + "$ref": "#/definitions/FirewallRule" + } + } + }, + "additionalProperties": false, + "required": [ + "Rules" + ] + } + } + } + }, + { + "Name": "HighAvailability", + "Description": "HighAvailabilityAPI implements the HighAvailability interface and is the concrete\nimplementation of the api end point.", + "Version": 2, + "AvailableTo": [ + "controller-user", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "EnableHA": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ControllersSpecs" + }, + "Result": { + "$ref": "#/definitions/ControllersChangeResults" + } + }, + "description": "EnableHA adds controller machines as necessary to ensure the\ncontroller has the number of machines specified." + } + }, + "definitions": { + "ControllersChangeResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "$ref": "#/definitions/ControllersChanges" + } + }, + "additionalProperties": false, + "required": [ + "result" + ] + }, + "ControllersChangeResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ControllersChangeResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "ControllersChanges": { + "type": "object", + "properties": { + "added": { + "type": "array", + "items": { + "type": "string" + } + }, + "converted": { + "type": "array", + "items": { + "type": "string" + } + }, + "maintained": { + "type": "array", + "items": { + "type": "string" + } + }, + "removed": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "ControllersSpec": { + "type": "object", + "properties": { + "constraints": { + "$ref": "#/definitions/Value" + }, + "num-controllers": { + "type": "integer" + }, + "placement": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "num-controllers" + ] + }, + "ControllersSpecs": { + "type": "object", + "properties": { + "specs": { + "type": "array", + "items": { + "$ref": "#/definitions/ControllersSpec" + } + } + }, + "additionalProperties": false, + "required": [ + "specs" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "Value": { + "type": "object", + "properties": { + "allocate-public-ip": { + "type": "boolean" + }, + "arch": { + "type": "string" + }, + "container": { + "type": "string" + }, + "cores": { + "type": "integer" + }, + "cpu-power": { + "type": "integer" + }, + "instance-role": { + "type": "string" + }, + "instance-type": { + "type": "string" + }, + "mem": { + "type": "integer" + }, + "root-disk": { + "type": "integer" + }, + "root-disk-source": { + "type": "string" + }, + "spaces": { + "type": "array", + "items": { + "type": "string" + } + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "virt-type": { + "type": "string" + }, + "zones": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + } + } + } + }, + { + "Name": "ImageMetadataManager", + "Description": "API is the concrete implementation of the api end point\nfor loud image metadata manipulations.", + "Version": 1, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "Delete": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/MetadataImageIds" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "Delete deletes cloud image metadata for given image ids.\nIt supports bulk calls." + }, + "List": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ImageMetadataFilter" + }, + "Result": { + "$ref": "#/definitions/ListCloudImageMetadataResult" + } + }, + "description": "List returns all found cloud image metadata that satisfy\ngiven filter.\nReturned list contains metadata ordered by priority." + }, + "Save": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/MetadataSaveParams" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "Save stores given cloud image metadata.\nIt supports bulk calls." + } + }, + "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" + }, + "source": { + "type": "string" + }, + "stream": { + "type": "string" + }, + "version": { + "type": "string" + }, + "virt-type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "image-id", + "region", + "version", + "arch", + "source", + "priority" + ] + }, + "CloudImageMetadataList": { + "type": "object", + "properties": { + "metadata": { + "type": "array", + "items": { + "$ref": "#/definitions/CloudImageMetadata" + } + } + }, + "additionalProperties": false + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "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" + }, + "stream": { + "type": "string" + }, + "versions": { + "type": "array", + "items": { + "type": "string" + } + }, + "virt-type": { + "type": "string" + } + }, + "additionalProperties": false + }, + "ListCloudImageMetadataResult": { + "type": "object", + "properties": { + "result": { + "type": "array", + "items": { + "$ref": "#/definitions/CloudImageMetadata" + } + } + }, + "additionalProperties": false, + "required": [ + "result" + ] + }, + "MetadataImageIds": { + "type": "object", + "properties": { + "image-ids": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "image-ids" + ] + }, + "MetadataSaveParams": { + "type": "object", + "properties": { + "metadata": { + "type": "array", + "items": { + "$ref": "#/definitions/CloudImageMetadataList" + } + } + }, + "additionalProperties": false + } + } + } + }, + { + "Name": "KeyManager", + "Description": "KeyManagerAPI provides api endpoints for manipulating ssh keys", + "Version": 1, + "AvailableTo": [ + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "AddKeys": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ModifyUserSSHKeys" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "AddKeys adds new authorised ssh keys for the specified user." + }, + "DeleteKeys": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ModifyUserSSHKeys" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "DeleteKeys deletes the authorised ssh keys for the specified user." + }, + "ImportKeys": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ModifyUserSSHKeys" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "ImportKeys imports new authorised ssh keys from the specified key ids for the specified user." + }, + "ListKeys": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ListSSHKeys" + }, + "Result": { + "$ref": "#/definitions/StringsResults" + } + }, + "description": "ListKeys returns the authorised ssh keys for the specified users." + } + }, + "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": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ErrorResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "ListSSHKeys": { + "type": "object", + "properties": { + "entities": { + "$ref": "#/definitions/Entities" + }, + "mode": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "entities", + "mode" + ] + }, + "ModifyUserSSHKeys": { + "type": "object", + "properties": { + "ssh-keys": { + "type": "array", + "items": { + "type": "string" + } + }, + "user": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "user", + "ssh-keys" + ] + }, + "StringsResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "StringsResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/StringsResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + } + } + } + }, + { + "Name": "MachineManager", + "Description": "MachineManagerAPI provides access to the MachineManager API facade.", + "Version": 10, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "AddMachines": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/AddMachines" + }, + "Result": { + "$ref": "#/definitions/AddMachinesResults" + } + }, + "description": "AddMachines adds new machines with the supplied parameters.\nThe args will contain Base info." + }, + "DestroyMachineWithParams": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/DestroyMachinesParams" + }, + "Result": { + "$ref": "#/definitions/DestroyMachineResults" + } + }, + "description": "DestroyMachineWithParams removes a set of machines from the model." + }, + "GetUpgradeSeriesMessages": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/UpgradeSeriesNotificationParams" + }, + "Result": { + "$ref": "#/definitions/StringsResults" + } + }, + "description": "GetUpgradeSeriesMessages returns all new messages associated with upgrade\nseries events. Messages that have already been retrieved once are not\nreturned by this method." + }, + "InstanceTypes": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ModelInstanceTypesConstraints" + }, + "Result": { + "$ref": "#/definitions/InstanceTypesResults" + } + }, + "description": "InstanceTypes returns instance type information for the cloud and region\nin which the current model is deployed." + }, + "ProvisioningScript": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ProvisioningScriptParams" + }, + "Result": { + "$ref": "#/definitions/ProvisioningScriptResult" + } + }, + "description": "ProvisioningScript returns a shell script that, when run,\nprovisions a machine agent on the machine executing the script." + }, + "RetryProvisioning": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/RetryProvisioningArgs" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "RetryProvisioning marks a provisioning error as transient on the machines." + }, + "UpgradeSeriesComplete": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/UpdateChannelArg" + }, + "Result": { + "$ref": "#/definitions/ErrorResult" + } + }, + "description": "UpgradeSeriesComplete marks a machine as having completed a managed series\nupgrade." + }, + "UpgradeSeriesPrepare": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/UpdateChannelArg" + }, + "Result": { + "$ref": "#/definitions/ErrorResult" + } + }, + "description": "UpgradeSeriesPrepare prepares a machine for a OS series upgrade." + }, + "UpgradeSeriesValidate": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/UpdateChannelArgs" + }, + "Result": { + "$ref": "#/definitions/UpgradeSeriesUnitsResults" + } + }, + "description": "UpgradeSeriesValidate validates that the incoming arguments correspond to a\nvalid series upgrade for the target machine.\nIf they do, a list of the machine's current units is returned for use in\nsoliciting user confirmation of the command." + }, + "WatchUpgradeSeriesNotifications": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/NotifyWatchResults" + } + }, + "description": "WatchUpgradeSeriesNotifications returns a watcher that fires on upgrade\nseries events." + } + }, + "definitions": { + "AddMachineParams": { + "type": "object", + "properties": { + "addresses": { + "type": "array", + "items": { + "$ref": "#/definitions/Address" + } + }, + "base": { + "$ref": "#/definitions/Base" + }, + "constraints": { + "$ref": "#/definitions/Value" + }, + "container-type": { + "type": "string" + }, + "disks": { + "type": "array", + "items": { + "$ref": "#/definitions/Constraints" + } + }, + "hardware-characteristics": { + "$ref": "#/definitions/HardwareCharacteristics" + }, + "instance-id": { + "type": "string" + }, + "jobs": { + "type": "array", + "items": { + "type": "string" + } + }, + "nonce": { + "type": "string" + }, + "parent-id": { + "type": "string" + }, + "placement": { + "$ref": "#/definitions/Placement" + } + }, + "additionalProperties": false, + "required": [ + "constraints", + "jobs", + "parent-id", + "container-type", + "instance-id", + "nonce", + "hardware-characteristics", + "addresses" + ] + }, + "AddMachines": { + "type": "object", + "properties": { + "params": { + "type": "array", + "items": { + "$ref": "#/definitions/AddMachineParams" + } + } + }, + "additionalProperties": false, + "required": [ + "params" + ] + }, + "AddMachinesResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "machine": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "machine" + ] + }, + "AddMachinesResults": { + "type": "object", + "properties": { + "machines": { + "type": "array", + "items": { + "$ref": "#/definitions/AddMachinesResult" + } + } + }, + "additionalProperties": false, + "required": [ + "machines" + ] + }, + "Address": { + "type": "object", + "properties": { + "cidr": { + "type": "string" + }, + "config-type": { + "type": "string" + }, + "is-secondary": { + "type": "boolean" + }, + "scope": { + "type": "string" + }, + "space-id": { + "type": "string" + }, + "space-name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "value", + "type", + "scope" + ] + }, + "Base": { + "type": "object", + "properties": { + "channel": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "channel" + ] + }, + "Constraints": { + "type": "object", + "properties": { + "Count": { + "type": "integer" + }, + "Pool": { + "type": "string" + }, + "Size": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "Pool", + "Size", + "Count" + ] + }, + "DestroyMachineInfo": { + "type": "object", + "properties": { + "destroyed-containers": { + "type": "array", + "items": { + "$ref": "#/definitions/DestroyMachineResult" + } + }, + "destroyed-storage": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + }, + "destroyed-units": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + }, + "detached-storage": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + }, + "machine-id": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "machine-id" + ] + }, + "DestroyMachineResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "info": { + "$ref": "#/definitions/DestroyMachineInfo" + } + }, + "additionalProperties": false + }, + "DestroyMachineResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/DestroyMachineResult" + } + } + }, + "additionalProperties": false + }, + "DestroyMachinesParams": { + "type": "object", + "properties": { + "dry-run": { + "type": "boolean" + }, + "force": { + "type": "boolean" + }, + "keep": { + "type": "boolean" + }, + "machine-tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "max-wait": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "machine-tags" + ] + }, + "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": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ErrorResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "HardwareCharacteristics": { + "type": "object", + "properties": { + "arch": { + "type": "string" + }, + "availability-zone": { + "type": "string" + }, + "cpu-cores": { + "type": "integer" + }, + "cpu-power": { + "type": "integer" + }, + "mem": { + "type": "integer" + }, + "root-disk": { + "type": "integer" + }, + "root-disk-source": { + "type": "string" + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "virt-type": { + "type": "string" + } + }, + "additionalProperties": false + }, + "InstanceType": { + "type": "object", + "properties": { + "arches": { + "type": "array", + "items": { + "type": "string" + } + }, + "cost": { + "type": "integer" + }, + "cpu-cores": { + "type": "integer" + }, + "memory": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "root-disk": { + "type": "integer" + }, + "virt-type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "arches", + "cpu-cores", + "memory" + ] + }, + "InstanceTypesResult": { + "type": "object", + "properties": { + "cost-currency": { + "type": "string" + }, + "cost-divisor": { + "type": "integer" + }, + "cost-unit": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" + }, + "instance-types": { + "type": "array", + "items": { + "$ref": "#/definitions/InstanceType" + } + } + }, + "additionalProperties": false + }, + "InstanceTypesResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/InstanceTypesResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "ModelInstanceTypesConstraint": { + "type": "object", + "properties": { + "value": { + "$ref": "#/definitions/Value" + } + }, + "additionalProperties": false + }, + "ModelInstanceTypesConstraints": { + "type": "object", + "properties": { + "constraints": { + "type": "array", + "items": { + "$ref": "#/definitions/ModelInstanceTypesConstraint" + } + } + }, + "additionalProperties": false, + "required": [ + "constraints" + ] + }, + "NotifyWatchResult": { + "type": "object", + "properties": { + "NotifyWatcherId": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "NotifyWatcherId" + ] + }, + "NotifyWatchResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/NotifyWatchResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "Placement": { + "type": "object", + "properties": { + "directive": { + "type": "string" + }, + "scope": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "scope", + "directive" + ] + }, + "ProvisioningScriptParams": { + "type": "object", + "properties": { + "data-dir": { + "type": "string" + }, + "disable-package-commands": { + "type": "boolean" + }, + "machine-id": { + "type": "string" + }, + "nonce": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "machine-id", + "nonce", + "data-dir", + "disable-package-commands" + ] + }, + "ProvisioningScriptResult": { + "type": "object", + "properties": { + "script": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "script" + ] + }, + "RetryProvisioningArgs": { + "type": "object", + "properties": { + "all": { + "type": "boolean" + }, + "machines": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "all" + ] + }, + "StringsResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "StringsResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/StringsResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "UpdateChannelArg": { + "type": "object", + "properties": { + "channel": { + "type": "string" + }, + "force": { + "type": "boolean" + }, + "tag": { + "$ref": "#/definitions/Entity" + } + }, + "additionalProperties": false, + "required": [ + "tag", + "force", + "channel" + ] + }, + "UpdateChannelArgs": { + "type": "object", + "properties": { + "args": { + "type": "array", + "items": { + "$ref": "#/definitions/UpdateChannelArg" + } + } + }, + "additionalProperties": false, + "required": [ + "args" + ] + }, + "UpgradeSeriesNotificationParam": { + "type": "object", + "properties": { + "entity": { + "$ref": "#/definitions/Entity" + }, + "watcher-id": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "entity", + "watcher-id" + ] + }, + "UpgradeSeriesNotificationParams": { + "type": "object", + "properties": { + "params": { + "type": "array", + "items": { + "$ref": "#/definitions/UpgradeSeriesNotificationParam" + } + } + }, + "additionalProperties": false, + "required": [ + "params" + ] + }, + "UpgradeSeriesUnitsResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "unit-names": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "unit-names" + ] + }, + "UpgradeSeriesUnitsResults": { + "type": "object", + "properties": { + "Results": { + "type": "array", + "items": { + "$ref": "#/definitions/UpgradeSeriesUnitsResult" + } + } + }, + "additionalProperties": false, + "required": [ + "Results" + ] + }, + "Value": { + "type": "object", + "properties": { + "allocate-public-ip": { + "type": "boolean" + }, + "arch": { + "type": "string" + }, + "container": { + "type": "string" + }, + "cores": { + "type": "integer" + }, + "cpu-power": { + "type": "integer" + }, + "instance-role": { + "type": "string" + }, + "instance-type": { + "type": "string" + }, + "mem": { + "type": "integer" + }, + "root-disk": { + "type": "integer" + }, + "root-disk-source": { + "type": "string" + }, + "spaces": { + "type": "array", + "items": { + "type": "string" + } + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "virt-type": { + "type": "string" + }, + "zones": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + } + } + } + }, + { + "Name": "MetricsDebug", + "Description": "MetricsDebugAPI implements the metricsdebug interface and is the concrete\nimplementation of the api end point.", + "Version": 2, + "AvailableTo": [ + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "GetMetrics": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/MetricResults" + } + }, + "description": "GetMetrics returns all metrics stored by the state server." + }, + "SetMeterStatus": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/MeterStatusParams" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "SetMeterStatus sets meter statuses for entities." + } + }, + "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" + ] + }, + "EntityMetrics": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "metrics": { + "type": "array", + "items": { + "$ref": "#/definitions/MetricResult" + } + } + }, + "additionalProperties": false + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ErrorResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "MeterStatusParam": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "string" + }, + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag", + "code" + ] + }, + "MeterStatusParams": { + "type": "object", + "properties": { + "statues": { + "type": "array", + "items": { + "$ref": "#/definitions/MeterStatusParam" + } + } + }, + "additionalProperties": false, + "required": [ + "statues" + ] + }, + "MetricResult": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "labels": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "time": { + "type": "string", + "format": "date-time" + }, + "unit": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "time", + "key", + "value", + "unit", + "labels" + ] + }, + "MetricResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/EntityMetrics" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + } + } + } + }, + { + "Name": "ModelConfig", + "Description": "ModelConfigAPIV3 is currently the latest.", + "Version": 3, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "controller-user", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "GetModelConstraints": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/GetConstraintsResults" + } + }, + "description": "GetModelConstraints returns the constraints for the model." + }, + "ModelGet": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/ModelConfigResults" + } + }, + "description": "ModelGet implements the server-side part of the\nmodel-config CLI command." + }, + "ModelSet": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ModelSet" + } + }, + "description": "ModelSet implements the server-side part of the\nset-model-config CLI command." + }, + "ModelUnset": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ModelUnset" + } + }, + "description": "ModelUnset implements the server-side part of the\nset-model-config CLI command." + }, + "SLALevel": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/StringResult" + } + }, + "description": "SLALevel returns the current sla level for the model." + }, + "Sequences": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/ModelSequencesResult" + } + }, + "description": "Sequences returns the model's sequence names and next values." + }, + "SetModelConstraints": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/SetConstraints" + } + }, + "description": "SetModelConstraints sets the constraints for the model." + }, + "SetSLALevel": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ModelSLA" + } + }, + "description": "SetSLALevel sets the sla level on the model." + } + }, + "definitions": { + "ConfigValue": { + "type": "object", + "properties": { + "source": { + "type": "string" + }, + "value": { + "type": "object", + "additionalProperties": true + } + }, + "additionalProperties": false, + "required": [ + "value", + "source" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "GetConstraintsResults": { + "type": "object", + "properties": { + "constraints": { + "$ref": "#/definitions/Value" + } + }, + "additionalProperties": false, + "required": [ + "constraints" + ] + }, + "ModelConfigResults": { + "type": "object", + "properties": { + "config": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/ConfigValue" + } + } + } + }, + "additionalProperties": false, + "required": [ + "config" + ] + }, + "ModelSLA": { + "type": "object", + "properties": { + "ModelSLAInfo": { + "$ref": "#/definitions/ModelSLAInfo" + }, + "creds": { + "type": "array", + "items": { + "type": "integer" + } + }, + "level": { + "type": "string" + }, + "owner": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "level", + "owner", + "ModelSLAInfo", + "creds" + ] + }, + "ModelSLAInfo": { + "type": "object", + "properties": { + "level": { + "type": "string" + }, + "owner": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "level", + "owner" + ] + }, + "ModelSequencesResult": { + "type": "object", + "properties": { + "sequences": { + "type": "object", + "patternProperties": { + ".*": { + "type": "integer" + } + } + } + }, + "additionalProperties": false, + "required": [ + "sequences" + ] + }, + "ModelSet": { + "type": "object", + "properties": { + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + } + }, + "additionalProperties": false, + "required": [ + "config" + ] + }, + "ModelUnset": { + "type": "object", + "properties": { + "keys": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "keys" + ] + }, + "SetConstraints": { + "type": "object", + "properties": { + "application": { + "type": "string" + }, + "constraints": { + "$ref": "#/definitions/Value" + } + }, + "additionalProperties": false, + "required": [ + "application", + "constraints" + ] + }, + "StringResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "result" + ] + }, + "Value": { + "type": "object", + "properties": { + "allocate-public-ip": { + "type": "boolean" + }, + "arch": { + "type": "string" + }, + "container": { + "type": "string" + }, + "cores": { + "type": "integer" + }, + "cpu-power": { + "type": "integer" + }, + "instance-role": { + "type": "string" + }, + "instance-type": { + "type": "string" + }, + "mem": { + "type": "integer" + }, + "root-disk": { + "type": "integer" + }, + "root-disk-source": { + "type": "string" + }, + "spaces": { + "type": "array", + "items": { + "type": "string" + } + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "virt-type": { + "type": "string" + }, + "zones": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + } + } + } + }, + { + "Name": "ModelGeneration", + "Description": "API is the concrete implementation of the API endpoint.", + "Version": 4, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "AbortBranch": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/BranchArg" + }, + "Result": { + "$ref": "#/definitions/ErrorResult" + } + }, + "description": "AbortBranch aborts the input branch, marking it complete. However no\nchanges are made applicable to the whole model. No units may be assigned\nto the branch when aborting." + }, + "AddBranch": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/BranchArg" + }, + "Result": { + "$ref": "#/definitions/ErrorResult" + } + }, + "description": "AddBranch adds a new branch with the input name to the model." + }, + "BranchInfo": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/BranchInfoArgs" + }, + "Result": { + "$ref": "#/definitions/BranchResults" + } + }, + "description": "BranchInfo will return details of branch identified by the input argument,\nincluding units on the branch and the configuration disjoint with the\nmaster generation.\nAn error is returned if no in-flight branch matching in input is found." + }, + "CommitBranch": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/BranchArg" + }, + "Result": { + "$ref": "#/definitions/IntResult" + } + }, + "description": "CommitBranch commits the input branch, making its changes applicable to\nthe whole model and marking it complete." + }, + "HasActiveBranch": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/BranchArg" + }, + "Result": { + "$ref": "#/definitions/BoolResult" + } + }, + "description": "HasActiveBranch returns a true result if the input model has an \"in-flight\"\nbranch matching the input name." + }, + "ListCommits": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/BranchResults" + } + }, + "description": "ListCommits will return the commits, hence only branches with generation_id higher than 0" + }, + "ShowCommit": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/GenerationId" + }, + "Result": { + "$ref": "#/definitions/GenerationResult" + } + }, + "description": "ShowCommit will return details a commit given by its generationId\nAn error is returned if either no branch can be found corresponding to the generation id.\nOr the generation id given is below 1." + }, + "TrackBranch": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/BranchTrackArg" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "TrackBranch marks the input units and/or applications as tracking the input\nbranch, causing them to realise changes made under that branch." + } + }, + "definitions": { + "BoolResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "result" + ] + }, + "BranchArg": { + "type": "object", + "properties": { + "branch": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "branch" + ] + }, + "BranchInfoArgs": { + "type": "object", + "properties": { + "branches": { + "type": "array", + "items": { + "type": "string" + } + }, + "detailed": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "branches", + "detailed" + ] + }, + "BranchResults": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "generations": { + "type": "array", + "items": { + "$ref": "#/definitions/Generation" + } + } + }, + "additionalProperties": false, + "required": [ + "generations" + ] + }, + "BranchTrackArg": { + "type": "object", + "properties": { + "branch": { + "type": "string" + }, + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + }, + "num-units": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "branch", + "entities" + ] + }, + "Entity": { + "type": "object", + "properties": { + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ErrorResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "Generation": { + "type": "object", + "properties": { + "applications": { + "type": "array", + "items": { + "$ref": "#/definitions/GenerationApplication" + } + }, + "branch": { + "type": "string" + }, + "completed": { + "type": "integer" + }, + "completed-by": { + "type": "string" + }, + "created": { + "type": "integer" + }, + "created-by": { + "type": "string" + }, + "generation-id": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "branch", + "created", + "created-by", + "applications" + ] + }, + "GenerationApplication": { + "type": "object", + "properties": { + "application": { + "type": "string" + }, + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "pending": { + "type": "array", + "items": { + "type": "string" + } + }, + "progress": { + "type": "string" + }, + "tracking": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "application", + "progress", + "config" + ] + }, + "GenerationId": { + "type": "object", + "properties": { + "generation-id": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "generation-id" + ] + }, + "GenerationResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "generation": { + "$ref": "#/definitions/Generation" + } + }, + "additionalProperties": false, + "required": [ + "generation" + ] + }, + "IntResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "result" + ] + } + } + } + }, + { + "Name": "ModelManager", + "Description": "ModelManagerAPI implements the model manager interface and is\nthe concrete implementation of the api end point.", + "Version": 9, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "controller-user" + ], + "Schema": { + "type": "object", + "properties": { + "ChangeModelCredential": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ChangeModelCredentialsParams" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "ChangeModelCredential changes cloud credential reference for models.\nThese new cloud credentials must already exist on the controller." + }, + "CreateModel": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ModelCreateArgs" + }, + "Result": { + "$ref": "#/definitions/ModelInfo" + } + }, + "description": "CreateModel creates a new model using the account and\nmodel config specified in the args." + }, + "DestroyModels": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/DestroyModelsParams" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "DestroyModels will try to destroy the specified models.\nIf there is a block on destruction, this method will return an error.\nFrom ModelManager v7 onwards, DestroyModels gains 'force' and 'max-wait' parameters." + }, + "DumpModels": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/DumpModelRequest" + }, + "Result": { + "$ref": "#/definitions/StringResults" + } + }, + "description": "DumpModels will export the models into the database agnostic\nrepresentation. The user needs to either be a controller admin, or have\nadmin privileges on the model itself." + }, + "DumpModelsDB": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/MapResults" + } + }, + "description": "DumpModelsDB will gather all documents from all model collections\nfor the specified model. The map result contains a map of collection\nnames to lists of documents represented as maps." + }, + "ListModelSummaries": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ModelSummariesRequest" + }, + "Result": { + "$ref": "#/definitions/ModelSummaryResults" + } + }, + "description": "ListModelSummaries returns models that the specified user\nhas access to in the current server. Controller admins (superuser)\ncan list models for any user. Other users\ncan only ask about their own models." + }, + "ListModels": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entity" + }, + "Result": { + "$ref": "#/definitions/UserModelList" + } + }, + "description": "ListModels returns the models that the specified user\nhas access to in the current server. Controller admins (superuser)\ncan list models for any user. Other users\ncan only ask about their own models." + }, + "ModelDefaultsForClouds": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ModelDefaultsResults" + } + }, + "description": "ModelDefaultsForClouds returns the default config values for the specified\nclouds." + }, + "ModelInfo": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ModelInfoResults" + } + }, + "description": "ModelInfo returns information about the specified models." + }, + "ModelStatus": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ModelStatusResults" + } + }, + "description": "ModelStatus returns a summary of the model." + }, + "ModifyModelAccess": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ModifyModelAccessRequest" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "ModifyModelAccess changes the model access granted to users." + }, + "SetModelDefaults": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/SetModelDefaults" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "SetModelDefaults writes new values for the specified default model settings." + }, + "UnsetModelDefaults": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/UnsetModelDefaults" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "UnsetModelDefaults removes the specified default model settings." + } + }, + "definitions": { + "ChangeModelCredentialParams": { + "type": "object", + "properties": { + "credential-tag": { + "type": "string" + }, + "model-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "model-tag", + "credential-tag" + ] + }, + "ChangeModelCredentialsParams": { + "type": "object", + "properties": { + "model-credentials": { + "type": "array", + "items": { + "$ref": "#/definitions/ChangeModelCredentialParams" + } + } + }, + "additionalProperties": false, + "required": [ + "model-credentials" + ] + }, + "DestroyModelParams": { + "type": "object", + "properties": { + "destroy-storage": { + "type": "boolean" + }, + "force": { + "type": "boolean" + }, + "max-wait": { + "type": "integer" + }, + "model-tag": { + "type": "string" + }, + "timeout": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "model-tag" + ] + }, + "DestroyModelsParams": { + "type": "object", + "properties": { + "models": { + "type": "array", + "items": { + "$ref": "#/definitions/DestroyModelParams" + } + } + }, + "additionalProperties": false, + "required": [ + "models" + ] + }, + "DumpModelRequest": { + "type": "object", + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + }, + "simplified": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "entities", + "simplified" + ] + }, + "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" + ] + }, + "EntityStatus": { + "type": "object", + "properties": { + "data": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "info": { + "type": "string" + }, + "since": { + "type": "string", + "format": "date-time" + }, + "status": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "status", + "info", + "since" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ErrorResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "MachineHardware": { + "type": "object", + "properties": { + "arch": { + "type": "string" + }, + "availability-zone": { + "type": "string" + }, + "cores": { + "type": "integer" + }, + "cpu-power": { + "type": "integer" + }, + "mem": { + "type": "integer" + }, + "root-disk": { + "type": "integer" + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "virt-type": { + "type": "string" + } + }, + "additionalProperties": false + }, + "MapResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + } + }, + "additionalProperties": false, + "required": [ + "result" + ] + }, + "MapResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/MapResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "Model": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "owner-tag": { + "type": "string" + }, + "type": { + "type": "string" + }, + "uuid": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "uuid", + "type", + "owner-tag" + ] + }, + "ModelApplicationInfo": { + "type": "object", + "properties": { + "name": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name" + ] + }, + "ModelCreateArgs": { + "type": "object", + "properties": { + "cloud-tag": { + "type": "string" + }, + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "credential": { + "type": "string" + }, + "name": { + "type": "string" + }, + "owner-tag": { + "type": "string" + }, + "region": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "owner-tag" + ] + }, + "ModelDefaultValues": { + "type": "object", + "properties": { + "cloud-region": { + "type": "string" + }, + "cloud-tag": { + "type": "string" + }, + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + } + }, + "additionalProperties": false, + "required": [ + "config" + ] + }, + "ModelDefaults": { + "type": "object", + "properties": { + "controller": { + "type": "object", + "additionalProperties": true + }, + "default": { + "type": "object", + "additionalProperties": true + }, + "regions": { + "type": "array", + "items": { + "$ref": "#/definitions/RegionDefaults" + } + } + }, + "additionalProperties": false + }, + "ModelDefaultsResult": { + "type": "object", + "properties": { + "config": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/ModelDefaults" + } + } + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "config" + ] + }, + "ModelDefaultsResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ModelDefaultsResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "ModelEntityCount": { + "type": "object", + "properties": { + "count": { + "type": "integer" + }, + "entity": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "entity", + "count" + ] + }, + "ModelFilesystemInfo": { + "type": "object", + "properties": { + "detachable": { + "type": "boolean" + }, + "id": { + "type": "string" + }, + "message": { + "type": "string" + }, + "provider-id": { + "type": "string" + }, + "status": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "id" + ] + }, + "ModelInfo": { + "type": "object", + "properties": { + "agent-version": { + "$ref": "#/definitions/Number" + }, + "cloud-credential-tag": { + "type": "string" + }, + "cloud-credential-validity": { + "type": "boolean" + }, + "cloud-region": { + "type": "string" + }, + "cloud-tag": { + "type": "string" + }, + "controller-uuid": { + "type": "string" + }, + "default-base": { + "type": "string" + }, + "default-series": { + "type": "string" + }, + "is-controller": { + "type": "boolean" + }, + "life": { + "type": "string" + }, + "machines": { + "type": "array", + "items": { + "$ref": "#/definitions/ModelMachineInfo" + } + }, + "migration": { + "$ref": "#/definitions/ModelMigrationStatus" + }, + "name": { + "type": "string" + }, + "owner-tag": { + "type": "string" + }, + "provider-type": { + "type": "string" + }, + "secret-backends": { + "type": "array", + "items": { + "$ref": "#/definitions/SecretBackendResult" + } + }, + "sla": { + "$ref": "#/definitions/ModelSLAInfo" + }, + "status": { + "$ref": "#/definitions/EntityStatus" + }, + "supported-features": { + "type": "array", + "items": { + "$ref": "#/definitions/SupportedFeature" + } + }, + "type": { + "type": "string" + }, + "users": { + "type": "array", + "items": { + "$ref": "#/definitions/ModelUserInfo" + } + }, + "uuid": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "type", + "uuid", + "controller-uuid", + "is-controller", + "cloud-tag", + "owner-tag", + "life", + "users", + "machines", + "secret-backends", + "sla", + "agent-version" + ] + }, + "ModelInfoResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "$ref": "#/definitions/ModelInfo" + } + }, + "additionalProperties": false + }, + "ModelInfoResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ModelInfoResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "ModelMachineInfo": { + "type": "object", + "properties": { + "display-name": { + "type": "string" + }, + "ha-primary": { + "type": "boolean" + }, + "hardware": { + "$ref": "#/definitions/MachineHardware" + }, + "has-vote": { + "type": "boolean" + }, + "id": { + "type": "string" + }, + "instance-id": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "string" + }, + "wants-vote": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "id" + ] + }, + "ModelMigrationStatus": { + "type": "object", + "properties": { + "end": { + "type": "string", + "format": "date-time" + }, + "start": { + "type": "string", + "format": "date-time" + }, + "status": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "status", + "start" + ] + }, + "ModelSLAInfo": { + "type": "object", + "properties": { + "level": { + "type": "string" + }, + "owner": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "level", + "owner" + ] + }, + "ModelStatus": { + "type": "object", + "properties": { + "application-count": { + "type": "integer" + }, + "applications": { + "type": "array", + "items": { + "$ref": "#/definitions/ModelApplicationInfo" + } + }, + "error": { + "$ref": "#/definitions/Error" + }, + "filesystems": { + "type": "array", + "items": { + "$ref": "#/definitions/ModelFilesystemInfo" + } + }, + "hosted-machine-count": { + "type": "integer" + }, + "life": { + "type": "string" + }, + "machines": { + "type": "array", + "items": { + "$ref": "#/definitions/ModelMachineInfo" + } + }, + "model-tag": { + "type": "string" + }, + "owner-tag": { + "type": "string" + }, + "type": { + "type": "string" + }, + "unit-count": { + "type": "integer" + }, + "volumes": { + "type": "array", + "items": { + "$ref": "#/definitions/ModelVolumeInfo" + } + } + }, + "additionalProperties": false, + "required": [ + "model-tag", + "life", + "type", + "hosted-machine-count", + "application-count", + "unit-count", + "owner-tag" + ] + }, + "ModelStatusResults": { + "type": "object", + "properties": { + "models": { + "type": "array", + "items": { + "$ref": "#/definitions/ModelStatus" + } + } + }, + "additionalProperties": false, + "required": [ + "models" + ] + }, + "ModelSummariesRequest": { + "type": "object", + "properties": { + "all": { + "type": "boolean" + }, + "user-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "user-tag" + ] + }, + "ModelSummary": { + "type": "object", + "properties": { + "agent-version": { + "$ref": "#/definitions/Number" + }, + "cloud-credential-tag": { + "type": "string" + }, + "cloud-region": { + "type": "string" + }, + "cloud-tag": { + "type": "string" + }, + "controller-uuid": { + "type": "string" + }, + "counts": { + "type": "array", + "items": { + "$ref": "#/definitions/ModelEntityCount" + } + }, + "default-series": { + "type": "string" + }, + "is-controller": { + "type": "boolean" + }, + "last-connection": { + "type": "string", + "format": "date-time" + }, + "life": { + "type": "string" + }, + "migration": { + "$ref": "#/definitions/ModelMigrationStatus" + }, + "name": { + "type": "string" + }, + "owner-tag": { + "type": "string" + }, + "provider-type": { + "type": "string" + }, + "sla": { + "$ref": "#/definitions/ModelSLAInfo" + }, + "status": { + "$ref": "#/definitions/EntityStatus" + }, + "type": { + "type": "string" + }, + "user-access": { + "type": "string" + }, + "uuid": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "uuid", + "type", + "controller-uuid", + "is-controller", + "cloud-tag", + "owner-tag", + "life", + "user-access", + "last-connection", + "counts", + "sla", + "agent-version" + ] + }, + "ModelSummaryResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "$ref": "#/definitions/ModelSummary" + } + }, + "additionalProperties": false + }, + "ModelSummaryResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ModelSummaryResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "ModelUnsetKeys": { + "type": "object", + "properties": { + "cloud-region": { + "type": "string" + }, + "cloud-tag": { + "type": "string" + }, + "keys": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "keys" + ] + }, + "ModelUserInfo": { + "type": "object", + "properties": { + "access": { + "type": "string" + }, + "display-name": { + "type": "string" + }, + "last-connection": { + "type": "string", + "format": "date-time" + }, + "model-tag": { + "type": "string" + }, + "user": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "model-tag", + "user", + "display-name", + "last-connection", + "access" + ] + }, + "ModelVolumeInfo": { + "type": "object", + "properties": { + "detachable": { + "type": "boolean" + }, + "id": { + "type": "string" + }, + "message": { + "type": "string" + }, + "provider-id": { + "type": "string" + }, + "status": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "id" + ] + }, + "ModifyModelAccess": { + "type": "object", + "properties": { + "access": { + "type": "string" + }, + "action": { + "type": "string" + }, + "model-tag": { + "type": "string" + }, + "user-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "user-tag", + "action", + "access", + "model-tag" + ] + }, + "ModifyModelAccessRequest": { + "type": "object", + "properties": { + "changes": { + "type": "array", + "items": { + "$ref": "#/definitions/ModifyModelAccess" + } + } + }, + "additionalProperties": false, + "required": [ + "changes" + ] + }, + "Number": { + "type": "object", + "properties": { + "Build": { + "type": "integer" + }, + "Major": { + "type": "integer" + }, + "Minor": { + "type": "integer" + }, + "Patch": { + "type": "integer" + }, + "Tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "Major", + "Minor", + "Tag", + "Patch", + "Build" + ] + }, + "RegionDefaults": { + "type": "object", + "properties": { + "region-name": { + "type": "string" + }, + "value": { + "type": "object", + "additionalProperties": true + } + }, + "additionalProperties": false, + "required": [ + "region-name", + "value" + ] + }, + "SecretBackend": { + "type": "object", + "properties": { + "backend-type": { + "type": "string" + }, + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "name": { + "type": "string" + }, + "token-rotate-interval": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "name", + "backend-type", + "config" + ] + }, + "SecretBackendResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "id": { + "type": "string" + }, + "message": { + "type": "string" + }, + "num-secrets": { + "type": "integer" + }, + "result": { + "$ref": "#/definitions/SecretBackend" + }, + "status": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "result", + "id", + "num-secrets", + "status" + ] + }, + "SetModelDefaults": { + "type": "object", + "properties": { + "config": { + "type": "array", + "items": { + "$ref": "#/definitions/ModelDefaultValues" + } + } + }, + "additionalProperties": false, + "required": [ + "config" + ] + }, + "StringResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "result" + ] + }, + "StringResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/StringResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "SupportedFeature": { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "name": { + "type": "string" + }, + "version": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "description" + ] + }, + "UnsetModelDefaults": { + "type": "object", + "properties": { + "keys": { + "type": "array", + "items": { + "$ref": "#/definitions/ModelUnsetKeys" + } + } + }, + "additionalProperties": false, + "required": [ + "keys" + ] + }, + "UserModel": { + "type": "object", + "properties": { + "last-connection": { + "type": "string", + "format": "date-time" + }, + "model": { + "$ref": "#/definitions/Model" + } + }, + "additionalProperties": false, + "required": [ + "model", + "last-connection" + ] + }, + "UserModelList": { + "type": "object", + "properties": { + "user-models": { + "type": "array", + "items": { + "$ref": "#/definitions/UserModel" + } + } + }, + "additionalProperties": false, + "required": [ + "user-models" + ] + } + } + } + }, + { + "Name": "ModelUpgrader", + "Description": "ModelUpgraderAPI implements the model upgrader interface and is\nthe concrete implementation of the api end point.", + "Version": 1, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "controller-user" + ], + "Schema": { + "type": "object", + "properties": { + "AbortModelUpgrade": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ModelParam" + } + }, + "description": "AbortModelUpgrade aborts and archives the model upgrade\nsynchronisation record, if any." + }, + "UpgradeModel": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/UpgradeModelParams" + }, + "Result": { + "$ref": "#/definitions/UpgradeModelResult" + } + }, + "description": "UpgradeModel upgrades a model." + } + }, + "definitions": { + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ModelParam": { + "type": "object", + "properties": { + "model-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "model-tag" + ] + }, + "Number": { + "type": "object", + "properties": { + "Build": { + "type": "integer" + }, + "Major": { + "type": "integer" + }, + "Minor": { + "type": "integer" + }, + "Patch": { + "type": "integer" + }, + "Tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "Major", + "Minor", + "Tag", + "Patch", + "Build" + ] + }, + "UpgradeModelParams": { + "type": "object", + "properties": { + "agent-stream": { + "type": "string" + }, + "dry-run": { + "type": "boolean" + }, + "ignore-agent-versions": { + "type": "boolean" + }, + "model-tag": { + "type": "string" + }, + "target-version": { + "$ref": "#/definitions/Number" + } + }, + "additionalProperties": false, + "required": [ + "model-tag", + "target-version" + ] + }, + "UpgradeModelResult": { + "type": "object", + "properties": { + "chosen-version": { + "$ref": "#/definitions/Number" + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "chosen-version" + ] + } + } + } + }, + { + "Name": "Payloads", + "Description": "API serves payload-specific API methods.", + "Version": 1, + "AvailableTo": [ + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "List": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/PayloadListArgs" + }, + "Result": { + "$ref": "#/definitions/PayloadListResults" + } + }, + "description": "List builds the list of payloads being tracked for\nthe given unit and IDs. If no IDs are provided then all tracked\npayloads for the unit are returned." + } + }, + "definitions": { + "Payload": { + "type": "object", + "properties": { + "class": { + "type": "string" + }, + "id": { + "type": "string" + }, + "labels": { + "type": "array", + "items": { + "type": "string" + } + }, + "machine": { + "type": "string" + }, + "status": { + "type": "string" + }, + "type": { + "type": "string" + }, + "unit": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "class", + "type", + "id", + "status", + "labels", + "unit", + "machine" + ] + }, + "PayloadListArgs": { + "type": "object", + "properties": { + "patterns": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "patterns" + ] + }, + "PayloadListResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/Payload" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + } + } + } + }, + { + "Name": "Pinger", + "Description": "pinger describes a resource that can be pinged and stopped.", + "Version": 1, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "controller-user", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "Ping": { + "type": "object" + }, + "Stop": { + "type": "object" + } + } + } + }, + { + "Name": "Resources", + "Description": "API is the public API facade for resources.", + "Version": 3, + "AvailableTo": [ + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "AddPendingResources": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/AddPendingResourcesArgsV2" + }, + "Result": { + "$ref": "#/definitions/AddPendingResourcesResult" + } + }, + "description": "AddPendingResources adds the provided resources (info) to the Juju\nmodel in a pending state, meaning they are not available until\nresolved. Handles CharmHub and Local charms." + }, + "ListResources": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ListResourcesArgs" + }, + "Result": { + "$ref": "#/definitions/ResourcesResults" + } + }, + "description": "ListResources returns the list of resources for the given application." + } + }, + "definitions": { + "AddPendingResourcesArgsV2": { + "type": "object", + "properties": { + "Entity": { + "$ref": "#/definitions/Entity" + }, + "charm-origin": { + "$ref": "#/definitions/CharmOrigin" + }, + "macaroon": { + "$ref": "#/definitions/Macaroon" + }, + "resources": { + "type": "array", + "items": { + "$ref": "#/definitions/CharmResource" + } + }, + "tag": { + "type": "string" + }, + "url": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag", + "Entity", + "url", + "charm-origin", + "macaroon", + "resources" + ] + }, + "AddPendingResourcesResult": { + "type": "object", + "properties": { + "ErrorResult": { + "$ref": "#/definitions/ErrorResult" + }, + "error": { + "$ref": "#/definitions/Error" + }, + "pending-ids": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "ErrorResult", + "pending-ids" + ] + }, + "Base": { + "type": "object", + "properties": { + "channel": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "channel" + ] + }, + "CharmOrigin": { + "type": "object", + "properties": { + "architecture": { + "type": "string" + }, + "base": { + "$ref": "#/definitions/Base" + }, + "branch": { + "type": "string" + }, + "hash": { + "type": "string" + }, + "id": { + "type": "string" + }, + "instance-key": { + "type": "string" + }, + "revision": { + "type": "integer" + }, + "risk": { + "type": "string" + }, + "source": { + "type": "string" + }, + "track": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "source", + "type", + "id" + ] + }, + "CharmResource": { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "fingerprint": { + "type": "array", + "items": { + "type": "integer" + } + }, + "name": { + "type": "string" + }, + "origin": { + "type": "string" + }, + "path": { + "type": "string" + }, + "revision": { + "type": "integer" + }, + "size": { + "type": "integer" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "type", + "path", + "origin", + "revision", + "fingerprint", + "size" + ] + }, + "Entity": { + "type": "object", + "properties": { + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ListResourcesArgs": { + "type": "object", + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + } + }, + "additionalProperties": false, + "required": [ + "entities" + ] + }, + "Macaroon": { + "type": "object", + "additionalProperties": false + }, + "Resource": { + "type": "object", + "properties": { + "CharmResource": { + "$ref": "#/definitions/CharmResource" + }, + "application": { + "type": "string" + }, + "description": { + "type": "string" + }, + "fingerprint": { + "type": "array", + "items": { + "type": "integer" + } + }, + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "origin": { + "type": "string" + }, + "path": { + "type": "string" + }, + "pending-id": { + "type": "string" + }, + "revision": { + "type": "integer" + }, + "size": { + "type": "integer" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "type": { + "type": "string" + }, + "username": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "type", + "path", + "origin", + "revision", + "fingerprint", + "size", + "CharmResource", + "id", + "pending-id", + "application", + "username", + "timestamp" + ] + }, + "ResourcesResult": { + "type": "object", + "properties": { + "ErrorResult": { + "$ref": "#/definitions/ErrorResult" + }, + "charm-store-resources": { + "type": "array", + "items": { + "$ref": "#/definitions/CharmResource" + } + }, + "error": { + "$ref": "#/definitions/Error" + }, + "resources": { + "type": "array", + "items": { + "$ref": "#/definitions/Resource" + } + }, + "unit-resources": { + "type": "array", + "items": { + "$ref": "#/definitions/UnitResources" + } + } + }, + "additionalProperties": false, + "required": [ + "ErrorResult", + "resources", + "charm-store-resources", + "unit-resources" + ] + }, + "ResourcesResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ResourcesResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "UnitResources": { + "type": "object", + "properties": { + "Entity": { + "$ref": "#/definitions/Entity" + }, + "download-progress": { + "type": "object", + "patternProperties": { + ".*": { + "type": "integer" + } + } + }, + "resources": { + "type": "array", + "items": { + "$ref": "#/definitions/Resource" + } + }, + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag", + "Entity", + "resources", + "download-progress" + ] + } + } + } + }, + { + "Name": "SSHClient", + "Description": "Facade implements the API required by the sshclient worker.", + "Version": 4, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "AllAddresses": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/SSHAddressesResults" + } + }, + "description": "AllAddresses reports all addresses that might have SSH listening for each\nentity in args. The result is sorted with public addresses first.\nMachines and units are supported as entity types." + }, + "ModelCredentialForSSH": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/CloudSpecResult" + } + }, + "description": "ModelCredentialForSSH returns a cloud spec for ssh purpose.\nThis facade call is only used for k8s model." + }, + "PrivateAddress": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/SSHAddressResults" + } + }, + "description": "PrivateAddress reports the preferred private network address for one or\nmore entities. Machines and units are supported." + }, + "Proxy": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/SSHProxyResult" + } + }, + "description": "Proxy returns whether SSH connections should be proxied through the\ncontroller hosts for the model associated with the API connection." + }, + "PublicAddress": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/SSHAddressResults" + } + }, + "description": "PublicAddress reports the preferred public network address for one\nor more entities. Machines and units are supported." + }, + "PublicKeys": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/SSHPublicKeysResults" + } + }, + "description": "PublicKeys returns the public SSH hosts for one or more\nentities. Machines and units are supported." + } + }, + "definitions": { + "CloudCredential": { + "type": "object", + "properties": { + "attrs": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "auth-type": { + "type": "string" + }, + "redacted": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "auth-type" + ] + }, + "CloudSpec": { + "type": "object", + "properties": { + "cacertificates": { + "type": "array", + "items": { + "type": "string" + } + }, + "credential": { + "$ref": "#/definitions/CloudCredential" + }, + "endpoint": { + "type": "string" + }, + "identity-endpoint": { + "type": "string" + }, + "is-controller-cloud": { + "type": "boolean" + }, + "name": { + "type": "string" + }, + "region": { + "type": "string" + }, + "skip-tls-verify": { + "type": "boolean" + }, + "storage-endpoint": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "type", + "name" + ] + }, + "CloudSpecResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "$ref": "#/definitions/CloudSpec" + } + }, + "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": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "SSHAddressResult": { + "type": "object", + "properties": { + "address": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "SSHAddressResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/SSHAddressResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "SSHAddressesResult": { + "type": "object", + "properties": { + "addresses": { + "type": "array", + "items": { + "type": "string" + } + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "addresses" + ] + }, + "SSHAddressesResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/SSHAddressesResult" + } + } + }, + "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" + }, + "public-keys": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "SSHPublicKeysResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/SSHPublicKeysResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + } + } + } + }, + { + "Name": "SecretBackends", + "Description": "SecretBackendsAPI is the server implementation for the SecretBackends facade.", + "Version": 1, + "AvailableTo": [ + "controller-user" + ], + "Schema": { + "type": "object", + "properties": { + "AddSecretBackends": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/AddSecretBackendArgs" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "AddSecretBackends adds new secret backends." + }, + "ListSecretBackends": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ListSecretBackendsArgs" + }, + "Result": { + "$ref": "#/definitions/ListSecretBackendsResults" + } + }, + "description": "ListSecretBackends lists available secret backends." + }, + "RemoveSecretBackends": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/RemoveSecretBackendArgs" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "RemoveSecretBackends removes secret backends." + }, + "UpdateSecretBackends": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/UpdateSecretBackendArgs" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "UpdateSecretBackends updates secret backends." + } + }, + "definitions": { + "AddSecretBackendArg": { + "type": "object", + "properties": { + "SecretBackend": { + "$ref": "#/definitions/SecretBackend" + }, + "backend-type": { + "type": "string" + }, + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "token-rotate-interval": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "name", + "backend-type", + "config", + "SecretBackend" + ] + }, + "AddSecretBackendArgs": { + "type": "object", + "properties": { + "args": { + "type": "array", + "items": { + "$ref": "#/definitions/AddSecretBackendArg" + } + } + }, + "additionalProperties": false, + "required": [ + "args" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ErrorResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "ListSecretBackendsArgs": { + "type": "object", + "properties": { + "names": { + "type": "array", + "items": { + "type": "string" + } + }, + "reveal": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "names", + "reveal" + ] + }, + "ListSecretBackendsResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/SecretBackendResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "RemoveSecretBackendArg": { + "type": "object", + "properties": { + "force": { + "type": "boolean" + }, + "name": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name" + ] + }, + "RemoveSecretBackendArgs": { + "type": "object", + "properties": { + "args": { + "type": "array", + "items": { + "$ref": "#/definitions/RemoveSecretBackendArg" + } + } + }, + "additionalProperties": false, + "required": [ + "args" + ] + }, + "SecretBackend": { + "type": "object", + "properties": { + "backend-type": { + "type": "string" + }, + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "name": { + "type": "string" + }, + "token-rotate-interval": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "name", + "backend-type", + "config" + ] + }, + "SecretBackendResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "id": { + "type": "string" + }, + "message": { + "type": "string" + }, + "num-secrets": { + "type": "integer" + }, + "result": { + "$ref": "#/definitions/SecretBackend" + }, + "status": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "result", + "id", + "num-secrets", + "status" + ] + }, + "UpdateSecretBackendArg": { + "type": "object", + "properties": { + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "force": { + "type": "boolean" + }, + "name": { + "type": "string" + }, + "name-change": { + "type": "string" + }, + "reset": { + "type": "array", + "items": { + "type": "string" + } + }, + "token-rotate-interval": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "name", + "token-rotate-interval", + "config", + "reset" + ] + }, + "UpdateSecretBackendArgs": { + "type": "object", + "properties": { + "args": { + "type": "array", + "items": { + "$ref": "#/definitions/UpdateSecretBackendArg" + } + } + }, + "additionalProperties": false, + "required": [ + "args" + ] + } + } + } + }, + { + "Name": "Secrets", + "Description": "SecretsAPI is the backend for the Secrets facade.", + "Version": 1, + "AvailableTo": [ + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "ListSecrets": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ListSecretsArgs" + }, + "Result": { + "$ref": "#/definitions/ListSecretResults" + } + }, + "description": "ListSecrets lists available secrets." + } + }, + "definitions": { + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ListSecretResult": { + "type": "object", + "properties": { + "create-time": { + "type": "string", + "format": "date-time" + }, + "description": { + "type": "string" + }, + "label": { + "type": "string" + }, + "latest-expire-time": { + "type": "string", + "format": "date-time" + }, + "latest-revision": { + "type": "integer" + }, + "next-rotate-time": { + "type": "string", + "format": "date-time" + }, + "owner-tag": { + "type": "string" + }, + "revisions": { + "type": "array", + "items": { + "$ref": "#/definitions/SecretRevision" + } + }, + "rotate-policy": { + "type": "string" + }, + "update-time": { + "type": "string", + "format": "date-time" + }, + "uri": { + "type": "string" + }, + "value": { + "$ref": "#/definitions/SecretValueResult" + }, + "version": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "uri", + "version", + "owner-tag", + "latest-revision", + "create-time", + "update-time", + "revisions" + ] + }, + "ListSecretResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ListSecretResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "ListSecretsArgs": { + "type": "object", + "properties": { + "filter": { + "$ref": "#/definitions/SecretsFilter" + }, + "show-secrets": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "show-secrets", + "filter" + ] + }, + "SecretRevision": { + "type": "object", + "properties": { + "backend-name": { + "type": "string" + }, + "create-time": { + "type": "string", + "format": "date-time" + }, + "expire-time": { + "type": "string", + "format": "date-time" + }, + "revision": { + "type": "integer" + }, + "update-time": { + "type": "string", + "format": "date-time" + }, + "value-ref": { + "$ref": "#/definitions/SecretValueRef" + } + }, + "additionalProperties": false, + "required": [ + "revision" + ] + }, + "SecretValueRef": { + "type": "object", + "properties": { + "backend-id": { + "type": "string" + }, + "revision-id": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "backend-id", + "revision-id" + ] + }, + "SecretValueResult": { + "type": "object", + "properties": { + "data": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "SecretsFilter": { + "type": "object", + "properties": { + "owner-tag": { + "type": "string" + }, + "revision": { + "type": "integer" + }, + "uri": { + "type": "string" + } + }, + "additionalProperties": false + } + } + } + }, + { + "Name": "Spaces", + "Description": "API provides the spaces API facade for version 6.", + "Version": 6, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "CreateSpaces": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/CreateSpacesParams" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "CreateSpaces creates a new Juju network space, associating the\nspecified subnets with it (optional; can be empty)." + }, + "ListSpaces": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/ListSpacesResults" + } + }, + "description": "ListSpaces lists all the available spaces and their associated subnets." + }, + "MoveSubnets": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/MoveSubnetsParams" + }, + "Result": { + "$ref": "#/definitions/MoveSubnetsResults" + } + }, + "description": "MoveSubnets ensures that the input subnets are in the input space." + }, + "ReloadSpaces": { + "type": "object", + "description": "ReloadSpaces refreshes spaces from substrate" + }, + "RemoveSpace": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/RemoveSpaceParams" + }, + "Result": { + "$ref": "#/definitions/RemoveSpaceResults" + } + }, + "description": "RemoveSpace removes a space.\nReturns SpaceResults if entities/settings are found which makes the deletion not possible." + }, + "RenameSpace": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/RenameSpacesParams" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "RenameSpace renames a space." + }, + "ShowSpace": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ShowSpaceResults" + } + }, + "description": "ShowSpace shows the spaces for a set of given entities." + } + }, + "definitions": { + "CreateSpaceParams": { + "type": "object", + "properties": { + "cidrs": { + "type": "array", + "items": { + "type": "string" + } + }, + "provider-id": { + "type": "string" + }, + "public": { + "type": "boolean" + }, + "space-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "cidrs", + "space-tag", + "public" + ] + }, + "CreateSpacesParams": { + "type": "object", + "properties": { + "spaces": { + "type": "array", + "items": { + "$ref": "#/definitions/CreateSpaceParams" + } + } + }, + "additionalProperties": false, + "required": [ + "spaces" + ] + }, + "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": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ErrorResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "ListSpacesResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/Space" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "MoveSubnetsParam": { + "type": "object", + "properties": { + "force": { + "type": "boolean" + }, + "space-tag": { + "type": "string" + }, + "subnets": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "subnets", + "space-tag", + "force" + ] + }, + "MoveSubnetsParams": { + "type": "object", + "properties": { + "args": { + "type": "array", + "items": { + "$ref": "#/definitions/MoveSubnetsParam" + } + } + }, + "additionalProperties": false, + "required": [ + "args" + ] + }, + "MoveSubnetsResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "moved-subnets": { + "type": "array", + "items": { + "$ref": "#/definitions/MovedSubnet" + } + }, + "new-space": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "new-space" + ] + }, + "MoveSubnetsResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/MoveSubnetsResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "MovedSubnet": { + "type": "object", + "properties": { + "cidr": { + "type": "string" + }, + "old-space": { + "type": "string" + }, + "subnet": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "subnet", + "old-space", + "cidr" + ] + }, + "RemoveSpaceParam": { + "type": "object", + "properties": { + "dry-run": { + "type": "boolean" + }, + "force": { + "type": "boolean" + }, + "space": { + "$ref": "#/definitions/Entity" + } + }, + "additionalProperties": false, + "required": [ + "space" + ] + }, + "RemoveSpaceParams": { + "type": "object", + "properties": { + "space-param": { + "type": "array", + "items": { + "$ref": "#/definitions/RemoveSpaceParam" + } + } + }, + "additionalProperties": false, + "required": [ + "space-param" + ] + }, + "RemoveSpaceResult": { + "type": "object", + "properties": { + "bindings": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + }, + "constraints": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + }, + "controller-settings": { + "type": "array", + "items": { + "type": "string" + } + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "RemoveSpaceResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/RemoveSpaceResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "RenameSpaceParams": { + "type": "object", + "properties": { + "from-space-tag": { + "type": "string" + }, + "to-space-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "from-space-tag", + "to-space-tag" + ] + }, + "RenameSpacesParams": { + "type": "object", + "properties": { + "changes": { + "type": "array", + "items": { + "$ref": "#/definitions/RenameSpaceParams" + } + } + }, + "additionalProperties": false, + "required": [ + "changes" + ] + }, + "ShowSpaceResult": { + "type": "object", + "properties": { + "applications": { + "type": "array", + "items": { + "type": "string" + } + }, + "error": { + "$ref": "#/definitions/Error" + }, + "machine-count": { + "type": "integer" + }, + "space": { + "$ref": "#/definitions/Space" + } + }, + "additionalProperties": false, + "required": [ + "space", + "applications", + "machine-count" + ] + }, + "ShowSpaceResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ShowSpaceResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "Space": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "subnets": { + "type": "array", + "items": { + "$ref": "#/definitions/Subnet" + } + } + }, + "additionalProperties": false, + "required": [ + "id", + "name", + "subnets" + ] + }, + "Subnet": { + "type": "object", + "properties": { + "cidr": { + "type": "string" + }, + "life": { + "type": "string" + }, + "provider-id": { + "type": "string" + }, + "provider-network-id": { + "type": "string" + }, + "provider-space-id": { + "type": "string" + }, + "space-tag": { + "type": "string" + }, + "status": { + "type": "string" + }, + "vlan-tag": { + "type": "integer" + }, + "zones": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "cidr", + "vlan-tag", + "life", + "space-tag", + "zones" + ] + } + } + } + }, + { + "Name": "Storage", + "Description": "StorageAPI implements the latest version (v6) of the Storage API.", + "Version": 6, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "AddToUnit": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/StoragesAddParams" + }, + "Result": { + "$ref": "#/definitions/AddStorageResults" + } + }, + "description": "AddToUnit validates and creates additional storage instances for units.\nA \"CHANGE\" block can block this operation." + }, + "Attach": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/StorageAttachmentIds" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "Attach attaches existing storage instances to units.\nA \"CHANGE\" block can block this operation." + }, + "CreatePool": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/StoragePoolArgs" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "CreatePool creates a new pool with specified parameters." + }, + "DetachStorage": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/StorageDetachmentParams" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "DetachStorage sets the specified storage attachments to Dying, unless they are\nalready Dying or Dead. Any associated, persistent storage will remain\nalive. This call can be forced." + }, + "Import": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/BulkImportStorageParams" + }, + "Result": { + "$ref": "#/definitions/ImportStorageResults" + } + }, + "description": "Import imports existing storage into the model.\nA \"CHANGE\" block can block this operation." + }, + "ListFilesystems": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/FilesystemFilters" + }, + "Result": { + "$ref": "#/definitions/FilesystemDetailsListResults" + } + }, + "description": "ListFilesystems returns a list of filesystems in the environment matching\nthe provided filter. Each result describes a filesystem in detail, including\nthe filesystem's attachments." + }, + "ListPools": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/StoragePoolFilters" + }, + "Result": { + "$ref": "#/definitions/StoragePoolsResults" + } + }, + "description": "ListPools returns a list of pools.\nIf filter is provided, returned list only contains pools that match\nthe filter.\nPools can be filtered on names and provider types.\nIf both names and types are provided as filter,\npools that match either are returned.\nThis method lists union of pools and environment provider types.\nIf no filter is provided, all pools are returned." + }, + "ListStorageDetails": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/StorageFilters" + }, + "Result": { + "$ref": "#/definitions/StorageDetailsListResults" + } + }, + "description": "ListStorageDetails returns storage matching a filter." + }, + "ListVolumes": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/VolumeFilters" + }, + "Result": { + "$ref": "#/definitions/VolumeDetailsListResults" + } + }, + "description": "ListVolumes lists volumes with the given filters. Each filter produces\nan independent list of volumes, or an error if the filter is invalid\nor the volumes could not be listed." + }, + "Remove": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/RemoveStorage" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "Remove sets the specified storage entities to Dying, unless they are\nalready Dying or Dead, such that the storage will eventually be removed\nfrom the model. If the arguments specify that the storage should be\ndestroyed, then the associated cloud storage will be destroyed first;\notherwise it will only be released from Juju's control." + }, + "RemovePool": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/StoragePoolDeleteArgs" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "RemovePool deletes the named pool" + }, + "StorageDetails": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/StorageDetailsResults" + } + }, + "description": "StorageDetails retrieves and returns detailed information about desired\nstorage identified by supplied tags. If specified storage cannot be\nretrieved, individual error is returned instead of storage information." + }, + "UpdatePool": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/StoragePoolArgs" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "UpdatePool deletes the named pool" + } + }, + "definitions": { + "AddStorageDetails": { + "type": "object", + "properties": { + "storage-tags": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "storage-tags" + ] + }, + "AddStorageResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "$ref": "#/definitions/AddStorageDetails" + } + }, + "additionalProperties": false + }, + "AddStorageResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/AddStorageResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "BulkImportStorageParams": { + "type": "object", + "properties": { + "storage": { + "type": "array", + "items": { + "$ref": "#/definitions/ImportStorageParams" + } + } + }, + "additionalProperties": false, + "required": [ + "storage" + ] + }, + "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" + ] + }, + "EntityStatus": { + "type": "object", + "properties": { + "data": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "info": { + "type": "string" + }, + "since": { + "type": "string", + "format": "date-time" + }, + "status": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "status", + "info", + "since" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ErrorResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "FilesystemAttachmentDetails": { + "type": "object", + "properties": { + "FilesystemAttachmentInfo": { + "$ref": "#/definitions/FilesystemAttachmentInfo" + }, + "life": { + "type": "string" + }, + "mount-point": { + "type": "string" + }, + "read-only": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "FilesystemAttachmentInfo" + ] + }, + "FilesystemAttachmentInfo": { + "type": "object", + "properties": { + "mount-point": { + "type": "string" + }, + "read-only": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "FilesystemDetails": { + "type": "object", + "properties": { + "filesystem-tag": { + "type": "string" + }, + "info": { + "$ref": "#/definitions/FilesystemInfo" + }, + "life": { + "type": "string" + }, + "machine-attachments": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/FilesystemAttachmentDetails" + } + } + }, + "status": { + "$ref": "#/definitions/EntityStatus" + }, + "storage": { + "$ref": "#/definitions/StorageDetails" + }, + "unit-attachments": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/FilesystemAttachmentDetails" + } + } + }, + "volume-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "filesystem-tag", + "info", + "status" + ] + }, + "FilesystemDetailsListResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "type": "array", + "items": { + "$ref": "#/definitions/FilesystemDetails" + } + } + }, + "additionalProperties": false + }, + "FilesystemDetailsListResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/FilesystemDetailsListResult" + } + } + }, + "additionalProperties": false + }, + "FilesystemFilter": { + "type": "object", + "properties": { + "machines": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "FilesystemFilters": { + "type": "object", + "properties": { + "filters": { + "type": "array", + "items": { + "$ref": "#/definitions/FilesystemFilter" + } + } + }, + "additionalProperties": false + }, + "FilesystemInfo": { + "type": "object", + "properties": { + "filesystem-id": { + "type": "string" + }, + "pool": { + "type": "string" + }, + "size": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "filesystem-id", + "pool", + "size" + ] + }, + "ImportStorageDetails": { + "type": "object", + "properties": { + "storage-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "storage-tag" + ] + }, + "ImportStorageParams": { + "type": "object", + "properties": { + "kind": { + "type": "integer" + }, + "pool": { + "type": "string" + }, + "provider-id": { + "type": "string" + }, + "storage-name": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "kind", + "pool", + "provider-id", + "storage-name" + ] + }, + "ImportStorageResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "$ref": "#/definitions/ImportStorageDetails" + } + }, + "additionalProperties": false + }, + "ImportStorageResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ImportStorageResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "RemoveStorage": { + "type": "object", + "properties": { + "storage": { + "type": "array", + "items": { + "$ref": "#/definitions/RemoveStorageInstance" + } + } + }, + "additionalProperties": false, + "required": [ + "storage" + ] + }, + "RemoveStorageInstance": { + "type": "object", + "properties": { + "destroy-attachments": { + "type": "boolean" + }, + "destroy-storage": { + "type": "boolean" + }, + "force": { + "type": "boolean" + }, + "max-wait": { + "type": "integer" + }, + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag" + ] + }, + "StorageAddParams": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "storage": { + "$ref": "#/definitions/StorageConstraints" + }, + "unit": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "unit", + "name", + "storage" + ] + }, + "StorageAttachmentDetails": { + "type": "object", + "properties": { + "life": { + "type": "string" + }, + "location": { + "type": "string" + }, + "machine-tag": { + "type": "string" + }, + "storage-tag": { + "type": "string" + }, + "unit-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "storage-tag", + "unit-tag", + "machine-tag" + ] + }, + "StorageAttachmentId": { + "type": "object", + "properties": { + "storage-tag": { + "type": "string" + }, + "unit-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "storage-tag", + "unit-tag" + ] + }, + "StorageAttachmentIds": { + "type": "object", + "properties": { + "ids": { + "type": "array", + "items": { + "$ref": "#/definitions/StorageAttachmentId" + } + } + }, + "additionalProperties": false, + "required": [ + "ids" + ] + }, + "StorageConstraints": { + "type": "object", + "properties": { + "count": { + "type": "integer" + }, + "pool": { + "type": "string" + }, + "size": { + "type": "integer" + } + }, + "additionalProperties": false + }, + "StorageDetachmentParams": { + "type": "object", + "properties": { + "force": { + "type": "boolean" + }, + "ids": { + "$ref": "#/definitions/StorageAttachmentIds" + }, + "max-wait": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "ids" + ] + }, + "StorageDetails": { + "type": "object", + "properties": { + "attachments": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/StorageAttachmentDetails" + } + } + }, + "kind": { + "type": "integer" + }, + "life": { + "type": "string" + }, + "owner-tag": { + "type": "string" + }, + "persistent": { + "type": "boolean" + }, + "status": { + "$ref": "#/definitions/EntityStatus" + }, + "storage-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "storage-tag", + "owner-tag", + "kind", + "status", + "persistent" + ] + }, + "StorageDetailsListResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "type": "array", + "items": { + "$ref": "#/definitions/StorageDetails" + } + } + }, + "additionalProperties": false + }, + "StorageDetailsListResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/StorageDetailsListResult" + } + } + }, + "additionalProperties": false + }, + "StorageDetailsResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "$ref": "#/definitions/StorageDetails" + } + }, + "additionalProperties": false + }, + "StorageDetailsResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/StorageDetailsResult" + } + } + }, + "additionalProperties": false + }, + "StorageFilter": { + "type": "object", + "additionalProperties": false + }, + "StorageFilters": { + "type": "object", + "properties": { + "filters": { + "type": "array", + "items": { + "$ref": "#/definitions/StorageFilter" + } + } + }, + "additionalProperties": false + }, + "StoragePool": { + "type": "object", + "properties": { + "attrs": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "name": { + "type": "string" + }, + "provider": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "provider", + "attrs" + ] + }, + "StoragePoolArgs": { + "type": "object", + "properties": { + "pools": { + "type": "array", + "items": { + "$ref": "#/definitions/StoragePool" + } + } + }, + "additionalProperties": false, + "required": [ + "pools" + ] + }, + "StoragePoolDeleteArg": { + "type": "object", + "properties": { + "name": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name" + ] + }, + "StoragePoolDeleteArgs": { + "type": "object", + "properties": { + "pools": { + "type": "array", + "items": { + "$ref": "#/definitions/StoragePoolDeleteArg" + } + } + }, + "additionalProperties": false, + "required": [ + "pools" + ] + }, + "StoragePoolFilter": { + "type": "object", + "properties": { + "names": { + "type": "array", + "items": { + "type": "string" + } + }, + "providers": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "StoragePoolFilters": { + "type": "object", + "properties": { + "filters": { + "type": "array", + "items": { + "$ref": "#/definitions/StoragePoolFilter" + } + } + }, + "additionalProperties": false + }, + "StoragePoolsResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "storage-pools": { + "type": "array", + "items": { + "$ref": "#/definitions/StoragePool" + } + } + }, + "additionalProperties": false + }, + "StoragePoolsResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/StoragePoolsResult" + } + } + }, + "additionalProperties": false + }, + "StoragesAddParams": { + "type": "object", + "properties": { + "storages": { + "type": "array", + "items": { + "$ref": "#/definitions/StorageAddParams" + } + } + }, + "additionalProperties": false, + "required": [ + "storages" + ] + }, + "VolumeAttachmentDetails": { + "type": "object", + "properties": { + "VolumeAttachmentInfo": { + "$ref": "#/definitions/VolumeAttachmentInfo" + }, + "bus-address": { + "type": "string" + }, + "device-link": { + "type": "string" + }, + "device-name": { + "type": "string" + }, + "life": { + "type": "string" + }, + "plan-info": { + "$ref": "#/definitions/VolumeAttachmentPlanInfo" + }, + "read-only": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "VolumeAttachmentInfo" + ] + }, + "VolumeAttachmentInfo": { + "type": "object", + "properties": { + "bus-address": { + "type": "string" + }, + "device-link": { + "type": "string" + }, + "device-name": { + "type": "string" + }, + "plan-info": { + "$ref": "#/definitions/VolumeAttachmentPlanInfo" + }, + "read-only": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "VolumeAttachmentPlanInfo": { + "type": "object", + "properties": { + "device-attributes": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "device-type": { + "type": "string" + } + }, + "additionalProperties": false + }, + "VolumeDetails": { + "type": "object", + "properties": { + "info": { + "$ref": "#/definitions/VolumeInfo" + }, + "life": { + "type": "string" + }, + "machine-attachments": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/VolumeAttachmentDetails" + } + } + }, + "status": { + "$ref": "#/definitions/EntityStatus" + }, + "storage": { + "$ref": "#/definitions/StorageDetails" + }, + "unit-attachments": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/VolumeAttachmentDetails" + } + } + }, + "volume-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "volume-tag", + "info", + "status" + ] + }, + "VolumeDetailsListResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "type": "array", + "items": { + "$ref": "#/definitions/VolumeDetails" + } + } + }, + "additionalProperties": false + }, + "VolumeDetailsListResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/VolumeDetailsListResult" + } + } + }, + "additionalProperties": false + }, + "VolumeFilter": { + "type": "object", + "properties": { + "machines": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "VolumeFilters": { + "type": "object", + "properties": { + "filters": { + "type": "array", + "items": { + "$ref": "#/definitions/VolumeFilter" + } + } + }, + "additionalProperties": false + }, + "VolumeInfo": { + "type": "object", + "properties": { + "hardware-id": { + "type": "string" + }, + "persistent": { + "type": "boolean" + }, + "pool": { + "type": "string" + }, + "size": { + "type": "integer" + }, + "volume-id": { + "type": "string" + }, + "wwn": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "volume-id", + "size", + "persistent" + ] + } + } + } + }, + { + "Name": "Subnets", + "Description": "API provides the subnets API facade for version 5.", + "Version": 5, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "AllZones": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/ZoneResults" + } + }, + "description": "AllZones returns all availability zones known to Juju. If a\nzone is unusable, unavailable, or deprecated the Available\nfield will be false." + }, + "ListSubnets": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/SubnetsFilters" + }, + "Result": { + "$ref": "#/definitions/ListSubnetsResults" + } + }, + "description": "ListSubnets returns the matching subnets after applying\noptional filters." + }, + "SubnetsByCIDR": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/CIDRParams" + }, + "Result": { + "$ref": "#/definitions/SubnetsResults" + } + }, + "description": "SubnetsByCIDR returns the collection of subnets matching each CIDR in the input." + } + }, + "definitions": { + "CIDRParams": { + "type": "object", + "properties": { + "cidrs": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "cidrs" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ListSubnetsResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/Subnet" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "Subnet": { + "type": "object", + "properties": { + "cidr": { + "type": "string" + }, + "life": { + "type": "string" + }, + "provider-id": { + "type": "string" + }, + "provider-network-id": { + "type": "string" + }, + "provider-space-id": { + "type": "string" + }, + "space-tag": { + "type": "string" + }, + "status": { + "type": "string" + }, + "vlan-tag": { + "type": "integer" + }, + "zones": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "cidr", + "vlan-tag", + "life", + "space-tag", + "zones" + ] + }, + "SubnetV2": { + "type": "object", + "properties": { + "Subnet": { + "$ref": "#/definitions/Subnet" + }, + "cidr": { + "type": "string" + }, + "id": { + "type": "string" + }, + "life": { + "type": "string" + }, + "provider-id": { + "type": "string" + }, + "provider-network-id": { + "type": "string" + }, + "provider-space-id": { + "type": "string" + }, + "space-tag": { + "type": "string" + }, + "status": { + "type": "string" + }, + "vlan-tag": { + "type": "integer" + }, + "zones": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "cidr", + "vlan-tag", + "life", + "space-tag", + "zones", + "Subnet" + ] + }, + "SubnetsFilters": { + "type": "object", + "properties": { + "space-tag": { + "type": "string" + }, + "zone": { + "type": "string" + } + }, + "additionalProperties": false + }, + "SubnetsResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "subnets": { + "type": "array", + "items": { + "$ref": "#/definitions/SubnetV2" + } + } + }, + "additionalProperties": false + }, + "SubnetsResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/SubnetsResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "ZoneResult": { + "type": "object", + "properties": { + "available": { + "type": "boolean" + }, + "error": { + "$ref": "#/definitions/Error" + }, + "name": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "available" + ] + }, + "ZoneResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ZoneResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + } + } + } + }, + { + "Name": "UserManager", + "Description": "UserManagerAPI implements the user manager interface and is the concrete\nimplementation of the api end point.", + "Version": 3, + "AvailableTo": [ + "controller-user" + ], + "Schema": { + "type": "object", + "properties": { + "AddUser": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/AddUsers" + }, + "Result": { + "$ref": "#/definitions/AddUserResults" + } + }, + "description": "AddUser adds a user with a username, and either a password or\na randomly generated secret key which will be returned." + }, + "DisableUser": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "DisableUser disables one or more users. If the user is already disabled,\nthe action is considered a success." + }, + "EnableUser": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "EnableUser enables one or more users. If the user is already enabled,\nthe action is considered a success." + }, + "ModelUserInfo": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ModelUserInfoResults" + } + }, + "description": "ModelUserInfo returns information on all users in the model." + }, + "RemoveUser": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "RemoveUser permanently removes a user from the current controller for each\nentity provided. While the user is permanently removed we keep it's\ninformation around for auditing purposes.\nTODO(redir): Add information about getting deleted user information when we\nadd that capability." + }, + "ResetPassword": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/AddUserResults" + } + }, + "description": "ResetPassword resets password for supplied users by\ninvalidating current passwords (if any) and generating\nnew random secret keys which will be returned.\nUsers cannot reset their own password." + }, + "SetPassword": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/EntityPasswords" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "SetPassword changes the stored password for the specified users." + }, + "UserInfo": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/UserInfoRequest" + }, + "Result": { + "$ref": "#/definitions/UserInfoResults" + } + }, + "description": "UserInfo returns information on a user." + } + }, + "definitions": { + "AddUser": { + "type": "object", + "properties": { + "display-name": { + "type": "string" + }, + "password": { + "type": "string" + }, + "username": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "username", + "display-name" + ] + }, + "AddUserResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "secret-key": { + "type": "array", + "items": { + "type": "integer" + } + }, + "tag": { + "type": "string" + } + }, + "additionalProperties": false + }, + "AddUserResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/AddUserResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "AddUsers": { + "type": "object", + "properties": { + "users": { + "type": "array", + "items": { + "$ref": "#/definitions/AddUser" + } + } + }, + "additionalProperties": false, + "required": [ + "users" + ] + }, + "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" + ] + }, + "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" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ErrorResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "ModelUserInfo": { + "type": "object", + "properties": { + "access": { + "type": "string" + }, + "display-name": { + "type": "string" + }, + "last-connection": { + "type": "string", + "format": "date-time" + }, + "model-tag": { + "type": "string" + }, + "user": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "model-tag", + "user", + "display-name", + "last-connection", + "access" + ] + }, + "ModelUserInfoResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "$ref": "#/definitions/ModelUserInfo" + } + }, + "additionalProperties": false + }, + "ModelUserInfoResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ModelUserInfoResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "UserInfo": { + "type": "object", + "properties": { + "access": { + "type": "string" + }, + "created-by": { + "type": "string" + }, + "date-created": { + "type": "string", + "format": "date-time" + }, + "disabled": { + "type": "boolean" + }, + "display-name": { + "type": "string" + }, + "last-connection": { + "type": "string", + "format": "date-time" + }, + "username": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "username", + "display-name", + "access", + "created-by", + "date-created", + "disabled" + ] + }, + "UserInfoRequest": { + "type": "object", + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + }, + "include-disabled": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "entities", + "include-disabled" + ] + }, + "UserInfoResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "$ref": "#/definitions/UserInfo" + } + }, + "additionalProperties": false + }, + "UserInfoResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/UserInfoResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + } + } + } + } +] \ No newline at end of file diff --git a/juju/client/schemas-juju-3.3.0.json b/juju/client/schemas-juju-3.3.0.json deleted file mode 100644 index e5c201ac..00000000 --- a/juju/client/schemas-juju-3.3.0.json +++ /dev/null @@ -1,53568 +0,0 @@ -[ - { - "Name": "Action", - "Description": "APIv7 provides the Action API facade for version 7.", - "Version": 7, - "AvailableTo": [ - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "Actions": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ActionResults" - } - }, - "description": "Actions takes a list of ActionTags, and returns the full Action for\neach ID." - }, - "ApplicationsCharmsActions": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ApplicationsCharmActionsResults" - } - }, - "description": "ApplicationsCharmsActions returns a slice of charm Actions for a slice of\nservices." - }, - "Cancel": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ActionResults" - } - }, - "description": "Cancel attempts to cancel enqueued Actions from running." - }, - "EnqueueOperation": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Actions" - }, - "Result": { - "$ref": "#/definitions/EnqueuedActions" - } - }, - "description": "EnqueueOperation takes a list of Actions and queues them up to be executed as\nan operation, each action running as a task on the designated ActionReceiver.\nWe return the ID of the overall operation and each individual task." - }, - "ListOperations": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/OperationQueryArgs" - }, - "Result": { - "$ref": "#/definitions/OperationResults" - } - }, - "description": "ListOperations fetches the called actions for specified apps/units." - }, - "Operations": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/OperationResults" - } - }, - "description": "Operations fetches the specified operation ids." - }, - "Run": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RunParams" - }, - "Result": { - "$ref": "#/definitions/EnqueuedActions" - } - }, - "description": "Run the commands specified on the machines identified through the\nlist of machines, units and services." - }, - "RunOnAllMachines": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RunParams" - }, - "Result": { - "$ref": "#/definitions/EnqueuedActions" - } - }, - "description": "RunOnAllMachines attempts to run the specified command on all the machines." - }, - "WatchActionsProgress": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - }, - "description": "WatchActionsProgress creates a watcher that reports on action log messages." - } - }, - "definitions": { - "Action": { - "type": "object", - "properties": { - "execution-group": { - "type": "string" - }, - "name": { - "type": "string" - }, - "parallel": { - "type": "boolean" - }, - "parameters": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "receiver": { - "type": "string" - }, - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "receiver", - "name" - ] - }, - "ActionMessage": { - "type": "object", - "properties": { - "message": { - "type": "string" - }, - "timestamp": { - "type": "string", - "format": "date-time" - } - }, - "additionalProperties": false, - "required": [ - "timestamp", - "message" - ] - }, - "ActionResult": { - "type": "object", - "properties": { - "action": { - "$ref": "#/definitions/Action" - }, - "completed": { - "type": "string", - "format": "date-time" - }, - "enqueued": { - "type": "string", - "format": "date-time" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "log": { - "type": "array", - "items": { - "$ref": "#/definitions/ActionMessage" - } - }, - "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 - }, - "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" - } - } - }, - "additionalProperties": false - }, - "ApplicationCharmActionsResult": { - "type": "object", - "properties": { - "actions": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/ActionSpec" - } - } - }, - "application-tag": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ApplicationsCharmActionsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ApplicationCharmActionsResult" - } - } - }, - "additionalProperties": false - }, - "EnqueuedActions": { - "type": "object", - "properties": { - "actions": { - "type": "array", - "items": { - "$ref": "#/definitions/ActionResult" - } - }, - "operation": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "operation" - ] - }, - "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": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "OperationQueryArgs": { - "type": "object", - "properties": { - "actions": { - "type": "array", - "items": { - "type": "string" - } - }, - "applications": { - "type": "array", - "items": { - "type": "string" - } - }, - "limit": { - "type": "integer" - }, - "machines": { - "type": "array", - "items": { - "type": "string" - } - }, - "offset": { - "type": "integer" - }, - "status": { - "type": "array", - "items": { - "type": "string" - } - }, - "units": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "OperationResult": { - "type": "object", - "properties": { - "actions": { - "type": "array", - "items": { - "$ref": "#/definitions/ActionResult" - } - }, - "completed": { - "type": "string", - "format": "date-time" - }, - "enqueued": { - "type": "string", - "format": "date-time" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "fail": { - "type": "string" - }, - "operation": { - "type": "string" - }, - "started": { - "type": "string", - "format": "date-time" - }, - "status": { - "type": "string" - }, - "summary": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "operation", - "summary" - ] - }, - "OperationResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/OperationResult" - } - }, - "truncated": { - "type": "boolean" - } - }, - "additionalProperties": false - }, - "RunParams": { - "type": "object", - "properties": { - "applications": { - "type": "array", - "items": { - "type": "string" - } - }, - "commands": { - "type": "string" - }, - "execution-group": { - "type": "string" - }, - "machines": { - "type": "array", - "items": { - "type": "string" - } - }, - "parallel": { - "type": "boolean" - }, - "timeout": { - "type": "integer" - }, - "units": { - "type": "array", - "items": { - "type": "string" - } - }, - "workload-context": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "commands", - "timeout" - ] - }, - "StringsWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id" - ] - }, - "StringsWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringsWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - } - } - } - }, - { - "Name": "ActionPruner", - "Description": "API provides access to the action pruner API.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "ModelConfig": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ModelConfigResult" - } - }, - "description": "ModelConfig returns the current model's configuration." - }, - "Prune": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ActionPruneArgs" - } - }, - "description": "Prune endpoint removes action entries until\nonly the ones newer than now - p.MaxHistoryTime remain and\nthe history is smaller than p.MaxHistoryMB." - }, - "WatchForModelConfigChanges": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResult" - } - }, - "description": "WatchForModelConfigChanges returns a NotifyWatcher that observes\nchanges to the model configuration.\nNote that although the NotifyWatchResult contains an Error field,\nit's not used because we are only returning a single watcher,\nso we use the regular error return." - } - }, - "definitions": { - "ActionPruneArgs": { - "type": "object", - "properties": { - "max-history-mb": { - "type": "integer" - }, - "max-history-time": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "max-history-time", - "max-history-mb" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ModelConfigResult": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - } - } - } - }, - { - "Name": "Admin", - "Description": "admin is the only object that unlogged-in clients can access. It holds any\nmethods that are needed to log in.", - "Version": 3, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "controller-user", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "Login": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/LoginRequest" - }, - "Result": { - "$ref": "#/definitions/LoginResult" - } - }, - "description": "Login logs in with the provided credentials. All subsequent requests on the\nconnection will act as the authenticated user." - }, - "RedirectInfo": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/RedirectInfoResult" - } - }, - "description": "RedirectInfo returns redirected host information for the model.\nIn Juju it always returns an error because the Juju controller\ndoes not multiplex controllers." - } - }, - "definitions": { - "Address": { - "type": "object", - "properties": { - "cidr": { - "type": "string" - }, - "config-type": { - "type": "string" - }, - "is-secondary": { - "type": "boolean" - }, - "scope": { - "type": "string" - }, - "space-id": { - "type": "string" - }, - "space-name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "value", - "type", - "scope" - ] - }, - "AuthUserInfo": { - "type": "object", - "properties": { - "controller-access": { - "type": "string" - }, - "credentials": { - "type": "string" - }, - "display-name": { - "type": "string" - }, - "identity": { - "type": "string" - }, - "last-connection": { - "type": "string", - "format": "date-time" - }, - "model-access": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "display-name", - "identity", - "controller-access", - "model-access" - ] - }, - "FacadeVersions": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "versions": { - "type": "array", - "items": { - "type": "integer" - } - } - }, - "additionalProperties": false, - "required": [ - "name", - "versions" - ] - }, - "HostPort": { - "type": "object", - "properties": { - "Address": { - "$ref": "#/definitions/Address" - }, - "cidr": { - "type": "string" - }, - "config-type": { - "type": "string" - }, - "is-secondary": { - "type": "boolean" - }, - "port": { - "type": "integer" - }, - "scope": { - "type": "string" - }, - "space-id": { - "type": "string" - }, - "space-name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "value", - "type", - "scope", - "Address", - "port" - ] - }, - "LoginRequest": { - "type": "object", - "properties": { - "auth-tag": { - "type": "string" - }, - "bakery-version": { - "type": "integer" - }, - "cli-args": { - "type": "string" - }, - "client-version": { - "type": "string" - }, - "credentials": { - "type": "string" - }, - "macaroons": { - "type": "array", - "items": { - "type": "array", - "items": { - "$ref": "#/definitions/Macaroon" - } - } - }, - "nonce": { - "type": "string" - }, - "token": { - "type": "string" - }, - "user-data": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "auth-tag", - "credentials", - "nonce", - "macaroons", - "user-data" - ] - }, - "LoginResult": { - "type": "object", - "properties": { - "bakery-discharge-required": { - "$ref": "#/definitions/Macaroon" - }, - "controller-tag": { - "type": "string" - }, - "discharge-required": { - "$ref": "#/definitions/Macaroon" - }, - "discharge-required-error": { - "type": "string" - }, - "facades": { - "type": "array", - "items": { - "$ref": "#/definitions/FacadeVersions" - } - }, - "model-tag": { - "type": "string" - }, - "public-dns-name": { - "type": "string" - }, - "server-version": { - "type": "string" - }, - "servers": { - "type": "array", - "items": { - "type": "array", - "items": { - "$ref": "#/definitions/HostPort" - } - } - }, - "user-info": { - "$ref": "#/definitions/AuthUserInfo" - } - }, - "additionalProperties": false - }, - "Macaroon": { - "type": "object", - "additionalProperties": false - }, - "RedirectInfoResult": { - "type": "object", - "properties": { - "ca-cert": { - "type": "string" - }, - "servers": { - "type": "array", - "items": { - "type": "array", - "items": { - "$ref": "#/definitions/HostPort" - } - } - } - }, - "additionalProperties": false, - "required": [ - "servers", - "ca-cert" - ] - } - } - } - }, - { - "Name": "Agent", - "Description": "AgentAPI implements the version 3 of the API provided to an agent.", - "Version": 3, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent" - ], - "Schema": { - "type": "object", - "properties": { - "ClearReboot": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "ClearReboot will clear the reboot flag on provided machines, if it exists." - }, - "CloudSpec": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/CloudSpecResults" - } - }, - "description": "CloudSpec returns the model's cloud spec." - }, - "ControllerAPIInfoForModels": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ControllerAPIInfoResults" - } - }, - "description": "ControllerAPIInfoForModels returns the controller api connection details for the specified models." - }, - "ControllerConfig": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ControllerConfigResult" - } - }, - "description": "ControllerConfig returns the controller's configuration." - }, - "GetCloudSpec": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ModelTag" - }, - "Result": { - "$ref": "#/definitions/CloudSpecResult" - } - }, - "description": "GetCloudSpec constructs the CloudSpec for a validated and authorized model." - }, - "GetEntities": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/AgentGetEntitiesResults" - } - } - }, - "IsMaster": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/IsMasterResult" - } - } - }, - "ModelConfig": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ModelConfigResult" - } - }, - "description": "ModelConfig returns the current model's configuration." - }, - "SetPasswords": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/EntityPasswords" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetPasswords sets the given password for each supplied entity, if possible." - }, - "StateServingInfo": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StateServingInfo" - } - } - }, - "WatchCloudSpecsChanges": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "WatchCloudSpecsChanges returns a watcher for cloud spec changes." - }, - "WatchCredentials": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "WatchCredentials watches for changes to the specified credentials." - }, - "WatchForModelConfigChanges": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResult" - } - }, - "description": "WatchForModelConfigChanges returns a NotifyWatcher that observes\nchanges to the model configuration.\nNote that although the NotifyWatchResult contains an Error field,\nit's not used because we are only returning a single watcher,\nso we use the regular error return." - } - }, - "definitions": { - "AgentGetEntitiesResult": { - "type": "object", - "properties": { - "container-type": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "jobs": { - "type": "array", - "items": { - "type": "string" - } - }, - "life": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "life", - "jobs", - "container-type" - ] - }, - "AgentGetEntitiesResults": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/AgentGetEntitiesResult" - } - } - }, - "additionalProperties": false, - "required": [ - "entities" - ] - }, - "CloudCredential": { - "type": "object", - "properties": { - "attrs": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "auth-type": { - "type": "string" - }, - "redacted": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "auth-type" - ] - }, - "CloudSpec": { - "type": "object", - "properties": { - "cacertificates": { - "type": "array", - "items": { - "type": "string" - } - }, - "credential": { - "$ref": "#/definitions/CloudCredential" - }, - "endpoint": { - "type": "string" - }, - "identity-endpoint": { - "type": "string" - }, - "is-controller-cloud": { - "type": "boolean" - }, - "name": { - "type": "string" - }, - "region": { - "type": "string" - }, - "skip-tls-verify": { - "type": "boolean" - }, - "storage-endpoint": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type", - "name" - ] - }, - "CloudSpecResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/CloudSpec" - } - }, - "additionalProperties": false - }, - "CloudSpecResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/CloudSpecResult" - } - } - }, - "additionalProperties": false - }, - "ControllerAPIInfoResult": { - "type": "object", - "properties": { - "addresses": { - "type": "array", - "items": { - "type": "string" - } - }, - "cacert": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "addresses", - "cacert" - ] - }, - "ControllerAPIInfoResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ControllerAPIInfoResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ControllerConfigResult": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "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" - ] - }, - "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" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "IsMasterResult": { - "type": "object", - "properties": { - "master": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "master" - ] - }, - "ModelConfigResult": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "ModelTag": { - "type": "object", - "additionalProperties": false - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "NotifyWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "StateServingInfo": { - "type": "object", - "properties": { - "api-port": { - "type": "integer" - }, - "ca-private-key": { - "type": "string" - }, - "cert": { - "type": "string" - }, - "controller-api-port": { - "type": "integer" - }, - "private-key": { - "type": "string" - }, - "shared-secret": { - "type": "string" - }, - "state-port": { - "type": "integer" - }, - "system-identity": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "api-port", - "state-port", - "cert", - "private-key", - "ca-private-key", - "shared-secret", - "system-identity" - ] - } - } - } - }, - { - "Name": "AgentLifeFlag", - "Description": "", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "Life": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/LifeResults" - } - }, - "description": "Life returns the life status of every supplied entity, where available." - }, - "Watch": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "Watch starts an NotifyWatcher for each given entity." - } - }, - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "LifeResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "life": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "life" - ] - }, - "LifeResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/LifeResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "NotifyWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - } - } - } - }, - { - "Name": "AgentTools", - "Description": "AgentToolsAPI implements the API used by the machine model worker.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "UpdateToolsAvailable": { - "type": "object", - "description": "UpdateToolsAvailable invokes a lookup and further update in environ\nfor new patches of the current tool versions." - } - } - } - }, - { - "Name": "AllModelWatcher", - "Description": "SrvAllWatcher defines the API methods on a state.Multiwatcher.\nwhich watches any changes to the state. Each client has its own\ncurrent set of watchers, stored in resources. It is used by both\nthe AllWatcher and AllModelWatcher facades.", - "Version": 4, - "AvailableTo": [ - "controller-user" - ], - "Schema": { - "type": "object", - "properties": { - "Next": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/AllWatcherNextResults" - } - }, - "description": "Next will return the current state of everything on the first call\nand subsequent calls will" - }, - "Stop": { - "type": "object", - "description": "Stop stops the watcher." - } - }, - "definitions": { - "AllWatcherNextResults": { - "type": "object", - "properties": { - "deltas": { - "type": "array", - "items": { - "$ref": "#/definitions/Delta" - } - } - }, - "additionalProperties": false, - "required": [ - "deltas" - ] - }, - "Delta": { - "type": "object", - "properties": { - "entity": { - "type": "object", - "additionalProperties": true - }, - "removed": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "removed", - "entity" - ] - } - } - } - }, - { - "Name": "AllWatcher", - "Description": "SrvAllWatcher defines the API methods on a state.Multiwatcher.\nwhich watches any changes to the state. Each client has its own\ncurrent set of watchers, stored in resources. It is used by both\nthe AllWatcher and AllModelWatcher facades.", - "Version": 3, - "AvailableTo": [ - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "Next": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/AllWatcherNextResults" - } - }, - "description": "Next will return the current state of everything on the first call\nand subsequent calls will" - }, - "Stop": { - "type": "object", - "description": "Stop stops the watcher." - } - }, - "definitions": { - "AllWatcherNextResults": { - "type": "object", - "properties": { - "deltas": { - "type": "array", - "items": { - "$ref": "#/definitions/Delta" - } - } - }, - "additionalProperties": false, - "required": [ - "deltas" - ] - }, - "Delta": { - "type": "object", - "properties": { - "entity": { - "type": "object", - "additionalProperties": true - }, - "removed": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "removed", - "entity" - ] - } - } - } - }, - { - "Name": "Annotations", - "Description": "API implements the service interface and is the concrete\nimplementation of the api end point.", - "Version": 2, - "AvailableTo": [ - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "Get": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/AnnotationsGetResults" - } - }, - "description": "Get returns annotations for given entities.\nIf annotations cannot be retrieved for a given entity, an error is returned.\nEach entity is treated independently and, hence, will fail or succeed independently." - }, - "Set": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/AnnotationsSet" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "Set stores annotations for given entities" - } - }, - "definitions": { - "AnnotationsGetResult": { - "type": "object", - "properties": { - "annotations": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "entity": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/ErrorResult" - } - }, - "additionalProperties": false, - "required": [ - "entity", - "annotations" - ] - }, - "AnnotationsGetResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/AnnotationsGetResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "AnnotationsSet": { - "type": "object", - "properties": { - "annotations": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityAnnotations" - } - } - }, - "additionalProperties": false, - "required": [ - "annotations" - ] - }, - "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" - ] - }, - "EntityAnnotations": { - "type": "object", - "properties": { - "annotations": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "entity": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "entity", - "annotations" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - } - } - } - }, - { - "Name": "Application", - "Description": "APIv19 provides the Application API facade for version 19.", - "Version": 19, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "AddRelation": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/AddRelation" - }, - "Result": { - "$ref": "#/definitions/AddRelationResults" - } - }, - "description": "AddRelation adds a relation between the specified endpoints and returns the relation info." - }, - "AddUnits": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/AddApplicationUnits" - }, - "Result": { - "$ref": "#/definitions/AddApplicationUnitsResults" - } - }, - "description": "AddUnits adds a given number of units to an application." - }, - "ApplicationsInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ApplicationInfoResults" - } - }, - "description": "ApplicationsInfo returns applications information." - }, - "CharmConfig": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ApplicationGetArgs" - }, - "Result": { - "$ref": "#/definitions/ApplicationGetConfigResults" - } - }, - "description": "CharmConfig returns charm config for the input list of applications and\nmodel generations." - }, - "CharmRelations": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ApplicationCharmRelations" - }, - "Result": { - "$ref": "#/definitions/ApplicationCharmRelationsResults" - } - }, - "description": "CharmRelations implements the server side of Application.CharmRelations." - }, - "Consume": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ConsumeApplicationArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "Consume adds remote applications to the model without creating any\nrelations." - }, - "Deploy": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ApplicationsDeploy" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "Deploy fetches the charms from the charm store and deploys them\nusing the specified placement directives." - }, - "DeployFromRepository": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/DeployFromRepositoryArgs" - }, - "Result": { - "$ref": "#/definitions/DeployFromRepositoryResults" - } - }, - "description": "DeployFromRepository is a one-stop deployment method for repository\ncharms. Only a charm name is required to deploy. If argument validation\nfails, a list of all errors found in validation will be returned. If a\nlocal resource is provided, details required for uploading the validated\nresource will be returned." - }, - "DestroyApplication": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/DestroyApplicationsParams" - }, - "Result": { - "$ref": "#/definitions/DestroyApplicationResults" - } - }, - "description": "DestroyApplication removes a given set of applications." - }, - "DestroyConsumedApplications": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/DestroyConsumedApplicationsParams" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "DestroyConsumedApplications removes a given set of consumed (remote) applications." - }, - "DestroyRelation": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/DestroyRelation" - } - }, - "description": "DestroyRelation removes the relation between the\nspecified endpoints or an id." - }, - "DestroyUnit": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/DestroyUnitsParams" - }, - "Result": { - "$ref": "#/definitions/DestroyUnitResults" - } - }, - "description": "DestroyUnit removes a given set of application units." - }, - "Expose": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ApplicationExpose" - } - }, - "description": "Expose changes the juju-managed firewall to expose any ports that\nwere also explicitly marked by units as open." - }, - "Get": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ApplicationGet" - }, - "Result": { - "$ref": "#/definitions/ApplicationGetResults" - } - }, - "description": "Get returns the charm configuration for an application." - }, - "GetCharmURLOrigin": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ApplicationGet" - }, - "Result": { - "$ref": "#/definitions/CharmURLOriginResult" - } - }, - "description": "GetCharmURLOrigin returns the charm URL and charm origin the given\napplication is running at present." - }, - "GetConfig": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ApplicationGetConfigResults" - } - }, - "description": "GetConfig returns the charm config for each of the input applications." - }, - "GetConstraints": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ApplicationGetConstraintsResults" - } - }, - "description": "GetConstraints returns the constraints for a given application." - }, - "Leader": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entity" - }, - "Result": { - "$ref": "#/definitions/StringResult" - } - }, - "description": "Leader returns the unit name of the leader for the given application." - }, - "MergeBindings": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ApplicationMergeBindingsArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "MergeBindings merges operator-defined bindings with the current bindings for\none or more applications." - }, - "ResolveUnitErrors": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/UnitsResolved" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "ResolveUnitErrors marks errors on the specified units as resolved." - }, - "ScaleApplications": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ScaleApplicationsParams" - }, - "Result": { - "$ref": "#/definitions/ScaleApplicationResults" - } - }, - "description": "ScaleApplications scales the specified application to the requested number of units." - }, - "SetCharm": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ApplicationSetCharm" - } - }, - "description": "SetCharm sets the charm for a given for the application." - }, - "SetConfigs": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ConfigSetArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetConfigs implements the server side of Application.SetConfig. Both\napplication and charm config are set. It does not unset values in\nConfig map that are set to an empty string. Unset should be used for that." - }, - "SetConstraints": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetConstraints" - } - }, - "description": "SetConstraints sets the constraints for a given application." - }, - "SetMetricCredentials": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ApplicationMetricCredentials" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetMetricCredentials sets credentials on the application.\nTODO (cderici) only used for metered charms in cmd MeteredDeployAPI,\nkept for client compatibility, remove in juju 4.0" - }, - "SetRelationsSuspended": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RelationSuspendedArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetRelationsSuspended sets the suspended status of the specified relations." - }, - "Unexpose": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ApplicationUnexpose" - } - }, - "description": "Unexpose changes the juju-managed firewall to unexpose any ports that\nwere also explicitly marked by units as open." - }, - "UnitsInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/UnitInfoResults" - } - }, - "description": "UnitsInfo returns unit information for the given entities (units or\napplications)." - }, - "UnsetApplicationsConfig": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ApplicationConfigUnsetArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "UnsetApplicationsConfig implements the server side of Application.UnsetApplicationsConfig." - }, - "UpdateApplicationBase": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/UpdateChannelArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "UpdateApplicationBase updates the application base.\nBase for subordinates is updated too." - } - }, - "definitions": { - "AddApplicationUnits": { - "type": "object", - "properties": { - "application": { - "type": "string" - }, - "attach-storage": { - "type": "array", - "items": { - "type": "string" - } - }, - "num-units": { - "type": "integer" - }, - "placement": { - "type": "array", - "items": { - "$ref": "#/definitions/Placement" - } - }, - "policy": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "application", - "num-units", - "placement" - ] - }, - "AddApplicationUnitsResults": { - "type": "object", - "properties": { - "units": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "units" - ] - }, - "AddRelation": { - "type": "object", - "properties": { - "endpoints": { - "type": "array", - "items": { - "type": "string" - } - }, - "via-cidrs": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "endpoints" - ] - }, - "AddRelationResults": { - "type": "object", - "properties": { - "endpoints": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmRelation" - } - } - } - }, - "additionalProperties": false, - "required": [ - "endpoints" - ] - }, - "ApplicationCharmRelations": { - "type": "object", - "properties": { - "application": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "application" - ] - }, - "ApplicationCharmRelationsResults": { - "type": "object", - "properties": { - "charm-relations": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "charm-relations" - ] - }, - "ApplicationConfigUnsetArgs": { - "type": "object", - "properties": { - "Args": { - "type": "array", - "items": { - "$ref": "#/definitions/ApplicationUnset" - } - } - }, - "additionalProperties": false, - "required": [ - "Args" - ] - }, - "ApplicationConstraint": { - "type": "object", - "properties": { - "constraints": { - "$ref": "#/definitions/Value" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "constraints" - ] - }, - "ApplicationDeploy": { - "type": "object", - "properties": { - "Force": { - "type": "boolean" - }, - "application": { - "type": "string" - }, - "attach-storage": { - "type": "array", - "items": { - "type": "string" - } - }, - "channel": { - "type": "string" - }, - "charm-origin": { - "$ref": "#/definitions/CharmOrigin" - }, - "charm-url": { - "type": "string" - }, - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "config-yaml": { - "type": "string" - }, - "constraints": { - "$ref": "#/definitions/Value" - }, - "devices": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/Constraints" - } - } - }, - "endpoint-bindings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "num-units": { - "type": "integer" - }, - "placement": { - "type": "array", - "items": { - "$ref": "#/definitions/Placement" - } - }, - "policy": { - "type": "string" - }, - "resources": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "storage": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/Constraints" - } - } - } - }, - "additionalProperties": false, - "required": [ - "application", - "charm-url", - "channel", - "num-units", - "config-yaml", - "constraints", - "Force" - ] - }, - "ApplicationExpose": { - "type": "object", - "properties": { - "application": { - "type": "string" - }, - "exposed-endpoints": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/ExposedEndpoint" - } - } - } - }, - "additionalProperties": false, - "required": [ - "application" - ] - }, - "ApplicationGet": { - "type": "object", - "properties": { - "application": { - "type": "string" - }, - "branch": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "application", - "branch" - ] - }, - "ApplicationGetArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/ApplicationGet" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "ApplicationGetConfigResults": { - "type": "object", - "properties": { - "Results": { - "type": "array", - "items": { - "$ref": "#/definitions/ConfigResult" - } - } - }, - "additionalProperties": false, - "required": [ - "Results" - ] - }, - "ApplicationGetConstraintsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ApplicationConstraint" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ApplicationGetResults": { - "type": "object", - "properties": { - "application": { - "type": "string" - }, - "application-config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "base": { - "$ref": "#/definitions/Base" - }, - "channel": { - "type": "string" - }, - "charm": { - "type": "string" - }, - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "constraints": { - "$ref": "#/definitions/Value" - }, - "endpoint-bindings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - } - }, - "additionalProperties": false, - "required": [ - "application", - "charm", - "config", - "constraints", - "base", - "channel" - ] - }, - "ApplicationInfoResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/ApplicationResult" - } - }, - "additionalProperties": false - }, - "ApplicationInfoResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ApplicationInfoResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ApplicationMergeBindings": { - "type": "object", - "properties": { - "application-tag": { - "type": "string" - }, - "bindings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "force": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "application-tag", - "bindings", - "force" - ] - }, - "ApplicationMergeBindingsArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/ApplicationMergeBindings" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "ApplicationMetricCredential": { - "type": "object", - "properties": { - "application": { - "type": "string" - }, - "metrics-credentials": { - "type": "array", - "items": { - "type": "integer" - } - } - }, - "additionalProperties": false, - "required": [ - "application", - "metrics-credentials" - ] - }, - "ApplicationMetricCredentials": { - "type": "object", - "properties": { - "creds": { - "type": "array", - "items": { - "$ref": "#/definitions/ApplicationMetricCredential" - } - } - }, - "additionalProperties": false, - "required": [ - "creds" - ] - }, - "ApplicationOfferDetails": { - "type": "object", - "properties": { - "application-description": { - "type": "string" - }, - "bindings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "endpoints": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoteEndpoint" - } - }, - "offer-name": { - "type": "string" - }, - "offer-url": { - "type": "string" - }, - "offer-uuid": { - "type": "string" - }, - "source-model-tag": { - "type": "string" - }, - "spaces": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoteSpace" - } - }, - "users": { - "type": "array", - "items": { - "$ref": "#/definitions/OfferUserDetails" - } - } - }, - "additionalProperties": false, - "required": [ - "source-model-tag", - "offer-uuid", - "offer-url", - "offer-name", - "application-description" - ] - }, - "ApplicationResult": { - "type": "object", - "properties": { - "base": { - "$ref": "#/definitions/Base" - }, - "channel": { - "type": "string" - }, - "charm": { - "type": "string" - }, - "constraints": { - "$ref": "#/definitions/Value" - }, - "endpoint-bindings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "exposed": { - "type": "boolean" - }, - "exposed-endpoints": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/ExposedEndpoint" - } - } - }, - "life": { - "type": "string" - }, - "principal": { - "type": "boolean" - }, - "remote": { - "type": "boolean" - }, - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "principal", - "exposed", - "remote", - "life" - ] - }, - "ApplicationSetCharm": { - "type": "object", - "properties": { - "application": { - "type": "string" - }, - "channel": { - "type": "string" - }, - "charm-origin": { - "$ref": "#/definitions/CharmOrigin" - }, - "charm-url": { - "type": "string" - }, - "config-settings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "config-settings-yaml": { - "type": "string" - }, - "endpoint-bindings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "force": { - "type": "boolean" - }, - "force-base": { - "type": "boolean" - }, - "force-units": { - "type": "boolean" - }, - "generation": { - "type": "string" - }, - "resource-ids": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "storage-constraints": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/StorageConstraints" - } - } - } - }, - "additionalProperties": false, - "required": [ - "application", - "generation", - "charm-url", - "channel", - "force", - "force-units", - "force-base" - ] - }, - "ApplicationUnexpose": { - "type": "object", - "properties": { - "application": { - "type": "string" - }, - "exposed-endpoints": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "application", - "exposed-endpoints" - ] - }, - "ApplicationUnset": { - "type": "object", - "properties": { - "application": { - "type": "string" - }, - "branch": { - "type": "string" - }, - "options": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "application", - "branch", - "options" - ] - }, - "ApplicationsDeploy": { - "type": "object", - "properties": { - "applications": { - "type": "array", - "items": { - "$ref": "#/definitions/ApplicationDeploy" - } - } - }, - "additionalProperties": false, - "required": [ - "applications" - ] - }, - "Base": { - "type": "object", - "properties": { - "channel": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "channel" - ] - }, - "CharmOrigin": { - "type": "object", - "properties": { - "architecture": { - "type": "string" - }, - "base": { - "$ref": "#/definitions/Base" - }, - "branch": { - "type": "string" - }, - "hash": { - "type": "string" - }, - "id": { - "type": "string" - }, - "instance-key": { - "type": "string" - }, - "revision": { - "type": "integer" - }, - "risk": { - "type": "string" - }, - "source": { - "type": "string" - }, - "track": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "source", - "type", - "id" - ] - }, - "CharmRelation": { - "type": "object", - "properties": { - "interface": { - "type": "string" - }, - "limit": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "optional": { - "type": "boolean" - }, - "role": { - "type": "string" - }, - "scope": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "role", - "interface", - "optional", - "limit", - "scope" - ] - }, - "CharmURLOriginResult": { - "type": "object", - "properties": { - "charm-origin": { - "$ref": "#/definitions/CharmOrigin" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "url": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "url", - "charm-origin" - ] - }, - "ConfigResult": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "ConfigSet": { - "type": "object", - "properties": { - "application": { - "type": "string" - }, - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "config-yaml": { - "type": "string" - }, - "generation": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "application", - "generation", - "config", - "config-yaml" - ] - }, - "ConfigSetArgs": { - "type": "object", - "properties": { - "Args": { - "type": "array", - "items": { - "$ref": "#/definitions/ConfigSet" - } - } - }, - "additionalProperties": false, - "required": [ - "Args" - ] - }, - "Constraints": { - "type": "object", - "properties": { - "Count": { - "type": "integer" - }, - "Pool": { - "type": "string" - }, - "Size": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "Pool", - "Size", - "Count" - ] - }, - "ConsumeApplicationArg": { - "type": "object", - "properties": { - "ApplicationOfferDetails": { - "$ref": "#/definitions/ApplicationOfferDetails" - }, - "application-alias": { - "type": "string" - }, - "application-description": { - "type": "string" - }, - "bindings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "endpoints": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoteEndpoint" - } - }, - "external-controller": { - "$ref": "#/definitions/ExternalControllerInfo" - }, - "macaroon": { - "$ref": "#/definitions/Macaroon" - }, - "offer-name": { - "type": "string" - }, - "offer-url": { - "type": "string" - }, - "offer-uuid": { - "type": "string" - }, - "source-model-tag": { - "type": "string" - }, - "spaces": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoteSpace" - } - }, - "users": { - "type": "array", - "items": { - "$ref": "#/definitions/OfferUserDetails" - } - } - }, - "additionalProperties": false, - "required": [ - "source-model-tag", - "offer-uuid", - "offer-url", - "offer-name", - "application-description", - "ApplicationOfferDetails" - ] - }, - "ConsumeApplicationArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/ConsumeApplicationArg" - } - } - }, - "additionalProperties": false - }, - "DeployFromRepositoryArg": { - "type": "object", - "properties": { - "ApplicationName": { - "type": "string" - }, - "AttachStorage": { - "type": "array", - "items": { - "type": "string" - } - }, - "CharmName": { - "type": "string" - }, - "ConfigYAML": { - "type": "string" - }, - "Cons": { - "$ref": "#/definitions/Value" - }, - "Devices": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/Constraints" - } - } - }, - "DryRun": { - "type": "boolean" - }, - "Placement": { - "type": "array", - "items": { - "$ref": "#/definitions/Placement" - } - }, - "Storage": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/Constraints" - } - } - }, - "Trust": { - "type": "boolean" - }, - "base": { - "$ref": "#/definitions/Base" - }, - "channel": { - "type": "string" - }, - "endpoint-bindings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "force": { - "type": "boolean" - }, - "num-units": { - "type": "integer" - }, - "resources": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "revision": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "CharmName", - "ApplicationName", - "AttachStorage", - "ConfigYAML", - "Cons", - "Devices", - "DryRun", - "Placement", - "Storage", - "Trust" - ] - }, - "DeployFromRepositoryArgs": { - "type": "object", - "properties": { - "Args": { - "type": "array", - "items": { - "$ref": "#/definitions/DeployFromRepositoryArg" - } - } - }, - "additionalProperties": false, - "required": [ - "Args" - ] - }, - "DeployFromRepositoryInfo": { - "type": "object", - "properties": { - "architecture": { - "type": "string" - }, - "base": { - "$ref": "#/definitions/Base" - }, - "channel": { - "type": "string" - }, - "effective-channel": { - "type": "string" - }, - "name": { - "type": "string" - }, - "revision": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "architecture", - "channel", - "name", - "revision" - ] - }, - "DeployFromRepositoryResult": { - "type": "object", - "properties": { - "Errors": { - "type": "array", - "items": { - "$ref": "#/definitions/Error" - } - }, - "Info": { - "$ref": "#/definitions/DeployFromRepositoryInfo" - }, - "PendingResourceUploads": { - "type": "array", - "items": { - "$ref": "#/definitions/PendingResourceUpload" - } - } - }, - "additionalProperties": false, - "required": [ - "Errors", - "Info", - "PendingResourceUploads" - ] - }, - "DeployFromRepositoryResults": { - "type": "object", - "properties": { - "Results": { - "type": "array", - "items": { - "$ref": "#/definitions/DeployFromRepositoryResult" - } - } - }, - "additionalProperties": false, - "required": [ - "Results" - ] - }, - "DestroyApplicationInfo": { - "type": "object", - "properties": { - "destroyed-storage": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } - }, - "destroyed-units": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } - }, - "detached-storage": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } - } - }, - "additionalProperties": false - }, - "DestroyApplicationParams": { - "type": "object", - "properties": { - "application-tag": { - "type": "string" - }, - "destroy-storage": { - "type": "boolean" - }, - "dry-run": { - "type": "boolean" - }, - "force": { - "type": "boolean" - }, - "max-wait": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "application-tag", - "force" - ] - }, - "DestroyApplicationResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "info": { - "$ref": "#/definitions/DestroyApplicationInfo" - } - }, - "additionalProperties": false - }, - "DestroyApplicationResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/DestroyApplicationResult" - } - } - }, - "additionalProperties": false - }, - "DestroyApplicationsParams": { - "type": "object", - "properties": { - "applications": { - "type": "array", - "items": { - "$ref": "#/definitions/DestroyApplicationParams" - } - } - }, - "additionalProperties": false, - "required": [ - "applications" - ] - }, - "DestroyConsumedApplicationParams": { - "type": "object", - "properties": { - "application-tag": { - "type": "string" - }, - "force": { - "type": "boolean" - }, - "max-wait": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "application-tag" - ] - }, - "DestroyConsumedApplicationsParams": { - "type": "object", - "properties": { - "applications": { - "type": "array", - "items": { - "$ref": "#/definitions/DestroyConsumedApplicationParams" - } - } - }, - "additionalProperties": false, - "required": [ - "applications" - ] - }, - "DestroyRelation": { - "type": "object", - "properties": { - "endpoints": { - "type": "array", - "items": { - "type": "string" - } - }, - "force": { - "type": "boolean" - }, - "max-wait": { - "type": "integer" - }, - "relation-id": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "relation-id" - ] - }, - "DestroyUnitInfo": { - "type": "object", - "properties": { - "destroyed-storage": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } - }, - "detached-storage": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } - } - }, - "additionalProperties": false - }, - "DestroyUnitParams": { - "type": "object", - "properties": { - "destroy-storage": { - "type": "boolean" - }, - "dry-run": { - "type": "boolean" - }, - "force": { - "type": "boolean" - }, - "max-wait": { - "type": "integer" - }, - "unit-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "unit-tag" - ] - }, - "DestroyUnitResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "info": { - "$ref": "#/definitions/DestroyUnitInfo" - } - }, - "additionalProperties": false - }, - "DestroyUnitResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/DestroyUnitResult" - } - } - }, - "additionalProperties": false - }, - "DestroyUnitsParams": { - "type": "object", - "properties": { - "units": { - "type": "array", - "items": { - "$ref": "#/definitions/DestroyUnitParams" - } - } - }, - "additionalProperties": false, - "required": [ - "units" - ] - }, - "EndpointRelationData": { - "type": "object", - "properties": { - "ApplicationData": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "cross-model": { - "type": "boolean" - }, - "endpoint": { - "type": "string" - }, - "related-endpoint": { - "type": "string" - }, - "relation-id": { - "type": "integer" - }, - "unit-relation-data": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/RelationData" - } - } - } - }, - "additionalProperties": false, - "required": [ - "relation-id", - "endpoint", - "cross-model", - "related-endpoint", - "ApplicationData", - "unit-relation-data" - ] - }, - "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": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ExposedEndpoint": { - "type": "object", - "properties": { - "expose-to-cidrs": { - "type": "array", - "items": { - "type": "string" - } - }, - "expose-to-spaces": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "ExternalControllerInfo": { - "type": "object", - "properties": { - "addrs": { - "type": "array", - "items": { - "type": "string" - } - }, - "ca-cert": { - "type": "string" - }, - "controller-alias": { - "type": "string" - }, - "controller-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "controller-tag", - "controller-alias", - "addrs", - "ca-cert" - ] - }, - "Macaroon": { - "type": "object", - "additionalProperties": false - }, - "OfferUserDetails": { - "type": "object", - "properties": { - "access": { - "type": "string" - }, - "display-name": { - "type": "string" - }, - "user": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "user", - "display-name", - "access" - ] - }, - "PendingResourceUpload": { - "type": "object", - "properties": { - "Filename": { - "type": "string" - }, - "Name": { - "type": "string" - }, - "Type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Name", - "Filename", - "Type" - ] - }, - "Placement": { - "type": "object", - "properties": { - "directive": { - "type": "string" - }, - "scope": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "scope", - "directive" - ] - }, - "RelationData": { - "type": "object", - "properties": { - "InScope": { - "type": "boolean" - }, - "UnitData": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "InScope", - "UnitData" - ] - }, - "RelationSuspendedArg": { - "type": "object", - "properties": { - "message": { - "type": "string" - }, - "relation-id": { - "type": "integer" - }, - "suspended": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "relation-id", - "message", - "suspended" - ] - }, - "RelationSuspendedArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/RelationSuspendedArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "RemoteEndpoint": { - "type": "object", - "properties": { - "interface": { - "type": "string" - }, - "limit": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "role": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "role", - "interface", - "limit" - ] - }, - "RemoteSpace": { - "type": "object", - "properties": { - "cloud-type": { - "type": "string" - }, - "name": { - "type": "string" - }, - "provider-attributes": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "provider-id": { - "type": "string" - }, - "subnets": { - "type": "array", - "items": { - "$ref": "#/definitions/Subnet" - } - } - }, - "additionalProperties": false, - "required": [ - "cloud-type", - "name", - "provider-id", - "provider-attributes", - "subnets" - ] - }, - "ScaleApplicationInfo": { - "type": "object", - "properties": { - "num-units": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "num-units" - ] - }, - "ScaleApplicationParams": { - "type": "object", - "properties": { - "application-tag": { - "type": "string" - }, - "force": { - "type": "boolean" - }, - "scale": { - "type": "integer" - }, - "scale-change": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "application-tag", - "scale", - "force" - ] - }, - "ScaleApplicationResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "info": { - "$ref": "#/definitions/ScaleApplicationInfo" - } - }, - "additionalProperties": false - }, - "ScaleApplicationResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ScaleApplicationResult" - } - } - }, - "additionalProperties": false - }, - "ScaleApplicationsParams": { - "type": "object", - "properties": { - "applications": { - "type": "array", - "items": { - "$ref": "#/definitions/ScaleApplicationParams" - } - } - }, - "additionalProperties": false, - "required": [ - "applications" - ] - }, - "SetConstraints": { - "type": "object", - "properties": { - "application": { - "type": "string" - }, - "constraints": { - "$ref": "#/definitions/Value" - } - }, - "additionalProperties": false, - "required": [ - "application", - "constraints" - ] - }, - "StorageConstraints": { - "type": "object", - "properties": { - "count": { - "type": "integer" - }, - "pool": { - "type": "string" - }, - "size": { - "type": "integer" - } - }, - "additionalProperties": false - }, - "StringResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "Subnet": { - "type": "object", - "properties": { - "cidr": { - "type": "string" - }, - "life": { - "type": "string" - }, - "provider-id": { - "type": "string" - }, - "provider-network-id": { - "type": "string" - }, - "provider-space-id": { - "type": "string" - }, - "space-tag": { - "type": "string" - }, - "status": { - "type": "string" - }, - "vlan-tag": { - "type": "integer" - }, - "zones": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "cidr", - "vlan-tag", - "life", - "space-tag", - "zones" - ] - }, - "UnitInfoResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/UnitResult" - } - }, - "additionalProperties": false - }, - "UnitInfoResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/UnitInfoResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "UnitResult": { - "type": "object", - "properties": { - "address": { - "type": "string" - }, - "charm": { - "type": "string" - }, - "leader": { - "type": "boolean" - }, - "life": { - "type": "string" - }, - "machine": { - "type": "string" - }, - "opened-ports": { - "type": "array", - "items": { - "type": "string" - } - }, - "provider-id": { - "type": "string" - }, - "public-address": { - "type": "string" - }, - "relation-data": { - "type": "array", - "items": { - "$ref": "#/definitions/EndpointRelationData" - } - }, - "tag": { - "type": "string" - }, - "workload-version": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "workload-version", - "opened-ports", - "charm" - ] - }, - "UnitsResolved": { - "type": "object", - "properties": { - "all": { - "type": "boolean" - }, - "retry": { - "type": "boolean" - }, - "tags": { - "$ref": "#/definitions/Entities" - } - }, - "additionalProperties": false - }, - "UpdateChannelArg": { - "type": "object", - "properties": { - "channel": { - "type": "string" - }, - "force": { - "type": "boolean" - }, - "tag": { - "$ref": "#/definitions/Entity" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "force", - "channel" - ] - }, - "UpdateChannelArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/UpdateChannelArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "Value": { - "type": "object", - "properties": { - "allocate-public-ip": { - "type": "boolean" - }, - "arch": { - "type": "string" - }, - "container": { - "type": "string" - }, - "cores": { - "type": "integer" - }, - "cpu-power": { - "type": "integer" - }, - "image-id": { - "type": "string" - }, - "instance-role": { - "type": "string" - }, - "instance-type": { - "type": "string" - }, - "mem": { - "type": "integer" - }, - "root-disk": { - "type": "integer" - }, - "root-disk-source": { - "type": "string" - }, - "spaces": { - "type": "array", - "items": { - "type": "string" - } - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "virt-type": { - "type": "string" - }, - "zones": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - } - } - } - }, - { - "Name": "ApplicationOffers", - "Description": "OffersAPI implements the cross model interface and is the concrete\nimplementation of the api end point.", - "Version": 4, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "controller-user" - ], - "Schema": { - "type": "object", - "properties": { - "ApplicationOffers": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/OfferURLs" - }, - "Result": { - "$ref": "#/definitions/ApplicationOffersResults" - } - }, - "description": "ApplicationOffers gets details about remote applications that match given URLs." - }, - "DestroyOffers": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/DestroyApplicationOffers" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "DestroyOffers removes the offers specified by the given URLs, forcing if necessary." - }, - "FindApplicationOffers": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/OfferFilters" - }, - "Result": { - "$ref": "#/definitions/QueryApplicationOffersResults" - } - }, - "description": "FindApplicationOffers gets details about remote applications that match given filter." - }, - "GetConsumeDetails": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ConsumeOfferDetailsArg" - }, - "Result": { - "$ref": "#/definitions/ConsumeOfferDetailsResults" - } - }, - "description": "GetConsumeDetails returns the details necessary to pass to another model\nto allow the specified args user to consume the offers represented by the args URLs." - }, - "ListApplicationOffers": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/OfferFilters" - }, - "Result": { - "$ref": "#/definitions/QueryApplicationOffersResults" - } - }, - "description": "ListApplicationOffers gets deployed details about application offers that match given filter.\nThe results contain details about the deployed applications such as connection count." - }, - "ModifyOfferAccess": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ModifyOfferAccessRequest" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "ModifyOfferAccess changes the application offer access granted to users." - }, - "Offer": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/AddApplicationOffers" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "Offer makes application endpoints available for consumption at a specified URL." - }, - "RemoteApplicationInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/OfferURLs" - }, - "Result": { - "$ref": "#/definitions/RemoteApplicationInfoResults" - } - }, - "description": "RemoteApplicationInfo returns information about the requested remote application.\nThis call currently has no client side API, only there for the Dashboard at this stage." - } - }, - "definitions": { - "AddApplicationOffer": { - "type": "object", - "properties": { - "application-description": { - "type": "string" - }, - "application-name": { - "type": "string" - }, - "endpoints": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "model-tag": { - "type": "string" - }, - "offer-name": { - "type": "string" - }, - "owner-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "model-tag", - "offer-name", - "application-name", - "application-description", - "endpoints" - ] - }, - "AddApplicationOffers": { - "type": "object", - "properties": { - "Offers": { - "type": "array", - "items": { - "$ref": "#/definitions/AddApplicationOffer" - } - } - }, - "additionalProperties": false, - "required": [ - "Offers" - ] - }, - "ApplicationOfferAdminDetails": { - "type": "object", - "properties": { - "ApplicationOfferDetails": { - "$ref": "#/definitions/ApplicationOfferDetails" - }, - "application-description": { - "type": "string" - }, - "application-name": { - "type": "string" - }, - "bindings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "charm-url": { - "type": "string" - }, - "connections": { - "type": "array", - "items": { - "$ref": "#/definitions/OfferConnection" - } - }, - "endpoints": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoteEndpoint" - } - }, - "offer-name": { - "type": "string" - }, - "offer-url": { - "type": "string" - }, - "offer-uuid": { - "type": "string" - }, - "source-model-tag": { - "type": "string" - }, - "spaces": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoteSpace" - } - }, - "users": { - "type": "array", - "items": { - "$ref": "#/definitions/OfferUserDetails" - } - } - }, - "additionalProperties": false, - "required": [ - "source-model-tag", - "offer-uuid", - "offer-url", - "offer-name", - "application-description", - "ApplicationOfferDetails", - "application-name", - "charm-url" - ] - }, - "ApplicationOfferDetails": { - "type": "object", - "properties": { - "application-description": { - "type": "string" - }, - "bindings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "endpoints": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoteEndpoint" - } - }, - "offer-name": { - "type": "string" - }, - "offer-url": { - "type": "string" - }, - "offer-uuid": { - "type": "string" - }, - "source-model-tag": { - "type": "string" - }, - "spaces": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoteSpace" - } - }, - "users": { - "type": "array", - "items": { - "$ref": "#/definitions/OfferUserDetails" - } - } - }, - "additionalProperties": false, - "required": [ - "source-model-tag", - "offer-uuid", - "offer-url", - "offer-name", - "application-description" - ] - }, - "ApplicationOfferResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/ApplicationOfferAdminDetails" - } - }, - "additionalProperties": false - }, - "ApplicationOffersResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ApplicationOfferResult" - } - } - }, - "additionalProperties": false - }, - "ConsumeOfferDetails": { - "type": "object", - "properties": { - "external-controller": { - "$ref": "#/definitions/ExternalControllerInfo" - }, - "macaroon": { - "$ref": "#/definitions/Macaroon" - }, - "offer": { - "$ref": "#/definitions/ApplicationOfferDetails" - } - }, - "additionalProperties": false - }, - "ConsumeOfferDetailsArg": { - "type": "object", - "properties": { - "offer-urls": { - "$ref": "#/definitions/OfferURLs" - }, - "user-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "offer-urls" - ] - }, - "ConsumeOfferDetailsResult": { - "type": "object", - "properties": { - "ConsumeOfferDetails": { - "$ref": "#/definitions/ConsumeOfferDetails" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "external-controller": { - "$ref": "#/definitions/ExternalControllerInfo" - }, - "macaroon": { - "$ref": "#/definitions/Macaroon" - }, - "offer": { - "$ref": "#/definitions/ApplicationOfferDetails" - } - }, - "additionalProperties": false, - "required": [ - "ConsumeOfferDetails" - ] - }, - "ConsumeOfferDetailsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ConsumeOfferDetailsResult" - } - } - }, - "additionalProperties": false - }, - "DestroyApplicationOffers": { - "type": "object", - "properties": { - "force": { - "type": "boolean" - }, - "offer-urls": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "offer-urls" - ] - }, - "EndpointFilterAttributes": { - "type": "object", - "properties": { - "interface": { - "type": "string" - }, - "name": { - "type": "string" - }, - "role": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "role", - "interface", - "name" - ] - }, - "EntityStatus": { - "type": "object", - "properties": { - "data": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "info": { - "type": "string" - }, - "since": { - "type": "string", - "format": "date-time" - }, - "status": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "status", - "info", - "since" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ExternalControllerInfo": { - "type": "object", - "properties": { - "addrs": { - "type": "array", - "items": { - "type": "string" - } - }, - "ca-cert": { - "type": "string" - }, - "controller-alias": { - "type": "string" - }, - "controller-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "controller-tag", - "controller-alias", - "addrs", - "ca-cert" - ] - }, - "Macaroon": { - "type": "object", - "additionalProperties": false - }, - "ModifyOfferAccess": { - "type": "object", - "properties": { - "access": { - "type": "string" - }, - "action": { - "type": "string" - }, - "offer-url": { - "type": "string" - }, - "user-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "user-tag", - "action", - "access", - "offer-url" - ] - }, - "ModifyOfferAccessRequest": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "$ref": "#/definitions/ModifyOfferAccess" - } - } - }, - "additionalProperties": false, - "required": [ - "changes" - ] - }, - "OfferConnection": { - "type": "object", - "properties": { - "endpoint": { - "type": "string" - }, - "ingress-subnets": { - "type": "array", - "items": { - "type": "string" - } - }, - "relation-id": { - "type": "integer" - }, - "source-model-tag": { - "type": "string" - }, - "status": { - "$ref": "#/definitions/EntityStatus" - }, - "username": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "source-model-tag", - "relation-id", - "username", - "endpoint", - "status", - "ingress-subnets" - ] - }, - "OfferFilter": { - "type": "object", - "properties": { - "allowed-users": { - "type": "array", - "items": { - "type": "string" - } - }, - "application-description": { - "type": "string" - }, - "application-name": { - "type": "string" - }, - "application-user": { - "type": "string" - }, - "connected-users": { - "type": "array", - "items": { - "type": "string" - } - }, - "endpoints": { - "type": "array", - "items": { - "$ref": "#/definitions/EndpointFilterAttributes" - } - }, - "model-name": { - "type": "string" - }, - "offer-name": { - "type": "string" - }, - "owner-name": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "owner-name", - "model-name", - "offer-name", - "application-name", - "application-description", - "application-user", - "endpoints", - "connected-users", - "allowed-users" - ] - }, - "OfferFilters": { - "type": "object", - "properties": { - "Filters": { - "type": "array", - "items": { - "$ref": "#/definitions/OfferFilter" - } - } - }, - "additionalProperties": false, - "required": [ - "Filters" - ] - }, - "OfferURLs": { - "type": "object", - "properties": { - "bakery-version": { - "type": "integer" - }, - "offer-urls": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "OfferUserDetails": { - "type": "object", - "properties": { - "access": { - "type": "string" - }, - "display-name": { - "type": "string" - }, - "user": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "user", - "display-name", - "access" - ] - }, - "QueryApplicationOffersResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ApplicationOfferAdminDetails" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "RemoteApplicationInfo": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "endpoints": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoteEndpoint" - } - }, - "icon-url-path": { - "type": "string" - }, - "model-tag": { - "type": "string" - }, - "name": { - "type": "string" - }, - "offer-url": { - "type": "string" - }, - "source-model-label": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "model-tag", - "name", - "description", - "offer-url", - "endpoints", - "icon-url-path" - ] - }, - "RemoteApplicationInfoResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/RemoteApplicationInfo" - } - }, - "additionalProperties": false - }, - "RemoteApplicationInfoResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoteApplicationInfoResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "RemoteEndpoint": { - "type": "object", - "properties": { - "interface": { - "type": "string" - }, - "limit": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "role": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "role", - "interface", - "limit" - ] - }, - "RemoteSpace": { - "type": "object", - "properties": { - "cloud-type": { - "type": "string" - }, - "name": { - "type": "string" - }, - "provider-attributes": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "provider-id": { - "type": "string" - }, - "subnets": { - "type": "array", - "items": { - "$ref": "#/definitions/Subnet" - } - } - }, - "additionalProperties": false, - "required": [ - "cloud-type", - "name", - "provider-id", - "provider-attributes", - "subnets" - ] - }, - "Subnet": { - "type": "object", - "properties": { - "cidr": { - "type": "string" - }, - "life": { - "type": "string" - }, - "provider-id": { - "type": "string" - }, - "provider-network-id": { - "type": "string" - }, - "provider-space-id": { - "type": "string" - }, - "space-tag": { - "type": "string" - }, - "status": { - "type": "string" - }, - "vlan-tag": { - "type": "integer" - }, - "zones": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "cidr", - "vlan-tag", - "life", - "space-tag", - "zones" - ] - } - } - } - }, - { - "Name": "ApplicationScaler", - "Description": "Facade allows model-manager clients to watch and rescale services.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent" - ], - "Schema": { - "type": "object", - "properties": { - "Rescale": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "Rescale causes any supplied services to be scaled up to their\nminimum size." - }, - "Watch": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsWatchResult" - } - }, - "description": "Watch returns a watcher that sends the names of services whose\nunit count may be below their configured minimum." - } - }, - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "StringsWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id" - ] - } - } - } - }, - { - "Name": "Backups", - "Description": "API provides backup-specific API methods.", - "Version": 3, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "Create": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/BackupsCreateArgs" - }, - "Result": { - "$ref": "#/definitions/BackupsMetadataResult" - } - }, - "description": "Create is the API method that requests juju to create a new backup\nof its state." - } - }, - "definitions": { - "BackupsCreateArgs": { - "type": "object", - "properties": { - "no-download": { - "type": "boolean" - }, - "notes": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "notes", - "no-download" - ] - }, - "BackupsMetadataResult": { - "type": "object", - "properties": { - "base": { - "type": "string" - }, - "checksum": { - "type": "string" - }, - "checksum-format": { - "type": "string" - }, - "controller-machine-id": { - "type": "string" - }, - "controller-machine-inst-id": { - "type": "string" - }, - "controller-uuid": { - "type": "string" - }, - "filename": { - "type": "string" - }, - "finished": { - "type": "string", - "format": "date-time" - }, - "format-version": { - "type": "integer" - }, - "ha-nodes": { - "type": "integer" - }, - "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" - }, - "version": { - "$ref": "#/definitions/Number" - } - }, - "additionalProperties": false, - "required": [ - "id", - "checksum", - "checksum-format", - "size", - "stored", - "started", - "finished", - "notes", - "model", - "machine", - "hostname", - "version", - "base", - "filename", - "format-version", - "controller-uuid", - "controller-machine-id", - "controller-machine-inst-id", - "ha-nodes" - ] - }, - "Number": { - "type": "object", - "properties": { - "Build": { - "type": "integer" - }, - "Major": { - "type": "integer" - }, - "Minor": { - "type": "integer" - }, - "Patch": { - "type": "integer" - }, - "Tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Major", - "Minor", - "Tag", - "Patch", - "Build" - ] - } - } - } - }, - { - "Name": "Block", - "Description": "API implements Block interface and is the concrete\nimplementation of the api end point.", - "Version": 2, - "AvailableTo": [ - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "List": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/BlockResults" - } - }, - "description": "List implements Block.List()." - }, - "SwitchBlockOff": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/BlockSwitchParams" - }, - "Result": { - "$ref": "#/definitions/ErrorResult" - } - }, - "description": "SwitchBlockOff implements Block.SwitchBlockOff()." - }, - "SwitchBlockOn": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/BlockSwitchParams" - }, - "Result": { - "$ref": "#/definitions/ErrorResult" - } - }, - "description": "SwitchBlockOn implements Block.SwitchBlockOn()." - } - }, - "definitions": { - "Block": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "message": { - "type": "string" - }, - "tag": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "id", - "tag", - "type" - ] - }, - "BlockResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/Block" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "BlockResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/BlockResult" - } - } - }, - "additionalProperties": false - }, - "BlockSwitchParams": { - "type": "object", - "properties": { - "message": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - } - } - } - }, - { - "Name": "Bundle", - "Description": "APIv6 provides the Bundle API facade for version 6. It is otherwise\nidentical to V5 with the exception that the V6 adds the support for\nmulti-part yaml handling to GetChanges and GetChangesMapArgs.", - "Version": 6, - "AvailableTo": [ - "controller-user", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "ExportBundle": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ExportBundleParams" - }, - "Result": { - "$ref": "#/definitions/StringResult" - } - }, - "description": "ExportBundle exports the current model configuration as bundle." - }, - "GetChanges": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/BundleChangesParams" - }, - "Result": { - "$ref": "#/definitions/BundleChangesResults" - } - }, - "description": "GetChanges returns the list of changes required to deploy the given bundle\ndata. The changes are sorted by requirements, so that they can be applied in\norder.\nGetChanges has been superseded in favour of GetChangesMapArgs. It's\npreferable to use that new method to add new functionality and move clients\naway from this one." - }, - "GetChangesMapArgs": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/BundleChangesParams" - }, - "Result": { - "$ref": "#/definitions/BundleChangesMapArgsResults" - } - }, - "description": "GetChangesMapArgs returns the list of changes required to deploy the given\nbundle data. The changes are sorted by requirements, so that they can be\napplied in order.\nV4 GetChangesMapArgs is not supported on anything less than v4" - } - }, - "definitions": { - "BundleChange": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": true - } - }, - "id": { - "type": "string" - }, - "method": { - "type": "string" - }, - "requires": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "id", - "method", - "args", - "requires" - ] - }, - "BundleChangesMapArgs": { - "type": "object", - "properties": { - "args": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "id": { - "type": "string" - }, - "method": { - "type": "string" - }, - "requires": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "id", - "method", - "args", - "requires" - ] - }, - "BundleChangesMapArgsResults": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "$ref": "#/definitions/BundleChangesMapArgs" - } - }, - "errors": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "BundleChangesParams": { - "type": "object", - "properties": { - "bundleURL": { - "type": "string" - }, - "yaml": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "yaml", - "bundleURL" - ] - }, - "BundleChangesResults": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "$ref": "#/definitions/BundleChange" - } - }, - "errors": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ExportBundleParams": { - "type": "object", - "properties": { - "include-charm-defaults": { - "type": "boolean" - }, - "include-series": { - "type": "boolean" - } - }, - "additionalProperties": false - }, - "StringResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - } - } - } - }, - { - "Name": "CAASAdmission", - "Description": "", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent" - ], - "Schema": { - "type": "object", - "properties": { - "ControllerAPIInfoForModels": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ControllerAPIInfoResults" - } - }, - "description": "ControllerAPIInfoForModels returns the controller api connection details for the specified models." - }, - "ControllerConfig": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ControllerConfigResult" - } - }, - "description": "ControllerConfig returns the controller's configuration." - } - }, - "definitions": { - "ControllerAPIInfoResult": { - "type": "object", - "properties": { - "addresses": { - "type": "array", - "items": { - "type": "string" - } - }, - "cacert": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "addresses", - "cacert" - ] - }, - "ControllerAPIInfoResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ControllerAPIInfoResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ControllerConfigResult": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "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": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - } - } - } - }, - { - "Name": "CAASAgent", - "Description": "FacadeV2 is the V2 facade of the caas agent", - "Version": 2, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "CloudSpec": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/CloudSpecResults" - } - }, - "description": "CloudSpec returns the model's cloud spec." - }, - "ControllerAPIInfoForModels": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ControllerAPIInfoResults" - } - }, - "description": "ControllerAPIInfoForModels returns the controller api connection details for the specified models." - }, - "ControllerConfig": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ControllerConfigResult" - } - }, - "description": "ControllerConfig returns the controller's configuration." - }, - "GetCloudSpec": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ModelTag" - }, - "Result": { - "$ref": "#/definitions/CloudSpecResult" - } - }, - "description": "GetCloudSpec constructs the CloudSpec for a validated and authorized model." - }, - "ModelConfig": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ModelConfigResult" - } - }, - "description": "ModelConfig returns the current model's configuration." - }, - "WatchCloudSpecsChanges": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "WatchCloudSpecsChanges returns a watcher for cloud spec changes." - }, - "WatchForModelConfigChanges": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResult" - } - }, - "description": "WatchForModelConfigChanges returns a NotifyWatcher that observes\nchanges to the model configuration.\nNote that although the NotifyWatchResult contains an Error field,\nit's not used because we are only returning a single watcher,\nso we use the regular error return." - } - }, - "definitions": { - "CloudCredential": { - "type": "object", - "properties": { - "attrs": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "auth-type": { - "type": "string" - }, - "redacted": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "auth-type" - ] - }, - "CloudSpec": { - "type": "object", - "properties": { - "cacertificates": { - "type": "array", - "items": { - "type": "string" - } - }, - "credential": { - "$ref": "#/definitions/CloudCredential" - }, - "endpoint": { - "type": "string" - }, - "identity-endpoint": { - "type": "string" - }, - "is-controller-cloud": { - "type": "boolean" - }, - "name": { - "type": "string" - }, - "region": { - "type": "string" - }, - "skip-tls-verify": { - "type": "boolean" - }, - "storage-endpoint": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type", - "name" - ] - }, - "CloudSpecResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/CloudSpec" - } - }, - "additionalProperties": false - }, - "CloudSpecResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/CloudSpecResult" - } - } - }, - "additionalProperties": false - }, - "ControllerAPIInfoResult": { - "type": "object", - "properties": { - "addresses": { - "type": "array", - "items": { - "type": "string" - } - }, - "cacert": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "addresses", - "cacert" - ] - }, - "ControllerAPIInfoResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ControllerAPIInfoResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ControllerConfigResult": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "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": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ModelConfigResult": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "ModelTag": { - "type": "object", - "additionalProperties": false - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "NotifyWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - } - } - } - }, - { - "Name": "CAASApplication", - "Description": "", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "UnitIntroduction": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/CAASUnitIntroductionArgs" - }, - "Result": { - "$ref": "#/definitions/CAASUnitIntroductionResult" - } - }, - "description": "UnitIntroduction sets the status of each given entity." - }, - "UnitTerminating": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entity" - }, - "Result": { - "$ref": "#/definitions/CAASUnitTerminationResult" - } - }, - "description": "UnitTerminating should be called by the CAASUnitTerminationWorker when\nthe agent receives a signal to exit. UnitTerminating will return how\nthe agent should shutdown." - } - }, - "definitions": { - "CAASUnitIntroduction": { - "type": "object", - "properties": { - "agent-conf": { - "type": "array", - "items": { - "type": "integer" - } - }, - "unit-name": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "unit-name", - "agent-conf" - ] - }, - "CAASUnitIntroductionArgs": { - "type": "object", - "properties": { - "pod-name": { - "type": "string" - }, - "pod-uuid": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "pod-name", - "pod-uuid" - ] - }, - "CAASUnitIntroductionResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/CAASUnitIntroduction" - } - }, - "additionalProperties": false - }, - "CAASUnitTerminationResult": { - "type": "object", - "properties": { - "Error": { - "$ref": "#/definitions/Error" - }, - "WillRestart": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "WillRestart", - "Error" - ] - }, - "Entity": { - "type": "object", - "properties": { - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - } - } - } - }, - { - "Name": "CAASApplicationProvisioner", - "Description": "", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "ApplicationCharmInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entity" - }, - "Result": { - "$ref": "#/definitions/Charm" - } - }, - "description": "ApplicationCharmInfo returns information about an application's charm." - }, - "ApplicationOCIResources": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/CAASApplicationOCIResourceResults" - } - }, - "description": "ApplicationOCIResources returns the OCI image resources for an application." - }, - "CharmInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/CharmURL" - }, - "Result": { - "$ref": "#/definitions/Charm" - } - }, - "description": "CharmInfo returns information about the requested charm." - }, - "ClearApplicationsResources": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "ClearApplicationsResources clears the flags which indicate\napplications still have resources in the cluster." - }, - "DestroyUnits": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/DestroyUnitsParams" - }, - "Result": { - "$ref": "#/definitions/DestroyUnitResults" - } - }, - "description": "DestroyUnits is responsible for scaling down a set of units on the this\nApplication." - }, - "Life": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/LifeResults" - } - }, - "description": "Life returns the life status of every supplied entity, where available." - }, - "ProvisionerConfig": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/CAASApplicationProvisionerConfigResult" - } - }, - "description": "ProvisionerConfig returns the provisioner's configuration." - }, - "ProvisioningInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/CAASApplicationProvisioningInfoResults" - } - }, - "description": "ProvisioningInfo returns the info needed to provision a caas application." - }, - "ProvisioningState": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entity" - }, - "Result": { - "$ref": "#/definitions/CAASApplicationProvisioningStateResult" - } - }, - "description": "ProvisioningState returns the provisioning state for the application." - }, - "Remove": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "Remove removes every given entity from state, calling EnsureDead\nfirst, then Remove. It will fail if the entity is not present." - }, - "SetOperatorStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetStatus" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetOperatorStatus sets the status of each given entity." - }, - "SetPasswords": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/EntityPasswords" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetPasswords sets the given password for each supplied entity, if possible." - }, - "SetProvisioningState": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/CAASApplicationProvisioningStateArg" - }, - "Result": { - "$ref": "#/definitions/ErrorResult" - } - }, - "description": "SetProvisioningState sets the provisioning state for the application." - }, - "Units": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/CAASUnitsResults" - } - }, - "description": "Units returns all the units for each application specified." - }, - "UpdateApplicationsUnits": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/UpdateApplicationUnitArgs" - }, - "Result": { - "$ref": "#/definitions/UpdateApplicationUnitResults" - } - }, - "description": "UpdateApplicationsUnits updates the Juju data model to reflect the given\nunits of the specified application." - }, - "Watch": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "Watch starts an NotifyWatcher for each given entity." - }, - "WatchApplications": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsWatchResult" - } - }, - "description": "WatchApplications starts a StringsWatcher to watch applications\ndeployed to this model." - }, - "WatchProvisioningInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "WatchProvisioningInfo provides a watcher for changes that affect the\ninformation returned by ProvisioningInfo. This is useful for ensuring the\nlatest application stated is ensured." - }, - "WatchUnits": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - }, - "description": "WatchUnits starts a StringsWatcher to watch changes to the\nlifecycle states of units for the specified applications in\nthis model." - } - }, - "definitions": { - "ApplicationUnitInfo": { - "type": "object", - "properties": { - "provider-id": { - "type": "string" - }, - "unit-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "provider-id", - "unit-tag" - ] - }, - "ApplicationUnitParams": { - "type": "object", - "properties": { - "address": { - "type": "string" - }, - "data": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "filesystem-info": { - "type": "array", - "items": { - "$ref": "#/definitions/KubernetesFilesystemInfo" - } - }, - "info": { - "type": "string" - }, - "ports": { - "type": "array", - "items": { - "type": "string" - } - }, - "provider-id": { - "type": "string" - }, - "stateful": { - "type": "boolean" - }, - "status": { - "type": "string" - }, - "unit-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "provider-id", - "unit-tag", - "address", - "ports", - "status", - "info" - ] - }, - "Base": { - "type": "object", - "properties": { - "channel": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "channel" - ] - }, - "CAASApplicationOCIResourceResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/CAASApplicationOCIResources" - } - }, - "additionalProperties": false - }, - "CAASApplicationOCIResourceResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/CAASApplicationOCIResourceResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "CAASApplicationOCIResources": { - "type": "object", - "properties": { - "images": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/DockerImageInfo" - } - } - } - }, - "additionalProperties": false, - "required": [ - "images" - ] - }, - "CAASApplicationProvisionerConfig": { - "type": "object", - "properties": { - "unmanaged-applications": { - "$ref": "#/definitions/Entities" - } - }, - "additionalProperties": false - }, - "CAASApplicationProvisionerConfigResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "provisioner-config": { - "$ref": "#/definitions/CAASApplicationProvisionerConfig" - } - }, - "additionalProperties": false - }, - "CAASApplicationProvisioningInfo": { - "type": "object", - "properties": { - "api-addresses": { - "type": "array", - "items": { - "type": "string" - } - }, - "base": { - "$ref": "#/definitions/Base" - }, - "ca-cert": { - "type": "string" - }, - "charm-modified-version": { - "type": "integer" - }, - "charm-url": { - "type": "string" - }, - "constraints": { - "$ref": "#/definitions/Value" - }, - "devices": { - "type": "array", - "items": { - "$ref": "#/definitions/KubernetesDeviceParams" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "filesystems": { - "type": "array", - "items": { - "$ref": "#/definitions/KubernetesFilesystemParams" - } - }, - "image-repo": { - "$ref": "#/definitions/DockerImageInfo" - }, - "scale": { - "type": "integer" - }, - "tags": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "trust": { - "type": "boolean" - }, - "version": { - "$ref": "#/definitions/Number" - }, - "volumes": { - "type": "array", - "items": { - "$ref": "#/definitions/KubernetesVolumeParams" - } - } - }, - "additionalProperties": false, - "required": [ - "version", - "api-addresses", - "ca-cert", - "constraints" - ] - }, - "CAASApplicationProvisioningInfoResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/CAASApplicationProvisioningInfo" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "CAASApplicationProvisioningState": { - "type": "object", - "properties": { - "scale-target": { - "type": "integer" - }, - "scaling": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "scaling", - "scale-target" - ] - }, - "CAASApplicationProvisioningStateArg": { - "type": "object", - "properties": { - "application": { - "$ref": "#/definitions/Entity" - }, - "provisioning-state": { - "$ref": "#/definitions/CAASApplicationProvisioningState" - } - }, - "additionalProperties": false, - "required": [ - "application", - "provisioning-state" - ] - }, - "CAASApplicationProvisioningStateResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "provisioning-state": { - "$ref": "#/definitions/CAASApplicationProvisioningState" - } - }, - "additionalProperties": false - }, - "CAASUnitInfo": { - "type": "object", - "properties": { - "tag": { - "type": "string" - }, - "unit-status": { - "$ref": "#/definitions/UnitStatus" - } - }, - "additionalProperties": false, - "required": [ - "tag" - ] - }, - "CAASUnitsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "units": { - "type": "array", - "items": { - "$ref": "#/definitions/CAASUnitInfo" - } - } - }, - "additionalProperties": false - }, - "CAASUnitsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/CAASUnitsResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "Charm": { - "type": "object", - "properties": { - "actions": { - "$ref": "#/definitions/CharmActions" - }, - "config": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmOption" - } - } - }, - "lxd-profile": { - "$ref": "#/definitions/CharmLXDProfile" - }, - "manifest": { - "$ref": "#/definitions/CharmManifest" - }, - "meta": { - "$ref": "#/definitions/CharmMeta" - }, - "metrics": { - "$ref": "#/definitions/CharmMetrics" - }, - "revision": { - "type": "integer" - }, - "url": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "revision", - "url", - "config" - ] - }, - "CharmActionSpec": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "params": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "description", - "params" - ] - }, - "CharmActions": { - "type": "object", - "properties": { - "specs": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmActionSpec" - } - } - } - }, - "additionalProperties": false - }, - "CharmBase": { - "type": "object", - "properties": { - "architectures": { - "type": "array", - "items": { - "type": "string" - } - }, - "channel": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "additionalProperties": false - }, - "CharmContainer": { - "type": "object", - "properties": { - "mounts": { - "type": "array", - "items": { - "$ref": "#/definitions/CharmMount" - } - }, - "resource": { - "type": "string" - } - }, - "additionalProperties": false - }, - "CharmDeployment": { - "type": "object", - "properties": { - "min-version": { - "type": "string" - }, - "mode": { - "type": "string" - }, - "service": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type", - "mode", - "service", - "min-version" - ] - }, - "CharmDevice": { - "type": "object", - "properties": { - "CountMax": { - "type": "integer" - }, - "CountMin": { - "type": "integer" - }, - "Description": { - "type": "string" - }, - "Name": { - "type": "string" - }, - "Type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Name", - "Description", - "Type", - "CountMin", - "CountMax" - ] - }, - "CharmLXDProfile": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "description": { - "type": "string" - }, - "devices": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - } - } - } - }, - "additionalProperties": false, - "required": [ - "config", - "description", - "devices" - ] - }, - "CharmManifest": { - "type": "object", - "properties": { - "bases": { - "type": "array", - "items": { - "$ref": "#/definitions/CharmBase" - } - } - }, - "additionalProperties": false - }, - "CharmMeta": { - "type": "object", - "properties": { - "assumes-expr": { - "$ref": "#/definitions/ExpressionTree" - }, - "categories": { - "type": "array", - "items": { - "type": "string" - } - }, - "containers": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmContainer" - } - } - }, - "deployment": { - "$ref": "#/definitions/CharmDeployment" - }, - "description": { - "type": "string" - }, - "devices": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmDevice" - } - } - }, - "extra-bindings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "min-juju-version": { - "type": "string" - }, - "name": { - "type": "string" - }, - "payload-classes": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmPayloadClass" - } - } - }, - "peers": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmRelation" - } - } - }, - "provides": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmRelation" - } - } - }, - "requires": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmRelation" - } - } - }, - "resources": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmResourceMeta" - } - } - }, - "series": { - "type": "array", - "items": { - "type": "string" - } - }, - "storage": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmStorage" - } - } - }, - "subordinate": { - "type": "boolean" - }, - "summary": { - "type": "string" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "terms": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "name", - "summary", - "description", - "subordinate" - ] - }, - "CharmMetric": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type", - "description" - ] - }, - "CharmMetrics": { - "type": "object", - "properties": { - "metrics": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmMetric" - } - } - }, - "plan": { - "$ref": "#/definitions/CharmPlan" - } - }, - "additionalProperties": false, - "required": [ - "metrics", - "plan" - ] - }, - "CharmMount": { - "type": "object", - "properties": { - "location": { - "type": "string" - }, - "storage": { - "type": "string" - } - }, - "additionalProperties": false - }, - "CharmOption": { - "type": "object", - "properties": { - "default": { - "type": "object", - "additionalProperties": true - }, - "description": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type" - ] - }, - "CharmPayloadClass": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "type" - ] - }, - "CharmPlan": { - "type": "object", - "properties": { - "required": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "required" - ] - }, - "CharmRelation": { - "type": "object", - "properties": { - "interface": { - "type": "string" - }, - "limit": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "optional": { - "type": "boolean" - }, - "role": { - "type": "string" - }, - "scope": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "role", - "interface", - "optional", - "limit", - "scope" - ] - }, - "CharmResourceMeta": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "name": { - "type": "string" - }, - "path": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "type", - "path", - "description" - ] - }, - "CharmStorage": { - "type": "object", - "properties": { - "count-max": { - "type": "integer" - }, - "count-min": { - "type": "integer" - }, - "description": { - "type": "string" - }, - "location": { - "type": "string" - }, - "minimum-size": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "properties": { - "type": "array", - "items": { - "type": "string" - } - }, - "read-only": { - "type": "boolean" - }, - "shared": { - "type": "boolean" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "description", - "type", - "shared", - "read-only", - "count-min", - "count-max", - "minimum-size" - ] - }, - "CharmURL": { - "type": "object", - "properties": { - "url": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "url" - ] - }, - "DestroyUnitInfo": { - "type": "object", - "properties": { - "destroyed-storage": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } - }, - "detached-storage": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } - } - }, - "additionalProperties": false - }, - "DestroyUnitParams": { - "type": "object", - "properties": { - "destroy-storage": { - "type": "boolean" - }, - "dry-run": { - "type": "boolean" - }, - "force": { - "type": "boolean" - }, - "max-wait": { - "type": "integer" - }, - "unit-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "unit-tag" - ] - }, - "DestroyUnitResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "info": { - "$ref": "#/definitions/DestroyUnitInfo" - } - }, - "additionalProperties": false - }, - "DestroyUnitResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/DestroyUnitResult" - } - } - }, - "additionalProperties": false - }, - "DestroyUnitsParams": { - "type": "object", - "properties": { - "units": { - "type": "array", - "items": { - "$ref": "#/definitions/DestroyUnitParams" - } - } - }, - "additionalProperties": false, - "required": [ - "units" - ] - }, - "DetailedStatus": { - "type": "object", - "properties": { - "data": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "err": { - "$ref": "#/definitions/Error" - }, - "info": { - "type": "string" - }, - "kind": { - "type": "string" - }, - "life": { - "type": "string" - }, - "since": { - "type": "string", - "format": "date-time" - }, - "status": { - "type": "string" - }, - "version": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "status", - "info", - "data", - "since", - "kind", - "version", - "life" - ] - }, - "DockerImageInfo": { - "type": "object", - "properties": { - "auth": { - "type": "string" - }, - "email": { - "type": "string" - }, - "identitytoken": { - "type": "string" - }, - "image-name": { - "type": "string" - }, - "password": { - "type": "string" - }, - "registrytoken": { - "type": "string" - }, - "repository": { - "type": "string" - }, - "serveraddress": { - "type": "string" - }, - "username": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "image-name" - ] - }, - "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" - ] - }, - "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" - ] - }, - "EntityStatus": { - "type": "object", - "properties": { - "data": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "info": { - "type": "string" - }, - "since": { - "type": "string", - "format": "date-time" - }, - "status": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "status", - "info", - "since" - ] - }, - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ExpressionTree": { - "type": "object", - "properties": { - "Expression": { - "type": "object", - "additionalProperties": true - } - }, - "additionalProperties": false, - "required": [ - "Expression" - ] - }, - "KubernetesDeviceParams": { - "type": "object", - "properties": { - "Attributes": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "Count": { - "type": "integer" - }, - "Type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Type", - "Count", - "Attributes" - ] - }, - "KubernetesFilesystemAttachmentParams": { - "type": "object", - "properties": { - "mount-point": { - "type": "string" - }, - "provider": { - "type": "string" - }, - "read-only": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "provider" - ] - }, - "KubernetesFilesystemInfo": { - "type": "object", - "properties": { - "data": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "filesystem-id": { - "type": "string" - }, - "info": { - "type": "string" - }, - "mount-point": { - "type": "string" - }, - "pool": { - "type": "string" - }, - "read-only": { - "type": "boolean" - }, - "size": { - "type": "integer" - }, - "status": { - "type": "string" - }, - "storagename": { - "type": "string" - }, - "volume": { - "$ref": "#/definitions/KubernetesVolumeInfo" - } - }, - "additionalProperties": false, - "required": [ - "storagename", - "pool", - "size", - "filesystem-id", - "status", - "info", - "volume" - ] - }, - "KubernetesFilesystemParams": { - "type": "object", - "properties": { - "attachment": { - "$ref": "#/definitions/KubernetesFilesystemAttachmentParams" - }, - "attributes": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "provider": { - "type": "string" - }, - "size": { - "type": "integer" - }, - "storagename": { - "type": "string" - }, - "tags": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - } - }, - "additionalProperties": false, - "required": [ - "storagename", - "size", - "provider" - ] - }, - "KubernetesVolumeAttachmentParams": { - "type": "object", - "properties": { - "provider": { - "type": "string" - }, - "read-only": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "provider" - ] - }, - "KubernetesVolumeInfo": { - "type": "object", - "properties": { - "data": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "info": { - "type": "string" - }, - "persistent": { - "type": "boolean" - }, - "pool": { - "type": "string" - }, - "size": { - "type": "integer" - }, - "status": { - "type": "string" - }, - "volume-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "volume-id", - "size", - "persistent", - "status", - "info" - ] - }, - "KubernetesVolumeParams": { - "type": "object", - "properties": { - "attachment": { - "$ref": "#/definitions/KubernetesVolumeAttachmentParams" - }, - "attributes": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "provider": { - "type": "string" - }, - "size": { - "type": "integer" - }, - "storagename": { - "type": "string" - }, - "tags": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - } - }, - "additionalProperties": false, - "required": [ - "storagename", - "size", - "provider" - ] - }, - "LifeResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "life": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "life" - ] - }, - "LifeResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/LifeResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "NotifyWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "Number": { - "type": "object", - "properties": { - "Build": { - "type": "integer" - }, - "Major": { - "type": "integer" - }, - "Minor": { - "type": "integer" - }, - "Patch": { - "type": "integer" - }, - "Tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Major", - "Minor", - "Tag", - "Patch", - "Build" - ] - }, - "SetStatus": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityStatusArgs" - } - } - }, - "additionalProperties": false, - "required": [ - "entities" - ] - }, - "StringsWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id" - ] - }, - "StringsWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringsWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "UnitStatus": { - "type": "object", - "properties": { - "address": { - "type": "string" - }, - "agent-status": { - "$ref": "#/definitions/DetailedStatus" - }, - "charm": { - "type": "string" - }, - "leader": { - "type": "boolean" - }, - "machine": { - "type": "string" - }, - "opened-ports": { - "type": "array", - "items": { - "type": "string" - } - }, - "provider-id": { - "type": "string" - }, - "public-address": { - "type": "string" - }, - "subordinates": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/UnitStatus" - } - } - }, - "workload-status": { - "$ref": "#/definitions/DetailedStatus" - }, - "workload-version": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "agent-status", - "workload-status", - "workload-version", - "machine", - "opened-ports", - "public-address", - "charm", - "subordinates" - ] - }, - "UpdateApplicationUnitArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/UpdateApplicationUnits" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "UpdateApplicationUnitResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "info": { - "$ref": "#/definitions/UpdateApplicationUnitsInfo" - } - }, - "additionalProperties": false - }, - "UpdateApplicationUnitResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/UpdateApplicationUnitResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "UpdateApplicationUnits": { - "type": "object", - "properties": { - "application-tag": { - "type": "string" - }, - "generation": { - "type": "integer" - }, - "scale": { - "type": "integer" - }, - "status": { - "$ref": "#/definitions/EntityStatus" - }, - "units": { - "type": "array", - "items": { - "$ref": "#/definitions/ApplicationUnitParams" - } - } - }, - "additionalProperties": false, - "required": [ - "application-tag", - "units" - ] - }, - "UpdateApplicationUnitsInfo": { - "type": "object", - "properties": { - "units": { - "type": "array", - "items": { - "$ref": "#/definitions/ApplicationUnitInfo" - } - } - }, - "additionalProperties": false, - "required": [ - "units" - ] - }, - "Value": { - "type": "object", - "properties": { - "allocate-public-ip": { - "type": "boolean" - }, - "arch": { - "type": "string" - }, - "container": { - "type": "string" - }, - "cores": { - "type": "integer" - }, - "cpu-power": { - "type": "integer" - }, - "image-id": { - "type": "string" - }, - "instance-role": { - "type": "string" - }, - "instance-type": { - "type": "string" - }, - "mem": { - "type": "integer" - }, - "root-disk": { - "type": "integer" - }, - "root-disk-source": { - "type": "string" - }, - "spaces": { - "type": "array", - "items": { - "type": "string" - } - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "virt-type": { - "type": "string" - }, - "zones": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - } - } - } - }, - { - "Name": "CAASFirewaller", - "Description": "", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent" - ], - "Schema": { - "type": "object", - "properties": { - "ApplicationCharmInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entity" - }, - "Result": { - "$ref": "#/definitions/Charm" - } - }, - "description": "ApplicationCharmInfo returns information about an application's charm." - }, - "ApplicationsConfig": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ApplicationGetConfigResults" - } - }, - "description": "ApplicationsConfig returns the config for the specified applications." - }, - "CharmInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/CharmURL" - }, - "Result": { - "$ref": "#/definitions/Charm" - } - }, - "description": "CharmInfo returns information about the requested charm." - }, - "IsExposed": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/BoolResults" - } - }, - "description": "IsExposed returns whether the specified applications are exposed." - }, - "Life": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/LifeResults" - } - }, - "description": "Life returns the life status of every supplied entity, where available." - }, - "Watch": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "Watch starts an NotifyWatcher for each given entity." - }, - "WatchApplications": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsWatchResult" - } - }, - "description": "WatchApplications starts a StringsWatcher to watch applications\ndeployed to this model." - } - }, - "definitions": { - "ApplicationGetConfigResults": { - "type": "object", - "properties": { - "Results": { - "type": "array", - "items": { - "$ref": "#/definitions/ConfigResult" - } - } - }, - "additionalProperties": false, - "required": [ - "Results" - ] - }, - "BoolResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "BoolResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/BoolResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "Charm": { - "type": "object", - "properties": { - "actions": { - "$ref": "#/definitions/CharmActions" - }, - "config": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmOption" - } - } - }, - "lxd-profile": { - "$ref": "#/definitions/CharmLXDProfile" - }, - "manifest": { - "$ref": "#/definitions/CharmManifest" - }, - "meta": { - "$ref": "#/definitions/CharmMeta" - }, - "metrics": { - "$ref": "#/definitions/CharmMetrics" - }, - "revision": { - "type": "integer" - }, - "url": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "revision", - "url", - "config" - ] - }, - "CharmActionSpec": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "params": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "description", - "params" - ] - }, - "CharmActions": { - "type": "object", - "properties": { - "specs": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmActionSpec" - } - } - } - }, - "additionalProperties": false - }, - "CharmBase": { - "type": "object", - "properties": { - "architectures": { - "type": "array", - "items": { - "type": "string" - } - }, - "channel": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "additionalProperties": false - }, - "CharmContainer": { - "type": "object", - "properties": { - "mounts": { - "type": "array", - "items": { - "$ref": "#/definitions/CharmMount" - } - }, - "resource": { - "type": "string" - } - }, - "additionalProperties": false - }, - "CharmDeployment": { - "type": "object", - "properties": { - "min-version": { - "type": "string" - }, - "mode": { - "type": "string" - }, - "service": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type", - "mode", - "service", - "min-version" - ] - }, - "CharmDevice": { - "type": "object", - "properties": { - "CountMax": { - "type": "integer" - }, - "CountMin": { - "type": "integer" - }, - "Description": { - "type": "string" - }, - "Name": { - "type": "string" - }, - "Type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Name", - "Description", - "Type", - "CountMin", - "CountMax" - ] - }, - "CharmLXDProfile": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "description": { - "type": "string" - }, - "devices": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - } - } - } - }, - "additionalProperties": false, - "required": [ - "config", - "description", - "devices" - ] - }, - "CharmManifest": { - "type": "object", - "properties": { - "bases": { - "type": "array", - "items": { - "$ref": "#/definitions/CharmBase" - } - } - }, - "additionalProperties": false - }, - "CharmMeta": { - "type": "object", - "properties": { - "assumes-expr": { - "$ref": "#/definitions/ExpressionTree" - }, - "categories": { - "type": "array", - "items": { - "type": "string" - } - }, - "containers": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmContainer" - } - } - }, - "deployment": { - "$ref": "#/definitions/CharmDeployment" - }, - "description": { - "type": "string" - }, - "devices": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmDevice" - } - } - }, - "extra-bindings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "min-juju-version": { - "type": "string" - }, - "name": { - "type": "string" - }, - "payload-classes": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmPayloadClass" - } - } - }, - "peers": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmRelation" - } - } - }, - "provides": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmRelation" - } - } - }, - "requires": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmRelation" - } - } - }, - "resources": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmResourceMeta" - } - } - }, - "series": { - "type": "array", - "items": { - "type": "string" - } - }, - "storage": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmStorage" - } - } - }, - "subordinate": { - "type": "boolean" - }, - "summary": { - "type": "string" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "terms": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "name", - "summary", - "description", - "subordinate" - ] - }, - "CharmMetric": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type", - "description" - ] - }, - "CharmMetrics": { - "type": "object", - "properties": { - "metrics": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmMetric" - } - } - }, - "plan": { - "$ref": "#/definitions/CharmPlan" - } - }, - "additionalProperties": false, - "required": [ - "metrics", - "plan" - ] - }, - "CharmMount": { - "type": "object", - "properties": { - "location": { - "type": "string" - }, - "storage": { - "type": "string" - } - }, - "additionalProperties": false - }, - "CharmOption": { - "type": "object", - "properties": { - "default": { - "type": "object", - "additionalProperties": true - }, - "description": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type" - ] - }, - "CharmPayloadClass": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "type" - ] - }, - "CharmPlan": { - "type": "object", - "properties": { - "required": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "required" - ] - }, - "CharmRelation": { - "type": "object", - "properties": { - "interface": { - "type": "string" - }, - "limit": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "optional": { - "type": "boolean" - }, - "role": { - "type": "string" - }, - "scope": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "role", - "interface", - "optional", - "limit", - "scope" - ] - }, - "CharmResourceMeta": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "name": { - "type": "string" - }, - "path": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "type", - "path", - "description" - ] - }, - "CharmStorage": { - "type": "object", - "properties": { - "count-max": { - "type": "integer" - }, - "count-min": { - "type": "integer" - }, - "description": { - "type": "string" - }, - "location": { - "type": "string" - }, - "minimum-size": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "properties": { - "type": "array", - "items": { - "type": "string" - } - }, - "read-only": { - "type": "boolean" - }, - "shared": { - "type": "boolean" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "description", - "type", - "shared", - "read-only", - "count-min", - "count-max", - "minimum-size" - ] - }, - "CharmURL": { - "type": "object", - "properties": { - "url": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "url" - ] - }, - "ConfigResult": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "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": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ExpressionTree": { - "type": "object", - "properties": { - "Expression": { - "type": "object", - "additionalProperties": true - } - }, - "additionalProperties": false, - "required": [ - "Expression" - ] - }, - "LifeResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "life": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "life" - ] - }, - "LifeResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/LifeResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "NotifyWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "StringsWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id" - ] - } - } - } - }, - { - "Name": "CAASFirewallerSidecar", - "Description": "FacadeSidecar provides access to the CAASFirewaller API facade for sidecar applications.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent" - ], - "Schema": { - "type": "object", - "properties": { - "ApplicationCharmInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entity" - }, - "Result": { - "$ref": "#/definitions/Charm" - } - }, - "description": "ApplicationCharmInfo returns information about an application's charm." - }, - "ApplicationsConfig": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ApplicationGetConfigResults" - } - }, - "description": "ApplicationsConfig returns the config for the specified applications." - }, - "CharmInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/CharmURL" - }, - "Result": { - "$ref": "#/definitions/Charm" - } - }, - "description": "CharmInfo returns information about the requested charm." - }, - "GetOpenedPorts": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entity" - }, - "Result": { - "$ref": "#/definitions/ApplicationOpenedPortsResults" - } - }, - "description": "GetOpenedPorts returns all the opened ports for each given application tag." - }, - "IsExposed": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/BoolResults" - } - }, - "description": "IsExposed returns whether the specified applications are exposed." - }, - "Life": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/LifeResults" - } - }, - "description": "Life returns the life status of every supplied entity, where available." - }, - "Watch": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "Watch starts an NotifyWatcher for each given entity." - }, - "WatchApplications": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsWatchResult" - } - }, - "description": "WatchApplications starts a StringsWatcher to watch applications\ndeployed to this model." - }, - "WatchOpenedPorts": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - }, - "description": "WatchOpenedPorts returns a new StringsWatcher for each given\nmodel tag." - } - }, - "definitions": { - "ApplicationGetConfigResults": { - "type": "object", - "properties": { - "Results": { - "type": "array", - "items": { - "$ref": "#/definitions/ConfigResult" - } - } - }, - "additionalProperties": false, - "required": [ - "Results" - ] - }, - "ApplicationOpenedPorts": { - "type": "object", - "properties": { - "endpoint": { - "type": "string" - }, - "port-ranges": { - "type": "array", - "items": { - "$ref": "#/definitions/PortRange" - } - } - }, - "additionalProperties": false, - "required": [ - "endpoint", - "port-ranges" - ] - }, - "ApplicationOpenedPortsResult": { - "type": "object", - "properties": { - "application-port-ranges": { - "type": "array", - "items": { - "$ref": "#/definitions/ApplicationOpenedPorts" - } - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "application-port-ranges" - ] - }, - "ApplicationOpenedPortsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ApplicationOpenedPortsResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "BoolResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "BoolResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/BoolResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "Charm": { - "type": "object", - "properties": { - "actions": { - "$ref": "#/definitions/CharmActions" - }, - "config": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmOption" - } - } - }, - "lxd-profile": { - "$ref": "#/definitions/CharmLXDProfile" - }, - "manifest": { - "$ref": "#/definitions/CharmManifest" - }, - "meta": { - "$ref": "#/definitions/CharmMeta" - }, - "metrics": { - "$ref": "#/definitions/CharmMetrics" - }, - "revision": { - "type": "integer" - }, - "url": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "revision", - "url", - "config" - ] - }, - "CharmActionSpec": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "params": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "description", - "params" - ] - }, - "CharmActions": { - "type": "object", - "properties": { - "specs": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmActionSpec" - } - } - } - }, - "additionalProperties": false - }, - "CharmBase": { - "type": "object", - "properties": { - "architectures": { - "type": "array", - "items": { - "type": "string" - } - }, - "channel": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "additionalProperties": false - }, - "CharmContainer": { - "type": "object", - "properties": { - "mounts": { - "type": "array", - "items": { - "$ref": "#/definitions/CharmMount" - } - }, - "resource": { - "type": "string" - } - }, - "additionalProperties": false - }, - "CharmDeployment": { - "type": "object", - "properties": { - "min-version": { - "type": "string" - }, - "mode": { - "type": "string" - }, - "service": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type", - "mode", - "service", - "min-version" - ] - }, - "CharmDevice": { - "type": "object", - "properties": { - "CountMax": { - "type": "integer" - }, - "CountMin": { - "type": "integer" - }, - "Description": { - "type": "string" - }, - "Name": { - "type": "string" - }, - "Type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Name", - "Description", - "Type", - "CountMin", - "CountMax" - ] - }, - "CharmLXDProfile": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "description": { - "type": "string" - }, - "devices": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - } - } - } - }, - "additionalProperties": false, - "required": [ - "config", - "description", - "devices" - ] - }, - "CharmManifest": { - "type": "object", - "properties": { - "bases": { - "type": "array", - "items": { - "$ref": "#/definitions/CharmBase" - } - } - }, - "additionalProperties": false - }, - "CharmMeta": { - "type": "object", - "properties": { - "assumes-expr": { - "$ref": "#/definitions/ExpressionTree" - }, - "categories": { - "type": "array", - "items": { - "type": "string" - } - }, - "containers": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmContainer" - } - } - }, - "deployment": { - "$ref": "#/definitions/CharmDeployment" - }, - "description": { - "type": "string" - }, - "devices": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmDevice" - } - } - }, - "extra-bindings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "min-juju-version": { - "type": "string" - }, - "name": { - "type": "string" - }, - "payload-classes": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmPayloadClass" - } - } - }, - "peers": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmRelation" - } - } - }, - "provides": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmRelation" - } - } - }, - "requires": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmRelation" - } - } - }, - "resources": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmResourceMeta" - } - } - }, - "series": { - "type": "array", - "items": { - "type": "string" - } - }, - "storage": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmStorage" - } - } - }, - "subordinate": { - "type": "boolean" - }, - "summary": { - "type": "string" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "terms": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "name", - "summary", - "description", - "subordinate" - ] - }, - "CharmMetric": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type", - "description" - ] - }, - "CharmMetrics": { - "type": "object", - "properties": { - "metrics": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmMetric" - } - } - }, - "plan": { - "$ref": "#/definitions/CharmPlan" - } - }, - "additionalProperties": false, - "required": [ - "metrics", - "plan" - ] - }, - "CharmMount": { - "type": "object", - "properties": { - "location": { - "type": "string" - }, - "storage": { - "type": "string" - } - }, - "additionalProperties": false - }, - "CharmOption": { - "type": "object", - "properties": { - "default": { - "type": "object", - "additionalProperties": true - }, - "description": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type" - ] - }, - "CharmPayloadClass": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "type" - ] - }, - "CharmPlan": { - "type": "object", - "properties": { - "required": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "required" - ] - }, - "CharmRelation": { - "type": "object", - "properties": { - "interface": { - "type": "string" - }, - "limit": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "optional": { - "type": "boolean" - }, - "role": { - "type": "string" - }, - "scope": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "role", - "interface", - "optional", - "limit", - "scope" - ] - }, - "CharmResourceMeta": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "name": { - "type": "string" - }, - "path": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "type", - "path", - "description" - ] - }, - "CharmStorage": { - "type": "object", - "properties": { - "count-max": { - "type": "integer" - }, - "count-min": { - "type": "integer" - }, - "description": { - "type": "string" - }, - "location": { - "type": "string" - }, - "minimum-size": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "properties": { - "type": "array", - "items": { - "type": "string" - } - }, - "read-only": { - "type": "boolean" - }, - "shared": { - "type": "boolean" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "description", - "type", - "shared", - "read-only", - "count-min", - "count-max", - "minimum-size" - ] - }, - "CharmURL": { - "type": "object", - "properties": { - "url": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "url" - ] - }, - "ConfigResult": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "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": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ExpressionTree": { - "type": "object", - "properties": { - "Expression": { - "type": "object", - "additionalProperties": true - } - }, - "additionalProperties": false, - "required": [ - "Expression" - ] - }, - "LifeResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "life": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "life" - ] - }, - "LifeResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/LifeResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "NotifyWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "PortRange": { - "type": "object", - "properties": { - "from-port": { - "type": "integer" - }, - "protocol": { - "type": "string" - }, - "to-port": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "from-port", - "to-port", - "protocol" - ] - }, - "StringsWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id" - ] - }, - "StringsWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringsWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - } - } - } - }, - { - "Name": "CAASModelConfigManager", - "Description": "Facade allows model config manager clients to watch controller config changes and fetch controller config.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent" - ], - "Schema": { - "type": "object", - "properties": { - "ControllerConfig": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ControllerConfigResult" - } - } - }, - "WatchControllerConfig": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - } - }, - "definitions": { - "ControllerConfigResult": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - } - } - } - }, - { - "Name": "CAASModelOperator", - "Description": "API represents the controller model operator facade.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "APIAddresses": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsResult" - } - }, - "description": "APIAddresses returns the list of addresses used to connect to the API." - }, - "APIHostPorts": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/APIHostPortsResult" - } - }, - "description": "APIHostPorts returns the API server addresses." - }, - "ModelOperatorProvisioningInfo": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ModelOperatorInfo" - } - }, - "description": "ModelOperatorProvisioningInfo returns the information needed for provisioning\na new model operator into a caas cluster." - }, - "ModelUUID": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringResult" - } - }, - "description": "ModelUUID returns the model UUID that this facade is used to operate.\nIt is implemented here directly as a result of removing it from\nembedded APIAddresser *without* bumping the facade version.\nIt should be blanked when this facade version is next incremented." - }, - "SetPasswords": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/EntityPasswords" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetPasswords sets the given password for each supplied entity, if possible." - }, - "WatchAPIHostPorts": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResult" - } - }, - "description": "WatchAPIHostPorts watches the API server addresses." - }, - "WatchModelOperatorProvisioningInfo": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResult" - } - }, - "description": "WatchModelOperatorProvisioningInfo provides a watcher for changes that affect the\ninformation returned by ModelOperatorProvisioningInfo." - } - }, - "definitions": { - "APIHostPortsResult": { - "type": "object", - "properties": { - "servers": { - "type": "array", - "items": { - "type": "array", - "items": { - "$ref": "#/definitions/HostPort" - } - } - } - }, - "additionalProperties": false, - "required": [ - "servers" - ] - }, - "Address": { - "type": "object", - "properties": { - "cidr": { - "type": "string" - }, - "config-type": { - "type": "string" - }, - "is-secondary": { - "type": "boolean" - }, - "scope": { - "type": "string" - }, - "space-id": { - "type": "string" - }, - "space-name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "value", - "type", - "scope" - ] - }, - "DockerImageInfo": { - "type": "object", - "properties": { - "auth": { - "type": "string" - }, - "email": { - "type": "string" - }, - "identitytoken": { - "type": "string" - }, - "image-name": { - "type": "string" - }, - "password": { - "type": "string" - }, - "registrytoken": { - "type": "string" - }, - "repository": { - "type": "string" - }, - "serveraddress": { - "type": "string" - }, - "username": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "image-name" - ] - }, - "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" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "HostPort": { - "type": "object", - "properties": { - "Address": { - "$ref": "#/definitions/Address" - }, - "cidr": { - "type": "string" - }, - "config-type": { - "type": "string" - }, - "is-secondary": { - "type": "boolean" - }, - "port": { - "type": "integer" - }, - "scope": { - "type": "string" - }, - "space-id": { - "type": "string" - }, - "space-name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "value", - "type", - "scope", - "Address", - "port" - ] - }, - "ModelOperatorInfo": { - "type": "object", - "properties": { - "api-addresses": { - "type": "array", - "items": { - "type": "string" - } - }, - "image-details": { - "$ref": "#/definitions/DockerImageInfo" - }, - "version": { - "$ref": "#/definitions/Number" - } - }, - "additionalProperties": false, - "required": [ - "api-addresses", - "image-details", - "version" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "Number": { - "type": "object", - "properties": { - "Build": { - "type": "integer" - }, - "Major": { - "type": "integer" - }, - "Minor": { - "type": "integer" - }, - "Patch": { - "type": "integer" - }, - "Tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Major", - "Minor", - "Tag", - "Patch", - "Build" - ] - }, - "StringResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "StringsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - } - } - } - }, - { - "Name": "CAASOperator", - "Description": "Facade is the CAAS operator API facade.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "APIAddresses": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsResult" - } - }, - "description": "APIAddresses returns the list of addresses used to connect to the API." - }, - "APIHostPorts": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/APIHostPortsResult" - } - }, - "description": "APIHostPorts returns the API server addresses." - }, - "Charm": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ApplicationCharmResults" - } - }, - "description": "Charm returns the charm info for all given applications." - }, - "CurrentModel": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ModelResult" - } - }, - "description": "CurrentModel returns the name and UUID for the current juju model." - }, - "Life": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/LifeResults" - } - }, - "description": "Life returns the life status of every supplied entity, where available." - }, - "ModelUUID": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringResult" - } - }, - "description": "ModelUUID returns the model UUID that this facade is used to operate.\nIt is implemented here directly as a result of removing it from\nembedded APIAddresser *without* bumping the facade version.\nIt should be blanked when this facade version is next incremented." - }, - "Remove": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "Remove removes every given entity from state, calling EnsureDead\nfirst, then Remove. It will fail if the entity is not present." - }, - "SetPodSpec": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetPodSpecParams" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetPodSpec sets the container specs for a set of applications.\nTODO(juju3) - remove" - }, - "SetStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetStatus" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetStatus sets the status of each given entity." - }, - "SetTools": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/EntitiesVersion" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetTools updates the recorded tools version for the agents." - }, - "Watch": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "Watch starts an NotifyWatcher for each given entity." - }, - "WatchAPIHostPorts": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResult" - } - }, - "description": "WatchAPIHostPorts watches the API server addresses." - }, - "WatchContainerStart": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/WatchContainerStartArgs" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - }, - "description": "WatchContainerStart starts a StringWatcher to watch for container start events\non the CAAS api for a specific application and container." - }, - "WatchUnits": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - }, - "description": "WatchUnits starts a StringsWatcher to watch changes to the\nlifecycle states of units for the specified applications in\nthis model." - } - }, - "definitions": { - "APIHostPortsResult": { - "type": "object", - "properties": { - "servers": { - "type": "array", - "items": { - "type": "array", - "items": { - "$ref": "#/definitions/HostPort" - } - } - } - }, - "additionalProperties": false, - "required": [ - "servers" - ] - }, - "Address": { - "type": "object", - "properties": { - "cidr": { - "type": "string" - }, - "config-type": { - "type": "string" - }, - "is-secondary": { - "type": "boolean" - }, - "scope": { - "type": "string" - }, - "space-id": { - "type": "string" - }, - "space-name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "value", - "type", - "scope" - ] - }, - "ApplicationCharm": { - "type": "object", - "properties": { - "charm-modified-version": { - "type": "integer" - }, - "deployment-mode": { - "type": "string" - }, - "force-upgrade": { - "type": "boolean" - }, - "sha256": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "url", - "sha256", - "charm-modified-version" - ] - }, - "ApplicationCharmResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/ApplicationCharm" - } - }, - "additionalProperties": false - }, - "ApplicationCharmResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ApplicationCharmResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "Binary": { - "type": "object", - "properties": { - "Arch": { - "type": "string" - }, - "Build": { - "type": "integer" - }, - "Major": { - "type": "integer" - }, - "Minor": { - "type": "integer" - }, - "Number": { - "$ref": "#/definitions/Number" - }, - "Patch": { - "type": "integer" - }, - "Release": { - "type": "string" - }, - "Tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Major", - "Minor", - "Tag", - "Patch", - "Build", - "Number", - "Release", - "Arch" - ] - }, - "Entities": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } - } - }, - "additionalProperties": false, - "required": [ - "entities" - ] - }, - "EntitiesVersion": { - "type": "object", - "properties": { - "agent-tools": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityVersion" - } - } - }, - "additionalProperties": false, - "required": [ - "agent-tools" - ] - }, - "Entity": { - "type": "object", - "properties": { - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "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" - ] - }, - "EntityString": { - "type": "object", - "properties": { - "tag": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "value" - ] - }, - "EntityVersion": { - "type": "object", - "properties": { - "tag": { - "type": "string" - }, - "tools": { - "$ref": "#/definitions/Version" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "tools" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "HostPort": { - "type": "object", - "properties": { - "Address": { - "$ref": "#/definitions/Address" - }, - "cidr": { - "type": "string" - }, - "config-type": { - "type": "string" - }, - "is-secondary": { - "type": "boolean" - }, - "port": { - "type": "integer" - }, - "scope": { - "type": "string" - }, - "space-id": { - "type": "string" - }, - "space-name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "value", - "type", - "scope", - "Address", - "port" - ] - }, - "LifeResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "life": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "life" - ] - }, - "LifeResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/LifeResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ModelResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "uuid": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "uuid", - "type" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "NotifyWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "Number": { - "type": "object", - "properties": { - "Build": { - "type": "integer" - }, - "Major": { - "type": "integer" - }, - "Minor": { - "type": "integer" - }, - "Patch": { - "type": "integer" - }, - "Tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Major", - "Minor", - "Tag", - "Patch", - "Build" - ] - }, - "SetPodSpecParams": { - "type": "object", - "properties": { - "specs": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityString" - } - } - }, - "additionalProperties": false, - "required": [ - "specs" - ] - }, - "SetStatus": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityStatusArgs" - } - } - }, - "additionalProperties": false, - "required": [ - "entities" - ] - }, - "StringResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "StringsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "StringsWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id" - ] - }, - "StringsWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringsWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "Version": { - "type": "object", - "properties": { - "version": { - "$ref": "#/definitions/Binary" - } - }, - "additionalProperties": false, - "required": [ - "version" - ] - }, - "WatchContainerStartArg": { - "type": "object", - "properties": { - "container": { - "type": "string" - }, - "entity": { - "$ref": "#/definitions/Entity" - } - }, - "additionalProperties": false, - "required": [ - "entity" - ] - }, - "WatchContainerStartArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/WatchContainerStartArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - } - } - } - }, - { - "Name": "CAASOperatorProvisioner", - "Description": "", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "APIAddresses": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsResult" - } - }, - "description": "APIAddresses returns the list of addresses used to connect to the API." - }, - "APIHostPorts": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/APIHostPortsResult" - } - }, - "description": "APIHostPorts returns the API server addresses." - }, - "ApplicationCharmInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entity" - }, - "Result": { - "$ref": "#/definitions/Charm" - } - }, - "description": "ApplicationCharmInfo returns information about an application's charm." - }, - "CharmInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/CharmURL" - }, - "Result": { - "$ref": "#/definitions/Charm" - } - }, - "description": "CharmInfo returns information about the requested charm." - }, - "IssueOperatorCertificate": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/IssueOperatorCertificateResults" - } - }, - "description": "IssueOperatorCertificate issues an x509 certificate for use by the specified application operator." - }, - "Life": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/LifeResults" - } - }, - "description": "Life returns the life status of every supplied entity, where available." - }, - "ModelUUID": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringResult" - } - }, - "description": "ModelUUID returns the model UUID that this facade is used to operate.\nIt is implemented here directly as a result of removing it from\nembedded APIAddresser *without* bumping the facade version.\nIt should be blanked when this facade version is next incremented." - }, - "OperatorProvisioningInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/OperatorProvisioningInfoResults" - } - }, - "description": "OperatorProvisioningInfo returns the info needed to provision an operator." - }, - "SetPasswords": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/EntityPasswords" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetPasswords sets the given password for each supplied entity, if possible." - }, - "WatchAPIHostPorts": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResult" - } - }, - "description": "WatchAPIHostPorts watches the API server addresses." - }, - "WatchApplications": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsWatchResult" - } - }, - "description": "WatchApplications starts a StringsWatcher to watch applications\ndeployed to this model." - } - }, - "definitions": { - "APIHostPortsResult": { - "type": "object", - "properties": { - "servers": { - "type": "array", - "items": { - "type": "array", - "items": { - "$ref": "#/definitions/HostPort" - } - } - } - }, - "additionalProperties": false, - "required": [ - "servers" - ] - }, - "Address": { - "type": "object", - "properties": { - "cidr": { - "type": "string" - }, - "config-type": { - "type": "string" - }, - "is-secondary": { - "type": "boolean" - }, - "scope": { - "type": "string" - }, - "space-id": { - "type": "string" - }, - "space-name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "value", - "type", - "scope" - ] - }, - "Charm": { - "type": "object", - "properties": { - "actions": { - "$ref": "#/definitions/CharmActions" - }, - "config": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmOption" - } - } - }, - "lxd-profile": { - "$ref": "#/definitions/CharmLXDProfile" - }, - "manifest": { - "$ref": "#/definitions/CharmManifest" - }, - "meta": { - "$ref": "#/definitions/CharmMeta" - }, - "metrics": { - "$ref": "#/definitions/CharmMetrics" - }, - "revision": { - "type": "integer" - }, - "url": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "revision", - "url", - "config" - ] - }, - "CharmActionSpec": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "params": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "description", - "params" - ] - }, - "CharmActions": { - "type": "object", - "properties": { - "specs": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmActionSpec" - } - } - } - }, - "additionalProperties": false - }, - "CharmBase": { - "type": "object", - "properties": { - "architectures": { - "type": "array", - "items": { - "type": "string" - } - }, - "channel": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "additionalProperties": false - }, - "CharmContainer": { - "type": "object", - "properties": { - "mounts": { - "type": "array", - "items": { - "$ref": "#/definitions/CharmMount" - } - }, - "resource": { - "type": "string" - } - }, - "additionalProperties": false - }, - "CharmDeployment": { - "type": "object", - "properties": { - "min-version": { - "type": "string" - }, - "mode": { - "type": "string" - }, - "service": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type", - "mode", - "service", - "min-version" - ] - }, - "CharmDevice": { - "type": "object", - "properties": { - "CountMax": { - "type": "integer" - }, - "CountMin": { - "type": "integer" - }, - "Description": { - "type": "string" - }, - "Name": { - "type": "string" - }, - "Type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Name", - "Description", - "Type", - "CountMin", - "CountMax" - ] - }, - "CharmLXDProfile": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "description": { - "type": "string" - }, - "devices": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - } - } - } - }, - "additionalProperties": false, - "required": [ - "config", - "description", - "devices" - ] - }, - "CharmManifest": { - "type": "object", - "properties": { - "bases": { - "type": "array", - "items": { - "$ref": "#/definitions/CharmBase" - } - } - }, - "additionalProperties": false - }, - "CharmMeta": { - "type": "object", - "properties": { - "assumes-expr": { - "$ref": "#/definitions/ExpressionTree" - }, - "categories": { - "type": "array", - "items": { - "type": "string" - } - }, - "containers": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmContainer" - } - } - }, - "deployment": { - "$ref": "#/definitions/CharmDeployment" - }, - "description": { - "type": "string" - }, - "devices": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmDevice" - } - } - }, - "extra-bindings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "min-juju-version": { - "type": "string" - }, - "name": { - "type": "string" - }, - "payload-classes": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmPayloadClass" - } - } - }, - "peers": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmRelation" - } - } - }, - "provides": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmRelation" - } - } - }, - "requires": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmRelation" - } - } - }, - "resources": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmResourceMeta" - } - } - }, - "series": { - "type": "array", - "items": { - "type": "string" - } - }, - "storage": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmStorage" - } - } - }, - "subordinate": { - "type": "boolean" - }, - "summary": { - "type": "string" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "terms": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "name", - "summary", - "description", - "subordinate" - ] - }, - "CharmMetric": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type", - "description" - ] - }, - "CharmMetrics": { - "type": "object", - "properties": { - "metrics": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmMetric" - } - } - }, - "plan": { - "$ref": "#/definitions/CharmPlan" - } - }, - "additionalProperties": false, - "required": [ - "metrics", - "plan" - ] - }, - "CharmMount": { - "type": "object", - "properties": { - "location": { - "type": "string" - }, - "storage": { - "type": "string" - } - }, - "additionalProperties": false - }, - "CharmOption": { - "type": "object", - "properties": { - "default": { - "type": "object", - "additionalProperties": true - }, - "description": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type" - ] - }, - "CharmPayloadClass": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "type" - ] - }, - "CharmPlan": { - "type": "object", - "properties": { - "required": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "required" - ] - }, - "CharmRelation": { - "type": "object", - "properties": { - "interface": { - "type": "string" - }, - "limit": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "optional": { - "type": "boolean" - }, - "role": { - "type": "string" - }, - "scope": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "role", - "interface", - "optional", - "limit", - "scope" - ] - }, - "CharmResourceMeta": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "name": { - "type": "string" - }, - "path": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "type", - "path", - "description" - ] - }, - "CharmStorage": { - "type": "object", - "properties": { - "count-max": { - "type": "integer" - }, - "count-min": { - "type": "integer" - }, - "description": { - "type": "string" - }, - "location": { - "type": "string" - }, - "minimum-size": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "properties": { - "type": "array", - "items": { - "type": "string" - } - }, - "read-only": { - "type": "boolean" - }, - "shared": { - "type": "boolean" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "description", - "type", - "shared", - "read-only", - "count-min", - "count-max", - "minimum-size" - ] - }, - "CharmURL": { - "type": "object", - "properties": { - "url": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "url" - ] - }, - "DockerImageInfo": { - "type": "object", - "properties": { - "auth": { - "type": "string" - }, - "email": { - "type": "string" - }, - "identitytoken": { - "type": "string" - }, - "image-name": { - "type": "string" - }, - "password": { - "type": "string" - }, - "registrytoken": { - "type": "string" - }, - "repository": { - "type": "string" - }, - "serveraddress": { - "type": "string" - }, - "username": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "image-name" - ] - }, - "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" - ] - }, - "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" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ExpressionTree": { - "type": "object", - "properties": { - "Expression": { - "type": "object", - "additionalProperties": true - } - }, - "additionalProperties": false, - "required": [ - "Expression" - ] - }, - "HostPort": { - "type": "object", - "properties": { - "Address": { - "$ref": "#/definitions/Address" - }, - "cidr": { - "type": "string" - }, - "config-type": { - "type": "string" - }, - "is-secondary": { - "type": "boolean" - }, - "port": { - "type": "integer" - }, - "scope": { - "type": "string" - }, - "space-id": { - "type": "string" - }, - "space-name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "value", - "type", - "scope", - "Address", - "port" - ] - }, - "IssueOperatorCertificateResult": { - "type": "object", - "properties": { - "ca-cert": { - "type": "string" - }, - "cert": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "private-key": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "ca-cert", - "cert", - "private-key" - ] - }, - "IssueOperatorCertificateResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/IssueOperatorCertificateResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "KubernetesFilesystemAttachmentParams": { - "type": "object", - "properties": { - "mount-point": { - "type": "string" - }, - "provider": { - "type": "string" - }, - "read-only": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "provider" - ] - }, - "KubernetesFilesystemParams": { - "type": "object", - "properties": { - "attachment": { - "$ref": "#/definitions/KubernetesFilesystemAttachmentParams" - }, - "attributes": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "provider": { - "type": "string" - }, - "size": { - "type": "integer" - }, - "storagename": { - "type": "string" - }, - "tags": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - } - }, - "additionalProperties": false, - "required": [ - "storagename", - "size", - "provider" - ] - }, - "LifeResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "life": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "life" - ] - }, - "LifeResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/LifeResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "Number": { - "type": "object", - "properties": { - "Build": { - "type": "integer" - }, - "Major": { - "type": "integer" - }, - "Minor": { - "type": "integer" - }, - "Patch": { - "type": "integer" - }, - "Tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Major", - "Minor", - "Tag", - "Patch", - "Build" - ] - }, - "OperatorProvisioningInfo": { - "type": "object", - "properties": { - "api-addresses": { - "type": "array", - "items": { - "type": "string" - } - }, - "base-image-details": { - "$ref": "#/definitions/DockerImageInfo" - }, - "charm-storage": { - "$ref": "#/definitions/KubernetesFilesystemParams" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "image-details": { - "$ref": "#/definitions/DockerImageInfo" - }, - "tags": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "version": { - "$ref": "#/definitions/Number" - } - }, - "additionalProperties": false, - "required": [ - "image-details", - "base-image-details", - "version", - "api-addresses" - ] - }, - "OperatorProvisioningInfoResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/OperatorProvisioningInfo" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "StringResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "StringsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "StringsWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id" - ] - } - } - } - }, - { - "Name": "CAASOperatorUpgrader", - "Description": "", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "UpgradeOperator": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/KubernetesUpgradeArg" - }, - "Result": { - "$ref": "#/definitions/ErrorResult" - } - }, - "description": "UpgradeOperator upgrades the operator for the specified agents." - } - }, - "definitions": { - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "KubernetesUpgradeArg": { - "type": "object", - "properties": { - "agent-tag": { - "type": "string" - }, - "version": { - "$ref": "#/definitions/Number" - } - }, - "additionalProperties": false, - "required": [ - "agent-tag", - "version" - ] - }, - "Number": { - "type": "object", - "properties": { - "Build": { - "type": "integer" - }, - "Major": { - "type": "integer" - }, - "Minor": { - "type": "integer" - }, - "Patch": { - "type": "integer" - }, - "Tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Major", - "Minor", - "Tag", - "Patch", - "Build" - ] - } - } - } - }, - { - "Name": "CAASUnitProvisioner", - "Description": "", - "Version": 2, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "ApplicationCharmInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entity" - }, - "Result": { - "$ref": "#/definitions/Charm" - } - }, - "description": "ApplicationCharmInfo returns information about an application's charm." - }, - "ApplicationsConfig": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ApplicationGetConfigResults" - } - }, - "description": "ApplicationsConfig returns the config for the specified applications." - }, - "ApplicationsScale": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/IntResults" - } - }, - "description": "ApplicationsScale returns the scaling info for specified applications in this model." - }, - "ApplicationsTrust": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/BoolResults" - } - }, - "description": "ApplicationsTrust returns the trust status for specified applications in this model." - }, - "CharmInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/CharmURL" - }, - "Result": { - "$ref": "#/definitions/Charm" - } - }, - "description": "CharmInfo returns information about the requested charm." - }, - "ClearApplicationsResources": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "ClearApplicationsResources clears the flags which indicate\napplications still have resources in the cluster." - }, - "DeploymentMode": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringResults" - } - }, - "description": "DeploymentMode returns the deployment mode of the given applications' charms." - }, - "Life": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/LifeResults" - } - }, - "description": "Life returns the life status of every supplied entity, where available." - }, - "ProvisioningInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/KubernetesProvisioningInfoResults" - } - }, - "description": "ProvisioningInfo returns the provisioning info for specified applications in this model." - }, - "SetOperatorStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetStatus" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetOperatorStatus updates the operator status for each given application." - }, - "UpdateApplicationsService": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/UpdateApplicationServiceArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "UpdateApplicationsService updates the Juju data model to reflect the given\nservice details of the specified application." - }, - "UpdateApplicationsUnits": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/UpdateApplicationUnitArgs" - }, - "Result": { - "$ref": "#/definitions/UpdateApplicationUnitResults" - } - }, - "description": "UpdateApplicationsUnits updates the Juju data model to reflect the given\nunits of the specified application." - }, - "Watch": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "Watch starts a NotifyWatcher for each entity given." - }, - "WatchApplications": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsWatchResult" - } - }, - "description": "WatchApplications starts a StringsWatcher to watch applications\ndeployed to this model." - }, - "WatchApplicationsScale": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "WatchApplicationsScale starts a NotifyWatcher to watch changes\nto the applications' scale." - }, - "WatchApplicationsTrustHash": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - }, - "description": "WatchApplicationsTrustHash starts a StringsWatcher to watch changes\nto the applications' trust status." - }, - "WatchPodSpec": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "WatchPodSpec starts a NotifyWatcher to watch changes to the\npod spec for specified units in this model." - } - }, - "definitions": { - "Address": { - "type": "object", - "properties": { - "cidr": { - "type": "string" - }, - "config-type": { - "type": "string" - }, - "is-secondary": { - "type": "boolean" - }, - "scope": { - "type": "string" - }, - "space-id": { - "type": "string" - }, - "space-name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "value", - "type", - "scope" - ] - }, - "ApplicationGetConfigResults": { - "type": "object", - "properties": { - "Results": { - "type": "array", - "items": { - "$ref": "#/definitions/ConfigResult" - } - } - }, - "additionalProperties": false, - "required": [ - "Results" - ] - }, - "ApplicationUnitInfo": { - "type": "object", - "properties": { - "provider-id": { - "type": "string" - }, - "unit-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "provider-id", - "unit-tag" - ] - }, - "ApplicationUnitParams": { - "type": "object", - "properties": { - "address": { - "type": "string" - }, - "data": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "filesystem-info": { - "type": "array", - "items": { - "$ref": "#/definitions/KubernetesFilesystemInfo" - } - }, - "info": { - "type": "string" - }, - "ports": { - "type": "array", - "items": { - "type": "string" - } - }, - "provider-id": { - "type": "string" - }, - "stateful": { - "type": "boolean" - }, - "status": { - "type": "string" - }, - "unit-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "provider-id", - "unit-tag", - "address", - "ports", - "status", - "info" - ] - }, - "BoolResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "BoolResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/BoolResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "Charm": { - "type": "object", - "properties": { - "actions": { - "$ref": "#/definitions/CharmActions" - }, - "config": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmOption" - } - } - }, - "lxd-profile": { - "$ref": "#/definitions/CharmLXDProfile" - }, - "manifest": { - "$ref": "#/definitions/CharmManifest" - }, - "meta": { - "$ref": "#/definitions/CharmMeta" - }, - "metrics": { - "$ref": "#/definitions/CharmMetrics" - }, - "revision": { - "type": "integer" - }, - "url": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "revision", - "url", - "config" - ] - }, - "CharmActionSpec": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "params": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "description", - "params" - ] - }, - "CharmActions": { - "type": "object", - "properties": { - "specs": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmActionSpec" - } - } - } - }, - "additionalProperties": false - }, - "CharmBase": { - "type": "object", - "properties": { - "architectures": { - "type": "array", - "items": { - "type": "string" - } - }, - "channel": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "additionalProperties": false - }, - "CharmContainer": { - "type": "object", - "properties": { - "mounts": { - "type": "array", - "items": { - "$ref": "#/definitions/CharmMount" - } - }, - "resource": { - "type": "string" - } - }, - "additionalProperties": false - }, - "CharmDeployment": { - "type": "object", - "properties": { - "min-version": { - "type": "string" - }, - "mode": { - "type": "string" - }, - "service": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type", - "mode", - "service", - "min-version" - ] - }, - "CharmDevice": { - "type": "object", - "properties": { - "CountMax": { - "type": "integer" - }, - "CountMin": { - "type": "integer" - }, - "Description": { - "type": "string" - }, - "Name": { - "type": "string" - }, - "Type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Name", - "Description", - "Type", - "CountMin", - "CountMax" - ] - }, - "CharmLXDProfile": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "description": { - "type": "string" - }, - "devices": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - } - } - } - }, - "additionalProperties": false, - "required": [ - "config", - "description", - "devices" - ] - }, - "CharmManifest": { - "type": "object", - "properties": { - "bases": { - "type": "array", - "items": { - "$ref": "#/definitions/CharmBase" - } - } - }, - "additionalProperties": false - }, - "CharmMeta": { - "type": "object", - "properties": { - "assumes-expr": { - "$ref": "#/definitions/ExpressionTree" - }, - "categories": { - "type": "array", - "items": { - "type": "string" - } - }, - "containers": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmContainer" - } - } - }, - "deployment": { - "$ref": "#/definitions/CharmDeployment" - }, - "description": { - "type": "string" - }, - "devices": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmDevice" - } - } - }, - "extra-bindings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "min-juju-version": { - "type": "string" - }, - "name": { - "type": "string" - }, - "payload-classes": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmPayloadClass" - } - } - }, - "peers": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmRelation" - } - } - }, - "provides": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmRelation" - } - } - }, - "requires": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmRelation" - } - } - }, - "resources": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmResourceMeta" - } - } - }, - "series": { - "type": "array", - "items": { - "type": "string" - } - }, - "storage": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmStorage" - } - } - }, - "subordinate": { - "type": "boolean" - }, - "summary": { - "type": "string" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "terms": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "name", - "summary", - "description", - "subordinate" - ] - }, - "CharmMetric": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type", - "description" - ] - }, - "CharmMetrics": { - "type": "object", - "properties": { - "metrics": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmMetric" - } - } - }, - "plan": { - "$ref": "#/definitions/CharmPlan" - } - }, - "additionalProperties": false, - "required": [ - "metrics", - "plan" - ] - }, - "CharmMount": { - "type": "object", - "properties": { - "location": { - "type": "string" - }, - "storage": { - "type": "string" - } - }, - "additionalProperties": false - }, - "CharmOption": { - "type": "object", - "properties": { - "default": { - "type": "object", - "additionalProperties": true - }, - "description": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type" - ] - }, - "CharmPayloadClass": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "type" - ] - }, - "CharmPlan": { - "type": "object", - "properties": { - "required": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "required" - ] - }, - "CharmRelation": { - "type": "object", - "properties": { - "interface": { - "type": "string" - }, - "limit": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "optional": { - "type": "boolean" - }, - "role": { - "type": "string" - }, - "scope": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "role", - "interface", - "optional", - "limit", - "scope" - ] - }, - "CharmResourceMeta": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "name": { - "type": "string" - }, - "path": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "type", - "path", - "description" - ] - }, - "CharmStorage": { - "type": "object", - "properties": { - "count-max": { - "type": "integer" - }, - "count-min": { - "type": "integer" - }, - "description": { - "type": "string" - }, - "location": { - "type": "string" - }, - "minimum-size": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "properties": { - "type": "array", - "items": { - "type": "string" - } - }, - "read-only": { - "type": "boolean" - }, - "shared": { - "type": "boolean" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "description", - "type", - "shared", - "read-only", - "count-min", - "count-max", - "minimum-size" - ] - }, - "CharmURL": { - "type": "object", - "properties": { - "url": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "url" - ] - }, - "ConfigResult": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "DockerImageInfo": { - "type": "object", - "properties": { - "auth": { - "type": "string" - }, - "email": { - "type": "string" - }, - "identitytoken": { - "type": "string" - }, - "image-name": { - "type": "string" - }, - "password": { - "type": "string" - }, - "registrytoken": { - "type": "string" - }, - "repository": { - "type": "string" - }, - "serveraddress": { - "type": "string" - }, - "username": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "image-name" - ] - }, - "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" - ] - }, - "EntityStatus": { - "type": "object", - "properties": { - "data": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "info": { - "type": "string" - }, - "since": { - "type": "string", - "format": "date-time" - }, - "status": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "status", - "info", - "since" - ] - }, - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ExpressionTree": { - "type": "object", - "properties": { - "Expression": { - "type": "object", - "additionalProperties": true - } - }, - "additionalProperties": false, - "required": [ - "Expression" - ] - }, - "IntResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "IntResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/IntResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "KubernetesDeploymentInfo": { - "type": "object", - "properties": { - "deployment-type": { - "type": "string" - }, - "service-type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "deployment-type", - "service-type" - ] - }, - "KubernetesDeviceParams": { - "type": "object", - "properties": { - "Attributes": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "Count": { - "type": "integer" - }, - "Type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Type", - "Count", - "Attributes" - ] - }, - "KubernetesFilesystemAttachmentParams": { - "type": "object", - "properties": { - "mount-point": { - "type": "string" - }, - "provider": { - "type": "string" - }, - "read-only": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "provider" - ] - }, - "KubernetesFilesystemInfo": { - "type": "object", - "properties": { - "data": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "filesystem-id": { - "type": "string" - }, - "info": { - "type": "string" - }, - "mount-point": { - "type": "string" - }, - "pool": { - "type": "string" - }, - "read-only": { - "type": "boolean" - }, - "size": { - "type": "integer" - }, - "status": { - "type": "string" - }, - "storagename": { - "type": "string" - }, - "volume": { - "$ref": "#/definitions/KubernetesVolumeInfo" - } - }, - "additionalProperties": false, - "required": [ - "storagename", - "pool", - "size", - "filesystem-id", - "status", - "info", - "volume" - ] - }, - "KubernetesFilesystemParams": { - "type": "object", - "properties": { - "attachment": { - "$ref": "#/definitions/KubernetesFilesystemAttachmentParams" - }, - "attributes": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "provider": { - "type": "string" - }, - "size": { - "type": "integer" - }, - "storagename": { - "type": "string" - }, - "tags": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - } - }, - "additionalProperties": false, - "required": [ - "storagename", - "size", - "provider" - ] - }, - "KubernetesProvisioningInfo": { - "type": "object", - "properties": { - "charm-modified-version": { - "type": "integer" - }, - "constraints": { - "$ref": "#/definitions/Value" - }, - "deployment-info": { - "$ref": "#/definitions/KubernetesDeploymentInfo" - }, - "devices": { - "type": "array", - "items": { - "$ref": "#/definitions/KubernetesDeviceParams" - } - }, - "filesystems": { - "type": "array", - "items": { - "$ref": "#/definitions/KubernetesFilesystemParams" - } - }, - "image-repo": { - "$ref": "#/definitions/DockerImageInfo" - }, - "pod-spec": { - "type": "string" - }, - "raw-k8s-spec": { - "type": "string" - }, - "tags": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "volumes": { - "type": "array", - "items": { - "$ref": "#/definitions/KubernetesVolumeParams" - } - } - }, - "additionalProperties": false, - "required": [ - "pod-spec", - "constraints" - ] - }, - "KubernetesProvisioningInfoResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/KubernetesProvisioningInfo" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "KubernetesProvisioningInfoResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/KubernetesProvisioningInfoResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "KubernetesVolumeAttachmentParams": { - "type": "object", - "properties": { - "provider": { - "type": "string" - }, - "read-only": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "provider" - ] - }, - "KubernetesVolumeInfo": { - "type": "object", - "properties": { - "data": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "info": { - "type": "string" - }, - "persistent": { - "type": "boolean" - }, - "pool": { - "type": "string" - }, - "size": { - "type": "integer" - }, - "status": { - "type": "string" - }, - "volume-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "volume-id", - "size", - "persistent", - "status", - "info" - ] - }, - "KubernetesVolumeParams": { - "type": "object", - "properties": { - "attachment": { - "$ref": "#/definitions/KubernetesVolumeAttachmentParams" - }, - "attributes": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "provider": { - "type": "string" - }, - "size": { - "type": "integer" - }, - "storagename": { - "type": "string" - }, - "tags": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - } - }, - "additionalProperties": false, - "required": [ - "storagename", - "size", - "provider" - ] - }, - "LifeResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "life": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "life" - ] - }, - "LifeResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/LifeResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "NotifyWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "SetStatus": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityStatusArgs" - } - } - }, - "additionalProperties": false, - "required": [ - "entities" - ] - }, - "StringResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "StringResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "StringsWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id" - ] - }, - "StringsWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringsWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "UpdateApplicationServiceArg": { - "type": "object", - "properties": { - "addresses": { - "type": "array", - "items": { - "$ref": "#/definitions/Address" - } - }, - "application-tag": { - "type": "string" - }, - "generation": { - "type": "integer" - }, - "provider-id": { - "type": "string" - }, - "scale": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "application-tag", - "provider-id", - "addresses" - ] - }, - "UpdateApplicationServiceArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/UpdateApplicationServiceArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "UpdateApplicationUnitArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/UpdateApplicationUnits" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "UpdateApplicationUnitResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "info": { - "$ref": "#/definitions/UpdateApplicationUnitsInfo" - } - }, - "additionalProperties": false - }, - "UpdateApplicationUnitResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/UpdateApplicationUnitResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "UpdateApplicationUnits": { - "type": "object", - "properties": { - "application-tag": { - "type": "string" - }, - "generation": { - "type": "integer" - }, - "scale": { - "type": "integer" - }, - "status": { - "$ref": "#/definitions/EntityStatus" - }, - "units": { - "type": "array", - "items": { - "$ref": "#/definitions/ApplicationUnitParams" - } - } - }, - "additionalProperties": false, - "required": [ - "application-tag", - "units" - ] - }, - "UpdateApplicationUnitsInfo": { - "type": "object", - "properties": { - "units": { - "type": "array", - "items": { - "$ref": "#/definitions/ApplicationUnitInfo" - } - } - }, - "additionalProperties": false, - "required": [ - "units" - ] - }, - "Value": { - "type": "object", - "properties": { - "allocate-public-ip": { - "type": "boolean" - }, - "arch": { - "type": "string" - }, - "container": { - "type": "string" - }, - "cores": { - "type": "integer" - }, - "cpu-power": { - "type": "integer" - }, - "image-id": { - "type": "string" - }, - "instance-role": { - "type": "string" - }, - "instance-type": { - "type": "string" - }, - "mem": { - "type": "integer" - }, - "root-disk": { - "type": "integer" - }, - "root-disk-source": { - "type": "string" - }, - "spaces": { - "type": "array", - "items": { - "type": "string" - } - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "virt-type": { - "type": "string" - }, - "zones": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - } - } - } - }, - { - "Name": "CharmDownloader", - "Description": "CharmDownloaderAPI implements an API for watching the charms collection for\nany entries that have not been yet downloaded to the blobstore and for\ntriggering their download.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "DownloadApplicationCharms": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "DownloadApplicationCharms iterates the list of provided applications and\ndownloads any referenced charms that have not yet been persisted to the\nblob store." - }, - "WatchApplicationsWithPendingCharms": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsWatchResult" - } - }, - "description": "WatchApplicationsWithPendingCharms registers and returns a watcher instance\nthat reports the ID of applications that reference a charm which has not yet\nbeen downloaded." - } - }, - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "StringsWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id" - ] - } - } - } - }, - { - "Name": "CharmRevisionUpdater", - "Description": "CharmRevisionUpdaterAPI implements the CharmRevisionUpdater interface and is the concrete\nimplementation of the api end point.", - "Version": 2, - "AvailableTo": [ - "controller-machine-agent" - ], - "Schema": { - "type": "object", - "properties": { - "UpdateLatestRevisions": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ErrorResult" - } - }, - "description": "UpdateLatestRevisions retrieves the latest revision information from the charm store for all deployed charms\nand records this information in state." - } - }, - "definitions": { - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - } - } - } - }, - { - "Name": "Charms", - "Description": "APIv7 provides the Charms API facade for version 7.\nv7 guarantees SupportedBases will be provided in ResolveCharms", - "Version": 7, - "AvailableTo": [ - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "AddCharm": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/AddCharmWithOrigin" - }, - "Result": { - "$ref": "#/definitions/CharmOriginResult" - } - }, - "description": "AddCharm adds the given charm URL (which must include revision) to the\nenvironment, if it does not exist yet. Local charms are not supported,\nonly charm store and charm hub URLs. See also AddLocalCharm()." - }, - "CharmInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/CharmURL" - }, - "Result": { - "$ref": "#/definitions/Charm" - } - }, - "description": "CharmInfo returns information about the requested charm." - }, - "CheckCharmPlacement": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ApplicationCharmPlacements" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "CheckCharmPlacement checks if a charm is allowed to be placed with in a\ngiven application." - }, - "GetDownloadInfos": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/CharmURLAndOrigins" - }, - "Result": { - "$ref": "#/definitions/DownloadInfoResults" - } - }, - "description": "GetDownloadInfos attempts to get the bundle corresponding to the charm url\nand origin." - }, - "IsMetered": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/CharmURL" - }, - "Result": { - "$ref": "#/definitions/IsMeteredResult" - } - }, - "description": "IsMetered returns whether or not the charm is metered.\nTODO (cderici) only used for metered charms in cmd MeteredDeployAPI,\nkept for client compatibility, remove in juju 4.0" - }, - "List": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/CharmsList" - }, - "Result": { - "$ref": "#/definitions/CharmsListResult" - } - }, - "description": "List returns a list of charm URLs currently in the state.\nIf supplied parameter contains any names, the result will\nbe filtered to return only the charms with supplied names." - }, - "ListCharmResources": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/CharmURLAndOrigins" - }, - "Result": { - "$ref": "#/definitions/CharmResourcesResults" - } - }, - "description": "ListCharmResources returns a series of resources for a given charm." - }, - "ResolveCharms": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ResolveCharmsWithChannel" - }, - "Result": { - "$ref": "#/definitions/ResolveCharmWithChannelResults" - } - }, - "description": "ResolveCharms resolves the given charm URLs with an optionally specified\npreferred channel. Channel provided via CharmOrigin." - } - }, - "definitions": { - "AddCharmWithOrigin": { - "type": "object", - "properties": { - "charm-origin": { - "$ref": "#/definitions/CharmOrigin" - }, - "force": { - "type": "boolean" - }, - "url": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "url", - "charm-origin", - "force" - ] - }, - "ApplicationCharmPlacement": { - "type": "object", - "properties": { - "application": { - "type": "string" - }, - "charm-url": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "application", - "charm-url" - ] - }, - "ApplicationCharmPlacements": { - "type": "object", - "properties": { - "placements": { - "type": "array", - "items": { - "$ref": "#/definitions/ApplicationCharmPlacement" - } - } - }, - "additionalProperties": false, - "required": [ - "placements" - ] - }, - "Base": { - "type": "object", - "properties": { - "channel": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "channel" - ] - }, - "Charm": { - "type": "object", - "properties": { - "actions": { - "$ref": "#/definitions/CharmActions" - }, - "config": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmOption" - } - } - }, - "lxd-profile": { - "$ref": "#/definitions/CharmLXDProfile" - }, - "manifest": { - "$ref": "#/definitions/CharmManifest" - }, - "meta": { - "$ref": "#/definitions/CharmMeta" - }, - "metrics": { - "$ref": "#/definitions/CharmMetrics" - }, - "revision": { - "type": "integer" - }, - "url": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "revision", - "url", - "config" - ] - }, - "CharmActionSpec": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "params": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "description", - "params" - ] - }, - "CharmActions": { - "type": "object", - "properties": { - "specs": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmActionSpec" - } - } - } - }, - "additionalProperties": false - }, - "CharmBase": { - "type": "object", - "properties": { - "architectures": { - "type": "array", - "items": { - "type": "string" - } - }, - "channel": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "additionalProperties": false - }, - "CharmContainer": { - "type": "object", - "properties": { - "mounts": { - "type": "array", - "items": { - "$ref": "#/definitions/CharmMount" - } - }, - "resource": { - "type": "string" - } - }, - "additionalProperties": false - }, - "CharmDeployment": { - "type": "object", - "properties": { - "min-version": { - "type": "string" - }, - "mode": { - "type": "string" - }, - "service": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type", - "mode", - "service", - "min-version" - ] - }, - "CharmDevice": { - "type": "object", - "properties": { - "CountMax": { - "type": "integer" - }, - "CountMin": { - "type": "integer" - }, - "Description": { - "type": "string" - }, - "Name": { - "type": "string" - }, - "Type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Name", - "Description", - "Type", - "CountMin", - "CountMax" - ] - }, - "CharmLXDProfile": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "description": { - "type": "string" - }, - "devices": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - } - } - } - }, - "additionalProperties": false, - "required": [ - "config", - "description", - "devices" - ] - }, - "CharmManifest": { - "type": "object", - "properties": { - "bases": { - "type": "array", - "items": { - "$ref": "#/definitions/CharmBase" - } - } - }, - "additionalProperties": false - }, - "CharmMeta": { - "type": "object", - "properties": { - "assumes-expr": { - "$ref": "#/definitions/ExpressionTree" - }, - "categories": { - "type": "array", - "items": { - "type": "string" - } - }, - "containers": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmContainer" - } - } - }, - "deployment": { - "$ref": "#/definitions/CharmDeployment" - }, - "description": { - "type": "string" - }, - "devices": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmDevice" - } - } - }, - "extra-bindings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "min-juju-version": { - "type": "string" - }, - "name": { - "type": "string" - }, - "payload-classes": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmPayloadClass" - } - } - }, - "peers": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmRelation" - } - } - }, - "provides": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmRelation" - } - } - }, - "requires": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmRelation" - } - } - }, - "resources": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmResourceMeta" - } - } - }, - "series": { - "type": "array", - "items": { - "type": "string" - } - }, - "storage": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmStorage" - } - } - }, - "subordinate": { - "type": "boolean" - }, - "summary": { - "type": "string" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "terms": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "name", - "summary", - "description", - "subordinate" - ] - }, - "CharmMetric": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type", - "description" - ] - }, - "CharmMetrics": { - "type": "object", - "properties": { - "metrics": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmMetric" - } - } - }, - "plan": { - "$ref": "#/definitions/CharmPlan" - } - }, - "additionalProperties": false, - "required": [ - "metrics", - "plan" - ] - }, - "CharmMount": { - "type": "object", - "properties": { - "location": { - "type": "string" - }, - "storage": { - "type": "string" - } - }, - "additionalProperties": false - }, - "CharmOption": { - "type": "object", - "properties": { - "default": { - "type": "object", - "additionalProperties": true - }, - "description": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type" - ] - }, - "CharmOrigin": { - "type": "object", - "properties": { - "architecture": { - "type": "string" - }, - "base": { - "$ref": "#/definitions/Base" - }, - "branch": { - "type": "string" - }, - "hash": { - "type": "string" - }, - "id": { - "type": "string" - }, - "instance-key": { - "type": "string" - }, - "revision": { - "type": "integer" - }, - "risk": { - "type": "string" - }, - "source": { - "type": "string" - }, - "track": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "source", - "type", - "id" - ] - }, - "CharmOriginResult": { - "type": "object", - "properties": { - "charm-origin": { - "$ref": "#/definitions/CharmOrigin" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "charm-origin" - ] - }, - "CharmPayloadClass": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "type" - ] - }, - "CharmPlan": { - "type": "object", - "properties": { - "required": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "required" - ] - }, - "CharmRelation": { - "type": "object", - "properties": { - "interface": { - "type": "string" - }, - "limit": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "optional": { - "type": "boolean" - }, - "role": { - "type": "string" - }, - "scope": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "role", - "interface", - "optional", - "limit", - "scope" - ] - }, - "CharmResource": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "fingerprint": { - "type": "array", - "items": { - "type": "integer" - } - }, - "name": { - "type": "string" - }, - "origin": { - "type": "string" - }, - "path": { - "type": "string" - }, - "revision": { - "type": "integer" - }, - "size": { - "type": "integer" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "type", - "path", - "origin", - "revision", - "fingerprint", - "size" - ] - }, - "CharmResourceMeta": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "name": { - "type": "string" - }, - "path": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "type", - "path", - "description" - ] - }, - "CharmResourceResult": { - "type": "object", - "properties": { - "CharmResource": { - "$ref": "#/definitions/CharmResource" - }, - "ErrorResult": { - "$ref": "#/definitions/ErrorResult" - }, - "description": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "fingerprint": { - "type": "array", - "items": { - "type": "integer" - } - }, - "name": { - "type": "string" - }, - "origin": { - "type": "string" - }, - "path": { - "type": "string" - }, - "revision": { - "type": "integer" - }, - "size": { - "type": "integer" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "ErrorResult", - "name", - "type", - "path", - "origin", - "revision", - "fingerprint", - "size", - "CharmResource" - ] - }, - "CharmResourcesResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "type": "array", - "items": { - "$ref": "#/definitions/CharmResourceResult" - } - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "CharmStorage": { - "type": "object", - "properties": { - "count-max": { - "type": "integer" - }, - "count-min": { - "type": "integer" - }, - "description": { - "type": "string" - }, - "location": { - "type": "string" - }, - "minimum-size": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "properties": { - "type": "array", - "items": { - "type": "string" - } - }, - "read-only": { - "type": "boolean" - }, - "shared": { - "type": "boolean" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "description", - "type", - "shared", - "read-only", - "count-min", - "count-max", - "minimum-size" - ] - }, - "CharmURL": { - "type": "object", - "properties": { - "url": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "url" - ] - }, - "CharmURLAndOrigin": { - "type": "object", - "properties": { - "charm-origin": { - "$ref": "#/definitions/CharmOrigin" - }, - "charm-url": { - "type": "string" - }, - "macaroon": { - "$ref": "#/definitions/Macaroon" - } - }, - "additionalProperties": false, - "required": [ - "charm-url", - "charm-origin" - ] - }, - "CharmURLAndOrigins": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/CharmURLAndOrigin" - } - } - }, - "additionalProperties": false, - "required": [ - "entities" - ] - }, - "CharmsList": { - "type": "object", - "properties": { - "names": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "names" - ] - }, - "CharmsListResult": { - "type": "object", - "properties": { - "charm-urls": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "charm-urls" - ] - }, - "DownloadInfoResult": { - "type": "object", - "properties": { - "charm-origin": { - "$ref": "#/definitions/CharmOrigin" - }, - "url": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "url", - "charm-origin" - ] - }, - "DownloadInfoResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/DownloadInfoResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ExpressionTree": { - "type": "object", - "properties": { - "Expression": { - "type": "object", - "additionalProperties": true - } - }, - "additionalProperties": false, - "required": [ - "Expression" - ] - }, - "IsMeteredResult": { - "type": "object", - "properties": { - "metered": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "metered" - ] - }, - "Macaroon": { - "type": "object", - "additionalProperties": false - }, - "ResolveCharmWithChannel": { - "type": "object", - "properties": { - "charm-origin": { - "$ref": "#/definitions/CharmOrigin" - }, - "reference": { - "type": "string" - }, - "switch-charm": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "reference", - "charm-origin" - ] - }, - "ResolveCharmWithChannelResult": { - "type": "object", - "properties": { - "charm-origin": { - "$ref": "#/definitions/CharmOrigin" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "supported-bases": { - "type": "array", - "items": { - "$ref": "#/definitions/Base" - } - }, - "url": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "url", - "charm-origin", - "supported-bases" - ] - }, - "ResolveCharmWithChannelResults": { - "type": "object", - "properties": { - "Results": { - "type": "array", - "items": { - "$ref": "#/definitions/ResolveCharmWithChannelResult" - } - } - }, - "additionalProperties": false, - "required": [ - "Results" - ] - }, - "ResolveCharmsWithChannel": { - "type": "object", - "properties": { - "macaroon": { - "$ref": "#/definitions/Macaroon" - }, - "resolve": { - "type": "array", - "items": { - "$ref": "#/definitions/ResolveCharmWithChannel" - } - } - }, - "additionalProperties": false, - "required": [ - "resolve" - ] - } - } - } - }, - { - "Name": "Cleaner", - "Description": "CleanerAPI implements the API used by the cleaner worker.", - "Version": 2, - "AvailableTo": [ - "controller-machine-agent" - ], - "Schema": { - "type": "object", - "properties": { - "Cleanup": { - "type": "object", - "description": "Cleanup triggers a state cleanup" - }, - "WatchCleanups": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResult" - } - }, - "description": "WatchCleanups watches for cleanups to be performed in state." - } - }, - "definitions": { - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - } - } - } - }, - { - "Name": "Client", - "Description": "Client serves client-specific API methods.", - "Version": 7, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "FindTools": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/FindToolsParams" - }, - "Result": { - "$ref": "#/definitions/FindToolsResult" - } - }, - "description": "FindTools returns a List containing all tools matching the given parameters.\nTODO(juju 3.1) - remove, used by 2.9 client only" - }, - "FullStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/StatusParams" - }, - "Result": { - "$ref": "#/definitions/FullStatus" - } - }, - "description": "FullStatus gives the information needed for juju status over the api" - }, - "StatusHistory": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/StatusHistoryRequests" - }, - "Result": { - "$ref": "#/definitions/StatusHistoryResults" - } - }, - "description": "StatusHistory returns a slice of past statuses for several entities." - }, - "WatchAll": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/AllWatcherId" - } - }, - "description": "WatchAll initiates a watcher for entities in the connected model." - } - }, - "definitions": { - "AllWatcherId": { - "type": "object", - "properties": { - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id" - ] - }, - "ApplicationOfferStatus": { - "type": "object", - "properties": { - "active-connected-count": { - "type": "integer" - }, - "application-name": { - "type": "string" - }, - "charm": { - "type": "string" - }, - "endpoints": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/RemoteEndpoint" - } - } - }, - "err": { - "$ref": "#/definitions/Error" - }, - "offer-name": { - "type": "string" - }, - "total-connected-count": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "offer-name", - "application-name", - "charm", - "endpoints", - "active-connected-count", - "total-connected-count" - ] - }, - "ApplicationStatus": { - "type": "object", - "properties": { - "base": { - "$ref": "#/definitions/Base" - }, - "can-upgrade-to": { - "type": "string" - }, - "charm": { - "type": "string" - }, - "charm-channel": { - "type": "string" - }, - "charm-profile": { - "type": "string" - }, - "charm-version": { - "type": "string" - }, - "endpoint-bindings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "err": { - "$ref": "#/definitions/Error" - }, - "exposed": { - "type": "boolean" - }, - "exposed-endpoints": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/ExposedEndpoint" - } - } - }, - "int": { - "type": "integer" - }, - "life": { - "type": "string" - }, - "meter-statuses": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/MeterStatus" - } - } - }, - "provider-id": { - "type": "string" - }, - "public-address": { - "type": "string" - }, - "relations": { - "type": "object", - "patternProperties": { - ".*": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "status": { - "$ref": "#/definitions/DetailedStatus" - }, - "subordinate-to": { - "type": "array", - "items": { - "type": "string" - } - }, - "units": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/UnitStatus" - } - } - }, - "workload-version": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "charm", - "charm-version", - "charm-profile", - "base", - "exposed", - "life", - "relations", - "can-upgrade-to", - "subordinate-to", - "units", - "meter-statuses", - "status", - "workload-version", - "endpoint-bindings", - "public-address" - ] - }, - "Base": { - "type": "object", - "properties": { - "channel": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "channel" - ] - }, - "Binary": { - "type": "object", - "properties": { - "Arch": { - "type": "string" - }, - "Build": { - "type": "integer" - }, - "Major": { - "type": "integer" - }, - "Minor": { - "type": "integer" - }, - "Number": { - "$ref": "#/definitions/Number" - }, - "Patch": { - "type": "integer" - }, - "Release": { - "type": "string" - }, - "Tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Major", - "Minor", - "Tag", - "Patch", - "Build", - "Number", - "Release", - "Arch" - ] - }, - "BranchStatus": { - "type": "object", - "properties": { - "assigned-units": { - "type": "object", - "patternProperties": { - ".*": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "created": { - "type": "integer" - }, - "created-by": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "assigned-units", - "created", - "created-by" - ] - }, - "DetailedStatus": { - "type": "object", - "properties": { - "data": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "err": { - "$ref": "#/definitions/Error" - }, - "info": { - "type": "string" - }, - "kind": { - "type": "string" - }, - "life": { - "type": "string" - }, - "since": { - "type": "string", - "format": "date-time" - }, - "status": { - "type": "string" - }, - "version": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "status", - "info", - "data", - "since", - "kind", - "version", - "life" - ] - }, - "EndpointStatus": { - "type": "object", - "properties": { - "application": { - "type": "string" - }, - "name": { - "type": "string" - }, - "role": { - "type": "string" - }, - "subordinate": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "application", - "name", - "role", - "subordinate" - ] - }, - "EntityStatus": { - "type": "object", - "properties": { - "data": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "info": { - "type": "string" - }, - "since": { - "type": "string", - "format": "date-time" - }, - "status": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "status", - "info", - "since" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ExposedEndpoint": { - "type": "object", - "properties": { - "expose-to-cidrs": { - "type": "array", - "items": { - "type": "string" - } - }, - "expose-to-spaces": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "FilesystemAttachmentDetails": { - "type": "object", - "properties": { - "FilesystemAttachmentInfo": { - "$ref": "#/definitions/FilesystemAttachmentInfo" - }, - "life": { - "type": "string" - }, - "mount-point": { - "type": "string" - }, - "read-only": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "FilesystemAttachmentInfo" - ] - }, - "FilesystemAttachmentInfo": { - "type": "object", - "properties": { - "mount-point": { - "type": "string" - }, - "read-only": { - "type": "boolean" - } - }, - "additionalProperties": false - }, - "FilesystemDetails": { - "type": "object", - "properties": { - "filesystem-tag": { - "type": "string" - }, - "info": { - "$ref": "#/definitions/FilesystemInfo" - }, - "life": { - "type": "string" - }, - "machine-attachments": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/FilesystemAttachmentDetails" - } - } - }, - "status": { - "$ref": "#/definitions/EntityStatus" - }, - "storage": { - "$ref": "#/definitions/StorageDetails" - }, - "unit-attachments": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/FilesystemAttachmentDetails" - } - } - }, - "volume-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "filesystem-tag", - "info", - "status" - ] - }, - "FilesystemInfo": { - "type": "object", - "properties": { - "filesystem-id": { - "type": "string" - }, - "pool": { - "type": "string" - }, - "size": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "filesystem-id", - "pool", - "size" - ] - }, - "FindToolsParams": { - "type": "object", - "properties": { - "agentstream": { - "type": "string" - }, - "arch": { - "type": "string" - }, - "major": { - "type": "integer" - }, - "number": { - "$ref": "#/definitions/Number" - }, - "os-type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "number", - "major", - "arch", - "os-type", - "agentstream" - ] - }, - "FindToolsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "list": { - "type": "array", - "items": { - "$ref": "#/definitions/Tools" - } - } - }, - "additionalProperties": false, - "required": [ - "list" - ] - }, - "FullStatus": { - "type": "object", - "properties": { - "applications": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/ApplicationStatus" - } - } - }, - "branches": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/BranchStatus" - } - } - }, - "controller-timestamp": { - "type": "string", - "format": "date-time" - }, - "filesystems": { - "type": "array", - "items": { - "$ref": "#/definitions/FilesystemDetails" - } - }, - "machines": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/MachineStatus" - } - } - }, - "model": { - "$ref": "#/definitions/ModelStatusInfo" - }, - "offers": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/ApplicationOfferStatus" - } - } - }, - "relations": { - "type": "array", - "items": { - "$ref": "#/definitions/RelationStatus" - } - }, - "remote-applications": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/RemoteApplicationStatus" - } - } - }, - "storage": { - "type": "array", - "items": { - "$ref": "#/definitions/StorageDetails" - } - }, - "volumes": { - "type": "array", - "items": { - "$ref": "#/definitions/VolumeDetails" - } - } - }, - "additionalProperties": false, - "required": [ - "model", - "machines", - "applications", - "remote-applications", - "offers", - "relations", - "controller-timestamp", - "branches" - ] - }, - "History": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "statuses": { - "type": "array", - "items": { - "$ref": "#/definitions/DetailedStatus" - } - } - }, - "additionalProperties": false, - "required": [ - "statuses" - ] - }, - "LXDProfile": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "description": { - "type": "string" - }, - "devices": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - } - } - } - }, - "additionalProperties": false, - "required": [ - "config", - "description", - "devices" - ] - }, - "MachineStatus": { - "type": "object", - "properties": { - "agent-status": { - "$ref": "#/definitions/DetailedStatus" - }, - "base": { - "$ref": "#/definitions/Base" - }, - "constraints": { - "type": "string" - }, - "containers": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/MachineStatus" - } - } - }, - "display-name": { - "type": "string" - }, - "dns-name": { - "type": "string" - }, - "hardware": { - "type": "string" - }, - "has-vote": { - "type": "boolean" - }, - "hostname": { - "type": "string" - }, - "id": { - "type": "string" - }, - "instance-id": { - "type": "string" - }, - "instance-status": { - "$ref": "#/definitions/DetailedStatus" - }, - "ip-addresses": { - "type": "array", - "items": { - "type": "string" - } - }, - "jobs": { - "type": "array", - "items": { - "type": "string" - } - }, - "lxd-profiles": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/LXDProfile" - } - } - }, - "modification-status": { - "$ref": "#/definitions/DetailedStatus" - }, - "network-interfaces": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/NetworkInterface" - } - } - }, - "primary-controller-machine": { - "type": "boolean" - }, - "wants-vote": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "agent-status", - "instance-status", - "modification-status", - "dns-name", - "instance-id", - "display-name", - "base", - "id", - "containers", - "constraints", - "hardware", - "jobs", - "has-vote", - "wants-vote" - ] - }, - "MeterStatus": { - "type": "object", - "properties": { - "color": { - "type": "string" - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "color", - "message" - ] - }, - "ModelStatusInfo": { - "type": "object", - "properties": { - "available-version": { - "type": "string" - }, - "cloud-tag": { - "type": "string" - }, - "meter-status": { - "$ref": "#/definitions/MeterStatus" - }, - "model-status": { - "$ref": "#/definitions/DetailedStatus" - }, - "name": { - "type": "string" - }, - "region": { - "type": "string" - }, - "sla": { - "type": "string" - }, - "type": { - "type": "string" - }, - "version": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "type", - "cloud-tag", - "version", - "available-version", - "model-status", - "meter-status", - "sla" - ] - }, - "NetworkInterface": { - "type": "object", - "properties": { - "dns-nameservers": { - "type": "array", - "items": { - "type": "string" - } - }, - "gateway": { - "type": "string" - }, - "ip-addresses": { - "type": "array", - "items": { - "type": "string" - } - }, - "is-up": { - "type": "boolean" - }, - "mac-address": { - "type": "string" - }, - "space": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "ip-addresses", - "mac-address", - "is-up" - ] - }, - "Number": { - "type": "object", - "properties": { - "Build": { - "type": "integer" - }, - "Major": { - "type": "integer" - }, - "Minor": { - "type": "integer" - }, - "Patch": { - "type": "integer" - }, - "Tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Major", - "Minor", - "Tag", - "Patch", - "Build" - ] - }, - "RelationStatus": { - "type": "object", - "properties": { - "endpoints": { - "type": "array", - "items": { - "$ref": "#/definitions/EndpointStatus" - } - }, - "id": { - "type": "integer" - }, - "interface": { - "type": "string" - }, - "key": { - "type": "string" - }, - "scope": { - "type": "string" - }, - "status": { - "$ref": "#/definitions/DetailedStatus" - } - }, - "additionalProperties": false, - "required": [ - "id", - "key", - "interface", - "scope", - "endpoints", - "status" - ] - }, - "RemoteApplicationStatus": { - "type": "object", - "properties": { - "endpoints": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoteEndpoint" - } - }, - "err": { - "$ref": "#/definitions/Error" - }, - "life": { - "type": "string" - }, - "offer-name": { - "type": "string" - }, - "offer-url": { - "type": "string" - }, - "relations": { - "type": "object", - "patternProperties": { - ".*": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "status": { - "$ref": "#/definitions/DetailedStatus" - } - }, - "additionalProperties": false, - "required": [ - "offer-url", - "offer-name", - "endpoints", - "life", - "relations", - "status" - ] - }, - "RemoteEndpoint": { - "type": "object", - "properties": { - "interface": { - "type": "string" - }, - "limit": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "role": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "role", - "interface", - "limit" - ] - }, - "StatusHistoryFilter": { - "type": "object", - "properties": { - "date": { - "type": "string", - "format": "date-time" - }, - "delta": { - "type": "integer" - }, - "exclude": { - "type": "array", - "items": { - "type": "string" - } - }, - "size": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "size", - "date", - "delta", - "exclude" - ] - }, - "StatusHistoryRequest": { - "type": "object", - "properties": { - "filter": { - "$ref": "#/definitions/StatusHistoryFilter" - }, - "historyKind": { - "type": "string" - }, - "size": { - "type": "integer" - }, - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "historyKind", - "size", - "filter", - "tag" - ] - }, - "StatusHistoryRequests": { - "type": "object", - "properties": { - "requests": { - "type": "array", - "items": { - "$ref": "#/definitions/StatusHistoryRequest" - } - } - }, - "additionalProperties": false, - "required": [ - "requests" - ] - }, - "StatusHistoryResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "history": { - "$ref": "#/definitions/History" - } - }, - "additionalProperties": false, - "required": [ - "history" - ] - }, - "StatusHistoryResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StatusHistoryResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "StatusParams": { - "type": "object", - "properties": { - "include-storage": { - "type": "boolean" - }, - "patterns": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "patterns" - ] - }, - "StorageAttachmentDetails": { - "type": "object", - "properties": { - "life": { - "type": "string" - }, - "location": { - "type": "string" - }, - "machine-tag": { - "type": "string" - }, - "storage-tag": { - "type": "string" - }, - "unit-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "storage-tag", - "unit-tag", - "machine-tag" - ] - }, - "StorageDetails": { - "type": "object", - "properties": { - "attachments": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/StorageAttachmentDetails" - } - } - }, - "kind": { - "type": "integer" - }, - "life": { - "type": "string" - }, - "owner-tag": { - "type": "string" - }, - "persistent": { - "type": "boolean" - }, - "status": { - "$ref": "#/definitions/EntityStatus" - }, - "storage-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "storage-tag", - "owner-tag", - "kind", - "status", - "persistent" - ] - }, - "Tools": { - "type": "object", - "properties": { - "sha256": { - "type": "string" - }, - "size": { - "type": "integer" - }, - "url": { - "type": "string" - }, - "version": { - "$ref": "#/definitions/Binary" - } - }, - "additionalProperties": false, - "required": [ - "version", - "url", - "size" - ] - }, - "UnitStatus": { - "type": "object", - "properties": { - "address": { - "type": "string" - }, - "agent-status": { - "$ref": "#/definitions/DetailedStatus" - }, - "charm": { - "type": "string" - }, - "leader": { - "type": "boolean" - }, - "machine": { - "type": "string" - }, - "opened-ports": { - "type": "array", - "items": { - "type": "string" - } - }, - "provider-id": { - "type": "string" - }, - "public-address": { - "type": "string" - }, - "subordinates": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/UnitStatus" - } - } - }, - "workload-status": { - "$ref": "#/definitions/DetailedStatus" - }, - "workload-version": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "agent-status", - "workload-status", - "workload-version", - "machine", - "opened-ports", - "public-address", - "charm", - "subordinates" - ] - }, - "VolumeAttachmentDetails": { - "type": "object", - "properties": { - "VolumeAttachmentInfo": { - "$ref": "#/definitions/VolumeAttachmentInfo" - }, - "bus-address": { - "type": "string" - }, - "device-link": { - "type": "string" - }, - "device-name": { - "type": "string" - }, - "life": { - "type": "string" - }, - "plan-info": { - "$ref": "#/definitions/VolumeAttachmentPlanInfo" - }, - "read-only": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "VolumeAttachmentInfo" - ] - }, - "VolumeAttachmentInfo": { - "type": "object", - "properties": { - "bus-address": { - "type": "string" - }, - "device-link": { - "type": "string" - }, - "device-name": { - "type": "string" - }, - "plan-info": { - "$ref": "#/definitions/VolumeAttachmentPlanInfo" - }, - "read-only": { - "type": "boolean" - } - }, - "additionalProperties": false - }, - "VolumeAttachmentPlanInfo": { - "type": "object", - "properties": { - "device-attributes": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "device-type": { - "type": "string" - } - }, - "additionalProperties": false - }, - "VolumeDetails": { - "type": "object", - "properties": { - "info": { - "$ref": "#/definitions/VolumeInfo" - }, - "life": { - "type": "string" - }, - "machine-attachments": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/VolumeAttachmentDetails" - } - } - }, - "status": { - "$ref": "#/definitions/EntityStatus" - }, - "storage": { - "$ref": "#/definitions/StorageDetails" - }, - "unit-attachments": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/VolumeAttachmentDetails" - } - } - }, - "volume-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "volume-tag", - "info", - "status" - ] - }, - "VolumeInfo": { - "type": "object", - "properties": { - "hardware-id": { - "type": "string" - }, - "persistent": { - "type": "boolean" - }, - "pool": { - "type": "string" - }, - "size": { - "type": "integer" - }, - "volume-id": { - "type": "string" - }, - "wwn": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "volume-id", - "size", - "persistent" - ] - } - } - } - }, - { - "Name": "Cloud", - "Description": "CloudAPI implements the cloud interface and is the concrete implementation\nof the api end point.", - "Version": 7, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "controller-user" - ], - "Schema": { - "type": "object", - "properties": { - "AddCloud": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/AddCloudArgs" - } - }, - "description": "AddCloud adds a new cloud, different from the one managed by the controller." - }, - "AddCredentials": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/TaggedCredentials" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "AddCredentials adds new credentials.\nIn contrast to UpdateCredentials() below, the new credentials can be\nfor a cloud that the controller does not manage (this is required\nfor CAAS models)" - }, - "CheckCredentialsModels": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/TaggedCredentials" - }, - "Result": { - "$ref": "#/definitions/UpdateCredentialResults" - } - }, - "description": "CheckCredentialsModels validates supplied cloud credentials' content against\nmodels that currently use these credentials.\nIf there are any models that are using a credential and these models or their\ncloud instances are not going to be accessible with corresponding credential,\nthere will be detailed validation errors per model.\nThere's no Juju API client which uses this, but JAAS does," - }, - "Cloud": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/CloudResults" - } - }, - "description": "Cloud returns the cloud definitions for the specified clouds." - }, - "CloudInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/CloudInfoResults" - } - }, - "description": "CloudInfo returns information about the specified clouds." - }, - "Clouds": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/CloudsResult" - } - }, - "description": "Clouds returns the definitions of all clouds supported by the controller\nthat the logged in user can see." - }, - "Credential": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/CloudCredentialResults" - } - }, - "description": "Credential returns the specified cloud credential for each tag, minus secrets." - }, - "CredentialContents": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/CloudCredentialArgs" - }, - "Result": { - "$ref": "#/definitions/CredentialContentResults" - } - }, - "description": "CredentialContents returns the specified cloud credentials,\nincluding the secrets if requested.\nIf no specific credential name/cloud was passed in, all credentials for this user\nare returned.\nOnly credential owner can see its contents as well as what models use it.\nController admin has no special superpowers here and is treated the same as all other users." - }, - "InstanceTypes": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/CloudInstanceTypesConstraints" - }, - "Result": { - "$ref": "#/definitions/InstanceTypesResults" - } - }, - "description": "InstanceTypes returns instance type information for the cloud and region\nin which the current model is deployed." - }, - "ListCloudInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ListCloudsRequest" - }, - "Result": { - "$ref": "#/definitions/ListCloudInfoResults" - } - }, - "description": "ListCloudInfo returns clouds that the specified user has access to.\nController admins (superuser) can list clouds for any user.\nOther users can only ask about their own clouds." - }, - "ModifyCloudAccess": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ModifyCloudAccessRequest" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "ModifyCloudAccess changes the model access granted to users." - }, - "RemoveClouds": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "RemoveClouds removes the specified clouds from the controller.\nIf a cloud is in use (has models deployed to it), the removal will fail." - }, - "RevokeCredentialsCheckModels": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RevokeCredentialArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "RevokeCredentialsCheckModels revokes a set of cloud credentials.\nIf the credentials are used by any of the models, the credential deletion will be aborted.\nIf credential-in-use needs to be revoked nonetheless, this method allows the use of force." - }, - "UpdateCloud": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/UpdateCloudArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "UpdateCloud updates an existing cloud that the controller knows about." - }, - "UpdateCredentialsCheckModels": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/UpdateCredentialArgs" - }, - "Result": { - "$ref": "#/definitions/UpdateCredentialResults" - } - }, - "description": "UpdateCredentialsCheckModels updates a set of cloud credentials' content.\nIf there are any models that are using a credential and these models\nare not going to be visible with updated credential content,\nthere will be detailed validation errors per model. Such model errors are returned\nseparately and do not contribute to the overall method error status.\nController admins can 'force' an update of the credential\nregardless of whether it is deemed valid or not." - }, - "UserCredentials": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/UserClouds" - }, - "Result": { - "$ref": "#/definitions/StringsResults" - } - }, - "description": "UserCredentials returns the cloud credentials for a set of users." - } - }, - "definitions": { - "AddCloudArgs": { - "type": "object", - "properties": { - "cloud": { - "$ref": "#/definitions/Cloud" - }, - "force": { - "type": "boolean" - }, - "name": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "cloud", - "name" - ] - }, - "Cloud": { - "type": "object", - "properties": { - "auth-types": { - "type": "array", - "items": { - "type": "string" - } - }, - "ca-certificates": { - "type": "array", - "items": { - "type": "string" - } - }, - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "endpoint": { - "type": "string" - }, - "host-cloud-region": { - "type": "string" - }, - "identity-endpoint": { - "type": "string" - }, - "is-controller-cloud": { - "type": "boolean" - }, - "region-config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - } - }, - "regions": { - "type": "array", - "items": { - "$ref": "#/definitions/CloudRegion" - } - }, - "skip-tls-verify": { - "type": "boolean" - }, - "storage-endpoint": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type" - ] - }, - "CloudCredential": { - "type": "object", - "properties": { - "attrs": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "auth-type": { - "type": "string" - }, - "redacted": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "auth-type" - ] - }, - "CloudCredentialArg": { - "type": "object", - "properties": { - "cloud-name": { - "type": "string" - }, - "credential-name": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "cloud-name", - "credential-name" - ] - }, - "CloudCredentialArgs": { - "type": "object", - "properties": { - "credentials": { - "type": "array", - "items": { - "$ref": "#/definitions/CloudCredentialArg" - } - }, - "include-secrets": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "include-secrets" - ] - }, - "CloudCredentialResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/CloudCredential" - } - }, - "additionalProperties": false - }, - "CloudCredentialResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/CloudCredentialResult" - } - } - }, - "additionalProperties": false - }, - "CloudDetails": { - "type": "object", - "properties": { - "auth-types": { - "type": "array", - "items": { - "type": "string" - } - }, - "endpoint": { - "type": "string" - }, - "identity-endpoint": { - "type": "string" - }, - "regions": { - "type": "array", - "items": { - "$ref": "#/definitions/CloudRegion" - } - }, - "storage-endpoint": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type" - ] - }, - "CloudInfo": { - "type": "object", - "properties": { - "CloudDetails": { - "$ref": "#/definitions/CloudDetails" - }, - "users": { - "type": "array", - "items": { - "$ref": "#/definitions/CloudUserInfo" - } - } - }, - "additionalProperties": false, - "required": [ - "CloudDetails", - "users" - ] - }, - "CloudInfoResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/CloudInfo" - } - }, - "additionalProperties": false - }, - "CloudInfoResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/CloudInfoResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "CloudInstanceTypesConstraint": { - "type": "object", - "properties": { - "cloud-tag": { - "type": "string" - }, - "constraints": { - "$ref": "#/definitions/Value" - }, - "region": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "cloud-tag", - "region" - ] - }, - "CloudInstanceTypesConstraints": { - "type": "object", - "properties": { - "constraints": { - "type": "array", - "items": { - "$ref": "#/definitions/CloudInstanceTypesConstraint" - } - } - }, - "additionalProperties": false, - "required": [ - "constraints" - ] - }, - "CloudRegion": { - "type": "object", - "properties": { - "endpoint": { - "type": "string" - }, - "identity-endpoint": { - "type": "string" - }, - "name": { - "type": "string" - }, - "storage-endpoint": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name" - ] - }, - "CloudResult": { - "type": "object", - "properties": { - "cloud": { - "$ref": "#/definitions/Cloud" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "CloudResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/CloudResult" - } - } - }, - "additionalProperties": false - }, - "CloudUserInfo": { - "type": "object", - "properties": { - "access": { - "type": "string" - }, - "display-name": { - "type": "string" - }, - "user": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "user", - "display-name", - "access" - ] - }, - "CloudsResult": { - "type": "object", - "properties": { - "clouds": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/Cloud" - } - } - } - }, - "additionalProperties": false - }, - "ControllerCredentialInfo": { - "type": "object", - "properties": { - "content": { - "$ref": "#/definitions/CredentialContent" - }, - "models": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelAccess" - } - } - }, - "additionalProperties": false - }, - "CredentialContent": { - "type": "object", - "properties": { - "attrs": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "auth-type": { - "type": "string" - }, - "cloud": { - "type": "string" - }, - "name": { - "type": "string" - }, - "valid": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "name", - "cloud", - "auth-type" - ] - }, - "CredentialContentResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/ControllerCredentialInfo" - } - }, - "additionalProperties": false - }, - "CredentialContentResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/CredentialContentResult" - } - } - }, - "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": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "InstanceType": { - "type": "object", - "properties": { - "arches": { - "type": "array", - "items": { - "type": "string" - } - }, - "cost": { - "type": "integer" - }, - "cpu-cores": { - "type": "integer" - }, - "memory": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "root-disk": { - "type": "integer" - }, - "virt-type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "arches", - "cpu-cores", - "memory" - ] - }, - "InstanceTypesResult": { - "type": "object", - "properties": { - "cost-currency": { - "type": "string" - }, - "cost-divisor": { - "type": "integer" - }, - "cost-unit": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "instance-types": { - "type": "array", - "items": { - "$ref": "#/definitions/InstanceType" - } - } - }, - "additionalProperties": false - }, - "InstanceTypesResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/InstanceTypesResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ListCloudInfo": { - "type": "object", - "properties": { - "CloudDetails": { - "$ref": "#/definitions/CloudDetails" - }, - "user-access": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "CloudDetails", - "user-access" - ] - }, - "ListCloudInfoResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/ListCloudInfo" - } - }, - "additionalProperties": false - }, - "ListCloudInfoResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ListCloudInfoResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ListCloudsRequest": { - "type": "object", - "properties": { - "all": { - "type": "boolean" - }, - "user-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "user-tag" - ] - }, - "ModelAccess": { - "type": "object", - "properties": { - "access": { - "type": "string" - }, - "model": { - "type": "string" - } - }, - "additionalProperties": false - }, - "ModifyCloudAccess": { - "type": "object", - "properties": { - "access": { - "type": "string" - }, - "action": { - "type": "string" - }, - "cloud-tag": { - "type": "string" - }, - "user-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "user-tag", - "cloud-tag", - "action", - "access" - ] - }, - "ModifyCloudAccessRequest": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "$ref": "#/definitions/ModifyCloudAccess" - } - } - }, - "additionalProperties": false, - "required": [ - "changes" - ] - }, - "RevokeCredentialArg": { - "type": "object", - "properties": { - "force": { - "type": "boolean" - }, - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "force" - ] - }, - "RevokeCredentialArgs": { - "type": "object", - "properties": { - "credentials": { - "type": "array", - "items": { - "$ref": "#/definitions/RevokeCredentialArg" - } - } - }, - "additionalProperties": false, - "required": [ - "credentials" - ] - }, - "StringsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "StringsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringsResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "TaggedCredential": { - "type": "object", - "properties": { - "credential": { - "$ref": "#/definitions/CloudCredential" - }, - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "credential" - ] - }, - "TaggedCredentials": { - "type": "object", - "properties": { - "credentials": { - "type": "array", - "items": { - "$ref": "#/definitions/TaggedCredential" - } - } - }, - "additionalProperties": false - }, - "UpdateCloudArgs": { - "type": "object", - "properties": { - "clouds": { - "type": "array", - "items": { - "$ref": "#/definitions/AddCloudArgs" - } - } - }, - "additionalProperties": false, - "required": [ - "clouds" - ] - }, - "UpdateCredentialArgs": { - "type": "object", - "properties": { - "credentials": { - "type": "array", - "items": { - "$ref": "#/definitions/TaggedCredential" - } - }, - "force": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "credentials", - "force" - ] - }, - "UpdateCredentialModelResult": { - "type": "object", - "properties": { - "errors": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - }, - "name": { - "type": "string" - }, - "uuid": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "uuid", - "name" - ] - }, - "UpdateCredentialResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "models": { - "type": "array", - "items": { - "$ref": "#/definitions/UpdateCredentialModelResult" - } - }, - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag" - ] - }, - "UpdateCredentialResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/UpdateCredentialResult" - } - } - }, - "additionalProperties": false - }, - "UserCloud": { - "type": "object", - "properties": { - "cloud-tag": { - "type": "string" - }, - "user-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "user-tag", - "cloud-tag" - ] - }, - "UserClouds": { - "type": "object", - "properties": { - "user-clouds": { - "type": "array", - "items": { - "$ref": "#/definitions/UserCloud" - } - } - }, - "additionalProperties": false - }, - "Value": { - "type": "object", - "properties": { - "allocate-public-ip": { - "type": "boolean" - }, - "arch": { - "type": "string" - }, - "container": { - "type": "string" - }, - "cores": { - "type": "integer" - }, - "cpu-power": { - "type": "integer" - }, - "image-id": { - "type": "string" - }, - "instance-role": { - "type": "string" - }, - "instance-type": { - "type": "string" - }, - "mem": { - "type": "integer" - }, - "root-disk": { - "type": "integer" - }, - "root-disk-source": { - "type": "string" - }, - "spaces": { - "type": "array", - "items": { - "type": "string" - } - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "virt-type": { - "type": "string" - }, - "zones": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - } - } - } - }, - { - "Name": "Controller", - "Description": "ControllerAPI provides the Controller API.", - "Version": 11, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "controller-user" - ], - "Schema": { - "type": "object", - "properties": { - "AllModels": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/UserModelList" - } - }, - "description": "AllModels allows controller administrators to get the list of all the\nmodels in the controller." - }, - "CloudSpec": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/CloudSpecResults" - } - }, - "description": "CloudSpec returns the model's cloud spec." - }, - "ConfigSet": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ControllerConfigSet" - } - }, - "description": "ConfigSet changes the value of specified controller configuration\nsettings. Only some settings can be changed after bootstrap.\nSettings that aren't specified in the params are left unchanged." - }, - "ControllerAPIInfoForModels": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ControllerAPIInfoResults" - } - }, - "description": "ControllerAPIInfoForModels returns the controller api connection details for the specified models." - }, - "ControllerConfig": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ControllerConfigResult" - } - }, - "description": "ControllerConfig returns the controller's configuration." - }, - "ControllerVersion": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ControllerVersionResults" - } - }, - "description": "ControllerVersion returns the version information associated with this\ncontroller binary.\n\nNOTE: the implementation intentionally does not check for SuperuserAccess\nas the Version is known even to users with login access." - }, - "DashboardConnectionInfo": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/DashboardConnectionInfo" - } - }, - "description": "DashboardConnectionInfo returns the connection information for a client to\nconnect to the Juju Dashboard including any proxying information." - }, - "DestroyController": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/DestroyControllerArgs" - } - }, - "description": "DestroyController destroys the controller.\n\nIf the args specify the destruction of the models, this method will\nattempt to do so. Otherwise, if the controller has any non-empty,\nnon-Dead hosted models, then an error with the code\nparams.CodeHasHostedModels will be transmitted." - }, - "GetCloudSpec": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ModelTag" - }, - "Result": { - "$ref": "#/definitions/CloudSpecResult" - } - }, - "description": "GetCloudSpec constructs the CloudSpec for a validated and authorized model." - }, - "GetControllerAccess": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/UserAccessResults" - } - }, - "description": "GetControllerAccess returns the level of access the specified users\nhave on the controller." - }, - "HostedModelConfigs": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/HostedModelConfigsResults" - } - }, - "description": "HostedModelConfigs returns all the information that the client needs in\norder to connect directly with the host model's provider and destroy it\ndirectly." - }, - "IdentityProviderURL": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringResult" - } - }, - "description": "IdentityProviderURL returns the URL of the configured external identity\nprovider for this controller or an empty string if no external identity\nprovider has been configured when the controller was bootstrapped.\n\nNOTE: the implementation intentionally does not check for SuperuserAccess\nas the URL is known even to users with login access." - }, - "InitiateMigration": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/InitiateMigrationArgs" - }, - "Result": { - "$ref": "#/definitions/InitiateMigrationResults" - } - }, - "description": "InitiateMigration attempts to begin the migration of one or\nmore models to other controllers." - }, - "ListBlockedModels": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ModelBlockInfoList" - } - }, - "description": "ListBlockedModels returns a list of all models on the controller\nwhich have a block in place. The resulting slice is sorted by model\nname, then owner. Callers must be controller administrators to retrieve the\nlist." - }, - "ModelConfig": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ModelConfigResults" - } - }, - "description": "ModelConfig returns the model config for the controller\nmodel. For information on the current model, use\nclient.ModelGet" - }, - "ModelStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ModelStatusResults" - } - }, - "description": "ModelStatus returns a summary of the model." - }, - "ModifyControllerAccess": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ModifyControllerAccessRequest" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "ModifyControllerAccess changes the model access granted to users." - }, - "MongoVersion": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringResult" - } - }, - "description": "MongoVersion allows the introspection of the mongo version per controller" - }, - "RemoveBlocks": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RemoveBlocksArgs" - } - }, - "description": "RemoveBlocks removes all the blocks in the controller." - }, - "WatchAllModelSummaries": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/SummaryWatcherID" - } - }, - "description": "WatchAllModelSummaries starts watching the summary updates from the cache.\nThis method is superuser access only, and watches all models in the\ncontroller." - }, - "WatchAllModels": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/AllWatcherId" - } - }, - "description": "WatchAllModels starts watching events for all models in the\ncontroller. The returned AllWatcherId should be used with Next on the\nAllModelWatcher endpoint to receive deltas." - }, - "WatchCloudSpecsChanges": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "WatchCloudSpecsChanges returns a watcher for cloud spec changes." - }, - "WatchModelSummaries": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/SummaryWatcherID" - } - }, - "description": "WatchModelSummaries starts watching the summary updates from the cache.\nOnly models that the user has access to are returned." - } - }, - "definitions": { - "AllWatcherId": { - "type": "object", - "properties": { - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id" - ] - }, - "CloudCredential": { - "type": "object", - "properties": { - "attrs": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "auth-type": { - "type": "string" - }, - "redacted": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "auth-type" - ] - }, - "CloudSpec": { - "type": "object", - "properties": { - "cacertificates": { - "type": "array", - "items": { - "type": "string" - } - }, - "credential": { - "$ref": "#/definitions/CloudCredential" - }, - "endpoint": { - "type": "string" - }, - "identity-endpoint": { - "type": "string" - }, - "is-controller-cloud": { - "type": "boolean" - }, - "name": { - "type": "string" - }, - "region": { - "type": "string" - }, - "skip-tls-verify": { - "type": "boolean" - }, - "storage-endpoint": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type", - "name" - ] - }, - "CloudSpecResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/CloudSpec" - } - }, - "additionalProperties": false - }, - "CloudSpecResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/CloudSpecResult" - } - } - }, - "additionalProperties": false - }, - "ConfigValue": { - "type": "object", - "properties": { - "source": { - "type": "string" - }, - "value": { - "type": "object", - "additionalProperties": true - } - }, - "additionalProperties": false, - "required": [ - "value", - "source" - ] - }, - "ControllerAPIInfoResult": { - "type": "object", - "properties": { - "addresses": { - "type": "array", - "items": { - "type": "string" - } - }, - "cacert": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "addresses", - "cacert" - ] - }, - "ControllerAPIInfoResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ControllerAPIInfoResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ControllerConfigResult": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "ControllerConfigSet": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "ControllerVersionResults": { - "type": "object", - "properties": { - "git-commit": { - "type": "string" - }, - "version": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "version", - "git-commit" - ] - }, - "DashboardConnectionInfo": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "proxy-connection": { - "$ref": "#/definitions/Proxy" - }, - "ssh-connection": { - "$ref": "#/definitions/DashboardConnectionSSHTunnel" - } - }, - "additionalProperties": false, - "required": [ - "proxy-connection", - "ssh-connection" - ] - }, - "DashboardConnectionSSHTunnel": { - "type": "object", - "properties": { - "entity": { - "type": "string" - }, - "host": { - "type": "string" - }, - "model": { - "type": "string" - }, - "port": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "host", - "port" - ] - }, - "DestroyControllerArgs": { - "type": "object", - "properties": { - "destroy-models": { - "type": "boolean" - }, - "destroy-storage": { - "type": "boolean" - }, - "force": { - "type": "boolean" - }, - "max-wait": { - "type": "integer" - }, - "model-timeout": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "destroy-models" - ] - }, - "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": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "HostedModelConfig": { - "type": "object", - "properties": { - "cloud-spec": { - "$ref": "#/definitions/CloudSpec" - }, - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "name": { - "type": "string" - }, - "owner": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "owner" - ] - }, - "HostedModelConfigsResults": { - "type": "object", - "properties": { - "models": { - "type": "array", - "items": { - "$ref": "#/definitions/HostedModelConfig" - } - } - }, - "additionalProperties": false, - "required": [ - "models" - ] - }, - "InitiateMigrationArgs": { - "type": "object", - "properties": { - "specs": { - "type": "array", - "items": { - "$ref": "#/definitions/MigrationSpec" - } - } - }, - "additionalProperties": false, - "required": [ - "specs" - ] - }, - "InitiateMigrationResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "migration-id": { - "type": "string" - }, - "model-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "model-tag", - "migration-id" - ] - }, - "InitiateMigrationResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/InitiateMigrationResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "MachineHardware": { - "type": "object", - "properties": { - "arch": { - "type": "string" - }, - "availability-zone": { - "type": "string" - }, - "cores": { - "type": "integer" - }, - "cpu-power": { - "type": "integer" - }, - "mem": { - "type": "integer" - }, - "root-disk": { - "type": "integer" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "virt-type": { - "type": "string" - } - }, - "additionalProperties": false - }, - "MigrationSpec": { - "type": "object", - "properties": { - "model-tag": { - "type": "string" - }, - "target-info": { - "$ref": "#/definitions/MigrationTargetInfo" - } - }, - "additionalProperties": false, - "required": [ - "model-tag", - "target-info" - ] - }, - "MigrationTargetInfo": { - "type": "object", - "properties": { - "addrs": { - "type": "array", - "items": { - "type": "string" - } - }, - "auth-tag": { - "type": "string" - }, - "ca-cert": { - "type": "string" - }, - "controller-alias": { - "type": "string" - }, - "controller-tag": { - "type": "string" - }, - "macaroons": { - "type": "string" - }, - "password": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "controller-tag", - "addrs", - "ca-cert", - "auth-tag" - ] - }, - "Model": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "owner-tag": { - "type": "string" - }, - "type": { - "type": "string" - }, - "uuid": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "uuid", - "type", - "owner-tag" - ] - }, - "ModelApplicationInfo": { - "type": "object", - "properties": { - "name": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name" - ] - }, - "ModelBlockInfo": { - "type": "object", - "properties": { - "blocks": { - "type": "array", - "items": { - "type": "string" - } - }, - "model-uuid": { - "type": "string" - }, - "name": { - "type": "string" - }, - "owner-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "model-uuid", - "owner-tag", - "blocks" - ] - }, - "ModelBlockInfoList": { - "type": "object", - "properties": { - "models": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelBlockInfo" - } - } - }, - "additionalProperties": false - }, - "ModelConfigResults": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/ConfigValue" - } - } - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "ModelFilesystemInfo": { - "type": "object", - "properties": { - "detachable": { - "type": "boolean" - }, - "id": { - "type": "string" - }, - "message": { - "type": "string" - }, - "provider-id": { - "type": "string" - }, - "status": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "id" - ] - }, - "ModelMachineInfo": { - "type": "object", - "properties": { - "display-name": { - "type": "string" - }, - "ha-primary": { - "type": "boolean" - }, - "hardware": { - "$ref": "#/definitions/MachineHardware" - }, - "has-vote": { - "type": "boolean" - }, - "id": { - "type": "string" - }, - "instance-id": { - "type": "string" - }, - "message": { - "type": "string" - }, - "status": { - "type": "string" - }, - "wants-vote": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "id" - ] - }, - "ModelStatus": { - "type": "object", - "properties": { - "application-count": { - "type": "integer" - }, - "applications": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelApplicationInfo" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "filesystems": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelFilesystemInfo" - } - }, - "hosted-machine-count": { - "type": "integer" - }, - "life": { - "type": "string" - }, - "machines": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelMachineInfo" - } - }, - "model-tag": { - "type": "string" - }, - "owner-tag": { - "type": "string" - }, - "type": { - "type": "string" - }, - "unit-count": { - "type": "integer" - }, - "volumes": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelVolumeInfo" - } - } - }, - "additionalProperties": false, - "required": [ - "model-tag", - "life", - "type", - "hosted-machine-count", - "application-count", - "unit-count", - "owner-tag" - ] - }, - "ModelStatusResults": { - "type": "object", - "properties": { - "models": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelStatus" - } - } - }, - "additionalProperties": false, - "required": [ - "models" - ] - }, - "ModelTag": { - "type": "object", - "additionalProperties": false - }, - "ModelVolumeInfo": { - "type": "object", - "properties": { - "detachable": { - "type": "boolean" - }, - "id": { - "type": "string" - }, - "message": { - "type": "string" - }, - "provider-id": { - "type": "string" - }, - "status": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "id" - ] - }, - "ModifyControllerAccess": { - "type": "object", - "properties": { - "access": { - "type": "string" - }, - "action": { - "type": "string" - }, - "user-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "user-tag", - "action", - "access" - ] - }, - "ModifyControllerAccessRequest": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "$ref": "#/definitions/ModifyControllerAccess" - } - } - }, - "additionalProperties": false, - "required": [ - "changes" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "NotifyWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "Proxy": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "config", - "type" - ] - }, - "RemoveBlocksArgs": { - "type": "object", - "properties": { - "all": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "all" - ] - }, - "StringResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "SummaryWatcherID": { - "type": "object", - "properties": { - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id" - ] - }, - "UserAccess": { - "type": "object", - "properties": { - "access": { - "type": "string" - }, - "user-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "user-tag", - "access" - ] - }, - "UserAccessResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/UserAccess" - } - }, - "additionalProperties": false - }, - "UserAccessResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/UserAccessResult" - } - } - }, - "additionalProperties": false - }, - "UserModel": { - "type": "object", - "properties": { - "last-connection": { - "type": "string", - "format": "date-time" - }, - "model": { - "$ref": "#/definitions/Model" - } - }, - "additionalProperties": false, - "required": [ - "model", - "last-connection" - ] - }, - "UserModelList": { - "type": "object", - "properties": { - "user-models": { - "type": "array", - "items": { - "$ref": "#/definitions/UserModel" - } - } - }, - "additionalProperties": false, - "required": [ - "user-models" - ] - } - } - } - }, - { - "Name": "CredentialManager", - "Description": "", - "Version": 1, - "AvailableTo": [ - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "InvalidateModelCredential": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/InvalidateCredentialArg" - }, - "Result": { - "$ref": "#/definitions/ErrorResult" - } - }, - "description": "InvalidateModelCredential marks the cloud credential for this model as invalid." - } - }, - "definitions": { - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "InvalidateCredentialArg": { - "type": "object", - "properties": { - "reason": { - "type": "string" - } - }, - "additionalProperties": false - } - } - } - }, - { - "Name": "CredentialValidator", - "Description": "", - "Version": 2, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "InvalidateModelCredential": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/InvalidateCredentialArg" - }, - "Result": { - "$ref": "#/definitions/ErrorResult" - } - }, - "description": "InvalidateModelCredential marks the cloud credential for this model as invalid." - }, - "ModelCredential": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ModelCredential" - } - }, - "description": "ModelCredential returns cloud credential information for a model." - }, - "WatchCredential": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entity" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResult" - } - }, - "description": "WatchCredential returns a NotifyWatcher that observes\nchanges to a given cloud credential." - }, - "WatchModelCredential": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResult" - } - }, - "description": "WatchModelCredential returns a NotifyWatcher that watches what cloud credential a model uses." - } - }, - "definitions": { - "Entity": { - "type": "object", - "properties": { - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "InvalidateCredentialArg": { - "type": "object", - "properties": { - "reason": { - "type": "string" - } - }, - "additionalProperties": false - }, - "ModelCredential": { - "type": "object", - "properties": { - "credential-tag": { - "type": "string" - }, - "exists": { - "type": "boolean" - }, - "model-tag": { - "type": "string" - }, - "valid": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "model-tag", - "credential-tag" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - } - } - } - }, - { - "Name": "CrossController", - "Description": "CrossControllerAPI provides access to the CrossModelRelations API facade.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "controller-user" - ], - "Schema": { - "type": "object", - "properties": { - "ControllerInfo": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ControllerAPIInfoResults" - } - }, - "description": "ControllerInfo returns the API info for the controller." - }, - "WatchControllerInfo": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "WatchControllerInfo creates a watcher that notifies when the API info\nfor the controller changes." - } - }, - "definitions": { - "ControllerAPIInfoResult": { - "type": "object", - "properties": { - "addresses": { - "type": "array", - "items": { - "type": "string" - } - }, - "cacert": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "addresses", - "cacert" - ] - }, - "ControllerAPIInfoResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ControllerAPIInfoResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "NotifyWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - } - } - } - }, - { - "Name": "CrossModelRelations", - "Description": "CrossModelRelationsAPI provides access to the CrossModelRelations API facade.", - "Version": 2, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "PublishIngressNetworkChanges": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/IngressNetworksChanges" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "PublishIngressNetworkChanges publishes changes to the required\ningress addresses to the model hosting the offer in the relation." - }, - "PublishRelationChanges": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RemoteRelationsChanges" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "PublishRelationChanges publishes relation changes to the\nmodel hosting the remote application involved in the relation." - }, - "RegisterRemoteRelations": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RegisterRemoteRelationArgs" - }, - "Result": { - "$ref": "#/definitions/RegisterRemoteRelationResults" - } - }, - "description": "RegisterRemoteRelations sets up the model to participate\nin the specified relations. This operation is idempotent." - }, - "WatchConsumedSecretsChanges": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/WatchRemoteSecretChangesArgs" - }, - "Result": { - "$ref": "#/definitions/SecretRevisionWatchResults" - } - }, - "description": "WatchConsumedSecretsChanges returns a watcher which notifies of changes to any secrets\nfor the specified remote consumers." - }, - "WatchEgressAddressesForRelations": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RemoteEntityArgs" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - }, - "description": "WatchEgressAddressesForRelations creates a watcher that notifies when addresses, from which\nconnections will originate for the relation, change.\nEach event contains the entire set of addresses which are required for ingress for the relation." - }, - "WatchOfferStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/OfferArgs" - }, - "Result": { - "$ref": "#/definitions/OfferStatusWatchResults" - } - }, - "description": "WatchOfferStatus starts an OfferStatusWatcher for\nwatching the status of an offer." - }, - "WatchRelationChanges": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RemoteEntityArgs" - }, - "Result": { - "$ref": "#/definitions/RemoteRelationWatchResults" - } - }, - "description": "WatchRelationChanges starts a RemoteRelationChangesWatcher for each\nspecified relation, returning the watcher IDs and initial values,\nor an error if the remote relations couldn't be watched." - }, - "WatchRelationsSuspendedStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RemoteEntityArgs" - }, - "Result": { - "$ref": "#/definitions/RelationStatusWatchResults" - } - }, - "description": "WatchRelationsSuspendedStatus starts a RelationStatusWatcher for\nwatching the life and suspended status of a relation." - } - }, - "definitions": { - "EntityStatus": { - "type": "object", - "properties": { - "data": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "info": { - "type": "string" - }, - "since": { - "type": "string", - "format": "date-time" - }, - "status": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "status", - "info", - "since" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "IngressNetworksChangeEvent": { - "type": "object", - "properties": { - "bakery-version": { - "type": "integer" - }, - "ingress-required": { - "type": "boolean" - }, - "macaroons": { - "type": "array", - "items": { - "$ref": "#/definitions/Macaroon" - } - }, - "networks": { - "type": "array", - "items": { - "type": "string" - } - }, - "relation-token": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "relation-token", - "ingress-required" - ] - }, - "IngressNetworksChanges": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "$ref": "#/definitions/IngressNetworksChangeEvent" - } - } - }, - "additionalProperties": false - }, - "Macaroon": { - "type": "object", - "additionalProperties": false - }, - "OfferArg": { - "type": "object", - "properties": { - "bakery-version": { - "type": "integer" - }, - "macaroons": { - "type": "array", - "items": { - "$ref": "#/definitions/Macaroon" - } - }, - "offer-uuid": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "offer-uuid" - ] - }, - "OfferArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/OfferArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "OfferStatusChange": { - "type": "object", - "properties": { - "offer-name": { - "type": "string" - }, - "status": { - "$ref": "#/definitions/EntityStatus" - } - }, - "additionalProperties": false, - "required": [ - "offer-name", - "status" - ] - }, - "OfferStatusWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "$ref": "#/definitions/OfferStatusChange" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id", - "changes" - ] - }, - "OfferStatusWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/OfferStatusWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "RegisterRemoteRelationArg": { - "type": "object", - "properties": { - "application-token": { - "type": "string" - }, - "bakery-version": { - "type": "integer" - }, - "consume-version": { - "type": "integer" - }, - "local-endpoint-name": { - "type": "string" - }, - "macaroons": { - "type": "array", - "items": { - "$ref": "#/definitions/Macaroon" - } - }, - "offer-uuid": { - "type": "string" - }, - "relation-token": { - "type": "string" - }, - "remote-endpoint": { - "$ref": "#/definitions/RemoteEndpoint" - }, - "remote-space": { - "$ref": "#/definitions/RemoteSpace" - }, - "source-model-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "application-token", - "source-model-tag", - "relation-token", - "remote-endpoint", - "remote-space", - "offer-uuid", - "local-endpoint-name" - ] - }, - "RegisterRemoteRelationArgs": { - "type": "object", - "properties": { - "relations": { - "type": "array", - "items": { - "$ref": "#/definitions/RegisterRemoteRelationArg" - } - } - }, - "additionalProperties": false, - "required": [ - "relations" - ] - }, - "RegisterRemoteRelationResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/RemoteRelationDetails" - } - }, - "additionalProperties": false - }, - "RegisterRemoteRelationResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/RegisterRemoteRelationResult" - } - } - }, - "additionalProperties": false - }, - "RelationLifeSuspendedStatusChange": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "life": { - "type": "string" - }, - "suspended": { - "type": "boolean" - }, - "suspended-reason": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "key", - "life", - "suspended", - "suspended-reason" - ] - }, - "RelationLifeSuspendedStatusWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "$ref": "#/definitions/RelationLifeSuspendedStatusChange" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id", - "changes" - ] - }, - "RelationStatusWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/RelationLifeSuspendedStatusWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "RemoteEndpoint": { - "type": "object", - "properties": { - "interface": { - "type": "string" - }, - "limit": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "role": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "role", - "interface", - "limit" - ] - }, - "RemoteEntityArg": { - "type": "object", - "properties": { - "bakery-version": { - "type": "integer" - }, - "macaroons": { - "type": "array", - "items": { - "$ref": "#/definitions/Macaroon" - } - }, - "relation-token": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "relation-token" - ] - }, - "RemoteEntityArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoteEntityArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "RemoteRelationChangeEvent": { - "type": "object", - "properties": { - "application-settings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "application-token": { - "type": "string" - }, - "bakery-version": { - "type": "integer" - }, - "changed-units": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoteRelationUnitChange" - } - }, - "departed-units": { - "type": "array", - "items": { - "type": "integer" - } - }, - "force-cleanup": { - "type": "boolean" - }, - "life": { - "type": "string" - }, - "macaroons": { - "type": "array", - "items": { - "$ref": "#/definitions/Macaroon" - } - }, - "relation-token": { - "type": "string" - }, - "suspended": { - "type": "boolean" - }, - "suspended-reason": { - "type": "string" - }, - "unit-count": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "relation-token", - "application-token", - "life", - "unit-count" - ] - }, - "RemoteRelationDetails": { - "type": "object", - "properties": { - "bakery-version": { - "type": "integer" - }, - "macaroon": { - "$ref": "#/definitions/Macaroon" - }, - "relation-token": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "relation-token" - ] - }, - "RemoteRelationUnitChange": { - "type": "object", - "properties": { - "settings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "unit-id": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "unit-id" - ] - }, - "RemoteRelationWatchResult": { - "type": "object", - "properties": { - "changes": { - "$ref": "#/definitions/RemoteRelationChangeEvent" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id", - "changes" - ] - }, - "RemoteRelationWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoteRelationWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "RemoteRelationsChanges": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoteRelationChangeEvent" - } - } - }, - "additionalProperties": false - }, - "RemoteSpace": { - "type": "object", - "properties": { - "cloud-type": { - "type": "string" - }, - "name": { - "type": "string" - }, - "provider-attributes": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "provider-id": { - "type": "string" - }, - "subnets": { - "type": "array", - "items": { - "$ref": "#/definitions/Subnet" - } - } - }, - "additionalProperties": false, - "required": [ - "cloud-type", - "name", - "provider-id", - "provider-attributes", - "subnets" - ] - }, - "SecretRevisionChange": { - "type": "object", - "properties": { - "revision": { - "type": "integer" - }, - "uri": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "uri", - "revision" - ] - }, - "SecretRevisionWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "$ref": "#/definitions/SecretRevisionChange" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id", - "changes" - ] - }, - "SecretRevisionWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/SecretRevisionWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "StringsWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id" - ] - }, - "StringsWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringsWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "Subnet": { - "type": "object", - "properties": { - "cidr": { - "type": "string" - }, - "life": { - "type": "string" - }, - "provider-id": { - "type": "string" - }, - "provider-network-id": { - "type": "string" - }, - "provider-space-id": { - "type": "string" - }, - "space-tag": { - "type": "string" - }, - "status": { - "type": "string" - }, - "vlan-tag": { - "type": "integer" - }, - "zones": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "cidr", - "vlan-tag", - "life", - "space-tag", - "zones" - ] - }, - "WatchRemoteSecretChangesArg": { - "type": "object", - "properties": { - "application-token": { - "type": "string" - }, - "bakery-version": { - "type": "integer" - }, - "macaroons": { - "type": "array", - "items": { - "$ref": "#/definitions/Macaroon" - } - }, - "relation-token": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "application-token", - "relation-token" - ] - }, - "WatchRemoteSecretChangesArgs": { - "type": "object", - "properties": { - "relations": { - "type": "array", - "items": { - "$ref": "#/definitions/WatchRemoteSecretChangesArg" - } - } - }, - "additionalProperties": false, - "required": [ - "relations" - ] - } - } - } - }, - { - "Name": "CrossModelSecrets", - "Description": "CrossModelSecretsAPI provides access to the CrossModelSecrets API facade.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "GetSecretAccessScope": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/GetRemoteSecretAccessArgs" - }, - "Result": { - "$ref": "#/definitions/StringResults" - } - }, - "description": "GetSecretAccessScope returns the tokens for the access scope of the specified secrets and consumers." - }, - "GetSecretContentInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/GetRemoteSecretContentArgs" - }, - "Result": { - "$ref": "#/definitions/SecretContentResults" - } - }, - "description": "GetSecretContentInfo returns the secret values for the specified secrets." - } - }, - "definitions": { - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "GetRemoteSecretAccessArg": { - "type": "object", - "properties": { - "application-token": { - "type": "string" - }, - "unit-id": { - "type": "integer" - }, - "uri": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "application-token", - "unit-id", - "uri" - ] - }, - "GetRemoteSecretAccessArgs": { - "type": "object", - "properties": { - "relations": { - "type": "array", - "items": { - "$ref": "#/definitions/GetRemoteSecretAccessArg" - } - } - }, - "additionalProperties": false, - "required": [ - "relations" - ] - }, - "GetRemoteSecretContentArg": { - "type": "object", - "properties": { - "application-token": { - "type": "string" - }, - "bakery-version": { - "type": "integer" - }, - "macaroons": { - "type": "array", - "items": { - "$ref": "#/definitions/Macaroon" - } - }, - "peek": { - "type": "boolean" - }, - "refresh": { - "type": "boolean" - }, - "revision": { - "type": "integer" - }, - "unit-id": { - "type": "integer" - }, - "uri": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "application-token", - "unit-id", - "uri" - ] - }, - "GetRemoteSecretContentArgs": { - "type": "object", - "properties": { - "relations": { - "type": "array", - "items": { - "$ref": "#/definitions/GetRemoteSecretContentArg" - } - } - }, - "additionalProperties": false, - "required": [ - "relations" - ] - }, - "Macaroon": { - "type": "object", - "additionalProperties": false - }, - "SecretBackendConfig": { - "type": "object", - "properties": { - "params": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type" - ] - }, - "SecretBackendConfigResult": { - "type": "object", - "properties": { - "config": { - "$ref": "#/definitions/SecretBackendConfig" - }, - "draining": { - "type": "boolean" - }, - "model-controller": { - "type": "string" - }, - "model-name": { - "type": "string" - }, - "model-uuid": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "model-controller", - "model-uuid", - "model-name", - "draining" - ] - }, - "SecretContentParams": { - "type": "object", - "properties": { - "data": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "value-ref": { - "$ref": "#/definitions/SecretValueRef" - } - }, - "additionalProperties": false - }, - "SecretContentResult": { - "type": "object", - "properties": { - "backend-config": { - "$ref": "#/definitions/SecretBackendConfigResult" - }, - "content": { - "$ref": "#/definitions/SecretContentParams" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "latest-revision": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "content" - ] - }, - "SecretContentResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/SecretContentResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "SecretValueRef": { - "type": "object", - "properties": { - "backend-id": { - "type": "string" - }, - "revision-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "backend-id", - "revision-id" - ] - }, - "StringResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "StringResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - } - } - } - }, - { - "Name": "Deployer", - "Description": "DeployerAPI provides access to the Deployer API facade.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent" - ], - "Schema": { - "type": "object", - "properties": { - "APIAddresses": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsResult" - } - }, - "description": "APIAddresses returns the list of addresses used to connect to the API." - }, - "APIHostPorts": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/APIHostPortsResult" - } - }, - "description": "APIHostPorts returns the API server addresses." - }, - "ConnectionInfo": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/DeployerConnectionValues" - } - }, - "description": "ConnectionInfo returns all the address information that the\ndeployer task needs in one call." - }, - "Life": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/LifeResults" - } - }, - "description": "Life returns the life status of every supplied entity, where available." - }, - "ModelUUID": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringResult" - } - }, - "description": "ModelUUID returns the model UUID that this facade is deploying into.\nIt is implemented here directly as a result of removing it from\nembedded APIAddresser *without* bumping the facade version.\nIt should be blanked when this facade version is next incremented." - }, - "Remove": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "Remove removes every given entity from state, calling EnsureDead\nfirst, then Remove. It will fail if the entity is not present." - }, - "SetPasswords": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/EntityPasswords" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetPasswords sets the given password for each supplied entity, if possible." - }, - "SetStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetStatus" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetStatus sets the status of the specified entities." - }, - "WatchAPIHostPorts": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResult" - } - }, - "description": "WatchAPIHostPorts watches the API server addresses." - }, - "WatchUnits": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - }, - "description": "WatchUnits starts a StringsWatcher to watch all units belonging to\nto any entity (machine or service) passed in args." - } - }, - "definitions": { - "APIHostPortsResult": { - "type": "object", - "properties": { - "servers": { - "type": "array", - "items": { - "type": "array", - "items": { - "$ref": "#/definitions/HostPort" - } - } - } - }, - "additionalProperties": false, - "required": [ - "servers" - ] - }, - "Address": { - "type": "object", - "properties": { - "cidr": { - "type": "string" - }, - "config-type": { - "type": "string" - }, - "is-secondary": { - "type": "boolean" - }, - "scope": { - "type": "string" - }, - "space-id": { - "type": "string" - }, - "space-name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "value", - "type", - "scope" - ] - }, - "DeployerConnectionValues": { - "type": "object", - "properties": { - "api-addresses": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "api-addresses" - ] - }, - "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" - ] - }, - "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": { - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "HostPort": { - "type": "object", - "properties": { - "Address": { - "$ref": "#/definitions/Address" - }, - "cidr": { - "type": "string" - }, - "config-type": { - "type": "string" - }, - "is-secondary": { - "type": "boolean" - }, - "port": { - "type": "integer" - }, - "scope": { - "type": "string" - }, - "space-id": { - "type": "string" - }, - "space-name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "value", - "type", - "scope", - "Address", - "port" - ] - }, - "LifeResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "life": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "life" - ] - }, - "LifeResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/LifeResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "SetStatus": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityStatusArgs" - } - } - }, - "additionalProperties": false, - "required": [ - "entities" - ] - }, - "StringResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "StringsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "StringsWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id" - ] - }, - "StringsWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringsWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - } - } - } - }, - { - "Name": "DiskManager", - "Description": "DiskManagerAPI provides access to the DiskManager API facade.", - "Version": 2, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent" - ], - "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" - }, - "SerialId": { - "type": "string" - }, - "Size": { - "type": "integer" - }, - "UUID": { - "type": "string" - }, - "WWN": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "DeviceName", - "DeviceLinks", - "Label", - "UUID", - "HardwareId", - "WWN", - "BusAddress", - "Size", - "FilesystemType", - "InUse", - "MountPoint", - "SerialId" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "MachineBlockDevices": { - "type": "object", - "properties": { - "block-devices": { - "type": "array", - "items": { - "$ref": "#/definitions/BlockDevice" - } - }, - "machine": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "machine" - ] - }, - "SetMachineBlockDevices": { - "type": "object", - "properties": { - "machine-block-devices": { - "type": "array", - "items": { - "$ref": "#/definitions/MachineBlockDevices" - } - } - }, - "additionalProperties": false, - "required": [ - "machine-block-devices" - ] - } - } - } - }, - { - "Name": "EntityWatcher", - "Description": "srvEntitiesWatcher defines the API for methods on a state.StringsWatcher.\nEach client has its own current set of watchers, stored in resources.\nsrvEntitiesWatcher notifies about changes for all entities of a given kind,\nsending the changes as a list of strings, which could be transformed\nfrom state entity ids to their corresponding entity tags.", - "Version": 2, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "Next": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/EntitiesWatchResult" - } - }, - "description": "Next returns when a change has occurred to an entity of the\ncollection being watched since the most recent call to Next\nor the Watch call that created the srvEntitiesWatcher." - }, - "Stop": { - "type": "object", - "description": "Stop stops the watcher." - } - }, - "definitions": { - "EntitiesWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - } - } - } - }, - { - "Name": "EnvironUpgrader", - "Description": "", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent" - ], - "Schema": { - "type": "object", - "properties": { - "ModelEnvironVersion": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/IntResults" - } - }, - "description": "ModelEnvironVersion returns the current version of the environ corresponding\nto each specified model." - }, - "ModelTargetEnvironVersion": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/IntResults" - } - }, - "description": "ModelTargetEnvironVersion returns the target version of the environ\ncorresponding to each specified model. The target version is the\nenviron provider's version." - }, - "SetModelEnvironVersion": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetModelEnvironVersions" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetModelEnvironVersion sets the current version of the environ corresponding\nto each specified model." - }, - "SetModelStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetStatus" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetModelStatus sets the status of each given model." - }, - "WatchModelEnvironVersion": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "WatchModelEnvironVersion watches for changes to the environ version of the\nspecified models.\n\nNOTE(axw) this is currently implemented in terms of state.Model.Watch, so\nthe client may be notified of changes unrelated to the environ version." - } - }, - "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" - ] - }, - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "IntResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "IntResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/IntResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "NotifyWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "SetModelEnvironVersion": { - "type": "object", - "properties": { - "model-tag": { - "type": "string" - }, - "version": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "model-tag", - "version" - ] - }, - "SetModelEnvironVersions": { - "type": "object", - "properties": { - "models": { - "type": "array", - "items": { - "$ref": "#/definitions/SetModelEnvironVersion" - } - } - }, - "additionalProperties": false - }, - "SetStatus": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityStatusArgs" - } - } - }, - "additionalProperties": false, - "required": [ - "entities" - ] - } - } - } - }, - { - "Name": "ExternalControllerUpdater", - "Description": "ExternalControllerUpdaterAPI provides access to the CrossModelRelations API facade.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent" - ], - "Schema": { - "type": "object", - "properties": { - "ExternalControllerInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ExternalControllerInfoResults" - } - }, - "description": "ExternalControllerInfo returns the info for the specified external controllers." - }, - "SetExternalControllerInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetExternalControllersInfoParams" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetExternalControllerInfo saves the info for the specified external controllers." - }, - "WatchExternalControllers": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - }, - "description": "WatchExternalControllers watches for the addition and removal of external\ncontroller records to the local controller's database." - } - }, - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ExternalControllerInfo": { - "type": "object", - "properties": { - "addrs": { - "type": "array", - "items": { - "type": "string" - } - }, - "ca-cert": { - "type": "string" - }, - "controller-alias": { - "type": "string" - }, - "controller-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "controller-tag", - "controller-alias", - "addrs", - "ca-cert" - ] - }, - "ExternalControllerInfoResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/ExternalControllerInfo" - } - }, - "additionalProperties": false, - "required": [ - "result", - "error" - ] - }, - "ExternalControllerInfoResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ExternalControllerInfoResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "SetExternalControllerInfoParams": { - "type": "object", - "properties": { - "info": { - "$ref": "#/definitions/ExternalControllerInfo" - } - }, - "additionalProperties": false, - "required": [ - "info" - ] - }, - "SetExternalControllersInfoParams": { - "type": "object", - "properties": { - "controllers": { - "type": "array", - "items": { - "$ref": "#/definitions/SetExternalControllerInfoParams" - } - } - }, - "additionalProperties": false, - "required": [ - "controllers" - ] - }, - "StringsWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id" - ] - }, - "StringsWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringsWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - } - } - } - }, - { - "Name": "FanConfigurer", - "Description": "", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "FanConfig": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/FanConfigResult" - } - }, - "description": "FanConfig returns current FAN configuration." - }, - "WatchForFanConfigChanges": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResult" - } - }, - "description": "WatchForFanConfigChanges returns a NotifyWatcher that observes\nchanges to the FAN configuration.\nso we use the regular error return.\nTODO(wpk) 2017-09-21 We should use Model directly, and watch only for FanConfig changes." - } - }, - "definitions": { - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "FanConfigEntry": { - "type": "object", - "properties": { - "overlay": { - "type": "string" - }, - "underlay": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "underlay", - "overlay" - ] - }, - "FanConfigResult": { - "type": "object", - "properties": { - "fans": { - "type": "array", - "items": { - "$ref": "#/definitions/FanConfigEntry" - } - } - }, - "additionalProperties": false, - "required": [ - "fans" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - } - } - } - }, - { - "Name": "FilesystemAttachmentsWatcher", - "Description": "srvMachineStorageIdsWatcher defines the API wrapping a state.StringsWatcher\nwatching machine/storage attachments. This watcher notifies about storage\nentities (volumes/filesystems) being attached to and detached from machines.\n\nTODO(axw) state needs a new watcher, this is a bt of a hack. State watchers\ncould do with some deduplication of logic, and I don't want to add to that\nspaghetti right now.", - "Version": 2, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "Next": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/MachineStorageIdsWatchResult" - } - }, - "description": "Next returns when a change has occurred to an entity of the\ncollection being watched since the most recent call to Next\nor the Watch call that created the srvMachineStorageIdsWatcher." - }, - "Stop": { - "type": "object", - "description": "Stop stops the watcher." - } - }, - "definitions": { - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "MachineStorageId": { - "type": "object", - "properties": { - "attachment-tag": { - "type": "string" - }, - "machine-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "machine-tag", - "attachment-tag" - ] - }, - "MachineStorageIdsWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "$ref": "#/definitions/MachineStorageId" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id", - "changes" - ] - } - } - } - }, - { - "Name": "Firewaller", - "Description": "FirewallerAPI provides access to the Firewaller API facade.", - "Version": 7, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "AreManuallyProvisioned": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/BoolResults" - } - }, - "description": "AreManuallyProvisioned returns whether each given entity is\nmanually provisioned or not. Only machine tags are accepted." - }, - "CloudSpec": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/CloudSpecResults" - } - }, - "description": "CloudSpec returns the model's cloud spec." - }, - "ControllerAPIInfoForModels": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ControllerAPIInfoResults" - } - }, - "description": "ControllerAPIInfoForModels returns the controller api connection details for the specified models." - }, - "ControllerConfig": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ControllerConfigResult" - } - }, - "description": "ControllerConfig returns the controller's configuration." - }, - "GetAssignedMachine": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringResults" - } - }, - "description": "GetAssignedMachine returns the assigned machine tag (if any) for\neach given unit." - }, - "GetCloudSpec": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ModelTag" - }, - "Result": { - "$ref": "#/definitions/CloudSpecResult" - } - }, - "description": "GetCloudSpec constructs the CloudSpec for a validated and authorized model." - }, - "GetExposeInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ExposeInfoResults" - } - }, - "description": "GetExposeInfo returns the expose flag and per-endpoint expose settings\nfor the specified applications." - }, - "InstanceId": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringResults" - } - }, - "description": "InstanceId returns the provider specific instance id for each given\nmachine or an CodeNotProvisioned error, if not set." - }, - "Life": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/LifeResults" - } - }, - "description": "Life returns the life status of every supplied entity, where available." - }, - "MacaroonForRelations": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/MacaroonResults" - } - }, - "description": "MacaroonForRelations returns the macaroon for the specified relations." - }, - "ModelConfig": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ModelConfigResult" - } - }, - "description": "ModelConfig returns the current model's configuration." - }, - "ModelFirewallRules": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/IngressRulesResult" - } - }, - "description": "ModelFirewallRules returns the firewall rules that this model is\nconfigured to open" - }, - "OpenedMachinePortRanges": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/OpenMachinePortRangesResults" - } - }, - "description": "OpenedMachinePortRanges returns a list of the opened port ranges for the\nspecified machines where each result is broken down by unit. The list of\nopened ports for each unit is further grouped by endpoint name and includes\nthe subnet CIDRs that belong to the space that each endpoint is bound to." - }, - "SetRelationsStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetStatus" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetRelationsStatus sets the status for the specified relations." - }, - "SpaceInfos": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SpaceInfosParams" - }, - "Result": { - "$ref": "#/definitions/SpaceInfos" - } - }, - "description": "SpaceInfos returns a comprehensive representation of either all spaces or\na filtered subset of the known spaces and their associated subnet details." - }, - "Watch": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "Watch starts an NotifyWatcher for each given entity." - }, - "WatchCloudSpecsChanges": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "WatchCloudSpecsChanges returns a watcher for cloud spec changes." - }, - "WatchEgressAddressesForRelations": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - }, - "description": "WatchEgressAddressesForRelations creates a watcher that notifies when addresses, from which\nconnections will originate for the relation, change.\nEach event contains the entire set of addresses which are required for ingress for the relation." - }, - "WatchForModelConfigChanges": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResult" - } - }, - "description": "WatchForModelConfigChanges returns a NotifyWatcher that observes\nchanges to the model configuration.\nNote that although the NotifyWatchResult contains an Error field,\nit's not used because we are only returning a single watcher,\nso we use the regular error return." - }, - "WatchIngressAddressesForRelations": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - }, - "description": "WatchIngressAddressesForRelations creates a watcher that returns the ingress networks\nthat have been recorded against the specified relations." - }, - "WatchModelFirewallRules": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResult" - } - }, - "description": "WatchModelFirewallRules returns a NotifyWatcher that notifies of\npotential changes to a model's configured firewall rules" - }, - "WatchModelMachineStartTimes": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsWatchResult" - } - }, - "description": "WatchModelMachineStartTimes watches the non-container machines in the model\nfor changes to the Life or AgentStartTime fields and reports them as a batch." - }, - "WatchModelMachines": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsWatchResult" - } - }, - "description": "WatchModelMachines returns a StringsWatcher that notifies of\nchanges to the life cycles of the top level machines in the current\nmodel." - }, - "WatchOpenedPorts": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - }, - "description": "WatchOpenedPorts returns a new StringsWatcher for each given\nmodel tag." - }, - "WatchSubnets": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResult" - } - }, - "description": "WatchSubnets returns a new StringsWatcher that watches the specified\nsubnet tags or all tags if no entities are specified." - }, - "WatchUnits": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - }, - "description": "WatchUnits starts a StringsWatcher to watch all units belonging to\nto any entity (machine or service) passed in args." - } - }, - "definitions": { - "BoolResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "BoolResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/BoolResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "CloudCredential": { - "type": "object", - "properties": { - "attrs": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "auth-type": { - "type": "string" - }, - "redacted": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "auth-type" - ] - }, - "CloudSpec": { - "type": "object", - "properties": { - "cacertificates": { - "type": "array", - "items": { - "type": "string" - } - }, - "credential": { - "$ref": "#/definitions/CloudCredential" - }, - "endpoint": { - "type": "string" - }, - "identity-endpoint": { - "type": "string" - }, - "is-controller-cloud": { - "type": "boolean" - }, - "name": { - "type": "string" - }, - "region": { - "type": "string" - }, - "skip-tls-verify": { - "type": "boolean" - }, - "storage-endpoint": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type", - "name" - ] - }, - "CloudSpecResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/CloudSpec" - } - }, - "additionalProperties": false - }, - "CloudSpecResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/CloudSpecResult" - } - } - }, - "additionalProperties": false - }, - "ControllerAPIInfoResult": { - "type": "object", - "properties": { - "addresses": { - "type": "array", - "items": { - "type": "string" - } - }, - "cacert": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "addresses", - "cacert" - ] - }, - "ControllerAPIInfoResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ControllerAPIInfoResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ControllerConfigResult": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "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" - ] - }, - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ExposeInfoResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "exposed": { - "type": "boolean" - }, - "exposed-endpoints": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/ExposedEndpoint" - } - } - } - }, - "additionalProperties": false - }, - "ExposeInfoResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ExposeInfoResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ExposedEndpoint": { - "type": "object", - "properties": { - "expose-to-cidrs": { - "type": "array", - "items": { - "type": "string" - } - }, - "expose-to-spaces": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "FanConfigEntry": { - "type": "object", - "properties": { - "overlay": { - "type": "string" - }, - "underlay": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "underlay", - "overlay" - ] - }, - "IngressRule": { - "type": "object", - "properties": { - "port-range": { - "$ref": "#/definitions/PortRange" - }, - "source-cidrs": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "port-range", - "source-cidrs" - ] - }, - "IngressRulesResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "rules": { - "type": "array", - "items": { - "$ref": "#/definitions/IngressRule" - } - } - }, - "additionalProperties": false, - "required": [ - "rules" - ] - }, - "LifeResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "life": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "life" - ] - }, - "LifeResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/LifeResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "Macaroon": { - "type": "object", - "additionalProperties": false - }, - "MacaroonResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/Macaroon" - } - }, - "additionalProperties": false - }, - "MacaroonResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/MacaroonResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ModelConfigResult": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "ModelTag": { - "type": "object", - "additionalProperties": false - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "NotifyWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "OpenMachinePortRangesResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "unit-port-ranges": { - "type": "object", - "patternProperties": { - ".*": { - "type": "array", - "items": { - "$ref": "#/definitions/OpenUnitPortRanges" - } - } - } - } - }, - "additionalProperties": false, - "required": [ - "unit-port-ranges" - ] - }, - "OpenMachinePortRangesResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/OpenMachinePortRangesResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "OpenUnitPortRanges": { - "type": "object", - "properties": { - "endpoint": { - "type": "string" - }, - "port-ranges": { - "type": "array", - "items": { - "$ref": "#/definitions/PortRange" - } - }, - "subnet-cidrs": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "endpoint", - "port-ranges", - "subnet-cidrs" - ] - }, - "PortRange": { - "type": "object", - "properties": { - "from-port": { - "type": "integer" - }, - "protocol": { - "type": "string" - }, - "to-port": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "from-port", - "to-port", - "protocol" - ] - }, - "SetStatus": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityStatusArgs" - } - } - }, - "additionalProperties": false, - "required": [ - "entities" - ] - }, - "SpaceInfo": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "provider-id": { - "type": "string" - }, - "subnets": { - "type": "array", - "items": { - "$ref": "#/definitions/SubnetV3" - } - } - }, - "additionalProperties": false, - "required": [ - "id", - "name" - ] - }, - "SpaceInfos": { - "type": "object", - "properties": { - "space-infos": { - "type": "array", - "items": { - "$ref": "#/definitions/SpaceInfo" - } - } - }, - "additionalProperties": false - }, - "SpaceInfosParams": { - "type": "object", - "properties": { - "space-ids": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "StringResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "StringResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "StringsWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id" - ] - }, - "StringsWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringsWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "Subnet": { - "type": "object", - "properties": { - "cidr": { - "type": "string" - }, - "life": { - "type": "string" - }, - "provider-id": { - "type": "string" - }, - "provider-network-id": { - "type": "string" - }, - "provider-space-id": { - "type": "string" - }, - "space-tag": { - "type": "string" - }, - "status": { - "type": "string" - }, - "vlan-tag": { - "type": "integer" - }, - "zones": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "cidr", - "vlan-tag", - "life", - "space-tag", - "zones" - ] - }, - "SubnetV2": { - "type": "object", - "properties": { - "Subnet": { - "$ref": "#/definitions/Subnet" - }, - "cidr": { - "type": "string" - }, - "id": { - "type": "string" - }, - "life": { - "type": "string" - }, - "provider-id": { - "type": "string" - }, - "provider-network-id": { - "type": "string" - }, - "provider-space-id": { - "type": "string" - }, - "space-tag": { - "type": "string" - }, - "status": { - "type": "string" - }, - "vlan-tag": { - "type": "integer" - }, - "zones": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "cidr", - "vlan-tag", - "life", - "space-tag", - "zones", - "Subnet" - ] - }, - "SubnetV3": { - "type": "object", - "properties": { - "Subnet": { - "$ref": "#/definitions/Subnet" - }, - "SubnetV2": { - "$ref": "#/definitions/SubnetV2" - }, - "cidr": { - "type": "string" - }, - "fan-info": { - "$ref": "#/definitions/FanConfigEntry" - }, - "id": { - "type": "string" - }, - "is-public": { - "type": "boolean" - }, - "life": { - "type": "string" - }, - "provider-id": { - "type": "string" - }, - "provider-network-id": { - "type": "string" - }, - "provider-space-id": { - "type": "string" - }, - "space-id": { - "type": "string" - }, - "space-tag": { - "type": "string" - }, - "status": { - "type": "string" - }, - "vlan-tag": { - "type": "integer" - }, - "zones": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "cidr", - "vlan-tag", - "life", - "space-tag", - "zones", - "Subnet", - "SubnetV2", - "space-id" - ] - } - } - } - }, - { - "Name": "HighAvailability", - "Description": "HighAvailabilityAPI implements the HighAvailability interface and is the concrete\nimplementation of the api end point.", - "Version": 2, - "AvailableTo": [ - "controller-user", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "EnableHA": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ControllersSpecs" - }, - "Result": { - "$ref": "#/definitions/ControllersChangeResults" - } - }, - "description": "EnableHA adds controller machines as necessary to ensure the\ncontroller has the number of machines specified." - } - }, - "definitions": { - "ControllersChangeResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/ControllersChanges" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "ControllersChangeResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ControllersChangeResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ControllersChanges": { - "type": "object", - "properties": { - "added": { - "type": "array", - "items": { - "type": "string" - } - }, - "converted": { - "type": "array", - "items": { - "type": "string" - } - }, - "maintained": { - "type": "array", - "items": { - "type": "string" - } - }, - "removed": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "ControllersSpec": { - "type": "object", - "properties": { - "constraints": { - "$ref": "#/definitions/Value" - }, - "num-controllers": { - "type": "integer" - }, - "placement": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "num-controllers" - ] - }, - "ControllersSpecs": { - "type": "object", - "properties": { - "specs": { - "type": "array", - "items": { - "$ref": "#/definitions/ControllersSpec" - } - } - }, - "additionalProperties": false, - "required": [ - "specs" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "Value": { - "type": "object", - "properties": { - "allocate-public-ip": { - "type": "boolean" - }, - "arch": { - "type": "string" - }, - "container": { - "type": "string" - }, - "cores": { - "type": "integer" - }, - "cpu-power": { - "type": "integer" - }, - "image-id": { - "type": "string" - }, - "instance-role": { - "type": "string" - }, - "instance-type": { - "type": "string" - }, - "mem": { - "type": "integer" - }, - "root-disk": { - "type": "integer" - }, - "root-disk-source": { - "type": "string" - }, - "spaces": { - "type": "array", - "items": { - "type": "string" - } - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "virt-type": { - "type": "string" - }, - "zones": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - } - } - } - }, - { - "Name": "HostKeyReporter", - "Description": "Facade implements the API required by the hostkeyreporter worker.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "ReportKeys": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SSHHostKeySet" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "ReportKeys sets the SSH host keys for one or more entities." - } - }, - "definitions": { - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "SSHHostKeySet": { - "type": "object", - "properties": { - "entity-keys": { - "type": "array", - "items": { - "$ref": "#/definitions/SSHHostKeys" - } - } - }, - "additionalProperties": false, - "required": [ - "entity-keys" - ] - }, - "SSHHostKeys": { - "type": "object", - "properties": { - "public-keys": { - "type": "array", - "items": { - "type": "string" - } - }, - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "public-keys" - ] - } - } - } - }, - { - "Name": "ImageMetadata", - "Description": "API is a dummy struct for compatibility.", - "Version": 3, - "AvailableTo": [ - "controller-machine-agent" - ], - "Schema": { - "type": "object", - "properties": { - "UpdateFromPublishedImages": { - "type": "object", - "description": "UpdateFromPublishedImages is now a no-op.\nIt is retained for compatibility." - } - } - } - }, - { - "Name": "ImageMetadataManager", - "Description": "API is the concrete implementation of the api end point\nfor loud image metadata manipulations.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "Delete": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/MetadataImageIds" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "Delete deletes cloud image metadata for given image ids.\nIt supports bulk calls." - }, - "List": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ImageMetadataFilter" - }, - "Result": { - "$ref": "#/definitions/ListCloudImageMetadataResult" - } - }, - "description": "List returns all found cloud image metadata that satisfy\ngiven filter.\nReturned list contains metadata ordered by priority." - }, - "Save": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/MetadataSaveParams" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "Save stores given cloud image metadata.\nIt supports bulk calls." - } - }, - "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" - }, - "source": { - "type": "string" - }, - "stream": { - "type": "string" - }, - "version": { - "type": "string" - }, - "virt-type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "image-id", - "region", - "version", - "arch", - "source", - "priority" - ] - }, - "CloudImageMetadataList": { - "type": "object", - "properties": { - "metadata": { - "type": "array", - "items": { - "$ref": "#/definitions/CloudImageMetadata" - } - } - }, - "additionalProperties": false - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "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" - }, - "stream": { - "type": "string" - }, - "versions": { - "type": "array", - "items": { - "type": "string" - } - }, - "virt-type": { - "type": "string" - } - }, - "additionalProperties": false - }, - "ListCloudImageMetadataResult": { - "type": "object", - "properties": { - "result": { - "type": "array", - "items": { - "$ref": "#/definitions/CloudImageMetadata" - } - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "MetadataImageIds": { - "type": "object", - "properties": { - "image-ids": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "image-ids" - ] - }, - "MetadataSaveParams": { - "type": "object", - "properties": { - "metadata": { - "type": "array", - "items": { - "$ref": "#/definitions/CloudImageMetadataList" - } - } - }, - "additionalProperties": false - } - } - } - }, - { - "Name": "InstanceMutater", - "Description": "", - "Version": 3, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent" - ], - "Schema": { - "type": "object", - "properties": { - "CharmProfilingInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entity" - }, - "Result": { - "$ref": "#/definitions/CharmProfilingInfoResult" - } - }, - "description": "CharmProfilingInfo returns info to update lxd profiles on the machine. If\nthe machine is not provisioned, no profile change info will be returned,\nnor will an error." - }, - "ContainerType": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entity" - }, - "Result": { - "$ref": "#/definitions/ContainerTypeResult" - } - }, - "description": "ContainerType returns the container type of a machine." - }, - "Life": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/LifeResults" - } - }, - "description": "Life returns the life status of every supplied entity, where available." - }, - "SetCharmProfiles": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetProfileArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetCharmProfiles records the given slice of charm profile names." - }, - "SetModificationStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetStatus" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetModificationStatus updates the instance whilst changes are occurring. This\nis different from SetStatus and SetInstanceStatus, by the fact this holds\ninformation about the ongoing changes that are happening to instances.\nConsider LXD Profile updates that can modify a instance, but may not cause\nthe instance to be placed into a error state. This modification status\nserves the purpose of highlighting that to the operator.\nOnly machine tags are accepted." - }, - "WatchContainers": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entity" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResult" - } - }, - "description": "WatchContainers starts a watcher to track Containers on a given\nmachine." - }, - "WatchLXDProfileVerificationNeeded": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "WatchLXDProfileVerificationNeeded starts a watcher to track Applications with\nLXD Profiles." - }, - "WatchMachines": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsWatchResult" - } - }, - "description": "WatchMachines starts a watcher to track machines.\nWatchMachines does not consume the initial event of the watch response, as\nthat returns the initial set of machines that are currently available." - }, - "WatchModelMachines": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsWatchResult" - } - }, - "description": "WatchModelMachines starts a watcher to track machines, but not containers.\nWatchModelMachines does not consume the initial event of the watch response, as\nthat returns the initial set of machines that are currently available." - } - }, - "definitions": { - "CharmLXDProfile": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "description": { - "type": "string" - }, - "devices": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - } - } - } - }, - "additionalProperties": false, - "required": [ - "config", - "description", - "devices" - ] - }, - "CharmProfilingInfoResult": { - "type": "object", - "properties": { - "current-profiles": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "instance-id": { - "type": "string" - }, - "model-name": { - "type": "string" - }, - "profile-changes": { - "type": "array", - "items": { - "$ref": "#/definitions/ProfileInfoResult" - } - } - }, - "additionalProperties": false, - "required": [ - "instance-id", - "model-name", - "profile-changes", - "current-profiles", - "error" - ] - }, - "ContainerTypeResult": { - "type": "object", - "properties": { - "container-type": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "container-type", - "error" - ] - }, - "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" - ] - }, - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "LifeResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "life": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "life" - ] - }, - "LifeResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/LifeResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "NotifyWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ProfileInfoResult": { - "type": "object", - "properties": { - "application-name": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "profile": { - "$ref": "#/definitions/CharmLXDProfile" - }, - "revision": { - "type": "integer" - } - }, - "additionalProperties": false - }, - "SetProfileArg": { - "type": "object", - "properties": { - "entity": { - "$ref": "#/definitions/Entity" - }, - "profiles": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "entity", - "profiles" - ] - }, - "SetProfileArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/SetProfileArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "SetStatus": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityStatusArgs" - } - } - }, - "additionalProperties": false, - "required": [ - "entities" - ] - }, - "StringsWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id" - ] - } - } - } - }, - { - "Name": "InstancePoller", - "Description": "InstancePollerAPI provides access to the InstancePoller API facade.", - "Version": 4, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "AreManuallyProvisioned": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/BoolResults" - } - }, - "description": "AreManuallyProvisioned returns whether each given entity is\nmanually provisioned or not. Only machine tags are accepted." - }, - "InstanceId": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringResults" - } - }, - "description": "InstanceId returns the provider specific instance id for each given\nmachine or an CodeNotProvisioned error, if not set." - }, - "InstanceStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StatusResults" - } - }, - "description": "InstanceStatus returns the instance status for each given entity.\nOnly machine tags are accepted." - }, - "Life": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/LifeResults" - } - }, - "description": "Life returns the life status of every supplied entity, where available." - }, - "ModelConfig": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ModelConfigResult" - } - }, - "description": "ModelConfig returns the current model's configuration." - }, - "ProviderAddresses": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/MachineAddressesResults" - } - }, - "description": "ProviderAddresses returns the list of all known provider addresses\nfor each given entity. Only machine tags are accepted." - }, - "SetInstanceStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetStatus" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetInstanceStatus updates the instance status for each given entity.\nOnly machine tags are accepted." - }, - "SetProviderAddresses": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetMachinesAddresses" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetProviderAddresses updates the list of known provider addresses\nfor each given entity. Only machine tags are accepted." - }, - "SetProviderNetworkConfig": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetProviderNetworkConfig" - }, - "Result": { - "$ref": "#/definitions/SetProviderNetworkConfigResults" - } - }, - "description": "SetProviderNetworkConfig updates the provider addresses for one or more\nmachines.\n\nWhat's more, if the client request includes provider-specific IDs (e.g.\nnetwork, subnet or address IDs), this method will also iterate any present\nlink layer devices (and their addresses) and merge in any missing\nprovider-specific information." - }, - "Status": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StatusResults" - } - }, - "description": "Status returns the status of each given entity." - }, - "WatchForModelConfigChanges": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResult" - } - }, - "description": "WatchForModelConfigChanges returns a NotifyWatcher that observes\nchanges to the model configuration.\nNote that although the NotifyWatchResult contains an Error field,\nit's not used because we are only returning a single watcher,\nso we use the regular error return." - }, - "WatchModelMachineStartTimes": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsWatchResult" - } - }, - "description": "WatchModelMachineStartTimes watches the non-container machines in the model\nfor changes to the Life or AgentStartTime fields and reports them as a batch." - }, - "WatchModelMachines": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsWatchResult" - } - }, - "description": "WatchModelMachines returns a StringsWatcher that notifies of\nchanges to the life cycles of the top level machines in the current\nmodel." - } - }, - "definitions": { - "Address": { - "type": "object", - "properties": { - "cidr": { - "type": "string" - }, - "config-type": { - "type": "string" - }, - "is-secondary": { - "type": "boolean" - }, - "scope": { - "type": "string" - }, - "space-id": { - "type": "string" - }, - "space-name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "value", - "type", - "scope" - ] - }, - "BoolResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "BoolResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/BoolResult" - } - } - }, - "additionalProperties": false, - "required": [ - "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" - ] - }, - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "LifeResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "life": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "life" - ] - }, - "LifeResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/LifeResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "MachineAddresses": { - "type": "object", - "properties": { - "addresses": { - "type": "array", - "items": { - "$ref": "#/definitions/Address" - } - }, - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "addresses" - ] - }, - "MachineAddressesResult": { - "type": "object", - "properties": { - "addresses": { - "type": "array", - "items": { - "$ref": "#/definitions/Address" - } - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "addresses" - ] - }, - "MachineAddressesResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/MachineAddressesResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ModelConfigResult": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "NetworkConfig": { - "type": "object", - "properties": { - "address": { - "type": "string" - }, - "addresses": { - "type": "array", - "items": { - "$ref": "#/definitions/Address" - } - }, - "cidr": { - "type": "string" - }, - "config-type": { - "type": "string" - }, - "device-index": { - "type": "integer" - }, - "disabled": { - "type": "boolean" - }, - "dns-search-domains": { - "type": "array", - "items": { - "type": "string" - } - }, - "dns-servers": { - "type": "array", - "items": { - "type": "string" - } - }, - "gateway-address": { - "type": "string" - }, - "interface-name": { - "type": "string" - }, - "interface-type": { - "type": "string" - }, - "is-default-gateway": { - "type": "boolean" - }, - "mac-address": { - "type": "string" - }, - "mtu": { - "type": "integer" - }, - "no-auto-start": { - "type": "boolean" - }, - "origin": { - "type": "string" - }, - "parent-interface-name": { - "type": "string" - }, - "provider-address-id": { - "type": "string" - }, - "provider-id": { - "type": "string" - }, - "provider-network-id": { - "type": "string" - }, - "provider-space-id": { - "type": "string" - }, - "provider-subnet-id": { - "type": "string" - }, - "provider-vlan-id": { - "type": "string" - }, - "routes": { - "type": "array", - "items": { - "$ref": "#/definitions/NetworkRoute" - } - }, - "shadow-addresses": { - "type": "array", - "items": { - "$ref": "#/definitions/Address" - } - }, - "virtual-port-type": { - "type": "string" - }, - "vlan-tag": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "device-index", - "mac-address", - "cidr", - "mtu", - "provider-id", - "provider-network-id", - "provider-subnet-id", - "provider-space-id", - "provider-address-id", - "provider-vlan-id", - "vlan-tag", - "interface-name", - "parent-interface-name", - "interface-type", - "disabled" - ] - }, - "NetworkRoute": { - "type": "object", - "properties": { - "destination-cidr": { - "type": "string" - }, - "gateway-ip": { - "type": "string" - }, - "metric": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "destination-cidr", - "gateway-ip", - "metric" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "ProviderNetworkConfig": { - "type": "object", - "properties": { - "config": { - "type": "array", - "items": { - "$ref": "#/definitions/NetworkConfig" - } - }, - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "config" - ] - }, - "SetMachinesAddresses": { - "type": "object", - "properties": { - "machine-addresses": { - "type": "array", - "items": { - "$ref": "#/definitions/MachineAddresses" - } - } - }, - "additionalProperties": false, - "required": [ - "machine-addresses" - ] - }, - "SetProviderNetworkConfig": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/ProviderNetworkConfig" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "SetProviderNetworkConfigResult": { - "type": "object", - "properties": { - "addresses": { - "type": "array", - "items": { - "$ref": "#/definitions/Address" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "modified": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "addresses", - "modified" - ] - }, - "SetProviderNetworkConfigResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/SetProviderNetworkConfigResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "SetStatus": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityStatusArgs" - } - } - }, - "additionalProperties": false, - "required": [ - "entities" - ] - }, - "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": [ - "id", - "life", - "status", - "info", - "data", - "since" - ] - }, - "StatusResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StatusResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "StringResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "StringResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "StringsWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id" - ] - } - } - } - }, - { - "Name": "KeyManager", - "Description": "KeyManagerAPI provides api endpoints for manipulating ssh keys", - "Version": 1, - "AvailableTo": [ - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "AddKeys": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ModifyUserSSHKeys" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "AddKeys adds new authorised ssh keys for the specified user." - }, - "DeleteKeys": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ModifyUserSSHKeys" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "DeleteKeys deletes the authorised ssh keys for the specified user." - }, - "ImportKeys": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ModifyUserSSHKeys" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "ImportKeys imports new authorised ssh keys from the specified key ids for the specified user." - }, - "ListKeys": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ListSSHKeys" - }, - "Result": { - "$ref": "#/definitions/StringsResults" - } - }, - "description": "ListKeys returns the authorised ssh keys for the specified users." - } - }, - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ListSSHKeys": { - "type": "object", - "properties": { - "entities": { - "$ref": "#/definitions/Entities" - }, - "mode": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "entities", - "mode" - ] - }, - "ModifyUserSSHKeys": { - "type": "object", - "properties": { - "ssh-keys": { - "type": "array", - "items": { - "type": "string" - } - }, - "user": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "user", - "ssh-keys" - ] - }, - "StringsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "StringsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringsResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - } - } - } - }, - { - "Name": "KeyUpdater", - "Description": "KeyUpdaterAPI implements the KeyUpdater interface and is the concrete\nimplementation of the api end point.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent" - ], - "Schema": { - "type": "object", - "properties": { - "AuthorisedKeys": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsResults" - } - }, - "description": "AuthorisedKeys reports the authorised ssh keys for the specified machines.\nThe current implementation relies on global authorised keys being stored in the model config.\nThis will change as new user management and authorisation functionality is added." - }, - "WatchAuthorisedKeys": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "WatchAuthorisedKeys starts a watcher to track changes to the authorised ssh keys\nfor the specified machines.\nThe current implementation relies on global authorised keys being stored in the model config.\nThis will change as new user management and authorisation functionality is added." - } - }, - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "NotifyWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "StringsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "StringsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringsResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - } - } - } - }, - { - "Name": "LeadershipService", - "Description": "LeadershipService implements a variant of leadership.Claimer for consumption\nover the API.", - "Version": 2, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "BlockUntilLeadershipReleased": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ApplicationTag" - }, - "Result": { - "$ref": "#/definitions/ErrorResult" - } - }, - "description": "BlockUntilLeadershipReleased blocks the caller until leadership is\nreleased for the given service." - }, - "ClaimLeadership": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ClaimLeadershipBulkParams" - }, - "Result": { - "$ref": "#/definitions/ClaimLeadershipBulkResults" - } - }, - "description": "ClaimLeadership makes a leadership claim with the given parameters." - } - }, - "definitions": { - "ApplicationTag": { - "type": "object", - "properties": { - "Name": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Name" - ] - }, - "ClaimLeadershipBulkParams": { - "type": "object", - "properties": { - "params": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimLeadershipParams" - } - } - }, - "additionalProperties": false, - "required": [ - "params" - ] - }, - "ClaimLeadershipBulkResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ClaimLeadershipParams": { - "type": "object", - "properties": { - "application-tag": { - "type": "string" - }, - "duration": { - "type": "number" - }, - "unit-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "application-tag", - "unit-tag", - "duration" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - } - } - } - }, - { - "Name": "LifeFlag", - "Description": "", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent" - ], - "Schema": { - "type": "object", - "properties": { - "Life": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/LifeResults" - } - }, - "description": "Life returns the life status of every supplied entity, where available." - }, - "Watch": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "Watch starts an NotifyWatcher for each given entity." - } - }, - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "LifeResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "life": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "life" - ] - }, - "LifeResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/LifeResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "NotifyWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - } - } - } - }, - { - "Name": "LogForwarding", - "Description": "LogForwardingAPI is the concrete implementation of the api end point.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent" - ], - "Schema": { - "type": "object", - "properties": { - "GetLastSent": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/LogForwardingGetLastSentParams" - }, - "Result": { - "$ref": "#/definitions/LogForwardingGetLastSentResults" - } - }, - "description": "GetLastSent is a bulk call that gets the log forwarding \"last sent\"\nrecord ID for each requested target." - }, - "SetLastSent": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/LogForwardingSetLastSentParams" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetLastSent is a bulk call that sets the log forwarding \"last sent\"\nrecord ID for each requested target." - } - }, - "definitions": { - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "LogForwardingGetLastSentParams": { - "type": "object", - "properties": { - "ids": { - "type": "array", - "items": { - "$ref": "#/definitions/LogForwardingID" - } - } - }, - "additionalProperties": false, - "required": [ - "ids" - ] - }, - "LogForwardingGetLastSentResult": { - "type": "object", - "properties": { - "err": { - "$ref": "#/definitions/Error" - }, - "record-id": { - "type": "integer" - }, - "record-timestamp": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "record-id", - "record-timestamp", - "err" - ] - }, - "LogForwardingGetLastSentResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/LogForwardingGetLastSentResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "LogForwardingID": { - "type": "object", - "properties": { - "model": { - "type": "string" - }, - "sink": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "model", - "sink" - ] - }, - "LogForwardingSetLastSentParam": { - "type": "object", - "properties": { - "LogForwardingID": { - "$ref": "#/definitions/LogForwardingID" - }, - "model": { - "type": "string" - }, - "record-id": { - "type": "integer" - }, - "record-timestamp": { - "type": "integer" - }, - "sink": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "model", - "sink", - "LogForwardingID", - "record-id", - "record-timestamp" - ] - }, - "LogForwardingSetLastSentParams": { - "type": "object", - "properties": { - "params": { - "type": "array", - "items": { - "$ref": "#/definitions/LogForwardingSetLastSentParam" - } - } - }, - "additionalProperties": false, - "required": [ - "params" - ] - } - } - } - }, - { - "Name": "Logger", - "Description": "LoggerAPI implements the Logger interface and is the concrete\nimplementation of the api end point.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "LoggingConfig": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringResults" - } - }, - "description": "LoggingConfig reports the logging configuration for the agents specified." - }, - "WatchLoggingConfig": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "WatchLoggingConfig starts a watcher to track changes to the logging config\nfor the agents specified.. Unfortunately the current infrastructure makes\nwatching parts of the config non-trivial, so currently any change to the\nconfig will cause the watcher to notify the client." - } - }, - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "NotifyWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "StringResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "StringResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - } - } - } - }, - { - "Name": "MachineActions", - "Description": "Facade implements the machineactions interface and is the concrete\nimplementation of the api end point.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent" - ], - "Schema": { - "type": "object", - "properties": { - "Actions": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ActionResults" - } - }, - "description": "Actions returns the Actions by Tags passed and ensures that the machine asking\nfor them is the machine that has the actions" - }, - "BeginActions": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "BeginActions marks the actions represented by the passed in Tags as running." - }, - "FinishActions": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ActionExecutionResults" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "FinishActions saves the result of a completed Action" - }, - "RunningActions": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ActionsByReceivers" - } - }, - "description": "RunningActions lists the actions running for the entities passed in.\nIf we end up needing more than ListRunning at some point we could follow/abstract\nwhat's done in the client actions package." - }, - "WatchActionNotifications": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - }, - "description": "WatchActionNotifications returns a StringsWatcher for observing\nincoming action calls to a machine." - } - }, - "definitions": { - "Action": { - "type": "object", - "properties": { - "execution-group": { - "type": "string" - }, - "name": { - "type": "string" - }, - "parallel": { - "type": "boolean" - }, - "parameters": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "receiver": { - "type": "string" - }, - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "receiver", - "name" - ] - }, - "ActionExecutionResult": { - "type": "object", - "properties": { - "action-tag": { - "type": "string" - }, - "message": { - "type": "string" - }, - "results": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "status": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "action-tag", - "status" - ] - }, - "ActionExecutionResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ActionExecutionResult" - } - } - }, - "additionalProperties": false - }, - "ActionMessage": { - "type": "object", - "properties": { - "message": { - "type": "string" - }, - "timestamp": { - "type": "string", - "format": "date-time" - } - }, - "additionalProperties": false, - "required": [ - "timestamp", - "message" - ] - }, - "ActionResult": { - "type": "object", - "properties": { - "action": { - "$ref": "#/definitions/Action" - }, - "completed": { - "type": "string", - "format": "date-time" - }, - "enqueued": { - "type": "string", - "format": "date-time" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "log": { - "type": "array", - "items": { - "$ref": "#/definitions/ActionMessage" - } - }, - "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": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "StringsWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id" - ] - }, - "StringsWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringsWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - } - } - } - }, - { - "Name": "MachineManager", - "Description": "MachineManagerAPI provides access to the MachineManager API facade.", - "Version": 10, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "AddMachines": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/AddMachines" - }, - "Result": { - "$ref": "#/definitions/AddMachinesResults" - } - }, - "description": "AddMachines adds new machines with the supplied parameters.\nThe args will contain Base info." - }, - "DestroyMachineWithParams": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/DestroyMachinesParams" - }, - "Result": { - "$ref": "#/definitions/DestroyMachineResults" - } - }, - "description": "DestroyMachineWithParams removes a set of machines from the model." - }, - "GetUpgradeSeriesMessages": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/UpgradeSeriesNotificationParams" - }, - "Result": { - "$ref": "#/definitions/StringsResults" - } - }, - "description": "GetUpgradeSeriesMessages returns all new messages associated with upgrade\nseries events. Messages that have already been retrieved once are not\nreturned by this method." - }, - "InstanceTypes": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ModelInstanceTypesConstraints" - }, - "Result": { - "$ref": "#/definitions/InstanceTypesResults" - } - }, - "description": "InstanceTypes returns instance type information for the cloud and region\nin which the current model is deployed." - }, - "ProvisioningScript": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ProvisioningScriptParams" - }, - "Result": { - "$ref": "#/definitions/ProvisioningScriptResult" - } - }, - "description": "ProvisioningScript returns a shell script that, when run,\nprovisions a machine agent on the machine executing the script." - }, - "RetryProvisioning": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RetryProvisioningArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "RetryProvisioning marks a provisioning error as transient on the machines." - }, - "UpgradeSeriesComplete": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/UpdateChannelArg" - }, - "Result": { - "$ref": "#/definitions/ErrorResult" - } - }, - "description": "UpgradeSeriesComplete marks a machine as having completed a managed series\nupgrade." - }, - "UpgradeSeriesPrepare": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/UpdateChannelArg" - }, - "Result": { - "$ref": "#/definitions/ErrorResult" - } - }, - "description": "UpgradeSeriesPrepare prepares a machine for a OS series upgrade." - }, - "UpgradeSeriesValidate": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/UpdateChannelArgs" - }, - "Result": { - "$ref": "#/definitions/UpgradeSeriesUnitsResults" - } - }, - "description": "UpgradeSeriesValidate validates that the incoming arguments correspond to a\nvalid series upgrade for the target machine.\nIf they do, a list of the machine's current units is returned for use in\nsoliciting user confirmation of the command." - }, - "WatchUpgradeSeriesNotifications": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "WatchUpgradeSeriesNotifications returns a watcher that fires on upgrade\nseries events." - } - }, - "definitions": { - "AddMachineParams": { - "type": "object", - "properties": { - "addresses": { - "type": "array", - "items": { - "$ref": "#/definitions/Address" - } - }, - "base": { - "$ref": "#/definitions/Base" - }, - "constraints": { - "$ref": "#/definitions/Value" - }, - "container-type": { - "type": "string" - }, - "disks": { - "type": "array", - "items": { - "$ref": "#/definitions/Constraints" - } - }, - "hardware-characteristics": { - "$ref": "#/definitions/HardwareCharacteristics" - }, - "instance-id": { - "type": "string" - }, - "jobs": { - "type": "array", - "items": { - "type": "string" - } - }, - "nonce": { - "type": "string" - }, - "parent-id": { - "type": "string" - }, - "placement": { - "$ref": "#/definitions/Placement" - } - }, - "additionalProperties": false, - "required": [ - "constraints", - "jobs", - "parent-id", - "container-type", - "instance-id", - "nonce", - "hardware-characteristics", - "addresses" - ] - }, - "AddMachines": { - "type": "object", - "properties": { - "params": { - "type": "array", - "items": { - "$ref": "#/definitions/AddMachineParams" - } - } - }, - "additionalProperties": false, - "required": [ - "params" - ] - }, - "AddMachinesResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "machine": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "machine" - ] - }, - "AddMachinesResults": { - "type": "object", - "properties": { - "machines": { - "type": "array", - "items": { - "$ref": "#/definitions/AddMachinesResult" - } - } - }, - "additionalProperties": false, - "required": [ - "machines" - ] - }, - "Address": { - "type": "object", - "properties": { - "cidr": { - "type": "string" - }, - "config-type": { - "type": "string" - }, - "is-secondary": { - "type": "boolean" - }, - "scope": { - "type": "string" - }, - "space-id": { - "type": "string" - }, - "space-name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "value", - "type", - "scope" - ] - }, - "Base": { - "type": "object", - "properties": { - "channel": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "channel" - ] - }, - "Constraints": { - "type": "object", - "properties": { - "Count": { - "type": "integer" - }, - "Pool": { - "type": "string" - }, - "Size": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "Pool", - "Size", - "Count" - ] - }, - "DestroyMachineInfo": { - "type": "object", - "properties": { - "destroyed-containers": { - "type": "array", - "items": { - "$ref": "#/definitions/DestroyMachineResult" - } - }, - "destroyed-storage": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } - }, - "destroyed-units": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } - }, - "detached-storage": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } - }, - "machine-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "machine-id" - ] - }, - "DestroyMachineResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "info": { - "$ref": "#/definitions/DestroyMachineInfo" - } - }, - "additionalProperties": false - }, - "DestroyMachineResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/DestroyMachineResult" - } - } - }, - "additionalProperties": false - }, - "DestroyMachinesParams": { - "type": "object", - "properties": { - "dry-run": { - "type": "boolean" - }, - "force": { - "type": "boolean" - }, - "keep": { - "type": "boolean" - }, - "machine-tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "max-wait": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "machine-tags" - ] - }, - "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": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "HardwareCharacteristics": { - "type": "object", - "properties": { - "arch": { - "type": "string" - }, - "availability-zone": { - "type": "string" - }, - "cpu-cores": { - "type": "integer" - }, - "cpu-power": { - "type": "integer" - }, - "mem": { - "type": "integer" - }, - "root-disk": { - "type": "integer" - }, - "root-disk-source": { - "type": "string" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "virt-type": { - "type": "string" - } - }, - "additionalProperties": false - }, - "InstanceType": { - "type": "object", - "properties": { - "arches": { - "type": "array", - "items": { - "type": "string" - } - }, - "cost": { - "type": "integer" - }, - "cpu-cores": { - "type": "integer" - }, - "memory": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "root-disk": { - "type": "integer" - }, - "virt-type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "arches", - "cpu-cores", - "memory" - ] - }, - "InstanceTypesResult": { - "type": "object", - "properties": { - "cost-currency": { - "type": "string" - }, - "cost-divisor": { - "type": "integer" - }, - "cost-unit": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "instance-types": { - "type": "array", - "items": { - "$ref": "#/definitions/InstanceType" - } - } - }, - "additionalProperties": false - }, - "InstanceTypesResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/InstanceTypesResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ModelInstanceTypesConstraint": { - "type": "object", - "properties": { - "value": { - "$ref": "#/definitions/Value" - } - }, - "additionalProperties": false - }, - "ModelInstanceTypesConstraints": { - "type": "object", - "properties": { - "constraints": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelInstanceTypesConstraint" - } - } - }, - "additionalProperties": false, - "required": [ - "constraints" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "NotifyWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "Placement": { - "type": "object", - "properties": { - "directive": { - "type": "string" - }, - "scope": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "scope", - "directive" - ] - }, - "ProvisioningScriptParams": { - "type": "object", - "properties": { - "data-dir": { - "type": "string" - }, - "disable-package-commands": { - "type": "boolean" - }, - "machine-id": { - "type": "string" - }, - "nonce": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "machine-id", - "nonce", - "data-dir", - "disable-package-commands" - ] - }, - "ProvisioningScriptResult": { - "type": "object", - "properties": { - "script": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "script" - ] - }, - "RetryProvisioningArgs": { - "type": "object", - "properties": { - "all": { - "type": "boolean" - }, - "machines": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "all" - ] - }, - "StringsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "StringsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringsResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "UpdateChannelArg": { - "type": "object", - "properties": { - "channel": { - "type": "string" - }, - "force": { - "type": "boolean" - }, - "tag": { - "$ref": "#/definitions/Entity" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "force", - "channel" - ] - }, - "UpdateChannelArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/UpdateChannelArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "UpgradeSeriesNotificationParam": { - "type": "object", - "properties": { - "entity": { - "$ref": "#/definitions/Entity" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "entity", - "watcher-id" - ] - }, - "UpgradeSeriesNotificationParams": { - "type": "object", - "properties": { - "params": { - "type": "array", - "items": { - "$ref": "#/definitions/UpgradeSeriesNotificationParam" - } - } - }, - "additionalProperties": false, - "required": [ - "params" - ] - }, - "UpgradeSeriesUnitsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "unit-names": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "unit-names" - ] - }, - "UpgradeSeriesUnitsResults": { - "type": "object", - "properties": { - "Results": { - "type": "array", - "items": { - "$ref": "#/definitions/UpgradeSeriesUnitsResult" - } - } - }, - "additionalProperties": false, - "required": [ - "Results" - ] - }, - "Value": { - "type": "object", - "properties": { - "allocate-public-ip": { - "type": "boolean" - }, - "arch": { - "type": "string" - }, - "container": { - "type": "string" - }, - "cores": { - "type": "integer" - }, - "cpu-power": { - "type": "integer" - }, - "image-id": { - "type": "string" - }, - "instance-role": { - "type": "string" - }, - "instance-type": { - "type": "string" - }, - "mem": { - "type": "integer" - }, - "root-disk": { - "type": "integer" - }, - "root-disk-source": { - "type": "string" - }, - "spaces": { - "type": "array", - "items": { - "type": "string" - } - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "virt-type": { - "type": "string" - }, - "zones": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - } - } - } - }, - { - "Name": "MachineUndertaker", - "Description": "API implements the API facade used by the machine undertaker.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent" - ], - "Schema": { - "type": "object", - "properties": { - "AllMachineRemovals": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/EntitiesResults" - } - }, - "description": "AllMachineRemovals returns tags for all of the machines that have\nbeen marked for removal in the requested model." - }, - "CompleteMachineRemovals": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - } - }, - "description": "CompleteMachineRemovals removes the specified machines from the\nmodel database. It should only be called once any provider-level\ncleanup has been done for those machines." - }, - "GetMachineProviderInterfaceInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ProviderInterfaceInfoResults" - } - }, - "description": "GetMachineProviderInterfaceInfo returns the provider details for\nall network interfaces attached to the machines requested." - }, - "WatchMachineRemovals": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "WatchMachineRemovals returns a watcher that will signal each time a\nmachine is marked for removal." - } - }, - "definitions": { - "Entities": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } - } - }, - "additionalProperties": false, - "required": [ - "entities" - ] - }, - "EntitiesResult": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "entities" - ] - }, - "EntitiesResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/EntitiesResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "Entity": { - "type": "object", - "properties": { - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "NotifyWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ProviderInterfaceInfo": { - "type": "object", - "properties": { - "interface-name": { - "type": "string" - }, - "mac-address": { - "type": "string" - }, - "provider-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "interface-name", - "mac-address", - "provider-id" - ] - }, - "ProviderInterfaceInfoResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "interfaces": { - "type": "array", - "items": { - "$ref": "#/definitions/ProviderInterfaceInfo" - } - }, - "machine-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "machine-tag", - "interfaces" - ] - }, - "ProviderInterfaceInfoResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ProviderInterfaceInfoResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - } - } - } - }, - { - "Name": "Machiner", - "Description": "MachinerAPI implements the API used by the machiner worker.", - "Version": 5, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "APIAddresses": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsResult" - } - }, - "description": "APIAddresses returns the list of addresses used to connect to the API." - }, - "APIHostPorts": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/APIHostPortsResult" - } - }, - "description": "APIHostPorts returns the API server addresses." - }, - "EnsureDead": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "EnsureDead calls EnsureDead on each given entity from state. It\nwill fail if the entity is not present. If it's Alive, nothing will\nhappen (see state/EnsureDead() for units or machines)." - }, - "Jobs": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/JobsResults" - } - }, - "description": "Jobs returns the jobs assigned to the given entities." - }, - "Life": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/LifeResults" - } - }, - "description": "Life returns the life status of every supplied entity, where available." - }, - "RecordAgentStartInformation": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RecordAgentStartInformationArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "RecordAgentStartInformation syncs the machine model with information\nreported by a machine agent when it starts." - }, - "RecordAgentStartTime": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "RecordAgentStartTime updates the agent start time field in the machine doc." - }, - "SetMachineAddresses": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetMachinesAddresses" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - } - }, - "SetObservedNetworkConfig": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetMachineNetworkConfig" - } - }, - "description": "SetObservedNetworkConfig reads the network config for the machine\nidentified by the input args.\nThis config is merged with the new network config supplied in the\nsame args and updated if it has changed." - }, - "SetStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetStatus" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetStatus sets the status of each given entity." - }, - "Watch": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "Watch starts an NotifyWatcher for each given entity." - }, - "WatchAPIHostPorts": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResult" - } - }, - "description": "WatchAPIHostPorts watches the API server addresses." - } - }, - "definitions": { - "APIHostPortsResult": { - "type": "object", - "properties": { - "servers": { - "type": "array", - "items": { - "type": "array", - "items": { - "$ref": "#/definitions/HostPort" - } - } - } - }, - "additionalProperties": false, - "required": [ - "servers" - ] - }, - "Address": { - "type": "object", - "properties": { - "cidr": { - "type": "string" - }, - "config-type": { - "type": "string" - }, - "is-secondary": { - "type": "boolean" - }, - "scope": { - "type": "string" - }, - "space-id": { - "type": "string" - }, - "space-name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "value", - "type", - "scope" - ] - }, - "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" - ] - }, - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "HostPort": { - "type": "object", - "properties": { - "Address": { - "$ref": "#/definitions/Address" - }, - "cidr": { - "type": "string" - }, - "config-type": { - "type": "string" - }, - "is-secondary": { - "type": "boolean" - }, - "port": { - "type": "integer" - }, - "scope": { - "type": "string" - }, - "space-id": { - "type": "string" - }, - "space-name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "value", - "type", - "scope", - "Address", - "port" - ] - }, - "JobsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "jobs": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "jobs" - ] - }, - "JobsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/JobsResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "LifeResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "life": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "life" - ] - }, - "LifeResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/LifeResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "MachineAddresses": { - "type": "object", - "properties": { - "addresses": { - "type": "array", - "items": { - "$ref": "#/definitions/Address" - } - }, - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "addresses" - ] - }, - "NetworkConfig": { - "type": "object", - "properties": { - "address": { - "type": "string" - }, - "addresses": { - "type": "array", - "items": { - "$ref": "#/definitions/Address" - } - }, - "cidr": { - "type": "string" - }, - "config-type": { - "type": "string" - }, - "device-index": { - "type": "integer" - }, - "disabled": { - "type": "boolean" - }, - "dns-search-domains": { - "type": "array", - "items": { - "type": "string" - } - }, - "dns-servers": { - "type": "array", - "items": { - "type": "string" - } - }, - "gateway-address": { - "type": "string" - }, - "interface-name": { - "type": "string" - }, - "interface-type": { - "type": "string" - }, - "is-default-gateway": { - "type": "boolean" - }, - "mac-address": { - "type": "string" - }, - "mtu": { - "type": "integer" - }, - "no-auto-start": { - "type": "boolean" - }, - "origin": { - "type": "string" - }, - "parent-interface-name": { - "type": "string" - }, - "provider-address-id": { - "type": "string" - }, - "provider-id": { - "type": "string" - }, - "provider-network-id": { - "type": "string" - }, - "provider-space-id": { - "type": "string" - }, - "provider-subnet-id": { - "type": "string" - }, - "provider-vlan-id": { - "type": "string" - }, - "routes": { - "type": "array", - "items": { - "$ref": "#/definitions/NetworkRoute" - } - }, - "shadow-addresses": { - "type": "array", - "items": { - "$ref": "#/definitions/Address" - } - }, - "virtual-port-type": { - "type": "string" - }, - "vlan-tag": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "device-index", - "mac-address", - "cidr", - "mtu", - "provider-id", - "provider-network-id", - "provider-subnet-id", - "provider-space-id", - "provider-address-id", - "provider-vlan-id", - "vlan-tag", - "interface-name", - "parent-interface-name", - "interface-type", - "disabled" - ] - }, - "NetworkRoute": { - "type": "object", - "properties": { - "destination-cidr": { - "type": "string" - }, - "gateway-ip": { - "type": "string" - }, - "metric": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "destination-cidr", - "gateway-ip", - "metric" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "NotifyWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "RecordAgentStartInformationArg": { - "type": "object", - "properties": { - "hostname": { - "type": "string" - }, - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag" - ] - }, - "RecordAgentStartInformationArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/RecordAgentStartInformationArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "SetMachineNetworkConfig": { - "type": "object", - "properties": { - "config": { - "type": "array", - "items": { - "$ref": "#/definitions/NetworkConfig" - } - }, - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "config" - ] - }, - "SetMachinesAddresses": { - "type": "object", - "properties": { - "machine-addresses": { - "type": "array", - "items": { - "$ref": "#/definitions/MachineAddresses" - } - } - }, - "additionalProperties": false, - "required": [ - "machine-addresses" - ] - }, - "SetStatus": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityStatusArgs" - } - } - }, - "additionalProperties": false, - "required": [ - "entities" - ] - }, - "StringsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - } - } - } - }, - { - "Name": "MeterStatus", - "Description": "MeterStatusAPI implements the MeterStatus interface and is the concrete\nimplementation of the API endpoint. Additionally, it embeds\ncommon.UnitStateAPI to allow meter status workers to access their\ncontroller-backed internal state.", - "Version": 2, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "GetMeterStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/MeterStatusResults" - } - }, - "description": "GetMeterStatus returns meter status information for each unit." - }, - "SetState": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetUnitStateArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetState sets the state persisted by the charm running in this unit\nand the state internal to the uniter for this unit." - }, - "State": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/UnitStateResults" - } - }, - "description": "State returns the state persisted by the charm running in this unit\nand the state internal to the uniter for this unit." - }, - "WatchMeterStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "WatchMeterStatus returns a NotifyWatcher for observing changes\nto each unit's meter status." - } - }, - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "MeterStatusResult": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "info": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "code", - "info" - ] - }, - "MeterStatusResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/MeterStatusResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "NotifyWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "SetUnitStateArg": { - "type": "object", - "properties": { - "charm-state": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "meter-status-state": { - "type": "string" - }, - "relation-state": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "secret-state": { - "type": "string" - }, - "storage-state": { - "type": "string" - }, - "tag": { - "type": "string" - }, - "uniter-state": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag" - ] - }, - "SetUnitStateArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/SetUnitStateArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "UnitStateResult": { - "type": "object", - "properties": { - "charm-state": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "meter-status-state": { - "type": "string" - }, - "relation-state": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "secret-state": { - "type": "string" - }, - "storage-state": { - "type": "string" - }, - "uniter-state": { - "type": "string" - } - }, - "additionalProperties": false - }, - "UnitStateResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/UnitStateResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - } - } - } - }, - { - "Name": "MetricsAdder", - "Description": "MetricsAdderAPI implements the metrics adder interface and is the concrete\nimplementation of the API end point.", - "Version": 2, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent" - ], - "Schema": { - "type": "object", - "properties": { - "AddMetricBatches": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/MetricBatchParams" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "AddMetricBatches implements the MetricsAdder interface." - } - }, - "definitions": { - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "Metric": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "labels": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "time": { - "type": "string", - "format": "date-time" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "key", - "value", - "time" - ] - }, - "MetricBatch": { - "type": "object", - "properties": { - "charm-url": { - "type": "string" - }, - "created": { - "type": "string", - "format": "date-time" - }, - "metrics": { - "type": "array", - "items": { - "$ref": "#/definitions/Metric" - } - }, - "uuid": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "uuid", - "charm-url", - "created", - "metrics" - ] - }, - "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" - ] - } - } - } - }, - { - "Name": "MetricsDebug", - "Description": "MetricsDebugAPI implements the metricsdebug interface and is the concrete\nimplementation of the api end point.", - "Version": 2, - "AvailableTo": [ - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "GetMetrics": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/MetricResults" - } - }, - "description": "GetMetrics returns all metrics stored by the state server." - }, - "SetMeterStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/MeterStatusParams" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetMeterStatus sets meter statuses for entities." - } - }, - "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" - ] - }, - "EntityMetrics": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "metrics": { - "type": "array", - "items": { - "$ref": "#/definitions/MetricResult" - } - } - }, - "additionalProperties": false - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "MeterStatusParam": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "string" - }, - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "code" - ] - }, - "MeterStatusParams": { - "type": "object", - "properties": { - "statues": { - "type": "array", - "items": { - "$ref": "#/definitions/MeterStatusParam" - } - } - }, - "additionalProperties": false, - "required": [ - "statues" - ] - }, - "MetricResult": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "labels": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "time": { - "type": "string", - "format": "date-time" - }, - "unit": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "time", - "key", - "value", - "unit", - "labels" - ] - }, - "MetricResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityMetrics" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - } - } - } - }, - { - "Name": "MetricsManager", - "Description": "MetricsManagerAPI implements the metrics manager interface and is the concrete\nimplementation of the api end point.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent" - ], - "Schema": { - "type": "object", - "properties": { - "AddJujuMachineMetrics": { - "type": "object", - "description": "AddJujuMachineMetrics adds a metric that counts the number of\nnon-container machines in the current model." - }, - "CleanupOldMetrics": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "CleanupOldMetrics removes old metrics from the collection.\nThe single arg params is expected to contain and model uuid.\nEven though the call will delete all metrics across models\nit serves to validate that the connection has access to at least one model." - }, - "SendMetrics": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SendMetrics will send any unsent metrics onto the metric collection service." - } - }, - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - } - } - } - }, - { - "Name": "MigrationFlag", - "Description": "Facade lets clients watch and get models' migration phases.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "Phase": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/PhaseResults" - } - }, - "description": "Phase returns the current migration phase or an error for every\nsupplied entity." - }, - "Watch": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "Watch returns an id for use with the NotifyWatcher facade, or an\nerror, for every supplied entity." - } - }, - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "NotifyWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "PhaseResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "phase": { - "type": "string" - } - }, - "additionalProperties": false - }, - "PhaseResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/PhaseResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - } - } - } - }, - { - "Name": "MigrationMaster", - "Description": "API implements the API required for the model migration\nmaster worker.", - "Version": 3, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "Export": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/SerializedModel" - } - }, - "description": "Export serializes the model associated with the API connection." - }, - "MigrationStatus": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/MasterMigrationStatus" - } - }, - "description": "MigrationStatus returns the details and progress of the latest\nmodel migration." - }, - "MinionReportTimeout": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringResult" - } - }, - "description": "MinionReportTimeout returns the configuration value for this controller that\nindicates how long the migration master worker should wait for minions to\nreported on phases of a migration." - }, - "MinionReports": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/MinionReports" - } - }, - "description": "MinionReports returns details of the reports made by migration\nminions to the controller for the current migration phase." - }, - "ModelInfo": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/MigrationModelInfo" - } - }, - "description": "ModelInfo returns essential information about the model to be\nmigrated." - }, - "Prechecks": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/PrechecksArgs" - } - }, - "description": "Prechecks performs pre-migration checks on the model and\n(source) controller." - }, - "ProcessRelations": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ProcessRelations" - } - }, - "description": "ProcessRelations processes any relations that need updating after an export.\nThis should help fix any remoteApplications that have been migrated." - }, - "Reap": { - "type": "object", - "description": "Reap removes all documents for the model associated with the API\nconnection." - }, - "SetPhase": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetMigrationPhaseArgs" - } - }, - "description": "SetPhase sets the phase of the active model migration. The provided\nphase must be a valid phase value, for example QUIESCE\" or\n\"ABORT\". See the core/migration package for the complete list." - }, - "SetStatusMessage": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetMigrationStatusMessageArgs" - } - }, - "description": "SetStatusMessage sets a human readable status message containing\ninformation about the migration's progress. This will be shown in\nstatus output shown to the end user." - }, - "SourceControllerInfo": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/MigrationSourceInfo" - } - }, - "description": "SourceControllerInfo returns the details required to connect to\nthe source controller for model migration." - }, - "Watch": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResult" - } - }, - "description": "Watch starts watching for an active migration for the model\nassociated with the API connection. The returned id should be used\nwith the NotifyWatcher facade to receive events." - }, - "WatchMinionReports": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResult" - } - }, - "description": "WatchMinionReports sets up a watcher which reports when a report\nfor a migration minion has arrived." - } - }, - "definitions": { - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "MasterMigrationStatus": { - "type": "object", - "properties": { - "migration-id": { - "type": "string" - }, - "phase": { - "type": "string" - }, - "phase-changed-time": { - "type": "string", - "format": "date-time" - }, - "spec": { - "$ref": "#/definitions/MigrationSpec" - } - }, - "additionalProperties": false, - "required": [ - "spec", - "migration-id", - "phase", - "phase-changed-time" - ] - }, - "MigrationModelInfo": { - "type": "object", - "properties": { - "agent-version": { - "$ref": "#/definitions/Number" - }, - "controller-agent-version": { - "$ref": "#/definitions/Number" - }, - "name": { - "type": "string" - }, - "owner-tag": { - "type": "string" - }, - "uuid": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "uuid", - "name", - "owner-tag", - "agent-version", - "controller-agent-version" - ] - }, - "MigrationSourceInfo": { - "type": "object", - "properties": { - "addrs": { - "type": "array", - "items": { - "type": "string" - } - }, - "ca-cert": { - "type": "string" - }, - "controller-alias": { - "type": "string" - }, - "controller-tag": { - "type": "string" - }, - "local-related-models": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "local-related-models", - "controller-tag", - "addrs", - "ca-cert" - ] - }, - "MigrationSpec": { - "type": "object", - "properties": { - "model-tag": { - "type": "string" - }, - "target-info": { - "$ref": "#/definitions/MigrationTargetInfo" - } - }, - "additionalProperties": false, - "required": [ - "model-tag", - "target-info" - ] - }, - "MigrationTargetInfo": { - "type": "object", - "properties": { - "addrs": { - "type": "array", - "items": { - "type": "string" - } - }, - "auth-tag": { - "type": "string" - }, - "ca-cert": { - "type": "string" - }, - "controller-alias": { - "type": "string" - }, - "controller-tag": { - "type": "string" - }, - "macaroons": { - "type": "string" - }, - "password": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "controller-tag", - "addrs", - "ca-cert", - "auth-tag" - ] - }, - "MinionReports": { - "type": "object", - "properties": { - "failed": { - "type": "array", - "items": { - "type": "string" - } - }, - "migration-id": { - "type": "string" - }, - "phase": { - "type": "string" - }, - "success-count": { - "type": "integer" - }, - "unknown-count": { - "type": "integer" - }, - "unknown-sample": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "migration-id", - "phase", - "success-count", - "unknown-count", - "unknown-sample", - "failed" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "Number": { - "type": "object", - "properties": { - "Build": { - "type": "integer" - }, - "Major": { - "type": "integer" - }, - "Minor": { - "type": "integer" - }, - "Patch": { - "type": "integer" - }, - "Tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Major", - "Minor", - "Tag", - "Patch", - "Build" - ] - }, - "PrechecksArgs": { - "type": "object", - "properties": { - "target-controller-version": { - "$ref": "#/definitions/Number" - } - }, - "additionalProperties": false, - "required": [ - "target-controller-version" - ] - }, - "ProcessRelations": { - "type": "object", - "properties": { - "controller-alias": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "controller-alias" - ] - }, - "SerializedModel": { - "type": "object", - "properties": { - "bytes": { - "type": "array", - "items": { - "type": "integer" - } - }, - "charms": { - "type": "array", - "items": { - "type": "string" - } - }, - "resources": { - "type": "array", - "items": { - "$ref": "#/definitions/SerializedModelResource" - } - }, - "tools": { - "type": "array", - "items": { - "$ref": "#/definitions/SerializedModelTools" - } - } - }, - "additionalProperties": false, - "required": [ - "bytes", - "charms", - "tools", - "resources" - ] - }, - "SerializedModelResource": { - "type": "object", - "properties": { - "application": { - "type": "string" - }, - "application-revision": { - "$ref": "#/definitions/SerializedModelResourceRevision" - }, - "charmstore-revision": { - "$ref": "#/definitions/SerializedModelResourceRevision" - }, - "name": { - "type": "string" - }, - "unit-revisions": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/SerializedModelResourceRevision" - } - } - } - }, - "additionalProperties": false, - "required": [ - "application", - "name", - "application-revision", - "charmstore-revision", - "unit-revisions" - ] - }, - "SerializedModelResourceRevision": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "fingerprint": { - "type": "string" - }, - "origin": { - "type": "string" - }, - "path": { - "type": "string" - }, - "revision": { - "type": "integer" - }, - "size": { - "type": "integer" - }, - "timestamp": { - "type": "string", - "format": "date-time" - }, - "type": { - "type": "string" - }, - "username": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "revision", - "type", - "path", - "description", - "origin", - "fingerprint", - "size", - "timestamp" - ] - }, - "SerializedModelTools": { - "type": "object", - "properties": { - "uri": { - "type": "string" - }, - "version": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "version", - "uri" - ] - }, - "SetMigrationPhaseArgs": { - "type": "object", - "properties": { - "phase": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "phase" - ] - }, - "SetMigrationStatusMessageArgs": { - "type": "object", - "properties": { - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message" - ] - }, - "StringResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - } - } - } - }, - { - "Name": "MigrationMinion", - "Description": "API implements the API required for the model migration\nmaster worker.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "Report": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/MinionReport" - } - }, - "description": "Report allows a migration minion to submit whether it succeeded or\nfailed for a specific migration phase." - }, - "Watch": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResult" - } - }, - "description": "Watch starts watching for status updates for a migration attempt\nfor the model. It will report when a migration starts and when its\nstatus changes (including when it finishes). An initial event will\nbe fired if there has ever been a migration attempt for the model.\n\nThe MigrationStatusWatcher facade must be used to receive events\nfrom the watcher." - } - }, - "definitions": { - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "MinionReport": { - "type": "object", - "properties": { - "migration-id": { - "type": "string" - }, - "phase": { - "type": "string" - }, - "success": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "migration-id", - "phase", - "success" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - } - } - } - }, - { - "Name": "MigrationStatusWatcher", - "Description": "", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "Next": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/MigrationStatus" - } - }, - "description": "Next returns when the status for a model migration for the\nassociated model changes. The current details for the active\nmigration are returned." - }, - "Stop": { - "type": "object", - "description": "Stop stops the watcher." - } - }, - "definitions": { - "MigrationStatus": { - "type": "object", - "properties": { - "attempt": { - "type": "integer" - }, - "migration-id": { - "type": "string" - }, - "phase": { - "type": "string" - }, - "source-api-addrs": { - "type": "array", - "items": { - "type": "string" - } - }, - "source-ca-cert": { - "type": "string" - }, - "target-api-addrs": { - "type": "array", - "items": { - "type": "string" - } - }, - "target-ca-cert": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "migration-id", - "attempt", - "phase", - "source-api-addrs", - "source-ca-cert", - "target-api-addrs", - "target-ca-cert" - ] - } - } - } - }, - { - "Name": "MigrationTarget", - "Description": "API implements the API required for the model migration\nmaster worker when communicating with the target controller.", - "Version": 2, - "AvailableTo": [ - "controller-user" - ], - "Schema": { - "type": "object", - "properties": { - "Abort": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ModelArgs" - } - }, - "description": "Abort removes the specified model from the database. It is an error to\nattempt to Abort a model that has a migration mode other than importing." - }, - "Activate": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ActivateModelArgs" - } - }, - "description": "Activate sets the migration mode of the model to \"none\", meaning it\nis ready for use. It is an error to attempt to Abort a model that\nhas a migration mode other than importing. It also adds any required\nexternal controller records for those controllers hosting offers used\nby the model." - }, - "AdoptResources": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/AdoptResourcesArgs" - } - }, - "description": "AdoptResources asks the cloud provider to update the controller\ntags for a model's resources. This prevents the resources from\nbeing destroyed if the source controller is destroyed after the\nmodel is migrated away." - }, - "CACert": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/BytesResult" - } - }, - "description": "CACert returns the certificate used to validate the state connection." - }, - "CheckMachines": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ModelArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "CheckMachines compares the machines in state with the ones reported\nby the provider and reports any discrepancies." - }, - "Import": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SerializedModel" - } - }, - "description": "Import takes a serialized Juju model, deserializes it, and\nrecreates it in the receiving controller." - }, - "LatestLogTime": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ModelArgs" - }, - "Result": { - "type": "string", - "format": "date-time" - } - }, - "description": "LatestLogTime returns the time of the most recent log record\nreceived by the logtransfer endpoint. This can be used as the start\npoint for streaming logs from the source if the transfer was\ninterrupted.\n\nFor performance reasons, not every time is tracked, so if the\ntarget controller died during the transfer the latest log time\nmight be up to 2 minutes earlier. If the transfer was interrupted\nin some other way (like the source controller going away or a\nnetwork partition) the time will be up-to-date.\n\nLog messages are assumed to be sent in time order (which is how\ndebug-log emits them). If that isn't the case then this mechanism\ncan't be used to avoid duplicates when logtransfer is restarted.\n\nReturns the zero time if no logs have been transferred." - }, - "Prechecks": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/MigrationModelInfo" - } - }, - "description": "Prechecks ensure that the target controller is ready to accept a\nmodel migration." - } - }, - "definitions": { - "ActivateModelArgs": { - "type": "object", - "properties": { - "controller-alias": { - "type": "string" - }, - "controller-tag": { - "type": "string" - }, - "cross-model-uuids": { - "type": "array", - "items": { - "type": "string" - } - }, - "model-tag": { - "type": "string" - }, - "source-api-addrs": { - "type": "array", - "items": { - "type": "string" - } - }, - "source-ca-cert": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "model-tag", - "controller-tag", - "source-api-addrs", - "source-ca-cert", - "cross-model-uuids" - ] - }, - "AdoptResourcesArgs": { - "type": "object", - "properties": { - "model-tag": { - "type": "string" - }, - "source-controller-version": { - "$ref": "#/definitions/Number" - } - }, - "additionalProperties": false, - "required": [ - "model-tag", - "source-controller-version" - ] - }, - "BytesResult": { - "type": "object", - "properties": { - "result": { - "type": "array", - "items": { - "type": "integer" - } - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "MigrationModelInfo": { - "type": "object", - "properties": { - "agent-version": { - "$ref": "#/definitions/Number" - }, - "controller-agent-version": { - "$ref": "#/definitions/Number" - }, - "name": { - "type": "string" - }, - "owner-tag": { - "type": "string" - }, - "uuid": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "uuid", - "name", - "owner-tag", - "agent-version", - "controller-agent-version" - ] - }, - "ModelArgs": { - "type": "object", - "properties": { - "model-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "model-tag" - ] - }, - "Number": { - "type": "object", - "properties": { - "Build": { - "type": "integer" - }, - "Major": { - "type": "integer" - }, - "Minor": { - "type": "integer" - }, - "Patch": { - "type": "integer" - }, - "Tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Major", - "Minor", - "Tag", - "Patch", - "Build" - ] - }, - "SerializedModel": { - "type": "object", - "properties": { - "bytes": { - "type": "array", - "items": { - "type": "integer" - } - }, - "charms": { - "type": "array", - "items": { - "type": "string" - } - }, - "resources": { - "type": "array", - "items": { - "$ref": "#/definitions/SerializedModelResource" - } - }, - "tools": { - "type": "array", - "items": { - "$ref": "#/definitions/SerializedModelTools" - } - } - }, - "additionalProperties": false, - "required": [ - "bytes", - "charms", - "tools", - "resources" - ] - }, - "SerializedModelResource": { - "type": "object", - "properties": { - "application": { - "type": "string" - }, - "application-revision": { - "$ref": "#/definitions/SerializedModelResourceRevision" - }, - "charmstore-revision": { - "$ref": "#/definitions/SerializedModelResourceRevision" - }, - "name": { - "type": "string" - }, - "unit-revisions": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/SerializedModelResourceRevision" - } - } - } - }, - "additionalProperties": false, - "required": [ - "application", - "name", - "application-revision", - "charmstore-revision", - "unit-revisions" - ] - }, - "SerializedModelResourceRevision": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "fingerprint": { - "type": "string" - }, - "origin": { - "type": "string" - }, - "path": { - "type": "string" - }, - "revision": { - "type": "integer" - }, - "size": { - "type": "integer" - }, - "timestamp": { - "type": "string", - "format": "date-time" - }, - "type": { - "type": "string" - }, - "username": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "revision", - "type", - "path", - "description", - "origin", - "fingerprint", - "size", - "timestamp" - ] - }, - "SerializedModelTools": { - "type": "object", - "properties": { - "uri": { - "type": "string" - }, - "version": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "version", - "uri" - ] - } - } - } - }, - { - "Name": "ModelConfig", - "Description": "ModelConfigAPIV3 is currently the latest.", - "Version": 3, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "controller-user", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "GetModelConstraints": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/GetConstraintsResults" - } - }, - "description": "GetModelConstraints returns the constraints for the model." - }, - "ModelGet": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ModelConfigResults" - } - }, - "description": "ModelGet implements the server-side part of the\nmodel-config CLI command." - }, - "ModelSet": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ModelSet" - } - }, - "description": "ModelSet implements the server-side part of the\nset-model-config CLI command." - }, - "ModelUnset": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ModelUnset" - } - }, - "description": "ModelUnset implements the server-side part of the\nset-model-config CLI command." - }, - "SLALevel": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringResult" - } - }, - "description": "SLALevel returns the current sla level for the model." - }, - "Sequences": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ModelSequencesResult" - } - }, - "description": "Sequences returns the model's sequence names and next values." - }, - "SetModelConstraints": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetConstraints" - } - }, - "description": "SetModelConstraints sets the constraints for the model." - }, - "SetSLALevel": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ModelSLA" - } - }, - "description": "SetSLALevel sets the sla level on the model." - } - }, - "definitions": { - "ConfigValue": { - "type": "object", - "properties": { - "source": { - "type": "string" - }, - "value": { - "type": "object", - "additionalProperties": true - } - }, - "additionalProperties": false, - "required": [ - "value", - "source" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "GetConstraintsResults": { - "type": "object", - "properties": { - "constraints": { - "$ref": "#/definitions/Value" - } - }, - "additionalProperties": false, - "required": [ - "constraints" - ] - }, - "ModelConfigResults": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/ConfigValue" - } - } - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "ModelSLA": { - "type": "object", - "properties": { - "ModelSLAInfo": { - "$ref": "#/definitions/ModelSLAInfo" - }, - "creds": { - "type": "array", - "items": { - "type": "integer" - } - }, - "level": { - "type": "string" - }, - "owner": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "level", - "owner", - "ModelSLAInfo", - "creds" - ] - }, - "ModelSLAInfo": { - "type": "object", - "properties": { - "level": { - "type": "string" - }, - "owner": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "level", - "owner" - ] - }, - "ModelSequencesResult": { - "type": "object", - "properties": { - "sequences": { - "type": "object", - "patternProperties": { - ".*": { - "type": "integer" - } - } - } - }, - "additionalProperties": false, - "required": [ - "sequences" - ] - }, - "ModelSet": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "ModelUnset": { - "type": "object", - "properties": { - "keys": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "keys" - ] - }, - "SetConstraints": { - "type": "object", - "properties": { - "application": { - "type": "string" - }, - "constraints": { - "$ref": "#/definitions/Value" - } - }, - "additionalProperties": false, - "required": [ - "application", - "constraints" - ] - }, - "StringResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "Value": { - "type": "object", - "properties": { - "allocate-public-ip": { - "type": "boolean" - }, - "arch": { - "type": "string" - }, - "container": { - "type": "string" - }, - "cores": { - "type": "integer" - }, - "cpu-power": { - "type": "integer" - }, - "image-id": { - "type": "string" - }, - "instance-role": { - "type": "string" - }, - "instance-type": { - "type": "string" - }, - "mem": { - "type": "integer" - }, - "root-disk": { - "type": "integer" - }, - "root-disk-source": { - "type": "string" - }, - "spaces": { - "type": "array", - "items": { - "type": "string" - } - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "virt-type": { - "type": "string" - }, - "zones": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - } - } - } - }, - { - "Name": "ModelGeneration", - "Description": "API is the concrete implementation of the API endpoint.", - "Version": 4, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "AbortBranch": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/BranchArg" - }, - "Result": { - "$ref": "#/definitions/ErrorResult" - } - }, - "description": "AbortBranch aborts the input branch, marking it complete. However no\nchanges are made applicable to the whole model. No units may be assigned\nto the branch when aborting." - }, - "AddBranch": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/BranchArg" - }, - "Result": { - "$ref": "#/definitions/ErrorResult" - } - }, - "description": "AddBranch adds a new branch with the input name to the model." - }, - "BranchInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/BranchInfoArgs" - }, - "Result": { - "$ref": "#/definitions/BranchResults" - } - }, - "description": "BranchInfo will return details of branch identified by the input argument,\nincluding units on the branch and the configuration disjoint with the\nmaster generation.\nAn error is returned if no in-flight branch matching in input is found." - }, - "CommitBranch": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/BranchArg" - }, - "Result": { - "$ref": "#/definitions/IntResult" - } - }, - "description": "CommitBranch commits the input branch, making its changes applicable to\nthe whole model and marking it complete." - }, - "HasActiveBranch": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/BranchArg" - }, - "Result": { - "$ref": "#/definitions/BoolResult" - } - }, - "description": "HasActiveBranch returns a true result if the input model has an \"in-flight\"\nbranch matching the input name." - }, - "ListCommits": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/BranchResults" - } - }, - "description": "ListCommits will return the commits, hence only branches with generation_id higher than 0" - }, - "ShowCommit": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/GenerationId" - }, - "Result": { - "$ref": "#/definitions/GenerationResult" - } - }, - "description": "ShowCommit will return details a commit given by its generationId\nAn error is returned if either no branch can be found corresponding to the generation id.\nOr the generation id given is below 1." - }, - "TrackBranch": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/BranchTrackArg" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "TrackBranch marks the input units and/or applications as tracking the input\nbranch, causing them to realise changes made under that branch." - } - }, - "definitions": { - "BoolResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "BranchArg": { - "type": "object", - "properties": { - "branch": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "branch" - ] - }, - "BranchInfoArgs": { - "type": "object", - "properties": { - "branches": { - "type": "array", - "items": { - "type": "string" - } - }, - "detailed": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "branches", - "detailed" - ] - }, - "BranchResults": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "generations": { - "type": "array", - "items": { - "$ref": "#/definitions/Generation" - } - } - }, - "additionalProperties": false, - "required": [ - "generations" - ] - }, - "BranchTrackArg": { - "type": "object", - "properties": { - "branch": { - "type": "string" - }, - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } - }, - "num-units": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "branch", - "entities" - ] - }, - "Entity": { - "type": "object", - "properties": { - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "Generation": { - "type": "object", - "properties": { - "applications": { - "type": "array", - "items": { - "$ref": "#/definitions/GenerationApplication" - } - }, - "branch": { - "type": "string" - }, - "completed": { - "type": "integer" - }, - "completed-by": { - "type": "string" - }, - "created": { - "type": "integer" - }, - "created-by": { - "type": "string" - }, - "generation-id": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "branch", - "created", - "created-by", - "applications" - ] - }, - "GenerationApplication": { - "type": "object", - "properties": { - "application": { - "type": "string" - }, - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "pending": { - "type": "array", - "items": { - "type": "string" - } - }, - "progress": { - "type": "string" - }, - "tracking": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "application", - "progress", - "config" - ] - }, - "GenerationId": { - "type": "object", - "properties": { - "generation-id": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "generation-id" - ] - }, - "GenerationResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "generation": { - "$ref": "#/definitions/Generation" - } - }, - "additionalProperties": false, - "required": [ - "generation" - ] - }, - "IntResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - } - } - } - }, - { - "Name": "ModelManager", - "Description": "ModelManagerAPI implements the model manager interface and is\nthe concrete implementation of the api end point.", - "Version": 9, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "controller-user" - ], - "Schema": { - "type": "object", - "properties": { - "ChangeModelCredential": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ChangeModelCredentialsParams" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "ChangeModelCredential changes cloud credential reference for models.\nThese new cloud credentials must already exist on the controller." - }, - "CreateModel": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ModelCreateArgs" - }, - "Result": { - "$ref": "#/definitions/ModelInfo" - } - }, - "description": "CreateModel creates a new model using the account and\nmodel config specified in the args." - }, - "DestroyModels": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/DestroyModelsParams" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "DestroyModels will try to destroy the specified models.\nIf there is a block on destruction, this method will return an error.\nFrom ModelManager v7 onwards, DestroyModels gains 'force' and 'max-wait' parameters." - }, - "DumpModels": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/DumpModelRequest" - }, - "Result": { - "$ref": "#/definitions/StringResults" - } - }, - "description": "DumpModels will export the models into the database agnostic\nrepresentation. The user needs to either be a controller admin, or have\nadmin privileges on the model itself." - }, - "DumpModelsDB": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/MapResults" - } - }, - "description": "DumpModelsDB will gather all documents from all model collections\nfor the specified model. The map result contains a map of collection\nnames to lists of documents represented as maps." - }, - "ListModelSummaries": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ModelSummariesRequest" - }, - "Result": { - "$ref": "#/definitions/ModelSummaryResults" - } - }, - "description": "ListModelSummaries returns models that the specified user\nhas access to in the current server. Controller admins (superuser)\ncan list models for any user. Other users\ncan only ask about their own models." - }, - "ListModels": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entity" - }, - "Result": { - "$ref": "#/definitions/UserModelList" - } - }, - "description": "ListModels returns the models that the specified user\nhas access to in the current server. Controller admins (superuser)\ncan list models for any user. Other users\ncan only ask about their own models." - }, - "ModelDefaultsForClouds": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ModelDefaultsResults" - } - }, - "description": "ModelDefaultsForClouds returns the default config values for the specified\nclouds." - }, - "ModelInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ModelInfoResults" - } - }, - "description": "ModelInfo returns information about the specified models." - }, - "ModelStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ModelStatusResults" - } - }, - "description": "ModelStatus returns a summary of the model." - }, - "ModifyModelAccess": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ModifyModelAccessRequest" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "ModifyModelAccess changes the model access granted to users." - }, - "SetModelDefaults": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetModelDefaults" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetModelDefaults writes new values for the specified default model settings." - }, - "UnsetModelDefaults": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/UnsetModelDefaults" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "UnsetModelDefaults removes the specified default model settings." - } - }, - "definitions": { - "ChangeModelCredentialParams": { - "type": "object", - "properties": { - "credential-tag": { - "type": "string" - }, - "model-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "model-tag", - "credential-tag" - ] - }, - "ChangeModelCredentialsParams": { - "type": "object", - "properties": { - "model-credentials": { - "type": "array", - "items": { - "$ref": "#/definitions/ChangeModelCredentialParams" - } - } - }, - "additionalProperties": false, - "required": [ - "model-credentials" - ] - }, - "DestroyModelParams": { - "type": "object", - "properties": { - "destroy-storage": { - "type": "boolean" - }, - "force": { - "type": "boolean" - }, - "max-wait": { - "type": "integer" - }, - "model-tag": { - "type": "string" - }, - "timeout": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "model-tag" - ] - }, - "DestroyModelsParams": { - "type": "object", - "properties": { - "models": { - "type": "array", - "items": { - "$ref": "#/definitions/DestroyModelParams" - } - } - }, - "additionalProperties": false, - "required": [ - "models" - ] - }, - "DumpModelRequest": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } - }, - "simplified": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "entities", - "simplified" - ] - }, - "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" - ] - }, - "EntityStatus": { - "type": "object", - "properties": { - "data": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "info": { - "type": "string" - }, - "since": { - "type": "string", - "format": "date-time" - }, - "status": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "status", - "info", - "since" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "MachineHardware": { - "type": "object", - "properties": { - "arch": { - "type": "string" - }, - "availability-zone": { - "type": "string" - }, - "cores": { - "type": "integer" - }, - "cpu-power": { - "type": "integer" - }, - "mem": { - "type": "integer" - }, - "root-disk": { - "type": "integer" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "virt-type": { - "type": "string" - } - }, - "additionalProperties": false - }, - "MapResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "MapResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/MapResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "Model": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "owner-tag": { - "type": "string" - }, - "type": { - "type": "string" - }, - "uuid": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "uuid", - "type", - "owner-tag" - ] - }, - "ModelApplicationInfo": { - "type": "object", - "properties": { - "name": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name" - ] - }, - "ModelCreateArgs": { - "type": "object", - "properties": { - "cloud-tag": { - "type": "string" - }, - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "credential": { - "type": "string" - }, - "name": { - "type": "string" - }, - "owner-tag": { - "type": "string" - }, - "region": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "owner-tag" - ] - }, - "ModelDefaultValues": { - "type": "object", - "properties": { - "cloud-region": { - "type": "string" - }, - "cloud-tag": { - "type": "string" - }, - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "ModelDefaults": { - "type": "object", - "properties": { - "controller": { - "type": "object", - "additionalProperties": true - }, - "default": { - "type": "object", - "additionalProperties": true - }, - "regions": { - "type": "array", - "items": { - "$ref": "#/definitions/RegionDefaults" - } - } - }, - "additionalProperties": false - }, - "ModelDefaultsResult": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/ModelDefaults" - } - } - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "ModelDefaultsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelDefaultsResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ModelEntityCount": { - "type": "object", - "properties": { - "count": { - "type": "integer" - }, - "entity": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "entity", - "count" - ] - }, - "ModelFilesystemInfo": { - "type": "object", - "properties": { - "detachable": { - "type": "boolean" - }, - "id": { - "type": "string" - }, - "message": { - "type": "string" - }, - "provider-id": { - "type": "string" - }, - "status": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "id" - ] - }, - "ModelInfo": { - "type": "object", - "properties": { - "agent-version": { - "$ref": "#/definitions/Number" - }, - "cloud-credential-tag": { - "type": "string" - }, - "cloud-credential-validity": { - "type": "boolean" - }, - "cloud-region": { - "type": "string" - }, - "cloud-tag": { - "type": "string" - }, - "controller-uuid": { - "type": "string" - }, - "default-base": { - "type": "string" - }, - "default-series": { - "type": "string" - }, - "is-controller": { - "type": "boolean" - }, - "life": { - "type": "string" - }, - "machines": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelMachineInfo" - } - }, - "migration": { - "$ref": "#/definitions/ModelMigrationStatus" - }, - "name": { - "type": "string" - }, - "owner-tag": { - "type": "string" - }, - "provider-type": { - "type": "string" - }, - "secret-backends": { - "type": "array", - "items": { - "$ref": "#/definitions/SecretBackendResult" - } - }, - "sla": { - "$ref": "#/definitions/ModelSLAInfo" - }, - "status": { - "$ref": "#/definitions/EntityStatus" - }, - "supported-features": { - "type": "array", - "items": { - "$ref": "#/definitions/SupportedFeature" - } - }, - "type": { - "type": "string" - }, - "users": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelUserInfo" - } - }, - "uuid": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "type", - "uuid", - "controller-uuid", - "is-controller", - "cloud-tag", - "owner-tag", - "life", - "users", - "machines", - "secret-backends", - "sla", - "agent-version" - ] - }, - "ModelInfoResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/ModelInfo" - } - }, - "additionalProperties": false - }, - "ModelInfoResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelInfoResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ModelMachineInfo": { - "type": "object", - "properties": { - "display-name": { - "type": "string" - }, - "ha-primary": { - "type": "boolean" - }, - "hardware": { - "$ref": "#/definitions/MachineHardware" - }, - "has-vote": { - "type": "boolean" - }, - "id": { - "type": "string" - }, - "instance-id": { - "type": "string" - }, - "message": { - "type": "string" - }, - "status": { - "type": "string" - }, - "wants-vote": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "id" - ] - }, - "ModelMigrationStatus": { - "type": "object", - "properties": { - "end": { - "type": "string", - "format": "date-time" - }, - "start": { - "type": "string", - "format": "date-time" - }, - "status": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "status", - "start" - ] - }, - "ModelSLAInfo": { - "type": "object", - "properties": { - "level": { - "type": "string" - }, - "owner": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "level", - "owner" - ] - }, - "ModelStatus": { - "type": "object", - "properties": { - "application-count": { - "type": "integer" - }, - "applications": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelApplicationInfo" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "filesystems": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelFilesystemInfo" - } - }, - "hosted-machine-count": { - "type": "integer" - }, - "life": { - "type": "string" - }, - "machines": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelMachineInfo" - } - }, - "model-tag": { - "type": "string" - }, - "owner-tag": { - "type": "string" - }, - "type": { - "type": "string" - }, - "unit-count": { - "type": "integer" - }, - "volumes": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelVolumeInfo" - } - } - }, - "additionalProperties": false, - "required": [ - "model-tag", - "life", - "type", - "hosted-machine-count", - "application-count", - "unit-count", - "owner-tag" - ] - }, - "ModelStatusResults": { - "type": "object", - "properties": { - "models": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelStatus" - } - } - }, - "additionalProperties": false, - "required": [ - "models" - ] - }, - "ModelSummariesRequest": { - "type": "object", - "properties": { - "all": { - "type": "boolean" - }, - "user-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "user-tag" - ] - }, - "ModelSummary": { - "type": "object", - "properties": { - "agent-version": { - "$ref": "#/definitions/Number" - }, - "cloud-credential-tag": { - "type": "string" - }, - "cloud-region": { - "type": "string" - }, - "cloud-tag": { - "type": "string" - }, - "controller-uuid": { - "type": "string" - }, - "counts": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelEntityCount" - } - }, - "default-series": { - "type": "string" - }, - "is-controller": { - "type": "boolean" - }, - "last-connection": { - "type": "string", - "format": "date-time" - }, - "life": { - "type": "string" - }, - "migration": { - "$ref": "#/definitions/ModelMigrationStatus" - }, - "name": { - "type": "string" - }, - "owner-tag": { - "type": "string" - }, - "provider-type": { - "type": "string" - }, - "sla": { - "$ref": "#/definitions/ModelSLAInfo" - }, - "status": { - "$ref": "#/definitions/EntityStatus" - }, - "type": { - "type": "string" - }, - "user-access": { - "type": "string" - }, - "uuid": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "uuid", - "type", - "controller-uuid", - "is-controller", - "cloud-tag", - "owner-tag", - "life", - "user-access", - "last-connection", - "counts", - "sla", - "agent-version" - ] - }, - "ModelSummaryResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/ModelSummary" - } - }, - "additionalProperties": false - }, - "ModelSummaryResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelSummaryResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ModelUnsetKeys": { - "type": "object", - "properties": { - "cloud-region": { - "type": "string" - }, - "cloud-tag": { - "type": "string" - }, - "keys": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "keys" - ] - }, - "ModelUserInfo": { - "type": "object", - "properties": { - "access": { - "type": "string" - }, - "display-name": { - "type": "string" - }, - "last-connection": { - "type": "string", - "format": "date-time" - }, - "model-tag": { - "type": "string" - }, - "user": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "model-tag", - "user", - "display-name", - "last-connection", - "access" - ] - }, - "ModelVolumeInfo": { - "type": "object", - "properties": { - "detachable": { - "type": "boolean" - }, - "id": { - "type": "string" - }, - "message": { - "type": "string" - }, - "provider-id": { - "type": "string" - }, - "status": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "id" - ] - }, - "ModifyModelAccess": { - "type": "object", - "properties": { - "access": { - "type": "string" - }, - "action": { - "type": "string" - }, - "model-tag": { - "type": "string" - }, - "user-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "user-tag", - "action", - "access", - "model-tag" - ] - }, - "ModifyModelAccessRequest": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "$ref": "#/definitions/ModifyModelAccess" - } - } - }, - "additionalProperties": false, - "required": [ - "changes" - ] - }, - "Number": { - "type": "object", - "properties": { - "Build": { - "type": "integer" - }, - "Major": { - "type": "integer" - }, - "Minor": { - "type": "integer" - }, - "Patch": { - "type": "integer" - }, - "Tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Major", - "Minor", - "Tag", - "Patch", - "Build" - ] - }, - "RegionDefaults": { - "type": "object", - "properties": { - "region-name": { - "type": "string" - }, - "value": { - "type": "object", - "additionalProperties": true - } - }, - "additionalProperties": false, - "required": [ - "region-name", - "value" - ] - }, - "SecretBackend": { - "type": "object", - "properties": { - "backend-type": { - "type": "string" - }, - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "name": { - "type": "string" - }, - "token-rotate-interval": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "name", - "backend-type", - "config" - ] - }, - "SecretBackendResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "id": { - "type": "string" - }, - "message": { - "type": "string" - }, - "num-secrets": { - "type": "integer" - }, - "result": { - "$ref": "#/definitions/SecretBackend" - }, - "status": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "result", - "id", - "num-secrets", - "status" - ] - }, - "SetModelDefaults": { - "type": "object", - "properties": { - "config": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelDefaultValues" - } - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "StringResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "StringResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "SupportedFeature": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "name": { - "type": "string" - }, - "version": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "description" - ] - }, - "UnsetModelDefaults": { - "type": "object", - "properties": { - "keys": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelUnsetKeys" - } - } - }, - "additionalProperties": false, - "required": [ - "keys" - ] - }, - "UserModel": { - "type": "object", - "properties": { - "last-connection": { - "type": "string", - "format": "date-time" - }, - "model": { - "$ref": "#/definitions/Model" - } - }, - "additionalProperties": false, - "required": [ - "model", - "last-connection" - ] - }, - "UserModelList": { - "type": "object", - "properties": { - "user-models": { - "type": "array", - "items": { - "$ref": "#/definitions/UserModel" - } - } - }, - "additionalProperties": false, - "required": [ - "user-models" - ] - } - } - } - }, - { - "Name": "ModelSummaryWatcher", - "Description": "SrvModelSummaryWatcher defines the API methods on a ModelSummaryWatcher.", - "Version": 1, - "AvailableTo": [ - "controller-user" - ], - "Schema": { - "type": "object", - "properties": { - "Next": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/SummaryWatcherNextResults" - } - }, - "description": "Next will return the current state of everything on the first call\nand subsequent calls will return just those model summaries that have\nchanged." - }, - "Stop": { - "type": "object", - "description": "Stop stops the watcher." - } - }, - "definitions": { - "ModelAbstract": { - "type": "object", - "properties": { - "admins": { - "type": "array", - "items": { - "type": "string" - } - }, - "annotations": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "cloud": { - "type": "string" - }, - "controller": { - "type": "string" - }, - "credential": { - "type": "string" - }, - "messages": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelSummaryMessage" - } - }, - "name": { - "type": "string" - }, - "region": { - "type": "string" - }, - "removed": { - "type": "boolean" - }, - "size": { - "$ref": "#/definitions/ModelSummarySize" - }, - "status": { - "type": "string" - }, - "uuid": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "uuid" - ] - }, - "ModelSummaryMessage": { - "type": "object", - "properties": { - "agent": { - "type": "string" - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "agent", - "message" - ] - }, - "ModelSummarySize": { - "type": "object", - "properties": { - "applications": { - "type": "integer" - }, - "containers": { - "type": "integer" - }, - "machines": { - "type": "integer" - }, - "relations": { - "type": "integer" - }, - "units": { - "type": "integer" - } - }, - "additionalProperties": false - }, - "SummaryWatcherNextResults": { - "type": "object", - "properties": { - "models": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelAbstract" - } - } - }, - "additionalProperties": false, - "required": [ - "models" - ] - } - } - } - }, - { - "Name": "ModelUpgrader", - "Description": "ModelUpgraderAPI implements the model upgrader interface and is\nthe concrete implementation of the api end point.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "controller-user" - ], - "Schema": { - "type": "object", - "properties": { - "AbortModelUpgrade": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ModelParam" - } - }, - "description": "AbortModelUpgrade aborts and archives the model upgrade\nsynchronisation record, if any." - }, - "UpgradeModel": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/UpgradeModelParams" - }, - "Result": { - "$ref": "#/definitions/UpgradeModelResult" - } - }, - "description": "UpgradeModel upgrades a model." - } - }, - "definitions": { - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ModelParam": { - "type": "object", - "properties": { - "model-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "model-tag" - ] - }, - "Number": { - "type": "object", - "properties": { - "Build": { - "type": "integer" - }, - "Major": { - "type": "integer" - }, - "Minor": { - "type": "integer" - }, - "Patch": { - "type": "integer" - }, - "Tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Major", - "Minor", - "Tag", - "Patch", - "Build" - ] - }, - "UpgradeModelParams": { - "type": "object", - "properties": { - "agent-stream": { - "type": "string" - }, - "dry-run": { - "type": "boolean" - }, - "ignore-agent-versions": { - "type": "boolean" - }, - "model-tag": { - "type": "string" - }, - "target-version": { - "$ref": "#/definitions/Number" - } - }, - "additionalProperties": false, - "required": [ - "model-tag", - "target-version" - ] - }, - "UpgradeModelResult": { - "type": "object", - "properties": { - "chosen-version": { - "$ref": "#/definitions/Number" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "chosen-version" - ] - } - } - } - }, - { - "Name": "NotifyWatcher", - "Description": "srvNotifyWatcher defines the API access to methods on a NotifyWatcher.\nEach client has its own current set of watchers, stored in resources.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "controller-user", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "Next": { - "type": "object", - "description": "Next returns when a change has occurred to the\nentity being watched since the most recent call to Next\nor the Watch call that created the NotifyWatcher." - }, - "Stop": { - "type": "object", - "description": "Stop stops the watcher." - } - } - } - }, - { - "Name": "OfferStatusWatcher", - "Description": "srvOfferStatusWatcher defines the API wrapping a crossmodelrelations.OfferStatusWatcher.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "Next": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/OfferStatusWatchResult" - } - }, - "description": "Next returns when a change has occurred to an entity of the\ncollection being watched since the most recent call to Next\nor the Watch call that created the srvOfferStatusWatcher." - }, - "Stop": { - "type": "object", - "description": "Stop stops the watcher." - } - }, - "definitions": { - "EntityStatus": { - "type": "object", - "properties": { - "data": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "info": { - "type": "string" - }, - "since": { - "type": "string", - "format": "date-time" - }, - "status": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "status", - "info", - "since" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "OfferStatusChange": { - "type": "object", - "properties": { - "offer-name": { - "type": "string" - }, - "status": { - "$ref": "#/definitions/EntityStatus" - } - }, - "additionalProperties": false, - "required": [ - "offer-name", - "status" - ] - }, - "OfferStatusWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "$ref": "#/definitions/OfferStatusChange" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id", - "changes" - ] - } - } - } - }, - { - "Name": "Payloads", - "Description": "API serves payload-specific API methods.", - "Version": 1, - "AvailableTo": [ - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "List": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/PayloadListArgs" - }, - "Result": { - "$ref": "#/definitions/PayloadListResults" - } - }, - "description": "List builds the list of payloads being tracked for\nthe given unit and IDs. If no IDs are provided then all tracked\npayloads for the unit are returned." - } - }, - "definitions": { - "Payload": { - "type": "object", - "properties": { - "class": { - "type": "string" - }, - "id": { - "type": "string" - }, - "labels": { - "type": "array", - "items": { - "type": "string" - } - }, - "machine": { - "type": "string" - }, - "status": { - "type": "string" - }, - "type": { - "type": "string" - }, - "unit": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "class", - "type", - "id", - "status", - "labels", - "unit", - "machine" - ] - }, - "PayloadListArgs": { - "type": "object", - "properties": { - "patterns": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "patterns" - ] - }, - "PayloadListResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/Payload" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - } - } - } - }, - { - "Name": "PayloadsHookContext", - "Description": "UnitFacade serves payload-specific API methods.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "List": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/PayloadResults" - } - }, - "description": "List builds the list of payload being tracked for\nthe given unit and IDs. If no IDs are provided then all tracked\npayloads for the unit are returned." - }, - "LookUp": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/LookUpPayloadArgs" - }, - "Result": { - "$ref": "#/definitions/PayloadResults" - } - }, - "description": "LookUp identifies the payload with the provided name and raw ID." - }, - "SetStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetPayloadStatusArgs" - }, - "Result": { - "$ref": "#/definitions/PayloadResults" - } - }, - "description": "SetStatus sets the raw status of a payload." - }, - "Track": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/TrackPayloadArgs" - }, - "Result": { - "$ref": "#/definitions/PayloadResults" - } - }, - "description": "Track stores a payload to be tracked in state." - }, - "Untrack": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/PayloadResults" - } - }, - "description": "Untrack marks the identified payload as no longer being tracked." - } - }, - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "LookUpPayloadArg": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "id" - ] - }, - "LookUpPayloadArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/LookUpPayloadArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "Payload": { - "type": "object", - "properties": { - "class": { - "type": "string" - }, - "id": { - "type": "string" - }, - "labels": { - "type": "array", - "items": { - "type": "string" - } - }, - "machine": { - "type": "string" - }, - "status": { - "type": "string" - }, - "type": { - "type": "string" - }, - "unit": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "class", - "type", - "id", - "status", - "labels", - "unit", - "machine" - ] - }, - "PayloadResult": { - "type": "object", - "properties": { - "Entity": { - "$ref": "#/definitions/Entity" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "not-found": { - "type": "boolean" - }, - "payload": { - "$ref": "#/definitions/Payload" - }, - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "Entity", - "payload", - "not-found" - ] - }, - "PayloadResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/PayloadResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "SetPayloadStatusArg": { - "type": "object", - "properties": { - "Entity": { - "$ref": "#/definitions/Entity" - }, - "status": { - "type": "string" - }, - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "Entity", - "status" - ] - }, - "SetPayloadStatusArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/SetPayloadStatusArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "TrackPayloadArgs": { - "type": "object", - "properties": { - "payloads": { - "type": "array", - "items": { - "$ref": "#/definitions/Payload" - } - } - }, - "additionalProperties": false, - "required": [ - "payloads" - ] - } - } - } - }, - { - "Name": "Pinger", - "Description": "pinger describes a resource that can be pinged and stopped.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "controller-user", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "Ping": { - "type": "object" - }, - "Stop": { - "type": "object" - } - } - } - }, - { - "Name": "Provisioner", - "Description": "ProvisionerAPIV11 provides v10 of the provisioner facade.\nIt relies on agent-set origin when calling SetHostMachineNetworkConfig.", - "Version": 11, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent" - ], - "Schema": { - "type": "object", - "properties": { - "APIAddresses": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsResult" - } - }, - "description": "APIAddresses returns the list of addresses used to connect to the API." - }, - "APIHostPorts": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/APIHostPortsResult" - } - }, - "description": "APIHostPorts returns the API server addresses." - }, - "AvailabilityZone": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringResults" - } - }, - "description": "AvailabilityZone returns a provider-specific availability zone for each given machine entity" - }, - "CACert": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/BytesResult" - } - }, - "description": "CACert returns the certificate used to validate the state connection." - }, - "Constraints": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ConstraintsResults" - } - }, - "description": "Constraints returns the constraints for each given machine entity." - }, - "ContainerConfig": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ContainerConfig" - } - }, - "description": "ContainerConfig returns information from the model config that is\nneeded for container cloud-init." - }, - "ContainerManagerConfig": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ContainerManagerConfigParams" - }, - "Result": { - "$ref": "#/definitions/ContainerManagerConfig" - } - }, - "description": "ContainerManagerConfig returns information from the model config that is\nneeded for configuring the container manager." - }, - "ControllerAPIInfoForModels": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ControllerAPIInfoResults" - } - }, - "description": "ControllerAPIInfoForModels returns the controller api connection details for the specified models." - }, - "ControllerConfig": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ControllerConfigResult" - } - }, - "description": "ControllerConfig returns the controller's configuration." - }, - "DistributionGroup": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/DistributionGroupResults" - } - }, - "description": "DistributionGroup returns, for each given machine entity,\na slice of instance.Ids that belong to the same distribution\ngroup as that machine. This information may be used to\ndistribute instances for high availability." - }, - "DistributionGroupByMachineId": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsResults" - } - }, - "description": "DistributionGroupByMachineId returns, for each given machine entity,\na slice of machine.Ids that belong to the same distribution\ngroup as that machine. This information may be used to\ndistribute instances for high availability." - }, - "EnsureDead": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "EnsureDead calls EnsureDead on each given entity from state. It\nwill fail if the entity is not present. If it's Alive, nothing will\nhappen (see state/EnsureDead() for units or machines)." - }, - "FindTools": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/FindToolsParams" - }, - "Result": { - "$ref": "#/definitions/FindToolsResult" - } - }, - "description": "FindTools returns a List containing all tools matching the given parameters." - }, - "GetContainerInterfaceInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/MachineNetworkConfigResults" - } - }, - "description": "GetContainerInterfaceInfo returns information to configure networking for a\ncontainer. It accepts container tags as arguments." - }, - "GetContainerProfileInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ContainerProfileResults" - } - }, - "description": "GetContainerProfileInfo returns information to configure a lxd profile(s) for a\ncontainer based on the charms deployed to the container. It accepts container\ntags as arguments. Unlike machineLXDProfileNames which has the environ\nwrite the lxd profiles and returns the names of profiles already written." - }, - "HostChangesForContainers": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/HostNetworkChangeResults" - } - }, - "description": "HostChangesForContainers returns the set of changes that need to be done\nto the host machine to prepare it for the containers to be created.\nPass in a list of the containers that you want the changes for." - }, - "InstanceId": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringResults" - } - }, - "description": "InstanceId returns the provider specific instance id for each given\nmachine or an CodeNotProvisioned error, if not set." - }, - "InstanceStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StatusResults" - } - }, - "description": "InstanceStatus returns the instance status for each given entity.\nOnly machine tags are accepted." - }, - "KeepInstance": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/BoolResults" - } - }, - "description": "KeepInstance returns the keep-instance value for each given machine entity." - }, - "Life": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/LifeResults" - } - }, - "description": "Life returns the life status of every supplied entity, where available." - }, - "MachinesWithTransientErrors": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StatusResults" - } - }, - "description": "MachinesWithTransientErrors returns status data for machines with provisioning\nerrors which are transient." - }, - "MarkMachinesForRemoval": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "MarkMachinesForRemoval indicates that the specified machines are\nready to have any provider-level resources cleaned up and then be\nremoved." - }, - "ModelConfig": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ModelConfigResult" - } - }, - "description": "ModelConfig returns the current model's configuration." - }, - "ModelUUID": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringResult" - } - }, - "description": "ModelUUID returns the model UUID that the current connection is for." - }, - "PrepareContainerInterfaceInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/MachineNetworkConfigResults" - } - }, - "description": "PrepareContainerInterfaceInfo allocates an address and returns information to\nconfigure networking for a container. It accepts container tags as arguments." - }, - "ProvisioningInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ProvisioningInfoResults" - } - }, - "description": "ProvisioningInfo returns the provisioning information for each given machine entity.\nIt supports all positive space constraints." - }, - "ReleaseContainerAddresses": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "ReleaseContainerAddresses finds addresses allocated to a container and marks\nthem as Dead, to be released and removed. It accepts container tags as\narguments." - }, - "Remove": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "Remove removes every given entity from state, calling EnsureDead\nfirst, then Remove. It will fail if the entity is not present." - }, - "SetCharmProfiles": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetProfileArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetCharmProfiles records the given slice of charm profile names." - }, - "SetHostMachineNetworkConfig": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetMachineNetworkConfig" - } - } - }, - "SetInstanceInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/InstancesInfo" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetInstanceInfo sets the provider specific machine id, nonce,\nmetadata and network info for each given machine. Once set, the\ninstance id cannot be changed." - }, - "SetInstanceStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetStatus" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetInstanceStatus updates the instance status for each given\nentity. Only machine tags are accepted." - }, - "SetModificationStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetStatus" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetModificationStatus updates the instance whilst changes are occurring. This\nis different from SetStatus and SetInstanceStatus, by the fact this holds\ninformation about the ongoing changes that are happening to instances.\nConsider LXD Profile updates that can modify a instance, but may not cause\nthe instance to be placed into a error state. This modification status\nserves the purpose of highlighting that to the operator.\nOnly machine tags are accepted." - }, - "SetObservedNetworkConfig": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetMachineNetworkConfig" - } - }, - "description": "SetObservedNetworkConfig reads the network config for the machine\nidentified by the input args.\nThis config is merged with the new network config supplied in the\nsame args and updated if it has changed." - }, - "SetPasswords": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/EntityPasswords" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetPasswords sets the given password for each supplied entity, if possible." - }, - "SetStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetStatus" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetStatus sets the status of each given entity." - }, - "SetSupportedContainers": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/MachineContainersParams" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetSupportedContainers updates the list of containers supported by the machines passed in args." - }, - "Status": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StatusResults" - } - }, - "description": "Status returns the status of each given entity." - }, - "SupportedContainers": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/MachineContainerResults" - } - }, - "description": "SupportedContainers returns the list of containers supported by the machines passed in args." - }, - "Tools": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ToolsResults" - } - }, - "description": "Tools finds the tools necessary for the given agents." - }, - "WatchAPIHostPorts": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResult" - } - }, - "description": "WatchAPIHostPorts watches the API server addresses." - }, - "WatchAllContainers": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/WatchContainers" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - }, - "description": "WatchAllContainers starts a StringsWatcher to watch all containers deployed to\nany machine passed in args." - }, - "WatchContainers": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/WatchContainers" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - }, - "description": "WatchContainers starts a StringsWatcher to watch containers deployed to\nany machine passed in args." - }, - "WatchForModelConfigChanges": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResult" - } - }, - "description": "WatchForModelConfigChanges returns a NotifyWatcher that observes\nchanges to the model configuration.\nNote that although the NotifyWatchResult contains an Error field,\nit's not used because we are only returning a single watcher,\nso we use the regular error return." - }, - "WatchMachineErrorRetry": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResult" - } - }, - "description": "WatchMachineErrorRetry returns a NotifyWatcher that notifies when\nthe provisioner should retry provisioning machines with transient errors." - }, - "WatchModelMachineStartTimes": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsWatchResult" - } - }, - "description": "WatchModelMachineStartTimes watches the non-container machines in the model\nfor changes to the Life or AgentStartTime fields and reports them as a batch." - }, - "WatchModelMachines": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsWatchResult" - } - }, - "description": "WatchModelMachines returns a StringsWatcher that notifies of\nchanges to the life cycles of the top level machines in the current\nmodel." - } - }, - "definitions": { - "APIHostPortsResult": { - "type": "object", - "properties": { - "servers": { - "type": "array", - "items": { - "type": "array", - "items": { - "$ref": "#/definitions/HostPort" - } - } - } - }, - "additionalProperties": false, - "required": [ - "servers" - ] - }, - "Address": { - "type": "object", - "properties": { - "cidr": { - "type": "string" - }, - "config-type": { - "type": "string" - }, - "is-secondary": { - "type": "boolean" - }, - "scope": { - "type": "string" - }, - "space-id": { - "type": "string" - }, - "space-name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "value", - "type", - "scope" - ] - }, - "Base": { - "type": "object", - "properties": { - "channel": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "channel" - ] - }, - "Binary": { - "type": "object", - "properties": { - "Arch": { - "type": "string" - }, - "Build": { - "type": "integer" - }, - "Major": { - "type": "integer" - }, - "Minor": { - "type": "integer" - }, - "Number": { - "$ref": "#/definitions/Number" - }, - "Patch": { - "type": "integer" - }, - "Release": { - "type": "string" - }, - "Tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Major", - "Minor", - "Tag", - "Patch", - "Build", - "Number", - "Release", - "Arch" - ] - }, - "BoolResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "BoolResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/BoolResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "BytesResult": { - "type": "object", - "properties": { - "result": { - "type": "array", - "items": { - "type": "integer" - } - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "CharmLXDProfile": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "description": { - "type": "string" - }, - "devices": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - } - } - } - }, - "additionalProperties": false, - "required": [ - "config", - "description", - "devices" - ] - }, - "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" - }, - "source": { - "type": "string" - }, - "stream": { - "type": "string" - }, - "version": { - "type": "string" - }, - "virt-type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "image-id", - "region", - "version", - "arch", - "source", - "priority" - ] - }, - "ConstraintsResult": { - "type": "object", - "properties": { - "constraints": { - "$ref": "#/definitions/Value" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "constraints" - ] - }, - "ConstraintsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ConstraintsResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ContainerConfig": { - "type": "object", - "properties": { - "UpdateBehavior": { - "$ref": "#/definitions/UpdateBehavior" - }, - "apt-mirror": { - "type": "string" - }, - "apt-proxy": { - "$ref": "#/definitions/Settings" - }, - "authorized-keys": { - "type": "string" - }, - "cloudinit-userdata": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "container-inherit-properties": { - "type": "string" - }, - "juju-proxy": { - "$ref": "#/definitions/Settings" - }, - "legacy-proxy": { - "$ref": "#/definitions/Settings" - }, - "provider-type": { - "type": "string" - }, - "snap-proxy": { - "$ref": "#/definitions/Settings" - }, - "snap-store-assertions": { - "type": "string" - }, - "snap-store-proxy-id": { - "type": "string" - }, - "snap-store-proxy-url": { - "type": "string" - }, - "ssl-hostname-verification": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "provider-type", - "authorized-keys", - "ssl-hostname-verification", - "legacy-proxy", - "juju-proxy", - "apt-proxy", - "snap-proxy", - "snap-store-assertions", - "snap-store-proxy-id", - "snap-store-proxy-url", - "UpdateBehavior" - ] - }, - "ContainerLXDProfile": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "profile": { - "$ref": "#/definitions/CharmLXDProfile" - } - }, - "additionalProperties": false, - "required": [ - "profile", - "name" - ] - }, - "ContainerManagerConfig": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "ContainerManagerConfigParams": { - "type": "object", - "properties": { - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type" - ] - }, - "ContainerProfileResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "lxd-profiles": { - "type": "array", - "items": { - "$ref": "#/definitions/ContainerLXDProfile" - } - } - }, - "additionalProperties": false - }, - "ContainerProfileResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ContainerProfileResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ControllerAPIInfoResult": { - "type": "object", - "properties": { - "addresses": { - "type": "array", - "items": { - "type": "string" - } - }, - "cacert": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "addresses", - "cacert" - ] - }, - "ControllerAPIInfoResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ControllerAPIInfoResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ControllerConfigResult": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "DeviceBridgeInfo": { - "type": "object", - "properties": { - "bridge-name": { - "type": "string" - }, - "host-device-name": { - "type": "string" - }, - "mac-address": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "host-device-name", - "bridge-name", - "mac-address" - ] - }, - "DistributionGroupResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "DistributionGroupResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/DistributionGroupResult" - } - } - }, - "additionalProperties": false, - "required": [ - "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" - ] - }, - "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": { - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "FindToolsParams": { - "type": "object", - "properties": { - "agentstream": { - "type": "string" - }, - "arch": { - "type": "string" - }, - "major": { - "type": "integer" - }, - "number": { - "$ref": "#/definitions/Number" - }, - "os-type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "number", - "major", - "arch", - "os-type", - "agentstream" - ] - }, - "FindToolsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "list": { - "type": "array", - "items": { - "$ref": "#/definitions/Tools" - } - } - }, - "additionalProperties": false, - "required": [ - "list" - ] - }, - "HardwareCharacteristics": { - "type": "object", - "properties": { - "arch": { - "type": "string" - }, - "availability-zone": { - "type": "string" - }, - "cpu-cores": { - "type": "integer" - }, - "cpu-power": { - "type": "integer" - }, - "mem": { - "type": "integer" - }, - "root-disk": { - "type": "integer" - }, - "root-disk-source": { - "type": "string" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "virt-type": { - "type": "string" - } - }, - "additionalProperties": false - }, - "HostNetworkChange": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "new-bridges": { - "type": "array", - "items": { - "$ref": "#/definitions/DeviceBridgeInfo" - } - }, - "reconfigure-delay": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "new-bridges", - "reconfigure-delay" - ] - }, - "HostNetworkChangeResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/HostNetworkChange" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "HostPort": { - "type": "object", - "properties": { - "Address": { - "$ref": "#/definitions/Address" - }, - "cidr": { - "type": "string" - }, - "config-type": { - "type": "string" - }, - "is-secondary": { - "type": "boolean" - }, - "port": { - "type": "integer" - }, - "scope": { - "type": "string" - }, - "space-id": { - "type": "string" - }, - "space-name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "value", - "type", - "scope", - "Address", - "port" - ] - }, - "InstanceInfo": { - "type": "object", - "properties": { - "characteristics": { - "$ref": "#/definitions/HardwareCharacteristics" - }, - "charm-profiles": { - "type": "array", - "items": { - "type": "string" - } - }, - "display-name": { - "type": "string" - }, - "instance-id": { - "type": "string" - }, - "network-config": { - "type": "array", - "items": { - "$ref": "#/definitions/NetworkConfig" - } - }, - "nonce": { - "type": "string" - }, - "tag": { - "type": "string" - }, - "volume-attachments": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/VolumeAttachmentInfo" - } - } - }, - "volumes": { - "type": "array", - "items": { - "$ref": "#/definitions/Volume" - } - } - }, - "additionalProperties": false, - "required": [ - "tag", - "instance-id", - "display-name", - "nonce", - "characteristics", - "volumes", - "volume-attachments", - "network-config", - "charm-profiles" - ] - }, - "InstancesInfo": { - "type": "object", - "properties": { - "machines": { - "type": "array", - "items": { - "$ref": "#/definitions/InstanceInfo" - } - } - }, - "additionalProperties": false, - "required": [ - "machines" - ] - }, - "LifeResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "life": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "life" - ] - }, - "LifeResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/LifeResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "MachineContainerResult": { - "type": "object", - "properties": { - "container-types": { - "type": "array", - "items": { - "type": "string" - } - }, - "determined": { - "type": "boolean" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "container-types", - "determined" - ] - }, - "MachineContainerResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/MachineContainerResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "MachineContainers": { - "type": "object", - "properties": { - "container-types": { - "type": "array", - "items": { - "type": "string" - } - }, - "machine-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "machine-tag", - "container-types" - ] - }, - "MachineContainersParams": { - "type": "object", - "properties": { - "params": { - "type": "array", - "items": { - "$ref": "#/definitions/MachineContainers" - } - } - }, - "additionalProperties": false, - "required": [ - "params" - ] - }, - "MachineNetworkConfigResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "info": { - "type": "array", - "items": { - "$ref": "#/definitions/NetworkConfig" - } - } - }, - "additionalProperties": false, - "required": [ - "info" - ] - }, - "MachineNetworkConfigResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/MachineNetworkConfigResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ModelConfigResult": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "NetworkConfig": { - "type": "object", - "properties": { - "address": { - "type": "string" - }, - "addresses": { - "type": "array", - "items": { - "$ref": "#/definitions/Address" - } - }, - "cidr": { - "type": "string" - }, - "config-type": { - "type": "string" - }, - "device-index": { - "type": "integer" - }, - "disabled": { - "type": "boolean" - }, - "dns-search-domains": { - "type": "array", - "items": { - "type": "string" - } - }, - "dns-servers": { - "type": "array", - "items": { - "type": "string" - } - }, - "gateway-address": { - "type": "string" - }, - "interface-name": { - "type": "string" - }, - "interface-type": { - "type": "string" - }, - "is-default-gateway": { - "type": "boolean" - }, - "mac-address": { - "type": "string" - }, - "mtu": { - "type": "integer" - }, - "no-auto-start": { - "type": "boolean" - }, - "origin": { - "type": "string" - }, - "parent-interface-name": { - "type": "string" - }, - "provider-address-id": { - "type": "string" - }, - "provider-id": { - "type": "string" - }, - "provider-network-id": { - "type": "string" - }, - "provider-space-id": { - "type": "string" - }, - "provider-subnet-id": { - "type": "string" - }, - "provider-vlan-id": { - "type": "string" - }, - "routes": { - "type": "array", - "items": { - "$ref": "#/definitions/NetworkRoute" - } - }, - "shadow-addresses": { - "type": "array", - "items": { - "$ref": "#/definitions/Address" - } - }, - "virtual-port-type": { - "type": "string" - }, - "vlan-tag": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "device-index", - "mac-address", - "cidr", - "mtu", - "provider-id", - "provider-network-id", - "provider-subnet-id", - "provider-space-id", - "provider-address-id", - "provider-vlan-id", - "vlan-tag", - "interface-name", - "parent-interface-name", - "interface-type", - "disabled" - ] - }, - "NetworkRoute": { - "type": "object", - "properties": { - "destination-cidr": { - "type": "string" - }, - "gateway-ip": { - "type": "string" - }, - "metric": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "destination-cidr", - "gateway-ip", - "metric" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "Number": { - "type": "object", - "properties": { - "Build": { - "type": "integer" - }, - "Major": { - "type": "integer" - }, - "Minor": { - "type": "integer" - }, - "Patch": { - "type": "integer" - }, - "Tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Major", - "Minor", - "Tag", - "Patch", - "Build" - ] - }, - "ProvisioningInfo": { - "type": "object", - "properties": { - "ProvisioningNetworkTopology": { - "$ref": "#/definitions/ProvisioningNetworkTopology" - }, - "base": { - "$ref": "#/definitions/Base" - }, - "charm-lxd-profiles": { - "type": "array", - "items": { - "type": "string" - } - }, - "cloudinit-userdata": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "constraints": { - "$ref": "#/definitions/Value" - }, - "controller-config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "endpoint-bindings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "image-metadata": { - "type": "array", - "items": { - "$ref": "#/definitions/CloudImageMetadata" - } - }, - "jobs": { - "type": "array", - "items": { - "type": "string" - } - }, - "placement": { - "type": "string" - }, - "root-disk": { - "$ref": "#/definitions/VolumeParams" - }, - "space-subnets": { - "type": "object", - "patternProperties": { - ".*": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "subnet-zones": { - "type": "object", - "patternProperties": { - ".*": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "tags": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "volume-attachments": { - "type": "array", - "items": { - "$ref": "#/definitions/VolumeAttachmentParams" - } - }, - "volumes": { - "type": "array", - "items": { - "$ref": "#/definitions/VolumeParams" - } - } - }, - "additionalProperties": false, - "required": [ - "constraints", - "base", - "placement", - "jobs", - "subnet-zones", - "space-subnets", - "ProvisioningNetworkTopology" - ] - }, - "ProvisioningInfoResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/ProvisioningInfo" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "ProvisioningInfoResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ProvisioningInfoResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ProvisioningNetworkTopology": { - "type": "object", - "properties": { - "space-subnets": { - "type": "object", - "patternProperties": { - ".*": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "subnet-zones": { - "type": "object", - "patternProperties": { - ".*": { - "type": "array", - "items": { - "type": "string" - } - } - } - } - }, - "additionalProperties": false, - "required": [ - "subnet-zones", - "space-subnets" - ] - }, - "SetMachineNetworkConfig": { - "type": "object", - "properties": { - "config": { - "type": "array", - "items": { - "$ref": "#/definitions/NetworkConfig" - } - }, - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "config" - ] - }, - "SetProfileArg": { - "type": "object", - "properties": { - "entity": { - "$ref": "#/definitions/Entity" - }, - "profiles": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "entity", - "profiles" - ] - }, - "SetProfileArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/SetProfileArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "SetStatus": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityStatusArgs" - } - } - }, - "additionalProperties": false, - "required": [ - "entities" - ] - }, - "Settings": { - "type": "object", - "properties": { - "AutoNoProxy": { - "type": "string" - }, - "Ftp": { - "type": "string" - }, - "Http": { - "type": "string" - }, - "Https": { - "type": "string" - }, - "NoProxy": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Http", - "Https", - "Ftp", - "NoProxy", - "AutoNoProxy" - ] - }, - "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": [ - "id", - "life", - "status", - "info", - "data", - "since" - ] - }, - "StatusResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StatusResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "StringResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "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": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "StringsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringsResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "StringsWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id" - ] - }, - "StringsWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringsWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "Tools": { - "type": "object", - "properties": { - "sha256": { - "type": "string" - }, - "size": { - "type": "integer" - }, - "url": { - "type": "string" - }, - "version": { - "$ref": "#/definitions/Binary" - } - }, - "additionalProperties": false, - "required": [ - "version", - "url", - "size" - ] - }, - "ToolsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "tools": { - "type": "array", - "items": { - "$ref": "#/definitions/Tools" - } - } - }, - "additionalProperties": false, - "required": [ - "tools" - ] - }, - "ToolsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ToolsResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "UpdateBehavior": { - "type": "object", - "properties": { - "enable-os-refresh-update": { - "type": "boolean" - }, - "enable-os-upgrade": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "enable-os-refresh-update", - "enable-os-upgrade" - ] - }, - "Value": { - "type": "object", - "properties": { - "allocate-public-ip": { - "type": "boolean" - }, - "arch": { - "type": "string" - }, - "container": { - "type": "string" - }, - "cores": { - "type": "integer" - }, - "cpu-power": { - "type": "integer" - }, - "image-id": { - "type": "string" - }, - "instance-role": { - "type": "string" - }, - "instance-type": { - "type": "string" - }, - "mem": { - "type": "integer" - }, - "root-disk": { - "type": "integer" - }, - "root-disk-source": { - "type": "string" - }, - "spaces": { - "type": "array", - "items": { - "type": "string" - } - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "virt-type": { - "type": "string" - }, - "zones": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "Volume": { - "type": "object", - "properties": { - "info": { - "$ref": "#/definitions/VolumeInfo" - }, - "volume-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "volume-tag", - "info" - ] - }, - "VolumeAttachmentInfo": { - "type": "object", - "properties": { - "bus-address": { - "type": "string" - }, - "device-link": { - "type": "string" - }, - "device-name": { - "type": "string" - }, - "plan-info": { - "$ref": "#/definitions/VolumeAttachmentPlanInfo" - }, - "read-only": { - "type": "boolean" - } - }, - "additionalProperties": false - }, - "VolumeAttachmentParams": { - "type": "object", - "properties": { - "instance-id": { - "type": "string" - }, - "machine-tag": { - "type": "string" - }, - "provider": { - "type": "string" - }, - "read-only": { - "type": "boolean" - }, - "volume-id": { - "type": "string" - }, - "volume-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "volume-tag", - "machine-tag", - "provider" - ] - }, - "VolumeAttachmentPlanInfo": { - "type": "object", - "properties": { - "device-attributes": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "device-type": { - "type": "string" - } - }, - "additionalProperties": false - }, - "VolumeInfo": { - "type": "object", - "properties": { - "hardware-id": { - "type": "string" - }, - "persistent": { - "type": "boolean" - }, - "pool": { - "type": "string" - }, - "size": { - "type": "integer" - }, - "volume-id": { - "type": "string" - }, - "wwn": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "volume-id", - "size", - "persistent" - ] - }, - "VolumeParams": { - "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" - } - } - }, - "volume-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "volume-tag", - "size", - "provider" - ] - }, - "WatchContainer": { - "type": "object", - "properties": { - "container-type": { - "type": "string" - }, - "machine-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "machine-tag", - "container-type" - ] - }, - "WatchContainers": { - "type": "object", - "properties": { - "params": { - "type": "array", - "items": { - "$ref": "#/definitions/WatchContainer" - } - } - }, - "additionalProperties": false, - "required": [ - "params" - ] - } - } - } - }, - { - "Name": "ProxyUpdater", - "Description": "API provides the ProxyUpdater version 2 facade.", - "Version": 2, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "ProxyConfig": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ProxyConfigResults" - } - }, - "description": "ProxyConfig returns the proxy settings for the current model." - }, - "WatchForProxyConfigAndAPIHostPortChanges": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "WatchForProxyConfigAndAPIHostPortChanges watches for changes to the proxy and api host port settings." - } - }, - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "NotifyWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ProxyConfig": { - "type": "object", - "properties": { - "ftp": { - "type": "string" - }, - "http": { - "type": "string" - }, - "https": { - "type": "string" - }, - "no-proxy": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "http", - "https", - "ftp", - "no-proxy" - ] - }, - "ProxyConfigResult": { - "type": "object", - "properties": { - "apt-mirror": { - "type": "string" - }, - "apt-proxy-settings": { - "$ref": "#/definitions/ProxyConfig" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "juju-proxy-settings": { - "$ref": "#/definitions/ProxyConfig" - }, - "legacy-proxy-settings": { - "$ref": "#/definitions/ProxyConfig" - }, - "snap-proxy-settings": { - "$ref": "#/definitions/ProxyConfig" - }, - "snap-store-assertions": { - "type": "string" - }, - "snap-store-id": { - "type": "string" - }, - "snap-store-proxy-url": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "legacy-proxy-settings", - "juju-proxy-settings" - ] - }, - "ProxyConfigResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ProxyConfigResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - } - } - } - }, - { - "Name": "Reboot", - "Description": "RebootAPI provides access to the Upgrader API facade.", - "Version": 2, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent" - ], - "Schema": { - "type": "object", - "properties": { - "ClearReboot": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "ClearReboot will clear the reboot flag on provided machines, if it exists." - }, - "GetRebootAction": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/RebootActionResults" - } - }, - "description": "GetRebootAction returns the action a machine agent should take.\nIf a reboot flag is set on the machine, then that machine is\nexpected to reboot (params.ShouldReboot).\na reboot flag set on the machine parent or grandparent, will\ncause the machine to shutdown (params.ShouldShutdown).\nIf no reboot flag is set, the machine should do nothing (params.ShouldDoNothing)." - }, - "RequestReboot": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "RequestReboot sets the reboot flag on the provided machines" - }, - "WatchForRebootEvent": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResult" - } - }, - "description": "WatchForRebootEvent starts a watcher to track if there is a new\nreboot request on the machines ID or any of its parents (in case we are a container)." - } - }, - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "RebootActionResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "string" - } - }, - "additionalProperties": false - }, - "RebootActionResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/RebootActionResult" - } - } - }, - "additionalProperties": false - } - } - } - }, - { - "Name": "RelationStatusWatcher", - "Description": "srvRelationStatusWatcher defines the API wrapping a state.RelationStatusWatcher.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "Next": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/RelationLifeSuspendedStatusWatchResult" - } - }, - "description": "Next returns when a change has occurred to an entity of the\ncollection being watched since the most recent call to Next\nor the Watch call that created the srvRelationStatusWatcher." - }, - "Stop": { - "type": "object", - "description": "Stop stops the watcher." - } - }, - "definitions": { - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "RelationLifeSuspendedStatusChange": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "life": { - "type": "string" - }, - "suspended": { - "type": "boolean" - }, - "suspended-reason": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "key", - "life", - "suspended", - "suspended-reason" - ] - }, - "RelationLifeSuspendedStatusWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "$ref": "#/definitions/RelationLifeSuspendedStatusChange" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id", - "changes" - ] - } - } - } - }, - { - "Name": "RelationUnitsWatcher", - "Description": "srvRelationUnitsWatcher defines the API wrapping a state.RelationUnitsWatcher.\nIt notifies about units entering and leaving the scope of a RelationUnit,\nand changes to the settings of those units known to have entered.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "Next": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/RelationUnitsWatchResult" - } - }, - "description": "Next returns when a change has occurred to an entity of the\ncollection being watched since the most recent call to Next\nor the Watch call that created the srvRelationUnitsWatcher." - }, - "Stop": { - "type": "object", - "description": "Stop stops the watcher." - } - }, - "definitions": { - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "RelationUnitsChange": { - "type": "object", - "properties": { - "app-changed": { - "type": "object", - "patternProperties": { - ".*": { - "type": "integer" - } - } - }, - "changed": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/UnitSettings" - } - } - }, - "departed": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "changed" - ] - }, - "RelationUnitsWatchResult": { - "type": "object", - "properties": { - "changes": { - "$ref": "#/definitions/RelationUnitsChange" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id", - "changes" - ] - }, - "UnitSettings": { - "type": "object", - "properties": { - "version": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "version" - ] - } - } - } - }, - { - "Name": "RemoteRelationWatcher", - "Description": "srvRemoteRelationWatcher defines the API wrapping a\nstate.RelationUnitsWatcher but serving the events it emits as\nfully-expanded params.RemoteRelationChangeEvents so they can be\nused across model/controller boundaries.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "Next": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/RemoteRelationWatchResult" - } - } - }, - "Stop": { - "type": "object", - "description": "Stop stops the watcher." - } - }, - "definitions": { - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "Macaroon": { - "type": "object", - "additionalProperties": false - }, - "RemoteRelationChangeEvent": { - "type": "object", - "properties": { - "application-settings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "application-token": { - "type": "string" - }, - "bakery-version": { - "type": "integer" - }, - "changed-units": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoteRelationUnitChange" - } - }, - "departed-units": { - "type": "array", - "items": { - "type": "integer" - } - }, - "force-cleanup": { - "type": "boolean" - }, - "life": { - "type": "string" - }, - "macaroons": { - "type": "array", - "items": { - "$ref": "#/definitions/Macaroon" - } - }, - "relation-token": { - "type": "string" - }, - "suspended": { - "type": "boolean" - }, - "suspended-reason": { - "type": "string" - }, - "unit-count": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "relation-token", - "application-token", - "life", - "unit-count" - ] - }, - "RemoteRelationUnitChange": { - "type": "object", - "properties": { - "settings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "unit-id": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "unit-id" - ] - }, - "RemoteRelationWatchResult": { - "type": "object", - "properties": { - "changes": { - "$ref": "#/definitions/RemoteRelationChangeEvent" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id", - "changes" - ] - } - } - } - }, - { - "Name": "RemoteRelations", - "Description": "API provides access to the remote relations API facade.", - "Version": 2, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "ConsumeRemoteRelationChanges": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RemoteRelationsChanges" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "ConsumeRemoteRelationChanges consumes changes to settings originating\nfrom the remote/offering side of relations." - }, - "ConsumeRemoteSecretChanges": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/LatestSecretRevisionChanges" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "ConsumeRemoteSecretChanges updates the local model with secret revision changes\noriginating from the remote/offering model." - }, - "ControllerAPIInfoForModels": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ControllerAPIInfoResults" - } - }, - "description": "ControllerAPIInfoForModels returns the controller api connection details for the specified models." - }, - "ControllerConfig": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ControllerConfigResult" - } - }, - "description": "ControllerConfig returns the controller's configuration." - }, - "ExportEntities": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/TokenResults" - } - }, - "description": "ExportEntities allocates unique, remote entity IDs for the given entities in the local model." - }, - "GetTokens": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/GetTokenArgs" - }, - "Result": { - "$ref": "#/definitions/StringResults" - } - }, - "description": "GetTokens returns the token associated with the entities with the given tags for the given models." - }, - "ImportRemoteEntities": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RemoteEntityTokenArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "ImportRemoteEntities adds entities to the remote entities collection with the specified opaque tokens." - }, - "Relations": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/RemoteRelationResults" - } - }, - "description": "Relations returns information about the cross-model relations with the specified keys\nin the local model." - }, - "RemoteApplications": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/RemoteApplicationResults" - } - }, - "description": "RemoteApplications returns the current state of the remote applications with\nthe specified names in the local model." - }, - "SaveMacaroons": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/EntityMacaroonArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SaveMacaroons saves the macaroons for the given entities." - }, - "SetRemoteApplicationsStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetStatus" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetRemoteApplicationsStatus sets the status for the specified remote applications." - }, - "UpdateControllersForModels": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/UpdateControllersForModelsParams" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "UpdateControllersForModels changes the external controller records for the\nassociated model entities. This is used when the remote relations worker gets\nredirected following migration of an offering model." - }, - "WatchLocalRelationChanges": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/RemoteRelationWatchResults" - } - }, - "description": "WatchLocalRelationChanges starts a RemoteRelationWatcher for each\nspecified relation, returning the watcher IDs and initial values,\nor an error if the remote relations couldn't be watched." - }, - "WatchRemoteApplicationRelations": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - }, - "description": "WatchRemoteApplicationRelations starts a StringsWatcher for watching the relations of\neach specified application in the local model, and returns the watcher IDs\nand initial values, or an error if the services' relations could not be\nwatched." - }, - "WatchRemoteApplications": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsWatchResult" - } - }, - "description": "WatchRemoteApplications starts a strings watcher that notifies of the addition,\nremoval, and lifecycle changes of remote applications in the model; and\nreturns the watcher ID and initial IDs of remote applications, or an error if\nwatching failed." - }, - "WatchRemoteRelations": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsWatchResult" - } - }, - "description": "WatchRemoteRelations starts a strings watcher that notifies of the addition,\nremoval, and lifecycle changes of remote relations in the model; and\nreturns the watcher ID and initial IDs of remote relations, or an error if\nwatching failed." - } - }, - "definitions": { - "ControllerAPIInfoResult": { - "type": "object", - "properties": { - "addresses": { - "type": "array", - "items": { - "type": "string" - } - }, - "cacert": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "addresses", - "cacert" - ] - }, - "ControllerAPIInfoResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ControllerAPIInfoResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ControllerConfigResult": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "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" - ] - }, - "EntityMacaroonArg": { - "type": "object", - "properties": { - "macaroon": { - "$ref": "#/definitions/Macaroon" - }, - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "macaroon", - "tag" - ] - }, - "EntityMacaroonArgs": { - "type": "object", - "properties": { - "Args": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityMacaroonArg" - } - } - }, - "additionalProperties": false, - "required": [ - "Args" - ] - }, - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ExternalControllerInfo": { - "type": "object", - "properties": { - "addrs": { - "type": "array", - "items": { - "type": "string" - } - }, - "ca-cert": { - "type": "string" - }, - "controller-alias": { - "type": "string" - }, - "controller-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "controller-tag", - "controller-alias", - "addrs", - "ca-cert" - ] - }, - "GetTokenArg": { - "type": "object", - "properties": { - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag" - ] - }, - "GetTokenArgs": { - "type": "object", - "properties": { - "Args": { - "type": "array", - "items": { - "$ref": "#/definitions/GetTokenArg" - } - } - }, - "additionalProperties": false, - "required": [ - "Args" - ] - }, - "LatestSecretRevisionChanges": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "$ref": "#/definitions/SecretRevisionChange" - } - } - }, - "additionalProperties": false, - "required": [ - "changes" - ] - }, - "Macaroon": { - "type": "object", - "additionalProperties": false - }, - "RemoteApplication": { - "type": "object", - "properties": { - "consume-version": { - "type": "integer" - }, - "is-consumer-proxy": { - "type": "boolean" - }, - "life": { - "type": "string" - }, - "macaroon": { - "$ref": "#/definitions/Macaroon" - }, - "model-uuid": { - "type": "string" - }, - "name": { - "type": "string" - }, - "offer-uuid": { - "type": "string" - }, - "status": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "offer-uuid", - "model-uuid", - "is-consumer-proxy" - ] - }, - "RemoteApplicationResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/RemoteApplication" - } - }, - "additionalProperties": false - }, - "RemoteApplicationResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoteApplicationResult" - } - } - }, - "additionalProperties": false - }, - "RemoteEndpoint": { - "type": "object", - "properties": { - "interface": { - "type": "string" - }, - "limit": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "role": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "role", - "interface", - "limit" - ] - }, - "RemoteEntityTokenArg": { - "type": "object", - "properties": { - "tag": { - "type": "string" - }, - "token": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag" - ] - }, - "RemoteEntityTokenArgs": { - "type": "object", - "properties": { - "Args": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoteEntityTokenArg" - } - } - }, - "additionalProperties": false, - "required": [ - "Args" - ] - }, - "RemoteRelation": { - "type": "object", - "properties": { - "application-name": { - "type": "string" - }, - "endpoint": { - "$ref": "#/definitions/RemoteEndpoint" - }, - "id": { - "type": "integer" - }, - "key": { - "type": "string" - }, - "life": { - "type": "string" - }, - "remote-application-name": { - "type": "string" - }, - "remote-endpoint-name": { - "type": "string" - }, - "source-model-uuid": { - "type": "string" - }, - "suspended": { - "type": "boolean" - }, - "unit-count": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "life", - "suspended", - "id", - "key", - "application-name", - "endpoint", - "unit-count", - "remote-application-name", - "remote-endpoint-name", - "source-model-uuid" - ] - }, - "RemoteRelationChangeEvent": { - "type": "object", - "properties": { - "application-settings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "application-token": { - "type": "string" - }, - "bakery-version": { - "type": "integer" - }, - "changed-units": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoteRelationUnitChange" - } - }, - "departed-units": { - "type": "array", - "items": { - "type": "integer" - } - }, - "force-cleanup": { - "type": "boolean" - }, - "life": { - "type": "string" - }, - "macaroons": { - "type": "array", - "items": { - "$ref": "#/definitions/Macaroon" - } - }, - "relation-token": { - "type": "string" - }, - "suspended": { - "type": "boolean" - }, - "suspended-reason": { - "type": "string" - }, - "unit-count": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "relation-token", - "application-token", - "life", - "unit-count" - ] - }, - "RemoteRelationResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/RemoteRelation" - } - }, - "additionalProperties": false - }, - "RemoteRelationResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoteRelationResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "RemoteRelationUnitChange": { - "type": "object", - "properties": { - "settings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "unit-id": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "unit-id" - ] - }, - "RemoteRelationWatchResult": { - "type": "object", - "properties": { - "changes": { - "$ref": "#/definitions/RemoteRelationChangeEvent" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id", - "changes" - ] - }, - "RemoteRelationWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoteRelationWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "RemoteRelationsChanges": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoteRelationChangeEvent" - } - } - }, - "additionalProperties": false - }, - "SecretRevisionChange": { - "type": "object", - "properties": { - "revision": { - "type": "integer" - }, - "uri": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "uri", - "revision" - ] - }, - "SetStatus": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityStatusArgs" - } - } - }, - "additionalProperties": false, - "required": [ - "entities" - ] - }, - "StringResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "StringResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "StringsWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id" - ] - }, - "StringsWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringsWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "TokenResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "token": { - "type": "string" - } - }, - "additionalProperties": false - }, - "TokenResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/TokenResult" - } - } - }, - "additionalProperties": false - }, - "UpdateControllerForModel": { - "type": "object", - "properties": { - "info": { - "$ref": "#/definitions/ExternalControllerInfo" - }, - "model-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "model-tag", - "info" - ] - }, - "UpdateControllersForModelsParams": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "$ref": "#/definitions/UpdateControllerForModel" - } - } - }, - "additionalProperties": false, - "required": [ - "changes" - ] - } - } - } - }, - { - "Name": "Resources", - "Description": "API is the public API facade for resources.", - "Version": 3, - "AvailableTo": [ - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "AddPendingResources": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/AddPendingResourcesArgsV2" - }, - "Result": { - "$ref": "#/definitions/AddPendingResourcesResult" - } - }, - "description": "AddPendingResources adds the provided resources (info) to the Juju\nmodel in a pending state, meaning they are not available until\nresolved. Handles CharmHub and Local charms." - }, - "ListResources": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ListResourcesArgs" - }, - "Result": { - "$ref": "#/definitions/ResourcesResults" - } - }, - "description": "ListResources returns the list of resources for the given application." - } - }, - "definitions": { - "AddPendingResourcesArgsV2": { - "type": "object", - "properties": { - "Entity": { - "$ref": "#/definitions/Entity" - }, - "charm-origin": { - "$ref": "#/definitions/CharmOrigin" - }, - "macaroon": { - "$ref": "#/definitions/Macaroon" - }, - "resources": { - "type": "array", - "items": { - "$ref": "#/definitions/CharmResource" - } - }, - "tag": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "Entity", - "url", - "charm-origin", - "macaroon", - "resources" - ] - }, - "AddPendingResourcesResult": { - "type": "object", - "properties": { - "ErrorResult": { - "$ref": "#/definitions/ErrorResult" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "pending-ids": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "ErrorResult", - "pending-ids" - ] - }, - "Base": { - "type": "object", - "properties": { - "channel": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "channel" - ] - }, - "CharmOrigin": { - "type": "object", - "properties": { - "architecture": { - "type": "string" - }, - "base": { - "$ref": "#/definitions/Base" - }, - "branch": { - "type": "string" - }, - "hash": { - "type": "string" - }, - "id": { - "type": "string" - }, - "instance-key": { - "type": "string" - }, - "revision": { - "type": "integer" - }, - "risk": { - "type": "string" - }, - "source": { - "type": "string" - }, - "track": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "source", - "type", - "id" - ] - }, - "CharmResource": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "fingerprint": { - "type": "array", - "items": { - "type": "integer" - } - }, - "name": { - "type": "string" - }, - "origin": { - "type": "string" - }, - "path": { - "type": "string" - }, - "revision": { - "type": "integer" - }, - "size": { - "type": "integer" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "type", - "path", - "origin", - "revision", - "fingerprint", - "size" - ] - }, - "Entity": { - "type": "object", - "properties": { - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ListResourcesArgs": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } - } - }, - "additionalProperties": false, - "required": [ - "entities" - ] - }, - "Macaroon": { - "type": "object", - "additionalProperties": false - }, - "Resource": { - "type": "object", - "properties": { - "CharmResource": { - "$ref": "#/definitions/CharmResource" - }, - "application": { - "type": "string" - }, - "description": { - "type": "string" - }, - "fingerprint": { - "type": "array", - "items": { - "type": "integer" - } - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "origin": { - "type": "string" - }, - "path": { - "type": "string" - }, - "pending-id": { - "type": "string" - }, - "revision": { - "type": "integer" - }, - "size": { - "type": "integer" - }, - "timestamp": { - "type": "string", - "format": "date-time" - }, - "type": { - "type": "string" - }, - "username": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "type", - "path", - "origin", - "revision", - "fingerprint", - "size", - "CharmResource", - "id", - "pending-id", - "application", - "username", - "timestamp" - ] - }, - "ResourcesResult": { - "type": "object", - "properties": { - "ErrorResult": { - "$ref": "#/definitions/ErrorResult" - }, - "charm-store-resources": { - "type": "array", - "items": { - "$ref": "#/definitions/CharmResource" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "resources": { - "type": "array", - "items": { - "$ref": "#/definitions/Resource" - } - }, - "unit-resources": { - "type": "array", - "items": { - "$ref": "#/definitions/UnitResources" - } - } - }, - "additionalProperties": false, - "required": [ - "ErrorResult", - "resources", - "charm-store-resources", - "unit-resources" - ] - }, - "ResourcesResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ResourcesResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "UnitResources": { - "type": "object", - "properties": { - "Entity": { - "$ref": "#/definitions/Entity" - }, - "download-progress": { - "type": "object", - "patternProperties": { - ".*": { - "type": "integer" - } - } - }, - "resources": { - "type": "array", - "items": { - "$ref": "#/definitions/Resource" - } - }, - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "Entity", - "resources", - "download-progress" - ] - } - } - } - }, - { - "Name": "ResourcesHookContext", - "Description": "UnitFacade is the resources portion of the uniter's API facade.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "GetResourceInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ListUnitResourcesArgs" - }, - "Result": { - "$ref": "#/definitions/UnitResourcesResult" - } - }, - "description": "GetResourceInfo returns the resource info for each of the given\nresource names (for the implicit application). If any one is missing then\nthe corresponding result is set with errors.NotFound." - } - }, - "definitions": { - "CharmResource": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "fingerprint": { - "type": "array", - "items": { - "type": "integer" - } - }, - "name": { - "type": "string" - }, - "origin": { - "type": "string" - }, - "path": { - "type": "string" - }, - "revision": { - "type": "integer" - }, - "size": { - "type": "integer" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "type", - "path", - "origin", - "revision", - "fingerprint", - "size" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ListUnitResourcesArgs": { - "type": "object", - "properties": { - "resource-names": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "resource-names" - ] - }, - "Resource": { - "type": "object", - "properties": { - "CharmResource": { - "$ref": "#/definitions/CharmResource" - }, - "application": { - "type": "string" - }, - "description": { - "type": "string" - }, - "fingerprint": { - "type": "array", - "items": { - "type": "integer" - } - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "origin": { - "type": "string" - }, - "path": { - "type": "string" - }, - "pending-id": { - "type": "string" - }, - "revision": { - "type": "integer" - }, - "size": { - "type": "integer" - }, - "timestamp": { - "type": "string", - "format": "date-time" - }, - "type": { - "type": "string" - }, - "username": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "type", - "path", - "origin", - "revision", - "fingerprint", - "size", - "CharmResource", - "id", - "pending-id", - "application", - "username", - "timestamp" - ] - }, - "UnitResourceResult": { - "type": "object", - "properties": { - "ErrorResult": { - "$ref": "#/definitions/ErrorResult" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "resource": { - "$ref": "#/definitions/Resource" - } - }, - "additionalProperties": false, - "required": [ - "ErrorResult", - "resource" - ] - }, - "UnitResourcesResult": { - "type": "object", - "properties": { - "ErrorResult": { - "$ref": "#/definitions/ErrorResult" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "resources": { - "type": "array", - "items": { - "$ref": "#/definitions/UnitResourceResult" - } - } - }, - "additionalProperties": false, - "required": [ - "ErrorResult", - "resources" - ] - } - } - } - }, - { - "Name": "RetryStrategy", - "Description": "RetryStrategyAPI implements RetryStrategy", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "RetryStrategy": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/RetryStrategyResults" - } - }, - "description": "RetryStrategy returns RetryStrategyResults that can be used by any code that uses\nto configure the retry timer that's currently in juju utils." - }, - "WatchRetryStrategy": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "WatchRetryStrategy watches for changes to the model. Currently we only allow\nchanges to the boolean that determines whether retries should be attempted or not." - } - }, - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "NotifyWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "RetryStrategy": { - "type": "object", - "properties": { - "jitter-retry-time": { - "type": "boolean" - }, - "max-retry-time": { - "type": "integer" - }, - "min-retry-time": { - "type": "integer" - }, - "retry-time-factor": { - "type": "integer" - }, - "should-retry": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "should-retry", - "min-retry-time", - "max-retry-time", - "jitter-retry-time", - "retry-time-factor" - ] - }, - "RetryStrategyResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/RetryStrategy" - } - }, - "additionalProperties": false - }, - "RetryStrategyResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/RetryStrategyResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - } - } - } - }, - { - "Name": "SSHClient", - "Description": "Facade implements the API required by the sshclient worker.", - "Version": 4, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "AllAddresses": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/SSHAddressesResults" - } - }, - "description": "AllAddresses reports all addresses that might have SSH listening for each\nentity in args. The result is sorted with public addresses first.\nMachines and units are supported as entity types." - }, - "ModelCredentialForSSH": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/CloudSpecResult" - } - }, - "description": "ModelCredentialForSSH returns a cloud spec for ssh purpose.\nThis facade call is only used for k8s model." - }, - "PrivateAddress": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/SSHAddressResults" - } - }, - "description": "PrivateAddress reports the preferred private network address for one or\nmore entities. Machines and units are supported." - }, - "Proxy": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/SSHProxyResult" - } - }, - "description": "Proxy returns whether SSH connections should be proxied through the\ncontroller hosts for the model associated with the API connection." - }, - "PublicAddress": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/SSHAddressResults" - } - }, - "description": "PublicAddress reports the preferred public network address for one\nor more entities. Machines and units are supported." - }, - "PublicKeys": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/SSHPublicKeysResults" - } - }, - "description": "PublicKeys returns the public SSH hosts for one or more\nentities. Machines and units are supported." - } - }, - "definitions": { - "CloudCredential": { - "type": "object", - "properties": { - "attrs": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "auth-type": { - "type": "string" - }, - "redacted": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "auth-type" - ] - }, - "CloudSpec": { - "type": "object", - "properties": { - "cacertificates": { - "type": "array", - "items": { - "type": "string" - } - }, - "credential": { - "$ref": "#/definitions/CloudCredential" - }, - "endpoint": { - "type": "string" - }, - "identity-endpoint": { - "type": "string" - }, - "is-controller-cloud": { - "type": "boolean" - }, - "name": { - "type": "string" - }, - "region": { - "type": "string" - }, - "skip-tls-verify": { - "type": "boolean" - }, - "storage-endpoint": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type", - "name" - ] - }, - "CloudSpecResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/CloudSpec" - } - }, - "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": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "SSHAddressResult": { - "type": "object", - "properties": { - "address": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "SSHAddressResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/SSHAddressResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "SSHAddressesResult": { - "type": "object", - "properties": { - "addresses": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "addresses" - ] - }, - "SSHAddressesResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/SSHAddressesResult" - } - } - }, - "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" - }, - "public-keys": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "SSHPublicKeysResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/SSHPublicKeysResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - } - } - } - }, - { - "Name": "SecretBackends", - "Description": "SecretBackendsAPI is the server implementation for the SecretBackends facade.", - "Version": 1, - "AvailableTo": [ - "controller-user" - ], - "Schema": { - "type": "object", - "properties": { - "AddSecretBackends": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/AddSecretBackendArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "AddSecretBackends adds new secret backends." - }, - "ListSecretBackends": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ListSecretBackendsArgs" - }, - "Result": { - "$ref": "#/definitions/ListSecretBackendsResults" - } - }, - "description": "ListSecretBackends lists available secret backends." - }, - "RemoveSecretBackends": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RemoveSecretBackendArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "RemoveSecretBackends removes secret backends." - }, - "UpdateSecretBackends": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/UpdateSecretBackendArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "UpdateSecretBackends updates secret backends." - } - }, - "definitions": { - "AddSecretBackendArg": { - "type": "object", - "properties": { - "SecretBackend": { - "$ref": "#/definitions/SecretBackend" - }, - "backend-type": { - "type": "string" - }, - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "token-rotate-interval": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "name", - "backend-type", - "config", - "SecretBackend" - ] - }, - "AddSecretBackendArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/AddSecretBackendArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ListSecretBackendsArgs": { - "type": "object", - "properties": { - "names": { - "type": "array", - "items": { - "type": "string" - } - }, - "reveal": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "names", - "reveal" - ] - }, - "ListSecretBackendsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/SecretBackendResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "RemoveSecretBackendArg": { - "type": "object", - "properties": { - "force": { - "type": "boolean" - }, - "name": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name" - ] - }, - "RemoveSecretBackendArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoveSecretBackendArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "SecretBackend": { - "type": "object", - "properties": { - "backend-type": { - "type": "string" - }, - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "name": { - "type": "string" - }, - "token-rotate-interval": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "name", - "backend-type", - "config" - ] - }, - "SecretBackendResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "id": { - "type": "string" - }, - "message": { - "type": "string" - }, - "num-secrets": { - "type": "integer" - }, - "result": { - "$ref": "#/definitions/SecretBackend" - }, - "status": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "result", - "id", - "num-secrets", - "status" - ] - }, - "UpdateSecretBackendArg": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "force": { - "type": "boolean" - }, - "name": { - "type": "string" - }, - "name-change": { - "type": "string" - }, - "reset": { - "type": "array", - "items": { - "type": "string" - } - }, - "token-rotate-interval": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "name", - "token-rotate-interval", - "config", - "reset" - ] - }, - "UpdateSecretBackendArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/UpdateSecretBackendArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - } - } - } - }, - { - "Name": "SecretBackendsManager", - "Description": "SecretBackendsManagerAPI is the implementation for the SecretsManager facade.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent" - ], - "Schema": { - "type": "object", - "properties": { - "RotateBackendTokens": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RotateSecretBackendArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "RotateBackendTokens rotates the tokens for the specified backends." - }, - "WatchSecretBackendsRotateChanges": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/SecretBackendRotateWatchResult" - } - }, - "description": "WatchSecretBackendsRotateChanges sets up a watcher to notify of changes to secret backend rotations." - } - }, - "definitions": { - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "RotateSecretBackendArgs": { - "type": "object", - "properties": { - "backend-ids": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "backend-ids" - ] - }, - "SecretBackendRotateChange": { - "type": "object", - "properties": { - "backend-name": { - "type": "string" - }, - "id": { - "type": "string" - }, - "next-trigger-time": { - "type": "string", - "format": "date-time" - } - }, - "additionalProperties": false, - "required": [ - "id", - "backend-name", - "next-trigger-time" - ] - }, - "SecretBackendRotateWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "$ref": "#/definitions/SecretBackendRotateChange" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id", - "changes" - ] - } - } - } - }, - { - "Name": "SecretBackendsRotateWatcher", - "Description": "srvSecretBackendsRotateWatcher defines the API wrapping a SecretBackendsRotateWatcher.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "Next": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/SecretBackendRotateWatchResult" - } - }, - "description": "Next returns when a change has occurred to an entity of the\ncollection being watched since the most recent call to Next\nor the Watch call that created the srvSecretRotationWatcher." - }, - "Stop": { - "type": "object", - "description": "Stop stops the watcher." - } - }, - "definitions": { - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "SecretBackendRotateChange": { - "type": "object", - "properties": { - "backend-name": { - "type": "string" - }, - "id": { - "type": "string" - }, - "next-trigger-time": { - "type": "string", - "format": "date-time" - } - }, - "additionalProperties": false, - "required": [ - "id", - "backend-name", - "next-trigger-time" - ] - }, - "SecretBackendRotateWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "$ref": "#/definitions/SecretBackendRotateChange" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id", - "changes" - ] - } - } - } - }, - { - "Name": "Secrets", - "Description": "SecretsAPI is the backend for the Secrets facade.", - "Version": 2, - "AvailableTo": [ - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "CreateSecrets": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/CreateSecretArgs" - }, - "Result": { - "$ref": "#/definitions/StringResults" - } - }, - "description": "CreateSecrets creates new secrets." - }, - "GrantSecret": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/GrantRevokeUserSecretArg" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "GrantSecret grants access to a user secret." - }, - "ListSecrets": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ListSecretsArgs" - }, - "Result": { - "$ref": "#/definitions/ListSecretResults" - } - }, - "description": "ListSecrets lists available secrets." - }, - "RemoveSecrets": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/DeleteSecretArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "RemoveSecrets remove user secret." - }, - "RevokeSecret": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/GrantRevokeUserSecretArg" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "RevokeSecret revokes access to a user secret." - }, - "UpdateSecrets": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/UpdateUserSecretArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "UpdateSecrets creates new secrets." - } - }, - "definitions": { - "CreateSecretArg": { - "type": "object", - "properties": { - "UpsertSecretArg": { - "$ref": "#/definitions/UpsertSecretArg" - }, - "content": { - "$ref": "#/definitions/SecretContentParams" - }, - "description": { - "type": "string" - }, - "expire-time": { - "type": "string", - "format": "date-time" - }, - "label": { - "type": "string" - }, - "owner-tag": { - "type": "string" - }, - "params": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "rotate-policy": { - "type": "string" - }, - "uri": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "UpsertSecretArg", - "owner-tag" - ] - }, - "CreateSecretArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/CreateSecretArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "DeleteSecretArg": { - "type": "object", - "properties": { - "label": { - "type": "string" - }, - "revisions": { - "type": "array", - "items": { - "type": "integer" - } - }, - "uri": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "uri", - "label" - ] - }, - "DeleteSecretArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/DeleteSecretArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "GrantRevokeUserSecretArg": { - "type": "object", - "properties": { - "applications": { - "type": "array", - "items": { - "type": "string" - } - }, - "label": { - "type": "string" - }, - "uri": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "uri", - "label", - "applications" - ] - }, - "ListSecretResult": { - "type": "object", - "properties": { - "create-time": { - "type": "string", - "format": "date-time" - }, - "description": { - "type": "string" - }, - "label": { - "type": "string" - }, - "latest-expire-time": { - "type": "string", - "format": "date-time" - }, - "latest-revision": { - "type": "integer" - }, - "next-rotate-time": { - "type": "string", - "format": "date-time" - }, - "owner-tag": { - "type": "string" - }, - "revisions": { - "type": "array", - "items": { - "$ref": "#/definitions/SecretRevision" - } - }, - "rotate-policy": { - "type": "string" - }, - "update-time": { - "type": "string", - "format": "date-time" - }, - "uri": { - "type": "string" - }, - "value": { - "$ref": "#/definitions/SecretValueResult" - }, - "version": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "uri", - "version", - "owner-tag", - "latest-revision", - "create-time", - "update-time", - "revisions" - ] - }, - "ListSecretResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ListSecretResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ListSecretsArgs": { - "type": "object", - "properties": { - "filter": { - "$ref": "#/definitions/SecretsFilter" - }, - "show-secrets": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "show-secrets", - "filter" - ] - }, - "SecretContentParams": { - "type": "object", - "properties": { - "data": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "value-ref": { - "$ref": "#/definitions/SecretValueRef" - } - }, - "additionalProperties": false - }, - "SecretRevision": { - "type": "object", - "properties": { - "backend-name": { - "type": "string" - }, - "create-time": { - "type": "string", - "format": "date-time" - }, - "expire-time": { - "type": "string", - "format": "date-time" - }, - "revision": { - "type": "integer" - }, - "update-time": { - "type": "string", - "format": "date-time" - }, - "value-ref": { - "$ref": "#/definitions/SecretValueRef" - } - }, - "additionalProperties": false, - "required": [ - "revision" - ] - }, - "SecretValueRef": { - "type": "object", - "properties": { - "backend-id": { - "type": "string" - }, - "revision-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "backend-id", - "revision-id" - ] - }, - "SecretValueResult": { - "type": "object", - "properties": { - "data": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "SecretsFilter": { - "type": "object", - "properties": { - "label": { - "type": "string" - }, - "owner-tag": { - "type": "string" - }, - "revision": { - "type": "integer" - }, - "uri": { - "type": "string" - } - }, - "additionalProperties": false - }, - "StringResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "StringResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "UpdateUserSecretArg": { - "type": "object", - "properties": { - "UpsertSecretArg": { - "$ref": "#/definitions/UpsertSecretArg" - }, - "auto-prune": { - "type": "boolean" - }, - "content": { - "$ref": "#/definitions/SecretContentParams" - }, - "description": { - "type": "string" - }, - "existing-label": { - "type": "string" - }, - "expire-time": { - "type": "string", - "format": "date-time" - }, - "label": { - "type": "string" - }, - "params": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "rotate-policy": { - "type": "string" - }, - "uri": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "UpsertSecretArg", - "uri", - "existing-label" - ] - }, - "UpdateUserSecretArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/UpdateUserSecretArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "UpsertSecretArg": { - "type": "object", - "properties": { - "content": { - "$ref": "#/definitions/SecretContentParams" - }, - "description": { - "type": "string" - }, - "expire-time": { - "type": "string", - "format": "date-time" - }, - "label": { - "type": "string" - }, - "params": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "rotate-policy": { - "type": "string" - } - }, - "additionalProperties": false - } - } - } - }, - { - "Name": "SecretsDrain", - "Description": "SecretsDrainAPI is the implementation for the SecretsDrain facade.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "ChangeSecretBackend": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ChangeSecretBackendArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "ChangeSecretBackend updates the backend for the specified secret after migration done." - }, - "GetSecretsToDrain": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ListSecretResults" - } - }, - "description": "GetSecretsToDrain returns metadata for the secrets that need to be drained." - }, - "WatchSecretBackendChanged": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResult" - } - }, - "description": "WatchSecretBackendChanged sets up a watcher to notify of changes to the secret backend." - } - }, - "definitions": { - "ChangeSecretBackendArg": { - "type": "object", - "properties": { - "content": { - "$ref": "#/definitions/SecretContentParams" - }, - "revision": { - "type": "integer" - }, - "uri": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "uri", - "revision" - ] - }, - "ChangeSecretBackendArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/ChangeSecretBackendArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ListSecretResult": { - "type": "object", - "properties": { - "create-time": { - "type": "string", - "format": "date-time" - }, - "description": { - "type": "string" - }, - "label": { - "type": "string" - }, - "latest-expire-time": { - "type": "string", - "format": "date-time" - }, - "latest-revision": { - "type": "integer" - }, - "next-rotate-time": { - "type": "string", - "format": "date-time" - }, - "owner-tag": { - "type": "string" - }, - "revisions": { - "type": "array", - "items": { - "$ref": "#/definitions/SecretRevision" - } - }, - "rotate-policy": { - "type": "string" - }, - "update-time": { - "type": "string", - "format": "date-time" - }, - "uri": { - "type": "string" - }, - "value": { - "$ref": "#/definitions/SecretValueResult" - }, - "version": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "uri", - "version", - "owner-tag", - "latest-revision", - "create-time", - "update-time", - "revisions" - ] - }, - "ListSecretResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ListSecretResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "SecretContentParams": { - "type": "object", - "properties": { - "data": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "value-ref": { - "$ref": "#/definitions/SecretValueRef" - } - }, - "additionalProperties": false - }, - "SecretRevision": { - "type": "object", - "properties": { - "backend-name": { - "type": "string" - }, - "create-time": { - "type": "string", - "format": "date-time" - }, - "expire-time": { - "type": "string", - "format": "date-time" - }, - "revision": { - "type": "integer" - }, - "update-time": { - "type": "string", - "format": "date-time" - }, - "value-ref": { - "$ref": "#/definitions/SecretValueRef" - } - }, - "additionalProperties": false, - "required": [ - "revision" - ] - }, - "SecretValueRef": { - "type": "object", - "properties": { - "backend-id": { - "type": "string" - }, - "revision-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "backend-id", - "revision-id" - ] - }, - "SecretValueResult": { - "type": "object", - "properties": { - "data": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - } - } - } - }, - { - "Name": "SecretsManager", - "Description": "SecretsManagerAPI is the implementation for the SecretsManager facade.", - "Version": 2, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "CreateSecretURIs": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/CreateSecretURIsArg" - }, - "Result": { - "$ref": "#/definitions/StringResults" - } - }, - "description": "CreateSecretURIs creates new secret URIs." - }, - "CreateSecrets": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/CreateSecretArgs" - }, - "Result": { - "$ref": "#/definitions/StringResults" - } - }, - "description": "CreateSecrets creates new secrets." - }, - "GetConsumerSecretsRevisionInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/GetSecretConsumerInfoArgs" - }, - "Result": { - "$ref": "#/definitions/SecretConsumerInfoResults" - } - }, - "description": "GetConsumerSecretsRevisionInfo returns the latest secret revisions for the specified secrets.\nThis facade method is used for remote watcher to get the latest secret revisions and labels for a secret changed hook." - }, - "GetSecretBackendConfigs": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SecretBackendArgs" - }, - "Result": { - "$ref": "#/definitions/SecretBackendConfigResults" - } - }, - "description": "GetSecretBackendConfigs gets the config needed to create a client to secret backends." - }, - "GetSecretContentInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/GetSecretContentArgs" - }, - "Result": { - "$ref": "#/definitions/SecretContentResults" - } - }, - "description": "GetSecretContentInfo returns the secret values for the specified secrets." - }, - "GetSecretMetadata": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ListSecretResults" - } - }, - "description": "GetSecretMetadata returns metadata for the caller's secrets." - }, - "GetSecretRevisionContentInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SecretRevisionArg" - }, - "Result": { - "$ref": "#/definitions/SecretContentResults" - } - }, - "description": "GetSecretRevisionContentInfo returns the secret values for the specified secret revisions." - }, - "RemoveSecrets": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/DeleteSecretArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "RemoveSecrets removes the specified secrets." - }, - "SecretsGrant": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/GrantRevokeSecretArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SecretsGrant grants access to a secret for the specified subjects." - }, - "SecretsRevoke": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/GrantRevokeSecretArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SecretsRevoke revokes access to a secret for the specified subjects." - }, - "SecretsRotated": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SecretRotatedArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SecretsRotated records when secrets were last rotated." - }, - "UpdateSecrets": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/UpdateSecretArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "UpdateSecrets updates the specified secrets." - }, - "WatchConsumedSecretsChanges": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - }, - "description": "WatchConsumedSecretsChanges sets up a watcher to notify of changes to secret revisions for the specified consumers." - }, - "WatchObsolete": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResult" - } - }, - "description": "WatchObsolete returns a watcher for notifying when:\n - a secret owned by the entity is deleted\n - a secret revision owed by the entity no longer\n has any consumers\n\nObsolete revisions results are \"uri/revno\" and deleted\nsecret results are \"uri\"." - }, - "WatchSecretRevisionsExpiryChanges": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/SecretTriggerWatchResult" - } - }, - "description": "WatchSecretRevisionsExpiryChanges sets up a watcher to notify of changes to secret revision expiry config." - }, - "WatchSecretsRotationChanges": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/SecretTriggerWatchResult" - } - }, - "description": "WatchSecretsRotationChanges sets up a watcher to notify of changes to secret rotation config." - } - }, - "definitions": { - "CreateSecretArg": { - "type": "object", - "properties": { - "UpsertSecretArg": { - "$ref": "#/definitions/UpsertSecretArg" - }, - "content": { - "$ref": "#/definitions/SecretContentParams" - }, - "description": { - "type": "string" - }, - "expire-time": { - "type": "string", - "format": "date-time" - }, - "label": { - "type": "string" - }, - "owner-tag": { - "type": "string" - }, - "params": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "rotate-policy": { - "type": "string" - }, - "uri": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "UpsertSecretArg", - "owner-tag" - ] - }, - "CreateSecretArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/CreateSecretArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "CreateSecretURIsArg": { - "type": "object", - "properties": { - "count": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "count" - ] - }, - "DeleteSecretArg": { - "type": "object", - "properties": { - "label": { - "type": "string" - }, - "revisions": { - "type": "array", - "items": { - "type": "integer" - } - }, - "uri": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "uri", - "label" - ] - }, - "DeleteSecretArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/DeleteSecretArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "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": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "GetSecretConsumerInfoArgs": { - "type": "object", - "properties": { - "consumer-tag": { - "type": "string" - }, - "uris": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "consumer-tag", - "uris" - ] - }, - "GetSecretContentArg": { - "type": "object", - "properties": { - "label": { - "type": "string" - }, - "peek": { - "type": "boolean" - }, - "refresh": { - "type": "boolean" - }, - "uri": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "uri" - ] - }, - "GetSecretContentArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/GetSecretContentArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "GrantRevokeSecretArg": { - "type": "object", - "properties": { - "role": { - "type": "string" - }, - "scope-tag": { - "type": "string" - }, - "subject-tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "uri": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "uri", - "scope-tag", - "subject-tags", - "role" - ] - }, - "GrantRevokeSecretArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/GrantRevokeSecretArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "ListSecretResult": { - "type": "object", - "properties": { - "create-time": { - "type": "string", - "format": "date-time" - }, - "description": { - "type": "string" - }, - "label": { - "type": "string" - }, - "latest-expire-time": { - "type": "string", - "format": "date-time" - }, - "latest-revision": { - "type": "integer" - }, - "next-rotate-time": { - "type": "string", - "format": "date-time" - }, - "owner-tag": { - "type": "string" - }, - "revisions": { - "type": "array", - "items": { - "$ref": "#/definitions/SecretRevision" - } - }, - "rotate-policy": { - "type": "string" - }, - "update-time": { - "type": "string", - "format": "date-time" - }, - "uri": { - "type": "string" - }, - "value": { - "$ref": "#/definitions/SecretValueResult" - }, - "version": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "uri", - "version", - "owner-tag", - "latest-revision", - "create-time", - "update-time", - "revisions" - ] - }, - "ListSecretResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ListSecretResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "SecretBackendArgs": { - "type": "object", - "properties": { - "backend-ids": { - "type": "array", - "items": { - "type": "string" - } - }, - "for-drain": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "for-drain", - "backend-ids" - ] - }, - "SecretBackendConfig": { - "type": "object", - "properties": { - "params": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type" - ] - }, - "SecretBackendConfigResult": { - "type": "object", - "properties": { - "config": { - "$ref": "#/definitions/SecretBackendConfig" - }, - "draining": { - "type": "boolean" - }, - "model-controller": { - "type": "string" - }, - "model-name": { - "type": "string" - }, - "model-uuid": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "model-controller", - "model-uuid", - "model-name", - "draining" - ] - }, - "SecretBackendConfigResults": { - "type": "object", - "properties": { - "active-id": { - "type": "string" - }, - "results": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/SecretBackendConfigResult" - } - } - } - }, - "additionalProperties": false, - "required": [ - "active-id" - ] - }, - "SecretConsumerInfoResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "label": { - "type": "string" - }, - "revision": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "revision", - "label" - ] - }, - "SecretConsumerInfoResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/SecretConsumerInfoResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "SecretContentParams": { - "type": "object", - "properties": { - "data": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "value-ref": { - "$ref": "#/definitions/SecretValueRef" - } - }, - "additionalProperties": false - }, - "SecretContentResult": { - "type": "object", - "properties": { - "backend-config": { - "$ref": "#/definitions/SecretBackendConfigResult" - }, - "content": { - "$ref": "#/definitions/SecretContentParams" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "latest-revision": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "content" - ] - }, - "SecretContentResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/SecretContentResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "SecretRevision": { - "type": "object", - "properties": { - "backend-name": { - "type": "string" - }, - "create-time": { - "type": "string", - "format": "date-time" - }, - "expire-time": { - "type": "string", - "format": "date-time" - }, - "revision": { - "type": "integer" - }, - "update-time": { - "type": "string", - "format": "date-time" - }, - "value-ref": { - "$ref": "#/definitions/SecretValueRef" - } - }, - "additionalProperties": false, - "required": [ - "revision" - ] - }, - "SecretRevisionArg": { - "type": "object", - "properties": { - "pending-delete": { - "type": "boolean" - }, - "revisions": { - "type": "array", - "items": { - "type": "integer" - } - }, - "uri": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "uri", - "revisions", - "pending-delete" - ] - }, - "SecretRotatedArg": { - "type": "object", - "properties": { - "original-revision": { - "type": "integer" - }, - "skip": { - "type": "boolean" - }, - "uri": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "uri", - "original-revision", - "skip" - ] - }, - "SecretRotatedArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/SecretRotatedArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "SecretTriggerChange": { - "type": "object", - "properties": { - "next-trigger-time": { - "type": "string", - "format": "date-time" - }, - "revision": { - "type": "integer" - }, - "uri": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "uri", - "next-trigger-time" - ] - }, - "SecretTriggerWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "$ref": "#/definitions/SecretTriggerChange" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id", - "changes" - ] - }, - "SecretValueRef": { - "type": "object", - "properties": { - "backend-id": { - "type": "string" - }, - "revision-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "backend-id", - "revision-id" - ] - }, - "SecretValueResult": { - "type": "object", - "properties": { - "data": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "StringResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "StringResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "StringsWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id" - ] - }, - "StringsWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringsWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "UpdateSecretArg": { - "type": "object", - "properties": { - "UpsertSecretArg": { - "$ref": "#/definitions/UpsertSecretArg" - }, - "content": { - "$ref": "#/definitions/SecretContentParams" - }, - "description": { - "type": "string" - }, - "expire-time": { - "type": "string", - "format": "date-time" - }, - "label": { - "type": "string" - }, - "params": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "rotate-policy": { - "type": "string" - }, - "uri": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "UpsertSecretArg", - "uri" - ] - }, - "UpdateSecretArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/UpdateSecretArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "UpsertSecretArg": { - "type": "object", - "properties": { - "content": { - "$ref": "#/definitions/SecretContentParams" - }, - "description": { - "type": "string" - }, - "expire-time": { - "type": "string", - "format": "date-time" - }, - "label": { - "type": "string" - }, - "params": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "rotate-policy": { - "type": "string" - } - }, - "additionalProperties": false - } - } - } - }, - { - "Name": "SecretsRevisionWatcher", - "Description": "srvSecretsRevisionWatcher defines the API wrapping a SecretsRevisionWatcher.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "Next": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/SecretRevisionWatchResult" - } - }, - "description": "Next returns when a change has occurred to an entity of the\ncollection being watched since the most recent call to Next\nor the Watch call that created the srvSecretRotationWatcher." - }, - "Stop": { - "type": "object", - "description": "Stop stops the watcher." - } - }, - "definitions": { - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "SecretRevisionChange": { - "type": "object", - "properties": { - "revision": { - "type": "integer" - }, - "uri": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "uri", - "revision" - ] - }, - "SecretRevisionWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "$ref": "#/definitions/SecretRevisionChange" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id", - "changes" - ] - } - } - } - }, - { - "Name": "SecretsTriggerWatcher", - "Description": "srvSecretTriggerWatcher defines the API wrapping a SecretsTriggerWatcher.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "Next": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/SecretTriggerWatchResult" - } - }, - "description": "Next returns when a change has occurred to an entity of the\ncollection being watched since the most recent call to Next\nor the Watch call that created the srvSecretRotationWatcher." - }, - "Stop": { - "type": "object", - "description": "Stop stops the watcher." - } - }, - "definitions": { - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "SecretTriggerChange": { - "type": "object", - "properties": { - "next-trigger-time": { - "type": "string", - "format": "date-time" - }, - "revision": { - "type": "integer" - }, - "uri": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "uri", - "next-trigger-time" - ] - }, - "SecretTriggerWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "$ref": "#/definitions/SecretTriggerChange" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id", - "changes" - ] - } - } - } - }, - { - "Name": "Singular", - "Description": "Facade allows controller machines to request exclusive rights to administer\nsome specific model or controller for a limited time.", - "Version": 2, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "Claim": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SingularClaims" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "Claim makes the supplied singular-controller lease requests. (In practice,\nany requests not for the connection's model or controller, or not on behalf\nof the connected ModelManager machine, will be rejected.)" - }, - "Wait": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "Wait waits for the singular-controller lease to expire for all supplied\nentities. (In practice, any requests that do not refer to the connection's\nmodel or controller will be rejected.)" - } - }, - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "SingularClaim": { - "type": "object", - "properties": { - "claimant-tag": { - "type": "string" - }, - "duration": { - "type": "integer" - }, - "entity-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "entity-tag", - "claimant-tag", - "duration" - ] - }, - "SingularClaims": { - "type": "object", - "properties": { - "claims": { - "type": "array", - "items": { - "$ref": "#/definitions/SingularClaim" - } - } - }, - "additionalProperties": false, - "required": [ - "claims" - ] - } - } - } - }, - { - "Name": "Spaces", - "Description": "API provides the spaces API facade for version 6.", - "Version": 6, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "CreateSpaces": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/CreateSpacesParams" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "CreateSpaces creates a new Juju network space, associating the\nspecified subnets with it (optional; can be empty)." - }, - "ListSpaces": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ListSpacesResults" - } - }, - "description": "ListSpaces lists all the available spaces and their associated subnets." - }, - "MoveSubnets": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/MoveSubnetsParams" - }, - "Result": { - "$ref": "#/definitions/MoveSubnetsResults" - } - }, - "description": "MoveSubnets ensures that the input subnets are in the input space." - }, - "ReloadSpaces": { - "type": "object", - "description": "ReloadSpaces refreshes spaces from substrate" - }, - "RemoveSpace": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RemoveSpaceParams" - }, - "Result": { - "$ref": "#/definitions/RemoveSpaceResults" - } - }, - "description": "RemoveSpace removes a space.\nReturns SpaceResults if entities/settings are found which makes the deletion not possible." - }, - "RenameSpace": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RenameSpacesParams" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "RenameSpace renames a space." - }, - "ShowSpace": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ShowSpaceResults" - } - }, - "description": "ShowSpace shows the spaces for a set of given entities." - } - }, - "definitions": { - "CreateSpaceParams": { - "type": "object", - "properties": { - "cidrs": { - "type": "array", - "items": { - "type": "string" - } - }, - "provider-id": { - "type": "string" - }, - "public": { - "type": "boolean" - }, - "space-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "cidrs", - "space-tag", - "public" - ] - }, - "CreateSpacesParams": { - "type": "object", - "properties": { - "spaces": { - "type": "array", - "items": { - "$ref": "#/definitions/CreateSpaceParams" - } - } - }, - "additionalProperties": false, - "required": [ - "spaces" - ] - }, - "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": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ListSpacesResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/Space" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "MoveSubnetsParam": { - "type": "object", - "properties": { - "force": { - "type": "boolean" - }, - "space-tag": { - "type": "string" - }, - "subnets": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "subnets", - "space-tag", - "force" - ] - }, - "MoveSubnetsParams": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/MoveSubnetsParam" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "MoveSubnetsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "moved-subnets": { - "type": "array", - "items": { - "$ref": "#/definitions/MovedSubnet" - } - }, - "new-space": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "new-space" - ] - }, - "MoveSubnetsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/MoveSubnetsResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "MovedSubnet": { - "type": "object", - "properties": { - "cidr": { - "type": "string" - }, - "old-space": { - "type": "string" - }, - "subnet": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "subnet", - "old-space", - "cidr" - ] - }, - "RemoveSpaceParam": { - "type": "object", - "properties": { - "dry-run": { - "type": "boolean" - }, - "force": { - "type": "boolean" - }, - "space": { - "$ref": "#/definitions/Entity" - } - }, - "additionalProperties": false, - "required": [ - "space" - ] - }, - "RemoveSpaceParams": { - "type": "object", - "properties": { - "space-param": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoveSpaceParam" - } - } - }, - "additionalProperties": false, - "required": [ - "space-param" - ] - }, - "RemoveSpaceResult": { - "type": "object", - "properties": { - "bindings": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } - }, - "constraints": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } - }, - "controller-settings": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "RemoveSpaceResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoveSpaceResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "RenameSpaceParams": { - "type": "object", - "properties": { - "from-space-tag": { - "type": "string" - }, - "to-space-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "from-space-tag", - "to-space-tag" - ] - }, - "RenameSpacesParams": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "$ref": "#/definitions/RenameSpaceParams" - } - } - }, - "additionalProperties": false, - "required": [ - "changes" - ] - }, - "ShowSpaceResult": { - "type": "object", - "properties": { - "applications": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "machine-count": { - "type": "integer" - }, - "space": { - "$ref": "#/definitions/Space" - } - }, - "additionalProperties": false, - "required": [ - "space", - "applications", - "machine-count" - ] - }, - "ShowSpaceResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ShowSpaceResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "Space": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "subnets": { - "type": "array", - "items": { - "$ref": "#/definitions/Subnet" - } - } - }, - "additionalProperties": false, - "required": [ - "id", - "name", - "subnets" - ] - }, - "Subnet": { - "type": "object", - "properties": { - "cidr": { - "type": "string" - }, - "life": { - "type": "string" - }, - "provider-id": { - "type": "string" - }, - "provider-network-id": { - "type": "string" - }, - "provider-space-id": { - "type": "string" - }, - "space-tag": { - "type": "string" - }, - "status": { - "type": "string" - }, - "vlan-tag": { - "type": "integer" - }, - "zones": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "cidr", - "vlan-tag", - "life", - "space-tag", - "zones" - ] - } - } - } - }, - { - "Name": "StatusHistory", - "Description": "API is the concrete implementation of the Pruner endpoint.", - "Version": 2, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "ModelConfig": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ModelConfigResult" - } - }, - "description": "ModelConfig returns the current model's configuration." - }, - "Prune": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/StatusHistoryPruneArgs" - } - }, - "description": "Prune endpoint removes status history entries until\nonly the ones newer than now - p.MaxHistoryTime remain and\nthe history is smaller than p.MaxHistoryMB." - }, - "WatchForModelConfigChanges": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResult" - } - }, - "description": "WatchForModelConfigChanges returns a NotifyWatcher that observes\nchanges to the model configuration.\nNote that although the NotifyWatchResult contains an Error field,\nit's not used because we are only returning a single watcher,\nso we use the regular error return." - } - }, - "definitions": { - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ModelConfigResult": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "StatusHistoryPruneArgs": { - "type": "object", - "properties": { - "max-history-mb": { - "type": "integer" - }, - "max-history-time": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "max-history-time", - "max-history-mb" - ] - } - } - } - }, - { - "Name": "Storage", - "Description": "StorageAPI implements the latest version (v6) of the Storage API.", - "Version": 6, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "AddToUnit": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/StoragesAddParams" - }, - "Result": { - "$ref": "#/definitions/AddStorageResults" - } - }, - "description": "AddToUnit validates and creates additional storage instances for units.\nA \"CHANGE\" block can block this operation." - }, - "Attach": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/StorageAttachmentIds" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "Attach attaches existing storage instances to units.\nA \"CHANGE\" block can block this operation." - }, - "CreatePool": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/StoragePoolArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "CreatePool creates a new pool with specified parameters." - }, - "DetachStorage": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/StorageDetachmentParams" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "DetachStorage sets the specified storage attachments to Dying, unless they are\nalready Dying or Dead. Any associated, persistent storage will remain\nalive. This call can be forced." - }, - "Import": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/BulkImportStorageParams" - }, - "Result": { - "$ref": "#/definitions/ImportStorageResults" - } - }, - "description": "Import imports existing storage into the model.\nA \"CHANGE\" block can block this operation." - }, - "ListFilesystems": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/FilesystemFilters" - }, - "Result": { - "$ref": "#/definitions/FilesystemDetailsListResults" - } - }, - "description": "ListFilesystems returns a list of filesystems in the environment matching\nthe provided filter. Each result describes a filesystem in detail, including\nthe filesystem's attachments." - }, - "ListPools": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/StoragePoolFilters" - }, - "Result": { - "$ref": "#/definitions/StoragePoolsResults" - } - }, - "description": "ListPools returns a list of pools.\nIf filter is provided, returned list only contains pools that match\nthe filter.\nPools can be filtered on names and provider types.\nIf both names and types are provided as filter,\npools that match either are returned.\nThis method lists union of pools and environment provider types.\nIf no filter is provided, all pools are returned." - }, - "ListStorageDetails": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/StorageFilters" - }, - "Result": { - "$ref": "#/definitions/StorageDetailsListResults" - } - }, - "description": "ListStorageDetails returns storage matching a filter." - }, - "ListVolumes": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/VolumeFilters" - }, - "Result": { - "$ref": "#/definitions/VolumeDetailsListResults" - } - }, - "description": "ListVolumes lists volumes with the given filters. Each filter produces\nan independent list of volumes, or an error if the filter is invalid\nor the volumes could not be listed." - }, - "Remove": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RemoveStorage" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "Remove sets the specified storage entities to Dying, unless they are\nalready Dying or Dead, such that the storage will eventually be removed\nfrom the model. If the arguments specify that the storage should be\ndestroyed, then the associated cloud storage will be destroyed first;\notherwise it will only be released from Juju's control." - }, - "RemovePool": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/StoragePoolDeleteArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "RemovePool deletes the named pool" - }, - "StorageDetails": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StorageDetailsResults" - } - }, - "description": "StorageDetails retrieves and returns detailed information about desired\nstorage identified by supplied tags. If specified storage cannot be\nretrieved, individual error is returned instead of storage information." - }, - "UpdatePool": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/StoragePoolArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "UpdatePool deletes the named pool" - } - }, - "definitions": { - "AddStorageDetails": { - "type": "object", - "properties": { - "storage-tags": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "storage-tags" - ] - }, - "AddStorageResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/AddStorageDetails" - } - }, - "additionalProperties": false - }, - "AddStorageResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/AddStorageResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "BulkImportStorageParams": { - "type": "object", - "properties": { - "storage": { - "type": "array", - "items": { - "$ref": "#/definitions/ImportStorageParams" - } - } - }, - "additionalProperties": false, - "required": [ - "storage" - ] - }, - "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" - ] - }, - "EntityStatus": { - "type": "object", - "properties": { - "data": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "info": { - "type": "string" - }, - "since": { - "type": "string", - "format": "date-time" - }, - "status": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "status", - "info", - "since" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "FilesystemAttachmentDetails": { - "type": "object", - "properties": { - "FilesystemAttachmentInfo": { - "$ref": "#/definitions/FilesystemAttachmentInfo" - }, - "life": { - "type": "string" - }, - "mount-point": { - "type": "string" - }, - "read-only": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "FilesystemAttachmentInfo" - ] - }, - "FilesystemAttachmentInfo": { - "type": "object", - "properties": { - "mount-point": { - "type": "string" - }, - "read-only": { - "type": "boolean" - } - }, - "additionalProperties": false - }, - "FilesystemDetails": { - "type": "object", - "properties": { - "filesystem-tag": { - "type": "string" - }, - "info": { - "$ref": "#/definitions/FilesystemInfo" - }, - "life": { - "type": "string" - }, - "machine-attachments": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/FilesystemAttachmentDetails" - } - } - }, - "status": { - "$ref": "#/definitions/EntityStatus" - }, - "storage": { - "$ref": "#/definitions/StorageDetails" - }, - "unit-attachments": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/FilesystemAttachmentDetails" - } - } - }, - "volume-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "filesystem-tag", - "info", - "status" - ] - }, - "FilesystemDetailsListResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "array", - "items": { - "$ref": "#/definitions/FilesystemDetails" - } - } - }, - "additionalProperties": false - }, - "FilesystemDetailsListResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/FilesystemDetailsListResult" - } - } - }, - "additionalProperties": false - }, - "FilesystemFilter": { - "type": "object", - "properties": { - "machines": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "FilesystemFilters": { - "type": "object", - "properties": { - "filters": { - "type": "array", - "items": { - "$ref": "#/definitions/FilesystemFilter" - } - } - }, - "additionalProperties": false - }, - "FilesystemInfo": { - "type": "object", - "properties": { - "filesystem-id": { - "type": "string" - }, - "pool": { - "type": "string" - }, - "size": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "filesystem-id", - "pool", - "size" - ] - }, - "ImportStorageDetails": { - "type": "object", - "properties": { - "storage-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "storage-tag" - ] - }, - "ImportStorageParams": { - "type": "object", - "properties": { - "kind": { - "type": "integer" - }, - "pool": { - "type": "string" - }, - "provider-id": { - "type": "string" - }, - "storage-name": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "kind", - "pool", - "provider-id", - "storage-name" - ] - }, - "ImportStorageResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/ImportStorageDetails" - } - }, - "additionalProperties": false - }, - "ImportStorageResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ImportStorageResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "RemoveStorage": { - "type": "object", - "properties": { - "storage": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoveStorageInstance" - } - } - }, - "additionalProperties": false, - "required": [ - "storage" - ] - }, - "RemoveStorageInstance": { - "type": "object", - "properties": { - "destroy-attachments": { - "type": "boolean" - }, - "destroy-storage": { - "type": "boolean" - }, - "force": { - "type": "boolean" - }, - "max-wait": { - "type": "integer" - }, - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag" - ] - }, - "StorageAddParams": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "storage": { - "$ref": "#/definitions/StorageConstraints" - }, - "unit": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "unit", - "name", - "storage" - ] - }, - "StorageAttachmentDetails": { - "type": "object", - "properties": { - "life": { - "type": "string" - }, - "location": { - "type": "string" - }, - "machine-tag": { - "type": "string" - }, - "storage-tag": { - "type": "string" - }, - "unit-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "storage-tag", - "unit-tag", - "machine-tag" - ] - }, - "StorageAttachmentId": { - "type": "object", - "properties": { - "storage-tag": { - "type": "string" - }, - "unit-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "storage-tag", - "unit-tag" - ] - }, - "StorageAttachmentIds": { - "type": "object", - "properties": { - "ids": { - "type": "array", - "items": { - "$ref": "#/definitions/StorageAttachmentId" - } - } - }, - "additionalProperties": false, - "required": [ - "ids" - ] - }, - "StorageConstraints": { - "type": "object", - "properties": { - "count": { - "type": "integer" - }, - "pool": { - "type": "string" - }, - "size": { - "type": "integer" - } - }, - "additionalProperties": false - }, - "StorageDetachmentParams": { - "type": "object", - "properties": { - "force": { - "type": "boolean" - }, - "ids": { - "$ref": "#/definitions/StorageAttachmentIds" - }, - "max-wait": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "ids" - ] - }, - "StorageDetails": { - "type": "object", - "properties": { - "attachments": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/StorageAttachmentDetails" - } - } - }, - "kind": { - "type": "integer" - }, - "life": { - "type": "string" - }, - "owner-tag": { - "type": "string" - }, - "persistent": { - "type": "boolean" - }, - "status": { - "$ref": "#/definitions/EntityStatus" - }, - "storage-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "storage-tag", - "owner-tag", - "kind", - "status", - "persistent" - ] - }, - "StorageDetailsListResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "array", - "items": { - "$ref": "#/definitions/StorageDetails" - } - } - }, - "additionalProperties": false - }, - "StorageDetailsListResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StorageDetailsListResult" - } - } - }, - "additionalProperties": false - }, - "StorageDetailsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/StorageDetails" - } - }, - "additionalProperties": false - }, - "StorageDetailsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StorageDetailsResult" - } - } - }, - "additionalProperties": false - }, - "StorageFilter": { - "type": "object", - "additionalProperties": false - }, - "StorageFilters": { - "type": "object", - "properties": { - "filters": { - "type": "array", - "items": { - "$ref": "#/definitions/StorageFilter" - } - } - }, - "additionalProperties": false - }, - "StoragePool": { - "type": "object", - "properties": { - "attrs": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "name": { - "type": "string" - }, - "provider": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "provider", - "attrs" - ] - }, - "StoragePoolArgs": { - "type": "object", - "properties": { - "pools": { - "type": "array", - "items": { - "$ref": "#/definitions/StoragePool" - } - } - }, - "additionalProperties": false, - "required": [ - "pools" - ] - }, - "StoragePoolDeleteArg": { - "type": "object", - "properties": { - "name": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name" - ] - }, - "StoragePoolDeleteArgs": { - "type": "object", - "properties": { - "pools": { - "type": "array", - "items": { - "$ref": "#/definitions/StoragePoolDeleteArg" - } - } - }, - "additionalProperties": false, - "required": [ - "pools" - ] - }, - "StoragePoolFilter": { - "type": "object", - "properties": { - "names": { - "type": "array", - "items": { - "type": "string" - } - }, - "providers": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "StoragePoolFilters": { - "type": "object", - "properties": { - "filters": { - "type": "array", - "items": { - "$ref": "#/definitions/StoragePoolFilter" - } - } - }, - "additionalProperties": false - }, - "StoragePoolsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "storage-pools": { - "type": "array", - "items": { - "$ref": "#/definitions/StoragePool" - } - } - }, - "additionalProperties": false - }, - "StoragePoolsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StoragePoolsResult" - } - } - }, - "additionalProperties": false - }, - "StoragesAddParams": { - "type": "object", - "properties": { - "storages": { - "type": "array", - "items": { - "$ref": "#/definitions/StorageAddParams" - } - } - }, - "additionalProperties": false, - "required": [ - "storages" - ] - }, - "VolumeAttachmentDetails": { - "type": "object", - "properties": { - "VolumeAttachmentInfo": { - "$ref": "#/definitions/VolumeAttachmentInfo" - }, - "bus-address": { - "type": "string" - }, - "device-link": { - "type": "string" - }, - "device-name": { - "type": "string" - }, - "life": { - "type": "string" - }, - "plan-info": { - "$ref": "#/definitions/VolumeAttachmentPlanInfo" - }, - "read-only": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "VolumeAttachmentInfo" - ] - }, - "VolumeAttachmentInfo": { - "type": "object", - "properties": { - "bus-address": { - "type": "string" - }, - "device-link": { - "type": "string" - }, - "device-name": { - "type": "string" - }, - "plan-info": { - "$ref": "#/definitions/VolumeAttachmentPlanInfo" - }, - "read-only": { - "type": "boolean" - } - }, - "additionalProperties": false - }, - "VolumeAttachmentPlanInfo": { - "type": "object", - "properties": { - "device-attributes": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "device-type": { - "type": "string" - } - }, - "additionalProperties": false - }, - "VolumeDetails": { - "type": "object", - "properties": { - "info": { - "$ref": "#/definitions/VolumeInfo" - }, - "life": { - "type": "string" - }, - "machine-attachments": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/VolumeAttachmentDetails" - } - } - }, - "status": { - "$ref": "#/definitions/EntityStatus" - }, - "storage": { - "$ref": "#/definitions/StorageDetails" - }, - "unit-attachments": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/VolumeAttachmentDetails" - } - } - }, - "volume-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "volume-tag", - "info", - "status" - ] - }, - "VolumeDetailsListResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "array", - "items": { - "$ref": "#/definitions/VolumeDetails" - } - } - }, - "additionalProperties": false - }, - "VolumeDetailsListResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/VolumeDetailsListResult" - } - } - }, - "additionalProperties": false - }, - "VolumeFilter": { - "type": "object", - "properties": { - "machines": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "VolumeFilters": { - "type": "object", - "properties": { - "filters": { - "type": "array", - "items": { - "$ref": "#/definitions/VolumeFilter" - } - } - }, - "additionalProperties": false - }, - "VolumeInfo": { - "type": "object", - "properties": { - "hardware-id": { - "type": "string" - }, - "persistent": { - "type": "boolean" - }, - "pool": { - "type": "string" - }, - "size": { - "type": "integer" - }, - "volume-id": { - "type": "string" - }, - "wwn": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "volume-id", - "size", - "persistent" - ] - } - } - } - }, - { - "Name": "StorageProvisioner", - "Description": "StorageProvisionerAPIv4 provides the StorageProvisioner API v4 facade.", - "Version": 4, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "AttachmentLife": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/MachineStorageIds" - }, - "Result": { - "$ref": "#/definitions/LifeResults" - } - }, - "description": "AttachmentLife returns the lifecycle state of each specified machine\nstorage attachment." - }, - "CreateVolumeAttachmentPlans": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/VolumeAttachmentPlans" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - } - }, - "EnsureDead": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "EnsureDead calls EnsureDead on each given entity from state. It\nwill fail if the entity is not present. If it's Alive, nothing will\nhappen (see state/EnsureDead() for units or machines)." - }, - "FilesystemAttachmentParams": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/MachineStorageIds" - }, - "Result": { - "$ref": "#/definitions/FilesystemAttachmentParamsResults" - } - }, - "description": "FilesystemAttachmentParams returns the parameters for creating the filesystem\nattachments with the specified IDs." - }, - "FilesystemAttachments": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/MachineStorageIds" - }, - "Result": { - "$ref": "#/definitions/FilesystemAttachmentResults" - } - }, - "description": "FilesystemAttachments returns details of filesystem attachments with the specified IDs." - }, - "FilesystemParams": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/FilesystemParamsResults" - } - }, - "description": "FilesystemParams returns the parameters for creating the filesystems\nwith the specified tags." - }, - "Filesystems": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/FilesystemResults" - } - }, - "description": "Filesystems returns details of filesystems with the specified tags." - }, - "InstanceId": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringResults" - } - }, - "description": "InstanceId returns the provider specific instance id for each given\nmachine or an CodeNotProvisioned error, if not set." - }, - "Life": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/LifeResults" - } - }, - "description": "Life returns the life status of every supplied entity, where available." - }, - "Remove": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "Remove removes volumes and filesystems from state." - }, - "RemoveAttachment": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/MachineStorageIds" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "RemoveAttachment removes the specified machine storage attachments\nfrom state." - }, - "RemoveFilesystemParams": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/RemoveFilesystemParamsResults" - } - }, - "description": "RemoveFilesystemParams returns the parameters for destroying or\nreleasing the filesystems with the specified tags." - }, - "RemoveVolumeAttachmentPlan": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/MachineStorageIds" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - } - }, - "RemoveVolumeParams": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/RemoveVolumeParamsResults" - } - }, - "description": "RemoveVolumeParams returns the parameters for destroying\nor releasing the volumes with the specified tags." - }, - "SetFilesystemAttachmentInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/FilesystemAttachments" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetFilesystemAttachmentInfo records the details of newly provisioned filesystem\nattachments." - }, - "SetFilesystemInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Filesystems" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetFilesystemInfo records the details of newly provisioned filesystems." - }, - "SetStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetStatus" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetStatus sets the status of each given entity." - }, - "SetVolumeAttachmentInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/VolumeAttachments" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetVolumeAttachmentInfo records the details of newly provisioned volume\nattachments." - }, - "SetVolumeAttachmentPlanBlockInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/VolumeAttachmentPlans" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - } - }, - "SetVolumeInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Volumes" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetVolumeInfo records the details of newly provisioned volumes." - }, - "VolumeAttachmentParams": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/MachineStorageIds" - }, - "Result": { - "$ref": "#/definitions/VolumeAttachmentParamsResults" - } - }, - "description": "VolumeAttachmentParams returns the parameters for creating the volume\nattachments with the specified IDs." - }, - "VolumeAttachmentPlans": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/MachineStorageIds" - }, - "Result": { - "$ref": "#/definitions/VolumeAttachmentPlanResults" - } - }, - "description": "VolumeAttachmentPlans returns details of volume attachment plans with the specified IDs." - }, - "VolumeAttachments": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/MachineStorageIds" - }, - "Result": { - "$ref": "#/definitions/VolumeAttachmentResults" - } - }, - "description": "VolumeAttachments returns details of volume attachments with the specified IDs." - }, - "VolumeBlockDevices": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/MachineStorageIds" - }, - "Result": { - "$ref": "#/definitions/BlockDeviceResults" - } - }, - "description": "VolumeBlockDevices returns details of the block devices corresponding to the\nvolume attachments with the specified IDs." - }, - "VolumeParams": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/VolumeParamsResults" - } - }, - "description": "VolumeParams returns the parameters for creating or destroying\nthe volumes with the specified tags." - }, - "Volumes": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/VolumeResults" - } - }, - "description": "Volumes returns details of volumes with the specified tags." - }, - "WatchApplications": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsWatchResult" - } - }, - "description": "WatchApplications starts a StringsWatcher to watch CAAS applications\ndeployed to this model." - }, - "WatchBlockDevices": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "WatchBlockDevices watches for changes to the specified machines' block devices." - }, - "WatchFilesystemAttachments": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/MachineStorageIdsWatchResults" - } - }, - "description": "WatchFilesystemAttachments watches for changes to filesystem attachments\nscoped to the entity with the tag passed to NewState." - }, - "WatchFilesystems": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - }, - "description": "WatchFilesystems watches for changes to filesystems scoped\nto the entity with the tag passed to NewState." - }, - "WatchMachines": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "WatchMachines watches for changes to the specified machines." - }, - "WatchVolumeAttachmentPlans": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/MachineStorageIdsWatchResults" - } - }, - "description": "WatchVolumeAttachmentPlans watches for changes to volume attachments for a machine for the purpose of allowing\nthat machine to run any initialization needed, for that volume to actually appear as a block device (ie: iSCSI)" - }, - "WatchVolumeAttachments": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/MachineStorageIdsWatchResults" - } - }, - "description": "WatchVolumeAttachments watches for changes to volume attachments scoped to\nthe entity with the tag passed to NewState." - }, - "WatchVolumes": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - }, - "description": "WatchVolumes watches for changes to volumes scoped to the\nentity with the tag passed to NewState." - } - }, - "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" - }, - "SerialId": { - "type": "string" - }, - "Size": { - "type": "integer" - }, - "UUID": { - "type": "string" - }, - "WWN": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "DeviceName", - "DeviceLinks", - "Label", - "UUID", - "HardwareId", - "WWN", - "BusAddress", - "Size", - "FilesystemType", - "InUse", - "MountPoint", - "SerialId" - ] - }, - "BlockDeviceResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/BlockDevice" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "BlockDeviceResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/BlockDeviceResult" - } - } - }, - "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" - ] - }, - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "Filesystem": { - "type": "object", - "properties": { - "filesystem-tag": { - "type": "string" - }, - "info": { - "$ref": "#/definitions/FilesystemInfo" - }, - "volume-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "filesystem-tag", - "info" - ] - }, - "FilesystemAttachment": { - "type": "object", - "properties": { - "filesystem-tag": { - "type": "string" - }, - "info": { - "$ref": "#/definitions/FilesystemAttachmentInfo" - }, - "machine-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "filesystem-tag", - "machine-tag", - "info" - ] - }, - "FilesystemAttachmentInfo": { - "type": "object", - "properties": { - "mount-point": { - "type": "string" - }, - "read-only": { - "type": "boolean" - } - }, - "additionalProperties": false - }, - "FilesystemAttachmentParams": { - "type": "object", - "properties": { - "filesystem-id": { - "type": "string" - }, - "filesystem-tag": { - "type": "string" - }, - "instance-id": { - "type": "string" - }, - "machine-tag": { - "type": "string" - }, - "mount-point": { - "type": "string" - }, - "provider": { - "type": "string" - }, - "read-only": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "filesystem-tag", - "machine-tag", - "provider" - ] - }, - "FilesystemAttachmentParamsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/FilesystemAttachmentParams" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "FilesystemAttachmentParamsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/FilesystemAttachmentParamsResult" - } - } - }, - "additionalProperties": false - }, - "FilesystemAttachmentResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/FilesystemAttachment" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "FilesystemAttachmentResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/FilesystemAttachmentResult" - } - } - }, - "additionalProperties": false - }, - "FilesystemAttachments": { - "type": "object", - "properties": { - "filesystem-attachments": { - "type": "array", - "items": { - "$ref": "#/definitions/FilesystemAttachment" - } - } - }, - "additionalProperties": false, - "required": [ - "filesystem-attachments" - ] - }, - "FilesystemInfo": { - "type": "object", - "properties": { - "filesystem-id": { - "type": "string" - }, - "pool": { - "type": "string" - }, - "size": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "filesystem-id", - "pool", - "size" - ] - }, - "FilesystemParams": { - "type": "object", - "properties": { - "attachment": { - "$ref": "#/definitions/FilesystemAttachmentParams" - }, - "attributes": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "filesystem-tag": { - "type": "string" - }, - "provider": { - "type": "string" - }, - "size": { - "type": "integer" - }, - "tags": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "volume-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "filesystem-tag", - "size", - "provider" - ] - }, - "FilesystemParamsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/FilesystemParams" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "FilesystemParamsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/FilesystemParamsResult" - } - } - }, - "additionalProperties": false - }, - "FilesystemResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/Filesystem" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "FilesystemResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/FilesystemResult" - } - } - }, - "additionalProperties": false - }, - "Filesystems": { - "type": "object", - "properties": { - "filesystems": { - "type": "array", - "items": { - "$ref": "#/definitions/Filesystem" - } - } - }, - "additionalProperties": false, - "required": [ - "filesystems" - ] - }, - "LifeResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "life": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "life" - ] - }, - "LifeResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/LifeResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "MachineStorageId": { - "type": "object", - "properties": { - "attachment-tag": { - "type": "string" - }, - "machine-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "machine-tag", - "attachment-tag" - ] - }, - "MachineStorageIds": { - "type": "object", - "properties": { - "ids": { - "type": "array", - "items": { - "$ref": "#/definitions/MachineStorageId" - } - } - }, - "additionalProperties": false, - "required": [ - "ids" - ] - }, - "MachineStorageIdsWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "$ref": "#/definitions/MachineStorageId" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id", - "changes" - ] - }, - "MachineStorageIdsWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/MachineStorageIdsWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "NotifyWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "RemoveFilesystemParams": { - "type": "object", - "properties": { - "destroy": { - "type": "boolean" - }, - "filesystem-id": { - "type": "string" - }, - "provider": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "provider", - "filesystem-id" - ] - }, - "RemoveFilesystemParamsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/RemoveFilesystemParams" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "RemoveFilesystemParamsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoveFilesystemParamsResult" - } - } - }, - "additionalProperties": false - }, - "RemoveVolumeParams": { - "type": "object", - "properties": { - "destroy": { - "type": "boolean" - }, - "provider": { - "type": "string" - }, - "volume-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "provider", - "volume-id" - ] - }, - "RemoveVolumeParamsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/RemoveVolumeParams" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "RemoveVolumeParamsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoveVolumeParamsResult" - } - } - }, - "additionalProperties": false - }, - "SetStatus": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityStatusArgs" - } - } - }, - "additionalProperties": false, - "required": [ - "entities" - ] - }, - "StringResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "StringResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "StringsWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id" - ] - }, - "StringsWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringsWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "Volume": { - "type": "object", - "properties": { - "info": { - "$ref": "#/definitions/VolumeInfo" - }, - "volume-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "volume-tag", - "info" - ] - }, - "VolumeAttachment": { - "type": "object", - "properties": { - "info": { - "$ref": "#/definitions/VolumeAttachmentInfo" - }, - "machine-tag": { - "type": "string" - }, - "volume-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "volume-tag", - "machine-tag", - "info" - ] - }, - "VolumeAttachmentInfo": { - "type": "object", - "properties": { - "bus-address": { - "type": "string" - }, - "device-link": { - "type": "string" - }, - "device-name": { - "type": "string" - }, - "plan-info": { - "$ref": "#/definitions/VolumeAttachmentPlanInfo" - }, - "read-only": { - "type": "boolean" - } - }, - "additionalProperties": false - }, - "VolumeAttachmentParams": { - "type": "object", - "properties": { - "instance-id": { - "type": "string" - }, - "machine-tag": { - "type": "string" - }, - "provider": { - "type": "string" - }, - "read-only": { - "type": "boolean" - }, - "volume-id": { - "type": "string" - }, - "volume-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "volume-tag", - "machine-tag", - "provider" - ] - }, - "VolumeAttachmentParamsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/VolumeAttachmentParams" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "VolumeAttachmentParamsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/VolumeAttachmentParamsResult" - } - } - }, - "additionalProperties": false - }, - "VolumeAttachmentPlan": { - "type": "object", - "properties": { - "block-device": { - "$ref": "#/definitions/BlockDevice" - }, - "life": { - "type": "string" - }, - "machine-tag": { - "type": "string" - }, - "plan-info": { - "$ref": "#/definitions/VolumeAttachmentPlanInfo" - }, - "volume-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "volume-tag", - "machine-tag", - "plan-info" - ] - }, - "VolumeAttachmentPlanInfo": { - "type": "object", - "properties": { - "device-attributes": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "device-type": { - "type": "string" - } - }, - "additionalProperties": false - }, - "VolumeAttachmentPlanResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/VolumeAttachmentPlan" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "VolumeAttachmentPlanResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/VolumeAttachmentPlanResult" - } - } - }, - "additionalProperties": false - }, - "VolumeAttachmentPlans": { - "type": "object", - "properties": { - "volume-plans": { - "type": "array", - "items": { - "$ref": "#/definitions/VolumeAttachmentPlan" - } - } - }, - "additionalProperties": false, - "required": [ - "volume-plans" - ] - }, - "VolumeAttachmentResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/VolumeAttachment" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "VolumeAttachmentResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/VolumeAttachmentResult" - } - } - }, - "additionalProperties": false - }, - "VolumeAttachments": { - "type": "object", - "properties": { - "volume-attachments": { - "type": "array", - "items": { - "$ref": "#/definitions/VolumeAttachment" - } - } - }, - "additionalProperties": false, - "required": [ - "volume-attachments" - ] - }, - "VolumeInfo": { - "type": "object", - "properties": { - "hardware-id": { - "type": "string" - }, - "persistent": { - "type": "boolean" - }, - "pool": { - "type": "string" - }, - "size": { - "type": "integer" - }, - "volume-id": { - "type": "string" - }, - "wwn": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "volume-id", - "size", - "persistent" - ] - }, - "VolumeParams": { - "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" - } - } - }, - "volume-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "volume-tag", - "size", - "provider" - ] - }, - "VolumeParamsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/VolumeParams" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "VolumeParamsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/VolumeParamsResult" - } - } - }, - "additionalProperties": false - }, - "VolumeResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/Volume" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "VolumeResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/VolumeResult" - } - } - }, - "additionalProperties": false - }, - "Volumes": { - "type": "object", - "properties": { - "volumes": { - "type": "array", - "items": { - "$ref": "#/definitions/Volume" - } - } - }, - "additionalProperties": false, - "required": [ - "volumes" - ] - } - } - } - }, - { - "Name": "StringsWatcher", - "Description": "srvStringsWatcher defines the API for methods on a state.StringsWatcher.\nEach client has its own current set of watchers, stored in resources.\nsrvStringsWatcher notifies about changes for all entities of a given kind,\nsending the changes as a list of strings.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "Next": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsWatchResult" - } - }, - "description": "Next returns when a change has occurred to an entity of the\ncollection being watched since the most recent call to Next\nor the Watch call that created the srvStringsWatcher." - }, - "Stop": { - "type": "object", - "description": "Stop stops the watcher." - } - }, - "definitions": { - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "StringsWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id" - ] - } - } - } - }, - { - "Name": "Subnets", - "Description": "API provides the subnets API facade for version 5.", - "Version": 5, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "AllZones": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ZoneResults" - } - }, - "description": "AllZones returns all availability zones known to Juju. If a\nzone is unusable, unavailable, or deprecated the Available\nfield will be false." - }, - "ListSubnets": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SubnetsFilters" - }, - "Result": { - "$ref": "#/definitions/ListSubnetsResults" - } - }, - "description": "ListSubnets returns the matching subnets after applying\noptional filters." - }, - "SubnetsByCIDR": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/CIDRParams" - }, - "Result": { - "$ref": "#/definitions/SubnetsResults" - } - }, - "description": "SubnetsByCIDR returns the collection of subnets matching each CIDR in the input." - } - }, - "definitions": { - "CIDRParams": { - "type": "object", - "properties": { - "cidrs": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "cidrs" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ListSubnetsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/Subnet" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "Subnet": { - "type": "object", - "properties": { - "cidr": { - "type": "string" - }, - "life": { - "type": "string" - }, - "provider-id": { - "type": "string" - }, - "provider-network-id": { - "type": "string" - }, - "provider-space-id": { - "type": "string" - }, - "space-tag": { - "type": "string" - }, - "status": { - "type": "string" - }, - "vlan-tag": { - "type": "integer" - }, - "zones": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "cidr", - "vlan-tag", - "life", - "space-tag", - "zones" - ] - }, - "SubnetV2": { - "type": "object", - "properties": { - "Subnet": { - "$ref": "#/definitions/Subnet" - }, - "cidr": { - "type": "string" - }, - "id": { - "type": "string" - }, - "life": { - "type": "string" - }, - "provider-id": { - "type": "string" - }, - "provider-network-id": { - "type": "string" - }, - "provider-space-id": { - "type": "string" - }, - "space-tag": { - "type": "string" - }, - "status": { - "type": "string" - }, - "vlan-tag": { - "type": "integer" - }, - "zones": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "cidr", - "vlan-tag", - "life", - "space-tag", - "zones", - "Subnet" - ] - }, - "SubnetsFilters": { - "type": "object", - "properties": { - "space-tag": { - "type": "string" - }, - "zone": { - "type": "string" - } - }, - "additionalProperties": false - }, - "SubnetsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "subnets": { - "type": "array", - "items": { - "$ref": "#/definitions/SubnetV2" - } - } - }, - "additionalProperties": false - }, - "SubnetsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/SubnetsResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ZoneResult": { - "type": "object", - "properties": { - "available": { - "type": "boolean" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "name": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "available" - ] - }, - "ZoneResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ZoneResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - } - } - } - }, - { - "Name": "Undertaker", - "Description": "UndertakerAPI implements the API used by the model undertaker worker.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "CloudSpec": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/CloudSpecResults" - } - }, - "description": "CloudSpec returns the model's cloud spec." - }, - "GetCloudSpec": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ModelTag" - }, - "Result": { - "$ref": "#/definitions/CloudSpecResult" - } - }, - "description": "GetCloudSpec constructs the CloudSpec for a validated and authorized model." - }, - "ModelConfig": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ModelConfigResult" - } - }, - "description": "ModelConfig returns the current model's configuration." - }, - "ModelInfo": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/UndertakerModelInfoResult" - } - }, - "description": "ModelInfo returns information on the model needed by the undertaker worker." - }, - "ProcessDyingModel": { - "type": "object", - "description": "ProcessDyingModel checks if a dying model has any machines or applications.\nIf there are none, the model's life is changed from dying to dead." - }, - "RemoveModel": { - "type": "object", - "description": "RemoveModel removes any records of this model from Juju." - }, - "SetStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetStatus" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetStatus sets the status of each given entity." - }, - "WatchCloudSpecsChanges": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "WatchCloudSpecsChanges returns a watcher for cloud spec changes." - }, - "WatchForModelConfigChanges": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResult" - } - }, - "description": "WatchForModelConfigChanges returns a NotifyWatcher that observes\nchanges to the model configuration.\nNote that although the NotifyWatchResult contains an Error field,\nit's not used because we are only returning a single watcher,\nso we use the regular error return." - }, - "WatchModel": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "WatchModel creates a watcher for the current model." - }, - "WatchModelResources": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "WatchModelResources creates watchers for changes to the lifecycle of an\nmodel's machines and applications and storage." - } - }, - "definitions": { - "CloudCredential": { - "type": "object", - "properties": { - "attrs": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "auth-type": { - "type": "string" - }, - "redacted": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "auth-type" - ] - }, - "CloudSpec": { - "type": "object", - "properties": { - "cacertificates": { - "type": "array", - "items": { - "type": "string" - } - }, - "credential": { - "$ref": "#/definitions/CloudCredential" - }, - "endpoint": { - "type": "string" - }, - "identity-endpoint": { - "type": "string" - }, - "is-controller-cloud": { - "type": "boolean" - }, - "name": { - "type": "string" - }, - "region": { - "type": "string" - }, - "skip-tls-verify": { - "type": "boolean" - }, - "storage-endpoint": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type", - "name" - ] - }, - "CloudSpecResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/CloudSpec" - } - }, - "additionalProperties": false - }, - "CloudSpecResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/CloudSpecResult" - } - } - }, - "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" - ] - }, - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ModelConfigResult": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "ModelTag": { - "type": "object", - "additionalProperties": false - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "NotifyWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "SetStatus": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityStatusArgs" - } - } - }, - "additionalProperties": false, - "required": [ - "entities" - ] - }, - "UndertakerModelInfo": { - "type": "object", - "properties": { - "destroy-timeout": { - "type": "integer" - }, - "force-destroyed": { - "type": "boolean" - }, - "global-name": { - "type": "string" - }, - "is-system": { - "type": "boolean" - }, - "life": { - "type": "string" - }, - "name": { - "type": "string" - }, - "uuid": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "uuid", - "name", - "global-name", - "is-system", - "life" - ] - }, - "UndertakerModelInfoResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/UndertakerModelInfo" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - } - } - } - }, - { - "Name": "UnitAssigner", - "Description": "API implements the functionality for assigning units to machines.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "AssignUnits": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "AssignUnits assigns the units with the given ids to the correct machine. The\nerror results are returned in the same order as the given entities." - }, - "SetAgentStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetStatus" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetAgentStatus will set status for agents of Units passed in args, if one\nof the args is not an Unit it will fail." - }, - "WatchUnitAssignments": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsWatchResult" - } - }, - "description": "WatchUnitAssignments returns a strings watcher that is notified when new unit\nassignments are added to the db." - } - }, - "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" - ] - }, - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "SetStatus": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityStatusArgs" - } - } - }, - "additionalProperties": false, - "required": [ - "entities" - ] - }, - "StringsWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id" - ] - } - } - } - }, - { - "Name": "Uniter", - "Description": "UniterAPI implements the latest version (v18) of the Uniter API.", - "Version": 19, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "APIAddresses": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsResult" - } - }, - "description": "APIAddresses returns the list of addresses used to connect to the API." - }, - "APIHostPorts": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/APIHostPortsResult" - } - }, - "description": "APIHostPorts returns the API server addresses." - }, - "ActionStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringResults" - } - }, - "description": "ActionStatus returns the status of Actions by Tags passed in." - }, - "Actions": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ActionResults" - } - }, - "description": "Actions returns the Actions by Tags passed and ensures that the Unit asking\nfor them is the same Unit that has the Actions." - }, - "AddMetricBatches": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/MetricBatchParams" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "AddMetricBatches adds the metrics for the specified unit." - }, - "ApplicationStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ApplicationStatusResults" - } - }, - "description": "ApplicationStatus returns the status of the Applications and its workloads\nif the given unit is the leader." - }, - "AssignedMachine": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringResults" - } - }, - "description": "AssignedMachine returns the machine tag for each given unit tag, or\nan error satisfying params.IsCodeNotAssigned when a unit has no\nassigned machine." - }, - "AvailabilityZone": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringResults" - } - }, - "description": "AvailabilityZone returns the availability zone for each given unit, if applicable." - }, - "BeginActions": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "BeginActions marks the actions represented by the passed in Tags as running." - }, - "CanApplyLXDProfile": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/BoolResults" - } - }, - "description": "CanApplyLXDProfile is a shim to call the LXDProfileAPIv2 version of this method." - }, - "CharmArchiveSha256": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/CharmURLs" - }, - "Result": { - "$ref": "#/definitions/StringResults" - } - }, - "description": "CharmArchiveSha256 returns the SHA256 digest of the charm archive\n(bundle) data for each charm url in the given parameters." - }, - "CharmModifiedVersion": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/IntResults" - } - }, - "description": "CharmModifiedVersion returns the most CharmModifiedVersion for all given\nunits or applications." - }, - "CharmURL": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringBoolResults" - } - }, - "description": "CharmURL returns the charm URL for all given units or applications." - }, - "ClearResolved": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "ClearResolved removes any resolved setting from each given unit." - }, - "CloudAPIVersion": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringResult" - } - }, - "description": "CloudAPIVersion returns the cloud API version, if available." - }, - "CloudSpec": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/CloudSpecResult" - } - }, - "description": "CloudSpec returns the cloud spec used by the model in which the\nauthenticated unit or application resides.\nA check is made beforehand to ensure that the request is made by an entity\nthat has been granted the appropriate trust." - }, - "CommitHookChanges": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/CommitHookChangesArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "CommitHookChanges batches together all required API calls for applying\na set of changes after a hook successfully completes and executes them in a\nsingle transaction." - }, - "ConfigSettings": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ConfigSettingsResults" - } - }, - "description": "ConfigSettings returns the complete set of application charm config\nsettings available to each given unit." - }, - "CreateSecretURIs": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/CreateSecretURIsArg" - }, - "Result": { - "$ref": "#/definitions/StringResults" - } - }, - "description": "CreateSecretURIs creates new secret URIs." - }, - "CreateSecrets": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/CreateSecretArgs" - }, - "Result": { - "$ref": "#/definitions/StringResults" - } - }, - "description": "CreateSecrets creates new secrets." - }, - "CurrentModel": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ModelResult" - } - }, - "description": "CurrentModel returns the name and UUID for the current juju model." - }, - "Destroy": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "Destroy advances all given Alive units' lifecycles as far as\npossible. See state/Unit.Destroy()." - }, - "DestroyAllSubordinates": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "DestroyAllSubordinates destroys all subordinates of each given unit." - }, - "DestroyUnitStorageAttachments": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "DestroyUnitStorageAttachments marks each storage attachment of the\nspecified units as Dying." - }, - "EnsureDead": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "EnsureDead calls EnsureDead on each given entity from state. It\nwill fail if the entity is not present. If it's Alive, nothing will\nhappen (see state/EnsureDead() for units or machines)." - }, - "EnterScope": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RelationUnits" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "EnterScope ensures each unit has entered its scope in the relation,\nfor all of the given relation/unit pairs. See also\nstate.RelationUnit.EnterScope()." - }, - "FinishActions": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ActionExecutionResults" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "FinishActions saves the result of a completed Action" - }, - "GetConsumerSecretsRevisionInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/GetSecretConsumerInfoArgs" - }, - "Result": { - "$ref": "#/definitions/SecretConsumerInfoResults" - } - }, - "description": "GetConsumerSecretsRevisionInfo returns the latest secret revisions for the specified secrets.\nThis facade method is used for remote watcher to get the latest secret revisions and labels for a secret changed hook." - }, - "GetMeterStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/MeterStatusResults" - } - } - }, - "GetPodSpec": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringResults" - } - }, - "description": "GetPodSpec gets the pod specs for a set of applications." - }, - "GetPrincipal": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringBoolResults" - } - }, - "description": "GetPrincipal returns the result of calling PrincipalName() and\nconverting it to a tag, on each given unit." - }, - "GetRawK8sSpec": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringResults" - } - }, - "description": "GetRawK8sSpec gets the raw k8s specs for a set of applications." - }, - "GetSecretBackendConfigs": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SecretBackendArgs" - }, - "Result": { - "$ref": "#/definitions/SecretBackendConfigResults" - } - }, - "description": "GetSecretBackendConfigs gets the config needed to create a client to secret backends." - }, - "GetSecretContentInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/GetSecretContentArgs" - }, - "Result": { - "$ref": "#/definitions/SecretContentResults" - } - }, - "description": "GetSecretContentInfo returns the secret values for the specified secrets." - }, - "GetSecretMetadata": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ListSecretResults" - } - }, - "description": "GetSecretMetadata returns metadata for the caller's secrets." - }, - "GetSecretRevisionContentInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SecretRevisionArg" - }, - "Result": { - "$ref": "#/definitions/SecretContentResults" - } - }, - "description": "GetSecretRevisionContentInfo returns the secret values for the specified secret revisions." - }, - "GoalStates": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/GoalStateResults" - } - }, - "description": "GoalStates returns information of charm units and relations." - }, - "HasSubordinates": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/BoolResults" - } - }, - "description": "HasSubordinates returns the whether each given unit has any subordinates." - }, - "LXDProfileName": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringResults" - } - }, - "description": "LXDProfileName is a shim to call the LXDProfileAPIv2 version of this method." - }, - "LXDProfileRequired": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/CharmURLs" - }, - "Result": { - "$ref": "#/definitions/BoolResults" - } - }, - "description": "LXDProfileRequired is a shim to call the LXDProfileAPIv2 version of this method." - }, - "LeaveScope": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RelationUnits" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "LeaveScope signals each unit has left its scope in the relation,\nfor all of the given relation/unit pairs. See also\nstate.RelationUnit.LeaveScope()." - }, - "Life": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/LifeResults" - } - }, - "description": "Life returns the life status of every supplied entity, where available." - }, - "LogActionsMessages": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ActionMessageParams" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "LogActionsMessages records the log messages against the specified actions." - }, - "Merge": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/MergeLeadershipSettingsBulkParams" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "Merge merges in the provided leadership settings. Only leaders for\nthe given service may perform this operation." - }, - "ModelConfig": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ModelConfigResult" - } - }, - "description": "ModelConfig returns the current model's configuration." - }, - "NetworkInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/NetworkInfoParams" - }, - "Result": { - "$ref": "#/definitions/NetworkInfoResults" - } - }, - "description": "NetworkInfo returns network interfaces/addresses for specified bindings." - }, - "OpenedMachinePortRangesByEndpoint": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/OpenPortRangesByEndpointResults" - } - }, - "description": "OpenedMachinePortRangesByEndpoint returns the port ranges opened by each\nunit on the provided machines grouped by application endpoint." - }, - "OpenedPortRangesByEndpoint": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/OpenPortRangesByEndpointResults" - } - }, - "description": "OpenedPortRangesByEndpoint returns the port ranges opened by the unit." - }, - "PrivateAddress": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringResults" - } - }, - "description": "PrivateAddress returns the private address for each given unit, if set." - }, - "ProviderType": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringResult" - } - }, - "description": "ProviderType returns the provider type used by the current juju\nmodel.\n\nTODO(dimitern): Refactor the uniter to call this instead of calling\nModelConfig() just to get the provider type. Once we have machine\naddresses, this might be completely unnecessary though." - }, - "PublicAddress": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringResults" - } - }, - "description": "PublicAddress returns the public address for each given unit, if set." - }, - "Read": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/GetLeadershipSettingsBulkResults" - } - }, - "description": "Read reads leadership settings for the provided service ID. Any\nunit of the service may perform this operation." - }, - "ReadLocalApplicationSettings": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RelationUnit" - }, - "Result": { - "$ref": "#/definitions/SettingsResult" - } - }, - "description": "ReadLocalApplicationSettings returns the local application settings for a\nparticular relation when invoked by the leader unit." - }, - "ReadRemoteSettings": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RelationUnitPairs" - }, - "Result": { - "$ref": "#/definitions/SettingsResults" - } - }, - "description": "ReadRemoteSettings returns the remote settings of each given set of\nrelation/local unit/remote unit." - }, - "ReadSettings": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RelationUnits" - }, - "Result": { - "$ref": "#/definitions/SettingsResults" - } - }, - "description": "ReadSettings returns the local settings of each given set of\nrelation/unit.\n\nNOTE(achilleasa): Using this call to read application data is deprecated\nand will not work for k8s charms (see LP1876097). Instead, clients should\nuse ReadLocalApplicationSettings." - }, - "Refresh": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/UnitRefreshResults" - } - }, - "description": "Refresh retrieves the latest values for attributes on this unit." - }, - "Relation": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RelationUnits" - }, - "Result": { - "$ref": "#/definitions/RelationResults" - } - }, - "description": "Relation returns information about all given relation/unit pairs,\nincluding their id, key and the local endpoint." - }, - "RelationById": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RelationIds" - }, - "Result": { - "$ref": "#/definitions/RelationResults" - } - }, - "description": "RelationById returns information about all given relations,\nspecified by their ids, including their key and the local\nendpoint." - }, - "RelationsStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/RelationUnitStatusResults" - } - }, - "description": "RelationsStatus returns for each unit the corresponding relation and status information." - }, - "RemoveSecrets": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/DeleteSecretArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "RemoveSecrets removes the specified secrets." - }, - "RemoveStorageAttachments": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/StorageAttachmentIds" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "RemoveStorageAttachments removes the specified storage\nattachments from state." - }, - "RequestReboot": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "RequestReboot sets the reboot flag on the provided machines" - }, - "Resolved": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ResolvedModeResults" - } - }, - "description": "Resolved returns the current resolved setting for each given unit." - }, - "SLALevel": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringResult" - } - }, - "description": "SLALevel returns the model's SLA level." - }, - "SecretsGrant": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/GrantRevokeSecretArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SecretsGrant grants access to a secret for the specified subjects." - }, - "SecretsRevoke": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/GrantRevokeSecretArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SecretsRevoke revokes access to a secret for the specified subjects." - }, - "SecretsRotated": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SecretRotatedArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SecretsRotated records when secrets were last rotated." - }, - "SetAgentStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetStatus" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetAgentStatus will set status for agents of Units passed in args, if one\nof the args is not an Unit it will fail." - }, - "SetApplicationStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetStatus" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetApplicationStatus sets the status for all the Applications in args if the given Unit is\nthe leader." - }, - "SetCharmURL": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/EntitiesCharmURL" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetCharmURL sets the charm URL for each given unit. An error will\nbe returned if a unit is dead, or the charm URL is not known." - }, - "SetRelationStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RelationStatusArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetRelationStatus updates the status of the specified relations." - }, - "SetState": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetUnitStateArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetState sets the state persisted by the charm running in this unit\nand the state internal to the uniter for this unit." - }, - "SetStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetStatus" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetStatus will set status for a entities passed in args. If the entity is\na Unit it will instead set status to its agent, to emulate backwards\ncompatibility." - }, - "SetUnitStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetStatus" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetUnitStatus sets status for all elements passed in args, the difference\nwith SetStatus is that if an entity is a Unit it will set its status instead\nof its agent." - }, - "SetUpgradeSeriesUnitStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/UpgradeSeriesStatusParams" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetUpgradeSeriesUnitStatus sets the upgrade series status of the unit.\nIf no upgrade is in progress an error is returned instead." - }, - "SetWorkloadVersion": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/EntityWorkloadVersions" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetWorkloadVersion sets the workload version for each given unit. An error will\nbe returned if a unit is dead." - }, - "State": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/UnitStateResults" - } - }, - "description": "State returns the state persisted by the charm running in this unit\nand the state internal to the uniter for this unit." - }, - "StorageAttachmentLife": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/StorageAttachmentIds" - }, - "Result": { - "$ref": "#/definitions/LifeResults" - } - }, - "description": "StorageAttachmentLife returns the lifecycle state of the storage attachments\nwith the specified tags." - }, - "StorageAttachments": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/StorageAttachmentIds" - }, - "Result": { - "$ref": "#/definitions/StorageAttachmentResults" - } - }, - "description": "StorageAttachments returns the storage attachments with the specified tags." - }, - "UnitStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StatusResults" - } - }, - "description": "UnitStatus returns the workload status information for the unit." - }, - "UnitStorageAttachments": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StorageAttachmentIdsResults" - } - }, - "description": "UnitStorageAttachments returns the IDs of storage attachments for a collection of units." - }, - "UpdateNetworkInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "UpdateNetworkInfo refreshes the network settings for a unit's bound\nendpoints." - }, - "UpdateSecrets": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/UpdateSecretArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "UpdateSecrets updates the specified secrets." - }, - "UpgradeSeriesUnitStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/UpgradeSeriesStatusResults" - } - }, - "description": "UpgradeSeriesUnitStatus returns the current preparation status of an\nupgrading unit.\nIf no series upgrade is in progress an error is returned instead." - }, - "Watch": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "Watch starts an NotifyWatcher for each given entity." - }, - "WatchAPIHostPorts": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResult" - } - }, - "description": "WatchAPIHostPorts watches the API server addresses." - }, - "WatchActionNotifications": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - }, - "description": "WatchActionNotifications returns a StringsWatcher for observing\nincoming action calls to a unit. See also state/watcher.go\nUnit.WatchActionNotifications(). This method is called from\napi/uniter/uniter.go WatchActionNotifications()." - }, - "WatchConfigSettingsHash": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - }, - "description": "WatchConfigSettingsHash returns a StringsWatcher that yields a hash\nof the config values every time the config changes. The uniter can\nsave this hash and use it to decide whether the config-changed hook\nneeds to be run (or whether this was just an agent restart with no\nsubstantive config change)." - }, - "WatchConsumedSecretsChanges": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - }, - "description": "WatchConsumedSecretsChanges sets up a watcher to notify of changes to secret revisions for the specified consumers." - }, - "WatchForModelConfigChanges": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResult" - } - }, - "description": "WatchForModelConfigChanges returns a NotifyWatcher that observes\nchanges to the model configuration.\nNote that although the NotifyWatchResult contains an Error field,\nit's not used because we are only returning a single watcher,\nso we use the regular error return." - }, - "WatchInstanceData": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "WatchInstanceData is a shim to call the LXDProfileAPIv2 version of this method." - }, - "WatchLeadershipSettings": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "WatchLeadershipSettings will block the caller until leadership settings\nfor the given service ID change." - }, - "WatchMeterStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - } - }, - "WatchObsolete": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResult" - } - }, - "description": "WatchObsolete returns a watcher for notifying when:\n - a secret owned by the entity is deleted\n - a secret revision owed by the entity no longer\n has any consumers\n\nObsolete revisions results are \"uri/revno\" and deleted\nsecret results are \"uri\"." - }, - "WatchRelationUnits": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RelationUnits" - }, - "Result": { - "$ref": "#/definitions/RelationUnitsWatchResults" - } - }, - "description": "WatchRelationUnits returns a RelationUnitsWatcher for observing\nchanges to every unit in the supplied relation that is visible to\nthe supplied unit. See also state/watcher.go:RelationUnit.Watch()." - }, - "WatchSecretRevisionsExpiryChanges": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/SecretTriggerWatchResult" - } - }, - "description": "WatchSecretRevisionsExpiryChanges sets up a watcher to notify of changes to secret revision expiry config." - }, - "WatchSecretsRotationChanges": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/SecretTriggerWatchResult" - } - }, - "description": "WatchSecretsRotationChanges sets up a watcher to notify of changes to secret rotation config." - }, - "WatchStorageAttachments": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/StorageAttachmentIds" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "WatchStorageAttachments creates watchers for a collection of storage\nattachments, each of which can be used to watch changes to storage\nattachment info." - }, - "WatchTrustConfigSettingsHash": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - }, - "description": "WatchTrustConfigSettingsHash returns a StringsWatcher that yields a\nhash of the application config values whenever they change. The\nuniter can use the hash to determine whether the actual values have\nchanged since it last saw the config." - }, - "WatchUnitAddressesHash": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - }, - "description": "WatchUnitAddressesHash returns a StringsWatcher that yields the\nhashes of the addresses for the unit whenever the addresses\nchange. The uniter can use the hash to determine whether the actual\naddress values have changed since it last saw the config." - }, - "WatchUnitRelations": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - }, - "description": "WatchUnitRelations returns a StringsWatcher, for each given\nunit, that notifies of changes to the lifecycles of relations\nrelevant to that unit. For principal units, this will be all of the\nrelations for the application. For subordinate units, only\nrelations with the principal unit's application will be monitored." - }, - "WatchUnitStorageAttachments": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - }, - "description": "WatchUnitStorageAttachments creates watchers for a collection of units,\neach of which can be used to watch for lifecycle changes to the corresponding\nunit's storage attachments." - }, - "WatchUpgradeSeriesNotifications": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "WatchUpgradeSeriesNotifications returns a NotifyWatcher for observing changes to upgrade series locks." - }, - "WorkloadVersion": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringResults" - } - }, - "description": "WorkloadVersion returns the workload version for all given units or applications." - } - }, - "definitions": { - "APIHostPortsResult": { - "type": "object", - "properties": { - "servers": { - "type": "array", - "items": { - "type": "array", - "items": { - "$ref": "#/definitions/HostPort" - } - } - } - }, - "additionalProperties": false, - "required": [ - "servers" - ] - }, - "Action": { - "type": "object", - "properties": { - "execution-group": { - "type": "string" - }, - "name": { - "type": "string" - }, - "parallel": { - "type": "boolean" - }, - "parameters": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "receiver": { - "type": "string" - }, - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "receiver", - "name" - ] - }, - "ActionExecutionResult": { - "type": "object", - "properties": { - "action-tag": { - "type": "string" - }, - "message": { - "type": "string" - }, - "results": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "status": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "action-tag", - "status" - ] - }, - "ActionExecutionResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ActionExecutionResult" - } - } - }, - "additionalProperties": false - }, - "ActionMessage": { - "type": "object", - "properties": { - "message": { - "type": "string" - }, - "timestamp": { - "type": "string", - "format": "date-time" - } - }, - "additionalProperties": false, - "required": [ - "timestamp", - "message" - ] - }, - "ActionMessageParams": { - "type": "object", - "properties": { - "messages": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityString" - } - } - }, - "additionalProperties": false, - "required": [ - "messages" - ] - }, - "ActionResult": { - "type": "object", - "properties": { - "action": { - "$ref": "#/definitions/Action" - }, - "completed": { - "type": "string", - "format": "date-time" - }, - "enqueued": { - "type": "string", - "format": "date-time" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "log": { - "type": "array", - "items": { - "$ref": "#/definitions/ActionMessage" - } - }, - "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 - }, - "Address": { - "type": "object", - "properties": { - "cidr": { - "type": "string" - }, - "config-type": { - "type": "string" - }, - "is-secondary": { - "type": "boolean" - }, - "scope": { - "type": "string" - }, - "space-id": { - "type": "string" - }, - "space-name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "value", - "type", - "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" - ] - }, - "ApplicationStatusResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ApplicationStatusResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "BoolResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "BoolResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/BoolResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "CharmRelation": { - "type": "object", - "properties": { - "interface": { - "type": "string" - }, - "limit": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "optional": { - "type": "boolean" - }, - "role": { - "type": "string" - }, - "scope": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "role", - "interface", - "optional", - "limit", - "scope" - ] - }, - "CharmURL": { - "type": "object", - "properties": { - "url": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "url" - ] - }, - "CharmURLs": { - "type": "object", - "properties": { - "urls": { - "type": "array", - "items": { - "$ref": "#/definitions/CharmURL" - } - } - }, - "additionalProperties": false, - "required": [ - "urls" - ] - }, - "CloudCredential": { - "type": "object", - "properties": { - "attrs": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "auth-type": { - "type": "string" - }, - "redacted": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "auth-type" - ] - }, - "CloudSpec": { - "type": "object", - "properties": { - "cacertificates": { - "type": "array", - "items": { - "type": "string" - } - }, - "credential": { - "$ref": "#/definitions/CloudCredential" - }, - "endpoint": { - "type": "string" - }, - "identity-endpoint": { - "type": "string" - }, - "is-controller-cloud": { - "type": "boolean" - }, - "name": { - "type": "string" - }, - "region": { - "type": "string" - }, - "skip-tls-verify": { - "type": "boolean" - }, - "storage-endpoint": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type", - "name" - ] - }, - "CloudSpecResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/CloudSpec" - } - }, - "additionalProperties": false - }, - "CommitHookChangesArg": { - "type": "object", - "properties": { - "add-storage": { - "type": "array", - "items": { - "$ref": "#/definitions/StorageAddParams" - } - }, - "close-ports": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityPortRange" - } - }, - "open-ports": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityPortRange" - } - }, - "pod-spec": { - "$ref": "#/definitions/PodSpec" - }, - "relation-unit-settings": { - "type": "array", - "items": { - "$ref": "#/definitions/RelationUnitSettings" - } - }, - "secret-creates": { - "type": "array", - "items": { - "$ref": "#/definitions/CreateSecretArg" - } - }, - "secret-deletes": { - "type": "array", - "items": { - "$ref": "#/definitions/DeleteSecretArg" - } - }, - "secret-grants": { - "type": "array", - "items": { - "$ref": "#/definitions/GrantRevokeSecretArg" - } - }, - "secret-revokes": { - "type": "array", - "items": { - "$ref": "#/definitions/GrantRevokeSecretArg" - } - }, - "secret-updates": { - "type": "array", - "items": { - "$ref": "#/definitions/UpdateSecretArg" - } - }, - "set-raw-k8s-spec": { - "$ref": "#/definitions/PodSpec" - }, - "tag": { - "type": "string" - }, - "unit-state": { - "$ref": "#/definitions/SetUnitStateArg" - }, - "update-network-info": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "update-network-info" - ] - }, - "CommitHookChangesArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/CommitHookChangesArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "ConfigSettingsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "settings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "settings" - ] - }, - "ConfigSettingsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ConfigSettingsResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "CreateSecretArg": { - "type": "object", - "properties": { - "UpsertSecretArg": { - "$ref": "#/definitions/UpsertSecretArg" - }, - "content": { - "$ref": "#/definitions/SecretContentParams" - }, - "description": { - "type": "string" - }, - "expire-time": { - "type": "string", - "format": "date-time" - }, - "label": { - "type": "string" - }, - "owner-tag": { - "type": "string" - }, - "params": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "rotate-policy": { - "type": "string" - }, - "uri": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "UpsertSecretArg", - "owner-tag" - ] - }, - "CreateSecretArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/CreateSecretArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "CreateSecretURIsArg": { - "type": "object", - "properties": { - "count": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "count" - ] - }, - "DeleteSecretArg": { - "type": "object", - "properties": { - "label": { - "type": "string" - }, - "revisions": { - "type": "array", - "items": { - "type": "integer" - } - }, - "uri": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "uri", - "label" - ] - }, - "DeleteSecretArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/DeleteSecretArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "Endpoint": { - "type": "object", - "properties": { - "application-name": { - "type": "string" - }, - "relation": { - "$ref": "#/definitions/CharmRelation" - } - }, - "additionalProperties": false, - "required": [ - "application-name", - "relation" - ] - }, - "Entities": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } - } - }, - "additionalProperties": false, - "required": [ - "entities" - ] - }, - "EntitiesCharmURL": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityCharmURL" - } - } - }, - "additionalProperties": false, - "required": [ - "entities" - ] - }, - "Entity": { - "type": "object", - "properties": { - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag" - ] - }, - "EntityCharmURL": { - "type": "object", - "properties": { - "charm-url": { - "type": "string" - }, - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "charm-url" - ] - }, - "EntityPortRange": { - "type": "object", - "properties": { - "endpoint": { - "type": "string" - }, - "from-port": { - "type": "integer" - }, - "protocol": { - "type": "string" - }, - "tag": { - "type": "string" - }, - "to-port": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "protocol", - "from-port", - "to-port", - "endpoint" - ] - }, - "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" - ] - }, - "EntityString": { - "type": "object", - "properties": { - "tag": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "value" - ] - }, - "EntityWorkloadVersion": { - "type": "object", - "properties": { - "tag": { - "type": "string" - }, - "workload-version": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "workload-version" - ] - }, - "EntityWorkloadVersions": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityWorkloadVersion" - } - } - }, - "additionalProperties": false, - "required": [ - "entities" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "GetLeadershipSettingsBulkResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/GetLeadershipSettingsResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "GetLeadershipSettingsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "settings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - } - }, - "additionalProperties": false, - "required": [ - "settings" - ] - }, - "GetSecretConsumerInfoArgs": { - "type": "object", - "properties": { - "consumer-tag": { - "type": "string" - }, - "uris": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "consumer-tag", - "uris" - ] - }, - "GetSecretContentArg": { - "type": "object", - "properties": { - "label": { - "type": "string" - }, - "peek": { - "type": "boolean" - }, - "refresh": { - "type": "boolean" - }, - "uri": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "uri" - ] - }, - "GetSecretContentArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/GetSecretContentArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "GoalState": { - "type": "object", - "properties": { - "relations": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/GoalStateStatus" - } - } - } - } - }, - "units": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/GoalStateStatus" - } - } - } - }, - "additionalProperties": false, - "required": [ - "units", - "relations" - ] - }, - "GoalStateResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/GoalState" - } - }, - "additionalProperties": false, - "required": [ - "result", - "error" - ] - }, - "GoalStateResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/GoalStateResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "GoalStateStatus": { - "type": "object", - "properties": { - "since": { - "type": "string", - "format": "date-time" - }, - "status": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "status", - "since" - ] - }, - "GrantRevokeSecretArg": { - "type": "object", - "properties": { - "role": { - "type": "string" - }, - "scope-tag": { - "type": "string" - }, - "subject-tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "uri": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "uri", - "scope-tag", - "subject-tags", - "role" - ] - }, - "GrantRevokeSecretArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/GrantRevokeSecretArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "HostPort": { - "type": "object", - "properties": { - "Address": { - "$ref": "#/definitions/Address" - }, - "cidr": { - "type": "string" - }, - "config-type": { - "type": "string" - }, - "is-secondary": { - "type": "boolean" - }, - "port": { - "type": "integer" - }, - "scope": { - "type": "string" - }, - "space-id": { - "type": "string" - }, - "space-name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "value", - "type", - "scope", - "Address", - "port" - ] - }, - "IntResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "IntResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/IntResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "InterfaceAddress": { - "type": "object", - "properties": { - "cidr": { - "type": "string" - }, - "hostname": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "hostname", - "value", - "cidr" - ] - }, - "LifeResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "life": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "life" - ] - }, - "LifeResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/LifeResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ListSecretResult": { - "type": "object", - "properties": { - "create-time": { - "type": "string", - "format": "date-time" - }, - "description": { - "type": "string" - }, - "label": { - "type": "string" - }, - "latest-expire-time": { - "type": "string", - "format": "date-time" - }, - "latest-revision": { - "type": "integer" - }, - "next-rotate-time": { - "type": "string", - "format": "date-time" - }, - "owner-tag": { - "type": "string" - }, - "revisions": { - "type": "array", - "items": { - "$ref": "#/definitions/SecretRevision" - } - }, - "rotate-policy": { - "type": "string" - }, - "update-time": { - "type": "string", - "format": "date-time" - }, - "uri": { - "type": "string" - }, - "value": { - "$ref": "#/definitions/SecretValueResult" - }, - "version": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "uri", - "version", - "owner-tag", - "latest-revision", - "create-time", - "update-time", - "revisions" - ] - }, - "ListSecretResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ListSecretResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "MergeLeadershipSettingsBulkParams": { - "type": "object", - "properties": { - "params": { - "type": "array", - "items": { - "$ref": "#/definitions/MergeLeadershipSettingsParam" - } - } - }, - "additionalProperties": false, - "required": [ - "params" - ] - }, - "MergeLeadershipSettingsParam": { - "type": "object", - "properties": { - "application-tag": { - "type": "string" - }, - "settings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "unit-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "settings" - ] - }, - "MeterStatusResult": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "info": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "code", - "info" - ] - }, - "MeterStatusResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/MeterStatusResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "Metric": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "labels": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "time": { - "type": "string", - "format": "date-time" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "key", - "value", - "time" - ] - }, - "MetricBatch": { - "type": "object", - "properties": { - "charm-url": { - "type": "string" - }, - "created": { - "type": "string", - "format": "date-time" - }, - "metrics": { - "type": "array", - "items": { - "$ref": "#/definitions/Metric" - } - }, - "uuid": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "uuid", - "charm-url", - "created", - "metrics" - ] - }, - "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" - ] - }, - "ModelConfigResult": { - "type": "object", - "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "config" - ] - }, - "ModelResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "uuid": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "uuid", - "type" - ] - }, - "NetworkInfo": { - "type": "object", - "properties": { - "addresses": { - "type": "array", - "items": { - "$ref": "#/definitions/InterfaceAddress" - } - }, - "interface-name": { - "type": "string" - }, - "mac-address": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "mac-address", - "interface-name", - "addresses" - ] - }, - "NetworkInfoParams": { - "type": "object", - "properties": { - "bindings": { - "type": "array", - "items": { - "type": "string" - } - }, - "relation-id": { - "type": "integer" - }, - "unit": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "unit", - "bindings" - ] - }, - "NetworkInfoResult": { - "type": "object", - "properties": { - "bind-addresses": { - "type": "array", - "items": { - "$ref": "#/definitions/NetworkInfo" - } - }, - "egress-subnets": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "ingress-addresses": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "NetworkInfoResults": { - "type": "object", - "properties": { - "results": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/NetworkInfoResult" - } - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "NotifyWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "OpenPortRangesByEndpointResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "unit-port-ranges": { - "type": "object", - "patternProperties": { - ".*": { - "type": "array", - "items": { - "$ref": "#/definitions/OpenUnitPortRangesByEndpoint" - } - } - } - } - }, - "additionalProperties": false, - "required": [ - "unit-port-ranges" - ] - }, - "OpenPortRangesByEndpointResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/OpenPortRangesByEndpointResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "OpenUnitPortRangesByEndpoint": { - "type": "object", - "properties": { - "endpoint": { - "type": "string" - }, - "port-ranges": { - "type": "array", - "items": { - "$ref": "#/definitions/PortRange" - } - } - }, - "additionalProperties": false, - "required": [ - "endpoint", - "port-ranges" - ] - }, - "PodSpec": { - "type": "object", - "properties": { - "spec": { - "type": "string" - }, - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag" - ] - }, - "PortRange": { - "type": "object", - "properties": { - "from-port": { - "type": "integer" - }, - "protocol": { - "type": "string" - }, - "to-port": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "from-port", - "to-port", - "protocol" - ] - }, - "RelationIds": { - "type": "object", - "properties": { - "relation-ids": { - "type": "array", - "items": { - "type": "integer" - } - } - }, - "additionalProperties": false, - "required": [ - "relation-ids" - ] - }, - "RelationResult": { - "type": "object", - "properties": { - "bool": { - "type": "boolean" - }, - "endpoint": { - "$ref": "#/definitions/Endpoint" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "id": { - "type": "integer" - }, - "key": { - "type": "string" - }, - "life": { - "type": "string" - }, - "other-application": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "life", - "id", - "key", - "endpoint" - ] - }, - "RelationResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/RelationResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "RelationStatusArg": { - "type": "object", - "properties": { - "message": { - "type": "string" - }, - "relation-id": { - "type": "integer" - }, - "status": { - "type": "string" - }, - "unit-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "unit-tag", - "relation-id", - "status", - "message" - ] - }, - "RelationStatusArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/RelationStatusArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "RelationUnit": { - "type": "object", - "properties": { - "relation": { - "type": "string" - }, - "unit": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "relation", - "unit" - ] - }, - "RelationUnitPair": { - "type": "object", - "properties": { - "local-unit": { - "type": "string" - }, - "relation": { - "type": "string" - }, - "remote-unit": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "relation", - "local-unit", - "remote-unit" - ] - }, - "RelationUnitPairs": { - "type": "object", - "properties": { - "relation-unit-pairs": { - "type": "array", - "items": { - "$ref": "#/definitions/RelationUnitPair" - } - } - }, - "additionalProperties": false, - "required": [ - "relation-unit-pairs" - ] - }, - "RelationUnitSettings": { - "type": "object", - "properties": { - "application-settings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "relation": { - "type": "string" - }, - "settings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "unit": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "relation", - "unit", - "settings", - "application-settings" - ] - }, - "RelationUnitStatus": { - "type": "object", - "properties": { - "in-scope": { - "type": "boolean" - }, - "relation-tag": { - "type": "string" - }, - "suspended": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "relation-tag", - "in-scope", - "suspended" - ] - }, - "RelationUnitStatusResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/RelationUnitStatus" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "RelationUnitStatusResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/RelationUnitStatusResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "RelationUnits": { - "type": "object", - "properties": { - "relation-units": { - "type": "array", - "items": { - "$ref": "#/definitions/RelationUnit" - } - } - }, - "additionalProperties": false, - "required": [ - "relation-units" - ] - }, - "RelationUnitsChange": { - "type": "object", - "properties": { - "app-changed": { - "type": "object", - "patternProperties": { - ".*": { - "type": "integer" - } - } - }, - "changed": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/UnitSettings" - } - } - }, - "departed": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "changed" - ] - }, - "RelationUnitsWatchResult": { - "type": "object", - "properties": { - "changes": { - "$ref": "#/definitions/RelationUnitsChange" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id", - "changes" - ] - }, - "RelationUnitsWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/RelationUnitsWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ResolvedModeResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "mode": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "mode" - ] - }, - "ResolvedModeResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ResolvedModeResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "SecretBackendArgs": { - "type": "object", - "properties": { - "backend-ids": { - "type": "array", - "items": { - "type": "string" - } - }, - "for-drain": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "for-drain", - "backend-ids" - ] - }, - "SecretBackendConfig": { - "type": "object", - "properties": { - "params": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type" - ] - }, - "SecretBackendConfigResult": { - "type": "object", - "properties": { - "config": { - "$ref": "#/definitions/SecretBackendConfig" - }, - "draining": { - "type": "boolean" - }, - "model-controller": { - "type": "string" - }, - "model-name": { - "type": "string" - }, - "model-uuid": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "model-controller", - "model-uuid", - "model-name", - "draining" - ] - }, - "SecretBackendConfigResults": { - "type": "object", - "properties": { - "active-id": { - "type": "string" - }, - "results": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/SecretBackendConfigResult" - } - } - } - }, - "additionalProperties": false, - "required": [ - "active-id" - ] - }, - "SecretConsumerInfoResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "label": { - "type": "string" - }, - "revision": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "revision", - "label" - ] - }, - "SecretConsumerInfoResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/SecretConsumerInfoResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "SecretContentParams": { - "type": "object", - "properties": { - "data": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "value-ref": { - "$ref": "#/definitions/SecretValueRef" - } - }, - "additionalProperties": false - }, - "SecretContentResult": { - "type": "object", - "properties": { - "backend-config": { - "$ref": "#/definitions/SecretBackendConfigResult" - }, - "content": { - "$ref": "#/definitions/SecretContentParams" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "latest-revision": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "content" - ] - }, - "SecretContentResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/SecretContentResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "SecretRevision": { - "type": "object", - "properties": { - "backend-name": { - "type": "string" - }, - "create-time": { - "type": "string", - "format": "date-time" - }, - "expire-time": { - "type": "string", - "format": "date-time" - }, - "revision": { - "type": "integer" - }, - "update-time": { - "type": "string", - "format": "date-time" - }, - "value-ref": { - "$ref": "#/definitions/SecretValueRef" - } - }, - "additionalProperties": false, - "required": [ - "revision" - ] - }, - "SecretRevisionArg": { - "type": "object", - "properties": { - "pending-delete": { - "type": "boolean" - }, - "revisions": { - "type": "array", - "items": { - "type": "integer" - } - }, - "uri": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "uri", - "revisions", - "pending-delete" - ] - }, - "SecretRotatedArg": { - "type": "object", - "properties": { - "original-revision": { - "type": "integer" - }, - "skip": { - "type": "boolean" - }, - "uri": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "uri", - "original-revision", - "skip" - ] - }, - "SecretRotatedArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/SecretRotatedArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "SecretTriggerChange": { - "type": "object", - "properties": { - "next-trigger-time": { - "type": "string", - "format": "date-time" - }, - "revision": { - "type": "integer" - }, - "uri": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "uri", - "next-trigger-time" - ] - }, - "SecretTriggerWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "$ref": "#/definitions/SecretTriggerChange" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id", - "changes" - ] - }, - "SecretValueRef": { - "type": "object", - "properties": { - "backend-id": { - "type": "string" - }, - "revision-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "backend-id", - "revision-id" - ] - }, - "SecretValueResult": { - "type": "object", - "properties": { - "data": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "SetStatus": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityStatusArgs" - } - } - }, - "additionalProperties": false, - "required": [ - "entities" - ] - }, - "SetUnitStateArg": { - "type": "object", - "properties": { - "charm-state": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "meter-status-state": { - "type": "string" - }, - "relation-state": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "secret-state": { - "type": "string" - }, - "storage-state": { - "type": "string" - }, - "tag": { - "type": "string" - }, - "uniter-state": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag" - ] - }, - "SetUnitStateArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/SetUnitStateArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "SettingsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "settings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - } - }, - "additionalProperties": false, - "required": [ - "settings" - ] - }, - "SettingsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/SettingsResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "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": [ - "id", - "life", - "status", - "info", - "data", - "since" - ] - }, - "StatusResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StatusResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "StorageAddParams": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "storage": { - "$ref": "#/definitions/StorageConstraints" - }, - "unit": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "unit", - "name", - "storage" - ] - }, - "StorageAttachment": { - "type": "object", - "properties": { - "kind": { - "type": "integer" - }, - "life": { - "type": "string" - }, - "location": { - "type": "string" - }, - "owner-tag": { - "type": "string" - }, - "storage-tag": { - "type": "string" - }, - "unit-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "storage-tag", - "owner-tag", - "unit-tag", - "kind", - "location", - "life" - ] - }, - "StorageAttachmentId": { - "type": "object", - "properties": { - "storage-tag": { - "type": "string" - }, - "unit-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "storage-tag", - "unit-tag" - ] - }, - "StorageAttachmentIds": { - "type": "object", - "properties": { - "ids": { - "type": "array", - "items": { - "$ref": "#/definitions/StorageAttachmentId" - } - } - }, - "additionalProperties": false, - "required": [ - "ids" - ] - }, - "StorageAttachmentIdsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/StorageAttachmentIds" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "StorageAttachmentIdsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StorageAttachmentIdsResult" - } - } - }, - "additionalProperties": false - }, - "StorageAttachmentResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/StorageAttachment" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "StorageAttachmentResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StorageAttachmentResult" - } - } - }, - "additionalProperties": false - }, - "StorageConstraints": { - "type": "object", - "properties": { - "count": { - "type": "integer" - }, - "pool": { - "type": "string" - }, - "size": { - "type": "integer" - } - }, - "additionalProperties": false - }, - "StringBoolResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "ok": { - "type": "boolean" - }, - "result": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "result", - "ok" - ] - }, - "StringBoolResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringBoolResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "StringResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "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": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "StringsWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id" - ] - }, - "StringsWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringsWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "UnitRefreshResult": { - "type": "object", - "properties": { - "Error": { - "$ref": "#/definitions/Error" - }, - "Life": { - "type": "string" - }, - "Resolved": { - "type": "string" - }, - "provider-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Life", - "Resolved", - "Error" - ] - }, - "UnitRefreshResults": { - "type": "object", - "properties": { - "Results": { - "type": "array", - "items": { - "$ref": "#/definitions/UnitRefreshResult" - } - } - }, - "additionalProperties": false, - "required": [ - "Results" - ] - }, - "UnitSettings": { - "type": "object", - "properties": { - "version": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "version" - ] - }, - "UnitStateResult": { - "type": "object", - "properties": { - "charm-state": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "meter-status-state": { - "type": "string" - }, - "relation-state": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "secret-state": { - "type": "string" - }, - "storage-state": { - "type": "string" - }, - "uniter-state": { - "type": "string" - } - }, - "additionalProperties": false - }, - "UnitStateResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/UnitStateResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "UpdateSecretArg": { - "type": "object", - "properties": { - "UpsertSecretArg": { - "$ref": "#/definitions/UpsertSecretArg" - }, - "content": { - "$ref": "#/definitions/SecretContentParams" - }, - "description": { - "type": "string" - }, - "expire-time": { - "type": "string", - "format": "date-time" - }, - "label": { - "type": "string" - }, - "params": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "rotate-policy": { - "type": "string" - }, - "uri": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "UpsertSecretArg", - "uri" - ] - }, - "UpdateSecretArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/UpdateSecretArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "UpgradeSeriesStatusParam": { - "type": "object", - "properties": { - "entity": { - "$ref": "#/definitions/Entity" - }, - "message": { - "type": "string" - }, - "status": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "entity", - "status", - "message" - ] - }, - "UpgradeSeriesStatusParams": { - "type": "object", - "properties": { - "params": { - "type": "array", - "items": { - "$ref": "#/definitions/UpgradeSeriesStatusParam" - } - } - }, - "additionalProperties": false, - "required": [ - "params" - ] - }, - "UpgradeSeriesStatusResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "status": { - "type": "string" - }, - "target": { - "type": "string" - } - }, - "additionalProperties": false - }, - "UpgradeSeriesStatusResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/UpgradeSeriesStatusResult" - } - } - }, - "additionalProperties": false - }, - "UpsertSecretArg": { - "type": "object", - "properties": { - "content": { - "$ref": "#/definitions/SecretContentParams" - }, - "description": { - "type": "string" - }, - "expire-time": { - "type": "string", - "format": "date-time" - }, - "label": { - "type": "string" - }, - "params": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "rotate-policy": { - "type": "string" - } - }, - "additionalProperties": false - } - } - } - }, - { - "Name": "UpgradeSeries", - "Description": "API serves methods required by the machine agent upgrade-machine worker.", - "Version": 3, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "CurrentSeries": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringResults" - } - }, - "description": "CurrentSeries returns what Juju thinks the current series of the machine is.\nNote that a machine could have been upgraded out-of-band by running\ndo-release-upgrade outside of the upgrade-machine workflow,\nmaking this value incorrect." - }, - "FinishUpgradeSeries": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/UpdateChannelArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "FinishUpgradeSeries is the last action in the upgrade workflow and is\ncalled after all machine and unit statuses are \"completed\".\nIt updates the machine series to reflect the completed upgrade, then\nremoves the upgrade-machine lock." - }, - "MachineStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/UpgradeSeriesStatusResults" - } - }, - "description": "MachineStatus gets the current upgrade-machine status of a machine." - }, - "PinMachineApplications": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/PinApplicationsResults" - } - }, - "description": "PinMachineApplications pins leadership for applications represented by units\nrunning on the auth'd machine." - }, - "PinnedLeadership": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/PinnedLeadershipResult" - } - }, - "description": "PinnedLeadership returns all pinned applications and the entities that\nrequire their pinned behaviour, for leadership in the current model." - }, - "SetInstanceStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetStatus" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetInstanceStatus sets the status of the machine." - }, - "SetMachineStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/UpgradeSeriesStatusParams" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetMachineStatus sets the current upgrade-machine status of a machine." - }, - "SetUpgradeSeriesUnitStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/UpgradeSeriesStatusParams" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetUpgradeSeriesUnitStatus sets the upgrade series status of the unit.\nIf no upgrade is in progress an error is returned instead." - }, - "StartUnitCompletion": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/UpgradeSeriesStartUnitCompletionParam" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "StartUnitCompletion starts the upgrade series completion phase for all subordinate\nunits of a given machine." - }, - "TargetSeries": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringResults" - } - }, - "description": "TargetSeries returns the series that a machine has been locked\nfor upgrading to." - }, - "UnitsCompleted": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/EntitiesResults" - } - }, - "description": "UnitsCompleted returns the units running on this machine that have completed\nthe upgrade-machine workflow and are in their normal running state." - }, - "UnitsPrepared": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/EntitiesResults" - } - }, - "description": "UnitsPrepared returns the units running on this machine that have completed\ntheir upgrade-machine preparation, and are ready to be stopped and have their\nunit agent services converted for the target series." - }, - "UnpinMachineApplications": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/PinApplicationsResults" - } - }, - "description": "UnpinMachineApplications unpins leadership for applications represented by\nunits running on the auth'd machine." - }, - "UpgradeSeriesUnitStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/UpgradeSeriesStatusResults" - } - }, - "description": "UpgradeSeriesUnitStatus returns the current preparation status of an\nupgrading unit.\nIf no series upgrade is in progress an error is returned instead." - }, - "WatchUpgradeSeriesNotifications": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - }, - "description": "WatchUpgradeSeriesNotifications returns a NotifyWatcher for observing changes to upgrade series locks." - } - }, - "definitions": { - "Entities": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } - } - }, - "additionalProperties": false, - "required": [ - "entities" - ] - }, - "EntitiesResult": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "entities" - ] - }, - "EntitiesResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/EntitiesResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "Entity": { - "type": "object", - "properties": { - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "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": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "NotifyWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "PinApplicationResult": { - "type": "object", - "properties": { - "application-name": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "application-name" - ] - }, - "PinApplicationsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/PinApplicationResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "PinnedLeadershipResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "object", - "patternProperties": { - ".*": { - "type": "array", - "items": { - "type": "string" - } - } - } - } - }, - "additionalProperties": false - }, - "SetStatus": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityStatusArgs" - } - } - }, - "additionalProperties": false, - "required": [ - "entities" - ] - }, - "StringResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "StringResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "UpdateChannelArg": { - "type": "object", - "properties": { - "channel": { - "type": "string" - }, - "force": { - "type": "boolean" - }, - "tag": { - "$ref": "#/definitions/Entity" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "force", - "channel" - ] - }, - "UpdateChannelArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/UpdateChannelArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "UpgradeSeriesStartUnitCompletionParam": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "entities", - "message" - ] - }, - "UpgradeSeriesStatusParam": { - "type": "object", - "properties": { - "entity": { - "$ref": "#/definitions/Entity" - }, - "message": { - "type": "string" - }, - "status": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "entity", - "status", - "message" - ] - }, - "UpgradeSeriesStatusParams": { - "type": "object", - "properties": { - "params": { - "type": "array", - "items": { - "$ref": "#/definitions/UpgradeSeriesStatusParam" - } - } - }, - "additionalProperties": false, - "required": [ - "params" - ] - }, - "UpgradeSeriesStatusResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "status": { - "type": "string" - }, - "target": { - "type": "string" - } - }, - "additionalProperties": false - }, - "UpgradeSeriesStatusResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/UpgradeSeriesStatusResult" - } - } - }, - "additionalProperties": false - } - } - } - }, - { - "Name": "UpgradeSteps", - "Description": "UpgradeStepsAPI implements version 2 of the Upgrade Steps API,\nwhich adds WriteUniterState.", - "Version": 2, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent" - ], - "Schema": { - "type": "object", - "properties": { - "ResetKVMMachineModificationStatusIdle": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entity" - }, - "Result": { - "$ref": "#/definitions/ErrorResult" - } - }, - "description": "ResetKVMMachineModificationStatusIdle sets the modification status\nof a kvm machine to idle if it is in an error state before upgrade.\nRelated to lp:1829393." - }, - "WriteAgentState": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetUnitStateArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "WriteAgentState writes the agent state for the set of units provided. This\ncall presently deals with the state for the unit agent." - } - }, - "definitions": { - "Entity": { - "type": "object", - "properties": { - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "SetUnitStateArg": { - "type": "object", - "properties": { - "charm-state": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "meter-status-state": { - "type": "string" - }, - "relation-state": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "secret-state": { - "type": "string" - }, - "storage-state": { - "type": "string" - }, - "tag": { - "type": "string" - }, - "uniter-state": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag" - ] - }, - "SetUnitStateArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/SetUnitStateArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - } - } - } - }, - { - "Name": "Upgrader", - "Description": "", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "DesiredVersion": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/VersionResults" - } - } - }, - "SetTools": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/EntitiesVersion" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - } - }, - "Tools": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ToolsResults" - } - } - }, - "WatchAPIVersion": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - } - } - }, - "definitions": { - "Binary": { - "type": "object", - "properties": { - "Arch": { - "type": "string" - }, - "Build": { - "type": "integer" - }, - "Major": { - "type": "integer" - }, - "Minor": { - "type": "integer" - }, - "Number": { - "$ref": "#/definitions/Number" - }, - "Patch": { - "type": "integer" - }, - "Release": { - "type": "string" - }, - "Tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Major", - "Minor", - "Tag", - "Patch", - "Build", - "Number", - "Release", - "Arch" - ] - }, - "Entities": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } - } - }, - "additionalProperties": false, - "required": [ - "entities" - ] - }, - "EntitiesVersion": { - "type": "object", - "properties": { - "agent-tools": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityVersion" - } - } - }, - "additionalProperties": false, - "required": [ - "agent-tools" - ] - }, - "Entity": { - "type": "object", - "properties": { - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag" - ] - }, - "EntityVersion": { - "type": "object", - "properties": { - "tag": { - "type": "string" - }, - "tools": { - "$ref": "#/definitions/Version" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "tools" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "NotifyWatchResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "Number": { - "type": "object", - "properties": { - "Build": { - "type": "integer" - }, - "Major": { - "type": "integer" - }, - "Minor": { - "type": "integer" - }, - "Patch": { - "type": "integer" - }, - "Tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Major", - "Minor", - "Tag", - "Patch", - "Build" - ] - }, - "Tools": { - "type": "object", - "properties": { - "sha256": { - "type": "string" - }, - "size": { - "type": "integer" - }, - "url": { - "type": "string" - }, - "version": { - "$ref": "#/definitions/Binary" - } - }, - "additionalProperties": false, - "required": [ - "version", - "url", - "size" - ] - }, - "ToolsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "tools": { - "type": "array", - "items": { - "$ref": "#/definitions/Tools" - } - } - }, - "additionalProperties": false, - "required": [ - "tools" - ] - }, - "ToolsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ToolsResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "Version": { - "type": "object", - "properties": { - "version": { - "$ref": "#/definitions/Binary" - } - }, - "additionalProperties": false, - "required": [ - "version" - ] - }, - "VersionResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "version": { - "$ref": "#/definitions/Number" - } - }, - "additionalProperties": false - }, - "VersionResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/VersionResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - } - } - } - }, - { - "Name": "UserManager", - "Description": "UserManagerAPI implements the user manager interface and is the concrete\nimplementation of the api end point.", - "Version": 3, - "AvailableTo": [ - "controller-user" - ], - "Schema": { - "type": "object", - "properties": { - "AddUser": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/AddUsers" - }, - "Result": { - "$ref": "#/definitions/AddUserResults" - } - }, - "description": "AddUser adds a user with a username, and either a password or\na randomly generated secret key which will be returned." - }, - "DisableUser": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "DisableUser disables one or more users. If the user is already disabled,\nthe action is considered a success." - }, - "EnableUser": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "EnableUser enables one or more users. If the user is already enabled,\nthe action is considered a success." - }, - "ModelUserInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ModelUserInfoResults" - } - }, - "description": "ModelUserInfo returns information on all users in the model." - }, - "RemoveUser": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "RemoveUser permanently removes a user from the current controller for each\nentity provided. While the user is permanently removed we keep it's\ninformation around for auditing purposes.\nTODO(redir): Add information about getting deleted user information when we\nadd that capability." - }, - "ResetPassword": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/AddUserResults" - } - }, - "description": "ResetPassword resets password for supplied users by\ninvalidating current passwords (if any) and generating\nnew random secret keys which will be returned.\nUsers cannot reset their own password." - }, - "SetPassword": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/EntityPasswords" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetPassword changes the stored password for the specified users." - }, - "UserInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/UserInfoRequest" - }, - "Result": { - "$ref": "#/definitions/UserInfoResults" - } - }, - "description": "UserInfo returns information on a user." - } - }, - "definitions": { - "AddUser": { - "type": "object", - "properties": { - "display-name": { - "type": "string" - }, - "password": { - "type": "string" - }, - "username": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "username", - "display-name" - ] - }, - "AddUserResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "secret-key": { - "type": "array", - "items": { - "type": "integer" - } - }, - "tag": { - "type": "string" - } - }, - "additionalProperties": false - }, - "AddUserResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/AddUserResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "AddUsers": { - "type": "object", - "properties": { - "users": { - "type": "array", - "items": { - "$ref": "#/definitions/AddUser" - } - } - }, - "additionalProperties": false, - "required": [ - "users" - ] - }, - "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" - ] - }, - "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" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ModelUserInfo": { - "type": "object", - "properties": { - "access": { - "type": "string" - }, - "display-name": { - "type": "string" - }, - "last-connection": { - "type": "string", - "format": "date-time" - }, - "model-tag": { - "type": "string" - }, - "user": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "model-tag", - "user", - "display-name", - "last-connection", - "access" - ] - }, - "ModelUserInfoResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/ModelUserInfo" - } - }, - "additionalProperties": false - }, - "ModelUserInfoResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelUserInfoResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "UserInfo": { - "type": "object", - "properties": { - "access": { - "type": "string" - }, - "created-by": { - "type": "string" - }, - "date-created": { - "type": "string", - "format": "date-time" - }, - "disabled": { - "type": "boolean" - }, - "display-name": { - "type": "string" - }, - "last-connection": { - "type": "string", - "format": "date-time" - }, - "username": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "username", - "display-name", - "access", - "created-by", - "date-created", - "disabled" - ] - }, - "UserInfoRequest": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } - }, - "include-disabled": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "entities", - "include-disabled" - ] - }, - "UserInfoResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/UserInfo" - } - }, - "additionalProperties": false - }, - "UserInfoResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/UserInfoResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - } - } - } - }, - { - "Name": "UserSecretsDrain", - "Description": "SecretsDrainAPI is the implementation for the SecretsDrain facade.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent" - ], - "Schema": { - "type": "object", - "properties": { - "ChangeSecretBackend": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ChangeSecretBackendArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "ChangeSecretBackend updates the backend for the specified secret after migration done." - }, - "GetSecretBackendConfigs": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SecretBackendArgs" - }, - "Result": { - "$ref": "#/definitions/SecretBackendConfigResults" - } - }, - "description": "GetSecretBackendConfigs gets the config needed to create a client to secret backends for the drain worker." - }, - "GetSecretContentInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/GetSecretContentArgs" - }, - "Result": { - "$ref": "#/definitions/SecretContentResults" - } - }, - "description": "GetSecretContentInfo returns the secret values for the specified secrets." - }, - "GetSecretRevisionContentInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SecretRevisionArg" - }, - "Result": { - "$ref": "#/definitions/SecretContentResults" - } - }, - "description": "GetSecretRevisionContentInfo returns the secret values for the specified secret revisions." - }, - "GetSecretsToDrain": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ListSecretResults" - } - }, - "description": "GetSecretsToDrain returns metadata for the secrets that need to be drained." - }, - "WatchSecretBackendChanged": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResult" - } - }, - "description": "WatchSecretBackendChanged sets up a watcher to notify of changes to the secret backend." - } - }, - "definitions": { - "ChangeSecretBackendArg": { - "type": "object", - "properties": { - "content": { - "$ref": "#/definitions/SecretContentParams" - }, - "revision": { - "type": "integer" - }, - "uri": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "uri", - "revision" - ] - }, - "ChangeSecretBackendArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/ChangeSecretBackendArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "GetSecretContentArg": { - "type": "object", - "properties": { - "label": { - "type": "string" - }, - "peek": { - "type": "boolean" - }, - "refresh": { - "type": "boolean" - }, - "uri": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "uri" - ] - }, - "GetSecretContentArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/GetSecretContentArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "ListSecretResult": { - "type": "object", - "properties": { - "create-time": { - "type": "string", - "format": "date-time" - }, - "description": { - "type": "string" - }, - "label": { - "type": "string" - }, - "latest-expire-time": { - "type": "string", - "format": "date-time" - }, - "latest-revision": { - "type": "integer" - }, - "next-rotate-time": { - "type": "string", - "format": "date-time" - }, - "owner-tag": { - "type": "string" - }, - "revisions": { - "type": "array", - "items": { - "$ref": "#/definitions/SecretRevision" - } - }, - "rotate-policy": { - "type": "string" - }, - "update-time": { - "type": "string", - "format": "date-time" - }, - "uri": { - "type": "string" - }, - "value": { - "$ref": "#/definitions/SecretValueResult" - }, - "version": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "uri", - "version", - "owner-tag", - "latest-revision", - "create-time", - "update-time", - "revisions" - ] - }, - "ListSecretResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ListSecretResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] - }, - "SecretBackendArgs": { - "type": "object", - "properties": { - "backend-ids": { - "type": "array", - "items": { - "type": "string" - } - }, - "for-drain": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "for-drain", - "backend-ids" - ] - }, - "SecretBackendConfig": { - "type": "object", - "properties": { - "params": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type" - ] - }, - "SecretBackendConfigResult": { - "type": "object", - "properties": { - "config": { - "$ref": "#/definitions/SecretBackendConfig" - }, - "draining": { - "type": "boolean" - }, - "model-controller": { - "type": "string" - }, - "model-name": { - "type": "string" - }, - "model-uuid": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "model-controller", - "model-uuid", - "model-name", - "draining" - ] - }, - "SecretBackendConfigResults": { - "type": "object", - "properties": { - "active-id": { - "type": "string" - }, - "results": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/SecretBackendConfigResult" - } - } - } - }, - "additionalProperties": false, - "required": [ - "active-id" - ] - }, - "SecretContentParams": { - "type": "object", - "properties": { - "data": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "value-ref": { - "$ref": "#/definitions/SecretValueRef" - } - }, - "additionalProperties": false - }, - "SecretContentResult": { - "type": "object", - "properties": { - "backend-config": { - "$ref": "#/definitions/SecretBackendConfigResult" - }, - "content": { - "$ref": "#/definitions/SecretContentParams" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "latest-revision": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "content" - ] - }, - "SecretContentResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/SecretContentResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "SecretRevision": { - "type": "object", - "properties": { - "backend-name": { - "type": "string" - }, - "create-time": { - "type": "string", - "format": "date-time" - }, - "expire-time": { - "type": "string", - "format": "date-time" - }, - "revision": { - "type": "integer" - }, - "update-time": { - "type": "string", - "format": "date-time" - }, - "value-ref": { - "$ref": "#/definitions/SecretValueRef" - } - }, - "additionalProperties": false, - "required": [ - "revision" - ] - }, - "SecretRevisionArg": { - "type": "object", - "properties": { - "pending-delete": { - "type": "boolean" - }, - "revisions": { - "type": "array", - "items": { - "type": "integer" - } - }, - "uri": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "uri", - "revisions", - "pending-delete" - ] - }, - "SecretValueRef": { - "type": "object", - "properties": { - "backend-id": { - "type": "string" - }, - "revision-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "backend-id", - "revision-id" - ] - }, - "SecretValueResult": { - "type": "object", - "properties": { - "data": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - } - } - } - }, - { - "Name": "UserSecretsManager", - "Description": "UserSecretsManager is the implementation for the usersecrets facade.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent" - ], - "Schema": { - "type": "object", - "properties": { - "DeleteRevisions": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/DeleteSecretArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "DeleteRevisions deletes the specified revisions of the specified secret." - }, - "WatchRevisionsToPrune": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsWatchResult" - } - }, - "description": "WatchRevisionsToPrune returns a watcher for notifying when:\n - a secret revision owned by the model no longer\n has any consumers and should be pruned." - } - }, - "definitions": { - "DeleteSecretArg": { - "type": "object", - "properties": { - "label": { - "type": "string" - }, - "revisions": { - "type": "array", - "items": { - "type": "integer" - } - }, - "uri": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "uri", - "label" - ] - }, - "DeleteSecretArgs": { - "type": "object", - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/DeleteSecretArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "StringsWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "type": "string" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id" - ] - } - } - } - }, - { - "Name": "VolumeAttachmentPlansWatcher", - "Description": "srvMachineStorageIdsWatcher defines the API wrapping a state.StringsWatcher\nwatching machine/storage attachments. This watcher notifies about storage\nentities (volumes/filesystems) being attached to and detached from machines.\n\nTODO(axw) state needs a new watcher, this is a bt of a hack. State watchers\ncould do with some deduplication of logic, and I don't want to add to that\nspaghetti right now.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "Next": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/MachineStorageIdsWatchResult" - } - }, - "description": "Next returns when a change has occurred to an entity of the\ncollection being watched since the most recent call to Next\nor the Watch call that created the srvMachineStorageIdsWatcher." - }, - "Stop": { - "type": "object", - "description": "Stop stops the watcher." - } - }, - "definitions": { - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "MachineStorageId": { - "type": "object", - "properties": { - "attachment-tag": { - "type": "string" - }, - "machine-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "machine-tag", - "attachment-tag" - ] - }, - "MachineStorageIdsWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "$ref": "#/definitions/MachineStorageId" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id", - "changes" - ] - } - } - } - }, - { - "Name": "VolumeAttachmentsWatcher", - "Description": "srvMachineStorageIdsWatcher defines the API wrapping a state.StringsWatcher\nwatching machine/storage attachments. This watcher notifies about storage\nentities (volumes/filesystems) being attached to and detached from machines.\n\nTODO(axw) state needs a new watcher, this is a bt of a hack. State watchers\ncould do with some deduplication of logic, and I don't want to add to that\nspaghetti right now.", - "Version": 2, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "Next": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/MachineStorageIdsWatchResult" - } - }, - "description": "Next returns when a change has occurred to an entity of the\ncollection being watched since the most recent call to Next\nor the Watch call that created the srvMachineStorageIdsWatcher." - }, - "Stop": { - "type": "object", - "description": "Stop stops the watcher." - } - }, - "definitions": { - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] - }, - "MachineStorageId": { - "type": "object", - "properties": { - "attachment-tag": { - "type": "string" - }, - "machine-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "machine-tag", - "attachment-tag" - ] - }, - "MachineStorageIdsWatchResult": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "$ref": "#/definitions/MachineStorageId" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "watcher-id", - "changes" - ] - } - } - } - } -] \ No newline at end of file diff --git a/juju/client/schemas-juju-3.3.6.json b/juju/client/schemas-juju-3.3.6.json new file mode 100644 index 00000000..88e8102d --- /dev/null +++ b/juju/client/schemas-juju-3.3.6.json @@ -0,0 +1,18230 @@ +[ + { + "Name": "Action", + "Description": "APIv7 provides the Action API facade for version 7.", + "Version": 7, + "AvailableTo": [ + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "Actions": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ActionResults" + } + }, + "description": "Actions takes a list of ActionTags, and returns the full Action for\neach ID." + }, + "ApplicationsCharmsActions": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ApplicationsCharmActionsResults" + } + }, + "description": "ApplicationsCharmsActions returns a slice of charm Actions for a slice of\nservices." + }, + "Cancel": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ActionResults" + } + }, + "description": "Cancel attempts to cancel enqueued Actions from running." + }, + "EnqueueOperation": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Actions" + }, + "Result": { + "$ref": "#/definitions/EnqueuedActions" + } + }, + "description": "EnqueueOperation takes a list of Actions and queues them up to be executed as\nan operation, each action running as a task on the designated ActionReceiver.\nWe return the ID of the overall operation and each individual task." + }, + "ListOperations": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/OperationQueryArgs" + }, + "Result": { + "$ref": "#/definitions/OperationResults" + } + }, + "description": "ListOperations fetches the called actions for specified apps/units." + }, + "Operations": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/OperationResults" + } + }, + "description": "Operations fetches the specified operation ids." + }, + "Run": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/RunParams" + }, + "Result": { + "$ref": "#/definitions/EnqueuedActions" + } + }, + "description": "Run the commands specified on the machines identified through the\nlist of machines, units and services." + }, + "RunOnAllMachines": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/RunParams" + }, + "Result": { + "$ref": "#/definitions/EnqueuedActions" + } + }, + "description": "RunOnAllMachines attempts to run the specified command on all the machines." + }, + "WatchActionsProgress": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/StringsWatchResults" + } + }, + "description": "WatchActionsProgress creates a watcher that reports on action log messages." + } + }, + "definitions": { + "Action": { + "type": "object", + "properties": { + "execution-group": { + "type": "string" + }, + "name": { + "type": "string" + }, + "parallel": { + "type": "boolean" + }, + "parameters": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "receiver": { + "type": "string" + }, + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag", + "receiver", + "name" + ] + }, + "ActionMessage": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + } + }, + "additionalProperties": false, + "required": [ + "timestamp", + "message" + ] + }, + "ActionResult": { + "type": "object", + "properties": { + "action": { + "$ref": "#/definitions/Action" + }, + "completed": { + "type": "string", + "format": "date-time" + }, + "enqueued": { + "type": "string", + "format": "date-time" + }, + "error": { + "$ref": "#/definitions/Error" + }, + "log": { + "type": "array", + "items": { + "$ref": "#/definitions/ActionMessage" + } + }, + "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 + }, + "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" + } + } + }, + "additionalProperties": false + }, + "ApplicationCharmActionsResult": { + "type": "object", + "properties": { + "actions": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/ActionSpec" + } + } + }, + "application-tag": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ApplicationsCharmActionsResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ApplicationCharmActionsResult" + } + } + }, + "additionalProperties": false + }, + "EnqueuedActions": { + "type": "object", + "properties": { + "actions": { + "type": "array", + "items": { + "$ref": "#/definitions/ActionResult" + } + }, + "operation": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "operation" + ] + }, + "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": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "OperationQueryArgs": { + "type": "object", + "properties": { + "actions": { + "type": "array", + "items": { + "type": "string" + } + }, + "applications": { + "type": "array", + "items": { + "type": "string" + } + }, + "limit": { + "type": "integer" + }, + "machines": { + "type": "array", + "items": { + "type": "string" + } + }, + "offset": { + "type": "integer" + }, + "status": { + "type": "array", + "items": { + "type": "string" + } + }, + "units": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "OperationResult": { + "type": "object", + "properties": { + "actions": { + "type": "array", + "items": { + "$ref": "#/definitions/ActionResult" + } + }, + "completed": { + "type": "string", + "format": "date-time" + }, + "enqueued": { + "type": "string", + "format": "date-time" + }, + "error": { + "$ref": "#/definitions/Error" + }, + "fail": { + "type": "string" + }, + "operation": { + "type": "string" + }, + "started": { + "type": "string", + "format": "date-time" + }, + "status": { + "type": "string" + }, + "summary": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "operation", + "summary" + ] + }, + "OperationResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/OperationResult" + } + }, + "truncated": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "RunParams": { + "type": "object", + "properties": { + "applications": { + "type": "array", + "items": { + "type": "string" + } + }, + "commands": { + "type": "string" + }, + "execution-group": { + "type": "string" + }, + "machines": { + "type": "array", + "items": { + "type": "string" + } + }, + "parallel": { + "type": "boolean" + }, + "timeout": { + "type": "integer" + }, + "units": { + "type": "array", + "items": { + "type": "string" + } + }, + "workload-context": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "commands", + "timeout" + ] + }, + "StringsWatchResult": { + "type": "object", + "properties": { + "changes": { + "type": "array", + "items": { + "type": "string" + } + }, + "error": { + "$ref": "#/definitions/Error" + }, + "watcher-id": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "watcher-id" + ] + }, + "StringsWatchResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/StringsWatchResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + } + } + } + }, + { + "Name": "Admin", + "Description": "admin is the only object that unlogged-in clients can access. It holds any\nmethods that are needed to log in.", + "Version": 3, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "controller-user", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "Login": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/LoginRequest" + }, + "Result": { + "$ref": "#/definitions/LoginResult" + } + }, + "description": "Login logs in with the provided credentials. All subsequent requests on the\nconnection will act as the authenticated user." + }, + "RedirectInfo": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/RedirectInfoResult" + } + }, + "description": "RedirectInfo returns redirected host information for the model.\nIn Juju it always returns an error because the Juju controller\ndoes not multiplex controllers." + } + }, + "definitions": { + "Address": { + "type": "object", + "properties": { + "cidr": { + "type": "string" + }, + "config-type": { + "type": "string" + }, + "is-secondary": { + "type": "boolean" + }, + "scope": { + "type": "string" + }, + "space-id": { + "type": "string" + }, + "space-name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "value", + "type", + "scope" + ] + }, + "AuthUserInfo": { + "type": "object", + "properties": { + "controller-access": { + "type": "string" + }, + "credentials": { + "type": "string" + }, + "display-name": { + "type": "string" + }, + "identity": { + "type": "string" + }, + "last-connection": { + "type": "string", + "format": "date-time" + }, + "model-access": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "display-name", + "identity", + "controller-access", + "model-access" + ] + }, + "FacadeVersions": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "versions": { + "type": "array", + "items": { + "type": "integer" + } + } + }, + "additionalProperties": false, + "required": [ + "name", + "versions" + ] + }, + "HostPort": { + "type": "object", + "properties": { + "Address": { + "$ref": "#/definitions/Address" + }, + "cidr": { + "type": "string" + }, + "config-type": { + "type": "string" + }, + "is-secondary": { + "type": "boolean" + }, + "port": { + "type": "integer" + }, + "scope": { + "type": "string" + }, + "space-id": { + "type": "string" + }, + "space-name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "value", + "type", + "scope", + "Address", + "port" + ] + }, + "LoginRequest": { + "type": "object", + "properties": { + "auth-tag": { + "type": "string" + }, + "bakery-version": { + "type": "integer" + }, + "cli-args": { + "type": "string" + }, + "client-version": { + "type": "string" + }, + "credentials": { + "type": "string" + }, + "macaroons": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/Macaroon" + } + } + }, + "nonce": { + "type": "string" + }, + "token": { + "type": "string" + }, + "user-data": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "auth-tag", + "credentials", + "nonce", + "macaroons", + "user-data" + ] + }, + "LoginResult": { + "type": "object", + "properties": { + "bakery-discharge-required": { + "$ref": "#/definitions/Macaroon" + }, + "controller-tag": { + "type": "string" + }, + "discharge-required": { + "$ref": "#/definitions/Macaroon" + }, + "discharge-required-error": { + "type": "string" + }, + "facades": { + "type": "array", + "items": { + "$ref": "#/definitions/FacadeVersions" + } + }, + "model-tag": { + "type": "string" + }, + "public-dns-name": { + "type": "string" + }, + "server-version": { + "type": "string" + }, + "servers": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/HostPort" + } + } + }, + "user-info": { + "$ref": "#/definitions/AuthUserInfo" + } + }, + "additionalProperties": false + }, + "Macaroon": { + "type": "object", + "additionalProperties": false + }, + "RedirectInfoResult": { + "type": "object", + "properties": { + "ca-cert": { + "type": "string" + }, + "servers": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/HostPort" + } + } + } + }, + "additionalProperties": false, + "required": [ + "servers", + "ca-cert" + ] + } + } + } + }, + { + "Name": "AllModelWatcher", + "Description": "SrvAllWatcher defines the API methods on a state.Multiwatcher.\nwhich watches any changes to the state. Each client has its own\ncurrent set of watchers, stored in resources. It is used by both\nthe AllWatcher and AllModelWatcher facades.", + "Version": 4, + "AvailableTo": [ + "controller-user" + ], + "Schema": { + "type": "object", + "properties": { + "Next": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/AllWatcherNextResults" + } + }, + "description": "Next will return the current state of everything on the first call\nand subsequent calls will" + }, + "Stop": { + "type": "object", + "description": "Stop stops the watcher." + } + }, + "definitions": { + "AllWatcherNextResults": { + "type": "object", + "properties": { + "deltas": { + "type": "array", + "items": { + "$ref": "#/definitions/Delta" + } + } + }, + "additionalProperties": false, + "required": [ + "deltas" + ] + }, + "Delta": { + "type": "object", + "properties": { + "entity": { + "type": "object", + "additionalProperties": true + }, + "removed": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "removed", + "entity" + ] + } + } + } + }, + { + "Name": "AllWatcher", + "Description": "SrvAllWatcher defines the API methods on a state.Multiwatcher.\nwhich watches any changes to the state. Each client has its own\ncurrent set of watchers, stored in resources. It is used by both\nthe AllWatcher and AllModelWatcher facades.", + "Version": 3, + "AvailableTo": [ + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "Next": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/AllWatcherNextResults" + } + }, + "description": "Next will return the current state of everything on the first call\nand subsequent calls will" + }, + "Stop": { + "type": "object", + "description": "Stop stops the watcher." + } + }, + "definitions": { + "AllWatcherNextResults": { + "type": "object", + "properties": { + "deltas": { + "type": "array", + "items": { + "$ref": "#/definitions/Delta" + } + } + }, + "additionalProperties": false, + "required": [ + "deltas" + ] + }, + "Delta": { + "type": "object", + "properties": { + "entity": { + "type": "object", + "additionalProperties": true + }, + "removed": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "removed", + "entity" + ] + } + } + } + }, + { + "Name": "Annotations", + "Description": "API implements the service interface and is the concrete\nimplementation of the api end point.", + "Version": 2, + "AvailableTo": [ + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "Get": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/AnnotationsGetResults" + } + }, + "description": "Get returns annotations for given entities.\nIf annotations cannot be retrieved for a given entity, an error is returned.\nEach entity is treated independently and, hence, will fail or succeed independently." + }, + "Set": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/AnnotationsSet" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "Set stores annotations for given entities" + } + }, + "definitions": { + "AnnotationsGetResult": { + "type": "object", + "properties": { + "annotations": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "entity": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/ErrorResult" + } + }, + "additionalProperties": false, + "required": [ + "entity", + "annotations" + ] + }, + "AnnotationsGetResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/AnnotationsGetResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "AnnotationsSet": { + "type": "object", + "properties": { + "annotations": { + "type": "array", + "items": { + "$ref": "#/definitions/EntityAnnotations" + } + } + }, + "additionalProperties": false, + "required": [ + "annotations" + ] + }, + "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" + ] + }, + "EntityAnnotations": { + "type": "object", + "properties": { + "annotations": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "entity": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "entity", + "annotations" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ErrorResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + } + } + } + }, + { + "Name": "Application", + "Description": "APIv19 provides the Application API facade for version 19.", + "Version": 19, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "AddRelation": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/AddRelation" + }, + "Result": { + "$ref": "#/definitions/AddRelationResults" + } + }, + "description": "AddRelation adds a relation between the specified endpoints and returns the relation info." + }, + "AddUnits": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/AddApplicationUnits" + }, + "Result": { + "$ref": "#/definitions/AddApplicationUnitsResults" + } + }, + "description": "AddUnits adds a given number of units to an application." + }, + "ApplicationsInfo": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ApplicationInfoResults" + } + }, + "description": "ApplicationsInfo returns applications information." + }, + "CharmConfig": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ApplicationGetArgs" + }, + "Result": { + "$ref": "#/definitions/ApplicationGetConfigResults" + } + }, + "description": "CharmConfig returns charm config for the input list of applications and\nmodel generations." + }, + "CharmRelations": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ApplicationCharmRelations" + }, + "Result": { + "$ref": "#/definitions/ApplicationCharmRelationsResults" + } + }, + "description": "CharmRelations implements the server side of Application.CharmRelations." + }, + "Consume": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ConsumeApplicationArgs" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "Consume adds remote applications to the model without creating any\nrelations." + }, + "Deploy": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ApplicationsDeploy" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "Deploy fetches the charms from the charm store and deploys them\nusing the specified placement directives." + }, + "DeployFromRepository": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/DeployFromRepositoryArgs" + }, + "Result": { + "$ref": "#/definitions/DeployFromRepositoryResults" + } + }, + "description": "DeployFromRepository is a one-stop deployment method for repository\ncharms. Only a charm name is required to deploy. If argument validation\nfails, a list of all errors found in validation will be returned. If a\nlocal resource is provided, details required for uploading the validated\nresource will be returned." + }, + "DestroyApplication": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/DestroyApplicationsParams" + }, + "Result": { + "$ref": "#/definitions/DestroyApplicationResults" + } + }, + "description": "DestroyApplication removes a given set of applications." + }, + "DestroyConsumedApplications": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/DestroyConsumedApplicationsParams" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "DestroyConsumedApplications removes a given set of consumed (remote) applications." + }, + "DestroyRelation": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/DestroyRelation" + } + }, + "description": "DestroyRelation removes the relation between the\nspecified endpoints or an id." + }, + "DestroyUnit": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/DestroyUnitsParams" + }, + "Result": { + "$ref": "#/definitions/DestroyUnitResults" + } + }, + "description": "DestroyUnit removes a given set of application units." + }, + "Expose": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ApplicationExpose" + } + }, + "description": "Expose changes the juju-managed firewall to expose any ports that\nwere also explicitly marked by units as open." + }, + "Get": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ApplicationGet" + }, + "Result": { + "$ref": "#/definitions/ApplicationGetResults" + } + }, + "description": "Get returns the charm configuration for an application." + }, + "GetCharmURLOrigin": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ApplicationGet" + }, + "Result": { + "$ref": "#/definitions/CharmURLOriginResult" + } + }, + "description": "GetCharmURLOrigin returns the charm URL and charm origin the given\napplication is running at present." + }, + "GetConfig": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ApplicationGetConfigResults" + } + }, + "description": "GetConfig returns the charm config for each of the input applications." + }, + "GetConstraints": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ApplicationGetConstraintsResults" + } + }, + "description": "GetConstraints returns the constraints for a given application." + }, + "Leader": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entity" + }, + "Result": { + "$ref": "#/definitions/StringResult" + } + }, + "description": "Leader returns the unit name of the leader for the given application." + }, + "MergeBindings": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ApplicationMergeBindingsArgs" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "MergeBindings merges operator-defined bindings with the current bindings for\none or more applications." + }, + "ResolveUnitErrors": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/UnitsResolved" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "ResolveUnitErrors marks errors on the specified units as resolved." + }, + "ScaleApplications": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ScaleApplicationsParams" + }, + "Result": { + "$ref": "#/definitions/ScaleApplicationResults" + } + }, + "description": "ScaleApplications scales the specified application to the requested number of units." + }, + "SetCharm": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ApplicationSetCharm" + } + }, + "description": "SetCharm sets the charm for a given for the application." + }, + "SetConfigs": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ConfigSetArgs" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "SetConfigs implements the server side of Application.SetConfig. Both\napplication and charm config are set. It does not unset values in\nConfig map that are set to an empty string. Unset should be used for that." + }, + "SetConstraints": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/SetConstraints" + } + }, + "description": "SetConstraints sets the constraints for a given application." + }, + "SetMetricCredentials": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ApplicationMetricCredentials" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "SetMetricCredentials sets credentials on the application.\nTODO (cderici) only used for metered charms in cmd MeteredDeployAPI,\nkept for client compatibility, remove in juju 4.0" + }, + "SetRelationsSuspended": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/RelationSuspendedArgs" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "SetRelationsSuspended sets the suspended status of the specified relations." + }, + "Unexpose": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ApplicationUnexpose" + } + }, + "description": "Unexpose changes the juju-managed firewall to unexpose any ports that\nwere also explicitly marked by units as open." + }, + "UnitsInfo": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/UnitInfoResults" + } + }, + "description": "UnitsInfo returns unit information for the given entities (units or\napplications)." + }, + "UnsetApplicationsConfig": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ApplicationConfigUnsetArgs" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "UnsetApplicationsConfig implements the server side of Application.UnsetApplicationsConfig." + }, + "UpdateApplicationBase": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/UpdateChannelArgs" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "UpdateApplicationBase updates the application base.\nBase for subordinates is updated too." + } + }, + "definitions": { + "AddApplicationUnits": { + "type": "object", + "properties": { + "application": { + "type": "string" + }, + "attach-storage": { + "type": "array", + "items": { + "type": "string" + } + }, + "num-units": { + "type": "integer" + }, + "placement": { + "type": "array", + "items": { + "$ref": "#/definitions/Placement" + } + }, + "policy": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "application", + "num-units", + "placement" + ] + }, + "AddApplicationUnitsResults": { + "type": "object", + "properties": { + "units": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "units" + ] + }, + "AddRelation": { + "type": "object", + "properties": { + "endpoints": { + "type": "array", + "items": { + "type": "string" + } + }, + "via-cidrs": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "endpoints" + ] + }, + "AddRelationResults": { + "type": "object", + "properties": { + "endpoints": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmRelation" + } + } + } + }, + "additionalProperties": false, + "required": [ + "endpoints" + ] + }, + "ApplicationCharmRelations": { + "type": "object", + "properties": { + "application": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "application" + ] + }, + "ApplicationCharmRelationsResults": { + "type": "object", + "properties": { + "charm-relations": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "charm-relations" + ] + }, + "ApplicationConfigUnsetArgs": { + "type": "object", + "properties": { + "Args": { + "type": "array", + "items": { + "$ref": "#/definitions/ApplicationUnset" + } + } + }, + "additionalProperties": false, + "required": [ + "Args" + ] + }, + "ApplicationConstraint": { + "type": "object", + "properties": { + "constraints": { + "$ref": "#/definitions/Value" + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "constraints" + ] + }, + "ApplicationDeploy": { + "type": "object", + "properties": { + "Force": { + "type": "boolean" + }, + "application": { + "type": "string" + }, + "attach-storage": { + "type": "array", + "items": { + "type": "string" + } + }, + "channel": { + "type": "string" + }, + "charm-origin": { + "$ref": "#/definitions/CharmOrigin" + }, + "charm-url": { + "type": "string" + }, + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "config-yaml": { + "type": "string" + }, + "constraints": { + "$ref": "#/definitions/Value" + }, + "devices": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/Constraints" + } + } + }, + "endpoint-bindings": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "num-units": { + "type": "integer" + }, + "placement": { + "type": "array", + "items": { + "$ref": "#/definitions/Placement" + } + }, + "policy": { + "type": "string" + }, + "resources": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "storage": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/Constraints" + } + } + } + }, + "additionalProperties": false, + "required": [ + "application", + "charm-url", + "channel", + "num-units", + "config-yaml", + "constraints", + "Force" + ] + }, + "ApplicationExpose": { + "type": "object", + "properties": { + "application": { + "type": "string" + }, + "exposed-endpoints": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/ExposedEndpoint" + } + } + } + }, + "additionalProperties": false, + "required": [ + "application" + ] + }, + "ApplicationGet": { + "type": "object", + "properties": { + "application": { + "type": "string" + }, + "branch": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "application", + "branch" + ] + }, + "ApplicationGetArgs": { + "type": "object", + "properties": { + "args": { + "type": "array", + "items": { + "$ref": "#/definitions/ApplicationGet" + } + } + }, + "additionalProperties": false, + "required": [ + "args" + ] + }, + "ApplicationGetConfigResults": { + "type": "object", + "properties": { + "Results": { + "type": "array", + "items": { + "$ref": "#/definitions/ConfigResult" + } + } + }, + "additionalProperties": false, + "required": [ + "Results" + ] + }, + "ApplicationGetConstraintsResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ApplicationConstraint" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "ApplicationGetResults": { + "type": "object", + "properties": { + "application": { + "type": "string" + }, + "application-config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "base": { + "$ref": "#/definitions/Base" + }, + "channel": { + "type": "string" + }, + "charm": { + "type": "string" + }, + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "constraints": { + "$ref": "#/definitions/Value" + }, + "endpoint-bindings": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + } + }, + "additionalProperties": false, + "required": [ + "application", + "charm", + "config", + "constraints", + "base", + "channel" + ] + }, + "ApplicationInfoResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "$ref": "#/definitions/ApplicationResult" + } + }, + "additionalProperties": false + }, + "ApplicationInfoResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ApplicationInfoResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "ApplicationMergeBindings": { + "type": "object", + "properties": { + "application-tag": { + "type": "string" + }, + "bindings": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "force": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "application-tag", + "bindings", + "force" + ] + }, + "ApplicationMergeBindingsArgs": { + "type": "object", + "properties": { + "args": { + "type": "array", + "items": { + "$ref": "#/definitions/ApplicationMergeBindings" + } + } + }, + "additionalProperties": false, + "required": [ + "args" + ] + }, + "ApplicationMetricCredential": { + "type": "object", + "properties": { + "application": { + "type": "string" + }, + "metrics-credentials": { + "type": "array", + "items": { + "type": "integer" + } + } + }, + "additionalProperties": false, + "required": [ + "application", + "metrics-credentials" + ] + }, + "ApplicationMetricCredentials": { + "type": "object", + "properties": { + "creds": { + "type": "array", + "items": { + "$ref": "#/definitions/ApplicationMetricCredential" + } + } + }, + "additionalProperties": false, + "required": [ + "creds" + ] + }, + "ApplicationOfferDetails": { + "type": "object", + "properties": { + "application-description": { + "type": "string" + }, + "bindings": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "endpoints": { + "type": "array", + "items": { + "$ref": "#/definitions/RemoteEndpoint" + } + }, + "offer-name": { + "type": "string" + }, + "offer-url": { + "type": "string" + }, + "offer-uuid": { + "type": "string" + }, + "source-model-tag": { + "type": "string" + }, + "spaces": { + "type": "array", + "items": { + "$ref": "#/definitions/RemoteSpace" + } + }, + "users": { + "type": "array", + "items": { + "$ref": "#/definitions/OfferUserDetails" + } + } + }, + "additionalProperties": false, + "required": [ + "source-model-tag", + "offer-uuid", + "offer-url", + "offer-name", + "application-description" + ] + }, + "ApplicationResult": { + "type": "object", + "properties": { + "base": { + "$ref": "#/definitions/Base" + }, + "channel": { + "type": "string" + }, + "charm": { + "type": "string" + }, + "constraints": { + "$ref": "#/definitions/Value" + }, + "endpoint-bindings": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "exposed": { + "type": "boolean" + }, + "exposed-endpoints": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/ExposedEndpoint" + } + } + }, + "life": { + "type": "string" + }, + "principal": { + "type": "boolean" + }, + "remote": { + "type": "boolean" + }, + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag", + "principal", + "exposed", + "remote", + "life" + ] + }, + "ApplicationSetCharm": { + "type": "object", + "properties": { + "application": { + "type": "string" + }, + "channel": { + "type": "string" + }, + "charm-origin": { + "$ref": "#/definitions/CharmOrigin" + }, + "charm-url": { + "type": "string" + }, + "config-settings": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "config-settings-yaml": { + "type": "string" + }, + "endpoint-bindings": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "force": { + "type": "boolean" + }, + "force-base": { + "type": "boolean" + }, + "force-units": { + "type": "boolean" + }, + "generation": { + "type": "string" + }, + "resource-ids": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "storage-constraints": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/StorageConstraints" + } + } + } + }, + "additionalProperties": false, + "required": [ + "application", + "generation", + "charm-url", + "channel", + "force", + "force-units", + "force-base" + ] + }, + "ApplicationUnexpose": { + "type": "object", + "properties": { + "application": { + "type": "string" + }, + "exposed-endpoints": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "application", + "exposed-endpoints" + ] + }, + "ApplicationUnset": { + "type": "object", + "properties": { + "application": { + "type": "string" + }, + "branch": { + "type": "string" + }, + "options": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "application", + "branch", + "options" + ] + }, + "ApplicationsDeploy": { + "type": "object", + "properties": { + "applications": { + "type": "array", + "items": { + "$ref": "#/definitions/ApplicationDeploy" + } + } + }, + "additionalProperties": false, + "required": [ + "applications" + ] + }, + "Base": { + "type": "object", + "properties": { + "channel": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "channel" + ] + }, + "CharmOrigin": { + "type": "object", + "properties": { + "architecture": { + "type": "string" + }, + "base": { + "$ref": "#/definitions/Base" + }, + "branch": { + "type": "string" + }, + "hash": { + "type": "string" + }, + "id": { + "type": "string" + }, + "instance-key": { + "type": "string" + }, + "revision": { + "type": "integer" + }, + "risk": { + "type": "string" + }, + "source": { + "type": "string" + }, + "track": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "source", + "type", + "id" + ] + }, + "CharmRelation": { + "type": "object", + "properties": { + "interface": { + "type": "string" + }, + "limit": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "optional": { + "type": "boolean" + }, + "role": { + "type": "string" + }, + "scope": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "role", + "interface", + "optional", + "limit", + "scope" + ] + }, + "CharmURLOriginResult": { + "type": "object", + "properties": { + "charm-origin": { + "$ref": "#/definitions/CharmOrigin" + }, + "error": { + "$ref": "#/definitions/Error" + }, + "url": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "url", + "charm-origin" + ] + }, + "ConfigResult": { + "type": "object", + "properties": { + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "config" + ] + }, + "ConfigSet": { + "type": "object", + "properties": { + "application": { + "type": "string" + }, + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "config-yaml": { + "type": "string" + }, + "generation": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "application", + "generation", + "config", + "config-yaml" + ] + }, + "ConfigSetArgs": { + "type": "object", + "properties": { + "Args": { + "type": "array", + "items": { + "$ref": "#/definitions/ConfigSet" + } + } + }, + "additionalProperties": false, + "required": [ + "Args" + ] + }, + "Constraints": { + "type": "object", + "properties": { + "Count": { + "type": "integer" + }, + "Pool": { + "type": "string" + }, + "Size": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "Pool", + "Size", + "Count" + ] + }, + "ConsumeApplicationArg": { + "type": "object", + "properties": { + "ApplicationOfferDetails": { + "$ref": "#/definitions/ApplicationOfferDetails" + }, + "application-alias": { + "type": "string" + }, + "application-description": { + "type": "string" + }, + "bindings": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "endpoints": { + "type": "array", + "items": { + "$ref": "#/definitions/RemoteEndpoint" + } + }, + "external-controller": { + "$ref": "#/definitions/ExternalControllerInfo" + }, + "macaroon": { + "$ref": "#/definitions/Macaroon" + }, + "offer-name": { + "type": "string" + }, + "offer-url": { + "type": "string" + }, + "offer-uuid": { + "type": "string" + }, + "source-model-tag": { + "type": "string" + }, + "spaces": { + "type": "array", + "items": { + "$ref": "#/definitions/RemoteSpace" + } + }, + "users": { + "type": "array", + "items": { + "$ref": "#/definitions/OfferUserDetails" + } + } + }, + "additionalProperties": false, + "required": [ + "source-model-tag", + "offer-uuid", + "offer-url", + "offer-name", + "application-description", + "ApplicationOfferDetails" + ] + }, + "ConsumeApplicationArgs": { + "type": "object", + "properties": { + "args": { + "type": "array", + "items": { + "$ref": "#/definitions/ConsumeApplicationArg" + } + } + }, + "additionalProperties": false + }, + "DeployFromRepositoryArg": { + "type": "object", + "properties": { + "ApplicationName": { + "type": "string" + }, + "AttachStorage": { + "type": "array", + "items": { + "type": "string" + } + }, + "CharmName": { + "type": "string" + }, + "ConfigYAML": { + "type": "string" + }, + "Cons": { + "$ref": "#/definitions/Value" + }, + "Devices": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/Constraints" + } + } + }, + "DryRun": { + "type": "boolean" + }, + "Placement": { + "type": "array", + "items": { + "$ref": "#/definitions/Placement" + } + }, + "Storage": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/Constraints" + } + } + }, + "Trust": { + "type": "boolean" + }, + "base": { + "$ref": "#/definitions/Base" + }, + "channel": { + "type": "string" + }, + "endpoint-bindings": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "force": { + "type": "boolean" + }, + "num-units": { + "type": "integer" + }, + "resources": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "revision": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "CharmName", + "ApplicationName", + "AttachStorage", + "ConfigYAML", + "Cons", + "Devices", + "DryRun", + "Placement", + "Storage", + "Trust" + ] + }, + "DeployFromRepositoryArgs": { + "type": "object", + "properties": { + "Args": { + "type": "array", + "items": { + "$ref": "#/definitions/DeployFromRepositoryArg" + } + } + }, + "additionalProperties": false, + "required": [ + "Args" + ] + }, + "DeployFromRepositoryInfo": { + "type": "object", + "properties": { + "architecture": { + "type": "string" + }, + "base": { + "$ref": "#/definitions/Base" + }, + "channel": { + "type": "string" + }, + "effective-channel": { + "type": "string" + }, + "name": { + "type": "string" + }, + "revision": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "architecture", + "channel", + "name", + "revision" + ] + }, + "DeployFromRepositoryResult": { + "type": "object", + "properties": { + "Errors": { + "type": "array", + "items": { + "$ref": "#/definitions/Error" + } + }, + "Info": { + "$ref": "#/definitions/DeployFromRepositoryInfo" + }, + "PendingResourceUploads": { + "type": "array", + "items": { + "$ref": "#/definitions/PendingResourceUpload" + } + } + }, + "additionalProperties": false, + "required": [ + "Errors", + "Info", + "PendingResourceUploads" + ] + }, + "DeployFromRepositoryResults": { + "type": "object", + "properties": { + "Results": { + "type": "array", + "items": { + "$ref": "#/definitions/DeployFromRepositoryResult" + } + } + }, + "additionalProperties": false, + "required": [ + "Results" + ] + }, + "DestroyApplicationInfo": { + "type": "object", + "properties": { + "destroyed-storage": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + }, + "destroyed-units": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + }, + "detached-storage": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + } + }, + "additionalProperties": false + }, + "DestroyApplicationParams": { + "type": "object", + "properties": { + "application-tag": { + "type": "string" + }, + "destroy-storage": { + "type": "boolean" + }, + "dry-run": { + "type": "boolean" + }, + "force": { + "type": "boolean" + }, + "max-wait": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "application-tag", + "force" + ] + }, + "DestroyApplicationResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "info": { + "$ref": "#/definitions/DestroyApplicationInfo" + } + }, + "additionalProperties": false + }, + "DestroyApplicationResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/DestroyApplicationResult" + } + } + }, + "additionalProperties": false + }, + "DestroyApplicationsParams": { + "type": "object", + "properties": { + "applications": { + "type": "array", + "items": { + "$ref": "#/definitions/DestroyApplicationParams" + } + } + }, + "additionalProperties": false, + "required": [ + "applications" + ] + }, + "DestroyConsumedApplicationParams": { + "type": "object", + "properties": { + "application-tag": { + "type": "string" + }, + "force": { + "type": "boolean" + }, + "max-wait": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "application-tag" + ] + }, + "DestroyConsumedApplicationsParams": { + "type": "object", + "properties": { + "applications": { + "type": "array", + "items": { + "$ref": "#/definitions/DestroyConsumedApplicationParams" + } + } + }, + "additionalProperties": false, + "required": [ + "applications" + ] + }, + "DestroyRelation": { + "type": "object", + "properties": { + "endpoints": { + "type": "array", + "items": { + "type": "string" + } + }, + "force": { + "type": "boolean" + }, + "max-wait": { + "type": "integer" + }, + "relation-id": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "relation-id" + ] + }, + "DestroyUnitInfo": { + "type": "object", + "properties": { + "destroyed-storage": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + }, + "detached-storage": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + } + }, + "additionalProperties": false + }, + "DestroyUnitParams": { + "type": "object", + "properties": { + "destroy-storage": { + "type": "boolean" + }, + "dry-run": { + "type": "boolean" + }, + "force": { + "type": "boolean" + }, + "max-wait": { + "type": "integer" + }, + "unit-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "unit-tag" + ] + }, + "DestroyUnitResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "info": { + "$ref": "#/definitions/DestroyUnitInfo" + } + }, + "additionalProperties": false + }, + "DestroyUnitResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/DestroyUnitResult" + } + } + }, + "additionalProperties": false + }, + "DestroyUnitsParams": { + "type": "object", + "properties": { + "units": { + "type": "array", + "items": { + "$ref": "#/definitions/DestroyUnitParams" + } + } + }, + "additionalProperties": false, + "required": [ + "units" + ] + }, + "EndpointRelationData": { + "type": "object", + "properties": { + "ApplicationData": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "cross-model": { + "type": "boolean" + }, + "endpoint": { + "type": "string" + }, + "related-endpoint": { + "type": "string" + }, + "relation-id": { + "type": "integer" + }, + "unit-relation-data": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/RelationData" + } + } + } + }, + "additionalProperties": false, + "required": [ + "relation-id", + "endpoint", + "cross-model", + "related-endpoint", + "ApplicationData", + "unit-relation-data" + ] + }, + "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": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ErrorResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "ExposedEndpoint": { + "type": "object", + "properties": { + "expose-to-cidrs": { + "type": "array", + "items": { + "type": "string" + } + }, + "expose-to-spaces": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "ExternalControllerInfo": { + "type": "object", + "properties": { + "addrs": { + "type": "array", + "items": { + "type": "string" + } + }, + "ca-cert": { + "type": "string" + }, + "controller-alias": { + "type": "string" + }, + "controller-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "controller-tag", + "controller-alias", + "addrs", + "ca-cert" + ] + }, + "Macaroon": { + "type": "object", + "additionalProperties": false + }, + "OfferUserDetails": { + "type": "object", + "properties": { + "access": { + "type": "string" + }, + "display-name": { + "type": "string" + }, + "user": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "user", + "display-name", + "access" + ] + }, + "PendingResourceUpload": { + "type": "object", + "properties": { + "Filename": { + "type": "string" + }, + "Name": { + "type": "string" + }, + "Type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "Name", + "Filename", + "Type" + ] + }, + "Placement": { + "type": "object", + "properties": { + "directive": { + "type": "string" + }, + "scope": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "scope", + "directive" + ] + }, + "RelationData": { + "type": "object", + "properties": { + "InScope": { + "type": "boolean" + }, + "UnitData": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + } + }, + "additionalProperties": false, + "required": [ + "InScope", + "UnitData" + ] + }, + "RelationSuspendedArg": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "relation-id": { + "type": "integer" + }, + "suspended": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "relation-id", + "message", + "suspended" + ] + }, + "RelationSuspendedArgs": { + "type": "object", + "properties": { + "args": { + "type": "array", + "items": { + "$ref": "#/definitions/RelationSuspendedArg" + } + } + }, + "additionalProperties": false, + "required": [ + "args" + ] + }, + "RemoteEndpoint": { + "type": "object", + "properties": { + "interface": { + "type": "string" + }, + "limit": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "role": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "role", + "interface", + "limit" + ] + }, + "RemoteSpace": { + "type": "object", + "properties": { + "cloud-type": { + "type": "string" + }, + "name": { + "type": "string" + }, + "provider-attributes": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "provider-id": { + "type": "string" + }, + "subnets": { + "type": "array", + "items": { + "$ref": "#/definitions/Subnet" + } + } + }, + "additionalProperties": false, + "required": [ + "cloud-type", + "name", + "provider-id", + "provider-attributes", + "subnets" + ] + }, + "ScaleApplicationInfo": { + "type": "object", + "properties": { + "num-units": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "num-units" + ] + }, + "ScaleApplicationParams": { + "type": "object", + "properties": { + "application-tag": { + "type": "string" + }, + "force": { + "type": "boolean" + }, + "scale": { + "type": "integer" + }, + "scale-change": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "application-tag", + "scale", + "force" + ] + }, + "ScaleApplicationResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "info": { + "$ref": "#/definitions/ScaleApplicationInfo" + } + }, + "additionalProperties": false + }, + "ScaleApplicationResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ScaleApplicationResult" + } + } + }, + "additionalProperties": false + }, + "ScaleApplicationsParams": { + "type": "object", + "properties": { + "applications": { + "type": "array", + "items": { + "$ref": "#/definitions/ScaleApplicationParams" + } + } + }, + "additionalProperties": false, + "required": [ + "applications" + ] + }, + "SetConstraints": { + "type": "object", + "properties": { + "application": { + "type": "string" + }, + "constraints": { + "$ref": "#/definitions/Value" + } + }, + "additionalProperties": false, + "required": [ + "application", + "constraints" + ] + }, + "StorageConstraints": { + "type": "object", + "properties": { + "count": { + "type": "integer" + }, + "pool": { + "type": "string" + }, + "size": { + "type": "integer" + } + }, + "additionalProperties": false + }, + "StringResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "result" + ] + }, + "Subnet": { + "type": "object", + "properties": { + "cidr": { + "type": "string" + }, + "life": { + "type": "string" + }, + "provider-id": { + "type": "string" + }, + "provider-network-id": { + "type": "string" + }, + "provider-space-id": { + "type": "string" + }, + "space-tag": { + "type": "string" + }, + "status": { + "type": "string" + }, + "vlan-tag": { + "type": "integer" + }, + "zones": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "cidr", + "vlan-tag", + "life", + "space-tag", + "zones" + ] + }, + "UnitInfoResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "$ref": "#/definitions/UnitResult" + } + }, + "additionalProperties": false + }, + "UnitInfoResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/UnitInfoResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "UnitResult": { + "type": "object", + "properties": { + "address": { + "type": "string" + }, + "charm": { + "type": "string" + }, + "leader": { + "type": "boolean" + }, + "life": { + "type": "string" + }, + "machine": { + "type": "string" + }, + "opened-ports": { + "type": "array", + "items": { + "type": "string" + } + }, + "provider-id": { + "type": "string" + }, + "public-address": { + "type": "string" + }, + "relation-data": { + "type": "array", + "items": { + "$ref": "#/definitions/EndpointRelationData" + } + }, + "tag": { + "type": "string" + }, + "workload-version": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag", + "workload-version", + "opened-ports", + "charm" + ] + }, + "UnitsResolved": { + "type": "object", + "properties": { + "all": { + "type": "boolean" + }, + "retry": { + "type": "boolean" + }, + "tags": { + "$ref": "#/definitions/Entities" + } + }, + "additionalProperties": false + }, + "UpdateChannelArg": { + "type": "object", + "properties": { + "channel": { + "type": "string" + }, + "force": { + "type": "boolean" + }, + "tag": { + "$ref": "#/definitions/Entity" + } + }, + "additionalProperties": false, + "required": [ + "tag", + "force", + "channel" + ] + }, + "UpdateChannelArgs": { + "type": "object", + "properties": { + "args": { + "type": "array", + "items": { + "$ref": "#/definitions/UpdateChannelArg" + } + } + }, + "additionalProperties": false, + "required": [ + "args" + ] + }, + "Value": { + "type": "object", + "properties": { + "allocate-public-ip": { + "type": "boolean" + }, + "arch": { + "type": "string" + }, + "container": { + "type": "string" + }, + "cores": { + "type": "integer" + }, + "cpu-power": { + "type": "integer" + }, + "image-id": { + "type": "string" + }, + "instance-role": { + "type": "string" + }, + "instance-type": { + "type": "string" + }, + "mem": { + "type": "integer" + }, + "root-disk": { + "type": "integer" + }, + "root-disk-source": { + "type": "string" + }, + "spaces": { + "type": "array", + "items": { + "type": "string" + } + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "virt-type": { + "type": "string" + }, + "zones": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + } + } + } + }, + { + "Name": "ApplicationOffers", + "Description": "OffersAPI implements the cross model interface and is the concrete\nimplementation of the api end point.", + "Version": 4, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "controller-user" + ], + "Schema": { + "type": "object", + "properties": { + "ApplicationOffers": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/OfferURLs" + }, + "Result": { + "$ref": "#/definitions/ApplicationOffersResults" + } + }, + "description": "ApplicationOffers gets details about remote applications that match given URLs." + }, + "DestroyOffers": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/DestroyApplicationOffers" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "DestroyOffers removes the offers specified by the given URLs, forcing if necessary." + }, + "FindApplicationOffers": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/OfferFilters" + }, + "Result": { + "$ref": "#/definitions/QueryApplicationOffersResults" + } + }, + "description": "FindApplicationOffers gets details about remote applications that match given filter." + }, + "GetConsumeDetails": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ConsumeOfferDetailsArg" + }, + "Result": { + "$ref": "#/definitions/ConsumeOfferDetailsResults" + } + }, + "description": "GetConsumeDetails returns the details necessary to pass to another model\nto allow the specified args user to consume the offers represented by the args URLs." + }, + "ListApplicationOffers": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/OfferFilters" + }, + "Result": { + "$ref": "#/definitions/QueryApplicationOffersResults" + } + }, + "description": "ListApplicationOffers gets deployed details about application offers that match given filter.\nThe results contain details about the deployed applications such as connection count." + }, + "ModifyOfferAccess": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ModifyOfferAccessRequest" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "ModifyOfferAccess changes the application offer access granted to users." + }, + "Offer": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/AddApplicationOffers" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "Offer makes application endpoints available for consumption at a specified URL." + }, + "RemoteApplicationInfo": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/OfferURLs" + }, + "Result": { + "$ref": "#/definitions/RemoteApplicationInfoResults" + } + }, + "description": "RemoteApplicationInfo returns information about the requested remote application.\nThis call currently has no client side API, only there for the Dashboard at this stage." + } + }, + "definitions": { + "AddApplicationOffer": { + "type": "object", + "properties": { + "application-description": { + "type": "string" + }, + "application-name": { + "type": "string" + }, + "endpoints": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "model-tag": { + "type": "string" + }, + "offer-name": { + "type": "string" + }, + "owner-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "model-tag", + "offer-name", + "application-name", + "application-description", + "endpoints" + ] + }, + "AddApplicationOffers": { + "type": "object", + "properties": { + "Offers": { + "type": "array", + "items": { + "$ref": "#/definitions/AddApplicationOffer" + } + } + }, + "additionalProperties": false, + "required": [ + "Offers" + ] + }, + "ApplicationOfferAdminDetails": { + "type": "object", + "properties": { + "ApplicationOfferDetails": { + "$ref": "#/definitions/ApplicationOfferDetails" + }, + "application-description": { + "type": "string" + }, + "application-name": { + "type": "string" + }, + "bindings": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "charm-url": { + "type": "string" + }, + "connections": { + "type": "array", + "items": { + "$ref": "#/definitions/OfferConnection" + } + }, + "endpoints": { + "type": "array", + "items": { + "$ref": "#/definitions/RemoteEndpoint" + } + }, + "offer-name": { + "type": "string" + }, + "offer-url": { + "type": "string" + }, + "offer-uuid": { + "type": "string" + }, + "source-model-tag": { + "type": "string" + }, + "spaces": { + "type": "array", + "items": { + "$ref": "#/definitions/RemoteSpace" + } + }, + "users": { + "type": "array", + "items": { + "$ref": "#/definitions/OfferUserDetails" + } + } + }, + "additionalProperties": false, + "required": [ + "source-model-tag", + "offer-uuid", + "offer-url", + "offer-name", + "application-description", + "ApplicationOfferDetails", + "application-name", + "charm-url" + ] + }, + "ApplicationOfferDetails": { + "type": "object", + "properties": { + "application-description": { + "type": "string" + }, + "bindings": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "endpoints": { + "type": "array", + "items": { + "$ref": "#/definitions/RemoteEndpoint" + } + }, + "offer-name": { + "type": "string" + }, + "offer-url": { + "type": "string" + }, + "offer-uuid": { + "type": "string" + }, + "source-model-tag": { + "type": "string" + }, + "spaces": { + "type": "array", + "items": { + "$ref": "#/definitions/RemoteSpace" + } + }, + "users": { + "type": "array", + "items": { + "$ref": "#/definitions/OfferUserDetails" + } + } + }, + "additionalProperties": false, + "required": [ + "source-model-tag", + "offer-uuid", + "offer-url", + "offer-name", + "application-description" + ] + }, + "ApplicationOfferResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "$ref": "#/definitions/ApplicationOfferAdminDetails" + } + }, + "additionalProperties": false + }, + "ApplicationOffersResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ApplicationOfferResult" + } + } + }, + "additionalProperties": false + }, + "ConsumeOfferDetails": { + "type": "object", + "properties": { + "external-controller": { + "$ref": "#/definitions/ExternalControllerInfo" + }, + "macaroon": { + "$ref": "#/definitions/Macaroon" + }, + "offer": { + "$ref": "#/definitions/ApplicationOfferDetails" + } + }, + "additionalProperties": false + }, + "ConsumeOfferDetailsArg": { + "type": "object", + "properties": { + "offer-urls": { + "$ref": "#/definitions/OfferURLs" + }, + "user-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "offer-urls" + ] + }, + "ConsumeOfferDetailsResult": { + "type": "object", + "properties": { + "ConsumeOfferDetails": { + "$ref": "#/definitions/ConsumeOfferDetails" + }, + "error": { + "$ref": "#/definitions/Error" + }, + "external-controller": { + "$ref": "#/definitions/ExternalControllerInfo" + }, + "macaroon": { + "$ref": "#/definitions/Macaroon" + }, + "offer": { + "$ref": "#/definitions/ApplicationOfferDetails" + } + }, + "additionalProperties": false, + "required": [ + "ConsumeOfferDetails" + ] + }, + "ConsumeOfferDetailsResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ConsumeOfferDetailsResult" + } + } + }, + "additionalProperties": false + }, + "DestroyApplicationOffers": { + "type": "object", + "properties": { + "force": { + "type": "boolean" + }, + "offer-urls": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "offer-urls" + ] + }, + "EndpointFilterAttributes": { + "type": "object", + "properties": { + "interface": { + "type": "string" + }, + "name": { + "type": "string" + }, + "role": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "role", + "interface", + "name" + ] + }, + "EntityStatus": { + "type": "object", + "properties": { + "data": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "info": { + "type": "string" + }, + "since": { + "type": "string", + "format": "date-time" + }, + "status": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "status", + "info", + "since" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ErrorResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "ExternalControllerInfo": { + "type": "object", + "properties": { + "addrs": { + "type": "array", + "items": { + "type": "string" + } + }, + "ca-cert": { + "type": "string" + }, + "controller-alias": { + "type": "string" + }, + "controller-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "controller-tag", + "controller-alias", + "addrs", + "ca-cert" + ] + }, + "Macaroon": { + "type": "object", + "additionalProperties": false + }, + "ModifyOfferAccess": { + "type": "object", + "properties": { + "access": { + "type": "string" + }, + "action": { + "type": "string" + }, + "offer-url": { + "type": "string" + }, + "user-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "user-tag", + "action", + "access", + "offer-url" + ] + }, + "ModifyOfferAccessRequest": { + "type": "object", + "properties": { + "changes": { + "type": "array", + "items": { + "$ref": "#/definitions/ModifyOfferAccess" + } + } + }, + "additionalProperties": false, + "required": [ + "changes" + ] + }, + "OfferConnection": { + "type": "object", + "properties": { + "endpoint": { + "type": "string" + }, + "ingress-subnets": { + "type": "array", + "items": { + "type": "string" + } + }, + "relation-id": { + "type": "integer" + }, + "source-model-tag": { + "type": "string" + }, + "status": { + "$ref": "#/definitions/EntityStatus" + }, + "username": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "source-model-tag", + "relation-id", + "username", + "endpoint", + "status", + "ingress-subnets" + ] + }, + "OfferFilter": { + "type": "object", + "properties": { + "allowed-users": { + "type": "array", + "items": { + "type": "string" + } + }, + "application-description": { + "type": "string" + }, + "application-name": { + "type": "string" + }, + "application-user": { + "type": "string" + }, + "connected-users": { + "type": "array", + "items": { + "type": "string" + } + }, + "endpoints": { + "type": "array", + "items": { + "$ref": "#/definitions/EndpointFilterAttributes" + } + }, + "model-name": { + "type": "string" + }, + "offer-name": { + "type": "string" + }, + "owner-name": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "owner-name", + "model-name", + "offer-name", + "application-name", + "application-description", + "application-user", + "endpoints", + "connected-users", + "allowed-users" + ] + }, + "OfferFilters": { + "type": "object", + "properties": { + "Filters": { + "type": "array", + "items": { + "$ref": "#/definitions/OfferFilter" + } + } + }, + "additionalProperties": false, + "required": [ + "Filters" + ] + }, + "OfferURLs": { + "type": "object", + "properties": { + "bakery-version": { + "type": "integer" + }, + "offer-urls": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "OfferUserDetails": { + "type": "object", + "properties": { + "access": { + "type": "string" + }, + "display-name": { + "type": "string" + }, + "user": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "user", + "display-name", + "access" + ] + }, + "QueryApplicationOffersResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ApplicationOfferAdminDetails" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "RemoteApplicationInfo": { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "endpoints": { + "type": "array", + "items": { + "$ref": "#/definitions/RemoteEndpoint" + } + }, + "icon-url-path": { + "type": "string" + }, + "model-tag": { + "type": "string" + }, + "name": { + "type": "string" + }, + "offer-url": { + "type": "string" + }, + "source-model-label": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "model-tag", + "name", + "description", + "offer-url", + "endpoints", + "icon-url-path" + ] + }, + "RemoteApplicationInfoResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "$ref": "#/definitions/RemoteApplicationInfo" + } + }, + "additionalProperties": false + }, + "RemoteApplicationInfoResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/RemoteApplicationInfoResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "RemoteEndpoint": { + "type": "object", + "properties": { + "interface": { + "type": "string" + }, + "limit": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "role": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "role", + "interface", + "limit" + ] + }, + "RemoteSpace": { + "type": "object", + "properties": { + "cloud-type": { + "type": "string" + }, + "name": { + "type": "string" + }, + "provider-attributes": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "provider-id": { + "type": "string" + }, + "subnets": { + "type": "array", + "items": { + "$ref": "#/definitions/Subnet" + } + } + }, + "additionalProperties": false, + "required": [ + "cloud-type", + "name", + "provider-id", + "provider-attributes", + "subnets" + ] + }, + "Subnet": { + "type": "object", + "properties": { + "cidr": { + "type": "string" + }, + "life": { + "type": "string" + }, + "provider-id": { + "type": "string" + }, + "provider-network-id": { + "type": "string" + }, + "provider-space-id": { + "type": "string" + }, + "space-tag": { + "type": "string" + }, + "status": { + "type": "string" + }, + "vlan-tag": { + "type": "integer" + }, + "zones": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "cidr", + "vlan-tag", + "life", + "space-tag", + "zones" + ] + } + } + } + }, + { + "Name": "Backups", + "Description": "API provides backup-specific API methods.", + "Version": 3, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "Create": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/BackupsCreateArgs" + }, + "Result": { + "$ref": "#/definitions/BackupsMetadataResult" + } + }, + "description": "Create is the API method that requests juju to create a new backup\nof its state." + } + }, + "definitions": { + "BackupsCreateArgs": { + "type": "object", + "properties": { + "no-download": { + "type": "boolean" + }, + "notes": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "notes", + "no-download" + ] + }, + "BackupsMetadataResult": { + "type": "object", + "properties": { + "base": { + "type": "string" + }, + "checksum": { + "type": "string" + }, + "checksum-format": { + "type": "string" + }, + "controller-machine-id": { + "type": "string" + }, + "controller-machine-inst-id": { + "type": "string" + }, + "controller-uuid": { + "type": "string" + }, + "filename": { + "type": "string" + }, + "finished": { + "type": "string", + "format": "date-time" + }, + "format-version": { + "type": "integer" + }, + "ha-nodes": { + "type": "integer" + }, + "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" + }, + "version": { + "$ref": "#/definitions/Number" + } + }, + "additionalProperties": false, + "required": [ + "id", + "checksum", + "checksum-format", + "size", + "stored", + "started", + "finished", + "notes", + "model", + "machine", + "hostname", + "version", + "base", + "filename", + "format-version", + "controller-uuid", + "controller-machine-id", + "controller-machine-inst-id", + "ha-nodes" + ] + }, + "Number": { + "type": "object", + "properties": { + "Build": { + "type": "integer" + }, + "Major": { + "type": "integer" + }, + "Minor": { + "type": "integer" + }, + "Patch": { + "type": "integer" + }, + "Tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "Major", + "Minor", + "Tag", + "Patch", + "Build" + ] + } + } + } + }, + { + "Name": "Block", + "Description": "API implements Block interface and is the concrete\nimplementation of the api end point.", + "Version": 2, + "AvailableTo": [ + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "List": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/BlockResults" + } + }, + "description": "List implements Block.List()." + }, + "SwitchBlockOff": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/BlockSwitchParams" + }, + "Result": { + "$ref": "#/definitions/ErrorResult" + } + }, + "description": "SwitchBlockOff implements Block.SwitchBlockOff()." + }, + "SwitchBlockOn": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/BlockSwitchParams" + }, + "Result": { + "$ref": "#/definitions/ErrorResult" + } + }, + "description": "SwitchBlockOn implements Block.SwitchBlockOn()." + } + }, + "definitions": { + "Block": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "message": { + "type": "string" + }, + "tag": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "id", + "tag", + "type" + ] + }, + "BlockResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "$ref": "#/definitions/Block" + } + }, + "additionalProperties": false, + "required": [ + "result" + ] + }, + "BlockResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/BlockResult" + } + } + }, + "additionalProperties": false + }, + "BlockSwitchParams": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "type" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + } + } + } + }, + { + "Name": "Bundle", + "Description": "APIv6 provides the Bundle API facade for version 6. It is otherwise\nidentical to V5 with the exception that the V6 adds the support for\nmulti-part yaml handling to GetChanges and GetChangesMapArgs.", + "Version": 6, + "AvailableTo": [ + "controller-user", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "ExportBundle": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ExportBundleParams" + }, + "Result": { + "$ref": "#/definitions/StringResult" + } + }, + "description": "ExportBundle exports the current model configuration as bundle." + }, + "GetChanges": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/BundleChangesParams" + }, + "Result": { + "$ref": "#/definitions/BundleChangesResults" + } + }, + "description": "GetChanges returns the list of changes required to deploy the given bundle\ndata. The changes are sorted by requirements, so that they can be applied in\norder.\nGetChanges has been superseded in favour of GetChangesMapArgs. It's\npreferable to use that new method to add new functionality and move clients\naway from this one." + }, + "GetChangesMapArgs": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/BundleChangesParams" + }, + "Result": { + "$ref": "#/definitions/BundleChangesMapArgsResults" + } + }, + "description": "GetChangesMapArgs returns the list of changes required to deploy the given\nbundle data. The changes are sorted by requirements, so that they can be\napplied in order.\nV4 GetChangesMapArgs is not supported on anything less than v4" + } + }, + "definitions": { + "BundleChange": { + "type": "object", + "properties": { + "args": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true + } + }, + "id": { + "type": "string" + }, + "method": { + "type": "string" + }, + "requires": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "id", + "method", + "args", + "requires" + ] + }, + "BundleChangesMapArgs": { + "type": "object", + "properties": { + "args": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "id": { + "type": "string" + }, + "method": { + "type": "string" + }, + "requires": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "id", + "method", + "args", + "requires" + ] + }, + "BundleChangesMapArgsResults": { + "type": "object", + "properties": { + "changes": { + "type": "array", + "items": { + "$ref": "#/definitions/BundleChangesMapArgs" + } + }, + "errors": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "BundleChangesParams": { + "type": "object", + "properties": { + "bundleURL": { + "type": "string" + }, + "yaml": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "yaml", + "bundleURL" + ] + }, + "BundleChangesResults": { + "type": "object", + "properties": { + "changes": { + "type": "array", + "items": { + "$ref": "#/definitions/BundleChange" + } + }, + "errors": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ExportBundleParams": { + "type": "object", + "properties": { + "include-charm-defaults": { + "type": "boolean" + }, + "include-series": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "StringResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "result" + ] + } + } + } + }, + { + "Name": "Charms", + "Description": "APIv7 provides the Charms API facade for version 7.\nv7 guarantees SupportedBases will be provided in ResolveCharms", + "Version": 7, + "AvailableTo": [ + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "AddCharm": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/AddCharmWithOrigin" + }, + "Result": { + "$ref": "#/definitions/CharmOriginResult" + } + }, + "description": "AddCharm adds the given charm URL (which must include revision) to the\nenvironment, if it does not exist yet. Local charms are not supported,\nonly charm store and charm hub URLs. See also AddLocalCharm()." + }, + "CharmInfo": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/CharmURL" + }, + "Result": { + "$ref": "#/definitions/Charm" + } + }, + "description": "CharmInfo returns information about the requested charm." + }, + "CheckCharmPlacement": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ApplicationCharmPlacements" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "CheckCharmPlacement checks if a charm is allowed to be placed with in a\ngiven application." + }, + "GetDownloadInfos": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/CharmURLAndOrigins" + }, + "Result": { + "$ref": "#/definitions/DownloadInfoResults" + } + }, + "description": "GetDownloadInfos attempts to get the bundle corresponding to the charm url\nand origin." + }, + "IsMetered": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/CharmURL" + }, + "Result": { + "$ref": "#/definitions/IsMeteredResult" + } + }, + "description": "IsMetered returns whether or not the charm is metered.\nTODO (cderici) only used for metered charms in cmd MeteredDeployAPI,\nkept for client compatibility, remove in juju 4.0" + }, + "List": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/CharmsList" + }, + "Result": { + "$ref": "#/definitions/CharmsListResult" + } + }, + "description": "List returns a list of charm URLs currently in the state.\nIf supplied parameter contains any names, the result will\nbe filtered to return only the charms with supplied names." + }, + "ListCharmResources": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/CharmURLAndOrigins" + }, + "Result": { + "$ref": "#/definitions/CharmResourcesResults" + } + }, + "description": "ListCharmResources returns a series of resources for a given charm." + }, + "ResolveCharms": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ResolveCharmsWithChannel" + }, + "Result": { + "$ref": "#/definitions/ResolveCharmWithChannelResults" + } + }, + "description": "ResolveCharms resolves the given charm URLs with an optionally specified\npreferred channel. Channel provided via CharmOrigin." + } + }, + "definitions": { + "AddCharmWithOrigin": { + "type": "object", + "properties": { + "charm-origin": { + "$ref": "#/definitions/CharmOrigin" + }, + "force": { + "type": "boolean" + }, + "url": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "url", + "charm-origin", + "force" + ] + }, + "ApplicationCharmPlacement": { + "type": "object", + "properties": { + "application": { + "type": "string" + }, + "charm-url": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "application", + "charm-url" + ] + }, + "ApplicationCharmPlacements": { + "type": "object", + "properties": { + "placements": { + "type": "array", + "items": { + "$ref": "#/definitions/ApplicationCharmPlacement" + } + } + }, + "additionalProperties": false, + "required": [ + "placements" + ] + }, + "Base": { + "type": "object", + "properties": { + "channel": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "channel" + ] + }, + "Charm": { + "type": "object", + "properties": { + "actions": { + "$ref": "#/definitions/CharmActions" + }, + "config": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmOption" + } + } + }, + "lxd-profile": { + "$ref": "#/definitions/CharmLXDProfile" + }, + "manifest": { + "$ref": "#/definitions/CharmManifest" + }, + "meta": { + "$ref": "#/definitions/CharmMeta" + }, + "metrics": { + "$ref": "#/definitions/CharmMetrics" + }, + "revision": { + "type": "integer" + }, + "url": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "revision", + "url", + "config" + ] + }, + "CharmActionSpec": { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "params": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + } + }, + "additionalProperties": false, + "required": [ + "description", + "params" + ] + }, + "CharmActions": { + "type": "object", + "properties": { + "specs": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmActionSpec" + } + } + } + }, + "additionalProperties": false + }, + "CharmBase": { + "type": "object", + "properties": { + "architectures": { + "type": "array", + "items": { + "type": "string" + } + }, + "channel": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "additionalProperties": false + }, + "CharmContainer": { + "type": "object", + "properties": { + "mounts": { + "type": "array", + "items": { + "$ref": "#/definitions/CharmMount" + } + }, + "resource": { + "type": "string" + } + }, + "additionalProperties": false + }, + "CharmDeployment": { + "type": "object", + "properties": { + "min-version": { + "type": "string" + }, + "mode": { + "type": "string" + }, + "service": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "type", + "mode", + "service", + "min-version" + ] + }, + "CharmDevice": { + "type": "object", + "properties": { + "CountMax": { + "type": "integer" + }, + "CountMin": { + "type": "integer" + }, + "Description": { + "type": "string" + }, + "Name": { + "type": "string" + }, + "Type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "Name", + "Description", + "Type", + "CountMin", + "CountMax" + ] + }, + "CharmLXDProfile": { + "type": "object", + "properties": { + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "description": { + "type": "string" + }, + "devices": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + } + } + } + }, + "additionalProperties": false, + "required": [ + "config", + "description", + "devices" + ] + }, + "CharmManifest": { + "type": "object", + "properties": { + "bases": { + "type": "array", + "items": { + "$ref": "#/definitions/CharmBase" + } + } + }, + "additionalProperties": false + }, + "CharmMeta": { + "type": "object", + "properties": { + "assumes-expr": { + "$ref": "#/definitions/ExpressionTree" + }, + "categories": { + "type": "array", + "items": { + "type": "string" + } + }, + "containers": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmContainer" + } + } + }, + "deployment": { + "$ref": "#/definitions/CharmDeployment" + }, + "description": { + "type": "string" + }, + "devices": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmDevice" + } + } + }, + "extra-bindings": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "min-juju-version": { + "type": "string" + }, + "name": { + "type": "string" + }, + "payload-classes": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmPayloadClass" + } + } + }, + "peers": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmRelation" + } + } + }, + "provides": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmRelation" + } + } + }, + "requires": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmRelation" + } + } + }, + "resources": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmResourceMeta" + } + } + }, + "series": { + "type": "array", + "items": { + "type": "string" + } + }, + "storage": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmStorage" + } + } + }, + "subordinate": { + "type": "boolean" + }, + "summary": { + "type": "string" + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "terms": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "name", + "summary", + "description", + "subordinate" + ] + }, + "CharmMetric": { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "type", + "description" + ] + }, + "CharmMetrics": { + "type": "object", + "properties": { + "metrics": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmMetric" + } + } + }, + "plan": { + "$ref": "#/definitions/CharmPlan" + } + }, + "additionalProperties": false, + "required": [ + "metrics", + "plan" + ] + }, + "CharmMount": { + "type": "object", + "properties": { + "location": { + "type": "string" + }, + "storage": { + "type": "string" + } + }, + "additionalProperties": false + }, + "CharmOption": { + "type": "object", + "properties": { + "default": { + "type": "object", + "additionalProperties": true + }, + "description": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "type" + ] + }, + "CharmOrigin": { + "type": "object", + "properties": { + "architecture": { + "type": "string" + }, + "base": { + "$ref": "#/definitions/Base" + }, + "branch": { + "type": "string" + }, + "hash": { + "type": "string" + }, + "id": { + "type": "string" + }, + "instance-key": { + "type": "string" + }, + "revision": { + "type": "integer" + }, + "risk": { + "type": "string" + }, + "source": { + "type": "string" + }, + "track": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "source", + "type", + "id" + ] + }, + "CharmOriginResult": { + "type": "object", + "properties": { + "charm-origin": { + "$ref": "#/definitions/CharmOrigin" + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "charm-origin" + ] + }, + "CharmPayloadClass": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "type" + ] + }, + "CharmPlan": { + "type": "object", + "properties": { + "required": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "required" + ] + }, + "CharmRelation": { + "type": "object", + "properties": { + "interface": { + "type": "string" + }, + "limit": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "optional": { + "type": "boolean" + }, + "role": { + "type": "string" + }, + "scope": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "role", + "interface", + "optional", + "limit", + "scope" + ] + }, + "CharmResource": { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "fingerprint": { + "type": "array", + "items": { + "type": "integer" + } + }, + "name": { + "type": "string" + }, + "origin": { + "type": "string" + }, + "path": { + "type": "string" + }, + "revision": { + "type": "integer" + }, + "size": { + "type": "integer" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "type", + "path", + "origin", + "revision", + "fingerprint", + "size" + ] + }, + "CharmResourceMeta": { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "type", + "path", + "description" + ] + }, + "CharmResourceResult": { + "type": "object", + "properties": { + "CharmResource": { + "$ref": "#/definitions/CharmResource" + }, + "ErrorResult": { + "$ref": "#/definitions/ErrorResult" + }, + "description": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" + }, + "fingerprint": { + "type": "array", + "items": { + "type": "integer" + } + }, + "name": { + "type": "string" + }, + "origin": { + "type": "string" + }, + "path": { + "type": "string" + }, + "revision": { + "type": "integer" + }, + "size": { + "type": "integer" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "ErrorResult", + "name", + "type", + "path", + "origin", + "revision", + "fingerprint", + "size", + "CharmResource" + ] + }, + "CharmResourcesResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/CharmResourceResult" + } + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "CharmStorage": { + "type": "object", + "properties": { + "count-max": { + "type": "integer" + }, + "count-min": { + "type": "integer" + }, + "description": { + "type": "string" + }, + "location": { + "type": "string" + }, + "minimum-size": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "properties": { + "type": "array", + "items": { + "type": "string" + } + }, + "read-only": { + "type": "boolean" + }, + "shared": { + "type": "boolean" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "description", + "type", + "shared", + "read-only", + "count-min", + "count-max", + "minimum-size" + ] + }, + "CharmURL": { + "type": "object", + "properties": { + "url": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "url" + ] + }, + "CharmURLAndOrigin": { + "type": "object", + "properties": { + "charm-origin": { + "$ref": "#/definitions/CharmOrigin" + }, + "charm-url": { + "type": "string" + }, + "macaroon": { + "$ref": "#/definitions/Macaroon" + } + }, + "additionalProperties": false, + "required": [ + "charm-url", + "charm-origin" + ] + }, + "CharmURLAndOrigins": { + "type": "object", + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/CharmURLAndOrigin" + } + } + }, + "additionalProperties": false, + "required": [ + "entities" + ] + }, + "CharmsList": { + "type": "object", + "properties": { + "names": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "names" + ] + }, + "CharmsListResult": { + "type": "object", + "properties": { + "charm-urls": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "charm-urls" + ] + }, + "DownloadInfoResult": { + "type": "object", + "properties": { + "charm-origin": { + "$ref": "#/definitions/CharmOrigin" + }, + "url": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "url", + "charm-origin" + ] + }, + "DownloadInfoResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/DownloadInfoResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ErrorResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "ExpressionTree": { + "type": "object", + "properties": { + "Expression": { + "type": "object", + "additionalProperties": true + } + }, + "additionalProperties": false, + "required": [ + "Expression" + ] + }, + "IsMeteredResult": { + "type": "object", + "properties": { + "metered": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "metered" + ] + }, + "Macaroon": { + "type": "object", + "additionalProperties": false + }, + "ResolveCharmWithChannel": { + "type": "object", + "properties": { + "charm-origin": { + "$ref": "#/definitions/CharmOrigin" + }, + "reference": { + "type": "string" + }, + "switch-charm": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "reference", + "charm-origin" + ] + }, + "ResolveCharmWithChannelResult": { + "type": "object", + "properties": { + "charm-origin": { + "$ref": "#/definitions/CharmOrigin" + }, + "error": { + "$ref": "#/definitions/Error" + }, + "supported-bases": { + "type": "array", + "items": { + "$ref": "#/definitions/Base" + } + }, + "url": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "url", + "charm-origin", + "supported-bases" + ] + }, + "ResolveCharmWithChannelResults": { + "type": "object", + "properties": { + "Results": { + "type": "array", + "items": { + "$ref": "#/definitions/ResolveCharmWithChannelResult" + } + } + }, + "additionalProperties": false, + "required": [ + "Results" + ] + }, + "ResolveCharmsWithChannel": { + "type": "object", + "properties": { + "macaroon": { + "$ref": "#/definitions/Macaroon" + }, + "resolve": { + "type": "array", + "items": { + "$ref": "#/definitions/ResolveCharmWithChannel" + } + } + }, + "additionalProperties": false, + "required": [ + "resolve" + ] + } + } + } + }, + { + "Name": "Client", + "Description": "Client serves client-specific API methods.", + "Version": 7, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "FindTools": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/FindToolsParams" + }, + "Result": { + "$ref": "#/definitions/FindToolsResult" + } + }, + "description": "FindTools returns a List containing all tools matching the given parameters.\nTODO(juju 3.1) - remove, used by 2.9 client only" + }, + "FullStatus": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/StatusParams" + }, + "Result": { + "$ref": "#/definitions/FullStatus" + } + }, + "description": "FullStatus gives the information needed for juju status over the api" + }, + "StatusHistory": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/StatusHistoryRequests" + }, + "Result": { + "$ref": "#/definitions/StatusHistoryResults" + } + }, + "description": "StatusHistory returns a slice of past statuses for several entities." + }, + "WatchAll": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/AllWatcherId" + } + }, + "description": "WatchAll initiates a watcher for entities in the connected model." + } + }, + "definitions": { + "AllWatcherId": { + "type": "object", + "properties": { + "watcher-id": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "watcher-id" + ] + }, + "ApplicationOfferStatus": { + "type": "object", + "properties": { + "active-connected-count": { + "type": "integer" + }, + "application-name": { + "type": "string" + }, + "charm": { + "type": "string" + }, + "endpoints": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/RemoteEndpoint" + } + } + }, + "err": { + "$ref": "#/definitions/Error" + }, + "offer-name": { + "type": "string" + }, + "total-connected-count": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "offer-name", + "application-name", + "charm", + "endpoints", + "active-connected-count", + "total-connected-count" + ] + }, + "ApplicationStatus": { + "type": "object", + "properties": { + "base": { + "$ref": "#/definitions/Base" + }, + "can-upgrade-to": { + "type": "string" + }, + "charm": { + "type": "string" + }, + "charm-channel": { + "type": "string" + }, + "charm-profile": { + "type": "string" + }, + "charm-version": { + "type": "string" + }, + "endpoint-bindings": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "err": { + "$ref": "#/definitions/Error" + }, + "exposed": { + "type": "boolean" + }, + "exposed-endpoints": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/ExposedEndpoint" + } + } + }, + "int": { + "type": "integer" + }, + "life": { + "type": "string" + }, + "meter-statuses": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/MeterStatus" + } + } + }, + "provider-id": { + "type": "string" + }, + "public-address": { + "type": "string" + }, + "relations": { + "type": "object", + "patternProperties": { + ".*": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "status": { + "$ref": "#/definitions/DetailedStatus" + }, + "subordinate-to": { + "type": "array", + "items": { + "type": "string" + } + }, + "units": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/UnitStatus" + } + } + }, + "workload-version": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "charm", + "charm-version", + "charm-profile", + "base", + "exposed", + "life", + "relations", + "can-upgrade-to", + "subordinate-to", + "units", + "meter-statuses", + "status", + "workload-version", + "endpoint-bindings", + "public-address" + ] + }, + "Base": { + "type": "object", + "properties": { + "channel": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "channel" + ] + }, + "Binary": { + "type": "object", + "properties": { + "Arch": { + "type": "string" + }, + "Build": { + "type": "integer" + }, + "Major": { + "type": "integer" + }, + "Minor": { + "type": "integer" + }, + "Number": { + "$ref": "#/definitions/Number" + }, + "Patch": { + "type": "integer" + }, + "Release": { + "type": "string" + }, + "Tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "Major", + "Minor", + "Tag", + "Patch", + "Build", + "Number", + "Release", + "Arch" + ] + }, + "BranchStatus": { + "type": "object", + "properties": { + "assigned-units": { + "type": "object", + "patternProperties": { + ".*": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "created": { + "type": "integer" + }, + "created-by": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "assigned-units", + "created", + "created-by" + ] + }, + "DetailedStatus": { + "type": "object", + "properties": { + "data": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "err": { + "$ref": "#/definitions/Error" + }, + "info": { + "type": "string" + }, + "kind": { + "type": "string" + }, + "life": { + "type": "string" + }, + "since": { + "type": "string", + "format": "date-time" + }, + "status": { + "type": "string" + }, + "version": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "status", + "info", + "data", + "since", + "kind", + "version", + "life" + ] + }, + "EndpointStatus": { + "type": "object", + "properties": { + "application": { + "type": "string" + }, + "name": { + "type": "string" + }, + "role": { + "type": "string" + }, + "subordinate": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "application", + "name", + "role", + "subordinate" + ] + }, + "EntityStatus": { + "type": "object", + "properties": { + "data": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "info": { + "type": "string" + }, + "since": { + "type": "string", + "format": "date-time" + }, + "status": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "status", + "info", + "since" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ExposedEndpoint": { + "type": "object", + "properties": { + "expose-to-cidrs": { + "type": "array", + "items": { + "type": "string" + } + }, + "expose-to-spaces": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "FilesystemAttachmentDetails": { + "type": "object", + "properties": { + "FilesystemAttachmentInfo": { + "$ref": "#/definitions/FilesystemAttachmentInfo" + }, + "life": { + "type": "string" + }, + "mount-point": { + "type": "string" + }, + "read-only": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "FilesystemAttachmentInfo" + ] + }, + "FilesystemAttachmentInfo": { + "type": "object", + "properties": { + "mount-point": { + "type": "string" + }, + "read-only": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "FilesystemDetails": { + "type": "object", + "properties": { + "filesystem-tag": { + "type": "string" + }, + "info": { + "$ref": "#/definitions/FilesystemInfo" + }, + "life": { + "type": "string" + }, + "machine-attachments": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/FilesystemAttachmentDetails" + } + } + }, + "status": { + "$ref": "#/definitions/EntityStatus" + }, + "storage": { + "$ref": "#/definitions/StorageDetails" + }, + "unit-attachments": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/FilesystemAttachmentDetails" + } + } + }, + "volume-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "filesystem-tag", + "info", + "status" + ] + }, + "FilesystemInfo": { + "type": "object", + "properties": { + "filesystem-id": { + "type": "string" + }, + "pool": { + "type": "string" + }, + "size": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "filesystem-id", + "pool", + "size" + ] + }, + "FindToolsParams": { + "type": "object", + "properties": { + "agentstream": { + "type": "string" + }, + "arch": { + "type": "string" + }, + "major": { + "type": "integer" + }, + "number": { + "$ref": "#/definitions/Number" + }, + "os-type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "number", + "major", + "arch", + "os-type", + "agentstream" + ] + }, + "FindToolsResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "list": { + "type": "array", + "items": { + "$ref": "#/definitions/Tools" + } + } + }, + "additionalProperties": false, + "required": [ + "list" + ] + }, + "FullStatus": { + "type": "object", + "properties": { + "applications": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/ApplicationStatus" + } + } + }, + "branches": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/BranchStatus" + } + } + }, + "controller-timestamp": { + "type": "string", + "format": "date-time" + }, + "filesystems": { + "type": "array", + "items": { + "$ref": "#/definitions/FilesystemDetails" + } + }, + "machines": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/MachineStatus" + } + } + }, + "model": { + "$ref": "#/definitions/ModelStatusInfo" + }, + "offers": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/ApplicationOfferStatus" + } + } + }, + "relations": { + "type": "array", + "items": { + "$ref": "#/definitions/RelationStatus" + } + }, + "remote-applications": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/RemoteApplicationStatus" + } + } + }, + "storage": { + "type": "array", + "items": { + "$ref": "#/definitions/StorageDetails" + } + }, + "volumes": { + "type": "array", + "items": { + "$ref": "#/definitions/VolumeDetails" + } + } + }, + "additionalProperties": false, + "required": [ + "model", + "machines", + "applications", + "remote-applications", + "offers", + "relations", + "controller-timestamp", + "branches" + ] + }, + "History": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "statuses": { + "type": "array", + "items": { + "$ref": "#/definitions/DetailedStatus" + } + } + }, + "additionalProperties": false, + "required": [ + "statuses" + ] + }, + "LXDProfile": { + "type": "object", + "properties": { + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "description": { + "type": "string" + }, + "devices": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + } + } + } + }, + "additionalProperties": false, + "required": [ + "config", + "description", + "devices" + ] + }, + "MachineStatus": { + "type": "object", + "properties": { + "agent-status": { + "$ref": "#/definitions/DetailedStatus" + }, + "base": { + "$ref": "#/definitions/Base" + }, + "constraints": { + "type": "string" + }, + "containers": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/MachineStatus" + } + } + }, + "display-name": { + "type": "string" + }, + "dns-name": { + "type": "string" + }, + "hardware": { + "type": "string" + }, + "has-vote": { + "type": "boolean" + }, + "hostname": { + "type": "string" + }, + "id": { + "type": "string" + }, + "instance-id": { + "type": "string" + }, + "instance-status": { + "$ref": "#/definitions/DetailedStatus" + }, + "ip-addresses": { + "type": "array", + "items": { + "type": "string" + } + }, + "jobs": { + "type": "array", + "items": { + "type": "string" + } + }, + "lxd-profiles": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/LXDProfile" + } + } + }, + "modification-status": { + "$ref": "#/definitions/DetailedStatus" + }, + "network-interfaces": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/NetworkInterface" + } + } + }, + "primary-controller-machine": { + "type": "boolean" + }, + "wants-vote": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "agent-status", + "instance-status", + "modification-status", + "dns-name", + "instance-id", + "display-name", + "base", + "id", + "containers", + "constraints", + "hardware", + "jobs", + "has-vote", + "wants-vote" + ] + }, + "MeterStatus": { + "type": "object", + "properties": { + "color": { + "type": "string" + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "color", + "message" + ] + }, + "ModelStatusInfo": { + "type": "object", + "properties": { + "available-version": { + "type": "string" + }, + "cloud-tag": { + "type": "string" + }, + "meter-status": { + "$ref": "#/definitions/MeterStatus" + }, + "model-status": { + "$ref": "#/definitions/DetailedStatus" + }, + "name": { + "type": "string" + }, + "region": { + "type": "string" + }, + "sla": { + "type": "string" + }, + "type": { + "type": "string" + }, + "version": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "type", + "cloud-tag", + "version", + "available-version", + "model-status", + "meter-status", + "sla" + ] + }, + "NetworkInterface": { + "type": "object", + "properties": { + "dns-nameservers": { + "type": "array", + "items": { + "type": "string" + } + }, + "gateway": { + "type": "string" + }, + "ip-addresses": { + "type": "array", + "items": { + "type": "string" + } + }, + "is-up": { + "type": "boolean" + }, + "mac-address": { + "type": "string" + }, + "space": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "ip-addresses", + "mac-address", + "is-up" + ] + }, + "Number": { + "type": "object", + "properties": { + "Build": { + "type": "integer" + }, + "Major": { + "type": "integer" + }, + "Minor": { + "type": "integer" + }, + "Patch": { + "type": "integer" + }, + "Tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "Major", + "Minor", + "Tag", + "Patch", + "Build" + ] + }, + "RelationStatus": { + "type": "object", + "properties": { + "endpoints": { + "type": "array", + "items": { + "$ref": "#/definitions/EndpointStatus" + } + }, + "id": { + "type": "integer" + }, + "interface": { + "type": "string" + }, + "key": { + "type": "string" + }, + "scope": { + "type": "string" + }, + "status": { + "$ref": "#/definitions/DetailedStatus" + } + }, + "additionalProperties": false, + "required": [ + "id", + "key", + "interface", + "scope", + "endpoints", + "status" + ] + }, + "RemoteApplicationStatus": { + "type": "object", + "properties": { + "endpoints": { + "type": "array", + "items": { + "$ref": "#/definitions/RemoteEndpoint" + } + }, + "err": { + "$ref": "#/definitions/Error" + }, + "life": { + "type": "string" + }, + "offer-name": { + "type": "string" + }, + "offer-url": { + "type": "string" + }, + "relations": { + "type": "object", + "patternProperties": { + ".*": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "status": { + "$ref": "#/definitions/DetailedStatus" + } + }, + "additionalProperties": false, + "required": [ + "offer-url", + "offer-name", + "endpoints", + "life", + "relations", + "status" + ] + }, + "RemoteEndpoint": { + "type": "object", + "properties": { + "interface": { + "type": "string" + }, + "limit": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "role": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "role", + "interface", + "limit" + ] + }, + "StatusHistoryFilter": { + "type": "object", + "properties": { + "date": { + "type": "string", + "format": "date-time" + }, + "delta": { + "type": "integer" + }, + "exclude": { + "type": "array", + "items": { + "type": "string" + } + }, + "size": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "size", + "date", + "delta", + "exclude" + ] + }, + "StatusHistoryRequest": { + "type": "object", + "properties": { + "filter": { + "$ref": "#/definitions/StatusHistoryFilter" + }, + "historyKind": { + "type": "string" + }, + "size": { + "type": "integer" + }, + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "historyKind", + "size", + "filter", + "tag" + ] + }, + "StatusHistoryRequests": { + "type": "object", + "properties": { + "requests": { + "type": "array", + "items": { + "$ref": "#/definitions/StatusHistoryRequest" + } + } + }, + "additionalProperties": false, + "required": [ + "requests" + ] + }, + "StatusHistoryResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "history": { + "$ref": "#/definitions/History" + } + }, + "additionalProperties": false, + "required": [ + "history" + ] + }, + "StatusHistoryResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/StatusHistoryResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "StatusParams": { + "type": "object", + "properties": { + "include-storage": { + "type": "boolean" + }, + "patterns": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "patterns" + ] + }, + "StorageAttachmentDetails": { + "type": "object", + "properties": { + "life": { + "type": "string" + }, + "location": { + "type": "string" + }, + "machine-tag": { + "type": "string" + }, + "storage-tag": { + "type": "string" + }, + "unit-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "storage-tag", + "unit-tag", + "machine-tag" + ] + }, + "StorageDetails": { + "type": "object", + "properties": { + "attachments": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/StorageAttachmentDetails" + } + } + }, + "kind": { + "type": "integer" + }, + "life": { + "type": "string" + }, + "owner-tag": { + "type": "string" + }, + "persistent": { + "type": "boolean" + }, + "status": { + "$ref": "#/definitions/EntityStatus" + }, + "storage-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "storage-tag", + "owner-tag", + "kind", + "status", + "persistent" + ] + }, + "Tools": { + "type": "object", + "properties": { + "sha256": { + "type": "string" + }, + "size": { + "type": "integer" + }, + "url": { + "type": "string" + }, + "version": { + "$ref": "#/definitions/Binary" + } + }, + "additionalProperties": false, + "required": [ + "version", + "url", + "size" + ] + }, + "UnitStatus": { + "type": "object", + "properties": { + "address": { + "type": "string" + }, + "agent-status": { + "$ref": "#/definitions/DetailedStatus" + }, + "charm": { + "type": "string" + }, + "leader": { + "type": "boolean" + }, + "machine": { + "type": "string" + }, + "opened-ports": { + "type": "array", + "items": { + "type": "string" + } + }, + "provider-id": { + "type": "string" + }, + "public-address": { + "type": "string" + }, + "subordinates": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/UnitStatus" + } + } + }, + "workload-status": { + "$ref": "#/definitions/DetailedStatus" + }, + "workload-version": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "agent-status", + "workload-status", + "workload-version", + "machine", + "opened-ports", + "public-address", + "charm", + "subordinates" + ] + }, + "VolumeAttachmentDetails": { + "type": "object", + "properties": { + "VolumeAttachmentInfo": { + "$ref": "#/definitions/VolumeAttachmentInfo" + }, + "bus-address": { + "type": "string" + }, + "device-link": { + "type": "string" + }, + "device-name": { + "type": "string" + }, + "life": { + "type": "string" + }, + "plan-info": { + "$ref": "#/definitions/VolumeAttachmentPlanInfo" + }, + "read-only": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "VolumeAttachmentInfo" + ] + }, + "VolumeAttachmentInfo": { + "type": "object", + "properties": { + "bus-address": { + "type": "string" + }, + "device-link": { + "type": "string" + }, + "device-name": { + "type": "string" + }, + "plan-info": { + "$ref": "#/definitions/VolumeAttachmentPlanInfo" + }, + "read-only": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "VolumeAttachmentPlanInfo": { + "type": "object", + "properties": { + "device-attributes": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "device-type": { + "type": "string" + } + }, + "additionalProperties": false + }, + "VolumeDetails": { + "type": "object", + "properties": { + "info": { + "$ref": "#/definitions/VolumeInfo" + }, + "life": { + "type": "string" + }, + "machine-attachments": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/VolumeAttachmentDetails" + } + } + }, + "status": { + "$ref": "#/definitions/EntityStatus" + }, + "storage": { + "$ref": "#/definitions/StorageDetails" + }, + "unit-attachments": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/VolumeAttachmentDetails" + } + } + }, + "volume-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "volume-tag", + "info", + "status" + ] + }, + "VolumeInfo": { + "type": "object", + "properties": { + "hardware-id": { + "type": "string" + }, + "persistent": { + "type": "boolean" + }, + "pool": { + "type": "string" + }, + "size": { + "type": "integer" + }, + "volume-id": { + "type": "string" + }, + "wwn": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "volume-id", + "size", + "persistent" + ] + } + } + } + }, + { + "Name": "Cloud", + "Description": "CloudAPI implements the cloud interface and is the concrete implementation\nof the api end point.", + "Version": 7, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "controller-user" + ], + "Schema": { + "type": "object", + "properties": { + "AddCloud": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/AddCloudArgs" + } + }, + "description": "AddCloud adds a new cloud, different from the one managed by the controller." + }, + "AddCredentials": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/TaggedCredentials" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "AddCredentials adds new credentials.\nIn contrast to UpdateCredentials() below, the new credentials can be\nfor a cloud that the controller does not manage (this is required\nfor CAAS models)" + }, + "CheckCredentialsModels": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/TaggedCredentials" + }, + "Result": { + "$ref": "#/definitions/UpdateCredentialResults" + } + }, + "description": "CheckCredentialsModels validates supplied cloud credentials' content against\nmodels that currently use these credentials.\nIf there are any models that are using a credential and these models or their\ncloud instances are not going to be accessible with corresponding credential,\nthere will be detailed validation errors per model.\nThere's no Juju API client which uses this, but JAAS does," + }, + "Cloud": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/CloudResults" + } + }, + "description": "Cloud returns the cloud definitions for the specified clouds." + }, + "CloudInfo": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/CloudInfoResults" + } + }, + "description": "CloudInfo returns information about the specified clouds." + }, + "Clouds": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/CloudsResult" + } + }, + "description": "Clouds returns the definitions of all clouds supported by the controller\nthat the logged in user can see." + }, + "Credential": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/CloudCredentialResults" + } + }, + "description": "Credential returns the specified cloud credential for each tag, minus secrets." + }, + "CredentialContents": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/CloudCredentialArgs" + }, + "Result": { + "$ref": "#/definitions/CredentialContentResults" + } + }, + "description": "CredentialContents returns the specified cloud credentials,\nincluding the secrets if requested.\nIf no specific credential name/cloud was passed in, all credentials for this user\nare returned.\nOnly credential owner can see its contents as well as what models use it.\nController admin has no special superpowers here and is treated the same as all other users." + }, + "InstanceTypes": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/CloudInstanceTypesConstraints" + }, + "Result": { + "$ref": "#/definitions/InstanceTypesResults" + } + }, + "description": "InstanceTypes returns instance type information for the cloud and region\nin which the current model is deployed." + }, + "ListCloudInfo": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ListCloudsRequest" + }, + "Result": { + "$ref": "#/definitions/ListCloudInfoResults" + } + }, + "description": "ListCloudInfo returns clouds that the specified user has access to.\nController admins (superuser) can list clouds for any user.\nOther users can only ask about their own clouds." + }, + "ModifyCloudAccess": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ModifyCloudAccessRequest" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "ModifyCloudAccess changes the model access granted to users." + }, + "RemoveClouds": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "RemoveClouds removes the specified clouds from the controller.\nIf a cloud is in use (has models deployed to it), the removal will fail." + }, + "RevokeCredentialsCheckModels": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/RevokeCredentialArgs" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "RevokeCredentialsCheckModels revokes a set of cloud credentials.\nIf the credentials are used by any of the models, the credential deletion will be aborted.\nIf credential-in-use needs to be revoked nonetheless, this method allows the use of force." + }, + "UpdateCloud": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/UpdateCloudArgs" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "UpdateCloud updates an existing cloud that the controller knows about." + }, + "UpdateCredentialsCheckModels": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/UpdateCredentialArgs" + }, + "Result": { + "$ref": "#/definitions/UpdateCredentialResults" + } + }, + "description": "UpdateCredentialsCheckModels updates a set of cloud credentials' content.\nIf there are any models that are using a credential and these models\nare not going to be visible with updated credential content,\nthere will be detailed validation errors per model. Such model errors are returned\nseparately and do not contribute to the overall method error status.\nController admins can 'force' an update of the credential\nregardless of whether it is deemed valid or not." + }, + "UserCredentials": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/UserClouds" + }, + "Result": { + "$ref": "#/definitions/StringsResults" + } + }, + "description": "UserCredentials returns the cloud credentials for a set of users." + } + }, + "definitions": { + "AddCloudArgs": { + "type": "object", + "properties": { + "cloud": { + "$ref": "#/definitions/Cloud" + }, + "force": { + "type": "boolean" + }, + "name": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "cloud", + "name" + ] + }, + "Cloud": { + "type": "object", + "properties": { + "auth-types": { + "type": "array", + "items": { + "type": "string" + } + }, + "ca-certificates": { + "type": "array", + "items": { + "type": "string" + } + }, + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "endpoint": { + "type": "string" + }, + "host-cloud-region": { + "type": "string" + }, + "identity-endpoint": { + "type": "string" + }, + "is-controller-cloud": { + "type": "boolean" + }, + "region-config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + } + } + }, + "regions": { + "type": "array", + "items": { + "$ref": "#/definitions/CloudRegion" + } + }, + "skip-tls-verify": { + "type": "boolean" + }, + "storage-endpoint": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "type" + ] + }, + "CloudCredential": { + "type": "object", + "properties": { + "attrs": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "auth-type": { + "type": "string" + }, + "redacted": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "auth-type" + ] + }, + "CloudCredentialArg": { + "type": "object", + "properties": { + "cloud-name": { + "type": "string" + }, + "credential-name": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "cloud-name", + "credential-name" + ] + }, + "CloudCredentialArgs": { + "type": "object", + "properties": { + "credentials": { + "type": "array", + "items": { + "$ref": "#/definitions/CloudCredentialArg" + } + }, + "include-secrets": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "include-secrets" + ] + }, + "CloudCredentialResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "$ref": "#/definitions/CloudCredential" + } + }, + "additionalProperties": false + }, + "CloudCredentialResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/CloudCredentialResult" + } + } + }, + "additionalProperties": false + }, + "CloudDetails": { + "type": "object", + "properties": { + "auth-types": { + "type": "array", + "items": { + "type": "string" + } + }, + "endpoint": { + "type": "string" + }, + "identity-endpoint": { + "type": "string" + }, + "regions": { + "type": "array", + "items": { + "$ref": "#/definitions/CloudRegion" + } + }, + "storage-endpoint": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "type" + ] + }, + "CloudInfo": { + "type": "object", + "properties": { + "CloudDetails": { + "$ref": "#/definitions/CloudDetails" + }, + "users": { + "type": "array", + "items": { + "$ref": "#/definitions/CloudUserInfo" + } + } + }, + "additionalProperties": false, + "required": [ + "CloudDetails", + "users" + ] + }, + "CloudInfoResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "$ref": "#/definitions/CloudInfo" + } + }, + "additionalProperties": false + }, + "CloudInfoResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/CloudInfoResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "CloudInstanceTypesConstraint": { + "type": "object", + "properties": { + "cloud-tag": { + "type": "string" + }, + "constraints": { + "$ref": "#/definitions/Value" + }, + "region": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "cloud-tag", + "region" + ] + }, + "CloudInstanceTypesConstraints": { + "type": "object", + "properties": { + "constraints": { + "type": "array", + "items": { + "$ref": "#/definitions/CloudInstanceTypesConstraint" + } + } + }, + "additionalProperties": false, + "required": [ + "constraints" + ] + }, + "CloudRegion": { + "type": "object", + "properties": { + "endpoint": { + "type": "string" + }, + "identity-endpoint": { + "type": "string" + }, + "name": { + "type": "string" + }, + "storage-endpoint": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name" + ] + }, + "CloudResult": { + "type": "object", + "properties": { + "cloud": { + "$ref": "#/definitions/Cloud" + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "CloudResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/CloudResult" + } + } + }, + "additionalProperties": false + }, + "CloudUserInfo": { + "type": "object", + "properties": { + "access": { + "type": "string" + }, + "display-name": { + "type": "string" + }, + "user": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "user", + "display-name", + "access" + ] + }, + "CloudsResult": { + "type": "object", + "properties": { + "clouds": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/Cloud" + } + } + } + }, + "additionalProperties": false + }, + "ControllerCredentialInfo": { + "type": "object", + "properties": { + "content": { + "$ref": "#/definitions/CredentialContent" + }, + "models": { + "type": "array", + "items": { + "$ref": "#/definitions/ModelAccess" + } + } + }, + "additionalProperties": false + }, + "CredentialContent": { + "type": "object", + "properties": { + "attrs": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "auth-type": { + "type": "string" + }, + "cloud": { + "type": "string" + }, + "name": { + "type": "string" + }, + "valid": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "name", + "cloud", + "auth-type" + ] + }, + "CredentialContentResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "$ref": "#/definitions/ControllerCredentialInfo" + } + }, + "additionalProperties": false + }, + "CredentialContentResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/CredentialContentResult" + } + } + }, + "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": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ErrorResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "InstanceType": { + "type": "object", + "properties": { + "arches": { + "type": "array", + "items": { + "type": "string" + } + }, + "cost": { + "type": "integer" + }, + "cpu-cores": { + "type": "integer" + }, + "memory": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "root-disk": { + "type": "integer" + }, + "virt-type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "arches", + "cpu-cores", + "memory" + ] + }, + "InstanceTypesResult": { + "type": "object", + "properties": { + "cost-currency": { + "type": "string" + }, + "cost-divisor": { + "type": "integer" + }, + "cost-unit": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" + }, + "instance-types": { + "type": "array", + "items": { + "$ref": "#/definitions/InstanceType" + } + } + }, + "additionalProperties": false + }, + "InstanceTypesResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/InstanceTypesResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "ListCloudInfo": { + "type": "object", + "properties": { + "CloudDetails": { + "$ref": "#/definitions/CloudDetails" + }, + "user-access": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "CloudDetails", + "user-access" + ] + }, + "ListCloudInfoResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "$ref": "#/definitions/ListCloudInfo" + } + }, + "additionalProperties": false + }, + "ListCloudInfoResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ListCloudInfoResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "ListCloudsRequest": { + "type": "object", + "properties": { + "all": { + "type": "boolean" + }, + "user-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "user-tag" + ] + }, + "ModelAccess": { + "type": "object", + "properties": { + "access": { + "type": "string" + }, + "model": { + "type": "string" + } + }, + "additionalProperties": false + }, + "ModifyCloudAccess": { + "type": "object", + "properties": { + "access": { + "type": "string" + }, + "action": { + "type": "string" + }, + "cloud-tag": { + "type": "string" + }, + "user-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "user-tag", + "cloud-tag", + "action", + "access" + ] + }, + "ModifyCloudAccessRequest": { + "type": "object", + "properties": { + "changes": { + "type": "array", + "items": { + "$ref": "#/definitions/ModifyCloudAccess" + } + } + }, + "additionalProperties": false, + "required": [ + "changes" + ] + }, + "RevokeCredentialArg": { + "type": "object", + "properties": { + "force": { + "type": "boolean" + }, + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag", + "force" + ] + }, + "RevokeCredentialArgs": { + "type": "object", + "properties": { + "credentials": { + "type": "array", + "items": { + "$ref": "#/definitions/RevokeCredentialArg" + } + } + }, + "additionalProperties": false, + "required": [ + "credentials" + ] + }, + "StringsResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "StringsResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/StringsResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "TaggedCredential": { + "type": "object", + "properties": { + "credential": { + "$ref": "#/definitions/CloudCredential" + }, + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag", + "credential" + ] + }, + "TaggedCredentials": { + "type": "object", + "properties": { + "credentials": { + "type": "array", + "items": { + "$ref": "#/definitions/TaggedCredential" + } + } + }, + "additionalProperties": false + }, + "UpdateCloudArgs": { + "type": "object", + "properties": { + "clouds": { + "type": "array", + "items": { + "$ref": "#/definitions/AddCloudArgs" + } + } + }, + "additionalProperties": false, + "required": [ + "clouds" + ] + }, + "UpdateCredentialArgs": { + "type": "object", + "properties": { + "credentials": { + "type": "array", + "items": { + "$ref": "#/definitions/TaggedCredential" + } + }, + "force": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "credentials", + "force" + ] + }, + "UpdateCredentialModelResult": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + }, + "name": { + "type": "string" + }, + "uuid": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uuid", + "name" + ] + }, + "UpdateCredentialResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "models": { + "type": "array", + "items": { + "$ref": "#/definitions/UpdateCredentialModelResult" + } + }, + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag" + ] + }, + "UpdateCredentialResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/UpdateCredentialResult" + } + } + }, + "additionalProperties": false + }, + "UserCloud": { + "type": "object", + "properties": { + "cloud-tag": { + "type": "string" + }, + "user-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "user-tag", + "cloud-tag" + ] + }, + "UserClouds": { + "type": "object", + "properties": { + "user-clouds": { + "type": "array", + "items": { + "$ref": "#/definitions/UserCloud" + } + } + }, + "additionalProperties": false + }, + "Value": { + "type": "object", + "properties": { + "allocate-public-ip": { + "type": "boolean" + }, + "arch": { + "type": "string" + }, + "container": { + "type": "string" + }, + "cores": { + "type": "integer" + }, + "cpu-power": { + "type": "integer" + }, + "image-id": { + "type": "string" + }, + "instance-role": { + "type": "string" + }, + "instance-type": { + "type": "string" + }, + "mem": { + "type": "integer" + }, + "root-disk": { + "type": "integer" + }, + "root-disk-source": { + "type": "string" + }, + "spaces": { + "type": "array", + "items": { + "type": "string" + } + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "virt-type": { + "type": "string" + }, + "zones": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + } + } + } + }, + { + "Name": "Controller", + "Description": "ControllerAPI provides the Controller API.", + "Version": 11, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "controller-user" + ], + "Schema": { + "type": "object", + "properties": { + "AllModels": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/UserModelList" + } + }, + "description": "AllModels allows controller administrators to get the list of all the\nmodels in the controller." + }, + "CloudSpec": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/CloudSpecResults" + } + }, + "description": "CloudSpec returns the model's cloud spec." + }, + "ConfigSet": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ControllerConfigSet" + } + }, + "description": "ConfigSet changes the value of specified controller configuration\nsettings. Only some settings can be changed after bootstrap.\nSettings that aren't specified in the params are left unchanged." + }, + "ControllerAPIInfoForModels": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ControllerAPIInfoResults" + } + }, + "description": "ControllerAPIInfoForModels returns the controller api connection details for the specified models." + }, + "ControllerConfig": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/ControllerConfigResult" + } + }, + "description": "ControllerConfig returns the controller's configuration." + }, + "ControllerVersion": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/ControllerVersionResults" + } + }, + "description": "ControllerVersion returns the version information associated with this\ncontroller binary.\n\nNOTE: the implementation intentionally does not check for SuperuserAccess\nas the Version is known even to users with login access." + }, + "DashboardConnectionInfo": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/DashboardConnectionInfo" + } + }, + "description": "DashboardConnectionInfo returns the connection information for a client to\nconnect to the Juju Dashboard including any proxying information." + }, + "DestroyController": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/DestroyControllerArgs" + } + }, + "description": "DestroyController destroys the controller.\n\nIf the args specify the destruction of the models, this method will\nattempt to do so. Otherwise, if the controller has any non-empty,\nnon-Dead hosted models, then an error with the code\nparams.CodeHasHostedModels will be transmitted." + }, + "GetCloudSpec": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ModelTag" + }, + "Result": { + "$ref": "#/definitions/CloudSpecResult" + } + }, + "description": "GetCloudSpec constructs the CloudSpec for a validated and authorized model." + }, + "GetControllerAccess": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/UserAccessResults" + } + }, + "description": "GetControllerAccess returns the level of access the specified users\nhave on the controller." + }, + "HostedModelConfigs": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/HostedModelConfigsResults" + } + }, + "description": "HostedModelConfigs returns all the information that the client needs in\norder to connect directly with the host model's provider and destroy it\ndirectly." + }, + "IdentityProviderURL": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/StringResult" + } + }, + "description": "IdentityProviderURL returns the URL of the configured external identity\nprovider for this controller or an empty string if no external identity\nprovider has been configured when the controller was bootstrapped.\n\nNOTE: the implementation intentionally does not check for SuperuserAccess\nas the URL is known even to users with login access." + }, + "InitiateMigration": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/InitiateMigrationArgs" + }, + "Result": { + "$ref": "#/definitions/InitiateMigrationResults" + } + }, + "description": "InitiateMigration attempts to begin the migration of one or\nmore models to other controllers." + }, + "ListBlockedModels": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/ModelBlockInfoList" + } + }, + "description": "ListBlockedModels returns a list of all models on the controller\nwhich have a block in place. The resulting slice is sorted by model\nname, then owner. Callers must be controller administrators to retrieve the\nlist." + }, + "ModelConfig": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/ModelConfigResults" + } + }, + "description": "ModelConfig returns the model config for the controller\nmodel. For information on the current model, use\nclient.ModelGet" + }, + "ModelStatus": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ModelStatusResults" + } + }, + "description": "ModelStatus returns a summary of the model." + }, + "ModifyControllerAccess": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ModifyControllerAccessRequest" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "ModifyControllerAccess changes the model access granted to users." + }, + "MongoVersion": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/StringResult" + } + }, + "description": "MongoVersion allows the introspection of the mongo version per controller" + }, + "RemoveBlocks": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/RemoveBlocksArgs" + } + }, + "description": "RemoveBlocks removes all the blocks in the controller." + }, + "WatchAllModelSummaries": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/SummaryWatcherID" + } + }, + "description": "WatchAllModelSummaries starts watching the summary updates from the cache.\nThis method is superuser access only, and watches all models in the\ncontroller." + }, + "WatchAllModels": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/AllWatcherId" + } + }, + "description": "WatchAllModels starts watching events for all models in the\ncontroller. The returned AllWatcherId should be used with Next on the\nAllModelWatcher endpoint to receive deltas." + }, + "WatchCloudSpecsChanges": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/NotifyWatchResults" + } + }, + "description": "WatchCloudSpecsChanges returns a watcher for cloud spec changes." + }, + "WatchModelSummaries": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/SummaryWatcherID" + } + }, + "description": "WatchModelSummaries starts watching the summary updates from the cache.\nOnly models that the user has access to are returned." + } + }, + "definitions": { + "AllWatcherId": { + "type": "object", + "properties": { + "watcher-id": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "watcher-id" + ] + }, + "CloudCredential": { + "type": "object", + "properties": { + "attrs": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "auth-type": { + "type": "string" + }, + "redacted": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "auth-type" + ] + }, + "CloudSpec": { + "type": "object", + "properties": { + "cacertificates": { + "type": "array", + "items": { + "type": "string" + } + }, + "credential": { + "$ref": "#/definitions/CloudCredential" + }, + "endpoint": { + "type": "string" + }, + "identity-endpoint": { + "type": "string" + }, + "is-controller-cloud": { + "type": "boolean" + }, + "name": { + "type": "string" + }, + "region": { + "type": "string" + }, + "skip-tls-verify": { + "type": "boolean" + }, + "storage-endpoint": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "type", + "name" + ] + }, + "CloudSpecResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "$ref": "#/definitions/CloudSpec" + } + }, + "additionalProperties": false + }, + "CloudSpecResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/CloudSpecResult" + } + } + }, + "additionalProperties": false + }, + "ConfigValue": { + "type": "object", + "properties": { + "source": { + "type": "string" + }, + "value": { + "type": "object", + "additionalProperties": true + } + }, + "additionalProperties": false, + "required": [ + "value", + "source" + ] + }, + "ControllerAPIInfoResult": { + "type": "object", + "properties": { + "addresses": { + "type": "array", + "items": { + "type": "string" + } + }, + "cacert": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "addresses", + "cacert" + ] + }, + "ControllerAPIInfoResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ControllerAPIInfoResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "ControllerConfigResult": { + "type": "object", + "properties": { + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + } + }, + "additionalProperties": false, + "required": [ + "config" + ] + }, + "ControllerConfigSet": { + "type": "object", + "properties": { + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + } + }, + "additionalProperties": false, + "required": [ + "config" + ] + }, + "ControllerVersionResults": { + "type": "object", + "properties": { + "git-commit": { + "type": "string" + }, + "version": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "version", + "git-commit" + ] + }, + "DashboardConnectionInfo": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "proxy-connection": { + "$ref": "#/definitions/Proxy" + }, + "ssh-connection": { + "$ref": "#/definitions/DashboardConnectionSSHTunnel" + } + }, + "additionalProperties": false, + "required": [ + "proxy-connection", + "ssh-connection" + ] + }, + "DashboardConnectionSSHTunnel": { + "type": "object", + "properties": { + "entity": { + "type": "string" + }, + "host": { + "type": "string" + }, + "model": { + "type": "string" + }, + "port": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "host", + "port" + ] + }, + "DestroyControllerArgs": { + "type": "object", + "properties": { + "destroy-models": { + "type": "boolean" + }, + "destroy-storage": { + "type": "boolean" + }, + "force": { + "type": "boolean" + }, + "max-wait": { + "type": "integer" + }, + "model-timeout": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "destroy-models" + ] + }, + "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": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ErrorResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "HostedModelConfig": { + "type": "object", + "properties": { + "cloud-spec": { + "$ref": "#/definitions/CloudSpec" + }, + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "error": { + "$ref": "#/definitions/Error" + }, + "name": { + "type": "string" + }, + "owner": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "owner" + ] + }, + "HostedModelConfigsResults": { + "type": "object", + "properties": { + "models": { + "type": "array", + "items": { + "$ref": "#/definitions/HostedModelConfig" + } + } + }, + "additionalProperties": false, + "required": [ + "models" + ] + }, + "InitiateMigrationArgs": { + "type": "object", + "properties": { + "specs": { + "type": "array", + "items": { + "$ref": "#/definitions/MigrationSpec" + } + } + }, + "additionalProperties": false, + "required": [ + "specs" + ] + }, + "InitiateMigrationResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "migration-id": { + "type": "string" + }, + "model-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "model-tag", + "migration-id" + ] + }, + "InitiateMigrationResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/InitiateMigrationResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "MachineHardware": { + "type": "object", + "properties": { + "arch": { + "type": "string" + }, + "availability-zone": { + "type": "string" + }, + "cores": { + "type": "integer" + }, + "cpu-power": { + "type": "integer" + }, + "mem": { + "type": "integer" + }, + "root-disk": { + "type": "integer" + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "virt-type": { + "type": "string" + } + }, + "additionalProperties": false + }, + "MigrationSpec": { + "type": "object", + "properties": { + "model-tag": { + "type": "string" + }, + "target-info": { + "$ref": "#/definitions/MigrationTargetInfo" + } + }, + "additionalProperties": false, + "required": [ + "model-tag", + "target-info" + ] + }, + "MigrationTargetInfo": { + "type": "object", + "properties": { + "addrs": { + "type": "array", + "items": { + "type": "string" + } + }, + "auth-tag": { + "type": "string" + }, + "ca-cert": { + "type": "string" + }, + "controller-alias": { + "type": "string" + }, + "controller-tag": { + "type": "string" + }, + "macaroons": { + "type": "string" + }, + "password": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "controller-tag", + "addrs", + "ca-cert", + "auth-tag" + ] + }, + "Model": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "owner-tag": { + "type": "string" + }, + "type": { + "type": "string" + }, + "uuid": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "uuid", + "type", + "owner-tag" + ] + }, + "ModelApplicationInfo": { + "type": "object", + "properties": { + "name": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name" + ] + }, + "ModelBlockInfo": { + "type": "object", + "properties": { + "blocks": { + "type": "array", + "items": { + "type": "string" + } + }, + "model-uuid": { + "type": "string" + }, + "name": { + "type": "string" + }, + "owner-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "model-uuid", + "owner-tag", + "blocks" + ] + }, + "ModelBlockInfoList": { + "type": "object", + "properties": { + "models": { + "type": "array", + "items": { + "$ref": "#/definitions/ModelBlockInfo" + } + } + }, + "additionalProperties": false + }, + "ModelConfigResults": { + "type": "object", + "properties": { + "config": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/ConfigValue" + } + } + } + }, + "additionalProperties": false, + "required": [ + "config" + ] + }, + "ModelFilesystemInfo": { + "type": "object", + "properties": { + "detachable": { + "type": "boolean" + }, + "id": { + "type": "string" + }, + "message": { + "type": "string" + }, + "provider-id": { + "type": "string" + }, + "status": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "id" + ] + }, + "ModelMachineInfo": { + "type": "object", + "properties": { + "display-name": { + "type": "string" + }, + "ha-primary": { + "type": "boolean" + }, + "hardware": { + "$ref": "#/definitions/MachineHardware" + }, + "has-vote": { + "type": "boolean" + }, + "id": { + "type": "string" + }, + "instance-id": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "string" + }, + "wants-vote": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "id" + ] + }, + "ModelStatus": { + "type": "object", + "properties": { + "application-count": { + "type": "integer" + }, + "applications": { + "type": "array", + "items": { + "$ref": "#/definitions/ModelApplicationInfo" + } + }, + "error": { + "$ref": "#/definitions/Error" + }, + "filesystems": { + "type": "array", + "items": { + "$ref": "#/definitions/ModelFilesystemInfo" + } + }, + "hosted-machine-count": { + "type": "integer" + }, + "life": { + "type": "string" + }, + "machines": { + "type": "array", + "items": { + "$ref": "#/definitions/ModelMachineInfo" + } + }, + "model-tag": { + "type": "string" + }, + "owner-tag": { + "type": "string" + }, + "type": { + "type": "string" + }, + "unit-count": { + "type": "integer" + }, + "volumes": { + "type": "array", + "items": { + "$ref": "#/definitions/ModelVolumeInfo" + } + } + }, + "additionalProperties": false, + "required": [ + "model-tag", + "life", + "type", + "hosted-machine-count", + "application-count", + "unit-count", + "owner-tag" + ] + }, + "ModelStatusResults": { + "type": "object", + "properties": { + "models": { + "type": "array", + "items": { + "$ref": "#/definitions/ModelStatus" + } + } + }, + "additionalProperties": false, + "required": [ + "models" + ] + }, + "ModelTag": { + "type": "object", + "additionalProperties": false + }, + "ModelVolumeInfo": { + "type": "object", + "properties": { + "detachable": { + "type": "boolean" + }, + "id": { + "type": "string" + }, + "message": { + "type": "string" + }, + "provider-id": { + "type": "string" + }, + "status": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "id" + ] + }, + "ModifyControllerAccess": { + "type": "object", + "properties": { + "access": { + "type": "string" + }, + "action": { + "type": "string" + }, + "user-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "user-tag", + "action", + "access" + ] + }, + "ModifyControllerAccessRequest": { + "type": "object", + "properties": { + "changes": { + "type": "array", + "items": { + "$ref": "#/definitions/ModifyControllerAccess" + } + } + }, + "additionalProperties": false, + "required": [ + "changes" + ] + }, + "NotifyWatchResult": { + "type": "object", + "properties": { + "NotifyWatcherId": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "NotifyWatcherId" + ] + }, + "NotifyWatchResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/NotifyWatchResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "Proxy": { + "type": "object", + "properties": { + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "config", + "type" + ] + }, + "RemoveBlocksArgs": { + "type": "object", + "properties": { + "all": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "all" + ] + }, + "StringResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "result" + ] + }, + "SummaryWatcherID": { + "type": "object", + "properties": { + "watcher-id": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "watcher-id" + ] + }, + "UserAccess": { + "type": "object", + "properties": { + "access": { + "type": "string" + }, + "user-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "user-tag", + "access" + ] + }, + "UserAccessResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "$ref": "#/definitions/UserAccess" + } + }, + "additionalProperties": false + }, + "UserAccessResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/UserAccessResult" + } + } + }, + "additionalProperties": false + }, + "UserModel": { + "type": "object", + "properties": { + "last-connection": { + "type": "string", + "format": "date-time" + }, + "model": { + "$ref": "#/definitions/Model" + } + }, + "additionalProperties": false, + "required": [ + "model", + "last-connection" + ] + }, + "UserModelList": { + "type": "object", + "properties": { + "user-models": { + "type": "array", + "items": { + "$ref": "#/definitions/UserModel" + } + } + }, + "additionalProperties": false, + "required": [ + "user-models" + ] + } + } + } + }, + { + "Name": "CredentialManager", + "Description": "", + "Version": 1, + "AvailableTo": [ + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "InvalidateModelCredential": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/InvalidateCredentialArg" + }, + "Result": { + "$ref": "#/definitions/ErrorResult" + } + }, + "description": "InvalidateModelCredential marks the cloud credential for this model as invalid." + } + }, + "definitions": { + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "InvalidateCredentialArg": { + "type": "object", + "properties": { + "reason": { + "type": "string" + } + }, + "additionalProperties": false + } + } + } + }, + { + "Name": "HighAvailability", + "Description": "HighAvailabilityAPI implements the HighAvailability interface and is the concrete\nimplementation of the api end point.", + "Version": 2, + "AvailableTo": [ + "controller-user", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "EnableHA": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ControllersSpecs" + }, + "Result": { + "$ref": "#/definitions/ControllersChangeResults" + } + }, + "description": "EnableHA adds controller machines as necessary to ensure the\ncontroller has the number of machines specified." + } + }, + "definitions": { + "ControllersChangeResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "$ref": "#/definitions/ControllersChanges" + } + }, + "additionalProperties": false, + "required": [ + "result" + ] + }, + "ControllersChangeResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ControllersChangeResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "ControllersChanges": { + "type": "object", + "properties": { + "added": { + "type": "array", + "items": { + "type": "string" + } + }, + "converted": { + "type": "array", + "items": { + "type": "string" + } + }, + "maintained": { + "type": "array", + "items": { + "type": "string" + } + }, + "removed": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "ControllersSpec": { + "type": "object", + "properties": { + "constraints": { + "$ref": "#/definitions/Value" + }, + "num-controllers": { + "type": "integer" + }, + "placement": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "num-controllers" + ] + }, + "ControllersSpecs": { + "type": "object", + "properties": { + "specs": { + "type": "array", + "items": { + "$ref": "#/definitions/ControllersSpec" + } + } + }, + "additionalProperties": false, + "required": [ + "specs" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "Value": { + "type": "object", + "properties": { + "allocate-public-ip": { + "type": "boolean" + }, + "arch": { + "type": "string" + }, + "container": { + "type": "string" + }, + "cores": { + "type": "integer" + }, + "cpu-power": { + "type": "integer" + }, + "image-id": { + "type": "string" + }, + "instance-role": { + "type": "string" + }, + "instance-type": { + "type": "string" + }, + "mem": { + "type": "integer" + }, + "root-disk": { + "type": "integer" + }, + "root-disk-source": { + "type": "string" + }, + "spaces": { + "type": "array", + "items": { + "type": "string" + } + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "virt-type": { + "type": "string" + }, + "zones": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + } + } + } + }, + { + "Name": "ImageMetadataManager", + "Description": "API is the concrete implementation of the api end point\nfor loud image metadata manipulations.", + "Version": 1, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "Delete": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/MetadataImageIds" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "Delete deletes cloud image metadata for given image ids.\nIt supports bulk calls." + }, + "List": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ImageMetadataFilter" + }, + "Result": { + "$ref": "#/definitions/ListCloudImageMetadataResult" + } + }, + "description": "List returns all found cloud image metadata that satisfy\ngiven filter.\nReturned list contains metadata ordered by priority." + }, + "Save": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/MetadataSaveParams" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "Save stores given cloud image metadata.\nIt supports bulk calls." + } + }, + "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" + }, + "source": { + "type": "string" + }, + "stream": { + "type": "string" + }, + "version": { + "type": "string" + }, + "virt-type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "image-id", + "region", + "version", + "arch", + "source", + "priority" + ] + }, + "CloudImageMetadataList": { + "type": "object", + "properties": { + "metadata": { + "type": "array", + "items": { + "$ref": "#/definitions/CloudImageMetadata" + } + } + }, + "additionalProperties": false + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "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" + }, + "stream": { + "type": "string" + }, + "versions": { + "type": "array", + "items": { + "type": "string" + } + }, + "virt-type": { + "type": "string" + } + }, + "additionalProperties": false + }, + "ListCloudImageMetadataResult": { + "type": "object", + "properties": { + "result": { + "type": "array", + "items": { + "$ref": "#/definitions/CloudImageMetadata" + } + } + }, + "additionalProperties": false, + "required": [ + "result" + ] + }, + "MetadataImageIds": { + "type": "object", + "properties": { + "image-ids": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "image-ids" + ] + }, + "MetadataSaveParams": { + "type": "object", + "properties": { + "metadata": { + "type": "array", + "items": { + "$ref": "#/definitions/CloudImageMetadataList" + } + } + }, + "additionalProperties": false + } + } + } + }, + { + "Name": "KeyManager", + "Description": "KeyManagerAPI provides api endpoints for manipulating ssh keys", + "Version": 1, + "AvailableTo": [ + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "AddKeys": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ModifyUserSSHKeys" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "AddKeys adds new authorised ssh keys for the specified user." + }, + "DeleteKeys": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ModifyUserSSHKeys" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "DeleteKeys deletes the authorised ssh keys for the specified user." + }, + "ImportKeys": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ModifyUserSSHKeys" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "ImportKeys imports new authorised ssh keys from the specified key ids for the specified user." + }, + "ListKeys": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ListSSHKeys" + }, + "Result": { + "$ref": "#/definitions/StringsResults" + } + }, + "description": "ListKeys returns the authorised ssh keys for the specified users." + } + }, + "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": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ErrorResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "ListSSHKeys": { + "type": "object", + "properties": { + "entities": { + "$ref": "#/definitions/Entities" + }, + "mode": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "entities", + "mode" + ] + }, + "ModifyUserSSHKeys": { + "type": "object", + "properties": { + "ssh-keys": { + "type": "array", + "items": { + "type": "string" + } + }, + "user": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "user", + "ssh-keys" + ] + }, + "StringsResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "StringsResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/StringsResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + } + } + } + }, + { + "Name": "MachineManager", + "Description": "MachineManagerAPI provides access to the MachineManager API facade.", + "Version": 10, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "AddMachines": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/AddMachines" + }, + "Result": { + "$ref": "#/definitions/AddMachinesResults" + } + }, + "description": "AddMachines adds new machines with the supplied parameters.\nThe args will contain Base info." + }, + "DestroyMachineWithParams": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/DestroyMachinesParams" + }, + "Result": { + "$ref": "#/definitions/DestroyMachineResults" + } + }, + "description": "DestroyMachineWithParams removes a set of machines from the model." + }, + "GetUpgradeSeriesMessages": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/UpgradeSeriesNotificationParams" + }, + "Result": { + "$ref": "#/definitions/StringsResults" + } + }, + "description": "GetUpgradeSeriesMessages returns all new messages associated with upgrade\nseries events. Messages that have already been retrieved once are not\nreturned by this method." + }, + "InstanceTypes": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ModelInstanceTypesConstraints" + }, + "Result": { + "$ref": "#/definitions/InstanceTypesResults" + } + }, + "description": "InstanceTypes returns instance type information for the cloud and region\nin which the current model is deployed." + }, + "ProvisioningScript": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ProvisioningScriptParams" + }, + "Result": { + "$ref": "#/definitions/ProvisioningScriptResult" + } + }, + "description": "ProvisioningScript returns a shell script that, when run,\nprovisions a machine agent on the machine executing the script." + }, + "RetryProvisioning": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/RetryProvisioningArgs" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "RetryProvisioning marks a provisioning error as transient on the machines." + }, + "UpgradeSeriesComplete": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/UpdateChannelArg" + }, + "Result": { + "$ref": "#/definitions/ErrorResult" + } + }, + "description": "UpgradeSeriesComplete marks a machine as having completed a managed series\nupgrade." + }, + "UpgradeSeriesPrepare": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/UpdateChannelArg" + }, + "Result": { + "$ref": "#/definitions/ErrorResult" + } + }, + "description": "UpgradeSeriesPrepare prepares a machine for a OS series upgrade." + }, + "UpgradeSeriesValidate": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/UpdateChannelArgs" + }, + "Result": { + "$ref": "#/definitions/UpgradeSeriesUnitsResults" + } + }, + "description": "UpgradeSeriesValidate validates that the incoming arguments correspond to a\nvalid series upgrade for the target machine.\nIf they do, a list of the machine's current units is returned for use in\nsoliciting user confirmation of the command." + }, + "WatchUpgradeSeriesNotifications": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/NotifyWatchResults" + } + }, + "description": "WatchUpgradeSeriesNotifications returns a watcher that fires on upgrade\nseries events." + } + }, + "definitions": { + "AddMachineParams": { + "type": "object", + "properties": { + "addresses": { + "type": "array", + "items": { + "$ref": "#/definitions/Address" + } + }, + "base": { + "$ref": "#/definitions/Base" + }, + "constraints": { + "$ref": "#/definitions/Value" + }, + "container-type": { + "type": "string" + }, + "disks": { + "type": "array", + "items": { + "$ref": "#/definitions/Constraints" + } + }, + "hardware-characteristics": { + "$ref": "#/definitions/HardwareCharacteristics" + }, + "instance-id": { + "type": "string" + }, + "jobs": { + "type": "array", + "items": { + "type": "string" + } + }, + "nonce": { + "type": "string" + }, + "parent-id": { + "type": "string" + }, + "placement": { + "$ref": "#/definitions/Placement" + } + }, + "additionalProperties": false, + "required": [ + "constraints", + "jobs", + "parent-id", + "container-type", + "instance-id", + "nonce", + "hardware-characteristics", + "addresses" + ] + }, + "AddMachines": { + "type": "object", + "properties": { + "params": { + "type": "array", + "items": { + "$ref": "#/definitions/AddMachineParams" + } + } + }, + "additionalProperties": false, + "required": [ + "params" + ] + }, + "AddMachinesResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "machine": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "machine" + ] + }, + "AddMachinesResults": { + "type": "object", + "properties": { + "machines": { + "type": "array", + "items": { + "$ref": "#/definitions/AddMachinesResult" + } + } + }, + "additionalProperties": false, + "required": [ + "machines" + ] + }, + "Address": { + "type": "object", + "properties": { + "cidr": { + "type": "string" + }, + "config-type": { + "type": "string" + }, + "is-secondary": { + "type": "boolean" + }, + "scope": { + "type": "string" + }, + "space-id": { + "type": "string" + }, + "space-name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "value", + "type", + "scope" + ] + }, + "Base": { + "type": "object", + "properties": { + "channel": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "channel" + ] + }, + "Constraints": { + "type": "object", + "properties": { + "Count": { + "type": "integer" + }, + "Pool": { + "type": "string" + }, + "Size": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "Pool", + "Size", + "Count" + ] + }, + "DestroyMachineInfo": { + "type": "object", + "properties": { + "destroyed-containers": { + "type": "array", + "items": { + "$ref": "#/definitions/DestroyMachineResult" + } + }, + "destroyed-storage": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + }, + "destroyed-units": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + }, + "detached-storage": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + }, + "machine-id": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "machine-id" + ] + }, + "DestroyMachineResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "info": { + "$ref": "#/definitions/DestroyMachineInfo" + } + }, + "additionalProperties": false + }, + "DestroyMachineResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/DestroyMachineResult" + } + } + }, + "additionalProperties": false + }, + "DestroyMachinesParams": { + "type": "object", + "properties": { + "dry-run": { + "type": "boolean" + }, + "force": { + "type": "boolean" + }, + "keep": { + "type": "boolean" + }, + "machine-tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "max-wait": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "machine-tags" + ] + }, + "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": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ErrorResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "HardwareCharacteristics": { + "type": "object", + "properties": { + "arch": { + "type": "string" + }, + "availability-zone": { + "type": "string" + }, + "cpu-cores": { + "type": "integer" + }, + "cpu-power": { + "type": "integer" + }, + "mem": { + "type": "integer" + }, + "root-disk": { + "type": "integer" + }, + "root-disk-source": { + "type": "string" + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "virt-type": { + "type": "string" + } + }, + "additionalProperties": false + }, + "InstanceType": { + "type": "object", + "properties": { + "arches": { + "type": "array", + "items": { + "type": "string" + } + }, + "cost": { + "type": "integer" + }, + "cpu-cores": { + "type": "integer" + }, + "memory": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "root-disk": { + "type": "integer" + }, + "virt-type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "arches", + "cpu-cores", + "memory" + ] + }, + "InstanceTypesResult": { + "type": "object", + "properties": { + "cost-currency": { + "type": "string" + }, + "cost-divisor": { + "type": "integer" + }, + "cost-unit": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" + }, + "instance-types": { + "type": "array", + "items": { + "$ref": "#/definitions/InstanceType" + } + } + }, + "additionalProperties": false + }, + "InstanceTypesResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/InstanceTypesResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "ModelInstanceTypesConstraint": { + "type": "object", + "properties": { + "value": { + "$ref": "#/definitions/Value" + } + }, + "additionalProperties": false + }, + "ModelInstanceTypesConstraints": { + "type": "object", + "properties": { + "constraints": { + "type": "array", + "items": { + "$ref": "#/definitions/ModelInstanceTypesConstraint" + } + } + }, + "additionalProperties": false, + "required": [ + "constraints" + ] + }, + "NotifyWatchResult": { + "type": "object", + "properties": { + "NotifyWatcherId": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "NotifyWatcherId" + ] + }, + "NotifyWatchResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/NotifyWatchResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "Placement": { + "type": "object", + "properties": { + "directive": { + "type": "string" + }, + "scope": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "scope", + "directive" + ] + }, + "ProvisioningScriptParams": { + "type": "object", + "properties": { + "data-dir": { + "type": "string" + }, + "disable-package-commands": { + "type": "boolean" + }, + "machine-id": { + "type": "string" + }, + "nonce": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "machine-id", + "nonce", + "data-dir", + "disable-package-commands" + ] + }, + "ProvisioningScriptResult": { + "type": "object", + "properties": { + "script": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "script" + ] + }, + "RetryProvisioningArgs": { + "type": "object", + "properties": { + "all": { + "type": "boolean" + }, + "machines": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "all" + ] + }, + "StringsResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "StringsResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/StringsResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "UpdateChannelArg": { + "type": "object", + "properties": { + "channel": { + "type": "string" + }, + "force": { + "type": "boolean" + }, + "tag": { + "$ref": "#/definitions/Entity" + } + }, + "additionalProperties": false, + "required": [ + "tag", + "force", + "channel" + ] + }, + "UpdateChannelArgs": { + "type": "object", + "properties": { + "args": { + "type": "array", + "items": { + "$ref": "#/definitions/UpdateChannelArg" + } + } + }, + "additionalProperties": false, + "required": [ + "args" + ] + }, + "UpgradeSeriesNotificationParam": { + "type": "object", + "properties": { + "entity": { + "$ref": "#/definitions/Entity" + }, + "watcher-id": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "entity", + "watcher-id" + ] + }, + "UpgradeSeriesNotificationParams": { + "type": "object", + "properties": { + "params": { + "type": "array", + "items": { + "$ref": "#/definitions/UpgradeSeriesNotificationParam" + } + } + }, + "additionalProperties": false, + "required": [ + "params" + ] + }, + "UpgradeSeriesUnitsResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "unit-names": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "unit-names" + ] + }, + "UpgradeSeriesUnitsResults": { + "type": "object", + "properties": { + "Results": { + "type": "array", + "items": { + "$ref": "#/definitions/UpgradeSeriesUnitsResult" + } + } + }, + "additionalProperties": false, + "required": [ + "Results" + ] + }, + "Value": { + "type": "object", + "properties": { + "allocate-public-ip": { + "type": "boolean" + }, + "arch": { + "type": "string" + }, + "container": { + "type": "string" + }, + "cores": { + "type": "integer" + }, + "cpu-power": { + "type": "integer" + }, + "image-id": { + "type": "string" + }, + "instance-role": { + "type": "string" + }, + "instance-type": { + "type": "string" + }, + "mem": { + "type": "integer" + }, + "root-disk": { + "type": "integer" + }, + "root-disk-source": { + "type": "string" + }, + "spaces": { + "type": "array", + "items": { + "type": "string" + } + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "virt-type": { + "type": "string" + }, + "zones": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + } + } + } + }, + { + "Name": "MetricsDebug", + "Description": "MetricsDebugAPI implements the metricsdebug interface and is the concrete\nimplementation of the api end point.", + "Version": 2, + "AvailableTo": [ + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "GetMetrics": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/MetricResults" + } + }, + "description": "GetMetrics returns all metrics stored by the state server." + }, + "SetMeterStatus": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/MeterStatusParams" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "SetMeterStatus sets meter statuses for entities." + } + }, + "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" + ] + }, + "EntityMetrics": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "metrics": { + "type": "array", + "items": { + "$ref": "#/definitions/MetricResult" + } + } + }, + "additionalProperties": false + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ErrorResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "MeterStatusParam": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "string" + }, + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag", + "code" + ] + }, + "MeterStatusParams": { + "type": "object", + "properties": { + "statues": { + "type": "array", + "items": { + "$ref": "#/definitions/MeterStatusParam" + } + } + }, + "additionalProperties": false, + "required": [ + "statues" + ] + }, + "MetricResult": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "labels": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "time": { + "type": "string", + "format": "date-time" + }, + "unit": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "time", + "key", + "value", + "unit", + "labels" + ] + }, + "MetricResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/EntityMetrics" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + } + } + } + }, + { + "Name": "ModelConfig", + "Description": "ModelConfigAPIV3 is currently the latest.", + "Version": 3, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "controller-user", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "GetModelConstraints": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/GetConstraintsResults" + } + }, + "description": "GetModelConstraints returns the constraints for the model." + }, + "ModelGet": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/ModelConfigResults" + } + }, + "description": "ModelGet implements the server-side part of the\nmodel-config CLI command." + }, + "ModelSet": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ModelSet" + } + }, + "description": "ModelSet implements the server-side part of the\nset-model-config CLI command." + }, + "ModelUnset": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ModelUnset" + } + }, + "description": "ModelUnset implements the server-side part of the\nset-model-config CLI command." + }, + "SLALevel": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/StringResult" + } + }, + "description": "SLALevel returns the current sla level for the model." + }, + "Sequences": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/ModelSequencesResult" + } + }, + "description": "Sequences returns the model's sequence names and next values." + }, + "SetModelConstraints": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/SetConstraints" + } + }, + "description": "SetModelConstraints sets the constraints for the model." + }, + "SetSLALevel": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ModelSLA" + } + }, + "description": "SetSLALevel sets the sla level on the model." + } + }, + "definitions": { + "ConfigValue": { + "type": "object", + "properties": { + "source": { + "type": "string" + }, + "value": { + "type": "object", + "additionalProperties": true + } + }, + "additionalProperties": false, + "required": [ + "value", + "source" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "GetConstraintsResults": { + "type": "object", + "properties": { + "constraints": { + "$ref": "#/definitions/Value" + } + }, + "additionalProperties": false, + "required": [ + "constraints" + ] + }, + "ModelConfigResults": { + "type": "object", + "properties": { + "config": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/ConfigValue" + } + } + } + }, + "additionalProperties": false, + "required": [ + "config" + ] + }, + "ModelSLA": { + "type": "object", + "properties": { + "ModelSLAInfo": { + "$ref": "#/definitions/ModelSLAInfo" + }, + "creds": { + "type": "array", + "items": { + "type": "integer" + } + }, + "level": { + "type": "string" + }, + "owner": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "level", + "owner", + "ModelSLAInfo", + "creds" + ] + }, + "ModelSLAInfo": { + "type": "object", + "properties": { + "level": { + "type": "string" + }, + "owner": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "level", + "owner" + ] + }, + "ModelSequencesResult": { + "type": "object", + "properties": { + "sequences": { + "type": "object", + "patternProperties": { + ".*": { + "type": "integer" + } + } + } + }, + "additionalProperties": false, + "required": [ + "sequences" + ] + }, + "ModelSet": { + "type": "object", + "properties": { + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + } + }, + "additionalProperties": false, + "required": [ + "config" + ] + }, + "ModelUnset": { + "type": "object", + "properties": { + "keys": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "keys" + ] + }, + "SetConstraints": { + "type": "object", + "properties": { + "application": { + "type": "string" + }, + "constraints": { + "$ref": "#/definitions/Value" + } + }, + "additionalProperties": false, + "required": [ + "application", + "constraints" + ] + }, + "StringResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "result" + ] + }, + "Value": { + "type": "object", + "properties": { + "allocate-public-ip": { + "type": "boolean" + }, + "arch": { + "type": "string" + }, + "container": { + "type": "string" + }, + "cores": { + "type": "integer" + }, + "cpu-power": { + "type": "integer" + }, + "image-id": { + "type": "string" + }, + "instance-role": { + "type": "string" + }, + "instance-type": { + "type": "string" + }, + "mem": { + "type": "integer" + }, + "root-disk": { + "type": "integer" + }, + "root-disk-source": { + "type": "string" + }, + "spaces": { + "type": "array", + "items": { + "type": "string" + } + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "virt-type": { + "type": "string" + }, + "zones": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + } + } + } + }, + { + "Name": "ModelGeneration", + "Description": "API is the concrete implementation of the API endpoint.", + "Version": 4, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "AbortBranch": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/BranchArg" + }, + "Result": { + "$ref": "#/definitions/ErrorResult" + } + }, + "description": "AbortBranch aborts the input branch, marking it complete. However no\nchanges are made applicable to the whole model. No units may be assigned\nto the branch when aborting." + }, + "AddBranch": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/BranchArg" + }, + "Result": { + "$ref": "#/definitions/ErrorResult" + } + }, + "description": "AddBranch adds a new branch with the input name to the model." + }, + "BranchInfo": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/BranchInfoArgs" + }, + "Result": { + "$ref": "#/definitions/BranchResults" + } + }, + "description": "BranchInfo will return details of branch identified by the input argument,\nincluding units on the branch and the configuration disjoint with the\nmaster generation.\nAn error is returned if no in-flight branch matching in input is found." + }, + "CommitBranch": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/BranchArg" + }, + "Result": { + "$ref": "#/definitions/IntResult" + } + }, + "description": "CommitBranch commits the input branch, making its changes applicable to\nthe whole model and marking it complete." + }, + "HasActiveBranch": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/BranchArg" + }, + "Result": { + "$ref": "#/definitions/BoolResult" + } + }, + "description": "HasActiveBranch returns a true result if the input model has an \"in-flight\"\nbranch matching the input name." + }, + "ListCommits": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/BranchResults" + } + }, + "description": "ListCommits will return the commits, hence only branches with generation_id higher than 0" + }, + "ShowCommit": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/GenerationId" + }, + "Result": { + "$ref": "#/definitions/GenerationResult" + } + }, + "description": "ShowCommit will return details a commit given by its generationId\nAn error is returned if either no branch can be found corresponding to the generation id.\nOr the generation id given is below 1." + }, + "TrackBranch": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/BranchTrackArg" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "TrackBranch marks the input units and/or applications as tracking the input\nbranch, causing them to realise changes made under that branch." + } + }, + "definitions": { + "BoolResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "result" + ] + }, + "BranchArg": { + "type": "object", + "properties": { + "branch": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "branch" + ] + }, + "BranchInfoArgs": { + "type": "object", + "properties": { + "branches": { + "type": "array", + "items": { + "type": "string" + } + }, + "detailed": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "branches", + "detailed" + ] + }, + "BranchResults": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "generations": { + "type": "array", + "items": { + "$ref": "#/definitions/Generation" + } + } + }, + "additionalProperties": false, + "required": [ + "generations" + ] + }, + "BranchTrackArg": { + "type": "object", + "properties": { + "branch": { + "type": "string" + }, + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + }, + "num-units": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "branch", + "entities" + ] + }, + "Entity": { + "type": "object", + "properties": { + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ErrorResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "Generation": { + "type": "object", + "properties": { + "applications": { + "type": "array", + "items": { + "$ref": "#/definitions/GenerationApplication" + } + }, + "branch": { + "type": "string" + }, + "completed": { + "type": "integer" + }, + "completed-by": { + "type": "string" + }, + "created": { + "type": "integer" + }, + "created-by": { + "type": "string" + }, + "generation-id": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "branch", + "created", + "created-by", + "applications" + ] + }, + "GenerationApplication": { + "type": "object", + "properties": { + "application": { + "type": "string" + }, + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "pending": { + "type": "array", + "items": { + "type": "string" + } + }, + "progress": { + "type": "string" + }, + "tracking": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "application", + "progress", + "config" + ] + }, + "GenerationId": { + "type": "object", + "properties": { + "generation-id": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "generation-id" + ] + }, + "GenerationResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "generation": { + "$ref": "#/definitions/Generation" + } + }, + "additionalProperties": false, + "required": [ + "generation" + ] + }, + "IntResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "result" + ] + } + } + } + }, + { + "Name": "ModelManager", + "Description": "ModelManagerAPI implements the model manager interface and is\nthe concrete implementation of the api end point.", + "Version": 9, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "controller-user" + ], + "Schema": { + "type": "object", + "properties": { + "ChangeModelCredential": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ChangeModelCredentialsParams" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "ChangeModelCredential changes cloud credential reference for models.\nThese new cloud credentials must already exist on the controller." + }, + "CreateModel": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ModelCreateArgs" + }, + "Result": { + "$ref": "#/definitions/ModelInfo" + } + }, + "description": "CreateModel creates a new model using the account and\nmodel config specified in the args." + }, + "DestroyModels": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/DestroyModelsParams" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "DestroyModels will try to destroy the specified models.\nIf there is a block on destruction, this method will return an error.\nFrom ModelManager v7 onwards, DestroyModels gains 'force' and 'max-wait' parameters." + }, + "DumpModels": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/DumpModelRequest" + }, + "Result": { + "$ref": "#/definitions/StringResults" + } + }, + "description": "DumpModels will export the models into the database agnostic\nrepresentation. The user needs to either be a controller admin, or have\nadmin privileges on the model itself." + }, + "DumpModelsDB": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/MapResults" + } + }, + "description": "DumpModelsDB will gather all documents from all model collections\nfor the specified model. The map result contains a map of collection\nnames to lists of documents represented as maps." + }, + "ListModelSummaries": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ModelSummariesRequest" + }, + "Result": { + "$ref": "#/definitions/ModelSummaryResults" + } + }, + "description": "ListModelSummaries returns models that the specified user\nhas access to in the current server. Controller admins (superuser)\ncan list models for any user. Other users\ncan only ask about their own models." + }, + "ListModels": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entity" + }, + "Result": { + "$ref": "#/definitions/UserModelList" + } + }, + "description": "ListModels returns the models that the specified user\nhas access to in the current server. Controller admins (superuser)\ncan list models for any user. Other users\ncan only ask about their own models." + }, + "ModelDefaultsForClouds": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ModelDefaultsResults" + } + }, + "description": "ModelDefaultsForClouds returns the default config values for the specified\nclouds." + }, + "ModelInfo": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ModelInfoResults" + } + }, + "description": "ModelInfo returns information about the specified models." + }, + "ModelStatus": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ModelStatusResults" + } + }, + "description": "ModelStatus returns a summary of the model." + }, + "ModifyModelAccess": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ModifyModelAccessRequest" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "ModifyModelAccess changes the model access granted to users." + }, + "SetModelDefaults": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/SetModelDefaults" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "SetModelDefaults writes new values for the specified default model settings." + }, + "UnsetModelDefaults": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/UnsetModelDefaults" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "UnsetModelDefaults removes the specified default model settings." + } + }, + "definitions": { + "ChangeModelCredentialParams": { + "type": "object", + "properties": { + "credential-tag": { + "type": "string" + }, + "model-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "model-tag", + "credential-tag" + ] + }, + "ChangeModelCredentialsParams": { + "type": "object", + "properties": { + "model-credentials": { + "type": "array", + "items": { + "$ref": "#/definitions/ChangeModelCredentialParams" + } + } + }, + "additionalProperties": false, + "required": [ + "model-credentials" + ] + }, + "DestroyModelParams": { + "type": "object", + "properties": { + "destroy-storage": { + "type": "boolean" + }, + "force": { + "type": "boolean" + }, + "max-wait": { + "type": "integer" + }, + "model-tag": { + "type": "string" + }, + "timeout": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "model-tag" + ] + }, + "DestroyModelsParams": { + "type": "object", + "properties": { + "models": { + "type": "array", + "items": { + "$ref": "#/definitions/DestroyModelParams" + } + } + }, + "additionalProperties": false, + "required": [ + "models" + ] + }, + "DumpModelRequest": { + "type": "object", + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + }, + "simplified": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "entities", + "simplified" + ] + }, + "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" + ] + }, + "EntityStatus": { + "type": "object", + "properties": { + "data": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "info": { + "type": "string" + }, + "since": { + "type": "string", + "format": "date-time" + }, + "status": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "status", + "info", + "since" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ErrorResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "MachineHardware": { + "type": "object", + "properties": { + "arch": { + "type": "string" + }, + "availability-zone": { + "type": "string" + }, + "cores": { + "type": "integer" + }, + "cpu-power": { + "type": "integer" + }, + "mem": { + "type": "integer" + }, + "root-disk": { + "type": "integer" + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "virt-type": { + "type": "string" + } + }, + "additionalProperties": false + }, + "MapResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + } + }, + "additionalProperties": false, + "required": [ + "result" + ] + }, + "MapResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/MapResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "Model": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "owner-tag": { + "type": "string" + }, + "type": { + "type": "string" + }, + "uuid": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "uuid", + "type", + "owner-tag" + ] + }, + "ModelApplicationInfo": { + "type": "object", + "properties": { + "name": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name" + ] + }, + "ModelCreateArgs": { + "type": "object", + "properties": { + "cloud-tag": { + "type": "string" + }, + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "credential": { + "type": "string" + }, + "name": { + "type": "string" + }, + "owner-tag": { + "type": "string" + }, + "region": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "owner-tag" + ] + }, + "ModelDefaultValues": { + "type": "object", + "properties": { + "cloud-region": { + "type": "string" + }, + "cloud-tag": { + "type": "string" + }, + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + } + }, + "additionalProperties": false, + "required": [ + "config" + ] + }, + "ModelDefaults": { + "type": "object", + "properties": { + "controller": { + "type": "object", + "additionalProperties": true + }, + "default": { + "type": "object", + "additionalProperties": true + }, + "regions": { + "type": "array", + "items": { + "$ref": "#/definitions/RegionDefaults" + } + } + }, + "additionalProperties": false + }, + "ModelDefaultsResult": { + "type": "object", + "properties": { + "config": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/ModelDefaults" + } + } + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "config" + ] + }, + "ModelDefaultsResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ModelDefaultsResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "ModelEntityCount": { + "type": "object", + "properties": { + "count": { + "type": "integer" + }, + "entity": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "entity", + "count" + ] + }, + "ModelFilesystemInfo": { + "type": "object", + "properties": { + "detachable": { + "type": "boolean" + }, + "id": { + "type": "string" + }, + "message": { + "type": "string" + }, + "provider-id": { + "type": "string" + }, + "status": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "id" + ] + }, + "ModelInfo": { + "type": "object", + "properties": { + "agent-version": { + "$ref": "#/definitions/Number" + }, + "cloud-credential-tag": { + "type": "string" + }, + "cloud-credential-validity": { + "type": "boolean" + }, + "cloud-region": { + "type": "string" + }, + "cloud-tag": { + "type": "string" + }, + "controller-uuid": { + "type": "string" + }, + "default-base": { + "type": "string" + }, + "default-series": { + "type": "string" + }, + "is-controller": { + "type": "boolean" + }, + "life": { + "type": "string" + }, + "machines": { + "type": "array", + "items": { + "$ref": "#/definitions/ModelMachineInfo" + } + }, + "migration": { + "$ref": "#/definitions/ModelMigrationStatus" + }, + "name": { + "type": "string" + }, + "owner-tag": { + "type": "string" + }, + "provider-type": { + "type": "string" + }, + "secret-backends": { + "type": "array", + "items": { + "$ref": "#/definitions/SecretBackendResult" + } + }, + "sla": { + "$ref": "#/definitions/ModelSLAInfo" + }, + "status": { + "$ref": "#/definitions/EntityStatus" + }, + "supported-features": { + "type": "array", + "items": { + "$ref": "#/definitions/SupportedFeature" + } + }, + "type": { + "type": "string" + }, + "users": { + "type": "array", + "items": { + "$ref": "#/definitions/ModelUserInfo" + } + }, + "uuid": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "type", + "uuid", + "controller-uuid", + "is-controller", + "cloud-tag", + "owner-tag", + "life", + "users", + "machines", + "secret-backends", + "sla", + "agent-version" + ] + }, + "ModelInfoResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "$ref": "#/definitions/ModelInfo" + } + }, + "additionalProperties": false + }, + "ModelInfoResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ModelInfoResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "ModelMachineInfo": { + "type": "object", + "properties": { + "display-name": { + "type": "string" + }, + "ha-primary": { + "type": "boolean" + }, + "hardware": { + "$ref": "#/definitions/MachineHardware" + }, + "has-vote": { + "type": "boolean" + }, + "id": { + "type": "string" + }, + "instance-id": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "string" + }, + "wants-vote": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "id" + ] + }, + "ModelMigrationStatus": { + "type": "object", + "properties": { + "end": { + "type": "string", + "format": "date-time" + }, + "start": { + "type": "string", + "format": "date-time" + }, + "status": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "status", + "start" + ] + }, + "ModelSLAInfo": { + "type": "object", + "properties": { + "level": { + "type": "string" + }, + "owner": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "level", + "owner" + ] + }, + "ModelStatus": { + "type": "object", + "properties": { + "application-count": { + "type": "integer" + }, + "applications": { + "type": "array", + "items": { + "$ref": "#/definitions/ModelApplicationInfo" + } + }, + "error": { + "$ref": "#/definitions/Error" + }, + "filesystems": { + "type": "array", + "items": { + "$ref": "#/definitions/ModelFilesystemInfo" + } + }, + "hosted-machine-count": { + "type": "integer" + }, + "life": { + "type": "string" + }, + "machines": { + "type": "array", + "items": { + "$ref": "#/definitions/ModelMachineInfo" + } + }, + "model-tag": { + "type": "string" + }, + "owner-tag": { + "type": "string" + }, + "type": { + "type": "string" + }, + "unit-count": { + "type": "integer" + }, + "volumes": { + "type": "array", + "items": { + "$ref": "#/definitions/ModelVolumeInfo" + } + } + }, + "additionalProperties": false, + "required": [ + "model-tag", + "life", + "type", + "hosted-machine-count", + "application-count", + "unit-count", + "owner-tag" + ] + }, + "ModelStatusResults": { + "type": "object", + "properties": { + "models": { + "type": "array", + "items": { + "$ref": "#/definitions/ModelStatus" + } + } + }, + "additionalProperties": false, + "required": [ + "models" + ] + }, + "ModelSummariesRequest": { + "type": "object", + "properties": { + "all": { + "type": "boolean" + }, + "user-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "user-tag" + ] + }, + "ModelSummary": { + "type": "object", + "properties": { + "agent-version": { + "$ref": "#/definitions/Number" + }, + "cloud-credential-tag": { + "type": "string" + }, + "cloud-region": { + "type": "string" + }, + "cloud-tag": { + "type": "string" + }, + "controller-uuid": { + "type": "string" + }, + "counts": { + "type": "array", + "items": { + "$ref": "#/definitions/ModelEntityCount" + } + }, + "default-series": { + "type": "string" + }, + "is-controller": { + "type": "boolean" + }, + "last-connection": { + "type": "string", + "format": "date-time" + }, + "life": { + "type": "string" + }, + "migration": { + "$ref": "#/definitions/ModelMigrationStatus" + }, + "name": { + "type": "string" + }, + "owner-tag": { + "type": "string" + }, + "provider-type": { + "type": "string" + }, + "sla": { + "$ref": "#/definitions/ModelSLAInfo" + }, + "status": { + "$ref": "#/definitions/EntityStatus" + }, + "type": { + "type": "string" + }, + "user-access": { + "type": "string" + }, + "uuid": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "uuid", + "type", + "controller-uuid", + "is-controller", + "cloud-tag", + "owner-tag", + "life", + "user-access", + "last-connection", + "counts", + "sla", + "agent-version" + ] + }, + "ModelSummaryResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "$ref": "#/definitions/ModelSummary" + } + }, + "additionalProperties": false + }, + "ModelSummaryResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ModelSummaryResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "ModelUnsetKeys": { + "type": "object", + "properties": { + "cloud-region": { + "type": "string" + }, + "cloud-tag": { + "type": "string" + }, + "keys": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "keys" + ] + }, + "ModelUserInfo": { + "type": "object", + "properties": { + "access": { + "type": "string" + }, + "display-name": { + "type": "string" + }, + "last-connection": { + "type": "string", + "format": "date-time" + }, + "model-tag": { + "type": "string" + }, + "user": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "model-tag", + "user", + "display-name", + "last-connection", + "access" + ] + }, + "ModelVolumeInfo": { + "type": "object", + "properties": { + "detachable": { + "type": "boolean" + }, + "id": { + "type": "string" + }, + "message": { + "type": "string" + }, + "provider-id": { + "type": "string" + }, + "status": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "id" + ] + }, + "ModifyModelAccess": { + "type": "object", + "properties": { + "access": { + "type": "string" + }, + "action": { + "type": "string" + }, + "model-tag": { + "type": "string" + }, + "user-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "user-tag", + "action", + "access", + "model-tag" + ] + }, + "ModifyModelAccessRequest": { + "type": "object", + "properties": { + "changes": { + "type": "array", + "items": { + "$ref": "#/definitions/ModifyModelAccess" + } + } + }, + "additionalProperties": false, + "required": [ + "changes" + ] + }, + "Number": { + "type": "object", + "properties": { + "Build": { + "type": "integer" + }, + "Major": { + "type": "integer" + }, + "Minor": { + "type": "integer" + }, + "Patch": { + "type": "integer" + }, + "Tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "Major", + "Minor", + "Tag", + "Patch", + "Build" + ] + }, + "RegionDefaults": { + "type": "object", + "properties": { + "region-name": { + "type": "string" + }, + "value": { + "type": "object", + "additionalProperties": true + } + }, + "additionalProperties": false, + "required": [ + "region-name", + "value" + ] + }, + "SecretBackend": { + "type": "object", + "properties": { + "backend-type": { + "type": "string" + }, + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "name": { + "type": "string" + }, + "token-rotate-interval": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "name", + "backend-type", + "config" + ] + }, + "SecretBackendResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "id": { + "type": "string" + }, + "message": { + "type": "string" + }, + "num-secrets": { + "type": "integer" + }, + "result": { + "$ref": "#/definitions/SecretBackend" + }, + "status": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "result", + "id", + "num-secrets", + "status" + ] + }, + "SetModelDefaults": { + "type": "object", + "properties": { + "config": { + "type": "array", + "items": { + "$ref": "#/definitions/ModelDefaultValues" + } + } + }, + "additionalProperties": false, + "required": [ + "config" + ] + }, + "StringResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "result" + ] + }, + "StringResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/StringResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "SupportedFeature": { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "name": { + "type": "string" + }, + "version": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "description" + ] + }, + "UnsetModelDefaults": { + "type": "object", + "properties": { + "keys": { + "type": "array", + "items": { + "$ref": "#/definitions/ModelUnsetKeys" + } + } + }, + "additionalProperties": false, + "required": [ + "keys" + ] + }, + "UserModel": { + "type": "object", + "properties": { + "last-connection": { + "type": "string", + "format": "date-time" + }, + "model": { + "$ref": "#/definitions/Model" + } + }, + "additionalProperties": false, + "required": [ + "model", + "last-connection" + ] + }, + "UserModelList": { + "type": "object", + "properties": { + "user-models": { + "type": "array", + "items": { + "$ref": "#/definitions/UserModel" + } + } + }, + "additionalProperties": false, + "required": [ + "user-models" + ] + } + } + } + }, + { + "Name": "ModelUpgrader", + "Description": "ModelUpgraderAPI implements the model upgrader interface and is\nthe concrete implementation of the api end point.", + "Version": 1, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "controller-user" + ], + "Schema": { + "type": "object", + "properties": { + "AbortModelUpgrade": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ModelParam" + } + }, + "description": "AbortModelUpgrade aborts and archives the model upgrade\nsynchronisation record, if any." + }, + "UpgradeModel": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/UpgradeModelParams" + }, + "Result": { + "$ref": "#/definitions/UpgradeModelResult" + } + }, + "description": "UpgradeModel upgrades a model." + } + }, + "definitions": { + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ModelParam": { + "type": "object", + "properties": { + "model-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "model-tag" + ] + }, + "Number": { + "type": "object", + "properties": { + "Build": { + "type": "integer" + }, + "Major": { + "type": "integer" + }, + "Minor": { + "type": "integer" + }, + "Patch": { + "type": "integer" + }, + "Tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "Major", + "Minor", + "Tag", + "Patch", + "Build" + ] + }, + "UpgradeModelParams": { + "type": "object", + "properties": { + "agent-stream": { + "type": "string" + }, + "dry-run": { + "type": "boolean" + }, + "ignore-agent-versions": { + "type": "boolean" + }, + "model-tag": { + "type": "string" + }, + "target-version": { + "$ref": "#/definitions/Number" + } + }, + "additionalProperties": false, + "required": [ + "model-tag", + "target-version" + ] + }, + "UpgradeModelResult": { + "type": "object", + "properties": { + "chosen-version": { + "$ref": "#/definitions/Number" + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "chosen-version" + ] + } + } + } + }, + { + "Name": "Payloads", + "Description": "API serves payload-specific API methods.", + "Version": 1, + "AvailableTo": [ + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "List": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/PayloadListArgs" + }, + "Result": { + "$ref": "#/definitions/PayloadListResults" + } + }, + "description": "List builds the list of payloads being tracked for\nthe given unit and IDs. If no IDs are provided then all tracked\npayloads for the unit are returned." + } + }, + "definitions": { + "Payload": { + "type": "object", + "properties": { + "class": { + "type": "string" + }, + "id": { + "type": "string" + }, + "labels": { + "type": "array", + "items": { + "type": "string" + } + }, + "machine": { + "type": "string" + }, + "status": { + "type": "string" + }, + "type": { + "type": "string" + }, + "unit": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "class", + "type", + "id", + "status", + "labels", + "unit", + "machine" + ] + }, + "PayloadListArgs": { + "type": "object", + "properties": { + "patterns": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "patterns" + ] + }, + "PayloadListResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/Payload" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + } + } + } + }, + { + "Name": "Pinger", + "Description": "pinger describes a resource that can be pinged and stopped.", + "Version": 1, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "controller-user", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "Ping": { + "type": "object" + }, + "Stop": { + "type": "object" + } + } + } + }, + { + "Name": "Resources", + "Description": "API is the public API facade for resources.", + "Version": 3, + "AvailableTo": [ + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "AddPendingResources": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/AddPendingResourcesArgsV2" + }, + "Result": { + "$ref": "#/definitions/AddPendingResourcesResult" + } + }, + "description": "AddPendingResources adds the provided resources (info) to the Juju\nmodel in a pending state, meaning they are not available until\nresolved. Handles CharmHub and Local charms." + }, + "ListResources": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ListResourcesArgs" + }, + "Result": { + "$ref": "#/definitions/ResourcesResults" + } + }, + "description": "ListResources returns the list of resources for the given application." + } + }, + "definitions": { + "AddPendingResourcesArgsV2": { + "type": "object", + "properties": { + "Entity": { + "$ref": "#/definitions/Entity" + }, + "charm-origin": { + "$ref": "#/definitions/CharmOrigin" + }, + "macaroon": { + "$ref": "#/definitions/Macaroon" + }, + "resources": { + "type": "array", + "items": { + "$ref": "#/definitions/CharmResource" + } + }, + "tag": { + "type": "string" + }, + "url": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag", + "Entity", + "url", + "charm-origin", + "macaroon", + "resources" + ] + }, + "AddPendingResourcesResult": { + "type": "object", + "properties": { + "ErrorResult": { + "$ref": "#/definitions/ErrorResult" + }, + "error": { + "$ref": "#/definitions/Error" + }, + "pending-ids": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "ErrorResult", + "pending-ids" + ] + }, + "Base": { + "type": "object", + "properties": { + "channel": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "channel" + ] + }, + "CharmOrigin": { + "type": "object", + "properties": { + "architecture": { + "type": "string" + }, + "base": { + "$ref": "#/definitions/Base" + }, + "branch": { + "type": "string" + }, + "hash": { + "type": "string" + }, + "id": { + "type": "string" + }, + "instance-key": { + "type": "string" + }, + "revision": { + "type": "integer" + }, + "risk": { + "type": "string" + }, + "source": { + "type": "string" + }, + "track": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "source", + "type", + "id" + ] + }, + "CharmResource": { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "fingerprint": { + "type": "array", + "items": { + "type": "integer" + } + }, + "name": { + "type": "string" + }, + "origin": { + "type": "string" + }, + "path": { + "type": "string" + }, + "revision": { + "type": "integer" + }, + "size": { + "type": "integer" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "type", + "path", + "origin", + "revision", + "fingerprint", + "size" + ] + }, + "Entity": { + "type": "object", + "properties": { + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ListResourcesArgs": { + "type": "object", + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + } + }, + "additionalProperties": false, + "required": [ + "entities" + ] + }, + "Macaroon": { + "type": "object", + "additionalProperties": false + }, + "Resource": { + "type": "object", + "properties": { + "CharmResource": { + "$ref": "#/definitions/CharmResource" + }, + "application": { + "type": "string" + }, + "description": { + "type": "string" + }, + "fingerprint": { + "type": "array", + "items": { + "type": "integer" + } + }, + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "origin": { + "type": "string" + }, + "path": { + "type": "string" + }, + "pending-id": { + "type": "string" + }, + "revision": { + "type": "integer" + }, + "size": { + "type": "integer" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "type": { + "type": "string" + }, + "username": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "type", + "path", + "origin", + "revision", + "fingerprint", + "size", + "CharmResource", + "id", + "pending-id", + "application", + "username", + "timestamp" + ] + }, + "ResourcesResult": { + "type": "object", + "properties": { + "ErrorResult": { + "$ref": "#/definitions/ErrorResult" + }, + "charm-store-resources": { + "type": "array", + "items": { + "$ref": "#/definitions/CharmResource" + } + }, + "error": { + "$ref": "#/definitions/Error" + }, + "resources": { + "type": "array", + "items": { + "$ref": "#/definitions/Resource" + } + }, + "unit-resources": { + "type": "array", + "items": { + "$ref": "#/definitions/UnitResources" + } + } + }, + "additionalProperties": false, + "required": [ + "ErrorResult", + "resources", + "charm-store-resources", + "unit-resources" + ] + }, + "ResourcesResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ResourcesResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "UnitResources": { + "type": "object", + "properties": { + "Entity": { + "$ref": "#/definitions/Entity" + }, + "download-progress": { + "type": "object", + "patternProperties": { + ".*": { + "type": "integer" + } + } + }, + "resources": { + "type": "array", + "items": { + "$ref": "#/definitions/Resource" + } + }, + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag", + "Entity", + "resources", + "download-progress" + ] + } + } + } + }, + { + "Name": "SSHClient", + "Description": "Facade implements the API required by the sshclient worker.", + "Version": 4, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "AllAddresses": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/SSHAddressesResults" + } + }, + "description": "AllAddresses reports all addresses that might have SSH listening for each\nentity in args. The result is sorted with public addresses first.\nMachines and units are supported as entity types." + }, + "ModelCredentialForSSH": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/CloudSpecResult" + } + }, + "description": "ModelCredentialForSSH returns a cloud spec for ssh purpose.\nThis facade call is only used for k8s model." + }, + "PrivateAddress": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/SSHAddressResults" + } + }, + "description": "PrivateAddress reports the preferred private network address for one or\nmore entities. Machines and units are supported." + }, + "Proxy": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/SSHProxyResult" + } + }, + "description": "Proxy returns whether SSH connections should be proxied through the\ncontroller hosts for the model associated with the API connection." + }, + "PublicAddress": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/SSHAddressResults" + } + }, + "description": "PublicAddress reports the preferred public network address for one\nor more entities. Machines and units are supported." + }, + "PublicKeys": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/SSHPublicKeysResults" + } + }, + "description": "PublicKeys returns the public SSH hosts for one or more\nentities. Machines and units are supported." + } + }, + "definitions": { + "CloudCredential": { + "type": "object", + "properties": { + "attrs": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "auth-type": { + "type": "string" + }, + "redacted": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "auth-type" + ] + }, + "CloudSpec": { + "type": "object", + "properties": { + "cacertificates": { + "type": "array", + "items": { + "type": "string" + } + }, + "credential": { + "$ref": "#/definitions/CloudCredential" + }, + "endpoint": { + "type": "string" + }, + "identity-endpoint": { + "type": "string" + }, + "is-controller-cloud": { + "type": "boolean" + }, + "name": { + "type": "string" + }, + "region": { + "type": "string" + }, + "skip-tls-verify": { + "type": "boolean" + }, + "storage-endpoint": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "type", + "name" + ] + }, + "CloudSpecResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "$ref": "#/definitions/CloudSpec" + } + }, + "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": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "SSHAddressResult": { + "type": "object", + "properties": { + "address": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "SSHAddressResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/SSHAddressResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "SSHAddressesResult": { + "type": "object", + "properties": { + "addresses": { + "type": "array", + "items": { + "type": "string" + } + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "addresses" + ] + }, + "SSHAddressesResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/SSHAddressesResult" + } + } + }, + "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" + }, + "public-keys": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "SSHPublicKeysResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/SSHPublicKeysResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + } + } + } + }, + { + "Name": "SecretBackends", + "Description": "SecretBackendsAPI is the server implementation for the SecretBackends facade.", + "Version": 1, + "AvailableTo": [ + "controller-user" + ], + "Schema": { + "type": "object", + "properties": { + "AddSecretBackends": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/AddSecretBackendArgs" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "AddSecretBackends adds new secret backends." + }, + "ListSecretBackends": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ListSecretBackendsArgs" + }, + "Result": { + "$ref": "#/definitions/ListSecretBackendsResults" + } + }, + "description": "ListSecretBackends lists available secret backends." + }, + "RemoveSecretBackends": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/RemoveSecretBackendArgs" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "RemoveSecretBackends removes secret backends." + }, + "UpdateSecretBackends": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/UpdateSecretBackendArgs" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "UpdateSecretBackends updates secret backends." + } + }, + "definitions": { + "AddSecretBackendArg": { + "type": "object", + "properties": { + "SecretBackend": { + "$ref": "#/definitions/SecretBackend" + }, + "backend-type": { + "type": "string" + }, + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "token-rotate-interval": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "name", + "backend-type", + "config", + "SecretBackend" + ] + }, + "AddSecretBackendArgs": { + "type": "object", + "properties": { + "args": { + "type": "array", + "items": { + "$ref": "#/definitions/AddSecretBackendArg" + } + } + }, + "additionalProperties": false, + "required": [ + "args" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ErrorResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "ListSecretBackendsArgs": { + "type": "object", + "properties": { + "names": { + "type": "array", + "items": { + "type": "string" + } + }, + "reveal": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "names", + "reveal" + ] + }, + "ListSecretBackendsResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/SecretBackendResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "RemoveSecretBackendArg": { + "type": "object", + "properties": { + "force": { + "type": "boolean" + }, + "name": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name" + ] + }, + "RemoveSecretBackendArgs": { + "type": "object", + "properties": { + "args": { + "type": "array", + "items": { + "$ref": "#/definitions/RemoveSecretBackendArg" + } + } + }, + "additionalProperties": false, + "required": [ + "args" + ] + }, + "SecretBackend": { + "type": "object", + "properties": { + "backend-type": { + "type": "string" + }, + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "name": { + "type": "string" + }, + "token-rotate-interval": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "name", + "backend-type", + "config" + ] + }, + "SecretBackendResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "id": { + "type": "string" + }, + "message": { + "type": "string" + }, + "num-secrets": { + "type": "integer" + }, + "result": { + "$ref": "#/definitions/SecretBackend" + }, + "status": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "result", + "id", + "num-secrets", + "status" + ] + }, + "UpdateSecretBackendArg": { + "type": "object", + "properties": { + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "force": { + "type": "boolean" + }, + "name": { + "type": "string" + }, + "name-change": { + "type": "string" + }, + "reset": { + "type": "array", + "items": { + "type": "string" + } + }, + "token-rotate-interval": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "name", + "token-rotate-interval", + "config", + "reset" + ] + }, + "UpdateSecretBackendArgs": { + "type": "object", + "properties": { + "args": { + "type": "array", + "items": { + "$ref": "#/definitions/UpdateSecretBackendArg" + } + } + }, + "additionalProperties": false, + "required": [ + "args" + ] + } + } + } + }, + { + "Name": "Secrets", + "Description": "SecretsAPI is the backend for the Secrets facade.", + "Version": 2, + "AvailableTo": [ + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "CreateSecrets": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/CreateSecretArgs" + }, + "Result": { + "$ref": "#/definitions/StringResults" + } + }, + "description": "CreateSecrets creates new secrets." + }, + "GrantSecret": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/GrantRevokeUserSecretArg" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "GrantSecret grants access to a user secret." + }, + "ListSecrets": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ListSecretsArgs" + }, + "Result": { + "$ref": "#/definitions/ListSecretResults" + } + }, + "description": "ListSecrets lists available secrets." + }, + "RemoveSecrets": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/DeleteSecretArgs" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "RemoveSecrets remove user secret." + }, + "RevokeSecret": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/GrantRevokeUserSecretArg" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "RevokeSecret revokes access to a user secret." + }, + "UpdateSecrets": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/UpdateUserSecretArgs" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "UpdateSecrets creates new secrets." + } + }, + "definitions": { + "AccessInfo": { + "type": "object", + "properties": { + "role": { + "type": "string" + }, + "scope-tag": { + "type": "string" + }, + "target-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "target-tag", + "scope-tag", + "role" + ] + }, + "CreateSecretArg": { + "type": "object", + "properties": { + "UpsertSecretArg": { + "$ref": "#/definitions/UpsertSecretArg" + }, + "content": { + "$ref": "#/definitions/SecretContentParams" + }, + "description": { + "type": "string" + }, + "expire-time": { + "type": "string", + "format": "date-time" + }, + "label": { + "type": "string" + }, + "owner-tag": { + "type": "string" + }, + "params": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "rotate-policy": { + "type": "string" + }, + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "UpsertSecretArg", + "owner-tag" + ] + }, + "CreateSecretArgs": { + "type": "object", + "properties": { + "args": { + "type": "array", + "items": { + "$ref": "#/definitions/CreateSecretArg" + } + } + }, + "additionalProperties": false, + "required": [ + "args" + ] + }, + "DeleteSecretArg": { + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "revisions": { + "type": "array", + "items": { + "type": "integer" + } + }, + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri", + "label" + ] + }, + "DeleteSecretArgs": { + "type": "object", + "properties": { + "args": { + "type": "array", + "items": { + "$ref": "#/definitions/DeleteSecretArg" + } + } + }, + "additionalProperties": false, + "required": [ + "args" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ErrorResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "GrantRevokeUserSecretArg": { + "type": "object", + "properties": { + "applications": { + "type": "array", + "items": { + "type": "string" + } + }, + "label": { + "type": "string" + }, + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri", + "label", + "applications" + ] + }, + "ListSecretResult": { + "type": "object", + "properties": { + "access": { + "type": "array", + "items": { + "$ref": "#/definitions/AccessInfo" + } + }, + "create-time": { + "type": "string", + "format": "date-time" + }, + "description": { + "type": "string" + }, + "label": { + "type": "string" + }, + "latest-expire-time": { + "type": "string", + "format": "date-time" + }, + "latest-revision": { + "type": "integer" + }, + "next-rotate-time": { + "type": "string", + "format": "date-time" + }, + "owner-tag": { + "type": "string" + }, + "revisions": { + "type": "array", + "items": { + "$ref": "#/definitions/SecretRevision" + } + }, + "rotate-policy": { + "type": "string" + }, + "update-time": { + "type": "string", + "format": "date-time" + }, + "uri": { + "type": "string" + }, + "value": { + "$ref": "#/definitions/SecretValueResult" + }, + "version": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "uri", + "version", + "owner-tag", + "latest-revision", + "create-time", + "update-time", + "revisions" + ] + }, + "ListSecretResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ListSecretResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "ListSecretsArgs": { + "type": "object", + "properties": { + "filter": { + "$ref": "#/definitions/SecretsFilter" + }, + "show-secrets": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "show-secrets", + "filter" + ] + }, + "SecretContentParams": { + "type": "object", + "properties": { + "data": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "value-ref": { + "$ref": "#/definitions/SecretValueRef" + } + }, + "additionalProperties": false + }, + "SecretRevision": { + "type": "object", + "properties": { + "backend-name": { + "type": "string" + }, + "create-time": { + "type": "string", + "format": "date-time" + }, + "expire-time": { + "type": "string", + "format": "date-time" + }, + "revision": { + "type": "integer" + }, + "update-time": { + "type": "string", + "format": "date-time" + }, + "value-ref": { + "$ref": "#/definitions/SecretValueRef" + } + }, + "additionalProperties": false, + "required": [ + "revision" + ] + }, + "SecretValueRef": { + "type": "object", + "properties": { + "backend-id": { + "type": "string" + }, + "revision-id": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "backend-id", + "revision-id" + ] + }, + "SecretValueResult": { + "type": "object", + "properties": { + "data": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "SecretsFilter": { + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "owner-tag": { + "type": "string" + }, + "revision": { + "type": "integer" + }, + "uri": { + "type": "string" + } + }, + "additionalProperties": false + }, + "StringResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "result" + ] + }, + "StringResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/StringResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "UpdateUserSecretArg": { + "type": "object", + "properties": { + "UpsertSecretArg": { + "$ref": "#/definitions/UpsertSecretArg" + }, + "auto-prune": { + "type": "boolean" + }, + "content": { + "$ref": "#/definitions/SecretContentParams" + }, + "description": { + "type": "string" + }, + "existing-label": { + "type": "string" + }, + "expire-time": { + "type": "string", + "format": "date-time" + }, + "label": { + "type": "string" + }, + "params": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "rotate-policy": { + "type": "string" + }, + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "UpsertSecretArg", + "uri", + "existing-label" + ] + }, + "UpdateUserSecretArgs": { + "type": "object", + "properties": { + "args": { + "type": "array", + "items": { + "$ref": "#/definitions/UpdateUserSecretArg" + } + } + }, + "additionalProperties": false, + "required": [ + "args" + ] + }, + "UpsertSecretArg": { + "type": "object", + "properties": { + "content": { + "$ref": "#/definitions/SecretContentParams" + }, + "description": { + "type": "string" + }, + "expire-time": { + "type": "string", + "format": "date-time" + }, + "label": { + "type": "string" + }, + "params": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "rotate-policy": { + "type": "string" + } + }, + "additionalProperties": false + } + } + } + }, + { + "Name": "Spaces", + "Description": "API provides the spaces API facade for version 6.", + "Version": 6, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "CreateSpaces": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/CreateSpacesParams" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "CreateSpaces creates a new Juju network space, associating the\nspecified subnets with it (optional; can be empty)." + }, + "ListSpaces": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/ListSpacesResults" + } + }, + "description": "ListSpaces lists all the available spaces and their associated subnets." + }, + "MoveSubnets": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/MoveSubnetsParams" + }, + "Result": { + "$ref": "#/definitions/MoveSubnetsResults" + } + }, + "description": "MoveSubnets ensures that the input subnets are in the input space." + }, + "ReloadSpaces": { + "type": "object", + "description": "ReloadSpaces refreshes spaces from substrate" + }, + "RemoveSpace": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/RemoveSpaceParams" + }, + "Result": { + "$ref": "#/definitions/RemoveSpaceResults" + } + }, + "description": "RemoveSpace removes a space.\nReturns SpaceResults if entities/settings are found which makes the deletion not possible." + }, + "RenameSpace": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/RenameSpacesParams" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "RenameSpace renames a space." + }, + "ShowSpace": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ShowSpaceResults" + } + }, + "description": "ShowSpace shows the spaces for a set of given entities." + } + }, + "definitions": { + "CreateSpaceParams": { + "type": "object", + "properties": { + "cidrs": { + "type": "array", + "items": { + "type": "string" + } + }, + "provider-id": { + "type": "string" + }, + "public": { + "type": "boolean" + }, + "space-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "cidrs", + "space-tag", + "public" + ] + }, + "CreateSpacesParams": { + "type": "object", + "properties": { + "spaces": { + "type": "array", + "items": { + "$ref": "#/definitions/CreateSpaceParams" + } + } + }, + "additionalProperties": false, + "required": [ + "spaces" + ] + }, + "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": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ErrorResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "ListSpacesResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/Space" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "MoveSubnetsParam": { + "type": "object", + "properties": { + "force": { + "type": "boolean" + }, + "space-tag": { + "type": "string" + }, + "subnets": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "subnets", + "space-tag", + "force" + ] + }, + "MoveSubnetsParams": { + "type": "object", + "properties": { + "args": { + "type": "array", + "items": { + "$ref": "#/definitions/MoveSubnetsParam" + } + } + }, + "additionalProperties": false, + "required": [ + "args" + ] + }, + "MoveSubnetsResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "moved-subnets": { + "type": "array", + "items": { + "$ref": "#/definitions/MovedSubnet" + } + }, + "new-space": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "new-space" + ] + }, + "MoveSubnetsResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/MoveSubnetsResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "MovedSubnet": { + "type": "object", + "properties": { + "cidr": { + "type": "string" + }, + "old-space": { + "type": "string" + }, + "subnet": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "subnet", + "old-space", + "cidr" + ] + }, + "RemoveSpaceParam": { + "type": "object", + "properties": { + "dry-run": { + "type": "boolean" + }, + "force": { + "type": "boolean" + }, + "space": { + "$ref": "#/definitions/Entity" + } + }, + "additionalProperties": false, + "required": [ + "space" + ] + }, + "RemoveSpaceParams": { + "type": "object", + "properties": { + "space-param": { + "type": "array", + "items": { + "$ref": "#/definitions/RemoveSpaceParam" + } + } + }, + "additionalProperties": false, + "required": [ + "space-param" + ] + }, + "RemoveSpaceResult": { + "type": "object", + "properties": { + "bindings": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + }, + "constraints": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + }, + "controller-settings": { + "type": "array", + "items": { + "type": "string" + } + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "RemoveSpaceResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/RemoveSpaceResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "RenameSpaceParams": { + "type": "object", + "properties": { + "from-space-tag": { + "type": "string" + }, + "to-space-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "from-space-tag", + "to-space-tag" + ] + }, + "RenameSpacesParams": { + "type": "object", + "properties": { + "changes": { + "type": "array", + "items": { + "$ref": "#/definitions/RenameSpaceParams" + } + } + }, + "additionalProperties": false, + "required": [ + "changes" + ] + }, + "ShowSpaceResult": { + "type": "object", + "properties": { + "applications": { + "type": "array", + "items": { + "type": "string" + } + }, + "error": { + "$ref": "#/definitions/Error" + }, + "machine-count": { + "type": "integer" + }, + "space": { + "$ref": "#/definitions/Space" + } + }, + "additionalProperties": false, + "required": [ + "space", + "applications", + "machine-count" + ] + }, + "ShowSpaceResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ShowSpaceResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "Space": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "subnets": { + "type": "array", + "items": { + "$ref": "#/definitions/Subnet" + } + } + }, + "additionalProperties": false, + "required": [ + "id", + "name", + "subnets" + ] + }, + "Subnet": { + "type": "object", + "properties": { + "cidr": { + "type": "string" + }, + "life": { + "type": "string" + }, + "provider-id": { + "type": "string" + }, + "provider-network-id": { + "type": "string" + }, + "provider-space-id": { + "type": "string" + }, + "space-tag": { + "type": "string" + }, + "status": { + "type": "string" + }, + "vlan-tag": { + "type": "integer" + }, + "zones": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "cidr", + "vlan-tag", + "life", + "space-tag", + "zones" + ] + } + } + } + }, + { + "Name": "Storage", + "Description": "StorageAPI implements the latest version (v6) of the Storage API.", + "Version": 6, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "AddToUnit": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/StoragesAddParams" + }, + "Result": { + "$ref": "#/definitions/AddStorageResults" + } + }, + "description": "AddToUnit validates and creates additional storage instances for units.\nA \"CHANGE\" block can block this operation." + }, + "Attach": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/StorageAttachmentIds" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "Attach attaches existing storage instances to units.\nA \"CHANGE\" block can block this operation." + }, + "CreatePool": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/StoragePoolArgs" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "CreatePool creates a new pool with specified parameters." + }, + "DetachStorage": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/StorageDetachmentParams" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "DetachStorage sets the specified storage attachments to Dying, unless they are\nalready Dying or Dead. Any associated, persistent storage will remain\nalive. This call can be forced." + }, + "Import": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/BulkImportStorageParams" + }, + "Result": { + "$ref": "#/definitions/ImportStorageResults" + } + }, + "description": "Import imports existing storage into the model.\nA \"CHANGE\" block can block this operation." + }, + "ListFilesystems": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/FilesystemFilters" + }, + "Result": { + "$ref": "#/definitions/FilesystemDetailsListResults" + } + }, + "description": "ListFilesystems returns a list of filesystems in the environment matching\nthe provided filter. Each result describes a filesystem in detail, including\nthe filesystem's attachments." + }, + "ListPools": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/StoragePoolFilters" + }, + "Result": { + "$ref": "#/definitions/StoragePoolsResults" + } + }, + "description": "ListPools returns a list of pools.\nIf filter is provided, returned list only contains pools that match\nthe filter.\nPools can be filtered on names and provider types.\nIf both names and types are provided as filter,\npools that match either are returned.\nThis method lists union of pools and environment provider types.\nIf no filter is provided, all pools are returned." + }, + "ListStorageDetails": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/StorageFilters" + }, + "Result": { + "$ref": "#/definitions/StorageDetailsListResults" + } + }, + "description": "ListStorageDetails returns storage matching a filter." + }, + "ListVolumes": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/VolumeFilters" + }, + "Result": { + "$ref": "#/definitions/VolumeDetailsListResults" + } + }, + "description": "ListVolumes lists volumes with the given filters. Each filter produces\nan independent list of volumes, or an error if the filter is invalid\nor the volumes could not be listed." + }, + "Remove": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/RemoveStorage" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "Remove sets the specified storage entities to Dying, unless they are\nalready Dying or Dead, such that the storage will eventually be removed\nfrom the model. If the arguments specify that the storage should be\ndestroyed, then the associated cloud storage will be destroyed first;\notherwise it will only be released from Juju's control." + }, + "RemovePool": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/StoragePoolDeleteArgs" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "RemovePool deletes the named pool" + }, + "StorageDetails": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/StorageDetailsResults" + } + }, + "description": "StorageDetails retrieves and returns detailed information about desired\nstorage identified by supplied tags. If specified storage cannot be\nretrieved, individual error is returned instead of storage information." + }, + "UpdatePool": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/StoragePoolArgs" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "UpdatePool deletes the named pool" + } + }, + "definitions": { + "AddStorageDetails": { + "type": "object", + "properties": { + "storage-tags": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "storage-tags" + ] + }, + "AddStorageResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "$ref": "#/definitions/AddStorageDetails" + } + }, + "additionalProperties": false + }, + "AddStorageResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/AddStorageResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "BulkImportStorageParams": { + "type": "object", + "properties": { + "storage": { + "type": "array", + "items": { + "$ref": "#/definitions/ImportStorageParams" + } + } + }, + "additionalProperties": false, + "required": [ + "storage" + ] + }, + "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" + ] + }, + "EntityStatus": { + "type": "object", + "properties": { + "data": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "info": { + "type": "string" + }, + "since": { + "type": "string", + "format": "date-time" + }, + "status": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "status", + "info", + "since" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ErrorResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "FilesystemAttachmentDetails": { + "type": "object", + "properties": { + "FilesystemAttachmentInfo": { + "$ref": "#/definitions/FilesystemAttachmentInfo" + }, + "life": { + "type": "string" + }, + "mount-point": { + "type": "string" + }, + "read-only": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "FilesystemAttachmentInfo" + ] + }, + "FilesystemAttachmentInfo": { + "type": "object", + "properties": { + "mount-point": { + "type": "string" + }, + "read-only": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "FilesystemDetails": { + "type": "object", + "properties": { + "filesystem-tag": { + "type": "string" + }, + "info": { + "$ref": "#/definitions/FilesystemInfo" + }, + "life": { + "type": "string" + }, + "machine-attachments": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/FilesystemAttachmentDetails" + } + } + }, + "status": { + "$ref": "#/definitions/EntityStatus" + }, + "storage": { + "$ref": "#/definitions/StorageDetails" + }, + "unit-attachments": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/FilesystemAttachmentDetails" + } + } + }, + "volume-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "filesystem-tag", + "info", + "status" + ] + }, + "FilesystemDetailsListResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "type": "array", + "items": { + "$ref": "#/definitions/FilesystemDetails" + } + } + }, + "additionalProperties": false + }, + "FilesystemDetailsListResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/FilesystemDetailsListResult" + } + } + }, + "additionalProperties": false + }, + "FilesystemFilter": { + "type": "object", + "properties": { + "machines": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "FilesystemFilters": { + "type": "object", + "properties": { + "filters": { + "type": "array", + "items": { + "$ref": "#/definitions/FilesystemFilter" + } + } + }, + "additionalProperties": false + }, + "FilesystemInfo": { + "type": "object", + "properties": { + "filesystem-id": { + "type": "string" + }, + "pool": { + "type": "string" + }, + "size": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "filesystem-id", + "pool", + "size" + ] + }, + "ImportStorageDetails": { + "type": "object", + "properties": { + "storage-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "storage-tag" + ] + }, + "ImportStorageParams": { + "type": "object", + "properties": { + "kind": { + "type": "integer" + }, + "pool": { + "type": "string" + }, + "provider-id": { + "type": "string" + }, + "storage-name": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "kind", + "pool", + "provider-id", + "storage-name" + ] + }, + "ImportStorageResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "$ref": "#/definitions/ImportStorageDetails" + } + }, + "additionalProperties": false + }, + "ImportStorageResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ImportStorageResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "RemoveStorage": { + "type": "object", + "properties": { + "storage": { + "type": "array", + "items": { + "$ref": "#/definitions/RemoveStorageInstance" + } + } + }, + "additionalProperties": false, + "required": [ + "storage" + ] + }, + "RemoveStorageInstance": { + "type": "object", + "properties": { + "destroy-attachments": { + "type": "boolean" + }, + "destroy-storage": { + "type": "boolean" + }, + "force": { + "type": "boolean" + }, + "max-wait": { + "type": "integer" + }, + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag" + ] + }, + "StorageAddParams": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "storage": { + "$ref": "#/definitions/StorageConstraints" + }, + "unit": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "unit", + "name", + "storage" + ] + }, + "StorageAttachmentDetails": { + "type": "object", + "properties": { + "life": { + "type": "string" + }, + "location": { + "type": "string" + }, + "machine-tag": { + "type": "string" + }, + "storage-tag": { + "type": "string" + }, + "unit-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "storage-tag", + "unit-tag", + "machine-tag" + ] + }, + "StorageAttachmentId": { + "type": "object", + "properties": { + "storage-tag": { + "type": "string" + }, + "unit-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "storage-tag", + "unit-tag" + ] + }, + "StorageAttachmentIds": { + "type": "object", + "properties": { + "ids": { + "type": "array", + "items": { + "$ref": "#/definitions/StorageAttachmentId" + } + } + }, + "additionalProperties": false, + "required": [ + "ids" + ] + }, + "StorageConstraints": { + "type": "object", + "properties": { + "count": { + "type": "integer" + }, + "pool": { + "type": "string" + }, + "size": { + "type": "integer" + } + }, + "additionalProperties": false + }, + "StorageDetachmentParams": { + "type": "object", + "properties": { + "force": { + "type": "boolean" + }, + "ids": { + "$ref": "#/definitions/StorageAttachmentIds" + }, + "max-wait": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "ids" + ] + }, + "StorageDetails": { + "type": "object", + "properties": { + "attachments": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/StorageAttachmentDetails" + } + } + }, + "kind": { + "type": "integer" + }, + "life": { + "type": "string" + }, + "owner-tag": { + "type": "string" + }, + "persistent": { + "type": "boolean" + }, + "status": { + "$ref": "#/definitions/EntityStatus" + }, + "storage-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "storage-tag", + "owner-tag", + "kind", + "status", + "persistent" + ] + }, + "StorageDetailsListResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "type": "array", + "items": { + "$ref": "#/definitions/StorageDetails" + } + } + }, + "additionalProperties": false + }, + "StorageDetailsListResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/StorageDetailsListResult" + } + } + }, + "additionalProperties": false + }, + "StorageDetailsResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "$ref": "#/definitions/StorageDetails" + } + }, + "additionalProperties": false + }, + "StorageDetailsResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/StorageDetailsResult" + } + } + }, + "additionalProperties": false + }, + "StorageFilter": { + "type": "object", + "additionalProperties": false + }, + "StorageFilters": { + "type": "object", + "properties": { + "filters": { + "type": "array", + "items": { + "$ref": "#/definitions/StorageFilter" + } + } + }, + "additionalProperties": false + }, + "StoragePool": { + "type": "object", + "properties": { + "attrs": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "name": { + "type": "string" + }, + "provider": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "provider", + "attrs" + ] + }, + "StoragePoolArgs": { + "type": "object", + "properties": { + "pools": { + "type": "array", + "items": { + "$ref": "#/definitions/StoragePool" + } + } + }, + "additionalProperties": false, + "required": [ + "pools" + ] + }, + "StoragePoolDeleteArg": { + "type": "object", + "properties": { + "name": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name" + ] + }, + "StoragePoolDeleteArgs": { + "type": "object", + "properties": { + "pools": { + "type": "array", + "items": { + "$ref": "#/definitions/StoragePoolDeleteArg" + } + } + }, + "additionalProperties": false, + "required": [ + "pools" + ] + }, + "StoragePoolFilter": { + "type": "object", + "properties": { + "names": { + "type": "array", + "items": { + "type": "string" + } + }, + "providers": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "StoragePoolFilters": { + "type": "object", + "properties": { + "filters": { + "type": "array", + "items": { + "$ref": "#/definitions/StoragePoolFilter" + } + } + }, + "additionalProperties": false + }, + "StoragePoolsResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "storage-pools": { + "type": "array", + "items": { + "$ref": "#/definitions/StoragePool" + } + } + }, + "additionalProperties": false + }, + "StoragePoolsResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/StoragePoolsResult" + } + } + }, + "additionalProperties": false + }, + "StoragesAddParams": { + "type": "object", + "properties": { + "storages": { + "type": "array", + "items": { + "$ref": "#/definitions/StorageAddParams" + } + } + }, + "additionalProperties": false, + "required": [ + "storages" + ] + }, + "VolumeAttachmentDetails": { + "type": "object", + "properties": { + "VolumeAttachmentInfo": { + "$ref": "#/definitions/VolumeAttachmentInfo" + }, + "bus-address": { + "type": "string" + }, + "device-link": { + "type": "string" + }, + "device-name": { + "type": "string" + }, + "life": { + "type": "string" + }, + "plan-info": { + "$ref": "#/definitions/VolumeAttachmentPlanInfo" + }, + "read-only": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "VolumeAttachmentInfo" + ] + }, + "VolumeAttachmentInfo": { + "type": "object", + "properties": { + "bus-address": { + "type": "string" + }, + "device-link": { + "type": "string" + }, + "device-name": { + "type": "string" + }, + "plan-info": { + "$ref": "#/definitions/VolumeAttachmentPlanInfo" + }, + "read-only": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "VolumeAttachmentPlanInfo": { + "type": "object", + "properties": { + "device-attributes": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "device-type": { + "type": "string" + } + }, + "additionalProperties": false + }, + "VolumeDetails": { + "type": "object", + "properties": { + "info": { + "$ref": "#/definitions/VolumeInfo" + }, + "life": { + "type": "string" + }, + "machine-attachments": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/VolumeAttachmentDetails" + } + } + }, + "status": { + "$ref": "#/definitions/EntityStatus" + }, + "storage": { + "$ref": "#/definitions/StorageDetails" + }, + "unit-attachments": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/VolumeAttachmentDetails" + } + } + }, + "volume-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "volume-tag", + "info", + "status" + ] + }, + "VolumeDetailsListResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "type": "array", + "items": { + "$ref": "#/definitions/VolumeDetails" + } + } + }, + "additionalProperties": false + }, + "VolumeDetailsListResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/VolumeDetailsListResult" + } + } + }, + "additionalProperties": false + }, + "VolumeFilter": { + "type": "object", + "properties": { + "machines": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "VolumeFilters": { + "type": "object", + "properties": { + "filters": { + "type": "array", + "items": { + "$ref": "#/definitions/VolumeFilter" + } + } + }, + "additionalProperties": false + }, + "VolumeInfo": { + "type": "object", + "properties": { + "hardware-id": { + "type": "string" + }, + "persistent": { + "type": "boolean" + }, + "pool": { + "type": "string" + }, + "size": { + "type": "integer" + }, + "volume-id": { + "type": "string" + }, + "wwn": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "volume-id", + "size", + "persistent" + ] + } + } + } + }, + { + "Name": "Subnets", + "Description": "API provides the subnets API facade for version 5.", + "Version": 5, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "AllZones": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/ZoneResults" + } + }, + "description": "AllZones returns all availability zones known to Juju. If a\nzone is unusable, unavailable, or deprecated the Available\nfield will be false." + }, + "ListSubnets": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/SubnetsFilters" + }, + "Result": { + "$ref": "#/definitions/ListSubnetsResults" + } + }, + "description": "ListSubnets returns the matching subnets after applying\noptional filters." + }, + "SubnetsByCIDR": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/CIDRParams" + }, + "Result": { + "$ref": "#/definitions/SubnetsResults" + } + }, + "description": "SubnetsByCIDR returns the collection of subnets matching each CIDR in the input." + } + }, + "definitions": { + "CIDRParams": { + "type": "object", + "properties": { + "cidrs": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "cidrs" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ListSubnetsResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/Subnet" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "Subnet": { + "type": "object", + "properties": { + "cidr": { + "type": "string" + }, + "life": { + "type": "string" + }, + "provider-id": { + "type": "string" + }, + "provider-network-id": { + "type": "string" + }, + "provider-space-id": { + "type": "string" + }, + "space-tag": { + "type": "string" + }, + "status": { + "type": "string" + }, + "vlan-tag": { + "type": "integer" + }, + "zones": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "cidr", + "vlan-tag", + "life", + "space-tag", + "zones" + ] + }, + "SubnetV2": { + "type": "object", + "properties": { + "Subnet": { + "$ref": "#/definitions/Subnet" + }, + "cidr": { + "type": "string" + }, + "id": { + "type": "string" + }, + "life": { + "type": "string" + }, + "provider-id": { + "type": "string" + }, + "provider-network-id": { + "type": "string" + }, + "provider-space-id": { + "type": "string" + }, + "space-tag": { + "type": "string" + }, + "status": { + "type": "string" + }, + "vlan-tag": { + "type": "integer" + }, + "zones": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "cidr", + "vlan-tag", + "life", + "space-tag", + "zones", + "Subnet" + ] + }, + "SubnetsFilters": { + "type": "object", + "properties": { + "space-tag": { + "type": "string" + }, + "zone": { + "type": "string" + } + }, + "additionalProperties": false + }, + "SubnetsResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "subnets": { + "type": "array", + "items": { + "$ref": "#/definitions/SubnetV2" + } + } + }, + "additionalProperties": false + }, + "SubnetsResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/SubnetsResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "ZoneResult": { + "type": "object", + "properties": { + "available": { + "type": "boolean" + }, + "error": { + "$ref": "#/definitions/Error" + }, + "name": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "available" + ] + }, + "ZoneResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ZoneResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + } + } + } + }, + { + "Name": "UserManager", + "Description": "UserManagerAPI implements the user manager interface and is the concrete\nimplementation of the api end point.", + "Version": 3, + "AvailableTo": [ + "controller-user" + ], + "Schema": { + "type": "object", + "properties": { + "AddUser": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/AddUsers" + }, + "Result": { + "$ref": "#/definitions/AddUserResults" + } + }, + "description": "AddUser adds a user with a username, and either a password or\na randomly generated secret key which will be returned." + }, + "DisableUser": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "DisableUser disables one or more users. If the user is already disabled,\nthe action is considered a success." + }, + "EnableUser": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "EnableUser enables one or more users. If the user is already enabled,\nthe action is considered a success." + }, + "ModelUserInfo": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ModelUserInfoResults" + } + }, + "description": "ModelUserInfo returns information on all users in the model." + }, + "RemoveUser": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "RemoveUser permanently removes a user from the current controller for each\nentity provided. While the user is permanently removed we keep it's\ninformation around for auditing purposes.\nTODO(redir): Add information about getting deleted user information when we\nadd that capability." + }, + "ResetPassword": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/AddUserResults" + } + }, + "description": "ResetPassword resets password for supplied users by\ninvalidating current passwords (if any) and generating\nnew random secret keys which will be returned.\nUsers cannot reset their own password." + }, + "SetPassword": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/EntityPasswords" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "SetPassword changes the stored password for the specified users." + }, + "UserInfo": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/UserInfoRequest" + }, + "Result": { + "$ref": "#/definitions/UserInfoResults" + } + }, + "description": "UserInfo returns information on a user." + } + }, + "definitions": { + "AddUser": { + "type": "object", + "properties": { + "display-name": { + "type": "string" + }, + "password": { + "type": "string" + }, + "username": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "username", + "display-name" + ] + }, + "AddUserResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "secret-key": { + "type": "array", + "items": { + "type": "integer" + } + }, + "tag": { + "type": "string" + } + }, + "additionalProperties": false + }, + "AddUserResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/AddUserResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "AddUsers": { + "type": "object", + "properties": { + "users": { + "type": "array", + "items": { + "$ref": "#/definitions/AddUser" + } + } + }, + "additionalProperties": false, + "required": [ + "users" + ] + }, + "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" + ] + }, + "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" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ErrorResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "ModelUserInfo": { + "type": "object", + "properties": { + "access": { + "type": "string" + }, + "display-name": { + "type": "string" + }, + "last-connection": { + "type": "string", + "format": "date-time" + }, + "model-tag": { + "type": "string" + }, + "user": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "model-tag", + "user", + "display-name", + "last-connection", + "access" + ] + }, + "ModelUserInfoResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "$ref": "#/definitions/ModelUserInfo" + } + }, + "additionalProperties": false + }, + "ModelUserInfoResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ModelUserInfoResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "UserInfo": { + "type": "object", + "properties": { + "access": { + "type": "string" + }, + "created-by": { + "type": "string" + }, + "date-created": { + "type": "string", + "format": "date-time" + }, + "disabled": { + "type": "boolean" + }, + "display-name": { + "type": "string" + }, + "last-connection": { + "type": "string", + "format": "date-time" + }, + "username": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "username", + "display-name", + "access", + "created-by", + "date-created", + "disabled" + ] + }, + "UserInfoRequest": { + "type": "object", + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + }, + "include-disabled": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "entities", + "include-disabled" + ] + }, + "UserInfoResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "$ref": "#/definitions/UserInfo" + } + }, + "additionalProperties": false + }, + "UserInfoResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/UserInfoResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + } + } + } + } +] \ No newline at end of file