4.6 KiB
requires
This is the requires side of the interface layer, for use in charms that wish to request integration with OpenStack native features. The integration will be provided by the OpenStack integration charm, which allows the requiring charm to not require cloud credentials itself and not have a lot of OpenStack specific API code.
The flags that are set by the requires side of this interface are:
-
endpoint.{endpoint_name}.joinedThis flag is set when the relation has been joined, and the charm should then use the methods documented below to request specific OpenStack features. This flag is automatically removed if the relation is broken. It should not be removed by the charm. -
endpoint.{endpoint_name}.readyThis flag is set once the requested features have been enabled for the OpenStack instance on which the charm is running. This flag is automatically removed if new integration features are requested. It should not be removed by the charm. -
endpoint.{endpoint_name}.ready.changedThis flag is set if the data changes after the ready flag was set. This flag should be removed by the charm once handled.
OpenStackIntegrationRequires
OpenStackIntegrationRequires(endpoint_name, relation_ids=None)
Interface to request integration access.
Note that due to resource limits and permissions granularity, policies are limited to being applied at the charm level. That means that, if any permissions are requested (i.e., any of the enable methods are called), what is granted will be the sum of those ever requested by any instance of the charm on this cloud.
Labels, on the other hand, will be instance specific.
Example usage:
from charms.reactive import when, endpoint_from_flag
@when('endpoint.openstack.ready')
def openstack_integration_ready():
openstack = endpoint_from_flag('endpoint.openstack.ready')
update_config_enable_openstack(openstack)
auth_url
The authentication endpoint URL.
bs_version
What block storage API version to use, auto if autodetection is
desired, or None to use the default.
endpoint_tls_ca
Optional base64-encoded CA certificate for the authentication endpoint, or None.
floating_network_id
Optional floating network ID, or None.
has_octavia
Whether the underlying OpenStack supports Octavia instead of Neutron-based LBaaS.
Will either be True, False, or None if it could not be determined for some reason (typically due to connecting to an older integrator charm).
ignore_volume_az
Whether to ignore availability zones when attaching Cinder volumes.
Will be True, False, or None.
is_changed
Whether or not the request for this instance has changed.
is_ready
Whether or not the request for this instance has been completed.
lb_method
Optional load-balancer method, or None.
manage_security_groups
Whether or not the Load Balancer should automatically manage security group rules.
Will be True or False.
password
The password.
project_domain_name
The project domain name.
project_name
The project name, also known as the tenant ID.
region
The region name.
subnet_id
Optional subnet ID to work in, or None.
trust_device_path
Whether to trust the block device name provided by Ceph.
Will be True, False, or None.
user_domain_name
The user domain name.
username
The username.
version
Optional version number for the APIs or None.