From 9b876649f269213c23fac45aaffc13dc024f13c0 Mon Sep 17 00:00:00 2001 From: Dima Tisnek Date: Fri, 30 Aug 2024 10:20:43 +0900 Subject: [PATCH] Add Facade 20 --- juju/client/_client.py | 5 +- juju/client/_client1.py | 56 +- juju/client/_client10.py | 897 + juju/client/_client19.py | 12 +- juju/client/_client2.py | 31 +- juju/client/_client20.py | 1773 + juju/client/_client3.py | 1065 + juju/client/_client5.py | 537 + juju/client/_client7.py | 7 +- juju/client/_definitions.py | 390 +- juju/client/facade.py | 8 +- juju/client/schemas-juju-3.5.2.json | 53484 ++++++++++++++++++++++++++ 12 files changed, 58198 insertions(+), 67 deletions(-) create mode 100644 juju/client/_client20.py create mode 100644 juju/client/schemas-juju-3.5.2.json diff --git a/juju/client/_client.py b/juju/client/_client.py index 4bfc57202..3cd83b9d9 100644 --- a/juju/client/_client.py +++ b/juju/client/_client.py @@ -4,7 +4,7 @@ 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, _client1, _client3, _client4, _client2, _client17, _client6, _client11, _client10, _client5, _client9, _client18, _client19, _client20 CLIENTS = { @@ -20,7 +20,8 @@ "5": _client5, "9": _client9, "18": _client18, - "19": _client19 + "19": _client19, + "20": _client20 } diff --git a/juju/client/_client1.py b/juju/client/_client1.py index d7a4cca66..a4887fe4a 100644 --- a/juju/client/_client1.py +++ b/juju/client/_client1.py @@ -738,9 +738,11 @@ class CAASApplicationProvisionerFacade(Type): 'name': {'type': 'string'}}, 'type': 'object'}, 'CharmContainer': {'additionalProperties': False, - 'properties': {'mounts': {'items': {'$ref': '#/definitions/CharmMount'}, + 'properties': {'gid': {'type': 'integer'}, + 'mounts': {'items': {'$ref': '#/definitions/CharmMount'}, 'type': 'array'}, - 'resource': {'type': 'string'}}, + 'resource': {'type': 'string'}, + 'uid': {'type': 'integer'}}, 'type': 'object'}, 'CharmDeployment': {'additionalProperties': False, 'properties': {'min-version': {'type': 'string'}, @@ -783,6 +785,7 @@ class CAASApplicationProvisionerFacade(Type): 'properties': {'assumes-expr': {'$ref': '#/definitions/ExpressionTree'}, 'categories': {'items': {'type': 'string'}, 'type': 'array'}, + 'charm-user': {'type': 'string'}, 'containers': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmContainer'}}, 'type': 'object'}, 'deployment': {'$ref': '#/definitions/CharmDeployment'}, @@ -1860,9 +1863,11 @@ class CAASFirewallerFacade(Type): 'name': {'type': 'string'}}, 'type': 'object'}, 'CharmContainer': {'additionalProperties': False, - 'properties': {'mounts': {'items': {'$ref': '#/definitions/CharmMount'}, + 'properties': {'gid': {'type': 'integer'}, + 'mounts': {'items': {'$ref': '#/definitions/CharmMount'}, 'type': 'array'}, - 'resource': {'type': 'string'}}, + 'resource': {'type': 'string'}, + 'uid': {'type': 'integer'}}, 'type': 'object'}, 'CharmDeployment': {'additionalProperties': False, 'properties': {'min-version': {'type': 'string'}, @@ -1905,6 +1910,7 @@ class CAASFirewallerFacade(Type): 'properties': {'assumes-expr': {'$ref': '#/definitions/ExpressionTree'}, 'categories': {'items': {'type': 'string'}, 'type': 'array'}, + 'charm-user': {'type': 'string'}, 'containers': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmContainer'}}, 'type': 'object'}, 'deployment': {'$ref': '#/definitions/CharmDeployment'}, @@ -2346,9 +2352,11 @@ class CAASFirewallerSidecarFacade(Type): 'name': {'type': 'string'}}, 'type': 'object'}, 'CharmContainer': {'additionalProperties': False, - 'properties': {'mounts': {'items': {'$ref': '#/definitions/CharmMount'}, + 'properties': {'gid': {'type': 'integer'}, + 'mounts': {'items': {'$ref': '#/definitions/CharmMount'}, 'type': 'array'}, - 'resource': {'type': 'string'}}, + 'resource': {'type': 'string'}, + 'uid': {'type': 'integer'}}, 'type': 'object'}, 'CharmDeployment': {'additionalProperties': False, 'properties': {'min-version': {'type': 'string'}, @@ -2391,6 +2399,7 @@ class CAASFirewallerSidecarFacade(Type): 'properties': {'assumes-expr': {'$ref': '#/definitions/ExpressionTree'}, 'categories': {'items': {'type': 'string'}, 'type': 'array'}, + 'charm-user': {'type': 'string'}, 'containers': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmContainer'}}, 'type': 'object'}, 'deployment': {'$ref': '#/definitions/CharmDeployment'}, @@ -3903,9 +3912,11 @@ class CAASOperatorProvisionerFacade(Type): 'name': {'type': 'string'}}, 'type': 'object'}, 'CharmContainer': {'additionalProperties': False, - 'properties': {'mounts': {'items': {'$ref': '#/definitions/CharmMount'}, + 'properties': {'gid': {'type': 'integer'}, + 'mounts': {'items': {'$ref': '#/definitions/CharmMount'}, 'type': 'array'}, - 'resource': {'type': 'string'}}, + 'resource': {'type': 'string'}, + 'uid': {'type': 'integer'}}, 'type': 'object'}, 'CharmDeployment': {'additionalProperties': False, 'properties': {'min-version': {'type': 'string'}, @@ -3948,6 +3959,7 @@ class CAASOperatorProvisionerFacade(Type): 'properties': {'assumes-expr': {'$ref': '#/definitions/ExpressionTree'}, 'categories': {'items': {'type': 'string'}, 'type': 'array'}, + 'charm-user': {'type': 'string'}, 'containers': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmContainer'}}, 'type': 'object'}, 'deployment': {'$ref': '#/definitions/CharmDeployment'}, @@ -4920,9 +4932,11 @@ class CrossModelSecretsFacade(Type): 'peek': {'type': 'boolean'}, 'refresh': {'type': 'boolean'}, 'revision': {'type': 'integer'}, + 'source-controller-uuid': {'type': 'string'}, 'unit-id': {'type': 'integer'}, 'uri': {'type': 'string'}}, - 'required': ['application-token', + 'required': ['source-controller-uuid', + 'application-token', 'unit-id', 'uri'], 'type': 'object'}, @@ -10094,7 +10108,13 @@ async def rpc(self, msg): class SecretsDrainFacade(Type): name = 'SecretsDrain' version = 1 - schema = {'definitions': {'ChangeSecretBackendArg': {'additionalProperties': False, + 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'}, + 'ChangeSecretBackendArg': {'additionalProperties': False, 'properties': {'content': {'$ref': '#/definitions/SecretContentParams'}, 'revision': {'type': 'integer'}, 'uri': {'type': 'string'}}, @@ -10122,7 +10142,9 @@ class SecretsDrainFacade(Type): 'required': ['results'], 'type': 'object'}, 'ListSecretResult': {'additionalProperties': False, - 'properties': {'create-time': {'format': 'date-time', + 'properties': {'access': {'items': {'$ref': '#/definitions/AccessInfo'}, + 'type': 'array'}, + 'create-time': {'format': 'date-time', 'type': 'string'}, 'description': {'type': 'string'}, 'label': {'type': 'string'}, @@ -12317,7 +12339,13 @@ async def WatchAPIVersion(self, entities=None): class UserSecretsDrainFacade(Type): name = 'UserSecretsDrain' version = 1 - schema = {'definitions': {'ChangeSecretBackendArg': {'additionalProperties': False, + 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'}, + 'ChangeSecretBackendArg': {'additionalProperties': False, 'properties': {'content': {'$ref': '#/definitions/SecretContentParams'}, 'revision': {'type': 'integer'}, 'uri': {'type': 'string'}}, @@ -12357,7 +12385,9 @@ class UserSecretsDrainFacade(Type): 'required': ['args'], 'type': 'object'}, 'ListSecretResult': {'additionalProperties': False, - 'properties': {'create-time': {'format': 'date-time', + 'properties': {'access': {'items': {'$ref': '#/definitions/AccessInfo'}, + 'type': 'array'}, + 'create-time': {'format': 'date-time', 'type': 'string'}, 'description': {'type': 'string'}, 'label': {'type': 'string'}, diff --git a/juju/client/_client10.py b/juju/client/_client10.py index e26850bf7..2700cef32 100644 --- a/juju/client/_client10.py +++ b/juju/client/_client10.py @@ -663,3 +663,900 @@ async def WatchUpgradeSeriesNotifications(self, entities=None): return reply + +class ModelManagerFacade(Type): + name = 'ModelManager' + version = 10 + schema = {'definitions': {'ChangeModelCredentialParams': {'additionalProperties': False, + 'properties': {'credential-tag': {'type': 'string'}, + 'model-tag': {'type': 'string'}}, + 'required': ['model-tag', + 'credential-tag'], + 'type': 'object'}, + 'ChangeModelCredentialsParams': {'additionalProperties': False, + 'properties': {'model-credentials': {'items': {'$ref': '#/definitions/ChangeModelCredentialParams'}, + 'type': 'array'}}, + 'required': ['model-credentials'], + 'type': 'object'}, + 'DestroyModelParams': {'additionalProperties': False, + 'properties': {'destroy-storage': {'type': 'boolean'}, + 'force': {'type': 'boolean'}, + 'max-wait': {'type': 'integer'}, + 'model-tag': {'type': 'string'}, + 'timeout': {'type': 'integer'}}, + 'required': ['model-tag'], + 'type': 'object'}, + 'DestroyModelsParams': {'additionalProperties': False, + 'properties': {'models': {'items': {'$ref': '#/definitions/DestroyModelParams'}, + 'type': 'array'}}, + 'required': ['models'], + 'type': 'object'}, + 'DumpModelRequest': {'additionalProperties': False, + 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'}, + 'type': 'array'}, + 'simplified': {'type': 'boolean'}}, + 'required': ['entities', 'simplified'], + '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'}, + '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'}, + 'MachineHardware': {'additionalProperties': False, + 'properties': {'arch': {'type': 'string'}, + 'availability-zone': {'type': 'string'}, + 'cores': {'type': 'integer'}, + 'cpu-power': {'type': 'integer'}, + 'mem': {'type': 'integer'}, + 'root-disk': {'type': 'integer'}, + 'tags': {'items': {'type': 'string'}, + 'type': 'array'}, + 'virt-type': {'type': 'string'}}, + 'type': 'object'}, + 'MapResult': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}, + 'result': {'patternProperties': {'.*': {'additionalProperties': True, + 'type': 'object'}}, + 'type': 'object'}}, + 'required': ['result'], + 'type': 'object'}, + 'MapResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/MapResult'}, + 'type': 'array'}}, + 'required': ['results'], + 'type': 'object'}, + 'Model': {'additionalProperties': False, + 'properties': {'name': {'type': 'string'}, + 'owner-tag': {'type': 'string'}, + 'type': {'type': 'string'}, + 'uuid': {'type': 'string'}}, + 'required': ['name', 'uuid', 'type', 'owner-tag'], + 'type': 'object'}, + 'ModelApplicationInfo': {'additionalProperties': False, + 'properties': {'name': {'type': 'string'}}, + 'required': ['name'], + 'type': 'object'}, + 'ModelCreateArgs': {'additionalProperties': False, + 'properties': {'cloud-tag': {'type': 'string'}, + 'config': {'patternProperties': {'.*': {'additionalProperties': True, + 'type': 'object'}}, + 'type': 'object'}, + 'credential': {'type': 'string'}, + 'name': {'type': 'string'}, + 'owner-tag': {'type': 'string'}, + 'region': {'type': 'string'}}, + 'required': ['name', 'owner-tag'], + 'type': 'object'}, + 'ModelDefaultValues': {'additionalProperties': False, + 'properties': {'cloud-region': {'type': 'string'}, + 'cloud-tag': {'type': 'string'}, + 'config': {'patternProperties': {'.*': {'additionalProperties': True, + 'type': 'object'}}, + 'type': 'object'}}, + 'required': ['config'], + 'type': 'object'}, + 'ModelDefaults': {'additionalProperties': False, + 'properties': {'controller': {'additionalProperties': True, + 'type': 'object'}, + 'default': {'additionalProperties': True, + 'type': 'object'}, + 'regions': {'items': {'$ref': '#/definitions/RegionDefaults'}, + 'type': 'array'}}, + 'type': 'object'}, + 'ModelDefaultsResult': {'additionalProperties': False, + 'properties': {'config': {'patternProperties': {'.*': {'$ref': '#/definitions/ModelDefaults'}}, + 'type': 'object'}, + 'error': {'$ref': '#/definitions/Error'}}, + 'required': ['config'], + 'type': 'object'}, + 'ModelDefaultsResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/ModelDefaultsResult'}, + 'type': 'array'}}, + 'required': ['results'], + 'type': 'object'}, + 'ModelEntityCount': {'additionalProperties': False, + 'properties': {'count': {'type': 'integer'}, + 'entity': {'type': 'string'}}, + 'required': ['entity', 'count'], + 'type': 'object'}, + 'ModelFilesystemInfo': {'additionalProperties': False, + 'properties': {'detachable': {'type': 'boolean'}, + 'id': {'type': 'string'}, + 'message': {'type': 'string'}, + 'provider-id': {'type': 'string'}, + 'status': {'type': 'string'}}, + 'required': ['id'], + 'type': 'object'}, + 'ModelInfo': {'additionalProperties': False, + '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': {'items': {'$ref': '#/definitions/ModelMachineInfo'}, + 'type': 'array'}, + 'migration': {'$ref': '#/definitions/ModelMigrationStatus'}, + 'name': {'type': 'string'}, + 'owner-tag': {'type': 'string'}, + 'provider-type': {'type': 'string'}, + 'secret-backends': {'items': {'$ref': '#/definitions/SecretBackendResult'}, + 'type': 'array'}, + 'sla': {'$ref': '#/definitions/ModelSLAInfo'}, + 'status': {'$ref': '#/definitions/EntityStatus'}, + 'supported-features': {'items': {'$ref': '#/definitions/SupportedFeature'}, + 'type': 'array'}, + 'type': {'type': 'string'}, + 'users': {'items': {'$ref': '#/definitions/ModelUserInfo'}, + 'type': 'array'}, + 'uuid': {'type': 'string'}}, + 'required': ['name', + 'type', + 'uuid', + 'controller-uuid', + 'is-controller', + 'cloud-tag', + 'owner-tag', + 'life', + 'users', + 'machines', + 'secret-backends', + 'sla', + 'agent-version'], + 'type': 'object'}, + 'ModelInfoResult': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}, + 'result': {'$ref': '#/definitions/ModelInfo'}}, + 'type': 'object'}, + 'ModelInfoResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/ModelInfoResult'}, + 'type': 'array'}}, + 'required': ['results'], + 'type': 'object'}, + 'ModelMachineInfo': {'additionalProperties': False, + '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'}}, + 'required': ['id'], + 'type': 'object'}, + 'ModelMigrationStatus': {'additionalProperties': False, + 'properties': {'end': {'format': 'date-time', + 'type': 'string'}, + 'start': {'format': 'date-time', + 'type': 'string'}, + 'status': {'type': 'string'}}, + 'required': ['status', 'start'], + 'type': 'object'}, + 'ModelSLAInfo': {'additionalProperties': False, + 'properties': {'level': {'type': 'string'}, + 'owner': {'type': 'string'}}, + 'required': ['level', 'owner'], + 'type': 'object'}, + 'ModelStatus': {'additionalProperties': False, + 'properties': {'application-count': {'type': 'integer'}, + 'applications': {'items': {'$ref': '#/definitions/ModelApplicationInfo'}, + 'type': 'array'}, + 'error': {'$ref': '#/definitions/Error'}, + 'filesystems': {'items': {'$ref': '#/definitions/ModelFilesystemInfo'}, + 'type': 'array'}, + 'hosted-machine-count': {'type': 'integer'}, + 'life': {'type': 'string'}, + 'machines': {'items': {'$ref': '#/definitions/ModelMachineInfo'}, + 'type': 'array'}, + 'model-tag': {'type': 'string'}, + 'owner-tag': {'type': 'string'}, + 'type': {'type': 'string'}, + 'unit-count': {'type': 'integer'}, + 'volumes': {'items': {'$ref': '#/definitions/ModelVolumeInfo'}, + 'type': 'array'}}, + 'required': ['model-tag', + 'life', + 'type', + 'hosted-machine-count', + 'application-count', + 'unit-count', + 'owner-tag'], + 'type': 'object'}, + 'ModelStatusResults': {'additionalProperties': False, + 'properties': {'models': {'items': {'$ref': '#/definitions/ModelStatus'}, + 'type': 'array'}}, + 'required': ['models'], + 'type': 'object'}, + 'ModelSummariesRequest': {'additionalProperties': False, + 'properties': {'all': {'type': 'boolean'}, + 'user-tag': {'type': 'string'}}, + 'required': ['user-tag'], + 'type': 'object'}, + 'ModelSummary': {'additionalProperties': False, + 'properties': {'agent-version': {'$ref': '#/definitions/Number'}, + 'cloud-credential-tag': {'type': 'string'}, + 'cloud-region': {'type': 'string'}, + 'cloud-tag': {'type': 'string'}, + 'controller-uuid': {'type': 'string'}, + 'counts': {'items': {'$ref': '#/definitions/ModelEntityCount'}, + 'type': 'array'}, + 'default-series': {'type': 'string'}, + 'is-controller': {'type': 'boolean'}, + 'last-connection': {'format': 'date-time', + 'type': 'string'}, + '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'}}, + 'required': ['name', + 'uuid', + 'type', + 'controller-uuid', + 'is-controller', + 'cloud-tag', + 'owner-tag', + 'life', + 'user-access', + 'last-connection', + 'counts', + 'sla', + 'agent-version'], + 'type': 'object'}, + 'ModelSummaryResult': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}, + 'result': {'$ref': '#/definitions/ModelSummary'}}, + 'type': 'object'}, + 'ModelSummaryResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/ModelSummaryResult'}, + 'type': 'array'}}, + 'required': ['results'], + 'type': 'object'}, + 'ModelUnsetKeys': {'additionalProperties': False, + 'properties': {'cloud-region': {'type': 'string'}, + 'cloud-tag': {'type': 'string'}, + 'keys': {'items': {'type': 'string'}, + 'type': 'array'}}, + 'required': ['keys'], + 'type': 'object'}, + 'ModelUserInfo': {'additionalProperties': False, + 'properties': {'access': {'type': 'string'}, + 'display-name': {'type': 'string'}, + 'last-connection': {'format': 'date-time', + 'type': 'string'}, + 'model-tag': {'type': 'string'}, + 'user': {'type': 'string'}}, + 'required': ['model-tag', + 'user', + 'display-name', + 'last-connection', + 'access'], + 'type': 'object'}, + 'ModelVolumeInfo': {'additionalProperties': False, + 'properties': {'detachable': {'type': 'boolean'}, + 'id': {'type': 'string'}, + 'message': {'type': 'string'}, + 'provider-id': {'type': 'string'}, + 'status': {'type': 'string'}}, + 'required': ['id'], + 'type': 'object'}, + 'ModifyModelAccess': {'additionalProperties': False, + 'properties': {'access': {'type': 'string'}, + 'action': {'type': 'string'}, + 'model-tag': {'type': 'string'}, + 'user-tag': {'type': 'string'}}, + 'required': ['user-tag', + 'action', + 'access', + 'model-tag'], + 'type': 'object'}, + 'ModifyModelAccessRequest': {'additionalProperties': False, + 'properties': {'changes': {'items': {'$ref': '#/definitions/ModifyModelAccess'}, + 'type': 'array'}}, + 'required': ['changes'], + 'type': 'object'}, + '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'}, + 'RegionDefaults': {'additionalProperties': False, + 'properties': {'region-name': {'type': 'string'}, + 'value': {'additionalProperties': True, + 'type': 'object'}}, + 'required': ['region-name', 'value'], + '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'}, + 'SetModelDefaults': {'additionalProperties': False, + 'properties': {'config': {'items': {'$ref': '#/definitions/ModelDefaultValues'}, + 'type': 'array'}}, + 'required': ['config'], + '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'}, + 'SupportedFeature': {'additionalProperties': False, + 'properties': {'description': {'type': 'string'}, + 'name': {'type': 'string'}, + 'version': {'type': 'string'}}, + 'required': ['name', 'description'], + 'type': 'object'}, + 'UnsetModelDefaults': {'additionalProperties': False, + 'properties': {'keys': {'items': {'$ref': '#/definitions/ModelUnsetKeys'}, + 'type': 'array'}}, + 'required': ['keys'], + 'type': 'object'}, + 'UserModel': {'additionalProperties': False, + 'properties': {'last-connection': {'format': 'date-time', + 'type': 'string'}, + 'model': {'$ref': '#/definitions/Model'}}, + 'required': ['model', 'last-connection'], + 'type': 'object'}, + 'UserModelList': {'additionalProperties': False, + 'properties': {'user-models': {'items': {'$ref': '#/definitions/UserModel'}, + 'type': 'array'}}, + 'required': ['user-models'], + 'type': 'object'}}, + 'properties': {'ChangeModelCredential': {'description': 'ChangeModelCredential ' + 'changes cloud ' + 'credential reference ' + 'for models.\n' + 'These new cloud ' + 'credentials must ' + 'already exist on the ' + 'controller.', + 'properties': {'Params': {'$ref': '#/definitions/ChangeModelCredentialsParams'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}, + 'CreateModel': {'description': 'CreateModel creates a new ' + 'model using the account and\n' + 'model config specified in the ' + 'args.', + 'properties': {'Params': {'$ref': '#/definitions/ModelCreateArgs'}, + 'Result': {'$ref': '#/definitions/ModelInfo'}}, + 'type': 'object'}, + 'DestroyModels': {'description': 'DestroyModels will try to ' + 'destroy the specified ' + 'models.\n' + 'If there is a block on ' + 'destruction, this method ' + 'will return an error.\n' + 'From ModelManager v7 ' + 'onwards, DestroyModels gains ' + "'force' and 'max-wait' " + 'parameters.', + 'properties': {'Params': {'$ref': '#/definitions/DestroyModelsParams'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}, + 'DumpModels': {'description': 'DumpModels will export the ' + 'models into the database ' + 'agnostic\n' + 'representation. The user needs ' + 'to either be a controller ' + 'admin, or have\n' + 'admin privileges on the model ' + 'itself.', + 'properties': {'Params': {'$ref': '#/definitions/DumpModelRequest'}, + 'Result': {'$ref': '#/definitions/StringResults'}}, + 'type': 'object'}, + 'DumpModelsDB': {'description': 'DumpModelsDB will gather all ' + 'documents from all model ' + 'collections\n' + 'for the specified model. The ' + 'map result contains a map of ' + 'collection\n' + 'names to lists of documents ' + 'represented as maps.', + 'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/MapResults'}}, + 'type': 'object'}, + 'ListModelSummaries': {'description': 'ListModelSummaries ' + 'returns models that the ' + 'specified user\n' + 'has access to in the ' + 'current server. ' + 'Controller admins ' + '(superuser)\n' + 'can list models for any ' + 'user. Other users\n' + 'can only ask about ' + 'their own models.', + 'properties': {'Params': {'$ref': '#/definitions/ModelSummariesRequest'}, + 'Result': {'$ref': '#/definitions/ModelSummaryResults'}}, + 'type': 'object'}, + 'ListModels': {'description': 'ListModels returns the models ' + 'that the specified user\n' + 'has access to in the current ' + 'server. Controller admins ' + '(superuser)\n' + 'can list models for any user. ' + 'Other users\n' + 'can only ask about their own ' + 'models.', + 'properties': {'Params': {'$ref': '#/definitions/Entity'}, + 'Result': {'$ref': '#/definitions/UserModelList'}}, + 'type': 'object'}, + 'ModelDefaultsForClouds': {'description': 'ModelDefaultsForClouds ' + 'returns the default ' + 'config values for ' + 'the specified\n' + 'clouds.', + 'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/ModelDefaultsResults'}}, + 'type': 'object'}, + 'ModelInfo': {'description': 'ModelInfo returns information ' + 'about the specified models.', + 'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/ModelInfoResults'}}, + 'type': 'object'}, + 'ModelStatus': {'description': 'ModelStatus returns a summary ' + 'of the model.', + 'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/ModelStatusResults'}}, + 'type': 'object'}, + 'ModifyModelAccess': {'description': 'ModifyModelAccess ' + 'changes the model access ' + 'granted to users.', + 'properties': {'Params': {'$ref': '#/definitions/ModifyModelAccessRequest'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}, + 'SetModelDefaults': {'description': 'SetModelDefaults writes ' + 'new values for the ' + 'specified default model ' + 'settings.', + 'properties': {'Params': {'$ref': '#/definitions/SetModelDefaults'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}, + 'UnsetModelDefaults': {'description': 'UnsetModelDefaults ' + 'removes the specified ' + 'default model settings.', + 'properties': {'Params': {'$ref': '#/definitions/UnsetModelDefaults'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}}, + 'type': 'object'} + + + @ReturnMapping(ErrorResults) + async def ChangeModelCredential(self, model_credentials=None): + ''' + ChangeModelCredential changes cloud credential reference for models. + These new cloud credentials must already exist on the controller. + + model_credentials : typing.Sequence[~ChangeModelCredentialParams] + Returns -> ErrorResults + ''' + 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))) + + # map input types to rpc msg + _params = dict() + msg = dict(type='ModelManager', + request='ChangeModelCredential', + version=10, + params=_params) + _params['model-credentials'] = model_credentials + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ModelInfo) + async def CreateModel(self, cloud_tag=None, config=None, credential=None, name=None, owner_tag=None, region=None): + ''' + CreateModel creates a new model using the account and + model config specified in the args. + + cloud_tag : str + config : typing.Mapping[str, typing.Any] + credential : str + name : str + owner_tag : str + region : str + Returns -> ModelInfo + ''' + 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))) + + # map input types to rpc msg + _params = dict() + msg = dict(type='ModelManager', + request='CreateModel', + version=10, + params=_params) + _params['cloud-tag'] = cloud_tag + _params['config'] = config + _params['credential'] = credential + _params['name'] = name + _params['owner-tag'] = owner_tag + _params['region'] = region + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ErrorResults) + async def DestroyModels(self, models=None): + ''' + DestroyModels will try to destroy the specified models. + If there is a block on destruction, this method will return an error. + From ModelManager v7 onwards, DestroyModels gains 'force' and 'max-wait' parameters. + + models : typing.Sequence[~DestroyModelParams] + 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='ModelManager', + request='DestroyModels', + version=10, + params=_params) + _params['models'] = models + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(StringResults) + async def DumpModels(self, entities=None, simplified=None): + ''' + DumpModels will export the models into the database agnostic + representation. The user needs to either be a controller admin, or have + admin privileges on the model itself. + + entities : typing.Sequence[~Entity] + simplified : bool + 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))) + + if simplified is not None and not isinstance(simplified, bool): + raise Exception("Expected simplified to be a bool, received: {}".format(type(simplified))) + + # map input types to rpc msg + _params = dict() + msg = dict(type='ModelManager', + request='DumpModels', + version=10, + params=_params) + _params['entities'] = entities + _params['simplified'] = simplified + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(MapResults) + async def DumpModelsDB(self, entities=None): + ''' + DumpModelsDB will gather all documents from all model collections + for the specified model. The map result contains a map of collection + names to lists of documents represented as maps. + + entities : typing.Sequence[~Entity] + Returns -> MapResults + ''' + if entities is not None and not isinstance(entities, (bytes, str, list)): + raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) + + # map input types to rpc msg + _params = dict() + msg = dict(type='ModelManager', + request='DumpModelsDB', + version=10, + params=_params) + _params['entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ModelSummaryResults) + async def ListModelSummaries(self, all_=None, user_tag=None): + ''' + ListModelSummaries returns models that the specified user + has access to in the current server. Controller admins (superuser) + can list models for any user. Other users + can only ask about their own models. + + all_ : bool + user_tag : str + Returns -> ModelSummaryResults + ''' + 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))) + + # map input types to rpc msg + _params = dict() + msg = dict(type='ModelManager', + request='ListModelSummaries', + version=10, + params=_params) + _params['all'] = all_ + _params['user-tag'] = user_tag + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(UserModelList) + async def ListModels(self, tag=None): + ''' + ListModels returns the models that the specified user + has access to in the current server. Controller admins (superuser) + can list models for any user. Other users + can only ask about their own models. + + tag : str + Returns -> UserModelList + ''' + 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='ModelManager', + request='ListModels', + version=10, + params=_params) + _params['tag'] = tag + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ModelDefaultsResults) + async def ModelDefaultsForClouds(self, entities=None): + ''' + ModelDefaultsForClouds returns the default config values for the specified + clouds. + + entities : typing.Sequence[~Entity] + Returns -> ModelDefaultsResults + ''' + if entities is not None and not isinstance(entities, (bytes, str, list)): + raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) + + # map input types to rpc msg + _params = dict() + msg = dict(type='ModelManager', + request='ModelDefaultsForClouds', + version=10, + params=_params) + _params['entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ModelInfoResults) + async def ModelInfo(self, entities=None): + ''' + ModelInfo returns information about the specified models. + + entities : typing.Sequence[~Entity] + Returns -> ModelInfoResults + ''' + if entities is not None and not isinstance(entities, (bytes, str, list)): + raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) + + # map input types to rpc msg + _params = dict() + msg = dict(type='ModelManager', + request='ModelInfo', + version=10, + params=_params) + _params['entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ModelStatusResults) + async def ModelStatus(self, entities=None): + ''' + ModelStatus returns a summary of the model. + + entities : typing.Sequence[~Entity] + Returns -> ModelStatusResults + ''' + if entities is not None and not isinstance(entities, (bytes, str, list)): + raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities))) + + # map input types to rpc msg + _params = dict() + msg = dict(type='ModelManager', + request='ModelStatus', + version=10, + params=_params) + _params['entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ErrorResults) + async def ModifyModelAccess(self, changes=None): + ''' + ModifyModelAccess changes the model access granted to users. + + changes : typing.Sequence[~ModifyModelAccess] + 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='ModelManager', + request='ModifyModelAccess', + version=10, + params=_params) + _params['changes'] = changes + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ErrorResults) + async def SetModelDefaults(self, config=None): + ''' + SetModelDefaults writes new values for the specified default model settings. + + config : typing.Sequence[~ModelDefaultValues] + Returns -> ErrorResults + ''' + if config is not None and not isinstance(config, (bytes, str, list)): + raise Exception("Expected config to be a Sequence, received: {}".format(type(config))) + + # map input types to rpc msg + _params = dict() + msg = dict(type='ModelManager', + request='SetModelDefaults', + version=10, + params=_params) + _params['config'] = config + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ErrorResults) + async def UnsetModelDefaults(self, keys=None): + ''' + UnsetModelDefaults removes the specified default model settings. + + keys : typing.Sequence[~ModelUnsetKeys] + Returns -> ErrorResults + ''' + 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='ModelManager', + request='UnsetModelDefaults', + version=10, + params=_params) + _params['keys'] = keys + reply = await self.rpc(msg) + return reply + + diff --git a/juju/client/_client19.py b/juju/client/_client19.py index 476ed1129..3171ef69a 100644 --- a/juju/client/_client19.py +++ b/juju/client/_client19.py @@ -1821,6 +1821,12 @@ class UniterFacade(Type): 'type': 'array'}}, 'required': ['servers'], 'type': 'object'}, + 'AccessInfo': {'additionalProperties': False, + 'properties': {'role': {'type': 'string'}, + 'scope-tag': {'type': 'string'}, + 'target-tag': {'type': 'string'}}, + 'required': ['target-tag', 'scope-tag', 'role'], + 'type': 'object'}, 'Action': {'additionalProperties': False, 'properties': {'execution-group': {'type': 'string'}, 'name': {'type': 'string'}, @@ -1978,6 +1984,8 @@ class UniterFacade(Type): 'type': 'array'}, 'secret-revokes': {'items': {'$ref': '#/definitions/GrantRevokeSecretArg'}, 'type': 'array'}, + 'secret-track-latest': {'items': {'type': 'string'}, + 'type': 'array'}, 'secret-updates': {'items': {'$ref': '#/definitions/UpdateSecretArg'}, 'type': 'array'}, 'set-raw-k8s-spec': {'$ref': '#/definitions/PodSpec'}, @@ -2235,7 +2243,9 @@ class UniterFacade(Type): 'required': ['results'], 'type': 'object'}, 'ListSecretResult': {'additionalProperties': False, - 'properties': {'create-time': {'format': 'date-time', + 'properties': {'access': {'items': {'$ref': '#/definitions/AccessInfo'}, + 'type': 'array'}, + 'create-time': {'format': 'date-time', 'type': 'string'}, 'description': {'type': 'string'}, 'label': {'type': 'string'}, diff --git a/juju/client/_client2.py b/juju/client/_client2.py index a62430c02..5728356bc 100644 --- a/juju/client/_client2.py +++ b/juju/client/_client2.py @@ -641,9 +641,11 @@ class CAASUnitProvisionerFacade(Type): 'name': {'type': 'string'}}, 'type': 'object'}, 'CharmContainer': {'additionalProperties': False, - 'properties': {'mounts': {'items': {'$ref': '#/definitions/CharmMount'}, + 'properties': {'gid': {'type': 'integer'}, + 'mounts': {'items': {'$ref': '#/definitions/CharmMount'}, 'type': 'array'}, - 'resource': {'type': 'string'}}, + 'resource': {'type': 'string'}, + 'uid': {'type': 'integer'}}, 'type': 'object'}, 'CharmDeployment': {'additionalProperties': False, 'properties': {'min-version': {'type': 'string'}, @@ -686,6 +688,7 @@ class CAASUnitProvisionerFacade(Type): 'properties': {'assumes-expr': {'$ref': '#/definitions/ExpressionTree'}, 'categories': {'items': {'type': 'string'}, 'type': 'array'}, + 'charm-user': {'type': 'string'}, 'containers': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmContainer'}}, 'type': 'object'}, 'deployment': {'$ref': '#/definitions/CharmDeployment'}, @@ -5108,7 +5111,13 @@ async def WatchRemoteRelations(self): class SecretsFacade(Type): name = 'Secrets' version = 2 - schema = {'definitions': {'CreateSecretArg': {'additionalProperties': False, + 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'}, + 'CreateSecretArg': {'additionalProperties': False, 'properties': {'UpsertSecretArg': {'$ref': '#/definitions/UpsertSecretArg'}, 'content': {'$ref': '#/definitions/SecretContentParams'}, 'description': {'type': 'string'}, @@ -5167,7 +5176,9 @@ class SecretsFacade(Type): 'applications'], 'type': 'object'}, 'ListSecretResult': {'additionalProperties': False, - 'properties': {'create-time': {'format': 'date-time', + 'properties': {'access': {'items': {'$ref': '#/definitions/AccessInfo'}, + 'type': 'array'}, + 'create-time': {'format': 'date-time', 'type': 'string'}, 'description': {'type': 'string'}, 'label': {'type': 'string'}, @@ -5479,7 +5490,13 @@ async def UpdateSecrets(self, args=None): class SecretsManagerFacade(Type): name = 'SecretsManager' version = 2 - schema = {'definitions': {'CreateSecretArg': {'additionalProperties': False, + 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'}, + 'CreateSecretArg': {'additionalProperties': False, 'properties': {'UpsertSecretArg': {'$ref': '#/definitions/UpsertSecretArg'}, 'content': {'$ref': '#/definitions/SecretContentParams'}, 'description': {'type': 'string'}, @@ -5577,7 +5594,9 @@ class SecretsManagerFacade(Type): 'required': ['args'], 'type': 'object'}, 'ListSecretResult': {'additionalProperties': False, - 'properties': {'create-time': {'format': 'date-time', + 'properties': {'access': {'items': {'$ref': '#/definitions/AccessInfo'}, + 'type': 'array'}, + 'create-time': {'format': 'date-time', 'type': 'string'}, 'description': {'type': 'string'}, 'label': {'type': 'string'}, diff --git a/juju/client/_client20.py b/juju/client/_client20.py new file mode 100644 index 000000000..3118b373f --- /dev/null +++ b/juju/client/_client20.py @@ -0,0 +1,1773 @@ +# 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 = 20 + 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'}, + 'ApplicationOfferDetailsV5': {'additionalProperties': False, + 'properties': {'application-description': {'type': 'string'}, + 'endpoints': {'items': {'$ref': '#/definitions/RemoteEndpoint'}, + 'type': 'array'}, + 'offer-name': {'type': 'string'}, + 'offer-url': {'type': 'string'}, + 'offer-uuid': {'type': 'string'}, + 'source-model-tag': {'type': 'string'}, + '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'}, + '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'}, + 'ConsumeApplicationArgV5': {'additionalProperties': False, + 'properties': {'ApplicationOfferDetailsV5': {'$ref': '#/definitions/ApplicationOfferDetailsV5'}, + 'application-alias': {'type': 'string'}, + 'application-description': {'type': 'string'}, + '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'}, + 'users': {'items': {'$ref': '#/definitions/OfferUserDetails'}, + 'type': 'array'}}, + 'required': ['source-model-tag', + 'offer-uuid', + 'offer-url', + 'offer-name', + 'application-description', + 'ApplicationOfferDetailsV5'], + 'type': 'object'}, + 'ConsumeApplicationArgsV5': {'additionalProperties': False, + 'properties': {'args': {'items': {'$ref': '#/definitions/ConsumeApplicationArgV5'}, + 'type': 'array'}}, + 'type': 'object'}, + 'DeployFromRepositoryArg': {'additionalProperties': False, + 'properties': {'ApplicationName': {'type': 'string'}, + 'AttachStorage': {'items': {'type': 'string'}, + 'type': 'array'}, + 'CharmName': {'type': 'string'}, + 'ConfigYAML': {'type': 'string'}, + 'Cons': {'$ref': '#/definitions/Value'}, + 'Devices': {'patternProperties': {'.*': {'$ref': '#/definitions/Constraints'}}, + 'type': 'object'}, + 'DryRun': {'type': 'boolean'}, + 'Placement': {'items': {'$ref': '#/definitions/Placement'}, + 'type': 'array'}, + 'Storage': {'patternProperties': {'.*': {'$ref': '#/definitions/Constraints'}}, + 'type': 'object'}, + 'Trust': {'type': 'boolean'}, + 'base': {'$ref': '#/definitions/Base'}, + 'channel': {'type': 'string'}, + 'endpoint-bindings': {'patternProperties': {'.*': {'type': 'string'}}, + 'type': 'object'}, + 'force': {'type': 'boolean'}, + 'num-units': {'type': 'integer'}, + 'resources': {'patternProperties': {'.*': {'type': 'string'}}, + 'type': 'object'}, + 'revision': {'type': 'integer'}}, + 'required': ['CharmName', + 'ApplicationName', + 'AttachStorage', + 'ConfigYAML', + 'Cons', + 'Devices', + 'DryRun', + 'Placement', + 'Storage', + 'Trust'], + 'type': 'object'}, + 'DeployFromRepositoryArgs': {'additionalProperties': False, + 'properties': {'Args': {'items': {'$ref': '#/definitions/DeployFromRepositoryArg'}, + 'type': 'array'}}, + 'required': ['Args'], + 'type': 'object'}, + 'DeployFromRepositoryInfo': {'additionalProperties': False, + 'properties': {'architecture': {'type': 'string'}, + 'base': {'$ref': '#/definitions/Base'}, + 'channel': {'type': 'string'}, + 'effective-channel': {'type': 'string'}, + 'name': {'type': 'string'}, + 'revision': {'type': 'integer'}}, + 'required': ['architecture', + 'channel', + 'name', + 'revision'], + 'type': 'object'}, + 'DeployFromRepositoryResult': {'additionalProperties': False, + 'properties': {'Errors': {'items': {'$ref': '#/definitions/Error'}, + 'type': 'array'}, + 'Info': {'$ref': '#/definitions/DeployFromRepositoryInfo'}, + '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'}, + 'Type': {'type': 'string'}}, + 'required': ['Name', + 'Filename', + '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'}, + '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'}, + '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'}, + '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': {'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/ConsumeApplicationArgsV5'}, + '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.\n' + 'TODO (cderici) only ' + 'used for metered ' + 'charms in cmd ' + 'MeteredDeployAPI,\n' + 'kept for client ' + 'compatibility, remove ' + 'in juju 4.0', + '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=20, + 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=20, + 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=20, + 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=20, + 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=20, + 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[~ConsumeApplicationArgV5] + 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=20, + 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=20, + 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=20, + 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=20, + 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=20, + 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=20, + 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=20, + 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=20, + 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=20, + 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=20, + 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=20, + 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=20, + 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=20, + 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=20, + 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=20, + 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=20, + 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=20, + 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=20, + 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=20, + 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. + TODO (cderici) only used for metered charms in cmd MeteredDeployAPI, + kept for client compatibility, remove in juju 4.0 + + 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=20, + 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=20, + 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=20, + 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=20, + 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=20, + 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=20, + params=_params) + _params['args'] = args + reply = await self.rpc(msg) + return reply + + diff --git a/juju/client/_client3.py b/juju/client/_client3.py index 3da26b136..f7879810c 100644 --- a/juju/client/_client3.py +++ b/juju/client/_client3.py @@ -899,6 +899,561 @@ async def Create(self, no_download=None, notes=None): +class CrossModelRelationsFacade(Type): + name = 'CrossModelRelations' + version = 3 + 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'}, + 'source-model-tag': {'type': 'string'}}, + 'required': ['application-token', + 'source-model-tag', + 'relation-token', + 'remote-endpoint', + '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'}, + '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'}, + '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=3, + 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=3, + 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=3, + 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=3, + 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=3, + 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=3, + 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=3, + 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=3, + params=_params) + _params['args'] = args + reply = await self.rpc(msg) + return reply + + + class ImageMetadataFacade(Type): name = 'ImageMetadata' version = 3 @@ -1397,6 +1952,9 @@ class MigrationMasterFacade(Type): 'MigrationModelInfo': {'additionalProperties': False, 'properties': {'agent-version': {'$ref': '#/definitions/Number'}, 'controller-agent-version': {'$ref': '#/definitions/Number'}, + 'facade-versions': {'patternProperties': {'.*': {'items': {'type': 'integer'}, + 'type': 'array'}}, + 'type': 'object'}, 'name': {'type': 'string'}, 'owner-tag': {'type': 'string'}, 'uuid': {'type': 'string'}}, @@ -1941,6 +2499,513 @@ async def WatchMinionReports(self): +class MigrationTargetFacade(Type): + name = 'MigrationTarget' + version = 3 + 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'}, + 'facade-versions': {'patternProperties': {'.*': {'items': {'type': 'integer'}, + 'type': 'array'}}, + 'type': 'object'}, + '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=3, + 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=3, + 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=3, + 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=3, + 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=3, + 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=3, + 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=3, + 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, facade_versions=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 + facade_versions : typing.Mapping[str, typing.Sequence[int]] + 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 facade_versions is not None and not isinstance(facade_versions, dict): + raise Exception("Expected facade_versions to be a Mapping, received: {}".format(type(facade_versions))) + + 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=3, + params=_params) + _params['agent-version'] = agent_version + _params['controller-agent-version'] = controller_agent_version + _params['facade-versions'] = facade_versions + _params['name'] = name + _params['owner-tag'] = owner_tag + _params['uuid'] = uuid + reply = await self.rpc(msg) + return reply + + + class ModelConfigFacade(Type): name = 'ModelConfig' version = 3 diff --git a/juju/client/_client5.py b/juju/client/_client5.py index 0ea7f5cb6..8e3ca3481 100644 --- a/juju/client/_client5.py +++ b/juju/client/_client5.py @@ -5,6 +5,543 @@ from juju.client._definitions import * +class ApplicationOffersFacade(Type): + name = 'ApplicationOffers' + version = 5 + schema = {'definitions': {'AddApplicationOffer': {'additionalProperties': False, + 'properties': {'application-description': {'type': 'string'}, + 'application-name': {'type': 'string'}, + 'endpoints': {'patternProperties': {'.*': {'type': 'string'}}, + 'type': 'object'}, + 'model-tag': {'type': 'string'}, + 'offer-name': {'type': 'string'}, + 'owner-tag': {'type': 'string'}}, + 'required': ['model-tag', + 'offer-name', + 'application-name', + 'application-description', + 'endpoints'], + 'type': 'object'}, + 'AddApplicationOffers': {'additionalProperties': False, + 'properties': {'Offers': {'items': {'$ref': '#/definitions/AddApplicationOffer'}, + 'type': 'array'}}, + 'required': ['Offers'], + 'type': 'object'}, + 'ApplicationOfferAdminDetailsV5': {'additionalProperties': False, + 'properties': {'ApplicationOfferDetailsV5': {'$ref': '#/definitions/ApplicationOfferDetailsV5'}, + 'application-description': {'type': 'string'}, + 'application-name': {'type': 'string'}, + 'charm-url': {'type': 'string'}, + 'connections': {'items': {'$ref': '#/definitions/OfferConnection'}, + 'type': 'array'}, + 'endpoints': {'items': {'$ref': '#/definitions/RemoteEndpoint'}, + 'type': 'array'}, + 'offer-name': {'type': 'string'}, + 'offer-url': {'type': 'string'}, + 'offer-uuid': {'type': 'string'}, + 'source-model-tag': {'type': 'string'}, + 'users': {'items': {'$ref': '#/definitions/OfferUserDetails'}, + 'type': 'array'}}, + 'required': ['source-model-tag', + 'offer-uuid', + 'offer-url', + 'offer-name', + 'application-description', + 'ApplicationOfferDetailsV5', + 'application-name', + 'charm-url'], + 'type': 'object'}, + 'ApplicationOfferDetailsV5': {'additionalProperties': False, + 'properties': {'application-description': {'type': 'string'}, + 'endpoints': {'items': {'$ref': '#/definitions/RemoteEndpoint'}, + 'type': 'array'}, + 'offer-name': {'type': 'string'}, + 'offer-url': {'type': 'string'}, + 'offer-uuid': {'type': 'string'}, + 'source-model-tag': {'type': 'string'}, + 'users': {'items': {'$ref': '#/definitions/OfferUserDetails'}, + 'type': 'array'}}, + 'required': ['source-model-tag', + 'offer-uuid', + 'offer-url', + 'offer-name', + 'application-description'], + 'type': 'object'}, + 'ApplicationOfferResult': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}, + 'result': {'$ref': '#/definitions/ApplicationOfferAdminDetailsV5'}}, + 'type': 'object'}, + 'ApplicationOffersResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/ApplicationOfferResult'}, + 'type': 'array'}}, + 'type': 'object'}, + 'ConsumeOfferDetails': {'additionalProperties': False, + 'properties': {'external-controller': {'$ref': '#/definitions/ExternalControllerInfo'}, + 'macaroon': {'$ref': '#/definitions/Macaroon'}, + 'offer': {'$ref': '#/definitions/ApplicationOfferDetailsV5'}}, + 'type': 'object'}, + 'ConsumeOfferDetailsArg': {'additionalProperties': False, + 'properties': {'offer-urls': {'$ref': '#/definitions/OfferURLs'}, + 'user-tag': {'type': 'string'}}, + 'required': ['offer-urls'], + 'type': 'object'}, + 'ConsumeOfferDetailsResult': {'additionalProperties': False, + 'properties': {'ConsumeOfferDetails': {'$ref': '#/definitions/ConsumeOfferDetails'}, + 'error': {'$ref': '#/definitions/Error'}, + 'external-controller': {'$ref': '#/definitions/ExternalControllerInfo'}, + 'macaroon': {'$ref': '#/definitions/Macaroon'}, + 'offer': {'$ref': '#/definitions/ApplicationOfferDetailsV5'}}, + 'required': ['ConsumeOfferDetails'], + 'type': 'object'}, + 'ConsumeOfferDetailsResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/ConsumeOfferDetailsResult'}, + 'type': 'array'}}, + 'type': 'object'}, + 'DestroyApplicationOffers': {'additionalProperties': False, + 'properties': {'force': {'type': 'boolean'}, + 'offer-urls': {'items': {'type': 'string'}, + 'type': 'array'}}, + 'required': ['offer-urls'], + 'type': 'object'}, + 'EndpointFilterAttributes': {'additionalProperties': False, + 'properties': {'interface': {'type': 'string'}, + 'name': {'type': 'string'}, + 'role': {'type': 'string'}}, + 'required': ['role', + 'interface', + 'name'], + 'type': 'object'}, + 'EntityStatus': {'additionalProperties': False, + 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True, + 'type': 'object'}}, + 'type': 'object'}, + 'info': {'type': 'string'}, + 'since': {'format': 'date-time', + 'type': 'string'}, + 'status': {'type': 'string'}}, + 'required': ['status', 'info', 'since'], + 'type': 'object'}, + 'Error': {'additionalProperties': False, + 'properties': {'code': {'type': 'string'}, + 'info': {'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'}, + 'Macaroon': {'additionalProperties': False, 'type': 'object'}, + 'ModifyOfferAccess': {'additionalProperties': False, + 'properties': {'access': {'type': 'string'}, + 'action': {'type': 'string'}, + 'offer-url': {'type': 'string'}, + 'user-tag': {'type': 'string'}}, + 'required': ['user-tag', + 'action', + 'access', + 'offer-url'], + 'type': 'object'}, + 'ModifyOfferAccessRequest': {'additionalProperties': False, + 'properties': {'changes': {'items': {'$ref': '#/definitions/ModifyOfferAccess'}, + 'type': 'array'}}, + 'required': ['changes'], + 'type': 'object'}, + 'OfferConnection': {'additionalProperties': False, + 'properties': {'endpoint': {'type': 'string'}, + 'ingress-subnets': {'items': {'type': 'string'}, + 'type': 'array'}, + 'relation-id': {'type': 'integer'}, + 'source-model-tag': {'type': 'string'}, + 'status': {'$ref': '#/definitions/EntityStatus'}, + 'username': {'type': 'string'}}, + 'required': ['source-model-tag', + 'relation-id', + 'username', + 'endpoint', + 'status', + 'ingress-subnets'], + 'type': 'object'}, + 'OfferFilter': {'additionalProperties': False, + 'properties': {'allowed-users': {'items': {'type': 'string'}, + 'type': 'array'}, + 'application-description': {'type': 'string'}, + 'application-name': {'type': 'string'}, + 'application-user': {'type': 'string'}, + 'connected-users': {'items': {'type': 'string'}, + 'type': 'array'}, + 'endpoints': {'items': {'$ref': '#/definitions/EndpointFilterAttributes'}, + 'type': 'array'}, + 'model-name': {'type': 'string'}, + 'offer-name': {'type': 'string'}, + 'owner-name': {'type': 'string'}}, + 'required': ['owner-name', + 'model-name', + 'offer-name', + 'application-name', + 'application-description', + 'application-user', + 'endpoints', + 'connected-users', + 'allowed-users'], + 'type': 'object'}, + 'OfferFilters': {'additionalProperties': False, + 'properties': {'Filters': {'items': {'$ref': '#/definitions/OfferFilter'}, + 'type': 'array'}}, + 'required': ['Filters'], + 'type': 'object'}, + 'OfferURLs': {'additionalProperties': False, + 'properties': {'bakery-version': {'type': 'integer'}, + 'offer-urls': {'items': {'type': 'string'}, + 'type': 'array'}}, + 'type': 'object'}, + 'OfferUserDetails': {'additionalProperties': False, + 'properties': {'access': {'type': 'string'}, + 'display-name': {'type': 'string'}, + 'user': {'type': 'string'}}, + 'required': ['user', + 'display-name', + 'access'], + 'type': 'object'}, + 'QueryApplicationOffersResultsV5': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/ApplicationOfferAdminDetailsV5'}, + 'type': 'array'}}, + 'required': ['results'], + 'type': 'object'}, + 'RemoteApplicationInfo': {'additionalProperties': False, + 'properties': {'description': {'type': 'string'}, + 'endpoints': {'items': {'$ref': '#/definitions/RemoteEndpoint'}, + 'type': 'array'}, + 'icon-url-path': {'type': 'string'}, + 'model-tag': {'type': 'string'}, + 'name': {'type': 'string'}, + 'offer-url': {'type': 'string'}, + 'source-model-label': {'type': 'string'}}, + 'required': ['model-tag', + 'name', + 'description', + 'offer-url', + 'endpoints', + 'icon-url-path'], + 'type': 'object'}, + 'RemoteApplicationInfoResult': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}, + 'result': {'$ref': '#/definitions/RemoteApplicationInfo'}}, + 'type': 'object'}, + 'RemoteApplicationInfoResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/RemoteApplicationInfoResult'}, + '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'}}, + 'properties': {'ApplicationOffers': {'description': 'ApplicationOffers gets ' + 'details about remote ' + 'applications that match ' + 'given URLs.', + 'properties': {'Params': {'$ref': '#/definitions/OfferURLs'}, + 'Result': {'$ref': '#/definitions/ApplicationOffersResults'}}, + 'type': 'object'}, + 'DestroyOffers': {'description': 'DestroyOffers removes the ' + 'offers specified by the ' + 'given URLs, forcing if ' + 'necessary.', + 'properties': {'Params': {'$ref': '#/definitions/DestroyApplicationOffers'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}, + 'FindApplicationOffers': {'description': 'FindApplicationOffers ' + 'gets details about ' + 'remote applications ' + 'that match given ' + 'filter.', + 'properties': {'Params': {'$ref': '#/definitions/OfferFilters'}, + 'Result': {'$ref': '#/definitions/QueryApplicationOffersResultsV5'}}, + 'type': 'object'}, + 'GetConsumeDetails': {'description': 'GetConsumeDetails ' + 'returns the details ' + 'necessary to pass to ' + 'another model\n' + 'to allow the specified ' + 'args user to consume the ' + 'offers represented by ' + 'the args URLs.', + 'properties': {'Params': {'$ref': '#/definitions/ConsumeOfferDetailsArg'}, + 'Result': {'$ref': '#/definitions/ConsumeOfferDetailsResults'}}, + 'type': 'object'}, + 'ListApplicationOffers': {'description': 'ListApplicationOffers ' + 'gets deployed ' + 'details about ' + 'application offers ' + 'that match given ' + 'filter.\n' + 'The results contain ' + 'details about the ' + 'deployed ' + 'applications such as ' + 'connection count.', + 'properties': {'Params': {'$ref': '#/definitions/OfferFilters'}, + 'Result': {'$ref': '#/definitions/QueryApplicationOffersResultsV5'}}, + 'type': 'object'}, + 'ModifyOfferAccess': {'description': 'ModifyOfferAccess ' + 'changes the application ' + 'offer access granted to ' + 'users.', + 'properties': {'Params': {'$ref': '#/definitions/ModifyOfferAccessRequest'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}, + 'Offer': {'description': 'Offer makes application endpoints ' + 'available for consumption at a ' + 'specified URL.', + 'properties': {'Params': {'$ref': '#/definitions/AddApplicationOffers'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}, + 'RemoteApplicationInfo': {'description': 'RemoteApplicationInfo ' + 'returns information ' + 'about the requested ' + 'remote application.\n' + 'This call currently ' + 'has no client side ' + 'API, only there for ' + 'the Dashboard at ' + 'this stage.', + 'properties': {'Params': {'$ref': '#/definitions/OfferURLs'}, + 'Result': {'$ref': '#/definitions/RemoteApplicationInfoResults'}}, + 'type': 'object'}}, + 'type': 'object'} + + + @ReturnMapping(ApplicationOffersResults) + async def ApplicationOffers(self, bakery_version=None, offer_urls=None): + ''' + ApplicationOffers gets details about remote applications that match given URLs. + + bakery_version : int + offer_urls : typing.Sequence[str] + Returns -> ApplicationOffersResults + ''' + 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))) + + # map input types to rpc msg + _params = dict() + msg = dict(type='ApplicationOffers', + request='ApplicationOffers', + version=5, + params=_params) + _params['bakery-version'] = bakery_version + _params['offer-urls'] = offer_urls + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ErrorResults) + async def DestroyOffers(self, force=None, offer_urls=None): + ''' + DestroyOffers removes the offers specified by the given URLs, forcing if necessary. + + force : bool + offer_urls : typing.Sequence[str] + Returns -> ErrorResults + ''' + if force is not None and not isinstance(force, bool): + raise Exception("Expected force to be a bool, received: {}".format(type(force))) + + 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))) + + # map input types to rpc msg + _params = dict() + msg = dict(type='ApplicationOffers', + request='DestroyOffers', + version=5, + params=_params) + _params['force'] = force + _params['offer-urls'] = offer_urls + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(QueryApplicationOffersResultsV5) + async def FindApplicationOffers(self, filters=None): + ''' + FindApplicationOffers gets details about remote applications that match given filter. + + filters : typing.Sequence[~OfferFilter] + Returns -> QueryApplicationOffersResultsV5 + ''' + if filters is not None and not isinstance(filters, (bytes, str, list)): + raise Exception("Expected filters to be a Sequence, received: {}".format(type(filters))) + + # map input types to rpc msg + _params = dict() + msg = dict(type='ApplicationOffers', + request='FindApplicationOffers', + version=5, + params=_params) + _params['Filters'] = filters + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ConsumeOfferDetailsResults) + async def GetConsumeDetails(self, offer_urls=None, user_tag=None): + ''' + GetConsumeDetails returns the details necessary to pass to another model + to allow the specified args user to consume the offers represented by the args URLs. + + offer_urls : OfferURLs + user_tag : str + Returns -> ConsumeOfferDetailsResults + ''' + 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 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))) + + # map input types to rpc msg + _params = dict() + msg = dict(type='ApplicationOffers', + request='GetConsumeDetails', + version=5, + params=_params) + _params['offer-urls'] = offer_urls + _params['user-tag'] = user_tag + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(QueryApplicationOffersResultsV5) + async def ListApplicationOffers(self, filters=None): + ''' + ListApplicationOffers gets deployed details about application offers that match given filter. + The results contain details about the deployed applications such as connection count. + + filters : typing.Sequence[~OfferFilter] + Returns -> QueryApplicationOffersResultsV5 + ''' + if filters is not None and not isinstance(filters, (bytes, str, list)): + raise Exception("Expected filters to be a Sequence, received: {}".format(type(filters))) + + # map input types to rpc msg + _params = dict() + msg = dict(type='ApplicationOffers', + request='ListApplicationOffers', + version=5, + params=_params) + _params['Filters'] = filters + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ErrorResults) + async def ModifyOfferAccess(self, changes=None): + ''' + ModifyOfferAccess changes the application offer access granted to users. + + changes : typing.Sequence[~ModifyOfferAccess] + 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='ApplicationOffers', + request='ModifyOfferAccess', + version=5, + params=_params) + _params['changes'] = changes + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ErrorResults) + async def Offer(self, offers=None): + ''' + Offer makes application endpoints available for consumption at a specified URL. + + offers : typing.Sequence[~AddApplicationOffer] + Returns -> ErrorResults + ''' + if offers is not None and not isinstance(offers, (bytes, str, list)): + raise Exception("Expected offers to be a Sequence, received: {}".format(type(offers))) + + # map input types to rpc msg + _params = dict() + msg = dict(type='ApplicationOffers', + request='Offer', + version=5, + params=_params) + _params['Offers'] = offers + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(RemoteApplicationInfoResults) + async def RemoteApplicationInfo(self, bakery_version=None, offer_urls=None): + ''' + RemoteApplicationInfo returns information about the requested remote application. + This call currently has no client side API, only there for the Dashboard at this stage. + + bakery_version : int + offer_urls : typing.Sequence[str] + Returns -> RemoteApplicationInfoResults + ''' + 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))) + + # map input types to rpc msg + _params = dict() + msg = dict(type='ApplicationOffers', + request='RemoteApplicationInfo', + version=5, + params=_params) + _params['bakery-version'] = bakery_version + _params['offer-urls'] = offer_urls + reply = await self.rpc(msg) + return reply + + + class MachinerFacade(Type): name = 'Machiner' version = 5 diff --git a/juju/client/_client7.py b/juju/client/_client7.py index 7b54560ae..66fe38155 100644 --- a/juju/client/_client7.py +++ b/juju/client/_client7.py @@ -588,9 +588,11 @@ class CharmsFacade(Type): 'name': {'type': 'string'}}, 'type': 'object'}, 'CharmContainer': {'additionalProperties': False, - 'properties': {'mounts': {'items': {'$ref': '#/definitions/CharmMount'}, + 'properties': {'gid': {'type': 'integer'}, + 'mounts': {'items': {'$ref': '#/definitions/CharmMount'}, 'type': 'array'}, - 'resource': {'type': 'string'}}, + 'resource': {'type': 'string'}, + 'uid': {'type': 'integer'}}, 'type': 'object'}, 'CharmDeployment': {'additionalProperties': False, 'properties': {'min-version': {'type': 'string'}, @@ -633,6 +635,7 @@ class CharmsFacade(Type): 'properties': {'assumes-expr': {'$ref': '#/definitions/ExpressionTree'}, 'categories': {'items': {'type': 'string'}, 'type': 'array'}, + 'charm-user': {'type': 'string'}, 'containers': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmContainer'}}, 'type': 'object'}, 'deployment': {'$ref': '#/definitions/CharmDeployment'}, diff --git a/juju/client/_definitions.py b/juju/client/_definitions.py index 8fca18cf1..3877c8be6 100644 --- a/juju/client/_definitions.py +++ b/juju/client/_definitions.py @@ -22,6 +22,36 @@ 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): + ''' + role : str + scope_tag : str + target_tag : str + ''' + role_ = role + scope_tag_ = scope_tag + target_tag_ = target_tag + + # 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 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 + + + class Action(Type): _toSchema = {'execution_group': 'execution-group', 'name': 'name', 'parallel': 'parallel', 'parameters': 'parameters', 'receiver': 'receiver', 'tag': 'tag'} _toPy = {'execution-group': 'execution_group', 'name': 'name', 'parallel': 'parallel', 'parameters': 'parameters', 'receiver': 'receiver', 'tag': 'tag'} @@ -2044,6 +2074,84 @@ def __init__(self, applicationofferdetails=None, application_description=None, a +class ApplicationOfferAdminDetailsV5(Type): + _toSchema = {'application_description': 'application-description', 'application_name': 'application-name', 'applicationofferdetailsv5': 'ApplicationOfferDetailsV5', 'charm_url': 'charm-url', 'connections': 'connections', 'endpoints': 'endpoints', 'offer_name': 'offer-name', 'offer_url': 'offer-url', 'offer_uuid': 'offer-uuid', 'source_model_tag': 'source-model-tag', 'users': 'users'} + _toPy = {'ApplicationOfferDetailsV5': 'applicationofferdetailsv5', 'application-description': 'application_description', 'application-name': 'application_name', 'charm-url': 'charm_url', 'connections': 'connections', 'endpoints': 'endpoints', 'offer-name': 'offer_name', 'offer-url': 'offer_url', 'offer-uuid': 'offer_uuid', 'source-model-tag': 'source_model_tag', 'users': 'users'} + def __init__(self, applicationofferdetailsv5=None, application_description=None, application_name=None, charm_url=None, connections=None, endpoints=None, offer_name=None, offer_url=None, offer_uuid=None, source_model_tag=None, users=None, **unknown_fields): + ''' + applicationofferdetailsv5 : ApplicationOfferDetailsV5 + application_description : str + application_name : str + charm_url : str + connections : typing.Sequence[~OfferConnection] + endpoints : typing.Sequence[~RemoteEndpoint] + offer_name : str + offer_url : str + offer_uuid : str + source_model_tag : str + users : typing.Sequence[~OfferUserDetails] + ''' + applicationofferdetailsv5_ = ApplicationOfferDetailsV5.from_json(applicationofferdetailsv5) if applicationofferdetailsv5 else None + application_description_ = application_description + application_name_ = application_name + charm_url_ = charm_url + connections_ = [OfferConnection.from_json(o) for o in connections or []] + endpoints_ = [RemoteEndpoint.from_json(o) for o in endpoints or []] + offer_name_ = offer_name + offer_url_ = offer_url + offer_uuid_ = offer_uuid + source_model_tag_ = source_model_tag + users_ = [OfferUserDetails.from_json(o) for o in users or []] + + # Validate arguments against known Juju API types. + if applicationofferdetailsv5_ is not None and not isinstance(applicationofferdetailsv5_, (dict, ApplicationOfferDetailsV5)): + raise Exception("Expected applicationofferdetailsv5_ to be a ApplicationOfferDetailsV5, received: {}".format(type(applicationofferdetailsv5_))) + + 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 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 connections_ is not None and not isinstance(connections_, (bytes, str, list)): + raise Exception("Expected connections_ to be a Sequence, received: {}".format(type(connections_))) + + 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 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 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_))) + + 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.applicationofferdetailsv5 = applicationofferdetailsv5_ + self.application_description = application_description_ + self.application_name = application_name_ + self.charm_url = charm_url_ + self.connections = connections_ + self.endpoints = endpoints_ + self.offer_name = offer_name_ + self.offer_url = offer_url_ + self.offer_uuid = offer_uuid_ + self.source_model_tag = source_model_tag_ + self.users = users_ + self.unknown_fields = unknown_fields + + + class ApplicationOfferDetails(Type): _toSchema = {'application_description': 'application-description', 'bindings': 'bindings', 'endpoints': 'endpoints', 'offer_name': 'offer-name', 'offer_url': 'offer-url', 'offer_uuid': 'offer-uuid', 'source_model_tag': 'source-model-tag', 'spaces': 'spaces', 'users': 'users'} _toPy = {'application-description': 'application_description', 'bindings': 'bindings', 'endpoints': 'endpoints', 'offer-name': 'offer_name', 'offer-url': 'offer_url', 'offer-uuid': 'offer_uuid', 'source-model-tag': 'source_model_tag', 'spaces': 'spaces', 'users': 'users'} @@ -2110,23 +2218,77 @@ def __init__(self, application_description=None, bindings=None, endpoints=None, +class ApplicationOfferDetailsV5(Type): + _toSchema = {'application_description': 'application-description', 'endpoints': 'endpoints', 'offer_name': 'offer-name', 'offer_url': 'offer-url', 'offer_uuid': 'offer-uuid', 'source_model_tag': 'source-model-tag', 'users': 'users'} + _toPy = {'application-description': 'application_description', 'endpoints': 'endpoints', 'offer-name': 'offer_name', 'offer-url': 'offer_url', 'offer-uuid': 'offer_uuid', 'source-model-tag': 'source_model_tag', 'users': 'users'} + def __init__(self, application_description=None, endpoints=None, offer_name=None, offer_url=None, offer_uuid=None, source_model_tag=None, users=None, **unknown_fields): + ''' + application_description : str + endpoints : typing.Sequence[~RemoteEndpoint] + offer_name : str + offer_url : str + offer_uuid : str + source_model_tag : str + users : typing.Sequence[~OfferUserDetails] + ''' + application_description_ = application_description + endpoints_ = [RemoteEndpoint.from_json(o) for o in endpoints or []] + offer_name_ = offer_name + offer_url_ = offer_url + offer_uuid_ = offer_uuid + source_model_tag_ = source_model_tag + users_ = [OfferUserDetails.from_json(o) for o in users or []] + + # Validate arguments against known Juju API types. + 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 endpoints_ is not None and not isinstance(endpoints_, (bytes, str, list)): + raise Exception("Expected endpoints_ to be a Sequence, received: {}".format(type(endpoints_))) + + 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 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_))) + + 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.application_description = application_description_ + self.endpoints = endpoints_ + self.offer_name = offer_name_ + self.offer_url = offer_url_ + self.offer_uuid = offer_uuid_ + self.source_model_tag = source_model_tag_ + self.users = users_ + self.unknown_fields = unknown_fields + + + class ApplicationOfferResult(Type): _toSchema = {'error': 'error', 'result': 'result'} _toPy = {'error': 'error', 'result': 'result'} def __init__(self, error=None, result=None, **unknown_fields): ''' error : Error - result : ApplicationOfferAdminDetails + result : ApplicationOfferAdminDetailsV5 ''' error_ = Error.from_json(error) if error else None - result_ = ApplicationOfferAdminDetails.from_json(result) if result else None + result_ = ApplicationOfferAdminDetailsV5.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, ApplicationOfferAdminDetails)): - raise Exception("Expected result_ to be a ApplicationOfferAdminDetails, received: {}".format(type(result_))) + if result_ is not None and not isinstance(result_, (dict, ApplicationOfferAdminDetailsV5)): + raise Exception("Expected result_ to be a ApplicationOfferAdminDetailsV5, received: {}".format(type(result_))) self.error = error_ self.result = result_ @@ -4463,25 +4625,37 @@ def __init__(self, architectures=None, channel=None, name=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): + _toSchema = {'gid': 'gid', 'mounts': 'mounts', 'resource': 'resource', 'uid': 'uid'} + _toPy = {'gid': 'gid', 'mounts': 'mounts', 'resource': 'resource', 'uid': 'uid'} + def __init__(self, gid=None, mounts=None, resource=None, uid=None, **unknown_fields): ''' + gid : int mounts : typing.Sequence[~CharmMount] resource : str + uid : int ''' + gid_ = gid mounts_ = [CharmMount.from_json(o) for o in mounts or []] resource_ = resource + uid_ = uid # Validate arguments against known Juju API types. + if gid_ is not None and not isinstance(gid_, int): + raise Exception("Expected gid_ to be a int, received: {}".format(type(gid_))) + 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 resource_ is not None and not isinstance(resource_, (bytes, str)): raise Exception("Expected resource_ to be a str, received: {}".format(type(resource_))) + if uid_ is not None and not isinstance(uid_, int): + raise Exception("Expected uid_ to be a int, received: {}".format(type(uid_))) + + self.gid = gid_ self.mounts = mounts_ self.resource = resource_ + self.uid = uid_ self.unknown_fields = unknown_fields @@ -4613,12 +4787,13 @@ def __init__(self, bases=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): + _toSchema = {'assumes_expr': 'assumes-expr', 'categories': 'categories', 'charm_user': 'charm-user', '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', 'charm-user': 'charm_user', '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, charm_user=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): ''' assumes_expr : ExpressionTree categories : typing.Sequence[str] + charm_user : str containers : typing.Mapping[str, ~CharmContainer] deployment : CharmDeployment description : str @@ -4640,6 +4815,7 @@ def __init__(self, assumes_expr=None, categories=None, containers=None, deployme ''' assumes_expr_ = ExpressionTree.from_json(assumes_expr) if assumes_expr else None categories_ = categories + charm_user_ = charm_user 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 @@ -4666,6 +4842,9 @@ def __init__(self, assumes_expr=None, categories=None, containers=None, deployme 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 charm_user_ is not None and not isinstance(charm_user_, (bytes, str)): + raise Exception("Expected charm_user_ to be a str, received: {}".format(type(charm_user_))) + if containers_ is not None and not isinstance(containers_, dict): raise Exception("Expected containers_ to be a Mapping, received: {}".format(type(containers_))) @@ -4722,6 +4901,7 @@ def __init__(self, assumes_expr=None, categories=None, containers=None, deployme self.assumes_expr = assumes_expr_ self.categories = categories_ + self.charm_user = charm_user_ self.containers = containers_ self.deployment = deployment_ self.description = description_ @@ -6254,9 +6434,9 @@ def __init__(self, clouds=None, **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): + _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_track_latest': 'secret-track-latest', '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-track-latest': 'secret_track_latest', '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_track_latest=None, secret_updates=None, set_raw_k8s_spec=None, tag=None, unit_state=None, update_network_info=None, **unknown_fields): ''' add_storage : typing.Sequence[~StorageAddParams] close_ports : typing.Sequence[~EntityPortRange] @@ -6267,6 +6447,7 @@ def __init__(self, add_storage=None, close_ports=None, open_ports=None, pod_spec secret_deletes : typing.Sequence[~DeleteSecretArg] secret_grants : typing.Sequence[~GrantRevokeSecretArg] secret_revokes : typing.Sequence[~GrantRevokeSecretArg] + secret_track_latest : typing.Sequence[str] secret_updates : typing.Sequence[~UpdateSecretArg] set_raw_k8s_spec : PodSpec tag : str @@ -6282,6 +6463,7 @@ def __init__(self, add_storage=None, close_ports=None, open_ports=None, pod_spec 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_track_latest_ = secret_track_latest 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 @@ -6316,6 +6498,9 @@ def __init__(self, add_storage=None, close_ports=None, open_ports=None, pod_spec 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_track_latest_ is not None and not isinstance(secret_track_latest_, (bytes, str, list)): + raise Exception("Expected secret_track_latest_ to be a Sequence, received: {}".format(type(secret_track_latest_))) + 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_))) @@ -6340,6 +6525,7 @@ def __init__(self, add_storage=None, close_ports=None, open_ports=None, pod_spec self.secret_deletes = secret_deletes_ self.secret_grants = secret_grants_ self.secret_revokes = secret_revokes_ + self.secret_track_latest = secret_track_latest_ self.secret_updates = secret_updates_ self.set_raw_k8s_spec = set_raw_k8s_spec_ self.tag = tag_ @@ -6670,6 +6856,84 @@ def __init__(self, applicationofferdetails=None, application_alias=None, applica +class ConsumeApplicationArgV5(Type): + _toSchema = {'application_alias': 'application-alias', 'application_description': 'application-description', 'applicationofferdetailsv5': 'ApplicationOfferDetailsV5', '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', 'users': 'users'} + _toPy = {'ApplicationOfferDetailsV5': 'applicationofferdetailsv5', 'application-alias': 'application_alias', 'application-description': 'application_description', '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', 'users': 'users'} + def __init__(self, applicationofferdetailsv5=None, application_alias=None, application_description=None, endpoints=None, external_controller=None, macaroon=None, offer_name=None, offer_url=None, offer_uuid=None, source_model_tag=None, users=None, **unknown_fields): + ''' + applicationofferdetailsv5 : ApplicationOfferDetailsV5 + application_alias : str + application_description : str + endpoints : typing.Sequence[~RemoteEndpoint] + external_controller : ExternalControllerInfo + macaroon : Macaroon + offer_name : str + offer_url : str + offer_uuid : str + source_model_tag : str + users : typing.Sequence[~OfferUserDetails] + ''' + applicationofferdetailsv5_ = ApplicationOfferDetailsV5.from_json(applicationofferdetailsv5) if applicationofferdetailsv5 else None + application_alias_ = application_alias + application_description_ = application_description + 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 + users_ = [OfferUserDetails.from_json(o) for o in users or []] + + # Validate arguments against known Juju API types. + if applicationofferdetailsv5_ is not None and not isinstance(applicationofferdetailsv5_, (dict, ApplicationOfferDetailsV5)): + raise Exception("Expected applicationofferdetailsv5_ to be a ApplicationOfferDetailsV5, received: {}".format(type(applicationofferdetailsv5_))) + + 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 endpoints_ is not None and not isinstance(endpoints_, (bytes, str, list)): + raise Exception("Expected endpoints_ to be a Sequence, received: {}".format(type(endpoints_))) + + 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_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 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_))) + + 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.applicationofferdetailsv5 = applicationofferdetailsv5_ + self.application_alias = application_alias_ + self.application_description = application_description_ + 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.users = users_ + self.unknown_fields = unknown_fields + + + class ConsumeApplicationArgs(Type): _toSchema = {'args': 'args'} _toPy = {'args': 'args'} @@ -6688,6 +6952,24 @@ def __init__(self, args=None, **unknown_fields): +class ConsumeApplicationArgsV5(Type): + _toSchema = {'args': 'args'} + _toPy = {'args': 'args'} + def __init__(self, args=None, **unknown_fields): + ''' + args : typing.Sequence[~ConsumeApplicationArgV5] + ''' + args_ = [ConsumeApplicationArgV5.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 ConsumeOfferDetails(Type): _toSchema = {'external_controller': 'external-controller', 'macaroon': 'macaroon', 'offer': 'offer'} _toPy = {'external-controller': 'external_controller', 'macaroon': 'macaroon', 'offer': 'offer'} @@ -6695,11 +6977,11 @@ def __init__(self, external_controller=None, macaroon=None, offer=None, **unknow ''' external_controller : ExternalControllerInfo macaroon : Macaroon - offer : ApplicationOfferDetails + offer : ApplicationOfferDetailsV5 ''' 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 + offer_ = ApplicationOfferDetailsV5.from_json(offer) if offer else None # Validate arguments against known Juju API types. if external_controller_ is not None and not isinstance(external_controller_, (dict, ExternalControllerInfo)): @@ -6708,8 +6990,8 @@ def __init__(self, external_controller=None, macaroon=None, offer=None, **unknow 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_))) + if offer_ is not None and not isinstance(offer_, (dict, ApplicationOfferDetailsV5)): + raise Exception("Expected offer_ to be a ApplicationOfferDetailsV5, received: {}".format(type(offer_))) self.external_controller = external_controller_ self.macaroon = macaroon_ @@ -6751,13 +7033,13 @@ def __init__(self, consumeofferdetails=None, error=None, external_controller=Non error : Error external_controller : ExternalControllerInfo macaroon : Macaroon - offer : ApplicationOfferDetails + offer : ApplicationOfferDetailsV5 ''' 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 + offer_ = ApplicationOfferDetailsV5.from_json(offer) if offer else None # Validate arguments against known Juju API types. if consumeofferdetails_ is not None and not isinstance(consumeofferdetails_, (dict, ConsumeOfferDetails)): @@ -6772,8 +7054,8 @@ def __init__(self, consumeofferdetails=None, error=None, external_controller=Non 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_))) + if offer_ is not None and not isinstance(offer_, (dict, ApplicationOfferDetailsV5)): + raise Exception("Expected offer_ to be a ApplicationOfferDetailsV5, received: {}".format(type(offer_))) self.consumeofferdetails = consumeofferdetails_ self.error = error_ @@ -10757,9 +11039,9 @@ def __init__(self, relations=None, **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): + _toSchema = {'application_token': 'application-token', 'bakery_version': 'bakery-version', 'macaroons': 'macaroons', 'peek': 'peek', 'refresh': 'refresh', 'revision': 'revision', 'source_controller_uuid': 'source-controller-uuid', 'unit_id': 'unit-id', 'uri': 'uri'} + _toPy = {'application-token': 'application_token', 'bakery-version': 'bakery_version', 'macaroons': 'macaroons', 'peek': 'peek', 'refresh': 'refresh', 'revision': 'revision', 'source-controller-uuid': 'source_controller_uuid', 'unit-id': 'unit_id', 'uri': 'uri'} + def __init__(self, application_token=None, bakery_version=None, macaroons=None, peek=None, refresh=None, revision=None, source_controller_uuid=None, unit_id=None, uri=None, **unknown_fields): ''' application_token : str bakery_version : int @@ -10767,6 +11049,7 @@ def __init__(self, application_token=None, bakery_version=None, macaroons=None, peek : bool refresh : bool revision : int + source_controller_uuid : str unit_id : int uri : str ''' @@ -10776,6 +11059,7 @@ def __init__(self, application_token=None, bakery_version=None, macaroons=None, peek_ = peek refresh_ = refresh revision_ = revision + source_controller_uuid_ = source_controller_uuid unit_id_ = unit_id uri_ = uri @@ -10798,6 +11082,9 @@ def __init__(self, application_token=None, bakery_version=None, macaroons=None, if revision_ is not None and not isinstance(revision_, int): raise Exception("Expected revision_ to be a int, received: {}".format(type(revision_))) + if source_controller_uuid_ is not None and not isinstance(source_controller_uuid_, (bytes, str)): + raise Exception("Expected source_controller_uuid_ to be a str, received: {}".format(type(source_controller_uuid_))) + 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_))) @@ -10810,6 +11097,7 @@ def __init__(self, application_token=None, bakery_version=None, macaroons=None, self.peek = peek_ self.refresh = refresh_ self.revision = revision_ + self.source_controller_uuid = source_controller_uuid_ self.unit_id = unit_id_ self.uri = uri_ self.unknown_fields = unknown_fields @@ -13007,10 +13295,11 @@ def __init__(self, results=None, **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): + _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): ''' + access : typing.Sequence[~AccessInfo] create_time : str description : str label : str @@ -13025,6 +13314,7 @@ def __init__(self, create_time=None, description=None, label=None, latest_expire value : SecretValueResult version : int ''' + access_ = [AccessInfo.from_json(o) for o in access or []] create_time_ = create_time description_ = description label_ = label @@ -13040,6 +13330,9 @@ def __init__(self, create_time=None, description=None, label=None, latest_expire version_ = version # Validate arguments against known Juju API types. + 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 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_))) @@ -13079,6 +13372,7 @@ def __init__(self, create_time=None, description=None, label=None, latest_expire 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_ @@ -14530,18 +14824,20 @@ def __init__(self, results=None, **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): + _toSchema = {'agent_version': 'agent-version', 'controller_agent_version': 'controller-agent-version', 'facade_versions': 'facade-versions', 'name': 'name', 'owner_tag': 'owner-tag', 'uuid': 'uuid'} + _toPy = {'agent-version': 'agent_version', 'controller-agent-version': 'controller_agent_version', 'facade-versions': 'facade_versions', 'name': 'name', 'owner-tag': 'owner_tag', 'uuid': 'uuid'} + def __init__(self, agent_version=None, controller_agent_version=None, facade_versions=None, name=None, owner_tag=None, uuid=None, **unknown_fields): ''' agent_version : Number controller_agent_version : Number + facade_versions : typing.Mapping[str, typing.Sequence[int]] 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 + facade_versions_ = facade_versions name_ = name owner_tag_ = owner_tag uuid_ = uuid @@ -14553,6 +14849,9 @@ def __init__(self, agent_version=None, controller_agent_version=None, name=None, 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 facade_versions_ is not None and not isinstance(facade_versions_, dict): + raise Exception("Expected facade_versions_ to be a Mapping, received: {}".format(type(facade_versions_))) + if name_ is not None and not isinstance(name_, (bytes, str)): raise Exception("Expected name_ to be a str, received: {}".format(type(name_))) @@ -14564,6 +14863,7 @@ def __init__(self, agent_version=None, controller_agent_version=None, name=None, self.agent_version = agent_version_ self.controller_agent_version = controller_agent_version_ + self.facade_versions = facade_versions_ self.name = name_ self.owner_tag = owner_tag_ self.uuid = uuid_ @@ -18890,6 +19190,24 @@ def __init__(self, results=None, **unknown_fields): +class QueryApplicationOffersResultsV5(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} + def __init__(self, results=None, **unknown_fields): + ''' + results : typing.Sequence[~ApplicationOfferAdminDetailsV5] + ''' + results_ = [ApplicationOfferAdminDetailsV5.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'} @@ -19020,9 +19338,9 @@ def __init__(self, region_name=None, value=None, **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): + _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', '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', '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, source_model_tag=None, **unknown_fields): ''' application_token : str bakery_version : int @@ -19032,7 +19350,6 @@ def __init__(self, application_token=None, bakery_version=None, consume_version= offer_uuid : str relation_token : str remote_endpoint : RemoteEndpoint - remote_space : RemoteSpace source_model_tag : str ''' application_token_ = application_token @@ -19043,7 +19360,6 @@ def __init__(self, application_token=None, bakery_version=None, consume_version= 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. @@ -19071,9 +19387,6 @@ def __init__(self, application_token=None, bakery_version=None, consume_version= 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_))) @@ -19085,7 +19398,6 @@ def __init__(self, application_token=None, bakery_version=None, consume_version= 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 diff --git a/juju/client/facade.py b/juju/client/facade.py index 8211ee5b4..40b82d4cd 100644 --- a/juju/client/facade.py +++ b/juju/client/facade.py @@ -636,10 +636,10 @@ class {name}Facade(Type): class TypeEncoder(json.JSONEncoder): - def default(self, obj): - if isinstance(obj, Type): - return obj.serialize() - return json.JSONEncoder.default(self, obj) + def default(self, o): + if isinstance(o, Type): + return o.serialize() + return json.JSONEncoder.default(self, o) class Type: diff --git a/juju/client/schemas-juju-3.5.2.json b/juju/client/schemas-juju-3.5.2.json new file mode 100644 index 000000000..125a074ed --- /dev/null +++ b/juju/client/schemas-juju-3.5.2.json @@ -0,0 +1,53484 @@ +[ + { + "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": "APIv20 provides the Application API facade for version 20.", + "Version": 20, + "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/ConsumeApplicationArgsV5" + }, + "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" + ] + }, + "ApplicationOfferDetailsV5": { + "type": "object", + "properties": { + "application-description": { + "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" + }, + "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" + ] + }, + "ConsumeApplicationArgV5": { + "type": "object", + "properties": { + "ApplicationOfferDetailsV5": { + "$ref": "#/definitions/ApplicationOfferDetailsV5" + }, + "application-alias": { + "type": "string" + }, + "application-description": { + "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" + }, + "users": { + "type": "array", + "items": { + "$ref": "#/definitions/OfferUserDetails" + } + } + }, + "additionalProperties": false, + "required": [ + "source-model-tag", + "offer-uuid", + "offer-url", + "offer-name", + "application-description", + "ApplicationOfferDetailsV5" + ] + }, + "ConsumeApplicationArgsV5": { + "type": "object", + "properties": { + "args": { + "type": "array", + "items": { + "$ref": "#/definitions/ConsumeApplicationArgV5" + } + } + }, + "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" + ] + }, + "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" + ] + }, + "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": "OffersAPIv5 implements the cross model interface and is the concrete\nimplementation of the api end point.", + "Version": 5, + "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/QueryApplicationOffersResultsV5" + } + }, + "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/QueryApplicationOffersResultsV5" + } + }, + "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" + ] + }, + "ApplicationOfferAdminDetailsV5": { + "type": "object", + "properties": { + "ApplicationOfferDetailsV5": { + "$ref": "#/definitions/ApplicationOfferDetailsV5" + }, + "application-description": { + "type": "string" + }, + "application-name": { + "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" + }, + "users": { + "type": "array", + "items": { + "$ref": "#/definitions/OfferUserDetails" + } + } + }, + "additionalProperties": false, + "required": [ + "source-model-tag", + "offer-uuid", + "offer-url", + "offer-name", + "application-description", + "ApplicationOfferDetailsV5", + "application-name", + "charm-url" + ] + }, + "ApplicationOfferDetailsV5": { + "type": "object", + "properties": { + "application-description": { + "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" + }, + "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/ApplicationOfferAdminDetailsV5" + } + }, + "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/ApplicationOfferDetailsV5" + } + }, + "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/ApplicationOfferDetailsV5" + } + }, + "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" + ] + }, + "QueryApplicationOffersResultsV5": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ApplicationOfferAdminDetailsV5" + } + } + }, + "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" + ] + } + } + } + }, + { + "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": { + "gid": { + "type": "integer" + }, + "mounts": { + "type": "array", + "items": { + "$ref": "#/definitions/CharmMount" + } + }, + "resource": { + "type": "string" + }, + "uid": { + "type": "integer" + } + }, + "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" + } + }, + "charm-user": { + "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": { + "gid": { + "type": "integer" + }, + "mounts": { + "type": "array", + "items": { + "$ref": "#/definitions/CharmMount" + } + }, + "resource": { + "type": "string" + }, + "uid": { + "type": "integer" + } + }, + "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" + } + }, + "charm-user": { + "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": { + "gid": { + "type": "integer" + }, + "mounts": { + "type": "array", + "items": { + "$ref": "#/definitions/CharmMount" + } + }, + "resource": { + "type": "string" + }, + "uid": { + "type": "integer" + } + }, + "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" + } + }, + "charm-user": { + "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": { + "gid": { + "type": "integer" + }, + "mounts": { + "type": "array", + "items": { + "$ref": "#/definitions/CharmMount" + } + }, + "resource": { + "type": "string" + }, + "uid": { + "type": "integer" + } + }, + "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" + } + }, + "charm-user": { + "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": { + "gid": { + "type": "integer" + }, + "mounts": { + "type": "array", + "items": { + "$ref": "#/definitions/CharmMount" + } + }, + "resource": { + "type": "string" + }, + "uid": { + "type": "integer" + } + }, + "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" + } + }, + "charm-user": { + "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": { + "gid": { + "type": "integer" + }, + "mounts": { + "type": "array", + "items": { + "$ref": "#/definitions/CharmMount" + } + }, + "resource": { + "type": "string" + }, + "uid": { + "type": "integer" + } + }, + "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" + } + }, + "charm-user": { + "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": "CrossModelRelationsAPIv3 provides access to the CrossModelRelations API facade.", + "Version": 3, + "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" + }, + "source-model-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "application-token", + "source-model-tag", + "relation-token", + "remote-endpoint", + "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 + }, + "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" + ] + }, + "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" + }, + "source-controller-uuid": { + "type": "string" + }, + "unit-id": { + "type": "integer" + }, + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "source-controller-uuid", + "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" + }, + "facade-versions": { + "type": "object", + "patternProperties": { + ".*": { + "type": "array", + "items": { + "type": "integer" + } + } + } + }, + "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": 3, + "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" + }, + "facade-versions": { + "type": "object", + "patternProperties": { + ".*": { + "type": "array", + "items": { + "type": "integer" + } + } + } + }, + "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.\nV10 of the facade does not return default-series or default-base\nin model info", + "Version": 10, + "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": { + "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": "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": { + "AccessInfo": { + "type": "object", + "properties": { + "role": { + "type": "string" + }, + "scope-tag": { + "type": "string" + }, + "target-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "target-tag", + "scope-tag", + "role" + ] + }, + "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": { + "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" + ] + }, + "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": { + "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" + ] + }, + "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": { + "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" + ] + }, + "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" + ] + }, + "AccessInfo": { + "type": "object", + "properties": { + "role": { + "type": "string" + }, + "scope-tag": { + "type": "string" + }, + "target-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "target-tag", + "scope-tag", + "role" + ] + }, + "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-track-latest": { + "type": "array", + "items": { + "type": "string" + } + }, + "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": { + "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" + ] + }, + "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": { + "AccessInfo": { + "type": "object", + "properties": { + "role": { + "type": "string" + }, + "scope-tag": { + "type": "string" + }, + "target-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "target-tag", + "scope-tag", + "role" + ] + }, + "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": { + "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" + ] + }, + "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