Charm with the bases
keyword¶
- pydantic model charmcraft.models.project.BasesCharm[source]¶
A charm using the deprecated
bases
keyword.- This type of charm only supports the following bases:
Ubuntu 18.04
Ubuntu 20.04
Ubuntu 22.04
CentOS 7
Alma Linux 9
- Parameters:
**data (
Any
)
Show JSON schema
{ "title": "BasesCharm", "description": "A charm using the deprecated ``bases`` keyword.\n\nThis type of charm only supports the following bases:\n - Ubuntu 18.04\n - Ubuntu 20.04\n - Ubuntu 22.04\n - CentOS 7\n - Alma Linux 9", "type": "object", "properties": { "name": { "title": "Name", "description": "The name of the project on Charmhub.\n\nThis value will be used both in the URL of the charm on Charmhub and when\ndeploying the charm with juju.\n\nCharms should follow the\n`charm naming guidelines <https://juju.is/docs/sdk/naming>`_.", "examples": [ "mysql", "mysql-k8s" ], "minLength": 1, "maxLength": 40, "pattern": "^([a-z0-9][a-z0-9-]?)*[a-z]+([a-z0-9-]?[a-z0-9])*$", "type": "string" }, "title": { "title": "Title", "minLength": 2, "maxLength": 40, "type": "string" }, "version": { "title": "Version", "default": "unversioned", "enum": [ "unversioned" ], "type": "string" }, "summary": { "title": "Summary", "description": "A brief (one-line) summary of your charm.", "maxLength": 200, "type": "string" }, "description": { "title": "Description", "description": "A multi-line summary of your charm.", "type": "string" }, "base": { "title": "Base", "type": "null" }, "build-base": { "title": "Build-Base" }, "platforms": { "title": "Platforms", "type": "null" }, "contact": { "title": "Contact", "type": "null" }, "issues": { "title": "Issues", "type": "null" }, "source-code": { "title": "Source-Code", "type": "null" }, "license": { "title": "License", "type": "null" }, "adopt-info": { "title": "Adopt-Info", "type": "string" }, "parts": { "title": "Parts", "description": "Configures the various mechanisms to obtain, process and prepare data from\ndifferent sources that end up being a part of the final charm.\n\nKeys are user-defined part names. The value of each key is a map where keys\nare part names. Charmcraft provides 3 plugins: charm, bundle, reactive.\n\nExample::\n\n parts:\n libs:\n plugin: dump\n source: /usr/local/lib/\n organize:\n \"libxxx.so*\": lib/\n prime:\n - lib/", "default": { "charm": { "plugin": "charm", "source": "." } }, "type": "object", "additionalProperties": { "type": "object" } }, "package-repositories": { "title": "Package-Repositories", "type": "array", "items": { "type": "object" } }, "type": { "title": "Type", "enum": [ "charm" ], "type": "string" }, "analysis": { "title": "Analysis", "description": "How analysis done on the charm will behave.\n\nCurrently the only options are to ignore attributes or linters.", "allOf": [ { "$ref": "#/definitions/AnalysisConfig" } ] }, "charmhub": { "title": "Charmhub", "description": "(DEPRECATED): Configuration for accessing charmhub.", "allOf": [ { "$ref": "#/definitions/CharmhubConfig" } ] }, "charm-libs": { "title": "List of libraries to use for this charm", "type": "array", "items": { "$ref": "#/definitions/CharmLib" } }, "bases": { "title": "Bases", "minItems": 1, "type": "array", "items": { "$ref": "#/definitions/BasesConfiguration" } }, "actions": { "title": "Actions", "description": "Defines one or more actions.\n\nThis key is equivalent to the\n`actions.yaml file <https://juju.is/docs/sdk/actions-yaml>`_.", "type": "object" }, "assumes": { "title": "Assumes", "description": "Explicitly state features a Juju model must be able to provide for a\nsuccessful deployment of this charm. When a charm includes such\nrequirements, Juju performs a pre-deployment check and displays\nuser-friendly error messages if a feature requirement cannot be met by the\nmodel that the user is trying to deploy the charm to. If the assumes\nsection of the charm metadata is omitted, Juju will make a best-effort\nattempt to deploy the charm, and users must rely on the output of\n``juju status`` to figure out whether the deployment was successful.\n\nThe key consists of a list of features that can be given either directly\nor, depending on the complexity of the condition you want to enforce,\nnested under one or both of the boolean expressions any-of or all-of,\nas shown below. In order for a charm to be deployed, all entries in the\nassumes block must be satisfied.\n\nStructure::\n\n assumes:\n - <feature-1>\n - any-of:\n - <feature-2>\n - <feature-3>\n - all-of:\n - <feature-4>\n - <feature-5>\n\nJuju version requirements can be specified with a string such as\n``juju >= 3.5`` or ``juju < 4.0``. A full list of supported features\ncan be found in the\n`Juju documentation <https://juju.is/docs/juju/supported-features>`_.\n", "type": "array", "items": { "anyOf": [ { "type": "string" }, { "type": "object", "additionalProperties": { "anyOf": [ { "type": "array", "items": {} }, { "type": "object" } ] } } ] } }, "containers": { "title": "Containers", "description": "Define a map of containers to be created adjacent to the charm (as a\nsidecar, in the same pod).\n\nThis is required for Kubernetes charms.\n\nThis key consists of a dictionary mapping container names to their\nspecifications. Each container can be specified in terms of ``resource``,\n``bases`` and ``mounts``, where one of either the ``resource`` or the\n``bases`` subkeys must be defined and ``mounts`` is optional.\n\n- ``resource`` is the name of an OCI image resource used to create the\n container (that you will then define further in the resources block).\n- ``bases`` is a list of bases to be used for resolving a container image,\n in descending order of preference. To use it, specify a base name (for\n example, ``ubuntu`` or ``centos``), a ``channel`` and an\n ``architecture``.\n- ``mounts`` is a list of mounted storage volumes for this container. To\n use it, specify the name of the storage to mount from the charm\n storage and, optionally, the location where to mount the storage.\n\nStructure::\n\n containers:\n <container name>:\n resource: <resource name>\n bases:\n - name: <base name>\n channel: <track[/risk][/branch]>\n architectures:\n - <architecture>\n mounts:\n - storage: <storage name>\n location: <path>", "examples": [ { "super-app": { "resource": "super-app-image", "mounts": [ { "storage": "logs", "location": "/logs" } ] } } ], "type": "object" }, "devices": { "title": "Devices", "description": "Devices the charm needs.\n\nStructure::\n\n devices:\n <device name>:\n type: gpu | nvidia.com/gpu | amd.com/gpu\n description: <Optional description>\n countmin: <Optional minimum number requested>\n countmax: <Optional maximum number requested>", "examples": [ { "amd-gpu": { "type": "amd.com/gpu", "description": "Some sweet AMD GPU", "countmin": 1, "countmax": 100 }, "nvidia-gpu": { "type": "nvidia.com/gpu", "description": "Some NVIDIA GPUs", "countmin": 20 } }, { "gpus": { "type": "gpu", "description": "A bunch of GPUs", "countmin": 2, "countmax": 40 } } ], "type": "object" }, "extra-bindings": { "title": "Extra-Bindings", "description": "A key-only mapping representing extra bindings needed.", "type": "object" }, "peers": { "title": "Peers", "description": "A map of peer relations.\n\nStructure::\n\n peers:\n <endpoint name>:\n interface: <Required interface name>\n limit: <Optional: maximum number of supported connections\n optional: <Informational only - whether the relation is required.>\n scope: <\"global\" or \"container\" - the relation scope.>\n\nFor more information, see\n`the Juju documentation <https://juju.is/docs/juju/relation>`_.", "examples": [ { "friend": { "interface": "life", "limit": 150, "optional": true, "scope": "container" } } ], "type": "object" }, "provides": { "title": "Provides", "description": "A map of interfaces this charm provides.\n\nStructure::\n\n provides:\n <endpoint name>:\n interface: <Required interface name>\n limit: <Optional: maximum number of supported connections\n optional: <Informational only - whether the relation is required.>\n scope: <\"global\" or \"container\" - the relation scope.>\n\nFor more information, see\n`the Juju documentation <https://juju.is/docs/juju/relation>`_.", "examples": [ { "self": { "interface": "identity" } } ], "type": "object" }, "requires": { "title": "Requires", "description": "A map of relations this charm requires.\n\nStructure::\n\n requires:\n <endpoint name>:\n interface: <Required interface name>\n limit: <Optional: maximum number of supported connections\n optional: <Informational only - whether the relation is required.>\n scope: <\"global\" or \"container\" - the relation scope.>\n\nFor more information, see\n`the Juju documentation <https://juju.is/docs/juju/relation>`_.", "examples": [ { "parent": { "interface": "birth", "limit": 2, "optional": false, "scope": "global" } } ], "type": "object" }, "resources": { "title": "Resources", "description": "A mapping of resources that accompany the charm.\n\nSee first: `Juju | Charm resource <https://juju.is/docs/juju/charm-resource>`_\n\nEach resource is made available when the charm is deployed. NOTE:\nKubernetes charms must declare an ``oci-image`` type resource for each\ncontainer declared in ``containers``.\n\nStructure::\n\n # (Optional) Additional resources that accompany the charm\n resources:\n <resource name>:\n # (Required) The type of the resource\n type: file | oci-image\n\n # (Optional) Description of the resource and its purpose\n description: <description>\n\n # (Required: when type:file) The filename of the resource as it\n # should appear in the filesystem.\n filename: <filename>", "examples": [ { "water": { "type": "file", "filename": "/dev/h2o" } }, { "super-app-image": { "type": "oci-image", "description": "My app!" } } ], "type": "object" }, "storage": { "title": "Storage", "description": "Storage devices requested by the charm.\n\nStructure::\n\n storage:\n # Each key represents the name of the storage\n <storage name>:\n\n # (Required) Type of the requested storage\n type: filesystem | block\n\n # (Optional) Description of the storage requested\n description: <description>\n\n # (Optional) The mount location for filesystem stores. For\n # multi-stores the location acts as the parent directory for each\n # mounted store.\n location: <location>\n\n # Indicates if all units of the application share the storage.\n # Defaults to false\n shared: true | false\n\n # Indicates if the storage should be made read-only (where\n # possible). Defaults to false\n read-only: true | false\n\n # (Optional) The number of storage instances to be requested\n multiple:\n range: <n> | <n>-<m> | <n>- | <n>+\n\n # (Optional) Minimum size of requested storage in forms G, GiB, GB.\n # Size multipliers are M, G, T, P, E, Z or Y. With no multiplier\n # supplied, M is implied.\n minimum-size: <n> | <n><multiplier>\n\n # (Optional) List of properties, only supported value is \"transient\"\n properties:\n - transient\n", "examples": [ { "jbod": { "type": "block", "description": "A block storage to use as swap space", "shared": false, "properties": [ "transient" ] } } ], "type": "object" }, "subordinate": { "title": "Subordinate", "description": "Optional boolean to declare the charm subordinate.", "examples": [ true ], "type": "boolean" }, "terms": { "title": "Terms", "description": "A list of terms to which the user agree by using the charm.\nThese terms are not enforced by the charm, Juju or Canonical.", "examples": [ "Post cat pictures on Mastodon", "Tag your cat pictures with #caturday" ], "type": "array", "items": { "type": "string" } }, "links": { "title": "Links", "description": "(Recommended) Links to various additional information used by Charmhub.", "examples": [ { "contact": "Please send your answer to Old Pink, care of the Funny Farm, Chalfont", "documentation": "https://discourse.charmhub.io/t/traefik-k8s-docs-index/10778", "issues": "https://github.com/canonical/traefik-k8s-operator/issues", "source": "https://github.com/canonical/traefik-k8s-operator", "website": "https://charmed-kubeflow.io/" } ], "allOf": [ { "$ref": "#/definitions/Links" } ] }, "config": { "title": "Config", "description": "One or more configuration options for your charm.\n\nStructure::\n\n config:\n options:\n # Each option name is the name by which the charm will query the option.\n <option name>:\n # (Required) The type of the option\n type: string | int | float | boolean | secret\n # (Optional) The default value of the option\n default: <a reasonable default value of the same type as the option>\n # (Optional): A string describing the option. Also appears on charmhub.io\n description: <description string>", "examples": [ { "options": { "name": { "default": "Wiki", "description": "The name or title of the Wiki", "type": "string" }, "skin": { "default": "vector", "description": "Skin to use for the wiki", "type": "string" } } } ], "type": "object" } }, "required": [ "name", "summary", "description", "type", "bases" ], "additionalProperties": false, "definitions": { "Ignore": { "title": "Ignore", "description": "Definition of `analysis.ignore` configuration.", "type": "object", "properties": { "attributes": { "title": "Attributes", "default": [], "type": "array", "items": { "type": "string" } }, "linters": { "title": "Linters", "default": [], "type": "array", "items": { "type": "string" } } }, "additionalProperties": false }, "AnalysisConfig": { "title": "AnalysisConfig", "description": "Definition of `analysis` configuration.", "type": "object", "properties": { "ignore": { "title": "Ignore", "default": { "attributes": [], "linters": [] }, "allOf": [ { "$ref": "#/definitions/Ignore" } ] } }, "additionalProperties": false }, "CharmhubConfig": { "title": "CharmhubConfig", "description": "Definition of Charmhub endpoint configuration.", "type": "object", "properties": { "api-url": { "title": "Api-Url", "default": "https://api.charmhub.io", "minLength": 1, "maxLength": 2083, "format": "uri", "type": "string" }, "storage-url": { "title": "Storage-Url", "default": "https://storage.snapcraftcontent.com", "minLength": 1, "maxLength": 2083, "format": "uri", "type": "string" }, "registry-url": { "title": "Registry-Url", "default": "https://registry.jujucharms.com", "minLength": 1, "maxLength": 2083, "format": "uri", "type": "string" } }, "additionalProperties": false }, "CharmLib": { "title": "CharmLib", "description": "A Charm library dependency for this charm.", "type": "object", "properties": { "lib": { "title": "Library Path (e.g. my-charm.my_library)", "pattern": "[a-z][a-z0-9_-]+\\.[a-z][a-z0-9_]+", "type": "string" }, "version": { "title": "Version filter for the charm. Either an API version or a specific [api].[patch].", "pattern": "[0-9]+(\\.[0-9]+)?", "type": "string" } }, "required": [ "lib", "version" ], "additionalProperties": false }, "Base": { "title": "Base", "description": "Represents a base.", "type": "object", "properties": { "name": { "title": "Name", "type": "string" }, "channel": { "title": "Channel", "type": "string" }, "architectures": { "title": "Architectures", "default": [ "amd64" ], "type": "array", "items": { "type": "string" } } }, "required": [ "name", "channel" ], "additionalProperties": false }, "BasesConfiguration": { "title": "BasesConfiguration", "description": "Definition of build-on/run-on combinations.\n\nExample::\n\n bases:\n - build-on:\n - name: ubuntu\n channel: \"20.04\"\n architectures: [amd64, arm64]\n run-on:\n - name: ubuntu\n channel: \"20.04\"\n architectures: [amd64, arm64]\n - name: ubuntu\n channel: \"22.04\"\n architectures: [amd64, arm64]", "type": "object", "properties": { "build-on": { "title": "Build-On", "type": "array", "items": { "$ref": "#/definitions/Base" } }, "run-on": { "title": "Run-On", "type": "array", "items": { "$ref": "#/definitions/Base" } } }, "required": [ "build-on", "run-on" ], "additionalProperties": false }, "Links": { "title": "Links", "description": "Definition of `links` in metadata.", "type": "object", "properties": { "contact": { "title": "Contact", "anyOf": [ { "type": "string" }, { "type": "array", "items": { "type": "string" } } ] }, "documentation": { "title": "Documentation", "minLength": 1, "maxLength": 65536, "format": "uri", "type": "string" }, "issues": { "title": "Issues", "anyOf": [ { "type": "string", "minLength": 1, "maxLength": 65536, "format": "uri" }, { "type": "array", "items": { "type": "string", "minLength": 1, "maxLength": 65536, "format": "uri" } } ] }, "source": { "title": "Source", "anyOf": [ { "type": "string", "minLength": 1, "maxLength": 65536, "format": "uri" }, { "type": "array", "items": { "type": "string", "minLength": 1, "maxLength": 65536, "format": "uri" } } ] }, "website": { "title": "Website", "anyOf": [ { "type": "string", "minLength": 1, "maxLength": 65536, "format": "uri" }, { "type": "array", "items": { "type": "string", "minLength": 1, "maxLength": 65536, "format": "uri" } } ] } }, "additionalProperties": false } } }
-
field type:
typing.Literal
['charm'
] [Required]¶ The type of project. Must be the string
charm
.
-
field name:
craft_application.models.constraints.ProjectName
[Required]¶ The name of the project on Charmhub.
This value will be used both in the URL of the charm on Charmhub and when deploying the charm with juju.
Charms should follow the charm naming guidelines.
- Constraints:
minLength = 1
maxLength = 40
pattern = ^([a-z0-9][a-z0-9-]?)*[a-z]+([a-z0-9-]?[a-z0-9])*$
-
field summary:
charmcraft.models.project.CharmcraftSummaryStr
[Required]¶ A brief (one-line) summary of your charm.
- Constraints:
maxLength = 200
-
field description:
str
[Required]¶ A multi-line summary of your charm.
-
field platforms:
None
= None¶
-
field bases:
list
[charmcraft.models.charmcraft.BasesConfiguration
] [Required]¶ - Constraints:
minItems = 1
-
field parts:
dict
[str
,dict
[str
,typing.Any
]] = {'charm': {'plugin': 'charm', 'source': '.'}}¶ Configures the various mechanisms to obtain, process and prepare data from different sources that end up being a part of the final charm.
Keys are user-defined part names. The value of each key is a map where keys are part names. Charmcraft provides 3 plugins: charm, bundle, reactive.
Example:
parts: libs: plugin: dump source: /usr/local/lib/ organize: "libxxx.so*": lib/ prime: - lib/
-
field actions:
typing.Optional
[dict
[str
,typing.Any
]] = None¶ Defines one or more actions.
This key is equivalent to the actions.yaml file.
-
field assumes:
typing.Optional
[list
[typing.Union
[str
,dict
[str
,typing.Union
[list
,dict
]]]]] = None¶ Explicitly state features a Juju model must be able to provide for a successful deployment of this charm. When a charm includes such requirements, Juju performs a pre-deployment check and displays user-friendly error messages if a feature requirement cannot be met by the model that the user is trying to deploy the charm to. If the assumes section of the charm metadata is omitted, Juju will make a best-effort attempt to deploy the charm, and users must rely on the output of
juju status
to figure out whether the deployment was successful.The key consists of a list of features that can be given either directly or, depending on the complexity of the condition you want to enforce, nested under one or both of the boolean expressions any-of or all-of, as shown below. In order for a charm to be deployed, all entries in the assumes block must be satisfied.
Structure:
assumes: - <feature-1> - any-of: - <feature-2> - <feature-3> - all-of: - <feature-4> - <feature-5>
Juju version requirements can be specified with a string such as
juju >= 3.5
orjuju < 4.0
. A full list of supported features can be found in the Juju documentation.
-
field containers:
typing.Optional
[dict
[str
,typing.Any
]] = None¶ Define a map of containers to be created adjacent to the charm (as a sidecar, in the same pod).
This is required for Kubernetes charms.
This key consists of a dictionary mapping container names to their specifications. Each container can be specified in terms of
resource
,bases
andmounts
, where one of either theresource
or thebases
subkeys must be defined andmounts
is optional.resource
is the name of an OCI image resource used to create the container (that you will then define further in the resources block).bases
is a list of bases to be used for resolving a container image, in descending order of preference. To use it, specify a base name (for example,ubuntu
orcentos
), achannel
and anarchitecture
.mounts
is a list of mounted storage volumes for this container. To use it, specify the name of the storage to mount from the charm storage and, optionally, the location where to mount the storage.
Structure:
containers: <container name>: resource: <resource name> bases: - name: <base name> channel: <track[/risk][/branch]> architectures: - <architecture> mounts: - storage: <storage name> location: <path>
-
field devices:
typing.Optional
[dict
[str
,typing.Any
]] = None¶ Devices the charm needs.
Structure:
devices: <device name>: type: gpu | nvidia.com/gpu | amd.com/gpu description: <Optional description> countmin: <Optional minimum number requested> countmax: <Optional maximum number requested>
-
field extra_bindings:
typing.Optional
[dict
[str
,typing.Any
]] = None (alias 'extra-bindings')¶ A key-only mapping representing extra bindings needed.
-
field peers:
typing.Optional
[dict
[str
,typing.Any
]] = None¶ A map of peer relations.
Structure:
peers: <endpoint name>: interface: <Required interface name> limit: <Optional: maximum number of supported connections optional: <Informational only - whether the relation is required.> scope: <"global" or "container" - the relation scope.>
For more information, see the Juju documentation.
-
field provides:
typing.Optional
[dict
[str
,typing.Any
]] = None¶ A map of interfaces this charm provides.
Structure:
provides: <endpoint name>: interface: <Required interface name> limit: <Optional: maximum number of supported connections optional: <Informational only - whether the relation is required.> scope: <"global" or "container" - the relation scope.>
For more information, see the Juju documentation.
-
field requires:
typing.Optional
[dict
[str
,typing.Any
]] = None¶ A map of relations this charm requires.
Structure:
requires: <endpoint name>: interface: <Required interface name> limit: <Optional: maximum number of supported connections optional: <Informational only - whether the relation is required.> scope: <"global" or "container" - the relation scope.>
For more information, see the Juju documentation.
-
field resources:
typing.Optional
[dict
[str
,typing.Any
]] = None¶ A mapping of resources that accompany the charm.
See first: Juju | Charm resource
Each resource is made available when the charm is deployed. NOTE: Kubernetes charms must declare an
oci-image
type resource for each container declared incontainers
.Structure:
# (Optional) Additional resources that accompany the charm resources: <resource name>: # (Required) The type of the resource type: file | oci-image # (Optional) Description of the resource and its purpose description: <description> # (Required: when type:file) The filename of the resource as it # should appear in the filesystem. filename: <filename>
-
field storage:
typing.Optional
[dict
[str
,typing.Any
]] = None¶ Storage devices requested by the charm.
Structure:
storage: # Each key represents the name of the storage <storage name>: # (Required) Type of the requested storage type: filesystem | block # (Optional) Description of the storage requested description: <description> # (Optional) The mount location for filesystem stores. For # multi-stores the location acts as the parent directory for each # mounted store. location: <location> # Indicates if all units of the application share the storage. # Defaults to false shared: true | false # Indicates if the storage should be made read-only (where # possible). Defaults to false read-only: true | false # (Optional) The number of storage instances to be requested multiple: range: <n> | <n>-<m> | <n>- | <n>+ # (Optional) Minimum size of requested storage in forms G, GiB, GB. # Size multipliers are M, G, T, P, E, Z or Y. With no multiplier # supplied, M is implied. minimum-size: <n> | <n><multiplier> # (Optional) List of properties, only supported value is "transient" properties: - transient
-
field subordinate:
typing.Optional
[bool
] = None¶ Optional boolean to declare the charm subordinate.
-
field terms:
typing.Optional
[list
[str
]] = None¶ A list of terms to which the user agree by using the charm. These terms are not enforced by the charm, Juju or Canonical.
-
field links:
typing.Optional
[charmcraft.models.charmcraft.Links
] = None¶ (Recommended) Links to various additional information used by Charmhub.
-
field config:
typing.Optional
[dict
[str
,typing.Any
]] = None¶ One or more configuration options for your charm.
Structure:
config: options: # Each option name is the name by which the charm will query the option. <option name>: # (Required) The type of the option type: string | int | float | boolean | secret # (Optional) The default value of the option default: <a reasonable default value of the same type as the option> # (Optional): A string describing the option. Also appears on charmhub.io description: <description string>
- pydantic model charmcraft.models.project.BasesConfiguration[source]¶
Definition of build-on/run-on combinations.
Example:
bases: - build-on: - name: ubuntu channel: "20.04" architectures: [amd64, arm64] run-on: - name: ubuntu channel: "20.04" architectures: [amd64, arm64] - name: ubuntu channel: "22.04" architectures: [amd64, arm64]
- Parameters:
**data (
Any
)
Show JSON schema
{ "title": "BasesConfiguration", "description": "Definition of build-on/run-on combinations.\n\nExample::\n\n bases:\n - build-on:\n - name: ubuntu\n channel: \"20.04\"\n architectures: [amd64, arm64]\n run-on:\n - name: ubuntu\n channel: \"20.04\"\n architectures: [amd64, arm64]\n - name: ubuntu\n channel: \"22.04\"\n architectures: [amd64, arm64]", "type": "object", "properties": { "build-on": { "title": "Build-On", "type": "array", "items": { "$ref": "#/definitions/Base" } }, "run-on": { "title": "Run-On", "type": "array", "items": { "$ref": "#/definitions/Base" } } }, "required": [ "build-on", "run-on" ], "additionalProperties": false, "definitions": { "Base": { "title": "Base", "description": "Represents a base.", "type": "object", "properties": { "name": { "title": "Name", "type": "string" }, "channel": { "title": "Channel", "type": "string" }, "architectures": { "title": "Architectures", "default": [ "amd64" ], "type": "array", "items": { "type": "string" } } }, "required": [ "name", "channel" ], "additionalProperties": false } } }
-
field build_on:
list
[charmcraft.models.charmcraft.Base
] [Required] (alias 'build-on')¶
-
field run_on:
list
[charmcraft.models.charmcraft.Base
] [Required] (alias 'run-on')¶
- pydantic model charmcraft.models.charmcraft.Base[source]¶
Represents a base.
- Parameters:
**data (
Any
)
Show JSON schema
{ "title": "Base", "description": "Represents a base.", "type": "object", "properties": { "name": { "title": "Name", "type": "string" }, "channel": { "title": "Channel", "type": "string" }, "architectures": { "title": "Architectures", "default": [ "amd64" ], "type": "array", "items": { "type": "string" } } }, "required": [ "name", "channel" ], "additionalProperties": false }
-
field name:
pydantic.types.StrictStr
[Required]¶
-
field channel:
pydantic.types.StrictStr
[Required]¶
-
field architectures:
list
[pydantic.types.StrictStr
] = ['amd64']¶
- pydantic model charmcraft.models.project.Links[source]¶
Definition of links in metadata.
- Parameters:
**data (
Any
)
Show JSON schema
{ "title": "Links", "description": "Definition of `links` in metadata.", "type": "object", "properties": { "contact": { "title": "Contact", "anyOf": [ { "type": "string" }, { "type": "array", "items": { "type": "string" } } ] }, "documentation": { "title": "Documentation", "minLength": 1, "maxLength": 65536, "format": "uri", "type": "string" }, "issues": { "title": "Issues", "anyOf": [ { "type": "string", "minLength": 1, "maxLength": 65536, "format": "uri" }, { "type": "array", "items": { "type": "string", "minLength": 1, "maxLength": 65536, "format": "uri" } } ] }, "source": { "title": "Source", "anyOf": [ { "type": "string", "minLength": 1, "maxLength": 65536, "format": "uri" }, { "type": "array", "items": { "type": "string", "minLength": 1, "maxLength": 65536, "format": "uri" } } ] }, "website": { "title": "Website", "anyOf": [ { "type": "string", "minLength": 1, "maxLength": 65536, "format": "uri" }, { "type": "array", "items": { "type": "string", "minLength": 1, "maxLength": 65536, "format": "uri" } } ] } }, "additionalProperties": false }
-
field contact:
typing.Union
[pydantic.types.StrictStr
,list
[pydantic.types.StrictStr
],None
] = None¶ Instructions for contacting the owner of the charm.
-
field documentation:
typing.Optional
[pydantic.networks.AnyHttpUrl
] = None¶ The URL of the documentation for this charm.
- Constraints:
minLength = 1
maxLength = 65536
format = uri
-
field issues:
typing.Union
[pydantic.networks.AnyHttpUrl
,list
[pydantic.networks.AnyHttpUrl
],None
] = None¶ A link to the issue tracker for this charm.
-
field source:
typing.Union
[pydantic.networks.AnyHttpUrl
,list
[pydantic.networks.AnyHttpUrl
],None
] = None¶ Where to find this charm’s source code.
-
field website:
typing.Union
[pydantic.networks.AnyHttpUrl
,list
[pydantic.networks.AnyHttpUrl
],None
] = None¶ The website for this charm.