SD-Core 5G GNBSIM K8s
- Canonical Telco
Channel | Revision | Published | Runs on |
---|---|---|---|
latest/beta | 9 | 03 Jan 2024 | |
latest/edge | 13 | 21 Jan 2024 | |
1.4/beta | 108 | 26 Apr 2024 | |
1.4/edge | 588 | 29 Oct 2024 | |
1.5/edge | 596 | 17 Nov 2024 | |
1.3/beta | 9 | 22 Jan 2024 | |
1.3/edge | 63 | 31 Mar 2024 |
juju deploy sdcore-gnbsim-k8s --channel 1.4/beta
Deploy Kubernetes operators easily with Juju, the Universal Operator Lifecycle Manager. Need a Kubernetes cluster? Install MicroK8s to create a full CNCF-certified Kubernetes system in under 60 seconds.
Platform:
charms.sdcore_gnbsim_k8s.v0.fiveg_gnb_identity
-
- Last updated 07 Aug 2024
- Revision Library version 0.4
Library for the fiveg_gnb_identity
relation.
This library contains the Requires and Provides classes for handling the fiveg_gnb_identity
interface.
The purpose of this library is to provide a way for gNodeB's to share their identity with the charms which require this information.
To get started using the library, you need to fetch the library using charmcraft
.
cd some-charm
charmcraft fetch-lib charms.sdcore_gnbsim_k8s.v0.fiveg_gnb_identity
Add the following libraries to the charm's requirements.txt
file:
- pydantic
- pytest-interface-tester
Charms providing the fiveg_gnb_identity
relation should use GnbIdentityProvides
.
Typical usage of this class would look something like:
```python
...
from charms.sdcore_gnbsim_k8s.v0.fiveg_gnb_identity import GnbIdentityProvides
...
class SomeProviderCharm(CharmBase):
def __init__(self, *args):
...
self.gnb_identity_provider = GnbIdentityProvides(
charm=self,
relation_name="fiveg_gnb_identity"
)
...
self.framework.observe(
self.gnb_identity_provider.on.fiveg_gnb_identity_request,
self._on_fiveg_gnb_identity_request
)
def _on_fiveg_gnb_identity_request(self, event):
...
self.gnb_identity_provider.publish_gnb_identity_information(
relation_id=event.relation_id,
gnb_name=name,
tac=tac,
)
```
And a corresponding section in charm's `metadata.yaml`:
```
provides:
fiveg_gnb_identity: # Relation name
interface: fiveg_gnb_identity # Relation interface
```
Charms that require the fiveg_gnb_identity
relation should use GnbIdentityRequires
.
Typical usage of this class would look something like:
```python
...
from charms.sdcore_gnbsim_k8s.v0.fiveg_gnb_identity import GnbIdentityRequires
...
class SomeRequirerCharm(CharmBase):
def __init__(self, *args):
...
self.fiveg_gnb_identity = GnbIdentityRequires(
charm=self,
relation_name="fiveg_gnb_identity"
)
...
self.framework.observe(self.fiveg_gnb_identity.on.fiveg_gnb_identity_available,
self._on_fiveg_gnb_identity_available)
def _on_fiveg_gnb_identity_available(self, event):
gnb_name = event.gnb_name,
tac = event.tac,
# Do something with the gNB's name and TAC.
```
And a corresponding section in charm's `metadata.yaml`:
```
requires:
fiveg_gnb_identity: # Relation name
interface: fiveg_gnb_identity # Relation interface
```
Index
class FivegGnbIdentityProviderAppData
Description
Provider app data for fiveg_gnb_identity. None
class ProviderSchema
Description
Provider schema for fiveg_gnb_identity. None
def data_matches_provider_schema(data: dict)
Return whether data matches provider schema.
Arguments
Data to be validated.
Returns
True if data matches provider schema, False otherwise.
class FivegGnbIdentityRequestEvent
Description
Dataclass for the fiveg_gnb_identity
request event. None
Methods
FivegGnbIdentityRequestEvent. __init__( self , handle: Handle , relation_id: int )
Set relation id.
Arguments
Juju framework handle.
ID of the relation.
FivegGnbIdentityRequestEvent. snapshot( self )
Return event data.
Returns
contains the relation ID.
FivegGnbIdentityRequestEvent. restore( self , snapshot: dict )
Restore event data.
Arguments
contains the relation ID.
class GnbIdentityProviderCharmEvents
Description
Custom events for the GnbIdentityProvider. None
class GnbIdentityProvides
Description
Class to be instantiated by provider of the fiveg_gnb_identity
. None
Methods
GnbIdentityProvides. __init__( self , charm: CharmBase , relation_name: str )
Observe relation joined event.
Arguments
Juju charm
Relation name
GnbIdentityProvides. publish_gnb_identity_information( self , relation_id: int , gnb_name: str , tac: int )
Set gNodeB's name and TAC in the relation data.
Arguments
Relation ID
name of the gNodeB.
Tracking Area Code.
class GnbIdentityAvailableEvent
Description
Dataclass for the fiveg_gnb_identity
available event. None
Methods
GnbIdentityAvailableEvent. __init__( self , handle: Handle , gnb_name: str , tac: str )
Description
Set gNodeB's name and TAC. None
GnbIdentityAvailableEvent. snapshot( self )
Description
Return event data. None
GnbIdentityAvailableEvent. restore( self , snapshot: dict )
Restore event data.
Arguments
contains information to be restored.
class GnbIdentityRequirerCharmEvents
Description
Custom events for the GnbIdentityRequirer. None
class GnbIdentityRequires
Description
Class to be instantiated by requirer of the fiveg_gnb_identity
. None
Methods
GnbIdentityRequires. __init__( self , charm: CharmBase , relation_name: str )
Observes relation joined and relation changed events.
Arguments
Juju charm
Relation name