mirror of
https://gitlab.eurecom.fr/oai/openairinterface5g.git
synced 2026-07-13 12:40:28 +00:00
Compare commits
1 Commits
ldpc_decod
...
fix_thread
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4ada81dc50 |
360
CMakeLists.txt
360
CMakeLists.txt
@@ -260,6 +260,7 @@ endif()
|
||||
|
||||
# Debug related options
|
||||
#########################################
|
||||
add_boolean_option(DEBUG_ASN1 False "Enable ASN1 debug logs" OFF)
|
||||
# asn1c skeletons have hardcoded this flag to make customized debug logs
|
||||
# OAI uses this feature to re-use OAI LOG_I(ASN1, ...)
|
||||
# see common/utils/config.h
|
||||
@@ -298,7 +299,6 @@ message(STATUS "Selected KPM Version: ${KPM_VERSION}")
|
||||
|
||||
|
||||
add_boolean_option(ENABLE_IMSCOPE OFF "Enable phy scope based on imgui" OFF)
|
||||
add_boolean_option(ENABLE_IMSCOPE_RECORD OFF "Enable recording IQ data for imscope" OFF)
|
||||
|
||||
##################################################
|
||||
# ASN.1 grammar C code generation & dependencies #
|
||||
@@ -346,7 +346,6 @@ set(NGAP_DIR ${OPENAIR3_DIR}/NGAP)
|
||||
include_directories ("${NGAP_DIR}")
|
||||
add_library(ngap
|
||||
${NGAP_DIR}/ngap_gNB.c
|
||||
${NGAP_DIR}/ngap_common.c
|
||||
${NGAP_DIR}/ngap_gNB_context_management_procedures.c
|
||||
${NGAP_DIR}/ngap_gNB_decoder.c
|
||||
${NGAP_DIR}/ngap_gNB_encoder.c
|
||||
@@ -450,12 +449,9 @@ add_library(f1ap
|
||||
${F1AP_DIR}/f1ap_handlers.c
|
||||
${F1AP_DIR}/f1ap_itti_messaging.c)
|
||||
target_include_directories(f1ap PUBLIC F1AP_DIR)
|
||||
target_link_libraries(f1ap PUBLIC asn1_f1ap GTPV1U)
|
||||
target_link_libraries(f1ap PUBLIC asn1_f1ap L2_NR)
|
||||
target_link_libraries(f1ap PRIVATE ngap nr_rrc HASHTABLE f1ap_lib)
|
||||
target_include_directories(f1ap PRIVATE ${F1AP_DIR}/lib)
|
||||
if(E2_AGENT)
|
||||
target_compile_definitions(f1ap PRIVATE E2_AGENT)
|
||||
endif()
|
||||
|
||||
# LPP
|
||||
##############
|
||||
@@ -489,6 +485,26 @@ target_link_libraries(params_libconfig PRIVATE config_internals ${libconfig_LIBR
|
||||
add_library(shlib_loader OBJECT common/utils/load_module_shlib.c)
|
||||
target_link_libraries(shlib_loader PRIVATE CONFIG_LIB)
|
||||
|
||||
##########################################################
|
||||
|
||||
# LDPC offload library - AMD T2 Accelerator Card
|
||||
##########################################################
|
||||
|
||||
add_boolean_option(ENABLE_LDPC_T2 OFF "Build support for LDPC Offload to T2 library" OFF)
|
||||
if (ENABLE_LDPC_T2)
|
||||
pkg_check_modules(LIBDPDK_T2 REQUIRED libdpdk=20.11.9)
|
||||
find_library(PMD_T2 NAMES rte_baseband_accl_ldpc HINTS ${LIBDPDK_T2_LIBRARY_DIRS})
|
||||
if (NOT PMD_T2)
|
||||
message(FATAL_ERROR "could not find poll-mode driver for AccelerComm T2 LDPC Offload (rte_baseband_accl_ldpc.so)")
|
||||
endif()
|
||||
message(STATUS "T2 build: use ${PMD_T2}")
|
||||
add_library(ldpc_t2 MODULE ${OPENAIR1_DIR}/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder_offload.c)
|
||||
set_target_properties(ldpc_t2 PROPERTIES COMPILE_FLAGS "-DALLOW_EXPERIMENTAL_API")
|
||||
target_link_libraries(ldpc_t2 ${LIBDPDK_T2_LDFLAGS} ${PMD_T2})
|
||||
endif()
|
||||
|
||||
##########################################################
|
||||
|
||||
include_directories ("${OPENAIR_DIR}/radio/COMMON")
|
||||
|
||||
##############################################################
|
||||
@@ -498,6 +514,7 @@ include_directories ("${OPENAIR_DIR}/radio/COMMON")
|
||||
add_boolean_option(UE_EXPANSION False "enable UE_EXPANSION with max 256 UE" ON)
|
||||
add_boolean_option(PHY_TX_THREAD False "enable UE_EXPANSION with max 256 UE" ON)
|
||||
add_boolean_option(PRE_SCD_THREAD False "enable UE_EXPANSION with max 256 UE" ON)
|
||||
add_boolean_option(UESIM_EXPANSION False "enable UESIM_EXPANSION with max 256 UE" ON)
|
||||
|
||||
##########################
|
||||
# SCHEDULING/REAL-TIME/PERF options
|
||||
@@ -509,15 +526,20 @@ add_boolean_option(ENABLE_VCD_FIFO False "time measurements of proc cal
|
||||
##########################
|
||||
# PHY options
|
||||
##########################
|
||||
add_integer_option(MAX_NUM_CCs 1 "Carrier component data arrays size (oai doesn't support carrier aggreagtion for now)" ON)
|
||||
add_boolean_option(LOCALIZATION False "???" ON)
|
||||
add_integer_option(MAX_NUM_CCs 1 "????" ON)
|
||||
add_boolean_option(SMBV False "Rohde&Schwarz SMBV100A vector signal generator" ON)
|
||||
add_boolean_option(DEBUG_PHY False "Enable PHY layer debugging options" ON)
|
||||
add_boolean_option(DEBUG_PHY_PROC False "Enable debugging of PHY layer procedures" ON)
|
||||
add_boolean_option(MEX False "Enabling compilation with mex" ON)
|
||||
|
||||
##########################
|
||||
# NAS LAYER OPTIONS
|
||||
##########################
|
||||
add_boolean_option(ENABLE_NAS_UE_LOGGING True "????" ON)
|
||||
add_boolean_option(NAS_BUILT_IN_UE True "UE NAS layer present in this executable" ON)
|
||||
add_boolean_option(NAS_UE True "NAS UE INSTANCE (<> NAS_MME)" ON)
|
||||
|
||||
|
||||
##########################
|
||||
# RRC LAYER OPTIONS
|
||||
@@ -685,6 +707,7 @@ set(SCHED_SRC_NR_UE
|
||||
${OPENAIR1_DIR}/SCHED_NR_UE/phy_procedures_nr_ue.c
|
||||
${OPENAIR1_DIR}/SCHED_NR_UE/phy_procedures_nr_ue_sl.c
|
||||
${OPENAIR1_DIR}/SCHED_NR_UE/fapi_nr_ue_l1.c
|
||||
${OPENAIR1_DIR}/SCHED_NR_UE/phy_frame_config_nr_ue.c
|
||||
${OPENAIR1_DIR}/SCHED_NR_UE/harq_nr.c
|
||||
${OPENAIR1_DIR}/SCHED_NR_UE/pucch_uci_ue_nr.c
|
||||
)
|
||||
@@ -713,7 +736,6 @@ set(NFAPI_PNF_SRC
|
||||
)
|
||||
add_library(NFAPI_PNF_LIB ${NFAPI_PNF_SRC})
|
||||
target_link_libraries(NFAPI_PNF_LIB PRIVATE asn1_lte_rrc_hdrs asn1_nr_rrc_hdrs)
|
||||
target_link_libraries(NFAPI_PNF_LIB PUBLIC nr_fapi_p7)
|
||||
|
||||
include_directories(${NFAPI_DIR}/pnf/public_inc)
|
||||
include_directories(${NFAPI_DIR}/pnf/inc)
|
||||
@@ -744,13 +766,18 @@ set(NFAPI_USER_SRC
|
||||
add_library(NFAPI_USER_LIB ${NFAPI_USER_SRC})
|
||||
target_link_libraries(NFAPI_USER_LIB PRIVATE asn1_lte_rrc_hdrs asn1_nr_rrc_hdrs UTIL)
|
||||
target_link_libraries(NFAPI_USER_LIB PRIVATE nr_fapi_p7)
|
||||
if(OAI_AERIAL)
|
||||
target_compile_definitions(NFAPI_USER_LIB PRIVATE ENABLE_AERIAL)
|
||||
endif()
|
||||
include_directories(${NFAPI_USER_DIR})
|
||||
|
||||
# Layer 1
|
||||
#############################
|
||||
set(PHY_TURBOSRC
|
||||
${OPENAIR1_DIR}/PHY/CODING/3gpplte_sse.c
|
||||
${OPENAIR1_DIR}/PHY/CODING/3gpplte.c
|
||||
${OPENAIR1_DIR}/PHY/CODING/3gpplte_turbo_decoder_sse_8bit.c
|
||||
${OPENAIR1_DIR}/PHY/CODING/3gpplte_turbo_decoder_sse_16bit.c
|
||||
${OPENAIR1_DIR}/PHY/CODING/3gpplte_turbo_decoder_avx2_16bit.c
|
||||
${OPENAIR1_DIR}/PHY/CODING/3gpplte_turbo_decoder.c
|
||||
)
|
||||
set(PHY_POLARSRC
|
||||
${OPENAIR1_DIR}/PHY/CODING/nrPolar_tools/nr_polar_init.c
|
||||
${OPENAIR1_DIR}/PHY/CODING/nrPolar_tools/nr_bitwise_operations.c
|
||||
@@ -773,17 +800,82 @@ set(PHY_TURBOIF
|
||||
${OPENAIR1_DIR}/PHY/CODING/coding_load.c
|
||||
)
|
||||
|
||||
set(PHY_NRLDPC_CODINGIF
|
||||
${OPENAIR1_DIR}/PHY/CODING/nrLDPC_coding/nrLDPC_coding_interface_load.c
|
||||
set(PHY_LDPC_ORIG_SRC
|
||||
${OPENAIR1_DIR}/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder.c
|
||||
${OPENAIR1_DIR}/PHY/CODING/nrLDPC_encoder/ldpc_encoder.c
|
||||
)
|
||||
add_library(ldpc_orig MODULE ${PHY_LDPC_ORIG_SRC} )
|
||||
target_link_libraries(ldpc_orig PRIVATE ldpc_gen_HEADERS)
|
||||
|
||||
set(PHY_LDPC_OPTIM_SRC
|
||||
${OPENAIR1_DIR}/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder.c
|
||||
${OPENAIR1_DIR}/PHY/CODING/nrLDPC_encoder/ldpc_encoder_optim.c
|
||||
)
|
||||
add_library(ldpc_optim MODULE ${PHY_LDPC_OPTIM_SRC} )
|
||||
target_link_libraries(ldpc_optim PRIVATE ldpc_gen_HEADERS)
|
||||
|
||||
set(PHY_LDPC_OPTIM8SEG_SRC
|
||||
${OPENAIR1_DIR}/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder.c
|
||||
${OPENAIR1_DIR}/PHY/CODING/nrLDPC_encoder/ldpc_encoder_optim8seg.c
|
||||
)
|
||||
add_library(ldpc_optim8seg MODULE ${PHY_LDPC_OPTIM8SEG_SRC} )
|
||||
target_link_libraries(ldpc_optim8seg PRIVATE ldpc_gen_HEADERS)
|
||||
|
||||
set(PHY_LDPC_OPTIM8SEGMULTI_SRC
|
||||
${OPENAIR1_DIR}/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder.c
|
||||
${OPENAIR1_DIR}/PHY/CODING/nrLDPC_encoder/ldpc_encoder_optim8segmulti.c
|
||||
)
|
||||
add_library(ldpc MODULE ${PHY_LDPC_OPTIM8SEGMULTI_SRC} )
|
||||
target_link_libraries(ldpc PRIVATE ldpc_gen_HEADERS)
|
||||
|
||||
set(PHY_LDPC_CUDA_SRC
|
||||
${OPENAIR1_DIR}/PHY/CODING/nrLDPC_decoder_LYC/nrLDPC_decoder_LYC.cu
|
||||
${OPENAIR1_DIR}/PHY/CODING/nrLDPC_encoder/ldpc_encoder_optim8segmulti.c
|
||||
)
|
||||
|
||||
set(PHY_LDPC_CL_SRC
|
||||
${OPENAIR1_DIR}/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder_CL.c
|
||||
${OPENAIR1_DIR}/PHY/CODING/nrLDPC_encoder/ldpc_encoder_optim8segmulti.c
|
||||
)
|
||||
add_custom_target( nrLDPC_decoder_kernels_CL
|
||||
COMMAND gcc ${OPENAIR1_DIR}/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder_CL.c -dD -DNRLDPC_KERNEL_SOURCE -E -o ${CMAKE_CURRENT_BINARY_DIR}/nrLDPC_decoder_kernels_CL.clc
|
||||
SOURCES ${OPENAIR1_DIR}/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder_CL.c
|
||||
)
|
||||
add_library(ldpc_cl MODULE ${PHY_LDPC_CL_SRC} )
|
||||
target_link_libraries(ldpc_cl OpenCL)
|
||||
add_dependencies(ldpc_cl nrLDPC_decoder_kernels_CL)
|
||||
|
||||
set(PHY_NR_CODINGIF
|
||||
${OPENAIR1_DIR}/PHY/CODING/nrLDPC_load.c
|
||||
)
|
||||
|
||||
##############################################
|
||||
# Base CUDA setting
|
||||
##############################################
|
||||
|
||||
add_boolean_option(ENABLE_LDPC_CUDA OFF "Build support for CUDA" OFF)
|
||||
if (ENABLE_LDPC_CUDA)
|
||||
find_package(CUDA REQUIRED)
|
||||
SET(CUDA_NVCC_FLAG "${CUDA_NVCC_FLAGS};-arch=sm_60;")
|
||||
SET(CUDA_VERBOSE_BUILD ON)
|
||||
cuda_add_library(ldpc_cuda MODULE ${PHY_LDPC_CUDA_SRC})
|
||||
set_target_properties(ldpc_cuda PROPERTIES CUDA_SEPARABLE_COMPILATION ON)
|
||||
if (NOT CUDA_FOUND)
|
||||
message(FATAL_ERROR "no CUDA found")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
add_library(coding MODULE ${PHY_TURBOSRC} )
|
||||
|
||||
add_library(dfts MODULE ${OPENAIR1_DIR}/PHY/TOOLS/oai_dfts.c ${OPENAIR1_DIR}/PHY/TOOLS/oai_dfts_neon.c)
|
||||
|
||||
add_library(crc_byte OBJECT ${OPENAIR1_DIR}/PHY/CODING/crc_byte.c)
|
||||
|
||||
set(PHY_SRC_COMMON
|
||||
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/dci_tools_common.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/lte_mcs.c
|
||||
# ${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/slss.c
|
||||
# ${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/sldch.c
|
||||
# ${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/slsch.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_UE_TRANSPORT/get_pmi.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/group_hopping.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/phich_common.c
|
||||
@@ -803,9 +895,12 @@ set(PHY_SRC_COMMON
|
||||
${OPENAIR1_DIR}/PHY/LTE_REFSIG/lte_dl_mbsfn.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_REFSIG/lte_ul_ref.c
|
||||
${OPENAIR1_DIR}/PHY/CODING/lte_segmentation.c
|
||||
${OPENAIR1_DIR}/PHY/CODING/nr_segmentation.c
|
||||
${OPENAIR1_DIR}/PHY/CODING/nr_rate_matching.c
|
||||
${OPENAIR1_DIR}/PHY/CODING/ccoding_byte.c
|
||||
${OPENAIR1_DIR}/PHY/CODING/ccoding_byte_lte.c
|
||||
${OPENAIR1_DIR}/PHY/CODING/3gpplte_sse.c
|
||||
${OPENAIR1_DIR}/PHY/CODING/crc_byte.c
|
||||
${PHY_TURBOIF}
|
||||
${OPENAIR1_DIR}/PHY/CODING/lte_rate_matching.c
|
||||
${OPENAIR1_DIR}/PHY/CODING/viterbi.c
|
||||
@@ -823,7 +918,6 @@ set(PHY_SRC_COMMON
|
||||
${OPENAIR1_DIR}/PHY/TOOLS/sqrt.c
|
||||
${OPENAIR1_DIR}/PHY/TOOLS/lut.c
|
||||
${OPENAIR1_DIR}/PHY/TOOLS/simde_operations.c
|
||||
${OPENAIR1_DIR}/PHY/TOOLS/get_sin_cos.c
|
||||
)
|
||||
|
||||
set(PHY_SRC
|
||||
@@ -842,9 +936,13 @@ set(PHY_SRC
|
||||
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/pcfich.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/pucch.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/pmch.c
|
||||
# ${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/ulsch_demodulation.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/ulsch_decoding.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/rar_tools.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/uci_tools.c
|
||||
# ${OPENAIR1_DIR}/PHY/LTE_ESTIMATION/freq_equalization.c
|
||||
# ${OPENAIR1_DIR}/PHY/LTE_ESTIMATION/lte_adjust_sync_eNB.c
|
||||
# ${OPENAIR1_DIR}/PHY/LTE_ESTIMATION/lte_ul_channel_estimation.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_ESTIMATION/lte_eNB_measurements.c
|
||||
${OPENAIR1_DIR}/PHY/INIT/lte_init.c
|
||||
)
|
||||
@@ -893,7 +991,6 @@ set(PHY_SRC_UE
|
||||
${OPENAIR1_DIR}/PHY/LTE_UE_TRANSPORT/ulsch_coding.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_UE_TRANSPORT/rar_tools_ue.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_UE_TRANSPORT/initial_sync.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_UE_TRANSPORT/dlsch_llr_computation_avx2.c
|
||||
${OPENAIR1_DIR}/PHY/MODULATION/slot_fep.c
|
||||
${OPENAIR1_DIR}/PHY/MODULATION/slot_fep_mbsfn.c
|
||||
${OPENAIR1_DIR}/PHY/MODULATION/ul_7_5_kHz_ue.c
|
||||
@@ -910,11 +1007,10 @@ set(PHY_SRC_UE
|
||||
)
|
||||
|
||||
set(PHY_NR_SRC_COMMON
|
||||
${OPENAIR1_DIR}/PHY/CODING/nr_segmentation.c
|
||||
${OPENAIR1_DIR}/PHY/NR_TRANSPORT/nr_tbs_tools.c
|
||||
${OPENAIR1_DIR}/PHY/NR_TRANSPORT/nr_prach_common.c
|
||||
${OPENAIR1_DIR}/PHY/nr_phy_common/src/nr_phy_common_csirs.c
|
||||
${OPENAIR1_DIR}/PHY/NR_TRANSPORT/nr_scrambling.c
|
||||
${OPENAIR1_DIR}/PHY/NR_REFSIG/scrambling_luts.c
|
||||
${OPENAIR1_DIR}/PHY/NR_REFSIG/refsig.c
|
||||
${OPENAIR1_DIR}/PHY/NR_UE_TRANSPORT/srs_modulation_nr.c
|
||||
)
|
||||
@@ -934,6 +1030,7 @@ set(PHY_SRC_UE
|
||||
${OPENAIR1_DIR}/PHY/NR_TRANSPORT/nr_dlsch_coding.c
|
||||
${OPENAIR1_DIR}/PHY/NR_TRANSPORT/nr_ulsch_decoding.c
|
||||
${OPENAIR1_DIR}/PHY/NR_TRANSPORT/nr_ulsch.c
|
||||
${OPENAIR1_DIR}/PHY/NR_TRANSPORT/nr_tbs_tools.c
|
||||
${OPENAIR1_DIR}/PHY/NR_TRANSPORT/nr_sch_dmrs.c
|
||||
${OPENAIR1_DIR}/PHY/NR_TRANSPORT/nr_prach.c
|
||||
${OPENAIR1_DIR}/PHY/NR_TRANSPORT/nr_ulsch_llr_computation.c
|
||||
@@ -960,7 +1057,7 @@ set(PHY_SRC_UE
|
||||
${OPENAIR1_DIR}/PHY/TOOLS/simde_operations.c
|
||||
${PHY_POLARSRC}
|
||||
${PHY_SMALLBLOCKSRC}
|
||||
${PHY_NRLDPC_CODINGIF}
|
||||
${PHY_NR_CODINGIF}
|
||||
${OPENAIR1_DIR}/PHY/NR_TRANSPORT/pucch_rx.c
|
||||
${OPENAIR1_DIR}/PHY/NR_TRANSPORT/srs_rx.c
|
||||
${OPENAIR1_DIR}/PHY/NR_TRANSPORT/nr_uci_tools_common.c
|
||||
@@ -981,6 +1078,7 @@ set(PHY_SRC_UE
|
||||
${OPENAIR1_DIR}/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c
|
||||
${OPENAIR1_DIR}/PHY/NR_UE_TRANSPORT/nr_ulsch_coding.c
|
||||
${OPENAIR1_DIR}/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c
|
||||
${OPENAIR1_DIR}/PHY/NR_TRANSPORT/nr_tbs_tools.c
|
||||
${OPENAIR1_DIR}/PHY/NR_TRANSPORT/nr_prach_common.c
|
||||
${OPENAIR1_DIR}/PHY/NR_TRANSPORT/nr_sch_dmrs.c
|
||||
${OPENAIR1_DIR}/PHY/NR_UE_TRANSPORT/
|
||||
@@ -1014,7 +1112,7 @@ set(PHY_SRC_UE
|
||||
${OPENAIR1_DIR}/PHY/INIT/nr_init_ue.c
|
||||
${PHY_POLARSRC}
|
||||
${PHY_SMALLBLOCKSRC}
|
||||
${PHY_NRLDPC_CODINGIF}
|
||||
${PHY_NR_CODINGIF}
|
||||
)
|
||||
|
||||
|
||||
@@ -1022,12 +1120,12 @@ if (${SMBV})
|
||||
set(PHY_SRC "${PHY_SRC} ${OPENAIR1_DIR}/PHY/TOOLS/smbv.c")
|
||||
endif (${SMBV})
|
||||
|
||||
set(PHY_SRC_UE ${PHY_SRC_UE} ${OPENAIR1_DIR}/PHY/LTE_UE_TRANSPORT/dlsch_llr_computation_avx2.c)
|
||||
|
||||
add_library(PHY_COMMON ${PHY_SRC_COMMON})
|
||||
target_link_libraries(PHY_COMMON
|
||||
PRIVATE shlib_loader asn1_lte_rrc_hdrs crc_byte
|
||||
PUBLIC UTIL
|
||||
)
|
||||
target_link_libraries(PHY_COMMON PRIVATE shlib_loader)
|
||||
add_dependencies(PHY_COMMON dfts)
|
||||
target_link_libraries(PHY_COMMON PRIVATE asn1_lte_rrc_hdrs PUBLIC UTIL)
|
||||
|
||||
add_library(PHY ${PHY_SRC})
|
||||
target_link_libraries(PHY PRIVATE asn1_lte_rrc_hdrs asn1_nr_rrc_hdrs)
|
||||
@@ -1059,6 +1157,28 @@ target_link_libraries(PHY_NR_UE PRIVATE asn1_nr_rrc_hdrs nr_phy_common nr_common
|
||||
add_library(PHY_RU ${PHY_SRC_RU})
|
||||
target_link_libraries(PHY_RU PRIVATE asn1_lte_rrc_hdrs UTIL)
|
||||
|
||||
#Library for mex functions
|
||||
#########################3
|
||||
set(PHY_MEX_UE
|
||||
${OPENAIR1_DIR}/PHY/LTE_UE_TRANSPORT/linear_preprocessing_rec.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_UE_TRANSPORT/dlsch_llr_computation.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_UE_TRANSPORT/dlsch_demodulation.c
|
||||
${OPENAIR1_DIR}/PHY/TOOLS/log2_approx.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/lte_mcs.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_UE_TRANSPORT/get_pmi.c
|
||||
${OPENAIR1_DIR}/PHY/TOOLS/dB_routines.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/pmch_common.c
|
||||
${OPENAIR1_DIR}/PHY/TOOLS/cadd_vv.c
|
||||
${OPENAIR1_DIR}/PHY/TOOLS/cmult_sv.c
|
||||
${OPENAIR1_DIR}/PHY/TOOLS/cmult_vv.c
|
||||
${OPENAIR1_DIR}/PHY/TOOLS/signal_energy.c
|
||||
${OPENAIR1_DIR}/PHY/TOOLS/simde_operations.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_UE_TRANSPORT/dlsch_llr_computation_avx2.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_ESTIMATION/lte_ue_measurements.c
|
||||
)
|
||||
add_library(PHY_MEX ${PHY_MEX_UE})
|
||||
target_link_libraries(PHY_MEX PRIVATE asn1_lte_rrc_hdrs UTIL)
|
||||
|
||||
#Layer 2 library
|
||||
#####################
|
||||
set(MAC_DIR ${OPENAIR2_DIR}/LAYER2/MAC)
|
||||
@@ -1113,6 +1233,7 @@ set(L2_SRC
|
||||
${PDCP_DIR}/pdcp_util.c
|
||||
${PDCP_DIR}/pdcp_security.c
|
||||
${OPENAIR2_DIR}/LAYER2/openair2_proc.c
|
||||
# ${RRC_DIR}/rrc_UE.c
|
||||
${RRC_DIR}/rrc_eNB.c
|
||||
${RRC_DIR}/rrc_eNB_endc.c
|
||||
${RRC_DIR}/rrc_eNB_S1AP.c
|
||||
@@ -1127,6 +1248,7 @@ set(L2_SRC
|
||||
|
||||
set(L2_RRC_SRC
|
||||
${OPENAIR2_DIR}/LAYER2/openair2_proc.c
|
||||
# ${RRC_DIR}/rrc_UE.c
|
||||
${RRC_DIR}/rrc_eNB.c
|
||||
${RRC_DIR}/rrc_eNB_endc.c
|
||||
${RRC_DIR}/rrc_eNB_S1AP.c
|
||||
@@ -1185,6 +1307,7 @@ set(NR_L2_SRC_UE
|
||||
${NR_SDAP_SRC}
|
||||
${NR_UE_RRC_DIR}/L2_interface_ue.c
|
||||
${NR_UE_RRC_DIR}/main_ue.c
|
||||
${NR_RRC_DIR}/nr_rrc_config.c
|
||||
${NR_UE_RRC_DIR}/rrc_UE.c
|
||||
${NR_UE_RRC_DIR}/rrc_nsa.c
|
||||
${NR_UE_RRC_DIR}/rrc_timers_and_constants.c
|
||||
@@ -1252,7 +1375,7 @@ set (MAC_NR_SRC_UE
|
||||
${NR_UE_PHY_INTERFACE_DIR}/NR_Packet_Drop.c
|
||||
${NR_UE_MAC_DIR}/config_ue.c
|
||||
${NR_UE_MAC_DIR}/config_ue_sl.c
|
||||
${NR_UE_MAC_DIR}/mac_tables.c
|
||||
${NR_UE_MAC_DIR}/mac_vars.c
|
||||
${NR_UE_MAC_DIR}/main_ue_nr.c
|
||||
${NR_UE_MAC_DIR}/nr_ue_procedures.c
|
||||
${NR_UE_MAC_DIR}/nr_ue_procedures_sl.c
|
||||
@@ -1338,9 +1461,10 @@ if(E2_AGENT)
|
||||
endif()
|
||||
|
||||
add_library(L2_LTE_NR
|
||||
# temporary solution until 4G/5G code completely untangled (as evidenced by deletion of the following file)
|
||||
${MAC_DIR}/dummy_functions.c
|
||||
${L2_RRC_SRC}
|
||||
${MAC_SRC}
|
||||
${ENB_APP_SRC}
|
||||
${MCE_APP_SRC}
|
||||
)
|
||||
|
||||
target_link_libraries(L2_LTE_NR PRIVATE f1ap s1ap nr_rrc)
|
||||
@@ -1350,18 +1474,21 @@ add_library(L2_UE
|
||||
${MAC_SRC_UE}
|
||||
)
|
||||
target_link_libraries(L2_UE PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
|
||||
target_link_libraries(L2_UE PRIVATE GTPV1U)
|
||||
|
||||
add_library(L2_UE_LTE_NR
|
||||
${L2_RRC_SRC_UE}
|
||||
${MAC_SRC_UE}
|
||||
)
|
||||
target_link_libraries(L2_UE_LTE_NR PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
|
||||
|
||||
target_link_libraries(L2_UE PRIVATE asn1_lte_rrc_hdrs)
|
||||
|
||||
add_library( NR_L2_UE ${NR_L2_SRC_UE} ${MAC_NR_SRC_UE} )
|
||||
target_link_libraries(NR_L2_UE PRIVATE nr_rlc)
|
||||
target_link_libraries(NR_L2_UE PRIVATE f1ap nr_rlc)
|
||||
target_link_libraries(NR_L2_UE PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs nr_common nr_ue_power_procedures nr_ue_ra_procedures)
|
||||
target_link_libraries(NR_L2_UE PRIVATE nr_nas)
|
||||
|
||||
add_library(MAC_NR_COMMON
|
||||
${OPENAIR2_DIR}/LAYER2/NR_MAC_COMMON/nr_mac_common.c
|
||||
${OPENAIR2_DIR}/LAYER2/NR_MAC_COMMON/nr_mac_common_tdd.c
|
||||
${OPENAIR2_DIR}/LAYER2/NR_MAC_COMMON/nr_compute_tbs_common.c
|
||||
)
|
||||
target_link_libraries(MAC_NR_COMMON PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
|
||||
@@ -1403,7 +1530,6 @@ add_library(SCTP_CLIENT ${SCTP_SRC})
|
||||
target_link_libraries(SCTP_CLIENT PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
|
||||
|
||||
set(NAS_SRC ${OPENAIR3_DIR}/NAS/)
|
||||
|
||||
set(libnas_api_OBJS
|
||||
${NAS_SRC}COMMON/API/NETWORK/as_message.c
|
||||
${NAS_SRC}COMMON/API/NETWORK/nas_message.c
|
||||
@@ -1443,6 +1569,10 @@ set(libnas_emm_msg_OBJS
|
||||
${NAS_SRC}COMMON/EMM/MSG/UplinkNasTransport.c
|
||||
)
|
||||
|
||||
set(libnas_fgs_msg_OBJS
|
||||
${NAS_SRC}COMMON/EMM/MSG/fgs_service_request.c
|
||||
)
|
||||
|
||||
set(libnas_esm_msg_OBJS
|
||||
${NAS_SRC}COMMON/ESM/MSG/ActivateDedicatedEpsBearerContextAccept.c
|
||||
${NAS_SRC}COMMON/ESM/MSG/ActivateDedicatedEpsBearerContextReject.c
|
||||
@@ -1631,6 +1761,61 @@ set(libnas_ue_esm_sap_OBJS
|
||||
${NAS_SRC}UE/ESM/SAP/esm_sap.c
|
||||
)
|
||||
|
||||
set(libnrnas_emm_msg_OBJS
|
||||
${NAS_SRC}COMMON/EMM/MSG/RegistrationRequest.c
|
||||
${NAS_SRC}COMMON/EMM/MSG/RegistrationAccept.c
|
||||
${NAS_SRC}COMMON/EMM/MSG/FGSIdentityResponse.c
|
||||
${NAS_SRC}COMMON/EMM/MSG/FGSAuthenticationResponse.c
|
||||
${NAS_SRC}COMMON/EMM/MSG/FGSNASSecurityModeComplete.c
|
||||
${NAS_SRC}COMMON/EMM/MSG/RegistrationComplete.c
|
||||
${NAS_SRC}COMMON/EMM/MSG/FGSUplinkNasTransport.c
|
||||
${NAS_SRC}COMMON/ESM/MSG/PduSessionEstablishRequest.c
|
||||
${NAS_SRC}COMMON/ESM/MSG/PduSessionEstablishmentAccept.c
|
||||
${NAS_SRC}COMMON/EMM/MSG/FGSDeregistrationRequestUEOriginating.c
|
||||
)
|
||||
|
||||
set(libnrnas_ies_OBJS
|
||||
${NAS_SRC}COMMON/IES/ExtendedProtocolDiscriminator.c
|
||||
${NAS_SRC}COMMON/IES/FGSMobileIdentity.c
|
||||
${NAS_SRC}COMMON/IES/FGSRegistrationType.c
|
||||
${NAS_SRC}COMMON/IES/SpareHalfOctet.c
|
||||
${NAS_SRC}COMMON/IES/FGSRegistrationResult.c
|
||||
${NAS_SRC}COMMON/IES/FGMMCapability.c
|
||||
${NAS_SRC}COMMON/IES/NrUESecurityCapability.c
|
||||
${NAS_SRC}COMMON/IES/FGCNasMessageContainer.c
|
||||
${NAS_SRC}COMMON/IES/SORTransparentContainer.c
|
||||
)
|
||||
|
||||
add_library(LIB_NAS_SIMUE
|
||||
${NAS_SRC}UE/nas_itti_messaging.c
|
||||
${NAS_SRC}UE/nas_network.c
|
||||
${NAS_SRC}UE/nas_parser.c
|
||||
${NAS_SRC}UE/nas_proc.c
|
||||
${NAS_SRC}UE/nas_user.c
|
||||
${NAS_SRC}NR_UE/nr_nas_msg.c
|
||||
${libnas_api_OBJS}
|
||||
${libnas_ue_api_OBJS}
|
||||
${libnas_emm_msg_OBJS}
|
||||
${libnas_fgs_msg_OBJS}
|
||||
${libnas_esm_msg_OBJS}
|
||||
${libnas_ies_OBJS}
|
||||
${libnas_utils_OBJS}
|
||||
${libnas_ue_emm_OBJS}
|
||||
${libnas_ue_emm_sap_OBJS}
|
||||
${libnas_ue_esm_OBJS}
|
||||
${libnas_ue_esm_sap_OBJS}
|
||||
${libnrnas_emm_msg_OBJS}
|
||||
${libnrnas_ies_OBJS}
|
||||
$<TARGET_OBJECTS:ds>
|
||||
)
|
||||
target_include_directories(LIB_NAS_SIMUE PRIVATE ${OPENAIR_DIR}/common/utils/ds/)
|
||||
target_link_libraries(LIB_NAS_SIMUE PRIVATE lte_rrc)
|
||||
|
||||
|
||||
|
||||
set(NAS_SIM_LIB LIB_NAS_SIMUE)
|
||||
target_link_libraries(LIB_NAS_SIMUE PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
|
||||
|
||||
add_library(LIB_NAS_UE
|
||||
${NAS_SRC}UE/nas_itti_messaging.c
|
||||
${NAS_SRC}UE/nas_network.c
|
||||
@@ -1670,6 +1855,15 @@ set (NBIOT_SOURCES
|
||||
)
|
||||
add_library(NB_IoT MODULE ${NBIOT_SOURCES} )
|
||||
|
||||
add_library(LIB_5GNAS_GNB
|
||||
${NAS_SRC}/COMMON/nr_common.c
|
||||
${OPENAIR3_DIR}//UICC/usim_interface.c
|
||||
)
|
||||
|
||||
target_include_directories(LIB_5GNAS_GNB PRIVATE ${OPENAIR_DIR}/common/utils/ds/)
|
||||
target_link_libraries(LIB_5GNAS_GNB PRIVATE SECURITY)
|
||||
target_link_libraries(LIB_5GNAS_GNB PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
|
||||
|
||||
# Simulation library
|
||||
##########################
|
||||
set (SIMUSRC
|
||||
@@ -1748,7 +1942,6 @@ target_link_libraries(lte-softmodem PRIVATE
|
||||
target_link_libraries(lte-softmodem PRIVATE pthread m CONFIG_LIB rt sctp)
|
||||
target_link_libraries(lte-softmodem PRIVATE ${T_LIB})
|
||||
target_link_libraries(lte-softmodem PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
|
||||
target_link_libraries(lte-softmodem PRIVATE ${blas_LIBRARIES} ${cblas_LIBRARIES} ${lapacke_LIBRARIES} ${lapack_LIBRARIES})
|
||||
|
||||
if(E2_AGENT)
|
||||
target_compile_definitions(lte-softmodem PRIVATE ${E2AP_VERSION} ${KPM_VERSION} E2_AGENT)
|
||||
@@ -1804,7 +1997,6 @@ target_link_libraries(lte-uesoftmodem PRIVATE
|
||||
target_link_libraries(lte-uesoftmodem PRIVATE pthread m CONFIG_LIB rt sctp)
|
||||
target_link_libraries(lte-uesoftmodem PRIVATE ${T_LIB})
|
||||
target_link_libraries(lte-uesoftmodem PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
|
||||
target_link_libraries(lte-uesoftmodem PRIVATE ${blas_LIBRARIES} ${cblas_LIBRARIES} ${lapacke_LIBRARIES} ${lapack_LIBRARIES})
|
||||
|
||||
# force the generation of ASN.1 so that we don't need to wait during the build
|
||||
target_link_libraries(lte-uesoftmodem PRIVATE
|
||||
@@ -1851,6 +2043,12 @@ if(E2_AGENT)
|
||||
endif()
|
||||
|
||||
|
||||
add_dependencies(nr-softmodem ldpc_orig ldpc_optim ldpc_optim8seg ldpc)
|
||||
|
||||
if (ENABLE_LDPC_T2)
|
||||
add_dependencies(nr-softmodem ldpc_t2)
|
||||
endif()
|
||||
|
||||
# force the generation of ASN.1 so that we don't need to wait during the build
|
||||
target_link_libraries(nr-softmodem PRIVATE
|
||||
asn1_lte_rrc asn1_nr_rrc asn1_s1ap asn1_ngap asn1_m2ap asn1_m3ap asn1_x2ap asn1_f1ap asn1_lpp)
|
||||
@@ -1881,30 +2079,33 @@ add_executable(nr-uesoftmodem
|
||||
${rrc_h}
|
||||
${s1ap_h}
|
||||
${OPENAIR_DIR}/executables/nr-uesoftmodem.c
|
||||
${OPENAIR_DIR}/executables/position_interface.c
|
||||
${OPENAIR_DIR}/executables/nr-ue.c
|
||||
${OPENAIR_DIR}/executables/softmodem-common.c
|
||||
${OPENAIR_DIR}/radio/COMMON/common_lib.c
|
||||
${OPENAIR_DIR}/radio/COMMON/record_player.c
|
||||
${OPENAIR2_DIR}/LAYER2/NR_MAC_COMMON/nr_mac_common.c
|
||||
${OPENAIR2_DIR}/LAYER2/NR_MAC_COMMON/nr_mac_common_tdd.c
|
||||
${OPENAIR3_DIR}/NAS/UE/nas_ue_task.c
|
||||
${OPENAIR1_DIR}/PHY/TOOLS/phy_scope_interface.c
|
||||
${NFAPI_USER_DIR}/nfapi.c
|
||||
${PHY_INTERFACE_DIR}/queue_t.c
|
||||
)
|
||||
|
||||
target_link_libraries(nr-uesoftmodem PRIVATE
|
||||
-Wl,--start-group
|
||||
nr_rrc SECURITY UTIL HASHTABLE SCHED_RU_LIB SCHED_NR_UE_LIB
|
||||
PHY_COMMON PHY_NR_COMMON PHY_NR_UE NR_L2_UE MAC_NR_COMMON NFAPI_LIB
|
||||
ITTI SIMU shlib_loader
|
||||
PHY_COMMON PHY_NR_COMMON PHY_NR_UE NR_L2_UE L2_UE_LTE_NR MAC_NR_COMMON NFAPI_LIB NFAPI_PNF_LIB
|
||||
NFAPI_USER_LIB MISC_NFAPI_NR_LIB
|
||||
ITTI LIB_5GNAS_GNB LIB_NAS_SIMUE ${NAS_SIM_LIB} SIMU shlib_loader
|
||||
-Wl,--end-group z dl)
|
||||
|
||||
target_link_libraries(nr-uesoftmodem PRIVATE pthread m CONFIG_LIB rt nr_ue_phy_meas)
|
||||
target_link_libraries(nr-uesoftmodem PRIVATE ${T_LIB})
|
||||
target_link_libraries(nr-uesoftmodem PRIVATE nr_nas lib_uicc usim_lib)
|
||||
target_link_libraries(nr-uesoftmodem PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
|
||||
|
||||
add_dependencies( nr-uesoftmodem ldpc_orig ldpc_optim ldpc_optim8seg ldpc )
|
||||
if (ENABLE_LDPC_CUDA)
|
||||
add_dependencies(nr-uesoftmodem ldpc_cuda)
|
||||
add_dependencies(nr-softmodem ldpc_cuda)
|
||||
endif()
|
||||
|
||||
# force the generation of ASN.1 so that we don't need to wait during the build
|
||||
target_link_libraries(nr-uesoftmodem PRIVATE
|
||||
asn1_lte_rrc asn1_nr_rrc asn1_s1ap asn1_ngap asn1_m2ap asn1_m3ap asn1_x2ap asn1_f1ap asn1_lpp)
|
||||
@@ -1955,37 +2156,42 @@ target_link_libraries(smallblocktest PRIVATE
|
||||
|
||||
|
||||
add_executable(ldpctest
|
||||
${OPENAIR1_DIR}/PHY/CODING/TESTBENCH/ldpctest.c
|
||||
${OPENAIR1_DIR}/PHY/CODING/nrLDPC_load.c
|
||||
)
|
||||
${PHY_NR_CODINGIF}
|
||||
${OPENAIR1_DIR}/PHY/CODING/TESTBENCH/ldpctest.c
|
||||
)
|
||||
|
||||
add_dependencies(ldpctest ldpc_orig ldpc_optim ldpc_optim8seg ldpc)
|
||||
if (ENABLE_LDPC_CUDA)
|
||||
add_dependencies(ldpctest ldpc_cuda)
|
||||
endif()
|
||||
target_link_libraries(ldpctest PRIVATE
|
||||
-Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR_COMMON -Wl,--end-group
|
||||
m pthread dl shlib_loader ${T_LIB}
|
||||
# link 'check_crc' to make it resolved in the LDPC coding libraries
|
||||
# 'check_crc' is not used in ldpctest so it is not linked in the executable by default
|
||||
# --whole-archive links 'check_crc' in the executable even though it is note used, see 'man ld'
|
||||
-Wl,--whole-archive crc_byte -Wl,--no-whole-archive
|
||||
)
|
||||
)
|
||||
|
||||
add_library(physim_common OBJECT ${OPENAIR1_DIR}/SIMULATION/NR_PHY/nr_unitary_common.c)
|
||||
target_link_libraries(physim_common PRIVATE UTIL)
|
||||
|
||||
add_executable(nr_dlschsim ${OPENAIR1_DIR}/SIMULATION/NR_PHY/dlschsim.c)
|
||||
add_executable(nr_dlschsim
|
||||
${OPENAIR1_DIR}/SIMULATION/NR_PHY/dlschsim.c
|
||||
${OPENAIR1_DIR}/SIMULATION/NR_PHY/nr_dummy_functions.c
|
||||
)
|
||||
target_link_libraries(nr_dlschsim PRIVATE
|
||||
-Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB CONFIG_LIB MAC_NR_COMMON -Wl,--end-group
|
||||
m pthread ${T_LIB} ITTI dl shlib_loader physim_common
|
||||
m pthread ${T_LIB} ITTI dl shlib_loader
|
||||
)
|
||||
target_link_libraries(nr_dlschsim PRIVATE asn1_nr_rrc_hdrs)
|
||||
|
||||
add_executable(nr_pbchsim ${OPENAIR1_DIR}/SIMULATION/NR_PHY/pbchsim.c)
|
||||
add_executable(nr_pbchsim
|
||||
${OPENAIR1_DIR}/SIMULATION/NR_PHY/pbchsim.c
|
||||
${OPENAIR1_DIR}/SIMULATION/NR_PHY/nr_dummy_functions.c
|
||||
)
|
||||
target_link_libraries(nr_pbchsim PRIVATE
|
||||
-Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB CONFIG_LIB MAC_NR_COMMON -Wl,--end-group
|
||||
m pthread ${T_LIB} ITTI dl shlib_loader physim_common
|
||||
m pthread ${T_LIB} ITTI dl shlib_loader
|
||||
)
|
||||
target_link_libraries(nr_pbchsim PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
|
||||
|
||||
add_executable(nr_psbchsim
|
||||
${OPENAIR1_DIR}/SIMULATION/NR_PHY/psbchsim.c
|
||||
${OPENAIR1_DIR}/SIMULATION/NR_PHY/nr_dummy_functions.c
|
||||
${OPENAIR_DIR}/executables/softmodem-common.c
|
||||
${NR_UE_RRC_DIR}/rrc_nsa.c
|
||||
${NFAPI_USER_DIR}/nfapi.c
|
||||
@@ -1994,19 +2200,24 @@ add_executable(nr_psbchsim
|
||||
)
|
||||
target_link_libraries(nr_psbchsim PRIVATE
|
||||
-Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB SCHED_NR_UE_LIB MAC_UE_NR MAC_NR_COMMON CONFIG_LIB L2_NR -lz -Wl,--end-group
|
||||
m pthread ${T_LIB} ITTI dl shlib_loader physim_common
|
||||
m pthread ${T_LIB} ITTI dl shlib_loader
|
||||
)
|
||||
target_link_libraries(nr_psbchsim PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
|
||||
|
||||
add_executable(nr_pucchsim ${OPENAIR1_DIR}/SIMULATION/NR_PHY/pucchsim.c)
|
||||
#PUCCH ---> Prashanth
|
||||
add_executable(nr_pucchsim
|
||||
${OPENAIR1_DIR}/SIMULATION/NR_PHY/pucchsim.c
|
||||
${OPENAIR1_DIR}/SIMULATION/NR_PHY/nr_dummy_functions.c
|
||||
)
|
||||
target_link_libraries(nr_pucchsim PRIVATE
|
||||
-Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB CONFIG_LIB MAC_NR_COMMON -Wl,--end-group
|
||||
m pthread ${T_LIB} ITTI dl shlib_loader physim_common
|
||||
m pthread ${T_LIB} ITTI dl shlib_loader
|
||||
)
|
||||
target_link_libraries(nr_pucchsim PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
|
||||
|
||||
add_executable(nr_dlsim
|
||||
${OPENAIR1_DIR}/SIMULATION/NR_PHY/dlsim.c
|
||||
${OPENAIR1_DIR}/SIMULATION/NR_PHY/nr_dummy_functions.c
|
||||
${OPENAIR_DIR}/executables/softmodem-common.c
|
||||
${NR_UE_RRC_DIR}/rrc_nsa.c
|
||||
${NFAPI_USER_DIR}/nfapi.c
|
||||
@@ -2015,28 +2226,33 @@ add_executable(nr_dlsim
|
||||
)
|
||||
target_link_libraries(nr_dlsim PRIVATE
|
||||
-Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB SCHED_NR_UE_LIB MAC_UE_NR MAC_NR_COMMON nr_rrc CONFIG_LIB L2_NR HASHTABLE x2ap SECURITY ngap -lz -Wl,--end-group
|
||||
m pthread ${T_LIB} ITTI dl shlib_loader nr_ue_phy_meas physim_common
|
||||
m pthread ${T_LIB} ITTI dl shlib_loader nr_ue_phy_meas
|
||||
)
|
||||
target_link_libraries(nr_dlsim PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
|
||||
|
||||
add_executable(nr_prachsim ${OPENAIR1_DIR}/SIMULATION/NR_PHY/prachsim.c)
|
||||
add_executable(nr_prachsim
|
||||
${OPENAIR1_DIR}/SIMULATION/NR_PHY/prachsim.c
|
||||
${OPENAIR1_DIR}/SIMULATION/NR_PHY/nr_dummy_functions.c
|
||||
)
|
||||
target_link_libraries(nr_prachsim PRIVATE
|
||||
-Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_RU PHY_NR_UE MAC_NR_COMMON SCHED_NR_LIB CONFIG_LIB -lz -Wl,--end-group
|
||||
m pthread ${T_LIB} ITTI dl shlib_loader physim_common)
|
||||
m pthread ${T_LIB} ITTI dl shlib_loader)
|
||||
target_link_libraries(nr_prachsim PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
|
||||
|
||||
add_executable(nr_ulschsim
|
||||
${OPENAIR1_DIR}/SIMULATION/NR_PHY/ulschsim.c
|
||||
${OPENAIR1_DIR}/SIMULATION/NR_PHY/nr_dummy_functions.c
|
||||
${PHY_INTERFACE_DIR}/queue_t.c
|
||||
)
|
||||
target_link_libraries(nr_ulschsim PRIVATE
|
||||
-Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB CONFIG_LIB MAC_NR_COMMON -Wl,--end-group
|
||||
m pthread ${T_LIB} ITTI dl shlib_loader physim_common
|
||||
m pthread ${T_LIB} ITTI dl shlib_loader
|
||||
)
|
||||
target_link_libraries(nr_ulschsim PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
|
||||
|
||||
add_executable(nr_ulsim
|
||||
${OPENAIR1_DIR}/SIMULATION/NR_PHY/ulsim.c
|
||||
${OPENAIR1_DIR}/SIMULATION/NR_PHY/nr_dummy_functions.c
|
||||
${OPENAIR_DIR}/executables/softmodem-common.c
|
||||
${NR_UE_RRC_DIR}/rrc_nsa.c
|
||||
${NFAPI_USER_DIR}/nfapi.c
|
||||
@@ -2044,9 +2260,13 @@ add_executable(nr_ulsim
|
||||
${PHY_INTERFACE_DIR}/queue_t.c
|
||||
)
|
||||
|
||||
if (ENABLE_LDPC_T2)
|
||||
add_dependencies(nr_ulsim ldpc_t2)
|
||||
endif()
|
||||
|
||||
target_link_libraries(nr_ulsim PRIVATE
|
||||
-Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB SCHED_NR_UE_LIB MAC_UE_NR MAC_NR_COMMON nr_rrc CONFIG_LIB L2_NR HASHTABLE x2ap SECURITY ngap -lz -Wl,--end-group
|
||||
m pthread ${T_LIB} ITTI dl shlib_loader nr_ue_phy_meas physim_common
|
||||
m pthread ${T_LIB} ITTI dl shlib_loader nr_ue_phy_meas
|
||||
)
|
||||
target_link_libraries(nr_ulsim PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
|
||||
|
||||
@@ -2086,6 +2306,10 @@ foreach(myExe s1ap
|
||||
)
|
||||
endforeach(myExe)
|
||||
|
||||
# to be added
|
||||
#../targets/TEST/PDCP/test_pdcp.c
|
||||
#../targets/TEST/PDCP/with_rlc/test_pdcp_rlc.c
|
||||
|
||||
#ensure that the T header files are generated before targets depending on them
|
||||
if (${T_TRACER})
|
||||
foreach(i
|
||||
@@ -2098,14 +2322,14 @@ if (${T_TRACER})
|
||||
#all "add_library" definitions
|
||||
ITTI lte_rrc nr_rrc s1ap x2ap m2ap m3ap f1ap
|
||||
params_libconfig oai_usrpdevif oai_bladerfdevif oai_lmssdrdevif oai_iqplayer
|
||||
oai_eth_transpro oai_mobipass HASHTABLE UTIL OMG_SUMO
|
||||
oai_eth_transpro oai_mobipass coding HASHTABLE UTIL OMG_SUMO
|
||||
SECURITY SCHED_LIB SCHED_NR_LIB SCHED_RU_LIB SCHED_UE_LIB SCHED_NR_UE_LIB default_sched remote_sched RAL
|
||||
NFAPI_LIB NFAPI_PNF_LIB NFAPI_VNF_LIB NFAPI_USER_LIB
|
||||
MISC_NFAPI_LTE_LIB MISC_NFAPI_NR_LIB
|
||||
PHY_COMMON PHY PHY_UE PHY_NR PHY_NR_COMMON PHY_NR_UE PHY_RU
|
||||
L2 L2_LTE L2_NR L2_LTE_NR L2_UE NR_L2_UE MAC_NR_COMMON MAC_UE_NR ngap
|
||||
PHY_COMMON PHY PHY_UE PHY_NR PHY_NR_COMMON PHY_NR_UE PHY_RU PHY_MEX
|
||||
L2 L2_LTE L2_NR L2_LTE_NR L2_UE NR_L2_UE L2_UE_LTE_NR MAC_NR_COMMON MAC_UE_NR ngap
|
||||
CN_UTILS GTPV1U SCTP_CLIENT MME_APP LIB_NAS_UE NB_IoT SIMU OPENAIR0_LIB
|
||||
dfts config_internals nr_common crc_byte)
|
||||
ldpc_orig ldpc_optim ldpc_optim8seg ldpc_t2 ldpc_cl ldpc_cuda ldpc dfts config_internals nr_common)
|
||||
if (TARGET ${i})
|
||||
add_dependencies(${i} generate_T)
|
||||
endif()
|
||||
|
||||
@@ -18,11 +18,6 @@ spec:
|
||||
- name: physim
|
||||
image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
{{- if .Values.global.resources.define}}
|
||||
resources:
|
||||
requests:
|
||||
cpu: {{ .Values.global.resources.requests.cpu | quote }}
|
||||
{{- end}}
|
||||
securityContext:
|
||||
{{- toYaml .Values.securityContext | nindent 12 }}
|
||||
env:
|
||||
@@ -42,6 +37,6 @@ spec:
|
||||
nodeSelector:
|
||||
{{- toYaml .Values.global.nodeSelector | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.global.nodeName}}
|
||||
{{- if .Values.global.nodeName.dlsim100rbtm2}}
|
||||
nodeName: {{ .Values.global.nodeName.dlsim100rbtm2 }}
|
||||
{{- end }}
|
||||
|
||||
@@ -18,11 +18,6 @@ spec:
|
||||
- name: physim
|
||||
image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
{{- if .Values.global.resources.define}}
|
||||
resources:
|
||||
requests:
|
||||
cpu: {{ .Values.global.resources.requests.cpu | quote }}
|
||||
{{- end}}
|
||||
securityContext:
|
||||
{{- toYaml .Values.securityContext | nindent 12 }}
|
||||
env:
|
||||
@@ -42,6 +37,6 @@ spec:
|
||||
nodeSelector:
|
||||
{{- toYaml .Values.global.nodeSelector | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.global.nodeName}}
|
||||
{{- if .Values.global.nodeName.dlsimbasic}}
|
||||
nodeName: {{ .Values.global.nodeName.dlsimbasic }}
|
||||
{{- end }}
|
||||
|
||||
@@ -18,11 +18,6 @@ spec:
|
||||
- name: physim
|
||||
image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
{{- if .Values.global.resources.define}}
|
||||
resources:
|
||||
requests:
|
||||
cpu: {{ .Values.global.resources.requests.cpu | quote }}
|
||||
{{- end}}
|
||||
securityContext:
|
||||
{{- toYaml .Values.securityContext | nindent 12 }}
|
||||
env:
|
||||
@@ -42,6 +37,6 @@ spec:
|
||||
nodeSelector:
|
||||
{{- toYaml .Values.global.nodeSelector | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.global.nodeName}}
|
||||
{{- if .Values.global.nodeName.ldpctest}}
|
||||
nodeName: {{ .Values.global.nodeName.ldpctest }}
|
||||
{{- end }}
|
||||
|
||||
@@ -18,11 +18,6 @@ spec:
|
||||
- name: physim
|
||||
image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
{{- if .Values.global.resources.define}}
|
||||
resources:
|
||||
requests:
|
||||
cpu: {{ .Values.global.resources.requests.cpu | quote }}
|
||||
{{- end}}
|
||||
securityContext:
|
||||
{{- toYaml .Values.securityContext | nindent 12 }}
|
||||
env:
|
||||
@@ -42,6 +37,6 @@ spec:
|
||||
nodeSelector:
|
||||
{{- toYaml .Values.global.nodeSelector | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.global.nodeName}}
|
||||
{{- if .Values.global.nodeName.nrdlschsim}}
|
||||
nodeName: {{ .Values.global.nodeName.nrdlschsim }}
|
||||
{{- end }}
|
||||
|
||||
@@ -18,11 +18,6 @@ spec:
|
||||
- name: physim
|
||||
image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
{{- if .Values.global.resources.define}}
|
||||
resources:
|
||||
requests:
|
||||
cpu: {{ .Values.global.resources.requests.cpu | quote }}
|
||||
{{- end}}
|
||||
securityContext:
|
||||
{{- toYaml .Values.securityContext | nindent 12 }}
|
||||
env:
|
||||
@@ -42,6 +37,6 @@ spec:
|
||||
nodeSelector:
|
||||
{{- toYaml .Values.global.nodeSelector | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.global.nodeName}}
|
||||
{{- if .Values.global.nodeName.nrdlsimbasic}}
|
||||
nodeName: {{ .Values.global.nodeName.nrdlsimbasic }}
|
||||
{{- end }}
|
||||
|
||||
@@ -18,11 +18,6 @@ spec:
|
||||
- name: physim
|
||||
image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
{{- if .Values.global.resources.define}}
|
||||
resources:
|
||||
requests:
|
||||
cpu: {{ .Values.global.resources.requests.cpu | quote }}
|
||||
{{- end}}
|
||||
securityContext:
|
||||
{{- toYaml .Values.securityContext | nindent 12 }}
|
||||
env:
|
||||
@@ -42,6 +37,6 @@ spec:
|
||||
nodeSelector:
|
||||
{{- toYaml .Values.global.nodeSelector | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.global.nodeName}}
|
||||
{{- if .Values.global.nodeName.nrdlsimdmrsptrs}}
|
||||
nodeName: {{ .Values.global.nodeName.nrdlsimdmrsptrs }}
|
||||
{{- end }}
|
||||
|
||||
@@ -18,11 +18,6 @@ spec:
|
||||
- name: physim
|
||||
image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
{{- if .Values.global.resources.define}}
|
||||
resources:
|
||||
requests:
|
||||
cpu: {{ .Values.global.resources.requests.cpu | quote }}
|
||||
{{- end}}
|
||||
securityContext:
|
||||
{{- toYaml .Values.securityContext | nindent 12 }}
|
||||
env:
|
||||
@@ -42,6 +37,6 @@ spec:
|
||||
nodeSelector:
|
||||
{{- toYaml .Values.global.nodeSelector | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.global.nodeName}}
|
||||
{{- if .Values.global.nodeName.nrdlsimmcsmimo}}
|
||||
nodeName: {{ .Values.global.nodeName.nrdlsimmcsmimo }}
|
||||
{{- end }}
|
||||
|
||||
@@ -18,11 +18,6 @@ spec:
|
||||
- name: physim
|
||||
image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
{{- if .Values.global.resources.define}}
|
||||
resources:
|
||||
requests:
|
||||
cpu: {{ .Values.global.resources.requests.cpu | quote }}
|
||||
{{- end}}
|
||||
securityContext:
|
||||
{{- toYaml .Values.securityContext | nindent 12 }}
|
||||
env:
|
||||
@@ -42,6 +37,6 @@ spec:
|
||||
nodeSelector:
|
||||
{{- toYaml .Values.global.nodeSelector | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.global.nodeName}}
|
||||
{{- if .Values.global.nodeName.nrdlsimoffset}}
|
||||
nodeName: {{ .Values.global.nodeName.nrdlsimoffset }}
|
||||
{{- end }}
|
||||
|
||||
@@ -18,11 +18,6 @@ spec:
|
||||
- name: physim
|
||||
image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
{{- if .Values.global.resources.define}}
|
||||
resources:
|
||||
requests:
|
||||
cpu: {{ .Values.global.resources.requests.cpu | quote }}
|
||||
{{- end}}
|
||||
securityContext:
|
||||
{{- toYaml .Values.securityContext | nindent 12 }}
|
||||
env:
|
||||
@@ -42,6 +37,6 @@ spec:
|
||||
nodeSelector:
|
||||
{{- toYaml .Values.global.nodeSelector | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.global.nodeName}}
|
||||
{{- if .Values.global.nodeName.nrpbschsim106rb}}
|
||||
nodeName: {{ .Values.global.nodeName.nrpbschsim106rb }}
|
||||
{{- end }}
|
||||
|
||||
@@ -18,11 +18,6 @@ spec:
|
||||
- name: physim
|
||||
image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
{{- if .Values.global.resources.define}}
|
||||
resources:
|
||||
requests:
|
||||
cpu: {{ .Values.global.resources.requests.cpu | quote }}
|
||||
{{- end}}
|
||||
securityContext:
|
||||
{{- toYaml .Values.securityContext | nindent 12 }}
|
||||
env:
|
||||
@@ -42,6 +37,6 @@ spec:
|
||||
nodeSelector:
|
||||
{{- toYaml .Values.global.nodeSelector | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.global.nodeName}}
|
||||
{{- if .Values.global.nodeName.nrpbchsim217rb}}
|
||||
nodeName: {{ .Values.global.nodeName.nrpbchsim217rb }}
|
||||
{{- end }}
|
||||
|
||||
@@ -18,11 +18,6 @@ spec:
|
||||
- name: physim
|
||||
image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
{{- if .Values.global.resources.define}}
|
||||
resources:
|
||||
requests:
|
||||
cpu: {{ .Values.global.resources.requests.cpu | quote }}
|
||||
{{- end}}
|
||||
securityContext:
|
||||
{{- toYaml .Values.securityContext | nindent 12 }}
|
||||
env:
|
||||
@@ -42,6 +37,6 @@ spec:
|
||||
nodeSelector:
|
||||
{{- toYaml .Values.global.nodeSelector | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.global.nodeName}}
|
||||
{{- if .Values.global.nodeName.nrpbchsim273rb}}
|
||||
nodeName: {{ .Values.global.nodeName.nrpbchsim273rb }}
|
||||
{{- end }}
|
||||
|
||||
@@ -18,11 +18,6 @@ spec:
|
||||
- name: physim
|
||||
image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
{{- if .Values.global.resources.define}}
|
||||
resources:
|
||||
requests:
|
||||
cpu: {{ .Values.global.resources.requests.cpu | quote }}
|
||||
{{- end}}
|
||||
securityContext:
|
||||
{{- toYaml .Values.securityContext | nindent 12 }}
|
||||
env:
|
||||
@@ -42,6 +37,6 @@ spec:
|
||||
nodeSelector:
|
||||
{{- toYaml .Values.global.nodeSelector | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.global.nodeName}}
|
||||
{{- if .Values.global.nodeName.nrpbchsim273rb}}
|
||||
nodeName: {{ .Values.global.nodeName.nrpbchsim273rb }}
|
||||
{{- end }}
|
||||
|
||||
@@ -18,11 +18,6 @@ spec:
|
||||
- name: physim
|
||||
image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
{{- if .Values.global.resources.define}}
|
||||
resources:
|
||||
requests:
|
||||
cpu: {{ .Values.global.resources.requests.cpu | quote }}
|
||||
{{- end}}
|
||||
securityContext:
|
||||
{{- toYaml .Values.securityContext | nindent 12 }}
|
||||
env:
|
||||
@@ -42,6 +37,6 @@ spec:
|
||||
nodeSelector:
|
||||
{{- toYaml .Values.global.nodeSelector | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.global.nodeName}}
|
||||
{{- if .Values.global.nodeName.nrprachsim}}
|
||||
nodeName: {{ .Values.global.nodeName.nrprachsim }}
|
||||
{{- end }}
|
||||
|
||||
@@ -18,11 +18,6 @@ spec:
|
||||
- name: physim
|
||||
image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
{{- if .Values.global.resources.define}}
|
||||
resources:
|
||||
requests:
|
||||
cpu: {{ .Values.global.resources.requests.cpu | quote }}
|
||||
{{- end}}
|
||||
securityContext:
|
||||
{{- toYaml .Values.securityContext | nindent 12 }}
|
||||
env:
|
||||
@@ -42,6 +37,6 @@ spec:
|
||||
nodeSelector:
|
||||
{{- toYaml .Values.global.nodeSelector | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.global.nodeName}}
|
||||
{{- if .Values.global.nodeName.nrpsbchsim}}
|
||||
nodeName: {{ .Values.global.nodeName.nrpsbchsim }}
|
||||
{{- end }}
|
||||
|
||||
@@ -18,11 +18,6 @@ spec:
|
||||
- name: physim
|
||||
image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
{{- if .Values.global.resources.define}}
|
||||
resources:
|
||||
requests:
|
||||
cpu: {{ .Values.global.resources.requests.cpu | quote }}
|
||||
{{- end}}
|
||||
securityContext:
|
||||
{{- toYaml .Values.securityContext | nindent 12 }}
|
||||
env:
|
||||
@@ -42,6 +37,6 @@ spec:
|
||||
nodeSelector:
|
||||
{{- toYaml .Values.global.nodeSelector | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.global.nodeName}}
|
||||
{{- if .Values.global.nodeName.nrpucchsim}}
|
||||
nodeName: {{ .Values.global.nodeName.nrpucchsim }}
|
||||
{{- end }}
|
||||
|
||||
@@ -18,11 +18,6 @@ spec:
|
||||
- name: physim
|
||||
image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
{{- if .Values.global.resources.define}}
|
||||
resources:
|
||||
requests:
|
||||
cpu: {{ .Values.global.resources.requests.cpu | quote }}
|
||||
{{- end}}
|
||||
securityContext:
|
||||
{{- toYaml .Values.securityContext | nindent 12 }}
|
||||
env:
|
||||
@@ -42,6 +37,6 @@ spec:
|
||||
nodeSelector:
|
||||
{{- toYaml .Values.global.nodeSelector | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.global.nodeName}}
|
||||
{{- if .Values.global.nodeName.nrulschsim}}
|
||||
nodeName: {{ .Values.global.nodeName.nrulschsim }}
|
||||
{{- end }}
|
||||
|
||||
@@ -18,11 +18,6 @@ spec:
|
||||
- name: physim
|
||||
image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
{{- if .Values.global.resources.define}}
|
||||
resources:
|
||||
requests:
|
||||
cpu: {{ .Values.global.resources.requests.cpu | quote }}
|
||||
{{- end}}
|
||||
securityContext:
|
||||
{{- toYaml .Values.securityContext | nindent 12 }}
|
||||
env:
|
||||
@@ -42,6 +37,6 @@ spec:
|
||||
nodeSelector:
|
||||
{{- toYaml .Values.global.nodeSelector | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.global.nodeName}}
|
||||
{{- if .Values.global.nodeName.nrulsim3gpp}}
|
||||
nodeName: {{ .Values.global.nodeName.nrulsim3gpp }}
|
||||
{{- end }}
|
||||
|
||||
@@ -18,11 +18,6 @@ spec:
|
||||
- name: physim
|
||||
image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
{{- if .Values.global.resources.define}}
|
||||
resources:
|
||||
requests:
|
||||
cpu: {{ .Values.global.resources.requests.cpu | quote }}
|
||||
{{- end}}
|
||||
securityContext:
|
||||
{{- toYaml .Values.securityContext | nindent 12 }}
|
||||
env:
|
||||
@@ -42,6 +37,6 @@ spec:
|
||||
nodeSelector:
|
||||
{{- toYaml .Values.global.nodeSelector | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.global.nodeName}}
|
||||
{{- if .Values.global.nodeName.nrulsimmimo}}
|
||||
nodeName: {{ .Values.global.nodeName.nrulsimmimo }}
|
||||
{{- end }}
|
||||
|
||||
@@ -18,11 +18,6 @@ spec:
|
||||
- name: physim
|
||||
image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
{{- if .Values.global.resources.define}}
|
||||
resources:
|
||||
requests:
|
||||
cpu: {{ .Values.global.resources.requests.cpu | quote }}
|
||||
{{- end}}
|
||||
securityContext:
|
||||
{{- toYaml .Values.securityContext | nindent 12 }}
|
||||
env:
|
||||
@@ -42,6 +37,6 @@ spec:
|
||||
nodeSelector:
|
||||
{{- toYaml .Values.global.nodeSelector | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.global.nodeName}}
|
||||
{{- if .Values.global.nodeName.nrulsimmisc}}
|
||||
nodeName: {{ .Values.global.nodeName.nrulsimmisc }}
|
||||
{{- end }}
|
||||
|
||||
@@ -18,11 +18,6 @@ spec:
|
||||
- name: physim
|
||||
image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
{{- if .Values.global.resources.define}}
|
||||
resources:
|
||||
requests:
|
||||
cpu: {{ .Values.global.resources.requests.cpu | quote }}
|
||||
{{- end}}
|
||||
securityContext:
|
||||
{{- toYaml .Values.securityContext | nindent 12 }}
|
||||
ports:
|
||||
@@ -44,6 +39,6 @@ spec:
|
||||
nodeSelector:
|
||||
{{- toYaml .Values.global.nodeSelector | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.global.nodeName}}
|
||||
{{- if .Values.global.nodeName.nrulsimscfdma}}
|
||||
nodeName: {{ .Values.global.nodeName.nrulsimscfdma }}
|
||||
{{- end }}
|
||||
|
||||
@@ -18,11 +18,6 @@ spec:
|
||||
- name: physim
|
||||
image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
{{- if .Values.global.resources.define}}
|
||||
resources:
|
||||
requests:
|
||||
cpu: {{ .Values.global.resources.requests.cpu | quote }}
|
||||
{{- end}}
|
||||
securityContext:
|
||||
{{- toYaml .Values.securityContext | nindent 12 }}
|
||||
env:
|
||||
@@ -42,6 +37,6 @@ spec:
|
||||
nodeSelector:
|
||||
{{- toYaml .Values.global.nodeSelector | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.global.nodeName}}
|
||||
{{- if .Values.global.nodeName.polartest}}
|
||||
nodeName: {{ .Values.global.nodeName.polartest }}
|
||||
{{- end }}
|
||||
|
||||
@@ -18,11 +18,6 @@ spec:
|
||||
- name: physim
|
||||
image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
{{- if .Values.global.resources.define}}
|
||||
resources:
|
||||
requests:
|
||||
cpu: {{ .Values.global.resources.requests.cpu | quote }}
|
||||
{{- end}}
|
||||
securityContext:
|
||||
{{- toYaml .Values.securityContext | nindent 12 }}
|
||||
env:
|
||||
@@ -42,6 +37,6 @@ spec:
|
||||
nodeSelector:
|
||||
{{- toYaml .Values.global.nodeSelector | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.global.nodeName}}
|
||||
{{- if .Values.global.nodeName.smallblocktest}}
|
||||
nodeName: {{ .Values.global.nodeName.smallblocktest }}
|
||||
{{- end }}
|
||||
|
||||
@@ -18,11 +18,6 @@ spec:
|
||||
- name: physim
|
||||
image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
{{- if .Values.global.resources.define}}
|
||||
resources:
|
||||
requests:
|
||||
cpu: {{ .Values.global.resources.requests.cpu | quote }}
|
||||
{{- end}}
|
||||
securityContext:
|
||||
{{- toYaml .Values.securityContext | nindent 12 }}
|
||||
env:
|
||||
@@ -42,6 +37,6 @@ spec:
|
||||
nodeSelector:
|
||||
{{- toYaml .Values.global.nodeSelector | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.global.nodeName}}
|
||||
{{- if .Values.global.nodeName.ulsim}}
|
||||
nodeName: {{ .Values.global.nodeName.ulsim }}
|
||||
{{- end }}
|
||||
|
||||
@@ -1,21 +1,41 @@
|
||||
# Default values for oai-physim.
|
||||
# This is a YAML-formatted file.
|
||||
# Declare variables to be passed into your templates.
|
||||
|
||||
global:
|
||||
serviceAccountName: oai-physim-sa
|
||||
namespace: "OAICICD_PROJECT"
|
||||
image:
|
||||
image:
|
||||
registry: local
|
||||
repository: image-registry.openshift-image-registry.svc:5000/oaicicd-ran/oai-physim
|
||||
version: TAG
|
||||
# pullPolicy: IfNotPresent or Never or Always
|
||||
pullPolicy: Always
|
||||
# removing the node selector
|
||||
# will place on two nodes intel 3rd gen and 5th gen with RT kernel
|
||||
nodeSelector:
|
||||
type: ran
|
||||
nodeName: ''
|
||||
resources:
|
||||
define: false
|
||||
requests:
|
||||
cpu: 1.5
|
||||
nodeSelector: {}
|
||||
# It is not a good way of assigning pods to the nodes: this way we bypass the scheduler. At the moment we don't provide the resource information of these pods.
|
||||
# Therefore, Openshift assigns the pods to the same node because it thinks the pods don't consume much resources. This isn't the case, they consume a lot of resources.
|
||||
nodeName:
|
||||
dlsim100rbtm2: acamas
|
||||
dlsimbasic: acamas
|
||||
ldpctest: acamas
|
||||
nrdlschsim: acamas
|
||||
nrdlsimbasic: acamas
|
||||
nrdlsimdmrsptrs: acamas
|
||||
nrdlsimmcsmimo: acamas
|
||||
nrdlsimoffset: dedale
|
||||
nrpbschsim106rb: dedale
|
||||
nrpbchsim217rb: dedale
|
||||
nrpbchsim273rb: dedale
|
||||
nrpbchsimscs: dedale
|
||||
nrpsbchsim: dedale
|
||||
nrprachsim: dedale
|
||||
nrpucchsim: dedale
|
||||
nrulschsim: demophon
|
||||
nrulsim3gpp: demophon
|
||||
nrulsimmimo: demophon
|
||||
nrulsimmisc: demophon
|
||||
nrulsimscfdma: demophon
|
||||
polartest: demophon
|
||||
smallblocktest: demophon
|
||||
ulsim: demophon
|
||||
|
||||
@@ -27,7 +27,6 @@ def nodeExecutor = params.nodeExecutor
|
||||
def doBuild = true
|
||||
def do4Gtest = false
|
||||
def do5Gtest = false
|
||||
def do5GUeTest = false
|
||||
|
||||
//
|
||||
def gitCommitAuthorEmailAddr
|
||||
@@ -65,24 +64,17 @@ pipeline {
|
||||
message += " - ~BUILD-ONLY (execute only build stages)\n"
|
||||
message += " - ~4G-LTE (perform 4G tests)\n"
|
||||
message += " - ~5G-NR (perform 5G tests)\n"
|
||||
message += " - ~CI (perform both 4G and 5G tests)\n"
|
||||
message += " - ~nrUE (perform only 5G-UE related tests including physims excluding LDPC tests)\n\n"
|
||||
message += " - ~CI (perform both 4G and 5G tests)\n\n"
|
||||
message += "Not performing CI due to lack of labels"
|
||||
addGitLabMRComment comment: message
|
||||
error('Not performing CI due to lack of labels')
|
||||
} else if (LABEL_CHECK == 'FULL') {
|
||||
do4Gtest = true
|
||||
do5Gtest = true
|
||||
do5GUeTest = true
|
||||
} else if (LABEL_CHECK == "SHORTEN-4G") {
|
||||
do4Gtest = true
|
||||
} else if (LABEL_CHECK == 'SHORTEN-5G') {
|
||||
do5Gtest = true
|
||||
} else if (LABEL_CHECK == 'SHORTEN-5G-UE') {
|
||||
do5GUeTest = true
|
||||
} else if (LABEL_CHECK == 'SHORTEN-4G-5G-UE') {
|
||||
do4Gtest = true
|
||||
do5GUeTest = true
|
||||
} else if (LABEL_CHECK == 'documentation') {
|
||||
doBuild = false
|
||||
} else {
|
||||
@@ -153,28 +145,6 @@ pipeline {
|
||||
}
|
||||
}
|
||||
}
|
||||
stage ("Ubuntu-ARM-Image-Builder") {
|
||||
steps {
|
||||
script {
|
||||
triggerSlaveJob ('RAN-Ubuntu-ARM-Image-Builder', 'Ubuntu-ARM-Image-Builder')
|
||||
}
|
||||
}
|
||||
post {
|
||||
always {
|
||||
script {
|
||||
// Using a unique variable name for each test stage to avoid overwriting on a global variable
|
||||
// due to parallel-time concurrency
|
||||
ubuntuArmBuildStatus = finalizeSlaveJob('RAN-Ubuntu-ARM-Image-Builder')
|
||||
}
|
||||
}
|
||||
failure {
|
||||
script {
|
||||
currentBuild.result = 'FAILURE'
|
||||
failingStages += ubuntuArmBuildStatus
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage ("RHEL-Cluster-Image-Builder") {
|
||||
steps {
|
||||
script {
|
||||
@@ -247,7 +217,7 @@ pipeline {
|
||||
when { expression {doBuild} }
|
||||
parallel {
|
||||
stage ("PhySim-Cluster") {
|
||||
when { expression {do4Gtest || do5Gtest || do5GUeTest} }
|
||||
when { expression {do4Gtest || do5Gtest} }
|
||||
steps {
|
||||
script {
|
||||
triggerSlaveJob ('RAN-PhySim-Cluster', 'PhySim-Cluster')
|
||||
@@ -293,7 +263,7 @@ pipeline {
|
||||
}
|
||||
}
|
||||
stage ("RF-Sim-Test-5G") {
|
||||
when { expression {do5Gtest || do5GUeTest} }
|
||||
when { expression {do5Gtest} }
|
||||
steps {
|
||||
script {
|
||||
triggerSlaveJob ('RAN-RF-Sim-Test-5G', 'RF-Sim-Test-5G')
|
||||
@@ -316,7 +286,7 @@ pipeline {
|
||||
}
|
||||
}
|
||||
stage ("OAI-FLEXRIC-RAN-Integration-Test") {
|
||||
when { expression {do5Gtest || do5GUeTest} }
|
||||
when { expression {do5Gtest} }
|
||||
steps {
|
||||
script {
|
||||
triggerSlaveJob ('OAI-FLEXRIC-RAN-Integration-Test', 'OAI-FLEXRIC-RAN-Integration-Test')
|
||||
@@ -639,7 +609,7 @@ pipeline {
|
||||
}
|
||||
}
|
||||
stage ("SA-OAIUE-CN5G") {
|
||||
when { expression {do5Gtest || do5GUeTest} }
|
||||
when { expression {do5Gtest} }
|
||||
steps {
|
||||
script {
|
||||
triggerSlaveJob ('RAN-SA-OAIUE-CN5G', 'SA-OAIUE-CN5G')
|
||||
@@ -688,6 +658,9 @@ pipeline {
|
||||
if ("MERGE".equals(env.gitlabActionType)) {
|
||||
addGitLabMRComment comment: message
|
||||
def message2 = message + " -- MergeRequest #" + env.gitlabMergeRequestIid + " (" + env.gitlabMergeRequestTitle + ")"
|
||||
sendSocialMediaMessage('ci-enb', 'good', message2)
|
||||
} else {
|
||||
sendSocialMediaMessage('ci-enb', 'good', message)
|
||||
}
|
||||
echo "Pipeline is SUCCESSFUL"
|
||||
}
|
||||
@@ -699,6 +672,9 @@ pipeline {
|
||||
def fullMessage = message + '\n\nList of failing test stages:' + failingStages
|
||||
addGitLabMRComment comment: fullMessage
|
||||
def message2 = message + " -- MergeRequest #" + env.gitlabMergeRequestIid + " (" + env.gitlabMergeRequestTitle + ")"
|
||||
sendSocialMediaMessage('ci-enb', 'danger', message2)
|
||||
} else {
|
||||
sendSocialMediaMessage('ci-enb', 'danger', message)
|
||||
}
|
||||
echo "Pipeline FAILED"
|
||||
}
|
||||
@@ -822,3 +798,9 @@ def finalizeSlaveJob(jobName) {
|
||||
return artifactUrl
|
||||
}
|
||||
}
|
||||
|
||||
// Abstraction function to send social media messages:
|
||||
// like on Slack or Mattermost
|
||||
def sendSocialMediaMessage(pipeChannel, pipeColor, pipeMessage) {
|
||||
slackSend channel: pipeChannel, color: pipeColor, message: pipeMessage
|
||||
}
|
||||
|
||||
@@ -144,6 +144,23 @@ pipeline {
|
||||
echo "no eNB_mergeRequest given - not merging develop"
|
||||
}
|
||||
|
||||
if (params.EPC_IPAddress == null) {
|
||||
echo "no EPC_IPAddress given"
|
||||
allParametersPresent = false
|
||||
}
|
||||
if (params.EPC_Type == null) {
|
||||
echo "no EPC_Type given"
|
||||
allParametersPresent = false
|
||||
}
|
||||
if (params.EPC_SourceCodePath == null) {
|
||||
echo "no EPC_SourceCodePath given"
|
||||
allParametersPresent = false
|
||||
}
|
||||
if (params.EPC_Credentials == null) {
|
||||
echo "no EPC_Credentials given"
|
||||
allParametersPresent = false
|
||||
}
|
||||
|
||||
if (params.OC_Credentials == null) {
|
||||
echo "no OC_Credentials given"
|
||||
allParametersPresent = false
|
||||
@@ -189,6 +206,7 @@ pipeline {
|
||||
}
|
||||
withCredentials([
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password'],
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password'],
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.OC_Credentials}", usernameVariable: 'OC_Username', passwordVariable: 'OC_Password']
|
||||
]) {
|
||||
sh "python3 main.py --mode=InitiateHtml --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} ${mainPythonAllXmlFiles}"
|
||||
@@ -196,7 +214,7 @@ pipeline {
|
||||
if (fileExists(xmlFile)) {
|
||||
try {
|
||||
timeout (time: 60, unit: 'MINUTES') {
|
||||
sh "python3 main.py --mode=TesteNB --eNBIPAddress=${params.eNB_IPAddress} --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --XMLTestFile=${xmlFile} --OCUserName=${OC_Username} --OCPassword=${OC_Password} --OCProjectName=${OC_ProjectName}"
|
||||
sh "python3 main.py --mode=TesteNB --eNBIPAddress=${params.eNB_IPAddress} --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --EPCIPAddress=${params.EPC_IPAddress} --EPCType=${params.EPC_Type} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --XMLTestFile=${xmlFile} --OCUserName=${OC_Username} --OCPassword=${OC_Password} --OCProjectName=${OC_ProjectName}"
|
||||
}
|
||||
} catch (Exception e) {
|
||||
currentBuild.result = 'FAILURE'
|
||||
|
||||
@@ -20,8 +20,8 @@
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
def node = "${params.JenkinsNode}"
|
||||
def resource = "${params.JenkinsResource}"
|
||||
def node = "porcepix"
|
||||
def resource = "CI-NEU-CI"
|
||||
|
||||
pipeline {
|
||||
agent {
|
||||
|
||||
@@ -141,6 +141,18 @@ pipeline {
|
||||
}
|
||||
}
|
||||
|
||||
if (params.EPC_IPAddress == null) {
|
||||
allParametersPresent = false
|
||||
}
|
||||
if (params.EPC_Type == null) {
|
||||
allParametersPresent = false
|
||||
}
|
||||
if (params.EPC_SourceCodePath == null) {
|
||||
allParametersPresent = false
|
||||
}
|
||||
if (params.EPC_Credentials == null) {
|
||||
allParametersPresent = false
|
||||
}
|
||||
if (params.OC_Credentials == null) {
|
||||
allParametersPresent = false
|
||||
}
|
||||
@@ -189,6 +201,7 @@ pipeline {
|
||||
withCredentials([
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password'],
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB1_Credentials}", usernameVariable: 'eNB1_Username', passwordVariable: 'eNB1_Password'],
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password'],
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.OC_Credentials}", usernameVariable: 'OC_Username', passwordVariable: 'OC_Password']
|
||||
]) {
|
||||
sh "python3 main.py --mode=InitiateHtml --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} ${mainPythonAllXmlFiles}"
|
||||
@@ -197,7 +210,7 @@ pipeline {
|
||||
if (fileExists(xmlFile)) {
|
||||
try {
|
||||
timeout (time: 60, unit: 'MINUTES') {
|
||||
sh "python3 main.py --mode=TesteNB --eNBIPAddress=${params.eNB_IPAddress} --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --XMLTestFile=${xmlFile} --OCUserName=${OC_Username} --OCPassword=${OC_Password} --OCProjectName=${OC_ProjectName} --eNB1IPAddress=${params.eNB1_IPAddress} --eNB1UserName=${eNB1_Username} --eNB1Password=${eNB1_Password} --eNB1SourceCodePath=${params.eNB1_SourceCodePath}"
|
||||
sh "python3 main.py --mode=TesteNB --eNBIPAddress=${params.eNB_IPAddress} --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --EPCIPAddress=${params.EPC_IPAddress} --EPCType=${params.EPC_Type} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --XMLTestFile=${xmlFile} --OCUserName=${OC_Username} --OCPassword=${OC_Password} --OCProjectName=${OC_ProjectName} --eNB1IPAddress=${params.eNB1_IPAddress} --eNB1UserName=${eNB1_Username} --eNB1Password=${eNB1_Password} --eNB1SourceCodePath=${params.eNB1_SourceCodePath}"
|
||||
}
|
||||
} catch (Exception e) {
|
||||
currentBuild.result = 'FAILURE'
|
||||
@@ -227,6 +240,10 @@ pipeline {
|
||||
if (fileExists("test_logs_${env.BUILD_ID}.zip")) {
|
||||
archiveArtifacts artifacts: "test_logs_${env.BUILD_ID}.zip"
|
||||
}
|
||||
if (fileExists("test_logs_CN.zip")){
|
||||
sh "mv test_logs_CN.zip test_logs_CN_${env.BUILD_ID}.zip"
|
||||
archiveArtifacts artifacts: "test_logs_CN_${env.BUILD_ID}.zip"
|
||||
}
|
||||
if (fileExists("test_results.html")) {
|
||||
sh "mv test_results.html test_results-${env.JOB_NAME}.html"
|
||||
sh "sed -i -e 's#TEMPLATE_JOB_NAME#${JOB_NAME}#' -e 's@build #TEMPLATE_BUILD_ID@build #${BUILD_ID}@' -e 's#Build-ID: TEMPLATE_BUILD_ID#Build-ID: <a href=\"${BUILD_URL}\">${BUILD_ID}</a>#' -e 's#TEMPLATE_STAGE_NAME#${testStageName}#' test_results-${JOB_NAME}.html"
|
||||
|
||||
@@ -133,6 +133,19 @@ pipeline {
|
||||
}
|
||||
}
|
||||
|
||||
if (params.EPC_IPAddress == null) {
|
||||
allParametersPresent = false
|
||||
}
|
||||
if (params.EPC_Type == null) {
|
||||
allParametersPresent = false
|
||||
}
|
||||
if (params.EPC_SourceCodePath == null) {
|
||||
allParametersPresent = false
|
||||
}
|
||||
if (params.EPC_Credentials == null) {
|
||||
allParametersPresent = false
|
||||
}
|
||||
|
||||
if (params.OC_Credentials == null) {
|
||||
allParametersPresent = false
|
||||
}
|
||||
@@ -180,6 +193,7 @@ pipeline {
|
||||
}
|
||||
withCredentials([
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password'],
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password'],
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.OC_Credentials}", usernameVariable: 'OC_Username', passwordVariable: 'OC_Password']
|
||||
]) {
|
||||
sh "python3 main.py --mode=InitiateHtml --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} ${mainPythonAllXmlFiles}"
|
||||
@@ -188,7 +202,7 @@ pipeline {
|
||||
if (fileExists(xmlFile)) {
|
||||
try {
|
||||
timeout (time: 60, unit: 'MINUTES') {
|
||||
sh "python3 main.py --mode=TesteNB --eNBIPAddress=${params.eNB_IPAddress} --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --XMLTestFile=${xmlFile} --OCUserName=${OC_Username} --OCPassword=${OC_Password} --OCProjectName=${OC_ProjectName}"
|
||||
sh "python3 main.py --mode=TesteNB --eNBIPAddress=${params.eNB_IPAddress} --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --EPCIPAddress=${params.EPC_IPAddress} --EPCType=${params.EPC_Type} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --XMLTestFile=${xmlFile} --OCUserName=${OC_Username} --OCPassword=${OC_Password} --OCProjectName=${OC_ProjectName}"
|
||||
}
|
||||
} catch (Exception e) {
|
||||
currentBuild.result = 'FAILURE'
|
||||
@@ -218,6 +232,10 @@ pipeline {
|
||||
if (fileExists("test_logs_${env.BUILD_ID}.zip")) {
|
||||
archiveArtifacts artifacts: "test_logs_${env.BUILD_ID}.zip"
|
||||
}
|
||||
if (fileExists("test_logs_CN.zip")){
|
||||
sh "mv test_logs_CN.zip test_logs_CN_${env.BUILD_ID}.zip"
|
||||
archiveArtifacts artifacts: "test_logs_CN_${env.BUILD_ID}.zip"
|
||||
}
|
||||
if (fileExists("test_results.html")) {
|
||||
sh "mv test_results.html test_results-${env.JOB_NAME}.html"
|
||||
sh "sed -i -e 's#TEMPLATE_JOB_NAME#${JOB_NAME}#' -e 's@build #TEMPLATE_BUILD_ID@build #${BUILD_ID}@' -e 's#Build-ID: TEMPLATE_BUILD_ID#Build-ID: <a href=\"${BUILD_URL}\">${BUILD_ID}</a>#' -e 's#TEMPLATE_STAGE_NAME#${testStageName}#' test_results-${JOB_NAME}.html"
|
||||
|
||||
@@ -141,6 +141,24 @@ pipeline {
|
||||
}
|
||||
}
|
||||
|
||||
if (params.EPC_IPAddress == null) {
|
||||
allParametersPresent = false
|
||||
} else {
|
||||
if (params.EPC_IPAddress == "none") {
|
||||
doEpcLogCollection = false
|
||||
echo "No EPC collections (ping/iperf/hss/mme/spgw)"
|
||||
}
|
||||
}
|
||||
if (params.EPC_Type == null) {
|
||||
allParametersPresent = false
|
||||
}
|
||||
if (params.EPC_SourceCodePath == null) {
|
||||
allParametersPresent = false
|
||||
}
|
||||
if (params.EPC_Credentials == null) {
|
||||
allParametersPresent = false
|
||||
}
|
||||
|
||||
if (allParametersPresent) {
|
||||
echo "All parameters are present"
|
||||
if (eNB_AllowMergeRequestProcess) {
|
||||
@@ -182,6 +200,7 @@ pipeline {
|
||||
withCredentials([
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password'],
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.UE_Credentials}", usernameVariable: 'UE_Username', passwordVariable: 'UE_Password'],
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password'],
|
||||
]) {
|
||||
sh "python3 main.py --mode=InitiateHtml --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} ${mainPythonAllXmlFiles}"
|
||||
String[] myXmlTestSuite = testXMLFile.split("\\r?\\n")
|
||||
@@ -189,7 +208,7 @@ pipeline {
|
||||
if (fileExists(xmlFile)) {
|
||||
try {
|
||||
timeout (time: 60, unit: 'MINUTES') {
|
||||
sh "python3 main.py --mode=TesteNB --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --UEIPAddress=${params.UE_IPAddress} --UEUserName=${UE_Username} --UEPassword=${UE_Password} --UESourceCodePath=${params.UE_SourceCodePath} --XMLTestFile=${xmlFile}"
|
||||
sh "python3 main.py --mode=TesteNB --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --UEIPAddress=${params.UE_IPAddress} --UEUserName=${UE_Username} --UEPassword=${UE_Password} --UESourceCodePath=${params.UE_SourceCodePath} --EPCIPAddress=${params.EPC_IPAddress} --EPCType=${params.EPC_Type} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --XMLTestFile=${xmlFile}"
|
||||
}
|
||||
} catch (Exception e) {
|
||||
currentBuild.result = 'FAILURE'
|
||||
@@ -290,6 +309,9 @@ pipeline {
|
||||
withCredentials([
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.UE_Credentials}", usernameVariable: 'UE_Username', passwordVariable: 'UE_Password']
|
||||
]) {
|
||||
echo '\u2705 \u001B[32mLog Collection (OAI UE - Run)\u001B[0m'
|
||||
sh "python3 ci-scripts/main.py --mode=LogCollectOAIUE --UEIPAddress=${params.UE_IPAddress} --UEUserName=${UE_Username} --UEPassword=${UE_Password} --UESourceCodePath=${params.UE_SourceCodePath}"
|
||||
|
||||
echo '\u2705 \u001B[32mLog Transfer (OAI UE - Run)\u001B[0m'
|
||||
sh "sshpass -p \'${UE_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${UE_Username}@${params.UE_IPAddress}:${UE_SourceCodePath}/cmake_targets/ue.log.zip ./ue.log.${env.BUILD_ID}.zip || true"
|
||||
}
|
||||
@@ -300,6 +322,111 @@ pipeline {
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Log Collection (Ping)') {
|
||||
when {
|
||||
expression {doEpcLogCollection}
|
||||
}
|
||||
steps {
|
||||
withCredentials([
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password']
|
||||
]) {
|
||||
echo '\u2705 \u001B[32mLog Collection (Ping)\u001B[0m'
|
||||
sh "python3 ci-scripts/main.py --mode=LogCollectPing --EPCIPAddress=${params.EPC_IPAddress} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --EPCType=${params.EPC_Type}"
|
||||
|
||||
echo '\u2705 \u001B[32mLog Transfer (Ping)\u001B[0m'
|
||||
sh "sshpass -p \'${EPC_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${EPC_Username}@${params.EPC_IPAddress}:${EPC_SourceCodePath}/scripts/ping.log.zip ./ping.log.${env.BUILD_ID}.zip || true"
|
||||
}
|
||||
script {
|
||||
if(fileExists("ping.log.${env.BUILD_ID}.zip")) {
|
||||
archiveArtifacts "ping.log.${env.BUILD_ID}.zip"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Log Collection (Iperf)') {
|
||||
when {
|
||||
expression {doEpcLogCollection}
|
||||
}
|
||||
steps {
|
||||
withCredentials([
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password']
|
||||
]) {
|
||||
echo '\u2705 \u001B[32mLog Collection (Iperf)\u001B[0m'
|
||||
sh "python3 ci-scripts/main.py --mode=LogCollectIperf --EPCIPAddress=${params.EPC_IPAddress} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --EPCType=${params.EPC_Type}"
|
||||
|
||||
echo '\u2705 \u001B[32mLog Transfer (Iperf)\u001B[0m'
|
||||
sh "sshpass -p \'${EPC_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${EPC_Username}@${params.EPC_IPAddress}:${EPC_SourceCodePath}/scripts/iperf.log.zip ./iperf.log.${env.BUILD_ID}.zip || true"
|
||||
}
|
||||
script {
|
||||
if(fileExists("iperf.log.${env.BUILD_ID}.zip")) {
|
||||
archiveArtifacts "iperf.log.${env.BUILD_ID}.zip"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Log Collection (SPGW)') {
|
||||
when {
|
||||
expression {doEpcLogCollection}
|
||||
}
|
||||
steps {
|
||||
withCredentials([
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password']
|
||||
]) {
|
||||
echo '\u2705 \u001B[32mLog Collection (SPGW)\u001B[0m'
|
||||
sh "python3 ci-scripts/main.py --mode=LogCollectSPGW --EPCIPAddress=${params.EPC_IPAddress} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --EPCType=${params.EPC_Type}"
|
||||
|
||||
echo '\u2705 \u001B[32mLog Transfer (SPGW)\u001B[0m'
|
||||
sh "sshpass -p \'${EPC_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${EPC_Username}@${params.EPC_IPAddress}:${EPC_SourceCodePath}/scripts/spgw.log.zip ./spgw.log.${env.BUILD_ID}.zip || true"
|
||||
}
|
||||
script {
|
||||
if(fileExists("spgw.log.${env.BUILD_ID}.zip")) {
|
||||
archiveArtifacts "spgw.log.${env.BUILD_ID}.zip"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Log Collection (MME)') {
|
||||
when {
|
||||
expression {doEpcLogCollection}
|
||||
}
|
||||
steps {
|
||||
withCredentials([
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password']
|
||||
]) {
|
||||
echo '\u2705 \u001B[32mLog Collection (MME)\u001B[0m'
|
||||
sh "python3 ci-scripts/main.py --mode=LogCollectMME --EPCIPAddress=${params.EPC_IPAddress} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --EPCType=${params.EPC_Type}"
|
||||
|
||||
echo '\u2705 \u001B[32mLog Transfer (MME)\u001B[0m'
|
||||
sh "sshpass -p \'${EPC_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${EPC_Username}@${params.EPC_IPAddress}:${EPC_SourceCodePath}/scripts/mme.log.zip ./mme.log.${env.BUILD_ID}.zip || true"
|
||||
}
|
||||
script {
|
||||
if(fileExists("mme.log.${env.BUILD_ID}.zip")) {
|
||||
archiveArtifacts "mme.log.${env.BUILD_ID}.zip"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Log Collection (HSS)') {
|
||||
when {
|
||||
expression {doEpcLogCollection}
|
||||
}
|
||||
steps {
|
||||
withCredentials([
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password']
|
||||
]) {
|
||||
echo '\u2705 \u001B[32mLog Collection (HSS)\u001B[0m'
|
||||
sh "python3 ci-scripts/main.py --mode=LogCollectHSS --EPCIPAddress=${params.EPC_IPAddress} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --EPCType=${params.EPC_Type}"
|
||||
|
||||
echo '\u2705 \u001B[32mLog Transfer (HSS)\u001B[0m'
|
||||
sh "sshpass -p \'${EPC_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${EPC_Username}@${params.EPC_IPAddress}:${EPC_SourceCodePath}/scripts/hss.log.zip ./hss.log.${env.BUILD_ID}.zip || true"
|
||||
}
|
||||
script {
|
||||
if(fileExists("hss.log.${env.BUILD_ID}.zip")) {
|
||||
archiveArtifacts "hss.log.${env.BUILD_ID}.zip"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -143,6 +143,19 @@ pipeline {
|
||||
}
|
||||
}
|
||||
|
||||
if (params.EPC_IPAddress == null) {
|
||||
allParametersPresent = false
|
||||
}
|
||||
if (params.EPC_Type == null) {
|
||||
allParametersPresent = false
|
||||
}
|
||||
if (params.EPC_SourceCodePath == null) {
|
||||
allParametersPresent = false
|
||||
}
|
||||
if (params.EPC_Credentials == null) {
|
||||
allParametersPresent = false
|
||||
}
|
||||
|
||||
if (allParametersPresent) {
|
||||
echo "All parameters are present"
|
||||
if (eNB_AllowMergeRequestProcess) {
|
||||
@@ -185,6 +198,7 @@ pipeline {
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password'],
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB1_Credentials}", usernameVariable: 'eNB1_Username', passwordVariable: 'eNB1_Password'],
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB2_Credentials}", usernameVariable: 'eNB2_Username', passwordVariable: 'eNB2_Password'],
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password'],
|
||||
]) {
|
||||
sh "python3 main.py --mode=InitiateHtml --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} ${mainPythonAllXmlFiles}"
|
||||
String[] myXmlTestSuite = testXMLFile.split("\\r?\\n")
|
||||
@@ -192,7 +206,7 @@ pipeline {
|
||||
if (fileExists(xmlFile)) {
|
||||
try {
|
||||
timeout (time: 60, unit: 'MINUTES') {
|
||||
sh "python3 main.py --mode=TesteNB --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --eNB1IPAddress=${params.eNB1_IPAddress} --eNB1UserName=${eNB1_Username} --eNB1Password=${eNB1_Password} --eNB1SourceCodePath=${params.eNB1_SourceCodePath} --eNB2IPAddress=${params.eNB2_IPAddress} --eNB2UserName=${eNB2_Username} --eNB2Password=${eNB2_Password} --eNB2SourceCodePath=${params.eNB2_SourceCodePath} --XMLTestFile=${xmlFile}"
|
||||
sh "python3 main.py --mode=TesteNB --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --eNB1IPAddress=${params.eNB1_IPAddress} --eNB1UserName=${eNB1_Username} --eNB1Password=${eNB1_Password} --eNB1SourceCodePath=${params.eNB1_SourceCodePath} --eNB2IPAddress=${params.eNB2_IPAddress} --eNB2UserName=${eNB2_Username} --eNB2Password=${eNB2_Password} --eNB2SourceCodePath=${params.eNB2_SourceCodePath} --EPCIPAddress=${params.EPC_IPAddress} --EPCType=${params.EPC_Type} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --XMLTestFile=${xmlFile}"
|
||||
}
|
||||
} catch (Exception e) {
|
||||
currentBuild.result = 'FAILURE'
|
||||
@@ -218,6 +232,48 @@ pipeline {
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Terminate SPGW') {
|
||||
// Bypassing this stage if EPC server is not defined
|
||||
when {
|
||||
expression { params.EPC_IPAddress != "none" }
|
||||
}
|
||||
steps {
|
||||
echo '\u2705 \u001B[32mTerminate SPGW\u001B[0m'
|
||||
withCredentials([
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password']
|
||||
]) {
|
||||
sh "python3 ci-scripts/main.py --mode=TerminateSPGW --EPCIPAddress=${params.EPC_IPAddress} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCType=${params.EPC_Type} --EPCSourceCodePath=${params.EPC_SourceCodePath}"
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Terminate MME') {
|
||||
// Bypassing this stage if EPC server is not defined
|
||||
when {
|
||||
expression { params.EPC_IPAddress != "none" }
|
||||
}
|
||||
steps {
|
||||
echo '\u2705 \u001B[32mTerminate MME\u001B[0m'
|
||||
withCredentials([
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password']
|
||||
]) {
|
||||
sh "python3 ci-scripts/main.py --mode=TerminateMME --EPCIPAddress=${params.EPC_IPAddress} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCType=${params.EPC_Type} --EPCSourceCodePath=${params.EPC_SourceCodePath}"
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Terminate HSS') {
|
||||
// Bypassing this stage if EPC server is not defined
|
||||
when {
|
||||
expression { params.EPC_IPAddress != "none" }
|
||||
}
|
||||
steps {
|
||||
echo '\u2705 \u001B[32mTerminate HSS\u001B[0m'
|
||||
withCredentials([
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password']
|
||||
]) {
|
||||
sh "python3 ci-scripts/main.py --mode=TerminateHSS --EPCIPAddress=${params.EPC_IPAddress} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCType=${params.EPC_Type} --EPCSourceCodePath=${params.EPC_SourceCodePath}"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Log Collection') {
|
||||
@@ -263,6 +319,116 @@ pipeline {
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Log Collection (SPGW)') {
|
||||
// Bypassing this stage if EPC server is not defined
|
||||
when {
|
||||
expression { params.EPC_IPAddress != "none" }
|
||||
}
|
||||
steps {
|
||||
withCredentials([
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password']
|
||||
]) {
|
||||
echo '\u2705 \u001B[32mLog Collection (SPGW)\u001B[0m'
|
||||
sh "python3 ci-scripts/main.py --mode=LogCollectSPGW --EPCIPAddress=${params.EPC_IPAddress} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --EPCType=${params.EPC_Type}"
|
||||
|
||||
echo '\u2705 \u001B[32mLog Transfer (SPGW)\u001B[0m'
|
||||
sh "sshpass -p \'${EPC_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${EPC_Username}@${params.EPC_IPAddress}:${EPC_SourceCodePath}/scripts/spgw.log.zip ./spgw.log.${env.BUILD_ID}.zip || true"
|
||||
}
|
||||
script {
|
||||
if(fileExists("spgw.log.${env.BUILD_ID}.zip")) {
|
||||
archiveArtifacts "spgw.log.${env.BUILD_ID}.zip"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Log Collection (MME)') {
|
||||
// Bypassing this stage if EPC server is not defined
|
||||
when {
|
||||
expression { params.EPC_IPAddress != "none" }
|
||||
}
|
||||
steps {
|
||||
withCredentials([
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password']
|
||||
]) {
|
||||
echo '\u2705 \u001B[32mLog Collection (MME)\u001B[0m'
|
||||
sh "python3 ci-scripts/main.py --mode=LogCollectMME --EPCIPAddress=${params.EPC_IPAddress} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --EPCType=${params.EPC_Type}"
|
||||
|
||||
echo '\u2705 \u001B[32mLog Transfer (MME)\u001B[0m'
|
||||
sh "sshpass -p \'${EPC_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${EPC_Username}@${params.EPC_IPAddress}:${EPC_SourceCodePath}/scripts/mme.log.zip ./mme.log.${env.BUILD_ID}.zip || true"
|
||||
}
|
||||
script {
|
||||
if(fileExists("mme.log.${env.BUILD_ID}.zip")) {
|
||||
archiveArtifacts "mme.log.${env.BUILD_ID}.zip"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Log Collection (HSS)') {
|
||||
// Bypassing this stage if EPC server is not defined
|
||||
when {
|
||||
expression { params.EPC_IPAddress != "none" }
|
||||
}
|
||||
steps {
|
||||
withCredentials([
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password']
|
||||
]) {
|
||||
echo '\u2705 \u001B[32mLog Collection (HSS)\u001B[0m'
|
||||
sh "python3 ci-scripts/main.py --mode=LogCollectHSS --EPCIPAddress=${params.EPC_IPAddress} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --EPCType=${params.EPC_Type}"
|
||||
|
||||
echo '\u2705 \u001B[32mLog Transfer (HSS)\u001B[0m'
|
||||
sh "sshpass -p \'${EPC_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${EPC_Username}@${params.EPC_IPAddress}:${EPC_SourceCodePath}/scripts/hss.log.zip ./hss.log.${env.BUILD_ID}.zip || true"
|
||||
}
|
||||
script {
|
||||
if(fileExists("hss.log.${env.BUILD_ID}.zip")) {
|
||||
archiveArtifacts "hss.log.${env.BUILD_ID}.zip"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Log Collection (Ping)') {
|
||||
// Bypassing this stage if EPC server is not defined
|
||||
when {
|
||||
expression { params.EPC_IPAddress != "none" }
|
||||
}
|
||||
steps {
|
||||
withCredentials([
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password']
|
||||
]) {
|
||||
echo '\u2705 \u001B[32mLog Collection (Ping)\u001B[0m'
|
||||
sh "python3 ci-scripts/main.py --mode=LogCollectPing --EPCIPAddress=${params.EPC_IPAddress} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --EPCType=${params.EPC_Type}"
|
||||
|
||||
echo '\u2705 \u001B[32mLog Transfer (Ping)\u001B[0m'
|
||||
sh "sshpass -p \'${EPC_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${EPC_Username}@${params.EPC_IPAddress}:${EPC_SourceCodePath}/scripts/ping.log.zip ./ping.log.${env.BUILD_ID}.zip || true"
|
||||
}
|
||||
script {
|
||||
if(fileExists("ping.log.${env.BUILD_ID}.zip")) {
|
||||
archiveArtifacts "ping.log.${env.BUILD_ID}.zip"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Log Collection (Iperf)') {
|
||||
// Bypassing this stage if EPC server is not defined
|
||||
when {
|
||||
expression { params.EPC_IPAddress != "none" }
|
||||
}
|
||||
steps {
|
||||
withCredentials([
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password']
|
||||
]) {
|
||||
echo '\u2705 \u001B[32mLog Collection (Iperf)\u001B[0m'
|
||||
sh "python3 ci-scripts/main.py --mode=LogCollectIperf --EPCIPAddress=${params.EPC_IPAddress} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --EPCType=${params.EPC_Type}"
|
||||
|
||||
echo '\u2705 \u001B[32mLog Transfer (Iperf)\u001B[0m'
|
||||
sh "sshpass -p \'${EPC_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${EPC_Username}@${params.EPC_IPAddress}:${EPC_SourceCodePath}/scripts/iperf.log.zip ./iperf.log.${env.BUILD_ID}.zip || true"
|
||||
}
|
||||
script {
|
||||
if(fileExists("iperf.log.${env.BUILD_ID}.zip")) {
|
||||
archiveArtifacts "iperf.log.${env.BUILD_ID}.zip"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -154,6 +154,19 @@ pipeline {
|
||||
}
|
||||
}
|
||||
|
||||
if (params.EPC_IPAddress == null) {
|
||||
allParametersPresent = false
|
||||
}
|
||||
if (params.EPC_Type == null) {
|
||||
allParametersPresent = false
|
||||
}
|
||||
if (params.EPC_SourceCodePath == null) {
|
||||
allParametersPresent = false
|
||||
}
|
||||
if (params.EPC_Credentials == null) {
|
||||
allParametersPresent = false
|
||||
}
|
||||
|
||||
if (allParametersPresent) {
|
||||
echo "All parameters are present"
|
||||
if (eNB_AllowMergeRequestProcess) {
|
||||
@@ -196,6 +209,7 @@ pipeline {
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password'],
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB1_Credentials}", usernameVariable: 'eNB1_Username', passwordVariable: 'eNB1_Password'],
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB2_Credentials}", usernameVariable: 'eNB2_Username', passwordVariable: 'eNB2_Password'],
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password'],
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.UE_Credentials}", usernameVariable: 'UE_Username', passwordVariable: 'UE_Password']
|
||||
]) {
|
||||
sh "python3 main.py --mode=InitiateHtml --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} ${mainPythonAllXmlFiles}"
|
||||
@@ -204,7 +218,7 @@ pipeline {
|
||||
if (fileExists(xmlFile)) {
|
||||
try {
|
||||
timeout (time: 60, unit: 'MINUTES') {
|
||||
sh "python3 main.py --mode=TesteNB --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --eNB1IPAddress=${params.eNB1_IPAddress} --eNB1UserName=${eNB1_Username} --eNB1Password=${eNB1_Password} --eNB1SourceCodePath=${params.eNB1_SourceCodePath} --eNB2IPAddress=${params.eNB2_IPAddress} --eNB2UserName=${eNB2_Username} --eNB2Password=${eNB2_Password} --eNB2SourceCodePath=${params.eNB2_SourceCodePath} --UEIPAddress=${params.UE_IPAddress} --UEUserName=${UE_Username} --UEPassword=${UE_Password} --UESourceCodePath=${params.UE_SourceCodePath} --XMLTestFile=${xmlFile}"
|
||||
sh "python3 main.py --mode=TesteNB --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --eNB1IPAddress=${params.eNB1_IPAddress} --eNB1UserName=${eNB1_Username} --eNB1Password=${eNB1_Password} --eNB1SourceCodePath=${params.eNB1_SourceCodePath} --eNB2IPAddress=${params.eNB2_IPAddress} --eNB2UserName=${eNB2_Username} --eNB2Password=${eNB2_Password} --eNB2SourceCodePath=${params.eNB2_SourceCodePath} --UEIPAddress=${params.UE_IPAddress} --UEUserName=${UE_Username} --UEPassword=${UE_Password} --UESourceCodePath=${params.UE_SourceCodePath} --EPCIPAddress=${params.EPC_IPAddress} --EPCType=${params.EPC_Type} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --XMLTestFile=${xmlFile}"
|
||||
}
|
||||
} catch (Exception e) {
|
||||
currentBuild.result = 'FAILURE'
|
||||
@@ -279,6 +293,9 @@ pipeline {
|
||||
withCredentials([
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.UE_Credentials}", usernameVariable: 'UE_Username', passwordVariable: 'UE_Password']
|
||||
]) {
|
||||
echo '\u2705 \u001B[32mLog Collection (OAI UE - Run)\u001B[0m'
|
||||
sh "python3 ci-scripts/main.py --mode=LogCollectOAIUE --UEIPAddress=${params.UE_IPAddress} --UEUserName=${UE_Username} --UEPassword=${UE_Password} --UESourceCodePath=${params.UE_SourceCodePath}"
|
||||
|
||||
echo '\u2705 \u001B[32mLog Transfer (OAI UE - Run)\u001B[0m'
|
||||
sh "sshpass -p \'${UE_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${UE_Username}@${params.UE_IPAddress}:${UE_SourceCodePath}/cmake_targets/ue.log.zip ./ue.log.${env.BUILD_ID}.zip || true"
|
||||
}
|
||||
@@ -289,6 +306,55 @@ pipeline {
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Log Collection (CN)') {
|
||||
// Bypassing this stage if EPC server is not defined
|
||||
when {
|
||||
expression { params.EPC_IPAddress != "none" }
|
||||
}
|
||||
steps {
|
||||
script {
|
||||
withCredentials([
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password']
|
||||
]) {
|
||||
echo '\u2705 \u001B[32mLog Collection (HSS)\u001B[0m'
|
||||
sh "python3 ci-scripts/main.py --mode=LogCollectHSS --EPCIPAddress=${params.EPC_IPAddress} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --EPCType=${params.EPC_Type}"
|
||||
if (params.EPC_Type != 'OAICN5G') {
|
||||
sh "sshpass -p \'${EPC_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${EPC_Username}@${params.EPC_IPAddress}:${EPC_SourceCodePath}/scripts/hss.log.zip ./hss.log.${env.BUILD_ID}.zip || true"
|
||||
}
|
||||
echo '\u2705 \u001B[32mLog Collection (MME or AMF)\u001B[0m'
|
||||
sh "python3 ci-scripts/main.py --mode=LogCollectMME --EPCIPAddress=${params.EPC_IPAddress} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --EPCType=${params.EPC_Type}"
|
||||
if (params.EPC_Type == 'OAICN5G') {
|
||||
sh "sshpass -p \'${EPC_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${EPC_Username}@${params.EPC_IPAddress}:${EPC_SourceCodePath}/scripts/mme.log.zip ./amf.log.${env.BUILD_ID}.zip || true"
|
||||
} else {
|
||||
sh "sshpass -p \'${EPC_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${EPC_Username}@${params.EPC_IPAddress}:${EPC_SourceCodePath}/scripts/mme.log.zip ./mme.log.${env.BUILD_ID}.zip || true"
|
||||
}
|
||||
echo '\u2705 \u001B[32mLog Collection (SPGW or SMF/UPF)\u001B[0m'
|
||||
sh "python3 ci-scripts/main.py --mode=LogCollectSPGW --EPCIPAddress=${params.EPC_IPAddress} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --EPCType=${params.EPC_Type}"
|
||||
if (params.EPC_Type == 'OAICN5G') {
|
||||
sh "sshpass -p \'${EPC_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${EPC_Username}@${params.EPC_IPAddress}:${EPC_SourceCodePath}/scripts/spgw.log.zip ./smf-upf.log.${env.BUILD_ID}.zip || true"
|
||||
} else {
|
||||
sh "sshpass -p \'${EPC_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${EPC_Username}@${params.EPC_IPAddress}:${EPC_SourceCodePath}/scripts/spgw.log.zip ./spgw.log.${env.BUILD_ID}.zip || true"
|
||||
}
|
||||
}
|
||||
if(fileExists("hss.log.${env.BUILD_ID}.zip")) {
|
||||
archiveArtifacts "hss.log.${env.BUILD_ID}.zip"
|
||||
}
|
||||
if(fileExists("mme.log.${env.BUILD_ID}.zip")) {
|
||||
archiveArtifacts "mme.log.${env.BUILD_ID}.zip"
|
||||
}
|
||||
if(fileExists("spgw.log.${env.BUILD_ID}.zip")) {
|
||||
archiveArtifacts "spgw.log.${env.BUILD_ID}.zip"
|
||||
}
|
||||
if(fileExists("amf.log.${env.BUILD_ID}.zip")) {
|
||||
archiveArtifacts "amf.log.${env.BUILD_ID}.zip"
|
||||
}
|
||||
if(fileExists("smf-upf.log.${env.BUILD_ID}.zip")) {
|
||||
archiveArtifacts "smf-upf.log.${env.BUILD_ID}.zip"
|
||||
}
|
||||
echo '\u2705 \u001B[32mLog Collection for CoreNetwork Done!\u001B[0m'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -137,6 +137,19 @@ pipeline {
|
||||
}
|
||||
}
|
||||
|
||||
if (params.EPC_IPAddress == null) {
|
||||
allParametersPresent = false
|
||||
}
|
||||
if (params.EPC_Type == null) {
|
||||
allParametersPresent = false
|
||||
}
|
||||
if (params.EPC_SourceCodePath == null) {
|
||||
allParametersPresent = false
|
||||
}
|
||||
if (params.EPC_Credentials == null) {
|
||||
allParametersPresent = false
|
||||
}
|
||||
|
||||
if (params.Flexric_Tag != null) {
|
||||
echo "This pipeline is configured to run with a FlexRIC deployment."
|
||||
echo "Appending FlexRicTag option to the list of options"
|
||||
@@ -183,6 +196,7 @@ pipeline {
|
||||
}
|
||||
withCredentials([
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password'],
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password'],
|
||||
]) {
|
||||
sh "python3 main.py --mode=InitiateHtml --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} ${flexricOption} ${mainPythonAllXmlFiles}"
|
||||
String[] myXmlTestSuite = testXMLFile.split("\\r?\\n")
|
||||
@@ -190,7 +204,7 @@ pipeline {
|
||||
if (fileExists(xmlFile)) {
|
||||
try {
|
||||
timeout (time: 60, unit: 'MINUTES') {
|
||||
sh "python3 main.py --mode=TesteNB --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} ${flexricOption} --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --XMLTestFile=${xmlFile}"
|
||||
sh "python3 main.py --mode=TesteNB --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} ${flexricOption} --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --EPCIPAddress=${params.EPC_IPAddress} --EPCType=${params.EPC_Type} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --XMLTestFile=${xmlFile}"
|
||||
}
|
||||
} catch (Exception e) {
|
||||
currentBuild.result = 'FAILURE'
|
||||
@@ -223,6 +237,69 @@ pipeline {
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Terminate SPGW') {
|
||||
// Bypassing this stage if EPC server is not defined
|
||||
when {
|
||||
expression { params.EPC_IPAddress != "none" }
|
||||
}
|
||||
steps {
|
||||
echo '\u2705 \u001B[32mTerminate SPGW\u001B[0m'
|
||||
withCredentials([
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password']
|
||||
]) {
|
||||
sh "python3 ci-scripts/main.py --mode=TerminateSPGW --EPCIPAddress=${params.EPC_IPAddress} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCType=${params.EPC_Type} --EPCSourceCodePath=${params.EPC_SourceCodePath}"
|
||||
}
|
||||
}
|
||||
post {
|
||||
success {
|
||||
script {
|
||||
termStatusArray[termSPGW] = true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Terminate MME') {
|
||||
// Bypassing this stage if EPC server is not defined
|
||||
when {
|
||||
expression { params.EPC_IPAddress != "none" }
|
||||
}
|
||||
steps {
|
||||
echo '\u2705 \u001B[32mTerminate MME\u001B[0m'
|
||||
withCredentials([
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password']
|
||||
]) {
|
||||
sh "python3 ci-scripts/main.py --mode=TerminateMME --EPCIPAddress=${params.EPC_IPAddress} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCType=${params.EPC_Type} --EPCSourceCodePath=${params.EPC_SourceCodePath}"
|
||||
}
|
||||
}
|
||||
post {
|
||||
success {
|
||||
script {
|
||||
termStatusArray[termMME] = true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Terminate HSS') {
|
||||
// Bypassing this stage if EPC server is not defined
|
||||
when {
|
||||
expression { params.EPC_IPAddress != "none" }
|
||||
}
|
||||
steps {
|
||||
echo '\u2705 \u001B[32mTerminate HSS\u001B[0m'
|
||||
withCredentials([
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password']
|
||||
]) {
|
||||
sh "python3 ci-scripts/main.py --mode=TerminateHSS --EPCIPAddress=${params.EPC_IPAddress} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCType=${params.EPC_Type} --EPCSourceCodePath=${params.EPC_SourceCodePath}"
|
||||
}
|
||||
}
|
||||
post {
|
||||
success {
|
||||
script {
|
||||
termStatusArray[termHSS] = true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Log Collection') {
|
||||
@@ -268,6 +345,116 @@ pipeline {
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Log Collection (SPGW)') {
|
||||
// Bypassing this stage if EPC server is not defined
|
||||
when {
|
||||
expression { params.EPC_IPAddress != "none" }
|
||||
}
|
||||
steps {
|
||||
withCredentials([
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password']
|
||||
]) {
|
||||
echo '\u2705 \u001B[32mLog Collection (SPGW)\u001B[0m'
|
||||
sh "python3 ci-scripts/main.py --mode=LogCollectSPGW --EPCIPAddress=${params.EPC_IPAddress} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --EPCType=${params.EPC_Type}"
|
||||
|
||||
echo '\u2705 \u001B[32mLog Transfer (SPGW)\u001B[0m'
|
||||
sh "sshpass -p \'${EPC_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${EPC_Username}@${params.EPC_IPAddress}:${EPC_SourceCodePath}/scripts/spgw.log.zip ./spgw.log.${env.BUILD_ID}.zip || true"
|
||||
}
|
||||
script {
|
||||
if(fileExists("spgw.log.${env.BUILD_ID}.zip")) {
|
||||
archiveArtifacts "spgw.log.${env.BUILD_ID}.zip"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Log Collection (MME)') {
|
||||
// Bypassing this stage if EPC server is not defined
|
||||
when {
|
||||
expression { params.EPC_IPAddress != "none" }
|
||||
}
|
||||
steps {
|
||||
withCredentials([
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password']
|
||||
]) {
|
||||
echo '\u2705 \u001B[32mLog Collection (MME)\u001B[0m'
|
||||
sh "python3 ci-scripts/main.py --mode=LogCollectMME --EPCIPAddress=${params.EPC_IPAddress} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --EPCType=${params.EPC_Type}"
|
||||
|
||||
echo '\u2705 \u001B[32mLog Transfer (MME)\u001B[0m'
|
||||
sh "sshpass -p \'${EPC_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${EPC_Username}@${params.EPC_IPAddress}:${EPC_SourceCodePath}/scripts/mme.log.zip ./mme.log.${env.BUILD_ID}.zip || true"
|
||||
}
|
||||
script {
|
||||
if(fileExists("mme.log.${env.BUILD_ID}.zip")) {
|
||||
archiveArtifacts "mme.log.${env.BUILD_ID}.zip"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Log Collection (HSS)') {
|
||||
// Bypassing this stage if EPC server is not defined
|
||||
when {
|
||||
expression { params.EPC_IPAddress != "none" }
|
||||
}
|
||||
steps {
|
||||
withCredentials([
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password']
|
||||
]) {
|
||||
echo '\u2705 \u001B[32mLog Collection (HSS)\u001B[0m'
|
||||
sh "python3 ci-scripts/main.py --mode=LogCollectHSS --EPCIPAddress=${params.EPC_IPAddress} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --EPCType=${params.EPC_Type}"
|
||||
|
||||
echo '\u2705 \u001B[32mLog Transfer (HSS)\u001B[0m'
|
||||
sh "sshpass -p \'${EPC_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${EPC_Username}@${params.EPC_IPAddress}:${EPC_SourceCodePath}/scripts/hss.log.zip ./hss.log.${env.BUILD_ID}.zip || true"
|
||||
}
|
||||
script {
|
||||
if(fileExists("hss.log.${env.BUILD_ID}.zip")) {
|
||||
archiveArtifacts "hss.log.${env.BUILD_ID}.zip"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Log Collection (Ping)') {
|
||||
// Bypassing this stage if EPC server is not defined
|
||||
when {
|
||||
expression { params.EPC_IPAddress != "none" }
|
||||
}
|
||||
steps {
|
||||
withCredentials([
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password']
|
||||
]) {
|
||||
echo '\u2705 \u001B[32mLog Collection (Ping)\u001B[0m'
|
||||
sh "python3 ci-scripts/main.py --mode=LogCollectPing --EPCIPAddress=${params.EPC_IPAddress} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --EPCType=${params.EPC_Type}"
|
||||
|
||||
echo '\u2705 \u001B[32mLog Transfer (Ping)\u001B[0m'
|
||||
sh "sshpass -p \'${EPC_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${EPC_Username}@${params.EPC_IPAddress}:${EPC_SourceCodePath}/scripts/ping.log.zip ./ping.log.${env.BUILD_ID}.zip || true"
|
||||
}
|
||||
script {
|
||||
if(fileExists("ping.log.${env.BUILD_ID}.zip")) {
|
||||
archiveArtifacts "ping.log.${env.BUILD_ID}.zip"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Log Collection (Iperf)') {
|
||||
// Bypassing this stage if EPC server is not defined
|
||||
when {
|
||||
expression { params.EPC_IPAddress != "none" }
|
||||
}
|
||||
steps {
|
||||
withCredentials([
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password']
|
||||
]) {
|
||||
echo '\u2705 \u001B[32mLog Collection (Iperf)\u001B[0m'
|
||||
sh "python3 ci-scripts/main.py --mode=LogCollectIperf --EPCIPAddress=${params.EPC_IPAddress} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --EPCType=${params.EPC_Type}"
|
||||
|
||||
echo '\u2705 \u001B[32mLog Transfer (Iperf)\u001B[0m'
|
||||
sh "sshpass -p \'${EPC_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${EPC_Username}@${params.EPC_IPAddress}:${EPC_SourceCodePath}/scripts/iperf.log.zip ./iperf.log.${env.BUILD_ID}.zip || true"
|
||||
}
|
||||
script {
|
||||
if(fileExists("iperf.log.${env.BUILD_ID}.zip")) {
|
||||
archiveArtifacts "iperf.log.${env.BUILD_ID}.zip"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -297,6 +484,27 @@ pipeline {
|
||||
sh "python3 ci-scripts/main.py --mode=TerminateeNB --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password}"
|
||||
}
|
||||
}
|
||||
if ((!termStatusArray[termSPGW]) && (params.EPC_IPAddress != "none")) {
|
||||
withCredentials([
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password']
|
||||
]) {
|
||||
sh "python3 ci-scripts/main.py --mode=TerminateSPGW --EPCIPAddress=${params.EPC_IPAddress} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCType=${params.EPC_Type} --EPCSourceCodePath=${params.EPC_SourceCodePath}"
|
||||
}
|
||||
}
|
||||
if ((!termStatusArray[termMME]) && (params.EPC_IPAddress != "none")) {
|
||||
withCredentials([
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password']
|
||||
]) {
|
||||
sh "python3 ci-scripts/main.py --mode=TerminateMME --EPCIPAddress=${params.EPC_IPAddress} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCType=${params.EPC_Type} --EPCSourceCodePath=${params.EPC_SourceCodePath}"
|
||||
}
|
||||
}
|
||||
if ((!termStatusArray[termHSS]) && (params.EPC_IPAddress != "none")) {
|
||||
withCredentials([
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password']
|
||||
]) {
|
||||
sh "python3 ci-scripts/main.py --mode=TerminateHSS --EPCIPAddress=${params.EPC_IPAddress} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCType=${params.EPC_Type} --EPCSourceCodePath=${params.EPC_SourceCodePath}"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,27 +41,23 @@ import constants as CONST
|
||||
#-----------------------------------------------------------
|
||||
|
||||
|
||||
def ArgsParse(argvs,CiTestObj,RAN,HTML,CONTAINERS,HELP,SCA,PHYSIM,CLUSTER):
|
||||
def ArgsParse(argvs,CiTestObj,RAN,HTML,EPC,CONTAINERS,HELP,SCA,PHYSIM,CLUSTER):
|
||||
|
||||
|
||||
py_param_file_present = False
|
||||
py_params={}
|
||||
|
||||
force_local = False
|
||||
while len(argvs) > 1:
|
||||
myArgv = argvs.pop(1) # 0th is this file's name
|
||||
|
||||
#--help
|
||||
if re.match(r'^\-\-help$', myArgv, re.IGNORECASE):
|
||||
if re.match('^\-\-help$', myArgv, re.IGNORECASE):
|
||||
HELP.GenericHelp(CONST.Version)
|
||||
sys.exit(0)
|
||||
if re.match(r'^\-\-local$', myArgv, re.IGNORECASE):
|
||||
force_local = True
|
||||
|
||||
|
||||
#--apply=<filename> as parameters file, to replace inline parameters
|
||||
elif re.match(r'^\-\-Apply=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match(r'^\-\-Apply=(.+)$', myArgv, re.IGNORECASE)
|
||||
elif re.match('^\-\-Apply=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match('^\-\-Apply=(.+)$', myArgv, re.IGNORECASE)
|
||||
py_params_file = matchReg.group(1)
|
||||
with open(py_params_file,'r') as file:
|
||||
# The FullLoader parameter handles the conversion from YAML
|
||||
@@ -71,14 +67,14 @@ def ArgsParse(argvs,CiTestObj,RAN,HTML,CONTAINERS,HELP,SCA,PHYSIM,CLUSTER):
|
||||
#AssignParams(py_params) #to be uncommented once validated
|
||||
|
||||
#consider inline parameters
|
||||
elif re.match(r'^\-\-mode=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match(r'^\-\-mode=(.+)$', myArgv, re.IGNORECASE)
|
||||
elif re.match('^\-\-mode=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match('^\-\-mode=(.+)$', myArgv, re.IGNORECASE)
|
||||
mode = matchReg.group(1)
|
||||
elif re.match(r'^\-\-eNBRepository=(.+)$|^\-\-ranRepository(.+)$', myArgv, re.IGNORECASE):
|
||||
if re.match(r'^\-\-eNBRepository=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match(r'^\-\-eNBRepository=(.+)$', myArgv, re.IGNORECASE)
|
||||
elif re.match('^\-\-eNBRepository=(.+)$|^\-\-ranRepository(.+)$', myArgv, re.IGNORECASE):
|
||||
if re.match('^\-\-eNBRepository=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match('^\-\-eNBRepository=(.+)$', myArgv, re.IGNORECASE)
|
||||
else:
|
||||
matchReg = re.match(r'^\-\-ranRepository=(.+)$', myArgv, re.IGNORECASE)
|
||||
matchReg = re.match('^\-\-ranRepository=(.+)$', myArgv, re.IGNORECASE)
|
||||
CiTestObj.ranRepository = matchReg.group(1)
|
||||
RAN.ranRepository=matchReg.group(1)
|
||||
HTML.ranRepository=matchReg.group(1)
|
||||
@@ -86,11 +82,11 @@ def ArgsParse(argvs,CiTestObj,RAN,HTML,CONTAINERS,HELP,SCA,PHYSIM,CLUSTER):
|
||||
SCA.ranRepository=matchReg.group(1)
|
||||
PHYSIM.ranRepository=matchReg.group(1)
|
||||
CLUSTER.ranRepository=matchReg.group(1)
|
||||
elif re.match(r'^\-\-eNB_AllowMerge=(.+)$|^\-\-ranAllowMerge=(.+)$', myArgv, re.IGNORECASE):
|
||||
if re.match(r'^\-\-eNB_AllowMerge=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match(r'^\-\-eNB_AllowMerge=(.+)$', myArgv, re.IGNORECASE)
|
||||
elif re.match('^\-\-eNB_AllowMerge=(.+)$|^\-\-ranAllowMerge=(.+)$', myArgv, re.IGNORECASE):
|
||||
if re.match('^\-\-eNB_AllowMerge=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match('^\-\-eNB_AllowMerge=(.+)$', myArgv, re.IGNORECASE)
|
||||
else:
|
||||
matchReg = re.match(r'^\-\-ranAllowMerge=(.+)$', myArgv, re.IGNORECASE)
|
||||
matchReg = re.match('^\-\-ranAllowMerge=(.+)$', myArgv, re.IGNORECASE)
|
||||
doMerge = matchReg.group(1)
|
||||
if ((doMerge == 'true') or (doMerge == 'True')):
|
||||
CiTestObj.ranAllowMerge = True
|
||||
@@ -100,11 +96,11 @@ def ArgsParse(argvs,CiTestObj,RAN,HTML,CONTAINERS,HELP,SCA,PHYSIM,CLUSTER):
|
||||
SCA.ranAllowMerge=True
|
||||
PHYSIM.ranAllowMerge=True
|
||||
CLUSTER.ranAllowMerge=True
|
||||
elif re.match(r'^\-\-eNBBranch=(.+)$|^\-\-ranBranch=(.+)$', myArgv, re.IGNORECASE):
|
||||
if re.match(r'^\-\-eNBBranch=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match(r'^\-\-eNBBranch=(.+)$', myArgv, re.IGNORECASE)
|
||||
elif re.match('^\-\-eNBBranch=(.+)$|^\-\-ranBranch=(.+)$', myArgv, re.IGNORECASE):
|
||||
if re.match('^\-\-eNBBranch=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match('^\-\-eNBBranch=(.+)$', myArgv, re.IGNORECASE)
|
||||
else:
|
||||
matchReg = re.match(r'^\-\-ranBranch=(.+)$', myArgv, re.IGNORECASE)
|
||||
matchReg = re.match('^\-\-ranBranch=(.+)$', myArgv, re.IGNORECASE)
|
||||
CiTestObj.ranBranch = matchReg.group(1)
|
||||
RAN.ranBranch=matchReg.group(1)
|
||||
HTML.ranBranch=matchReg.group(1)
|
||||
@@ -112,11 +108,11 @@ def ArgsParse(argvs,CiTestObj,RAN,HTML,CONTAINERS,HELP,SCA,PHYSIM,CLUSTER):
|
||||
SCA.ranBranch=matchReg.group(1)
|
||||
PHYSIM.ranBranch=matchReg.group(1)
|
||||
CLUSTER.ranBranch=matchReg.group(1)
|
||||
elif re.match(r'^\-\-eNBCommitID=(.*)$|^\-\-ranCommitID=(.*)$', myArgv, re.IGNORECASE):
|
||||
if re.match(r'^\-\-eNBCommitID=(.*)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match(r'^\-\-eNBCommitID=(.*)$', myArgv, re.IGNORECASE)
|
||||
elif re.match('^\-\-eNBCommitID=(.*)$|^\-\-ranCommitID=(.*)$', myArgv, re.IGNORECASE):
|
||||
if re.match('^\-\-eNBCommitID=(.*)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match('^\-\-eNBCommitID=(.*)$', myArgv, re.IGNORECASE)
|
||||
else:
|
||||
matchReg = re.match(r'^\-\-ranCommitID=(.*)$', myArgv, re.IGNORECASE)
|
||||
matchReg = re.match('^\-\-ranCommitID=(.*)$', myArgv, re.IGNORECASE)
|
||||
CiTestObj.ranCommitID = matchReg.group(1)
|
||||
RAN.ranCommitID=matchReg.group(1)
|
||||
HTML.ranCommitID=matchReg.group(1)
|
||||
@@ -124,11 +120,11 @@ def ArgsParse(argvs,CiTestObj,RAN,HTML,CONTAINERS,HELP,SCA,PHYSIM,CLUSTER):
|
||||
SCA.ranCommitID=matchReg.group(1)
|
||||
PHYSIM.ranCommitID=matchReg.group(1)
|
||||
CLUSTER.ranCommitID=matchReg.group(1)
|
||||
elif re.match(r'^\-\-eNBTargetBranch=(.*)$|^\-\-ranTargetBranch=(.*)$', myArgv, re.IGNORECASE):
|
||||
if re.match(r'^\-\-eNBTargetBranch=(.*)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match(r'^\-\-eNBTargetBranch=(.*)$', myArgv, re.IGNORECASE)
|
||||
elif re.match('^\-\-eNBTargetBranch=(.*)$|^\-\-ranTargetBranch=(.*)$', myArgv, re.IGNORECASE):
|
||||
if re.match('^\-\-eNBTargetBranch=(.*)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match('^\-\-eNBTargetBranch=(.*)$', myArgv, re.IGNORECASE)
|
||||
else:
|
||||
matchReg = re.match(r'^\-\-ranTargetBranch=(.*)$', myArgv, re.IGNORECASE)
|
||||
matchReg = re.match('^\-\-ranTargetBranch=(.*)$', myArgv, re.IGNORECASE)
|
||||
CiTestObj.ranTargetBranch = matchReg.group(1)
|
||||
RAN.ranTargetBranch=matchReg.group(1)
|
||||
HTML.ranTargetBranch=matchReg.group(1)
|
||||
@@ -136,130 +132,143 @@ def ArgsParse(argvs,CiTestObj,RAN,HTML,CONTAINERS,HELP,SCA,PHYSIM,CLUSTER):
|
||||
SCA.ranTargetBranch=matchReg.group(1)
|
||||
PHYSIM.ranTargetBranch=matchReg.group(1)
|
||||
CLUSTER.ranTargetBranch=matchReg.group(1)
|
||||
elif re.match(r'^\-\-eNBIPAddress=(.+)$|^\-\-eNB[1-2]IPAddress=(.+)$', myArgv, re.IGNORECASE):
|
||||
if re.match(r'^\-\-eNBIPAddress=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match(r'^\-\-eNBIPAddress=(.+)$', myArgv, re.IGNORECASE)
|
||||
elif re.match('^\-\-eNBIPAddress=(.+)$|^\-\-eNB[1-2]IPAddress=(.+)$', myArgv, re.IGNORECASE):
|
||||
if re.match('^\-\-eNBIPAddress=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match('^\-\-eNBIPAddress=(.+)$', myArgv, re.IGNORECASE)
|
||||
RAN.eNBIPAddress=matchReg.group(1)
|
||||
CONTAINERS.eNBIPAddress=matchReg.group(1)
|
||||
SCA.eNBIPAddress=matchReg.group(1)
|
||||
PHYSIM.eNBIPAddress=matchReg.group(1)
|
||||
CLUSTER.eNBIPAddress=matchReg.group(1)
|
||||
elif re.match(r'^\-\-eNB1IPAddress=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match(r'^\-\-eNB1IPAddress=(.+)$', myArgv, re.IGNORECASE)
|
||||
elif re.match('^\-\-eNB1IPAddress=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match('^\-\-eNB1IPAddress=(.+)$', myArgv, re.IGNORECASE)
|
||||
RAN.eNB1IPAddress=matchReg.group(1)
|
||||
CONTAINERS.eNB1IPAddress=matchReg.group(1)
|
||||
elif re.match(r'^\-\-eNB2IPAddress=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match(r'^\-\-eNB2IPAddress=(.+)$', myArgv, re.IGNORECASE)
|
||||
elif re.match('^\-\-eNB2IPAddress=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match('^\-\-eNB2IPAddress=(.+)$', myArgv, re.IGNORECASE)
|
||||
RAN.eNB2IPAddress=matchReg.group(1)
|
||||
CONTAINERS.eNB2IPAddress=matchReg.group(1)
|
||||
elif re.match(r'^\-\-eNBUserName=(.+)$|^\-\-eNB[1-2]UserName=(.+)$', myArgv, re.IGNORECASE):
|
||||
if re.match(r'^\-\-eNBUserName=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match(r'^\-\-eNBUserName=(.+)$', myArgv, re.IGNORECASE)
|
||||
elif re.match('^\-\-eNBUserName=(.+)$|^\-\-eNB[1-2]UserName=(.+)$', myArgv, re.IGNORECASE):
|
||||
if re.match('^\-\-eNBUserName=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match('^\-\-eNBUserName=(.+)$', myArgv, re.IGNORECASE)
|
||||
RAN.eNBUserName=matchReg.group(1)
|
||||
CONTAINERS.eNBUserName=matchReg.group(1)
|
||||
SCA.eNBUserName=matchReg.group(1)
|
||||
PHYSIM.eNBUserName=matchReg.group(1)
|
||||
CLUSTER.eNBUserName=matchReg.group(1)
|
||||
elif re.match(r'^\-\-eNB1UserName=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match(r'^\-\-eNB1UserName=(.+)$', myArgv, re.IGNORECASE)
|
||||
elif re.match('^\-\-eNB1UserName=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match('^\-\-eNB1UserName=(.+)$', myArgv, re.IGNORECASE)
|
||||
RAN.eNB1UserName=matchReg.group(1)
|
||||
CONTAINERS.eNB1UserName=matchReg.group(1)
|
||||
elif re.match(r'^\-\-eNB2UserName=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match(r'^\-\-eNB2UserName=(.+)$', myArgv, re.IGNORECASE)
|
||||
elif re.match('^\-\-eNB2UserName=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match('^\-\-eNB2UserName=(.+)$', myArgv, re.IGNORECASE)
|
||||
RAN.eNB2UserName=matchReg.group(1)
|
||||
CONTAINERS.eNB2UserName=matchReg.group(1)
|
||||
elif re.match(r'^\-\-eNBPassword=(.+)$|^\-\-eNB[1-2]Password=(.+)$', myArgv, re.IGNORECASE):
|
||||
if re.match(r'^\-\-eNBPassword=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match(r'^\-\-eNBPassword=(.+)$', myArgv, re.IGNORECASE)
|
||||
elif re.match('^\-\-eNBPassword=(.+)$|^\-\-eNB[1-2]Password=(.+)$', myArgv, re.IGNORECASE):
|
||||
if re.match('^\-\-eNBPassword=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match('^\-\-eNBPassword=(.+)$', myArgv, re.IGNORECASE)
|
||||
RAN.eNBPassword=matchReg.group(1)
|
||||
CONTAINERS.eNBPassword=matchReg.group(1)
|
||||
SCA.eNBPassword=matchReg.group(1)
|
||||
PHYSIM.eNBPassword=matchReg.group(1)
|
||||
CLUSTER.eNBPassword=matchReg.group(1)
|
||||
elif re.match(r'^\-\-eNB1Password=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match(r'^\-\-eNB1Password=(.+)$', myArgv, re.IGNORECASE)
|
||||
elif re.match('^\-\-eNB1Password=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match('^\-\-eNB1Password=(.+)$', myArgv, re.IGNORECASE)
|
||||
RAN.eNB1Password=matchReg.group(1)
|
||||
CONTAINERS.eNB1Password=matchReg.group(1)
|
||||
elif re.match(r'^\-\-eNB2Password=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match(r'^\-\-eNB2Password=(.+)$', myArgv, re.IGNORECASE)
|
||||
elif re.match('^\-\-eNB2Password=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match('^\-\-eNB2Password=(.+)$', myArgv, re.IGNORECASE)
|
||||
RAN.eNB2Password=matchReg.group(1)
|
||||
CONTAINERS.eNB2Password=matchReg.group(1)
|
||||
elif re.match(r'^\-\-eNBSourceCodePath=(.+)$|^\-\-eNB[1-2]SourceCodePath=(.+)$', myArgv, re.IGNORECASE):
|
||||
if re.match(r'^\-\-eNBSourceCodePath=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match(r'^\-\-eNBSourceCodePath=(.+)$', myArgv, re.IGNORECASE)
|
||||
elif re.match('^\-\-eNBSourceCodePath=(.+)$|^\-\-eNB[1-2]SourceCodePath=(.+)$', myArgv, re.IGNORECASE):
|
||||
if re.match('^\-\-eNBSourceCodePath=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match('^\-\-eNBSourceCodePath=(.+)$', myArgv, re.IGNORECASE)
|
||||
RAN.eNBSourceCodePath=matchReg.group(1)
|
||||
CONTAINERS.eNBSourceCodePath=matchReg.group(1)
|
||||
SCA.eNBSourceCodePath=matchReg.group(1)
|
||||
PHYSIM.eNBSourceCodePath=matchReg.group(1)
|
||||
CLUSTER.eNBSourceCodePath=matchReg.group(1)
|
||||
elif re.match(r'^\-\-eNB1SourceCodePath=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match(r'^\-\-eNB1SourceCodePath=(.+)$', myArgv, re.IGNORECASE)
|
||||
EPC.eNBSourceCodePath=matchReg.group(1)
|
||||
elif re.match('^\-\-eNB1SourceCodePath=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match('^\-\-eNB1SourceCodePath=(.+)$', myArgv, re.IGNORECASE)
|
||||
RAN.eNB1SourceCodePath=matchReg.group(1)
|
||||
CONTAINERS.eNB1SourceCodePath=matchReg.group(1)
|
||||
elif re.match(r'^\-\-eNB2SourceCodePath=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match(r'^\-\-eNB2SourceCodePath=(.+)$', myArgv, re.IGNORECASE)
|
||||
elif re.match('^\-\-eNB2SourceCodePath=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match('^\-\-eNB2SourceCodePath=(.+)$', myArgv, re.IGNORECASE)
|
||||
RAN.eNB2SourceCodePath=matchReg.group(1)
|
||||
CONTAINERS.eNB2SourceCodePath=matchReg.group(1)
|
||||
elif re.match(r'^\-\-EPCIPAddress=(.+)$', myArgv, re.IGNORECASE):
|
||||
print("parameter --EPCIPAddress ignored")
|
||||
elif re.match(r'^\-\-EPCUserName=(.+)$', myArgv, re.IGNORECASE):
|
||||
print("parameter --EPCUserName ignored")
|
||||
elif re.match(r'^\-\-EPCPassword=(.+)$', myArgv, re.IGNORECASE):
|
||||
print("parameter --EPCPassword ignored")
|
||||
elif re.match(r'^\-\-EPCSourceCodePath=(.+)$', myArgv, re.IGNORECASE):
|
||||
print("parameter --EPCSourceCodePath ignored")
|
||||
elif re.match(r'^\-\-EPCType=(.+)$', myArgv, re.IGNORECASE):
|
||||
print("parameter --EPCType ignored")
|
||||
elif re.match(r'^\-\-EPCContainerPrefix=(.+)$', myArgv, re.IGNORECASE):
|
||||
print("parameter --EPCContainerPrefix ignored")
|
||||
elif re.match(r'^\-\-XMLTestFile=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match(r'^\-\-XMLTestFile=(.+)$', myArgv, re.IGNORECASE)
|
||||
elif re.match('^\-\-EPCIPAddress=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match('^\-\-EPCIPAddress=(.+)$', myArgv, re.IGNORECASE)
|
||||
EPC.IPAddress=matchReg.group(1)
|
||||
elif re.match('^\-\-EPCUserName=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match('^\-\-EPCUserName=(.+)$', myArgv, re.IGNORECASE)
|
||||
EPC.UserName=matchReg.group(1)
|
||||
elif re.match('^\-\-EPCPassword=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match('^\-\-EPCPassword=(.+)$', myArgv, re.IGNORECASE)
|
||||
EPC.Password=matchReg.group(1)
|
||||
elif re.match('^\-\-EPCSourceCodePath=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match('^\-\-EPCSourceCodePath=(.+)$', myArgv, re.IGNORECASE)
|
||||
EPC.SourceCodePath=matchReg.group(1)
|
||||
elif re.match('^\-\-EPCType=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match('^\-\-EPCType=(.+)$', myArgv, re.IGNORECASE)
|
||||
if re.match('OAI', matchReg.group(1), re.IGNORECASE) or re.match('ltebox', matchReg.group(1), re.IGNORECASE) or re.match('OAI-Rel14-Docker', matchReg.group(1), re.IGNORECASE) or re.match('OC-OAI-CN5G', matchReg.group(1), re.IGNORECASE):
|
||||
EPC.Type=matchReg.group(1)
|
||||
else:
|
||||
sys.exit('Invalid EPC Type: ' + matchReg.group(1) + ' -- (should be OAI or ltebox or OAI-Rel14-Docker or OC-OAI-CN5G)')
|
||||
elif re.match('^\-\-EPCContainerPrefix=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match('^\-\-EPCContainerPrefix=(.+)$', myArgv, re.IGNORECASE)
|
||||
EPC.ContainerPrefix=matchReg.group(1)
|
||||
elif re.match('^\-\-XMLTestFile=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match('^\-\-XMLTestFile=(.+)$', myArgv, re.IGNORECASE)
|
||||
CiTestObj.testXMLfiles.append(matchReg.group(1))
|
||||
HTML.testXMLfiles.append(matchReg.group(1))
|
||||
HTML.nbTestXMLfiles=HTML.nbTestXMLfiles+1
|
||||
elif re.match(r'^\-\-UEIPAddress=(.+)$', myArgv, re.IGNORECASE): # cleanup
|
||||
matchReg = re.match(r'^\-\-UEIPAddress=(.+)$', myArgv, re.IGNORECASE)
|
||||
elif re.match('^\-\-UEIPAddress=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match('^\-\-UEIPAddress=(.+)$', myArgv, re.IGNORECASE)
|
||||
CiTestObj.UEIPAddress = matchReg.group(1)
|
||||
elif re.match(r'^\-\-UEUserName=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match(r'^\-\-UEUserName=(.+)$', myArgv, re.IGNORECASE)
|
||||
elif re.match('^\-\-UEUserName=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match('^\-\-UEUserName=(.+)$', myArgv, re.IGNORECASE)
|
||||
CiTestObj.UEUserName = matchReg.group(1)
|
||||
elif re.match(r'^\-\-UEPassword=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match(r'^\-\-UEPassword=(.+)$', myArgv, re.IGNORECASE)
|
||||
elif re.match('^\-\-UEPassword=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match('^\-\-UEPassword=(.+)$', myArgv, re.IGNORECASE)
|
||||
CiTestObj.UEPassword = matchReg.group(1)
|
||||
elif re.match(r'^\-\-UESourceCodePath=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match(r'^\-\-UESourceCodePath=(.+)$', myArgv, re.IGNORECASE)
|
||||
elif re.match('^\-\-UESourceCodePath=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match('^\-\-UESourceCodePath=(.+)$', myArgv, re.IGNORECASE)
|
||||
CiTestObj.UESourceCodePath = matchReg.group(1)
|
||||
elif re.match(r'^\-\-finalStatus=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match(r'^\-\-finalStatus=(.+)$', myArgv, re.IGNORECASE)
|
||||
elif re.match('^\-\-finalStatus=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match('^\-\-finalStatus=(.+)$', myArgv, re.IGNORECASE)
|
||||
finalStatus = matchReg.group(1)
|
||||
if ((finalStatus == 'true') or (finalStatus == 'True')):
|
||||
CiTestObj.finalStatus = True
|
||||
elif re.match(r'^\-\-OCUserName=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match(r'^\-\-OCUserName=(.+)$', myArgv, re.IGNORECASE)
|
||||
elif re.match('^\-\-OCUserName=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match('^\-\-OCUserName=(.+)$', myArgv, re.IGNORECASE)
|
||||
PHYSIM.OCUserName = matchReg.group(1)
|
||||
CLUSTER.OCUserName = matchReg.group(1)
|
||||
elif re.match(r'^\-\-OCPassword=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match(r'^\-\-OCPassword=(.+)$', myArgv, re.IGNORECASE)
|
||||
EPC.OCUserName = matchReg.group(1)
|
||||
elif re.match('^\-\-OCPassword=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match('^\-\-OCPassword=(.+)$', myArgv, re.IGNORECASE)
|
||||
PHYSIM.OCPassword = matchReg.group(1)
|
||||
CLUSTER.OCPassword = matchReg.group(1)
|
||||
elif re.match(r'^\-\-OCProjectName=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match(r'^\-\-OCProjectName=(.+)$', myArgv, re.IGNORECASE)
|
||||
EPC.OCPassword = matchReg.group(1)
|
||||
elif re.match('^\-\-OCProjectName=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match('^\-\-OCProjectName=(.+)$', myArgv, re.IGNORECASE)
|
||||
PHYSIM.OCProjectName = matchReg.group(1)
|
||||
CLUSTER.OCProjectName = matchReg.group(1)
|
||||
elif re.match(r'^\-\-OCUrl=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match(r'^\-\-OCUrl=(.+)$', myArgv, re.IGNORECASE)
|
||||
EPC.OCProjectName = matchReg.group(1)
|
||||
elif re.match('^\-\-OCUrl=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match('^\-\-OCUrl=(.+)$', myArgv, re.IGNORECASE)
|
||||
CLUSTER.OCUrl = matchReg.group(1)
|
||||
elif re.match(r'^\-\-OCRegistry=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match(r'^\-\-OCRegistry=(.+)$', myArgv, re.IGNORECASE)
|
||||
elif re.match('^\-\-OCRegistry=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match('^\-\-OCRegistry=(.+)$', myArgv, re.IGNORECASE)
|
||||
CLUSTER.OCRegistry = matchReg.group(1)
|
||||
elif re.match(r'^\-\-BuildId=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match(r'^\-\-BuildId=(.+)$', myArgv, re.IGNORECASE)
|
||||
elif re.match('^\-\-BuildId=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match('^\-\-BuildId=(.+)$', myArgv, re.IGNORECASE)
|
||||
RAN.BuildId = matchReg.group(1)
|
||||
elif re.match(r'^\-\-FlexRicTag=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match(r'^\-\-FlexRicTag=(.+)$', myArgv, re.IGNORECASE)
|
||||
elif re.match('^\-\-FlexRicTag=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match('^\-\-FlexRicTag=(.+)$', myArgv, re.IGNORECASE)
|
||||
CONTAINERS.flexricTag = matchReg.group(1)
|
||||
else:
|
||||
HELP.GenericHelp(CONST.Version)
|
||||
sys.exit('Invalid Parameter: ' + myArgv)
|
||||
|
||||
return py_param_file_present, py_params, mode, force_local
|
||||
return py_param_file_present, py_params, mode
|
||||
|
||||
@@ -73,9 +73,9 @@ then
|
||||
do
|
||||
IS_NFAPI=`echo $FILE | grep -E -c "nfapi/open-nFAPI|nfapi/oai_integration/vendor_ext" || true`
|
||||
IS_OAI_LICENCE_PRESENT=`grep -E -c "OAI Public License" $FILE || true`
|
||||
IS_BSD_LICENCE_PRESENT=`grep -E -c "the terms of the BSD Licence|License-Identifier: BSD-2-Clause|License-Identifier: BSD-3-Clause" $FILE || true`
|
||||
IS_BSD_LICENCE_PRESENT=`grep -E -c "the terms of the BSD Licence|License-Identifier: BSD-2-Clause" $FILE || true`
|
||||
IS_MIT_LICENCE_PRESENT=`grep -E -c "MIT License" $FILE || true`
|
||||
IS_EXCEPTION=`echo $FILE | grep -E -c "common/utils/collection/tree.h|common/utils/collection/queue.h|openair2/UTIL/OPT/packet-rohc.h|openair3/NAS/COMMON/milenage.h|openair1/PHY/CODING/crc.h|openair1/PHY/CODING/crcext.h|openair1/PHY/CODING/types.h" || true`
|
||||
IS_EXCEPTION=`echo $FILE | grep -E -c "common/utils/collection/tree.h|common/utils/collection/queue.h|openair2/UTIL/OPT/packet-rohc.h|openair3/NAS/COMMON/milenage.h|openair1/PHY/CODING/crc.h|openair1/PHY/CODING/crcext.h|openair1/PHY/CODING/types.h|openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder_offload.c|openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_offload.h" || true`
|
||||
if [ $IS_OAI_LICENCE_PRESENT -eq 0 ] && [ $IS_BSD_LICENCE_PRESENT -eq 0 ] && [ $IS_MIT_LICENCE_PRESENT -eq 0 ]
|
||||
then
|
||||
if [ $IS_NFAPI -eq 0 ] && [ $IS_EXCEPTION -eq 0 ]
|
||||
@@ -184,9 +184,9 @@ do
|
||||
then
|
||||
IS_NFAPI=`echo $FULLFILE | grep -E -c "nfapi/open-nFAPI|nfapi/oai_integration/vendor_ext" || true`
|
||||
IS_OAI_LICENCE_PRESENT=`grep -E -c "OAI Public License" $FULLFILE || true`
|
||||
IS_BSD_LICENCE_PRESENT=`grep -E -c "the terms of the BSD Licence|License-Identifier: BSD-2-Clause|License-Identifier: BSD-3-Clause" $FULLFILE || true`
|
||||
IS_BSD_LICENCE_PRESENT=`grep -E -c "the terms of the BSD Licence|License-Identifier: BSD-2-Clause" $FULLFILE || true`
|
||||
IS_MIT_LICENCE_PRESENT=`grep -E -c "MIT License" $FULLFILE || true`
|
||||
IS_EXCEPTION=`echo $FULLFILE | grep -E -c "common/utils/collection/tree.h|common/utils/collection/queue.h|openair2/UTIL/OPT/packet-rohc.h|openair3/NAS/COMMON/milenage.h|openair1/PHY/CODING/crc.h|openair1/PHY/CODING/crcext.h|openair1/PHY/CODING/types.h" || true`
|
||||
IS_EXCEPTION=`echo $FULLFILE | grep -E -c "common/utils/collection/tree.h|common/utils/collection/queue.h|openair2/UTIL/OPT/packet-rohc.h|openair3/NAS/COMMON/milenage.h|openair1/PHY/CODING/crc.h|openair1/PHY/CODING/crcext.h|openair1/PHY/CODING/types.h|openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder_offload.c|openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_offload.h" || true`
|
||||
if [ $IS_OAI_LICENCE_PRESENT -eq 0 ] && [ $IS_BSD_LICENCE_PRESENT -eq 0 ] && [ $IS_MIT_LICENCE_PRESENT -eq 0 ]
|
||||
then
|
||||
if [ $IS_NFAPI -eq 0 ] && [ $IS_EXCEPTION -eq 0 ]
|
||||
|
||||
@@ -78,10 +78,9 @@ IS_MR_BUILD_ONLY=`echo $LABELS | grep -c BUILD-ONLY`
|
||||
IS_MR_CI=`echo $LABELS | grep -c CI`
|
||||
IS_MR_4G=`echo $LABELS | grep -c 4G-LTE`
|
||||
IS_MR_5G=`echo $LABELS | grep -c 5G-NR`
|
||||
IS_MR_5G_UE=`echo $LABELS | grep -c nrUE`
|
||||
|
||||
# none is present! No CI
|
||||
if [ $IS_MR_BUILD_ONLY -eq 0 ] && [ $IS_MR_CI -eq 0 ] && [ $IS_MR_4G -eq 0 ] && [ $IS_MR_5G -eq 0 ] && [ $IS_MR_DOCUMENTATION -eq 0 ] && [ $IS_MR_5G_UE -eq 0 ]
|
||||
if [ $IS_MR_BUILD_ONLY -eq 0 ] && [ $IS_MR_CI -eq 0 ] && [ $IS_MR_4G -eq 0 ] && [ $IS_MR_5G -eq 0 ] && [ $IS_MR_DOCUMENTATION -eq 0 ]
|
||||
then
|
||||
echo "NONE"
|
||||
exit 0
|
||||
@@ -94,12 +93,6 @@ then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ $IS_MR_5G_UE -eq 1 ] && [ $IS_MR_4G -eq 1 ]
|
||||
then
|
||||
echo "SHORTEN-4G-5G-UE"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# 4G is present: run only 4G
|
||||
if [ $IS_MR_4G -eq 1 ]
|
||||
then
|
||||
@@ -114,12 +107,6 @@ then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ $IS_MR_5G_UE -eq 1 ]
|
||||
then
|
||||
echo "SHORTEN-5G-UE"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# BUILD-ONLY is present: only build stages
|
||||
if [ $IS_MR_BUILD_ONLY -eq 1 ]
|
||||
then
|
||||
|
||||
@@ -63,87 +63,58 @@ adb_ue_2:
|
||||
|
||||
oc-cn5g:
|
||||
Host: avra
|
||||
Namespace: "oaicicd-core-for-ci-ran"
|
||||
CNPath: "/opt/oai-cn5g-fed-develop-2024-april-00102"
|
||||
NetworkScript: echo "inet 172.21.6.102"
|
||||
RunIperf3Server: False
|
||||
Deploy: "! scripts/oc-cn5g-deploy.sh /opt/oai-cn5g-fed-develop-2025-jan oaicicd-core-for-ci-ran"
|
||||
Undeploy: "! scripts/oc-cn5g-undeploy.sh /opt/oai-cn5g-fed-develop-2025-jan oaicicd-core-for-ci-ran"
|
||||
LogCollect: "! scripts/oc-cn5g-logcollect.sh /opt/oai-cn5g-fed-develop-2025-jan oaicicd-core-for-ci-ran %%log_dir%%"
|
||||
|
||||
oc-cn5g-20897:
|
||||
Host: cacofonix
|
||||
Namespace: "oaicicd-core-for-fhi72"
|
||||
CNPath: "/opt/oai-cn5g-fed-develop-2024-april-20897"
|
||||
NetworkScript: echo "inet 172.21.6.105"
|
||||
RunIperf3Server: False
|
||||
Deploy: "! scripts/oc-cn5g-deploy.sh /opt/oai-cn5g-fed-develop-2025-jan oaicicd-core-for-fhi72"
|
||||
Undeploy: "! scripts/oc-cn5g-undeploy.sh /opt/oai-cn5g-fed-develop-2025-jan oaicicd-core-for-fhi72"
|
||||
LogCollect: "! scripts/oc-cn5g-logcollect.sh /opt/oai-cn5g-fed-develop-2025-jan oaicicd-core-for-fhi72 %%log_dir%%"
|
||||
|
||||
oc-cn5g-20897-aerial:
|
||||
Host: gracehopper1-oai
|
||||
oc-cn5g-20897-aerial2:
|
||||
Host: aerial2
|
||||
Namespace: "oaicicd-core-for-fhi72"
|
||||
CNPath: "/opt/oai-cn5g-fed-develop-2024-april-20897"
|
||||
NetworkScript: echo "inet 172.21.6.105"
|
||||
RunIperf3Server: False
|
||||
Deploy: "! scripts/oc-cn5g-deploy.sh /opt/oai-cn5g-fed-develop-2025-jan oaicicd-core-for-nvidia-aerial"
|
||||
Undeploy: "! scripts/oc-cn5g-undeploy.sh /opt/oai-cn5g-fed-develop-2025-jan oaicicd-core-for-nvidia-aerial"
|
||||
LogCollect: "! scripts/oc-cn5g-logcollect.sh /opt/oai-cn5g-fed-develop-2025-jan oaicicd-core-for-nvidia-aerial %%log_dir%%"
|
||||
|
||||
matix-cn5g:
|
||||
Host: matix
|
||||
NetworkScript: docker exec prod-trf-gen ip a show dev eth0
|
||||
CmdPrefix: docker exec prod-trf-gen
|
||||
RunIperf3Server: False
|
||||
Deploy: "cd /opt/oai-cn5g-fed-v2/docker-compose && python3 ./core-network.py --type start-basic"
|
||||
Undeploy: "cd /opt/oai-cn5g-fed-v2/docker-compose && python3 ./core-network.py --type stop-basic"
|
||||
LogCollect:
|
||||
- "docker logs oai-smf > %%log_dir%%/oai-smf.log"
|
||||
- "docker logs oai-amf > %%log_dir%%/oai-amf.log"
|
||||
- "docker logs oai-upf > %%log_dir%%/oai-upf.log"
|
||||
|
||||
porcepix-cn4g:
|
||||
Host: porcepix
|
||||
NetworkScript: docker exec prod-trf-gen ip a show dev eth0
|
||||
CmdPrefix: docker exec prod-trf-gen
|
||||
Deploy: "! scripts/magma-epc-deploy.sh /opt/oai-epc-magma/docker-compose.yml"
|
||||
Undeploy: "docker compose -f /opt/oai-epc-magma/docker-compose.yml down"
|
||||
LogCollect: "! scripts/magma-epc-logcollect.sh %%log_dir%%"
|
||||
|
||||
porcepix-cn5g:
|
||||
Host: porcepix
|
||||
NetworkScript: docker exec prod-trf-gen ip a show dev eth0
|
||||
CmdPrefix: docker exec prod-trf-gen
|
||||
RunIperf3Server: False
|
||||
|
||||
nano-cn4g:
|
||||
Host: nano
|
||||
NetworkScript: docker exec prod-trf-gen ip a show dev eth0
|
||||
CmdPrefix: docker exec prod-trf-gen
|
||||
Deploy: "! scripts/magma-epc-deploy.sh /opt/oai-epc-magma/docker-compose.yml"
|
||||
Undeploy: "docker compose -f /opt/oai-epc-magma/docker-compose.yml down"
|
||||
LogCollect: "! scripts/magma-epc-logcollect.sh %%log_dir%%"
|
||||
|
||||
ltebox-nano:
|
||||
Host: nano
|
||||
NetworkScript: ip a show dev tun1
|
||||
Deploy:
|
||||
- "sudo su -c 'screen -dm -S simulated_hss /opt/hss_sim0609/starthss'"
|
||||
- "sleep 1"
|
||||
- "sudo /opt/ltebox/tools/start_mme && sudo /opt/ltebox/tools/start_xGw &"
|
||||
- "sleep 1"
|
||||
Undeploy: "sudo /opt/ltebox/tools/stop_xGw; sudo /opt/ltebox/tools/stop_mme; sudo killall screen"
|
||||
LogCollect: "cp /opt/hss_sim0609/hss.log /opt/ltebox/var/log/{mmeLog.0,s1apcLog.0,s1apsLog.0,s11cLog.0,libLog.0,xGwLog.0} %%log_dir%%"
|
||||
|
||||
sabox-nepes:
|
||||
Host: nepes
|
||||
NetworkScript: ip a show dev tun1
|
||||
Deploy:
|
||||
- "sudo su -c 'screen -dm -S simulated_5g_hss /opt/hss_sim0609/start_5g_hss'"
|
||||
- "sleep 1"
|
||||
- "sudo /opt/ltebox/tools/start_sabox < /dev/null &> /dev/null"
|
||||
- "sleep 1"
|
||||
LogCollect: "cp /opt/hss_sim0609/hss.log /opt/ltebox/var/log/{amfLog.0,ngapcLog.0,ngapcommonLog.0,ngapsLog.0,xGwLog.0,upfLog.0} %%log_dir%%"
|
||||
Undeploy: "sudo /opt/ltebox/tools/stop_sabox; sudo killall screen"
|
||||
|
||||
ltebox-nepes:
|
||||
Host: nepes
|
||||
NetworkScript: ip a show dev tun1
|
||||
Deploy:
|
||||
- "sudo su -c 'screen -dm -S simulated_hss /opt/hss_sim0609/starthss'"
|
||||
- "sleep 1"
|
||||
- "sudo /opt/ltebox/tools/start_mme && sudo /opt/ltebox/tools/start_xGw &"
|
||||
- "sleep 1"
|
||||
Undeploy: "sudo /opt/ltebox/tools/stop_xGw; sudo /opt/ltebox/tools/stop_mme; sudo killall screen"
|
||||
LogCollect: "cp /opt/hss_sim0609/hss.log /opt/ltebox/var/log/{mmeLog.0,s1apcLog.0,s1apsLog.0,s11cLog.0,libLog.0,xGwLog.0} %%log_dir%%"
|
||||
|
||||
amarisoft_ue:
|
||||
Host: amariue
|
||||
@@ -386,15 +357,6 @@ rfsim5g_ext_dn:
|
||||
NetworkScript: docker exec rfsim5g-oai-ext-dn ip a show dev eth0
|
||||
CmdPrefix: docker exec rfsim5g-oai-ext-dn
|
||||
|
||||
oai_ext_dn:
|
||||
Host: "%%current_host%%"
|
||||
NetworkScript: docker exec oai-ext-dn ip a show dev eth0
|
||||
CmdPrefix: docker exec oai-ext-dn
|
||||
|
||||
rfsim5g_5gc_fixed_ip:
|
||||
Host: "%%current_host%%"
|
||||
NetworkScript: echo "inet 12.1.1.1"
|
||||
|
||||
rfsim4g_ue:
|
||||
Host: "%%current_host%%"
|
||||
NetworkScript: docker exec rfsim4g-oai-lte-ue0 ip a show dev oaitun_ue1
|
||||
@@ -423,9 +385,9 @@ rfsim4g_enb_fembms:
|
||||
|
||||
rfsim4g_ue_fembms:
|
||||
Host: "%%current_host%%"
|
||||
NetworkScript: docker exec rfsim4g-oai-lte-ue0 ip a show dev oaitun_uem2
|
||||
NetworkScript: docker exec rfsim4g-oai-lte-ue0 ip a show dev oaitun_uem1
|
||||
CmdPrefix: docker exec rfsim4g-oai-lte-ue0
|
||||
IF: oaitun_uem2
|
||||
IF: oaitun_uem1
|
||||
|
||||
l2sim4g_ue:
|
||||
Host: "%%current_host%%"
|
||||
@@ -440,3 +402,7 @@ l2sim4g_ext_dn:
|
||||
Host: "%%current_host%%"
|
||||
NetworkScript: docker exec l2sim4g-trf-gen ip a show dev eth0
|
||||
CmdPrefix: docker exec l2sim4g-trf-gen
|
||||
|
||||
test:
|
||||
Host: localhost
|
||||
NetworkScript: echo "inet 127.0.0.1 mtu 1500"
|
||||
|
||||
@@ -43,6 +43,9 @@ NAMESPACE = "oaicicd-ran"
|
||||
OCUrl = "https://api.oai.cs.eurecom.fr:6443"
|
||||
OCRegistry = "default-route-openshift-image-registry.apps.oai.cs.eurecom.fr"
|
||||
CI_OC_RAN_NAMESPACE = "oaicicd-ran"
|
||||
CN_IMAGES = ["mysql", "oai-nrf", "oai-amf", "oai-smf", "oai-upf", "oai-ausf", "oai-udm", "oai-udr", "oai-traffic-server"]
|
||||
CN_CONTAINERS = ["", "-c nrf", "-c amf", "-c smf", "-c upf", "-c ausf", "-c udm", "-c udr", ""]
|
||||
|
||||
|
||||
def OC_login(cmd, ocUserName, ocPassword, ocProjectName):
|
||||
if ocUserName == '' or ocPassword == '' or ocProjectName == '':
|
||||
@@ -64,6 +67,49 @@ def OC_login(cmd, ocUserName, ocPassword, ocProjectName):
|
||||
def OC_logout(cmd):
|
||||
cmd.run(f'oc logout')
|
||||
|
||||
def OC_deploy_CN(cmd, ocUserName, ocPassword, ocNamespace, path):
|
||||
logging.debug(f'OC OAI CN5G: Deploying OAI CN5G on Openshift Cluster: {ocNamespace}')
|
||||
succeeded = OC_login(cmd, ocUserName, ocPassword, ocNamespace)
|
||||
if not succeeded:
|
||||
return False, CONST.OC_LOGIN_FAIL
|
||||
cmd.run('helm uninstall oai5gcn --wait --timeout 60s')
|
||||
ret = cmd.run(f'helm install --wait --timeout 120s oai5gcn {path}/ci-scripts/charts/oai-5g-basic/.')
|
||||
if ret.returncode != 0:
|
||||
logging.error('OC OAI CN5G: Deployment failed')
|
||||
OC_logout(cmd)
|
||||
return False, CONST.OC_PROJECT_FAIL
|
||||
report = cmd.run('oc get pods')
|
||||
OC_logout(cmd)
|
||||
return True, report
|
||||
|
||||
def OC_undeploy_CN(cmd, ocUserName, ocPassword, ocNamespace, path):
|
||||
logging.debug(f'OC OAI CN5G: Terminating CN on Openshift Cluster: {ocNamespace}')
|
||||
succeeded = OC_login(cmd, ocUserName, ocPassword, ocNamespace)
|
||||
if not succeeded:
|
||||
return False, CONST.OC_LOGIN_FAIL
|
||||
cmd.run(f'rm -Rf {path}/logs')
|
||||
cmd.run(f'mkdir -p {path}/logs')
|
||||
logging.debug('OC OAI CN5G: Collecting log files to workspace')
|
||||
cmd.run(f'oc describe pod &> {path}/logs/describe-pods-post-test.log')
|
||||
cmd.run(f'oc get pods.metrics.k8s &> {path}/logs/nf-resource-consumption.log')
|
||||
for ii, ci in zip(CN_IMAGES, CN_CONTAINERS):
|
||||
podName = cmd.run(f"oc get pods | grep {ii} | awk \'{{print $1}}\'").stdout.strip()
|
||||
if not podName:
|
||||
logging.debug(f'{ii} pod not found!')
|
||||
else:
|
||||
cmd.run(f'oc logs -f {podName} {ci} &> {path}/logs/{ii}.log &')
|
||||
cmd.run(f'cd {path}/logs && zip -r -qq test_logs_CN.zip *.log')
|
||||
cmd.copyin(f'{path}/logs/test_logs_CN.zip','test_logs_CN.zip')
|
||||
ret = cmd.run('helm uninstall --wait --timeout 60s oai5gcn')
|
||||
if ret.returncode != 0:
|
||||
logging.error('OC OAI CN5G: Undeployment failed')
|
||||
cmd.run('helm uninstall --wait --timeout 60s oai5gcn')
|
||||
OC_logout(cmd)
|
||||
return False, CONST.OC_PROJECT_FAIL
|
||||
report = cmd.run('oc get pods')
|
||||
OC_logout(cmd)
|
||||
return True, report
|
||||
|
||||
class Cluster:
|
||||
def __init__(self):
|
||||
self.eNBIPAddress = ""
|
||||
@@ -83,9 +129,19 @@ class Cluster:
|
||||
|
||||
def _recreate_entitlements(self):
|
||||
# recreating entitlements, don't care if deletion fails
|
||||
self.cmd.run(f'oc delete secret etc-pki-entitlement')
|
||||
ret = self.cmd.run(f"oc get secret etc-pki-entitlement -n openshift-config-managed -o json | jq 'del(.metadata.resourceVersion)' | jq 'del(.metadata.creationTimestamp)' | jq 'del(.metadata.uid)' | jq 'del(.metadata.namespace)' | oc create -f -", silent=True)
|
||||
if ret.returncode != 0:
|
||||
self.cmd.run('oc delete secret etc-pki-entitlement')
|
||||
ret = self.cmd.run('ls /etc/pki/entitlement/???????????????????.pem | tail -1', silent=True)
|
||||
regres1 = re.search(r"/etc/pki/entitlement/[0-9]+.pem", ret.stdout)
|
||||
ret = self.cmd.run('ls /etc/pki/entitlement/???????????????????-key.pem | tail -1', silent=True)
|
||||
regres2 = re.search(r"/etc/pki/entitlement/[0-9]+-key.pem", ret.stdout)
|
||||
if regres1 is None or regres2 is None:
|
||||
logging.error("could not find entitlements")
|
||||
return False
|
||||
file1 = regres1.group(0)
|
||||
file2 = regres2.group(0)
|
||||
ret = self.cmd.run(f'oc create secret generic etc-pki-entitlement --from-file {file1} --from-file {file2}')
|
||||
regres = re.search(r"secret/etc-pki-entitlement created", ret.stdout)
|
||||
if ret.returncode != 0 or regres is None:
|
||||
logging.error("could not create secret/etc-pki-entitlement")
|
||||
return False
|
||||
return True
|
||||
@@ -94,7 +150,7 @@ class Cluster:
|
||||
self._retag_image_statement(name, name, newTag, filename)
|
||||
self.cmd.run(f'oc delete -f {filename}')
|
||||
ret = self.cmd.run(f'oc create -f {filename}')
|
||||
if re.search(r'buildconfig.build.openshift.io/[a-zA-Z\-0-9]+ created', ret.stdout) is not None:
|
||||
if re.search('buildconfig.build.openshift.io/[a-zA-Z\-0-9]+ created', ret.stdout) is not None:
|
||||
return True
|
||||
logging.error('error while creating buildconfig: ' + ret.stdout)
|
||||
return False
|
||||
@@ -162,17 +218,19 @@ class Cluster:
|
||||
return -1
|
||||
return int(result.group("size"))
|
||||
|
||||
def _deploy_pod(self, filename, timeout = 120):
|
||||
def _deploy_pod(self, filename, timeout = 30):
|
||||
ret = self.cmd.run(f'oc create -f {filename}')
|
||||
result = re.search(r'pod/(?P<pod>[a-zA-Z0-9_\-]+) created', ret.stdout)
|
||||
result = re.search(f'pod/(?P<pod>[a-zA-Z0-9_\-]+) created', ret.stdout)
|
||||
if result is None:
|
||||
logging.error(f'could not deploy pod: {ret.stdout}')
|
||||
return None
|
||||
pod = result.group("pod")
|
||||
logging.debug(f'checking if pod {pod} is in Running state')
|
||||
ret = self.cmd.run(f'oc wait --for=condition=ready pod {pod} --timeout={timeout}s', silent=True)
|
||||
if ret.returncode == 0:
|
||||
return pod
|
||||
while timeout > 0:
|
||||
ret = self.cmd.run(f'oc get pod {pod} -o json | jq -Mc .status.phase', silent=True)
|
||||
if re.search('"Running"', ret.stdout) is not None: return pod
|
||||
timeout -= 1
|
||||
time.sleep(1)
|
||||
logging.error(f'pod {pod} did not reach Running state')
|
||||
self._undeploy_pod(filename)
|
||||
return None
|
||||
@@ -180,7 +238,7 @@ class Cluster:
|
||||
def _undeploy_pod(self, filename):
|
||||
self.cmd.run(f'oc delete -f {filename}')
|
||||
|
||||
def PullClusterImage(self, HTML, node, images, tag_prefix):
|
||||
def PullClusterImage(self, HTML, node, images):
|
||||
logging.debug(f'Pull OC image {images} to server {node}')
|
||||
self.testCase_id = HTML.testCase_id
|
||||
with cls_cmd.getConnection(node) as cmd:
|
||||
@@ -196,7 +254,7 @@ class Cluster:
|
||||
return False
|
||||
tag = cls_containerize.CreateTag(self.ranCommitID, self.ranBranch, self.ranAllowMerge)
|
||||
registry = f'{self.OCRegistry}/{CI_OC_RAN_NAMESPACE}'
|
||||
success, msg = cls_containerize.Containerize.Pull_Image(cmd, images, tag, tag_prefix, registry, None, None)
|
||||
success, msg = cls_containerize.Containerize.Pull_Image(cmd, images, tag, registry, None, None)
|
||||
OC_logout(cmd)
|
||||
param = f"on node {node}"
|
||||
if success:
|
||||
@@ -269,9 +327,9 @@ class Cluster:
|
||||
|
||||
# delete old images by Sagar Arora <sagar.arora@openairinterface.org>:
|
||||
# 1. retrieve all images and their timestamp
|
||||
# 2. awk retrieves those whose timestamp is older than 3 weeks
|
||||
# 2. awk retrieves those whose timestamp is older than 4 weeks
|
||||
# 3. issue delete command on corresponding istags (the images are dangling and will be cleaned by the registry)
|
||||
delete_cmd = "oc get istag -o go-template --template '{{range .items}}{{.metadata.name}} {{.metadata.creationTimestamp}}{{\"\\n\"}}{{end}}' | awk '$2 <= \"'$(date -d '-3weeks' -Ins --utc | sed 's/+0000/Z/')'\" { print $1 }' | xargs --no-run-if-empty oc delete istag"
|
||||
delete_cmd = "oc get istag -o go-template --template '{{range .items}}{{.metadata.name}} {{.metadata.creationTimestamp}}{{\"\\n\"}}{{end}}' | awk '$2 <= \"'$(date -d '-4weeks' -Ins --utc | sed 's/+0000/Z/')'\" { print $1 }' | xargs --no-run-if-empty oc delete istag"
|
||||
response = self.cmd.run(delete_cmd)
|
||||
logging.debug(f"deleted images:\n{response.stdout}")
|
||||
|
||||
@@ -284,7 +342,7 @@ class Cluster:
|
||||
self._recreate_bc('ran-base', baseTag, 'openshift/ran-base-bc.yaml')
|
||||
ranbase_job = self._start_build('ran-base')
|
||||
attemptedImages += ['ran-base']
|
||||
status = ranbase_job is not None and self._wait_build_end([ranbase_job], 1000)
|
||||
status = ranbase_job is not None and self._wait_build_end([ranbase_job], 800)
|
||||
if not status: logging.error('failure during build of ran-base')
|
||||
self.cmd.run(f'oc logs {ranbase_job} &> cmake_targets/log/ran-base.log') # cannot use cmd.run because of redirect
|
||||
# recover logs by mounting image
|
||||
@@ -322,7 +380,7 @@ class Cluster:
|
||||
self.cmd.run(f'oc logs {ranbuild_job} &> cmake_targets/log/ran-build.log')
|
||||
self.cmd.run(f'oc logs {physim_job} &> cmake_targets/log/oai-physim.log')
|
||||
self.cmd.run(f'oc logs {clang_job} &> cmake_targets/log/oai-clang.log')
|
||||
self.cmd.run(f'oc get pods.metrics.k8s.io &>> cmake_targets/log/build-metrics.log')
|
||||
self.cmd.run(f'oc get pods.metrics.k8s.io &>> cmake_targets/log/build-metrics.log', '\$', 10)
|
||||
|
||||
if status:
|
||||
self._recreate_is_tag('oai-enb', imageTag, 'openshift/oai-enb-is.yaml')
|
||||
@@ -346,7 +404,7 @@ class Cluster:
|
||||
gnb_aw2s_job = self._start_build('oai-gnb-aw2s')
|
||||
attemptedImages += ['oai-gnb-aw2s']
|
||||
|
||||
wait = enb_job is not None and gnb_job is not None and gnb_aw2s_job is not None and self._wait_build_end([enb_job, gnb_job, gnb_aw2s_job], 800)
|
||||
wait = enb_job is not None and gnb_job is not None and gnb_aw2s_job is not None and self._wait_build_end([enb_job, gnb_job, gnb_aw2s_job], 600)
|
||||
if not wait: logging.error('error during build of eNB/gNB')
|
||||
status = status and wait
|
||||
# recover logs
|
||||
@@ -375,14 +433,14 @@ class Cluster:
|
||||
nrue_job = self._start_build('oai-nr-ue')
|
||||
attemptedImages += ['oai-nr-ue']
|
||||
|
||||
wait = nr_cuup_job is not None and lteue_job is not None and nrue_job is not None and self._wait_build_end([nr_cuup_job, lteue_job, nrue_job], 800)
|
||||
wait = nr_cuup_job is not None and lteue_job is not None and nrue_job is not None and self._wait_build_end([nr_cuup_job, lteue_job, nrue_job], 600)
|
||||
if not wait: logging.error('error during build of nr-cuup/lteUE/nrUE')
|
||||
status = status and wait
|
||||
# recover logs
|
||||
self.cmd.run(f'oc logs {nr_cuup_job} &> cmake_targets/log/oai-nr-cuup.log')
|
||||
self.cmd.run(f'oc logs {lteue_job} &> cmake_targets/log/oai-lte-ue.log')
|
||||
self.cmd.run(f'oc logs {nrue_job} &> cmake_targets/log/oai-nr-ue.log')
|
||||
self.cmd.run(f'oc get pods.metrics.k8s.io &>> cmake_targets/log/build-metrics.log')
|
||||
self.cmd.run(f'oc get pods.metrics.k8s.io &>> cmake_targets/log/build-metrics.log', '\$', 10)
|
||||
|
||||
if status:
|
||||
self._recreate_is_tag('ran-build-fhi72', imageTag, 'openshift/ran-build-fhi72-is.yaml')
|
||||
@@ -395,7 +453,7 @@ class Cluster:
|
||||
if not wait: logging.error('error during build of ranbuildfhi72_job')
|
||||
status = status and wait
|
||||
self.cmd.run(f'oc logs {ranbuildfhi72_job} &> cmake_targets/log/ran-build-fhi72.log')
|
||||
self.cmd.run(f'oc get pods.metrics.k8s.io &>> cmake_targets/log/build-metrics.log')
|
||||
self.cmd.run(f'oc get pods.metrics.k8s.io &>> cmake_targets/log/build-metrics.log', '\$', 10)
|
||||
|
||||
if status:
|
||||
self._recreate_is_tag('oai-gnb-fhi72', imageTag, 'openshift/oai-gnb-fhi72-is.yaml')
|
||||
@@ -410,7 +468,7 @@ class Cluster:
|
||||
status = status and wait
|
||||
# recover logs
|
||||
self.cmd.run(f'oc logs {gnb_fhi72_job} &> cmake_targets/log/oai-gnb-fhi72.log')
|
||||
self.cmd.run(f'oc get pods.metrics.k8s.io &>> cmake_targets/log/build-metrics.log')
|
||||
self.cmd.run(f'oc get pods.metrics.k8s.io &>> cmake_targets/log/build-metrics.log', '\$', 10)
|
||||
|
||||
# split and analyze logs
|
||||
imageSize = {}
|
||||
@@ -426,9 +484,9 @@ class Cluster:
|
||||
imageSize[image] = f'{sizeMb:.1f} Mbytes (uncompressed: ~{sizeMb*2.5:.1f} Mbytes)'
|
||||
logging.info(f'\u001B[1m{image} size is {imageSize[image]}\u001B[0m')
|
||||
|
||||
grep_exp = r"\|".join(attemptedImages)
|
||||
grep_exp = "\|".join(attemptedImages)
|
||||
self.cmd.run(f'oc get images | grep -e \'{grep_exp}\' &> cmake_targets/log/image_registry.log');
|
||||
self.cmd.run(f'for pod in $(oc get pods | tail -n +2 | awk \'{{print $1}}\'); do oc get pod $pod -o json &>> cmake_targets/log/build_pod_summary.log; done')
|
||||
self.cmd.run(f'for pod in $(oc get pods | tail -n +2 | awk \'{{print $1}}\'); do oc get pod $pod -o json &>> cmake_targets/log/build_pod_summary.log; done', '\$', 60)
|
||||
|
||||
build_log_name = f'build_log_{self.testCase_id}'
|
||||
cls_containerize.CopyLogsToExecutor(self.cmd, lSourcePath, build_log_name)
|
||||
|
||||
@@ -124,12 +124,12 @@ class LocalCmd(Cmd):
|
||||
ret.args += f" &> {redirect}"
|
||||
ret.stdout = ""
|
||||
if not silent:
|
||||
logging.debug(f"local> {ret.args}")
|
||||
logging.info(f"local> {ret.args}")
|
||||
return ret
|
||||
|
||||
def run(self, line, timeout=300, silent=False, reportNonZero=True):
|
||||
if not silent:
|
||||
logging.debug(f"local> {line}")
|
||||
logging.info(f"local> {line}")
|
||||
try:
|
||||
if line.strip().endswith('&'):
|
||||
# if we wait for stdout, subprocess does not return before the end of the command
|
||||
@@ -217,8 +217,6 @@ class RemoteCmd(Cmd):
|
||||
return client
|
||||
|
||||
def _lookup_ssh_config(hostname):
|
||||
if is_local(hostname):
|
||||
raise ValueError("Using localhost as SSH target is not allowed: use LocalCmd instead.")
|
||||
ssh_config = paramiko.SSHConfig()
|
||||
user_config_file = os.path.expanduser("~/.ssh/config")
|
||||
if os.path.exists(user_config_file):
|
||||
@@ -244,7 +242,7 @@ class RemoteCmd(Cmd):
|
||||
p = parameters if parameters else ""
|
||||
r = f"> {redirect}" if redirect else ""
|
||||
if not silent:
|
||||
logging.debug(f"local> ssh {host} bash -s {p} < {path} {r} # {path} from localhost")
|
||||
logging.info(f"local> ssh {host} bash -s {p} < {path} {r} # {path} from localhost")
|
||||
client = RemoteCmd._ssh_init()
|
||||
cfg = RemoteCmd._lookup_ssh_config(host)
|
||||
client.connect(**cfg)
|
||||
@@ -264,7 +262,7 @@ class RemoteCmd(Cmd):
|
||||
|
||||
def run(self, line, timeout=300, silent=False, reportNonZero=True):
|
||||
if not silent:
|
||||
logging.debug(f"ssh[{self.hostname}]> {line}")
|
||||
logging.info(f"ssh[{self.hostname}]> {line}")
|
||||
if self.cwd:
|
||||
line = f"cd {self.cwd} && {line}"
|
||||
try:
|
||||
|
||||
@@ -93,7 +93,7 @@ def CopyLogsToExecutor(cmd, sourcePath, log_name):
|
||||
os.remove(f'./{log_name}.zip')
|
||||
if (os.path.isdir(f'./{log_name}')):
|
||||
shutil.rmtree(f'./{log_name}')
|
||||
cmd.copyin(src=f'{sourcePath}/cmake_targets/{log_name}.zip', tgt=f'{os.getcwd()}/{log_name}.zip')
|
||||
cmd.copyin(f'{sourcePath}/cmake_targets/{log_name}.zip', f'./{log_name}.zip')
|
||||
cmd.run(f'rm -f {log_name}.zip')
|
||||
ZipFile(f'{log_name}.zip').extractall('.')
|
||||
|
||||
@@ -359,7 +359,7 @@ class Containerize():
|
||||
svr = self.eNB_serverId[self.eNB_instance]
|
||||
lIpAddr, lSourcePath = self.GetCredentials(svr)
|
||||
logging.debug('Building on server: ' + lIpAddr)
|
||||
cmd = cls_cmd.getConnection(lIpAddr)
|
||||
cmd = cls_cmd.RemoteCmd(lIpAddr)
|
||||
|
||||
# Checking the hostname to get adapted on cli and dockerfileprefixes
|
||||
cmd.run('hostnamectl')
|
||||
@@ -407,13 +407,6 @@ class Containerize():
|
||||
result = re.search('build_cross_arm64', self.imageKind)
|
||||
if result is not None:
|
||||
self.dockerfileprefix = '.ubuntu22.cross-arm64'
|
||||
result = re.search('native_arm', self.imageKind)
|
||||
if result is not None:
|
||||
imageNames.append(('oai-gnb', 'gNB', 'oai-gnb', ''))
|
||||
imageNames.append(('ran-build-fhi72', 'build.fhi72.native_arm', 'ran-build-fhi72', ''))
|
||||
imageNames.append(('oai-nr-cuup', 'nr-cuup', 'oai-nr-cuup', ''))
|
||||
imageNames.append(('oai-nr-ue', 'nrUE', 'oai-nr-ue', ''))
|
||||
imageNames.append(('oai-gnb-aerial', 'gNB.aerial', 'oai-gnb-aerial', ''))
|
||||
|
||||
self.testCase_id = HTML.testCase_id
|
||||
cmd.cd(lSourcePath)
|
||||
@@ -498,10 +491,10 @@ class Containerize():
|
||||
elif image != 'ran-build':
|
||||
cmd.run(f'sed -i -e "s#ran-build:latest#ran-build:{imageTag}#" docker/Dockerfile.{pattern}{self.dockerfileprefix}')
|
||||
if image == 'oai-gnb-aerial':
|
||||
cmd.run('cp -f /opt/nvidia-ipc/nvipc_src.*.tar.gz .')
|
||||
cmd.run('cp -f /opt/nvidia-ipc/nvipc_src.2024.05.23.tar.gz .')
|
||||
ret = cmd.run(f'{self.cli} build {self.cliBuildOptions} --target {image} --tag {name}:{imageTag} --file docker/Dockerfile.{pattern}{self.dockerfileprefix} {option} . > cmake_targets/log/{name}.log 2>&1', timeout=1200)
|
||||
if image == 'oai-gnb-aerial':
|
||||
cmd.run('rm -f nvipc_src.*.tar.gz')
|
||||
cmd.run('rm -f nvipc_src.2024.05.23.tar.gz')
|
||||
if image == 'ran-build' and ret.returncode == 0:
|
||||
cmd.run(f"docker run --name test-log -d {name}:{imageTag} /bin/true")
|
||||
cmd.run(f"docker cp test-log:/oai-ran/cmake_targets/log/ cmake_targets/log/{name}/")
|
||||
@@ -727,9 +720,9 @@ class Containerize():
|
||||
HTML.CreateHtmlTabFooter(False)
|
||||
return False
|
||||
|
||||
def Push_Image_to_Local_Registry(self, HTML, svr_id, tag_prefix=""):
|
||||
def Push_Image_to_Local_Registry(self, HTML, svr_id):
|
||||
lIpAddr, lSourcePath = self.GetCredentials(svr_id)
|
||||
logging.debug('Pushing images to server: ' + lIpAddr)
|
||||
logging.debug('Pushing images from server: ' + lIpAddr)
|
||||
ssh = cls_cmd.getConnection(lIpAddr)
|
||||
imagePrefix = 'porcepix.sboai.cs.eurecom.fr'
|
||||
ret = ssh.run(f'docker login -u oaicicd -p oaicicd {imagePrefix}')
|
||||
@@ -744,7 +737,7 @@ class Containerize():
|
||||
if self.ranAllowMerge:
|
||||
orgTag = 'ci-temp'
|
||||
for image in IMAGES:
|
||||
tagToUse = tag_prefix + CreateTag(self.ranCommitID, self.ranBranch, self.ranAllowMerge)
|
||||
tagToUse = CreateTag(self.ranCommitID, self.ranBranch, self.ranAllowMerge)
|
||||
imageTag = f"{image}:{tagToUse}"
|
||||
ret = ssh.run(f'docker image tag {image}:{orgTag} {imagePrefix}/{imageTag}')
|
||||
if ret.returncode != 0:
|
||||
@@ -758,10 +751,9 @@ class Containerize():
|
||||
return False
|
||||
# Creating a develop tag on the local private registry
|
||||
if not self.ranAllowMerge:
|
||||
devTag = f"{tag_prefix}develop"
|
||||
ssh.run(f'docker image tag {image}:{orgTag} {imagePrefix}/{image}:{devTag}')
|
||||
ssh.run(f'docker push {imagePrefix}/{image}:{devTag}')
|
||||
ssh.run(f'docker rmi {imagePrefix}/{image}:{devTag}')
|
||||
ssh.run(f'docker image tag {image}:{orgTag} {imagePrefix}/{image}:develop')
|
||||
ssh.run(f'docker push {imagePrefix}/{image}:develop')
|
||||
ssh.run(f'docker rmi {imagePrefix}/{image}:develop')
|
||||
ssh.run(f'docker rmi {imagePrefix}/{imageTag} {image}:{orgTag}')
|
||||
|
||||
ret = ssh.run(f'docker logout {imagePrefix}')
|
||||
@@ -776,7 +768,7 @@ class Containerize():
|
||||
HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK)
|
||||
return True
|
||||
|
||||
def Pull_Image(cmd, images, tag, tag_prefix, registry, username, password):
|
||||
def Pull_Image(cmd, images, tag, registry, username, password):
|
||||
if username is not None and password is not None:
|
||||
logging.info(f"logging into registry {username}@{registry}")
|
||||
response = cmd.run(f'docker login -u {username} -p {password} {registry}', silent=True, reportNonZero=False)
|
||||
@@ -786,15 +778,14 @@ class Containerize():
|
||||
return False, msg
|
||||
pulled_images = []
|
||||
for image in images:
|
||||
imagePrefTag = f"{image}:{tag_prefix}{tag}"
|
||||
imageTag = f"{image}:{tag}"
|
||||
response = cmd.run(f'docker pull {registry}/{imagePrefTag}')
|
||||
response = cmd.run(f'docker pull {registry}/{imageTag}')
|
||||
if response.returncode != 0:
|
||||
msg = f'Could not pull {image} from local registry: {imagePrefTag}'
|
||||
msg = f'Could not pull {image} from local registry: {imageTag}'
|
||||
logging.error(msg)
|
||||
return False, msg
|
||||
cmd.run(f'docker tag {registry}/{imagePrefTag} oai-ci/{imageTag}')
|
||||
cmd.run(f'docker rmi {registry}/{imagePrefTag}')
|
||||
cmd.run(f'docker tag {registry}/{imageTag} oai-ci/{imageTag}')
|
||||
cmd.run(f'docker rmi {registry}/{imageTag}')
|
||||
pulled_images += [f"oai-ci/{imageTag}"]
|
||||
if username is not None and password is not None:
|
||||
response = cmd.run(f'docker logout {registry}')
|
||||
@@ -802,13 +793,13 @@ class Containerize():
|
||||
msg = "Pulled Images:\n" + '\n'.join(pulled_images)
|
||||
return True, msg
|
||||
|
||||
def Pull_Image_from_Registry(self, HTML, svr_id, images, tag=None, tag_prefix="", registry="porcepix.sboai.cs.eurecom.fr", username="oaicicd", password="oaicicd"):
|
||||
def Pull_Image_from_Registry(self, HTML, svr_id, images, tag=None, registry="porcepix.sboai.cs.eurecom.fr", username="oaicicd", password="oaicicd"):
|
||||
lIpAddr, lSourcePath = self.GetCredentials(svr_id)
|
||||
logging.debug('\u001B[1m Pulling image(s) on server: ' + lIpAddr + '\u001B[0m')
|
||||
if not tag:
|
||||
tag = CreateTag(self.ranCommitID, self.ranBranch, self.ranAllowMerge)
|
||||
with cls_cmd.getConnection(lIpAddr) as cmd:
|
||||
success, msg = Containerize.Pull_Image(cmd, images, tag, tag_prefix, registry, username, password)
|
||||
success, msg = Containerize.Pull_Image(cmd, images, tag, registry, username, password)
|
||||
param = f"on node {lIpAddr}"
|
||||
if success:
|
||||
HTML.CreateHtmlTestRowQueue(param, 'OK', [msg])
|
||||
@@ -890,10 +881,7 @@ class Containerize():
|
||||
if deployed:
|
||||
break
|
||||
elif (attempt < num_attempts - 1):
|
||||
warning_msg = f'Restart services {services}'
|
||||
logging.warning(warning_msg)
|
||||
imagesInfo.append(warning_msg)
|
||||
HTML.CreateHtmlTestRowQueue('N/A', 'NOK', ['\n'.join(imagesInfo)])
|
||||
logging.warning(f'Failed to deploy on attempt {attempt}, restart services {services}')
|
||||
for svc in services.split():
|
||||
CopyinServiceLog(ssh, lSourcePath, yaml_dir, svc, wd_yaml, f'{svc}-{HTML.testCase_id}-attempt{attempt}.log')
|
||||
ssh.run(f'docker compose -f {wd_yaml} down -- {services}')
|
||||
|
||||
@@ -1,172 +0,0 @@
|
||||
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
# * contributor license agreements. See the NOTICE file distributed with
|
||||
# * this work for additional information regarding copyright ownership.
|
||||
# * The OpenAirInterface Software Alliance licenses this file to You under
|
||||
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
# * except in compliance with the License.
|
||||
# * You may obtain a copy of the License at
|
||||
# *
|
||||
# * http://www.openairinterface.org/?page_id=698
|
||||
# *
|
||||
# * Unless required by applicable law or agreed to in writing, software
|
||||
# * distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# * See the License for the specific language governing permissions and
|
||||
# * limitations under the License.
|
||||
# *-------------------------------------------------------------------------------
|
||||
# * For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
# * contact@openairinterface.org
|
||||
# */
|
||||
#---------------------------------------------------------------------
|
||||
#
|
||||
# Required Python Version
|
||||
# Python 3.x
|
||||
#
|
||||
#---------------------------------------------------------------------
|
||||
|
||||
import logging
|
||||
import yaml
|
||||
import re
|
||||
|
||||
import cls_cmd
|
||||
|
||||
def listify(s):
|
||||
if s is None:
|
||||
return None
|
||||
if isinstance(s, list):
|
||||
return [str(x) for x in s]
|
||||
return [str(s)]
|
||||
|
||||
class CoreNetwork:
|
||||
|
||||
def __init__(self, cn_name, node=None, d=None, filename="ci_infra.yaml"):
|
||||
with open(filename, "r") as f:
|
||||
all_cns = yaml.load(f, Loader=yaml.FullLoader) # TODO why full?
|
||||
c = all_cns.get(cn_name)
|
||||
if c is None:
|
||||
raise Exception(f'no such core network name "{cn_name}" in "{filename}"')
|
||||
self._cn_name = cn_name
|
||||
self._host = c.get('Host').strip()
|
||||
if self._host == "%%current_host%%":
|
||||
if node is None:
|
||||
raise Exception(f"core network {cn_name} requires node, but none provided (cannot replace %%current_host%%)")
|
||||
self._host = node
|
||||
if d is not None:
|
||||
raise Exception("directory handling not implemented")
|
||||
self._deploy = listify(c.get('Deploy'))
|
||||
self._undeploy = listify(c.get('Undeploy'))
|
||||
self._logCollect = listify(c.get('LogCollect'))
|
||||
# check if at least one command contains "%%log_dir%%"
|
||||
if self._logCollect and not any(filter(lambda s: "%%log_dir%%" in s, self._logCollect)):
|
||||
raise ValueError(f"(At least one) LogCollect expression for {cn_name} must contain \"%%log_dir%%\"")
|
||||
self._getNetwork = listify(c.get('NetworkScript'))
|
||||
self._cmd_prefix = c.get('CmdPrefix')
|
||||
iperf = c.get('RunIperf3Server')
|
||||
self._run_iperf = bool(iperf if iperf is not None else True)
|
||||
logging.info(f'initialized core {self} from {filename}')
|
||||
|
||||
def __str__(self):
|
||||
return f"{self._cn_name}@{self._host}"
|
||||
|
||||
def __repr__(self):
|
||||
return self.__str__()
|
||||
|
||||
def _exec_script(host, line, silent):
|
||||
# take off "!", split in words
|
||||
words = line[1:].strip().split(" ")
|
||||
script_name = words[0]
|
||||
options = " ".join(words[1:])
|
||||
ret = cls_cmd.runScript(host, script_name, 300, parameters=options, silent=silent)
|
||||
return ret
|
||||
|
||||
def _command(self, cmd_list, must_succeed=False, silent=False):
|
||||
succeeded = True
|
||||
output = ""
|
||||
with cls_cmd.getConnection(self._host) as c:
|
||||
for cmd in cmd_list:
|
||||
cmd = cmd.strip()
|
||||
if cmd.startswith("!"):
|
||||
ret = CoreNetwork._exec_script(self._host, cmd, silent=silent)
|
||||
else:
|
||||
ret = c.run(cmd, silent=silent)
|
||||
output += ret.stdout
|
||||
if ret.returncode != 0:
|
||||
logging.warn(f"cmd \"{cmd}\" returned code {ret.returncode}, stdout {ret.stdout}")
|
||||
if ret.returncode != 0 and must_succeed:
|
||||
succeeded = False
|
||||
break
|
||||
return succeeded, output
|
||||
|
||||
def deploy(self):
|
||||
# we first undeploy to make sure the core has been stopped
|
||||
logging.info(f'undeploy core network {self} before deployment')
|
||||
self._command(self._undeploy)
|
||||
logging.info(f'deploy core network {self}')
|
||||
success, output = self._command(self._deploy, must_succeed=True)
|
||||
if not success:
|
||||
logging.error(f'failure during deployment of core network {self}:\n{output}')
|
||||
return False, output
|
||||
logging.info(f'retrieve IP address')
|
||||
ip = self.getIP()
|
||||
if ip is None:
|
||||
logging.error(f'could not retrieve pingable address of core network {self}')
|
||||
return False, output
|
||||
logging.info(f'deployed core network {self}, pingable IP address {ip}')
|
||||
return True, output
|
||||
|
||||
def _collect_logs(self, log_dir):
|
||||
logging.info(f'collecting logs into (local) {log_dir}')
|
||||
remote_dir = "/tmp/cn-undeploy-logs"
|
||||
with cls_cmd.getConnection(self._host) as c:
|
||||
# create a directory for log collection
|
||||
c.run(f'rm -rf {remote_dir}')
|
||||
ret = c.run(f'mkdir {remote_dir}')
|
||||
if ret.returncode != 0:
|
||||
logging.error("cannot create directory for log collection")
|
||||
return []
|
||||
# inform core network implementation where to store logs
|
||||
# (remote_dir), and trigger log collection
|
||||
log_cmd = [s.replace('%%log_dir%%', remote_dir) for s in self._logCollect]
|
||||
self._command(log_cmd)
|
||||
# enumerate collected files
|
||||
ret = c.run(f'ls {remote_dir}/*')
|
||||
if ret.returncode != 0:
|
||||
logging.error("cannot enumerate log files")
|
||||
return []
|
||||
log_files = []
|
||||
# copy them to the executor one by one, and store in log_dir
|
||||
for f in ret.stdout.split("\n"):
|
||||
l = f.replace(remote_dir, log_dir)
|
||||
c.copyin(f, l)
|
||||
log_files.append(l)
|
||||
c.run(f'rm -rf {remote_dir}')
|
||||
return log_files
|
||||
|
||||
def undeploy(self, log_dir=None):
|
||||
log_files = []
|
||||
if log_dir is not None:
|
||||
log_files = self._collect_logs(log_dir)
|
||||
else:
|
||||
logging.warning("no directory for log collection specified, cannot retrieve core network logs")
|
||||
logging.info(f'undeploy core network {self}')
|
||||
_, output = self._command(self._undeploy)
|
||||
return log_files, output
|
||||
|
||||
def getIP(self):
|
||||
success, output = self._command(self._getNetwork)
|
||||
result = re.search(r'inet (?P<ip>[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)', output)
|
||||
if success and result and result.group('ip'):
|
||||
return result.group('ip')
|
||||
return None
|
||||
|
||||
def getCmdPrefix(self):
|
||||
return self._cmd_prefix or ""
|
||||
|
||||
def getName(self):
|
||||
return self._cn_name
|
||||
|
||||
def getHost(self):
|
||||
return self._host
|
||||
|
||||
def runIperf3Server(self):
|
||||
return self._run_iperf
|
||||
@@ -62,7 +62,10 @@ class Module_UE:
|
||||
self.trace = m.get('trace') == True
|
||||
self.logStore = m.get('LogStore')
|
||||
self.cmd_prefix = m.get('CmdPrefix')
|
||||
logging.info(f'initialized UE {self} from {filename}')
|
||||
self.runIperf3Server = m.get('RunIperf3Server', True)
|
||||
self.namespace = m.get('Namespace')
|
||||
self.cnPath = m.get('CNPath')
|
||||
logging.info(f'initialized {self.module_name}@{self.host} from {filename}')
|
||||
|
||||
def __str__(self):
|
||||
return f"{self.module_name}@{self.host} [IP: {self.getIP()}]"
|
||||
@@ -162,7 +165,7 @@ class Module_UE:
|
||||
|
||||
def getIP(self):
|
||||
output = self._command(self.cmd_dict["getNetwork"], silent=True)
|
||||
result = re.search(r'inet (?P<ip>[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)', output.stdout)
|
||||
result = re.search('inet (?P<ip>[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)', output.stdout)
|
||||
if result and result.group('ip'):
|
||||
ip = result.group('ip')
|
||||
return ip
|
||||
@@ -170,7 +173,7 @@ class Module_UE:
|
||||
|
||||
def checkMTU(self):
|
||||
output = self._command(self.cmd_dict["getNetwork"], silent=True)
|
||||
result = re.search(r'mtu (?P<mtu>[0-9]+)', output.stdout)
|
||||
result = re.search('mtu (?P<mtu>[0-9]+)', output.stdout)
|
||||
if result and result.group('mtu') and int(result.group('mtu')) == self.MTU:
|
||||
logging.debug(f'\u001B[1mUE Module {self.module_name} NIC MTU is {self.MTU} as expected\u001B[0m')
|
||||
return True
|
||||
@@ -187,6 +190,15 @@ class Module_UE:
|
||||
def getHost(self):
|
||||
return self.host
|
||||
|
||||
def getNamespace(self):
|
||||
return self.namespace
|
||||
|
||||
def getCNPath(self):
|
||||
return self.cnPath
|
||||
|
||||
def getRunIperf3Server(self):
|
||||
return self.runIperf3Server
|
||||
|
||||
def getCmdPrefix(self):
|
||||
return self.cmd_prefix if self.cmd_prefix else ""
|
||||
|
||||
|
||||
@@ -45,14 +45,13 @@ import helpreadme as HELP
|
||||
import constants as CONST
|
||||
|
||||
import cls_module
|
||||
import cls_corenetwork
|
||||
import cls_cmd
|
||||
|
||||
#-----------------------------------------------------------
|
||||
# Helper functions used here and in other classes
|
||||
#-----------------------------------------------------------
|
||||
def Iperf_ComputeModifiedBW(idx, ue_num, profile, args):
|
||||
result = re.search(r'-b\s*(?P<iperf_bandwidth>[0-9\.]+)(?P<unit>[KMG])', str(args))
|
||||
result = re.search('-b\s*(?P<iperf_bandwidth>[0-9\.]+)(?P<unit>[KMG])', str(args))
|
||||
if result is None:
|
||||
raise ValueError(f'requested iperf bandwidth not found in iperf options "{args}"')
|
||||
iperf_bandwidth = float(result.group('iperf_bandwidth'))
|
||||
@@ -78,7 +77,7 @@ def Iperf_ComputeModifiedBW(idx, ue_num, profile, args):
|
||||
return iperf_bandwidth_new, args_new
|
||||
|
||||
def Iperf_ComputeTime(args):
|
||||
result = re.search(r'-t\s*(?P<iperf_time>\d+)', str(args))
|
||||
result = re.search('-t\s*(?P<iperf_time>\d+)', str(args))
|
||||
if result is None:
|
||||
raise Exception('Iperf time not found!')
|
||||
return int(result.group('iperf_time'))
|
||||
@@ -184,10 +183,11 @@ def Iperf_analyzeV2UDP(server_filename, iperf_bitrate_threshold, iperf_packetlos
|
||||
return (False, 'Iperf UDP: Server report not found!')
|
||||
if (os.path.getsize(server_filename)==0):
|
||||
return (False, 'Iperf UDP: Log file is empty')
|
||||
statusTemplate = r'(?:|\[ *\d+\].*) +0\.0+-\s*(?P<duration>[0-9\.]+) +sec +[0-9\.]+ [kKMG]Bytes +(?P<bitrate>[0-9\.]+) (?P<magnitude>[kKMG])bits\/sec +(?P<jitter>[0-9\.]+) ms +(\d+\/ *\d+) +(\((?P<packetloss>[0-9\.]+)%\))'
|
||||
# Computing the requested bandwidth in float
|
||||
statusTemplate = r'(?:|\[ *\d+\].*) +0\.0-\s*(?P<duration>[0-9\.]+) +sec +[0-9\.]+ [kKMG]Bytes +(?P<bitrate>[0-9\.]+) (?P<magnitude>[kKMG])bits\/sec +(?P<jitter>[0-9\.]+) ms +(\d+\/ *\d+) +(\((?P<packetloss>[0-9\.]+)%\))'
|
||||
with open(server_filename, 'r') as server_file:
|
||||
for line in server_file.readlines():
|
||||
result = re.search(statusTemplate, str(line)) or result
|
||||
result = re.search(statusTemplate, str(line))
|
||||
if result is None:
|
||||
return (False, 'Could not parse server report!')
|
||||
bitrate = float(result.group('bitrate'))
|
||||
@@ -210,7 +210,7 @@ def Iperf_analyzeV2UDP(server_filename, iperf_bitrate_threshold, iperf_packetlos
|
||||
jit_msg = f'Jitter : {jitter}'
|
||||
pal_msg = f'Packet Loss : {packetloss}'
|
||||
if float(packetloss) > float(iperf_packetloss_threshold):
|
||||
pal_msg += f' (too high! >{iperf_packetloss_threshold}%)'
|
||||
pal_msg += f' (too high! >{self.iperf_packetloss_threshold}%)'
|
||||
return (result, f'{req_msg}\n{bir_msg}\n{brl_msg}\n{jit_msg}\n{pal_msg}')
|
||||
|
||||
def Custom_Command(HTML, node, command, command_fail):
|
||||
@@ -363,21 +363,29 @@ class OaiCiTest():
|
||||
HTML.CreateHtmlTestRowQueue('NA', 'OK', messages)
|
||||
return True
|
||||
|
||||
def Ping_common(self, cn, ue, logPath):
|
||||
def Ping_common(self, EPC, ue, logPath):
|
||||
# Launch ping on the EPC side (true for ltebox and old open-air-cn)
|
||||
ping_status = 0
|
||||
ueIP = ue.getIP()
|
||||
if not ueIP:
|
||||
return (False, f"UE {ue.getName()} has no IP address")
|
||||
svrIP = cn.getIP()
|
||||
if not svrIP:
|
||||
return (False, f"CN {cn.getName()} has no IP address")
|
||||
ping_log_file = f'ping_{self.testCase_id}_{ue.getName()}.log'
|
||||
ping_time = re.findall(r"-c *(\d+)",str(self.ping_args))
|
||||
ping_time = re.findall("-c *(\d+)",str(self.ping_args))
|
||||
local_ping_log_file = f'{logPath}/{ping_log_file}'
|
||||
if re.search('%cn_ip%', self.ping_args) or re.search(r'[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+', self.ping_args):
|
||||
raise Exception(f"ping_args should not have IP address: {self.ping_args}")
|
||||
# if has pattern %cn_ip%, replace with core IP address, else we assume the IP is present
|
||||
if re.search('%cn_ip%', self.ping_args):
|
||||
#target address is different depending on EPC type
|
||||
if re.match('OAI-Rel14-Docker', EPC.Type, re.IGNORECASE):
|
||||
self.ping_args = re.sub('%cn_ip%', EPC.MmeIPAddress, self.ping_args)
|
||||
elif re.match('OAICN5G', EPC.Type, re.IGNORECASE):
|
||||
self.ping_args = re.sub('%cn_ip%', EPC.MmeIPAddress, self.ping_args)
|
||||
elif re.match('OC-OAI-CN5G', EPC.Type, re.IGNORECASE):
|
||||
self.ping_args = re.sub('%cn_ip%', '172.21.6.100', self.ping_args)
|
||||
else:
|
||||
self.ping_args = re.sub('%cn_ip%', EPC.IPAddress, self.ping_args)
|
||||
#ping from module NIC rather than IP address to make sure round trip is over the air
|
||||
interface = f'-I {ue.getIFName()}' if ue.getIFName() else ''
|
||||
ping_cmd = f'{ue.getCmdPrefix()} ping {interface} {self.ping_args} {svrIP} 2>&1 | tee /tmp/{ping_log_file}'
|
||||
ping_cmd = f'{ue.getCmdPrefix()} ping {interface} {self.ping_args} 2>&1 | tee /tmp/{ping_log_file}'
|
||||
cmd = cls_cmd.getConnection(ue.getHost())
|
||||
response = cmd.run(ping_cmd, timeout=int(ping_time[0])*1.5)
|
||||
ue_header = f'UE {ue.getName()} ({ueIP})'
|
||||
@@ -391,12 +399,12 @@ class OaiCiTest():
|
||||
|
||||
with open(local_ping_log_file, 'r') as f:
|
||||
ping_output = "".join(f.readlines())
|
||||
result = re.search(r', (?P<packetloss>[0-9\.]+)% packet loss, time [0-9\.]+ms', ping_output)
|
||||
result = re.search(', (?P<packetloss>[0-9\.]+)% packet loss, time [0-9\.]+ms', ping_output)
|
||||
if result is None:
|
||||
message = ue_header + ': Packet Loss Not Found!'
|
||||
return (False, message)
|
||||
packetloss = result.group('packetloss')
|
||||
result = re.search(r'rtt min\/avg\/max\/mdev = (?P<rtt_min>[0-9\.]+)\/(?P<rtt_avg>[0-9\.]+)\/(?P<rtt_max>[0-9\.]+)\/[0-9\.]+ ms', ping_output)
|
||||
result = re.search('rtt min\/avg\/max\/mdev = (?P<rtt_min>[0-9\.]+)\/(?P<rtt_avg>[0-9\.]+)\/(?P<rtt_max>[0-9\.]+)\/[0-9\.]+ ms', ping_output)
|
||||
if result is None:
|
||||
message = ue_header + ': Ping RTT_Min RTT_Avg RTT_Max Not Found!'
|
||||
return (False, message)
|
||||
@@ -426,18 +434,22 @@ class OaiCiTest():
|
||||
|
||||
return (True, message)
|
||||
|
||||
def Ping(self, HTML, CONTAINERS, infra_file="ci_infra.yaml"):
|
||||
if self.ue_ids == [] or self.svr_id == None:
|
||||
raise Exception("no module names in self.ue_ids or/and self.svr_id provided")
|
||||
def Ping(self, HTML, EPC, CONTAINERS):
|
||||
if EPC.IPAddress == '' or EPC.UserName == '' or EPC.Password == '' or EPC.SourceCodePath == '':
|
||||
HELP.GenericHelp(CONST.Version)
|
||||
sys.exit('Insufficient Parameter')
|
||||
|
||||
if self.ue_ids == []:
|
||||
raise Exception("no module names in self.ue_ids provided")
|
||||
# Creating destination log folder if needed on the python executor workspace
|
||||
with cls_cmd.getConnection('localhost') as local:
|
||||
ymlPath = CONTAINERS.yamlPath[0].split('/')
|
||||
logPath = f'{os.getcwd()}/../cmake_targets/log/{ymlPath[-1]}'
|
||||
local.run(f'mkdir -p {logPath}', silent=True)
|
||||
ues = [cls_module.Module_UE(ue_id, server_name, infra_file) for ue_id, server_name in zip(self.ue_ids, self.nodes)]
|
||||
cn = cls_corenetwork.CoreNetwork(self.svr_id, self.svr_node, filename=infra_file)
|
||||
ues = [cls_module.Module_UE(ue_id, server_name) for ue_id, server_name in zip(self.ue_ids, self.nodes)]
|
||||
logging.debug(ues)
|
||||
with concurrent.futures.ThreadPoolExecutor(max_workers=64) as executor:
|
||||
futures = [executor.submit(self.Ping_common, cn, ue, logPath) for ue in ues]
|
||||
futures = [executor.submit(self.Ping_common, EPC, ue, logPath) for ue in ues]
|
||||
results = [f.result() for f in futures]
|
||||
# each result in results is a tuple, first member goes to successes, second to messages
|
||||
successes, messages = map(list, zip(*results))
|
||||
@@ -458,14 +470,15 @@ class OaiCiTest():
|
||||
HTML.CreateHtmlTestRowQueue(self.ping_args, 'KO', messages)
|
||||
return success
|
||||
|
||||
def Iperf_Module(self, cn, ue, idx, ue_num, logPath):
|
||||
def Iperf_Module(self, EPC, ue, svr, idx, ue_num, logPath):
|
||||
ueIP = ue.getIP()
|
||||
if not ueIP:
|
||||
return (False, f"UE {ue.getName()} has no IP address")
|
||||
svrIP = cn.getIP()
|
||||
svrIP = svr.getIP()
|
||||
if not svrIP:
|
||||
return (False, f"Iperf server {cn.getName()} has no IP address")
|
||||
return (False, f"Iperf server {ue.getName()} has no IP address")
|
||||
|
||||
runIperf3Server = svr.getRunIperf3Server()
|
||||
iperf_opt = self.iperf_args
|
||||
jsonReport = "--json"
|
||||
serverReport = ""
|
||||
@@ -482,13 +495,13 @@ class OaiCiTest():
|
||||
# hack: the ADB UEs don't have iperf in $PATH, so we need to hardcode for the moment
|
||||
iperf_ue = '/data/local/tmp/iperf3' if re.search('adb', ue.getName()) else 'iperf3'
|
||||
ue_header = f'UE {ue.getName()} ({ueIP})'
|
||||
with cls_cmd.getConnection(ue.getHost()) as cmd_ue, cls_cmd.getConnection(cn.getHost()) as cmd_svr:
|
||||
with cls_cmd.getConnection(ue.getHost()) as cmd_ue, cls_cmd.getConnection(EPC.IPAddress) as cmd_svr:
|
||||
port = 5002 + idx
|
||||
# note: some core setups start an iperf3 server automatically, indicated in ci_infra by runIperf3Server: False`
|
||||
t = iperf_time * 2.5
|
||||
cmd_ue.run(f'rm /tmp/{client_filename}', reportNonZero=False, silent=True)
|
||||
if cn.runIperf3Server():
|
||||
cmd_svr.run(f'{cn.getCmdPrefix()} timeout -vk3 {t} iperf3 -s -B {svrIP} -p {port} -1 {jsonReport} >> /dev/null &', timeout=t)
|
||||
if runIperf3Server:
|
||||
cmd_svr.run(f'{svr.getCmdPrefix()} nohup timeout -vk3 {t} iperf3 -s -B {svrIP} -p {port} -1 {jsonReport} &', timeout=t)
|
||||
cmd_ue.run(f'{ue.getCmdPrefix()} timeout -vk3 {t} {iperf_ue} -B {ueIP} -c {svrIP} -p {port} {iperf_opt} {jsonReport} {serverReport} -O 5 >> /tmp/{client_filename}', timeout=t)
|
||||
# note: copy iperf3 log to the current directory for log analysis and log collection
|
||||
dest_filename = f'{logPath}/{client_filename}'
|
||||
@@ -503,7 +516,11 @@ class OaiCiTest():
|
||||
|
||||
return (status, f'{ue_header}\n{msg}')
|
||||
|
||||
def Iperf(self, HTML, CONTAINERS, infra_file="ci_infra.yaml"):
|
||||
def Iperf(self,HTML,EPC,CONTAINERS):
|
||||
if EPC.IPAddress == '' or EPC.UserName == '' or EPC.Password == '' or EPC.SourceCodePath == '':
|
||||
HELP.GenericHelp(CONST.Version)
|
||||
sys.exit('Insufficient Parameter')
|
||||
|
||||
logging.debug(f'Iperf: iperf_args "{self.iperf_args}" iperf_packetloss_threshold "{self.iperf_packetloss_threshold}" iperf_bitrate_threshold "{self.iperf_bitrate_threshold}" iperf_profile "{self.iperf_profile}" iperf_options "{self.iperf_options}"')
|
||||
|
||||
if self.ue_ids == [] or self.svr_id == None:
|
||||
@@ -513,10 +530,11 @@ class OaiCiTest():
|
||||
ymlPath = CONTAINERS.yamlPath[0].split('/')
|
||||
logPath = f'{os.getcwd()}/../cmake_targets/log/{ymlPath[-1]}'
|
||||
local.run(f'mkdir -p {logPath}', silent=True)
|
||||
ues = [cls_module.Module_UE(ue_id, server_name, infra_file) for ue_id, server_name in zip(self.ue_ids, self.nodes)]
|
||||
cn = cls_corenetwork.CoreNetwork(self.svr_id, self.svr_node, filename=infra_file)
|
||||
ues = [cls_module.Module_UE(ue_id, server_name) for ue_id, server_name in zip(self.ue_ids, self.nodes)]
|
||||
svr = cls_module.Module_UE(self.svr_id,self.svr_node)
|
||||
logging.debug(ues)
|
||||
with concurrent.futures.ThreadPoolExecutor(max_workers=64) as executor:
|
||||
futures = [executor.submit(self.Iperf_Module, cn, ue, i, len(ues), logPath) for i, ue in enumerate(ues)]
|
||||
futures = [executor.submit(self.Iperf_Module, EPC, ue, svr, i, len(ues), logPath) for i, ue in enumerate(ues)]
|
||||
results = [f.result() for f in futures]
|
||||
# each result in results is a tuple, first member goes to successes, second to messages
|
||||
successes, messages = map(list, zip(*results))
|
||||
@@ -537,17 +555,17 @@ class OaiCiTest():
|
||||
HTML.CreateHtmlTestRowQueue(self.iperf_args, 'KO', messages)
|
||||
return success
|
||||
|
||||
def Iperf2_Unidir(self, HTML, CONTAINERS, infra_file="ci_infra.yaml"):
|
||||
def Iperf2_Unidir(self,HTML,EPC,CONTAINERS):
|
||||
if self.ue_ids == [] or self.svr_id == None or len(self.ue_ids) != 1:
|
||||
raise Exception("no module names in self.ue_ids or/and self.svr_id provided, multi UE scenario not supported")
|
||||
ue = cls_module.Module_UE(self.ue_ids[0].strip(),self.nodes[0].strip(), infra_file)
|
||||
cn = cls_corenetwork.CoreNetwork(self.svr_id, self.svr_node, filename=infra_file)
|
||||
ue = cls_module.Module_UE(self.ue_ids[0].strip(),self.nodes[0].strip())
|
||||
svr = cls_module.Module_UE(self.svr_id,self.svr_node)
|
||||
ueIP = ue.getIP()
|
||||
if not ueIP:
|
||||
return False
|
||||
svrIP = cn.getIP()
|
||||
return (False, f"UE {ue.getName()} has no IP address")
|
||||
svrIP = svr.getIP()
|
||||
if not svrIP:
|
||||
return False
|
||||
return (False, f"Iperf server {ue.getName()} has no IP address")
|
||||
server_filename = f'iperf_server_{self.testCase_id}_{ue.getName()}.log'
|
||||
ymlPath = CONTAINERS.yamlPath[0].split('/')
|
||||
logPath = f'{os.getcwd()}/../cmake_targets/log/{ymlPath[-1]}'
|
||||
@@ -556,15 +574,17 @@ class OaiCiTest():
|
||||
t = iperf_time*2.5
|
||||
with cls_cmd.getConnection('localhost') as local:
|
||||
local.run(f'mkdir -p {logPath}')
|
||||
with cls_cmd.getConnection(ue.getHost()) as cmd_ue, cls_cmd.getConnection(cn.getHost()) as cmd_svr:
|
||||
with cls_cmd.getConnection(ue.getHost()) as cmd_ue, cls_cmd.getConnection(EPC.IPAddress) as cmd_svr:
|
||||
cmd_ue.run(f'rm /tmp/{server_filename}', reportNonZero=False)
|
||||
cmd_ue.run(f'{ue.getCmdPrefix()} timeout -vk3 {t} iperf -B {ueIP} -s -u -i1 >> /tmp/{server_filename} &', timeout=t)
|
||||
cmd_svr.run(f'{cn.getCmdPrefix()} timeout -vk3 {t} iperf -c {ueIP} -B {svrIP} {iperf_opt} -i1 >> /dev/null', timeout=t)
|
||||
cmd_svr.run(f'{svr.getCmdPrefix()} timeout -vk3 {t} iperf -c {ueIP} -B {svrIP} {iperf_opt} -i1', timeout=t)
|
||||
localPath = f'{os.getcwd()}'
|
||||
# note: copy iperf2 log to the directory for log collection
|
||||
cmd_ue.copyin(f'/tmp/{server_filename}', f'{logPath}/{server_filename}')
|
||||
cmd_ue.copyin(f'/tmp/{server_filename}', f'{localPath}/{logPath}/{server_filename}')
|
||||
# note: copy iperf2 log to the current directory for log analysis and log collection
|
||||
cmd_ue.copyin(f'/tmp/{server_filename}', f'{localPath}/{server_filename}')
|
||||
cmd_ue.run(f'rm /tmp/{server_filename}', reportNonZero=False)
|
||||
success, msg = Iperf_analyzeV2UDP(f'{logPath}/{server_filename}', self.iperf_bitrate_threshold, self.iperf_packetloss_threshold, target_bitrate)
|
||||
success, msg = Iperf_analyzeV2UDP(server_filename, self.iperf_bitrate_threshold, self.iperf_packetloss_threshold, target_bitrate)
|
||||
ue_header = f'UE {ue.getName()} ({ueIP})'
|
||||
logging.info(f'\u001B[1;37;45m iperf result for {ue_header}\u001B[0m')
|
||||
for l in msg.split('\n'):
|
||||
@@ -678,7 +698,7 @@ class OaiCiTest():
|
||||
result = re.search('TRIED TO PUSH MBMS DATA', str(line))
|
||||
if result is not None:
|
||||
mbms_messages += 1
|
||||
result = re.search(r"MIB Information => ([a-zA-Z]{1,10}), ([a-zA-Z]{1,10}), NidCell (?P<nidcell>\d{1,3}), N_RB_DL (?P<n_rb_dl>\d{1,3}), PHICH DURATION (?P<phich_duration>\d), PHICH RESOURCE (?P<phich_resource>.{1,4}), TX_ANT (?P<tx_ant>\d)", str(line))
|
||||
result = re.search("MIB Information => ([a-zA-Z]{1,10}), ([a-zA-Z]{1,10}), NidCell (?P<nidcell>\d{1,3}), N_RB_DL (?P<n_rb_dl>\d{1,3}), PHICH DURATION (?P<phich_duration>\d), PHICH RESOURCE (?P<phich_resource>.{1,4}), TX_ANT (?P<tx_ant>\d)", str(line))
|
||||
if result is not None and (not mib_found):
|
||||
try:
|
||||
mibMsg = "MIB Information: " + result.group(1) + ', ' + result.group(2)
|
||||
@@ -711,7 +731,7 @@ class OaiCiTest():
|
||||
frequency_found = True
|
||||
except Exception as e:
|
||||
logging.error(f'\033[91m UE did not find PBCH\033[0m')
|
||||
result = re.search(r"PLMN MCC (?P<mcc>\d{1,3}), MNC (?P<mnc>\d{1,3}), TAC", str(line))
|
||||
result = re.search("PLMN MCC (?P<mcc>\d{1,3}), MNC (?P<mnc>\d{1,3}), TAC", str(line))
|
||||
if result is not None and (not plmn_found):
|
||||
try:
|
||||
mibMsg = f"PLMN MCC = {result.group('mcc')} MNC = {result.group('mnc')}"
|
||||
@@ -720,7 +740,7 @@ class OaiCiTest():
|
||||
plmn_found = True
|
||||
except Exception as e:
|
||||
logging.error(f'\033[91m PLMN not found \033[0m')
|
||||
result = re.search(r"Found (?P<operator>[\w,\s]{1,15}) \(name from internal table\)", str(line))
|
||||
result = re.search("Found (?P<operator>[\w,\s]{1,15}) \(name from internal table\)", str(line))
|
||||
if result is not None:
|
||||
try:
|
||||
mibMsg = f"The operator is: {result.group('operator')}"
|
||||
@@ -736,7 +756,7 @@ class OaiCiTest():
|
||||
logging.debug(f'\033[94m{mibMsg}\033[0m')
|
||||
except Exception as e:
|
||||
logging.error(f'\033[91m SIB5 InterFreqCarrierFreq element not found \033[0m')
|
||||
result = re.search(r"DL Carrier Frequency/ARFCN : \-*(?P<carrier_frequency>\d{1,15}/\d{1,4})", str(line))
|
||||
result = re.search("DL Carrier Frequency/ARFCN : \-*(?P<carrier_frequency>\d{1,15}/\d{1,4})", str(line))
|
||||
if result is not None:
|
||||
try:
|
||||
freq = result.group('carrier_frequency')
|
||||
@@ -746,7 +766,7 @@ class OaiCiTest():
|
||||
logging.debug(f'\033[94m DL Carrier Frequency is: {freq}\033[0m')
|
||||
except Exception as e:
|
||||
logging.error(f'\033[91m DL Carrier Frequency not found \033[0m')
|
||||
result = re.search(r"AllowedMeasBandwidth : (?P<allowed_bandwidth>\d{1,7})", str(line))
|
||||
result = re.search("AllowedMeasBandwidth : (?P<allowed_bandwidth>\d{1,7})", str(line))
|
||||
if result is not None:
|
||||
try:
|
||||
prb = result.group('allowed_bandwidth')
|
||||
@@ -856,35 +876,6 @@ class OaiCiTest():
|
||||
HTML.CreateHtmlTestRowQueue(f'N/A', 'OK', messages)
|
||||
return True
|
||||
|
||||
def DeployCoreNetwork(cn_id, HTML):
|
||||
core_name = cn_id.strip()
|
||||
cn = cls_corenetwork.CoreNetwork(core_name)
|
||||
success, output = cn.deploy()
|
||||
logging.info(f"deployment core network {core_name} success {success}, output:\n{output}")
|
||||
if success:
|
||||
msg = f"Started {cn} [{cn.getIP()}]"
|
||||
HTML.CreateHtmlTestRowQueue(core_name, 'OK', [msg])
|
||||
else:
|
||||
msg = f"deployment of core network {core_name} FAILED"
|
||||
logging.error(msg)
|
||||
HTML.CreateHtmlTestRowQueue(core_name, 'KO', [msg])
|
||||
return success
|
||||
|
||||
def UndeployCoreNetwork(cn_id, HTML):
|
||||
# Ping, Iperf, DeployObject put logs into a path based on YAML. We
|
||||
# can't do this here (because there is no yaml), so hardcode a path for
|
||||
# "cn_logs" for the moment
|
||||
logPath = f'{os.getcwd()}/../cmake_targets/log/cn_logs'
|
||||
with cls_cmd.getConnection('localhost') as local:
|
||||
local.run(f'mkdir -p {logPath}', silent=True)
|
||||
core_name = cn_id.strip()
|
||||
cn = cls_corenetwork.CoreNetwork(core_name)
|
||||
logs, output = cn.undeploy(log_dir=logPath)
|
||||
logging.info(f"undeployed core network {core_name}, logs {logs}, output:\n{output}")
|
||||
message = "Log files: " + ", ".join([os.path.basename(l) for l in logs])
|
||||
HTML.CreateHtmlTestRowQueue(core_name, 'OK', [message])
|
||||
return True
|
||||
|
||||
def LogCollectBuild(self,RAN):
|
||||
# Some pipelines are using "none" IP / Credentials
|
||||
# In that case, just forget about it
|
||||
@@ -908,6 +899,39 @@ class OaiCiTest():
|
||||
cmd.run(f'rm -f {d}/build.log.zip')
|
||||
cmd.run(f'cd {d} && zip -r build.log.zip build_log_*/*')
|
||||
|
||||
def LogCollectPing(self,EPC):
|
||||
# Some pipelines are using "none" IP / Credentials
|
||||
# In that case, just forget about it
|
||||
if EPC.IPAddress == 'none':
|
||||
sys.exit(0)
|
||||
with cls_cmd.getConnection(EPC.IPAddress) as cmd:
|
||||
d = f"{EPC.SourceCodePath}/scripts"
|
||||
cmd.run(f'rm -f {d}/ping.log.zip')
|
||||
cmd.run(f'cd {d} && zip ping.log.zip ping*.log')
|
||||
cmd.run(f'rm {d}/ping*.log')
|
||||
|
||||
def LogCollectIperf(self,EPC):
|
||||
# Some pipelines are using "none" IP / Credentials
|
||||
# In that case, just forget about it
|
||||
if EPC.IPAddress == 'none':
|
||||
sys.exit(0)
|
||||
with cls_cmd.getConnection(EPC.IPAddress) as cmd:
|
||||
d = f"{EPC.SourceCodePath}/scripts"
|
||||
cmd.run(f'rm -f {d}/iperf.log.zip')
|
||||
cmd.run(f'cd {d} && zip iperf.log.zip iperf*.log')
|
||||
cmd.run(f'rm {d}/iperf*.log')
|
||||
|
||||
def LogCollectOAIUE(self):
|
||||
# Some pipelines are using "none" IP / Credentials
|
||||
# In that case, just forget about it
|
||||
if self.UEIPAddress == 'none':
|
||||
sys.exit(0)
|
||||
with cls_cmd.getConnection(self.UEIPAddress) as cmd:
|
||||
d = f'{self.UESourceCodePath}/cmake_targets'
|
||||
cmd.run(f'echo {self.UEPassword} | sudo -S rm -f {d}/ue.log.zip')
|
||||
cmd.run(f'cd {d} && echo {self.UEPassword} | sudo -S zip ue.log.zip ue*.log core* ue_*record.raw ue_*.pcap ue_*txt')
|
||||
cmd.run(f'echo {self.UEPassword} | sudo -S rm {d}/ue*.log {d}/core* {d}/ue_*record.raw {d}/ue_*.pcap {d}/ue_*txt')
|
||||
|
||||
def ShowTestID(self):
|
||||
logging.info(f'\u001B[1m----------------------------------------\u001B[0m')
|
||||
logging.info(f'\u001B[1m Test ID: {self.testCase_id} \u001B[0m')
|
||||
|
||||
@@ -137,7 +137,9 @@ class PhySim:
|
||||
logging.debug(f'\u001B[1m Now using project {ocProjectName}\u001B[0m')
|
||||
|
||||
# Using helm charts deployment
|
||||
mySSH.command(f'helm install physim ./charts/physims/ --set global.image.version={imageTag} --wait 2>&1 | tee -a cmake_targets/log/physim_helm_summary.txt', '\$', 30)
|
||||
mySSH.command(f'grep -rl OAICICD_PROJECT ./charts/ | xargs sed -i -e "s#OAICICD_PROJECT#{ocProjectName}#"', '\$', 30)
|
||||
mySSH.command(f'sed -i -e "s#TAG#{imageTag}#g" ./charts/physims/values.yaml', '\$', 6)
|
||||
mySSH.command('helm install physim ./charts/physims/ --wait 2>&1 | tee -a cmake_targets/log/physim_helm_summary.txt', '\$', 30)
|
||||
if mySSH.getBefore().count('STATUS: deployed') == 0:
|
||||
logging.error('\u001B[1m Deploying PhySim Failed using helm chart on OC Cluster\u001B[0m')
|
||||
mySSH.command('helm uninstall physim | tee -a cmake_targets/log/physim_helm_summary.txt 2>&1', '\$', 30)
|
||||
|
||||
@@ -91,8 +91,8 @@ gNBs =
|
||||
ra_ResponseWindow = 4;
|
||||
#ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR
|
||||
#1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4;
|
||||
#one (0..15) 4,8,12,16,...60,64
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 3;
|
||||
#oneHalf (0..15) 4,8,12,16,...60,64
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15;
|
||||
#ra_ContentionResolutionTimer
|
||||
#(0..7) 8,16,24,32,40,48,56,64
|
||||
@@ -189,11 +189,11 @@ RUs = (
|
||||
nb_rx = 1
|
||||
# The higher att for TX than RX is because we use a circulator (as for TDD),
|
||||
# while we should use a duplexer in the FDD case. However, it uses the same setup.
|
||||
att_tx = 16
|
||||
att_tx = 18
|
||||
att_rx = 0;
|
||||
bands = [1];
|
||||
max_pdschReferenceSignalPower = -27;
|
||||
max_rxgain = 110;
|
||||
max_rxgain = 108;
|
||||
eNB_instances = [0];
|
||||
clock_src = "internal";
|
||||
}
|
||||
|
||||
@@ -90,7 +90,7 @@ gNBs =
|
||||
#ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR
|
||||
#1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4;
|
||||
#one (0..15) 4,8,12,16,...60,64
|
||||
#oneHalf (0..15) 4,8,12,16,...60,64
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 14;
|
||||
#ra_ContentionResolutionTimer
|
||||
#(0..7) 8,16,24,32,40,48,56,64
|
||||
|
||||
@@ -92,7 +92,7 @@ gNBs =
|
||||
#ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR
|
||||
#1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4;
|
||||
#one (0..15) 4,8,12,16,...60,64
|
||||
#oneHalf (0..15) 4,8,12,16,...60,64
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 14;
|
||||
#ra_ContentionResolutionTimer
|
||||
#(0..7) 8,16,24,32,40,48,56,64
|
||||
@@ -194,11 +194,11 @@ RUs = (
|
||||
local_rf = "yes"
|
||||
nb_tx = 1
|
||||
nb_rx = 1
|
||||
att_tx = 4;
|
||||
att_rx = 4;
|
||||
att_tx = 10;
|
||||
att_rx = 10;
|
||||
bands = [78];
|
||||
max_pdschReferenceSignalPower = -27;
|
||||
max_rxgain = 106;
|
||||
max_rxgain = 114;
|
||||
eNB_instances = [0];
|
||||
clock_src = "internal";
|
||||
}
|
||||
|
||||
@@ -1,43 +0,0 @@
|
||||
L1s = (
|
||||
{
|
||||
num_cc = 1;
|
||||
tr_n_preference = "nfapi";
|
||||
remote_n_address = "192.168.71.140"; // vnf addr
|
||||
local_n_address = "192.168.71.141"; // pnf addr
|
||||
local_n_portc = 50000; // pnf p5 port [!]
|
||||
remote_n_portc = 50001; // vnf p5 port
|
||||
local_n_portd = 50010; // pnf p7 port
|
||||
remote_n_portd = 50011; // vnf p7 port
|
||||
prach_dtx_threshold = 120;
|
||||
pucch0_dtx_threshold = 150;
|
||||
ofdm_offset_divisor = 8; #set this to UINT_MAX for offset 0
|
||||
}
|
||||
);
|
||||
|
||||
RUs = ({
|
||||
local_rf = "yes";
|
||||
nb_tx = 1;
|
||||
nb_rx = 1;
|
||||
att_tx = 0;
|
||||
att_rx = 0;
|
||||
bands = [7];
|
||||
max_pdschReferenceSignalPower = -27;
|
||||
max_rxgain = 114;
|
||||
sf_extension = 0;
|
||||
eNB_instances = [0];
|
||||
});
|
||||
|
||||
rfsimulator :
|
||||
{
|
||||
serveraddr = "server";
|
||||
serverport = 4043;
|
||||
options = (); #("saviq"); or/and "chanmod"
|
||||
modelname = "AWGN";
|
||||
IQfile = "/tmp/rfsimulator.iqs";
|
||||
};
|
||||
|
||||
log_config: {
|
||||
global_log_level = "info";
|
||||
hw_log_level = "info";
|
||||
phy_log_level = "info";
|
||||
};
|
||||
@@ -1,31 +0,0 @@
|
||||
usrp-tx-thread-config = 1;
|
||||
tune-offset = 30720000;
|
||||
|
||||
L1s = ({
|
||||
num_cc = 1;
|
||||
tr_n_preference = "nfapi";
|
||||
remote_n_address = "127.0.0.1"; // vnf addr
|
||||
local_n_address = "127.0.0.1"; // pnf addr
|
||||
local_n_portc = 50000; // pnf p5 port [!]
|
||||
remote_n_portc = 50001; // vnf p5 port
|
||||
local_n_portd = 50010; // pnf p7 port
|
||||
remote_n_portd = 50011; // vnf p7 port
|
||||
prach_dtx_threshold = 120;
|
||||
pusch_dtx_threshold = 20;
|
||||
max_ldpc_iterations = 10;
|
||||
});
|
||||
|
||||
RUs = ({
|
||||
local_rf = "yes"
|
||||
nb_tx = 4;
|
||||
nb_rx = 4;
|
||||
att_tx = 0;
|
||||
att_rx = 0;
|
||||
bands = [77];
|
||||
max_pdschReferenceSignalPower = -27;
|
||||
max_rxgain = 75;
|
||||
eNB_instances = [0];
|
||||
#clock_src = "internal";
|
||||
sdr_addrs = "addr=192.168.80.53, clock_source=internal,time_source=internal"
|
||||
});
|
||||
|
||||
@@ -35,6 +35,13 @@ gNBs =
|
||||
do_SRS = 0;
|
||||
min_rxtxtime = 2;
|
||||
|
||||
pdcch_ConfigSIB1 = (
|
||||
{
|
||||
controlResourceSetZero = 12;
|
||||
searchSpaceZero = 0;
|
||||
}
|
||||
);
|
||||
|
||||
servingCellConfigCommon = (
|
||||
{
|
||||
#spCellConfigCommon
|
||||
@@ -109,8 +116,8 @@ gNBs =
|
||||
ra_ResponseWindow = 5;
|
||||
#ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR
|
||||
#1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4;
|
||||
#one (0..15) 4,8,12,16,...60,64
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 3;
|
||||
#oneHalf (0..15) 4,8,12,16,...60,64
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15;
|
||||
#ra_ContentionResolutionTimer
|
||||
#(0..7) 8,16,24,32,40,48,56,64
|
||||
@@ -186,8 +193,8 @@ gNBs =
|
||||
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
GNB_IPV4_ADDRESS_FOR_NG_AMF = "172.21.16.202";
|
||||
GNB_IPV4_ADDRESS_FOR_NGU = "172.21.16.202";
|
||||
GNB_IPV4_ADDRESS_FOR_NG_AMF = "172.21.16.131";
|
||||
GNB_IPV4_ADDRESS_FOR_NGU = "172.21.16.131";
|
||||
GNB_PORT_FOR_S1U = 2152; # Spec 2152
|
||||
};
|
||||
|
||||
|
||||
@@ -90,7 +90,7 @@ gNBs =
|
||||
#ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR
|
||||
#1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4;
|
||||
#one (0..15) 4,8,12,16,...60,64
|
||||
#oneHalf (0..15) 4,8,12,16,...60,64
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15;
|
||||
#ra_ContentionResolutionTimer
|
||||
#(0..7) 8,16,24,32,40,48,56,64
|
||||
|
||||
@@ -89,7 +89,7 @@ gNBs =
|
||||
#ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR
|
||||
#1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4;
|
||||
#one (0..15) 4,8,12,16,...60,64
|
||||
#oneHalf (0..15) 4,8,12,16,...60,64
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15;
|
||||
#ra_ContentionResolutionTimer
|
||||
#(0..7) 8,16,24,32,40,48,56,64
|
||||
|
||||
@@ -31,11 +31,11 @@ gNBs =
|
||||
|
||||
# downlinkConfigCommon
|
||||
#frequencyInfoDL
|
||||
# this is 3319.68 MHz
|
||||
absoluteFrequencySSB = 621312;
|
||||
# this is 3600 MHz + 43 PRBs@30kHz SCS (same as initial BWP)
|
||||
absoluteFrequencySSB = 641032;
|
||||
dl_frequencyBand = 78;
|
||||
# this is 3300.6 MHz
|
||||
dl_absoluteFrequencyPointA = 620040;
|
||||
# this is 3600 MHz
|
||||
dl_absoluteFrequencyPointA = 640000;
|
||||
#scs-SpecificCarrierList
|
||||
dl_offstToCarrier = 0;
|
||||
# subcarrierSpacing
|
||||
@@ -89,7 +89,7 @@ gNBs =
|
||||
#ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR
|
||||
#1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4;
|
||||
#one (0..15) 4,8,12,16,...60,64
|
||||
#oneHalf (0..15) 4,8,12,16,...60,64
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15;
|
||||
#ra_ContentionResolutionTimer
|
||||
#(0..7) 8,16,24,32,40,48,56,64
|
||||
|
||||
@@ -89,7 +89,7 @@ gNBs =
|
||||
#ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR
|
||||
#1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4;
|
||||
#one (0..15) 4,8,12,16,...60,64
|
||||
#oneHalf (0..15) 4,8,12,16,...60,64
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15;
|
||||
#ra_ContentionResolutionTimer
|
||||
#(0..7) 8,16,24,32,40,48,56,64
|
||||
|
||||
@@ -91,7 +91,7 @@ gNBs =
|
||||
#ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR
|
||||
#1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4;
|
||||
#one (0..15) 4,8,12,16,...60,64
|
||||
#oneHalf (0..15) 4,8,12,16,...60,64
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15;
|
||||
#ra_ContentionResolutionTimer
|
||||
#(0..7) 8,16,24,32,40,48,56,64
|
||||
|
||||
@@ -84,8 +84,8 @@ gNBs =
|
||||
#ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR
|
||||
#1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4;
|
||||
#one (0..15) 4,8,12,16,...60,64
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 14;
|
||||
#oneHalf (0..15) 4,8,12,16,...60,64
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 14; //15;
|
||||
#ra_ContentionResolutionTimer
|
||||
#(0..7) 8,16,24,32,40,48,56,64
|
||||
ra_ContentionResolutionTimer = 7;
|
||||
|
||||
@@ -89,8 +89,8 @@ gNBs =
|
||||
#ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR
|
||||
#1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4;
|
||||
#one (0..15) 4,8,12,16,...60,64
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 14;
|
||||
#oneHalf (0..15) 4,8,12,16,...60,64
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 14; //15;
|
||||
#ra_ContentionResolutionTimer
|
||||
#(0..7) 8,16,24,32,40,48,56,64
|
||||
ra_ContentionResolutionTimer = 7;
|
||||
|
||||
@@ -88,8 +88,8 @@ gNBs =
|
||||
ra_ResponseWindow = 5;
|
||||
#ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR
|
||||
#1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4;
|
||||
#one (0..15) 4,8,12,16,...60,64
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 3;
|
||||
#oneHalf (0..15) 4,8,12,16,...60,64
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15;
|
||||
#ra_ContentionResolutionTimer
|
||||
#(0..7) 8,16,24,32,40,48,56,64
|
||||
|
||||
@@ -87,7 +87,7 @@ gNBs =
|
||||
#ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR
|
||||
#1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4;
|
||||
#one (0..15) 4,8,12,16,...60,64
|
||||
#oneHalf (0..15) 4,8,12,16,...60,64
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15;
|
||||
#ra_ContentionResolutionTimer
|
||||
#(0..7) 8,16,24,32,40,48,56,64
|
||||
|
||||
@@ -18,10 +18,7 @@ gNBs =
|
||||
|
||||
sib1_tda = 5;
|
||||
min_rxtxtime = 6;
|
||||
num_dlharq = 32;
|
||||
num_ulharq = 32;
|
||||
cu_sibs = [2];
|
||||
du_sibs = [19];
|
||||
disable_harq = 1;
|
||||
|
||||
servingCellConfigCommon = (
|
||||
{
|
||||
@@ -31,11 +28,11 @@ gNBs =
|
||||
|
||||
# downlinkConfigCommon
|
||||
#frequencyInfoDL
|
||||
# GSCN 6221
|
||||
absoluteFrequencySSB = 497770;
|
||||
dl_frequencyBand = 254;
|
||||
# this is 2486.15 MHz
|
||||
dl_absoluteFrequencyPointA = 497230;
|
||||
# this is 2150.43 MHz + 14 PRBs@15kHz SCS (same as initial BWP), points to Subcarrier 0 of RB#10 of SSB block
|
||||
absoluteFrequencySSB = 430590;
|
||||
dl_frequencyBand = 66;
|
||||
# this is 2150.43 MHz
|
||||
dl_absoluteFrequencyPointA = 430086;
|
||||
#scs-SpecificCarrierList
|
||||
dl_offstToCarrier = 0;
|
||||
# subcarrierSpacing
|
||||
@@ -55,9 +52,9 @@ gNBs =
|
||||
|
||||
#uplinkConfigCommon
|
||||
#frequencyInfoUL
|
||||
ul_frequencyBand = 254;
|
||||
# this is 1612.65 MHz
|
||||
ul_absoluteFrequencyPointA = 322530;
|
||||
ul_frequencyBand = 66;
|
||||
# this is 1750.43 MHz
|
||||
ul_absoluteFrequencyPointA = 350086;
|
||||
#scs-SpecificCarrierList
|
||||
ul_offstToCarrier = 0;
|
||||
# subcarrierSpacing
|
||||
@@ -91,7 +88,7 @@ gNBs =
|
||||
#ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR
|
||||
#1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4;
|
||||
#one (0..15) 4,8,12,16,...60,64
|
||||
#oneHalf (0..15) 4,8,12,16,...60,64
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15;
|
||||
#ra_ContentionResolutionTimer
|
||||
#(0..7) 8,16,24,32,40,48,56,64
|
||||
@@ -150,15 +147,7 @@ gNBs =
|
||||
|
||||
#ext2
|
||||
#ntn_Config_r17
|
||||
cellSpecificKoffset_r17 = 40;
|
||||
ta-Common-r17 = 4634000; # 18.87 ms
|
||||
ta-CommonDrift-r17 = -230000; # -46 µs/s
|
||||
positionX-r17 = 0;
|
||||
positionY-r17 = -2166908; # -2816980.4 m
|
||||
positionZ-r17 = 4910784; # 6384019.2 m
|
||||
velocityVX-r17 = 0;
|
||||
velocityVY-r17 = 115246; # 6914.76 m/s
|
||||
velocityVZ-r17 = 50853; # 3051.18 m/s
|
||||
cellSpecificKoffset_r17 = 478;
|
||||
}
|
||||
|
||||
);
|
||||
@@ -200,11 +189,8 @@ MACRLCs = (
|
||||
num_cc = 1;
|
||||
tr_s_preference = "local_L1";
|
||||
tr_n_preference = "local_RRC";
|
||||
# ulsch_max_frame_inactivity = 0;
|
||||
pusch_TargetSNRx10 = 150;
|
||||
pucch_TargetSNRx10 = 200;
|
||||
dl_max_mcs = 9;
|
||||
ul_max_mcs = 9;
|
||||
}
|
||||
);
|
||||
|
||||
@@ -212,7 +198,7 @@ L1s = (
|
||||
{
|
||||
num_cc = 1;
|
||||
tr_n_preference = "local_mac";
|
||||
prach_dtx_threshold = 150;
|
||||
prach_dtx_threshold = 120;
|
||||
pucch0_dtx_threshold = 150;
|
||||
ofdm_offset_divisor = 8; #set this to UINT_MAX for offset 0
|
||||
}
|
||||
@@ -237,32 +223,24 @@ RUs = (
|
||||
}
|
||||
);
|
||||
|
||||
THREAD_STRUCT = (
|
||||
{
|
||||
#three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT"
|
||||
parallel_config = "PARALLEL_RU_L1_TRX_SPLIT";
|
||||
#two option for worker "WORKER_DISABLE" or "WORKER_ENABLE"
|
||||
worker_config = "WORKER_DISABLE";
|
||||
}
|
||||
);
|
||||
|
||||
rfsimulator :
|
||||
{
|
||||
serveraddr = "server";
|
||||
serverport = 4043;
|
||||
options = ("chanmod"); #("saviq"); or/and "chanmod"
|
||||
prop_delay = 20;
|
||||
options = (); #("saviq"); or/and "chanmod"
|
||||
modelname = "AWGN";
|
||||
IQfile = "/tmp/rfsimulator.iqs";
|
||||
};
|
||||
|
||||
channelmod = {
|
||||
max_chan=10;
|
||||
modellist="modellist_rfsimu_1";
|
||||
modellist_rfsimu_1 = (
|
||||
{
|
||||
model_name = "rfsimu_channel_enB0"
|
||||
type = "SAT_LEO_TRANS";
|
||||
noise_power_dB = -100;
|
||||
},
|
||||
{
|
||||
model_name = "rfsimu_channel_ue0"
|
||||
type = "SAT_LEO_TRANS";
|
||||
noise_power_dB = -100;
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
security = {
|
||||
# preferred ciphering algorithms
|
||||
# the first one of the list that an UE supports in chosen
|
||||
@@ -289,4 +267,7 @@ log_config :
|
||||
rlc_log_level ="info";
|
||||
pdcp_log_level ="info";
|
||||
rrc_log_level ="info";
|
||||
ngap_log_level ="debug";
|
||||
f1ap_log_level ="debug";
|
||||
};
|
||||
|
||||
@@ -88,7 +88,7 @@ gNBs =
|
||||
#ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR
|
||||
#1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4;
|
||||
#one (0..15) 4,8,12,16,...60,64
|
||||
#oneHalf (0..15) 4,8,12,16,...60,64
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15;
|
||||
#ra_ContentionResolutionTimer
|
||||
#(0..7) 8,16,24,32,40,48,56,64
|
||||
@@ -91,8 +91,8 @@ gNBs =
|
||||
ra_ResponseWindow = 4;
|
||||
#ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR
|
||||
#1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4;
|
||||
#one (0..15) 4,8,12,16,...60,64
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 3;
|
||||
#oneHalf (0..15) 4,8,12,16,...60,64
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15;
|
||||
#ra_ContentionResolutionTimer
|
||||
#(0..7) 8,16,24,32,40,48,56,64
|
||||
|
||||
@@ -93,8 +93,8 @@ gNBs =
|
||||
ra_ResponseWindow = 4;
|
||||
#ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR
|
||||
#1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4;
|
||||
#one (0..15) 4,8,12,16,...60,64
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 3;
|
||||
#oneHalf (0..15) 4,8,12,16,...60,64
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15;
|
||||
#ra_ContentionResolutionTimer
|
||||
#(0..7) 8,16,24,32,40,48,56,64
|
||||
@@ -210,6 +210,8 @@ RUs = (
|
||||
max_pdschReferenceSignalPower = -27;
|
||||
max_rxgain = 75;
|
||||
eNB_instances = [0];
|
||||
##beamforming 1x2 matrix: 1 layer x 2 antennas
|
||||
bf_weights = [0x00007fff, 0x0000, 0x00007fff, 0x0000];
|
||||
#clock_src = "internal";
|
||||
sdr_addrs = "addr=192.168.80.53, clock_source=internal,time_source=internal"
|
||||
|
||||
@@ -18,12 +18,18 @@ gNBs =
|
||||
////////// Physical parameters:
|
||||
|
||||
pdsch_AntennaPorts_XP = 2;
|
||||
pdsch_AntennaPorts_N1 = 2;
|
||||
maxMIMO_layers = 4;
|
||||
pdsch_AntennaPorts_N1 = 1;
|
||||
maxMIMO_layers = 2;
|
||||
pusch_AntennaPorts = 4;
|
||||
do_CSIRS = 1;
|
||||
do_SRS = 0;
|
||||
force_UL256qam_off = 1;
|
||||
|
||||
pdcch_ConfigSIB1 = (
|
||||
{
|
||||
controlResourceSetZero = 11;
|
||||
searchSpaceZero = 0;
|
||||
}
|
||||
);
|
||||
|
||||
servingCellConfigCommon = (
|
||||
{
|
||||
@@ -31,12 +37,12 @@ gNBs =
|
||||
physCellId = 0;
|
||||
# downlinkConfigCommon
|
||||
#frequencyInfoDL
|
||||
# center frequency = 4049.76 MHz
|
||||
# selected SSB frequency = 4049.76 MHz
|
||||
absoluteFrequencySSB = 669984;
|
||||
# center frequency = 3999.36 MHz
|
||||
# selected SSB frequency = 3999.36 MHz
|
||||
absoluteFrequencySSB = 666624;
|
||||
dl_frequencyBand = 77;
|
||||
# frequency point A = 4000.62 MHz
|
||||
dl_absoluteFrequencyPointA = 666708;
|
||||
# frequency point A = 3950.22 MHz
|
||||
dl_absoluteFrequencyPointA = 663348;
|
||||
#scs-SpecificCarrierList
|
||||
dl_offstToCarrier = 0;
|
||||
# subcarrierSpacing
|
||||
@@ -89,8 +95,8 @@ gNBs =
|
||||
ra_ResponseWindow = 5;
|
||||
#ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR
|
||||
#1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4;
|
||||
#one (0..15) 4,8,12,16,...60,64
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 3;
|
||||
#oneHalf (0..15) 4,8,12,16,...60,64
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15;
|
||||
#ra_ContentionResolutionTimer
|
||||
#(0..7) 8,16,24,32,40,48,56,64
|
||||
@@ -178,8 +184,10 @@ MACRLCs = (
|
||||
num_cc = 1;
|
||||
tr_s_preference = "local_L1";
|
||||
tr_n_preference = "local_RRC";
|
||||
pusch_TargetSNRx10 = 200;
|
||||
pucch_TargetSNRx10 = 250;
|
||||
pusch_TargetSNRx10 = 180;
|
||||
pucch_TargetSNRx10 = 230;
|
||||
ul_bler_target_upper = .35;
|
||||
ul_bler_target_lower = .15;
|
||||
pusch_FailureThres = 100;
|
||||
}
|
||||
);
|
||||
@@ -211,7 +219,7 @@ RUs = (
|
||||
sf_extension = 0;
|
||||
eNB_instances = [0];
|
||||
ru_thread_core = 5;
|
||||
sl_ahead = 10;
|
||||
sl_ahead = 5;
|
||||
tr_preference = "raw_if4p5"; # important: activate FHI7.2
|
||||
do_precoding = 0; # needs to match O-RU configuration
|
||||
}
|
||||
@@ -249,11 +257,10 @@ log_config :
|
||||
|
||||
fhi_72 = {
|
||||
dpdk_devices = ("0000:c3:11.0", "0000:c3:11.1");
|
||||
dpdk_iova_mode = "VA";
|
||||
system_core = 0;
|
||||
io_core = 1;
|
||||
worker_cores = (2);
|
||||
ru_addr = ("98:ae:71:04:83:e3", "98:ae:71:04:83:e3");
|
||||
ru_addr = ("98:ae:71:01:c5:eb", "98:ae:71:01:c5:eb");
|
||||
mtu = 9600;
|
||||
fh_config = ({
|
||||
T1a_cp_dl = (285, 470);
|
||||
|
||||
@@ -1,255 +0,0 @@
|
||||
Active_gNBs = ( "oai-du");
|
||||
# Asn1_verbosity, choice in: none, info, annoying
|
||||
Asn1_verbosity = "none";
|
||||
gNBs =
|
||||
(
|
||||
{
|
||||
////////// Identification parameters:
|
||||
gNB_ID = 0xe00;
|
||||
gNB_name = "oai-du";
|
||||
// Tracking area code, 0x0000 and 0xfffe are reserved values
|
||||
tracking_area_code = 1;
|
||||
plmn_list = ({ mcc = 208; mnc = 97; mnc_length = 2; snssaiList = ( { sst = 1; }); });
|
||||
nr_cellid = 1;
|
||||
|
||||
////////// Physical parameters:
|
||||
pdsch_AntennaPorts_XP = 2;
|
||||
pusch_AntennaPorts = 4;
|
||||
pdsch_AntennaPorts_N1 = 2;
|
||||
maxMIMO_layers = 2;
|
||||
do_CSIRS = 1;
|
||||
do_SRS = 0;
|
||||
force_UL256qam_off = 1;
|
||||
|
||||
servingCellConfigCommon = (
|
||||
{
|
||||
#spCellConfigCommon
|
||||
physCellId = 0;
|
||||
# downlinkConfigCommon
|
||||
#frequencyInfoDL
|
||||
# this is 3300.24 + 134*12*30e3 = 3348.48 MHz (5G NR GSCN: 7741)
|
||||
absoluteFrequencySSB = 649920; #JF maybe we should adjust a bit
|
||||
dl_frequencyBand = 78;
|
||||
# this is 3300.24 MHz
|
||||
dl_absoluteFrequencyPointA = 646724;
|
||||
#scs-SpecificCarrierList
|
||||
dl_offstToCarrier = 0;
|
||||
# subcarrierSpacing
|
||||
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||
dl_subcarrierSpacing = 1;
|
||||
dl_carrierBandwidth = 273;
|
||||
#initialDownlinkBWP
|
||||
#genericParameters
|
||||
# this is RBstart=0,L=162 (275*(275-L+1))+(274-RBstart))
|
||||
initialDLBWPlocationAndBandwidth = 1099;
|
||||
#
|
||||
# subcarrierSpacing
|
||||
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||
initialDLBWPsubcarrierSpacing = 1;
|
||||
#pdcch-ConfigCommon
|
||||
initialDLBWPcontrolResourceSetZero = 12;
|
||||
initialDLBWPsearchSpaceZero = 0;
|
||||
#uplinkConfigCommon
|
||||
#frequencyInfoUL
|
||||
ul_frequencyBand = 78;
|
||||
#scs-SpecificCarrierList
|
||||
ul_offstToCarrier = 0;
|
||||
# subcarrierSpacing
|
||||
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||
ul_subcarrierSpacing = 1;
|
||||
ul_carrierBandwidth = 273;
|
||||
pMax = 20;
|
||||
#initialUplinkBWP
|
||||
#genericParameters
|
||||
initialULBWPlocationAndBandwidth = 1099;
|
||||
# subcarrierSpacing
|
||||
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||
initialULBWPsubcarrierSpacing = 1;
|
||||
#rach-ConfigCommon
|
||||
#rach-ConfigGeneric
|
||||
prach_ConfigurationIndex = 148; # JF check this and other PRACH related params
|
||||
#prach_msg1_FDM
|
||||
#0 = one, 1=two, 2=four, 3=eight
|
||||
prach_msg1_FDM = 0;
|
||||
prach_msg1_FrequencyStart = 0;
|
||||
zeroCorrelationZoneConfig = 12;
|
||||
preambleReceivedTargetPower = -96;
|
||||
#preamblTransMax (0...10) = (3,4,5,6,7,8,10,20,50,100,200)
|
||||
preambleTransMax = 6;
|
||||
#powerRampingStep
|
||||
# 0=dB0,1=dB2,2=dB4,3=dB6
|
||||
powerRampingStep = 1;
|
||||
#ra_ReponseWindow
|
||||
#1,2,4,8,10,20,40,80
|
||||
ra_ResponseWindow = 5;
|
||||
#ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR
|
||||
#1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4;
|
||||
#one (0..15) 4,8,12,16,...60,64
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15;
|
||||
#ra_ContentionResolutionTimer
|
||||
#(0..7) 8,16,24,32,40,48,56,64
|
||||
ra_ContentionResolutionTimer = 7;
|
||||
rsrp_ThresholdSSB = 19;
|
||||
#prach-RootSequenceIndex_PR
|
||||
#1 = 839, 2 = 139
|
||||
prach_RootSequenceIndex_PR = 2;
|
||||
prach_RootSequenceIndex = 1;
|
||||
# SCS for msg1, can only be 15 for 30 kHz < 6 GHz, takes precendence over the one derived from prach-ConfigIndex
|
||||
#
|
||||
msg1_SubcarrierSpacing = 1,
|
||||
# restrictedSetConfig
|
||||
# 0=unrestricted, 1=restricted type A, 2=restricted type B
|
||||
restrictedSetConfig = 0,
|
||||
msg3_DeltaPreamble = 1;
|
||||
p0_NominalWithGrant = -90;
|
||||
# pucch-ConfigCommon setup :
|
||||
# pucchGroupHopping
|
||||
# 0 = neither, 1= group hopping, 2=sequence hopping
|
||||
pucchGroupHopping = 0;
|
||||
hoppingId = 40;
|
||||
p0_nominal = -90;
|
||||
# ssb_PositionsInBurs_BitmapPR
|
||||
# 1=short, 2=medium, 3=long
|
||||
ssb_PositionsInBurst_Bitmap = 1;
|
||||
# ssb_periodicityServingCell
|
||||
# 0 = ms5, 1=ms10, 2=ms20, 3=ms40, 4=ms80, 5=ms160, 6=spare2, 7=spare1
|
||||
ssb_periodicityServingCell = 2;
|
||||
# dmrs_TypeA_position
|
||||
# 0 = pos2, 1 = pos3
|
||||
dmrs_TypeA_Position = 0;
|
||||
# subcarrierSpacing
|
||||
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||
subcarrierSpacing = 1;
|
||||
#tdd-UL-DL-ConfigurationCommon
|
||||
# subcarrierSpacing
|
||||
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||
referenceSubcarrierSpacing = 1;
|
||||
# pattern1
|
||||
# dl_UL_TransmissionPeriodicity
|
||||
# 0=ms0p5, 1=ms0p625, 2=ms1, 3=ms1p25, 4=ms2, 5=ms2p5, 6=ms5, 7=ms10
|
||||
dl_UL_TransmissionPeriodicity = 5; #6;
|
||||
nrofDownlinkSlots = 3; #7;
|
||||
nrofDownlinkSymbols = 6;
|
||||
nrofUplinkSlots = 1; #2;
|
||||
nrofUplinkSymbols = 4;
|
||||
ssPBCH_BlockPower = -10;
|
||||
}
|
||||
);
|
||||
# ------- SCTP definitions
|
||||
SCTP :
|
||||
{
|
||||
# Number of streams to use in input/output
|
||||
SCTP_INSTREAMS = 2;
|
||||
SCTP_OUTSTREAMS = 2;
|
||||
};
|
||||
|
||||
////////// AMF parameters:
|
||||
amf_ip_address = ({ ipv4 = "172.21.6.103"; });
|
||||
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
GNB_IPV4_ADDRESS_FOR_NG_AMF = "172.21.18.20";
|
||||
GNB_IPV4_ADDRESS_FOR_NGU = "172.21.18.20";
|
||||
GNB_PORT_FOR_S1U = 2152; # Spec 2152
|
||||
};
|
||||
}
|
||||
);
|
||||
MACRLCs = (
|
||||
{
|
||||
num_cc = 1;
|
||||
tr_s_preference = "local_L1";
|
||||
tr_n_preference = "local_RRC";
|
||||
pusch_TargetSNRx10 = 220;
|
||||
pucch_TargetSNRx10 = 220;
|
||||
ul_bler_target_upper=.35;
|
||||
ul_bler_target_lower=.15;
|
||||
pusch_FailureThres = 100;
|
||||
ul_max_mcs = 28;
|
||||
}
|
||||
);
|
||||
L1s = (
|
||||
{
|
||||
num_cc = 1;
|
||||
tr_n_preference = "local_mac";
|
||||
prach_dtx_threshold = 130;
|
||||
pucch0_dtx_threshold = 80;
|
||||
pusch_dtx_threshold = 10;
|
||||
max_ldpc_iterations = 10;
|
||||
tx_amp_backoff_dB = 12; #9; needs to match O-RU configuration # JF important to check
|
||||
L1_rx_thread_core = 3;
|
||||
L1_tx_thread_core = 4; # relevant after merge of l1_tx_thread
|
||||
phase_compensation = 0; # needs to match O-RU configuration # JF to be tested
|
||||
}
|
||||
);
|
||||
RUs = (
|
||||
{
|
||||
local_rf = "no";
|
||||
nb_tx = 4;
|
||||
nb_rx = 4;
|
||||
att_tx = 0
|
||||
att_rx = 0;
|
||||
bands = [78];
|
||||
max_pdschReferenceSignalPower = -27;
|
||||
max_rxgain = 75;
|
||||
sf_extension = 0;
|
||||
eNB_instances = [0];
|
||||
ru_thread_core = 6;
|
||||
sl_ahead = 10; #5;
|
||||
##beamforming 1x2 matrix: 1 layer x 2 antennas
|
||||
bf_weights = [0x00007fff, 0x0000,0x00007fff, 0x0000];
|
||||
tr_preference = "raw_if4p5"; # important: activate FHI7.2
|
||||
do_precoding = 0; # needs to match O-RU configuration
|
||||
}
|
||||
);
|
||||
|
||||
security = {
|
||||
# preferred ciphering algorithms
|
||||
# the first one of the list that an UE supports in chosen
|
||||
# valid values: nea0, nea1, nea2, nea3
|
||||
ciphering_algorithms = ( "nea0" );
|
||||
|
||||
# preferred integrity algorithms
|
||||
# the first one of the list that an UE supports in chosen
|
||||
# valid values: nia0, nia1, nia2, nia3
|
||||
integrity_algorithms = ( "nia2", "nia0" );
|
||||
|
||||
# setting 'drb_ciphering' to "no" disables ciphering for DRBs, no matter
|
||||
# what 'ciphering_algorithms' configures; same thing for 'drb_integrity'
|
||||
drb_ciphering = "yes";
|
||||
drb_integrity = "no";
|
||||
};
|
||||
|
||||
log_config :
|
||||
{
|
||||
global_log_level ="info";
|
||||
hw_log_level ="info";
|
||||
phy_log_level ="info";
|
||||
mac_log_level ="info";
|
||||
rlc_log_level ="info";
|
||||
pdcp_log_level ="info";
|
||||
rrc_log_level ="info";
|
||||
ngap_log_level ="info";
|
||||
f1ap_log_level ="info";
|
||||
};
|
||||
|
||||
fhi_72 = {
|
||||
dpdk_devices = ("0000:c3:11.0", "0000:c3:11.1");
|
||||
dpdk_iova_mode = "VA";
|
||||
system_core = 0;
|
||||
io_core = 1;
|
||||
worker_cores = (2);
|
||||
ru_addr = ("00:E0:0C:00:AE:06", "00:E0:0C:00:AE:06");
|
||||
mtu = 9000;
|
||||
fh_config = ({
|
||||
T1a_cp_dl = (285, 470);
|
||||
T1a_cp_ul = (285, 429);
|
||||
T1a_up = (125, 350);
|
||||
Ta4 = (110, 180);
|
||||
ru_config = {
|
||||
iq_width = 9;
|
||||
iq_width_prach = 9;
|
||||
};
|
||||
});
|
||||
};
|
||||
|
||||
@@ -91,8 +91,8 @@ gNBs = (
|
||||
ra_ResponseWindow = 4;
|
||||
# ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR
|
||||
# 1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4;
|
||||
# one (0..15) 4,8,12,16,...60,64
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 3;
|
||||
# oneHalf (0..15) 4,8,12,16,...60,64
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15;
|
||||
# ra_ContentionResolutionTimer
|
||||
# (0..7) 8,16,24,32,40,48,56,64
|
||||
|
||||
@@ -26,6 +26,14 @@ gNBs =
|
||||
pdsch_AntennaPorts_XP = 1;
|
||||
pusch_AntennaPorts = 1;
|
||||
|
||||
|
||||
pdcch_ConfigSIB1 = (
|
||||
{
|
||||
controlResourceSetZero = 12;
|
||||
searchSpaceZero = 0;
|
||||
}
|
||||
);
|
||||
|
||||
servingCellConfigCommon = (
|
||||
{
|
||||
#spCellConfigCommon
|
||||
@@ -89,8 +97,8 @@ gNBs =
|
||||
ra_ResponseWindow = 4;
|
||||
#ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR
|
||||
#1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4;
|
||||
#one (0..15) 4,8,12,16,...60,64
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 3;
|
||||
#oneHalf (0..15) 4,8,12,16,...60,64
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15;
|
||||
#ra_ContentionResolutionTimer
|
||||
#(0..7) 8,16,24,32,40,48,56,64
|
||||
|
||||
@@ -91,8 +91,8 @@ gNBs =
|
||||
ra_ResponseWindow = 5;
|
||||
#ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR
|
||||
#1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4;
|
||||
#one (0..15) 4,8,12,16,...60,64
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 3;
|
||||
#oneHalf (0..15) 4,8,12,16,...60,64
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15;
|
||||
#ra_ContentionResolutionTimer
|
||||
#(0..7) 8,16,24,32,40,48,56,64
|
||||
|
||||
@@ -85,8 +85,8 @@ gNBs =
|
||||
ra_ResponseWindow = 4;
|
||||
#ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR
|
||||
#1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4;
|
||||
#one (0..15) 4,8,12,16,...60,64
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 3;
|
||||
#oneHalf (0..15) 4,8,12,16,...60,64
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15;
|
||||
#ra_ContentionResolutionTimer
|
||||
#(0..7) 8,16,24,32,40,48,56,64
|
||||
|
||||
@@ -21,6 +21,12 @@ gNBs =
|
||||
do_CSIRS = 0;
|
||||
do_SRS = 0;
|
||||
min_rxtxtime = 6;
|
||||
pdcch_ConfigSIB1 = (
|
||||
{
|
||||
controlResourceSetZero = 12;
|
||||
searchSpaceZero = 0;
|
||||
}
|
||||
);
|
||||
|
||||
servingCellConfigCommon = (
|
||||
{
|
||||
@@ -88,7 +94,7 @@ gNBs =
|
||||
#ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR
|
||||
#1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4;
|
||||
#one (0..15) 4,8,12,16,...60,64
|
||||
#oneHalf (0..15) 4,8,12,16,...60,64
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 14;
|
||||
#ra_ContentionResolutionTimer
|
||||
#(0..7) 8,16,24,32,40,48,56,64
|
||||
|
||||
@@ -77,8 +77,8 @@ gNBs:
|
||||
ra_ResponseWindow: 5
|
||||
#ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR
|
||||
#1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR: 4
|
||||
#one (0..15) 4,8,12,16,...60,64
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR: 3
|
||||
#oneHalf (0..15) 4,8,12,16,...60,64
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB: 15
|
||||
#ra_ContentionResolutionTimer
|
||||
#(0..7) 8,16,24,32,40,48,56,64
|
||||
|
||||
@@ -90,8 +90,8 @@ gNBs =
|
||||
ra_ResponseWindow = 4;
|
||||
#ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR
|
||||
#1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4;
|
||||
#one (0..15) 4,8,12,16,...60,64
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 3;
|
||||
#oneHalf (0..15) 4,8,12,16,...60,64
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15;
|
||||
#ra_ContentionResolutionTimer
|
||||
#(0..7) 8,16,24,32,40,48,56,64
|
||||
|
||||
@@ -66,7 +66,7 @@ gNBs =
|
||||
initialULBWPsubcarrierSpacing = 1;
|
||||
#rach-ConfigCommon
|
||||
#rach-ConfigGeneric
|
||||
prach_ConfigurationIndex = 154;
|
||||
prach_ConfigurationIndex = 98;
|
||||
#prach_msg1_FDM
|
||||
#0 = one, 1=two, 2=four, 3=eight
|
||||
prach_msg1_FDM = 0;
|
||||
@@ -83,8 +83,8 @@ gNBs =
|
||||
ra_ResponseWindow = 4;
|
||||
#ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR
|
||||
#1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 2;
|
||||
#one (0..15) 4,8,12,16,...60,64
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4;
|
||||
#oneHalf (0..15) 4,8,12,16,...60,64
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 14;
|
||||
#ra_ContentionResolutionTimer
|
||||
#(0..7) 8,16,24,32,40,48,56,64
|
||||
@@ -133,21 +133,11 @@ gNBs =
|
||||
# pattern1
|
||||
# dl_UL_TransmissionPeriodicity
|
||||
# 0=ms0p5, 1=ms0p625, 2=ms1, 3=ms1p25, 4=ms2, 5=ms2p5, 6=ms5, 7=ms10
|
||||
# ext: 8=ms3, 9=ms4
|
||||
dl_UL_TransmissionPeriodicity = 8;
|
||||
nrofDownlinkSlots = 3;
|
||||
nrofDownlinkSymbols = 6;
|
||||
nrofUplinkSlots = 2;
|
||||
nrofUplinkSymbols = 4;
|
||||
|
||||
# pattern2
|
||||
pattern2: {
|
||||
dl_UL_TransmissionPeriodicity2 = 4;
|
||||
nrofDownlinkSlots2 = 4;
|
||||
nrofDownlinkSymbols2 = 0;
|
||||
nrofUplinkSlots2 = 0;
|
||||
nrofUplinkSymbols2 = 0;
|
||||
};
|
||||
dl_UL_TransmissionPeriodicity = 6;
|
||||
nrofDownlinkSlots = 7;
|
||||
nrofDownlinkSymbols = 6;
|
||||
nrofUplinkSlots = 2;
|
||||
nrofUplinkSymbols = 4;
|
||||
|
||||
ssPBCH_BlockPower = -25;
|
||||
}
|
||||
@@ -192,9 +182,8 @@ L1s = (
|
||||
{
|
||||
num_cc = 1;
|
||||
tr_n_preference = "local_mac";
|
||||
prach_dtx_threshold = 150;
|
||||
prach_dtx_threshold = 120;
|
||||
pucch0_dtx_threshold = 30;
|
||||
max_ldpc_iterations = 15;
|
||||
ofdm_offset_divisor = 8; #set this to UINT_MAX for offset 0
|
||||
}
|
||||
);
|
||||
@@ -204,11 +193,11 @@ RUs = (
|
||||
local_rf = "yes"
|
||||
nb_tx = 1
|
||||
nb_rx = 1
|
||||
att_tx = 6;
|
||||
att_rx = 6;
|
||||
att_tx = 10;
|
||||
att_rx = 10;
|
||||
bands = [78];
|
||||
max_pdschReferenceSignalPower = -27;
|
||||
max_rxgain = 110;
|
||||
max_rxgain = 114;
|
||||
eNB_instances = [0];
|
||||
clock_src = "internal";
|
||||
}
|
||||
|
||||
@@ -103,8 +103,8 @@ gNBs =
|
||||
ra_ResponseWindow = 4;
|
||||
#ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR
|
||||
#1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4;
|
||||
#one (0..15) 4,8,12,16,...60,64
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 3;
|
||||
#oneHalf (0..15) 4,8,12,16,...60,64
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15;
|
||||
#ra_ContentionResolutionTimer
|
||||
#(0..7) 8,16,24,32,40,48,56,64
|
||||
|
||||
@@ -104,8 +104,8 @@ gNBs =
|
||||
ra_ResponseWindow = 4;
|
||||
#ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR
|
||||
#1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4;
|
||||
#one (0..15) 4,8,12,16,...60,64
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 3;
|
||||
#oneHalf (0..15) 4,8,12,16,...60,64
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15;
|
||||
#ra_ContentionResolutionTimer
|
||||
#(0..7) 8,16,24,32,40,48,56,64
|
||||
|
||||
@@ -86,7 +86,7 @@ gNBs =
|
||||
#ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR
|
||||
#1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4;
|
||||
#one (0..15) 4,8,12,16,...60,64
|
||||
#oneHalf (0..15) 4,8,12,16,...60,64
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 14;
|
||||
#ra_ContentionResolutionTimer
|
||||
#(0..7) 8,16,24,32,40,48,56,64
|
||||
|
||||
@@ -26,6 +26,13 @@ gNBs =
|
||||
sib1_tda = 15;
|
||||
# force_UL256qam_off = 1;
|
||||
|
||||
pdcch_ConfigSIB1 = (
|
||||
{
|
||||
controlResourceSetZero = 11;
|
||||
searchSpaceZero = 0;
|
||||
}
|
||||
);
|
||||
|
||||
servingCellConfigCommon = (
|
||||
{
|
||||
#spCellConfigCommon
|
||||
@@ -75,7 +82,7 @@ gNBs =
|
||||
initialULBWPsubcarrierSpacing = 1;
|
||||
#rach-ConfigCommon
|
||||
#rach-ConfigGeneric
|
||||
prach_ConfigurationIndex = 152;
|
||||
prach_ConfigurationIndex = 151;
|
||||
#prach_msg1_FDM
|
||||
#0 = one, 1=two, 2=four, 3=eight
|
||||
prach_msg1_FDM = 0;
|
||||
@@ -92,8 +99,8 @@ gNBs =
|
||||
ra_ResponseWindow = 5;
|
||||
#ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR
|
||||
#1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4;
|
||||
#one (0..15) 4,8,12,16,...60,64
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 3;
|
||||
#oneHalf (0..15) 4,8,12,16,...60,64
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15;
|
||||
#ra_ContentionResolutionTimer
|
||||
#(0..7) 8,16,24,32,40,48,56,64
|
||||
|
||||
@@ -88,8 +88,8 @@ gNBs =
|
||||
ra_ResponseWindow = 5;
|
||||
#ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR
|
||||
#1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4;
|
||||
#one (0..15) 4,8,12,16,...60,64
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 3;
|
||||
#oneHalf (0..15) 4,8,12,16,...60,64
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15;
|
||||
#ra_ContentionResolutionTimer
|
||||
#(0..7) 8,16,24,32,40,48,56,64
|
||||
|
||||
@@ -75,7 +75,7 @@ gNBs =
|
||||
initialULBWPsubcarrierSpacing = 1;
|
||||
#rach-ConfigCommon
|
||||
#rach-ConfigGeneric
|
||||
prach_ConfigurationIndex = 101;
|
||||
prach_ConfigurationIndex = 100;
|
||||
#prach_msg1_FDM
|
||||
#0 = one, 1=two, 2=four, 3=eight
|
||||
prach_msg1_FDM = 0;
|
||||
@@ -92,8 +92,8 @@ gNBs =
|
||||
ra_ResponseWindow = 4;
|
||||
#ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR
|
||||
#1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4;
|
||||
#one (0..15) 4,8,12,16,...60,64
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 3;
|
||||
#oneHalf (0..15) 4,8,12,16,...60,64
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15;
|
||||
#ra_ContentionResolutionTimer
|
||||
#(0..7) 8,16,24,32,40,48,56,64
|
||||
|
||||
@@ -75,7 +75,7 @@ gNBs =
|
||||
initialULBWPsubcarrierSpacing = 1;
|
||||
#rach-ConfigCommon
|
||||
#rach-ConfigGeneric
|
||||
prach_ConfigurationIndex = 101;
|
||||
prach_ConfigurationIndex = 100;
|
||||
#prach_msg1_FDM
|
||||
#0 = one, 1=two, 2=four, 3=eight
|
||||
prach_msg1_FDM = 0;
|
||||
@@ -92,8 +92,8 @@ gNBs =
|
||||
ra_ResponseWindow = 4;
|
||||
#ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR
|
||||
#1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4;
|
||||
#one (0..15) 4,8,12,16,...60,64
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 3;
|
||||
#oneHalf (0..15) 4,8,12,16,...60,64
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15;
|
||||
#ra_ContentionResolutionTimer
|
||||
#(0..7) 8,16,24,32,40,48,56,64
|
||||
|
||||
@@ -26,11 +26,11 @@ gNBs =
|
||||
|
||||
# downlinkConfigCommon
|
||||
#frequencyInfoDL
|
||||
# this is 3610.56 MHz
|
||||
absoluteFrequencySSB = 640704;
|
||||
# this is 3300.30 MHz + (19 PRBs + 10 SCs)@30kHz SCS (GSCN: 7715)
|
||||
absoluteFrequencySSB = 620736;
|
||||
dl_frequencyBand = 78;
|
||||
# this is 3599.94 MHz
|
||||
dl_absoluteFrequencyPointA = 639996;
|
||||
# this is 3300.30 MHz
|
||||
dl_absoluteFrequencyPointA = 620020;
|
||||
#scs-SpecificCarrierList
|
||||
dl_offstToCarrier = 0;
|
||||
# subcarrierSpacing
|
||||
@@ -84,7 +84,7 @@ gNBs =
|
||||
#ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR
|
||||
#1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4;
|
||||
#one (0..15) 4,8,12,16,...60,64
|
||||
#oneHalf (0..15) 4,8,12,16,...60,64
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 14;
|
||||
#ra_ContentionResolutionTimer
|
||||
#(0..7) 8,16,24,32,40,48,56,64
|
||||
|
||||
@@ -6,12 +6,6 @@ uicc0 = {
|
||||
nssai_sst=1;
|
||||
}
|
||||
|
||||
position0 = {
|
||||
x = 0.0;
|
||||
y = 0.0;
|
||||
z = 6377900.0;
|
||||
}
|
||||
|
||||
thread-pool = "-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1"
|
||||
|
||||
#/* configuration for channel modelisation */
|
||||
@@ -40,4 +34,4 @@ channelmod = {
|
||||
ds_tdl = 0;
|
||||
}
|
||||
);
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
uicc0 = {
|
||||
imsi = "208990100001100";
|
||||
key = "fec86ba6eb707ed08905757b1bb44b8f";
|
||||
opc= "C42449363BBAD02B66D16BC975D77CC1";
|
||||
dnn= "oai";
|
||||
nssai_sst=1;
|
||||
}
|
||||
|
||||
position0 = {
|
||||
x = 0.0;
|
||||
y = 0.0;
|
||||
z = 6377900.0;
|
||||
}
|
||||
|
||||
thread-pool = "-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1"
|
||||
|
||||
#/* configuration for channel modelisation */
|
||||
#/* To be included in main config file when */
|
||||
#/* channel modelisation is used (rfsimulator with chanmod options enabled) */
|
||||
channelmod = {
|
||||
max_chan = 10;
|
||||
modellist = "modellist_rfsimu_1";
|
||||
modellist_rfsimu_1 = (
|
||||
{ # DL, modify on UE side
|
||||
model_name = "rfsimu_channel_enB0"
|
||||
type = "SAT_LEO_TRANS";
|
||||
noise_power_dB = -100;
|
||||
},
|
||||
{ # UL, modify on gNB side
|
||||
model_name = "rfsimu_channel_ue0"
|
||||
type = "SAT_LEO_TRANS";
|
||||
noise_power_dB = -100;
|
||||
}
|
||||
);
|
||||
};
|
||||
@@ -9,14 +9,14 @@ ColNames :
|
||||
Ref :
|
||||
feprx : 150.0
|
||||
feptx_prec : 0.0
|
||||
feptx_ofdm : 60.0
|
||||
feptx_total : 150.0
|
||||
L1 Tx processing : 530.0
|
||||
DLSCH encoding : 220.0
|
||||
L1 Rx processing : 530.0
|
||||
PUSCH inner-receiver : 360.0
|
||||
feptx_ofdm : 65.0
|
||||
feptx_total : 177.0
|
||||
L1 Tx processing : 700.0
|
||||
DLSCH encoding : 226.0
|
||||
L1 Rx processing : 640.0
|
||||
PUSCH inner-receiver : 400.0
|
||||
Schedule Response : 3.0
|
||||
DL & UL scheduling timing : 17.0
|
||||
DL & UL scheduling timing : 15.0
|
||||
UL Indication : 3.0
|
||||
Slot Indication : 17.0
|
||||
DeviationThreshold :
|
||||
|
||||
@@ -7,16 +7,16 @@ ColNames :
|
||||
- Average; Max; Count
|
||||
- Average vs Reference Deviation (Reference Value; Acceptability Deviation Threshold)
|
||||
Ref :
|
||||
feprx : 40.0
|
||||
feprx : 46.0
|
||||
feptx_prec : 15.0
|
||||
feptx_ofdm : 30.0
|
||||
feptx_total : 45.0
|
||||
L1 Tx processing : 205.0
|
||||
DLSCH encoding : 140.0
|
||||
L1 Rx processing : 345.0
|
||||
PUSCH inner-receiver : 150.0
|
||||
feptx_ofdm : 35.0
|
||||
feptx_total : 57.0
|
||||
L1 Tx processing : 260.0
|
||||
DLSCH encoding : 160.0
|
||||
L1 Rx processing : 420.0
|
||||
PUSCH inner-receiver : 170.0
|
||||
Schedule Response : 3.0
|
||||
DL & UL scheduling timing : 7.0
|
||||
DL & UL scheduling timing : 8.0
|
||||
UL Indication : 3.0
|
||||
Slot Indication : 8.0
|
||||
DeviationThreshold :
|
||||
|
||||
@@ -7,18 +7,18 @@ ColNames :
|
||||
- Average; Max; Count
|
||||
- Average vs Reference Deviation (Reference Value; Acceptability Deviation Threshold)
|
||||
Ref :
|
||||
feprx : 75.0
|
||||
feprx : 84.0
|
||||
feptx_prec : 14.0
|
||||
feptx_ofdm : 30.0
|
||||
feptx_total : 80.0
|
||||
L1 Tx processing : 315.0
|
||||
DLSCH encoding : 155.0
|
||||
feptx_ofdm : 35.0
|
||||
feptx_total : 100.0
|
||||
L1 Tx processing : 400.0
|
||||
DLSCH encoding : 177.0
|
||||
L1 Rx processing : 345.0
|
||||
PUSCH inner-receiver : 155.0
|
||||
PUSCH inner-receiver : 200.0
|
||||
Schedule Response : 3.0
|
||||
DL & UL scheduling timing : 13.0
|
||||
UL Indication : 3.0
|
||||
Slot Indication : 12.0
|
||||
Slot Indication : 15.0
|
||||
DeviationThreshold :
|
||||
feprx : 0.25
|
||||
feptx_prec : 0.25
|
||||
|
||||
@@ -7,17 +7,17 @@ ColNames :
|
||||
- Average; Max; Count
|
||||
- Average vs Reference Deviation (Reference Value; Acceptability Deviation Threshold)
|
||||
Ref :
|
||||
feprx : 40.0
|
||||
feprx : 43.0
|
||||
feptx_prec : 13.0
|
||||
feptx_ofdm : 30.0
|
||||
feptx_total : 45.0
|
||||
L1 Tx processing : 160.0
|
||||
feptx_ofdm : 33.0
|
||||
feptx_total : 55.0
|
||||
L1 Tx processing : 200.0
|
||||
DLSCH encoding : 100.0
|
||||
L1 Rx processing : 290.0
|
||||
PUSCH inner-receiver : 115.0
|
||||
L1 Rx processing : 330.0
|
||||
PUSCH inner-receiver : 120.0
|
||||
Schedule Response : 3.0
|
||||
DL & UL scheduling timing : 6.0
|
||||
UL Indication : 2.0
|
||||
UL Indication : 3.0
|
||||
Slot Indication : 7.0
|
||||
DeviationThreshold :
|
||||
feprx : 0.25
|
||||
|
||||
934
ci-scripts/epc.py
Normal file
934
ci-scripts/epc.py
Normal file
@@ -0,0 +1,934 @@
|
||||
#/*
|
||||
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
# * contributor license agreements. See the NOTICE file distributed with
|
||||
# * this work for additional information regarding copyright ownership.
|
||||
# * The OpenAirInterface Software Alliance licenses this file to You under
|
||||
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
# * except in compliance with the License.
|
||||
# * You may obtain a copy of the License at
|
||||
# *
|
||||
# * http://www.openairinterface.org/?page_id=698
|
||||
# *
|
||||
# * Unless required by applicable law or agreed to in writing, software
|
||||
# * distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# * See the License for the specific language governing permissions and
|
||||
# * limitations under the License.
|
||||
# *-------------------------------------------------------------------------------
|
||||
# * For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
# * contact@openairinterface.org
|
||||
# */
|
||||
#---------------------------------------------------------------------
|
||||
# Python for CI of OAI-eNB + COTS-UE
|
||||
#
|
||||
# Required Python Version
|
||||
# Python 3.x
|
||||
#
|
||||
# Required Python Package
|
||||
# pexpect
|
||||
#---------------------------------------------------------------------
|
||||
|
||||
#-----------------------------------------------------------
|
||||
# Import
|
||||
#-----------------------------------------------------------
|
||||
import sys # arg
|
||||
import re # reg
|
||||
import logging
|
||||
import os
|
||||
import time
|
||||
import signal
|
||||
|
||||
#-----------------------------------------------------------
|
||||
# OAI Testing modules
|
||||
#-----------------------------------------------------------
|
||||
import sshconnection as SSH
|
||||
import helpreadme as HELP
|
||||
import constants as CONST
|
||||
import cls_cluster as OC
|
||||
import cls_cmd
|
||||
import cls_module
|
||||
#-----------------------------------------------------------
|
||||
# Class Declaration
|
||||
#-----------------------------------------------------------
|
||||
|
||||
|
||||
class EPCManagement():
|
||||
|
||||
def __init__(self):
|
||||
|
||||
self.IPAddress = ''
|
||||
self.UserName = ''
|
||||
self.Password = ''
|
||||
self.SourceCodePath = ''
|
||||
self.Type = ''
|
||||
self.PcapFileName = ''
|
||||
self.testCase_id = ''
|
||||
self.MmeIPAddress = ''
|
||||
self.containerPrefix = 'prod'
|
||||
self.mmeConfFile = 'mme.conf'
|
||||
self.yamlPath = ''
|
||||
self.isMagmaUsed = False
|
||||
self.cfgDeploy = '--type start-mini --scenario 1 --capture /tmp/oai-cn5g-v1.5.pcap' #from xml, 'mini' is default normal for docker-network.py
|
||||
self.cfgUnDeploy = '--type stop-mini --scenario 1' #from xml, 'mini' is default normal for docker-network.py
|
||||
self.OCUrl = "https://api.oai.cs.eurecom.fr:6443"
|
||||
self.OCRegistry = "default-route-openshift-image-registry.apps.oai.cs.eurecom.fr"
|
||||
self.OCUserName = ''
|
||||
self.OCPassword = ''
|
||||
self.cnID = ''
|
||||
self.imageToPull = ''
|
||||
self.eNBSourceCodePath = ''
|
||||
|
||||
#-----------------------------------------------------------
|
||||
# EPC management functions
|
||||
#-----------------------------------------------------------
|
||||
|
||||
def InitializeHSS(self, HTML):
|
||||
if self.IPAddress == '' or self.UserName == '' or self.Password == '' or self.SourceCodePath == '' or self.Type == '':
|
||||
HELP.GenericHelp(CONST.Version)
|
||||
HELP.EPCSrvHelp(self.IPAddress, self.UserName, self.Password, self.SourceCodePath, self.Type)
|
||||
sys.exit('Insufficient EPC Parameters')
|
||||
mySSH = SSH.SSHConnection()
|
||||
mySSH.open(self.IPAddress, self.UserName, self.Password)
|
||||
if re.match('OAI-Rel14-Docker', self.Type, re.IGNORECASE):
|
||||
logging.debug('Using the OAI EPC Release 14 Cassandra-based HSS in Docker')
|
||||
mySSH.command('if [ -d ' + self.SourceCodePath + '/scripts ]; then echo ' + self.Password + ' | sudo -S rm -Rf ' + self.SourceCodePath + '/scripts ; fi', '\$', 5)
|
||||
mySSH.command('mkdir -p ' + self.SourceCodePath + '/scripts', '\$', 5)
|
||||
mySSH.command('docker exec -d ' + self.containerPrefix + '-oai-hss /bin/bash -c "nohup tshark -i eth0 -i eth1 -w /tmp/hss_check_run.pcap 2>&1 > /dev/null"', '\$', 5)
|
||||
time.sleep(5)
|
||||
mySSH.command('docker exec -d ' + self.containerPrefix + '-oai-hss /bin/bash -c "nohup ./bin/oai_hss -j ./etc/hss_rel14.json --reloadkey true > hss_check_run.log 2>&1"', '\$', 5)
|
||||
elif re.match('OAI-Rel14-CUPS', self.Type, re.IGNORECASE):
|
||||
logging.debug('Using the OAI EPC Release 14 Cassandra-based HSS')
|
||||
mySSH.command('cd ' + self.SourceCodePath + '/scripts', '\$', 5)
|
||||
logging.debug('\u001B[1m Launching tshark on all interfaces \u001B[0m')
|
||||
self.PcapFileName = 'epc_' + self.testCase_id + '.pcap'
|
||||
mySSH.command('echo ' + self.Password + ' | sudo -S rm -f ' + self.PcapFileName, '\$', 5)
|
||||
mySSH.command('echo $USER; nohup sudo tshark -f "tcp port not 22 and port not 53" -i any -w ' + self.SourceCodePath + '/scripts/' + self.PcapFileName + ' > /tmp/tshark.log 2>&1 &', self.UserName, 5)
|
||||
mySSH.command('echo ' + self.Password + ' | sudo -S mkdir -p logs', '\$', 5)
|
||||
mySSH.command('echo ' + self.Password + ' | sudo -S rm -f hss_' + self.testCase_id + '.log logs/hss*.*', '\$', 5)
|
||||
mySSH.command('echo "oai_hss -j /usr/local/etc/oai/hss_rel14.json" > ./my-hss.sh', '\$', 5)
|
||||
mySSH.command('chmod 755 ./my-hss.sh', '\$', 5)
|
||||
mySSH.command('sudo daemon --unsafe --name=hss_daemon --chdir=' + self.SourceCodePath + '/scripts -o ' + self.SourceCodePath + '/scripts/hss_' + self.testCase_id + '.log ./my-hss.sh', '\$', 5)
|
||||
elif re.match('OAI', self.Type, re.IGNORECASE):
|
||||
logging.debug('Using the OAI EPC HSS')
|
||||
mySSH.command('cd ' + self.SourceCodePath, '\$', 5)
|
||||
mySSH.command('source oaienv', '\$', 5)
|
||||
mySSH.command('cd scripts', '\$', 5)
|
||||
mySSH.command('echo ' + self.Password + ' | sudo -S ./run_hss 2>&1 | stdbuf -o0 awk \'{ print strftime("[%Y/%m/%d %H:%M:%S] ",systime()) $0 }\' | stdbuf -o0 tee -a hss_' + self.testCase_id + '.log &', 'Core state: 2 -> 3', 35)
|
||||
elif re.match('ltebox', self.Type, re.IGNORECASE):
|
||||
logging.debug('Using the ltebox simulated HSS')
|
||||
mySSH.command('if [ -d ' + self.SourceCodePath + '/scripts ]; then echo ' + self.Password + ' | sudo -S rm -Rf ' + self.SourceCodePath + '/scripts ; fi', '\$', 5)
|
||||
mySSH.command('mkdir -p ' + self.SourceCodePath + '/scripts', '\$', 5)
|
||||
result = re.search('hss_sim s6as diam_hss', mySSH.getBefore())
|
||||
if result is not None:
|
||||
mySSH.command('echo ' + self.Password + ' | sudo -S killall hss_sim', '\$', 5)
|
||||
mySSH.command('ps aux | grep --colour=never xGw | grep -v grep', '\$', 5, silent=True)
|
||||
result = re.search('root.*xGw', mySSH.getBefore())
|
||||
if result is not None:
|
||||
mySSH.command('cd /opt/ltebox/tools', '\$', 5)
|
||||
mySSH.command('echo ' + self.Password + ' | sudo -S ./stop_ltebox', '\$', 5)
|
||||
mySSH.command('cd /opt/hss_sim0609', '\$', 5)
|
||||
mySSH.command('echo ' + self.Password + ' | sudo -S rm -f hss.log', '\$', 5)
|
||||
mySSH.command('echo ' + self.Password + ' | sudo -S echo "Starting sudo session" && sudo su -c "screen -dm -S simulated_hss ./starthss"', '\$', 5)
|
||||
else:
|
||||
logging.error('This option should not occur!')
|
||||
mySSH.close()
|
||||
HTML.CreateHtmlTestRow(self.Type, 'OK', CONST.ALL_PROCESSES_OK)
|
||||
return True
|
||||
|
||||
def InitializeMME(self, HTML):
|
||||
if self.IPAddress == '' or self.UserName == '' or self.Password == '' or self.SourceCodePath == '' or self.Type == '':
|
||||
HELP.GenericHelp(CONST.Version)
|
||||
HELP.EPCSrvHelp(self.IPAddress, self.UserName, self.Password, self.SourceCodePath, self.Type)
|
||||
sys.exit('Insufficient EPC Parameters')
|
||||
mySSH = SSH.SSHConnection()
|
||||
mySSH.open(self.IPAddress, self.UserName, self.Password)
|
||||
if re.match('OAI-Rel14-Docker', self.Type, re.IGNORECASE):
|
||||
logging.debug('Using the OAI EPC Release 14 MME in Docker')
|
||||
mySSH.command('docker exec -d ' + self.containerPrefix + '-oai-mme /bin/bash -c "nohup tshark -i eth0 -i lo:s10 -f "not port 2152" -w /tmp/mme_check_run.pcap 2>&1 > /dev/null"', '\$', 5)
|
||||
time.sleep(5)
|
||||
mySSH.command('docker exec -d ' + self.containerPrefix + '-oai-mme /bin/bash -c "nohup ./bin/oai_mme -c ./etc/' + self.mmeConfFile + ' > mme_check_run.log 2>&1"', '\$', 5)
|
||||
elif re.match('OAI-Rel14-CUPS', self.Type, re.IGNORECASE):
|
||||
logging.debug('Using the OAI EPC Release 14 MME')
|
||||
mySSH.command('cd ' + self.SourceCodePath + '/scripts', '\$', 5)
|
||||
mySSH.command('echo ' + self.Password + ' | sudo -S rm -f mme_' + self.testCase_id + '.log', '\$', 5)
|
||||
mySSH.command('echo "./run_mme --config-file /usr/local/etc/oai/mme.conf --set-virt-if" > ./my-mme.sh', '\$', 5)
|
||||
mySSH.command('chmod 755 ./my-mme.sh', '\$', 5)
|
||||
mySSH.command('sudo daemon --unsafe --name=mme_daemon --chdir=' + self.SourceCodePath + '/scripts -o ' + self.SourceCodePath + '/scripts/mme_' + self.testCase_id + '.log ./my-mme.sh', '\$', 5)
|
||||
elif re.match('OAI', self.Type, re.IGNORECASE):
|
||||
mySSH.command('cd ' + self.SourceCodePath, '\$', 5)
|
||||
mySSH.command('source oaienv', '\$', 5)
|
||||
mySSH.command('cd scripts', '\$', 5)
|
||||
mySSH.command('stdbuf -o0 hostname', '\$', 5)
|
||||
result = re.search('hostname\\\\r\\\\n(?P<host_name>[a-zA-Z0-9\-\_]+)\\\\r\\\\n', mySSH.getBefore())
|
||||
if result is None:
|
||||
logging.debug('\u001B[1;37;41m Hostname Not Found! \u001B[0m')
|
||||
sys.exit(1)
|
||||
host_name = result.group('host_name')
|
||||
mySSH.command('echo ' + self.Password + ' | sudo -S ./run_mme 2>&1 | stdbuf -o0 tee -a mme_' + self.testCase_id + '.log &', 'MME app initialization complete', 100)
|
||||
elif re.match('ltebox', self.Type, re.IGNORECASE):
|
||||
mySSH.command('cd /opt/ltebox/tools', '\$', 5)
|
||||
# Clean-up the logs from previous runs
|
||||
mySSH.command('echo ' + self.Password + ' | sudo -S rm -f ../var/log/*.0', '\$', 5)
|
||||
mySSH.command('echo ' + self.Password + ' | sudo -S ./start_mme', '\$', 5)
|
||||
else:
|
||||
logging.error('This option should not occur!')
|
||||
mySSH.close()
|
||||
HTML.CreateHtmlTestRow(self.Type, 'OK', CONST.ALL_PROCESSES_OK)
|
||||
return True
|
||||
|
||||
def SetMmeIPAddress(self):
|
||||
# Not an error if we don't need an EPC
|
||||
if self.IPAddress == '' or self.UserName == '' or self.Password == '' or self.SourceCodePath == '' or self.Type == '':
|
||||
return
|
||||
if self.IPAddress == 'none':
|
||||
return
|
||||
# Only in case of Docker containers, MME IP address is not the EPC HOST IP address
|
||||
if re.match('OAI-Rel14-Docker', self.Type, re.IGNORECASE):
|
||||
mySSH = SSH.SSHConnection()
|
||||
mySSH.open(self.IPAddress, self.UserName, self.Password)
|
||||
self.isMagmaUsed = False
|
||||
mySSH.command('docker ps -a', '\$', 5)
|
||||
result = re.search('magma', mySSH.getBefore())
|
||||
if result is not None:
|
||||
self.isMagmaUsed = True
|
||||
if self.isMagmaUsed:
|
||||
mySSH.command('docker inspect --format="MME_IP_ADDR = {{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}" ' + self.containerPrefix + '-magma-mme', '\$', 5)
|
||||
else:
|
||||
mySSH.command('docker inspect --format="MME_IP_ADDR = {{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}" ' + self.containerPrefix + '-oai-mme', '\$', 5)
|
||||
result = re.search('MME_IP_ADDR = (?P<mme_ip_addr>[0-9\.]+)', mySSH.getBefore())
|
||||
if result is not None:
|
||||
self.MmeIPAddress = result.group('mme_ip_addr')
|
||||
logging.debug('MME IP Address is ' + self.MmeIPAddress)
|
||||
mySSH.close()
|
||||
else:
|
||||
self.MmeIPAddress = self.IPAddress
|
||||
|
||||
def InitializeSPGW(self, HTML):
|
||||
if self.IPAddress == '' or self.UserName == '' or self.Password == '' or self.SourceCodePath == '' or self.Type == '':
|
||||
HELP.GenericHelp(CONST.Version)
|
||||
HELP.EPCSrvHelp(self.IPAddress, self.UserName, self.Password, self.SourceCodePath, self.Type)
|
||||
sys.exit('Insufficient EPC Parameters')
|
||||
mySSH = SSH.SSHConnection()
|
||||
mySSH.open(self.IPAddress, self.UserName, self.Password)
|
||||
if re.match('OAI-Rel14-Docker', self.Type, re.IGNORECASE):
|
||||
logging.debug('Using the OAI EPC Release 14 SPGW-CUPS in Docker')
|
||||
mySSH.command('docker exec -d ' + self.containerPrefix + '-oai-spgwc /bin/bash -c "nohup tshark -i eth0 -i lo:p5c -i lo:s5c -f "not port 2152" -w /tmp/spgwc_check_run.pcap 2>&1 > /dev/null"', '\$', 5)
|
||||
mySSH.command('docker exec -d ' + self.containerPrefix + '-oai-spgwu-tiny /bin/bash -c "nohup tshark -i eth0 -f "not port 2152" -w /tmp/spgwu_check_run.pcap 2>&1 > /dev/null"', '\$', 5)
|
||||
time.sleep(5)
|
||||
mySSH.command('docker exec -d ' + self.containerPrefix + '-oai-spgwc /bin/bash -c "nohup ./bin/oai_spgwc -o -c ./etc/spgw_c.conf > spgwc_check_run.log 2>&1"', '\$', 5)
|
||||
time.sleep(5)
|
||||
mySSH.command('docker exec -d ' + self.containerPrefix + '-oai-spgwu-tiny /bin/bash -c "nohup ./bin/oai_spgwu -o -c ./etc/spgw_u.conf > spgwu_check_run.log 2>&1"', '\$', 5)
|
||||
elif re.match('OAI-Rel14-CUPS', self.Type, re.IGNORECASE):
|
||||
logging.debug('Using the OAI EPC Release 14 SPGW-CUPS')
|
||||
mySSH.command('cd ' + self.SourceCodePath + '/scripts', '\$', 5)
|
||||
mySSH.command('echo ' + self.Password + ' | sudo -S rm -f spgwc_' + self.testCase_id + '.log spgwu_' + self.testCase_id + '.log', '\$', 5)
|
||||
mySSH.command('echo "spgwc -c /usr/local/etc/oai/spgw_c.conf" > ./my-spgwc.sh', '\$', 5)
|
||||
mySSH.command('chmod 755 ./my-spgwc.sh', '\$', 5)
|
||||
mySSH.command('sudo daemon --unsafe --name=spgwc_daemon --chdir=' + self.SourceCodePath + '/scripts -o ' + self.SourceCodePath + '/scripts/spgwc_' + self.testCase_id + '.log ./my-spgwc.sh', '\$', 5)
|
||||
time.sleep(5)
|
||||
mySSH.command('echo "spgwu -c /usr/local/etc/oai/spgw_u.conf" > ./my-spgwu.sh', '\$', 5)
|
||||
mySSH.command('chmod 755 ./my-spgwu.sh', '\$', 5)
|
||||
mySSH.command('sudo daemon --unsafe --name=spgwu_daemon --chdir=' + self.SourceCodePath + '/scripts -o ' + self.SourceCodePath + '/scripts/spgwu_' + self.testCase_id + '.log ./my-spgwu.sh', '\$', 5)
|
||||
elif re.match('OAI', self.Type, re.IGNORECASE):
|
||||
mySSH.command('cd ' + self.SourceCodePath, '\$', 5)
|
||||
mySSH.command('source oaienv', '\$', 5)
|
||||
mySSH.command('cd scripts', '\$', 5)
|
||||
mySSH.command('echo ' + self.Password + ' | sudo -S ./run_spgw 2>&1 | stdbuf -o0 tee -a spgw_' + self.testCase_id + '.log &', 'Initializing SPGW-APP task interface: DONE', 30)
|
||||
elif re.match('ltebox', self.Type, re.IGNORECASE):
|
||||
mySSH.command('cd /opt/ltebox/tools', '\$', 5)
|
||||
mySSH.command('echo ' + self.Password + ' | sudo -S ./start_xGw', '\$', 5)
|
||||
else:
|
||||
logging.error('This option should not occur!')
|
||||
mySSH.close()
|
||||
HTML.CreateHtmlTestRow(self.Type, 'OK', CONST.ALL_PROCESSES_OK)
|
||||
return True
|
||||
|
||||
def Initialize5GCN(self, HTML):
|
||||
if self.IPAddress == '' or self.UserName == '' or self.Password == '' or self.Type == '':
|
||||
HELP.GenericHelp(CONST.Version)
|
||||
HELP.EPCSrvHelp(self.IPAddress, self.UserName, self.Password, self.Type)
|
||||
logging.error('Insufficient EPC Parameters')
|
||||
return False
|
||||
mySSH = cls_cmd.getConnection(self.IPAddress)
|
||||
html_cell = ''
|
||||
if re.match('ltebox', self.Type, re.IGNORECASE):
|
||||
logging.debug('Using the SABOX simulated HSS')
|
||||
mySSH.command('if [ -d ' + self.SourceCodePath + '/scripts ]; then echo ' + self.Password + ' | sudo -S rm -Rf ' + self.SourceCodePath + '/scripts ; fi', '\$', 5)
|
||||
mySSH.command('mkdir -p ' + self.SourceCodePath + '/scripts', '\$', 5)
|
||||
mySSH.command('cd /opt/hss_sim0609', '\$', 5)
|
||||
mySSH.command('echo ' + self.Password + ' | sudo -S rm -f hss.log', '\$', 5)
|
||||
mySSH.command('echo ' + self.Password + ' | sudo -S echo "Starting sudo session" && sudo su -c "screen -dm -S simulated_5g_hss ./start_5g_hss"', '\$', 5)
|
||||
logging.debug('Using the sabox')
|
||||
mySSH.command('cd /opt/ltebox/tools', '\$', 5)
|
||||
mySSH.command('echo ' + self.Password + ' | sudo -S ./start_sabox', '\$', 5)
|
||||
html_cell += 'N/A\n'
|
||||
elif re.match('OAICN5G', self.Type, re.IGNORECASE):
|
||||
logging.debug('Starting OAI CN5G')
|
||||
mySSH.command('if [ -d ' + self.SourceCodePath + '/scripts ]; then echo ' + self.Password + ' | sudo -S rm -Rf ' + self.SourceCodePath + '/scripts ; fi', '\$', 5)
|
||||
mySSH.command('mkdir -p ' + self.SourceCodePath + '/scripts', '\$', 5)
|
||||
mySSH.command(f'cd {self.SourceCodePath}/docker-compose', '\$', 5)
|
||||
mySSH.command('python3 ./core-network.py '+self.cfgDeploy, '\$', 60)
|
||||
if re.search('start-mini-as-ue', self.cfgDeploy):
|
||||
dFile = 'docker-compose-mini-nrf-asue.yaml'
|
||||
elif re.search('basic', self.cfgDeploy):\
|
||||
dFile = 'docker-compose-basic-nrf.yaml'
|
||||
else:
|
||||
dFile = 'docker-compose-mini-nrf.yaml'
|
||||
mySSH.command('docker-compose -f ' + dFile + ' ps -a', '\$', 60)
|
||||
if mySSH.getBefore().count('Up (healthy)') != 6:
|
||||
logging.error('Not all container healthy')
|
||||
else:
|
||||
logging.debug('OK --> all containers are healthy')
|
||||
mySSH.command('docker-compose -f ' + dFile + ' config | grep --colour=never image', '\$', 10)
|
||||
listOfImages = mySSH.getBefore()
|
||||
for imageLine in listOfImages.split('\\r\\n'):
|
||||
res1 = re.search('image: (?P<name>[a-zA-Z0-9\-/]+):(?P<tag>[a-zA-Z0-9\-]+)', str(imageLine))
|
||||
res2 = re.search('mysql', str(imageLine))
|
||||
if res1 is not None and res2 is None:
|
||||
html_cell += res1.group('name') + ':' + res1.group('tag') + ' '
|
||||
nbChars = len(res1.group('name')) + len(res1.group('tag')) + 2
|
||||
while (nbChars < 32):
|
||||
html_cell += ' '
|
||||
nbChars += 1
|
||||
mySSH.command('docker image inspect --format="Size = {{.Size}} bytes" ' + res1.group('name') + ':' + res1.group('tag'), '\$', 10)
|
||||
res3 = re.search('Size *= *(?P<size>[0-9\-]*) *bytes', mySSH.getBefore())
|
||||
if res3 is not None:
|
||||
imageSize = int(res3.group('size'))
|
||||
imageSize = int(imageSize/(1024*1024))
|
||||
html_cell += str(imageSize) + ' MBytes '
|
||||
mySSH.command('docker image inspect --format="Date = {{.Created}}" ' + res1.group('name') + ':' + res1.group('tag'), '\$', 10)
|
||||
res4 = re.search('Date *= *(?P<date>[0-9\-]*)T', mySSH.getBefore())
|
||||
if res4 is not None:
|
||||
html_cell += '(' + res4.group('date') + ')'
|
||||
html_cell += '\n'
|
||||
elif re.match('OC-OAI-CN5G', self.Type, re.IGNORECASE):
|
||||
cn = cls_module.Module_UE(self.cnID)
|
||||
succeeded, report = OC.OC_deploy_CN(mySSH, self.OCUserName, self.OCPassword, cn.getNamespace(), cn.getCNPath())
|
||||
if not succeeded:
|
||||
HTML.CreateHtmlTestRow('N/A', 'KO', report)
|
||||
HTML.CreateHtmlTabFooter(False)
|
||||
mySSH.close()
|
||||
logging.error("OC OAI CN5G: CN deployment failed!")
|
||||
return False
|
||||
for line in report.stdout.split('\n')[1:]:
|
||||
columns = line.strip().split()
|
||||
name = columns[0]
|
||||
status = columns[2]
|
||||
html_cell += status + ' ' + name
|
||||
html_cell += '\n'
|
||||
else:
|
||||
logging.error('This option should not occur!')
|
||||
mySSH.close()
|
||||
HTML.CreateHtmlTestRowQueue(self.Type, 'OK', [html_cell])
|
||||
return True
|
||||
|
||||
def SetAmfIPAddress(self):
|
||||
# Not an error if we don't need an 5GCN
|
||||
if self.IPAddress == '' or self.UserName == '' or self.Password == '' or self.SourceCodePath == '' or self.Type == '':
|
||||
return
|
||||
if self.IPAddress == 'none':
|
||||
return
|
||||
if re.match('ltebox', self.Type, re.IGNORECASE):
|
||||
self.MmeIPAddress = self.IPAddress
|
||||
elif re.match('OAICN5G', self.Type, re.IGNORECASE):
|
||||
mySSH = SSH.SSHConnection()
|
||||
mySSH.open(self.IPAddress, self.UserName, self.Password)
|
||||
response=mySSH.command3('docker container ls -f name=oai-amf', 10)
|
||||
if len(response)>1:
|
||||
response=mySSH.command3('docker inspect --format=\'{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}\' oai-amf', 10)
|
||||
tmp = str(response[0],'utf-8')
|
||||
self.MmeIPAddress = tmp.rstrip()
|
||||
logging.debug('AMF IP Address ' + self.MmeIPAddress)
|
||||
else:
|
||||
logging.error('no container with name oai-amf found, could not retrieve AMF IP address')
|
||||
mySSH.close()
|
||||
elif re.match('OC-OAI-CN5G', self.Type, re.IGNORECASE):
|
||||
mySSH = SSH.SSHConnection()
|
||||
mySSH.open(self.IPAddress, self.UserName, self.Password)
|
||||
response=mySSH.command3('oc pods ls -f name=oai-amf', 10)
|
||||
|
||||
def CheckHSSProcess(self, status_queue):
|
||||
try:
|
||||
mySSH = SSH.SSHConnection()
|
||||
mySSH.open(self.IPAddress, self.UserName, self.Password)
|
||||
if re.match('OAI-Rel14-Docker', self.Type, re.IGNORECASE):
|
||||
mySSH.command('docker top ' + self.containerPrefix + '-oai-hss', '\$', 5)
|
||||
else:
|
||||
mySSH.command('stdbuf -o0 ps -aux | grep --color=never hss | grep -v grep', '\$', 5)
|
||||
if re.match('OAI-Rel14-CUPS', self.Type, re.IGNORECASE) or re.match('OAI-Rel14-Docker', self.Type, re.IGNORECASE):
|
||||
result = re.search('oai_hss -j', mySSH.getBefore())
|
||||
elif re.match('OAI', self.Type, re.IGNORECASE):
|
||||
result = re.search('\/bin\/bash .\/run_', mySSH.getBefore())
|
||||
elif re.match('ltebox', self.Type, re.IGNORECASE):
|
||||
result = re.search('hss_sim s6as diam_hss', mySSH.getBefore())
|
||||
else:
|
||||
logging.error('This should not happen!')
|
||||
if result is None:
|
||||
logging.debug('\u001B[1;37;41m HSS Process Not Found! \u001B[0m')
|
||||
status_queue.put(CONST.HSS_PROCESS_FAILED)
|
||||
else:
|
||||
status_queue.put(CONST.HSS_PROCESS_OK)
|
||||
mySSH.close()
|
||||
except:
|
||||
os.kill(os.getppid(),signal.SIGUSR1)
|
||||
|
||||
def CheckMMEProcess(self, status_queue):
|
||||
try:
|
||||
mySSH = SSH.SSHConnection()
|
||||
mySSH.open(self.IPAddress, self.UserName, self.Password)
|
||||
if re.match('OAI-Rel14-Docker', self.Type, re.IGNORECASE):
|
||||
self.isMagmaUsed = False
|
||||
mySSH.command('docker ps -a', '\$', 5)
|
||||
result = re.search('magma', mySSH.getBefore())
|
||||
if result is not None:
|
||||
self.isMagmaUsed = True
|
||||
if self.isMagmaUsed:
|
||||
mySSH.command('docker top ' + self.containerPrefix + '-magma-mme', '\$', 5)
|
||||
else:
|
||||
mySSH.command('docker top ' + self.containerPrefix + '-oai-mme', '\$', 5)
|
||||
else:
|
||||
mySSH.command('stdbuf -o0 ps -aux | grep --color=never mme | grep -v grep', '\$', 5)
|
||||
if re.match('OAI-Rel14-Docker', self.Type, re.IGNORECASE):
|
||||
result = re.search('oai_mme -c ', mySSH.getBefore())
|
||||
elif re.match('OAI-Rel14-CUPS', self.Type, re.IGNORECASE):
|
||||
result = re.search('mme -c', mySSH.getBefore())
|
||||
elif re.match('OAI', self.Type, re.IGNORECASE):
|
||||
result = re.search('\/bin\/bash .\/run_', mySSH.getBefore())
|
||||
elif re.match('ltebox', self.Type, re.IGNORECASE):
|
||||
result = re.search('mme|amf', mySSH.getBefore())
|
||||
else:
|
||||
logging.error('This should not happen!')
|
||||
if result is None:
|
||||
logging.debug('\u001B[1;37;41m MME|AMF Process Not Found! \u001B[0m')
|
||||
status_queue.put(CONST.MME_PROCESS_FAILED)
|
||||
else:
|
||||
status_queue.put(CONST.MME_PROCESS_OK)
|
||||
mySSH.close()
|
||||
except:
|
||||
os.kill(os.getppid(),signal.SIGUSR1)
|
||||
|
||||
def CheckSPGWProcess(self, status_queue):
|
||||
try:
|
||||
mySSH = SSH.SSHConnection()
|
||||
mySSH.open(self.IPAddress, self.UserName, self.Password)
|
||||
if re.match('OAI-Rel14-Docker', self.Type, re.IGNORECASE):
|
||||
mySSH.command('docker top ' + self.containerPrefix + '-oai-spgwc', '\$', 5)
|
||||
result = re.search('oai_spgwc -', mySSH.getBefore())
|
||||
if result is not None:
|
||||
mySSH.command('docker top ' + self.containerPrefix + '-oai-spgwu-tiny', '\$', 5)
|
||||
result = re.search('oai_spgwu -', mySSH.getBefore())
|
||||
elif re.match('OAI-Rel14-CUPS', self.Type, re.IGNORECASE):
|
||||
mySSH.command('stdbuf -o0 ps -aux | grep --color=never spgw | grep -v grep', '\$', 5)
|
||||
result = re.search('spgwu -c ', mySSH.getBefore())
|
||||
elif re.match('OAI', self.Type, re.IGNORECASE):
|
||||
mySSH.command('stdbuf -o0 ps -aux | grep --color=never spgw | grep -v grep', '\$', 5)
|
||||
result = re.search('\/bin\/bash .\/run_', mySSH.getBefore())
|
||||
elif re.match('ltebox', self.Type, re.IGNORECASE):
|
||||
mySSH.command('stdbuf -o0 ps -aux | grep --color=never xGw | grep -v grep', '\$', 5)
|
||||
result = re.search('xGw|upf', mySSH.getBefore())
|
||||
else:
|
||||
logging.error('This should not happen!')
|
||||
if result is None:
|
||||
logging.debug('\u001B[1;37;41m SPGW|UPF Process Not Found! \u001B[0m')
|
||||
status_queue.put(CONST.SPGW_PROCESS_FAILED)
|
||||
else:
|
||||
status_queue.put(CONST.SPGW_PROCESS_OK)
|
||||
mySSH.close()
|
||||
except:
|
||||
os.kill(os.getppid(),signal.SIGUSR1)
|
||||
|
||||
def TerminateHSS(self, HTML):
|
||||
mySSH = SSH.SSHConnection()
|
||||
mySSH.open(self.IPAddress, self.UserName, self.Password)
|
||||
if re.match('OAI-Rel14-Docker', self.Type, re.IGNORECASE):
|
||||
mySSH.command('docker exec -it ' + self.containerPrefix + '-oai-hss /bin/bash -c "killall --signal SIGINT oai_hss tshark"', '\$', 5)
|
||||
time.sleep(2)
|
||||
mySSH.command('docker exec -it ' + self.containerPrefix + '-oai-hss /bin/bash -c "ps aux | grep oai_hss"', '\$', 5)
|
||||
result = re.search('oai_hss -j ', mySSH.getBefore())
|
||||
if result is not None:
|
||||
mySSH.command('docker exec -it ' + self.containerPrefix + '-oai-hss /bin/bash -c "killall --signal SIGKILL oai_hss"', '\$', 5)
|
||||
elif re.match('OAI-Rel14-CUPS', self.Type, re.IGNORECASE):
|
||||
mySSH.command('echo ' + self.Password + ' | sudo -S killall --signal SIGINT oai_hss || true', '\$', 5)
|
||||
time.sleep(2)
|
||||
mySSH.command('stdbuf -o0 ps -aux | grep --colour=never hss | grep -v grep', '\$', 5)
|
||||
result = re.search('oai_hss -j', mySSH.getBefore())
|
||||
if result is not None:
|
||||
mySSH.command('echo ' + self.Password + ' | sudo -S killall --signal SIGKILL oai_hss || true', '\$', 5)
|
||||
mySSH.command('rm -f ' + self.SourceCodePath + '/scripts/my-hss.sh', '\$', 5)
|
||||
elif re.match('OAI', self.Type, re.IGNORECASE):
|
||||
mySSH.command('echo ' + self.Password + ' | sudo -S killall --signal SIGINT run_hss oai_hss || true', '\$', 5)
|
||||
time.sleep(2)
|
||||
mySSH.command('stdbuf -o0 ps -aux | grep --colour=never hss | grep -v grep', '\$', 5)
|
||||
result = re.search('\/bin\/bash .\/run_', mySSH.getBefore())
|
||||
if result is not None:
|
||||
mySSH.command('echo ' + self.Password + ' | sudo -S killall --signal SIGKILL run_hss oai_hss || true', '\$', 5)
|
||||
elif re.match('ltebox', self.Type, re.IGNORECASE):
|
||||
mySSH.command('cd ' + self.SourceCodePath, '\$', 5)
|
||||
mySSH.command('cd scripts', '\$', 5)
|
||||
time.sleep(1)
|
||||
mySSH.command('echo ' + self.Password + ' | sudo -S screen -S simulated_hss -X quit', '\$', 5)
|
||||
time.sleep(5)
|
||||
mySSH.command('ps aux | grep --colour=never hss_sim | grep -v grep', '\$', 5, silent=True)
|
||||
result = re.search('hss_sim s6as diam_hss', mySSH.getBefore())
|
||||
if result is not None:
|
||||
mySSH.command('echo ' + self.Password + ' | sudo -S killall hss_sim', '\$', 5)
|
||||
else:
|
||||
logging.error('This should not happen!')
|
||||
mySSH.close()
|
||||
HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK)
|
||||
return True
|
||||
|
||||
def TerminateMME(self, HTML):
|
||||
mySSH = SSH.SSHConnection()
|
||||
mySSH.open(self.IPAddress, self.UserName, self.Password)
|
||||
if re.match('OAI-Rel14-Docker', self.Type, re.IGNORECASE):
|
||||
mySSH.command('docker exec -it ' + self.containerPrefix + '-oai-mme /bin/bash -c "killall --signal SIGINT oai_mme tshark"', '\$', 5)
|
||||
time.sleep(2)
|
||||
mySSH.command('docker exec -it ' + self.containerPrefix + '-oai-mme /bin/bash -c "ps aux | grep oai_mme"', '\$', 5)
|
||||
result = re.search('oai_mme -c ', mySSH.getBefore())
|
||||
if result is not None:
|
||||
mySSH.command('docker exec -it ' + self.containerPrefix + '-oai-mme /bin/bash -c "killall --signal SIGKILL oai_mme"', '\$', 5)
|
||||
elif re.match('OAI', self.Type, re.IGNORECASE) or re.match('OAI-Rel14-CUPS', self.Type, re.IGNORECASE):
|
||||
mySSH.command('echo ' + self.Password + ' | sudo -S killall --signal SIGINT run_mme mme || true', '\$', 5)
|
||||
time.sleep(2)
|
||||
mySSH.command('stdbuf -o0 ps -aux | grep mme | grep -v grep', '\$', 5)
|
||||
result = re.search('mme -c', mySSH.getBefore())
|
||||
if result is not None:
|
||||
mySSH.command('echo ' + self.Password + ' | sudo -S killall --signal SIGKILL run_mme mme || true', '\$', 5)
|
||||
mySSH.command('rm -f ' + self.SourceCodePath + '/scripts/my-mme.sh', '\$', 5)
|
||||
elif re.match('ltebox', self.Type, re.IGNORECASE):
|
||||
mySSH.command('cd /opt/ltebox/tools', '\$', 5)
|
||||
mySSH.command('echo ' + self.Password + ' | sudo -S ./stop_mme', '\$', 5)
|
||||
time.sleep(5)
|
||||
else:
|
||||
logging.error('This should not happen!')
|
||||
mySSH.close()
|
||||
HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK)
|
||||
return True
|
||||
|
||||
def TerminateSPGW(self, HTML):
|
||||
mySSH = SSH.SSHConnection()
|
||||
mySSH.open(self.IPAddress, self.UserName, self.Password)
|
||||
if re.match('OAI-Rel14-Docker', self.Type, re.IGNORECASE):
|
||||
mySSH.command('docker exec -it ' + self.containerPrefix + '-oai-spgwc /bin/bash -c "killall --signal SIGINT oai_spgwc tshark"', '\$', 5)
|
||||
mySSH.command('docker exec -it ' + self.containerPrefix + '-oai-spgwu-tiny /bin/bash -c "killall --signal SIGINT oai_spgwu tshark"', '\$', 5)
|
||||
time.sleep(2)
|
||||
mySSH.command('docker exec -it ' + self.containerPrefix + '-oai-spgwc /bin/bash -c "ps aux | grep oai_spgwc"', '\$', 5)
|
||||
result = re.search('oai_spgwc -o -c ', mySSH.getBefore())
|
||||
if result is not None:
|
||||
mySSH.command('docker exec -it ' + self.containerPrefix + '-oai-spgwc /bin/bash -c "killall --signal SIGKILL oai_spgwc"', '\$', 5)
|
||||
mySSH.command('docker exec -it ' + self.containerPrefix + '-oai-spgwu-tiny /bin/bash -c "ps aux | grep oai_spgwu"', '\$', 5)
|
||||
result = re.search('oai_spgwu -o -c ', mySSH.getBefore())
|
||||
if result is not None:
|
||||
mySSH.command('docker exec -it ' + self.containerPrefix + '-oai-spgwu-tiny /bin/bash -c "killall --signal SIGKILL oai_spgwu"', '\$', 5)
|
||||
elif re.match('OAI-Rel14-CUPS', self.Type, re.IGNORECASE):
|
||||
mySSH.command('echo ' + self.Password + ' | sudo -S killall --signal SIGINT spgwc spgwu || true', '\$', 5)
|
||||
time.sleep(2)
|
||||
mySSH.command('stdbuf -o0 ps -aux | grep spgw | grep -v grep', '\$', 5)
|
||||
result = re.search('spgwc -c |spgwu -c ', mySSH.getBefore())
|
||||
if result is not None:
|
||||
mySSH.command('echo ' + self.Password + ' | sudo -S killall --signal SIGKILL spgwc spgwu || true', '\$', 5)
|
||||
mySSH.command('rm -f ' + self.SourceCodePath + '/scripts/my-spgw*.sh', '\$', 5)
|
||||
mySSH.command('stdbuf -o0 ps -aux | grep tshark | grep -v grep', '\$', 5)
|
||||
result = re.search('-w ', mySSH.getBefore())
|
||||
if result is not None:
|
||||
mySSH.command('echo ' + self.Password + ' | sudo -S killall --signal SIGINT tshark || true', '\$', 5)
|
||||
mySSH.command('echo ' + self.Password + ' | sudo -S chmod 666 ' + self.SourceCodePath + '/scripts/*.pcap', '\$', 5)
|
||||
elif re.match('OAI', self.Type, re.IGNORECASE):
|
||||
mySSH.command('echo ' + self.Password + ' | sudo -S killall --signal SIGINT run_spgw spgw || true', '\$', 5)
|
||||
time.sleep(2)
|
||||
mySSH.command('stdbuf -o0 ps -aux | grep spgw | grep -v grep', '\$', 5)
|
||||
result = re.search('\/bin\/bash .\/run_', mySSH.getBefore())
|
||||
if result is not None:
|
||||
mySSH.command('echo ' + self.Password + ' | sudo -S killall --signal SIGKILL run_spgw spgw || true', '\$', 5)
|
||||
elif re.match('ltebox', self.Type, re.IGNORECASE):
|
||||
mySSH.command('cd /opt/ltebox/tools', '\$', 5)
|
||||
mySSH.command('echo ' + self.Password + ' | sudo -S ./stop_xGw', '\$', 5)
|
||||
else:
|
||||
logging.error('This should not happen!')
|
||||
mySSH.close()
|
||||
HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK)
|
||||
return True
|
||||
|
||||
def Terminate5GCN(self, HTML):
|
||||
mySSH = cls_cmd.getConnection(self.IPAddress)
|
||||
message = ''
|
||||
if re.match('ltebox', self.Type, re.IGNORECASE):
|
||||
logging.debug('Terminating SA BOX')
|
||||
mySSH.command('cd /opt/ltebox/tools', '\$', 5)
|
||||
mySSH.command('echo ' + self.Password + ' | sudo -S ./stop_sabox', '\$', 5)
|
||||
time.sleep(1)
|
||||
mySSH.command('cd ' + self.SourceCodePath, '\$', 5)
|
||||
mySSH.command('cd scripts', '\$', 5)
|
||||
time.sleep(1)
|
||||
mySSH.command('echo ' + self.Password + ' | sudo -S screen -S simulated_5g_hss -X quit', '\$', 5)
|
||||
elif re.match('OAICN5G', self.Type, re.IGNORECASE):
|
||||
logging.debug('OAI CN5G Collecting Log files to workspace')
|
||||
mySSH.command('echo ' + self.Password + ' | sudo rm -rf ' + self.SourceCodePath + '/logs', '\$', 5)
|
||||
mySSH.command('mkdir ' + self.SourceCodePath + '/logs','\$', 5)
|
||||
containers_list=['oai-smf','oai-spgwu','oai-amf','oai-nrf']
|
||||
for c in containers_list:
|
||||
mySSH.command('docker logs ' + c + ' > ' + self.SourceCodePath + '/logs/' + c + '.log', '\$', 5)
|
||||
|
||||
logging.debug('Terminating OAI CN5G')
|
||||
mySSH.command(f'cd {self.SourceCodePath}/docker-compose', '\$', 5)
|
||||
mySSH.command('python3 ./core-network.py '+self.cfgUnDeploy, '\$', 60)
|
||||
mySSH.command('docker volume prune --force || true', '\$', 60)
|
||||
time.sleep(2)
|
||||
mySSH.command('tshark -r /tmp/oai-cn5g-v1.5.pcap | grep -E --colour=never "Tracking area update" ','\$', 30)
|
||||
result = re.search('Tracking area update request', mySSH.getBefore())
|
||||
if result is not None:
|
||||
message = 'UE requested ' + str(mySSH.getBefore().count('Tracking area update request')) + 'Tracking area update request(s)'
|
||||
else:
|
||||
message = 'No Tracking area update request'
|
||||
mySSH.run(f'cd {self.SourceCodePath}/logs && zip -r -qq test_logs_CN.zip *.log')
|
||||
mySSH.copyin(f'{self.SourceCodePath}/logs/test_logs_CN.zip','test_logs_CN.zip')
|
||||
logging.debug(message)
|
||||
elif re.match('OC-OAI-CN5G', self.Type, re.IGNORECASE):
|
||||
cn = cls_module.Module_UE(self.cnID)
|
||||
succeeded, report = OC.OC_undeploy_CN(mySSH, self.OCUserName, self.OCPassword, cn.getNamespace(), cn.getCNPath())
|
||||
if not succeeded:
|
||||
HTML.CreateHtmlTestRow('N/A', 'KO', report)
|
||||
HTML.CreateHtmlTabFooter(False)
|
||||
logging.error("OC OAI CN5G: CN undeployment failed!")
|
||||
return False
|
||||
else:
|
||||
message = report.stdout
|
||||
else:
|
||||
logging.error('This should not happen!')
|
||||
mySSH.close()
|
||||
HTML.CreateHtmlTestRowQueue(self.Type, 'OK', [message])
|
||||
return True
|
||||
|
||||
def DeployEpc(self, HTML):
|
||||
logging.debug('Trying to deploy')
|
||||
if not re.match('OAI-Rel14-Docker', self.Type, re.IGNORECASE):
|
||||
HTML.CreateHtmlTestRow(self.Type, 'KO', CONST.INVALID_PARAMETER)
|
||||
HTML.CreateHtmlTabFooter(False)
|
||||
logging.error('Deploy not possible with this EPC type: ' + self.Type)
|
||||
return False
|
||||
|
||||
if self.IPAddress == '' or self.UserName == '' or self.Password == '' or self.SourceCodePath == '' or self.Type == '':
|
||||
HELP.GenericHelp(CONST.Version)
|
||||
HELP.EPCSrvHelp(self.IPAddress, self.UserName, self.Password, self.SourceCodePath, self.Type)
|
||||
logging.error('Insufficient EPC Parameters')
|
||||
return False
|
||||
mySSH = SSH.SSHConnection()
|
||||
mySSH.open(self.IPAddress, self.UserName, self.Password)
|
||||
mySSH.command('docker-compose --version', '\$', 5)
|
||||
result = re.search('docker-compose version 1|Docker Compose version v2', mySSH.getBefore())
|
||||
if result is None:
|
||||
mySSH.close()
|
||||
HTML.CreateHtmlTestRow(self.Type, 'KO', CONST.INVALID_PARAMETER)
|
||||
HTML.CreateHtmlTabFooter(False)
|
||||
logging.error('docker-compose not installed on ' + self.IPAddress)
|
||||
return False
|
||||
|
||||
# Checking if it is a MAGMA deployment
|
||||
self.isMagmaUsed = False
|
||||
if os.path.isfile('./' + self.yamlPath + '/redis_extern.conf'):
|
||||
self.isMagmaUsed = True
|
||||
logging.debug('MAGMA MME is used!')
|
||||
|
||||
mySSH.command('if [ -d ' + self.SourceCodePath + '/scripts ]; then echo ' + self.Password + ' | sudo -S rm -Rf ' + self.SourceCodePath + '/scripts ; fi', '\$', 5)
|
||||
mySSH.command('if [ -d ' + self.SourceCodePath + '/logs ]; then echo ' + self.Password + ' | sudo -S rm -Rf ' + self.SourceCodePath + '/logs ; fi', '\$', 5)
|
||||
mySSH.command('mkdir -p ' + self.SourceCodePath + '/scripts ' + self.SourceCodePath + '/logs', '\$', 5)
|
||||
mySSH.command('rm -f ' + self.SourceCodePath + '/*.log', '\$', 5)
|
||||
|
||||
# deploying and configuring the cassandra database
|
||||
# container names and services are currently hard-coded.
|
||||
# they could be recovered by:
|
||||
# - docker-compose config --services
|
||||
# - docker-compose config | grep container_name
|
||||
mySSH.command('cd ' + self.SourceCodePath + '/scripts', '\$', 5)
|
||||
mySSH.copyout(self.IPAddress, self.UserName, self.Password, './' + self.yamlPath + '/docker-compose.yml', self.SourceCodePath + '/scripts')
|
||||
if self.isMagmaUsed:
|
||||
mySSH.copyout(self.IPAddress, self.UserName, self.Password, './' + self.yamlPath + '/entrypoint.sh', self.SourceCodePath + '/scripts')
|
||||
mySSH.copyout(self.IPAddress, self.UserName, self.Password, './' + self.yamlPath + '/mme.conf', self.SourceCodePath + '/scripts')
|
||||
mySSH.copyout(self.IPAddress, self.UserName, self.Password, './' + self.yamlPath + '/mme_fd.sprint.conf', self.SourceCodePath + '/scripts')
|
||||
mySSH.copyout(self.IPAddress, self.UserName, self.Password, './' + self.yamlPath + '/redis_extern.conf', self.SourceCodePath + '/scripts')
|
||||
mySSH.command('chmod a+x ' + self.SourceCodePath + '/scripts/entrypoint.sh', '\$', 5)
|
||||
else:
|
||||
mySSH.copyout(self.IPAddress, self.UserName, self.Password, './' + self.yamlPath + '/entrypoint.sh', self.SourceCodePath + '/scripts')
|
||||
mySSH.copyout(self.IPAddress, self.UserName, self.Password, './' + self.yamlPath + '/mme.conf', self.SourceCodePath + '/scripts')
|
||||
mySSH.command('chmod 775 entrypoint.sh', '\$', 60)
|
||||
mySSH.command('wget --quiet --tries=3 --retry-connrefused https://raw.githubusercontent.com/OPENAIRINTERFACE/openair-hss/develop/src/hss_rel14/db/oai_db.cql', '\$', 30)
|
||||
mySSH.command('docker-compose down -v', '\$', 60)
|
||||
mySSH.command('docker-compose up -d db_init', '\$', 60)
|
||||
# databases take time...
|
||||
time.sleep(10)
|
||||
cnt = 0
|
||||
db_init_status = False
|
||||
while (cnt < 10):
|
||||
mySSH.command('docker logs prod-db-init', '\$', 5)
|
||||
result = re.search('OK', mySSH.getBefore())
|
||||
if result is not None:
|
||||
cnt = 10
|
||||
db_init_status = True
|
||||
else:
|
||||
time.sleep(5)
|
||||
cnt += 1
|
||||
mySSH.command('docker rm -f prod-db-init', '\$', 5)
|
||||
if not db_init_status:
|
||||
HTML.CreateHtmlTestRow(self.Type, 'KO', CONST.INVALID_PARAMETER)
|
||||
HTML.CreateHtmlTabFooter(False)
|
||||
logging.error('Cassandra DB deployment/configuration went wrong!')
|
||||
return True
|
||||
|
||||
# deploying EPC cNFs
|
||||
mySSH.command('docker-compose up -d oai_spgwu', '\$', 60)
|
||||
if self.isMagmaUsed:
|
||||
listOfContainers = 'prod-cassandra prod-oai-hss prod-magma-mme prod-oai-spgwc prod-oai-spgwu-tiny prod-redis'
|
||||
expectedHealthyContainers = 6
|
||||
else:
|
||||
listOfContainers = 'prod-cassandra prod-oai-hss prod-oai-mme prod-oai-spgwc prod-oai-spgwu-tiny'
|
||||
expectedHealthyContainers = 5
|
||||
|
||||
# Checking for additional services
|
||||
mySSH.command('docker-compose config', '\$', 5)
|
||||
configResponse = mySSH.getBefore()
|
||||
if configResponse.count('trf_gen') == 1:
|
||||
mySSH.command('docker-compose up -d trf_gen', '\$', 60)
|
||||
listOfContainers += ' prod-trf-gen'
|
||||
expectedHealthyContainers += 1
|
||||
|
||||
mySSH.command('docker-compose config | grep --colour=never image', '\$', 10)
|
||||
html_cell = ''
|
||||
listOfImages = mySSH.getBefore()
|
||||
for imageLine in listOfImages.split('\\r\\n'):
|
||||
res1 = re.search('image: (?P<name>[a-zA-Z0-9\-]+):(?P<tag>[a-zA-Z0-9\-]+)', str(imageLine))
|
||||
res2 = re.search('cassandra|redis', str(imageLine))
|
||||
if res1 is not None and res2 is None:
|
||||
html_cell += res1.group('name') + ':' + res1.group('tag') + ' '
|
||||
nbChars = len(res1.group('name')) + len(res1.group('tag')) + 2
|
||||
while (nbChars < 32):
|
||||
html_cell += ' '
|
||||
nbChars += 1
|
||||
mySSH.command('docker image inspect --format="Size = {{.Size}} bytes" ' + res1.group('name') + ':' + res1.group('tag'), '\$', 10)
|
||||
res3 = re.search('Size *= *(?P<size>[0-9\-]*) *bytes', mySSH.getBefore())
|
||||
if res3 is not None:
|
||||
imageSize = int(res3.group('size'))
|
||||
imageSize = int(imageSize/(1024*1024))
|
||||
html_cell += str(imageSize) + ' MBytes '
|
||||
mySSH.command('docker image inspect --format="Date = {{.Created}}" ' + res1.group('name') + ':' + res1.group('tag'), '\$', 10)
|
||||
res4 = re.search('Date *= *(?P<date>[0-9\-]*)T', mySSH.getBefore())
|
||||
if res4 is not None:
|
||||
html_cell += '(' + res4.group('date') + ')'
|
||||
html_cell += '\n'
|
||||
# Checking if all are healthy
|
||||
cnt = 0
|
||||
while (cnt < 3):
|
||||
mySSH.command('docker inspect --format=\'{{.State.Health.Status}}\' ' + listOfContainers, '\$', 10)
|
||||
unhealthyNb = mySSH.getBefore().count('unhealthy')
|
||||
healthyNb = mySSH.getBefore().count('healthy') - unhealthyNb
|
||||
startingNb = mySSH.getBefore().count('starting')
|
||||
if healthyNb == expectedHealthyContainers:
|
||||
cnt = 10
|
||||
else:
|
||||
time.sleep(10)
|
||||
cnt += 1
|
||||
logging.debug(' -- ' + str(healthyNb) + ' healthy container(s)')
|
||||
logging.debug(' -- ' + str(unhealthyNb) + ' unhealthy container(s)')
|
||||
logging.debug(' -- ' + str(startingNb) + ' still starting container(s)')
|
||||
if healthyNb == expectedHealthyContainers:
|
||||
mySSH.command('docker exec -d prod-oai-hss /bin/bash -c "nohup tshark -i any -f \'port 9042 or port 3868\' -w /tmp/hss_check_run.pcap 2>&1 > /dev/null"', '\$', 5)
|
||||
if self.isMagmaUsed:
|
||||
mySSH.command('docker exec -d prod-magma-mme /bin/bash -c "nohup tshark -i any -f \'port 3868 or port 2123 or port 36412\' -w /tmp/mme_check_run.pcap 2>&1 > /dev/null"', '\$', 10)
|
||||
else:
|
||||
mySSH.command('docker exec -d prod-oai-mme /bin/bash -c "nohup tshark -i any -f \'port 3868 or port 2123 or port 36412\' -w /tmp/mme_check_run.pcap 2>&1 > /dev/null"', '\$', 10)
|
||||
mySSH.command('docker exec -d prod-oai-spgwc /bin/bash -c "nohup tshark -i any -f \'port 2123 or port 8805\' -w /tmp/spgwc_check_run.pcap 2>&1 > /dev/null"', '\$', 10)
|
||||
# on SPGW-U, not capturing on SGI to avoid huge file
|
||||
mySSH.command('docker exec -d prod-oai-spgwu-tiny /bin/bash -c "nohup tshark -i any -f \'port 8805\' -w /tmp/spgwu_check_run.pcap 2>&1 > /dev/null"', '\$', 10)
|
||||
mySSH.close()
|
||||
logging.debug('Deployment OK')
|
||||
HTML.CreateHtmlTestRowQueue(self.Type, 'OK', [html_cell])
|
||||
return True
|
||||
else:
|
||||
mySSH.close()
|
||||
logging.debug('Deployment went wrong')
|
||||
HTML.CreateHtmlTestRowQueue(self.Type, 'KO', [html_cell])
|
||||
return False
|
||||
|
||||
def UndeployEpc(self, HTML):
|
||||
logging.debug('Trying to undeploy')
|
||||
# No check down, we suppose everything done before.
|
||||
|
||||
mySSH = SSH.SSHConnection()
|
||||
mySSH.open(self.IPAddress, self.UserName, self.Password)
|
||||
# Checking if it is a MAGMA deployment.
|
||||
mySSH.command('cd ' + self.SourceCodePath + '/scripts', '\$', 5)
|
||||
mySSH.command('docker-compose ps -a', '\$', 5)
|
||||
self.isMagmaUsed = False
|
||||
result = re.search('magma', mySSH.getBefore())
|
||||
if result is not None:
|
||||
self.isMagmaUsed = True
|
||||
logging.debug('MAGMA MME is used!')
|
||||
# Recovering logs and pcap files
|
||||
mySSH.command('cd ' + self.SourceCodePath + '/logs', '\$', 5)
|
||||
mySSH.command('docker exec -it prod-oai-hss /bin/bash -c "killall --signal SIGINT oai_hss tshark"', '\$', 5)
|
||||
if self.isMagmaUsed:
|
||||
mySSH.command('docker exec -it prod-magma-mme /bin/bash -c "killall --signal SIGINT tshark"', '\$', 5)
|
||||
else:
|
||||
mySSH.command('docker exec -it prod-oai-mme /bin/bash -c "killall --signal SIGINT tshark"', '\$', 5)
|
||||
mySSH.command('docker exec -it prod-oai-spgwc /bin/bash -c "killall --signal SIGINT oai_spgwc tshark"', '\$', 5)
|
||||
mySSH.command('docker exec -it prod-oai-spgwu-tiny /bin/bash -c "killall --signal SIGINT tshark"', '\$', 5)
|
||||
mySSH.command('docker logs prod-oai-hss > hss_' + self.testCase_id + '.log', '\$', 5)
|
||||
if self.isMagmaUsed:
|
||||
mySSH.command('docker cp --follow-link prod-magma-mme:/var/log/mme.log mme_' + self.testCase_id + '.log', '\$', 15)
|
||||
else:
|
||||
mySSH.command('docker logs prod-oai-mme > mme_' + self.testCase_id + '.log', '\$', 5)
|
||||
mySSH.command('docker logs prod-oai-spgwc > spgwc_' + self.testCase_id + '.log', '\$', 5)
|
||||
mySSH.command('docker logs prod-oai-spgwu-tiny > spgwu_' + self.testCase_id + '.log', '\$', 5)
|
||||
mySSH.command('docker cp prod-oai-hss:/tmp/hss_check_run.pcap hss_' + self.testCase_id + '.pcap', '\$', 60)
|
||||
if self.isMagmaUsed:
|
||||
mySSH.command('docker cp prod-magma-mme:/tmp/mme_check_run.pcap mme_' + self.testCase_id + '.pcap', '\$', 60)
|
||||
else:
|
||||
mySSH.command('docker cp prod-oai-mme:/tmp/mme_check_run.pcap mme_' + self.testCase_id + '.pcap', '\$', 60)
|
||||
mySSH.command('tshark -r mme_' + self.testCase_id + '.pcap | grep -E --colour=never "Tracking area update"', '\$', 60)
|
||||
result = re.search('Tracking area update request', mySSH.getBefore())
|
||||
if result is not None:
|
||||
message = 'UE requested ' + str(mySSH.getBefore().count('Tracking area update request')) + 'Tracking area update request(s)'
|
||||
else:
|
||||
message = 'No Tracking area update request'
|
||||
logging.debug(message)
|
||||
mySSH.command('docker cp prod-oai-spgwc:/tmp/spgwc_check_run.pcap spgwc_' + self.testCase_id + '.pcap', '\$', 60)
|
||||
mySSH.command('docker cp prod-oai-spgwu-tiny:/tmp/spgwu_check_run.pcap spgwu_' + self.testCase_id + '.pcap', '\$', 60)
|
||||
# Remove all
|
||||
mySSH.command('cd ' + self.SourceCodePath + '/scripts', '\$', 5)
|
||||
if self.isMagmaUsed:
|
||||
listOfContainers = 'prod-cassandra prod-oai-hss prod-magma-mme prod-oai-spgwc prod-oai-spgwu-tiny prod-redis'
|
||||
nbContainers = 6
|
||||
else:
|
||||
listOfContainers = 'prod-cassandra prod-oai-hss prod-oai-mme prod-oai-spgwc prod-oai-spgwu-tiny'
|
||||
nbContainers = 5
|
||||
# Checking for additional services
|
||||
mySSH.command('docker-compose config', '\$', 5)
|
||||
configResponse = mySSH.getBefore()
|
||||
if configResponse.count('trf_gen') == 1:
|
||||
listOfContainers += ' prod-trf-gen'
|
||||
nbContainers += 1
|
||||
|
||||
mySSH.command('docker-compose down -v', '\$', 60)
|
||||
mySSH.command('docker inspect --format=\'{{.State.Health.Status}}\' ' + listOfContainers, '\$', 10)
|
||||
noMoreContainerNb = mySSH.getBefore().count('No such object')
|
||||
mySSH.command('docker inspect --format=\'{{.Name}}\' prod-oai-public-net prod-oai-private-net', '\$', 10)
|
||||
noMoreNetworkNb = mySSH.getBefore().count('No such object')
|
||||
mySSH.close()
|
||||
if noMoreContainerNb == nbContainers and noMoreNetworkNb == 2:
|
||||
logging.debug('Undeployment OK')
|
||||
HTML.CreateHtmlTestRowQueue(self.Type, 'OK', [message])
|
||||
return True
|
||||
else:
|
||||
logging.debug('Undeployment went wrong')
|
||||
HTML.CreateHtmlTestRowQueue(self.Type, 'KO', [message])
|
||||
return False
|
||||
|
||||
def LogCollectHSS(self):
|
||||
mySSH = SSH.SSHConnection()
|
||||
mySSH.open(self.IPAddress, self.UserName, self.Password)
|
||||
mySSH.command('cd ' + self.SourceCodePath + '/scripts', '\$', 5)
|
||||
mySSH.command('rm -f hss.log.zip', '\$', 5)
|
||||
if re.match('OAI-Rel14-Docker', self.Type, re.IGNORECASE):
|
||||
mySSH.command('docker inspect prod-oai-hss', '\$', 10)
|
||||
result = re.search('No such object', mySSH.getBefore())
|
||||
if result is not None:
|
||||
mySSH.command('cd ../logs', '\$', 5)
|
||||
mySSH.command('rm -f hss.log.zip', '\$', 5)
|
||||
mySSH.command('zip hss.log.zip hss_*.*', '\$', 60)
|
||||
mySSH.command('mv hss.log.zip ../scripts', '\$', 60)
|
||||
else:
|
||||
mySSH.command('docker cp ' + self.containerPrefix + '-oai-hss:/openair-hss/hss_check_run.log .', '\$', 60)
|
||||
mySSH.command('docker cp ' + self.containerPrefix + '-oai-hss:/tmp/hss_check_run.pcap .', '\$', 60)
|
||||
mySSH.command('zip hss.log.zip hss_check_run.*', '\$', 60)
|
||||
elif re.match('OAICN5G', self.Type, re.IGNORECASE):
|
||||
logging.debug('LogCollect is bypassed for that variant')
|
||||
elif re.match('OC-OAI-CN5G', self.Type, re.IGNORECASE):
|
||||
logging.debug('LogCollect is bypassed for that variant')
|
||||
elif re.match('OAI', self.Type, re.IGNORECASE) or re.match('OAI-Rel14-CUPS', self.Type, re.IGNORECASE):
|
||||
mySSH.command('zip hss.log.zip hss*.log', '\$', 60)
|
||||
mySSH.command('echo ' + self.Password + ' | sudo -S rm hss*.log', '\$', 5)
|
||||
if re.match('OAI-Rel14-CUPS', self.Type, re.IGNORECASE):
|
||||
mySSH.command('zip hss.log.zip logs/hss*.* *.pcap', '\$', 60)
|
||||
mySSH.command('echo ' + self.Password + ' | sudo -S rm -f logs/hss*.* *.pcap', '\$', 5)
|
||||
elif re.match('ltebox', self.Type, re.IGNORECASE):
|
||||
mySSH.command('cp /opt/hss_sim0609/hss.log .', '\$', 60)
|
||||
mySSH.command('zip hss.log.zip hss.log', '\$', 60)
|
||||
else:
|
||||
logging.error('This option should not occur!')
|
||||
mySSH.close()
|
||||
|
||||
def LogCollectMME(self):
|
||||
if self.Type != 'OC-OAI-CN5G':
|
||||
mySSH = SSH.SSHConnection()
|
||||
mySSH.open(self.IPAddress, self.UserName, self.Password)
|
||||
mySSH.command('cd ' + self.SourceCodePath + '/scripts', '\$', 5)
|
||||
mySSH.command('rm -f mme.log.zip', '\$', 5)
|
||||
else:
|
||||
mySSH = cls_cmd.getConnection(self.IPAddress)
|
||||
if re.match('OAI-Rel14-Docker', self.Type, re.IGNORECASE):
|
||||
mySSH.command('docker inspect prod-oai-mme', '\$', 10)
|
||||
result = re.search('No such object', mySSH.getBefore())
|
||||
if result is not None:
|
||||
mySSH.command('cd ../logs', '\$', 5)
|
||||
mySSH.command('rm -f mme.log.zip', '\$', 5)
|
||||
mySSH.command('zip mme.log.zip mme_*.*', '\$', 60)
|
||||
mySSH.command('mv mme.log.zip ../scripts', '\$', 60)
|
||||
else:
|
||||
mySSH.command('docker cp ' + self.containerPrefix + '-oai-mme:/openair-mme/mme_check_run.log .', '\$', 60)
|
||||
mySSH.command('docker cp ' + self.containerPrefix + '-oai-mme:/tmp/mme_check_run.pcap .', '\$', 60)
|
||||
mySSH.command('zip mme.log.zip mme_check_run.*', '\$', 60)
|
||||
elif re.match('OAICN5G', self.Type, re.IGNORECASE):
|
||||
mySSH.command('cd ' + self.SourceCodePath + '/logs','\$', 5)
|
||||
mySSH.command('cp -f /tmp/oai-cn5g-v1.5.pcap .','\$', 30)
|
||||
mySSH.command('zip mme.log.zip oai-amf.log oai-nrf.log oai-cn5g*.pcap','\$', 30)
|
||||
mySSH.command('mv mme.log.zip ' + self.SourceCodePath + '/scripts','\$', 30)
|
||||
elif re.match('OC-OAI-CN5G', self.Type, re.IGNORECASE):
|
||||
mySSH.run('cd ' + self.SourceCodePath + '/logs')
|
||||
mySSH.run('zip mme.log.zip oai-amf.log oai-nrf.log oai-cn5g*.pcap')
|
||||
mySSH.run('mv mme.log.zip ' + self.SourceCodePath + '/scripts')
|
||||
elif re.match('OAI', self.Type, re.IGNORECASE) or re.match('OAI-Rel14-CUPS', self.Type, re.IGNORECASE):
|
||||
mySSH.command('zip mme.log.zip mme*.log', '\$', 60)
|
||||
mySSH.command('echo ' + self.Password + ' | sudo -S rm mme*.log', '\$', 5)
|
||||
elif re.match('ltebox', self.Type, re.IGNORECASE):
|
||||
mySSH.command('cp /opt/ltebox/var/log/*Log.0 .', '\$', 5)
|
||||
mySSH.command('zip mme.log.zip mmeLog.0 s1apcLog.0 s1apsLog.0 s11cLog.0 libLog.0 s1apCodecLog.0 amfLog.0 ngapcLog.0 ngapcommonLog.0 ngapsLog.0', '\$', 60)
|
||||
else:
|
||||
logging.error('This option should not occur!')
|
||||
mySSH.close()
|
||||
|
||||
def LogCollectSPGW(self):
|
||||
mySSH = SSH.SSHConnection()
|
||||
mySSH.open(self.IPAddress, self.UserName, self.Password)
|
||||
mySSH.command('cd ' + self.SourceCodePath + '/scripts', '\$', 5)
|
||||
mySSH.command('rm -f spgw.log.zip', '\$', 5)
|
||||
if re.match('OAI-Rel14-Docker', self.Type, re.IGNORECASE):
|
||||
mySSH.command('docker inspect prod-oai-mme', '\$', 10)
|
||||
result = re.search('No such object', mySSH.getBefore())
|
||||
if result is not None:
|
||||
mySSH.command('cd ../logs', '\$', 5)
|
||||
mySSH.command('rm -f spgw.log.zip', '\$', 5)
|
||||
mySSH.command('zip spgw.log.zip spgw*.*', '\$', 60)
|
||||
mySSH.command('mv spgw.log.zip ../scripts', '\$', 60)
|
||||
else:
|
||||
mySSH.command('docker cp ' + self.containerPrefix + '-oai-spgwc:/openair-spgwc/spgwc_check_run.log .', '\$', 60)
|
||||
mySSH.command('docker cp ' + self.containerPrefix + '-oai-spgwu-tiny:/openair-spgwu-tiny/spgwu_check_run.log .', '\$', 60)
|
||||
mySSH.command('docker cp ' + self.containerPrefix + '-oai-spgwc:/tmp/spgwc_check_run.pcap .', '\$', 60)
|
||||
mySSH.command('docker cp ' + self.containerPrefix + '-oai-spgwu-tiny:/tmp/spgwu_check_run.pcap .', '\$', 60)
|
||||
mySSH.command('zip spgw.log.zip spgw*_check_run.*', '\$', 60)
|
||||
elif re.match('OAICN5G', self.Type, re.IGNORECASE):
|
||||
mySSH.command('cd ' + self.SourceCodePath + '/logs','\$', 5)
|
||||
mySSH.command('zip spgw.log.zip oai-smf.log oai-spgwu.log','\$', 30)
|
||||
mySSH.command('mv spgw.log.zip ' + self.SourceCodePath + '/scripts','\$', 30)
|
||||
elif re.match('OC-OAI-CN5G', self.Type, re.IGNORECASE):
|
||||
mySSH.command('cd ' + self.SourceCodePath + '/logs','\$', 5)
|
||||
mySSH.command('zip spgw.log.zip oai-smf.log oai-spgwu.log','\$', 30)
|
||||
mySSH.command('mv spgw.log.zip ' + self.SourceCodePath + '/scripts','\$', 30)
|
||||
elif re.match('OAI', self.Type, re.IGNORECASE) or re.match('OAI-Rel14-CUPS', self.Type, re.IGNORECASE):
|
||||
mySSH.command('zip spgw.log.zip spgw*.log', '\$', 60)
|
||||
mySSH.command('echo ' + self.Password + ' | sudo -S rm spgw*.log', '\$', 5)
|
||||
elif re.match('ltebox', self.Type, re.IGNORECASE):
|
||||
mySSH.command('cp /opt/ltebox/var/log/*Log.0 .', '\$', 5)
|
||||
mySSH.command('zip spgw.log.zip xGwLog.0 upfLog.0', '\$', 60)
|
||||
else:
|
||||
logging.error('This option should not occur!')
|
||||
mySSH.close()
|
||||
@@ -42,8 +42,7 @@ def GenericHelp(vers):
|
||||
print(' TesteNB')
|
||||
print(' InitiateHtml, FinalizeHtml')
|
||||
print(' TerminateeNB, TerminateHSS, TerminateMME, TerminateSPGW')
|
||||
print(' --local Force local execution: rewrites the test xml script before running to always execute on localhost. Assumes')
|
||||
print(' images are available locally, will not remove any images and will run inside the current repo directory')
|
||||
print(' LogCollectBuild, LogCollecteNB, LogCollectHSS, LogCollectMME, LogCollectSPGW, LogCollectPing, LogCollectIperf')
|
||||
|
||||
def GitSrvHelp(repository,branch,commit,mergeallow,targetbranch):
|
||||
print(' --ranRepository=[OAI RAN Repository URL] -- ' + repository)
|
||||
@@ -64,6 +63,13 @@ def OAIUESrvHelp(ipaddr, username, password, sourcepath):
|
||||
print(' --UEPassword=[UE\'s Login Password] -- ' + password)
|
||||
print(' --UESourceCodePath=[UE\'s Source Code Path] -- ' + sourcepath)
|
||||
|
||||
def EPCSrvHelp(ipaddr, username, password, sourcepath, epctype):
|
||||
print(' --EPCIPAddress=[EPC\'s IP Address] -- ' + ipaddr)
|
||||
print(' --EPCUserName=[EPC\'s Login User Name] -- ' + username)
|
||||
print(' --EPCPassword=[EPC\'s Login Password] -- ' + password)
|
||||
print(' --EPCSourceCodePath=[EPC\'s Source Code Path] -- ' + sourcepath)
|
||||
print(' --EPCType=[EPC\'s Type: OAI or ltebox or OC-OAI-CN5G] -- ' + epctype)
|
||||
|
||||
def XmlHelp(filename):
|
||||
print(' --XMLTestFile=[XML Test File to be run] -- ' + filename)
|
||||
print(' Note: multiple xml files can be specified (--XMLFile=File1 ... --XMLTestFile=FileN) when HTML headers are created ("InitiateHtml" mode)')
|
||||
|
||||
@@ -45,6 +45,7 @@ import cls_physim1 #class PhySim for physical simulators deploy and run
|
||||
import cls_cluster # class for building/deploying on cluster
|
||||
import cls_native # class for all native/source-based operations
|
||||
|
||||
import epc
|
||||
import ran
|
||||
import cls_oai_html
|
||||
|
||||
@@ -93,6 +94,7 @@ def AssignParams(params_dict):
|
||||
setattr(HTML, key, value)
|
||||
|
||||
def ExecuteActionWithParam(action):
|
||||
global EPC
|
||||
global RAN
|
||||
global HTML
|
||||
global CONTAINERS
|
||||
@@ -178,7 +180,7 @@ def ExecuteActionWithParam(action):
|
||||
|
||||
cmd_prefix = test.findtext('cmd_prefix')
|
||||
if cmd_prefix is not None: RAN.cmd_prefix = cmd_prefix
|
||||
success = RAN.InitializeeNB(HTML)
|
||||
success = RAN.InitializeeNB(HTML, EPC)
|
||||
|
||||
elif action == 'Terminate_eNB':
|
||||
eNB_instance=test.findtext('eNB_instance')
|
||||
@@ -206,21 +208,17 @@ def ExecuteActionWithParam(action):
|
||||
RAN.air_interface[RAN.eNB_instance] = 'lte-softmodem'
|
||||
else:
|
||||
RAN.air_interface[RAN.eNB_instance] = air_interface.lower() +'-softmodem'
|
||||
success = RAN.TerminateeNB(HTML)
|
||||
success = RAN.TerminateeNB(HTML, EPC)
|
||||
|
||||
elif action == 'Initialize_UE' or action == 'Attach_UE' or action == 'Detach_UE' or action == 'Terminate_UE' or action == 'CheckStatusUE' or action == 'DataEnable_UE' or action == 'DataDisable_UE':
|
||||
CiTestObj.ue_ids = test.findtext('id').split(' ')
|
||||
if force_local:
|
||||
# Change all execution targets to localhost
|
||||
CiTestObj.nodes = ['localhost'] * len(CiTestObj.ue_ids)
|
||||
if test.findtext('nodes'):
|
||||
CiTestObj.nodes = test.findtext('nodes').split(' ')
|
||||
if len(CiTestObj.ue_ids) != len(CiTestObj.nodes):
|
||||
logging.error('Number of Nodes are not equal to the total number of UEs')
|
||||
sys.exit("Mismatch in number of Nodes and UIs")
|
||||
else:
|
||||
if test.findtext('nodes'):
|
||||
CiTestObj.nodes = test.findtext('nodes').split(' ')
|
||||
if len(CiTestObj.ue_ids) != len(CiTestObj.nodes):
|
||||
logging.error('Number of Nodes are not equal to the total number of UEs')
|
||||
sys.exit("Mismatch in number of Nodes and UIs")
|
||||
else:
|
||||
CiTestObj.nodes = [None] * len(CiTestObj.ue_ids)
|
||||
CiTestObj.nodes = [None] * len(CiTestObj.ue_ids)
|
||||
if action == 'Initialize_UE':
|
||||
success = CiTestObj.InitializeUE(HTML)
|
||||
elif action == 'Attach_UE':
|
||||
@@ -240,40 +238,29 @@ def ExecuteActionWithParam(action):
|
||||
CiTestObj.ping_args = test.findtext('ping_args')
|
||||
CiTestObj.ping_packetloss_threshold = test.findtext('ping_packetloss_threshold')
|
||||
CiTestObj.ue_ids = test.findtext('id').split(' ')
|
||||
CiTestObj.svr_id = test.findtext('svr_id') or None
|
||||
if test.findtext('svr_node'):
|
||||
CiTestObj.svr_node = test.findtext('svr_node') if not force_local else 'localhost'
|
||||
if force_local:
|
||||
# Change all execution targets to localhost
|
||||
CiTestObj.nodes = ['localhost'] * len(CiTestObj.ue_ids)
|
||||
if test.findtext('nodes'):
|
||||
CiTestObj.nodes = test.findtext('nodes').split(' ')
|
||||
if len(CiTestObj.ue_ids) != len(CiTestObj.nodes):
|
||||
logging.error('Number of Nodes are not equal to the total number of UEs')
|
||||
sys.exit("Mismatch in number of Nodes and UIs")
|
||||
else:
|
||||
if test.findtext('nodes'):
|
||||
CiTestObj.nodes = test.findtext('nodes').split(' ')
|
||||
if len(CiTestObj.ue_ids) != len(CiTestObj.nodes):
|
||||
logging.error('Number of Nodes are not equal to the total number of UEs')
|
||||
sys.exit("Mismatch in number of Nodes and UIs")
|
||||
else:
|
||||
CiTestObj.nodes = [None] * len(CiTestObj.ue_ids)
|
||||
CiTestObj.nodes = [None] * len(CiTestObj.ue_ids)
|
||||
ping_rttavg_threshold = test.findtext('ping_rttavg_threshold') or ''
|
||||
success = CiTestObj.Ping(HTML, CONTAINERS)
|
||||
success = CiTestObj.Ping(HTML,EPC,CONTAINERS)
|
||||
|
||||
elif action == 'Iperf' or action == 'Iperf2_Unidir':
|
||||
CiTestObj.iperf_args = test.findtext('iperf_args')
|
||||
CiTestObj.ue_ids = test.findtext('id').split(' ')
|
||||
CiTestObj.svr_id = test.findtext('svr_id') or None
|
||||
if force_local:
|
||||
# Change all execution targets to localhost
|
||||
CiTestObj.nodes = ['localhost'] * len(CiTestObj.ue_ids)
|
||||
if test.findtext('nodes'):
|
||||
CiTestObj.nodes = test.findtext('nodes').split(' ')
|
||||
if len(CiTestObj.ue_ids) != len(CiTestObj.nodes):
|
||||
logging.error('Number of Nodes are not equal to the total number of UEs')
|
||||
sys.exit("Mismatch in number of Nodes and UIs")
|
||||
else:
|
||||
if test.findtext('nodes'):
|
||||
CiTestObj.nodes = test.findtext('nodes').split(' ')
|
||||
if len(CiTestObj.ue_ids) != len(CiTestObj.nodes):
|
||||
logging.error('Number of Nodes are not equal to the total number of UEs')
|
||||
sys.exit("Mismatch in number of Nodes and UIs")
|
||||
else:
|
||||
CiTestObj.nodes = [None] * len(CiTestObj.ue_ids)
|
||||
CiTestObj.nodes = [None] * len(CiTestObj.ue_ids)
|
||||
if test.findtext('svr_node'):
|
||||
CiTestObj.svr_node = test.findtext('svr_node') if not force_local else 'localhost'
|
||||
CiTestObj.svr_node = test.findtext('svr_node')
|
||||
CiTestObj.iperf_packetloss_threshold = test.findtext('iperf_packetloss_threshold')
|
||||
CiTestObj.iperf_bitrate_threshold = test.findtext('iperf_bitrate_threshold') or '90'
|
||||
CiTestObj.iperf_profile = test.findtext('iperf_profile') or 'balanced'
|
||||
@@ -286,9 +273,9 @@ def ExecuteActionWithParam(action):
|
||||
logging.error('test-case has wrong option ' + CiTestObj.iperf_options)
|
||||
CiTestObj.iperf_options = 'check'
|
||||
if action == 'Iperf':
|
||||
success = CiTestObj.Iperf(HTML, CONTAINERS)
|
||||
success = CiTestObj.Iperf(HTML, EPC, CONTAINERS)
|
||||
elif action == 'Iperf2_Unidir':
|
||||
success = CiTestObj.Iperf2_Unidir(HTML, CONTAINERS)
|
||||
success = CiTestObj.Iperf2_Unidir(HTML, EPC, CONTAINERS)
|
||||
|
||||
elif action == 'IdleSleep':
|
||||
st = test.findtext('idle_sleep_time_in_sec') or "5"
|
||||
@@ -297,10 +284,47 @@ def ExecuteActionWithParam(action):
|
||||
elif action == 'Deploy_Run_PhySim':
|
||||
success = PHYSIM.Deploy_PhySim(HTML)
|
||||
|
||||
elif action == 'DeployCoreNetwork' or action == 'UndeployCoreNetwork':
|
||||
cn_id = test.findtext('cn_id')
|
||||
core_op = getattr(cls_oaicitest.OaiCiTest, action)
|
||||
success = core_op(cn_id, HTML)
|
||||
elif action == 'Initialize_MME':
|
||||
string_field = test.findtext('option')
|
||||
if (string_field is not None):
|
||||
EPC.mmeConfFile = string_field
|
||||
success = EPC.InitializeMME(HTML)
|
||||
|
||||
elif action == 'Initialize_HSS' or action == 'Initialize_SPGW':
|
||||
if action == 'Initialize_HSS':
|
||||
success = EPC.InitializeHSS(HTML)
|
||||
elif action == 'Initialize_SPGW':
|
||||
success = EPC.InitializeSPGW(HTML)
|
||||
elif action == 'Terminate_HSS' or action == 'Terminate_MME' or action == 'Terminate_SPGW':
|
||||
if action == 'Terminate_HSS':
|
||||
success = EPC.TerminateHSS(HTML)
|
||||
elif action == 'Terminate_MME':
|
||||
success = EPC.TerminateMME(HTML)
|
||||
elif action == 'Terminate_SPGW':
|
||||
success = EPC.TerminateSPGW(HTML)
|
||||
|
||||
elif action == 'Deploy_EPC':
|
||||
string_field = test.findtext('parameters')
|
||||
if (string_field is not None):
|
||||
EPC.yamlPath = string_field
|
||||
success = EPC.DeployEpc(HTML)
|
||||
|
||||
elif action == 'Undeploy_EPC':
|
||||
success = EPC.UndeployEpc(HTML)
|
||||
|
||||
elif action == 'Initialize_5GCN':
|
||||
string_field = test.findtext('args')
|
||||
if (string_field is not None):
|
||||
EPC.cfgDeploy = string_field
|
||||
EPC.cnID = test.findtext('cn_id')
|
||||
success = EPC.Initialize5GCN(HTML)
|
||||
|
||||
elif action == 'Terminate_5GCN':
|
||||
string_field = test.findtext('args')
|
||||
if (string_field is not None):
|
||||
EPC.cfgUnDeploy = string_field
|
||||
EPC.cnID = test.findtext('cn_id')
|
||||
success = EPC.Terminate5GCN(HTML)
|
||||
|
||||
elif action == 'Deploy_Object' or action == 'Undeploy_Object' or action == "Create_Workspace":
|
||||
eNB_instance=test.findtext('eNB_instance')
|
||||
@@ -332,9 +356,6 @@ def ExecuteActionWithParam(action):
|
||||
elif action == 'Undeploy_Object':
|
||||
success = CONTAINERS.UndeployObject(HTML, RAN)
|
||||
elif action == 'Create_Workspace':
|
||||
if force_local:
|
||||
# Do not create a working directory when running locally. Current repo directory will be used
|
||||
return True
|
||||
success = CONTAINERS.Create_Workspace(HTML)
|
||||
|
||||
elif action == 'Run_Physim':
|
||||
@@ -351,30 +372,22 @@ def ExecuteActionWithParam(action):
|
||||
|
||||
elif action == 'Push_Local_Registry':
|
||||
svr_id = test.findtext('svr_id')
|
||||
tag_prefix = test.findtext('tag_prefix') or ""
|
||||
success = CONTAINERS.Push_Image_to_Local_Registry(HTML, svr_id, tag_prefix)
|
||||
success = CONTAINERS.Push_Image_to_Local_Registry(HTML, svr_id)
|
||||
|
||||
elif action == 'Pull_Local_Registry' or action == 'Clean_Test_Server_Images':
|
||||
if force_local:
|
||||
# Do not pull or remove images when running locally. User is supposed to handle image creation & cleanup
|
||||
return True
|
||||
svr_id = test.findtext('svr_id')
|
||||
tag_prefix = test.findtext('tag_prefix') or ""
|
||||
images = test.findtext('images').split()
|
||||
# hack: for FlexRIC, we need to overwrite the tag to use
|
||||
tag = None
|
||||
if len(images) == 1 and images[0] == "oai-flexric":
|
||||
tag = CONTAINERS.flexricTag
|
||||
if action == "Pull_Local_Registry":
|
||||
success = CONTAINERS.Pull_Image_from_Registry(HTML, svr_id, images, tag=tag, tag_prefix=tag_prefix)
|
||||
success = CONTAINERS.Pull_Image_from_Registry(HTML, svr_id, images, tag=tag)
|
||||
if action == "Clean_Test_Server_Images":
|
||||
success = CONTAINERS.Clean_Test_Server_Images(HTML, svr_id, images, tag=tag)
|
||||
|
||||
elif action == 'Custom_Command':
|
||||
node = test.findtext('node')
|
||||
if force_local:
|
||||
# Change all execution targets to localhost
|
||||
node = 'localhost'
|
||||
command = test.findtext('command')
|
||||
command_fail = test.findtext('command_fail') in ['True', 'true', 'Yes', 'yes']
|
||||
success = cls_oaicitest.Custom_Command(HTML, node, command, command_fail)
|
||||
@@ -386,10 +399,9 @@ def ExecuteActionWithParam(action):
|
||||
success = cls_oaicitest.Custom_Script(HTML, node, script, command_fail)
|
||||
|
||||
elif action == 'Pull_Cluster_Image':
|
||||
tag_prefix = test.findtext('tag_prefix') or ""
|
||||
images = test.findtext('images').split()
|
||||
node = test.findtext('node')
|
||||
success = CLUSTER.PullClusterImage(HTML, node, images, tag_prefix=tag_prefix)
|
||||
success = CLUSTER.PullClusterImage(HTML, node, images)
|
||||
|
||||
else:
|
||||
logging.warning(f"unknown action {action}, skip step")
|
||||
@@ -438,6 +450,7 @@ mode = ''
|
||||
|
||||
CiTestObj = cls_oaicitest.OaiCiTest()
|
||||
|
||||
EPC = epc.EPCManagement()
|
||||
RAN = ran.RANManagement()
|
||||
HTML = cls_oai_html.HTMLManagement()
|
||||
CONTAINERS = cls_containerize.Containerize()
|
||||
@@ -450,9 +463,7 @@ CLUSTER = cls_cluster.Cluster()
|
||||
#-----------------------------------------------------------
|
||||
|
||||
import args_parse
|
||||
# Force local execution, move all execution targets to localhost
|
||||
force_local = False
|
||||
py_param_file_present, py_params, mode, force_local = args_parse.ArgsParse(sys.argv,CiTestObj,RAN,HTML,CONTAINERS,HELP,SCA,PHYSIM,CLUSTER)
|
||||
py_param_file_present, py_params, mode = args_parse.ArgsParse(sys.argv,CiTestObj,RAN,HTML,EPC,CONTAINERS,HELP,SCA,PHYSIM,CLUSTER)
|
||||
|
||||
|
||||
|
||||
@@ -477,13 +488,22 @@ if re.match('^TerminateeNB$', mode, re.IGNORECASE):
|
||||
RAN.eNB_instance=0
|
||||
RAN.eNB_serverId[0]='0'
|
||||
RAN.eNBSourceCodePath='/tmp/'
|
||||
RAN.TerminateeNB(HTML)
|
||||
RAN.TerminateeNB(HTML, EPC)
|
||||
elif re.match('^TerminateHSS$', mode, re.IGNORECASE):
|
||||
logging.warning("Option TerminateHSS ignored")
|
||||
if EPC.IPAddress == '' or EPC.UserName == '' or EPC.Password == '' or EPC.Type == '' or EPC.SourceCodePath == '':
|
||||
HELP.GenericHelp(CONST.Version)
|
||||
sys.exit('Insufficient Parameter')
|
||||
EPC.TerminateHSS(HTML)
|
||||
elif re.match('^TerminateMME$', mode, re.IGNORECASE):
|
||||
logging.warning("Option TerminateMME ignored")
|
||||
if EPC.IPAddress == '' or EPC.UserName == '' or EPC.Password == '' or EPC.Type == '' or EPC.SourceCodePath == '':
|
||||
HELP.GenericHelp(CONST.Version)
|
||||
sys.exit('Insufficient Parameter')
|
||||
EPC.TerminateMME(HTML)
|
||||
elif re.match('^TerminateSPGW$', mode, re.IGNORECASE):
|
||||
logging.warning("Option TerminateSPGW ignored")
|
||||
if EPC.IPAddress == '' or EPC.UserName == '' or EPC.Password == '' or EPC.Type == '' or EPC.SourceCodePath== '':
|
||||
HELP.GenericHelp(CONST.Version)
|
||||
sys.exit('Insufficient Parameter')
|
||||
EPC.TerminateSPGW(HTML)
|
||||
elif re.match('^LogCollectBuild$', mode, re.IGNORECASE):
|
||||
if (RAN.eNBIPAddress == '' or RAN.eNBUserName == '' or RAN.eNBPassword == '' or RAN.eNBSourceCodePath == '') and (CiTestObj.UEIPAddress == '' or CiTestObj.UEUserName == '' or CiTestObj.UEPassword == '' or CiTestObj.UESourceCodePath == ''):
|
||||
HELP.GenericHelp(CONST.Version)
|
||||
@@ -506,17 +526,35 @@ elif re.match('^LogCollecteNB$', mode, re.IGNORECASE):
|
||||
sys.exit(0)
|
||||
RAN.LogCollecteNB()
|
||||
elif re.match('^LogCollectHSS$', mode, re.IGNORECASE):
|
||||
logging.warning("Option LogCollectHSS ignored")
|
||||
if EPC.IPAddress == '' or EPC.UserName == '' or EPC.Password == '' or EPC.Type == '' or EPC.SourceCodePath == '':
|
||||
HELP.GenericHelp(CONST.Version)
|
||||
sys.exit('Insufficient Parameter')
|
||||
EPC.LogCollectHSS()
|
||||
elif re.match('^LogCollectMME$', mode, re.IGNORECASE):
|
||||
logging.warning("Option LogCollectMME ignored")
|
||||
if EPC.IPAddress == '' or EPC.UserName == '' or EPC.Password == '' or EPC.Type == '' or EPC.SourceCodePath == '':
|
||||
HELP.GenericHelp(CONST.Version)
|
||||
sys.exit('Insufficient Parameter')
|
||||
EPC.LogCollectMME()
|
||||
elif re.match('^LogCollectSPGW$', mode, re.IGNORECASE):
|
||||
logging.warning("Option LogCollectSPGW ignored")
|
||||
if EPC.IPAddress == '' or EPC.UserName == '' or EPC.Password == '' or EPC.Type == '' or EPC.SourceCodePath == '':
|
||||
HELP.GenericHelp(CONST.Version)
|
||||
sys.exit('Insufficient Parameter')
|
||||
EPC.LogCollectSPGW()
|
||||
elif re.match('^LogCollectPing$', mode, re.IGNORECASE):
|
||||
logging.warning("Option LogCollectPing ignored")
|
||||
if EPC.IPAddress == '' or EPC.UserName == '' or EPC.Password == '' or EPC.SourceCodePath == '':
|
||||
HELP.GenericHelp(CONST.Version)
|
||||
sys.exit('Insufficient Parameter')
|
||||
CiTestObj.LogCollectPing(EPC)
|
||||
elif re.match('^LogCollectIperf$', mode, re.IGNORECASE):
|
||||
logging.warning("Option LogCollectIperf ignored")
|
||||
if EPC.IPAddress == '' or EPC.UserName == '' or EPC.Password == '' or EPC.SourceCodePath == '':
|
||||
HELP.GenericHelp(CONST.Version)
|
||||
sys.exit('Insufficient Parameter')
|
||||
CiTestObj.LogCollectIperf(EPC)
|
||||
elif re.match('^LogCollectOAIUE$', mode, re.IGNORECASE):
|
||||
logging.warning("Option LogCollectOAIUE ignored")
|
||||
if CiTestObj.UEIPAddress == '' or CiTestObj.UEUserName == '' or CiTestObj.UEPassword == '' or CiTestObj.UESourceCodePath == '':
|
||||
HELP.GenericHelp(CONST.Version)
|
||||
sys.exit('Insufficient Parameter')
|
||||
CiTestObj.LogCollectOAIUE()
|
||||
elif re.match('^InitiateHtml$', mode, re.IGNORECASE):
|
||||
count = 0
|
||||
foundCount = 0
|
||||
@@ -549,8 +587,10 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
|
||||
logging.info('\u001B[1m Starting Scenario: ' + CiTestObj.testXMLfiles[0] + '\u001B[0m')
|
||||
logging.info('\u001B[1m----------------------------------------\u001B[0m')
|
||||
if re.match('^TesteNB$', mode, re.IGNORECASE):
|
||||
if RAN.eNBIPAddress == '' or RAN.ranRepository == '' or RAN.ranBranch == '' or RAN.eNBUserName == '' or RAN.eNBPassword == '' or RAN.eNBSourceCodePath == '':
|
||||
if RAN.eNBIPAddress == '' or RAN.ranRepository == '' or RAN.ranBranch == '' or RAN.eNBUserName == '' or RAN.eNBPassword == '' or RAN.eNBSourceCodePath == '' or EPC.IPAddress == '' or EPC.UserName == '' or EPC.Password == '' or EPC.Type == '' or EPC.SourceCodePath == '':
|
||||
HELP.GenericHelp(CONST.Version)
|
||||
if EPC.IPAddress == '' or EPC.UserName == '' or EPC.Password == '' or EPC.SourceCodePath == '' or EPC.Type == '':
|
||||
HELP.EPCSrvHelp(EPC.IPAddress, EPC.UserName, EPC.Password, EPC.SourceCodePath, EPC.Type)
|
||||
if RAN.ranRepository == '':
|
||||
HELP.GitSrvHelp(RAN.ranRepository, RAN.ranBranch, RAN.ranCommitID, RAN.ranAllowMerge, RAN.ranTargetBranch)
|
||||
if RAN.eNBIPAddress == '' or RAN.eNBUserName == '' or RAN.eNBPassword == '' or RAN.eNBSourceCodePath == '':
|
||||
@@ -601,6 +641,9 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
|
||||
else:
|
||||
logging.error('requested test is invalidly formatted: ' + test)
|
||||
sys.exit(1)
|
||||
if (EPC.IPAddress != '') and (EPC.IPAddress != 'none'):
|
||||
EPC.SetMmeIPAddress()
|
||||
EPC.SetAmfIPAddress()
|
||||
|
||||
#get the list of tests to be done
|
||||
todo_tests=[]
|
||||
@@ -625,12 +668,12 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
|
||||
continue
|
||||
CiTestObj.testCase_id = id
|
||||
HTML.testCase_id=CiTestObj.testCase_id
|
||||
EPC.testCase_id=CiTestObj.testCase_id
|
||||
CiTestObj.desc = test.findtext('desc')
|
||||
always_exec = test.findtext('always_exec') in ['True', 'true', 'Yes', 'yes']
|
||||
HTML.desc=CiTestObj.desc
|
||||
action = test.findtext('class')
|
||||
if (CheckClassValidity(xml_class_list, action, id) == False):
|
||||
task_set_succeeded = False
|
||||
continue
|
||||
CiTestObj.ShowTestID()
|
||||
if not task_set_succeeded and not always_exec:
|
||||
|
||||
@@ -102,7 +102,7 @@ class RANManagement():
|
||||
# RAN management functions
|
||||
#-----------------------------------------------------------
|
||||
|
||||
def InitializeeNB(self, HTML):
|
||||
def InitializeeNB(self, HTML, EPC):
|
||||
if self.eNB_serverId[self.eNB_instance] == '0':
|
||||
lIpAddr = self.eNBIPAddress
|
||||
lUserName = self.eNBUserName
|
||||
@@ -127,6 +127,20 @@ class RANManagement():
|
||||
mySSH = SSH.SSHConnection()
|
||||
cwd = os.getcwd()
|
||||
|
||||
# If tracer options is on, running tshark on EPC side and capture traffic b/ EPC and eNB
|
||||
if EPC.IPAddress != "none":
|
||||
localEpcIpAddr = EPC.IPAddress
|
||||
localEpcUserName = EPC.UserName
|
||||
localEpcPassword = EPC.Password
|
||||
mySSH.open(localEpcIpAddr, localEpcUserName, localEpcPassword)
|
||||
eth_interface = 'any'
|
||||
fltr = 'sctp'
|
||||
logging.debug('\u001B[1m Launching tshark on EPC on interface ' + eth_interface + ' with filter "' + fltr + '"\u001B[0m')
|
||||
self.epcPcapFile = 'enb_' + self.testCase_id + '_s1log.pcap'
|
||||
mySSH.command('echo ' + localEpcPassword + ' | sudo -S rm -f /tmp/' + self.epcPcapFile , '\$', 5)
|
||||
mySSH.command('echo $USER; nohup sudo tshark -f "host ' + lIpAddr +'" -i ' + eth_interface + ' -f "' + fltr + '" -w /tmp/' + self.epcPcapFile + ' > /tmp/tshark.log 2>&1 &', localEpcUserName, 5)
|
||||
mySSH.close()
|
||||
|
||||
mySSH.open(lIpAddr, lUserName, lPassWord)
|
||||
mySSH.command('cd ' + lSourcePath, '\$', 5)
|
||||
# Initialize_eNB_args usually start with -O and followed by the location in repository
|
||||
@@ -152,7 +166,10 @@ class RANManagement():
|
||||
result = re.search('^rru|^rcc|^du.band', str(config_file))
|
||||
if result is not None:
|
||||
rruCheck = True
|
||||
# Make a copy and adapt to EPC / eNB IP addresses
|
||||
mySSH.command('cp ' + full_config_file + ' ' + ci_full_config_file, '\$', 5)
|
||||
localMmeIpAddr = EPC.MmeIPAddress
|
||||
mySSH.command('sed -i -e \'s/CI_MME_IP_ADDR/' + localMmeIpAddr + '/\' ' + ci_full_config_file, '\$', 2);
|
||||
mySSH.command('sed -i -e \'s/CI_ENB_IP_ADDR/' + lIpAddr + '/\' ' + ci_full_config_file, '\$', 2);
|
||||
mySSH.command('sed -i -e \'s/CI_GNB_IP_ADDR/' + lIpAddr + '/\' ' + ci_full_config_file, '\$', 2);
|
||||
mySSH.command('sed -i -e \'s/CI_RCC_IP_ADDR/' + self.eNBIPAddress + '/\' ' + ci_full_config_file, '\$', 2);
|
||||
@@ -208,6 +225,20 @@ class RANManagement():
|
||||
doLoop = False
|
||||
logging.error('\u001B[1;37;41m eNB/gNB logging system did not show got sync! \u001B[0m')
|
||||
HTML.CreateHtmlTestRow(self.air_interface[self.eNB_instance] + ' -O ' + config_file + extra_options, 'KO', CONST.ALL_PROCESSES_OK)
|
||||
# In case of T tracer recording, we need to kill tshark on EPC side
|
||||
localEpcIpAddr = EPC.IPAddress
|
||||
localEpcUserName = EPC.UserName
|
||||
localEpcPassword = EPC.Password
|
||||
mySSH.open(localEpcIpAddr, localEpcUserName, localEpcPassword)
|
||||
logging.debug('\u001B[1m Stopping tshark on EPC \u001B[0m')
|
||||
mySSH.command('echo ' + localEpcPassword + ' | sudo -S killall --signal SIGKILL tshark', '\$', 5)
|
||||
if self.epcPcapFile != '':
|
||||
mySSH.command('echo ' + localEpcPassword + ' | sudo -S chmod 666 /tmp/' + self.epcPcapFile, '\$', 5)
|
||||
mySSH.close()
|
||||
if self.epcPcapFile != '':
|
||||
copyin_res = mySSH.copyin(localEpcIpAddr, localEpcUserName, localEpcPassword, '/tmp/' + self.epcPcapFile, '.')
|
||||
if (copyin_res == 0):
|
||||
mySSH.copyout(lIpAddr, lUserName, lPassWord, self.epcPcapFile, lSourcePath + '/cmake_targets/.')
|
||||
return False
|
||||
else:
|
||||
mySSH.command('stdbuf -o0 cat enb_' + self.testCase_id + '.log | grep -E --text --color=never -i "wait|sync|Starting|Started"', '\$', 4)
|
||||
@@ -285,7 +316,7 @@ class RANManagement():
|
||||
mySSH.close()
|
||||
return success
|
||||
|
||||
def TerminateeNB(self, HTML):
|
||||
def TerminateeNB(self, HTML, EPC):
|
||||
if self.eNB_serverId[self.eNB_instance] == '0':
|
||||
lIpAddr = self.eNBIPAddress
|
||||
lUserName = self.eNBUserName
|
||||
@@ -328,6 +359,20 @@ class RANManagement():
|
||||
mySSH.command('echo ' + lPassWord + ' | sudo -S killall --signal SIGKILL tshark', '\$', 5)
|
||||
time.sleep(1)
|
||||
mySSH.close()
|
||||
if EPC.IPAddress != "none" and EPC.IPAddress != '':
|
||||
localEpcIpAddr = EPC.IPAddress
|
||||
localEpcUserName = EPC.UserName
|
||||
localEpcPassword = EPC.Password
|
||||
logging.debug('\u001B[1m Stopping tshark on EPC (' + localEpcIpAddr + ') \u001B[0m')
|
||||
mySSH.open(localEpcIpAddr, localEpcUserName, localEpcPassword)
|
||||
mySSH.command('echo ' + localEpcPassword + ' | sudo -S killall --signal SIGKILL tshark', '\$', 5)
|
||||
time.sleep(1)
|
||||
if self.epcPcapFile != '':
|
||||
mySSH.command('echo ' + localEpcPassword + ' | sudo -S chmod 666 /tmp/' + self.epcPcapFile, '\$', 5)
|
||||
mySSH.copyin(localEpcIpAddr, localEpcUserName, localEpcPassword, '/tmp/' + self.epcPcapFile, '.')
|
||||
mySSH.copyout(lIpAddr, lUserName, lPassWord, self.epcPcapFile, lSourcePath + '/cmake_targets/.')
|
||||
mySSH.command('killall --signal SIGKILL record', '\$', 5)
|
||||
mySSH.close()
|
||||
# if T tracer was run with option 0 (no logs), analyze logs
|
||||
# from textlog, otherwise do normal analysis (e.g., option 2)
|
||||
result = re.search('T_stdout 0', str(self.Initialize_eNB_args))
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
SHORT_COMMIT_SHA=$(git rev-parse --short=8 HEAD)
|
||||
COMMIT_SHA=$(git rev-parse HEAD)
|
||||
CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD)
|
||||
REPO_PATH=$(dirname $(realpath $0))/../
|
||||
TESTCASE=$1
|
||||
|
||||
if [ $# -eq 0 ]
|
||||
then
|
||||
echo "Provide a testcase as an argument"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# The script assumes you've build the following images:
|
||||
#
|
||||
# docker build . -f docker/Dockerfile.gNB.ubuntu22 -t oai-gnb
|
||||
# docker build . -f docker/Dockerfile.nrUE.ubuntu22 -t oai-nr-ue
|
||||
#
|
||||
# The images above depend on the following images:
|
||||
#
|
||||
# docker build . -f docker/Dockerfile.build.ubuntu22 -t ran-build
|
||||
# dokcer build . -f docker/Dockerfile.base.ubuntu22 -t ran-base
|
||||
|
||||
docker tag oai-nr-ue oai-ci/oai-nr-ue:develop-${SHORT_COMMIT_SHA}
|
||||
docker tag oai-gnb oai-ci/oai-gnb:develop-${SHORT_COMMIT_SHA}
|
||||
|
||||
python3 main.py --mode=TesteNB --ranRepository=NONE --ranBranch=${CURRENT_BRANCH} \
|
||||
--ranCommitID=${COMMIT_SHA} --ranAllowMerge=false \
|
||||
--ranTargetBranch=NONE --eNBIPAddress=NONE --eNBUserName=NONE --eNBPassword=NONE \
|
||||
--eNBSourceCodePath=${REPO_PATH} \
|
||||
--XMLTestFile=xml_files/${TESTCASE} --local
|
||||
@@ -1,28 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
function die() { echo "${@}"; exit 1; }
|
||||
|
||||
[ $# -eq 1 ] || die "usage: $0 <path>"
|
||||
|
||||
DOCKERFILE="${1}"
|
||||
|
||||
function wait_for() {
|
||||
local timeout=${1}
|
||||
local condition=${2}
|
||||
echo "wait up to ${timeout} seconds for condition \"${condition}\""
|
||||
while [ $timeout -gt 0 ]; do
|
||||
eval ${condition} && return
|
||||
sleep 1
|
||||
let timeout=$timeout-1
|
||||
done
|
||||
die "ERROR: timed out waiting for condition \"${condition}\""
|
||||
}
|
||||
|
||||
# start database
|
||||
docker compose -f ${DOCKERFILE} up -d db_init cassandra
|
||||
wait_for 30 "docker logs prod-db-init 2> /dev/null | grep OK"
|
||||
|
||||
# start EPC
|
||||
docker compose -f ${DOCKERFILE} up -d oai_hss redis magma_mme oai_spgwc oai_spgwu trf_gen
|
||||
wait_for 20 "docker inspect --format='{{.State.Health.Status}}' prod-cassandra prod-oai-hss prod-magma-mme prod-oai-spgwc prod-oai-spgwu-tiny prod-redis prod-trf-gen | grep healthy | wc -l | grep 7"
|
||||
echo "deployment OK"
|
||||
@@ -1,12 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
function die() { echo "${@}"; exit 1; }
|
||||
|
||||
[ $# -eq 1 ] || die "usage: $0 <logdir>"
|
||||
|
||||
DIR=${1}
|
||||
|
||||
docker logs prod-oai-hss &> ${DIR}/oai-hss.log
|
||||
docker logs prod-magma-mme &> ${DIR}/magme-mme.log
|
||||
docker logs prod-oai-spgwc &> ${DIR}/oai-spgwc.log
|
||||
docker logs prod-oai-spgwu-tiny &> ${DIR}/oai-spgwu.log
|
||||
@@ -1,14 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
function die() { echo $@; exit 1; }
|
||||
[ $# -eq 2 ] || die "usage: $0 <path-to-dir> <namespace>"
|
||||
|
||||
OC_DIR=${1}
|
||||
OC_NS=${2}
|
||||
|
||||
cat ${OC_DIR}/oc-password | oc login -u oaicicd --server https://api.oai.cs.eurecom.fr:6443 > /dev/null
|
||||
oc project ${OC_NS} > /dev/null
|
||||
helm install --wait oai5gcn ${OC_DIR}/ci-scripts/charts/oai-5g-basic/.
|
||||
oc logout > /dev/null
|
||||
@@ -1,21 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
function die() { echo $@; exit 1; }
|
||||
[ $# -eq 3 ] || die "usage: $0 <path-to-dir> <namespace> <dir>"
|
||||
|
||||
OC_DIR=${1}
|
||||
OC_NS=${2}
|
||||
DIR=${3}
|
||||
|
||||
cat ${OC_DIR}/oc-password | oc login -u oaicicd --server https://api.oai.cs.eurecom.fr:6443 > /dev/null
|
||||
oc project ${OC_NS} > /dev/null
|
||||
oc describe pod > ${DIR}/describe-pods-post-test.log
|
||||
oc get pods.metrics.k8s &> ${DIR}/nf-resource-consumption.log
|
||||
for p in nrf amf smf upf ausf udm udr; do
|
||||
oc logs -l app.kubernetes.io/name=oai-${p} -c ${p} --tail=-1 > ${DIR}/oai-${p}.log
|
||||
done
|
||||
oc logs -l app.kubernetes.io/name=mysql --tail=-1 > ${DIR}/mysql.log
|
||||
oc logs -l app.kubernetes.io/name=oai-traffic-server --tail=-1 > ${DIR}/oai-traffic-server.log
|
||||
oc logout > /dev/null
|
||||
@@ -1,14 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
function die() { echo $@; exit 1; }
|
||||
[ $# -eq 2 ] || die "usage: $0 <path-to-dir> <namespace>"
|
||||
|
||||
OC_DIR=${1}
|
||||
OC_NS=${2}
|
||||
|
||||
cat ${OC_DIR}/oc-password | oc login -u oaicicd --server https://api.oai.cs.eurecom.fr:6443 > /dev/null
|
||||
oc project ${OC_NS} > /dev/null
|
||||
helm uninstall oai5gcn --wait
|
||||
oc logout > /dev/null
|
||||
@@ -12,7 +12,6 @@ To run individual unit tests, start them like so:
|
||||
|
||||
python tests/build.py -v
|
||||
python tests/cmd.py -v
|
||||
python tests/corenetwork.py -v
|
||||
python tests/deployment.py -v
|
||||
python tests/iperf-analysis.py -v
|
||||
python tests/ping-iperf.py -v
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
test:
|
||||
Host: localhost
|
||||
NetworkScript: echo "inet 127.0.0.1 mtu 1500"
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user