Keystone K8S

  • By OpenStack Charmers
Channel Revision Published Runs on
yoga/beta 82 10 Mar 2023
Ubuntu 22.04
yoga/edge 99 16 May 2023
Ubuntu 22.04
xena/beta 72 21 Nov 2022
Ubuntu 22.04
xena/edge 76 20 Jan 2023
Ubuntu 22.04
2023.2/stable 148 06 Dec 2023
Ubuntu 22.04
2023.2/candidate 169 05 Apr 2024
Ubuntu 22.04
2023.2/beta 169 05 Apr 2024
Ubuntu 22.04
2023.2/edge 169 03 Apr 2024
Ubuntu 22.04
2023.1/stable 125 26 Sep 2023
Ubuntu 22.04
2023.1/candidate 155 12 Jan 2024
Ubuntu 22.04
2023.1/beta 155 10 Jan 2024
Ubuntu 22.04
2023.1/edge 155 03 Jan 2024
Ubuntu 22.04
juju deploy keystone-k8s --channel 2023.2/stable
Show information

Platform:

charms.keystone_k8s.v1.cloud_credentials

CloudCredentialsProvides and Requires module.

This library contains the Requires and Provides classes for handling the cloud_credentials interface.

Import CloudCredentialsRequires in your charm, with the charm object and the relation name: - self - "cloud_credentials"

Also provide additional parameters to the charm object: - service - internal_url - public_url - admin_url - region - username - vhost

Two events are also available to respond to: - connected - ready - goneaway

A basic example showing the usage of this relation follows:

from charms.keystone_k8s.v0.cloud_credentials import CloudCredentialsRequires

class CloudCredentialsClientCharm(CharmBase):
    def __init__(self, *args):
        super().__init__(*args)
        # CloudCredentials Requires
        self.cloud_credentials = CloudCredentialsRequires(
            self, "cloud_credentials",
            service = "my-service"
            internal_url = "http://internal-url"
            public_url = "http://public-url"
            admin_url = "http://admin-url"
            region = "region"
        )
        self.framework.observe(
            self.cloud_credentials.on.connected, self._on_cloud_credentials_connected)
        self.framework.observe(
            self.cloud_credentials.on.ready, self._on_cloud_credentials_ready)
        self.framework.observe(
            self.cloud_credentials.on.goneaway, self._on_cloud_credentials_goneaway)

    def _on_cloud_credentials_connected(self, event):
        '''React to the CloudCredentials connected event.

        This event happens when n CloudCredentials relation is added to the
        model before credentials etc have been provided.
        '''
        # Do something before the relation is complete
        pass

    def _on_cloud_credentials_ready(self, event):
        '''React to the CloudCredentials ready event.

        The CloudCredentials interface will use the provided config for the
        request to the identity server.
        '''
        # CloudCredentials Relation is ready. Do something with the completed relation.
        pass

    def _on_cloud_credentials_goneaway(self, event):
        '''React to the CloudCredentials goneaway event.

        This event happens when an CloudCredentials relation is removed.
        '''
        # CloudCredentials Relation has goneaway. shutdown services or suchlike
        pass

class CloudCredentialsConnectedEvent

Description

CloudCredentials connected Event. None

class CloudCredentialsReadyEvent

Description

CloudCredentials ready for use Event. None

class CloudCredentialsGoneAwayEvent

Description

CloudCredentials relation has gone-away Event None

class CloudCredentialsServerEvents

Description

Events class for on None

class CloudCredentialsRequires

Description

CloudCredentialsRequires class None

Methods

CloudCredentialsRequires. __init__( self , charm , relation_name: str )

CloudCredentialsRequires. get_remote_app_data( self , key: str )

Description

Return the value for the given key from remote app data. None

CloudCredentialsRequires. api_version( self )

Description

Return the api_version. None

CloudCredentialsRequires. auth_host( self )

Description

Return the auth_host. None

CloudCredentialsRequires. auth_port( self )

Description

Return the auth_port. None

CloudCredentialsRequires. auth_protocol( self )

Description

Return the auth_protocol. None

CloudCredentialsRequires. internal_host( self )

Description

Return the internal_host. None

CloudCredentialsRequires. internal_port( self )

Description

Return the internal_port. None

CloudCredentialsRequires. internal_protocol( self )

Description

Return the internal_protocol. None

CloudCredentialsRequires. credentials( self )

CloudCredentialsRequires. username( self )

CloudCredentialsRequires. password( self )

CloudCredentialsRequires. project_name( self )

Description

Return the project name. None

CloudCredentialsRequires. project_id( self )

Description

Return the project id. None

CloudCredentialsRequires. user_domain_name( self )

Description

Return the name of the user domain. None

CloudCredentialsRequires. user_domain_id( self )

Description

Return the id of the user domain. None

CloudCredentialsRequires. project_domain_name( self )

Description

Return the name of the project domain. None

CloudCredentialsRequires. project_domain_id( self )

Description

Return the id of the project domain. None

CloudCredentialsRequires. region( self )

Description

Return the region for the auth urls. None

CloudCredentialsRequires. internal_endpoint( self )

Description

Return the region for the internal auth url. None

CloudCredentialsRequires. public_endpoint( self )

Description

Return the region for the public auth url. None

CloudCredentialsRequires. request_credentials( self )

Description

Request credentials from the CloudCredentials server. None

class HasCloudCredentialsClientsEvent

Description

Has CloudCredentialsClients Event. None

class ReadyCloudCredentialsClientsEvent

Description

CloudCredentialsClients Ready Event. None

Methods

ReadyCloudCredentialsClientsEvent. __init__( self , handle , relation_id , relation_name , username )

ReadyCloudCredentialsClientsEvent. snapshot( self )

ReadyCloudCredentialsClientsEvent. restore( self , snapshot )

class CloudCredentialsClientsGoneAwayEvent

Description

Has CloudCredentialsClientsGoneAwayEvent Event. None

class CloudCredentialsClientEvents

Description

Events class for on None

class CloudCredentialsProvides

Description

CloudCredentialsProvides class None

Methods

CloudCredentialsProvides. __init__( self , charm , relation_name )

CloudCredentialsProvides. set_cloud_credentials( self , relation_name: int , relation_id: str , api_version: str , auth_host: str , auth_port: str , auth_protocol: str , internal_host: str , internal_port: str , internal_protocol: str , credentials: str , project_name: str , project_id: str , user_domain_name: str , user_domain_id: str , project_domain_name: str , project_domain_id: str , region: str )