From e9b942bba0d16618c953604d03f7fcffe47f388f Mon Sep 17 00:00:00 2001 From: Dima Tisnek Date: Tue, 19 Nov 2024 09:26:21 +0900 Subject: [PATCH] chore: nuke per-facade schema --- juju/client/_client1.py | 868 ------------ juju/client/_client10.py | 1432 -------------------- juju/client/_client11.py | 860 ------------ juju/client/_client12.py | 829 ------------ juju/client/_client17.py | 1396 -------------------- juju/client/_client19.py | 1545 ---------------------- juju/client/_client2.py | 787 ----------- juju/client/_client20.py | 1487 --------------------- juju/client/_client3.py | 1026 --------------- juju/client/_client4.py | 1072 --------------- juju/client/_client5.py | 679 ---------- juju/client/_client6.py | 2564 ------------------------------------ juju/client/_client7.py | 2697 -------------------------------------- juju/client/_client8.py | 751 ----------- juju/client/_client9.py | 854 ------------ juju/client/facade.py | 15 +- 16 files changed, 5 insertions(+), 18857 deletions(-) diff --git a/juju/client/_client1.py b/juju/client/_client1.py index dcb4e0c2e..1c91138cf 100644 --- a/juju/client/_client1.py +++ b/juju/client/_client1.py @@ -8,50 +8,6 @@ class CredentialManagerFacade(Type): name = "CredentialManager" version = 1 - schema = { - "definitions": { - "Error": { - "additionalProperties": False, - "properties": { - "code": {"type": "string"}, - "info": { - "patternProperties": { - ".*": {"additionalProperties": True, "type": "object"} - }, - "type": "object", - }, - "message": {"type": "string"}, - }, - "required": ["message", "code"], - "type": "object", - }, - "ErrorResult": { - "additionalProperties": False, - "properties": {"error": {"$ref": "#/definitions/Error"}}, - "type": "object", - }, - "InvalidateCredentialArg": { - "additionalProperties": False, - "properties": {"reason": {"type": "string"}}, - "type": "object", - }, - }, - "properties": { - "InvalidateModelCredential": { - "description": "InvalidateModelCredential " - "marks the cloud " - "credential for " - "this model as " - "invalid.", - "properties": { - "Params": {"$ref": "#/definitions/InvalidateCredentialArg"}, - "Result": {"$ref": "#/definitions/ErrorResult"}, - }, - "type": "object", - } - }, - "type": "object", - } @ReturnMapping(ErrorResult) async def InvalidateModelCredential(self, reason=None): @@ -79,92 +35,6 @@ async def InvalidateModelCredential(self, reason=None): class FirewallRulesFacade(Type): name = "FirewallRules" version = 1 - schema = { - "definitions": { - "Error": { - "additionalProperties": False, - "properties": { - "code": {"type": "string"}, - "info": { - "patternProperties": { - ".*": {"additionalProperties": True, "type": "object"} - }, - "type": "object", - }, - "message": {"type": "string"}, - }, - "required": ["message", "code"], - "type": "object", - }, - "ErrorResult": { - "additionalProperties": False, - "properties": {"error": {"$ref": "#/definitions/Error"}}, - "type": "object", - }, - "ErrorResults": { - "additionalProperties": False, - "properties": { - "results": { - "items": {"$ref": "#/definitions/ErrorResult"}, - "type": "array", - } - }, - "required": ["results"], - "type": "object", - }, - "FirewallRule": { - "additionalProperties": False, - "properties": { - "known-service": {"type": "string"}, - "whitelist-cidrs": {"items": {"type": "string"}, "type": "array"}, - }, - "required": ["known-service"], - "type": "object", - }, - "FirewallRuleArgs": { - "additionalProperties": False, - "properties": { - "args": { - "items": {"$ref": "#/definitions/FirewallRule"}, - "type": "array", - } - }, - "required": ["args"], - "type": "object", - }, - "ListFirewallRulesResults": { - "additionalProperties": False, - "properties": { - "Rules": { - "items": {"$ref": "#/definitions/FirewallRule"}, - "type": "array", - } - }, - "required": ["Rules"], - "type": "object", - }, - }, - "properties": { - "ListFirewallRules": { - "description": "ListFirewallRules returns all the firewall rules.", - "properties": { - "Result": {"$ref": "#/definitions/ListFirewallRulesResults"} - }, - "type": "object", - }, - "SetFirewallRules": { - "description": "SetFirewallRules creates " - "or updates the specified " - "firewall rules.", - "properties": { - "Params": {"$ref": "#/definitions/FirewallRuleArgs"}, - "Result": {"$ref": "#/definitions/ErrorResults"}, - }, - "type": "object", - }, - }, - "type": "object", - } @ReturnMapping(ListFirewallRulesResults) async def ListFirewallRules(self): @@ -204,151 +74,6 @@ async def SetFirewallRules(self, args=None): class ImageMetadataManagerFacade(Type): name = "ImageMetadataManager" version = 1 - schema = { - "definitions": { - "CloudImageMetadata": { - "additionalProperties": False, - "properties": { - "arch": {"type": "string"}, - "image-id": {"type": "string"}, - "priority": {"type": "integer"}, - "region": {"type": "string"}, - "root-storage-size": {"type": "integer"}, - "root-storage-type": {"type": "string"}, - "source": {"type": "string"}, - "stream": {"type": "string"}, - "version": {"type": "string"}, - "virt-type": {"type": "string"}, - }, - "required": [ - "image-id", - "region", - "version", - "arch", - "source", - "priority", - ], - "type": "object", - }, - "CloudImageMetadataList": { - "additionalProperties": False, - "properties": { - "metadata": { - "items": {"$ref": "#/definitions/CloudImageMetadata"}, - "type": "array", - } - }, - "type": "object", - }, - "Error": { - "additionalProperties": False, - "properties": { - "code": {"type": "string"}, - "info": { - "patternProperties": { - ".*": {"additionalProperties": True, "type": "object"} - }, - "type": "object", - }, - "message": {"type": "string"}, - }, - "required": ["message", "code"], - "type": "object", - }, - "ErrorResult": { - "additionalProperties": False, - "properties": {"error": {"$ref": "#/definitions/Error"}}, - "type": "object", - }, - "ErrorResults": { - "additionalProperties": False, - "properties": { - "results": { - "items": {"$ref": "#/definitions/ErrorResult"}, - "type": "array", - } - }, - "required": ["results"], - "type": "object", - }, - "ImageMetadataFilter": { - "additionalProperties": False, - "properties": { - "arches": {"items": {"type": "string"}, "type": "array"}, - "region": {"type": "string"}, - "root-storage-type": {"type": "string"}, - "stream": {"type": "string"}, - "versions": {"items": {"type": "string"}, "type": "array"}, - "virt-type": {"type": "string"}, - }, - "type": "object", - }, - "ListCloudImageMetadataResult": { - "additionalProperties": False, - "properties": { - "result": { - "items": {"$ref": "#/definitions/CloudImageMetadata"}, - "type": "array", - } - }, - "required": ["result"], - "type": "object", - }, - "MetadataImageIds": { - "additionalProperties": False, - "properties": { - "image-ids": {"items": {"type": "string"}, "type": "array"} - }, - "required": ["image-ids"], - "type": "object", - }, - "MetadataSaveParams": { - "additionalProperties": False, - "properties": { - "metadata": { - "items": {"$ref": "#/definitions/CloudImageMetadataList"}, - "type": "array", - } - }, - "type": "object", - }, - }, - "properties": { - "Delete": { - "description": "Delete deletes cloud image metadata " - "for given image ids.\n" - "It supports bulk calls.", - "properties": { - "Params": {"$ref": "#/definitions/MetadataImageIds"}, - "Result": {"$ref": "#/definitions/ErrorResults"}, - }, - "type": "object", - }, - "List": { - "description": "List returns all found cloud image " - "metadata that satisfy\n" - "given filter.\n" - "Returned list contains metadata " - "ordered by priority.", - "properties": { - "Params": {"$ref": "#/definitions/ImageMetadataFilter"}, - "Result": {"$ref": "#/definitions/ListCloudImageMetadataResult"}, - }, - "type": "object", - }, - "Save": { - "description": "Save stores given cloud image " - "metadata.\n" - "It supports bulk calls.", - "properties": { - "Params": {"$ref": "#/definitions/MetadataSaveParams"}, - "Result": {"$ref": "#/definitions/ErrorResults"}, - }, - "type": "object", - }, - }, - "type": "object", - } @ReturnMapping(ErrorResults) async def Delete(self, image_ids=None): @@ -462,137 +187,6 @@ async def Save(self, metadata=None): class KeyManagerFacade(Type): name = "KeyManager" version = 1 - schema = { - "definitions": { - "Entities": { - "additionalProperties": False, - "properties": { - "entities": { - "items": {"$ref": "#/definitions/Entity"}, - "type": "array", - } - }, - "required": ["entities"], - "type": "object", - }, - "Entity": { - "additionalProperties": False, - "properties": {"tag": {"type": "string"}}, - "required": ["tag"], - "type": "object", - }, - "Error": { - "additionalProperties": False, - "properties": { - "code": {"type": "string"}, - "info": { - "patternProperties": { - ".*": {"additionalProperties": True, "type": "object"} - }, - "type": "object", - }, - "message": {"type": "string"}, - }, - "required": ["message", "code"], - "type": "object", - }, - "ErrorResult": { - "additionalProperties": False, - "properties": {"error": {"$ref": "#/definitions/Error"}}, - "type": "object", - }, - "ErrorResults": { - "additionalProperties": False, - "properties": { - "results": { - "items": {"$ref": "#/definitions/ErrorResult"}, - "type": "array", - } - }, - "required": ["results"], - "type": "object", - }, - "ListSSHKeys": { - "additionalProperties": False, - "properties": { - "entities": {"$ref": "#/definitions/Entities"}, - "mode": {"type": "boolean"}, - }, - "required": ["entities", "mode"], - "type": "object", - }, - "ModifyUserSSHKeys": { - "additionalProperties": False, - "properties": { - "ssh-keys": {"items": {"type": "string"}, "type": "array"}, - "user": {"type": "string"}, - }, - "required": ["user", "ssh-keys"], - "type": "object", - }, - "StringsResult": { - "additionalProperties": False, - "properties": { - "error": {"$ref": "#/definitions/Error"}, - "result": {"items": {"type": "string"}, "type": "array"}, - }, - "type": "object", - }, - "StringsResults": { - "additionalProperties": False, - "properties": { - "results": { - "items": {"$ref": "#/definitions/StringsResult"}, - "type": "array", - } - }, - "required": ["results"], - "type": "object", - }, - }, - "properties": { - "AddKeys": { - "description": "AddKeys adds new authorised ssh " - "keys for the specified user.", - "properties": { - "Params": {"$ref": "#/definitions/ModifyUserSSHKeys"}, - "Result": {"$ref": "#/definitions/ErrorResults"}, - }, - "type": "object", - }, - "DeleteKeys": { - "description": "DeleteKeys deletes the " - "authorised ssh keys for the " - "specified user.", - "properties": { - "Params": {"$ref": "#/definitions/ModifyUserSSHKeys"}, - "Result": {"$ref": "#/definitions/ErrorResults"}, - }, - "type": "object", - }, - "ImportKeys": { - "description": "ImportKeys imports new " - "authorised ssh keys from the " - "specified key ids for the " - "specified user.", - "properties": { - "Params": {"$ref": "#/definitions/ModifyUserSSHKeys"}, - "Result": {"$ref": "#/definitions/ErrorResults"}, - }, - "type": "object", - }, - "ListKeys": { - "description": "ListKeys returns the authorised " - "ssh keys for the specified users.", - "properties": { - "Params": {"$ref": "#/definitions/ListSSHKeys"}, - "Result": {"$ref": "#/definitions/StringsResults"}, - }, - "type": "object", - }, - }, - "type": "object", - } @ReturnMapping(ErrorResults) async def AddKeys(self, ssh_keys=None, user=None): @@ -694,84 +288,6 @@ async def ListKeys(self, entities=None, mode=None): class ModelUpgraderFacade(Type): name = "ModelUpgrader" version = 1 - schema = { - "definitions": { - "Error": { - "additionalProperties": False, - "properties": { - "code": {"type": "string"}, - "info": { - "patternProperties": { - ".*": {"additionalProperties": True, "type": "object"} - }, - "type": "object", - }, - "message": {"type": "string"}, - }, - "required": ["message", "code"], - "type": "object", - }, - "ModelParam": { - "additionalProperties": False, - "properties": {"model-tag": {"type": "string"}}, - "required": ["model-tag"], - "type": "object", - }, - "Number": { - "additionalProperties": False, - "properties": { - "Build": {"type": "integer"}, - "Major": {"type": "integer"}, - "Minor": {"type": "integer"}, - "Patch": {"type": "integer"}, - "Tag": {"type": "string"}, - }, - "required": ["Major", "Minor", "Tag", "Patch", "Build"], - "type": "object", - }, - "UpgradeModelParams": { - "additionalProperties": False, - "properties": { - "agent-stream": {"type": "string"}, - "dry-run": {"type": "boolean"}, - "ignore-agent-versions": {"type": "boolean"}, - "model-tag": {"type": "string"}, - "target-version": {"$ref": "#/definitions/Number"}, - }, - "required": ["model-tag", "target-version"], - "type": "object", - }, - "UpgradeModelResult": { - "additionalProperties": False, - "properties": { - "chosen-version": {"$ref": "#/definitions/Number"}, - "error": {"$ref": "#/definitions/Error"}, - }, - "required": ["chosen-version"], - "type": "object", - }, - }, - "properties": { - "AbortModelUpgrade": { - "description": "AbortModelUpgrade aborts " - "and archives the model " - "upgrade\n" - "synchronisation record, " - "if any.", - "properties": {"Params": {"$ref": "#/definitions/ModelParam"}}, - "type": "object", - }, - "UpgradeModel": { - "description": "UpgradeModel upgrades a model.", - "properties": { - "Params": {"$ref": "#/definitions/UpgradeModelParams"}, - "Result": {"$ref": "#/definitions/UpgradeModelResult"}, - }, - "type": "object", - }, - }, - "type": "object", - } @ReturnMapping(None) async def AbortModelUpgrade(self, model_tag=None): @@ -857,66 +373,6 @@ async def UpgradeModel( class PayloadsFacade(Type): name = "Payloads" version = 1 - schema = { - "definitions": { - "Payload": { - "additionalProperties": False, - "properties": { - "class": {"type": "string"}, - "id": {"type": "string"}, - "labels": {"items": {"type": "string"}, "type": "array"}, - "machine": {"type": "string"}, - "status": {"type": "string"}, - "type": {"type": "string"}, - "unit": {"type": "string"}, - }, - "required": [ - "class", - "type", - "id", - "status", - "labels", - "unit", - "machine", - ], - "type": "object", - }, - "PayloadListArgs": { - "additionalProperties": False, - "properties": { - "patterns": {"items": {"type": "string"}, "type": "array"} - }, - "required": ["patterns"], - "type": "object", - }, - "PayloadListResults": { - "additionalProperties": False, - "properties": { - "results": { - "items": {"$ref": "#/definitions/Payload"}, - "type": "array", - } - }, - "required": ["results"], - "type": "object", - }, - }, - "properties": { - "List": { - "description": "List builds the list of payloads " - "being tracked for\n" - "the given unit and IDs. If no IDs are " - "provided then all tracked\n" - "payloads for the unit are returned.", - "properties": { - "Params": {"$ref": "#/definitions/PayloadListArgs"}, - "Result": {"$ref": "#/definitions/PayloadListResults"}, - }, - "type": "object", - } - }, - "type": "object", - } @ReturnMapping(PayloadListResults) async def List(self, patterns=None): @@ -943,10 +399,6 @@ async def List(self, patterns=None): class PingerFacade(Type): name = "Pinger" version = 1 - schema = { - "properties": {"Ping": {"type": "object"}, "Stop": {"type": "object"}}, - "type": "object", - } @ReturnMapping(None) async def Ping(self): @@ -972,203 +424,6 @@ async def Stop(self): class SecretBackendsFacade(Type): name = "SecretBackends" version = 1 - schema = { - "definitions": { - "AddSecretBackendArg": { - "additionalProperties": False, - "properties": { - "SecretBackend": {"$ref": "#/definitions/SecretBackend"}, - "backend-type": {"type": "string"}, - "config": { - "patternProperties": { - ".*": {"additionalProperties": True, "type": "object"} - }, - "type": "object", - }, - "id": {"type": "string"}, - "name": {"type": "string"}, - "token-rotate-interval": {"type": "integer"}, - }, - "required": ["name", "backend-type", "config", "SecretBackend"], - "type": "object", - }, - "AddSecretBackendArgs": { - "additionalProperties": False, - "properties": { - "args": { - "items": {"$ref": "#/definitions/AddSecretBackendArg"}, - "type": "array", - } - }, - "required": ["args"], - "type": "object", - }, - "Error": { - "additionalProperties": False, - "properties": { - "code": {"type": "string"}, - "info": { - "patternProperties": { - ".*": {"additionalProperties": True, "type": "object"} - }, - "type": "object", - }, - "message": {"type": "string"}, - }, - "required": ["message", "code"], - "type": "object", - }, - "ErrorResult": { - "additionalProperties": False, - "properties": {"error": {"$ref": "#/definitions/Error"}}, - "type": "object", - }, - "ErrorResults": { - "additionalProperties": False, - "properties": { - "results": { - "items": {"$ref": "#/definitions/ErrorResult"}, - "type": "array", - } - }, - "required": ["results"], - "type": "object", - }, - "ListSecretBackendsArgs": { - "additionalProperties": False, - "properties": { - "names": {"items": {"type": "string"}, "type": "array"}, - "reveal": {"type": "boolean"}, - }, - "required": ["names", "reveal"], - "type": "object", - }, - "ListSecretBackendsResults": { - "additionalProperties": False, - "properties": { - "results": { - "items": {"$ref": "#/definitions/SecretBackendResult"}, - "type": "array", - } - }, - "required": ["results"], - "type": "object", - }, - "RemoveSecretBackendArg": { - "additionalProperties": False, - "properties": { - "force": {"type": "boolean"}, - "name": {"type": "string"}, - }, - "required": ["name"], - "type": "object", - }, - "RemoveSecretBackendArgs": { - "additionalProperties": False, - "properties": { - "args": { - "items": {"$ref": "#/definitions/RemoveSecretBackendArg"}, - "type": "array", - } - }, - "required": ["args"], - "type": "object", - }, - "SecretBackend": { - "additionalProperties": False, - "properties": { - "backend-type": {"type": "string"}, - "config": { - "patternProperties": { - ".*": {"additionalProperties": True, "type": "object"} - }, - "type": "object", - }, - "name": {"type": "string"}, - "token-rotate-interval": {"type": "integer"}, - }, - "required": ["name", "backend-type", "config"], - "type": "object", - }, - "SecretBackendResult": { - "additionalProperties": False, - "properties": { - "error": {"$ref": "#/definitions/Error"}, - "id": {"type": "string"}, - "message": {"type": "string"}, - "num-secrets": {"type": "integer"}, - "result": {"$ref": "#/definitions/SecretBackend"}, - "status": {"type": "string"}, - }, - "required": ["result", "id", "num-secrets", "status"], - "type": "object", - }, - "UpdateSecretBackendArg": { - "additionalProperties": False, - "properties": { - "config": { - "patternProperties": { - ".*": {"additionalProperties": True, "type": "object"} - }, - "type": "object", - }, - "force": {"type": "boolean"}, - "name": {"type": "string"}, - "name-change": {"type": "string"}, - "reset": {"items": {"type": "string"}, "type": "array"}, - "token-rotate-interval": {"type": "integer"}, - }, - "required": ["name", "token-rotate-interval", "config", "reset"], - "type": "object", - }, - "UpdateSecretBackendArgs": { - "additionalProperties": False, - "properties": { - "args": { - "items": {"$ref": "#/definitions/UpdateSecretBackendArg"}, - "type": "array", - } - }, - "required": ["args"], - "type": "object", - }, - }, - "properties": { - "AddSecretBackends": { - "description": "AddSecretBackends adds new secret backends.", - "properties": { - "Params": {"$ref": "#/definitions/AddSecretBackendArgs"}, - "Result": {"$ref": "#/definitions/ErrorResults"}, - }, - "type": "object", - }, - "ListSecretBackends": { - "description": "ListSecretBackends lists available secret backends.", - "properties": { - "Params": {"$ref": "#/definitions/ListSecretBackendsArgs"}, - "Result": {"$ref": "#/definitions/ListSecretBackendsResults"}, - }, - "type": "object", - }, - "RemoveSecretBackends": { - "description": "RemoveSecretBackends removes secret backends.", - "properties": { - "Params": {"$ref": "#/definitions/RemoveSecretBackendArgs"}, - "Result": {"$ref": "#/definitions/ErrorResults"}, - }, - "type": "object", - }, - "UpdateSecretBackends": { - "description": "UpdateSecretBackends updates secret backends.", - "properties": { - "Params": {"$ref": "#/definitions/UpdateSecretBackendArgs"}, - "Result": {"$ref": "#/definitions/ErrorResults"}, - }, - "type": "object", - }, - }, - "type": "object", - } @ReturnMapping(ErrorResults) async def AddSecretBackends(self, args=None): @@ -1267,129 +522,6 @@ async def UpdateSecretBackends(self, args=None): class SecretsFacade(Type): name = "Secrets" version = 1 - schema = { - "definitions": { - "Error": { - "additionalProperties": False, - "properties": { - "code": {"type": "string"}, - "info": { - "patternProperties": { - ".*": {"additionalProperties": True, "type": "object"} - }, - "type": "object", - }, - "message": {"type": "string"}, - }, - "required": ["message", "code"], - "type": "object", - }, - "ListSecretResult": { - "additionalProperties": False, - "properties": { - "create-time": {"format": "date-time", "type": "string"}, - "description": {"type": "string"}, - "label": {"type": "string"}, - "latest-expire-time": {"format": "date-time", "type": "string"}, - "latest-revision": {"type": "integer"}, - "next-rotate-time": {"format": "date-time", "type": "string"}, - "owner-tag": {"type": "string"}, - "revisions": { - "items": {"$ref": "#/definitions/SecretRevision"}, - "type": "array", - }, - "rotate-policy": {"type": "string"}, - "update-time": {"format": "date-time", "type": "string"}, - "uri": {"type": "string"}, - "value": {"$ref": "#/definitions/SecretValueResult"}, - "version": {"type": "integer"}, - }, - "required": [ - "uri", - "version", - "owner-tag", - "latest-revision", - "create-time", - "update-time", - "revisions", - ], - "type": "object", - }, - "ListSecretResults": { - "additionalProperties": False, - "properties": { - "results": { - "items": {"$ref": "#/definitions/ListSecretResult"}, - "type": "array", - } - }, - "required": ["results"], - "type": "object", - }, - "ListSecretsArgs": { - "additionalProperties": False, - "properties": { - "filter": {"$ref": "#/definitions/SecretsFilter"}, - "show-secrets": {"type": "boolean"}, - }, - "required": ["show-secrets", "filter"], - "type": "object", - }, - "SecretRevision": { - "additionalProperties": False, - "properties": { - "backend-name": {"type": "string"}, - "create-time": {"format": "date-time", "type": "string"}, - "expire-time": {"format": "date-time", "type": "string"}, - "revision": {"type": "integer"}, - "update-time": {"format": "date-time", "type": "string"}, - "value-ref": {"$ref": "#/definitions/SecretValueRef"}, - }, - "required": ["revision"], - "type": "object", - }, - "SecretValueRef": { - "additionalProperties": False, - "properties": { - "backend-id": {"type": "string"}, - "revision-id": {"type": "string"}, - }, - "required": ["backend-id", "revision-id"], - "type": "object", - }, - "SecretValueResult": { - "additionalProperties": False, - "properties": { - "data": { - "patternProperties": {".*": {"type": "string"}}, - "type": "object", - }, - "error": {"$ref": "#/definitions/Error"}, - }, - "type": "object", - }, - "SecretsFilter": { - "additionalProperties": False, - "properties": { - "owner-tag": {"type": "string"}, - "revision": {"type": "integer"}, - "uri": {"type": "string"}, - }, - "type": "object", - }, - }, - "properties": { - "ListSecrets": { - "description": "ListSecrets lists available secrets.", - "properties": { - "Params": {"$ref": "#/definitions/ListSecretsArgs"}, - "Result": {"$ref": "#/definitions/ListSecretResults"}, - }, - "type": "object", - } - }, - "type": "object", - } @ReturnMapping(ListSecretResults) async def ListSecrets(self, filter_=None, show_secrets=None): diff --git a/juju/client/_client10.py b/juju/client/_client10.py index 3be6be9c7..2de5c7217 100644 --- a/juju/client/_client10.py +++ b/juju/client/_client10.py @@ -8,584 +8,6 @@ class MachineManagerFacade(Type): name = "MachineManager" version = 10 - schema = { - "definitions": { - "AddMachineParams": { - "additionalProperties": False, - "properties": { - "addresses": { - "items": {"$ref": "#/definitions/Address"}, - "type": "array", - }, - "base": {"$ref": "#/definitions/Base"}, - "constraints": {"$ref": "#/definitions/Value"}, - "container-type": {"type": "string"}, - "disks": { - "items": {"$ref": "#/definitions/Constraints"}, - "type": "array", - }, - "hardware-characteristics": { - "$ref": "#/definitions/HardwareCharacteristics" - }, - "instance-id": {"type": "string"}, - "jobs": {"items": {"type": "string"}, "type": "array"}, - "nonce": {"type": "string"}, - "parent-id": {"type": "string"}, - "placement": {"$ref": "#/definitions/Placement"}, - }, - "required": [ - "constraints", - "jobs", - "parent-id", - "container-type", - "instance-id", - "nonce", - "hardware-characteristics", - "addresses", - ], - "type": "object", - }, - "AddMachines": { - "additionalProperties": False, - "properties": { - "params": { - "items": {"$ref": "#/definitions/AddMachineParams"}, - "type": "array", - } - }, - "required": ["params"], - "type": "object", - }, - "AddMachinesResult": { - "additionalProperties": False, - "properties": { - "error": {"$ref": "#/definitions/Error"}, - "machine": {"type": "string"}, - }, - "required": ["machine"], - "type": "object", - }, - "AddMachinesResults": { - "additionalProperties": False, - "properties": { - "machines": { - "items": {"$ref": "#/definitions/AddMachinesResult"}, - "type": "array", - } - }, - "required": ["machines"], - "type": "object", - }, - "Address": { - "additionalProperties": False, - "properties": { - "cidr": {"type": "string"}, - "config-type": {"type": "string"}, - "is-secondary": {"type": "boolean"}, - "scope": {"type": "string"}, - "space-id": {"type": "string"}, - "space-name": {"type": "string"}, - "type": {"type": "string"}, - "value": {"type": "string"}, - }, - "required": ["value", "type", "scope"], - "type": "object", - }, - "Base": { - "additionalProperties": False, - "properties": { - "channel": {"type": "string"}, - "name": {"type": "string"}, - }, - "required": ["name", "channel"], - "type": "object", - }, - "Constraints": { - "additionalProperties": False, - "properties": { - "Count": {"type": "integer"}, - "Pool": {"type": "string"}, - "Size": {"type": "integer"}, - }, - "required": ["Pool", "Size", "Count"], - "type": "object", - }, - "DestroyMachineInfo": { - "additionalProperties": False, - "properties": { - "destroyed-containers": { - "items": {"$ref": "#/definitions/DestroyMachineResult"}, - "type": "array", - }, - "destroyed-storage": { - "items": {"$ref": "#/definitions/Entity"}, - "type": "array", - }, - "destroyed-units": { - "items": {"$ref": "#/definitions/Entity"}, - "type": "array", - }, - "detached-storage": { - "items": {"$ref": "#/definitions/Entity"}, - "type": "array", - }, - "machine-id": {"type": "string"}, - }, - "required": ["machine-id"], - "type": "object", - }, - "DestroyMachineResult": { - "additionalProperties": False, - "properties": { - "error": {"$ref": "#/definitions/Error"}, - "info": {"$ref": "#/definitions/DestroyMachineInfo"}, - }, - "type": "object", - }, - "DestroyMachineResults": { - "additionalProperties": False, - "properties": { - "results": { - "items": {"$ref": "#/definitions/DestroyMachineResult"}, - "type": "array", - } - }, - "type": "object", - }, - "DestroyMachinesParams": { - "additionalProperties": False, - "properties": { - "dry-run": {"type": "boolean"}, - "force": {"type": "boolean"}, - "keep": {"type": "boolean"}, - "machine-tags": {"items": {"type": "string"}, "type": "array"}, - "max-wait": {"type": "integer"}, - }, - "required": ["machine-tags"], - "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", - }, - "HardwareCharacteristics": { - "additionalProperties": False, - "properties": { - "arch": {"type": "string"}, - "availability-zone": {"type": "string"}, - "cpu-cores": {"type": "integer"}, - "cpu-power": {"type": "integer"}, - "mem": {"type": "integer"}, - "root-disk": {"type": "integer"}, - "root-disk-source": {"type": "string"}, - "tags": {"items": {"type": "string"}, "type": "array"}, - "virt-type": {"type": "string"}, - }, - "type": "object", - }, - "InstanceType": { - "additionalProperties": False, - "properties": { - "arches": {"items": {"type": "string"}, "type": "array"}, - "cost": {"type": "integer"}, - "cpu-cores": {"type": "integer"}, - "memory": {"type": "integer"}, - "name": {"type": "string"}, - "root-disk": {"type": "integer"}, - "virt-type": {"type": "string"}, - }, - "required": ["arches", "cpu-cores", "memory"], - "type": "object", - }, - "InstanceTypesResult": { - "additionalProperties": False, - "properties": { - "cost-currency": {"type": "string"}, - "cost-divisor": {"type": "integer"}, - "cost-unit": {"type": "string"}, - "error": {"$ref": "#/definitions/Error"}, - "instance-types": { - "items": {"$ref": "#/definitions/InstanceType"}, - "type": "array", - }, - }, - "type": "object", - }, - "InstanceTypesResults": { - "additionalProperties": False, - "properties": { - "results": { - "items": {"$ref": "#/definitions/InstanceTypesResult"}, - "type": "array", - } - }, - "required": ["results"], - "type": "object", - }, - "ModelInstanceTypesConstraint": { - "additionalProperties": False, - "properties": {"value": {"$ref": "#/definitions/Value"}}, - "type": "object", - }, - "ModelInstanceTypesConstraints": { - "additionalProperties": False, - "properties": { - "constraints": { - "items": {"$ref": "#/definitions/ModelInstanceTypesConstraint"}, - "type": "array", - } - }, - "required": ["constraints"], - "type": "object", - }, - "NotifyWatchResult": { - "additionalProperties": False, - "properties": { - "NotifyWatcherId": {"type": "string"}, - "error": {"$ref": "#/definitions/Error"}, - }, - "required": ["NotifyWatcherId"], - "type": "object", - }, - "NotifyWatchResults": { - "additionalProperties": False, - "properties": { - "results": { - "items": {"$ref": "#/definitions/NotifyWatchResult"}, - "type": "array", - } - }, - "required": ["results"], - "type": "object", - }, - "Placement": { - "additionalProperties": False, - "properties": { - "directive": {"type": "string"}, - "scope": {"type": "string"}, - }, - "required": ["scope", "directive"], - "type": "object", - }, - "ProvisioningScriptParams": { - "additionalProperties": False, - "properties": { - "data-dir": {"type": "string"}, - "disable-package-commands": {"type": "boolean"}, - "machine-id": {"type": "string"}, - "nonce": {"type": "string"}, - }, - "required": [ - "machine-id", - "nonce", - "data-dir", - "disable-package-commands", - ], - "type": "object", - }, - "ProvisioningScriptResult": { - "additionalProperties": False, - "properties": {"script": {"type": "string"}}, - "required": ["script"], - "type": "object", - }, - "RetryProvisioningArgs": { - "additionalProperties": False, - "properties": { - "all": {"type": "boolean"}, - "machines": {"items": {"type": "string"}, "type": "array"}, - }, - "required": ["all"], - "type": "object", - }, - "StringsResult": { - "additionalProperties": False, - "properties": { - "error": {"$ref": "#/definitions/Error"}, - "result": {"items": {"type": "string"}, "type": "array"}, - }, - "type": "object", - }, - "StringsResults": { - "additionalProperties": False, - "properties": { - "results": { - "items": {"$ref": "#/definitions/StringsResult"}, - "type": "array", - } - }, - "required": ["results"], - "type": "object", - }, - "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", - }, - "UpgradeSeriesNotificationParam": { - "additionalProperties": False, - "properties": { - "entity": {"$ref": "#/definitions/Entity"}, - "watcher-id": {"type": "string"}, - }, - "required": ["entity", "watcher-id"], - "type": "object", - }, - "UpgradeSeriesNotificationParams": { - "additionalProperties": False, - "properties": { - "params": { - "items": { - "$ref": "#/definitions/UpgradeSeriesNotificationParam" - }, - "type": "array", - } - }, - "required": ["params"], - "type": "object", - }, - "UpgradeSeriesUnitsResult": { - "additionalProperties": False, - "properties": { - "error": {"$ref": "#/definitions/Error"}, - "unit-names": {"items": {"type": "string"}, "type": "array"}, - }, - "required": ["unit-names"], - "type": "object", - }, - "UpgradeSeriesUnitsResults": { - "additionalProperties": False, - "properties": { - "Results": { - "items": {"$ref": "#/definitions/UpgradeSeriesUnitsResult"}, - "type": "array", - } - }, - "required": ["Results"], - "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": { - "AddMachines": { - "description": "AddMachines adds new machines " - "with the supplied parameters.\n" - "The args will contain Base " - "info.", - "properties": { - "Params": {"$ref": "#/definitions/AddMachines"}, - "Result": {"$ref": "#/definitions/AddMachinesResults"}, - }, - "type": "object", - }, - "DestroyMachineWithParams": { - "description": "DestroyMachineWithParams " - "removes a set of " - "machines from the " - "model.", - "properties": { - "Params": {"$ref": "#/definitions/DestroyMachinesParams"}, - "Result": {"$ref": "#/definitions/DestroyMachineResults"}, - }, - "type": "object", - }, - "GetUpgradeSeriesMessages": { - "description": "GetUpgradeSeriesMessages " - "returns all new " - "messages " - "associated with " - "upgrade\n" - "series events. " - "Messages that " - "have already been " - "retrieved once " - "are not\n" - "returned by this " - "method.", - "properties": { - "Params": {"$ref": "#/definitions/UpgradeSeriesNotificationParams"}, - "Result": {"$ref": "#/definitions/StringsResults"}, - }, - "type": "object", - }, - "InstanceTypes": { - "description": "InstanceTypes returns " - "instance type information " - "for the cloud and region\n" - "in which the current model " - "is deployed.", - "properties": { - "Params": {"$ref": "#/definitions/ModelInstanceTypesConstraints"}, - "Result": {"$ref": "#/definitions/InstanceTypesResults"}, - }, - "type": "object", - }, - "ProvisioningScript": { - "description": "ProvisioningScript " - "returns a shell script " - "that, when run,\n" - "provisions a machine " - "agent on the machine " - "executing the script.", - "properties": { - "Params": {"$ref": "#/definitions/ProvisioningScriptParams"}, - "Result": {"$ref": "#/definitions/ProvisioningScriptResult"}, - }, - "type": "object", - }, - "RetryProvisioning": { - "description": "RetryProvisioning marks " - "a provisioning error as " - "transient on the " - "machines.", - "properties": { - "Params": {"$ref": "#/definitions/RetryProvisioningArgs"}, - "Result": {"$ref": "#/definitions/ErrorResults"}, - }, - "type": "object", - }, - "UpgradeSeriesComplete": { - "description": "UpgradeSeriesComplete " - "marks a machine as " - "having completed a " - "managed series\n" - "upgrade.", - "properties": { - "Params": {"$ref": "#/definitions/UpdateChannelArg"}, - "Result": {"$ref": "#/definitions/ErrorResult"}, - }, - "type": "object", - }, - "UpgradeSeriesPrepare": { - "description": "UpgradeSeriesPrepare " - "prepares a machine " - "for a OS series " - "upgrade.", - "properties": { - "Params": {"$ref": "#/definitions/UpdateChannelArg"}, - "Result": {"$ref": "#/definitions/ErrorResult"}, - }, - "type": "object", - }, - "UpgradeSeriesValidate": { - "description": "UpgradeSeriesValidate " - "validates that the " - "incoming arguments " - "correspond to a\n" - "valid series upgrade " - "for the target " - "machine.\n" - "If they do, a list " - "of the machine's " - "current units is " - "returned for use in\n" - "soliciting user " - "confirmation of the " - "command.", - "properties": { - "Params": {"$ref": "#/definitions/UpdateChannelArgs"}, - "Result": {"$ref": "#/definitions/UpgradeSeriesUnitsResults"}, - }, - "type": "object", - }, - "WatchUpgradeSeriesNotifications": { - "description": "WatchUpgradeSeriesNotifications " - "returns a " - "watcher " - "that fires " - "on " - "upgrade\n" - "series " - "events.", - "properties": { - "Params": {"$ref": "#/definitions/Entities"}, - "Result": {"$ref": "#/definitions/NotifyWatchResults"}, - }, - "type": "object", - }, - }, - "type": "object", - } @ReturnMapping(AddMachinesResults) async def AddMachines(self, params=None): @@ -903,860 +325,6 @@ async def WatchUpgradeSeriesNotifications(self, entities=None): 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): diff --git a/juju/client/_client11.py b/juju/client/_client11.py index b40610fe0..c1f00f6b8 100644 --- a/juju/client/_client11.py +++ b/juju/client/_client11.py @@ -8,866 +8,6 @@ class ControllerFacade(Type): name = "Controller" version = 11 - schema = { - "definitions": { - "AllWatcherId": { - "additionalProperties": False, - "properties": {"watcher-id": {"type": "string"}}, - "required": ["watcher-id"], - "type": "object", - }, - "CloudCredential": { - "additionalProperties": False, - "properties": { - "attrs": { - "patternProperties": {".*": {"type": "string"}}, - "type": "object", - }, - "auth-type": {"type": "string"}, - "redacted": {"items": {"type": "string"}, "type": "array"}, - }, - "required": ["auth-type"], - "type": "object", - }, - "CloudSpec": { - "additionalProperties": False, - "properties": { - "cacertificates": {"items": {"type": "string"}, "type": "array"}, - "credential": {"$ref": "#/definitions/CloudCredential"}, - "endpoint": {"type": "string"}, - "identity-endpoint": {"type": "string"}, - "is-controller-cloud": {"type": "boolean"}, - "name": {"type": "string"}, - "region": {"type": "string"}, - "skip-tls-verify": {"type": "boolean"}, - "storage-endpoint": {"type": "string"}, - "type": {"type": "string"}, - }, - "required": ["type", "name"], - "type": "object", - }, - "CloudSpecResult": { - "additionalProperties": False, - "properties": { - "error": {"$ref": "#/definitions/Error"}, - "result": {"$ref": "#/definitions/CloudSpec"}, - }, - "type": "object", - }, - "CloudSpecResults": { - "additionalProperties": False, - "properties": { - "results": { - "items": {"$ref": "#/definitions/CloudSpecResult"}, - "type": "array", - } - }, - "type": "object", - }, - "ConfigValue": { - "additionalProperties": False, - "properties": { - "source": {"type": "string"}, - "value": {"additionalProperties": True, "type": "object"}, - }, - "required": ["value", "source"], - "type": "object", - }, - "ControllerAPIInfoResult": { - "additionalProperties": False, - "properties": { - "addresses": {"items": {"type": "string"}, "type": "array"}, - "cacert": {"type": "string"}, - "error": {"$ref": "#/definitions/Error"}, - }, - "required": ["addresses", "cacert"], - "type": "object", - }, - "ControllerAPIInfoResults": { - "additionalProperties": False, - "properties": { - "results": { - "items": {"$ref": "#/definitions/ControllerAPIInfoResult"}, - "type": "array", - } - }, - "required": ["results"], - "type": "object", - }, - "ControllerConfigResult": { - "additionalProperties": False, - "properties": { - "config": { - "patternProperties": { - ".*": {"additionalProperties": True, "type": "object"} - }, - "type": "object", - } - }, - "required": ["config"], - "type": "object", - }, - "ControllerConfigSet": { - "additionalProperties": False, - "properties": { - "config": { - "patternProperties": { - ".*": {"additionalProperties": True, "type": "object"} - }, - "type": "object", - } - }, - "required": ["config"], - "type": "object", - }, - "ControllerVersionResults": { - "additionalProperties": False, - "properties": { - "git-commit": {"type": "string"}, - "version": {"type": "string"}, - }, - "required": ["version", "git-commit"], - "type": "object", - }, - "DashboardConnectionInfo": { - "additionalProperties": False, - "properties": { - "error": {"$ref": "#/definitions/Error"}, - "proxy-connection": {"$ref": "#/definitions/Proxy"}, - "ssh-connection": { - "$ref": "#/definitions/DashboardConnectionSSHTunnel" - }, - }, - "required": ["proxy-connection", "ssh-connection"], - "type": "object", - }, - "DashboardConnectionSSHTunnel": { - "additionalProperties": False, - "properties": { - "entity": {"type": "string"}, - "host": {"type": "string"}, - "model": {"type": "string"}, - "port": {"type": "string"}, - }, - "required": ["host", "port"], - "type": "object", - }, - "DestroyControllerArgs": { - "additionalProperties": False, - "properties": { - "destroy-models": {"type": "boolean"}, - "destroy-storage": {"type": "boolean"}, - "force": {"type": "boolean"}, - "max-wait": {"type": "integer"}, - "model-timeout": {"type": "integer"}, - }, - "required": ["destroy-models"], - "type": "object", - }, - "Entities": { - "additionalProperties": False, - "properties": { - "entities": { - "items": {"$ref": "#/definitions/Entity"}, - "type": "array", - } - }, - "required": ["entities"], - "type": "object", - }, - "Entity": { - "additionalProperties": False, - "properties": {"tag": {"type": "string"}}, - "required": ["tag"], - "type": "object", - }, - "Error": { - "additionalProperties": False, - "properties": { - "code": {"type": "string"}, - "info": { - "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", - }, - "HostedModelConfig": { - "additionalProperties": False, - "properties": { - "cloud-spec": {"$ref": "#/definitions/CloudSpec"}, - "config": { - "patternProperties": { - ".*": {"additionalProperties": True, "type": "object"} - }, - "type": "object", - }, - "error": {"$ref": "#/definitions/Error"}, - "name": {"type": "string"}, - "owner": {"type": "string"}, - }, - "required": ["name", "owner"], - "type": "object", - }, - "HostedModelConfigsResults": { - "additionalProperties": False, - "properties": { - "models": { - "items": {"$ref": "#/definitions/HostedModelConfig"}, - "type": "array", - } - }, - "required": ["models"], - "type": "object", - }, - "InitiateMigrationArgs": { - "additionalProperties": False, - "properties": { - "specs": { - "items": {"$ref": "#/definitions/MigrationSpec"}, - "type": "array", - } - }, - "required": ["specs"], - "type": "object", - }, - "InitiateMigrationResult": { - "additionalProperties": False, - "properties": { - "error": {"$ref": "#/definitions/Error"}, - "migration-id": {"type": "string"}, - "model-tag": {"type": "string"}, - }, - "required": ["model-tag", "migration-id"], - "type": "object", - }, - "InitiateMigrationResults": { - "additionalProperties": False, - "properties": { - "results": { - "items": {"$ref": "#/definitions/InitiateMigrationResult"}, - "type": "array", - } - }, - "required": ["results"], - "type": "object", - }, - "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", - }, - "MigrationSpec": { - "additionalProperties": False, - "properties": { - "model-tag": {"type": "string"}, - "target-info": {"$ref": "#/definitions/MigrationTargetInfo"}, - }, - "required": ["model-tag", "target-info"], - "type": "object", - }, - "MigrationTargetInfo": { - "additionalProperties": False, - "properties": { - "addrs": {"items": {"type": "string"}, "type": "array"}, - "auth-tag": {"type": "string"}, - "ca-cert": {"type": "string"}, - "controller-alias": {"type": "string"}, - "controller-tag": {"type": "string"}, - "macaroons": {"type": "string"}, - "password": {"type": "string"}, - }, - "required": ["controller-tag", "addrs", "ca-cert", "auth-tag"], - "type": "object", - }, - "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", - }, - "ModelBlockInfo": { - "additionalProperties": False, - "properties": { - "blocks": {"items": {"type": "string"}, "type": "array"}, - "model-uuid": {"type": "string"}, - "name": {"type": "string"}, - "owner-tag": {"type": "string"}, - }, - "required": ["name", "model-uuid", "owner-tag", "blocks"], - "type": "object", - }, - "ModelBlockInfoList": { - "additionalProperties": False, - "properties": { - "models": { - "items": {"$ref": "#/definitions/ModelBlockInfo"}, - "type": "array", - } - }, - "type": "object", - }, - "ModelConfigResults": { - "additionalProperties": False, - "properties": { - "config": { - "patternProperties": { - ".*": {"$ref": "#/definitions/ConfigValue"} - }, - "type": "object", - } - }, - "required": ["config"], - "type": "object", - }, - "ModelFilesystemInfo": { - "additionalProperties": False, - "properties": { - "detachable": {"type": "boolean"}, - "id": {"type": "string"}, - "message": {"type": "string"}, - "provider-id": {"type": "string"}, - "status": {"type": "string"}, - }, - "required": ["id"], - "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", - }, - "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", - }, - "ModelTag": {"additionalProperties": False, "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", - }, - "ModifyControllerAccess": { - "additionalProperties": False, - "properties": { - "access": {"type": "string"}, - "action": {"type": "string"}, - "user-tag": {"type": "string"}, - }, - "required": ["user-tag", "action", "access"], - "type": "object", - }, - "ModifyControllerAccessRequest": { - "additionalProperties": False, - "properties": { - "changes": { - "items": {"$ref": "#/definitions/ModifyControllerAccess"}, - "type": "array", - } - }, - "required": ["changes"], - "type": "object", - }, - "NotifyWatchResult": { - "additionalProperties": False, - "properties": { - "NotifyWatcherId": {"type": "string"}, - "error": {"$ref": "#/definitions/Error"}, - }, - "required": ["NotifyWatcherId"], - "type": "object", - }, - "NotifyWatchResults": { - "additionalProperties": False, - "properties": { - "results": { - "items": {"$ref": "#/definitions/NotifyWatchResult"}, - "type": "array", - } - }, - "required": ["results"], - "type": "object", - }, - "Proxy": { - "additionalProperties": False, - "properties": { - "config": { - "patternProperties": { - ".*": {"additionalProperties": True, "type": "object"} - }, - "type": "object", - }, - "type": {"type": "string"}, - }, - "required": ["config", "type"], - "type": "object", - }, - "RemoveBlocksArgs": { - "additionalProperties": False, - "properties": {"all": {"type": "boolean"}}, - "required": ["all"], - "type": "object", - }, - "StringResult": { - "additionalProperties": False, - "properties": { - "error": {"$ref": "#/definitions/Error"}, - "result": {"type": "string"}, - }, - "required": ["result"], - "type": "object", - }, - "SummaryWatcherID": { - "additionalProperties": False, - "properties": {"watcher-id": {"type": "string"}}, - "required": ["watcher-id"], - "type": "object", - }, - "UserAccess": { - "additionalProperties": False, - "properties": { - "access": {"type": "string"}, - "user-tag": {"type": "string"}, - }, - "required": ["user-tag", "access"], - "type": "object", - }, - "UserAccessResult": { - "additionalProperties": False, - "properties": { - "error": {"$ref": "#/definitions/Error"}, - "result": {"$ref": "#/definitions/UserAccess"}, - }, - "type": "object", - }, - "UserAccessResults": { - "additionalProperties": False, - "properties": { - "results": { - "items": {"$ref": "#/definitions/UserAccessResult"}, - "type": "array", - } - }, - "type": "object", - }, - "UserModel": { - "additionalProperties": False, - "properties": { - "last-connection": {"format": "date-time", "type": "string"}, - "model": {"$ref": "#/definitions/Model"}, - }, - "required": ["model", "last-connection"], - "type": "object", - }, - "UserModelList": { - "additionalProperties": False, - "properties": { - "user-models": { - "items": {"$ref": "#/definitions/UserModel"}, - "type": "array", - } - }, - "required": ["user-models"], - "type": "object", - }, - }, - "properties": { - "AllModels": { - "description": "AllModels allows controller " - "administrators to get the list " - "of all the\n" - "models in the controller.", - "properties": {"Result": {"$ref": "#/definitions/UserModelList"}}, - "type": "object", - }, - "CloudSpec": { - "description": "CloudSpec returns the model's cloud spec.", - "properties": { - "Params": {"$ref": "#/definitions/Entities"}, - "Result": {"$ref": "#/definitions/CloudSpecResults"}, - }, - "type": "object", - }, - "ConfigSet": { - "description": "ConfigSet changes the value of " - "specified controller " - "configuration\n" - "settings. Only some settings can " - "be changed after bootstrap.\n" - "Settings that aren't specified " - "in the params are left " - "unchanged.", - "properties": {"Params": {"$ref": "#/definitions/ControllerConfigSet"}}, - "type": "object", - }, - "ControllerAPIInfoForModels": { - "description": "ControllerAPIInfoForModels " - "returns the " - "controller api " - "connection " - "details for the " - "specified " - "models.", - "properties": { - "Params": {"$ref": "#/definitions/Entities"}, - "Result": {"$ref": "#/definitions/ControllerAPIInfoResults"}, - }, - "type": "object", - }, - "ControllerConfig": { - "description": "ControllerConfig returns " - "the controller's " - "configuration.", - "properties": { - "Result": {"$ref": "#/definitions/ControllerConfigResult"} - }, - "type": "object", - }, - "ControllerVersion": { - "description": "ControllerVersion " - "returns the version " - "information associated " - "with this\n" - "controller binary.\n" - "\n" - "NOTE: the implementation " - "intentionally does not " - "check for " - "SuperuserAccess\n" - "as the Version is known " - "even to users with login " - "access.", - "properties": { - "Result": {"$ref": "#/definitions/ControllerVersionResults"} - }, - "type": "object", - }, - "DashboardConnectionInfo": { - "description": "DashboardConnectionInfo " - "returns the " - "connection " - "information for a " - "client to\n" - "connect to the " - "Juju Dashboard " - "including any " - "proxying " - "information.", - "properties": { - "Result": {"$ref": "#/definitions/DashboardConnectionInfo"} - }, - "type": "object", - }, - "DestroyController": { - "description": "DestroyController " - "destroys the " - "controller.\n" - "\n" - "If the args specify the " - "destruction of the " - "models, this method " - "will\n" - "attempt to do so. " - "Otherwise, if the " - "controller has any " - "non-empty,\n" - "non-Dead hosted models, " - "then an error with the " - "code\n" - "params.CodeHasHostedModels " - "will be transmitted.", - "properties": { - "Params": {"$ref": "#/definitions/DestroyControllerArgs"} - }, - "type": "object", - }, - "GetCloudSpec": { - "description": "GetCloudSpec constructs the " - "CloudSpec for a validated and " - "authorized model.", - "properties": { - "Params": {"$ref": "#/definitions/ModelTag"}, - "Result": {"$ref": "#/definitions/CloudSpecResult"}, - }, - "type": "object", - }, - "GetControllerAccess": { - "description": "GetControllerAccess " - "returns the level of " - "access the specified " - "users\n" - "have on the " - "controller.", - "properties": { - "Params": {"$ref": "#/definitions/Entities"}, - "Result": {"$ref": "#/definitions/UserAccessResults"}, - }, - "type": "object", - }, - "HostedModelConfigs": { - "description": "HostedModelConfigs " - "returns all the " - "information that the " - "client needs in\n" - "order to connect " - "directly with the host " - "model's provider and " - "destroy it\n" - "directly.", - "properties": { - "Result": {"$ref": "#/definitions/HostedModelConfigsResults"} - }, - "type": "object", - }, - "IdentityProviderURL": { - "description": "IdentityProviderURL " - "returns the URL of the " - "configured external " - "identity\n" - "provider for this " - "controller or an empty " - "string if no external " - "identity\n" - "provider has been " - "configured when the " - "controller was " - "bootstrapped.\n" - "\n" - "NOTE: the " - "implementation " - "intentionally does not " - "check for " - "SuperuserAccess\n" - "as the URL is known " - "even to users with " - "login access.", - "properties": {"Result": {"$ref": "#/definitions/StringResult"}}, - "type": "object", - }, - "InitiateMigration": { - "description": "InitiateMigration " - "attempts to begin the " - "migration of one or\n" - "more models to other " - "controllers.", - "properties": { - "Params": {"$ref": "#/definitions/InitiateMigrationArgs"}, - "Result": {"$ref": "#/definitions/InitiateMigrationResults"}, - }, - "type": "object", - }, - "ListBlockedModels": { - "description": "ListBlockedModels " - "returns a list of all " - "models on the " - "controller\n" - "which have a block in " - "place. The resulting " - "slice is sorted by " - "model\n" - "name, then owner. " - "Callers must be " - "controller " - "administrators to " - "retrieve the\n" - "list.", - "properties": {"Result": {"$ref": "#/definitions/ModelBlockInfoList"}}, - "type": "object", - }, - "ModelConfig": { - "description": "ModelConfig returns the model " - "config for the controller\n" - "model. For information on the " - "current model, use\n" - "client.ModelGet", - "properties": {"Result": {"$ref": "#/definitions/ModelConfigResults"}}, - "type": "object", - }, - "ModelStatus": { - "description": "ModelStatus returns a summary of the model.", - "properties": { - "Params": {"$ref": "#/definitions/Entities"}, - "Result": {"$ref": "#/definitions/ModelStatusResults"}, - }, - "type": "object", - }, - "ModifyControllerAccess": { - "description": "ModifyControllerAccess " - "changes the model " - "access granted to " - "users.", - "properties": { - "Params": {"$ref": "#/definitions/ModifyControllerAccessRequest"}, - "Result": {"$ref": "#/definitions/ErrorResults"}, - }, - "type": "object", - }, - "MongoVersion": { - "description": "MongoVersion allows the " - "introspection of the mongo " - "version per controller", - "properties": {"Result": {"$ref": "#/definitions/StringResult"}}, - "type": "object", - }, - "RemoveBlocks": { - "description": "RemoveBlocks removes all the blocks in the controller.", - "properties": {"Params": {"$ref": "#/definitions/RemoveBlocksArgs"}}, - "type": "object", - }, - "WatchAllModelSummaries": { - "description": "WatchAllModelSummaries " - "starts watching the " - "summary updates " - "from the cache.\n" - "This method is " - "superuser access " - "only, and watches " - "all models in the\n" - "controller.", - "properties": {"Result": {"$ref": "#/definitions/SummaryWatcherID"}}, - "type": "object", - }, - "WatchAllModels": { - "description": "WatchAllModels starts " - "watching events for all " - "models in the\n" - "controller. The returned " - "AllWatcherId should be used " - "with Next on the\n" - "AllModelWatcher endpoint to " - "receive deltas.", - "properties": {"Result": {"$ref": "#/definitions/AllWatcherId"}}, - "type": "object", - }, - "WatchCloudSpecsChanges": { - "description": "WatchCloudSpecsChanges " - "returns a watcher " - "for cloud spec " - "changes.", - "properties": { - "Params": {"$ref": "#/definitions/Entities"}, - "Result": {"$ref": "#/definitions/NotifyWatchResults"}, - }, - "type": "object", - }, - "WatchModelSummaries": { - "description": "WatchModelSummaries " - "starts watching the " - "summary updates from " - "the cache.\n" - "Only models that the " - "user has access to are " - "returned.", - "properties": {"Result": {"$ref": "#/definitions/SummaryWatcherID"}}, - "type": "object", - }, - }, - "type": "object", - } @ReturnMapping(UserModelList) async def AllModels(self): diff --git a/juju/client/_client12.py b/juju/client/_client12.py index 28d06adfe..55624321b 100644 --- a/juju/client/_client12.py +++ b/juju/client/_client12.py @@ -8,835 +8,6 @@ class ControllerFacade(Type): name = "Controller" version = 12 - schema = { - "definitions": { - "AllWatcherId": { - "additionalProperties": False, - "properties": {"watcher-id": {"type": "string"}}, - "required": ["watcher-id"], - "type": "object", - }, - "CloudCredential": { - "additionalProperties": False, - "properties": { - "attrs": { - "patternProperties": {".*": {"type": "string"}}, - "type": "object", - }, - "auth-type": {"type": "string"}, - "redacted": {"items": {"type": "string"}, "type": "array"}, - }, - "required": ["auth-type"], - "type": "object", - }, - "CloudSpec": { - "additionalProperties": False, - "properties": { - "cacertificates": {"items": {"type": "string"}, "type": "array"}, - "credential": {"$ref": "#/definitions/CloudCredential"}, - "endpoint": {"type": "string"}, - "identity-endpoint": {"type": "string"}, - "is-controller-cloud": {"type": "boolean"}, - "name": {"type": "string"}, - "region": {"type": "string"}, - "skip-tls-verify": {"type": "boolean"}, - "storage-endpoint": {"type": "string"}, - "type": {"type": "string"}, - }, - "required": ["type", "name"], - "type": "object", - }, - "CloudSpecResult": { - "additionalProperties": False, - "properties": { - "error": {"$ref": "#/definitions/Error"}, - "result": {"$ref": "#/definitions/CloudSpec"}, - }, - "type": "object", - }, - "CloudSpecResults": { - "additionalProperties": False, - "properties": { - "results": { - "items": {"$ref": "#/definitions/CloudSpecResult"}, - "type": "array", - } - }, - "type": "object", - }, - "ControllerAPIInfoResult": { - "additionalProperties": False, - "properties": { - "addresses": {"items": {"type": "string"}, "type": "array"}, - "cacert": {"type": "string"}, - "error": {"$ref": "#/definitions/Error"}, - }, - "required": ["addresses", "cacert"], - "type": "object", - }, - "ControllerAPIInfoResults": { - "additionalProperties": False, - "properties": { - "results": { - "items": {"$ref": "#/definitions/ControllerAPIInfoResult"}, - "type": "array", - } - }, - "required": ["results"], - "type": "object", - }, - "ControllerConfigResult": { - "additionalProperties": False, - "properties": { - "config": { - "patternProperties": { - ".*": {"additionalProperties": True, "type": "object"} - }, - "type": "object", - } - }, - "required": ["config"], - "type": "object", - }, - "ControllerConfigSet": { - "additionalProperties": False, - "properties": { - "config": { - "patternProperties": { - ".*": {"additionalProperties": True, "type": "object"} - }, - "type": "object", - } - }, - "required": ["config"], - "type": "object", - }, - "ControllerVersionResults": { - "additionalProperties": False, - "properties": { - "git-commit": {"type": "string"}, - "version": {"type": "string"}, - }, - "required": ["version", "git-commit"], - "type": "object", - }, - "DashboardConnectionInfo": { - "additionalProperties": False, - "properties": { - "error": {"$ref": "#/definitions/Error"}, - "proxy-connection": {"$ref": "#/definitions/Proxy"}, - "ssh-connection": { - "$ref": "#/definitions/DashboardConnectionSSHTunnel" - }, - }, - "required": ["proxy-connection", "ssh-connection"], - "type": "object", - }, - "DashboardConnectionSSHTunnel": { - "additionalProperties": False, - "properties": { - "entity": {"type": "string"}, - "host": {"type": "string"}, - "model": {"type": "string"}, - "port": {"type": "string"}, - }, - "required": ["host", "port"], - "type": "object", - }, - "DestroyControllerArgs": { - "additionalProperties": False, - "properties": { - "destroy-models": {"type": "boolean"}, - "destroy-storage": {"type": "boolean"}, - "force": {"type": "boolean"}, - "max-wait": {"type": "integer"}, - "model-timeout": {"type": "integer"}, - }, - "required": ["destroy-models"], - "type": "object", - }, - "Entities": { - "additionalProperties": False, - "properties": { - "entities": { - "items": {"$ref": "#/definitions/Entity"}, - "type": "array", - } - }, - "required": ["entities"], - "type": "object", - }, - "Entity": { - "additionalProperties": False, - "properties": {"tag": {"type": "string"}}, - "required": ["tag"], - "type": "object", - }, - "Error": { - "additionalProperties": False, - "properties": { - "code": {"type": "string"}, - "info": { - "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", - }, - "HostedModelConfig": { - "additionalProperties": False, - "properties": { - "cloud-spec": {"$ref": "#/definitions/CloudSpec"}, - "config": { - "patternProperties": { - ".*": {"additionalProperties": True, "type": "object"} - }, - "type": "object", - }, - "error": {"$ref": "#/definitions/Error"}, - "name": {"type": "string"}, - "owner": {"type": "string"}, - }, - "required": ["name", "owner"], - "type": "object", - }, - "HostedModelConfigsResults": { - "additionalProperties": False, - "properties": { - "models": { - "items": {"$ref": "#/definitions/HostedModelConfig"}, - "type": "array", - } - }, - "required": ["models"], - "type": "object", - }, - "InitiateMigrationArgs": { - "additionalProperties": False, - "properties": { - "specs": { - "items": {"$ref": "#/definitions/MigrationSpec"}, - "type": "array", - } - }, - "required": ["specs"], - "type": "object", - }, - "InitiateMigrationResult": { - "additionalProperties": False, - "properties": { - "error": {"$ref": "#/definitions/Error"}, - "migration-id": {"type": "string"}, - "model-tag": {"type": "string"}, - }, - "required": ["model-tag", "migration-id"], - "type": "object", - }, - "InitiateMigrationResults": { - "additionalProperties": False, - "properties": { - "results": { - "items": {"$ref": "#/definitions/InitiateMigrationResult"}, - "type": "array", - } - }, - "required": ["results"], - "type": "object", - }, - "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", - }, - "MigrationSpec": { - "additionalProperties": False, - "properties": { - "model-tag": {"type": "string"}, - "target-info": {"$ref": "#/definitions/MigrationTargetInfo"}, - }, - "required": ["model-tag", "target-info"], - "type": "object", - }, - "MigrationTargetInfo": { - "additionalProperties": False, - "properties": { - "addrs": {"items": {"type": "string"}, "type": "array"}, - "auth-tag": {"type": "string"}, - "ca-cert": {"type": "string"}, - "controller-alias": {"type": "string"}, - "controller-tag": {"type": "string"}, - "macaroons": {"type": "string"}, - "password": {"type": "string"}, - }, - "required": ["controller-tag", "addrs", "ca-cert", "auth-tag"], - "type": "object", - }, - "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", - }, - "ModelBlockInfo": { - "additionalProperties": False, - "properties": { - "blocks": {"items": {"type": "string"}, "type": "array"}, - "model-uuid": {"type": "string"}, - "name": {"type": "string"}, - "owner-tag": {"type": "string"}, - }, - "required": ["name", "model-uuid", "owner-tag", "blocks"], - "type": "object", - }, - "ModelBlockInfoList": { - "additionalProperties": False, - "properties": { - "models": { - "items": {"$ref": "#/definitions/ModelBlockInfo"}, - "type": "array", - } - }, - "type": "object", - }, - "ModelFilesystemInfo": { - "additionalProperties": False, - "properties": { - "detachable": {"type": "boolean"}, - "id": {"type": "string"}, - "message": {"type": "string"}, - "provider-id": {"type": "string"}, - "status": {"type": "string"}, - }, - "required": ["id"], - "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", - }, - "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", - }, - "ModelTag": {"additionalProperties": False, "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", - }, - "ModifyControllerAccess": { - "additionalProperties": False, - "properties": { - "access": {"type": "string"}, - "action": {"type": "string"}, - "user-tag": {"type": "string"}, - }, - "required": ["user-tag", "action", "access"], - "type": "object", - }, - "ModifyControllerAccessRequest": { - "additionalProperties": False, - "properties": { - "changes": { - "items": {"$ref": "#/definitions/ModifyControllerAccess"}, - "type": "array", - } - }, - "required": ["changes"], - "type": "object", - }, - "NotifyWatchResult": { - "additionalProperties": False, - "properties": { - "NotifyWatcherId": {"type": "string"}, - "error": {"$ref": "#/definitions/Error"}, - }, - "required": ["NotifyWatcherId"], - "type": "object", - }, - "NotifyWatchResults": { - "additionalProperties": False, - "properties": { - "results": { - "items": {"$ref": "#/definitions/NotifyWatchResult"}, - "type": "array", - } - }, - "required": ["results"], - "type": "object", - }, - "Proxy": { - "additionalProperties": False, - "properties": { - "config": { - "patternProperties": { - ".*": {"additionalProperties": True, "type": "object"} - }, - "type": "object", - }, - "type": {"type": "string"}, - }, - "required": ["config", "type"], - "type": "object", - }, - "RemoveBlocksArgs": { - "additionalProperties": False, - "properties": {"all": {"type": "boolean"}}, - "required": ["all"], - "type": "object", - }, - "StringResult": { - "additionalProperties": False, - "properties": { - "error": {"$ref": "#/definitions/Error"}, - "result": {"type": "string"}, - }, - "required": ["result"], - "type": "object", - }, - "SummaryWatcherID": { - "additionalProperties": False, - "properties": {"watcher-id": {"type": "string"}}, - "required": ["watcher-id"], - "type": "object", - }, - "UserAccess": { - "additionalProperties": False, - "properties": { - "access": {"type": "string"}, - "user-tag": {"type": "string"}, - }, - "required": ["user-tag", "access"], - "type": "object", - }, - "UserAccessResult": { - "additionalProperties": False, - "properties": { - "error": {"$ref": "#/definitions/Error"}, - "result": {"$ref": "#/definitions/UserAccess"}, - }, - "type": "object", - }, - "UserAccessResults": { - "additionalProperties": False, - "properties": { - "results": { - "items": {"$ref": "#/definitions/UserAccessResult"}, - "type": "array", - } - }, - "type": "object", - }, - "UserModel": { - "additionalProperties": False, - "properties": { - "last-connection": {"format": "date-time", "type": "string"}, - "model": {"$ref": "#/definitions/Model"}, - }, - "required": ["model", "last-connection"], - "type": "object", - }, - "UserModelList": { - "additionalProperties": False, - "properties": { - "user-models": { - "items": {"$ref": "#/definitions/UserModel"}, - "type": "array", - } - }, - "required": ["user-models"], - "type": "object", - }, - }, - "properties": { - "AllModels": { - "description": "AllModels allows controller " - "administrators to get the list " - "of all the\n" - "models in the controller.", - "properties": {"Result": {"$ref": "#/definitions/UserModelList"}}, - "type": "object", - }, - "CloudSpec": { - "description": "CloudSpec returns the model's cloud spec.", - "properties": { - "Params": {"$ref": "#/definitions/Entities"}, - "Result": {"$ref": "#/definitions/CloudSpecResults"}, - }, - "type": "object", - }, - "ConfigSet": { - "description": "ConfigSet changes the value of " - "specified controller " - "configuration\n" - "settings. Only some settings can " - "be changed after bootstrap.\n" - "Settings that aren't specified " - "in the params are left " - "unchanged.", - "properties": {"Params": {"$ref": "#/definitions/ControllerConfigSet"}}, - "type": "object", - }, - "ControllerAPIInfoForModels": { - "description": "ControllerAPIInfoForModels " - "returns the " - "controller api " - "connection " - "details for the " - "specified " - "models.", - "properties": { - "Params": {"$ref": "#/definitions/Entities"}, - "Result": {"$ref": "#/definitions/ControllerAPIInfoResults"}, - }, - "type": "object", - }, - "ControllerConfig": { - "description": "ControllerConfig returns " - "the controller's " - "configuration.", - "properties": { - "Result": {"$ref": "#/definitions/ControllerConfigResult"} - }, - "type": "object", - }, - "ControllerVersion": { - "description": "ControllerVersion " - "returns the version " - "information associated " - "with this\n" - "controller binary.\n" - "\n" - "NOTE: the implementation " - "intentionally does not " - "check for " - "SuperuserAccess\n" - "as the Version is known " - "even to users with login " - "access.", - "properties": { - "Result": {"$ref": "#/definitions/ControllerVersionResults"} - }, - "type": "object", - }, - "DashboardConnectionInfo": { - "description": "DashboardConnectionInfo " - "returns the " - "connection " - "information for a " - "client to\n" - "connect to the " - "Juju Dashboard " - "including any " - "proxying " - "information.", - "properties": { - "Result": {"$ref": "#/definitions/DashboardConnectionInfo"} - }, - "type": "object", - }, - "DestroyController": { - "description": "DestroyController " - "destroys the " - "controller.\n" - "\n" - "If the args specify the " - "destruction of the " - "models, this method " - "will\n" - "attempt to do so. " - "Otherwise, if the " - "controller has any " - "non-empty,\n" - "non-Dead hosted models, " - "then an error with the " - "code\n" - "params.CodeHasHostedModels " - "will be transmitted.", - "properties": { - "Params": {"$ref": "#/definitions/DestroyControllerArgs"} - }, - "type": "object", - }, - "GetCloudSpec": { - "description": "GetCloudSpec constructs the " - "CloudSpec for a validated and " - "authorized model.", - "properties": { - "Params": {"$ref": "#/definitions/ModelTag"}, - "Result": {"$ref": "#/definitions/CloudSpecResult"}, - }, - "type": "object", - }, - "GetControllerAccess": { - "description": "GetControllerAccess " - "returns the level of " - "access the specified " - "users\n" - "have on the " - "controller.", - "properties": { - "Params": {"$ref": "#/definitions/Entities"}, - "Result": {"$ref": "#/definitions/UserAccessResults"}, - }, - "type": "object", - }, - "HostedModelConfigs": { - "description": "HostedModelConfigs " - "returns all the " - "information that the " - "client needs in\n" - "order to connect " - "directly with the host " - "model's provider and " - "destroy it\n" - "directly.", - "properties": { - "Result": {"$ref": "#/definitions/HostedModelConfigsResults"} - }, - "type": "object", - }, - "IdentityProviderURL": { - "description": "IdentityProviderURL " - "returns the URL of the " - "configured external " - "identity\n" - "provider for this " - "controller or an empty " - "string if no external " - "identity\n" - "provider has been " - "configured when the " - "controller was " - "bootstrapped.\n" - "\n" - "NOTE: the " - "implementation " - "intentionally does not " - "check for " - "SuperuserAccess\n" - "as the URL is known " - "even to users with " - "login access.", - "properties": {"Result": {"$ref": "#/definitions/StringResult"}}, - "type": "object", - }, - "InitiateMigration": { - "description": "InitiateMigration " - "attempts to begin the " - "migration of one or\n" - "more models to other " - "controllers.", - "properties": { - "Params": {"$ref": "#/definitions/InitiateMigrationArgs"}, - "Result": {"$ref": "#/definitions/InitiateMigrationResults"}, - }, - "type": "object", - }, - "ListBlockedModels": { - "description": "ListBlockedModels " - "returns a list of all " - "models on the " - "controller\n" - "which have a block in " - "place. The resulting " - "slice is sorted by " - "model\n" - "name, then owner. " - "Callers must be " - "controller " - "administrators to " - "retrieve the\n" - "list.", - "properties": {"Result": {"$ref": "#/definitions/ModelBlockInfoList"}}, - "type": "object", - }, - "ModelStatus": { - "description": "ModelStatus returns a summary of the model.", - "properties": { - "Params": {"$ref": "#/definitions/Entities"}, - "Result": {"$ref": "#/definitions/ModelStatusResults"}, - }, - "type": "object", - }, - "ModifyControllerAccess": { - "description": "ModifyControllerAccess " - "changes the model " - "access granted to " - "users.", - "properties": { - "Params": {"$ref": "#/definitions/ModifyControllerAccessRequest"}, - "Result": {"$ref": "#/definitions/ErrorResults"}, - }, - "type": "object", - }, - "MongoVersion": { - "description": "MongoVersion allows the " - "introspection of the mongo " - "version per controller", - "properties": {"Result": {"$ref": "#/definitions/StringResult"}}, - "type": "object", - }, - "RemoveBlocks": { - "description": "RemoveBlocks removes all the blocks in the controller.", - "properties": {"Params": {"$ref": "#/definitions/RemoveBlocksArgs"}}, - "type": "object", - }, - "WatchAllModelSummaries": { - "description": "WatchAllModelSummaries " - "starts watching the " - "summary updates " - "from the cache.\n" - "This method is " - "superuser access " - "only, and watches " - "all models in the\n" - "controller.", - "properties": {"Result": {"$ref": "#/definitions/SummaryWatcherID"}}, - "type": "object", - }, - "WatchAllModels": { - "description": "WatchAllModels starts " - "watching events for all " - "models in the\n" - "controller. The returned " - "AllWatcherId should be used " - "with Next on the\n" - "AllModelWatcher endpoint to " - "receive deltas.", - "properties": {"Result": {"$ref": "#/definitions/AllWatcherId"}}, - "type": "object", - }, - "WatchCloudSpecsChanges": { - "description": "WatchCloudSpecsChanges " - "returns a watcher " - "for cloud spec " - "changes.", - "properties": { - "Params": {"$ref": "#/definitions/Entities"}, - "Result": {"$ref": "#/definitions/NotifyWatchResults"}, - }, - "type": "object", - }, - "WatchModelSummaries": { - "description": "WatchModelSummaries " - "starts watching the " - "summary updates from " - "the cache.\n" - "Only models that the " - "user has access to are " - "returned.", - "properties": {"Result": {"$ref": "#/definitions/SummaryWatcherID"}}, - "type": "object", - }, - }, - "type": "object", - } @ReturnMapping(UserModelList) async def AllModels(self): diff --git a/juju/client/_client17.py b/juju/client/_client17.py index c4ecc5457..50ecbcf6d 100644 --- a/juju/client/_client17.py +++ b/juju/client/_client17.py @@ -8,1402 +8,6 @@ class ApplicationFacade(Type): name = "Application" version = 17 - schema = { - "definitions": { - "AddApplicationUnits": { - "additionalProperties": False, - "properties": { - "application": {"type": "string"}, - "attach-storage": {"items": {"type": "string"}, "type": "array"}, - "num-units": {"type": "integer"}, - "placement": { - "items": {"$ref": "#/definitions/Placement"}, - "type": "array", - }, - "policy": {"type": "string"}, - }, - "required": ["application", "num-units", "placement"], - "type": "object", - }, - "AddApplicationUnitsResults": { - "additionalProperties": False, - "properties": {"units": {"items": {"type": "string"}, "type": "array"}}, - "required": ["units"], - "type": "object", - }, - "AddRelation": { - "additionalProperties": False, - "properties": { - "endpoints": {"items": {"type": "string"}, "type": "array"}, - "via-cidrs": {"items": {"type": "string"}, "type": "array"}, - }, - "required": ["endpoints"], - "type": "object", - }, - "AddRelationResults": { - "additionalProperties": False, - "properties": { - "endpoints": { - "patternProperties": { - ".*": {"$ref": "#/definitions/CharmRelation"} - }, - "type": "object", - } - }, - "required": ["endpoints"], - "type": "object", - }, - "ApplicationCharmRelations": { - "additionalProperties": False, - "properties": {"application": {"type": "string"}}, - "required": ["application"], - "type": "object", - }, - "ApplicationCharmRelationsResults": { - "additionalProperties": False, - "properties": { - "charm-relations": {"items": {"type": "string"}, "type": "array"} - }, - "required": ["charm-relations"], - "type": "object", - }, - "ApplicationConfigUnsetArgs": { - "additionalProperties": False, - "properties": { - "Args": { - "items": {"$ref": "#/definitions/ApplicationUnset"}, - "type": "array", - } - }, - "required": ["Args"], - "type": "object", - }, - "ApplicationConstraint": { - "additionalProperties": False, - "properties": { - "constraints": {"$ref": "#/definitions/Value"}, - "error": {"$ref": "#/definitions/Error"}, - }, - "required": ["constraints"], - "type": "object", - }, - "ApplicationDeploy": { - "additionalProperties": False, - "properties": { - "Force": {"type": "boolean"}, - "application": {"type": "string"}, - "attach-storage": {"items": {"type": "string"}, "type": "array"}, - "channel": {"type": "string"}, - "charm-origin": {"$ref": "#/definitions/CharmOrigin"}, - "charm-url": {"type": "string"}, - "config": { - "patternProperties": {".*": {"type": "string"}}, - "type": "object", - }, - "config-yaml": {"type": "string"}, - "constraints": {"$ref": "#/definitions/Value"}, - "devices": { - "patternProperties": { - ".*": {"$ref": "#/definitions/Constraints"} - }, - "type": "object", - }, - "endpoint-bindings": { - "patternProperties": {".*": {"type": "string"}}, - "type": "object", - }, - "num-units": {"type": "integer"}, - "placement": { - "items": {"$ref": "#/definitions/Placement"}, - "type": "array", - }, - "policy": {"type": "string"}, - "resources": { - "patternProperties": {".*": {"type": "string"}}, - "type": "object", - }, - "storage": { - "patternProperties": { - ".*": {"$ref": "#/definitions/Constraints"} - }, - "type": "object", - }, - }, - "required": [ - "application", - "charm-url", - "channel", - "num-units", - "config-yaml", - "constraints", - "Force", - ], - "type": "object", - }, - "ApplicationExpose": { - "additionalProperties": False, - "properties": { - "application": {"type": "string"}, - "exposed-endpoints": { - "patternProperties": { - ".*": {"$ref": "#/definitions/ExposedEndpoint"} - }, - "type": "object", - }, - }, - "required": ["application"], - "type": "object", - }, - "ApplicationGet": { - "additionalProperties": False, - "properties": { - "application": {"type": "string"}, - "branch": {"type": "string"}, - }, - "required": ["application", "branch"], - "type": "object", - }, - "ApplicationGetArgs": { - "additionalProperties": False, - "properties": { - "args": { - "items": {"$ref": "#/definitions/ApplicationGet"}, - "type": "array", - } - }, - "required": ["args"], - "type": "object", - }, - "ApplicationGetConfigResults": { - "additionalProperties": False, - "properties": { - "Results": { - "items": {"$ref": "#/definitions/ConfigResult"}, - "type": "array", - } - }, - "required": ["Results"], - "type": "object", - }, - "ApplicationGetConstraintsResults": { - "additionalProperties": False, - "properties": { - "results": { - "items": {"$ref": "#/definitions/ApplicationConstraint"}, - "type": "array", - } - }, - "required": ["results"], - "type": "object", - }, - "ApplicationGetResults": { - "additionalProperties": False, - "properties": { - "application": {"type": "string"}, - "application-config": { - "patternProperties": { - ".*": {"additionalProperties": True, "type": "object"} - }, - "type": "object", - }, - "base": {"$ref": "#/definitions/Base"}, - "channel": {"type": "string"}, - "charm": {"type": "string"}, - "config": { - "patternProperties": { - ".*": {"additionalProperties": True, "type": "object"} - }, - "type": "object", - }, - "constraints": {"$ref": "#/definitions/Value"}, - "endpoint-bindings": { - "patternProperties": {".*": {"type": "string"}}, - "type": "object", - }, - }, - "required": [ - "application", - "charm", - "config", - "constraints", - "base", - "channel", - ], - "type": "object", - }, - "ApplicationInfoResult": { - "additionalProperties": False, - "properties": { - "error": {"$ref": "#/definitions/Error"}, - "result": {"$ref": "#/definitions/ApplicationResult"}, - }, - "type": "object", - }, - "ApplicationInfoResults": { - "additionalProperties": False, - "properties": { - "results": { - "items": {"$ref": "#/definitions/ApplicationInfoResult"}, - "type": "array", - } - }, - "required": ["results"], - "type": "object", - }, - "ApplicationMergeBindings": { - "additionalProperties": False, - "properties": { - "application-tag": {"type": "string"}, - "bindings": { - "patternProperties": {".*": {"type": "string"}}, - "type": "object", - }, - "force": {"type": "boolean"}, - }, - "required": ["application-tag", "bindings", "force"], - "type": "object", - }, - "ApplicationMergeBindingsArgs": { - "additionalProperties": False, - "properties": { - "args": { - "items": {"$ref": "#/definitions/ApplicationMergeBindings"}, - "type": "array", - } - }, - "required": ["args"], - "type": "object", - }, - "ApplicationMetricCredential": { - "additionalProperties": False, - "properties": { - "application": {"type": "string"}, - "metrics-credentials": { - "items": {"type": "integer"}, - "type": "array", - }, - }, - "required": ["application", "metrics-credentials"], - "type": "object", - }, - "ApplicationMetricCredentials": { - "additionalProperties": False, - "properties": { - "creds": { - "items": {"$ref": "#/definitions/ApplicationMetricCredential"}, - "type": "array", - } - }, - "required": ["creds"], - "type": "object", - }, - "ApplicationOfferDetails": { - "additionalProperties": False, - "properties": { - "application-description": {"type": "string"}, - "bindings": { - "patternProperties": {".*": {"type": "string"}}, - "type": "object", - }, - "endpoints": { - "items": {"$ref": "#/definitions/RemoteEndpoint"}, - "type": "array", - }, - "offer-name": {"type": "string"}, - "offer-url": {"type": "string"}, - "offer-uuid": {"type": "string"}, - "source-model-tag": {"type": "string"}, - "spaces": { - "items": {"$ref": "#/definitions/RemoteSpace"}, - "type": "array", - }, - "users": { - "items": {"$ref": "#/definitions/OfferUserDetails"}, - "type": "array", - }, - }, - "required": [ - "source-model-tag", - "offer-uuid", - "offer-url", - "offer-name", - "application-description", - ], - "type": "object", - }, - "ApplicationResult": { - "additionalProperties": False, - "properties": { - "base": {"$ref": "#/definitions/Base"}, - "channel": {"type": "string"}, - "charm": {"type": "string"}, - "constraints": {"$ref": "#/definitions/Value"}, - "endpoint-bindings": { - "patternProperties": {".*": {"type": "string"}}, - "type": "object", - }, - "exposed": {"type": "boolean"}, - "exposed-endpoints": { - "patternProperties": { - ".*": {"$ref": "#/definitions/ExposedEndpoint"} - }, - "type": "object", - }, - "life": {"type": "string"}, - "principal": {"type": "boolean"}, - "remote": {"type": "boolean"}, - "tag": {"type": "string"}, - }, - "required": ["tag", "principal", "exposed", "remote", "life"], - "type": "object", - }, - "ApplicationSetCharm": { - "additionalProperties": False, - "properties": { - "application": {"type": "string"}, - "channel": {"type": "string"}, - "charm-origin": {"$ref": "#/definitions/CharmOrigin"}, - "charm-url": {"type": "string"}, - "config-settings": { - "patternProperties": {".*": {"type": "string"}}, - "type": "object", - }, - "config-settings-yaml": {"type": "string"}, - "endpoint-bindings": { - "patternProperties": {".*": {"type": "string"}}, - "type": "object", - }, - "force": {"type": "boolean"}, - "force-base": {"type": "boolean"}, - "force-units": {"type": "boolean"}, - "generation": {"type": "string"}, - "resource-ids": { - "patternProperties": {".*": {"type": "string"}}, - "type": "object", - }, - "storage-constraints": { - "patternProperties": { - ".*": {"$ref": "#/definitions/StorageConstraints"} - }, - "type": "object", - }, - }, - "required": [ - "application", - "generation", - "charm-url", - "channel", - "force", - "force-units", - "force-base", - ], - "type": "object", - }, - "ApplicationUnexpose": { - "additionalProperties": False, - "properties": { - "application": {"type": "string"}, - "exposed-endpoints": {"items": {"type": "string"}, "type": "array"}, - }, - "required": ["application", "exposed-endpoints"], - "type": "object", - }, - "ApplicationUnset": { - "additionalProperties": False, - "properties": { - "application": {"type": "string"}, - "branch": {"type": "string"}, - "options": {"items": {"type": "string"}, "type": "array"}, - }, - "required": ["application", "branch", "options"], - "type": "object", - }, - "ApplicationsDeploy": { - "additionalProperties": False, - "properties": { - "applications": { - "items": {"$ref": "#/definitions/ApplicationDeploy"}, - "type": "array", - } - }, - "required": ["applications"], - "type": "object", - }, - "Base": { - "additionalProperties": False, - "properties": { - "channel": {"type": "string"}, - "name": {"type": "string"}, - }, - "required": ["name", "channel"], - "type": "object", - }, - "CharmOrigin": { - "additionalProperties": False, - "properties": { - "architecture": {"type": "string"}, - "base": {"$ref": "#/definitions/Base"}, - "branch": {"type": "string"}, - "hash": {"type": "string"}, - "id": {"type": "string"}, - "instance-key": {"type": "string"}, - "revision": {"type": "integer"}, - "risk": {"type": "string"}, - "source": {"type": "string"}, - "track": {"type": "string"}, - "type": {"type": "string"}, - }, - "required": ["source", "type", "id"], - "type": "object", - }, - "CharmRelation": { - "additionalProperties": False, - "properties": { - "interface": {"type": "string"}, - "limit": {"type": "integer"}, - "name": {"type": "string"}, - "optional": {"type": "boolean"}, - "role": {"type": "string"}, - "scope": {"type": "string"}, - }, - "required": ["name", "role", "interface", "optional", "limit", "scope"], - "type": "object", - }, - "CharmURLOriginResult": { - "additionalProperties": False, - "properties": { - "charm-origin": {"$ref": "#/definitions/CharmOrigin"}, - "error": {"$ref": "#/definitions/Error"}, - "url": {"type": "string"}, - }, - "required": ["url", "charm-origin"], - "type": "object", - }, - "ConfigResult": { - "additionalProperties": False, - "properties": { - "config": { - "patternProperties": { - ".*": {"additionalProperties": True, "type": "object"} - }, - "type": "object", - }, - "error": {"$ref": "#/definitions/Error"}, - }, - "required": ["config"], - "type": "object", - }, - "ConfigSet": { - "additionalProperties": False, - "properties": { - "application": {"type": "string"}, - "config": { - "patternProperties": {".*": {"type": "string"}}, - "type": "object", - }, - "config-yaml": {"type": "string"}, - "generation": {"type": "string"}, - }, - "required": ["application", "generation", "config", "config-yaml"], - "type": "object", - }, - "ConfigSetArgs": { - "additionalProperties": False, - "properties": { - "Args": { - "items": {"$ref": "#/definitions/ConfigSet"}, - "type": "array", - } - }, - "required": ["Args"], - "type": "object", - }, - "Constraints": { - "additionalProperties": False, - "properties": { - "Count": {"type": "integer"}, - "Pool": {"type": "string"}, - "Size": {"type": "integer"}, - }, - "required": ["Pool", "Size", "Count"], - "type": "object", - }, - "ConsumeApplicationArg": { - "additionalProperties": False, - "properties": { - "ApplicationOfferDetails": { - "$ref": "#/definitions/ApplicationOfferDetails" - }, - "application-alias": {"type": "string"}, - "application-description": {"type": "string"}, - "bindings": { - "patternProperties": {".*": {"type": "string"}}, - "type": "object", - }, - "endpoints": { - "items": {"$ref": "#/definitions/RemoteEndpoint"}, - "type": "array", - }, - "external-controller": { - "$ref": "#/definitions/ExternalControllerInfo" - }, - "macaroon": {"$ref": "#/definitions/Macaroon"}, - "offer-name": {"type": "string"}, - "offer-url": {"type": "string"}, - "offer-uuid": {"type": "string"}, - "source-model-tag": {"type": "string"}, - "spaces": { - "items": {"$ref": "#/definitions/RemoteSpace"}, - "type": "array", - }, - "users": { - "items": {"$ref": "#/definitions/OfferUserDetails"}, - "type": "array", - }, - }, - "required": [ - "source-model-tag", - "offer-uuid", - "offer-url", - "offer-name", - "application-description", - "ApplicationOfferDetails", - ], - "type": "object", - }, - "ConsumeApplicationArgs": { - "additionalProperties": False, - "properties": { - "args": { - "items": {"$ref": "#/definitions/ConsumeApplicationArg"}, - "type": "array", - } - }, - "type": "object", - }, - "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", - }, - "Placement": { - "additionalProperties": False, - "properties": { - "directive": {"type": "string"}, - "scope": {"type": "string"}, - }, - "required": ["scope", "directive"], - "type": "object", - }, - "RelationData": { - "additionalProperties": False, - "properties": { - "InScope": {"type": "boolean"}, - "UnitData": { - "patternProperties": { - ".*": {"additionalProperties": True, "type": "object"} - }, - "type": "object", - }, - }, - "required": ["InScope", "UnitData"], - "type": "object", - }, - "RelationSuspendedArg": { - "additionalProperties": False, - "properties": { - "message": {"type": "string"}, - "relation-id": {"type": "integer"}, - "suspended": {"type": "boolean"}, - }, - "required": ["relation-id", "message", "suspended"], - "type": "object", - }, - "RelationSuspendedArgs": { - "additionalProperties": False, - "properties": { - "args": { - "items": {"$ref": "#/definitions/RelationSuspendedArg"}, - "type": "array", - } - }, - "required": ["args"], - "type": "object", - }, - "RemoteEndpoint": { - "additionalProperties": False, - "properties": { - "interface": {"type": "string"}, - "limit": {"type": "integer"}, - "name": {"type": "string"}, - "role": {"type": "string"}, - }, - "required": ["name", "role", "interface", "limit"], - "type": "object", - }, - "RemoteSpace": { - "additionalProperties": False, - "properties": { - "cloud-type": {"type": "string"}, - "name": {"type": "string"}, - "provider-attributes": { - "patternProperties": { - ".*": {"additionalProperties": True, "type": "object"} - }, - "type": "object", - }, - "provider-id": {"type": "string"}, - "subnets": { - "items": {"$ref": "#/definitions/Subnet"}, - "type": "array", - }, - }, - "required": [ - "cloud-type", - "name", - "provider-id", - "provider-attributes", - "subnets", - ], - "type": "object", - }, - "ScaleApplicationInfo": { - "additionalProperties": False, - "properties": {"num-units": {"type": "integer"}}, - "required": ["num-units"], - "type": "object", - }, - "ScaleApplicationParams": { - "additionalProperties": False, - "properties": { - "application-tag": {"type": "string"}, - "force": {"type": "boolean"}, - "scale": {"type": "integer"}, - "scale-change": {"type": "integer"}, - }, - "required": ["application-tag", "scale", "force"], - "type": "object", - }, - "ScaleApplicationResult": { - "additionalProperties": False, - "properties": { - "error": {"$ref": "#/definitions/Error"}, - "info": {"$ref": "#/definitions/ScaleApplicationInfo"}, - }, - "type": "object", - }, - "ScaleApplicationResults": { - "additionalProperties": False, - "properties": { - "results": { - "items": {"$ref": "#/definitions/ScaleApplicationResult"}, - "type": "array", - } - }, - "type": "object", - }, - "ScaleApplicationsParams": { - "additionalProperties": False, - "properties": { - "applications": { - "items": {"$ref": "#/definitions/ScaleApplicationParams"}, - "type": "array", - } - }, - "required": ["applications"], - "type": "object", - }, - "SetConstraints": { - "additionalProperties": False, - "properties": { - "application": {"type": "string"}, - "constraints": {"$ref": "#/definitions/Value"}, - }, - "required": ["application", "constraints"], - "type": "object", - }, - "StorageConstraints": { - "additionalProperties": False, - "properties": { - "count": {"type": "integer"}, - "pool": {"type": "string"}, - "size": {"type": "integer"}, - }, - "type": "object", - }, - "StringResult": { - "additionalProperties": False, - "properties": { - "error": {"$ref": "#/definitions/Error"}, - "result": {"type": "string"}, - }, - "required": ["result"], - "type": "object", - }, - "Subnet": { - "additionalProperties": False, - "properties": { - "cidr": {"type": "string"}, - "life": {"type": "string"}, - "provider-id": {"type": "string"}, - "provider-network-id": {"type": "string"}, - "provider-space-id": {"type": "string"}, - "space-tag": {"type": "string"}, - "status": {"type": "string"}, - "vlan-tag": {"type": "integer"}, - "zones": {"items": {"type": "string"}, "type": "array"}, - }, - "required": ["cidr", "vlan-tag", "life", "space-tag", "zones"], - "type": "object", - }, - "UnitInfoResult": { - "additionalProperties": False, - "properties": { - "error": {"$ref": "#/definitions/Error"}, - "result": {"$ref": "#/definitions/UnitResult"}, - }, - "type": "object", - }, - "UnitInfoResults": { - "additionalProperties": False, - "properties": { - "results": { - "items": {"$ref": "#/definitions/UnitInfoResult"}, - "type": "array", - } - }, - "required": ["results"], - "type": "object", - }, - "UnitResult": { - "additionalProperties": False, - "properties": { - "address": {"type": "string"}, - "charm": {"type": "string"}, - "leader": {"type": "boolean"}, - "life": {"type": "string"}, - "machine": {"type": "string"}, - "opened-ports": {"items": {"type": "string"}, "type": "array"}, - "provider-id": {"type": "string"}, - "public-address": {"type": "string"}, - "relation-data": { - "items": {"$ref": "#/definitions/EndpointRelationData"}, - "type": "array", - }, - "tag": {"type": "string"}, - "workload-version": {"type": "string"}, - }, - "required": ["tag", "workload-version", "opened-ports", "charm"], - "type": "object", - }, - "UnitsResolved": { - "additionalProperties": False, - "properties": { - "all": {"type": "boolean"}, - "retry": {"type": "boolean"}, - "tags": {"$ref": "#/definitions/Entities"}, - }, - "type": "object", - }, - "UpdateChannelArg": { - "additionalProperties": False, - "properties": { - "channel": {"type": "string"}, - "force": {"type": "boolean"}, - "tag": {"$ref": "#/definitions/Entity"}, - }, - "required": ["tag", "force", "channel"], - "type": "object", - }, - "UpdateChannelArgs": { - "additionalProperties": False, - "properties": { - "args": { - "items": {"$ref": "#/definitions/UpdateChannelArg"}, - "type": "array", - } - }, - "required": ["args"], - "type": "object", - }, - "Value": { - "additionalProperties": False, - "properties": { - "allocate-public-ip": {"type": "boolean"}, - "arch": {"type": "string"}, - "container": {"type": "string"}, - "cores": {"type": "integer"}, - "cpu-power": {"type": "integer"}, - "instance-role": {"type": "string"}, - "instance-type": {"type": "string"}, - "mem": {"type": "integer"}, - "root-disk": {"type": "integer"}, - "root-disk-source": {"type": "string"}, - "spaces": {"items": {"type": "string"}, "type": "array"}, - "tags": {"items": {"type": "string"}, "type": "array"}, - "virt-type": {"type": "string"}, - "zones": {"items": {"type": "string"}, "type": "array"}, - }, - "type": "object", - }, - }, - "properties": { - "AddRelation": { - "description": "AddRelation adds a relation " - "between the specified " - "endpoints and returns the " - "relation info.", - "properties": { - "Params": {"$ref": "#/definitions/AddRelation"}, - "Result": {"$ref": "#/definitions/AddRelationResults"}, - }, - "type": "object", - }, - "AddUnits": { - "description": "AddUnits adds a given number of " - "units to an application.", - "properties": { - "Params": {"$ref": "#/definitions/AddApplicationUnits"}, - "Result": {"$ref": "#/definitions/AddApplicationUnitsResults"}, - }, - "type": "object", - }, - "ApplicationsInfo": { - "description": "ApplicationsInfo returns applications information.", - "properties": { - "Params": {"$ref": "#/definitions/Entities"}, - "Result": {"$ref": "#/definitions/ApplicationInfoResults"}, - }, - "type": "object", - }, - "CharmConfig": { - "description": "CharmConfig returns charm " - "config for the input list of " - "applications and\n" - "model generations.", - "properties": { - "Params": {"$ref": "#/definitions/ApplicationGetArgs"}, - "Result": {"$ref": "#/definitions/ApplicationGetConfigResults"}, - }, - "type": "object", - }, - "CharmRelations": { - "description": "CharmRelations implements " - "the server side of " - "Application.CharmRelations.", - "properties": { - "Params": {"$ref": "#/definitions/ApplicationCharmRelations"}, - "Result": { - "$ref": "#/definitions/ApplicationCharmRelationsResults" - }, - }, - "type": "object", - }, - "Consume": { - "description": "Consume adds remote applications " - "to the model without creating any\n" - "relations.", - "properties": { - "Params": {"$ref": "#/definitions/ConsumeApplicationArgs"}, - "Result": {"$ref": "#/definitions/ErrorResults"}, - }, - "type": "object", - }, - "Deploy": { - "description": "Deploy fetches the charms from the " - "charm store and deploys them\n" - "using the specified placement " - "directives.", - "properties": { - "Params": {"$ref": "#/definitions/ApplicationsDeploy"}, - "Result": {"$ref": "#/definitions/ErrorResults"}, - }, - "type": "object", - }, - "DestroyApplication": { - "description": "DestroyApplication " - "removes a given set of " - "applications.", - "properties": { - "Params": {"$ref": "#/definitions/DestroyApplicationsParams"}, - "Result": {"$ref": "#/definitions/DestroyApplicationResults"}, - }, - "type": "object", - }, - "DestroyConsumedApplications": { - "description": "DestroyConsumedApplications " - "removes a " - "given set of " - "consumed " - "(remote) " - "applications.", - "properties": { - "Params": { - "$ref": "#/definitions/DestroyConsumedApplicationsParams" - }, - "Result": {"$ref": "#/definitions/ErrorResults"}, - }, - "type": "object", - }, - "DestroyRelation": { - "description": "DestroyRelation removes " - "the relation between the\n" - "specified endpoints or an " - "id.", - "properties": {"Params": {"$ref": "#/definitions/DestroyRelation"}}, - "type": "object", - }, - "DestroyUnit": { - "description": "DestroyUnit removes a given set of application units.", - "properties": { - "Params": {"$ref": "#/definitions/DestroyUnitsParams"}, - "Result": {"$ref": "#/definitions/DestroyUnitResults"}, - }, - "type": "object", - }, - "Expose": { - "description": "Expose changes the juju-managed " - "firewall to expose any ports that\n" - "were also explicitly marked by " - "units as open.", - "properties": {"Params": {"$ref": "#/definitions/ApplicationExpose"}}, - "type": "object", - }, - "Get": { - "description": "Get returns the charm configuration " - "for an application.", - "properties": { - "Params": {"$ref": "#/definitions/ApplicationGet"}, - "Result": {"$ref": "#/definitions/ApplicationGetResults"}, - }, - "type": "object", - }, - "GetCharmURLOrigin": { - "description": "GetCharmURLOrigin " - "returns the charm URL " - "and charm origin the " - "given\n" - "application is running " - "at present.", - "properties": { - "Params": {"$ref": "#/definitions/ApplicationGet"}, - "Result": {"$ref": "#/definitions/CharmURLOriginResult"}, - }, - "type": "object", - }, - "GetConfig": { - "description": "GetConfig returns the charm " - "config for each of the input " - "applications.", - "properties": { - "Params": {"$ref": "#/definitions/Entities"}, - "Result": {"$ref": "#/definitions/ApplicationGetConfigResults"}, - }, - "type": "object", - }, - "GetConstraints": { - "description": "GetConstraints returns the " - "constraints for a given " - "application.", - "properties": { - "Params": {"$ref": "#/definitions/Entities"}, - "Result": { - "$ref": "#/definitions/ApplicationGetConstraintsResults" - }, - }, - "type": "object", - }, - "Leader": { - "description": "Leader returns the unit name of the " - "leader for the given application.", - "properties": { - "Params": {"$ref": "#/definitions/Entity"}, - "Result": {"$ref": "#/definitions/StringResult"}, - }, - "type": "object", - }, - "MergeBindings": { - "description": "MergeBindings merges " - "operator-defined bindings " - "with the current bindings " - "for\n" - "one or more applications.", - "properties": { - "Params": {"$ref": "#/definitions/ApplicationMergeBindingsArgs"}, - "Result": {"$ref": "#/definitions/ErrorResults"}, - }, - "type": "object", - }, - "ResolveUnitErrors": { - "description": "ResolveUnitErrors marks " - "errors on the specified " - "units as resolved.", - "properties": { - "Params": {"$ref": "#/definitions/UnitsResolved"}, - "Result": {"$ref": "#/definitions/ErrorResults"}, - }, - "type": "object", - }, - "ScaleApplications": { - "description": "ScaleApplications scales " - "the specified " - "application to the " - "requested number of " - "units.", - "properties": { - "Params": {"$ref": "#/definitions/ScaleApplicationsParams"}, - "Result": {"$ref": "#/definitions/ScaleApplicationResults"}, - }, - "type": "object", - }, - "SetCharm": { - "description": "SetCharm sets the charm for a " - "given for the application.", - "properties": {"Params": {"$ref": "#/definitions/ApplicationSetCharm"}}, - "type": "object", - }, - "SetConfigs": { - "description": "SetConfigs implements the " - "server side of " - "Application.SetConfig. Both\n" - "application and charm config " - "are set. It does not unset " - "values in\n" - "Config map that are set to an " - "empty string. Unset should be " - "used for that.", - "properties": { - "Params": {"$ref": "#/definitions/ConfigSetArgs"}, - "Result": {"$ref": "#/definitions/ErrorResults"}, - }, - "type": "object", - }, - "SetConstraints": { - "description": "SetConstraints sets the " - "constraints for a given " - "application.", - "properties": {"Params": {"$ref": "#/definitions/SetConstraints"}}, - "type": "object", - }, - "SetMetricCredentials": { - "description": "SetMetricCredentials " - "sets credentials on " - "the application.", - "properties": { - "Params": {"$ref": "#/definitions/ApplicationMetricCredentials"}, - "Result": {"$ref": "#/definitions/ErrorResults"}, - }, - "type": "object", - }, - "SetRelationsSuspended": { - "description": "SetRelationsSuspended " - "sets the suspended " - "status of the " - "specified relations.", - "properties": { - "Params": {"$ref": "#/definitions/RelationSuspendedArgs"}, - "Result": {"$ref": "#/definitions/ErrorResults"}, - }, - "type": "object", - }, - "Unexpose": { - "description": "Unexpose changes the juju-managed " - "firewall to unexpose any ports " - "that\n" - "were also explicitly marked by " - "units as open.", - "properties": {"Params": {"$ref": "#/definitions/ApplicationUnexpose"}}, - "type": "object", - }, - "UnitsInfo": { - "description": "UnitsInfo returns unit " - "information for the given " - "entities (units or\n" - "applications).", - "properties": { - "Params": {"$ref": "#/definitions/Entities"}, - "Result": {"$ref": "#/definitions/UnitInfoResults"}, - }, - "type": "object", - }, - "UnsetApplicationsConfig": { - "description": "UnsetApplicationsConfig " - "implements the " - "server side of " - "Application.UnsetApplicationsConfig.", - "properties": { - "Params": {"$ref": "#/definitions/ApplicationConfigUnsetArgs"}, - "Result": {"$ref": "#/definitions/ErrorResults"}, - }, - "type": "object", - }, - "UpdateApplicationBase": { - "description": "UpdateApplicationBase " - "updates the " - "application base.\n" - "Base for " - "subordinates is " - "updated too.", - "properties": { - "Params": {"$ref": "#/definitions/UpdateChannelArgs"}, - "Result": {"$ref": "#/definitions/ErrorResults"}, - }, - "type": "object", - }, - }, - "type": "object", - } @ReturnMapping(AddRelationResults) async def AddRelation(self, endpoints=None, via_cidrs=None): diff --git a/juju/client/_client19.py b/juju/client/_client19.py index f5e3535a6..6437cccdb 100644 --- a/juju/client/_client19.py +++ b/juju/client/_client19.py @@ -8,1551 +8,6 @@ class ApplicationFacade(Type): name = "Application" version = 19 - schema = { - "definitions": { - "AddApplicationUnits": { - "additionalProperties": False, - "properties": { - "application": {"type": "string"}, - "attach-storage": {"items": {"type": "string"}, "type": "array"}, - "num-units": {"type": "integer"}, - "placement": { - "items": {"$ref": "#/definitions/Placement"}, - "type": "array", - }, - "policy": {"type": "string"}, - }, - "required": ["application", "num-units", "placement"], - "type": "object", - }, - "AddApplicationUnitsResults": { - "additionalProperties": False, - "properties": {"units": {"items": {"type": "string"}, "type": "array"}}, - "required": ["units"], - "type": "object", - }, - "AddRelation": { - "additionalProperties": False, - "properties": { - "endpoints": {"items": {"type": "string"}, "type": "array"}, - "via-cidrs": {"items": {"type": "string"}, "type": "array"}, - }, - "required": ["endpoints"], - "type": "object", - }, - "AddRelationResults": { - "additionalProperties": False, - "properties": { - "endpoints": { - "patternProperties": { - ".*": {"$ref": "#/definitions/CharmRelation"} - }, - "type": "object", - } - }, - "required": ["endpoints"], - "type": "object", - }, - "ApplicationCharmRelations": { - "additionalProperties": False, - "properties": {"application": {"type": "string"}}, - "required": ["application"], - "type": "object", - }, - "ApplicationCharmRelationsResults": { - "additionalProperties": False, - "properties": { - "charm-relations": {"items": {"type": "string"}, "type": "array"} - }, - "required": ["charm-relations"], - "type": "object", - }, - "ApplicationConfigUnsetArgs": { - "additionalProperties": False, - "properties": { - "Args": { - "items": {"$ref": "#/definitions/ApplicationUnset"}, - "type": "array", - } - }, - "required": ["Args"], - "type": "object", - }, - "ApplicationConstraint": { - "additionalProperties": False, - "properties": { - "constraints": {"$ref": "#/definitions/Value"}, - "error": {"$ref": "#/definitions/Error"}, - }, - "required": ["constraints"], - "type": "object", - }, - "ApplicationDeploy": { - "additionalProperties": False, - "properties": { - "Force": {"type": "boolean"}, - "application": {"type": "string"}, - "attach-storage": {"items": {"type": "string"}, "type": "array"}, - "channel": {"type": "string"}, - "charm-origin": {"$ref": "#/definitions/CharmOrigin"}, - "charm-url": {"type": "string"}, - "config": { - "patternProperties": {".*": {"type": "string"}}, - "type": "object", - }, - "config-yaml": {"type": "string"}, - "constraints": {"$ref": "#/definitions/Value"}, - "devices": { - "patternProperties": { - ".*": {"$ref": "#/definitions/Constraints"} - }, - "type": "object", - }, - "endpoint-bindings": { - "patternProperties": {".*": {"type": "string"}}, - "type": "object", - }, - "num-units": {"type": "integer"}, - "placement": { - "items": {"$ref": "#/definitions/Placement"}, - "type": "array", - }, - "policy": {"type": "string"}, - "resources": { - "patternProperties": {".*": {"type": "string"}}, - "type": "object", - }, - "storage": { - "patternProperties": { - ".*": {"$ref": "#/definitions/Constraints"} - }, - "type": "object", - }, - }, - "required": [ - "application", - "charm-url", - "channel", - "num-units", - "config-yaml", - "constraints", - "Force", - ], - "type": "object", - }, - "ApplicationExpose": { - "additionalProperties": False, - "properties": { - "application": {"type": "string"}, - "exposed-endpoints": { - "patternProperties": { - ".*": {"$ref": "#/definitions/ExposedEndpoint"} - }, - "type": "object", - }, - }, - "required": ["application"], - "type": "object", - }, - "ApplicationGet": { - "additionalProperties": False, - "properties": { - "application": {"type": "string"}, - "branch": {"type": "string"}, - }, - "required": ["application", "branch"], - "type": "object", - }, - "ApplicationGetArgs": { - "additionalProperties": False, - "properties": { - "args": { - "items": {"$ref": "#/definitions/ApplicationGet"}, - "type": "array", - } - }, - "required": ["args"], - "type": "object", - }, - "ApplicationGetConfigResults": { - "additionalProperties": False, - "properties": { - "Results": { - "items": {"$ref": "#/definitions/ConfigResult"}, - "type": "array", - } - }, - "required": ["Results"], - "type": "object", - }, - "ApplicationGetConstraintsResults": { - "additionalProperties": False, - "properties": { - "results": { - "items": {"$ref": "#/definitions/ApplicationConstraint"}, - "type": "array", - } - }, - "required": ["results"], - "type": "object", - }, - "ApplicationGetResults": { - "additionalProperties": False, - "properties": { - "application": {"type": "string"}, - "application-config": { - "patternProperties": { - ".*": {"additionalProperties": True, "type": "object"} - }, - "type": "object", - }, - "base": {"$ref": "#/definitions/Base"}, - "channel": {"type": "string"}, - "charm": {"type": "string"}, - "config": { - "patternProperties": { - ".*": {"additionalProperties": True, "type": "object"} - }, - "type": "object", - }, - "constraints": {"$ref": "#/definitions/Value"}, - "endpoint-bindings": { - "patternProperties": {".*": {"type": "string"}}, - "type": "object", - }, - }, - "required": [ - "application", - "charm", - "config", - "constraints", - "base", - "channel", - ], - "type": "object", - }, - "ApplicationInfoResult": { - "additionalProperties": False, - "properties": { - "error": {"$ref": "#/definitions/Error"}, - "result": {"$ref": "#/definitions/ApplicationResult"}, - }, - "type": "object", - }, - "ApplicationInfoResults": { - "additionalProperties": False, - "properties": { - "results": { - "items": {"$ref": "#/definitions/ApplicationInfoResult"}, - "type": "array", - } - }, - "required": ["results"], - "type": "object", - }, - "ApplicationMergeBindings": { - "additionalProperties": False, - "properties": { - "application-tag": {"type": "string"}, - "bindings": { - "patternProperties": {".*": {"type": "string"}}, - "type": "object", - }, - "force": {"type": "boolean"}, - }, - "required": ["application-tag", "bindings", "force"], - "type": "object", - }, - "ApplicationMergeBindingsArgs": { - "additionalProperties": False, - "properties": { - "args": { - "items": {"$ref": "#/definitions/ApplicationMergeBindings"}, - "type": "array", - } - }, - "required": ["args"], - "type": "object", - }, - "ApplicationMetricCredential": { - "additionalProperties": False, - "properties": { - "application": {"type": "string"}, - "metrics-credentials": { - "items": {"type": "integer"}, - "type": "array", - }, - }, - "required": ["application", "metrics-credentials"], - "type": "object", - }, - "ApplicationMetricCredentials": { - "additionalProperties": False, - "properties": { - "creds": { - "items": {"$ref": "#/definitions/ApplicationMetricCredential"}, - "type": "array", - } - }, - "required": ["creds"], - "type": "object", - }, - "ApplicationOfferDetails": { - "additionalProperties": False, - "properties": { - "application-description": {"type": "string"}, - "bindings": { - "patternProperties": {".*": {"type": "string"}}, - "type": "object", - }, - "endpoints": { - "items": {"$ref": "#/definitions/RemoteEndpoint"}, - "type": "array", - }, - "offer-name": {"type": "string"}, - "offer-url": {"type": "string"}, - "offer-uuid": {"type": "string"}, - "source-model-tag": {"type": "string"}, - "spaces": { - "items": {"$ref": "#/definitions/RemoteSpace"}, - "type": "array", - }, - "users": { - "items": {"$ref": "#/definitions/OfferUserDetails"}, - "type": "array", - }, - }, - "required": [ - "source-model-tag", - "offer-uuid", - "offer-url", - "offer-name", - "application-description", - ], - "type": "object", - }, - "ApplicationResult": { - "additionalProperties": False, - "properties": { - "base": {"$ref": "#/definitions/Base"}, - "channel": {"type": "string"}, - "charm": {"type": "string"}, - "constraints": {"$ref": "#/definitions/Value"}, - "endpoint-bindings": { - "patternProperties": {".*": {"type": "string"}}, - "type": "object", - }, - "exposed": {"type": "boolean"}, - "exposed-endpoints": { - "patternProperties": { - ".*": {"$ref": "#/definitions/ExposedEndpoint"} - }, - "type": "object", - }, - "life": {"type": "string"}, - "principal": {"type": "boolean"}, - "remote": {"type": "boolean"}, - "tag": {"type": "string"}, - }, - "required": ["tag", "principal", "exposed", "remote", "life"], - "type": "object", - }, - "ApplicationSetCharm": { - "additionalProperties": False, - "properties": { - "application": {"type": "string"}, - "channel": {"type": "string"}, - "charm-origin": {"$ref": "#/definitions/CharmOrigin"}, - "charm-url": {"type": "string"}, - "config-settings": { - "patternProperties": {".*": {"type": "string"}}, - "type": "object", - }, - "config-settings-yaml": {"type": "string"}, - "endpoint-bindings": { - "patternProperties": {".*": {"type": "string"}}, - "type": "object", - }, - "force": {"type": "boolean"}, - "force-base": {"type": "boolean"}, - "force-units": {"type": "boolean"}, - "generation": {"type": "string"}, - "resource-ids": { - "patternProperties": {".*": {"type": "string"}}, - "type": "object", - }, - "storage-constraints": { - "patternProperties": { - ".*": {"$ref": "#/definitions/StorageConstraints"} - }, - "type": "object", - }, - }, - "required": [ - "application", - "generation", - "charm-url", - "channel", - "force", - "force-units", - "force-base", - ], - "type": "object", - }, - "ApplicationUnexpose": { - "additionalProperties": False, - "properties": { - "application": {"type": "string"}, - "exposed-endpoints": {"items": {"type": "string"}, "type": "array"}, - }, - "required": ["application", "exposed-endpoints"], - "type": "object", - }, - "ApplicationUnset": { - "additionalProperties": False, - "properties": { - "application": {"type": "string"}, - "branch": {"type": "string"}, - "options": {"items": {"type": "string"}, "type": "array"}, - }, - "required": ["application", "branch", "options"], - "type": "object", - }, - "ApplicationsDeploy": { - "additionalProperties": False, - "properties": { - "applications": { - "items": {"$ref": "#/definitions/ApplicationDeploy"}, - "type": "array", - } - }, - "required": ["applications"], - "type": "object", - }, - "Base": { - "additionalProperties": False, - "properties": { - "channel": {"type": "string"}, - "name": {"type": "string"}, - }, - "required": ["name", "channel"], - "type": "object", - }, - "CharmOrigin": { - "additionalProperties": False, - "properties": { - "architecture": {"type": "string"}, - "base": {"$ref": "#/definitions/Base"}, - "branch": {"type": "string"}, - "hash": {"type": "string"}, - "id": {"type": "string"}, - "instance-key": {"type": "string"}, - "revision": {"type": "integer"}, - "risk": {"type": "string"}, - "source": {"type": "string"}, - "track": {"type": "string"}, - "type": {"type": "string"}, - }, - "required": ["source", "type", "id"], - "type": "object", - }, - "CharmRelation": { - "additionalProperties": False, - "properties": { - "interface": {"type": "string"}, - "limit": {"type": "integer"}, - "name": {"type": "string"}, - "optional": {"type": "boolean"}, - "role": {"type": "string"}, - "scope": {"type": "string"}, - }, - "required": ["name", "role", "interface", "optional", "limit", "scope"], - "type": "object", - }, - "CharmURLOriginResult": { - "additionalProperties": False, - "properties": { - "charm-origin": {"$ref": "#/definitions/CharmOrigin"}, - "error": {"$ref": "#/definitions/Error"}, - "url": {"type": "string"}, - }, - "required": ["url", "charm-origin"], - "type": "object", - }, - "ConfigResult": { - "additionalProperties": False, - "properties": { - "config": { - "patternProperties": { - ".*": {"additionalProperties": True, "type": "object"} - }, - "type": "object", - }, - "error": {"$ref": "#/definitions/Error"}, - }, - "required": ["config"], - "type": "object", - }, - "ConfigSet": { - "additionalProperties": False, - "properties": { - "application": {"type": "string"}, - "config": { - "patternProperties": {".*": {"type": "string"}}, - "type": "object", - }, - "config-yaml": {"type": "string"}, - "generation": {"type": "string"}, - }, - "required": ["application", "generation", "config", "config-yaml"], - "type": "object", - }, - "ConfigSetArgs": { - "additionalProperties": False, - "properties": { - "Args": { - "items": {"$ref": "#/definitions/ConfigSet"}, - "type": "array", - } - }, - "required": ["Args"], - "type": "object", - }, - "Constraints": { - "additionalProperties": False, - "properties": { - "Count": {"type": "integer"}, - "Pool": {"type": "string"}, - "Size": {"type": "integer"}, - }, - "required": ["Pool", "Size", "Count"], - "type": "object", - }, - "ConsumeApplicationArg": { - "additionalProperties": False, - "properties": { - "ApplicationOfferDetails": { - "$ref": "#/definitions/ApplicationOfferDetails" - }, - "application-alias": {"type": "string"}, - "application-description": {"type": "string"}, - "bindings": { - "patternProperties": {".*": {"type": "string"}}, - "type": "object", - }, - "endpoints": { - "items": {"$ref": "#/definitions/RemoteEndpoint"}, - "type": "array", - }, - "external-controller": { - "$ref": "#/definitions/ExternalControllerInfo" - }, - "macaroon": {"$ref": "#/definitions/Macaroon"}, - "offer-name": {"type": "string"}, - "offer-url": {"type": "string"}, - "offer-uuid": {"type": "string"}, - "source-model-tag": {"type": "string"}, - "spaces": { - "items": {"$ref": "#/definitions/RemoteSpace"}, - "type": "array", - }, - "users": { - "items": {"$ref": "#/definitions/OfferUserDetails"}, - "type": "array", - }, - }, - "required": [ - "source-model-tag", - "offer-uuid", - "offer-url", - "offer-name", - "application-description", - "ApplicationOfferDetails", - ], - "type": "object", - }, - "ConsumeApplicationArgs": { - "additionalProperties": False, - "properties": { - "args": { - "items": {"$ref": "#/definitions/ConsumeApplicationArg"}, - "type": "array", - } - }, - "type": "object", - }, - "DeployFromRepositoryArg": { - "additionalProperties": False, - "properties": { - "ApplicationName": {"type": "string"}, - "AttachStorage": {"items": {"type": "string"}, "type": "array"}, - "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", - }, - "RemoteSpace": { - "additionalProperties": False, - "properties": { - "cloud-type": {"type": "string"}, - "name": {"type": "string"}, - "provider-attributes": { - "patternProperties": { - ".*": {"additionalProperties": True, "type": "object"} - }, - "type": "object", - }, - "provider-id": {"type": "string"}, - "subnets": { - "items": {"$ref": "#/definitions/Subnet"}, - "type": "array", - }, - }, - "required": [ - "cloud-type", - "name", - "provider-id", - "provider-attributes", - "subnets", - ], - "type": "object", - }, - "ScaleApplicationInfo": { - "additionalProperties": False, - "properties": {"num-units": {"type": "integer"}}, - "required": ["num-units"], - "type": "object", - }, - "ScaleApplicationParams": { - "additionalProperties": False, - "properties": { - "application-tag": {"type": "string"}, - "force": {"type": "boolean"}, - "scale": {"type": "integer"}, - "scale-change": {"type": "integer"}, - }, - "required": ["application-tag", "scale", "force"], - "type": "object", - }, - "ScaleApplicationResult": { - "additionalProperties": False, - "properties": { - "error": {"$ref": "#/definitions/Error"}, - "info": {"$ref": "#/definitions/ScaleApplicationInfo"}, - }, - "type": "object", - }, - "ScaleApplicationResults": { - "additionalProperties": False, - "properties": { - "results": { - "items": {"$ref": "#/definitions/ScaleApplicationResult"}, - "type": "array", - } - }, - "type": "object", - }, - "ScaleApplicationsParams": { - "additionalProperties": False, - "properties": { - "applications": { - "items": {"$ref": "#/definitions/ScaleApplicationParams"}, - "type": "array", - } - }, - "required": ["applications"], - "type": "object", - }, - "SetConstraints": { - "additionalProperties": False, - "properties": { - "application": {"type": "string"}, - "constraints": {"$ref": "#/definitions/Value"}, - }, - "required": ["application", "constraints"], - "type": "object", - }, - "StorageConstraints": { - "additionalProperties": False, - "properties": { - "count": {"type": "integer"}, - "pool": {"type": "string"}, - "size": {"type": "integer"}, - }, - "type": "object", - }, - "StringResult": { - "additionalProperties": False, - "properties": { - "error": {"$ref": "#/definitions/Error"}, - "result": {"type": "string"}, - }, - "required": ["result"], - "type": "object", - }, - "Subnet": { - "additionalProperties": False, - "properties": { - "cidr": {"type": "string"}, - "life": {"type": "string"}, - "provider-id": {"type": "string"}, - "provider-network-id": {"type": "string"}, - "provider-space-id": {"type": "string"}, - "space-tag": {"type": "string"}, - "status": {"type": "string"}, - "vlan-tag": {"type": "integer"}, - "zones": {"items": {"type": "string"}, "type": "array"}, - }, - "required": ["cidr", "vlan-tag", "life", "space-tag", "zones"], - "type": "object", - }, - "UnitInfoResult": { - "additionalProperties": False, - "properties": { - "error": {"$ref": "#/definitions/Error"}, - "result": {"$ref": "#/definitions/UnitResult"}, - }, - "type": "object", - }, - "UnitInfoResults": { - "additionalProperties": False, - "properties": { - "results": { - "items": {"$ref": "#/definitions/UnitInfoResult"}, - "type": "array", - } - }, - "required": ["results"], - "type": "object", - }, - "UnitResult": { - "additionalProperties": False, - "properties": { - "address": {"type": "string"}, - "charm": {"type": "string"}, - "leader": {"type": "boolean"}, - "life": {"type": "string"}, - "machine": {"type": "string"}, - "opened-ports": {"items": {"type": "string"}, "type": "array"}, - "provider-id": {"type": "string"}, - "public-address": {"type": "string"}, - "relation-data": { - "items": {"$ref": "#/definitions/EndpointRelationData"}, - "type": "array", - }, - "tag": {"type": "string"}, - "workload-version": {"type": "string"}, - }, - "required": ["tag", "workload-version", "opened-ports", "charm"], - "type": "object", - }, - "UnitsResolved": { - "additionalProperties": False, - "properties": { - "all": {"type": "boolean"}, - "retry": {"type": "boolean"}, - "tags": {"$ref": "#/definitions/Entities"}, - }, - "type": "object", - }, - "UpdateChannelArg": { - "additionalProperties": False, - "properties": { - "channel": {"type": "string"}, - "force": {"type": "boolean"}, - "tag": {"$ref": "#/definitions/Entity"}, - }, - "required": ["tag", "force", "channel"], - "type": "object", - }, - "UpdateChannelArgs": { - "additionalProperties": False, - "properties": { - "args": { - "items": {"$ref": "#/definitions/UpdateChannelArg"}, - "type": "array", - } - }, - "required": ["args"], - "type": "object", - }, - "Value": { - "additionalProperties": False, - "properties": { - "allocate-public-ip": {"type": "boolean"}, - "arch": {"type": "string"}, - "container": {"type": "string"}, - "cores": {"type": "integer"}, - "cpu-power": {"type": "integer"}, - "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/ConsumeApplicationArgs"}, - "Result": {"$ref": "#/definitions/ErrorResults"}, - }, - "type": "object", - }, - "Deploy": { - "description": "Deploy fetches the charms from the " - "charm store and deploys them\n" - "using the specified placement " - "directives.", - "properties": { - "Params": {"$ref": "#/definitions/ApplicationsDeploy"}, - "Result": {"$ref": "#/definitions/ErrorResults"}, - }, - "type": "object", - }, - "DeployFromRepository": { - "description": "DeployFromRepository " - "is a one-stop " - "deployment method for " - "repository\n" - "charms. Only a charm " - "name is required to " - "deploy. If argument " - "validation\n" - "fails, a list of all " - "errors found in " - "validation will be " - "returned. If a\n" - "local resource is " - "provided, details " - "required for " - "uploading the " - "validated\n" - "resource will be " - "returned.", - "properties": { - "Params": {"$ref": "#/definitions/DeployFromRepositoryArgs"}, - "Result": {"$ref": "#/definitions/DeployFromRepositoryResults"}, - }, - "type": "object", - }, - "DestroyApplication": { - "description": "DestroyApplication " - "removes a given set of " - "applications.", - "properties": { - "Params": {"$ref": "#/definitions/DestroyApplicationsParams"}, - "Result": {"$ref": "#/definitions/DestroyApplicationResults"}, - }, - "type": "object", - }, - "DestroyConsumedApplications": { - "description": "DestroyConsumedApplications " - "removes a " - "given set of " - "consumed " - "(remote) " - "applications.", - "properties": { - "Params": { - "$ref": "#/definitions/DestroyConsumedApplicationsParams" - }, - "Result": {"$ref": "#/definitions/ErrorResults"}, - }, - "type": "object", - }, - "DestroyRelation": { - "description": "DestroyRelation removes " - "the relation between the\n" - "specified endpoints or an " - "id.", - "properties": {"Params": {"$ref": "#/definitions/DestroyRelation"}}, - "type": "object", - }, - "DestroyUnit": { - "description": "DestroyUnit removes a given set of application units.", - "properties": { - "Params": {"$ref": "#/definitions/DestroyUnitsParams"}, - "Result": {"$ref": "#/definitions/DestroyUnitResults"}, - }, - "type": "object", - }, - "Expose": { - "description": "Expose changes the juju-managed " - "firewall to expose any ports that\n" - "were also explicitly marked by " - "units as open.", - "properties": {"Params": {"$ref": "#/definitions/ApplicationExpose"}}, - "type": "object", - }, - "Get": { - "description": "Get returns the charm configuration " - "for an application.", - "properties": { - "Params": {"$ref": "#/definitions/ApplicationGet"}, - "Result": {"$ref": "#/definitions/ApplicationGetResults"}, - }, - "type": "object", - }, - "GetCharmURLOrigin": { - "description": "GetCharmURLOrigin " - "returns the charm URL " - "and charm origin the " - "given\n" - "application is running " - "at present.", - "properties": { - "Params": {"$ref": "#/definitions/ApplicationGet"}, - "Result": {"$ref": "#/definitions/CharmURLOriginResult"}, - }, - "type": "object", - }, - "GetConfig": { - "description": "GetConfig returns the charm " - "config for each of the input " - "applications.", - "properties": { - "Params": {"$ref": "#/definitions/Entities"}, - "Result": {"$ref": "#/definitions/ApplicationGetConfigResults"}, - }, - "type": "object", - }, - "GetConstraints": { - "description": "GetConstraints returns the " - "constraints for a given " - "application.", - "properties": { - "Params": {"$ref": "#/definitions/Entities"}, - "Result": { - "$ref": "#/definitions/ApplicationGetConstraintsResults" - }, - }, - "type": "object", - }, - "Leader": { - "description": "Leader returns the unit name of the " - "leader for the given application.", - "properties": { - "Params": {"$ref": "#/definitions/Entity"}, - "Result": {"$ref": "#/definitions/StringResult"}, - }, - "type": "object", - }, - "MergeBindings": { - "description": "MergeBindings merges " - "operator-defined bindings " - "with the current bindings " - "for\n" - "one or more applications.", - "properties": { - "Params": {"$ref": "#/definitions/ApplicationMergeBindingsArgs"}, - "Result": {"$ref": "#/definitions/ErrorResults"}, - }, - "type": "object", - }, - "ResolveUnitErrors": { - "description": "ResolveUnitErrors marks " - "errors on the specified " - "units as resolved.", - "properties": { - "Params": {"$ref": "#/definitions/UnitsResolved"}, - "Result": {"$ref": "#/definitions/ErrorResults"}, - }, - "type": "object", - }, - "ScaleApplications": { - "description": "ScaleApplications scales " - "the specified " - "application to the " - "requested number of " - "units.", - "properties": { - "Params": {"$ref": "#/definitions/ScaleApplicationsParams"}, - "Result": {"$ref": "#/definitions/ScaleApplicationResults"}, - }, - "type": "object", - }, - "SetCharm": { - "description": "SetCharm sets the charm for a " - "given for the application.", - "properties": {"Params": {"$ref": "#/definitions/ApplicationSetCharm"}}, - "type": "object", - }, - "SetConfigs": { - "description": "SetConfigs implements the " - "server side of " - "Application.SetConfig. Both\n" - "application and charm config " - "are set. It does not unset " - "values in\n" - "Config map that are set to an " - "empty string. Unset should be " - "used for that.", - "properties": { - "Params": {"$ref": "#/definitions/ConfigSetArgs"}, - "Result": {"$ref": "#/definitions/ErrorResults"}, - }, - "type": "object", - }, - "SetConstraints": { - "description": "SetConstraints sets the " - "constraints for a given " - "application.", - "properties": {"Params": {"$ref": "#/definitions/SetConstraints"}}, - "type": "object", - }, - "SetMetricCredentials": { - "description": "SetMetricCredentials " - "sets credentials on " - "the application.\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): diff --git a/juju/client/_client2.py b/juju/client/_client2.py index 128446dd4..91cf26f27 100644 --- a/juju/client/_client2.py +++ b/juju/client/_client2.py @@ -8,130 +8,6 @@ class AnnotationsFacade(Type): name = "Annotations" version = 2 - schema = { - "definitions": { - "AnnotationsGetResult": { - "additionalProperties": False, - "properties": { - "annotations": { - "patternProperties": {".*": {"type": "string"}}, - "type": "object", - }, - "entity": {"type": "string"}, - "error": {"$ref": "#/definitions/ErrorResult"}, - }, - "required": ["entity", "annotations"], - "type": "object", - }, - "AnnotationsGetResults": { - "additionalProperties": False, - "properties": { - "results": { - "items": {"$ref": "#/definitions/AnnotationsGetResult"}, - "type": "array", - } - }, - "required": ["results"], - "type": "object", - }, - "AnnotationsSet": { - "additionalProperties": False, - "properties": { - "annotations": { - "items": {"$ref": "#/definitions/EntityAnnotations"}, - "type": "array", - } - }, - "required": ["annotations"], - "type": "object", - }, - "Entities": { - "additionalProperties": False, - "properties": { - "entities": { - "items": {"$ref": "#/definitions/Entity"}, - "type": "array", - } - }, - "required": ["entities"], - "type": "object", - }, - "Entity": { - "additionalProperties": False, - "properties": {"tag": {"type": "string"}}, - "required": ["tag"], - "type": "object", - }, - "EntityAnnotations": { - "additionalProperties": False, - "properties": { - "annotations": { - "patternProperties": {".*": {"type": "string"}}, - "type": "object", - }, - "entity": {"type": "string"}, - }, - "required": ["entity", "annotations"], - "type": "object", - }, - "Error": { - "additionalProperties": False, - "properties": { - "code": {"type": "string"}, - "info": { - "patternProperties": { - ".*": {"additionalProperties": True, "type": "object"} - }, - "type": "object", - }, - "message": {"type": "string"}, - }, - "required": ["message", "code"], - "type": "object", - }, - "ErrorResult": { - "additionalProperties": False, - "properties": {"error": {"$ref": "#/definitions/Error"}}, - "type": "object", - }, - "ErrorResults": { - "additionalProperties": False, - "properties": { - "results": { - "items": {"$ref": "#/definitions/ErrorResult"}, - "type": "array", - } - }, - "required": ["results"], - "type": "object", - }, - }, - "properties": { - "Get": { - "description": "Get returns annotations for given " - "entities.\n" - "If annotations cannot be retrieved for " - "a given entity, an error is returned.\n" - "Each entity is treated independently " - "and, hence, will fail or succeed " - "independently.", - "properties": { - "Params": {"$ref": "#/definitions/Entities"}, - "Result": {"$ref": "#/definitions/AnnotationsGetResults"}, - }, - "type": "object", - }, - "Set": { - "description": "Set stores annotations for given entities", - "properties": { - "Params": {"$ref": "#/definitions/AnnotationsSet"}, - "Result": {"$ref": "#/definitions/ErrorResults"}, - }, - "type": "object", - }, - }, - "type": "object", - } @ReturnMapping(AnnotationsGetResults) async def Get(self, entities=None): @@ -177,93 +53,6 @@ async def Set(self, annotations=None): class BlockFacade(Type): name = "Block" version = 2 - schema = { - "definitions": { - "Block": { - "additionalProperties": False, - "properties": { - "id": {"type": "string"}, - "message": {"type": "string"}, - "tag": {"type": "string"}, - "type": {"type": "string"}, - }, - "required": ["id", "tag", "type"], - "type": "object", - }, - "BlockResult": { - "additionalProperties": False, - "properties": { - "error": {"$ref": "#/definitions/Error"}, - "result": {"$ref": "#/definitions/Block"}, - }, - "required": ["result"], - "type": "object", - }, - "BlockResults": { - "additionalProperties": False, - "properties": { - "results": { - "items": {"$ref": "#/definitions/BlockResult"}, - "type": "array", - } - }, - "type": "object", - }, - "BlockSwitchParams": { - "additionalProperties": False, - "properties": { - "message": {"type": "string"}, - "type": {"type": "string"}, - }, - "required": ["type"], - "type": "object", - }, - "Error": { - "additionalProperties": False, - "properties": { - "code": {"type": "string"}, - "info": { - "patternProperties": { - ".*": {"additionalProperties": True, "type": "object"} - }, - "type": "object", - }, - "message": {"type": "string"}, - }, - "required": ["message", "code"], - "type": "object", - }, - "ErrorResult": { - "additionalProperties": False, - "properties": {"error": {"$ref": "#/definitions/Error"}}, - "type": "object", - }, - }, - "properties": { - "List": { - "description": "List implements Block.List().", - "properties": {"Result": {"$ref": "#/definitions/BlockResults"}}, - "type": "object", - }, - "SwitchBlockOff": { - "description": "SwitchBlockOff implements Block.SwitchBlockOff().", - "properties": { - "Params": {"$ref": "#/definitions/BlockSwitchParams"}, - "Result": {"$ref": "#/definitions/ErrorResult"}, - }, - "type": "object", - }, - "SwitchBlockOn": { - "description": "SwitchBlockOn implements Block.SwitchBlockOn().", - "properties": { - "Params": {"$ref": "#/definitions/BlockSwitchParams"}, - "Result": {"$ref": "#/definitions/ErrorResult"}, - }, - "type": "object", - }, - }, - "type": "object", - } @ReturnMapping(BlockResults) async def List(self): @@ -326,111 +115,6 @@ async def SwitchBlockOn(self, message=None, type_=None): class HighAvailabilityFacade(Type): name = "HighAvailability" version = 2 - schema = { - "definitions": { - "ControllersChangeResult": { - "additionalProperties": False, - "properties": { - "error": {"$ref": "#/definitions/Error"}, - "result": {"$ref": "#/definitions/ControllersChanges"}, - }, - "required": ["result"], - "type": "object", - }, - "ControllersChangeResults": { - "additionalProperties": False, - "properties": { - "results": { - "items": {"$ref": "#/definitions/ControllersChangeResult"}, - "type": "array", - } - }, - "required": ["results"], - "type": "object", - }, - "ControllersChanges": { - "additionalProperties": False, - "properties": { - "added": {"items": {"type": "string"}, "type": "array"}, - "converted": {"items": {"type": "string"}, "type": "array"}, - "maintained": {"items": {"type": "string"}, "type": "array"}, - "removed": {"items": {"type": "string"}, "type": "array"}, - }, - "type": "object", - }, - "ControllersSpec": { - "additionalProperties": False, - "properties": { - "constraints": {"$ref": "#/definitions/Value"}, - "num-controllers": {"type": "integer"}, - "placement": {"items": {"type": "string"}, "type": "array"}, - }, - "required": ["num-controllers"], - "type": "object", - }, - "ControllersSpecs": { - "additionalProperties": False, - "properties": { - "specs": { - "items": {"$ref": "#/definitions/ControllersSpec"}, - "type": "array", - } - }, - "required": ["specs"], - "type": "object", - }, - "Error": { - "additionalProperties": False, - "properties": { - "code": {"type": "string"}, - "info": { - "patternProperties": { - ".*": {"additionalProperties": True, "type": "object"} - }, - "type": "object", - }, - "message": {"type": "string"}, - }, - "required": ["message", "code"], - "type": "object", - }, - "Value": { - "additionalProperties": False, - "properties": { - "allocate-public-ip": {"type": "boolean"}, - "arch": {"type": "string"}, - "container": {"type": "string"}, - "cores": {"type": "integer"}, - "cpu-power": {"type": "integer"}, - "image-id": {"type": "string"}, - "instance-role": {"type": "string"}, - "instance-type": {"type": "string"}, - "mem": {"type": "integer"}, - "root-disk": {"type": "integer"}, - "root-disk-source": {"type": "string"}, - "spaces": {"items": {"type": "string"}, "type": "array"}, - "tags": {"items": {"type": "string"}, "type": "array"}, - "virt-type": {"type": "string"}, - "zones": {"items": {"type": "string"}, "type": "array"}, - }, - "type": "object", - }, - }, - "properties": { - "EnableHA": { - "description": "EnableHA adds controller machines " - "as necessary to ensure the\n" - "controller has the number of " - "machines specified.", - "properties": { - "Params": {"$ref": "#/definitions/ControllersSpecs"}, - "Result": {"$ref": "#/definitions/ControllersChangeResults"}, - }, - "type": "object", - } - }, - "type": "object", - } @ReturnMapping(ControllersChangeResults) async def EnableHA(self, specs=None): @@ -456,136 +140,6 @@ async def EnableHA(self, specs=None): class MetricsDebugFacade(Type): name = "MetricsDebug" version = 2 - schema = { - "definitions": { - "Entities": { - "additionalProperties": False, - "properties": { - "entities": { - "items": {"$ref": "#/definitions/Entity"}, - "type": "array", - } - }, - "required": ["entities"], - "type": "object", - }, - "Entity": { - "additionalProperties": False, - "properties": {"tag": {"type": "string"}}, - "required": ["tag"], - "type": "object", - }, - "EntityMetrics": { - "additionalProperties": False, - "properties": { - "error": {"$ref": "#/definitions/Error"}, - "metrics": { - "items": {"$ref": "#/definitions/MetricResult"}, - "type": "array", - }, - }, - "type": "object", - }, - "Error": { - "additionalProperties": False, - "properties": { - "code": {"type": "string"}, - "info": { - "patternProperties": { - ".*": {"additionalProperties": True, "type": "object"} - }, - "type": "object", - }, - "message": {"type": "string"}, - }, - "required": ["message", "code"], - "type": "object", - }, - "ErrorResult": { - "additionalProperties": False, - "properties": {"error": {"$ref": "#/definitions/Error"}}, - "type": "object", - }, - "ErrorResults": { - "additionalProperties": False, - "properties": { - "results": { - "items": {"$ref": "#/definitions/ErrorResult"}, - "type": "array", - } - }, - "required": ["results"], - "type": "object", - }, - "MeterStatusParam": { - "additionalProperties": False, - "properties": { - "code": {"type": "string"}, - "info": {"type": "string"}, - "tag": {"type": "string"}, - }, - "required": ["tag", "code"], - "type": "object", - }, - "MeterStatusParams": { - "additionalProperties": False, - "properties": { - "statues": { - "items": {"$ref": "#/definitions/MeterStatusParam"}, - "type": "array", - } - }, - "required": ["statues"], - "type": "object", - }, - "MetricResult": { - "additionalProperties": False, - "properties": { - "key": {"type": "string"}, - "labels": { - "patternProperties": {".*": {"type": "string"}}, - "type": "object", - }, - "time": {"format": "date-time", "type": "string"}, - "unit": {"type": "string"}, - "value": {"type": "string"}, - }, - "required": ["time", "key", "value", "unit", "labels"], - "type": "object", - }, - "MetricResults": { - "additionalProperties": False, - "properties": { - "results": { - "items": {"$ref": "#/definitions/EntityMetrics"}, - "type": "array", - } - }, - "required": ["results"], - "type": "object", - }, - }, - "properties": { - "GetMetrics": { - "description": "GetMetrics returns all metrics " - "stored by the state server.", - "properties": { - "Params": {"$ref": "#/definitions/Entities"}, - "Result": {"$ref": "#/definitions/MetricResults"}, - }, - "type": "object", - }, - "SetMeterStatus": { - "description": "SetMeterStatus sets meter statuses for entities.", - "properties": { - "Params": {"$ref": "#/definitions/MeterStatusParams"}, - "Result": {"$ref": "#/definitions/ErrorResults"}, - }, - "type": "object", - }, - }, - "type": "object", - } @ReturnMapping(MetricResults) async def GetMetrics(self, entities=None): @@ -631,347 +185,6 @@ async def SetMeterStatus(self, statues=None): class SecretsFacade(Type): name = "Secrets" version = 2 - 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"}, - "expire-time": {"format": "date-time", "type": "string"}, - "label": {"type": "string"}, - "owner-tag": {"type": "string"}, - "params": { - "patternProperties": { - ".*": {"additionalProperties": True, "type": "object"} - }, - "type": "object", - }, - "rotate-policy": {"type": "string"}, - "uri": {"type": "string"}, - }, - "required": ["UpsertSecretArg", "owner-tag"], - "type": "object", - }, - "CreateSecretArgs": { - "additionalProperties": False, - "properties": { - "args": { - "items": {"$ref": "#/definitions/CreateSecretArg"}, - "type": "array", - } - }, - "required": ["args"], - "type": "object", - }, - "DeleteSecretArg": { - "additionalProperties": False, - "properties": { - "label": {"type": "string"}, - "revisions": {"items": {"type": "integer"}, "type": "array"}, - "uri": {"type": "string"}, - }, - "required": ["uri", "label"], - "type": "object", - }, - "DeleteSecretArgs": { - "additionalProperties": False, - "properties": { - "args": { - "items": {"$ref": "#/definitions/DeleteSecretArg"}, - "type": "array", - } - }, - "required": ["args"], - "type": "object", - }, - "Error": { - "additionalProperties": False, - "properties": { - "code": {"type": "string"}, - "info": { - "patternProperties": { - ".*": {"additionalProperties": True, "type": "object"} - }, - "type": "object", - }, - "message": {"type": "string"}, - }, - "required": ["message", "code"], - "type": "object", - }, - "ErrorResult": { - "additionalProperties": False, - "properties": {"error": {"$ref": "#/definitions/Error"}}, - "type": "object", - }, - "ErrorResults": { - "additionalProperties": False, - "properties": { - "results": { - "items": {"$ref": "#/definitions/ErrorResult"}, - "type": "array", - } - }, - "required": ["results"], - "type": "object", - }, - "GrantRevokeUserSecretArg": { - "additionalProperties": False, - "properties": { - "applications": {"items": {"type": "string"}, "type": "array"}, - "label": {"type": "string"}, - "uri": {"type": "string"}, - }, - "required": ["uri", "label", "applications"], - "type": "object", - }, - "ListSecretResult": { - "additionalProperties": False, - "properties": { - "access": { - "items": {"$ref": "#/definitions/AccessInfo"}, - "type": "array", - }, - "create-time": {"format": "date-time", "type": "string"}, - "description": {"type": "string"}, - "label": {"type": "string"}, - "latest-expire-time": {"format": "date-time", "type": "string"}, - "latest-revision": {"type": "integer"}, - "latest-revision-checksum": {"type": "string"}, - "next-rotate-time": {"format": "date-time", "type": "string"}, - "owner-tag": {"type": "string"}, - "revisions": { - "items": {"$ref": "#/definitions/SecretRevision"}, - "type": "array", - }, - "rotate-policy": {"type": "string"}, - "update-time": {"format": "date-time", "type": "string"}, - "uri": {"type": "string"}, - "value": {"$ref": "#/definitions/SecretValueResult"}, - "version": {"type": "integer"}, - }, - "required": [ - "uri", - "version", - "owner-tag", - "latest-revision", - "latest-revision-checksum", - "create-time", - "update-time", - "revisions", - ], - "type": "object", - }, - "ListSecretResults": { - "additionalProperties": False, - "properties": { - "results": { - "items": {"$ref": "#/definitions/ListSecretResult"}, - "type": "array", - } - }, - "required": ["results"], - "type": "object", - }, - "ListSecretsArgs": { - "additionalProperties": False, - "properties": { - "filter": {"$ref": "#/definitions/SecretsFilter"}, - "show-secrets": {"type": "boolean"}, - }, - "required": ["show-secrets", "filter"], - "type": "object", - }, - "SecretContentParams": { - "additionalProperties": False, - "properties": { - "checksum": {"type": "string"}, - "data": { - "patternProperties": {".*": {"type": "string"}}, - "type": "object", - }, - "value-ref": {"$ref": "#/definitions/SecretValueRef"}, - }, - "type": "object", - }, - "SecretRevision": { - "additionalProperties": False, - "properties": { - "backend-name": {"type": "string"}, - "create-time": {"format": "date-time", "type": "string"}, - "expire-time": {"format": "date-time", "type": "string"}, - "revision": {"type": "integer"}, - "update-time": {"format": "date-time", "type": "string"}, - "value-ref": {"$ref": "#/definitions/SecretValueRef"}, - }, - "required": ["revision"], - "type": "object", - }, - "SecretValueRef": { - "additionalProperties": False, - "properties": { - "backend-id": {"type": "string"}, - "revision-id": {"type": "string"}, - }, - "required": ["backend-id", "revision-id"], - "type": "object", - }, - "SecretValueResult": { - "additionalProperties": False, - "properties": { - "data": { - "patternProperties": {".*": {"type": "string"}}, - "type": "object", - }, - "error": {"$ref": "#/definitions/Error"}, - }, - "type": "object", - }, - "SecretsFilter": { - "additionalProperties": False, - "properties": { - "label": {"type": "string"}, - "owner-tag": {"type": "string"}, - "revision": {"type": "integer"}, - "uri": {"type": "string"}, - }, - "type": "object", - }, - "StringResult": { - "additionalProperties": False, - "properties": { - "error": {"$ref": "#/definitions/Error"}, - "result": {"type": "string"}, - }, - "required": ["result"], - "type": "object", - }, - "StringResults": { - "additionalProperties": False, - "properties": { - "results": { - "items": {"$ref": "#/definitions/StringResult"}, - "type": "array", - } - }, - "required": ["results"], - "type": "object", - }, - "UpdateUserSecretArg": { - "additionalProperties": False, - "properties": { - "UpsertSecretArg": {"$ref": "#/definitions/UpsertSecretArg"}, - "auto-prune": {"type": "boolean"}, - "content": {"$ref": "#/definitions/SecretContentParams"}, - "description": {"type": "string"}, - "existing-label": {"type": "string"}, - "expire-time": {"format": "date-time", "type": "string"}, - "label": {"type": "string"}, - "params": { - "patternProperties": { - ".*": {"additionalProperties": True, "type": "object"} - }, - "type": "object", - }, - "rotate-policy": {"type": "string"}, - "uri": {"type": "string"}, - }, - "required": ["UpsertSecretArg", "uri", "existing-label"], - "type": "object", - }, - "UpdateUserSecretArgs": { - "additionalProperties": False, - "properties": { - "args": { - "items": {"$ref": "#/definitions/UpdateUserSecretArg"}, - "type": "array", - } - }, - "required": ["args"], - "type": "object", - }, - "UpsertSecretArg": { - "additionalProperties": False, - "properties": { - "content": {"$ref": "#/definitions/SecretContentParams"}, - "description": {"type": "string"}, - "expire-time": {"format": "date-time", "type": "string"}, - "label": {"type": "string"}, - "params": { - "patternProperties": { - ".*": {"additionalProperties": True, "type": "object"} - }, - "type": "object", - }, - "rotate-policy": {"type": "string"}, - }, - "type": "object", - }, - }, - "properties": { - "CreateSecrets": { - "description": "CreateSecrets creates new secrets.", - "properties": { - "Params": {"$ref": "#/definitions/CreateSecretArgs"}, - "Result": {"$ref": "#/definitions/StringResults"}, - }, - "type": "object", - }, - "GrantSecret": { - "description": "GrantSecret grants access to a user secret.", - "properties": { - "Params": {"$ref": "#/definitions/GrantRevokeUserSecretArg"}, - "Result": {"$ref": "#/definitions/ErrorResults"}, - }, - "type": "object", - }, - "ListSecrets": { - "description": "ListSecrets lists available secrets.", - "properties": { - "Params": {"$ref": "#/definitions/ListSecretsArgs"}, - "Result": {"$ref": "#/definitions/ListSecretResults"}, - }, - "type": "object", - }, - "RemoveSecrets": { - "description": "RemoveSecrets remove user secret.", - "properties": { - "Params": {"$ref": "#/definitions/DeleteSecretArgs"}, - "Result": {"$ref": "#/definitions/ErrorResults"}, - }, - "type": "object", - }, - "RevokeSecret": { - "description": "RevokeSecret revokes access to a user secret.", - "properties": { - "Params": {"$ref": "#/definitions/GrantRevokeUserSecretArg"}, - "Result": {"$ref": "#/definitions/ErrorResults"}, - }, - "type": "object", - }, - "UpdateSecrets": { - "description": "UpdateSecrets creates new secrets.", - "properties": { - "Params": {"$ref": "#/definitions/UpdateUserSecretArgs"}, - "Result": {"$ref": "#/definitions/ErrorResults"}, - }, - "type": "object", - }, - }, - "type": "object", - } @ReturnMapping(StringResults) async def CreateSecrets(self, args=None): diff --git a/juju/client/_client20.py b/juju/client/_client20.py index 9121b0710..846ab264f 100644 --- a/juju/client/_client20.py +++ b/juju/client/_client20.py @@ -8,1493 +8,6 @@ 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): diff --git a/juju/client/_client3.py b/juju/client/_client3.py index b3e8ad3d5..b119ce032 100644 --- a/juju/client/_client3.py +++ b/juju/client/_client3.py @@ -8,165 +8,6 @@ class AdminFacade(Type): name = "Admin" version = 3 - schema = { - "definitions": { - "Address": { - "additionalProperties": False, - "properties": { - "cidr": {"type": "string"}, - "config-type": {"type": "string"}, - "is-secondary": {"type": "boolean"}, - "scope": {"type": "string"}, - "space-id": {"type": "string"}, - "space-name": {"type": "string"}, - "type": {"type": "string"}, - "value": {"type": "string"}, - }, - "required": ["value", "type", "scope"], - "type": "object", - }, - "AuthUserInfo": { - "additionalProperties": False, - "properties": { - "controller-access": {"type": "string"}, - "credentials": {"type": "string"}, - "display-name": {"type": "string"}, - "identity": {"type": "string"}, - "last-connection": {"format": "date-time", "type": "string"}, - "model-access": {"type": "string"}, - }, - "required": [ - "display-name", - "identity", - "controller-access", - "model-access", - ], - "type": "object", - }, - "FacadeVersions": { - "additionalProperties": False, - "properties": { - "name": {"type": "string"}, - "versions": {"items": {"type": "integer"}, "type": "array"}, - }, - "required": ["name", "versions"], - "type": "object", - }, - "HostPort": { - "additionalProperties": False, - "properties": { - "Address": {"$ref": "#/definitions/Address"}, - "cidr": {"type": "string"}, - "config-type": {"type": "string"}, - "is-secondary": {"type": "boolean"}, - "port": {"type": "integer"}, - "scope": {"type": "string"}, - "space-id": {"type": "string"}, - "space-name": {"type": "string"}, - "type": {"type": "string"}, - "value": {"type": "string"}, - }, - "required": ["value", "type", "scope", "Address", "port"], - "type": "object", - }, - "LoginRequest": { - "additionalProperties": False, - "properties": { - "auth-tag": {"type": "string"}, - "bakery-version": {"type": "integer"}, - "cli-args": {"type": "string"}, - "client-version": {"type": "string"}, - "credentials": {"type": "string"}, - "macaroons": { - "items": { - "items": {"$ref": "#/definitions/Macaroon"}, - "type": "array", - }, - "type": "array", - }, - "nonce": {"type": "string"}, - "token": {"type": "string"}, - "user-data": {"type": "string"}, - }, - "required": [ - "auth-tag", - "credentials", - "nonce", - "macaroons", - "user-data", - ], - "type": "object", - }, - "LoginResult": { - "additionalProperties": False, - "properties": { - "bakery-discharge-required": {"$ref": "#/definitions/Macaroon"}, - "controller-tag": {"type": "string"}, - "discharge-required": {"$ref": "#/definitions/Macaroon"}, - "discharge-required-error": {"type": "string"}, - "facades": { - "items": {"$ref": "#/definitions/FacadeVersions"}, - "type": "array", - }, - "model-tag": {"type": "string"}, - "public-dns-name": {"type": "string"}, - "server-version": {"type": "string"}, - "servers": { - "items": { - "items": {"$ref": "#/definitions/HostPort"}, - "type": "array", - }, - "type": "array", - }, - "user-info": {"$ref": "#/definitions/AuthUserInfo"}, - }, - "type": "object", - }, - "Macaroon": {"additionalProperties": False, "type": "object"}, - "RedirectInfoResult": { - "additionalProperties": False, - "properties": { - "ca-cert": {"type": "string"}, - "servers": { - "items": { - "items": {"$ref": "#/definitions/HostPort"}, - "type": "array", - }, - "type": "array", - }, - }, - "required": ["servers", "ca-cert"], - "type": "object", - }, - }, - "properties": { - "Login": { - "description": "Login logs in with the provided " - "credentials. All subsequent " - "requests on the\n" - "connection will act as the " - "authenticated user.", - "properties": { - "Params": {"$ref": "#/definitions/LoginRequest"}, - "Result": {"$ref": "#/definitions/LoginResult"}, - }, - "type": "object", - }, - "RedirectInfo": { - "description": "RedirectInfo returns " - "redirected host information " - "for the model.\n" - "In Juju it always returns an " - "error because the Juju " - "controller\n" - "does not multiplex " - "controllers.", - "properties": {"Result": {"$ref": "#/definitions/RedirectInfoResult"}}, - "type": "object", - }, - }, - "type": "object", - } @ReturnMapping(LoginResult) async def Login( @@ -270,43 +111,6 @@ async def RedirectInfo(self): class AllWatcherFacade(Type): name = "AllWatcher" version = 3 - schema = { - "definitions": { - "AllWatcherNextResults": { - "additionalProperties": False, - "properties": { - "deltas": { - "items": {"$ref": "#/definitions/Delta"}, - "type": "array", - } - }, - "required": ["deltas"], - "type": "object", - }, - "Delta": { - "additionalProperties": False, - "properties": { - "entity": {"additionalProperties": True, "type": "object"}, - "removed": {"type": "boolean"}, - }, - "required": ["removed", "entity"], - "type": "object", - }, - }, - "properties": { - "Next": { - "description": "Next will return the current state of " - "everything on the first call\n" - "and subsequent calls will", - "properties": { - "Result": {"$ref": "#/definitions/AllWatcherNextResults"} - }, - "type": "object", - }, - "Stop": {"description": "Stop stops the watcher.", "type": "object"}, - }, - "type": "object", - } @ReturnMapping(AllWatcherNextResults) async def Next(self): @@ -350,91 +154,6 @@ async def rpc(self, msg): class BackupsFacade(Type): name = "Backups" version = 3 - schema = { - "definitions": { - "BackupsCreateArgs": { - "additionalProperties": False, - "properties": { - "no-download": {"type": "boolean"}, - "notes": {"type": "string"}, - }, - "required": ["notes", "no-download"], - "type": "object", - }, - "BackupsMetadataResult": { - "additionalProperties": False, - "properties": { - "base": {"type": "string"}, - "checksum": {"type": "string"}, - "checksum-format": {"type": "string"}, - "controller-machine-id": {"type": "string"}, - "controller-machine-inst-id": {"type": "string"}, - "controller-uuid": {"type": "string"}, - "filename": {"type": "string"}, - "finished": {"format": "date-time", "type": "string"}, - "format-version": {"type": "integer"}, - "ha-nodes": {"type": "integer"}, - "hostname": {"type": "string"}, - "id": {"type": "string"}, - "machine": {"type": "string"}, - "model": {"type": "string"}, - "notes": {"type": "string"}, - "size": {"type": "integer"}, - "started": {"format": "date-time", "type": "string"}, - "stored": {"format": "date-time", "type": "string"}, - "version": {"$ref": "#/definitions/Number"}, - }, - "required": [ - "id", - "checksum", - "checksum-format", - "size", - "stored", - "started", - "finished", - "notes", - "model", - "machine", - "hostname", - "version", - "base", - "filename", - "format-version", - "controller-uuid", - "controller-machine-id", - "controller-machine-inst-id", - "ha-nodes", - ], - "type": "object", - }, - "Number": { - "additionalProperties": False, - "properties": { - "Build": {"type": "integer"}, - "Major": {"type": "integer"}, - "Minor": {"type": "integer"}, - "Patch": {"type": "integer"}, - "Tag": {"type": "string"}, - }, - "required": ["Major", "Minor", "Tag", "Patch", "Build"], - "type": "object", - }, - }, - "properties": { - "Create": { - "description": "Create is the API method that " - "requests juju to create a new " - "backup\n" - "of its state.", - "properties": { - "Params": {"$ref": "#/definitions/BackupsCreateArgs"}, - "Result": {"$ref": "#/definitions/BackupsMetadataResult"}, - }, - "type": "object", - } - }, - "type": "object", - } @ReturnMapping(BackupsMetadataResult) async def Create(self, no_download=None, notes=None): @@ -465,201 +184,6 @@ async def Create(self, no_download=None, notes=None): class ModelConfigFacade(Type): name = "ModelConfig" version = 3 - schema = { - "definitions": { - "ConfigValue": { - "additionalProperties": False, - "properties": { - "source": {"type": "string"}, - "value": {"additionalProperties": True, "type": "object"}, - }, - "required": ["value", "source"], - "type": "object", - }, - "Error": { - "additionalProperties": False, - "properties": { - "code": {"type": "string"}, - "info": { - "patternProperties": { - ".*": {"additionalProperties": True, "type": "object"} - }, - "type": "object", - }, - "message": {"type": "string"}, - }, - "required": ["message", "code"], - "type": "object", - }, - "GetConstraintsResults": { - "additionalProperties": False, - "properties": {"constraints": {"$ref": "#/definitions/Value"}}, - "required": ["constraints"], - "type": "object", - }, - "ModelConfigResults": { - "additionalProperties": False, - "properties": { - "config": { - "patternProperties": { - ".*": {"$ref": "#/definitions/ConfigValue"} - }, - "type": "object", - } - }, - "required": ["config"], - "type": "object", - }, - "ModelSLA": { - "additionalProperties": False, - "properties": { - "ModelSLAInfo": {"$ref": "#/definitions/ModelSLAInfo"}, - "creds": {"items": {"type": "integer"}, "type": "array"}, - "level": {"type": "string"}, - "owner": {"type": "string"}, - }, - "required": ["level", "owner", "ModelSLAInfo", "creds"], - "type": "object", - }, - "ModelSLAInfo": { - "additionalProperties": False, - "properties": { - "level": {"type": "string"}, - "owner": {"type": "string"}, - }, - "required": ["level", "owner"], - "type": "object", - }, - "ModelSequencesResult": { - "additionalProperties": False, - "properties": { - "sequences": { - "patternProperties": {".*": {"type": "integer"}}, - "type": "object", - } - }, - "required": ["sequences"], - "type": "object", - }, - "ModelSet": { - "additionalProperties": False, - "properties": { - "config": { - "patternProperties": { - ".*": {"additionalProperties": True, "type": "object"} - }, - "type": "object", - } - }, - "required": ["config"], - "type": "object", - }, - "ModelUnset": { - "additionalProperties": False, - "properties": {"keys": {"items": {"type": "string"}, "type": "array"}}, - "required": ["keys"], - "type": "object", - }, - "SetConstraints": { - "additionalProperties": False, - "properties": { - "application": {"type": "string"}, - "constraints": {"$ref": "#/definitions/Value"}, - }, - "required": ["application", "constraints"], - "type": "object", - }, - "StringResult": { - "additionalProperties": False, - "properties": { - "error": {"$ref": "#/definitions/Error"}, - "result": {"type": "string"}, - }, - "required": ["result"], - "type": "object", - }, - "Value": { - "additionalProperties": False, - "properties": { - "allocate-public-ip": {"type": "boolean"}, - "arch": {"type": "string"}, - "container": {"type": "string"}, - "cores": {"type": "integer"}, - "cpu-power": {"type": "integer"}, - "image-id": {"type": "string"}, - "instance-role": {"type": "string"}, - "instance-type": {"type": "string"}, - "mem": {"type": "integer"}, - "root-disk": {"type": "integer"}, - "root-disk-source": {"type": "string"}, - "spaces": {"items": {"type": "string"}, "type": "array"}, - "tags": {"items": {"type": "string"}, "type": "array"}, - "virt-type": {"type": "string"}, - "zones": {"items": {"type": "string"}, "type": "array"}, - }, - "type": "object", - }, - }, - "properties": { - "GetModelConstraints": { - "description": "GetModelConstraints " - "returns the " - "constraints for the " - "model.", - "properties": { - "Result": {"$ref": "#/definitions/GetConstraintsResults"} - }, - "type": "object", - }, - "ModelGet": { - "description": "ModelGet implements the " - "server-side part of the\n" - "model-config CLI command.", - "properties": {"Result": {"$ref": "#/definitions/ModelConfigResults"}}, - "type": "object", - }, - "ModelSet": { - "description": "ModelSet implements the " - "server-side part of the\n" - "set-model-config CLI command.", - "properties": {"Params": {"$ref": "#/definitions/ModelSet"}}, - "type": "object", - }, - "ModelUnset": { - "description": "ModelUnset implements the " - "server-side part of the\n" - "set-model-config CLI command.", - "properties": {"Params": {"$ref": "#/definitions/ModelUnset"}}, - "type": "object", - }, - "SLALevel": { - "description": "SLALevel returns the current sla level for the model.", - "properties": {"Result": {"$ref": "#/definitions/StringResult"}}, - "type": "object", - }, - "Sequences": { - "description": "Sequences returns the model's " - "sequence names and next values.", - "properties": { - "Result": {"$ref": "#/definitions/ModelSequencesResult"} - }, - "type": "object", - }, - "SetModelConstraints": { - "description": "SetModelConstraints " - "sets the constraints " - "for the model.", - "properties": {"Params": {"$ref": "#/definitions/SetConstraints"}}, - "type": "object", - }, - "SetSLALevel": { - "description": "SetSLALevel sets the sla level on the model.", - "properties": {"Params": {"$ref": "#/definitions/ModelSLA"}}, - "type": "object", - }, - }, - "type": "object", - } @ReturnMapping(GetConstraintsResults) async def GetModelConstraints(self): @@ -822,251 +346,6 @@ async def SetSLALevel(self, modelslainfo=None, creds=None, level=None, owner=Non class ResourcesFacade(Type): name = "Resources" version = 3 - schema = { - "definitions": { - "AddPendingResourcesArgsV2": { - "additionalProperties": False, - "properties": { - "Entity": {"$ref": "#/definitions/Entity"}, - "charm-origin": {"$ref": "#/definitions/CharmOrigin"}, - "macaroon": {"$ref": "#/definitions/Macaroon"}, - "resources": { - "items": {"$ref": "#/definitions/CharmResource"}, - "type": "array", - }, - "tag": {"type": "string"}, - "url": {"type": "string"}, - }, - "required": [ - "tag", - "Entity", - "url", - "charm-origin", - "macaroon", - "resources", - ], - "type": "object", - }, - "AddPendingResourcesResult": { - "additionalProperties": False, - "properties": { - "ErrorResult": {"$ref": "#/definitions/ErrorResult"}, - "error": {"$ref": "#/definitions/Error"}, - "pending-ids": {"items": {"type": "string"}, "type": "array"}, - }, - "required": ["ErrorResult", "pending-ids"], - "type": "object", - }, - "Base": { - "additionalProperties": False, - "properties": { - "channel": {"type": "string"}, - "name": {"type": "string"}, - }, - "required": ["name", "channel"], - "type": "object", - }, - "CharmOrigin": { - "additionalProperties": False, - "properties": { - "architecture": {"type": "string"}, - "base": {"$ref": "#/definitions/Base"}, - "branch": {"type": "string"}, - "hash": {"type": "string"}, - "id": {"type": "string"}, - "instance-key": {"type": "string"}, - "revision": {"type": "integer"}, - "risk": {"type": "string"}, - "source": {"type": "string"}, - "track": {"type": "string"}, - "type": {"type": "string"}, - }, - "required": ["source", "type", "id"], - "type": "object", - }, - "CharmResource": { - "additionalProperties": False, - "properties": { - "description": {"type": "string"}, - "fingerprint": {"items": {"type": "integer"}, "type": "array"}, - "name": {"type": "string"}, - "origin": {"type": "string"}, - "path": {"type": "string"}, - "revision": {"type": "integer"}, - "size": {"type": "integer"}, - "type": {"type": "string"}, - }, - "required": [ - "name", - "type", - "path", - "origin", - "revision", - "fingerprint", - "size", - ], - "type": "object", - }, - "Entity": { - "additionalProperties": False, - "properties": {"tag": {"type": "string"}}, - "required": ["tag"], - "type": "object", - }, - "Error": { - "additionalProperties": False, - "properties": { - "code": {"type": "string"}, - "info": { - "patternProperties": { - ".*": {"additionalProperties": True, "type": "object"} - }, - "type": "object", - }, - "message": {"type": "string"}, - }, - "required": ["message", "code"], - "type": "object", - }, - "ErrorResult": { - "additionalProperties": False, - "properties": {"error": {"$ref": "#/definitions/Error"}}, - "type": "object", - }, - "ListResourcesArgs": { - "additionalProperties": False, - "properties": { - "entities": { - "items": {"$ref": "#/definitions/Entity"}, - "type": "array", - } - }, - "required": ["entities"], - "type": "object", - }, - "Macaroon": {"additionalProperties": False, "type": "object"}, - "Resource": { - "additionalProperties": False, - "properties": { - "CharmResource": {"$ref": "#/definitions/CharmResource"}, - "application": {"type": "string"}, - "description": {"type": "string"}, - "fingerprint": {"items": {"type": "integer"}, "type": "array"}, - "id": {"type": "string"}, - "name": {"type": "string"}, - "origin": {"type": "string"}, - "path": {"type": "string"}, - "pending-id": {"type": "string"}, - "revision": {"type": "integer"}, - "size": {"type": "integer"}, - "timestamp": {"format": "date-time", "type": "string"}, - "type": {"type": "string"}, - "username": {"type": "string"}, - }, - "required": [ - "name", - "type", - "path", - "origin", - "revision", - "fingerprint", - "size", - "CharmResource", - "id", - "pending-id", - "application", - "username", - "timestamp", - ], - "type": "object", - }, - "ResourcesResult": { - "additionalProperties": False, - "properties": { - "ErrorResult": {"$ref": "#/definitions/ErrorResult"}, - "charm-store-resources": { - "items": {"$ref": "#/definitions/CharmResource"}, - "type": "array", - }, - "error": {"$ref": "#/definitions/Error"}, - "resources": { - "items": {"$ref": "#/definitions/Resource"}, - "type": "array", - }, - "unit-resources": { - "items": {"$ref": "#/definitions/UnitResources"}, - "type": "array", - }, - }, - "required": [ - "ErrorResult", - "resources", - "charm-store-resources", - "unit-resources", - ], - "type": "object", - }, - "ResourcesResults": { - "additionalProperties": False, - "properties": { - "results": { - "items": {"$ref": "#/definitions/ResourcesResult"}, - "type": "array", - } - }, - "required": ["results"], - "type": "object", - }, - "UnitResources": { - "additionalProperties": False, - "properties": { - "Entity": {"$ref": "#/definitions/Entity"}, - "download-progress": { - "patternProperties": {".*": {"type": "integer"}}, - "type": "object", - }, - "resources": { - "items": {"$ref": "#/definitions/Resource"}, - "type": "array", - }, - "tag": {"type": "string"}, - }, - "required": ["tag", "Entity", "resources", "download-progress"], - "type": "object", - }, - }, - "properties": { - "AddPendingResources": { - "description": "AddPendingResources " - "adds the provided " - "resources (info) to " - "the Juju\n" - "model in a pending " - "state, meaning they " - "are not available " - "until\n" - "resolved. Handles " - "CharmHub and Local " - "charms.", - "properties": { - "Params": {"$ref": "#/definitions/AddPendingResourcesArgsV2"}, - "Result": {"$ref": "#/definitions/AddPendingResourcesResult"}, - }, - "type": "object", - }, - "ListResources": { - "description": "ListResources returns the " - "list of resources for the " - "given application.", - "properties": { - "Params": {"$ref": "#/definitions/ListResourcesArgs"}, - "Result": {"$ref": "#/definitions/ResourcesResults"}, - }, - "type": "object", - }, - }, - "type": "object", - } @ReturnMapping(AddPendingResourcesResult) async def AddPendingResources( @@ -1153,311 +432,6 @@ async def ListResources(self, entities=None): class UserManagerFacade(Type): name = "UserManager" version = 3 - schema = { - "definitions": { - "AddUser": { - "additionalProperties": False, - "properties": { - "display-name": {"type": "string"}, - "password": {"type": "string"}, - "username": {"type": "string"}, - }, - "required": ["username", "display-name"], - "type": "object", - }, - "AddUserResult": { - "additionalProperties": False, - "properties": { - "error": {"$ref": "#/definitions/Error"}, - "secret-key": {"items": {"type": "integer"}, "type": "array"}, - "tag": {"type": "string"}, - }, - "type": "object", - }, - "AddUserResults": { - "additionalProperties": False, - "properties": { - "results": { - "items": {"$ref": "#/definitions/AddUserResult"}, - "type": "array", - } - }, - "required": ["results"], - "type": "object", - }, - "AddUsers": { - "additionalProperties": False, - "properties": { - "users": { - "items": {"$ref": "#/definitions/AddUser"}, - "type": "array", - } - }, - "required": ["users"], - "type": "object", - }, - "Entities": { - "additionalProperties": False, - "properties": { - "entities": { - "items": {"$ref": "#/definitions/Entity"}, - "type": "array", - } - }, - "required": ["entities"], - "type": "object", - }, - "Entity": { - "additionalProperties": False, - "properties": {"tag": {"type": "string"}}, - "required": ["tag"], - "type": "object", - }, - "EntityPassword": { - "additionalProperties": False, - "properties": { - "password": {"type": "string"}, - "tag": {"type": "string"}, - }, - "required": ["tag", "password"], - "type": "object", - }, - "EntityPasswords": { - "additionalProperties": False, - "properties": { - "changes": { - "items": {"$ref": "#/definitions/EntityPassword"}, - "type": "array", - } - }, - "required": ["changes"], - "type": "object", - }, - "Error": { - "additionalProperties": False, - "properties": { - "code": {"type": "string"}, - "info": { - "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", - }, - "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", - }, - "ModelUserInfoResult": { - "additionalProperties": False, - "properties": { - "error": {"$ref": "#/definitions/Error"}, - "result": {"$ref": "#/definitions/ModelUserInfo"}, - }, - "type": "object", - }, - "ModelUserInfoResults": { - "additionalProperties": False, - "properties": { - "results": { - "items": {"$ref": "#/definitions/ModelUserInfoResult"}, - "type": "array", - } - }, - "required": ["results"], - "type": "object", - }, - "UserInfo": { - "additionalProperties": False, - "properties": { - "access": {"type": "string"}, - "created-by": {"type": "string"}, - "date-created": {"format": "date-time", "type": "string"}, - "disabled": {"type": "boolean"}, - "display-name": {"type": "string"}, - "last-connection": {"format": "date-time", "type": "string"}, - "username": {"type": "string"}, - }, - "required": [ - "username", - "display-name", - "access", - "created-by", - "date-created", - "disabled", - ], - "type": "object", - }, - "UserInfoRequest": { - "additionalProperties": False, - "properties": { - "entities": { - "items": {"$ref": "#/definitions/Entity"}, - "type": "array", - }, - "include-disabled": {"type": "boolean"}, - }, - "required": ["entities", "include-disabled"], - "type": "object", - }, - "UserInfoResult": { - "additionalProperties": False, - "properties": { - "error": {"$ref": "#/definitions/Error"}, - "result": {"$ref": "#/definitions/UserInfo"}, - }, - "type": "object", - }, - "UserInfoResults": { - "additionalProperties": False, - "properties": { - "results": { - "items": {"$ref": "#/definitions/UserInfoResult"}, - "type": "array", - } - }, - "required": ["results"], - "type": "object", - }, - }, - "properties": { - "AddUser": { - "description": "AddUser adds a user with a " - "username, and either a password " - "or\n" - "a randomly generated secret key " - "which will be returned.", - "properties": { - "Params": {"$ref": "#/definitions/AddUsers"}, - "Result": {"$ref": "#/definitions/AddUserResults"}, - }, - "type": "object", - }, - "DisableUser": { - "description": "DisableUser disables one or " - "more users. If the user is " - "already disabled,\n" - "the action is considered a " - "success.", - "properties": { - "Params": {"$ref": "#/definitions/Entities"}, - "Result": {"$ref": "#/definitions/ErrorResults"}, - }, - "type": "object", - }, - "EnableUser": { - "description": "EnableUser enables one or more " - "users. If the user is already " - "enabled,\n" - "the action is considered a " - "success.", - "properties": { - "Params": {"$ref": "#/definitions/Entities"}, - "Result": {"$ref": "#/definitions/ErrorResults"}, - }, - "type": "object", - }, - "ModelUserInfo": { - "description": "ModelUserInfo returns " - "information on all users in " - "the model.", - "properties": { - "Params": {"$ref": "#/definitions/Entities"}, - "Result": {"$ref": "#/definitions/ModelUserInfoResults"}, - }, - "type": "object", - }, - "RemoveUser": { - "description": "RemoveUser permanently removes " - "a user from the current " - "controller for each\n" - "entity provided. While the user " - "is permanently removed we keep " - "it's\n" - "information around for auditing " - "purposes.\n" - "TODO(redir): Add information " - "about getting deleted user " - "information when we\n" - "add that capability.", - "properties": { - "Params": {"$ref": "#/definitions/Entities"}, - "Result": {"$ref": "#/definitions/ErrorResults"}, - }, - "type": "object", - }, - "ResetPassword": { - "description": "ResetPassword resets " - "password for supplied users " - "by\n" - "invalidating current " - "passwords (if any) and " - "generating\n" - "new random secret keys which " - "will be returned.\n" - "Users cannot reset their own " - "password.", - "properties": { - "Params": {"$ref": "#/definitions/Entities"}, - "Result": {"$ref": "#/definitions/AddUserResults"}, - }, - "type": "object", - }, - "SetPassword": { - "description": "SetPassword changes the stored " - "password for the specified " - "users.", - "properties": { - "Params": {"$ref": "#/definitions/EntityPasswords"}, - "Result": {"$ref": "#/definitions/ErrorResults"}, - }, - "type": "object", - }, - "UserInfo": { - "description": "UserInfo returns information on a user.", - "properties": { - "Params": {"$ref": "#/definitions/UserInfoRequest"}, - "Result": {"$ref": "#/definitions/UserInfoResults"}, - }, - "type": "object", - }, - }, - "type": "object", - } @ReturnMapping(AddUserResults) async def AddUser(self, users=None): diff --git a/juju/client/_client4.py b/juju/client/_client4.py index 7cb415b99..0e8c68906 100644 --- a/juju/client/_client4.py +++ b/juju/client/_client4.py @@ -8,43 +8,6 @@ class AllModelWatcherFacade(Type): name = "AllModelWatcher" version = 4 - schema = { - "definitions": { - "AllWatcherNextResults": { - "additionalProperties": False, - "properties": { - "deltas": { - "items": {"$ref": "#/definitions/Delta"}, - "type": "array", - } - }, - "required": ["deltas"], - "type": "object", - }, - "Delta": { - "additionalProperties": False, - "properties": { - "entity": {"additionalProperties": True, "type": "object"}, - "removed": {"type": "boolean"}, - }, - "required": ["removed", "entity"], - "type": "object", - }, - }, - "properties": { - "Next": { - "description": "Next will return the current state of " - "everything on the first call\n" - "and subsequent calls will", - "properties": { - "Result": {"$ref": "#/definitions/AllWatcherNextResults"} - }, - "type": "object", - }, - "Stop": {"description": "Stop stops the watcher.", "type": "object"}, - }, - "type": "object", - } @ReturnMapping(AllWatcherNextResults) async def Next(self): @@ -88,579 +51,6 @@ async def rpc(self, msg): class ApplicationOffersFacade(Type): name = "ApplicationOffers" version = 4 - 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", - }, - "ApplicationOfferAdminDetails": { - "additionalProperties": False, - "properties": { - "ApplicationOfferDetails": { - "$ref": "#/definitions/ApplicationOfferDetails" - }, - "application-description": {"type": "string"}, - "application-name": {"type": "string"}, - "bindings": { - "patternProperties": {".*": {"type": "string"}}, - "type": "object", - }, - "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"}, - "spaces": { - "items": {"$ref": "#/definitions/RemoteSpace"}, - "type": "array", - }, - "users": { - "items": {"$ref": "#/definitions/OfferUserDetails"}, - "type": "array", - }, - }, - "required": [ - "source-model-tag", - "offer-uuid", - "offer-url", - "offer-name", - "application-description", - "ApplicationOfferDetails", - "application-name", - "charm-url", - ], - "type": "object", - }, - "ApplicationOfferDetails": { - "additionalProperties": False, - "properties": { - "application-description": {"type": "string"}, - "bindings": { - "patternProperties": {".*": {"type": "string"}}, - "type": "object", - }, - "endpoints": { - "items": {"$ref": "#/definitions/RemoteEndpoint"}, - "type": "array", - }, - "offer-name": {"type": "string"}, - "offer-url": {"type": "string"}, - "offer-uuid": {"type": "string"}, - "source-model-tag": {"type": "string"}, - "spaces": { - "items": {"$ref": "#/definitions/RemoteSpace"}, - "type": "array", - }, - "users": { - "items": {"$ref": "#/definitions/OfferUserDetails"}, - "type": "array", - }, - }, - "required": [ - "source-model-tag", - "offer-uuid", - "offer-url", - "offer-name", - "application-description", - ], - "type": "object", - }, - "ApplicationOfferResult": { - "additionalProperties": False, - "properties": { - "error": {"$ref": "#/definitions/Error"}, - "result": {"$ref": "#/definitions/ApplicationOfferAdminDetails"}, - }, - "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/ApplicationOfferDetails"}, - }, - "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/ApplicationOfferDetails"}, - }, - "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", - }, - "QueryApplicationOffersResults": { - "additionalProperties": False, - "properties": { - "results": { - "items": {"$ref": "#/definitions/ApplicationOfferAdminDetails"}, - "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", - }, - "RemoteSpace": { - "additionalProperties": False, - "properties": { - "cloud-type": {"type": "string"}, - "name": {"type": "string"}, - "provider-attributes": { - "patternProperties": { - ".*": {"additionalProperties": True, "type": "object"} - }, - "type": "object", - }, - "provider-id": {"type": "string"}, - "subnets": { - "items": {"$ref": "#/definitions/Subnet"}, - "type": "array", - }, - }, - "required": [ - "cloud-type", - "name", - "provider-id", - "provider-attributes", - "subnets", - ], - "type": "object", - }, - "Subnet": { - "additionalProperties": False, - "properties": { - "cidr": {"type": "string"}, - "life": {"type": "string"}, - "provider-id": {"type": "string"}, - "provider-network-id": {"type": "string"}, - "provider-space-id": {"type": "string"}, - "space-tag": {"type": "string"}, - "status": {"type": "string"}, - "vlan-tag": {"type": "integer"}, - "zones": {"items": {"type": "string"}, "type": "array"}, - }, - "required": ["cidr", "vlan-tag", "life", "space-tag", "zones"], - "type": "object", - }, - }, - "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/QueryApplicationOffersResults"}, - }, - "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/QueryApplicationOffersResults"}, - }, - "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): @@ -879,258 +269,6 @@ async def RemoteApplicationInfo(self, bakery_version=None, offer_urls=None): class ModelGenerationFacade(Type): name = "ModelGeneration" version = 4 - schema = { - "definitions": { - "BoolResult": { - "additionalProperties": False, - "properties": { - "error": {"$ref": "#/definitions/Error"}, - "result": {"type": "boolean"}, - }, - "required": ["result"], - "type": "object", - }, - "BranchArg": { - "additionalProperties": False, - "properties": {"branch": {"type": "string"}}, - "required": ["branch"], - "type": "object", - }, - "BranchInfoArgs": { - "additionalProperties": False, - "properties": { - "branches": {"items": {"type": "string"}, "type": "array"}, - "detailed": {"type": "boolean"}, - }, - "required": ["branches", "detailed"], - "type": "object", - }, - "BranchResults": { - "additionalProperties": False, - "properties": { - "error": {"$ref": "#/definitions/Error"}, - "generations": { - "items": {"$ref": "#/definitions/Generation"}, - "type": "array", - }, - }, - "required": ["generations"], - "type": "object", - }, - "BranchTrackArg": { - "additionalProperties": False, - "properties": { - "branch": {"type": "string"}, - "entities": { - "items": {"$ref": "#/definitions/Entity"}, - "type": "array", - }, - "num-units": {"type": "integer"}, - }, - "required": ["branch", "entities"], - "type": "object", - }, - "Entity": { - "additionalProperties": False, - "properties": {"tag": {"type": "string"}}, - "required": ["tag"], - "type": "object", - }, - "Error": { - "additionalProperties": False, - "properties": { - "code": {"type": "string"}, - "info": { - "patternProperties": { - ".*": {"additionalProperties": True, "type": "object"} - }, - "type": "object", - }, - "message": {"type": "string"}, - }, - "required": ["message", "code"], - "type": "object", - }, - "ErrorResult": { - "additionalProperties": False, - "properties": {"error": {"$ref": "#/definitions/Error"}}, - "type": "object", - }, - "ErrorResults": { - "additionalProperties": False, - "properties": { - "results": { - "items": {"$ref": "#/definitions/ErrorResult"}, - "type": "array", - } - }, - "required": ["results"], - "type": "object", - }, - "Generation": { - "additionalProperties": False, - "properties": { - "applications": { - "items": {"$ref": "#/definitions/GenerationApplication"}, - "type": "array", - }, - "branch": {"type": "string"}, - "completed": {"type": "integer"}, - "completed-by": {"type": "string"}, - "created": {"type": "integer"}, - "created-by": {"type": "string"}, - "generation-id": {"type": "integer"}, - }, - "required": ["branch", "created", "created-by", "applications"], - "type": "object", - }, - "GenerationApplication": { - "additionalProperties": False, - "properties": { - "application": {"type": "string"}, - "config": { - "patternProperties": { - ".*": {"additionalProperties": True, "type": "object"} - }, - "type": "object", - }, - "pending": {"items": {"type": "string"}, "type": "array"}, - "progress": {"type": "string"}, - "tracking": {"items": {"type": "string"}, "type": "array"}, - }, - "required": ["application", "progress", "config"], - "type": "object", - }, - "GenerationId": { - "additionalProperties": False, - "properties": {"generation-id": {"type": "integer"}}, - "required": ["generation-id"], - "type": "object", - }, - "GenerationResult": { - "additionalProperties": False, - "properties": { - "error": {"$ref": "#/definitions/Error"}, - "generation": {"$ref": "#/definitions/Generation"}, - }, - "required": ["generation"], - "type": "object", - }, - "IntResult": { - "additionalProperties": False, - "properties": { - "error": {"$ref": "#/definitions/Error"}, - "result": {"type": "integer"}, - }, - "required": ["result"], - "type": "object", - }, - }, - "properties": { - "AbortBranch": { - "description": "AbortBranch aborts the input " - "branch, marking it complete. " - "However no\n" - "changes are made applicable to " - "the whole model. No units may " - "be assigned\n" - "to the branch when aborting.", - "properties": { - "Params": {"$ref": "#/definitions/BranchArg"}, - "Result": {"$ref": "#/definitions/ErrorResult"}, - }, - "type": "object", - }, - "AddBranch": { - "description": "AddBranch adds a new branch with " - "the input name to the model.", - "properties": { - "Params": {"$ref": "#/definitions/BranchArg"}, - "Result": {"$ref": "#/definitions/ErrorResult"}, - }, - "type": "object", - }, - "BranchInfo": { - "description": "BranchInfo will return details " - "of branch identified by the " - "input argument,\n" - "including units on the branch " - "and the configuration disjoint " - "with the\n" - "master generation.\n" - "An error is returned if no " - "in-flight branch matching in " - "input is found.", - "properties": { - "Params": {"$ref": "#/definitions/BranchInfoArgs"}, - "Result": {"$ref": "#/definitions/BranchResults"}, - }, - "type": "object", - }, - "CommitBranch": { - "description": "CommitBranch commits the " - "input branch, making its " - "changes applicable to\n" - "the whole model and marking " - "it complete.", - "properties": { - "Params": {"$ref": "#/definitions/BranchArg"}, - "Result": {"$ref": "#/definitions/IntResult"}, - }, - "type": "object", - }, - "HasActiveBranch": { - "description": "HasActiveBranch returns a " - "true result if the input " - 'model has an "in-flight"\n' - "branch matching the input " - "name.", - "properties": { - "Params": {"$ref": "#/definitions/BranchArg"}, - "Result": {"$ref": "#/definitions/BoolResult"}, - }, - "type": "object", - }, - "ListCommits": { - "description": "ListCommits will return the " - "commits, hence only branches " - "with generation_id higher than " - "0", - "properties": {"Result": {"$ref": "#/definitions/BranchResults"}}, - "type": "object", - }, - "ShowCommit": { - "description": "ShowCommit will return details " - "a commit given by its " - "generationId\n" - "An error is returned if either " - "no branch can be found " - "corresponding to the generation " - "id.\n" - "Or the generation id given is " - "below 1.", - "properties": { - "Params": {"$ref": "#/definitions/GenerationId"}, - "Result": {"$ref": "#/definitions/GenerationResult"}, - }, - "type": "object", - }, - "TrackBranch": { - "description": "TrackBranch marks the input " - "units and/or applications as " - "tracking the input\n" - "branch, causing them to " - "realise changes made under " - "that branch.", - "properties": { - "Params": {"$ref": "#/definitions/BranchTrackArg"}, - "Result": {"$ref": "#/definitions/ErrorResults"}, - }, - "type": "object", - }, - }, - "type": "object", - } @ReturnMapping(ErrorResult) async def AbortBranch(self, branch=None): @@ -1319,216 +457,6 @@ async def TrackBranch(self, branch=None, entities=None, num_units=None): class SSHClientFacade(Type): name = "SSHClient" version = 4 - schema = { - "definitions": { - "CloudCredential": { - "additionalProperties": False, - "properties": { - "attrs": { - "patternProperties": {".*": {"type": "string"}}, - "type": "object", - }, - "auth-type": {"type": "string"}, - "redacted": {"items": {"type": "string"}, "type": "array"}, - }, - "required": ["auth-type"], - "type": "object", - }, - "CloudSpec": { - "additionalProperties": False, - "properties": { - "cacertificates": {"items": {"type": "string"}, "type": "array"}, - "credential": {"$ref": "#/definitions/CloudCredential"}, - "endpoint": {"type": "string"}, - "identity-endpoint": {"type": "string"}, - "is-controller-cloud": {"type": "boolean"}, - "name": {"type": "string"}, - "region": {"type": "string"}, - "skip-tls-verify": {"type": "boolean"}, - "storage-endpoint": {"type": "string"}, - "type": {"type": "string"}, - }, - "required": ["type", "name"], - "type": "object", - }, - "CloudSpecResult": { - "additionalProperties": False, - "properties": { - "error": {"$ref": "#/definitions/Error"}, - "result": {"$ref": "#/definitions/CloudSpec"}, - }, - "type": "object", - }, - "Entities": { - "additionalProperties": False, - "properties": { - "entities": { - "items": {"$ref": "#/definitions/Entity"}, - "type": "array", - } - }, - "required": ["entities"], - "type": "object", - }, - "Entity": { - "additionalProperties": False, - "properties": {"tag": {"type": "string"}}, - "required": ["tag"], - "type": "object", - }, - "Error": { - "additionalProperties": False, - "properties": { - "code": {"type": "string"}, - "info": { - "patternProperties": { - ".*": {"additionalProperties": True, "type": "object"} - }, - "type": "object", - }, - "message": {"type": "string"}, - }, - "required": ["message", "code"], - "type": "object", - }, - "SSHAddressResult": { - "additionalProperties": False, - "properties": { - "address": {"type": "string"}, - "error": {"$ref": "#/definitions/Error"}, - }, - "type": "object", - }, - "SSHAddressResults": { - "additionalProperties": False, - "properties": { - "results": { - "items": {"$ref": "#/definitions/SSHAddressResult"}, - "type": "array", - } - }, - "required": ["results"], - "type": "object", - }, - "SSHAddressesResult": { - "additionalProperties": False, - "properties": { - "addresses": {"items": {"type": "string"}, "type": "array"}, - "error": {"$ref": "#/definitions/Error"}, - }, - "required": ["addresses"], - "type": "object", - }, - "SSHAddressesResults": { - "additionalProperties": False, - "properties": { - "results": { - "items": {"$ref": "#/definitions/SSHAddressesResult"}, - "type": "array", - } - }, - "required": ["results"], - "type": "object", - }, - "SSHProxyResult": { - "additionalProperties": False, - "properties": {"use-proxy": {"type": "boolean"}}, - "required": ["use-proxy"], - "type": "object", - }, - "SSHPublicKeysResult": { - "additionalProperties": False, - "properties": { - "error": {"$ref": "#/definitions/Error"}, - "public-keys": {"items": {"type": "string"}, "type": "array"}, - }, - "type": "object", - }, - "SSHPublicKeysResults": { - "additionalProperties": False, - "properties": { - "results": { - "items": {"$ref": "#/definitions/SSHPublicKeysResult"}, - "type": "array", - } - }, - "required": ["results"], - "type": "object", - }, - }, - "properties": { - "AllAddresses": { - "description": "AllAddresses reports all " - "addresses that might have SSH " - "listening for each\n" - "entity in args. The result is " - "sorted with public addresses " - "first.\n" - "Machines and units are " - "supported as entity types.", - "properties": { - "Params": {"$ref": "#/definitions/Entities"}, - "Result": {"$ref": "#/definitions/SSHAddressesResults"}, - }, - "type": "object", - }, - "ModelCredentialForSSH": { - "description": "ModelCredentialForSSH " - "returns a cloud spec " - "for ssh purpose.\n" - "This facade call is " - "only used for k8s " - "model.", - "properties": {"Result": {"$ref": "#/definitions/CloudSpecResult"}}, - "type": "object", - }, - "PrivateAddress": { - "description": "PrivateAddress reports the " - "preferred private network " - "address for one or\n" - "more entities. Machines and " - "units are supported.", - "properties": { - "Params": {"$ref": "#/definitions/Entities"}, - "Result": {"$ref": "#/definitions/SSHAddressResults"}, - }, - "type": "object", - }, - "Proxy": { - "description": "Proxy returns whether SSH " - "connections should be proxied " - "through the\n" - "controller hosts for the model " - "associated with the API connection.", - "properties": {"Result": {"$ref": "#/definitions/SSHProxyResult"}}, - "type": "object", - }, - "PublicAddress": { - "description": "PublicAddress reports the " - "preferred public network " - "address for one\n" - "or more entities. Machines " - "and units are supported.", - "properties": { - "Params": {"$ref": "#/definitions/Entities"}, - "Result": {"$ref": "#/definitions/SSHAddressResults"}, - }, - "type": "object", - }, - "PublicKeys": { - "description": "PublicKeys returns the public " - "SSH hosts for one or more\n" - "entities. Machines and units " - "are supported.", - "properties": { - "Params": {"$ref": "#/definitions/Entities"}, - "Result": {"$ref": "#/definitions/SSHPublicKeysResults"}, - }, - "type": "object", - }, - }, - "type": "object", - } @ReturnMapping(SSHAddressesResults) async def AllAddresses(self, entities=None): diff --git a/juju/client/_client5.py b/juju/client/_client5.py index 418732912..ee64edd44 100644 --- a/juju/client/_client5.py +++ b/juju/client/_client5.py @@ -8,523 +8,6 @@ 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): @@ -743,168 +226,6 @@ async def RemoteApplicationInfo(self, bakery_version=None, offer_urls=None): class SubnetsFacade(Type): name = "Subnets" version = 5 - schema = { - "definitions": { - "CIDRParams": { - "additionalProperties": False, - "properties": {"cidrs": {"items": {"type": "string"}, "type": "array"}}, - "required": ["cidrs"], - "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", - }, - "ListSubnetsResults": { - "additionalProperties": False, - "properties": { - "results": { - "items": {"$ref": "#/definitions/Subnet"}, - "type": "array", - } - }, - "required": ["results"], - "type": "object", - }, - "Subnet": { - "additionalProperties": False, - "properties": { - "cidr": {"type": "string"}, - "life": {"type": "string"}, - "provider-id": {"type": "string"}, - "provider-network-id": {"type": "string"}, - "provider-space-id": {"type": "string"}, - "space-tag": {"type": "string"}, - "status": {"type": "string"}, - "vlan-tag": {"type": "integer"}, - "zones": {"items": {"type": "string"}, "type": "array"}, - }, - "required": ["cidr", "vlan-tag", "life", "space-tag", "zones"], - "type": "object", - }, - "SubnetV2": { - "additionalProperties": False, - "properties": { - "Subnet": {"$ref": "#/definitions/Subnet"}, - "cidr": {"type": "string"}, - "id": {"type": "string"}, - "life": {"type": "string"}, - "provider-id": {"type": "string"}, - "provider-network-id": {"type": "string"}, - "provider-space-id": {"type": "string"}, - "space-tag": {"type": "string"}, - "status": {"type": "string"}, - "vlan-tag": {"type": "integer"}, - "zones": {"items": {"type": "string"}, "type": "array"}, - }, - "required": [ - "cidr", - "vlan-tag", - "life", - "space-tag", - "zones", - "Subnet", - ], - "type": "object", - }, - "SubnetsFilters": { - "additionalProperties": False, - "properties": { - "space-tag": {"type": "string"}, - "zone": {"type": "string"}, - }, - "type": "object", - }, - "SubnetsResult": { - "additionalProperties": False, - "properties": { - "error": {"$ref": "#/definitions/Error"}, - "subnets": { - "items": {"$ref": "#/definitions/SubnetV2"}, - "type": "array", - }, - }, - "type": "object", - }, - "SubnetsResults": { - "additionalProperties": False, - "properties": { - "results": { - "items": {"$ref": "#/definitions/SubnetsResult"}, - "type": "array", - } - }, - "required": ["results"], - "type": "object", - }, - "ZoneResult": { - "additionalProperties": False, - "properties": { - "available": {"type": "boolean"}, - "error": {"$ref": "#/definitions/Error"}, - "name": {"type": "string"}, - }, - "required": ["name", "available"], - "type": "object", - }, - "ZoneResults": { - "additionalProperties": False, - "properties": { - "results": { - "items": {"$ref": "#/definitions/ZoneResult"}, - "type": "array", - } - }, - "required": ["results"], - "type": "object", - }, - }, - "properties": { - "AllZones": { - "description": "AllZones returns all availability " - "zones known to Juju. If a\n" - "zone is unusable, unavailable, or " - "deprecated the Available\n" - "field will be false.", - "properties": {"Result": {"$ref": "#/definitions/ZoneResults"}}, - "type": "object", - }, - "ListSubnets": { - "description": "ListSubnets returns the " - "matching subnets after " - "applying\n" - "optional filters.", - "properties": { - "Params": {"$ref": "#/definitions/SubnetsFilters"}, - "Result": {"$ref": "#/definitions/ListSubnetsResults"}, - }, - "type": "object", - }, - "SubnetsByCIDR": { - "description": "SubnetsByCIDR returns the " - "collection of subnets " - "matching each CIDR in the " - "input.", - "properties": { - "Params": {"$ref": "#/definitions/CIDRParams"}, - "Result": {"$ref": "#/definitions/SubnetsResults"}, - }, - "type": "object", - }, - }, - "type": "object", - } @ReturnMapping(ZoneResults) async def AllZones(self): diff --git a/juju/client/_client6.py b/juju/client/_client6.py index aebf0f98b..29c2cb93c 100644 --- a/juju/client/_client6.py +++ b/juju/client/_client6.py @@ -8,156 +8,6 @@ class BundleFacade(Type): name = "Bundle" version = 6 - schema = { - "definitions": { - "BundleChange": { - "additionalProperties": False, - "properties": { - "args": { - "items": {"additionalProperties": True, "type": "object"}, - "type": "array", - }, - "id": {"type": "string"}, - "method": {"type": "string"}, - "requires": {"items": {"type": "string"}, "type": "array"}, - }, - "required": ["id", "method", "args", "requires"], - "type": "object", - }, - "BundleChangesMapArgs": { - "additionalProperties": False, - "properties": { - "args": { - "patternProperties": { - ".*": {"additionalProperties": True, "type": "object"} - }, - "type": "object", - }, - "id": {"type": "string"}, - "method": {"type": "string"}, - "requires": {"items": {"type": "string"}, "type": "array"}, - }, - "required": ["id", "method", "args", "requires"], - "type": "object", - }, - "BundleChangesMapArgsResults": { - "additionalProperties": False, - "properties": { - "changes": { - "items": {"$ref": "#/definitions/BundleChangesMapArgs"}, - "type": "array", - }, - "errors": {"items": {"type": "string"}, "type": "array"}, - }, - "type": "object", - }, - "BundleChangesParams": { - "additionalProperties": False, - "properties": { - "bundleURL": {"type": "string"}, - "yaml": {"type": "string"}, - }, - "required": ["yaml", "bundleURL"], - "type": "object", - }, - "BundleChangesResults": { - "additionalProperties": False, - "properties": { - "changes": { - "items": {"$ref": "#/definitions/BundleChange"}, - "type": "array", - }, - "errors": {"items": {"type": "string"}, "type": "array"}, - }, - "type": "object", - }, - "Error": { - "additionalProperties": False, - "properties": { - "code": {"type": "string"}, - "info": { - "patternProperties": { - ".*": {"additionalProperties": True, "type": "object"} - }, - "type": "object", - }, - "message": {"type": "string"}, - }, - "required": ["message", "code"], - "type": "object", - }, - "ExportBundleParams": { - "additionalProperties": False, - "properties": { - "include-charm-defaults": {"type": "boolean"}, - "include-series": {"type": "boolean"}, - }, - "type": "object", - }, - "StringResult": { - "additionalProperties": False, - "properties": { - "error": {"$ref": "#/definitions/Error"}, - "result": {"type": "string"}, - }, - "required": ["result"], - "type": "object", - }, - }, - "properties": { - "ExportBundle": { - "description": "ExportBundle exports the " - "current model configuration " - "as bundle.", - "properties": { - "Params": {"$ref": "#/definitions/ExportBundleParams"}, - "Result": {"$ref": "#/definitions/StringResult"}, - }, - "type": "object", - }, - "GetChanges": { - "description": "GetChanges returns the list of " - "changes required to deploy the " - "given bundle\n" - "data. The changes are sorted by " - "requirements, so that they can " - "be applied in\n" - "order.\n" - "GetChanges has been superseded " - "in favour of GetChangesMapArgs. " - "It's\n" - "preferable to use that new " - "method to add new functionality " - "and move clients\n" - "away from this one.", - "properties": { - "Params": {"$ref": "#/definitions/BundleChangesParams"}, - "Result": {"$ref": "#/definitions/BundleChangesResults"}, - }, - "type": "object", - }, - "GetChangesMapArgs": { - "description": "GetChangesMapArgs " - "returns the list of " - "changes required to " - "deploy the given\n" - "bundle data. The changes " - "are sorted by " - "requirements, so that " - "they can be\n" - "applied in order.\n" - "V4 GetChangesMapArgs is " - "not supported on " - "anything less than v4", - "properties": { - "Params": {"$ref": "#/definitions/BundleChangesParams"}, - "Result": {"$ref": "#/definitions/BundleChangesMapArgsResults"}, - }, - "type": "object", - }, - }, - "type": "object", - } @ReturnMapping(StringResult) async def ExportBundle(self, include_charm_defaults=None, include_series=None): @@ -249,682 +99,6 @@ async def GetChangesMapArgs(self, bundleurl=None, yaml=None): class CharmsFacade(Type): name = "Charms" version = 6 - schema = { - "definitions": { - "AddCharmWithOrigin": { - "additionalProperties": False, - "properties": { - "charm-origin": {"$ref": "#/definitions/CharmOrigin"}, - "force": {"type": "boolean"}, - "url": {"type": "string"}, - }, - "required": ["url", "charm-origin", "force"], - "type": "object", - }, - "ApplicationCharmPlacement": { - "additionalProperties": False, - "properties": { - "application": {"type": "string"}, - "charm-url": {"type": "string"}, - }, - "required": ["application", "charm-url"], - "type": "object", - }, - "ApplicationCharmPlacements": { - "additionalProperties": False, - "properties": { - "placements": { - "items": {"$ref": "#/definitions/ApplicationCharmPlacement"}, - "type": "array", - } - }, - "required": ["placements"], - "type": "object", - }, - "Base": { - "additionalProperties": False, - "properties": { - "channel": {"type": "string"}, - "name": {"type": "string"}, - }, - "required": ["name", "channel"], - "type": "object", - }, - "Charm": { - "additionalProperties": False, - "properties": { - "actions": {"$ref": "#/definitions/CharmActions"}, - "config": { - "patternProperties": { - ".*": {"$ref": "#/definitions/CharmOption"} - }, - "type": "object", - }, - "lxd-profile": {"$ref": "#/definitions/CharmLXDProfile"}, - "manifest": {"$ref": "#/definitions/CharmManifest"}, - "meta": {"$ref": "#/definitions/CharmMeta"}, - "metrics": {"$ref": "#/definitions/CharmMetrics"}, - "revision": {"type": "integer"}, - "url": {"type": "string"}, - }, - "required": ["revision", "url", "config"], - "type": "object", - }, - "CharmActionSpec": { - "additionalProperties": False, - "properties": { - "description": {"type": "string"}, - "params": { - "patternProperties": { - ".*": {"additionalProperties": True, "type": "object"} - }, - "type": "object", - }, - }, - "required": ["description", "params"], - "type": "object", - }, - "CharmActions": { - "additionalProperties": False, - "properties": { - "specs": { - "patternProperties": { - ".*": {"$ref": "#/definitions/CharmActionSpec"} - }, - "type": "object", - } - }, - "type": "object", - }, - "CharmBase": { - "additionalProperties": False, - "properties": { - "architectures": {"items": {"type": "string"}, "type": "array"}, - "channel": {"type": "string"}, - "name": {"type": "string"}, - }, - "type": "object", - }, - "CharmContainer": { - "additionalProperties": False, - "properties": { - "mounts": { - "items": {"$ref": "#/definitions/CharmMount"}, - "type": "array", - }, - "resource": {"type": "string"}, - }, - "type": "object", - }, - "CharmDeployment": { - "additionalProperties": False, - "properties": { - "min-version": {"type": "string"}, - "mode": {"type": "string"}, - "service": {"type": "string"}, - "type": {"type": "string"}, - }, - "required": ["type", "mode", "service", "min-version"], - "type": "object", - }, - "CharmDevice": { - "additionalProperties": False, - "properties": { - "CountMax": {"type": "integer"}, - "CountMin": {"type": "integer"}, - "Description": {"type": "string"}, - "Name": {"type": "string"}, - "Type": {"type": "string"}, - }, - "required": ["Name", "Description", "Type", "CountMin", "CountMax"], - "type": "object", - }, - "CharmLXDProfile": { - "additionalProperties": False, - "properties": { - "config": { - "patternProperties": {".*": {"type": "string"}}, - "type": "object", - }, - "description": {"type": "string"}, - "devices": { - "patternProperties": { - ".*": { - "patternProperties": {".*": {"type": "string"}}, - "type": "object", - } - }, - "type": "object", - }, - }, - "required": ["config", "description", "devices"], - "type": "object", - }, - "CharmManifest": { - "additionalProperties": False, - "properties": { - "bases": { - "items": {"$ref": "#/definitions/CharmBase"}, - "type": "array", - } - }, - "type": "object", - }, - "CharmMeta": { - "additionalProperties": False, - "properties": { - "assumes-expr": {"$ref": "#/definitions/ExpressionTree"}, - "categories": {"items": {"type": "string"}, "type": "array"}, - "containers": { - "patternProperties": { - ".*": {"$ref": "#/definitions/CharmContainer"} - }, - "type": "object", - }, - "deployment": {"$ref": "#/definitions/CharmDeployment"}, - "description": {"type": "string"}, - "devices": { - "patternProperties": { - ".*": {"$ref": "#/definitions/CharmDevice"} - }, - "type": "object", - }, - "extra-bindings": { - "patternProperties": {".*": {"type": "string"}}, - "type": "object", - }, - "min-juju-version": {"type": "string"}, - "name": {"type": "string"}, - "payload-classes": { - "patternProperties": { - ".*": {"$ref": "#/definitions/CharmPayloadClass"} - }, - "type": "object", - }, - "peers": { - "patternProperties": { - ".*": {"$ref": "#/definitions/CharmRelation"} - }, - "type": "object", - }, - "provides": { - "patternProperties": { - ".*": {"$ref": "#/definitions/CharmRelation"} - }, - "type": "object", - }, - "requires": { - "patternProperties": { - ".*": {"$ref": "#/definitions/CharmRelation"} - }, - "type": "object", - }, - "resources": { - "patternProperties": { - ".*": {"$ref": "#/definitions/CharmResourceMeta"} - }, - "type": "object", - }, - "series": {"items": {"type": "string"}, "type": "array"}, - "storage": { - "patternProperties": { - ".*": {"$ref": "#/definitions/CharmStorage"} - }, - "type": "object", - }, - "subordinate": {"type": "boolean"}, - "summary": {"type": "string"}, - "tags": {"items": {"type": "string"}, "type": "array"}, - "terms": {"items": {"type": "string"}, "type": "array"}, - }, - "required": ["name", "summary", "description", "subordinate"], - "type": "object", - }, - "CharmMetric": { - "additionalProperties": False, - "properties": { - "description": {"type": "string"}, - "type": {"type": "string"}, - }, - "required": ["type", "description"], - "type": "object", - }, - "CharmMetrics": { - "additionalProperties": False, - "properties": { - "metrics": { - "patternProperties": { - ".*": {"$ref": "#/definitions/CharmMetric"} - }, - "type": "object", - }, - "plan": {"$ref": "#/definitions/CharmPlan"}, - }, - "required": ["metrics", "plan"], - "type": "object", - }, - "CharmMount": { - "additionalProperties": False, - "properties": { - "location": {"type": "string"}, - "storage": {"type": "string"}, - }, - "type": "object", - }, - "CharmOption": { - "additionalProperties": False, - "properties": { - "default": {"additionalProperties": True, "type": "object"}, - "description": {"type": "string"}, - "type": {"type": "string"}, - }, - "required": ["type"], - "type": "object", - }, - "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", - }, - "CharmOriginResult": { - "additionalProperties": False, - "properties": { - "charm-origin": {"$ref": "#/definitions/CharmOrigin"}, - "error": {"$ref": "#/definitions/Error"}, - }, - "required": ["charm-origin"], - "type": "object", - }, - "CharmPayloadClass": { - "additionalProperties": False, - "properties": {"name": {"type": "string"}, "type": {"type": "string"}}, - "required": ["name", "type"], - "type": "object", - }, - "CharmPlan": { - "additionalProperties": False, - "properties": {"required": {"type": "boolean"}}, - "required": ["required"], - "type": "object", - }, - "CharmRelation": { - "additionalProperties": False, - "properties": { - "interface": {"type": "string"}, - "limit": {"type": "integer"}, - "name": {"type": "string"}, - "optional": {"type": "boolean"}, - "role": {"type": "string"}, - "scope": {"type": "string"}, - }, - "required": ["name", "role", "interface", "optional", "limit", "scope"], - "type": "object", - }, - "CharmResource": { - "additionalProperties": False, - "properties": { - "description": {"type": "string"}, - "fingerprint": {"items": {"type": "integer"}, "type": "array"}, - "name": {"type": "string"}, - "origin": {"type": "string"}, - "path": {"type": "string"}, - "revision": {"type": "integer"}, - "size": {"type": "integer"}, - "type": {"type": "string"}, - }, - "required": [ - "name", - "type", - "path", - "origin", - "revision", - "fingerprint", - "size", - ], - "type": "object", - }, - "CharmResourceMeta": { - "additionalProperties": False, - "properties": { - "description": {"type": "string"}, - "name": {"type": "string"}, - "path": {"type": "string"}, - "type": {"type": "string"}, - }, - "required": ["name", "type", "path", "description"], - "type": "object", - }, - "CharmResourceResult": { - "additionalProperties": False, - "properties": { - "CharmResource": {"$ref": "#/definitions/CharmResource"}, - "ErrorResult": {"$ref": "#/definitions/ErrorResult"}, - "description": {"type": "string"}, - "error": {"$ref": "#/definitions/Error"}, - "fingerprint": {"items": {"type": "integer"}, "type": "array"}, - "name": {"type": "string"}, - "origin": {"type": "string"}, - "path": {"type": "string"}, - "revision": {"type": "integer"}, - "size": {"type": "integer"}, - "type": {"type": "string"}, - }, - "required": [ - "ErrorResult", - "name", - "type", - "path", - "origin", - "revision", - "fingerprint", - "size", - "CharmResource", - ], - "type": "object", - }, - "CharmResourcesResults": { - "additionalProperties": False, - "properties": { - "results": { - "items": { - "items": {"$ref": "#/definitions/CharmResourceResult"}, - "type": "array", - }, - "type": "array", - } - }, - "required": ["results"], - "type": "object", - }, - "CharmStorage": { - "additionalProperties": False, - "properties": { - "count-max": {"type": "integer"}, - "count-min": {"type": "integer"}, - "description": {"type": "string"}, - "location": {"type": "string"}, - "minimum-size": {"type": "integer"}, - "name": {"type": "string"}, - "properties": {"items": {"type": "string"}, "type": "array"}, - "read-only": {"type": "boolean"}, - "shared": {"type": "boolean"}, - "type": {"type": "string"}, - }, - "required": [ - "name", - "description", - "type", - "shared", - "read-only", - "count-min", - "count-max", - "minimum-size", - ], - "type": "object", - }, - "CharmURL": { - "additionalProperties": False, - "properties": {"url": {"type": "string"}}, - "required": ["url"], - "type": "object", - }, - "CharmURLAndOrigin": { - "additionalProperties": False, - "properties": { - "charm-origin": {"$ref": "#/definitions/CharmOrigin"}, - "charm-url": {"type": "string"}, - "macaroon": {"$ref": "#/definitions/Macaroon"}, - }, - "required": ["charm-url", "charm-origin"], - "type": "object", - }, - "CharmURLAndOrigins": { - "additionalProperties": False, - "properties": { - "entities": { - "items": {"$ref": "#/definitions/CharmURLAndOrigin"}, - "type": "array", - } - }, - "required": ["entities"], - "type": "object", - }, - "CharmsList": { - "additionalProperties": False, - "properties": {"names": {"items": {"type": "string"}, "type": "array"}}, - "required": ["names"], - "type": "object", - }, - "CharmsListResult": { - "additionalProperties": False, - "properties": { - "charm-urls": {"items": {"type": "string"}, "type": "array"} - }, - "required": ["charm-urls"], - "type": "object", - }, - "DownloadInfoResult": { - "additionalProperties": False, - "properties": { - "charm-origin": {"$ref": "#/definitions/CharmOrigin"}, - "url": {"type": "string"}, - }, - "required": ["url", "charm-origin"], - "type": "object", - }, - "DownloadInfoResults": { - "additionalProperties": False, - "properties": { - "results": { - "items": {"$ref": "#/definitions/DownloadInfoResult"}, - "type": "array", - } - }, - "required": ["results"], - "type": "object", - }, - "Error": { - "additionalProperties": False, - "properties": { - "code": {"type": "string"}, - "info": { - "patternProperties": { - ".*": {"additionalProperties": True, "type": "object"} - }, - "type": "object", - }, - "message": {"type": "string"}, - }, - "required": ["message", "code"], - "type": "object", - }, - "ErrorResult": { - "additionalProperties": False, - "properties": {"error": {"$ref": "#/definitions/Error"}}, - "type": "object", - }, - "ErrorResults": { - "additionalProperties": False, - "properties": { - "results": { - "items": {"$ref": "#/definitions/ErrorResult"}, - "type": "array", - } - }, - "required": ["results"], - "type": "object", - }, - "ExpressionTree": { - "additionalProperties": False, - "properties": { - "Expression": {"additionalProperties": True, "type": "object"} - }, - "required": ["Expression"], - "type": "object", - }, - "IsMeteredResult": { - "additionalProperties": False, - "properties": {"metered": {"type": "boolean"}}, - "required": ["metered"], - "type": "object", - }, - "Macaroon": {"additionalProperties": False, "type": "object"}, - "ResolveCharmWithChannel": { - "additionalProperties": False, - "properties": { - "charm-origin": {"$ref": "#/definitions/CharmOrigin"}, - "reference": {"type": "string"}, - "switch-charm": {"type": "boolean"}, - }, - "required": ["reference", "charm-origin"], - "type": "object", - }, - "ResolveCharmWithChannelResult": { - "additionalProperties": False, - "properties": { - "charm-origin": {"$ref": "#/definitions/CharmOrigin"}, - "error": {"$ref": "#/definitions/Error"}, - "supported-series": {"items": {"type": "string"}, "type": "array"}, - "url": {"type": "string"}, - }, - "required": ["url", "charm-origin", "supported-series"], - "type": "object", - }, - "ResolveCharmWithChannelResults": { - "additionalProperties": False, - "properties": { - "Results": { - "items": { - "$ref": "#/definitions/ResolveCharmWithChannelResult" - }, - "type": "array", - } - }, - "required": ["Results"], - "type": "object", - }, - "ResolveCharmsWithChannel": { - "additionalProperties": False, - "properties": { - "macaroon": {"$ref": "#/definitions/Macaroon"}, - "resolve": { - "items": {"$ref": "#/definitions/ResolveCharmWithChannel"}, - "type": "array", - }, - }, - "required": ["resolve"], - "type": "object", - }, - }, - "properties": { - "AddCharm": { - "description": "AddCharm adds the given charm URL " - "(which must include revision) to " - "the\n" - "environment, if it does not exist " - "yet. Local charms are not " - "supported,\n" - "only charm store and charm hub " - "URLs. See also AddLocalCharm().", - "properties": { - "Params": {"$ref": "#/definitions/AddCharmWithOrigin"}, - "Result": {"$ref": "#/definitions/CharmOriginResult"}, - }, - "type": "object", - }, - "CharmInfo": { - "description": "CharmInfo returns information " - "about the requested charm.", - "properties": { - "Params": {"$ref": "#/definitions/CharmURL"}, - "Result": {"$ref": "#/definitions/Charm"}, - }, - "type": "object", - }, - "CheckCharmPlacement": { - "description": "CheckCharmPlacement " - "checks if a charm is " - "allowed to be placed " - "with in a\n" - "given application.", - "properties": { - "Params": {"$ref": "#/definitions/ApplicationCharmPlacements"}, - "Result": {"$ref": "#/definitions/ErrorResults"}, - }, - "type": "object", - }, - "GetDownloadInfos": { - "description": "GetDownloadInfos attempts " - "to get the bundle " - "corresponding to the " - "charm url\n" - "and origin.", - "properties": { - "Params": {"$ref": "#/definitions/CharmURLAndOrigins"}, - "Result": {"$ref": "#/definitions/DownloadInfoResults"}, - }, - "type": "object", - }, - "IsMetered": { - "description": "IsMetered returns whether or not the charm is metered.", - "properties": { - "Params": {"$ref": "#/definitions/CharmURL"}, - "Result": {"$ref": "#/definitions/IsMeteredResult"}, - }, - "type": "object", - }, - "List": { - "description": "List returns a list of charm URLs " - "currently in the state.\n" - "If supplied parameter contains any " - "names, the result will\n" - "be filtered to return only the charms " - "with supplied names.", - "properties": { - "Params": {"$ref": "#/definitions/CharmsList"}, - "Result": {"$ref": "#/definitions/CharmsListResult"}, - }, - "type": "object", - }, - "ListCharmResources": { - "description": "ListCharmResources " - "returns a series of " - "resources for a given " - "charm.", - "properties": { - "Params": {"$ref": "#/definitions/CharmURLAndOrigins"}, - "Result": {"$ref": "#/definitions/CharmResourcesResults"}, - }, - "type": "object", - }, - "ResolveCharms": { - "description": "ResolveCharms resolves the " - "given charm URLs with an " - "optionally specified\n" - "preferred channel. Channel " - "provided via CharmOrigin.", - "properties": { - "Params": {"$ref": "#/definitions/ResolveCharmsWithChannel"}, - "Result": {"$ref": "#/definitions/ResolveCharmWithChannelResults"}, - }, - "type": "object", - }, - }, - "type": "object", - } @ReturnMapping(CharmOriginResult) async def AddCharm(self, charm_origin=None, force=None, url=None): @@ -1106,640 +280,6 @@ async def ResolveCharms(self, macaroon=None, resolve=None): class ClientFacade(Type): name = "Client" version = 6 - schema = { - "definitions": { - "AllWatcherId": { - "additionalProperties": False, - "properties": {"watcher-id": {"type": "string"}}, - "required": ["watcher-id"], - "type": "object", - }, - "ApplicationOfferStatus": { - "additionalProperties": False, - "properties": { - "active-connected-count": {"type": "integer"}, - "application-name": {"type": "string"}, - "charm": {"type": "string"}, - "endpoints": { - "patternProperties": { - ".*": {"$ref": "#/definitions/RemoteEndpoint"} - }, - "type": "object", - }, - "err": {"$ref": "#/definitions/Error"}, - "offer-name": {"type": "string"}, - "total-connected-count": {"type": "integer"}, - }, - "required": [ - "offer-name", - "application-name", - "charm", - "endpoints", - "active-connected-count", - "total-connected-count", - ], - "type": "object", - }, - "ApplicationStatus": { - "additionalProperties": False, - "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": { - "patternProperties": {".*": {"type": "string"}}, - "type": "object", - }, - "err": {"$ref": "#/definitions/Error"}, - "exposed": {"type": "boolean"}, - "exposed-endpoints": { - "patternProperties": { - ".*": {"$ref": "#/definitions/ExposedEndpoint"} - }, - "type": "object", - }, - "int": {"type": "integer"}, - "life": {"type": "string"}, - "meter-statuses": { - "patternProperties": { - ".*": {"$ref": "#/definitions/MeterStatus"} - }, - "type": "object", - }, - "provider-id": {"type": "string"}, - "public-address": {"type": "string"}, - "relations": { - "patternProperties": { - ".*": {"items": {"type": "string"}, "type": "array"} - }, - "type": "object", - }, - "status": {"$ref": "#/definitions/DetailedStatus"}, - "subordinate-to": {"items": {"type": "string"}, "type": "array"}, - "units": { - "patternProperties": { - ".*": {"$ref": "#/definitions/UnitStatus"} - }, - "type": "object", - }, - "workload-version": {"type": "string"}, - }, - "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", - ], - "type": "object", - }, - "Base": { - "additionalProperties": False, - "properties": { - "channel": {"type": "string"}, - "name": {"type": "string"}, - }, - "required": ["name", "channel"], - "type": "object", - }, - "Binary": { - "additionalProperties": False, - "properties": { - "Arch": {"type": "string"}, - "Build": {"type": "integer"}, - "Major": {"type": "integer"}, - "Minor": {"type": "integer"}, - "Number": {"$ref": "#/definitions/Number"}, - "Patch": {"type": "integer"}, - "Release": {"type": "string"}, - "Tag": {"type": "string"}, - }, - "required": [ - "Major", - "Minor", - "Tag", - "Patch", - "Build", - "Number", - "Release", - "Arch", - ], - "type": "object", - }, - "BranchStatus": { - "additionalProperties": False, - "properties": { - "assigned-units": { - "patternProperties": { - ".*": {"items": {"type": "string"}, "type": "array"} - }, - "type": "object", - }, - "created": {"type": "integer"}, - "created-by": {"type": "string"}, - }, - "required": ["assigned-units", "created", "created-by"], - "type": "object", - }, - "DetailedStatus": { - "additionalProperties": False, - "properties": { - "data": { - "patternProperties": { - ".*": {"additionalProperties": True, "type": "object"} - }, - "type": "object", - }, - "err": {"$ref": "#/definitions/Error"}, - "info": {"type": "string"}, - "kind": {"type": "string"}, - "life": {"type": "string"}, - "since": {"format": "date-time", "type": "string"}, - "status": {"type": "string"}, - "version": {"type": "string"}, - }, - "required": [ - "status", - "info", - "data", - "since", - "kind", - "version", - "life", - ], - "type": "object", - }, - "EndpointStatus": { - "additionalProperties": False, - "properties": { - "application": {"type": "string"}, - "name": {"type": "string"}, - "role": {"type": "string"}, - "subordinate": {"type": "boolean"}, - }, - "required": ["application", "name", "role", "subordinate"], - "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", - }, - "ExposedEndpoint": { - "additionalProperties": False, - "properties": { - "expose-to-cidrs": {"items": {"type": "string"}, "type": "array"}, - "expose-to-spaces": {"items": {"type": "string"}, "type": "array"}, - }, - "type": "object", - }, - "FindToolsParams": { - "additionalProperties": False, - "properties": { - "agentstream": {"type": "string"}, - "arch": {"type": "string"}, - "major": {"type": "integer"}, - "number": {"$ref": "#/definitions/Number"}, - "os-type": {"type": "string"}, - }, - "required": ["number", "major", "arch", "os-type", "agentstream"], - "type": "object", - }, - "FindToolsResult": { - "additionalProperties": False, - "properties": { - "error": {"$ref": "#/definitions/Error"}, - "list": {"items": {"$ref": "#/definitions/Tools"}, "type": "array"}, - }, - "required": ["list"], - "type": "object", - }, - "FullStatus": { - "additionalProperties": False, - "properties": { - "applications": { - "patternProperties": { - ".*": {"$ref": "#/definitions/ApplicationStatus"} - }, - "type": "object", - }, - "branches": { - "patternProperties": { - ".*": {"$ref": "#/definitions/BranchStatus"} - }, - "type": "object", - }, - "controller-timestamp": {"format": "date-time", "type": "string"}, - "machines": { - "patternProperties": { - ".*": {"$ref": "#/definitions/MachineStatus"} - }, - "type": "object", - }, - "model": {"$ref": "#/definitions/ModelStatusInfo"}, - "offers": { - "patternProperties": { - ".*": {"$ref": "#/definitions/ApplicationOfferStatus"} - }, - "type": "object", - }, - "relations": { - "items": {"$ref": "#/definitions/RelationStatus"}, - "type": "array", - }, - "remote-applications": { - "patternProperties": { - ".*": {"$ref": "#/definitions/RemoteApplicationStatus"} - }, - "type": "object", - }, - }, - "required": [ - "model", - "machines", - "applications", - "remote-applications", - "offers", - "relations", - "controller-timestamp", - "branches", - ], - "type": "object", - }, - "History": { - "additionalProperties": False, - "properties": { - "error": {"$ref": "#/definitions/Error"}, - "statuses": { - "items": {"$ref": "#/definitions/DetailedStatus"}, - "type": "array", - }, - }, - "required": ["statuses"], - "type": "object", - }, - "LXDProfile": { - "additionalProperties": False, - "properties": { - "config": { - "patternProperties": {".*": {"type": "string"}}, - "type": "object", - }, - "description": {"type": "string"}, - "devices": { - "patternProperties": { - ".*": { - "patternProperties": {".*": {"type": "string"}}, - "type": "object", - } - }, - "type": "object", - }, - }, - "required": ["config", "description", "devices"], - "type": "object", - }, - "MachineStatus": { - "additionalProperties": False, - "properties": { - "agent-status": {"$ref": "#/definitions/DetailedStatus"}, - "base": {"$ref": "#/definitions/Base"}, - "constraints": {"type": "string"}, - "containers": { - "patternProperties": { - ".*": {"$ref": "#/definitions/MachineStatus"} - }, - "type": "object", - }, - "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": {"items": {"type": "string"}, "type": "array"}, - "jobs": {"items": {"type": "string"}, "type": "array"}, - "lxd-profiles": { - "patternProperties": { - ".*": {"$ref": "#/definitions/LXDProfile"} - }, - "type": "object", - }, - "modification-status": {"$ref": "#/definitions/DetailedStatus"}, - "network-interfaces": { - "patternProperties": { - ".*": {"$ref": "#/definitions/NetworkInterface"} - }, - "type": "object", - }, - "primary-controller-machine": {"type": "boolean"}, - "wants-vote": {"type": "boolean"}, - }, - "required": [ - "agent-status", - "instance-status", - "modification-status", - "dns-name", - "instance-id", - "display-name", - "base", - "id", - "containers", - "constraints", - "hardware", - "jobs", - "has-vote", - "wants-vote", - ], - "type": "object", - }, - "MeterStatus": { - "additionalProperties": False, - "properties": { - "color": {"type": "string"}, - "message": {"type": "string"}, - }, - "required": ["color", "message"], - "type": "object", - }, - "ModelStatusInfo": { - "additionalProperties": False, - "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"}, - }, - "required": [ - "name", - "type", - "cloud-tag", - "version", - "available-version", - "model-status", - "meter-status", - "sla", - ], - "type": "object", - }, - "NetworkInterface": { - "additionalProperties": False, - "properties": { - "dns-nameservers": {"items": {"type": "string"}, "type": "array"}, - "gateway": {"type": "string"}, - "ip-addresses": {"items": {"type": "string"}, "type": "array"}, - "is-up": {"type": "boolean"}, - "mac-address": {"type": "string"}, - "space": {"type": "string"}, - }, - "required": ["ip-addresses", "mac-address", "is-up"], - "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", - }, - "RelationStatus": { - "additionalProperties": False, - "properties": { - "endpoints": { - "items": {"$ref": "#/definitions/EndpointStatus"}, - "type": "array", - }, - "id": {"type": "integer"}, - "interface": {"type": "string"}, - "key": {"type": "string"}, - "scope": {"type": "string"}, - "status": {"$ref": "#/definitions/DetailedStatus"}, - }, - "required": ["id", "key", "interface", "scope", "endpoints", "status"], - "type": "object", - }, - "RemoteApplicationStatus": { - "additionalProperties": False, - "properties": { - "endpoints": { - "items": {"$ref": "#/definitions/RemoteEndpoint"}, - "type": "array", - }, - "err": {"$ref": "#/definitions/Error"}, - "life": {"type": "string"}, - "offer-name": {"type": "string"}, - "offer-url": {"type": "string"}, - "relations": { - "patternProperties": { - ".*": {"items": {"type": "string"}, "type": "array"} - }, - "type": "object", - }, - "status": {"$ref": "#/definitions/DetailedStatus"}, - }, - "required": [ - "offer-url", - "offer-name", - "endpoints", - "life", - "relations", - "status", - ], - "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", - }, - "StatusHistoryFilter": { - "additionalProperties": False, - "properties": { - "date": {"format": "date-time", "type": "string"}, - "delta": {"type": "integer"}, - "exclude": {"items": {"type": "string"}, "type": "array"}, - "size": {"type": "integer"}, - }, - "required": ["size", "date", "delta", "exclude"], - "type": "object", - }, - "StatusHistoryRequest": { - "additionalProperties": False, - "properties": { - "filter": {"$ref": "#/definitions/StatusHistoryFilter"}, - "historyKind": {"type": "string"}, - "size": {"type": "integer"}, - "tag": {"type": "string"}, - }, - "required": ["historyKind", "size", "filter", "tag"], - "type": "object", - }, - "StatusHistoryRequests": { - "additionalProperties": False, - "properties": { - "requests": { - "items": {"$ref": "#/definitions/StatusHistoryRequest"}, - "type": "array", - } - }, - "required": ["requests"], - "type": "object", - }, - "StatusHistoryResult": { - "additionalProperties": False, - "properties": { - "error": {"$ref": "#/definitions/Error"}, - "history": {"$ref": "#/definitions/History"}, - }, - "required": ["history"], - "type": "object", - }, - "StatusHistoryResults": { - "additionalProperties": False, - "properties": { - "results": { - "items": {"$ref": "#/definitions/StatusHistoryResult"}, - "type": "array", - } - }, - "required": ["results"], - "type": "object", - }, - "StatusParams": { - "additionalProperties": False, - "properties": { - "patterns": {"items": {"type": "string"}, "type": "array"} - }, - "required": ["patterns"], - "type": "object", - }, - "Tools": { - "additionalProperties": False, - "properties": { - "sha256": {"type": "string"}, - "size": {"type": "integer"}, - "url": {"type": "string"}, - "version": {"$ref": "#/definitions/Binary"}, - }, - "required": ["version", "url", "size"], - "type": "object", - }, - "UnitStatus": { - "additionalProperties": False, - "properties": { - "address": {"type": "string"}, - "agent-status": {"$ref": "#/definitions/DetailedStatus"}, - "charm": {"type": "string"}, - "leader": {"type": "boolean"}, - "machine": {"type": "string"}, - "opened-ports": {"items": {"type": "string"}, "type": "array"}, - "provider-id": {"type": "string"}, - "public-address": {"type": "string"}, - "subordinates": { - "patternProperties": { - ".*": {"$ref": "#/definitions/UnitStatus"} - }, - "type": "object", - }, - "workload-status": {"$ref": "#/definitions/DetailedStatus"}, - "workload-version": {"type": "string"}, - }, - "required": [ - "agent-status", - "workload-status", - "workload-version", - "machine", - "opened-ports", - "public-address", - "charm", - "subordinates", - ], - "type": "object", - }, - }, - "properties": { - "FindTools": { - "description": "FindTools returns a List " - "containing all tools matching " - "the given parameters.\n" - "TODO(juju 3.1) - remove, used by " - "2.9 client only", - "properties": { - "Params": {"$ref": "#/definitions/FindToolsParams"}, - "Result": {"$ref": "#/definitions/FindToolsResult"}, - }, - "type": "object", - }, - "FullStatus": { - "description": "FullStatus gives the " - "information needed for juju " - "status over the api", - "properties": { - "Params": {"$ref": "#/definitions/StatusParams"}, - "Result": {"$ref": "#/definitions/FullStatus"}, - }, - "type": "object", - }, - "StatusHistory": { - "description": "StatusHistory returns a " - "slice of past statuses for " - "several entities.", - "properties": { - "Params": {"$ref": "#/definitions/StatusHistoryRequests"}, - "Result": {"$ref": "#/definitions/StatusHistoryResults"}, - }, - "type": "object", - }, - "WatchAll": { - "description": "WatchAll initiates a watcher for " - "entities in the connected model.", - "properties": {"Result": {"$ref": "#/definitions/AllWatcherId"}}, - "type": "object", - }, - }, - "type": "object", - } @ReturnMapping(FindToolsResult) async def FindTools( @@ -1838,334 +378,6 @@ async def WatchAll(self): class SpacesFacade(Type): name = "Spaces" version = 6 - schema = { - "definitions": { - "CreateSpaceParams": { - "additionalProperties": False, - "properties": { - "cidrs": {"items": {"type": "string"}, "type": "array"}, - "provider-id": {"type": "string"}, - "public": {"type": "boolean"}, - "space-tag": {"type": "string"}, - }, - "required": ["cidrs", "space-tag", "public"], - "type": "object", - }, - "CreateSpacesParams": { - "additionalProperties": False, - "properties": { - "spaces": { - "items": {"$ref": "#/definitions/CreateSpaceParams"}, - "type": "array", - } - }, - "required": ["spaces"], - "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", - }, - "ListSpacesResults": { - "additionalProperties": False, - "properties": { - "results": { - "items": {"$ref": "#/definitions/Space"}, - "type": "array", - } - }, - "required": ["results"], - "type": "object", - }, - "MoveSubnetsParam": { - "additionalProperties": False, - "properties": { - "force": {"type": "boolean"}, - "space-tag": {"type": "string"}, - "subnets": {"items": {"type": "string"}, "type": "array"}, - }, - "required": ["subnets", "space-tag", "force"], - "type": "object", - }, - "MoveSubnetsParams": { - "additionalProperties": False, - "properties": { - "args": { - "items": {"$ref": "#/definitions/MoveSubnetsParam"}, - "type": "array", - } - }, - "required": ["args"], - "type": "object", - }, - "MoveSubnetsResult": { - "additionalProperties": False, - "properties": { - "error": {"$ref": "#/definitions/Error"}, - "moved-subnets": { - "items": {"$ref": "#/definitions/MovedSubnet"}, - "type": "array", - }, - "new-space": {"type": "string"}, - }, - "required": ["new-space"], - "type": "object", - }, - "MoveSubnetsResults": { - "additionalProperties": False, - "properties": { - "results": { - "items": {"$ref": "#/definitions/MoveSubnetsResult"}, - "type": "array", - } - }, - "required": ["results"], - "type": "object", - }, - "MovedSubnet": { - "additionalProperties": False, - "properties": { - "cidr": {"type": "string"}, - "old-space": {"type": "string"}, - "subnet": {"type": "string"}, - }, - "required": ["subnet", "old-space", "cidr"], - "type": "object", - }, - "RemoveSpaceParam": { - "additionalProperties": False, - "properties": { - "dry-run": {"type": "boolean"}, - "force": {"type": "boolean"}, - "space": {"$ref": "#/definitions/Entity"}, - }, - "required": ["space"], - "type": "object", - }, - "RemoveSpaceParams": { - "additionalProperties": False, - "properties": { - "space-param": { - "items": {"$ref": "#/definitions/RemoveSpaceParam"}, - "type": "array", - } - }, - "required": ["space-param"], - "type": "object", - }, - "RemoveSpaceResult": { - "additionalProperties": False, - "properties": { - "bindings": { - "items": {"$ref": "#/definitions/Entity"}, - "type": "array", - }, - "constraints": { - "items": {"$ref": "#/definitions/Entity"}, - "type": "array", - }, - "controller-settings": { - "items": {"type": "string"}, - "type": "array", - }, - "error": {"$ref": "#/definitions/Error"}, - }, - "type": "object", - }, - "RemoveSpaceResults": { - "additionalProperties": False, - "properties": { - "results": { - "items": {"$ref": "#/definitions/RemoveSpaceResult"}, - "type": "array", - } - }, - "required": ["results"], - "type": "object", - }, - "RenameSpaceParams": { - "additionalProperties": False, - "properties": { - "from-space-tag": {"type": "string"}, - "to-space-tag": {"type": "string"}, - }, - "required": ["from-space-tag", "to-space-tag"], - "type": "object", - }, - "RenameSpacesParams": { - "additionalProperties": False, - "properties": { - "changes": { - "items": {"$ref": "#/definitions/RenameSpaceParams"}, - "type": "array", - } - }, - "required": ["changes"], - "type": "object", - }, - "ShowSpaceResult": { - "additionalProperties": False, - "properties": { - "applications": {"items": {"type": "string"}, "type": "array"}, - "error": {"$ref": "#/definitions/Error"}, - "machine-count": {"type": "integer"}, - "space": {"$ref": "#/definitions/Space"}, - }, - "required": ["space", "applications", "machine-count"], - "type": "object", - }, - "ShowSpaceResults": { - "additionalProperties": False, - "properties": { - "results": { - "items": {"$ref": "#/definitions/ShowSpaceResult"}, - "type": "array", - } - }, - "required": ["results"], - "type": "object", - }, - "Space": { - "additionalProperties": False, - "properties": { - "error": {"$ref": "#/definitions/Error"}, - "id": {"type": "string"}, - "name": {"type": "string"}, - "subnets": { - "items": {"$ref": "#/definitions/Subnet"}, - "type": "array", - }, - }, - "required": ["id", "name", "subnets"], - "type": "object", - }, - "Subnet": { - "additionalProperties": False, - "properties": { - "cidr": {"type": "string"}, - "life": {"type": "string"}, - "provider-id": {"type": "string"}, - "provider-network-id": {"type": "string"}, - "provider-space-id": {"type": "string"}, - "space-tag": {"type": "string"}, - "status": {"type": "string"}, - "vlan-tag": {"type": "integer"}, - "zones": {"items": {"type": "string"}, "type": "array"}, - }, - "required": ["cidr", "vlan-tag", "life", "space-tag", "zones"], - "type": "object", - }, - }, - "properties": { - "CreateSpaces": { - "description": "CreateSpaces creates a new " - "Juju network space, " - "associating the\n" - "specified subnets with it " - "(optional; can be empty).", - "properties": { - "Params": {"$ref": "#/definitions/CreateSpacesParams"}, - "Result": {"$ref": "#/definitions/ErrorResults"}, - }, - "type": "object", - }, - "ListSpaces": { - "description": "ListSpaces lists all the " - "available spaces and their " - "associated subnets.", - "properties": {"Result": {"$ref": "#/definitions/ListSpacesResults"}}, - "type": "object", - }, - "MoveSubnets": { - "description": "MoveSubnets ensures that the " - "input subnets are in the input " - "space.", - "properties": { - "Params": {"$ref": "#/definitions/MoveSubnetsParams"}, - "Result": {"$ref": "#/definitions/MoveSubnetsResults"}, - }, - "type": "object", - }, - "ReloadSpaces": { - "description": "ReloadSpaces refreshes spaces from substrate", - "type": "object", - }, - "RemoveSpace": { - "description": "RemoveSpace removes a space.\n" - "Returns SpaceResults if " - "entities/settings are found " - "which makes the deletion not " - "possible.", - "properties": { - "Params": {"$ref": "#/definitions/RemoveSpaceParams"}, - "Result": {"$ref": "#/definitions/RemoveSpaceResults"}, - }, - "type": "object", - }, - "RenameSpace": { - "description": "RenameSpace renames a space.", - "properties": { - "Params": {"$ref": "#/definitions/RenameSpacesParams"}, - "Result": {"$ref": "#/definitions/ErrorResults"}, - }, - "type": "object", - }, - "ShowSpace": { - "description": "ShowSpace shows the spaces for a " - "set of given entities.", - "properties": { - "Params": {"$ref": "#/definitions/Entities"}, - "Result": {"$ref": "#/definitions/ShowSpaceResults"}, - }, - "type": "object", - }, - }, - "type": "object", - } @ReturnMapping(ErrorResults) async def CreateSpaces(self, spaces=None): @@ -2292,782 +504,6 @@ async def ShowSpace(self, entities=None): class StorageFacade(Type): name = "Storage" version = 6 - schema = { - "definitions": { - "AddStorageDetails": { - "additionalProperties": False, - "properties": { - "storage-tags": {"items": {"type": "string"}, "type": "array"} - }, - "required": ["storage-tags"], - "type": "object", - }, - "AddStorageResult": { - "additionalProperties": False, - "properties": { - "error": {"$ref": "#/definitions/Error"}, - "result": {"$ref": "#/definitions/AddStorageDetails"}, - }, - "type": "object", - }, - "AddStorageResults": { - "additionalProperties": False, - "properties": { - "results": { - "items": {"$ref": "#/definitions/AddStorageResult"}, - "type": "array", - } - }, - "required": ["results"], - "type": "object", - }, - "BulkImportStorageParams": { - "additionalProperties": False, - "properties": { - "storage": { - "items": {"$ref": "#/definitions/ImportStorageParams"}, - "type": "array", - } - }, - "required": ["storage"], - "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", - }, - "FilesystemAttachmentDetails": { - "additionalProperties": False, - "properties": { - "FilesystemAttachmentInfo": { - "$ref": "#/definitions/FilesystemAttachmentInfo" - }, - "life": {"type": "string"}, - "mount-point": {"type": "string"}, - "read-only": {"type": "boolean"}, - }, - "required": ["FilesystemAttachmentInfo"], - "type": "object", - }, - "FilesystemAttachmentInfo": { - "additionalProperties": False, - "properties": { - "mount-point": {"type": "string"}, - "read-only": {"type": "boolean"}, - }, - "type": "object", - }, - "FilesystemDetails": { - "additionalProperties": False, - "properties": { - "filesystem-tag": {"type": "string"}, - "info": {"$ref": "#/definitions/FilesystemInfo"}, - "life": {"type": "string"}, - "machine-attachments": { - "patternProperties": { - ".*": {"$ref": "#/definitions/FilesystemAttachmentDetails"} - }, - "type": "object", - }, - "status": {"$ref": "#/definitions/EntityStatus"}, - "storage": {"$ref": "#/definitions/StorageDetails"}, - "unit-attachments": { - "patternProperties": { - ".*": {"$ref": "#/definitions/FilesystemAttachmentDetails"} - }, - "type": "object", - }, - "volume-tag": {"type": "string"}, - }, - "required": ["filesystem-tag", "info", "status"], - "type": "object", - }, - "FilesystemDetailsListResult": { - "additionalProperties": False, - "properties": { - "error": {"$ref": "#/definitions/Error"}, - "result": { - "items": {"$ref": "#/definitions/FilesystemDetails"}, - "type": "array", - }, - }, - "type": "object", - }, - "FilesystemDetailsListResults": { - "additionalProperties": False, - "properties": { - "results": { - "items": {"$ref": "#/definitions/FilesystemDetailsListResult"}, - "type": "array", - } - }, - "type": "object", - }, - "FilesystemFilter": { - "additionalProperties": False, - "properties": { - "machines": {"items": {"type": "string"}, "type": "array"} - }, - "type": "object", - }, - "FilesystemFilters": { - "additionalProperties": False, - "properties": { - "filters": { - "items": {"$ref": "#/definitions/FilesystemFilter"}, - "type": "array", - } - }, - "type": "object", - }, - "FilesystemInfo": { - "additionalProperties": False, - "properties": { - "filesystem-id": {"type": "string"}, - "pool": {"type": "string"}, - "size": {"type": "integer"}, - }, - "required": ["filesystem-id", "pool", "size"], - "type": "object", - }, - "ImportStorageDetails": { - "additionalProperties": False, - "properties": {"storage-tag": {"type": "string"}}, - "required": ["storage-tag"], - "type": "object", - }, - "ImportStorageParams": { - "additionalProperties": False, - "properties": { - "kind": {"type": "integer"}, - "pool": {"type": "string"}, - "provider-id": {"type": "string"}, - "storage-name": {"type": "string"}, - }, - "required": ["kind", "pool", "provider-id", "storage-name"], - "type": "object", - }, - "ImportStorageResult": { - "additionalProperties": False, - "properties": { - "error": {"$ref": "#/definitions/Error"}, - "result": {"$ref": "#/definitions/ImportStorageDetails"}, - }, - "type": "object", - }, - "ImportStorageResults": { - "additionalProperties": False, - "properties": { - "results": { - "items": {"$ref": "#/definitions/ImportStorageResult"}, - "type": "array", - } - }, - "required": ["results"], - "type": "object", - }, - "RemoveStorage": { - "additionalProperties": False, - "properties": { - "storage": { - "items": {"$ref": "#/definitions/RemoveStorageInstance"}, - "type": "array", - } - }, - "required": ["storage"], - "type": "object", - }, - "RemoveStorageInstance": { - "additionalProperties": False, - "properties": { - "destroy-attachments": {"type": "boolean"}, - "destroy-storage": {"type": "boolean"}, - "force": {"type": "boolean"}, - "max-wait": {"type": "integer"}, - "tag": {"type": "string"}, - }, - "required": ["tag"], - "type": "object", - }, - "StorageAddParams": { - "additionalProperties": False, - "properties": { - "name": {"type": "string"}, - "storage": {"$ref": "#/definitions/StorageConstraints"}, - "unit": {"type": "string"}, - }, - "required": ["unit", "name", "storage"], - "type": "object", - }, - "StorageAttachmentDetails": { - "additionalProperties": False, - "properties": { - "life": {"type": "string"}, - "location": {"type": "string"}, - "machine-tag": {"type": "string"}, - "storage-tag": {"type": "string"}, - "unit-tag": {"type": "string"}, - }, - "required": ["storage-tag", "unit-tag", "machine-tag"], - "type": "object", - }, - "StorageAttachmentId": { - "additionalProperties": False, - "properties": { - "storage-tag": {"type": "string"}, - "unit-tag": {"type": "string"}, - }, - "required": ["storage-tag", "unit-tag"], - "type": "object", - }, - "StorageAttachmentIds": { - "additionalProperties": False, - "properties": { - "ids": { - "items": {"$ref": "#/definitions/StorageAttachmentId"}, - "type": "array", - } - }, - "required": ["ids"], - "type": "object", - }, - "StorageConstraints": { - "additionalProperties": False, - "properties": { - "count": {"type": "integer"}, - "pool": {"type": "string"}, - "size": {"type": "integer"}, - }, - "type": "object", - }, - "StorageDetachmentParams": { - "additionalProperties": False, - "properties": { - "force": {"type": "boolean"}, - "ids": {"$ref": "#/definitions/StorageAttachmentIds"}, - "max-wait": {"type": "integer"}, - }, - "required": ["ids"], - "type": "object", - }, - "StorageDetails": { - "additionalProperties": False, - "properties": { - "attachments": { - "patternProperties": { - ".*": {"$ref": "#/definitions/StorageAttachmentDetails"} - }, - "type": "object", - }, - "kind": {"type": "integer"}, - "life": {"type": "string"}, - "owner-tag": {"type": "string"}, - "persistent": {"type": "boolean"}, - "status": {"$ref": "#/definitions/EntityStatus"}, - "storage-tag": {"type": "string"}, - }, - "required": [ - "storage-tag", - "owner-tag", - "kind", - "status", - "persistent", - ], - "type": "object", - }, - "StorageDetailsListResult": { - "additionalProperties": False, - "properties": { - "error": {"$ref": "#/definitions/Error"}, - "result": { - "items": {"$ref": "#/definitions/StorageDetails"}, - "type": "array", - }, - }, - "type": "object", - }, - "StorageDetailsListResults": { - "additionalProperties": False, - "properties": { - "results": { - "items": {"$ref": "#/definitions/StorageDetailsListResult"}, - "type": "array", - } - }, - "type": "object", - }, - "StorageDetailsResult": { - "additionalProperties": False, - "properties": { - "error": {"$ref": "#/definitions/Error"}, - "result": {"$ref": "#/definitions/StorageDetails"}, - }, - "type": "object", - }, - "StorageDetailsResults": { - "additionalProperties": False, - "properties": { - "results": { - "items": {"$ref": "#/definitions/StorageDetailsResult"}, - "type": "array", - } - }, - "type": "object", - }, - "StorageFilter": {"additionalProperties": False, "type": "object"}, - "StorageFilters": { - "additionalProperties": False, - "properties": { - "filters": { - "items": {"$ref": "#/definitions/StorageFilter"}, - "type": "array", - } - }, - "type": "object", - }, - "StoragePool": { - "additionalProperties": False, - "properties": { - "attrs": { - "patternProperties": { - ".*": {"additionalProperties": True, "type": "object"} - }, - "type": "object", - }, - "name": {"type": "string"}, - "provider": {"type": "string"}, - }, - "required": ["name", "provider", "attrs"], - "type": "object", - }, - "StoragePoolArgs": { - "additionalProperties": False, - "properties": { - "pools": { - "items": {"$ref": "#/definitions/StoragePool"}, - "type": "array", - } - }, - "required": ["pools"], - "type": "object", - }, - "StoragePoolDeleteArg": { - "additionalProperties": False, - "properties": {"name": {"type": "string"}}, - "required": ["name"], - "type": "object", - }, - "StoragePoolDeleteArgs": { - "additionalProperties": False, - "properties": { - "pools": { - "items": {"$ref": "#/definitions/StoragePoolDeleteArg"}, - "type": "array", - } - }, - "required": ["pools"], - "type": "object", - }, - "StoragePoolFilter": { - "additionalProperties": False, - "properties": { - "names": {"items": {"type": "string"}, "type": "array"}, - "providers": {"items": {"type": "string"}, "type": "array"}, - }, - "type": "object", - }, - "StoragePoolFilters": { - "additionalProperties": False, - "properties": { - "filters": { - "items": {"$ref": "#/definitions/StoragePoolFilter"}, - "type": "array", - } - }, - "type": "object", - }, - "StoragePoolsResult": { - "additionalProperties": False, - "properties": { - "error": {"$ref": "#/definitions/Error"}, - "storage-pools": { - "items": {"$ref": "#/definitions/StoragePool"}, - "type": "array", - }, - }, - "type": "object", - }, - "StoragePoolsResults": { - "additionalProperties": False, - "properties": { - "results": { - "items": {"$ref": "#/definitions/StoragePoolsResult"}, - "type": "array", - } - }, - "type": "object", - }, - "StoragesAddParams": { - "additionalProperties": False, - "properties": { - "storages": { - "items": {"$ref": "#/definitions/StorageAddParams"}, - "type": "array", - } - }, - "required": ["storages"], - "type": "object", - }, - "VolumeAttachmentDetails": { - "additionalProperties": False, - "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"}, - }, - "required": ["VolumeAttachmentInfo"], - "type": "object", - }, - "VolumeAttachmentInfo": { - "additionalProperties": False, - "properties": { - "bus-address": {"type": "string"}, - "device-link": {"type": "string"}, - "device-name": {"type": "string"}, - "plan-info": {"$ref": "#/definitions/VolumeAttachmentPlanInfo"}, - "read-only": {"type": "boolean"}, - }, - "type": "object", - }, - "VolumeAttachmentPlanInfo": { - "additionalProperties": False, - "properties": { - "device-attributes": { - "patternProperties": {".*": {"type": "string"}}, - "type": "object", - }, - "device-type": {"type": "string"}, - }, - "type": "object", - }, - "VolumeDetails": { - "additionalProperties": False, - "properties": { - "info": {"$ref": "#/definitions/VolumeInfo"}, - "life": {"type": "string"}, - "machine-attachments": { - "patternProperties": { - ".*": {"$ref": "#/definitions/VolumeAttachmentDetails"} - }, - "type": "object", - }, - "status": {"$ref": "#/definitions/EntityStatus"}, - "storage": {"$ref": "#/definitions/StorageDetails"}, - "unit-attachments": { - "patternProperties": { - ".*": {"$ref": "#/definitions/VolumeAttachmentDetails"} - }, - "type": "object", - }, - "volume-tag": {"type": "string"}, - }, - "required": ["volume-tag", "info", "status"], - "type": "object", - }, - "VolumeDetailsListResult": { - "additionalProperties": False, - "properties": { - "error": {"$ref": "#/definitions/Error"}, - "result": { - "items": {"$ref": "#/definitions/VolumeDetails"}, - "type": "array", - }, - }, - "type": "object", - }, - "VolumeDetailsListResults": { - "additionalProperties": False, - "properties": { - "results": { - "items": {"$ref": "#/definitions/VolumeDetailsListResult"}, - "type": "array", - } - }, - "type": "object", - }, - "VolumeFilter": { - "additionalProperties": False, - "properties": { - "machines": {"items": {"type": "string"}, "type": "array"} - }, - "type": "object", - }, - "VolumeFilters": { - "additionalProperties": False, - "properties": { - "filters": { - "items": {"$ref": "#/definitions/VolumeFilter"}, - "type": "array", - } - }, - "type": "object", - }, - "VolumeInfo": { - "additionalProperties": False, - "properties": { - "hardware-id": {"type": "string"}, - "persistent": {"type": "boolean"}, - "pool": {"type": "string"}, - "size": {"type": "integer"}, - "volume-id": {"type": "string"}, - "wwn": {"type": "string"}, - }, - "required": ["volume-id", "size", "persistent"], - "type": "object", - }, - }, - "properties": { - "AddToUnit": { - "description": "AddToUnit validates and creates " - "additional storage instances for " - "units.\n" - 'A "CHANGE" block can block this ' - "operation.", - "properties": { - "Params": {"$ref": "#/definitions/StoragesAddParams"}, - "Result": {"$ref": "#/definitions/AddStorageResults"}, - }, - "type": "object", - }, - "Attach": { - "description": "Attach attaches existing storage " - "instances to units.\n" - 'A "CHANGE" block can block this ' - "operation.", - "properties": { - "Params": {"$ref": "#/definitions/StorageAttachmentIds"}, - "Result": {"$ref": "#/definitions/ErrorResults"}, - }, - "type": "object", - }, - "CreatePool": { - "description": "CreatePool creates a new pool " - "with specified parameters.", - "properties": { - "Params": {"$ref": "#/definitions/StoragePoolArgs"}, - "Result": {"$ref": "#/definitions/ErrorResults"}, - }, - "type": "object", - }, - "DetachStorage": { - "description": "DetachStorage sets the " - "specified storage " - "attachments to Dying, unless " - "they are\n" - "already Dying or Dead. Any " - "associated, persistent " - "storage will remain\n" - "alive. This call can be " - "forced.", - "properties": { - "Params": {"$ref": "#/definitions/StorageDetachmentParams"}, - "Result": {"$ref": "#/definitions/ErrorResults"}, - }, - "type": "object", - }, - "Import": { - "description": "Import imports existing storage " - "into the model.\n" - 'A "CHANGE" block can block this ' - "operation.", - "properties": { - "Params": {"$ref": "#/definitions/BulkImportStorageParams"}, - "Result": {"$ref": "#/definitions/ImportStorageResults"}, - }, - "type": "object", - }, - "ListFilesystems": { - "description": "ListFilesystems returns a " - "list of filesystems in the " - "environment matching\n" - "the provided filter. Each " - "result describes a " - "filesystem in detail, " - "including\n" - "the filesystem's " - "attachments.", - "properties": { - "Params": {"$ref": "#/definitions/FilesystemFilters"}, - "Result": {"$ref": "#/definitions/FilesystemDetailsListResults"}, - }, - "type": "object", - }, - "ListPools": { - "description": "ListPools returns a list of " - "pools.\n" - "If filter is provided, returned " - "list only contains pools that " - "match\n" - "the filter.\n" - "Pools can be filtered on names " - "and provider types.\n" - "If both names and types are " - "provided as filter,\n" - "pools that match either are " - "returned.\n" - "This method lists union of pools " - "and environment provider types.\n" - "If no filter is provided, all " - "pools are returned.", - "properties": { - "Params": {"$ref": "#/definitions/StoragePoolFilters"}, - "Result": {"$ref": "#/definitions/StoragePoolsResults"}, - }, - "type": "object", - }, - "ListStorageDetails": { - "description": "ListStorageDetails returns storage matching a filter.", - "properties": { - "Params": {"$ref": "#/definitions/StorageFilters"}, - "Result": {"$ref": "#/definitions/StorageDetailsListResults"}, - }, - "type": "object", - }, - "ListVolumes": { - "description": "ListVolumes lists volumes with " - "the given filters. Each filter " - "produces\n" - "an independent list of " - "volumes, or an error if the " - "filter is invalid\n" - "or the volumes could not be " - "listed.", - "properties": { - "Params": {"$ref": "#/definitions/VolumeFilters"}, - "Result": {"$ref": "#/definitions/VolumeDetailsListResults"}, - }, - "type": "object", - }, - "Remove": { - "description": "Remove sets the specified storage " - "entities to Dying, unless they are\n" - "already Dying or Dead, such that " - "the storage will eventually be " - "removed\n" - "from the model. If the arguments " - "specify that the storage should be\n" - "destroyed, then the associated " - "cloud storage will be destroyed " - "first;\n" - "otherwise it will only be released " - "from Juju's control.", - "properties": { - "Params": {"$ref": "#/definitions/RemoveStorage"}, - "Result": {"$ref": "#/definitions/ErrorResults"}, - }, - "type": "object", - }, - "RemovePool": { - "description": "RemovePool deletes the named pool", - "properties": { - "Params": {"$ref": "#/definitions/StoragePoolDeleteArgs"}, - "Result": {"$ref": "#/definitions/ErrorResults"}, - }, - "type": "object", - }, - "StorageDetails": { - "description": "StorageDetails retrieves " - "and returns detailed " - "information about desired\n" - "storage identified by " - "supplied tags. If specified " - "storage cannot be\n" - "retrieved, individual error " - "is returned instead of " - "storage information.", - "properties": { - "Params": {"$ref": "#/definitions/Entities"}, - "Result": {"$ref": "#/definitions/StorageDetailsResults"}, - }, - "type": "object", - }, - "UpdatePool": { - "description": "UpdatePool deletes the named pool", - "properties": { - "Params": {"$ref": "#/definitions/StoragePoolArgs"}, - "Result": {"$ref": "#/definitions/ErrorResults"}, - }, - "type": "object", - }, - }, - "type": "object", - } @ReturnMapping(AddStorageResults) async def AddToUnit(self, storages=None): diff --git a/juju/client/_client7.py b/juju/client/_client7.py index c5790ab45..09efa972c 100644 --- a/juju/client/_client7.py +++ b/juju/client/_client7.py @@ -8,346 +8,6 @@ class ActionFacade(Type): name = "Action" version = 7 - schema = { - "definitions": { - "Action": { - "additionalProperties": False, - "properties": { - "execution-group": {"type": "string"}, - "name": {"type": "string"}, - "parallel": {"type": "boolean"}, - "parameters": { - "patternProperties": { - ".*": {"additionalProperties": True, "type": "object"} - }, - "type": "object", - }, - "receiver": {"type": "string"}, - "tag": {"type": "string"}, - }, - "required": ["tag", "receiver", "name"], - "type": "object", - }, - "ActionMessage": { - "additionalProperties": False, - "properties": { - "message": {"type": "string"}, - "timestamp": {"format": "date-time", "type": "string"}, - }, - "required": ["timestamp", "message"], - "type": "object", - }, - "ActionResult": { - "additionalProperties": False, - "properties": { - "action": {"$ref": "#/definitions/Action"}, - "completed": {"format": "date-time", "type": "string"}, - "enqueued": {"format": "date-time", "type": "string"}, - "error": {"$ref": "#/definitions/Error"}, - "log": { - "items": {"$ref": "#/definitions/ActionMessage"}, - "type": "array", - }, - "message": {"type": "string"}, - "output": { - "patternProperties": { - ".*": {"additionalProperties": True, "type": "object"} - }, - "type": "object", - }, - "started": {"format": "date-time", "type": "string"}, - "status": {"type": "string"}, - }, - "type": "object", - }, - "ActionResults": { - "additionalProperties": False, - "properties": { - "results": { - "items": {"$ref": "#/definitions/ActionResult"}, - "type": "array", - } - }, - "type": "object", - }, - "ActionSpec": { - "additionalProperties": False, - "properties": { - "description": {"type": "string"}, - "params": { - "patternProperties": { - ".*": {"additionalProperties": True, "type": "object"} - }, - "type": "object", - }, - }, - "required": ["description", "params"], - "type": "object", - }, - "Actions": { - "additionalProperties": False, - "properties": { - "actions": { - "items": {"$ref": "#/definitions/Action"}, - "type": "array", - } - }, - "type": "object", - }, - "ApplicationCharmActionsResult": { - "additionalProperties": False, - "properties": { - "actions": { - "patternProperties": { - ".*": {"$ref": "#/definitions/ActionSpec"} - }, - "type": "object", - }, - "application-tag": {"type": "string"}, - "error": {"$ref": "#/definitions/Error"}, - }, - "type": "object", - }, - "ApplicationsCharmActionsResults": { - "additionalProperties": False, - "properties": { - "results": { - "items": { - "$ref": "#/definitions/ApplicationCharmActionsResult" - }, - "type": "array", - } - }, - "type": "object", - }, - "EnqueuedActions": { - "additionalProperties": False, - "properties": { - "actions": { - "items": {"$ref": "#/definitions/ActionResult"}, - "type": "array", - }, - "operation": {"type": "string"}, - }, - "required": ["operation"], - "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", - }, - "OperationQueryArgs": { - "additionalProperties": False, - "properties": { - "actions": {"items": {"type": "string"}, "type": "array"}, - "applications": {"items": {"type": "string"}, "type": "array"}, - "limit": {"type": "integer"}, - "machines": {"items": {"type": "string"}, "type": "array"}, - "offset": {"type": "integer"}, - "status": {"items": {"type": "string"}, "type": "array"}, - "units": {"items": {"type": "string"}, "type": "array"}, - }, - "type": "object", - }, - "OperationResult": { - "additionalProperties": False, - "properties": { - "actions": { - "items": {"$ref": "#/definitions/ActionResult"}, - "type": "array", - }, - "completed": {"format": "date-time", "type": "string"}, - "enqueued": {"format": "date-time", "type": "string"}, - "error": {"$ref": "#/definitions/Error"}, - "fail": {"type": "string"}, - "operation": {"type": "string"}, - "started": {"format": "date-time", "type": "string"}, - "status": {"type": "string"}, - "summary": {"type": "string"}, - }, - "required": ["operation", "summary"], - "type": "object", - }, - "OperationResults": { - "additionalProperties": False, - "properties": { - "results": { - "items": {"$ref": "#/definitions/OperationResult"}, - "type": "array", - }, - "truncated": {"type": "boolean"}, - }, - "type": "object", - }, - "RunParams": { - "additionalProperties": False, - "properties": { - "applications": {"items": {"type": "string"}, "type": "array"}, - "commands": {"type": "string"}, - "execution-group": {"type": "string"}, - "machines": {"items": {"type": "string"}, "type": "array"}, - "parallel": {"type": "boolean"}, - "timeout": {"type": "integer"}, - "units": {"items": {"type": "string"}, "type": "array"}, - "workload-context": {"type": "boolean"}, - }, - "required": ["commands", "timeout"], - "type": "object", - }, - "StringsWatchResult": { - "additionalProperties": False, - "properties": { - "changes": {"items": {"type": "string"}, "type": "array"}, - "error": {"$ref": "#/definitions/Error"}, - "watcher-id": {"type": "string"}, - }, - "required": ["watcher-id"], - "type": "object", - }, - "StringsWatchResults": { - "additionalProperties": False, - "properties": { - "results": { - "items": {"$ref": "#/definitions/StringsWatchResult"}, - "type": "array", - } - }, - "required": ["results"], - "type": "object", - }, - }, - "properties": { - "Actions": { - "description": "Actions takes a list of " - "ActionTags, and returns the full " - "Action for\n" - "each ID.", - "properties": { - "Params": {"$ref": "#/definitions/Entities"}, - "Result": {"$ref": "#/definitions/ActionResults"}, - }, - "type": "object", - }, - "ApplicationsCharmsActions": { - "description": "ApplicationsCharmsActions " - "returns a slice " - "of charm Actions " - "for a slice of\n" - "services.", - "properties": { - "Params": {"$ref": "#/definitions/Entities"}, - "Result": {"$ref": "#/definitions/ApplicationsCharmActionsResults"}, - }, - "type": "object", - }, - "Cancel": { - "description": "Cancel attempts to cancel enqueued " - "Actions from running.", - "properties": { - "Params": {"$ref": "#/definitions/Entities"}, - "Result": {"$ref": "#/definitions/ActionResults"}, - }, - "type": "object", - }, - "EnqueueOperation": { - "description": "EnqueueOperation takes a " - "list of Actions and " - "queues them up to be " - "executed as\n" - "an operation, each action " - "running as a task on the " - "designated " - "ActionReceiver.\n" - "We return the ID of the " - "overall operation and " - "each individual task.", - "properties": { - "Params": {"$ref": "#/definitions/Actions"}, - "Result": {"$ref": "#/definitions/EnqueuedActions"}, - }, - "type": "object", - }, - "ListOperations": { - "description": "ListOperations fetches the " - "called actions for " - "specified apps/units.", - "properties": { - "Params": {"$ref": "#/definitions/OperationQueryArgs"}, - "Result": {"$ref": "#/definitions/OperationResults"}, - }, - "type": "object", - }, - "Operations": { - "description": "Operations fetches the specified operation ids.", - "properties": { - "Params": {"$ref": "#/definitions/Entities"}, - "Result": {"$ref": "#/definitions/OperationResults"}, - }, - "type": "object", - }, - "Run": { - "description": "Run the commands specified on the " - "machines identified through the\n" - "list of machines, units and services.", - "properties": { - "Params": {"$ref": "#/definitions/RunParams"}, - "Result": {"$ref": "#/definitions/EnqueuedActions"}, - }, - "type": "object", - }, - "RunOnAllMachines": { - "description": "RunOnAllMachines attempts " - "to run the specified " - "command on all the " - "machines.", - "properties": { - "Params": {"$ref": "#/definitions/RunParams"}, - "Result": {"$ref": "#/definitions/EnqueuedActions"}, - }, - "type": "object", - }, - "WatchActionsProgress": { - "description": "WatchActionsProgress " - "creates a watcher " - "that reports on " - "action log messages.", - "properties": { - "Params": {"$ref": "#/definitions/Entities"}, - "Result": {"$ref": "#/definitions/StringsWatchResults"}, - }, - "type": "object", - }, - }, - "type": "object", - } @ReturnMapping(ActionResults) async def Actions(self, entities=None): @@ -701,694 +361,6 @@ async def WatchActionsProgress(self, entities=None): class CharmsFacade(Type): name = "Charms" version = 7 - schema = { - "definitions": { - "AddCharmWithOrigin": { - "additionalProperties": False, - "properties": { - "charm-origin": {"$ref": "#/definitions/CharmOrigin"}, - "force": {"type": "boolean"}, - "url": {"type": "string"}, - }, - "required": ["url", "charm-origin", "force"], - "type": "object", - }, - "ApplicationCharmPlacement": { - "additionalProperties": False, - "properties": { - "application": {"type": "string"}, - "charm-url": {"type": "string"}, - }, - "required": ["application", "charm-url"], - "type": "object", - }, - "ApplicationCharmPlacements": { - "additionalProperties": False, - "properties": { - "placements": { - "items": {"$ref": "#/definitions/ApplicationCharmPlacement"}, - "type": "array", - } - }, - "required": ["placements"], - "type": "object", - }, - "Base": { - "additionalProperties": False, - "properties": { - "channel": {"type": "string"}, - "name": {"type": "string"}, - }, - "required": ["name", "channel"], - "type": "object", - }, - "Charm": { - "additionalProperties": False, - "properties": { - "actions": {"$ref": "#/definitions/CharmActions"}, - "config": { - "patternProperties": { - ".*": {"$ref": "#/definitions/CharmOption"} - }, - "type": "object", - }, - "lxd-profile": {"$ref": "#/definitions/CharmLXDProfile"}, - "manifest": {"$ref": "#/definitions/CharmManifest"}, - "meta": {"$ref": "#/definitions/CharmMeta"}, - "metrics": {"$ref": "#/definitions/CharmMetrics"}, - "revision": {"type": "integer"}, - "url": {"type": "string"}, - }, - "required": ["revision", "url", "config"], - "type": "object", - }, - "CharmActionSpec": { - "additionalProperties": False, - "properties": { - "description": {"type": "string"}, - "params": { - "patternProperties": { - ".*": {"additionalProperties": True, "type": "object"} - }, - "type": "object", - }, - }, - "required": ["description", "params"], - "type": "object", - }, - "CharmActions": { - "additionalProperties": False, - "properties": { - "specs": { - "patternProperties": { - ".*": {"$ref": "#/definitions/CharmActionSpec"} - }, - "type": "object", - } - }, - "type": "object", - }, - "CharmBase": { - "additionalProperties": False, - "properties": { - "architectures": {"items": {"type": "string"}, "type": "array"}, - "channel": {"type": "string"}, - "name": {"type": "string"}, - }, - "type": "object", - }, - "CharmContainer": { - "additionalProperties": False, - "properties": { - "gid": {"type": "integer"}, - "mounts": { - "items": {"$ref": "#/definitions/CharmMount"}, - "type": "array", - }, - "resource": {"type": "string"}, - "uid": {"type": "integer"}, - }, - "type": "object", - }, - "CharmDeployment": { - "additionalProperties": False, - "properties": { - "min-version": {"type": "string"}, - "mode": {"type": "string"}, - "service": {"type": "string"}, - "type": {"type": "string"}, - }, - "required": ["type", "mode", "service", "min-version"], - "type": "object", - }, - "CharmDevice": { - "additionalProperties": False, - "properties": { - "CountMax": {"type": "integer"}, - "CountMin": {"type": "integer"}, - "Description": {"type": "string"}, - "Name": {"type": "string"}, - "Type": {"type": "string"}, - }, - "required": ["Name", "Description", "Type", "CountMin", "CountMax"], - "type": "object", - }, - "CharmLXDProfile": { - "additionalProperties": False, - "properties": { - "config": { - "patternProperties": {".*": {"type": "string"}}, - "type": "object", - }, - "description": {"type": "string"}, - "devices": { - "patternProperties": { - ".*": { - "patternProperties": {".*": {"type": "string"}}, - "type": "object", - } - }, - "type": "object", - }, - }, - "required": ["config", "description", "devices"], - "type": "object", - }, - "CharmManifest": { - "additionalProperties": False, - "properties": { - "bases": { - "items": {"$ref": "#/definitions/CharmBase"}, - "type": "array", - } - }, - "type": "object", - }, - "CharmMeta": { - "additionalProperties": False, - "properties": { - "assumes-expr": {"$ref": "#/definitions/ExpressionTree"}, - "categories": {"items": {"type": "string"}, "type": "array"}, - "charm-user": {"type": "string"}, - "containers": { - "patternProperties": { - ".*": {"$ref": "#/definitions/CharmContainer"} - }, - "type": "object", - }, - "deployment": {"$ref": "#/definitions/CharmDeployment"}, - "description": {"type": "string"}, - "devices": { - "patternProperties": { - ".*": {"$ref": "#/definitions/CharmDevice"} - }, - "type": "object", - }, - "extra-bindings": { - "patternProperties": {".*": {"type": "string"}}, - "type": "object", - }, - "min-juju-version": {"type": "string"}, - "name": {"type": "string"}, - "payload-classes": { - "patternProperties": { - ".*": {"$ref": "#/definitions/CharmPayloadClass"} - }, - "type": "object", - }, - "peers": { - "patternProperties": { - ".*": {"$ref": "#/definitions/CharmRelation"} - }, - "type": "object", - }, - "provides": { - "patternProperties": { - ".*": {"$ref": "#/definitions/CharmRelation"} - }, - "type": "object", - }, - "requires": { - "patternProperties": { - ".*": {"$ref": "#/definitions/CharmRelation"} - }, - "type": "object", - }, - "resources": { - "patternProperties": { - ".*": {"$ref": "#/definitions/CharmResourceMeta"} - }, - "type": "object", - }, - "series": {"items": {"type": "string"}, "type": "array"}, - "storage": { - "patternProperties": { - ".*": {"$ref": "#/definitions/CharmStorage"} - }, - "type": "object", - }, - "subordinate": {"type": "boolean"}, - "summary": {"type": "string"}, - "tags": {"items": {"type": "string"}, "type": "array"}, - "terms": {"items": {"type": "string"}, "type": "array"}, - }, - "required": ["name", "summary", "description", "subordinate"], - "type": "object", - }, - "CharmMetric": { - "additionalProperties": False, - "properties": { - "description": {"type": "string"}, - "type": {"type": "string"}, - }, - "required": ["type", "description"], - "type": "object", - }, - "CharmMetrics": { - "additionalProperties": False, - "properties": { - "metrics": { - "patternProperties": { - ".*": {"$ref": "#/definitions/CharmMetric"} - }, - "type": "object", - }, - "plan": {"$ref": "#/definitions/CharmPlan"}, - }, - "required": ["metrics", "plan"], - "type": "object", - }, - "CharmMount": { - "additionalProperties": False, - "properties": { - "location": {"type": "string"}, - "storage": {"type": "string"}, - }, - "type": "object", - }, - "CharmOption": { - "additionalProperties": False, - "properties": { - "default": {"additionalProperties": True, "type": "object"}, - "description": {"type": "string"}, - "type": {"type": "string"}, - }, - "required": ["type"], - "type": "object", - }, - "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", - }, - "CharmOriginResult": { - "additionalProperties": False, - "properties": { - "charm-origin": {"$ref": "#/definitions/CharmOrigin"}, - "error": {"$ref": "#/definitions/Error"}, - }, - "required": ["charm-origin"], - "type": "object", - }, - "CharmPayloadClass": { - "additionalProperties": False, - "properties": {"name": {"type": "string"}, "type": {"type": "string"}}, - "required": ["name", "type"], - "type": "object", - }, - "CharmPlan": { - "additionalProperties": False, - "properties": {"required": {"type": "boolean"}}, - "required": ["required"], - "type": "object", - }, - "CharmRelation": { - "additionalProperties": False, - "properties": { - "interface": {"type": "string"}, - "limit": {"type": "integer"}, - "name": {"type": "string"}, - "optional": {"type": "boolean"}, - "role": {"type": "string"}, - "scope": {"type": "string"}, - }, - "required": ["name", "role", "interface", "optional", "limit", "scope"], - "type": "object", - }, - "CharmResource": { - "additionalProperties": False, - "properties": { - "description": {"type": "string"}, - "fingerprint": {"items": {"type": "integer"}, "type": "array"}, - "name": {"type": "string"}, - "origin": {"type": "string"}, - "path": {"type": "string"}, - "revision": {"type": "integer"}, - "size": {"type": "integer"}, - "type": {"type": "string"}, - }, - "required": [ - "name", - "type", - "path", - "origin", - "revision", - "fingerprint", - "size", - ], - "type": "object", - }, - "CharmResourceMeta": { - "additionalProperties": False, - "properties": { - "description": {"type": "string"}, - "name": {"type": "string"}, - "path": {"type": "string"}, - "type": {"type": "string"}, - }, - "required": ["name", "type", "path", "description"], - "type": "object", - }, - "CharmResourceResult": { - "additionalProperties": False, - "properties": { - "CharmResource": {"$ref": "#/definitions/CharmResource"}, - "ErrorResult": {"$ref": "#/definitions/ErrorResult"}, - "description": {"type": "string"}, - "error": {"$ref": "#/definitions/Error"}, - "fingerprint": {"items": {"type": "integer"}, "type": "array"}, - "name": {"type": "string"}, - "origin": {"type": "string"}, - "path": {"type": "string"}, - "revision": {"type": "integer"}, - "size": {"type": "integer"}, - "type": {"type": "string"}, - }, - "required": [ - "ErrorResult", - "name", - "type", - "path", - "origin", - "revision", - "fingerprint", - "size", - "CharmResource", - ], - "type": "object", - }, - "CharmResourcesResults": { - "additionalProperties": False, - "properties": { - "results": { - "items": { - "items": {"$ref": "#/definitions/CharmResourceResult"}, - "type": "array", - }, - "type": "array", - } - }, - "required": ["results"], - "type": "object", - }, - "CharmStorage": { - "additionalProperties": False, - "properties": { - "count-max": {"type": "integer"}, - "count-min": {"type": "integer"}, - "description": {"type": "string"}, - "location": {"type": "string"}, - "minimum-size": {"type": "integer"}, - "name": {"type": "string"}, - "properties": {"items": {"type": "string"}, "type": "array"}, - "read-only": {"type": "boolean"}, - "shared": {"type": "boolean"}, - "type": {"type": "string"}, - }, - "required": [ - "name", - "description", - "type", - "shared", - "read-only", - "count-min", - "count-max", - "minimum-size", - ], - "type": "object", - }, - "CharmURL": { - "additionalProperties": False, - "properties": {"url": {"type": "string"}}, - "required": ["url"], - "type": "object", - }, - "CharmURLAndOrigin": { - "additionalProperties": False, - "properties": { - "charm-origin": {"$ref": "#/definitions/CharmOrigin"}, - "charm-url": {"type": "string"}, - "macaroon": {"$ref": "#/definitions/Macaroon"}, - }, - "required": ["charm-url", "charm-origin"], - "type": "object", - }, - "CharmURLAndOrigins": { - "additionalProperties": False, - "properties": { - "entities": { - "items": {"$ref": "#/definitions/CharmURLAndOrigin"}, - "type": "array", - } - }, - "required": ["entities"], - "type": "object", - }, - "CharmsList": { - "additionalProperties": False, - "properties": {"names": {"items": {"type": "string"}, "type": "array"}}, - "required": ["names"], - "type": "object", - }, - "CharmsListResult": { - "additionalProperties": False, - "properties": { - "charm-urls": {"items": {"type": "string"}, "type": "array"} - }, - "required": ["charm-urls"], - "type": "object", - }, - "DownloadInfoResult": { - "additionalProperties": False, - "properties": { - "charm-origin": {"$ref": "#/definitions/CharmOrigin"}, - "url": {"type": "string"}, - }, - "required": ["url", "charm-origin"], - "type": "object", - }, - "DownloadInfoResults": { - "additionalProperties": False, - "properties": { - "results": { - "items": {"$ref": "#/definitions/DownloadInfoResult"}, - "type": "array", - } - }, - "required": ["results"], - "type": "object", - }, - "Error": { - "additionalProperties": False, - "properties": { - "code": {"type": "string"}, - "info": { - "patternProperties": { - ".*": {"additionalProperties": True, "type": "object"} - }, - "type": "object", - }, - "message": {"type": "string"}, - }, - "required": ["message", "code"], - "type": "object", - }, - "ErrorResult": { - "additionalProperties": False, - "properties": {"error": {"$ref": "#/definitions/Error"}}, - "type": "object", - }, - "ErrorResults": { - "additionalProperties": False, - "properties": { - "results": { - "items": {"$ref": "#/definitions/ErrorResult"}, - "type": "array", - } - }, - "required": ["results"], - "type": "object", - }, - "ExpressionTree": { - "additionalProperties": False, - "properties": { - "Expression": {"additionalProperties": True, "type": "object"} - }, - "required": ["Expression"], - "type": "object", - }, - "IsMeteredResult": { - "additionalProperties": False, - "properties": {"metered": {"type": "boolean"}}, - "required": ["metered"], - "type": "object", - }, - "Macaroon": {"additionalProperties": False, "type": "object"}, - "ResolveCharmWithChannel": { - "additionalProperties": False, - "properties": { - "charm-origin": {"$ref": "#/definitions/CharmOrigin"}, - "reference": {"type": "string"}, - "switch-charm": {"type": "boolean"}, - }, - "required": ["reference", "charm-origin"], - "type": "object", - }, - "ResolveCharmWithChannelResult": { - "additionalProperties": False, - "properties": { - "charm-origin": {"$ref": "#/definitions/CharmOrigin"}, - "error": {"$ref": "#/definitions/Error"}, - "supported-bases": { - "items": {"$ref": "#/definitions/Base"}, - "type": "array", - }, - "url": {"type": "string"}, - }, - "required": ["url", "charm-origin", "supported-bases"], - "type": "object", - }, - "ResolveCharmWithChannelResults": { - "additionalProperties": False, - "properties": { - "Results": { - "items": { - "$ref": "#/definitions/ResolveCharmWithChannelResult" - }, - "type": "array", - } - }, - "required": ["Results"], - "type": "object", - }, - "ResolveCharmsWithChannel": { - "additionalProperties": False, - "properties": { - "macaroon": {"$ref": "#/definitions/Macaroon"}, - "resolve": { - "items": {"$ref": "#/definitions/ResolveCharmWithChannel"}, - "type": "array", - }, - }, - "required": ["resolve"], - "type": "object", - }, - }, - "properties": { - "AddCharm": { - "description": "AddCharm adds the given charm URL " - "(which must include revision) to " - "the\n" - "environment, if it does not exist " - "yet. Local charms are not " - "supported,\n" - "only charm store and charm hub " - "URLs. See also AddLocalCharm().", - "properties": { - "Params": {"$ref": "#/definitions/AddCharmWithOrigin"}, - "Result": {"$ref": "#/definitions/CharmOriginResult"}, - }, - "type": "object", - }, - "CharmInfo": { - "description": "CharmInfo returns information " - "about the requested charm.", - "properties": { - "Params": {"$ref": "#/definitions/CharmURL"}, - "Result": {"$ref": "#/definitions/Charm"}, - }, - "type": "object", - }, - "CheckCharmPlacement": { - "description": "CheckCharmPlacement " - "checks if a charm is " - "allowed to be placed " - "with in a\n" - "given application.", - "properties": { - "Params": {"$ref": "#/definitions/ApplicationCharmPlacements"}, - "Result": {"$ref": "#/definitions/ErrorResults"}, - }, - "type": "object", - }, - "GetDownloadInfos": { - "description": "GetDownloadInfos attempts " - "to get the bundle " - "corresponding to the " - "charm url\n" - "and origin.", - "properties": { - "Params": {"$ref": "#/definitions/CharmURLAndOrigins"}, - "Result": {"$ref": "#/definitions/DownloadInfoResults"}, - }, - "type": "object", - }, - "IsMetered": { - "description": "IsMetered returns whether or not " - "the charm is metered.\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/CharmURL"}, - "Result": {"$ref": "#/definitions/IsMeteredResult"}, - }, - "type": "object", - }, - "List": { - "description": "List returns a list of charm URLs " - "currently in the state.\n" - "If supplied parameter contains any " - "names, the result will\n" - "be filtered to return only the charms " - "with supplied names.", - "properties": { - "Params": {"$ref": "#/definitions/CharmsList"}, - "Result": {"$ref": "#/definitions/CharmsListResult"}, - }, - "type": "object", - }, - "ListCharmResources": { - "description": "ListCharmResources " - "returns a series of " - "resources for a given " - "charm.", - "properties": { - "Params": {"$ref": "#/definitions/CharmURLAndOrigins"}, - "Result": {"$ref": "#/definitions/CharmResourcesResults"}, - }, - "type": "object", - }, - "ResolveCharms": { - "description": "ResolveCharms resolves the " - "given charm URLs with an " - "optionally specified\n" - "preferred channel. Channel " - "provided via CharmOrigin.", - "properties": { - "Params": {"$ref": "#/definitions/ResolveCharmsWithChannel"}, - "Result": {"$ref": "#/definitions/ResolveCharmWithChannelResults"}, - }, - "type": "object", - }, - }, - "type": "object", - } @ReturnMapping(CharmOriginResult) async def AddCharm(self, charm_origin=None, force=None, url=None): @@ -1572,837 +544,6 @@ async def ResolveCharms(self, macaroon=None, resolve=None): class ClientFacade(Type): name = "Client" version = 7 - schema = { - "definitions": { - "AllWatcherId": { - "additionalProperties": False, - "properties": {"watcher-id": {"type": "string"}}, - "required": ["watcher-id"], - "type": "object", - }, - "ApplicationOfferStatus": { - "additionalProperties": False, - "properties": { - "active-connected-count": {"type": "integer"}, - "application-name": {"type": "string"}, - "charm": {"type": "string"}, - "endpoints": { - "patternProperties": { - ".*": {"$ref": "#/definitions/RemoteEndpoint"} - }, - "type": "object", - }, - "err": {"$ref": "#/definitions/Error"}, - "offer-name": {"type": "string"}, - "total-connected-count": {"type": "integer"}, - }, - "required": [ - "offer-name", - "application-name", - "charm", - "endpoints", - "active-connected-count", - "total-connected-count", - ], - "type": "object", - }, - "ApplicationStatus": { - "additionalProperties": False, - "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": { - "patternProperties": {".*": {"type": "string"}}, - "type": "object", - }, - "err": {"$ref": "#/definitions/Error"}, - "exposed": {"type": "boolean"}, - "exposed-endpoints": { - "patternProperties": { - ".*": {"$ref": "#/definitions/ExposedEndpoint"} - }, - "type": "object", - }, - "int": {"type": "integer"}, - "life": {"type": "string"}, - "meter-statuses": { - "patternProperties": { - ".*": {"$ref": "#/definitions/MeterStatus"} - }, - "type": "object", - }, - "provider-id": {"type": "string"}, - "public-address": {"type": "string"}, - "relations": { - "patternProperties": { - ".*": {"items": {"type": "string"}, "type": "array"} - }, - "type": "object", - }, - "status": {"$ref": "#/definitions/DetailedStatus"}, - "subordinate-to": {"items": {"type": "string"}, "type": "array"}, - "units": { - "patternProperties": { - ".*": {"$ref": "#/definitions/UnitStatus"} - }, - "type": "object", - }, - "workload-version": {"type": "string"}, - }, - "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", - ], - "type": "object", - }, - "Base": { - "additionalProperties": False, - "properties": { - "channel": {"type": "string"}, - "name": {"type": "string"}, - }, - "required": ["name", "channel"], - "type": "object", - }, - "Binary": { - "additionalProperties": False, - "properties": { - "Arch": {"type": "string"}, - "Build": {"type": "integer"}, - "Major": {"type": "integer"}, - "Minor": {"type": "integer"}, - "Number": {"$ref": "#/definitions/Number"}, - "Patch": {"type": "integer"}, - "Release": {"type": "string"}, - "Tag": {"type": "string"}, - }, - "required": [ - "Major", - "Minor", - "Tag", - "Patch", - "Build", - "Number", - "Release", - "Arch", - ], - "type": "object", - }, - "BranchStatus": { - "additionalProperties": False, - "properties": { - "assigned-units": { - "patternProperties": { - ".*": {"items": {"type": "string"}, "type": "array"} - }, - "type": "object", - }, - "created": {"type": "integer"}, - "created-by": {"type": "string"}, - }, - "required": ["assigned-units", "created", "created-by"], - "type": "object", - }, - "DetailedStatus": { - "additionalProperties": False, - "properties": { - "data": { - "patternProperties": { - ".*": {"additionalProperties": True, "type": "object"} - }, - "type": "object", - }, - "err": {"$ref": "#/definitions/Error"}, - "info": {"type": "string"}, - "kind": {"type": "string"}, - "life": {"type": "string"}, - "since": {"format": "date-time", "type": "string"}, - "status": {"type": "string"}, - "version": {"type": "string"}, - }, - "required": [ - "status", - "info", - "data", - "since", - "kind", - "version", - "life", - ], - "type": "object", - }, - "EndpointStatus": { - "additionalProperties": False, - "properties": { - "application": {"type": "string"}, - "name": {"type": "string"}, - "role": {"type": "string"}, - "subordinate": {"type": "boolean"}, - }, - "required": ["application", "name", "role", "subordinate"], - "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", - }, - "ExposedEndpoint": { - "additionalProperties": False, - "properties": { - "expose-to-cidrs": {"items": {"type": "string"}, "type": "array"}, - "expose-to-spaces": {"items": {"type": "string"}, "type": "array"}, - }, - "type": "object", - }, - "FilesystemAttachmentDetails": { - "additionalProperties": False, - "properties": { - "FilesystemAttachmentInfo": { - "$ref": "#/definitions/FilesystemAttachmentInfo" - }, - "life": {"type": "string"}, - "mount-point": {"type": "string"}, - "read-only": {"type": "boolean"}, - }, - "required": ["FilesystemAttachmentInfo"], - "type": "object", - }, - "FilesystemAttachmentInfo": { - "additionalProperties": False, - "properties": { - "mount-point": {"type": "string"}, - "read-only": {"type": "boolean"}, - }, - "type": "object", - }, - "FilesystemDetails": { - "additionalProperties": False, - "properties": { - "filesystem-tag": {"type": "string"}, - "info": {"$ref": "#/definitions/FilesystemInfo"}, - "life": {"type": "string"}, - "machine-attachments": { - "patternProperties": { - ".*": {"$ref": "#/definitions/FilesystemAttachmentDetails"} - }, - "type": "object", - }, - "status": {"$ref": "#/definitions/EntityStatus"}, - "storage": {"$ref": "#/definitions/StorageDetails"}, - "unit-attachments": { - "patternProperties": { - ".*": {"$ref": "#/definitions/FilesystemAttachmentDetails"} - }, - "type": "object", - }, - "volume-tag": {"type": "string"}, - }, - "required": ["filesystem-tag", "info", "status"], - "type": "object", - }, - "FilesystemInfo": { - "additionalProperties": False, - "properties": { - "filesystem-id": {"type": "string"}, - "pool": {"type": "string"}, - "size": {"type": "integer"}, - }, - "required": ["filesystem-id", "pool", "size"], - "type": "object", - }, - "FindToolsParams": { - "additionalProperties": False, - "properties": { - "agentstream": {"type": "string"}, - "arch": {"type": "string"}, - "major": {"type": "integer"}, - "number": {"$ref": "#/definitions/Number"}, - "os-type": {"type": "string"}, - }, - "required": ["number", "major", "arch", "os-type", "agentstream"], - "type": "object", - }, - "FindToolsResult": { - "additionalProperties": False, - "properties": { - "error": {"$ref": "#/definitions/Error"}, - "list": {"items": {"$ref": "#/definitions/Tools"}, "type": "array"}, - }, - "required": ["list"], - "type": "object", - }, - "FullStatus": { - "additionalProperties": False, - "properties": { - "applications": { - "patternProperties": { - ".*": {"$ref": "#/definitions/ApplicationStatus"} - }, - "type": "object", - }, - "branches": { - "patternProperties": { - ".*": {"$ref": "#/definitions/BranchStatus"} - }, - "type": "object", - }, - "controller-timestamp": {"format": "date-time", "type": "string"}, - "filesystems": { - "items": {"$ref": "#/definitions/FilesystemDetails"}, - "type": "array", - }, - "machines": { - "patternProperties": { - ".*": {"$ref": "#/definitions/MachineStatus"} - }, - "type": "object", - }, - "model": {"$ref": "#/definitions/ModelStatusInfo"}, - "offers": { - "patternProperties": { - ".*": {"$ref": "#/definitions/ApplicationOfferStatus"} - }, - "type": "object", - }, - "relations": { - "items": {"$ref": "#/definitions/RelationStatus"}, - "type": "array", - }, - "remote-applications": { - "patternProperties": { - ".*": {"$ref": "#/definitions/RemoteApplicationStatus"} - }, - "type": "object", - }, - "storage": { - "items": {"$ref": "#/definitions/StorageDetails"}, - "type": "array", - }, - "volumes": { - "items": {"$ref": "#/definitions/VolumeDetails"}, - "type": "array", - }, - }, - "required": [ - "model", - "machines", - "applications", - "remote-applications", - "offers", - "relations", - "controller-timestamp", - "branches", - ], - "type": "object", - }, - "History": { - "additionalProperties": False, - "properties": { - "error": {"$ref": "#/definitions/Error"}, - "statuses": { - "items": {"$ref": "#/definitions/DetailedStatus"}, - "type": "array", - }, - }, - "required": ["statuses"], - "type": "object", - }, - "LXDProfile": { - "additionalProperties": False, - "properties": { - "config": { - "patternProperties": {".*": {"type": "string"}}, - "type": "object", - }, - "description": {"type": "string"}, - "devices": { - "patternProperties": { - ".*": { - "patternProperties": {".*": {"type": "string"}}, - "type": "object", - } - }, - "type": "object", - }, - }, - "required": ["config", "description", "devices"], - "type": "object", - }, - "MachineStatus": { - "additionalProperties": False, - "properties": { - "agent-status": {"$ref": "#/definitions/DetailedStatus"}, - "base": {"$ref": "#/definitions/Base"}, - "constraints": {"type": "string"}, - "containers": { - "patternProperties": { - ".*": {"$ref": "#/definitions/MachineStatus"} - }, - "type": "object", - }, - "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": {"items": {"type": "string"}, "type": "array"}, - "jobs": {"items": {"type": "string"}, "type": "array"}, - "lxd-profiles": { - "patternProperties": { - ".*": {"$ref": "#/definitions/LXDProfile"} - }, - "type": "object", - }, - "modification-status": {"$ref": "#/definitions/DetailedStatus"}, - "network-interfaces": { - "patternProperties": { - ".*": {"$ref": "#/definitions/NetworkInterface"} - }, - "type": "object", - }, - "primary-controller-machine": {"type": "boolean"}, - "wants-vote": {"type": "boolean"}, - }, - "required": [ - "agent-status", - "instance-status", - "modification-status", - "dns-name", - "instance-id", - "display-name", - "base", - "id", - "containers", - "constraints", - "hardware", - "jobs", - "has-vote", - "wants-vote", - ], - "type": "object", - }, - "MeterStatus": { - "additionalProperties": False, - "properties": { - "color": {"type": "string"}, - "message": {"type": "string"}, - }, - "required": ["color", "message"], - "type": "object", - }, - "ModelStatusInfo": { - "additionalProperties": False, - "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"}, - }, - "required": [ - "name", - "type", - "cloud-tag", - "version", - "available-version", - "model-status", - "meter-status", - "sla", - ], - "type": "object", - }, - "NetworkInterface": { - "additionalProperties": False, - "properties": { - "dns-nameservers": {"items": {"type": "string"}, "type": "array"}, - "gateway": {"type": "string"}, - "ip-addresses": {"items": {"type": "string"}, "type": "array"}, - "is-up": {"type": "boolean"}, - "mac-address": {"type": "string"}, - "space": {"type": "string"}, - }, - "required": ["ip-addresses", "mac-address", "is-up"], - "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", - }, - "RelationStatus": { - "additionalProperties": False, - "properties": { - "endpoints": { - "items": {"$ref": "#/definitions/EndpointStatus"}, - "type": "array", - }, - "id": {"type": "integer"}, - "interface": {"type": "string"}, - "key": {"type": "string"}, - "scope": {"type": "string"}, - "status": {"$ref": "#/definitions/DetailedStatus"}, - }, - "required": ["id", "key", "interface", "scope", "endpoints", "status"], - "type": "object", - }, - "RemoteApplicationStatus": { - "additionalProperties": False, - "properties": { - "endpoints": { - "items": {"$ref": "#/definitions/RemoteEndpoint"}, - "type": "array", - }, - "err": {"$ref": "#/definitions/Error"}, - "life": {"type": "string"}, - "offer-name": {"type": "string"}, - "offer-url": {"type": "string"}, - "relations": { - "patternProperties": { - ".*": {"items": {"type": "string"}, "type": "array"} - }, - "type": "object", - }, - "status": {"$ref": "#/definitions/DetailedStatus"}, - }, - "required": [ - "offer-url", - "offer-name", - "endpoints", - "life", - "relations", - "status", - ], - "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", - }, - "StatusHistoryFilter": { - "additionalProperties": False, - "properties": { - "date": {"format": "date-time", "type": "string"}, - "delta": {"type": "integer"}, - "exclude": {"items": {"type": "string"}, "type": "array"}, - "size": {"type": "integer"}, - }, - "required": ["size", "date", "delta", "exclude"], - "type": "object", - }, - "StatusHistoryRequest": { - "additionalProperties": False, - "properties": { - "filter": {"$ref": "#/definitions/StatusHistoryFilter"}, - "historyKind": {"type": "string"}, - "size": {"type": "integer"}, - "tag": {"type": "string"}, - }, - "required": ["historyKind", "size", "filter", "tag"], - "type": "object", - }, - "StatusHistoryRequests": { - "additionalProperties": False, - "properties": { - "requests": { - "items": {"$ref": "#/definitions/StatusHistoryRequest"}, - "type": "array", - } - }, - "required": ["requests"], - "type": "object", - }, - "StatusHistoryResult": { - "additionalProperties": False, - "properties": { - "error": {"$ref": "#/definitions/Error"}, - "history": {"$ref": "#/definitions/History"}, - }, - "required": ["history"], - "type": "object", - }, - "StatusHistoryResults": { - "additionalProperties": False, - "properties": { - "results": { - "items": {"$ref": "#/definitions/StatusHistoryResult"}, - "type": "array", - } - }, - "required": ["results"], - "type": "object", - }, - "StatusParams": { - "additionalProperties": False, - "properties": { - "include-storage": {"type": "boolean"}, - "patterns": {"items": {"type": "string"}, "type": "array"}, - }, - "required": ["patterns"], - "type": "object", - }, - "StorageAttachmentDetails": { - "additionalProperties": False, - "properties": { - "life": {"type": "string"}, - "location": {"type": "string"}, - "machine-tag": {"type": "string"}, - "storage-tag": {"type": "string"}, - "unit-tag": {"type": "string"}, - }, - "required": ["storage-tag", "unit-tag", "machine-tag"], - "type": "object", - }, - "StorageDetails": { - "additionalProperties": False, - "properties": { - "attachments": { - "patternProperties": { - ".*": {"$ref": "#/definitions/StorageAttachmentDetails"} - }, - "type": "object", - }, - "kind": {"type": "integer"}, - "life": {"type": "string"}, - "owner-tag": {"type": "string"}, - "persistent": {"type": "boolean"}, - "status": {"$ref": "#/definitions/EntityStatus"}, - "storage-tag": {"type": "string"}, - }, - "required": [ - "storage-tag", - "owner-tag", - "kind", - "status", - "persistent", - ], - "type": "object", - }, - "Tools": { - "additionalProperties": False, - "properties": { - "sha256": {"type": "string"}, - "size": {"type": "integer"}, - "url": {"type": "string"}, - "version": {"$ref": "#/definitions/Binary"}, - }, - "required": ["version", "url", "size"], - "type": "object", - }, - "UnitStatus": { - "additionalProperties": False, - "properties": { - "address": {"type": "string"}, - "agent-status": {"$ref": "#/definitions/DetailedStatus"}, - "charm": {"type": "string"}, - "leader": {"type": "boolean"}, - "machine": {"type": "string"}, - "opened-ports": {"items": {"type": "string"}, "type": "array"}, - "provider-id": {"type": "string"}, - "public-address": {"type": "string"}, - "subordinates": { - "patternProperties": { - ".*": {"$ref": "#/definitions/UnitStatus"} - }, - "type": "object", - }, - "workload-status": {"$ref": "#/definitions/DetailedStatus"}, - "workload-version": {"type": "string"}, - }, - "required": [ - "agent-status", - "workload-status", - "workload-version", - "machine", - "opened-ports", - "public-address", - "charm", - "subordinates", - ], - "type": "object", - }, - "VolumeAttachmentDetails": { - "additionalProperties": False, - "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"}, - }, - "required": ["VolumeAttachmentInfo"], - "type": "object", - }, - "VolumeAttachmentInfo": { - "additionalProperties": False, - "properties": { - "bus-address": {"type": "string"}, - "device-link": {"type": "string"}, - "device-name": {"type": "string"}, - "plan-info": {"$ref": "#/definitions/VolumeAttachmentPlanInfo"}, - "read-only": {"type": "boolean"}, - }, - "type": "object", - }, - "VolumeAttachmentPlanInfo": { - "additionalProperties": False, - "properties": { - "device-attributes": { - "patternProperties": {".*": {"type": "string"}}, - "type": "object", - }, - "device-type": {"type": "string"}, - }, - "type": "object", - }, - "VolumeDetails": { - "additionalProperties": False, - "properties": { - "info": {"$ref": "#/definitions/VolumeInfo"}, - "life": {"type": "string"}, - "machine-attachments": { - "patternProperties": { - ".*": {"$ref": "#/definitions/VolumeAttachmentDetails"} - }, - "type": "object", - }, - "status": {"$ref": "#/definitions/EntityStatus"}, - "storage": {"$ref": "#/definitions/StorageDetails"}, - "unit-attachments": { - "patternProperties": { - ".*": {"$ref": "#/definitions/VolumeAttachmentDetails"} - }, - "type": "object", - }, - "volume-tag": {"type": "string"}, - }, - "required": ["volume-tag", "info", "status"], - "type": "object", - }, - "VolumeInfo": { - "additionalProperties": False, - "properties": { - "hardware-id": {"type": "string"}, - "persistent": {"type": "boolean"}, - "pool": {"type": "string"}, - "size": {"type": "integer"}, - "volume-id": {"type": "string"}, - "wwn": {"type": "string"}, - }, - "required": ["volume-id", "size", "persistent"], - "type": "object", - }, - }, - "properties": { - "FindTools": { - "description": "FindTools returns a List " - "containing all tools matching " - "the given parameters.\n" - "TODO(juju 3.1) - remove, used by " - "2.9 client only", - "properties": { - "Params": {"$ref": "#/definitions/FindToolsParams"}, - "Result": {"$ref": "#/definitions/FindToolsResult"}, - }, - "type": "object", - }, - "FullStatus": { - "description": "FullStatus gives the " - "information needed for juju " - "status over the api", - "properties": { - "Params": {"$ref": "#/definitions/StatusParams"}, - "Result": {"$ref": "#/definitions/FullStatus"}, - }, - "type": "object", - }, - "StatusHistory": { - "description": "StatusHistory returns a " - "slice of past statuses for " - "several entities.", - "properties": { - "Params": {"$ref": "#/definitions/StatusHistoryRequests"}, - "Result": {"$ref": "#/definitions/StatusHistoryResults"}, - }, - "type": "object", - }, - "WatchAll": { - "description": "WatchAll initiates a watcher for " - "entities in the connected model.", - "properties": {"Result": {"$ref": "#/definitions/AllWatcherId"}}, - "type": "object", - }, - }, - "type": "object", - } @ReturnMapping(FindToolsResult) async def FindTools( @@ -2508,844 +649,6 @@ async def WatchAll(self): class CloudFacade(Type): name = "Cloud" version = 7 - schema = { - "definitions": { - "AddCloudArgs": { - "additionalProperties": False, - "properties": { - "cloud": {"$ref": "#/definitions/Cloud"}, - "force": {"type": "boolean"}, - "name": {"type": "string"}, - }, - "required": ["cloud", "name"], - "type": "object", - }, - "Cloud": { - "additionalProperties": False, - "properties": { - "auth-types": {"items": {"type": "string"}, "type": "array"}, - "ca-certificates": {"items": {"type": "string"}, "type": "array"}, - "config": { - "patternProperties": { - ".*": {"additionalProperties": True, "type": "object"} - }, - "type": "object", - }, - "endpoint": {"type": "string"}, - "host-cloud-region": {"type": "string"}, - "identity-endpoint": {"type": "string"}, - "is-controller-cloud": {"type": "boolean"}, - "region-config": { - "patternProperties": { - ".*": { - "patternProperties": { - ".*": { - "additionalProperties": True, - "type": "object", - } - }, - "type": "object", - } - }, - "type": "object", - }, - "regions": { - "items": {"$ref": "#/definitions/CloudRegion"}, - "type": "array", - }, - "skip-tls-verify": {"type": "boolean"}, - "storage-endpoint": {"type": "string"}, - "type": {"type": "string"}, - }, - "required": ["type"], - "type": "object", - }, - "CloudCredential": { - "additionalProperties": False, - "properties": { - "attrs": { - "patternProperties": {".*": {"type": "string"}}, - "type": "object", - }, - "auth-type": {"type": "string"}, - "redacted": {"items": {"type": "string"}, "type": "array"}, - }, - "required": ["auth-type"], - "type": "object", - }, - "CloudCredentialArg": { - "additionalProperties": False, - "properties": { - "cloud-name": {"type": "string"}, - "credential-name": {"type": "string"}, - }, - "required": ["cloud-name", "credential-name"], - "type": "object", - }, - "CloudCredentialArgs": { - "additionalProperties": False, - "properties": { - "credentials": { - "items": {"$ref": "#/definitions/CloudCredentialArg"}, - "type": "array", - }, - "include-secrets": {"type": "boolean"}, - }, - "required": ["include-secrets"], - "type": "object", - }, - "CloudCredentialResult": { - "additionalProperties": False, - "properties": { - "error": {"$ref": "#/definitions/Error"}, - "result": {"$ref": "#/definitions/CloudCredential"}, - }, - "type": "object", - }, - "CloudCredentialResults": { - "additionalProperties": False, - "properties": { - "results": { - "items": {"$ref": "#/definitions/CloudCredentialResult"}, - "type": "array", - } - }, - "type": "object", - }, - "CloudDetails": { - "additionalProperties": False, - "properties": { - "auth-types": {"items": {"type": "string"}, "type": "array"}, - "endpoint": {"type": "string"}, - "identity-endpoint": {"type": "string"}, - "regions": { - "items": {"$ref": "#/definitions/CloudRegion"}, - "type": "array", - }, - "storage-endpoint": {"type": "string"}, - "type": {"type": "string"}, - }, - "required": ["type"], - "type": "object", - }, - "CloudInfo": { - "additionalProperties": False, - "properties": { - "CloudDetails": {"$ref": "#/definitions/CloudDetails"}, - "users": { - "items": {"$ref": "#/definitions/CloudUserInfo"}, - "type": "array", - }, - }, - "required": ["CloudDetails", "users"], - "type": "object", - }, - "CloudInfoResult": { - "additionalProperties": False, - "properties": { - "error": {"$ref": "#/definitions/Error"}, - "result": {"$ref": "#/definitions/CloudInfo"}, - }, - "type": "object", - }, - "CloudInfoResults": { - "additionalProperties": False, - "properties": { - "results": { - "items": {"$ref": "#/definitions/CloudInfoResult"}, - "type": "array", - } - }, - "required": ["results"], - "type": "object", - }, - "CloudInstanceTypesConstraint": { - "additionalProperties": False, - "properties": { - "cloud-tag": {"type": "string"}, - "constraints": {"$ref": "#/definitions/Value"}, - "region": {"type": "string"}, - }, - "required": ["cloud-tag", "region"], - "type": "object", - }, - "CloudInstanceTypesConstraints": { - "additionalProperties": False, - "properties": { - "constraints": { - "items": {"$ref": "#/definitions/CloudInstanceTypesConstraint"}, - "type": "array", - } - }, - "required": ["constraints"], - "type": "object", - }, - "CloudRegion": { - "additionalProperties": False, - "properties": { - "endpoint": {"type": "string"}, - "identity-endpoint": {"type": "string"}, - "name": {"type": "string"}, - "storage-endpoint": {"type": "string"}, - }, - "required": ["name"], - "type": "object", - }, - "CloudResult": { - "additionalProperties": False, - "properties": { - "cloud": {"$ref": "#/definitions/Cloud"}, - "error": {"$ref": "#/definitions/Error"}, - }, - "type": "object", - }, - "CloudResults": { - "additionalProperties": False, - "properties": { - "results": { - "items": {"$ref": "#/definitions/CloudResult"}, - "type": "array", - } - }, - "type": "object", - }, - "CloudUserInfo": { - "additionalProperties": False, - "properties": { - "access": {"type": "string"}, - "display-name": {"type": "string"}, - "user": {"type": "string"}, - }, - "required": ["user", "display-name", "access"], - "type": "object", - }, - "CloudsResult": { - "additionalProperties": False, - "properties": { - "clouds": { - "patternProperties": {".*": {"$ref": "#/definitions/Cloud"}}, - "type": "object", - } - }, - "type": "object", - }, - "ControllerCredentialInfo": { - "additionalProperties": False, - "properties": { - "content": {"$ref": "#/definitions/CredentialContent"}, - "models": { - "items": {"$ref": "#/definitions/ModelAccess"}, - "type": "array", - }, - }, - "type": "object", - }, - "CredentialContent": { - "additionalProperties": False, - "properties": { - "attrs": { - "patternProperties": {".*": {"type": "string"}}, - "type": "object", - }, - "auth-type": {"type": "string"}, - "cloud": {"type": "string"}, - "name": {"type": "string"}, - "valid": {"type": "boolean"}, - }, - "required": ["name", "cloud", "auth-type"], - "type": "object", - }, - "CredentialContentResult": { - "additionalProperties": False, - "properties": { - "error": {"$ref": "#/definitions/Error"}, - "result": {"$ref": "#/definitions/ControllerCredentialInfo"}, - }, - "type": "object", - }, - "CredentialContentResults": { - "additionalProperties": False, - "properties": { - "results": { - "items": {"$ref": "#/definitions/CredentialContentResult"}, - "type": "array", - } - }, - "type": "object", - }, - "Entities": { - "additionalProperties": False, - "properties": { - "entities": { - "items": {"$ref": "#/definitions/Entity"}, - "type": "array", - } - }, - "required": ["entities"], - "type": "object", - }, - "Entity": { - "additionalProperties": False, - "properties": {"tag": {"type": "string"}}, - "required": ["tag"], - "type": "object", - }, - "Error": { - "additionalProperties": False, - "properties": { - "code": {"type": "string"}, - "info": { - "patternProperties": { - ".*": {"additionalProperties": True, "type": "object"} - }, - "type": "object", - }, - "message": {"type": "string"}, - }, - "required": ["message", "code"], - "type": "object", - }, - "ErrorResult": { - "additionalProperties": False, - "properties": {"error": {"$ref": "#/definitions/Error"}}, - "type": "object", - }, - "ErrorResults": { - "additionalProperties": False, - "properties": { - "results": { - "items": {"$ref": "#/definitions/ErrorResult"}, - "type": "array", - } - }, - "required": ["results"], - "type": "object", - }, - "InstanceType": { - "additionalProperties": False, - "properties": { - "arches": {"items": {"type": "string"}, "type": "array"}, - "cost": {"type": "integer"}, - "cpu-cores": {"type": "integer"}, - "memory": {"type": "integer"}, - "name": {"type": "string"}, - "root-disk": {"type": "integer"}, - "virt-type": {"type": "string"}, - }, - "required": ["arches", "cpu-cores", "memory"], - "type": "object", - }, - "InstanceTypesResult": { - "additionalProperties": False, - "properties": { - "cost-currency": {"type": "string"}, - "cost-divisor": {"type": "integer"}, - "cost-unit": {"type": "string"}, - "error": {"$ref": "#/definitions/Error"}, - "instance-types": { - "items": {"$ref": "#/definitions/InstanceType"}, - "type": "array", - }, - }, - "type": "object", - }, - "InstanceTypesResults": { - "additionalProperties": False, - "properties": { - "results": { - "items": {"$ref": "#/definitions/InstanceTypesResult"}, - "type": "array", - } - }, - "required": ["results"], - "type": "object", - }, - "ListCloudInfo": { - "additionalProperties": False, - "properties": { - "CloudDetails": {"$ref": "#/definitions/CloudDetails"}, - "user-access": {"type": "string"}, - }, - "required": ["CloudDetails", "user-access"], - "type": "object", - }, - "ListCloudInfoResult": { - "additionalProperties": False, - "properties": { - "error": {"$ref": "#/definitions/Error"}, - "result": {"$ref": "#/definitions/ListCloudInfo"}, - }, - "type": "object", - }, - "ListCloudInfoResults": { - "additionalProperties": False, - "properties": { - "results": { - "items": {"$ref": "#/definitions/ListCloudInfoResult"}, - "type": "array", - } - }, - "required": ["results"], - "type": "object", - }, - "ListCloudsRequest": { - "additionalProperties": False, - "properties": { - "all": {"type": "boolean"}, - "user-tag": {"type": "string"}, - }, - "required": ["user-tag"], - "type": "object", - }, - "ModelAccess": { - "additionalProperties": False, - "properties": { - "access": {"type": "string"}, - "model": {"type": "string"}, - }, - "type": "object", - }, - "ModifyCloudAccess": { - "additionalProperties": False, - "properties": { - "access": {"type": "string"}, - "action": {"type": "string"}, - "cloud-tag": {"type": "string"}, - "user-tag": {"type": "string"}, - }, - "required": ["user-tag", "cloud-tag", "action", "access"], - "type": "object", - }, - "ModifyCloudAccessRequest": { - "additionalProperties": False, - "properties": { - "changes": { - "items": {"$ref": "#/definitions/ModifyCloudAccess"}, - "type": "array", - } - }, - "required": ["changes"], - "type": "object", - }, - "RevokeCredentialArg": { - "additionalProperties": False, - "properties": {"force": {"type": "boolean"}, "tag": {"type": "string"}}, - "required": ["tag", "force"], - "type": "object", - }, - "RevokeCredentialArgs": { - "additionalProperties": False, - "properties": { - "credentials": { - "items": {"$ref": "#/definitions/RevokeCredentialArg"}, - "type": "array", - } - }, - "required": ["credentials"], - "type": "object", - }, - "StringsResult": { - "additionalProperties": False, - "properties": { - "error": {"$ref": "#/definitions/Error"}, - "result": {"items": {"type": "string"}, "type": "array"}, - }, - "type": "object", - }, - "StringsResults": { - "additionalProperties": False, - "properties": { - "results": { - "items": {"$ref": "#/definitions/StringsResult"}, - "type": "array", - } - }, - "required": ["results"], - "type": "object", - }, - "TaggedCredential": { - "additionalProperties": False, - "properties": { - "credential": {"$ref": "#/definitions/CloudCredential"}, - "tag": {"type": "string"}, - }, - "required": ["tag", "credential"], - "type": "object", - }, - "TaggedCredentials": { - "additionalProperties": False, - "properties": { - "credentials": { - "items": {"$ref": "#/definitions/TaggedCredential"}, - "type": "array", - } - }, - "type": "object", - }, - "UpdateCloudArgs": { - "additionalProperties": False, - "properties": { - "clouds": { - "items": {"$ref": "#/definitions/AddCloudArgs"}, - "type": "array", - } - }, - "required": ["clouds"], - "type": "object", - }, - "UpdateCredentialArgs": { - "additionalProperties": False, - "properties": { - "credentials": { - "items": {"$ref": "#/definitions/TaggedCredential"}, - "type": "array", - }, - "force": {"type": "boolean"}, - }, - "required": ["credentials", "force"], - "type": "object", - }, - "UpdateCredentialModelResult": { - "additionalProperties": False, - "properties": { - "errors": { - "items": {"$ref": "#/definitions/ErrorResult"}, - "type": "array", - }, - "name": {"type": "string"}, - "uuid": {"type": "string"}, - }, - "required": ["uuid", "name"], - "type": "object", - }, - "UpdateCredentialResult": { - "additionalProperties": False, - "properties": { - "error": {"$ref": "#/definitions/Error"}, - "models": { - "items": {"$ref": "#/definitions/UpdateCredentialModelResult"}, - "type": "array", - }, - "tag": {"type": "string"}, - }, - "required": ["tag"], - "type": "object", - }, - "UpdateCredentialResults": { - "additionalProperties": False, - "properties": { - "results": { - "items": {"$ref": "#/definitions/UpdateCredentialResult"}, - "type": "array", - } - }, - "type": "object", - }, - "UserCloud": { - "additionalProperties": False, - "properties": { - "cloud-tag": {"type": "string"}, - "user-tag": {"type": "string"}, - }, - "required": ["user-tag", "cloud-tag"], - "type": "object", - }, - "UserClouds": { - "additionalProperties": False, - "properties": { - "user-clouds": { - "items": {"$ref": "#/definitions/UserCloud"}, - "type": "array", - } - }, - "type": "object", - }, - "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": { - "AddCloud": { - "description": "AddCloud adds a new cloud, " - "different from the one managed by " - "the controller.", - "properties": {"Params": {"$ref": "#/definitions/AddCloudArgs"}}, - "type": "object", - }, - "AddCredentials": { - "description": "AddCredentials adds new " - "credentials.\n" - "In contrast to " - "UpdateCredentials() below, " - "the new credentials can be\n" - "for a cloud that the " - "controller does not manage " - "(this is required\n" - "for CAAS models)", - "properties": { - "Params": {"$ref": "#/definitions/TaggedCredentials"}, - "Result": {"$ref": "#/definitions/ErrorResults"}, - }, - "type": "object", - }, - "CheckCredentialsModels": { - "description": "CheckCredentialsModels " - "validates supplied " - "cloud credentials' " - "content against\n" - "models that " - "currently use these " - "credentials.\n" - "If there are any " - "models that are " - "using a credential " - "and these models or " - "their\n" - "cloud instances are " - "not going to be " - "accessible with " - "corresponding " - "credential,\n" - "there will be " - "detailed validation " - "errors per model.\n" - "There's no Juju API " - "client which uses " - "this, but JAAS " - "does,", - "properties": { - "Params": {"$ref": "#/definitions/TaggedCredentials"}, - "Result": {"$ref": "#/definitions/UpdateCredentialResults"}, - }, - "type": "object", - }, - "Cloud": { - "description": "Cloud returns the cloud definitions " - "for the specified clouds.", - "properties": { - "Params": {"$ref": "#/definitions/Entities"}, - "Result": {"$ref": "#/definitions/CloudResults"}, - }, - "type": "object", - }, - "CloudInfo": { - "description": "CloudInfo returns information " - "about the specified clouds.", - "properties": { - "Params": {"$ref": "#/definitions/Entities"}, - "Result": {"$ref": "#/definitions/CloudInfoResults"}, - }, - "type": "object", - }, - "Clouds": { - "description": "Clouds returns the definitions of " - "all clouds supported by the " - "controller\n" - "that the logged in user can see.", - "properties": {"Result": {"$ref": "#/definitions/CloudsResult"}}, - "type": "object", - }, - "Credential": { - "description": "Credential returns the " - "specified cloud credential for " - "each tag, minus secrets.", - "properties": { - "Params": {"$ref": "#/definitions/Entities"}, - "Result": {"$ref": "#/definitions/CloudCredentialResults"}, - }, - "type": "object", - }, - "CredentialContents": { - "description": "CredentialContents " - "returns the specified " - "cloud credentials,\n" - "including the secrets " - "if requested.\n" - "If no specific " - "credential name/cloud " - "was passed in, all " - "credentials for this " - "user\n" - "are returned.\n" - "Only credential owner " - "can see its contents as " - "well as what models use " - "it.\n" - "Controller admin has no " - "special superpowers " - "here and is treated the " - "same as all other " - "users.", - "properties": { - "Params": {"$ref": "#/definitions/CloudCredentialArgs"}, - "Result": {"$ref": "#/definitions/CredentialContentResults"}, - }, - "type": "object", - }, - "InstanceTypes": { - "description": "InstanceTypes returns " - "instance type information " - "for the cloud and region\n" - "in which the current model " - "is deployed.", - "properties": { - "Params": {"$ref": "#/definitions/CloudInstanceTypesConstraints"}, - "Result": {"$ref": "#/definitions/InstanceTypesResults"}, - }, - "type": "object", - }, - "ListCloudInfo": { - "description": "ListCloudInfo returns clouds " - "that the specified user has " - "access to.\n" - "Controller admins " - "(superuser) can list clouds " - "for any user.\n" - "Other users can only ask " - "about their own clouds.", - "properties": { - "Params": {"$ref": "#/definitions/ListCloudsRequest"}, - "Result": {"$ref": "#/definitions/ListCloudInfoResults"}, - }, - "type": "object", - }, - "ModifyCloudAccess": { - "description": "ModifyCloudAccess " - "changes the model access " - "granted to users.", - "properties": { - "Params": {"$ref": "#/definitions/ModifyCloudAccessRequest"}, - "Result": {"$ref": "#/definitions/ErrorResults"}, - }, - "type": "object", - }, - "RemoveClouds": { - "description": "RemoveClouds removes the " - "specified clouds from the " - "controller.\n" - "If a cloud is in use (has " - "models deployed to it), the " - "removal will fail.", - "properties": { - "Params": {"$ref": "#/definitions/Entities"}, - "Result": {"$ref": "#/definitions/ErrorResults"}, - }, - "type": "object", - }, - "RevokeCredentialsCheckModels": { - "description": "RevokeCredentialsCheckModels " - "revokes a set " - "of cloud " - "credentials.\n" - "If the " - "credentials " - "are used by " - "any of the " - "models, the " - "credential " - "deletion will " - "be aborted.\n" - "If " - "credential-in-use " - "needs to be " - "revoked " - "nonetheless, " - "this method " - "allows the " - "use of force.", - "properties": { - "Params": {"$ref": "#/definitions/RevokeCredentialArgs"}, - "Result": {"$ref": "#/definitions/ErrorResults"}, - }, - "type": "object", - }, - "UpdateCloud": { - "description": "UpdateCloud updates an " - "existing cloud that the " - "controller knows about.", - "properties": { - "Params": {"$ref": "#/definitions/UpdateCloudArgs"}, - "Result": {"$ref": "#/definitions/ErrorResults"}, - }, - "type": "object", - }, - "UpdateCredentialsCheckModels": { - "description": "UpdateCredentialsCheckModels " - "updates a set " - "of cloud " - "credentials' " - "content.\n" - "If there are " - "any models " - "that are " - "using a " - "credential " - "and these " - "models\n" - "are not going " - "to be visible " - "with updated " - "credential " - "content,\n" - "there will be " - "detailed " - "validation " - "errors per " - "model. Such " - "model errors " - "are returned\n" - "separately " - "and do not " - "contribute to " - "the overall " - "method error " - "status.\n" - "Controller " - "admins can " - "'force' an " - "update of the " - "credential\n" - "regardless of " - "whether it is " - "deemed valid " - "or not.", - "properties": { - "Params": {"$ref": "#/definitions/UpdateCredentialArgs"}, - "Result": {"$ref": "#/definitions/UpdateCredentialResults"}, - }, - "type": "object", - }, - "UserCredentials": { - "description": "UserCredentials returns " - "the cloud credentials for " - "a set of users.", - "properties": { - "Params": {"$ref": "#/definitions/UserClouds"}, - "Result": {"$ref": "#/definitions/StringsResults"}, - }, - "type": "object", - }, - }, - "type": "object", - } @ReturnMapping(None) async def AddCloud(self, cloud=None, force=None, name=None): diff --git a/juju/client/_client8.py b/juju/client/_client8.py index 5a4d738ce..e1f061c41 100644 --- a/juju/client/_client8.py +++ b/juju/client/_client8.py @@ -8,757 +8,6 @@ class ClientFacade(Type): name = "Client" version = 8 - schema = { - "definitions": { - "AllWatcherId": { - "additionalProperties": False, - "properties": {"watcher-id": {"type": "string"}}, - "required": ["watcher-id"], - "type": "object", - }, - "ApplicationOfferStatus": { - "additionalProperties": False, - "properties": { - "active-connected-count": {"type": "integer"}, - "application-name": {"type": "string"}, - "charm": {"type": "string"}, - "endpoints": { - "patternProperties": { - ".*": {"$ref": "#/definitions/RemoteEndpoint"} - }, - "type": "object", - }, - "err": {"$ref": "#/definitions/Error"}, - "offer-name": {"type": "string"}, - "total-connected-count": {"type": "integer"}, - }, - "required": [ - "offer-name", - "application-name", - "charm", - "endpoints", - "active-connected-count", - "total-connected-count", - ], - "type": "object", - }, - "ApplicationStatus": { - "additionalProperties": False, - "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": { - "patternProperties": {".*": {"type": "string"}}, - "type": "object", - }, - "err": {"$ref": "#/definitions/Error"}, - "exposed": {"type": "boolean"}, - "exposed-endpoints": { - "patternProperties": { - ".*": {"$ref": "#/definitions/ExposedEndpoint"} - }, - "type": "object", - }, - "int": {"type": "integer"}, - "life": {"type": "string"}, - "meter-statuses": { - "patternProperties": { - ".*": {"$ref": "#/definitions/MeterStatus"} - }, - "type": "object", - }, - "provider-id": {"type": "string"}, - "public-address": {"type": "string"}, - "relations": { - "patternProperties": { - ".*": {"items": {"type": "string"}, "type": "array"} - }, - "type": "object", - }, - "status": {"$ref": "#/definitions/DetailedStatus"}, - "subordinate-to": {"items": {"type": "string"}, "type": "array"}, - "units": { - "patternProperties": { - ".*": {"$ref": "#/definitions/UnitStatus"} - }, - "type": "object", - }, - "workload-version": {"type": "string"}, - }, - "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", - ], - "type": "object", - }, - "Base": { - "additionalProperties": False, - "properties": { - "channel": {"type": "string"}, - "name": {"type": "string"}, - }, - "required": ["name", "channel"], - "type": "object", - }, - "BranchStatus": { - "additionalProperties": False, - "properties": { - "assigned-units": { - "patternProperties": { - ".*": {"items": {"type": "string"}, "type": "array"} - }, - "type": "object", - }, - "created": {"type": "integer"}, - "created-by": {"type": "string"}, - }, - "required": ["assigned-units", "created", "created-by"], - "type": "object", - }, - "DetailedStatus": { - "additionalProperties": False, - "properties": { - "data": { - "patternProperties": { - ".*": {"additionalProperties": True, "type": "object"} - }, - "type": "object", - }, - "err": {"$ref": "#/definitions/Error"}, - "info": {"type": "string"}, - "kind": {"type": "string"}, - "life": {"type": "string"}, - "since": {"format": "date-time", "type": "string"}, - "status": {"type": "string"}, - "version": {"type": "string"}, - }, - "required": [ - "status", - "info", - "data", - "since", - "kind", - "version", - "life", - ], - "type": "object", - }, - "EndpointStatus": { - "additionalProperties": False, - "properties": { - "application": {"type": "string"}, - "name": {"type": "string"}, - "role": {"type": "string"}, - "subordinate": {"type": "boolean"}, - }, - "required": ["application", "name", "role", "subordinate"], - "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", - }, - "ExposedEndpoint": { - "additionalProperties": False, - "properties": { - "expose-to-cidrs": {"items": {"type": "string"}, "type": "array"}, - "expose-to-spaces": {"items": {"type": "string"}, "type": "array"}, - }, - "type": "object", - }, - "FilesystemAttachmentDetails": { - "additionalProperties": False, - "properties": { - "FilesystemAttachmentInfo": { - "$ref": "#/definitions/FilesystemAttachmentInfo" - }, - "life": {"type": "string"}, - "mount-point": {"type": "string"}, - "read-only": {"type": "boolean"}, - }, - "required": ["FilesystemAttachmentInfo"], - "type": "object", - }, - "FilesystemAttachmentInfo": { - "additionalProperties": False, - "properties": { - "mount-point": {"type": "string"}, - "read-only": {"type": "boolean"}, - }, - "type": "object", - }, - "FilesystemDetails": { - "additionalProperties": False, - "properties": { - "filesystem-tag": {"type": "string"}, - "info": {"$ref": "#/definitions/FilesystemInfo"}, - "life": {"type": "string"}, - "machine-attachments": { - "patternProperties": { - ".*": {"$ref": "#/definitions/FilesystemAttachmentDetails"} - }, - "type": "object", - }, - "status": {"$ref": "#/definitions/EntityStatus"}, - "storage": {"$ref": "#/definitions/StorageDetails"}, - "unit-attachments": { - "patternProperties": { - ".*": {"$ref": "#/definitions/FilesystemAttachmentDetails"} - }, - "type": "object", - }, - "volume-tag": {"type": "string"}, - }, - "required": ["filesystem-tag", "info", "status"], - "type": "object", - }, - "FilesystemInfo": { - "additionalProperties": False, - "properties": { - "filesystem-id": {"type": "string"}, - "pool": {"type": "string"}, - "size": {"type": "integer"}, - }, - "required": ["filesystem-id", "pool", "size"], - "type": "object", - }, - "FullStatus": { - "additionalProperties": False, - "properties": { - "applications": { - "patternProperties": { - ".*": {"$ref": "#/definitions/ApplicationStatus"} - }, - "type": "object", - }, - "branches": { - "patternProperties": { - ".*": {"$ref": "#/definitions/BranchStatus"} - }, - "type": "object", - }, - "controller-timestamp": {"format": "date-time", "type": "string"}, - "filesystems": { - "items": {"$ref": "#/definitions/FilesystemDetails"}, - "type": "array", - }, - "machines": { - "patternProperties": { - ".*": {"$ref": "#/definitions/MachineStatus"} - }, - "type": "object", - }, - "model": {"$ref": "#/definitions/ModelStatusInfo"}, - "offers": { - "patternProperties": { - ".*": {"$ref": "#/definitions/ApplicationOfferStatus"} - }, - "type": "object", - }, - "relations": { - "items": {"$ref": "#/definitions/RelationStatus"}, - "type": "array", - }, - "remote-applications": { - "patternProperties": { - ".*": {"$ref": "#/definitions/RemoteApplicationStatus"} - }, - "type": "object", - }, - "storage": { - "items": {"$ref": "#/definitions/StorageDetails"}, - "type": "array", - }, - "volumes": { - "items": {"$ref": "#/definitions/VolumeDetails"}, - "type": "array", - }, - }, - "required": [ - "model", - "machines", - "applications", - "remote-applications", - "offers", - "relations", - "controller-timestamp", - "branches", - ], - "type": "object", - }, - "History": { - "additionalProperties": False, - "properties": { - "error": {"$ref": "#/definitions/Error"}, - "statuses": { - "items": {"$ref": "#/definitions/DetailedStatus"}, - "type": "array", - }, - }, - "required": ["statuses"], - "type": "object", - }, - "LXDProfile": { - "additionalProperties": False, - "properties": { - "config": { - "patternProperties": {".*": {"type": "string"}}, - "type": "object", - }, - "description": {"type": "string"}, - "devices": { - "patternProperties": { - ".*": { - "patternProperties": {".*": {"type": "string"}}, - "type": "object", - } - }, - "type": "object", - }, - }, - "required": ["config", "description", "devices"], - "type": "object", - }, - "MachineStatus": { - "additionalProperties": False, - "properties": { - "agent-status": {"$ref": "#/definitions/DetailedStatus"}, - "base": {"$ref": "#/definitions/Base"}, - "constraints": {"type": "string"}, - "containers": { - "patternProperties": { - ".*": {"$ref": "#/definitions/MachineStatus"} - }, - "type": "object", - }, - "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": {"items": {"type": "string"}, "type": "array"}, - "jobs": {"items": {"type": "string"}, "type": "array"}, - "lxd-profiles": { - "patternProperties": { - ".*": {"$ref": "#/definitions/LXDProfile"} - }, - "type": "object", - }, - "modification-status": {"$ref": "#/definitions/DetailedStatus"}, - "network-interfaces": { - "patternProperties": { - ".*": {"$ref": "#/definitions/NetworkInterface"} - }, - "type": "object", - }, - "primary-controller-machine": {"type": "boolean"}, - "wants-vote": {"type": "boolean"}, - }, - "required": [ - "agent-status", - "instance-status", - "modification-status", - "dns-name", - "instance-id", - "display-name", - "base", - "id", - "containers", - "constraints", - "hardware", - "jobs", - "has-vote", - "wants-vote", - ], - "type": "object", - }, - "MeterStatus": { - "additionalProperties": False, - "properties": { - "color": {"type": "string"}, - "message": {"type": "string"}, - }, - "required": ["color", "message"], - "type": "object", - }, - "ModelStatusInfo": { - "additionalProperties": False, - "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"}, - }, - "required": [ - "name", - "type", - "cloud-tag", - "version", - "available-version", - "model-status", - "meter-status", - "sla", - ], - "type": "object", - }, - "NetworkInterface": { - "additionalProperties": False, - "properties": { - "dns-nameservers": {"items": {"type": "string"}, "type": "array"}, - "gateway": {"type": "string"}, - "ip-addresses": {"items": {"type": "string"}, "type": "array"}, - "is-up": {"type": "boolean"}, - "mac-address": {"type": "string"}, - "space": {"type": "string"}, - }, - "required": ["ip-addresses", "mac-address", "is-up"], - "type": "object", - }, - "RelationStatus": { - "additionalProperties": False, - "properties": { - "endpoints": { - "items": {"$ref": "#/definitions/EndpointStatus"}, - "type": "array", - }, - "id": {"type": "integer"}, - "interface": {"type": "string"}, - "key": {"type": "string"}, - "scope": {"type": "string"}, - "status": {"$ref": "#/definitions/DetailedStatus"}, - }, - "required": ["id", "key", "interface", "scope", "endpoints", "status"], - "type": "object", - }, - "RemoteApplicationStatus": { - "additionalProperties": False, - "properties": { - "endpoints": { - "items": {"$ref": "#/definitions/RemoteEndpoint"}, - "type": "array", - }, - "err": {"$ref": "#/definitions/Error"}, - "life": {"type": "string"}, - "offer-name": {"type": "string"}, - "offer-url": {"type": "string"}, - "relations": { - "patternProperties": { - ".*": {"items": {"type": "string"}, "type": "array"} - }, - "type": "object", - }, - "status": {"$ref": "#/definitions/DetailedStatus"}, - }, - "required": [ - "offer-url", - "offer-name", - "endpoints", - "life", - "relations", - "status", - ], - "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", - }, - "StatusHistoryFilter": { - "additionalProperties": False, - "properties": { - "date": {"format": "date-time", "type": "string"}, - "delta": {"type": "integer"}, - "exclude": {"items": {"type": "string"}, "type": "array"}, - "size": {"type": "integer"}, - }, - "required": ["size", "date", "delta", "exclude"], - "type": "object", - }, - "StatusHistoryRequest": { - "additionalProperties": False, - "properties": { - "filter": {"$ref": "#/definitions/StatusHistoryFilter"}, - "historyKind": {"type": "string"}, - "size": {"type": "integer"}, - "tag": {"type": "string"}, - }, - "required": ["historyKind", "size", "filter", "tag"], - "type": "object", - }, - "StatusHistoryRequests": { - "additionalProperties": False, - "properties": { - "requests": { - "items": {"$ref": "#/definitions/StatusHistoryRequest"}, - "type": "array", - } - }, - "required": ["requests"], - "type": "object", - }, - "StatusHistoryResult": { - "additionalProperties": False, - "properties": { - "error": {"$ref": "#/definitions/Error"}, - "history": {"$ref": "#/definitions/History"}, - }, - "required": ["history"], - "type": "object", - }, - "StatusHistoryResults": { - "additionalProperties": False, - "properties": { - "results": { - "items": {"$ref": "#/definitions/StatusHistoryResult"}, - "type": "array", - } - }, - "required": ["results"], - "type": "object", - }, - "StatusParams": { - "additionalProperties": False, - "properties": { - "include-storage": {"type": "boolean"}, - "patterns": {"items": {"type": "string"}, "type": "array"}, - }, - "required": ["patterns"], - "type": "object", - }, - "StorageAttachmentDetails": { - "additionalProperties": False, - "properties": { - "life": {"type": "string"}, - "location": {"type": "string"}, - "machine-tag": {"type": "string"}, - "storage-tag": {"type": "string"}, - "unit-tag": {"type": "string"}, - }, - "required": ["storage-tag", "unit-tag", "machine-tag"], - "type": "object", - }, - "StorageDetails": { - "additionalProperties": False, - "properties": { - "attachments": { - "patternProperties": { - ".*": {"$ref": "#/definitions/StorageAttachmentDetails"} - }, - "type": "object", - }, - "kind": {"type": "integer"}, - "life": {"type": "string"}, - "owner-tag": {"type": "string"}, - "persistent": {"type": "boolean"}, - "status": {"$ref": "#/definitions/EntityStatus"}, - "storage-tag": {"type": "string"}, - }, - "required": [ - "storage-tag", - "owner-tag", - "kind", - "status", - "persistent", - ], - "type": "object", - }, - "UnitStatus": { - "additionalProperties": False, - "properties": { - "address": {"type": "string"}, - "agent-status": {"$ref": "#/definitions/DetailedStatus"}, - "charm": {"type": "string"}, - "leader": {"type": "boolean"}, - "machine": {"type": "string"}, - "opened-ports": {"items": {"type": "string"}, "type": "array"}, - "provider-id": {"type": "string"}, - "public-address": {"type": "string"}, - "subordinates": { - "patternProperties": { - ".*": {"$ref": "#/definitions/UnitStatus"} - }, - "type": "object", - }, - "workload-status": {"$ref": "#/definitions/DetailedStatus"}, - "workload-version": {"type": "string"}, - }, - "required": [ - "agent-status", - "workload-status", - "workload-version", - "machine", - "opened-ports", - "public-address", - "charm", - "subordinates", - ], - "type": "object", - }, - "VolumeAttachmentDetails": { - "additionalProperties": False, - "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"}, - }, - "required": ["VolumeAttachmentInfo"], - "type": "object", - }, - "VolumeAttachmentInfo": { - "additionalProperties": False, - "properties": { - "bus-address": {"type": "string"}, - "device-link": {"type": "string"}, - "device-name": {"type": "string"}, - "plan-info": {"$ref": "#/definitions/VolumeAttachmentPlanInfo"}, - "read-only": {"type": "boolean"}, - }, - "type": "object", - }, - "VolumeAttachmentPlanInfo": { - "additionalProperties": False, - "properties": { - "device-attributes": { - "patternProperties": {".*": {"type": "string"}}, - "type": "object", - }, - "device-type": {"type": "string"}, - }, - "type": "object", - }, - "VolumeDetails": { - "additionalProperties": False, - "properties": { - "info": {"$ref": "#/definitions/VolumeInfo"}, - "life": {"type": "string"}, - "machine-attachments": { - "patternProperties": { - ".*": {"$ref": "#/definitions/VolumeAttachmentDetails"} - }, - "type": "object", - }, - "status": {"$ref": "#/definitions/EntityStatus"}, - "storage": {"$ref": "#/definitions/StorageDetails"}, - "unit-attachments": { - "patternProperties": { - ".*": {"$ref": "#/definitions/VolumeAttachmentDetails"} - }, - "type": "object", - }, - "volume-tag": {"type": "string"}, - }, - "required": ["volume-tag", "info", "status"], - "type": "object", - }, - "VolumeInfo": { - "additionalProperties": False, - "properties": { - "hardware-id": {"type": "string"}, - "persistent": {"type": "boolean"}, - "pool": {"type": "string"}, - "size": {"type": "integer"}, - "volume-id": {"type": "string"}, - "wwn": {"type": "string"}, - }, - "required": ["volume-id", "size", "persistent"], - "type": "object", - }, - }, - "properties": { - "FullStatus": { - "description": "FullStatus gives the " - "information needed for juju " - "status over the api", - "properties": { - "Params": {"$ref": "#/definitions/StatusParams"}, - "Result": {"$ref": "#/definitions/FullStatus"}, - }, - "type": "object", - }, - "StatusHistory": { - "description": "StatusHistory returns a " - "slice of past statuses for " - "several entities.", - "properties": { - "Params": {"$ref": "#/definitions/StatusHistoryRequests"}, - "Result": {"$ref": "#/definitions/StatusHistoryResults"}, - }, - "type": "object", - }, - "WatchAll": { - "description": "WatchAll initiates a watcher for " - "entities in the connected model.", - "properties": {"Result": {"$ref": "#/definitions/AllWatcherId"}}, - "type": "object", - }, - }, - "type": "object", - } @ReturnMapping(FullStatus) async def FullStatus(self, include_storage=None, patterns=None): diff --git a/juju/client/_client9.py b/juju/client/_client9.py index e6eaa1857..7709e7e34 100644 --- a/juju/client/_client9.py +++ b/juju/client/_client9.py @@ -8,860 +8,6 @@ class ModelManagerFacade(Type): name = "ModelManager" version = 9 - 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): diff --git a/juju/client/facade.py b/juju/client/facade.py index 596f97aba..f0ee75130 100644 --- a/juju/client/facade.py +++ b/juju/client/facade.py @@ -630,16 +630,11 @@ def build_facade(schema): (Type,), dict(name=schema.name, version=schema.version, schema=schema), ) - source = """ -class {name}Facade(Type): - name = '{name}' - version = {version} - schema = {schema} - """.format( - name=schema.name, - version=schema.version, - schema=textwrap.indent(pprint.pformat(schema), " "), - ) + source = f""" +class {schema.name}Facade(Type): + name = '{schema.name}' + version = {schema.version} + """ return cls, source