Oai Ran Du K8S
Channel | Revision | Published | Runs on |
---|---|---|---|
latest/edge | 1 | 06 Aug 2024 | |
2.2/edge | 119 | 10 Aug 2025 | |
2.1/edge | 63 | 19 Jan 2025 |
juju deploy oai-ran-du-k8s --channel edge
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.oai_ran_du_k8s.v0.fiveg_rf_config
-
- Last updated 21 May 2025
- Revision Library version 0.1
Library for the fiveg_rf_config
relation.
This library contains the Requires and Provides classes for handling the fiveg-rf-config
interface.
The purpose of this library is to pass the Radio Frequency (RF) configuration data required to establish communication between two charms implementing the fiveg-rf-config
interface over a real or simulated RF medium.
In particular the RF SIM address, Network Slice Type (SST), Slice Differentiator (SD), RF band, downlink frequency, carrier bandwidth, numerology and the number of the first usable subcarrier will be passed through the interface.
In the Telco world this will typically be charms implementing the DU (Distributed Unit) and the UE (User equipment).
Getting Started
From a charm directory, fetch the library using charmcraft
:
charmcraft fetch-lib charms.oai_ran_du_k8s.v0.fiveg_rf_config
Add the following libraries to the charm's requirements.txt
file:
- pydantic
- pytest-interface-tester
Provider charm
The provider charm is the one providing the information about RF SIM address, SST, SD, RF band, downlink frequency, carrier bandwidth, numerology and the number of the first usable subcarrier. Typically, this will be the DU charm.
Example:
from ops import main
from ops.charm import CharmBase, RelationChangedEvent
from charms.oai_ran_du_k8s.v0.fiveg_rf_config import RFConfigProvides
class DummyFivegRFConfigProviderCharm(CharmBase):
RFSIM_ADDRESS = "192.168.70.130"
SST = 1
SD = 1
BAND = 77
DL_FREQ = 4059090000 # In Hz
CARRIER_BANDWIDTH = 106 # In PRBs
NUMEROLOGY = 1
START_SUBCARRIER = 541
def __init__(self, *args):
super().__init__(*args)
self.rf_config_provider = RFConfigProvides(self, "fiveg_rf_config")
self.framework.observe(
self.on.fiveg_rf_config_relation_changed, self._on_fiveg_rf_config_relation_changed
)
def _on_fiveg_rf_config_relation_changed(self, event: RelationChangedEvent):
if self.unit.is_leader():
self.rf_config_provider.set_rf_config_information(
version=0,
rfsim_address=self.RFSIM_ADDRESS,
sst=self.SST,
sd=self.SD,
band=self.BAND,
dl_freq=self.DL_FREQ,
carrier_bandwidth=self.CARRIER_BANDWIDTH,
numerology=self.NUMEROLOGY,
start_subcarrier=self.START_SUBCARRIER
)
if __name__ == "__main__":
main(DummyFivegRFConfigProviderCharm)
Requirer charm
The requirer charm is the one requiring the RF configuration information. Typically, this will be the UE charm.
Example:
from ops import main
from ops.charm import CharmBase, RelationChangedEvent
from charms.oai_ran_du_k8s.v0.fiveg_rf_config import RFConfigRequires
logger = logging.getLogger(__name__)
class DummyFivegRFConfigRequires(CharmBase):
def __init__(self, *args):
super().__init__(*args)
self.rf_config_requirer = RFConfigRequires(self, "fiveg_rf_config")
self.framework.observe(
self.on.fiveg_rf_config_relation_changed, self._on_fiveg_rf_config_relation_changed
)
def _on_fiveg_rf_config_relation_changed(self, event: RelationChangedEvent):
provider_rfsim_address = event.rfsim_address
provider_sst = event.sst
provider_sd = event.sd
provider_band = event.band
provider_dl_freq = event.dl_freq
provider_carrier_bandwidth = event.carrier_bandwidth
provider_numerology = event.numerology
provider_start_subcarrier = event.start_subcarrier
<do something with the received data>
if __name__ == "__main__":
main(DummyFivegRFConfigRequires)
Index
class ProviderAppData
Description
Provider app data for fiveg_rf_config. None
class ProviderSchema
Description
Provider schema for the fiveg_rf_config relation. None
class RequirerAppData
Description
Requirer app data for fiveg_rf_config. None
class RequirerSchema
Description
Requirer schema for the fiveg_rf_config relation. None
def provider_data_is_valid(data)
Return whether the provider data is valid.
Arguments
Data to be validated.
Returns
True if data is valid, False otherwise.
def requirer_data_is_valid(data)
Return whether the requirer data is valid.
Arguments
Data to be validated.
Returns
True if data is valid, False otherwise.
class FivegRFConfigError
Description
Custom error class for the fiveg_rf_config
library. None
Methods
FivegRFConfigError. __init__( self , message: str )
class RFConfigProvides
Description
Class to be instantiated by the charm providing the fiveg_rf_config
relation. None
Methods
RFConfigProvides. __init__( self , charm: CharmBase , relation_name: str )
Description
Init. None
RFConfigProvides. set_rf_config_information( self , rfsim_address , sst: int , sd , band: int , dl_freq: int , carrier_bandwidth: int , numerology: int , start_subcarrier: int )
Push the information about the RF configuration in the application relation data.
Arguments
rfsim service address which is equal to DU Pod IP
Slice/Service Type
Slice Differentiator
Valid 5G band
Downlink frequency in Hz
Carrier bandwidth (number of downlink PRBs)
Numerology
First usable subcarrier
RFConfigProvides. interface_version( self )
class RFConfigRequires
Description
Class to be instantiated by the charm requiring the fiveg_rf_config
relation. None
Methods
RFConfigRequires. __init__( self , charm: CharmBase , relation_name: str )
Description
Init. None
RFConfigRequires. provider_interface_version( self )
Return interface version used by the provider.
Returns
The fiveg_rf_config
interface version used by the provider.
RFConfigRequires. rfsim_address( self )
Return address of the RFSIM.
Returns
rfsim address which is equal to DU pod ip.
RFConfigRequires. sst( self )
Return the Network Slice Service Type (SST).
Returns
sst (Network Slice Service Type)
RFConfigRequires. sd( self )
Return the Network Slice Differentiator (SD).
Returns
Optional[int] : sd (Network Slice Differentiator)
RFConfigRequires. band( self )
Return the RF Band number.
Returns
Optional[int] : band (RF Band number)
RFConfigRequires. dl_freq( self )
Return the Downlink frequency.
Returns
Optional[int] : dl_freq (Downlink frequency)
RFConfigRequires. carrier_bandwidth( self )
Return the carrier bandwidth (number of downlink PRBs).
Returns
Optional[int] : carrier_bandwidth (carrier bandwidth)
RFConfigRequires. numerology( self )
Return numerology.
Returns
Optional[int] : numerology
RFConfigRequires. start_subcarrier( self )
Return number of the first usable subcarrier.
Returns
Optional[int] : start_subcarrier
RFConfigRequires. get_provider_rf_config_information( self , relation )
Get relation data for the remote application.
Arguments
Juju relation object (optional).
Returns
Relation data for the remote application if data is valid, None otherwise.
RFConfigRequires. set_rf_config_information( self )
Description
Push the information about the fiveg_rf_config
interface version used by the Requirer. None