magma-orc8r-certifier

  • Canonical Telco
Channel Revision Published Runs on
latest/stable 65 30 May 2023
Ubuntu 22.04 Ubuntu 20.04
latest/stable 55 07 Mar 2023
Ubuntu 22.04 Ubuntu 20.04
latest/beta 40 20 Oct 2022
Ubuntu 20.04
latest/edge 64 05 May 2023
Ubuntu 22.04 Ubuntu 20.04
latest/edge 56 14 Mar 2023
Ubuntu 22.04 Ubuntu 20.04
1.8/stable 65 30 May 2023
Ubuntu 22.04
1.8/candidate 65 30 May 2023
Ubuntu 22.04
1.8/beta 65 30 May 2023
Ubuntu 22.04
1.8/edge 65 30 May 2023
Ubuntu 22.04
1.6/stable 55 24 Feb 2023
Ubuntu 20.04
1.6/candidate 55 24 Feb 2023
Ubuntu 20.04
1.6/beta 55 24 Feb 2023
Ubuntu 20.04
1.6/edge 55 24 Feb 2023
Ubuntu 20.04
juju deploy magma-orc8r-certifier
Show information

Platform:

charms.magma_orc8r_certifier.v0.cert_bootstrapper

Cert Bootstrapper Library.

Getting started
charmcraft fetch-lib charms.magma_orc8r_certifier.v0.cert_bootstrapper
Requirer Charm
class CertBootstrapperRequires(Object):

    on = CertBootstrapperRequirerCharmEvents()

    def __init__(self, charm, relationship_name: str):
        self.relationship_name = relationship_name
        self.charm = charm
        super().__init__(charm, relationship_name)
        self.framework.observe(
            charm.on[relationship_name].relation_joined, self._on_relation_changed
        )
        self.framework.observe(
            charm.on[relationship_name].relation_changed, self._on_relation_changed
        )

    def _on_relation_changed(self, event):
        relation_data = event.relation.data
        private_key = relation_data[event.unit].get("private_key")
        self.on.private_key_available.emit(private_key=private_key)


class CertificateRequestEvent

Description

Dataclass for Certificate request events. None

Methods

CertificateRequestEvent. __init__( self , handle , relation_id: int )

Description

Sets relation id. None

CertificateRequestEvent. snapshot( self )

Description

Returns event data. None

CertificateRequestEvent. restore( self , snapshot )

Description

Restores event data. None

class PrivateKeyAvailableEvent

Description

Dataclass for Certificate available events. None

Methods

PrivateKeyAvailableEvent. __init__( self , handle , private_key: str )

Description

Sets private key. None

PrivateKeyAvailableEvent. snapshot( self )

Description

Returns event data. None

PrivateKeyAvailableEvent. restore( self , snapshot )

Description

Restores event data. None

class CertBootstrapperProviderCharmEvents

Description

All custom events for the CertBootstrapperProvider. None

class CertBootstrapperRequirerCharmEvents

Description

All custom events for the CertBootstrapperRequirer. None

class CertBootstrapperProvides

Description

Class to be instantiated by provider of bootstrapper private key. None

Methods

CertBootstrapperProvides. __init__( self , charm: CharmBase , relationship_name: str )

Observes relation joined event.

Arguments

charm

Juju charm

relationship_name (str)

Relation name

CertBootstrapperProvides. set_private_key( self , relation_id: int , private_key: str )

Sets private key in relation data.

Arguments

relation_id (str)

Relation ID

private_key (str)

Private Key

Returns

None

class CertBootstrapperRequires

Description

Class to be instantiated by requirer of bootstrapper private key. None

Methods

CertBootstrapperRequires. __init__( self , charm: CharmBase , relationship_name: str )

Observes relation joined and relation changed events.

Arguments

charm

Juju charm

relationship_name (str)

Relation name