csle_collector.five_g_du_manager package
Subpackages
- csle_collector.five_g_du_manager.dao package
- Submodules
- csle_collector.five_g_du_manager.dao.five_g_du_app_resource_usage_metrics module
FiveGDUAppResourceUsageMetricsFiveGDUAppResourceUsageMetrics.copy()FiveGDUAppResourceUsageMetrics.from_dict()FiveGDUAppResourceUsageMetrics.from_json_file()FiveGDUAppResourceUsageMetrics.from_kafka_record()FiveGDUAppResourceUsageMetrics.from_ws_dict()FiveGDUAppResourceUsageMetrics.num_attributes()FiveGDUAppResourceUsageMetrics.schema()FiveGDUAppResourceUsageMetrics.to_dict()FiveGDUAppResourceUsageMetrics.to_kafka_record()FiveGDUAppResourceUsageMetrics.update_with_kafka_record()
- csle_collector.five_g_du_manager.dao.five_g_du_buffer_pool_metrics module
FiveGDUBufferPoolMetricsFiveGDUBufferPoolMetrics.copy()FiveGDUBufferPoolMetrics.from_dict()FiveGDUBufferPoolMetrics.from_json_file()FiveGDUBufferPoolMetrics.from_kafka_record()FiveGDUBufferPoolMetrics.from_ws_dict()FiveGDUBufferPoolMetrics.num_attributes()FiveGDUBufferPoolMetrics.schema()FiveGDUBufferPoolMetrics.to_dict()FiveGDUBufferPoolMetrics.to_kafka_record()FiveGDUBufferPoolMetrics.update_with_kafka_record()
- csle_collector.five_g_du_manager.dao.five_g_du_cell_metrics module
FiveGDUCellMetricsFiveGDUCellMetrics.copy()FiveGDUCellMetrics.from_dict()FiveGDUCellMetrics.from_json_file()FiveGDUCellMetrics.from_kafka_record()FiveGDUCellMetrics.from_ws_dict()FiveGDUCellMetrics.num_attributes()FiveGDUCellMetrics.schema()FiveGDUCellMetrics.to_dict()FiveGDUCellMetrics.to_kafka_record()FiveGDUCellMetrics.update_with_kafka_record()
- csle_collector.five_g_du_manager.dao.five_g_du_low_metrics module
FiveGDULowMetricsFiveGDULowMetrics.copy()FiveGDULowMetrics.from_dict()FiveGDULowMetrics.from_json_file()FiveGDULowMetrics.from_kafka_record()FiveGDULowMetrics.from_ws_dict()FiveGDULowMetrics.num_attributes()FiveGDULowMetrics.schema()FiveGDULowMetrics.to_dict()FiveGDULowMetrics.to_kafka_record()FiveGDULowMetrics.update_with_kafka_record()
- csle_collector.five_g_du_manager.dao.five_g_du_metrics module
FiveGDUMetricsFiveGDUMetrics.copy()FiveGDUMetrics.from_dict()FiveGDUMetrics.from_json_file()FiveGDUMetrics.from_kafka_record()FiveGDUMetrics.from_ws_dict()FiveGDUMetrics.num_attributes()FiveGDUMetrics.schema()FiveGDUMetrics.to_dict()FiveGDUMetrics.to_kafka_record()FiveGDUMetrics.update_with_kafka_record()
- csle_collector.five_g_du_manager.dao.five_g_du_rlc_metrics module
FiveGDURLCMetricsFiveGDURLCMetrics.copy()FiveGDURLCMetrics.from_dict()FiveGDURLCMetrics.from_json_file()FiveGDURLCMetrics.from_kafka_record()FiveGDURLCMetrics.from_ws_dict()FiveGDURLCMetrics.num_attributes()FiveGDURLCMetrics.schema()FiveGDURLCMetrics.to_dict()FiveGDURLCMetrics.to_kafka_record()FiveGDURLCMetrics.update_with_kafka_record()
- Module contents
- csle_collector.five_g_du_manager.threads package
Submodules
csle_collector.five_g_du_manager.five_g_du_manager module
- class csle_collector.five_g_du_manager.five_g_du_manager.FiveGDUManagerServicer[source]
Bases:
FiveGDUManagerServicergRPC server for managing the 5G DU
- getFiveGDUStatus(request: GetFiveGDUStatusMsg, context: ServicerContext) FiveGDUStatusDTO[source]
Gets the status of the 5G DU
- Parameters
request – the gRPC request
context – the gRPC context
- Returns
a DTO with the status of the 5g du
- initFiveGDUUE(request: InitFiveGDUUEMsg, context: ServicerContext) FiveGDUStatusDTO[source]
Initializes the 5G UE and the 5G DU
- Parameters
request – the gRPC request
context – the gRPC context
- Returns
a DTO with the status of the 5g DU and UE
- setFiveGDUUESignalStrength(request: SetFiveGDUUESignalStrengthMsg, context: ServicerContext) FiveGDUStatusDTO[source]
Sets the signal strength of the 5G UE and the 5G DU
- Parameters
request – the gRPC request
context – the gRPC context
- Returns
a DTO with the status of the 5g DU and UE
- startFiveGDU(request: StartFiveGDUMsg, context: ServicerContext) FiveGDUStatusDTO[source]
Starts the 5G DU
- Parameters
request – the gRPC request
context – the gRPC context
- Returns
a DTO with the status of the 5g du
- startFiveGDUMonitor(request: StartFiveGDUMonitorMsg, context: ServicerContext) FiveGDUStatusDTO[source]
Starts the 5G DU monitor thread
- Parameters
request – the gRPC request
context – the gRPC context
- Returns
a DTO with the status of the DU monitor thread
- startFiveGUE(request: StartFiveGUEMsg, context: ServicerContext) FiveGDUStatusDTO[source]
Starts the 5G UE
- Parameters
request – the gRPC request
context – the gRPC context
- Returns
a DTO with the status of the 5g DU
- stopFiveGDU(request: StopFiveGDUMsg, context: ServicerContext) FiveGDUStatusDTO[source]
Stops the 5G DU
- Parameters
request – the gRPC request
context – the gRPC context
- Returns
a DTO with the status of the 5g du
- csle_collector.five_g_du_manager.five_g_du_manager.serve(port: int = 50054, log_dir: str = '/', max_workers: int = 100, log_file_name: str = 'five_g_du_manager.log') None[source]
Starts the gRPC server for managing clients
- Parameters
port – the port that the server will listen to
log_dir – the directory to write the log file
log_file_name – the file name of the log
max_workers – the maximum number of GRPC workers
- Returns
None
csle_collector.five_g_du_manager.five_g_du_manager_pb2 module
Generated protocol buffer code.
csle_collector.five_g_du_manager.five_g_du_manager_pb2_grpc module
Client and server classes corresponding to protobuf-defined services.
- class csle_collector.five_g_du_manager.five_g_du_manager_pb2_grpc.FiveGDUManager[source]
Bases:
objectInterface exported by the server
- static getFiveGDUStatus(request, target, options=(), channel_credentials=None, call_credentials=None, insecure=False, compression=None, wait_for_ready=None, timeout=None, metadata=None)[source]
- static initFiveGDUUE(request, target, options=(), channel_credentials=None, call_credentials=None, insecure=False, compression=None, wait_for_ready=None, timeout=None, metadata=None)[source]
- static setFiveGDUUESignalStrength(request, target, options=(), channel_credentials=None, call_credentials=None, insecure=False, compression=None, wait_for_ready=None, timeout=None, metadata=None)[source]
- static startFiveGDU(request, target, options=(), channel_credentials=None, call_credentials=None, insecure=False, compression=None, wait_for_ready=None, timeout=None, metadata=None)[source]
- static startFiveGDUMonitor(request, target, options=(), channel_credentials=None, call_credentials=None, insecure=False, compression=None, wait_for_ready=None, timeout=None, metadata=None)[source]
- static startFiveGUE(request, target, options=(), channel_credentials=None, call_credentials=None, insecure=False, compression=None, wait_for_ready=None, timeout=None, metadata=None)[source]
- static stopFiveGDU(request, target, options=(), channel_credentials=None, call_credentials=None, insecure=False, compression=None, wait_for_ready=None, timeout=None, metadata=None)[source]
- class csle_collector.five_g_du_manager.five_g_du_manager_pb2_grpc.FiveGDUManagerServicer[source]
Bases:
objectInterface exported by the server
- getFiveGDUStatus(request, context)[source]
Missing associated documentation comment in .proto file.
- setFiveGDUUESignalStrength(request, context)[source]
Missing associated documentation comment in .proto file.
- startFiveGDUMonitor(request, context)[source]
Missing associated documentation comment in .proto file.
csle_collector.five_g_du_manager.five_g_du_manager_util module
- class csle_collector.five_g_du_manager.five_g_du_manager_util.FiveGDUManagerUtil[source]
Bases:
objectClass with utility functions for the 5G DU manager
- static five_g_du_status_dto_from_dict(d: Dict[str, Any]) FiveGDUStatusDTO[source]
Converts a FiveGDUStatusDTO to a dict
- Parameters
d – the dict to convert
- Returns
the converted DTO
- static five_g_du_status_dto_to_dict(five_g_du_status_dto: FiveGDUStatusDTO) Dict[str, Any][source]
Converts a FiveGDUStatusDTO to a dict
- Parameters
five_g_du_status_dto – the DTO to convert
- Returns
a dict representation of the DTO
- static get_du_status(control_script_path: str) Dict[str, bool][source]
Executes the control script, parses the output, and return the status of the 5G DU
- Parameters
control_script_path – the path to the control script
- Returns
A dict with the names of the statuses and boolean values indicating if the DU is running
- static get_ue_status(control_script_path: str) Dict[str, bool][source]
Executes the control script, parses the output, and return the statuses of the 5G UE
- Parameters
control_script_path – the path to the control script
- Returns
A dict with the names of the statuses and boolean values indicating if the DU is running
- static init_du_config_file(cu_fronthaul_ip: str, du_fronthaul_ip: str, pci: int, gnb_du_id: int, sector_id: int) bool[source]
Modifies the /srsRAN_Project/build/apps/du/du.yml configuration file.
- Parameters
gnb_du_id – The ID of the DU (each DU connected to the same CU must have a unique ID)
sector_id – Part of the cell ID of the DU
pci – Physical Cell ID of the DU
cu_fronthaul_ip – The IP address of the CU (F1-C interface).
du_fronthaul_ip – The IP address of the DU (F1-U interface).
- Returns
True if the file was updated successfully, False otherwise.
- static init_ue(control_script_path: str) bool[source]
Initializes the 5G UE using the control script with the ‘init’ command.
- Parameters
control_script_path – the path to the control script
- Returns
True if the script execution completed successfully, False otherwise.
- static init_ue_config_file(imsi: str, key: str, opc: str, imei: str) bool[source]
Modifies the /srsRAN_4G/build/srsue/src/ue.conf configuration file. Updates the [usim] section with subscriber data.
- Parameters
imsi – The imsi of the UE.
key – The private key of the UE.
opc – The operator key of the UE.
imei – The imei of the UE.
- Returns
True if the file was updated successfully, False otherwise.
- static set_du_signal_strength(tx_gain: int, rx_gain: int) bool[source]
Sets the signal strength of the DU by changing the config file /srsRAN_Project/build/apps/du/du.yml
- Parameters
tx_gain – The signal gain of the transmitter
rx_gain – The signal gain of the receiver
- Returns
True if the file was updated successfully, False otherwise.
- static set_ue_signal_strength(tx_gain: int, rx_gain: int) bool[source]
Sets the signal strength of the UE by modifying the configuration file /srsRAN_4G/build/srsue/src/ue.conf.
- Parameters
tx_gain – The transmitter gain.
rx_gain – The receiver gain.
- Returns
True if the file was updated successfully, False otherwise.
- static start_du(control_script_path: str) bool[source]
Starts the 5G DU using the control script with the ‘start’ command.
- Parameters
control_script_path – the path to the control script
- Returns
True if the script execution completed successfully, False otherwise.
- static start_ue(control_script_path: str) bool[source]
Starts the 5G UE using the control script with the ‘start’ command.
- Parameters
control_script_path – the path to the control script
- Returns
True if the script execution completed successfully, False otherwise.
csle_collector.five_g_du_manager.query_five_g_du_manager module
- csle_collector.five_g_du_manager.query_five_g_du_manager.get_five_g_du_status(stub: FiveGDUManagerStub, timeout=60) FiveGDUStatusDTO[source]
Queries the 5G du manager for the status of the 5G du
- Parameters
stub – the stub to send the remote gRPC to the server
timeout – the timeout for the gRRPC call
- Returns
a FiveGDUStatusDTO describing the status of the 5G du
- csle_collector.five_g_du_manager.query_five_g_du_manager.init_five_g_du_ue(cu_fronthaul_ip: str, du_fronthaul_ip: str, imsi: str, key: str, opc: str, imei: str, gnb_du_id: int, pci: int, sector_id: int, stub: FiveGDUManagerStub, timeout=60) FiveGDUStatusDTO[source]
Sends a request to the 5G DU manager for initializing the 5G UE and DU
- Parameters
cu_fronthaul_ip – the fronthaul IP of the CU
du_fronthaul_ip – the fronthaul IP of the DU
imsi – IMSI of the UE subscriber
key – private key of the UE subscriber
opc – key of the operator of the UE subscriber
imei – imei of the UE subscriber
gnb_du_id – The ID of the DU
pci – Physical Cell ID of the DU
sector_id – Part of the cell ID
stub – the stub to send the remote gRPC to the server
timeout – the timeout for the gRRPC call
- Returns
a FiveGDUStatusDTO describing the status of the 5G du
- csle_collector.five_g_du_manager.query_five_g_du_manager.set_five_g_du_ue_signal_strength(tx_gain: int, rx_gain: int, stub: FiveGDUManagerStub, timeout=60) FiveGDUStatusDTO[source]
Sends a request to the 5G DU manager for setting the signal strength of the 5G DU and UE
- Parameters
tx_gain – the gain of the transmitter
rx_gain – the gain of the receiver
stub – the stub to send the remote gRPC to the server
timeout – the timeout for the gRRPC call
- Returns
a FiveGDUStatusDTO describing the status of the 5G du
- csle_collector.five_g_du_manager.query_five_g_du_manager.start_five_g_du(stub: FiveGDUManagerStub, timeout=60) FiveGDUStatusDTO[source]
Sends a request to the 5G du manager for starting the 5G du
- Parameters
stub – the stub to send the remote gRPC to the server
timeout – the timeout for the gRRPC call
- Returns
a FiveGDUStatusDTO describing the status of the 5G du
- csle_collector.five_g_du_manager.query_five_g_du_manager.start_five_g_du_monitor(stub: FiveGDUManagerStub, kafka_ip: str, kafka_port: int, time_step_len_seconds: int, timeout=60) FiveGDUStatusDTO[source]
Sends a request to the 5G DU manager to start the 5G DU monitor thread
- Parameters
kafka_ip – the ip of the Kafka server
kafka_port – the port of the Kafka server
time_step_len_seconds – the length of one time-step
stub – the stub to send the remote gRPC to the server
timeout – the GRPC timeout (seconds)
- Returns
a FiveGDUStatusDTO describing the cu status
- csle_collector.five_g_du_manager.query_five_g_du_manager.start_five_g_ue(stub: FiveGDUManagerStub, timeout=60) FiveGDUStatusDTO[source]
Sends a request to the 5G DU manager for starting the 5G UE
- Parameters
stub – the stub to send the remote gRPC to the server
timeout – the timeout for the gRRPC call
- Returns
a FiveGDUStatusDTO describing the status of the 5G UE
- csle_collector.five_g_du_manager.query_five_g_du_manager.stop_five_g_du(stub: FiveGDUManagerStub, timeout=60) FiveGDUStatusDTO[source]
Sends a request to the 5G du manager for stopping the 5G du
- Parameters
stub – the stub to send the remote gRPC to the server
timeout – the timeout for the gRRPC call
- Returns
a FiveGDUStatusDTO describing the status of the 5G du
- csle_collector.five_g_du_manager.query_five_g_du_manager.stop_five_g_du_monitor(stub: FiveGDUManagerStub, timeout=60) FiveGDUStatusDTO[source]
Sends a request to the 5G DU manager to stop the 5G DU monitor thread
- Parameters
stub – the stub to send the remote gRPC to the server
timeout – the GRPC timeout (seconds)
- Returns
a FiveGDUStatusDTO describing the 5G DU status
- csle_collector.five_g_du_manager.query_five_g_du_manager.stop_five_g_ue(stub: FiveGDUManagerStub, timeout=60) FiveGDUStatusDTO[source]
Sends a request to the 5G du manager for stopping the 5G UE
- Parameters
stub – the stub to send the remote gRPC to the server
timeout – the timeout for the gRRPC call
- Returns
a FiveGDUStatusDTO describing the status of the 5G du