diff --git a/ci-scripts/Jenkinsfile-GitLab-Container b/ci-scripts/Jenkinsfile-GitLab-Container index 0a033cf760..118eb844d4 100644 --- a/ci-scripts/Jenkinsfile-GitLab-Container +++ b/ci-scripts/Jenkinsfile-GitLab-Container @@ -405,6 +405,26 @@ pipeline { } } } + stage ("SA-AW2S-CN5G") { + when { expression {do5Gtest} } + steps { + script { + triggerSlaveJob ('RAN-SA-AW2S-CN5G', 'SA-AW2S-CN5G') + } + } + post { + always { + script { + finalizeSlaveJob('RAN-SA-AW2S-CN5G') + } + } + failure { + script { + currentBuild.result = 'FAILURE' + } + } + } + } //avra is offline, re-enable once it is available //stage ("T1-Offload-Test") { diff --git a/ci-scripts/Jenkinsfile-physim-deploy b/ci-scripts/Jenkinsfile-physim-deploy index 2bdcac42aa..ef5b1f2852 100644 --- a/ci-scripts/Jenkinsfile-physim-deploy +++ b/ci-scripts/Jenkinsfile-physim-deploy @@ -211,10 +211,16 @@ pipeline { script { dir ('ci-scripts') { // Zipping all archived log files - sh "zip -r -qq physim_deploytest_logs_${env.BUILD_ID}.zip physim_test_logs_*/*" - sh "rm -rf physim_test_logs_*/" - if (fileExists("physim_deploytest_logs_${env.BUILD_ID}.zip")) { - archiveArtifacts artifacts: "physim_deploytest_logs_${env.BUILD_ID}.zip" + sh "mkdir test_logs" + sh "mv *.log* test_logs || true" + sh "zip -r -qq test_logs_${env.BUILD_ID}.zip *test_log*/" + sh "rm -rf *test_log*/" + 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" diff --git a/ci-scripts/args_parse.py b/ci-scripts/args_parse.py index 07c1ce5db0..7196d266d8 100644 --- a/ci-scripts/args_parse.py +++ b/ci-scripts/args_parse.py @@ -197,6 +197,7 @@ def ArgsParse(argvs,CiTestObj,RAN,HTML,EPC,ldpc,CONTAINERS,HELP,SCA,PHYSIM,CLUST SCA.eNBSourceCodePath=matchReg.group(1) PHYSIM.eNBSourceCodePath=matchReg.group(1) CLUSTER.eNBSourceCodePath=matchReg.group(1) + EPC.eNBSourceCodePath=matchReg.group(1) elif re.match('^\-\-eNB1SourceCodePath=(.+)$', myArgv, re.IGNORECASE): matchReg = re.match('^\-\-eNB1SourceCodePath=(.+)$', myArgv, re.IGNORECASE) RAN.eNB1SourceCodePath=matchReg.group(1) @@ -219,10 +220,10 @@ def ArgsParse(argvs,CiTestObj,RAN,HTML,EPC,ldpc,CONTAINERS,HELP,SCA,PHYSIM,CLUST 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-CUPS', matchReg.group(1), re.IGNORECASE) or re.match('OAI-Rel14-Docker', matchReg.group(1), 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-CUPS', 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-CUPS or OAI-Rel14-Docker)') + sys.exit('Invalid EPC Type: ' + matchReg.group(1) + ' -- (should be OAI or ltebox or OAI-Rel14-CUPS 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) @@ -260,14 +261,17 @@ def ArgsParse(argvs,CiTestObj,RAN,HTML,EPC,ldpc,CONTAINERS,HELP,SCA,PHYSIM,CLUST matchReg = re.match('^\-\-OCUserName=(.+)$', myArgv, re.IGNORECASE) PHYSIM.OCUserName = matchReg.group(1) CLUSTER.OCUserName = matchReg.group(1) + 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) + 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) + EPC.OCProjectName = matchReg.group(1) elif re.match('^\-\-OCUrl=(.+)$', myArgv, re.IGNORECASE): matchReg = re.match('^\-\-OCUrl=(.+)$', myArgv, re.IGNORECASE) CLUSTER.OCUrl = matchReg.group(1) diff --git a/ci-scripts/as_ue/aw2s-asue.cfg b/ci-scripts/as_ue/aw2s-asue.cfg new file mode 100644 index 0000000000..805c794b0d --- /dev/null +++ b/ci-scripts/as_ue/aw2s-asue.cfg @@ -0,0 +1,183 @@ +/* UE simulator configuration file version 2021-06-17 + * LTE / 5G Non StandAlone + * Copyright (C) 2019-2021 Amarisoft + */ +{ +#define N_ANTENNA_DL 1 +#define TDD 1 + +log_options: "all.level=warn,all.max_size=0,nas.level=debug,nas.max_size=1,rrc.level=debug,rrc.max_size=1", +log_filename: "/tmp/ue1.log", + +/* Enable remote API and Web interface */ +com_addr: "0.0.0.0:9002", + +include "rf_driver/1chan.cfg", + +/* If true, allow the simulation of several UEs at the same time and +allow dynamic UE creation from remote API */ + +cell_groups: [{ + group_type: "nr", + multi_ue: true, + cells: [{ + rf_port: 0, + bandwidth: 20, +#if TDD == 1 + band: 78, + dl_nr_arfcn:627360, + ssb_nr_arfcn:627360, +#else + band: 7, + dl_nr_arfcn: 536020, + ssb_nr_arfcn: 535930, + ssb_subcarrier_spacing: 15, +#endif + subcarrier_spacing: 30, + n_antenna_dl: N_ANTENNA_DL, + n_antenna_ul: 1, + rx_to_tx_latency:2, + }], + }], + + ue_list: [ + { + /* UE capabilities */ + /* USIM data */ + "ue_id" : 1, + "imsi": "001010000000100", + "K": "fec86ba6eb707ed08905757b1bb44b8f", + "sim_algo":"milenage", + "op": "1006020f0a478bf6b699f15c062e42b3", + + as_release: 15, + ue_category: "nr", + apn:"oai", + attach_pdn_type:"ipv4", + default_nssai: [ { sst: 1, }, ], + default_pdu_session_snssai: { sst: 1, }, + + /* Enable it to create a TUN interface for each UE PDN */ + tun_setup_script: "ue-ifup", + }, + { + /* UE capabilities */ + /* USIM data */ + "ue_id" : 2, + "imsi": "001010000000101", + "K": "fec86ba6eb707ed08905757b1bb44b8f", + "sim_algo":"milenage", + "op": "1006020f0a478bf6b699f15c062e42b3", + + as_release: 15, + ue_category: "nr", + apn:"oai", + attach_pdn_type:"ipv4", + default_nssai: [ { sst: 1, }, ], + default_pdu_session_snssai: { sst: 1, }, + + /* Enable it to create a TUN interface for each UE PDN */ + tun_setup_script: "ue-ifup", + }, + { + /* UE capabilities */ + /* USIM data */ + "ue_id" : 3, + "imsi": "001010000000102", + "K": "fec86ba6eb707ed08905757b1bb44b8f", + "sim_algo":"milenage", + "op": "1006020f0a478bf6b699f15c062e42b3", + + as_release: 15, + ue_category: "nr", + apn:"oai", + attach_pdn_type:"ipv4", + default_nssai: [ { sst: 1, sd: 66051, }, ], + default_pdu_session_snssai: { sst: 1, sd: 66051, }, + + /* Enable it to create a TUN interface for each UE PDN */ + tun_setup_script: "ue-ifup", + }, + { + /* UE capabilities */ + /* USIM data */ + "ue_id" : 4, + "imsi": "001010000000103", + "K": "fec86ba6eb707ed08905757b1bb44b8f", + "sim_algo":"milenage", + "op": "1006020f0a478bf6b699f15c062e42b3", + + as_release: 15, + ue_category: "nr", + apn:"oai", + attach_pdn_type:"ipv4", + default_nssai: [ { sst: 1, sd: 66051, }, ], + default_pdu_session_snssai: { sst: 1, sd: 66051, }, + + /* Enable it to create a TUN interface for each UE PDN */ + tun_setup_script: "ue-ifup", + }, + { + /* UE capabilities */ + /* USIM data */ + "ue_id" : 5, + "imsi": "001010000000104", + "K": "fec86ba6eb707ed08905757b1bb44b8f", + "sim_algo":"milenage", + "op": "1006020f0a478bf6b699f15c062e42b3", + + as_release: 15, + ue_category: "nr", + apn:"oai", + attach_pdn_type:"ipv4", + default_nssai: [ { sst: 1, sd: 66051, }, ], + default_pdu_session_snssai: { sst: 1, sd: 66051, }, + + /* Enable it to create a TUN interface for each UE PDN */ + tun_setup_script: "ue-ifup", + }, + { + /* UE capabilities */ + /* USIM data */ + "ue_id" : 6, + "imsi": "001010000000105", + "K": "fec86ba6eb707ed08905757b1bb44b8f", + "sim_algo":"milenage", + "op": "1006020f0a478bf6b699f15c062e42b3", + + as_release: 15, + ue_category: "nr", + apn:"oai", + attach_pdn_type:"ipv4", + default_nssai: [ { sst: 1, sd: 66051, }, ], + default_pdu_session_snssai: { sst: 1, sd: 66051, }, + + /* Enable it to create a TUN interface for each UE PDN */ + tun_setup_script: "ue-ifup", + }, + { + /* UE capabilities */ + + /* USIM data */ + "ue_id" : 7, + "imsi": "001010000000106", + "K": "fec86ba6eb707ed08905757b1bb44b8f", + "sim_algo":"milenage", + "op": "1006020f0a478bf6b699f15c062e42b3", + + as_release: 15, + ue_category: "nr", + apn:"oai", + attach_pdn_type:"ipv4", + default_nssai: [ { sst: 1, sd: 66051, }, ], + default_pdu_session_snssai: { sst: 1, sd: 66051, }, + + + /* Enable it to allow sim_events to be handled remotely */ + //rue_addr: "127.1.0.0", + /* Enable it to create a TUN interface for each UE PDN */ + tun_setup_script: "ue-ifup", + }, + ], +} + diff --git a/ci-scripts/as_ue/oaicicd-3xue-noPing-SATest.cfg b/ci-scripts/as_ue/oaicicd-3xue-noPing-SATest.cfg deleted file mode 100644 index a9299b67e3..0000000000 --- a/ci-scripts/as_ue/oaicicd-3xue-noPing-SATest.cfg +++ /dev/null @@ -1,172 +0,0 @@ -/* UE simulator configuration */ - - -/* UE simulator configuration file version 2021-06-17 - * LTE / 5G Non StandAlone - * Copyright (C) 2019-2021 Amarisoft - */ -{ -#define N_ANTENNA_DL 1 -#define TDD 1 -#define CELL_BANDWIDTH 40 -#define UE_COUNT 3 // number of simulated UEs 208970100001127, 208970100001128, 208970100001129 - - -log_options: "all.level=error,all.max_size=0,nas.level=debug,nas.max_size=1,rrc.level=debug,rrc.max_size=1", -log_filename: "/tmp/ue0.log", - -/* Enable remote API and Web interface */ -com_addr: "0.0.0.0:9002", - -include "rf_driver/1chan.cfg", - -/* If true, allow the simulation of several UEs at the same time and allow dynamic UE creation from remote API */ - -cell_groups: [{ - group_type: "nr", - multi_ue: true, - cells: [{ - rf_port: 0, - bandwidth: CELL_BANDWIDTH, -#if TDD == 1 - band: 78, - dl_nr_arfcn:621312, - ssb_nr_arfcn:621312, - - //band: 41, - //dl_nr_arfcn:517020, - //ssb_nr_arfcn:516990, -#else - band: 7, - dl_nr_arfcn: 536020, - ssb_nr_arfcn: 535930, - ssb_subcarrier_spacing: 15, -#endif - subcarrier_spacing: 30, - n_antenna_dl: N_ANTENNA_DL, - n_antenna_ul: 1, - rx_to_tx_latency:2, - }], -}], - - -/* Enable it to allow sim_events to be handled remotely */ -//rue_bind_addr: "127.0.10.11", - - - -ue_list: [ - { - /* UE capabilities */ - /* USIM data */ - "ue_id" : 0, - "imsi": "208970100001127", - "K": "fec86ba6eb707ed08905757b1bb44b8f", - "sim_algo":"milenage", - "op": "1006020f0a478bf6b699f15c062e42b3", - as_release: 15, - ue_category: "nr", - apn:"oai", - attach_pdn_type:"ipv4", - default_nssai: [ - { - sst: 1, - sd: 66051, - }, - ], - default_pdu_session_snssai: { - sst: 1, - sd: 66051, - }, - /* Enable it to allow sim_events to be handled remotely */ - //rue_addr: "127.1.0.0", - /* Enable it to create a TUN interface for each UE PDN */ - tun_setup_script: "ue-ifup", - sim_events: [ - { - event: "power_on", - start_time: 5, - }, - { - event: "power_off", - start_time: 30, - } - ] /*end sim events */ - }, /*end UE object 0*/ - { - /* UE capabilities */ - /* USIM data */ - "ue_id" : 1, - "imsi": "208970100001128", - "K": "fec86ba6eb707ed08905757b1bb44b8f", - "sim_algo":"milenage", - "op": "1006020f0a478bf6b699f15c062e42b3", - as_release: 15, - ue_category: "nr", - apn:"oai", - attach_pdn_type:"ipv4", - default_nssai: [ - { - sst: 1, - sd: 66051, - }, - ], - default_pdu_session_snssai: { - sst: 1, - sd: 66051, - }, - /* Enable it to allow sim_events to be handled remotely */ - //rue_addr: "127.1.0.0", - /* Enable it to create a TUN interface for each UE PDN */ - tun_setup_script: "ue-ifup", - sim_events: [ - { - event: "power_on", - start_time: 5, - }, - { - event: "power_off", - start_time: 30, - } - ] /*end sim events */ - }, /*end UE object 1*/ - { - /* UE capabilities */ - /* USIM data */ - "ue_id" : 2, - "imsi": "208970100001129", - "K": "fec86ba6eb707ed08905757b1bb44b8f", - "sim_algo":"milenage", - "op": "1006020f0a478bf6b699f15c062e42b3", - as_release: 15, - ue_category: "nr", - apn:"oai", - attach_pdn_type:"ipv4", - default_nssai: [ - { - sst: 1, - sd: 66051, - }, - ], - default_pdu_session_snssai: { - sst: 1, - sd: 66051, - }, - /* Enable it to allow sim_events to be handled remotely */ - //rue_addr: "127.1.0.0", - /* Enable it to create a TUN interface for each UE PDN */ - tun_setup_script: "ue-ifup", - sim_events: [ - { - event: "power_on", - start_time: 5, - }, - { - event: "power_off", - start_time: 30, - } - ] /*end sim events */ - } /*end UE object 2*/ - ],/*end UE list*/ -}/*end json*/ - diff --git a/ci-scripts/as_ue/oaicicd-multi-ue-1xPing-SATest.cfg b/ci-scripts/as_ue/oaicicd-multi-ue-1xPing-SATest.cfg deleted file mode 100644 index 3405f99a59..0000000000 --- a/ci-scripts/as_ue/oaicicd-multi-ue-1xPing-SATest.cfg +++ /dev/null @@ -1,142 +0,0 @@ -/* UE simulator configuration */ - - -/* UE simulator configuration file version 2021-06-17 - * LTE / 5G Non StandAlone - * Copyright (C) 2019-2021 Amarisoft - */ -{ -#define N_ANTENNA_DL 1 -#define TDD 1 -#define CELL_BANDWIDTH 40 -#define UE_COUNT 2 // number of simulated UEs 208970100001127, 208970100001128, 208970100001129 - - -log_options: "all.level=error,all.max_size=0,nas.level=debug,nas.max_size=1,rrc.level=debug,rrc.max_size=1", -log_filename: "/tmp/ue0.log", - -/* Enable remote API and Web interface */ -com_addr: "0.0.0.0:9002", - -include "rf_driver/1chan.cfg", - -/* If true, allow the simulation of several UEs at the same time and allow dynamic UE creation from remote API */ - -cell_groups: [{ - group_type: "nr", - multi_ue: true, - cells: [{ - rf_port: 0, - bandwidth: CELL_BANDWIDTH, -#if TDD == 1 - band: 78, - dl_nr_arfcn:621312, - ssb_nr_arfcn:621312, - - //band: 41, - //dl_nr_arfcn:517020, - //ssb_nr_arfcn:516990, -#else - band: 7, - dl_nr_arfcn: 536020, - ssb_nr_arfcn: 535930, - ssb_subcarrier_spacing: 15, -#endif - subcarrier_spacing: 30, - n_antenna_dl: N_ANTENNA_DL, - n_antenna_ul: 1, - rx_to_tx_latency:2, - }], -}], - - -/* Enable it to allow sim_events to be handled remotely */ -//rue_bind_addr: "127.0.10.11", - - - -ue_list: [ - { - /* UE capabilities */ - /* USIM data */ - "ue_id" : 1, - "imsi": "208970100001127", - "K": "fec86ba6eb707ed08905757b1bb44b8f", - "sim_algo":"milenage", - "op": "1006020f0a478bf6b699f15c062e42b3", - as_release: 15, - ue_category: "nr", - apn:"oai", - attach_pdn_type:"ipv4", - default_nssai: [ - { - sst: 1, - sd: 66051, - }, - ], - default_pdu_session_snssai: { - sst: 1, - sd: 66051, - }, - /* Enable it to allow sim_events to be handled remotely */ - //rue_addr: "127.1.0.0", - /* Enable it to create a TUN interface for each UE PDN */ - tun_setup_script: "ue-ifup", - sim_events: [ - { - event: "power_on", - start_time: 5, - }, - { - event: "power_off", - start_time: 30, - } - ] /*end sim events */ - }, /*end UE object 0*/ - { - /* UE capabilities */ - /* USIM data */ - "ue_id" : 2, - "imsi": "208970100001128", - "K": "fec86ba6eb707ed08905757b1bb44b8f", - "sim_algo":"milenage", - "op": "1006020f0a478bf6b699f15c062e42b3", - as_release: 15, - ue_category: "nr", - apn:"oai", - attach_pdn_type:"ipv4", - default_nssai: [ - { - sst: 1, - sd: 66051, - }, - ], - default_pdu_session_snssai: { - sst: 1, - sd: 66051, - }, - /* Enable it to allow sim_events to be handled remotely */ - //rue_addr: "127.1.0.0", - /* Enable it to create a TUN interface for each UE PDN */ - tun_setup_script: "ue-ifup", - sim_events: [ - { - event: "power_on", - start_time: 5, - }, - { - "tag": "ping", - "prog":"oai_ext_app.sh", - start_time: 15, - end_time: 25, - "args":["ping 192.168.70.136"], - "event":"ext_app" - }, - { - event: "power_off", - start_time: 30, - } - ] /*end sim events */ - } /*end UE object 1*/ - ],/*end UE list*/ -}/*end json*/ diff --git a/ci-scripts/as_ue/oaicicd-multi-ue-2xPing-SATest.cfg b/ci-scripts/as_ue/oaicicd-multi-ue-2xPing-SATest.cfg deleted file mode 100644 index eaa9b894fc..0000000000 --- a/ci-scripts/as_ue/oaicicd-multi-ue-2xPing-SATest.cfg +++ /dev/null @@ -1,150 +0,0 @@ -/* UE simulator configuration */ - - -/* UE simulator configuration file version 2021-06-17 - * LTE / 5G Non StandAlone - * Copyright (C) 2019-2021 Amarisoft - */ -{ -#define N_ANTENNA_DL 1 -#define TDD 1 -#define CELL_BANDWIDTH 40 -#define UE_COUNT 2 // number of simulated UEs 208970100001127, 208970100001128, 208970100001129 - - -log_options: "all.level=error,all.max_size=0,nas.level=debug,nas.max_size=1,rrc.level=debug,rrc.max_size=1", -log_filename: "/tmp/ue0.log", - -/* Enable remote API and Web interface */ -com_addr: "0.0.0.0:9002", - -include "rf_driver/1chan.cfg", - -/* If true, allow the simulation of several UEs at the same time and allow dynamic UE creation from remote API */ - -cell_groups: [{ - group_type: "nr", - multi_ue: true, - cells: [{ - rf_port: 0, - bandwidth: CELL_BANDWIDTH, -#if TDD == 1 - band: 78, - dl_nr_arfcn:621312, - ssb_nr_arfcn:621312, - - //band: 41, - //dl_nr_arfcn:517020, - //ssb_nr_arfcn:516990, -#else - band: 7, - dl_nr_arfcn: 536020, - ssb_nr_arfcn: 535930, - ssb_subcarrier_spacing: 15, -#endif - subcarrier_spacing: 30, - n_antenna_dl: N_ANTENNA_DL, - n_antenna_ul: 1, - rx_to_tx_latency:2, - }], -}], - - -/* Enable it to allow sim_events to be handled remotely */ -//rue_bind_addr: "127.0.10.11", - - - -ue_list: [ - { - /* UE capabilities */ - /* USIM data */ - "ue_id" : 1, - "imsi": "208970100001127", - "K": "fec86ba6eb707ed08905757b1bb44b8f", - "sim_algo":"milenage", - "op": "1006020f0a478bf6b699f15c062e42b3", - as_release: 15, - ue_category: "nr", - apn:"oai", - attach_pdn_type:"ipv4", - default_nssai: [ - { - sst: 1, - sd: 66051, - }, - ], - default_pdu_session_snssai: { - sst: 1, - sd: 66051, - }, - /* Enable it to allow sim_events to be handled remotely */ - //rue_addr: "127.1.0.0", - /* Enable it to create a TUN interface for each UE PDN */ - tun_setup_script: "ue-ifup", - sim_events: [ - { - event: "power_on", - start_time: 5, - }, - { - "tag": "ping", - "prog":"oai_ext_app.sh", - start_time: 15, - end_time: 25, - "args":["ping 192.168.70.136"], - "event":"ext_app" - }, - { - event: "power_off", - start_time: 30, - } - ] /*end sim events */ - }, /*end UE object 0*/ - { - /* UE capabilities */ - /* USIM data */ - "ue_id" : 2, - "imsi": "208970100001128", - "K": "fec86ba6eb707ed08905757b1bb44b8f", - "sim_algo":"milenage", - "op": "1006020f0a478bf6b699f15c062e42b3", - as_release: 15, - ue_category: "nr", - apn:"oai", - attach_pdn_type:"ipv4", - default_nssai: [ - { - sst: 1, - sd: 66051, - }, - ], - default_pdu_session_snssai: { - sst: 1, - sd: 66051, - }, - /* Enable it to allow sim_events to be handled remotely */ - //rue_addr: "127.1.0.0", - /* Enable it to create a TUN interface for each UE PDN */ - tun_setup_script: "ue-ifup", - sim_events: [ - { - event: "power_on", - start_time: 5, - }, - { - "tag": "ping", - "prog":"oai_ext_app.sh", - start_time: 15, - end_time: 25, - "args":["ping 192.168.70.136"], - "event":"ext_app" - }, - { - event: "power_off", - start_time: 30, - } - ] /*end sim events */ - } /*end UE object 1*/ - ],/*end UE list*/ -}/*end json*/ diff --git a/ci-scripts/as_ue/oaicicd-multi-ue-2xPingSeq-SATest.cfg b/ci-scripts/as_ue/oaicicd-multi-ue-2xPingSeq-SATest.cfg deleted file mode 100644 index 9ebb3e01c5..0000000000 --- a/ci-scripts/as_ue/oaicicd-multi-ue-2xPingSeq-SATest.cfg +++ /dev/null @@ -1,150 +0,0 @@ -/* UE simulator configuration */ - - -/* UE simulator configuration file version 2021-06-17 - * LTE / 5G Non StandAlone - * Copyright (C) 2019-2021 Amarisoft - */ -{ -#define N_ANTENNA_DL 1 -#define TDD 1 -#define CELL_BANDWIDTH 40 -#define UE_COUNT 2 // number of simulated UEs 208970100001127, 208970100001128, 208970100001129 - - -log_options: "all.level=error,all.max_size=0,nas.level=debug,nas.max_size=1,rrc.level=debug,rrc.max_size=1", -log_filename: "/tmp/ue0.log", - -/* Enable remote API and Web interface */ -com_addr: "0.0.0.0:9002", - -include "rf_driver/1chan.cfg", - -/* If true, allow the simulation of several UEs at the same time and allow dynamic UE creation from remote API */ - -cell_groups: [{ - group_type: "nr", - multi_ue: true, - cells: [{ - rf_port: 0, - bandwidth: CELL_BANDWIDTH, -#if TDD == 1 - band: 78, - dl_nr_arfcn:621312, - ssb_nr_arfcn:621312, - - //band: 41, - //dl_nr_arfcn:517020, - //ssb_nr_arfcn:516990, -#else - band: 7, - dl_nr_arfcn: 536020, - ssb_nr_arfcn: 535930, - ssb_subcarrier_spacing: 15, -#endif - subcarrier_spacing: 30, - n_antenna_dl: N_ANTENNA_DL, - n_antenna_ul: 1, - rx_to_tx_latency:2, - }], -}], - - -/* Enable it to allow sim_events to be handled remotely */ -//rue_bind_addr: "127.0.10.11", - - - -ue_list: [ - { - /* UE capabilities */ - /* USIM data */ - "ue_id" : 1, - "imsi": "208970100001127", - "K": "fec86ba6eb707ed08905757b1bb44b8f", - "sim_algo":"milenage", - "op": "1006020f0a478bf6b699f15c062e42b3", - as_release: 15, - ue_category: "nr", - apn:"oai", - attach_pdn_type:"ipv4", - default_nssai: [ - { - sst: 1, - sd: 66051, - }, - ], - default_pdu_session_snssai: { - sst: 1, - sd: 66051, - }, - /* Enable it to allow sim_events to be handled remotely */ - //rue_addr: "127.1.0.0", - /* Enable it to create a TUN interface for each UE PDN */ - tun_setup_script: "ue-ifup", - sim_events: [ - { - event: "power_on", - start_time: 5, - }, - { - "tag": "ping", - "prog":"oai_ext_app.sh", - start_time: 20, - end_time: 30, - "args":["ping 192.168.70.136"], - "event":"ext_app" - }, - { - event: "power_off", - start_time: 60, - } - ] /*end sim events */ - }, /*end UE object 0*/ - { - /* UE capabilities */ - /* USIM data */ - "ue_id" : 2, - "imsi": "208970100001128", - "K": "fec86ba6eb707ed08905757b1bb44b8f", - "sim_algo":"milenage", - "op": "1006020f0a478bf6b699f15c062e42b3", - as_release: 15, - ue_category: "nr", - apn:"oai", - attach_pdn_type:"ipv4", - default_nssai: [ - { - sst: 1, - sd: 66051, - }, - ], - default_pdu_session_snssai: { - sst: 1, - sd: 66051, - }, - /* Enable it to allow sim_events to be handled remotely */ - //rue_addr: "127.1.0.0", - /* Enable it to create a TUN interface for each UE PDN */ - tun_setup_script: "ue-ifup", - sim_events: [ - { - event: "power_on", - start_time: 5, - }, - { - "tag": "ping", - "prog":"oai_ext_app.sh", - start_time: 40, - end_time: 50, - "args":["ping 192.168.70.136"], - "event":"ext_app" - }, - { - event: "power_off", - start_time: 60, - } - ] /*end sim events */ - } /*end UE object 1*/ - ],/*end UE list*/ -}/*end json*/ diff --git a/ci-scripts/as_ue/oaicicd-ue-Ping-SATest.cfg b/ci-scripts/as_ue/oaicicd-ue-Ping-SATest.cfg deleted file mode 100644 index ba22cbb233..0000000000 --- a/ci-scripts/as_ue/oaicicd-ue-Ping-SATest.cfg +++ /dev/null @@ -1,113 +0,0 @@ -/* UE simulator configuration */ - - - -/* UE simulator configuration file version 2021-06-17 - * LTE / 5G Non StandAlone - * Copyright (C) 2019-2021 Amarisoft - */ -{ -#define N_ANTENNA_DL 1 -#define TDD 1 -#define CELL_BANDWIDTH 40 - - - log_options: "all.level=error,all.max_size=0,nas.level=debug,nas.max_size=1,rrc.level=debug,rrc.max_size=1", - log_filename: "/tmp/ue1.log", - - /* Enable remote API and Web interface */ - com_addr: "0.0.0.0:9002", - - include "rf_driver/1chan.cfg", - - /* If true, allow the simulation of several UEs at the same time and - allow dynamic UE creation from remote API */ - -cell_groups: [{ - group_type: "nr", - multi_ue: false, - cells: [{ - rf_port: 0, - bandwidth: CELL_BANDWIDTH, -#if TDD == 1 - band: 78, - dl_nr_arfcn:621312, - ssb_nr_arfcn:621312, - - //band: 41, - //dl_nr_arfcn:517020, - //ssb_nr_arfcn:516990, -#else - band: 7, - dl_nr_arfcn: 536020, - ssb_nr_arfcn: 535930, - ssb_subcarrier_spacing: 15, -#endif - subcarrier_spacing: 30, - n_antenna_dl: N_ANTENNA_DL, - n_antenna_ul: 1, - rx_to_tx_latency:2, - }], - }], - - - - - /* Enable it to allow sim_events to be handled remotely */ - //rue_bind_addr: "127.0.10.11", - - ue_list: [ - { - /* UE capabilities */ - - /* USIM data */ - - - "imsi": "208970100001127", - "K": "fec86ba6eb707ed08905757b1bb44b8f", - "sim_algo":"milenage", - "op": "1006020f0a478bf6b699f15c062e42b3", - - - as_release: 15, - ue_category: "nr", - apn:"oai", - attach_pdn_type:"ipv4", - default_nssai: [ - { - sst: 1, - sd: 66051, - }, - ], - - default_pdu_session_snssai: { - sst: 1, - sd: 66051, - }, - - - /* Enable it to allow sim_events to be handled remotely */ - //rue_addr: "127.1.0.0", - - /* Enable it to create a TUN interface for each UE PDN */ - tun_setup_script: "ue-ifup", - - sim_events: [{ - event: "power_on", - start_time: 5, - }, { - "tag": "ping", - "prog":"oai_ext_app.sh", - start_time: 15, - end_time: 25, - "args":["ping 192.168.70.136"], - "event":"ext_app" - - }, - { - event: "power_off", - start_time: 30, - }] - } - ], -} diff --git a/ci-scripts/as_ue/oaicicd-ue-iperf-SATest.cfg b/ci-scripts/as_ue/oaicicd-ue-iperf-SATest.cfg deleted file mode 100644 index 841dafb746..0000000000 --- a/ci-scripts/as_ue/oaicicd-ue-iperf-SATest.cfg +++ /dev/null @@ -1,109 +0,0 @@ -/* UE simulator configuration */ - - - -/* UE simulator configuration file version 2021-06-17 - * LTE / 5G Non StandAlone - * Copyright (C) 2019-2021 Amarisoft - */ -{ -#define N_ANTENNA_DL 1 -#define TDD 1 -#define CELL_BANDWIDTH 20 - - - log_options: "all.level=error,all.max_size=0,nas.level=debug,nas.max_size=1,rrc.level=debug,rrc.max_size=1", - log_filename: "/tmp/ue0.log", - - /* Enable remote API and Web interface */ - com_addr: "0.0.0.0:9002", - - include "rf_driver/1chan.cfg", - - /* If true, allow the simulation of several UEs at the same time and - allow dynamic UE creation from remote API */ - -cell_groups: [{ - group_type: "nr", - multi_ue: false, - cells: [{ - rf_port: 0, - bandwidth: CELL_BANDWIDTH, -#if TDD == 1 - // band: 78, - // dl_nr_arfcn:621312, - // ssb_nr_arfcn:621312,*/ - - band: 41, - dl_nr_arfcn:517020, - ssb_nr_arfcn:516990, -#else - band: 7, - dl_nr_arfcn: 536020, - ssb_nr_arfcn: 535930, - ssb_subcarrier_spacing: 15, -#endif - subcarrier_spacing: 30, - n_antenna_dl: N_ANTENNA_DL, - n_antenna_ul: 1, - rx_to_tx_latency:2, - }], - }], - - - - - /* Enable it to allow sim_events to be handled remotely */ - //rue_bind_addr: "127.0.10.11", - - ue_list: [ - { - /* UE capabilities */ - - /* USIM data */ - - "imsi": "208970100001127", - "K": "fec86ba6eb707ed08905757b1bb44b8f", - "sim_algo":"milenage", - "op": "1006020f0a478bf6b699f15c062e42b3", - - - as_release: 15, - ue_category: "nr", - apn:"oai", - attach_pdn_type:"ipv4", - default_nssai: [ - { - sst: 1, - sd: 1, - }, - ], - - default_pdu_session_snssai: { - sst: 1, - sd: 1, - }, - - - /* Enable it to allow sim_events to be handled remotely */ - //rue_addr: "127.1.0.0", - - /* Enable it to create a TUN interface for each UE PDN */ - tun_setup_script: "ue-ifup", - - sim_events: [{ - event: "power_on", - start_time: 5, - }, { - event: "ext_app", - start_time: 15, - end_time: 25, - prog: "ext_app.sh", - args: ["iperf", " -c 172.21.10.5", " -u"," -b 1M"," -i 1"," -t 10"] - }, { - event: "power_off", - start_time: 30, - }] - } - ], -} diff --git a/ci-scripts/ci_ueinfra.yaml b/ci-scripts/ci_ueinfra.yaml index c51be6652c..3040eb5ad3 100644 --- a/ci-scripts/ci_ueinfra.yaml +++ b/ci-scripts/ci_ueinfra.yaml @@ -49,75 +49,75 @@ adb_ue_2: amarisoft_ue: Host: amariue - InitScript: nohup /root/NV18-06-2022/ue/lteue /root/NV18-06-2022/ue/config/oaicicd-ue-ci-test.cfg & - TermScript: /root/NV18-06-2022/lteue-linux-2022-06-18/doc/ws.js 127.0.0.1:9002 '{"message":"quit"}' + InitScript: /root/NV18-06-2022/lteue-linux-2023-03-17/lteue /root/oaicicd/ran_sa_aw2s_asue/aw2s-asue.cfg & + TermScript: /root/NV18-06-2022/lteue-linux-2023-03-17/doc/ws.js 127.0.0.1:9002 '{"message":"quit"}' amarisoft_ue_1: Host: amariue - AttachScript: /root/NV18-06-2022/lteue-linux-2022-06-18/doc/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":1}' - DetachScript: /root/NV18-06-2022/lteue-linux-2022-06-18/doc/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":1}' + AttachScript: /root/NV18-06-2022/lteue-linux-2023-03-17/doc/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":1}' + DetachScript: /root/NV18-06-2022/lteue-linux-2023-03-17/doc/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":1}' UENetworkScript: ip netns exec ue1 ip a show dev pdn0 CmdPrefix: ip netns exec ue1 MTU: 1500 amarisoft_ue_2: Host: amariue - AttachScript: /root/NV18-06-2022/lteue-linux-2022-06-18/doc/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":2}' - DetachScript: /root/NV18-06-2022/lteue-linux-2022-06-18/doc/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":2}' + AttachScript: /root/NV18-06-2022/lteue-linux-2023-03-17/doc/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":2}' + DetachScript: /root/NV18-06-2022/lteue-linux-2023-03-17/doc/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":2}' UENetworkScript: ip netns exec ue2 ip a show dev pdn0 CmdPrefix: ip netns exec ue2 MTU: 1500 amarisoft_ue_3: Host: amariue - AttachScript: /root/NV18-06-2022/lteue-linux-2022-06-18/doc/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":3}' - DetachScript: /root/NV18-06-2022/lteue-linux-2022-06-18/doc/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":3}' + AttachScript: /root/NV18-06-2022/lteue-linux-2023-03-17/doc/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":3}' + DetachScript: /root/NV18-06-2022/lteue-linux-2023-03-17/doc/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":3}' UENetworkScript: ip netns exec ue3 ip a show dev pdn0 CmdPrefix: ip netns exec ue3 MTU: 1500 amarisoft_ue_4: Host: amariue - AttachScript: /root/NV18-06-2022/lteue-linux-2022-06-18/doc/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":4}' - DetachScript: /root/NV18-06-2022/lteue-linux-2022-06-18/doc/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":4}' + AttachScript: /root/NV18-06-2022/lteue-linux-2023-03-17/doc/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":4}' + DetachScript: /root/NV18-06-2022/lteue-linux-2023-03-17/doc/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":4}' UENetworkScript: ip netns exec ue4 ip a show dev pdn0 CmdPrefix: ip netns exec ue4 MTU: 1500 amarisoft_ue_5: Host: amariue - AttachScript: /root/NV18-06-2022/lteue-linux-2022-06-18/doc/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":5}' - DetachScript: /root/NV18-06-2022/lteue-linux-2022-06-18/doc/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":5}' + AttachScript: /root/NV18-06-2022/lteue-linux-2023-03-17/doc/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":5}' + DetachScript: /root/NV18-06-2022/lteue-linux-2023-03-17/doc/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":5}' UENetworkScript: ip netns exec ue5 ip a show dev pdn0 CmdPrefix: ip netns exec ue5 MTU: 1500 amarisoft_ue_6: Host: amariue - AttachScript: /root/NV18-06-2022/lteue-linux-2022-06-18/doc/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":6}' - DetachScript: /root/NV18-06-2022/lteue-linux-2022-06-18/doc/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":6}' + AttachScript: /root/NV18-06-2022/lteue-linux-2023-03-17/doc/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":6}' + DetachScript: /root/NV18-06-2022/lteue-linux-2023-03-17/doc/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":6}' UENetworkScript: ip netns exec ue6 ip a show dev pdn0 CmdPrefix: ip netns exec ue6 MTU: 1500 amarisoft_ue_7: Host: amariue - AttachScript: /root/NV18-06-2022/lteue-linux-2022-06-18/doc/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":7}' - DetachScript: /root/NV18-06-2022/lteue-linux-2022-06-18/doc/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":7}' + AttachScript: /root/NV18-06-2022/lteue-linux-2023-03-17/doc/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":7}' + DetachScript: /root/NV18-06-2022/lteue-linux-2023-03-17/doc/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":7}' UENetworkScript: ip netns exec ue7 ip a show dev pdn0 CmdPrefix: ip netns exec ue7 MTU: 1500 amarisoft_ue_8: Host: amariue - AttachScript: /root/NV18-06-2022/lteue-linux-2022-06-18/doc/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":8}' - DetachScript: /root/NV18-06-2022/lteue-linux-2022-06-18/doc/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":8}' + AttachScript: /root/NV18-06-2022/lteue-linux-2023-03-17/doc/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":8}' + DetachScript: /root/NV18-06-2022/lteue-linux-2023-03-17/doc/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":8}' UENetworkScript: ip netns exec ue8 ip a show dev pdn0 CmdPrefix: ip netns exec ue8 MTU: 1500 amarisoft_ue_9: Host: amariue - AttachScript: /root/NV18-06-2022/lteue-linux-2022-06-18/doc/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":9}' - DetachScript: /root/NV18-06-2022/lteue-linux-2022-06-18/doc/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":9}' + AttachScript: /root/NV18-06-2022/lteue-linux-2023-03-17/doc/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":9}' + DetachScript: /root/NV18-06-2022/lteue-linux-2023-03-17/doc/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":9}' UENetworkScript: ip netns exec ue9 ip a show dev pdn0 CmdPrefix: ip netns exec ue9 MTU: 1500 amarisoft_ue_10: Host: amariue - AttachScript: /root/NV18-06-2022/lteue-linux-2022-06-18/doc/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":10}' - DetachScript: /root/NV18-06-2022/lteue-linux-2022-06-18/doc/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":10}' + AttachScript: /root/NV18-06-2022/lteue-linux-2023-03-17/doc/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":10}' + DetachScript: /root/NV18-06-2022/lteue-linux-2023-03-17/doc/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":10}' UENetworkScript: ip netns exec ue10 ip a show dev pdn0 CmdPrefix: ip netns exec ue10 MTU: 1500 diff --git a/ci-scripts/cls_cluster.py b/ci-scripts/cls_cluster.py index 487e203d36..9e0988c323 100644 --- a/ci-scripts/cls_cluster.py +++ b/ci-scripts/cls_cluster.py @@ -40,6 +40,29 @@ import cls_cmd IMAGE_REGISTRY_SERVICE_NAME = "image-registry.openshift-image-registry.svc" NAMESPACE = "oaicicd-ran" +OCUrl = "https://api.oai.cs.eurecom.fr:6443" +OCRegistry = "default-route-openshift-image-registry.apps.oai.cs.eurecom.fr/" + + +def OC_login(cmd, ocUserName, ocPassword, ocProjectName): + if ocUserName == '' or ocPassword == '' or ocProjectName == '': + HELP.GenericHelp(CONST.Version) + sys.exit('Insufficient Parameter: no OC Credentials') + if OCRegistry.startswith("http") and not self.OCRegistry.endswith("/"): + sys.exit(f'ocRegistry {OCRegistry} should not start with http:// or https:// and end on a slash /') + ret = cmd.run(f'oc login -u {ocUserName} -p {ocPassword} --server {OCUrl}') + if ret.returncode != 0: + logging.error('\u001B[1m OC Cluster Login Failed\u001B[0m') + return False + ret = cmd.run(f'oc project {ocProjectName}') + if ret.returncode != 0: + logging.error(f'\u001B[1mUnable to access OC project {ocProjectName}\u001B[0m') + OC_logout(cmd) + return False + return True + +def OC_logout(cmd): + cmd.run(f'oc logout') class Cluster: def __init__(self): @@ -57,7 +80,7 @@ class Cluster: self.ranAllowMerge = False self.ranTargetBranch = "" self.cmd = None - + self.imageToPull = '' def _recreate_entitlements(self): # recreating entitlements, don't care if deletion fails @@ -170,11 +193,47 @@ class Cluster: def _undeploy_pod(self, filename): self.cmd.run(f'oc delete -f {filename}') + def PullClusterImage(self, HTML, RAN): + if self.imageToPull == '': + HELP.GenericHelp(CONST.Version) + HELP.EPCSrvHelp(self.imageToPull) + sys.exit('Insufficient eNB Parameters') + lIpAddr = self.eNBIPAddress + self.testCase_id = HTML.testCase_id + cmd = cls_cmd.getConnection(lIpAddr) + succeeded = OC_login(cmd, self.OCUserName, self.OCPassword, self.OCProjectName) + if not succeeded: + logging.error('\u001B[1m OC Cluster Login Failed\u001B[0m') + HTML.CreateHtmlTestRow('N/A', 'KO', CONST.OC_LOGIN_FAIL) + return False + ret = cmd.run(f'oc whoami -t | docker login -u oaicicd --password-stdin {self.OCRegistry}') + if ret.returncode != 0: + logging.error(f'\u001B[1m Unable to access OC project {ocProjectName}\u001B[0m') + OC_logout(cmd) + cmd.close() + HTML.CreateHtmlTestRow('N/A', 'KO', CONST.OC_LOGIN_FAIL) + return False + for image in self.imageToPull: + imagePrefix = f'{self.OCRegistry}{self.OCProjectName}' + imageTag = cls_containerize.ImageTagToUse(image, self.ranCommitID, self.ranBranch, self.ranAllowMerge) + ret = cmd.run(f'docker pull {imagePrefix}/{imageTag}') + if ret.returncode != 0: + logging.error(f'Could not pull {image} from local registry : {self.OCRegistry}') + OC_logout(cmd) + cmd.close() + HTML.CreateHtmlTestRow('msg', 'KO', CONST.ALL_PROCESSES_OK) + return False + cmd.run(f'docker tag {imagePrefix}/{imageTag} oai-ci/{imageTag}') + cmd.run(f'docker rmi {imagePrefix}/{imageTag}') + OC_logout(cmd) + cmd.close() + HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK) + return True + def BuildClusterImage(self, HTML): if self.ranRepository == '' or self.ranBranch == '' or self.ranCommitID == '': HELP.GenericHelp(CONST.Version) sys.exit(f'Insufficient Parameter: ranRepository {self.ranRepository} ranBranch {ranBranch} ranCommitID {self.ranCommitID}') - lIpAddr = self.eNBIPAddress lSourcePath = self.eNBSourceCodePath if lIpAddr == '' or lSourcePath == '': diff --git a/ci-scripts/cls_containerize.py b/ci-scripts/cls_containerize.py index 492a48805a..7cddae85db 100644 --- a/ci-scripts/cls_containerize.py +++ b/ci-scripts/cls_containerize.py @@ -31,8 +31,8 @@ #----------------------------------------------------------- # Import #----------------------------------------------------------- -import sys # arg -import re # reg +import sys # arg +import re # reg import logging import os import shutil @@ -47,6 +47,7 @@ from zipfile import ZipFile #----------------------------------------------------------- # OAI Testing modules #----------------------------------------------------------- +import cls_cluster as OC import cls_cmd import sshconnection as SSH import helpreadme as HELP @@ -90,6 +91,15 @@ def CreateWorkspace(sshSession, sourcePath, ranRepository, ranCommitID, ranTarge logging.debug(f'Merging with the target branch: {ranTargetBranch}') sshSession.command(f'git merge --ff origin/{ranTargetBranch} -m "Temporary merge for CI"', '\$', 30) +def ImageTagToUse(imageName, ranCommitID, ranBranch, ranAllowMerge): + shortCommit = ranCommitID[0:8] + if ranAllowMerge: + tagToUse = f'{ranBranch}-{shortCommit}' + else: + tagToUse = f'develop-{shortCommit}' + fullTag = f'{imageName}:{tagToUse}' + return fullTag + def CopyLogsToExecutor(cmd, sourcePath, log_name): cmd.cd(f'{sourcePath}/cmake_targets') cmd.run(f'rm -f {log_name}.zip') @@ -306,7 +316,6 @@ class Containerize(): self.registrySvrId = '' self.testSvrId = '' self.imageToPull = [] - #checkers from xml self.ran_checkers={} @@ -383,7 +392,7 @@ class Containerize(): CreateWorkspace(cmd, lSourcePath, self.ranRepository, self.ranCommitID, self.ranTargetBranch, self.ranAllowMerge) - # if asterix, copy the entitlement and subscription manager configurations + # if asterix, copy the entitlement and subscription manager configurations if self.host == 'Red Hat': cmd.run('mkdir -p ./etc-pki-entitlement ./rhsm-conf ./rhsm-ca') cmd.run('cp /etc/rhsm/rhsm.conf ./rhsm-conf/') @@ -649,15 +658,6 @@ class Containerize(): HTML.CreateHtmlTestRow('commit ' + tag, 'OK', CONST.ALL_PROCESSES_OK) HTML.CreateHtmlNextTabHeaderTestRow(collectInfo, allImagesSize) - def ImageTagToUse(self, imageName): - shortCommit = self.ranCommitID[0:8] - if self.ranAllowMerge: - tagToUse = f'{self.ranBranch}-{shortCommit}' - else: - tagToUse = f'develop-{shortCommit}' - fullTag = f'porcepix.sboai.cs.eurecom.fr/{imageName}:{tagToUse}' - return fullTag - def Push_Image_to_Local_Registry(self, HTML): if self.registrySvrId == '0': lIpAddr = self.eNBIPAddress @@ -680,8 +680,8 @@ class Containerize(): logging.debug('Pushing images from server: ' + lIpAddr) mySSH = SSH.SSHConnection() mySSH.open(lIpAddr, lUserName, lPassWord) - - mySSH.command('docker login -u oaicicd -p oaicicd porcepix.sboai.cs.eurecom.fr', '\$', 5) + imagePrefix = 'porcepix.sboai.cs.eurecom.fr' + mySSH.command(f'docker login -u oaicicd -p oaicicd {imagePrefix}', '\$', 5) if re.search('Login Succeeded', mySSH.getBefore()) is None: msg = 'Could not log into local registry' logging.error(msg) @@ -694,9 +694,9 @@ class Containerize(): orgTag = 'ci-temp' imageNames = ['oai-enb', 'oai-gnb', 'oai-lte-ue', 'oai-nr-ue', 'oai-lte-ru', 'oai-nr-cuup'] for image in imageNames: - tagToUse = self.ImageTagToUse(image) - mySSH.command(f'docker image tag {image}:{orgTag} {tagToUse}', '\$', 5) - mySSH.command(f'docker push {tagToUse}', '\$', 120) + tagToUse = ImageTagToUse(image, self.ranCommitID, self.ranBranch, self.ranAllowMerge) + mySSH.command(f'docker image tag {image}:{orgTag} {imagePrefix}/{tagToUse}', '\$', 5) + mySSH.command(f'docker push {imagePrefix}/{tagToUse}', '\$', 120) if re.search(': digest:', mySSH.getBefore()) is None: logging.debug(mySSH.getBefore()) msg = f'Could not push {image} to local registry : {tagToUse}' @@ -704,9 +704,9 @@ class Containerize(): mySSH.close() HTML.CreateHtmlTestRow(msg, 'KO', CONST.ALL_PROCESSES_OK) return False - mySSH.command(f'docker rmi {tagToUse} {image}:{orgTag}', '\$', 30) + mySSH.command(f'docker rmi {imagePrefix}/{tagToUse} {image}:{orgTag}', '\$', 30) - mySSH.command('docker logout porcepix.sboai.cs.eurecom.fr', '\$', 5) + mySSH.command(f'docker logout {imagePrefix}', '\$', 5) if re.search('Removing login credentials', mySSH.getBefore()) is None: msg = 'Could not log off from local registry' logging.error(msg) @@ -739,25 +739,18 @@ class Containerize(): if lIpAddr == '' or lUserName == '' or lPassWord == '' or lSourcePath == '': HELP.GenericHelp(CONST.Version) sys.exit('Insufficient Parameter') - if lIpAddr != 'none': - logging.debug('Pulling images onto server: ' + lIpAddr) - myCmd = cls_cmd.RemoteCmd(lIpAddr) - else: - logging.debug('Pulling images locally') - myCmd = cls_cmd.LocalCmd() - - cmd = 'docker login -u oaicicd -p oaicicd porcepix.sboai.cs.eurecom.fr' - response = myCmd.run(cmd) + myCmd = cls_cmd.getConnection(lIpAddr) + imagePrefix = 'porcepix.sboai.cs.eurecom.fr' + response = myCmd.run(f'docker login -u oaicicd -p oaicicd {imagePrefix}') if response.returncode != 0: msg = 'Could not log into local registry' logging.error(msg) myCmd.close() HTML.CreateHtmlTestRow(msg, 'KO', CONST.ALL_PROCESSES_OK) return False - for image in self.imageToPull: - tagToUse = self.ImageTagToUse(image) - cmd = f'docker pull {tagToUse}' + tagToUse = ImageTagToUse(image, self.ranCommitID, self.ranBranch, self.ranAllowMerge) + cmd = f'docker pull {imagePrefix}/{tagToUse}' response = myCmd.run(cmd, timeout=120) if response.returncode != 0: logging.debug(response) @@ -766,16 +759,15 @@ class Containerize(): myCmd.close() HTML.CreateHtmlTestRow('msg', 'KO', CONST.ALL_PROCESSES_OK) return False - - cmd = 'docker logout porcepix.sboai.cs.eurecom.fr' - response = myCmd.run(cmd) + myCmd.run(f'docker tag {imagePrefix}/{tagToUse} oai-ci/{tagToUse}') + myCmd.run(f'docker rmi {imagePrefix}/{tagToUse}') + response = myCmd.run(f'docker logout {imagePrefix}') if response.returncode != 0: msg = 'Could not log off from local registry' logging.error(msg) myCmd.close() HTML.CreateHtmlTestRow(msg, 'KO', CONST.ALL_PROCESSES_OK) return False - myCmd.close() HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK) return True @@ -810,7 +802,8 @@ class Containerize(): imageNames = ['oai-enb', 'oai-gnb', 'oai-lte-ue', 'oai-nr-ue', 'oai-lte-ru', 'oai-nr-cuup'] for image in imageNames: - cmd = f'docker rmi {self.ImageTagToUse(image)}' + imageTag = ImageTagToUse(image, self.ranCommitID, self.ranBranch, self.ranAllowMerge) + cmd = f'docker rmi oai-ci/{imageTag}' myCmd.run(cmd, reportNonZero=False) myCmd.close() @@ -845,10 +838,10 @@ class Containerize(): mySSH.command('cd ' + lSourcePath + '/' + self.yamlPath[self.eNB_instance], '\$', 5) mySSH.command('cp docker-compose.y*ml ci-docker-compose.yml', '\$', 5) - imagesList = ['oai-enb', 'oai-gnb', 'oai-nr-cuup'] + imagesList = ['oai-enb', 'oai-gnb', 'oai-nr-cuup', 'oai-gnb-aw2s'] for image in imagesList: - imageToUse = self.ImageTagToUse(image) - mySSH.command(f'sed -i -e "s#image: {image}:latest#image: {imageToUse}#" ci-docker-compose.yml', '\$', 2) + imageTag = ImageTagToUse(image, self.ranCommitID, self.ranBranch, self.ranAllowMerge) + mySSH.command(f'sed -i -e "s#image: {image}:latest#image: oai-ci/{imageTag}#" ci-docker-compose.yml', '\$', 2) localMmeIpAddr = EPC.MmeIPAddress mySSH.command('sed -i -e "s/CI_MME_IP_ADDR/' + localMmeIpAddr + '/" ci-docker-compose.yml', '\$', 2) @@ -966,6 +959,7 @@ class Containerize(): logging.debug('\u001B[1m Undeploying OAI Object from server: ' + lIpAddr + '\u001B[0m') mySSH = SSH.SSHConnection() mySSH.open(lIpAddr, lUserName, lPassWord) + mySSH.command('cd ' + lSourcePath + '/' + self.yamlPath[self.eNB_instance], '\$', 5) svcName = self.services[self.eNB_instance] @@ -981,7 +975,7 @@ class Containerize(): for s in allServices: mySSH.command(f'docker-compose -f ci-docker-compose.yml ps --all -- {s}', '\$', 5, silent=False) running = mySSH.getBefore().split('\r\n')[2:-1] - #logging.debug(f'running services: {running}') + logging.debug(f'running services: {running}') if len(running) > 0: # something is running for that service services.append(s) logging.info(f'stopping services {services}') @@ -1050,13 +1044,12 @@ class Containerize(): myCmd.close() HTML.CreateHtmlTestRow('SVC not Found', 'KO', CONST.ALL_PROCESSES_OK) return - cmd = 'cp docker-compose.y*ml docker-compose-ci.yml' myCmd.run(cmd, silent=self.displayedNewTags) imageNames = ['oai-enb', 'oai-gnb', 'oai-lte-ue', 'oai-nr-ue', 'oai-lte-ru', 'oai-nr-cuup'] for image in imageNames: - tagToUse = self.ImageTagToUse(image) - cmd = f'sed -i -e "s@oaisoftwarealliance/{image}:develop@{tagToUse}@" docker-compose-ci.yml' + tagToUse = ImageTagToUse(image, self.ranCommitID, self.ranBranch, self.ranAllowMerge) + cmd = f'sed -i -e "s@oaisoftwarealliance/{image}:develop@oai-ci/{tagToUse}@" docker-compose-ci.yml' myCmd.run(cmd, silent=self.displayedNewTags) self.displayedNewTags = True @@ -1193,13 +1186,12 @@ class Containerize(): ymlPath = self.yamlPath[0].split('/') logPath = '../cmake_targets/log/' + ymlPath[1] myCmd = cls_cmd.LocalCmd(d = self.yamlPath[0]) - cmd = 'cp docker-compose.y*ml docker-compose-ci.yml' myCmd.run(cmd, silent=self.displayedNewTags) imageNames = ['oai-enb', 'oai-gnb', 'oai-lte-ue', 'oai-nr-ue', 'oai-lte-ru', 'oai-nr-cuup'] for image in imageNames: - tagToUse = self.ImageTagToUse(image) - cmd = f'sed -i -e "s@oaisoftwarealliance/{image}:develop@{tagToUse}@" docker-compose-ci.yml' + tagToUse = ImageTagToUse(image, self.ranCommitID, self.ranBranch, self.ranAllowMerge) + cmd = f'sed -i -e "s@oaisoftwarealliance/{image}:develop@oai-ci/{tagToUse}@" docker-compose-ci.yml' myCmd.run(cmd, silent=self.displayedNewTags) self.displayedNewTags = True diff --git a/ci-scripts/cls_oaicitest.py b/ci-scripts/cls_oaicitest.py index 2bd8ba4263..551a8994f8 100644 --- a/ci-scripts/cls_oaicitest.py +++ b/ci-scripts/cls_oaicitest.py @@ -605,6 +605,8 @@ class OaiCiTest(): Target = EPC.MmeIPAddress elif re.match('OAICN5G', EPC.Type, re.IGNORECASE): Target = EPC.MmeIPAddress + elif re.match('OC-OAI-CN5G', EPC.Type, re.IGNORECASE): + Target = "172.21.6.100" else: Target = EPC.IPAddress #ping from module NIC rather than IP address to make sure round trip is over the air diff --git a/ci-scripts/conf_files/gnb.sa.band78.51prb.aw2s.ddsuu.conf b/ci-scripts/conf_files/gnb.sa.band78.51prb.aw2s.ddsuu.conf new file mode 100644 index 0000000000..2e3b4e3f0c --- /dev/null +++ b/ci-scripts/conf_files/gnb.sa.band78.51prb.aw2s.ddsuu.conf @@ -0,0 +1,281 @@ +Active_gNBs = ( "gNB-Eurecom-n78_20"); +# Asn1_verbosity, choice in: none, info, annoying +Asn1_verbosity = "none"; + +#device :{ +# name = "aw2sori_transpro"; +#} + +gNBs = +( + { + ////////// Identification parameters: + gNB_CU_ID = 0xe00; + + gNB_name = "gNB-Eurecom-n78_20"; + + // Tracking area code, 0x0000 and 0xfffe are reserved values + tracking_area_code = 0x1; + plmn_list = ({ mcc = 001; mnc = 01; mnc_length = 2; snssaiList = ({ sst =0x1; }) }); + + nr_cellid = 12345678L + + ////////// Physical parameters: + pdsch_AntennaPorts_XP = 2; + pusch_AntennaPorts = 2; + do_CSIRS = 1; + do_SRS = 0; + + pdcch_ConfigSIB1 = ( + { + controlResourceSetZero = 11; + searchSpaceZero = 0; + } + ); + + servingCellConfigCommon = ( + { + #spCellConfigCommon + + physCellId = 0; + +# downlinkConfigCommon + #frequencyInfoDL + # this is 3410.4 MHz => 301 REs from PointA 25 PRBs + 1 RE + absoluteFrequencySSB = 627360; + dl_frequencyBand = 78; + # this is 3410.4 - (51*12*30e-3/2) = 3401.22 MHz + dl_absoluteFrequencyPointA = 626748; + #scs-SpecificCarrierList + dl_offstToCarrier = 0; +# subcarrierSpacing +# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 + dl_subcarrierSpacing = 1; + dl_carrierBandwidth = 51; + #initialDownlinkBWP + #genericParameters + # this is RBstart=0,L=50 (275*(L-1))+RBstart + initialDLBWPlocationAndBandwidth = 13750; +# subcarrierSpacing +# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 + initialDLBWPsubcarrierSpacing = 1; + #pdcch-ConfigCommon + initialDLBWPcontrolResourceSetZero = 11; # this means shift of 14, so Coreset is in PRBs 1..48, SSB starts at PRB 15 + initialDLBWPsearchSpaceZero = 0; + #pdsch-ConfigCommon + + #uplinkConfigCommon + #frequencyInfoUL + ul_frequencyBand = 78; + #scs-SpecificCarrierList + ul_offstToCarrier = 0; +# subcarrierSpacing +# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 + ul_subcarrierSpacing = 1; + ul_carrierBandwidth = 51; + pMax = 20; + #initialUplinkBWP + #genericParameters + initialULBWPlocationAndBandwidth = 13750; +# subcarrierSpacing +# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 + initialULBWPsubcarrierSpacing = 1; + #rach-ConfigCommon + #rach-ConfigGeneric + prach_ConfigurationIndex = 98; +#prach_msg1_FDM +#0 = one, 1=two, 2=four, 3=eight + prach_msg1_FDM = 0; + prach_msg1_FrequencyStart = 0; + zeroCorrelationZoneConfig = 15; + preambleReceivedTargetPower = -104; +#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 = 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 = 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 + 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 =-96; + +# pucch-ConfigCommon setup : +# pucchGroupHopping +# 0 = neither, 1= group hopping, 2=sequence hopping + pucchGroupHopping = 0; + hoppingId = 40; + p0_nominal = -96; +# ssb_PositionsInBurs_BitmapPR +# 1=short, 2=medium, 3=long + ssb_PositionsInBurst_PR = 2; + 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; + nrofDownlinkSlots = 2; + nrofDownlinkSymbols = 6; + nrofUplinkSlots = 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.100"; + ipv6 = "192:168:30::17"; + active = "yes"; + preference = "ipv4"; + } + ); + + NETWORK_INTERFACES : + { + + GNB_INTERFACE_NAME_FOR_NG_AMF = "eno33np0"; + GNB_IPV4_ADDRESS_FOR_NG_AMF = "172.21.16.124/20"; + GNB_INTERFACE_NAME_FOR_NGU = "eno33np0"; + GNB_IPV4_ADDRESS_FOR_NGU = "172.21.16.124/20"; + GNB_PORT_FOR_S1U = 2152; # Spec 2152 + }; + } +); + +MACRLCs = ( + { + num_cc = 1; + tr_s_preference = "local_L1"; + tr_n_preference = "local_RRC"; + pusch_TargetSNRx10 = 200; + pucch_TargetSNRx10 = 200; + ulsch_max_frame_inactivity=0; + ul_max_mcs = 15; + } +); + +L1s = ( + { + num_cc = 1; + tr_n_preference = "local_mac"; + prach_dtx_threshold = 120; + pucch0_dtx_threshold = 50; + pusch_dtx_threshold = 10; + } +); + +RUs = ( + { + local_if_name = "ens7f3"; + remote_address = "192.168.80.239"; + local_address = "192.168.80.24"; + local_portc = 50000; + remote_portc = 55444; + local_portd = 52001; + remote_portd = 52183; + local_rf = "no" + tr_preference = "udp_ecpri_if5" + nb_tx = 2 + nb_rx = 2 + att_tx = 16 + att_rx = 0; + num_tp_cores = 4; + rxfh_core_id = 9; + txfh_core_id = 10; + tp_cores = [11,12,13,14]; + nr_flag = 1; + eNB_instances = [0]; + bands = [78]; + sl_ahead = 5; + ##beamforming 1x2 matrix: 1 layer x 2 antennas + bf_weights = [0x00007fff, 0x0000]; + ##beamforming 1x4 matrix: 1 layer x 4 antennas + #bf_weights = [0x00007fff, 0x0000,0x0000, 0x0000]; + ## beamforming 2x2 matrix: + # bf_weights = [0x00007fff, 0x00000000, 0x00000000, 0x00007fff]; + ## beamforming 4x4 matrix: + #bf_weights = [0x00007fff, 0x0000, 0x0000, 0x0000, 0x00000000, 0x00007fff, 0x0000, 0x0000, 0x0000, 0x0000, 0x00007fff, 0x0000, 0x0000, 0x0000, 0x0000, 0x00007fff]; + } +); + +THREAD_STRUCT = ( + { + #three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT" + parallel_config = "PARALLEL_SINGLE_THREAD"; + #two option for worker "WORKER_DISABLE" or "WORKER_ENABLE" + worker_config = "WORKER_ENABLE"; + } +); + + log_config : + { + global_log_level ="info"; + global_log_verbosity ="medium"; + hw_log_level ="info"; + hw_log_verbosity ="medium"; + phy_log_level ="info"; + phy_log_verbosity ="medium"; + mac_log_level ="info"; + mac_log_verbosity ="high"; + rlc_log_level ="info"; + rlc_log_verbosity ="medium"; + pdcp_log_level ="info"; + pdcp_log_verbosity ="medium"; + rrc_log_level ="info"; + rrc_log_verbosity ="medium"; + f1ap_log_level ="debug"; + f1ap_log_verbosity ="medium"; + ngap_log_level ="debug"; + ngap_log_verbosity ="medium"; + }; + diff --git a/ci-scripts/epc.py b/ci-scripts/epc.py index 7483458ec3..f3f23f198c 100644 --- a/ci-scripts/epc.py +++ b/ci-scripts/epc.py @@ -31,8 +31,8 @@ #----------------------------------------------------------- # Import #----------------------------------------------------------- -import sys # arg -import re # reg +import sys # arg +import re # reg import logging import os import time @@ -46,10 +46,13 @@ from multiprocessing import Process, Lock, SimpleQueue import sshconnection as SSH import helpreadme as HELP import constants as CONST - +import cls_cluster as OC +import cls_cmd #----------------------------------------------------------- # Class Declaration #----------------------------------------------------------- + + class EPCManagement(): def __init__(self): @@ -68,7 +71,13 @@ class EPCManagement(): 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.OCProjectName = '' + self.imageToPull = '' + self.eNBSourceCodePath = '' #----------------------------------------------------------- # EPC management functions @@ -235,8 +244,7 @@ class EPCManagement(): 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) + mySSH = cls_cmd.getConnection(self.IPAddress) html_cell = '' if re.match('ltebox', self.Type, re.IGNORECASE): logging.debug('Using the SABOX simulated HSS') @@ -286,6 +294,40 @@ class EPCManagement(): if res4 is not None: html_cell += '(' + res4.group('date') + ')' html_cell += '\n' + elif re.match('OC-OAI-CN5G', self.Type, re.IGNORECASE): + self.testCase_id = HTML.testCase_id + imageNames = ["oai-nrf", "oai-amf", "oai-smf", "oai-spgwu-tiny", "oai-ausf", "oai-udm", "oai-udr", "mysql","oai-traffic-server"] + logging.debug('Deploying OAI CN5G on Openshift Cluster') + lIpAddr = self.IPAddress + lSourcePath = self.SourceCodePath + succeeded = OC.OC_login(mySSH, self.OCUserName, self.OCPassword, self.OCProjectName) + if not succeeded: + logging.error('\u001B[1m OC Cluster Login Failed\u001B[0m') + HTML.CreateHtmlTestRow('N/A', 'KO', CONST.OC_LOGIN_FAIL) + return False + for ii in imageNames: + mySSH.run(f'helm uninstall {ii}', reportNonZero=False) + mySSH.run(f'helm spray {lSourcePath}/ci-scripts/charts/oai-5g-basic/.') + ret = mySSH.run(f'oc get pods', silent=True) + if ret.stdout.count('Running') != 9: + logging.error('\u001B[1m Deploying 5GCN Failed using helm chart on OC Cluster\u001B[0m') + for ii in imageNames: + mySSH.run('helm uninstall '+ ii) + ret = mySSH.run(f'oc get pods') + if re.search('No resources found', ret.stdout): + logging.debug('All pods uninstalled') + OC.OC_logout(mySSH) + mySSH.close() + HTML.CreateHtmlTestRow('N/A', 'KO', CONST.OC_PROJECT_FAIL) + return False + ret = mySSH.run(f'oc get pods', silent=True) + for line in ret.stdout.split('\n')[1:]: + columns = line.strip().split() + name = columns[0] + status = columns[2] + html_cell += status + ' ' + name + html_cell += '\n' + OC.OC_logout(mySSH) else: logging.error('This option should not occur!') mySSH.close() @@ -311,6 +353,10 @@ class EPCManagement(): 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: @@ -513,8 +559,9 @@ class EPCManagement(): HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK) def Terminate5GCN(self, HTML): - mySSH = SSH.SSHConnection() - mySSH.open(self.IPAddress, self.UserName, self.Password) + imageNames = ["mysql", "oai-nrf", "oai-amf", "oai-smf", "oai-spgwu-tiny", "oai-ausf", "oai-udm", "oai-udr", "oai-traffic-server"] + containerInPods = ["", "-c nrf", "-c amf", "-c smf", "-c spgwu", "-c ausf", "-c udm", "-c udr", ""] + mySSH = cls_cmd.getConnection(self.IPAddress) message = '' if re.match('ltebox', self.Type, re.IGNORECASE): logging.debug('Terminating SA BOX') @@ -545,6 +592,37 @@ class EPCManagement(): else: message = 'No Tracking area update request' logging.debug(message) + elif re.match('OC-OAI-CN5G', self.Type, re.IGNORECASE): + logging.debug('Terminating OAI CN5G on Openshift Cluster') + lIpAddr = self.IPAddress + lSourcePath = self.SourceCodePath + mySSH.run(f'rm -Rf {lSourcePath}/logs') + mySSH.run(f'mkdir -p {lSourcePath}/logs') + logging.debug('OC OAI CN5G - Collecting Log files to workspace') + succeeded = OC.OC_login(mySSH, self.OCUserName, self.OCPassword, self.OCProjectName) + if not succeeded: + logging.error('\u001B[1m OC Cluster Login Failed\u001B[0m') + HTML.CreateHtmlTestRow('N/A', 'KO', CONST.OC_LOGIN_FAIL) + return False + mySSH.run(f'oc describe pod &> {lSourcePath}/logs/describe-pods-post-test.log') + mySSH.run(f'oc get pods.metrics.k8s &> {lSourcePath}/logs/nf-resource-consumption.log') + for ii, ci in zip(imageNames, containerInPods): + podName = mySSH.run(f"oc get pods | grep {ii} | awk \'{{print $1}}\'").stdout.strip() + if not podName: + logging.debug(f'{ii} pod not found!') + HTML.CreateHtmlTestRow(self.Type, 'KO', CONST.INVALID_PARAMETER) + HTML.CreateHtmlTabFooter(False) + mySSH.run(f'oc logs -f {podName} {ci} &> {lSourcePath}/logs/{ii}.log &') + mySSH.run(f'helm uninstall {ii}') + podName = '' + mySSH.run(f'cd {lSourcePath}/logs && zip -r -qq test_logs_CN.zip *.log') + mySSH.copyin(f'{lSourcePath}/logs/test_logs_CN.zip','test_logs_CN.zip') + ret = mySSH.run(f'oc get pods', silent=True) + res = re.search('No resources found in oaicicd-ran namespace.', ret.stdout) + if res is not None: + logging.debug('OC OAI CN5G components uninstalled') + message = 'OC OAI CN5G components uninstalled' + OC.OC_logout(mySSH) else: logging.error('This should not happen!') mySSH.close() @@ -784,6 +862,8 @@ class EPCManagement(): 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) @@ -798,10 +878,13 @@ class EPCManagement(): mySSH.close() def LogCollectMME(self): - 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) + 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()) @@ -819,6 +902,10 @@ class EPCManagement(): 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) @@ -852,6 +939,10 @@ class EPCManagement(): 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) diff --git a/ci-scripts/main.py b/ci-scripts/main.py index 1a7607d5d5..97bc6fbef1 100644 --- a/ci-scripts/main.py +++ b/ci-scripts/main.py @@ -38,12 +38,12 @@ import helpreadme as HELP import constants as CONST -import cls_oaicitest #main class for OAI CI test framework -import cls_physim #class PhySim for physical simulators build and test -import cls_containerize #class Containerize for all container-based operations on RAN/UE objects -import cls_static_code_analysis #class for static code analysis -import cls_physim1 #class PhySim for physical simulators deploy and run -import cls_cluster # class for building/deploying on cluster +import cls_oaicitest #main class for OAI CI test framework +import cls_physim #class PhySim for physical simulators build and test +import cls_containerize #class Containerize for all container-based operations on RAN/UE objects +import cls_static_code_analysis #class for static code analysis +import cls_physim1 #class PhySim for physical simulators deploy and run +import cls_cluster # class for building/deploying on cluster import sshconnection import epc @@ -430,7 +430,11 @@ def GetParametersFromXML(action): RAN.node = test.findtext('node') RAN.command = test.findtext('command') RAN.command_fail = test.findtext('command_fail') in ['True', 'true', 'Yes', 'yes'] - + elif action == 'Pull_Cluster_Image': + # CLUSTER.imageToPull.clear() + string_field = test.findtext('images_to_pull') + if (string_field is not None): + CLUSTER.imageToPull = string_field.split() else: logging.warning(f"unknown action {action} from option-parsing point-of-view") @@ -829,6 +833,9 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re HTML=ldpc.Run_NRulsimTest(HTML,CONST,id) if ldpc.exitStatus==1: RAN.prematureExit = True + elif action == 'Pull_Cluster_Image': + if not CLUSTER.PullClusterImage(HTML,RAN): + RAN.prematureExit = True elif action == 'Build_Cluster_Image': if not CLUSTER.BuildClusterImage(HTML): RAN.prematureExit = True diff --git a/ci-scripts/xml_class_list.yml b/ci-scripts/xml_class_list.yml index 7388701a17..1f7b1afdbe 100755 --- a/ci-scripts/xml_class_list.yml +++ b/ci-scripts/xml_class_list.yml @@ -1,5 +1,6 @@ - Build_Proxy - Build_Cluster_Image + - Pull_Cluster_Image - Build_PhySim - Run_LDPCTest - Run_LDPCt1Test diff --git a/ci-scripts/xml_files/container_sa_aw2s_asue.xml b/ci-scripts/xml_files/container_sa_aw2s_asue.xml new file mode 100644 index 0000000000..7d1709d53f --- /dev/null +++ b/ci-scripts/xml_files/container_sa_aw2s_asue.xml @@ -0,0 +1,122 @@ + + + TEST-5G-AW2S + 20 MHz TDD SA + tasks + 1 + + 010000 + 001000 + 020000 + 002000 + 002002 + 000100 + 000200 + 003000 + 004000 + 000002 + 030000 + + + + + Pull_Cluster_Image + Pull Images from Cluster + oai-gnb-aw2s + + + + Deploy_Object + Deploy gNB (TDD/Band78/20MHz/aw2s) in a container + ci-scripts/yaml_files/sa_aw2s_gnb + 0 + 0 + + + + Initialize_UE + Initialize Amarisoft UE + amarisoft_ue + + + + Attach_UE + Attach UE + amarisoft_ue_1 + + + + Attach_UE + Attach UE + amarisoft_ue_2 + + + + Ping + Ping: 20pings in 20sec + amarisoft_ue_1 amarisoft_ue_2 + -c 20 + 1 + 15 + + + + Ping + Ping: 100pings in 20sec + amarisoft_ue_1 amarisoft_ue_2 + -c 100 -i 0.2 + 1 + 15 + + + + Detach_UE + Detach UE + amarisoft_ue_1 amarisoft_ue_2 + + + + Terminate_UE + Terminate UE + amarisoft_ue + + + + IdleSleep + Sleep + 5 + + + + Undeploy_Object + Undeploy gNB + ci-scripts/yaml_files/sa_aw2s_gnb + 0 + 0 + 20,100,100,100 + 20,100,100,100 + + + + diff --git a/ci-scripts/yaml_files/sa_aw2s_gnb/docker-compose.yml b/ci-scripts/yaml_files/sa_aw2s_gnb/docker-compose.yml new file mode 100644 index 0000000000..7468df5e62 --- /dev/null +++ b/ci-scripts/yaml_files/sa_aw2s_gnb/docker-compose.yml @@ -0,0 +1,18 @@ +version: '3.8' +services: + oai-gnb: + image: oai-gnb-aw2s:latest + privileged: true + network_mode: "host" + container_name: oai-gnb-aw2s + environment: + TZ: Europe/Paris + USE_VOLUMED_CONF: 'yes' + USE_ADDITIONAL_OPTIONS: --sa + volumes: + - ../../conf_files/gnb.sa.band78.51prb.aw2s.ddsuu.conf:/opt/oai-gnb-aw2s/etc/mounted.conf + healthcheck: + test: /bin/bash -c "pgrep nr-softmodem" + interval: 10s + timeout: 5s + retries: 5 diff --git a/doc/README.md b/doc/README.md index 8612665a7c..4e881b7a4b 100644 --- a/doc/README.md +++ b/doc/README.md @@ -88,7 +88,7 @@ Some directories under `radio` contain READMEs: - [RFsimulator](../radio/rfsimulator/README.md) - [USRP](../radio/USRP/README.md) - [BladeRF](../radio/BLADERF/README) -- [IQPlayer](../radio/iqplayer/DOC/iqrecordplayer_usage.md) +- [IQPlayer](../radio/iqplayer/DOC/iqrecordplayer_usage.md), and [general documentation](./iqrecordplayer_usage.md) The other SDRs (AW2S, LimeSDR, ...) have no READMEs. diff --git a/doc/TESTBenches.md b/doc/TESTBenches.md index 596097c3d3..aef3a7f63e 100644 --- a/doc/TESTBenches.md +++ b/doc/TESTBenches.md @@ -21,6 +21,7 @@ | starsky | 172.21.18.45 | CI-Starsky-Legacy-TDD-eNB | eNB (B40) | b200mini (30A3E3C) | | carabe | 172.21.18.47 | CI-Carabe-Legacy-FDD-OAI-LTE-UE | UE (B7UE) | B200mini (30AE8C9) | | nokiabox | 172.21.19.39 | _None_ | gNB (Nokia), 5GC | _Nokia RF integrated_ | +| avra | 172.21.16.124 | CI-Avra-Usage | gNB (n78) | AW2S Jaguar (192.168.80.239) | Note: The available resources, and their current usage, is indicated here: - [Lockable resources of jenkins-oai](https://jenkins-oai.eurecom.fr/lockable-resources/): @@ -56,8 +57,9 @@ Note: The available resources, and their current usage, is indicated here: **Purpose**: AW2S tests with Amarisoft -Picture: TBD +![5G AW2S Testbench](testbenches_doc_resources/5g-aw2s-bench.png) +[PDF version](testbenches_doc_resources/5g-aw2s-bench.pdf) | [LaTeX/TikZ version](testbenches_doc_resources/5g-aw2s-bench.tex) if you want to modify to reflect your setup ### 4G Testbench(es) @@ -67,7 +69,6 @@ Picture: TBD [PDF version](testbenches_doc_resources/4g-faraday-bench.pdf) | [LaTeX/TikZ version](testbenches_doc_resources/4g-faraday-bench.tex) if you want to modify to reflect your setup - ## Pipelines ### [RAN-Container-Parent](https://jenkins-oai.eurecom.fr/job/RAN-Container-Parent/) @@ -115,6 +116,9 @@ Webhook - basic SA test (20 MHz TDD), F1, reestablishment, ... - [RAN-Ubuntu20-Image-Builder](https://jenkins-oai.eurecom.fr/job/RAN-Ubuntu18-Image-Builder/) - obelix: Ubuntu 20 image build using docker (Note: builds U20 images while pipeline is named U18!) +- [RAN-SA-AW2S-CN5G](https://jenkins-oai.eurecom.fr/job/RAN-SA-AW2S-CN5G/) + - 5G-NR SA test setup: Avra(RHEL9.1)/Manarola(U22PRO) + AW2S, Amarisoft UE x1, OAI CN5G + - uses OpenShift cluster for CN deployment and container images for gNB deployment ### RAN-CI-NSA-Trigger diff --git a/doc/iqrecordplayer_usage.md b/doc/iqrecordplayer_usage.md new file mode 100644 index 0000000000..603a74f4b5 --- /dev/null +++ b/doc/iqrecordplayer_usage.md @@ -0,0 +1,66 @@ +# I/Q record-replay +## using the iq record-replay + +This feature provides I/Q record-replay as initially presented in the 4th OAI workshop for LTE +(https://www.openairinterface.org/docs/workshop/4_OAI_Workshop_20171107/Talks/MONGAZON_Nokia-Bell-Labs-OAI-IQ.pdf) +The current implementation has been temporarily disrupted for LTE and only works for 5G SA +nr-uesoftmodem executable. + +The I/Q record-replay feature is briefly described hereafter, it allows you to: +* record slots received by the USRP board in a file while the system is operating. + For example you can record a full nrUE connection/traffic/disconnection sequence. + Today the OAI USRP device is the only one supporting the recording feature. +* replay slots from a previously recorded file to operate the system, + possibly in multiple loops if the recorded sequence is convenient from the logical point of view. + +The record-replay features are activated and configured using OAI configuration parameters + +### Record mode +options for record mode are: +* `subframes-record` Activate record mode +* `subframes-file` Path of the file used for slots recording (default is `/tmp/iqfile`) +* `subframes-max` Maximum count of slots to be recorded in a file (default is 120000) + +Note that the value of `--subframes-max` parameter needs to be tuned according to your RAM capabilities. +The default value is 120000, which allows for 120 seconds of record-replay but will require ~20GB of RAM and disk space. +If RAM does not allow for the parameter value, an error message will be displayed and the run will be aborted. +In record mode, to minimize performance impacts of operating software, slots are always saved into memory and +written to disk when the process terminates. +When you estimate the recorded sequence is achieved, you can terminate the nr-uesoftmodem by typing `CTRL-C`. +At that time, up to the value of `--subframes-max` slots will be written on disk. +The nr-uesoftmodem will indicate the exact count of slots written to disk, which may be less (but not higher) +than the value of `--subframes-max` parameter. + +>Recording session example: +```bash +./nr-uesoftmodem -O /home/oaitests/mediatek_sim.conf --sa --nokrnmod 1 --numerology 1 -r 106 -C 3649440000 --band 78 -E --ue-fo-compensation --device.recplay.subframes-record 1 --device.recplay.subframes-file /home/iqs/oai-nrUE-17042023.dat --device.recplay.use-mmap 1 --device.recplay.subframes-max 30000 +............................................ +............................................ +............................................ +^C +[HW] Writing file header to /home/iqs/oai-nrUE-17042023.dat +[HW] Writing 4565 subframes to /home/iqs/oai-nrUE-17042023.dat +[HW] File /home/iqs/oai-nrUE-17042023.dat closed +[HW] releasing USRP + +### Replay mode +Replaying I/Q works only for nr-uesoftmodem at 40MHz bandwidth 3/4 sampling. +Mismatch between file content and run time parameters might lead to unpredictable results. +options for replay mode are: +* `subframes-replay` Activate replay mode +* `subframes-file` Path of the file used for slots replay (default is `/tmp/iqfile`) +* `subframes-loops` Number of iterations to replay the entire slots file (default is 5) +* `use-mmap` Boolean, set to 1 (true) by default, iq file is map to memory if true, otherwise iq's are read from file. + +>Replay mode session example: +```bash +./nr-uesoftmodem -O /home/oaitests/mediatek_sim.conf --sa --nokrnmod 1 --numerology 1 -r 106 -C 3649440000 --band 78 -E --ue-fo-compensation --device.recplay.subframes-replay 1 --device.recplay.subframes-file /home/iqs/oai-nrUE-17042023.dat --device.recplay.use-mmap 1 --device.recplay.subframes-loops 1 +.................................. +.................................. +[HW] Replay iqs from USRP B200 device, bandwidth 4.000000e+07 +[HW] Loaded 4565 subframes. +[HW] iqplayer device initialized, replay /home/iqs/oai-nrUE-17042023.dat for 1 iteration(s) +.................................. +.................................. + +[OAI Wikis home](https://gitlab.eurecom.fr/oai/openairinterface5g/wikis/home) diff --git a/doc/testbenches_doc_resources/5g-aw2s-bench.pdf b/doc/testbenches_doc_resources/5g-aw2s-bench.pdf new file mode 100644 index 0000000000..9799887112 Binary files /dev/null and b/doc/testbenches_doc_resources/5g-aw2s-bench.pdf differ diff --git a/doc/testbenches_doc_resources/5g-aw2s-bench.png b/doc/testbenches_doc_resources/5g-aw2s-bench.png new file mode 100644 index 0000000000..49082c04fc Binary files /dev/null and b/doc/testbenches_doc_resources/5g-aw2s-bench.png differ diff --git a/doc/testbenches_doc_resources/5g-aw2s-bench.tex b/doc/testbenches_doc_resources/5g-aw2s-bench.tex new file mode 100644 index 0000000000..243d15babf --- /dev/null +++ b/doc/testbenches_doc_resources/5g-aw2s-bench.tex @@ -0,0 +1,32 @@ +\documentclass{standalone} + +\usepackage{tikz} +\usetikzlibrary{backgrounds, positioning, shapes.symbols} +\usepackage{helvet} +\renewcommand*{\rmdefault}{\sfdefault} + +\begin{document} +\begin{tikzpicture} + [ + font=\footnotesize, + faraday/.style={minimum size=3cm, draw, dashed}, + duplexer/.style={draw,fill=white}, + ] + + \node[label=above:avra] (avra) + {\includegraphics[width=1.2cm]{server}}; + \node[right=0.5cm of avra, label=above:AW2S] (aw2s) + {\includegraphics[width=1.2cm]{aw2s}} edge (avra); + \node[right=.2cm of aw2s, duplexer] (b78o) {n78} edge (aw2s); + \node[above right=-0.7cm and 0.35cm of b78o.east] (anto1) + {\includegraphics[width=0.3cm]{antenna}} edge (b78o); + \node[below right=-0.7cm and 0.35cm of b78o.east] (anto2) + {\includegraphics[width=0.3cm]{antenna}} edge (b78o); + + \node[right=4cm of aw2s, label=above:Amarisoft UE] (amariue) + {\includegraphics[width=0.7cm]{amariue}}; + \node[right=3cm of aw2s] (anto3) + {\includegraphics[width=0.3cm]{antenna}} edge (amariue); + +\end{tikzpicture} +\end{document} diff --git a/doc/testbenches_doc_resources/amariue.png b/doc/testbenches_doc_resources/amariue.png new file mode 100644 index 0000000000..72acb124c3 Binary files /dev/null and b/doc/testbenches_doc_resources/amariue.png differ diff --git a/doc/testbenches_doc_resources/aw2s.png b/doc/testbenches_doc_resources/aw2s.png new file mode 100644 index 0000000000..cc92e4c867 Binary files /dev/null and b/doc/testbenches_doc_resources/aw2s.png differ diff --git a/docker/Dockerfile.gNB.aw2s.rhel8.2 b/docker/Dockerfile.gNB.aw2s.rhel8.2 index e79bd6c09b..ec4a4b5c91 100644 --- a/docker/Dockerfile.gNB.aw2s.rhel8.2 +++ b/docker/Dockerfile.gNB.aw2s.rhel8.2 @@ -84,6 +84,7 @@ COPY --from=gnb-base \ /lib64/ RUN ln -s /usr/local/lib/libaw2sori_transpro.so /usr/local/lib/libthirdparty_transpro.so && \ + ln -s /usr/local/lib/liboai_eth_transpro.so /usr/local/lib/liboai_transpro.so && \ ldconfig WORKDIR /opt/oai-gnb-aw2s diff --git a/radio/USRP/README.md b/radio/USRP/README.md index b89cabe649..c1c555828c 100644 --- a/radio/USRP/README.md +++ b/radio/USRP/README.md @@ -39,11 +39,38 @@ Note 2: when using multiple USRPs they always have to be synchronized using "ext Last but not least you may specify that only a specfic subdevice of the USRP is used. See also https://files.ettus.com/manual/page_configuration.html#config_subdev -For example on a USRP N310 the following fields will specify that you use channel 0 of subdevice A. +For example on a USRP N310 the following fields will specify that you use channel 0 of subdevice A. You can enter this information after providing the ip addresses of the USRPs in sdr_addrs. ```bash tx_subdev = "A:0" rx_subdev = "A:0" ``` +Here is an example of the RUs configuration for a setup with 2 USRP N310. -When combining this with the multi USRP feature you can easily create a distributed antenna array with only 1 channel used at each USRP. +```bash +RUs = ( +{ + local_rf = "yes" + nb_tx = 2 + nb_rx = 2 + att_tx = 0 + att_rx = 0; + bands = [78]; + max_pdschReferenceSignalPower = -27; + max_rxgain = 75; + eNB_instances = [0]; + ##beamforming 1x2 matrix: 1 layer x 2 antennas + bf_weights = [0x00007fff, 0x0000]; + sdr_addrs = "addr0=192.168.10.2,addr1=192.168.20.2,clock_source=external,time_source=external" + tx_subdev ="A:0 B:0" + rx_subdev ="A:1 B:1" +} +); +``` +Hint: + +You cannot see TX/RX spread over multiple USRPs, if you use "internal" as a refrence of the clock and time source. + +Furthur information about synchronization on the USRP N3xx devices can be found here: https://kb.ettus.com/Using_Ethernet-Based_Synchronization_on_the_USRP%E2%84%A2_N3xx_Devices + +When combining this with the multi USRP feature you can create a distributed antenna array with only 1 channel used at each USRP. diff --git a/radio/iqplayer/DOC/iqrecordplayer_usage.md b/radio/iqplayer/DOC/iqrecordplayer_usage.md index f66c91bc26..942b00cfe9 100644 --- a/radio/iqplayer/DOC/iqrecordplayer_usage.md +++ b/radio/iqplayer/DOC/iqrecordplayer_usage.md @@ -75,7 +75,7 @@ U[HW]I ru thread Writing file header to /tmp/iqfile ``` ### Playback/replay mode -When replaying iq's received by eNB or gNB The option works only for 5MHz bandwidth because the information stored in the iq's file header regarding bandwidth is not yet properly processed. +When replaying iq's received by eNB or gNB The option works only for 40MHz bandwidth 3/4 sampling because the information stored in the iq's file header regarding bandwidth is not yet properly processed. In addition the current implementation has only been validated with nr-uesoftmodem in 5G SA configuration. In this version, mismatch between file content and run time parameters might lead to unpredictable results. In addition a file recorded on a AVX2-capable processor cannot be replayed on a non-AVX2-capable processor (this is to be further investigated). options for replay mode are: * `subframes-replay` Activate replay mode @@ -159,6 +159,6 @@ The replay feature is implemented as a oai device. * s device is automatically, dynamicaly loaded when the player feature is activated at runtime when the boolean `device.recplay.subframes-replay` option is set. ### iq's file format -The recorder adds a header containing the device type, the bandwith and a format identifier. Using these information when replaying a file has not yet been implemented, so the player only supports USRP B2xx device and 5MHz bandwith. +The recorder adds a header containing the device type, the bandwith and a format identifier. Using these information when replaying a file has not yet been implemented, so the player only supports USRP B2xx device and 40MHz bandwith 3/4 sampling. [oai Wikis home](https://gitlab.eurecom.fr/oai/openairinterface5g/wikis/home)