csle_collector.five_g_cu_manager package
Subpackages
- csle_collector.five_g_cu_manager.dao package
- Submodules
- csle_collector.five_g_cu_manager.dao.five_g_cu_app_resource_usage_metrics module
FiveGCUAppResourceUsageMetricsFiveGCUAppResourceUsageMetrics.copy()FiveGCUAppResourceUsageMetrics.from_dict()FiveGCUAppResourceUsageMetrics.from_json_file()FiveGCUAppResourceUsageMetrics.from_kafka_record()FiveGCUAppResourceUsageMetrics.from_ws_dict()FiveGCUAppResourceUsageMetrics.num_attributes()FiveGCUAppResourceUsageMetrics.schema()FiveGCUAppResourceUsageMetrics.to_dict()FiveGCUAppResourceUsageMetrics.to_kafka_record()FiveGCUAppResourceUsageMetrics.update_with_kafka_record()
- csle_collector.five_g_cu_manager.dao.five_g_cu_buffer_pool_metrics module
FiveGCUBufferPoolMetricsFiveGCUBufferPoolMetrics.copy()FiveGCUBufferPoolMetrics.from_dict()FiveGCUBufferPoolMetrics.from_json_file()FiveGCUBufferPoolMetrics.from_kafka_record()FiveGCUBufferPoolMetrics.from_ws_dict()FiveGCUBufferPoolMetrics.num_attributes()FiveGCUBufferPoolMetrics.schema()FiveGCUBufferPoolMetrics.to_dict()FiveGCUBufferPoolMetrics.to_kafka_record()FiveGCUBufferPoolMetrics.update_with_kafka_record()
- csle_collector.five_g_cu_manager.dao.five_g_cu_cp_metrics module
FiveGCUCPMetricsFiveGCUCPMetrics.copy()FiveGCUCPMetrics.from_dict()FiveGCUCPMetrics.from_json_file()FiveGCUCPMetrics.from_kafka_record()FiveGCUCPMetrics.from_ws_dict()FiveGCUCPMetrics.num_attributes()FiveGCUCPMetrics.schema()FiveGCUCPMetrics.to_dict()FiveGCUCPMetrics.to_kafka_record()FiveGCUCPMetrics.update_with_kafka_record()
- Module contents
- csle_collector.five_g_cu_manager.threads package
Submodules
csle_collector.five_g_cu_manager.five_g_cu_manager module
- class csle_collector.five_g_cu_manager.five_g_cu_manager.FiveGCUManagerServicer[source]
Bases:
FiveGCUManagerServicergRPC server for managing the 5G CU
- getFiveGCUStatus(request: GetFiveGCUStatusMsg, context: ServicerContext) FiveGCUStatusDTO[source]
Gets the status of the 5G CU
- Parameters
request – the gRPC request
context – the gRPC context
- Returns
a DTO with the status of the 5g cu
- initFiveGCU(request: InitFiveGCUMsg, context: ServicerContext) FiveGCUStatusDTO[source]
Initializes the 5G CU
- Parameters
request – the gRPC request
context – the gRPC context
- Returns
a DTO with the status of the 5g cu
- startFiveGCU(request: StartFiveGCUMsg, context: ServicerContext) FiveGCUStatusDTO[source]
Starts the 5G CU
- Parameters
request – the gRPC request
context – the gRPC context
- Returns
a DTO with the status of the 5g cu
- startFiveGCUMonitor(request: StartFiveGCUMonitorMsg, context: ServicerContext) FiveGCUStatusDTO[source]
Starts the 5G CU monitor thread
- Parameters
request – the gRPC request
context – the gRPC context
- Returns
a DTO with the status of the CU monitor thread
- csle_collector.five_g_cu_manager.five_g_cu_manager.serve(port: int = 50053, log_dir: str = '/', max_workers: int = 100, log_file_name: str = 'five_g_cu_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_cu_manager.five_g_cu_manager_pb2 module
Generated protocol buffer code.
csle_collector.five_g_cu_manager.five_g_cu_manager_pb2_grpc module
Client and server classes corresponding to protobuf-defined services.
- class csle_collector.five_g_cu_manager.five_g_cu_manager_pb2_grpc.FiveGCUManager[source]
Bases:
objectInterface exported by the server
- static getFiveGCUStatus(request, target, options=(), channel_credentials=None, call_credentials=None, insecure=False, compression=None, wait_for_ready=None, timeout=None, metadata=None)[source]
- static initFiveGCU(request, target, options=(), channel_credentials=None, call_credentials=None, insecure=False, compression=None, wait_for_ready=None, timeout=None, metadata=None)[source]
- static startFiveGCU(request, target, options=(), channel_credentials=None, call_credentials=None, insecure=False, compression=None, wait_for_ready=None, timeout=None, metadata=None)[source]
- static startFiveGCUMonitor(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_cu_manager.five_g_cu_manager_pb2_grpc.FiveGCUManagerServicer[source]
Bases:
objectInterface exported by the server
- getFiveGCUStatus(request, context)[source]
Missing associated documentation comment in .proto file.
csle_collector.five_g_cu_manager.five_g_cu_manager_util module
- class csle_collector.five_g_cu_manager.five_g_cu_manager_util.FiveGCUManagerUtil[source]
Bases:
objectClass with utility functions for the 5G CU manager
- static five_g_cu_status_dto_from_dict(d: Dict[str, Any]) FiveGCUStatusDTO[source]
Converts a FiveGCUStatusDTO to a dict
- Parameters
d – the dict to convert
- Returns
the converted DTO
- static five_g_cu_status_dto_to_dict(five_g_cu_status_dto: FiveGCUStatusDTO) Dict[str, Any][source]
Converts a FiveGCUStatusDTO to a dict
- Parameters
five_g_cu_status_dto – the DTO to convert
- Returns
a dict representation of the DTO
- static get_cu_status(control_script_path: str) Dict[str, bool][source]
Executes the control script, parses the output, and return the statuses of the 5G CU services
- 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 services are running
- static init_config_file(core_backhaul_ip: str, cu_backhaul_ip: str, cu_fronthaul_ip: str) bool[source]
Initializes the /srsRAN_Project/build/apps/cu/cu.yml configuration file.
- Parameters
core_backhaul_ip – The backhaul IP address of the 5G Core (AMF).
cu_backhaul_ip – The backhaul IP address of the CU (Central Unit).
cu_fronthaul_ip – The fronthaul IP address of the CU (Central Unit).
- Returns
True if the file was updated successfully, False otherwise.
csle_collector.five_g_cu_manager.query_five_g_cu_manager module
- csle_collector.five_g_cu_manager.query_five_g_cu_manager.get_five_g_cu_status(stub: FiveGCUManagerStub, timeout=60) FiveGCUStatusDTO[source]
Queries the 5G cu manager for the status of the 5G cu
- Parameters
stub – the stub to send the remote gRPC to the server
timeout – the timeout for the gRRPC call
- Returns
a FiveGCUStatusDTO describing the status of the 5G cu
- csle_collector.five_g_cu_manager.query_five_g_cu_manager.init_five_g_cu(stub: FiveGCUManagerStub, core_backhaul_ip: str, cu_backhaul_ip: str, cu_fronthaul_ip: str, timeout=60) FiveGCUStatusDTO[source]
Sends a request to the 5G cu manager for initializing the 5G cu
- Parameters
stub – the stub to send the remote gRPC to the server
core_backhaul_ip – the backhaul ip of the core network
cu_backhaul_ip – the backhaul ip of the CU network
cu_fronthaul_ip – the fronthaul ip of the CU network
timeout – the timeout for the gRRPC call
- Returns
a FiveGCUStatusDTO describing the status of the 5G cu
- csle_collector.five_g_cu_manager.query_five_g_cu_manager.start_five_g_cu(stub: FiveGCUManagerStub, timeout=60) FiveGCUStatusDTO[source]
Sends a request to the 5G cu manager for starting the 5G cu
- Parameters
stub – the stub to send the remote gRPC to the server
timeout – the timeout for the gRRPC call
- Returns
a FiveGCUStatusDTO describing the status of the 5G cu
- csle_collector.five_g_cu_manager.query_five_g_cu_manager.start_five_g_cu_monitor(stub: FiveGCUManagerStub, kafka_ip: str, kafka_port: int, time_step_len_seconds: int, timeout=60) FiveGCUStatusDTO[source]
Sends a request to the 5G CU manager to start the CU 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 FiveGCUStatusDTO describing the cu status
- csle_collector.five_g_cu_manager.query_five_g_cu_manager.stop_five_g_cu(stub: FiveGCUManagerStub, timeout=60) FiveGCUStatusDTO[source]
Sends a request to the 5G cu manager for stopping the 5G cu
- Parameters
stub – the stub to send the remote gRPC to the server
timeout – the timeout for the gRRPC call
- Returns
a FiveGCUStatusDTO describing the status of the 5G cu
- csle_collector.five_g_cu_manager.query_five_g_cu_manager.stop_five_g_cu_monitor(stub: FiveGCUManagerStub, timeout=60) FiveGCUStatusDTO[source]
Sends a request to the 5G CU manager to stop the CU monitor thread
- Parameters
stub – the stub to send the remote gRPC to the server
timeout – the GRPC timeout (seconds)
- Returns
a FiveGCUStatusDTO describing the 5G cu status