CI: deploy ltebox EPC through CoreNetwork, use in Ping/Iperf

- issue ltebox commands from ci_infra.yaml
- use for ltebox-nano, ltebox-nepes (un)deployment, ping, iperf in all
  relevant XML files
This commit is contained in:
Robert Schmidt
2025-03-31 16:38:13 +02:00
parent 8c4a55ab1c
commit 5db684fc52
18 changed files with 56 additions and 93 deletions
+14
View File
@@ -104,6 +104,13 @@ nano-cn4g:
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
@@ -119,6 +126,13 @@ sabox-nepes:
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
+10 -41
View File
@@ -101,20 +101,7 @@ class EPCManagement():
elif re.match('OAI', self.Type, re.IGNORECASE):
raise NotImplemented("core network not supported")
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)
raise NotImplemented("use cls_corenetwork.py")
else:
logging.error('This option should not occur!')
mySSH.close()
@@ -138,10 +125,7 @@ class EPCManagement():
elif re.match('OAI', self.Type, re.IGNORECASE):
raise NotImplemented("core network not supported")
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)
raise NotImplemented("use cls_corenetwork.py")
else:
logging.error('This option should not occur!')
mySSH.close()
@@ -195,8 +179,7 @@ class EPCManagement():
elif re.match('OAI', self.Type, re.IGNORECASE):
raise NotImplemented("core network not supported")
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)
raise NotImplemented("use cls_corenetwork.py")
else:
logging.error('This option should not occur!')
mySSH.close()
@@ -267,7 +250,7 @@ class EPCManagement():
if self.IPAddress == 'none':
return
if re.match('ltebox', self.Type, re.IGNORECASE):
self.MmeIPAddress = self.IPAddress
raise NotImplemented("use cls_corenetwork.py")
elif re.match('OAICN5G', self.Type, re.IGNORECASE):
mySSH = SSH.SSHConnection()
mySSH.open(self.IPAddress, self.UserName, self.Password)
@@ -298,15 +281,7 @@ class EPCManagement():
elif re.match('OAI', self.Type, re.IGNORECASE):
raise NotImplemented("core network not supported")
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)
raise NotImplemented("use cls_corenetwork.py")
else:
logging.error('This should not happen!')
mySSH.close()
@@ -326,9 +301,7 @@ class EPCManagement():
elif re.match('OAI', self.Type, re.IGNORECASE) or re.match('OAI-Rel14-CUPS', self.Type, re.IGNORECASE):
raise NotImplemented("core network not supported")
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)
raise NotImplemented("use cls_corenetwork.py")
else:
logging.error('This should not happen!')
mySSH.close()
@@ -355,8 +328,7 @@ class EPCManagement():
elif re.match('OAI', self.Type, re.IGNORECASE):
raise NotImplemented("core network not supported")
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)
raise NotImplemented("use cls_corenetwork.py")
else:
logging.error('This should not happen!')
mySSH.close()
@@ -645,8 +617,7 @@ class EPCManagement():
elif re.match('OAI', self.Type, re.IGNORECASE) or re.match('OAI-Rel14-CUPS', self.Type, re.IGNORECASE):
raise NotImplemented("core network not supported")
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)
raise NotImplemented("use cls_corenetwork.py")
else:
logging.error('This option should not occur!')
mySSH.close()
@@ -681,8 +652,7 @@ class EPCManagement():
elif re.match('OAI', self.Type, re.IGNORECASE) or re.match('OAI-Rel14-CUPS', self.Type, re.IGNORECASE):
raise NotImplemented("core network not supported")
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)
raise NotImplemented("use cls_corenetwork.py")
else:
logging.error('This option should not occur!')
mySSH.close()
@@ -715,8 +685,7 @@ class EPCManagement():
elif re.match('OAI', self.Type, re.IGNORECASE) or re.match('OAI-Rel14-CUPS', self.Type, re.IGNORECASE):
raise NotImplemented("core network not supported")
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)
raise NotImplemented("use cls_corenetwork.py")
else:
logging.error('This option should not occur!')
mySSH.close()
@@ -124,6 +124,7 @@ Replaces xml_files/enb_usrp210_band7_test_05mhz_tm1.xml
<ping_args>-c 20 %cn_ip%</ping_args>
<ping_packetloss_threshold>5</ping_packetloss_threshold>
<id>adb_ue_1 adb_ue_2</id>
<svr_id>ltebox-nano</svr_id>
</testCase>
<testCase id="040603">
@@ -132,6 +132,7 @@
<ping_args>-c 20 %cn_ip%</ping_args>
<ping_packetloss_threshold>5</ping_packetloss_threshold>
<id>adb_ue_1 adb_ue_2</id>
<svr_id>ltebox-nano</svr_id>
</testCase>
<testCase id="040633">
@@ -162,6 +162,7 @@ Replaces xml_files/enb_usrp210_band7_test_05mhz_tm1_rrc_inactivity_no_flexran.xm
<ping_args>-c 20 %cn_ip%</ping_args>
<ping_packetloss_threshold>5</ping_packetloss_threshold>
<id>adb_ue_1 adb_ue_2</id>
<svr_id>ltebox-nano</svr_id>
</testCase>
<testCase id="040503">
@@ -170,6 +171,7 @@ Replaces xml_files/enb_usrp210_band7_test_05mhz_tm1_rrc_inactivity_no_flexran.xm
<ping_args>-c 20 %cn_ip%</ping_args>
<ping_packetloss_threshold>5</ping_packetloss_threshold>
<id>adb_ue_1 adb_ue_2</id>
<svr_id>ltebox-nano</svr_id>
</testCase>
<testCase id="222222">
@@ -118,6 +118,7 @@ Replaces xml_files/enb_usrp210_band7_test_10mhz_tm1.xml
<ping_args>-c 20 %cn_ip%</ping_args>
<ping_packetloss_threshold>5</ping_packetloss_threshold>
<id>adb_ue_1 adb_ue_2</id>
<svr_id>ltebox-nano</svr_id>
</testCase>
<testCase id="040613">
@@ -111,6 +111,7 @@ Replaces xml_files/enb_usrp210_band7_test_10mhz_tm1.xml
<ping_args>-c 20 %cn_ip%</ping_args>
<ping_packetloss_threshold>5</ping_packetloss_threshold>
<id>adb_ue_1 adb_ue_2</id>
<svr_id>ltebox-nano</svr_id>
</testCase>
<testCase id="040612">
@@ -117,6 +117,7 @@ Replaces xml_files/enb_usrp210_band7_test_10mhz_tm1.xml
<ping_args>-c 20 %cn_ip%</ping_args>
<ping_packetloss_threshold>5</ping_packetloss_threshold>
<id>adb_ue_1 adb_ue_2</id>
<svr_id>ltebox-nano</svr_id>
</testCase>
<testCase id="040623">
@@ -125,6 +125,7 @@ Replaces xml_files/enb_usrp210_band40_test_05mhz_tm1.xml
<ping_args>-c 20 %cn_ip%</ping_args>
<ping_packetloss_threshold>25</ping_packetloss_threshold>
<id>adb_ue_1 adb_ue_2</id>
<svr_id>ltebox-nano</svr_id>
</testCase>
<testCase id="040601">
@@ -132,6 +132,7 @@
<ping_args>-c 20 %cn_ip%</ping_args>
<ping_packetloss_threshold>25</ping_packetloss_threshold>
<id>adb_ue_1 adb_ue_2</id>
<svr_id>ltebox-nano</svr_id>
</testCase>
<testCase id="040631">
@@ -116,6 +116,7 @@ Replaces xml_files/enb_usrp210_band40_test_10mhz_tm1.xml
<ping_args>-c 20 %cn_ip%</ping_args>
<ping_packetloss_threshold>25</ping_packetloss_threshold>
<id>adb_ue_1 adb_ue_2</id>
<svr_id>ltebox-nano</svr_id>
</testCase>
<testCase id="040611">
@@ -116,6 +116,7 @@ Replaces xml_files/enb_usrp210_band40_test_20mhz_tm1.xml
<ping_args>-c 20 %cn_ip%</ping_args>
<ping_packetloss_threshold>25</ping_packetloss_threshold>
<id>adb_ue_1 adb_ue_2</id>
<svr_id>ltebox-nano</svr_id>
</testCase>
<testCase id="040621">
@@ -117,6 +117,7 @@ Replaces xml_files/enb_usrp210_band40_test_20mhz_tm1_default_scheduler.xml
<ping_args>-c 20 %cn_ip%</ping_args>
<ping_packetloss_threshold>25</ping_packetloss_threshold>
<id>adb_ue_1 adb_ue_2</id>
<svr_id>ltebox-nano</svr_id>
</testCase>
<testCase id="040626">
@@ -168,6 +168,7 @@
<class>Ping</class>
<desc>Ping: 20pings in 20sec</desc>
<id>idefix</id>
<svr_id>ltebox-nepes</svr_id>
<ping_args>-c 20 %cn_ip%</ping_args>
<ping_packetloss_threshold>1</ping_packetloss_threshold>
<ping_rttavg_threshold>15</ping_rttavg_threshold>
@@ -177,6 +178,7 @@
<class>Ping</class>
<desc>Ping: 100pings in 20sec</desc>
<id>idefix</id>
<svr_id>ltebox-nepes</svr_id>
<ping_args>-c 100 -i 0.2 %cn_ip%</ping_args>
<ping_packetloss_threshold>1</ping_packetloss_threshold>
<ping_rttavg_threshold>15</ping_rttavg_threshold>
@@ -186,6 +188,7 @@
<class>Ping</class>
<desc>Ping: 20pings in 20sec</desc>
<id>idefix</id>
<svr_id>ltebox-nepes</svr_id>
<ping_args>-c 20 %cn_ip%</ping_args>
<ping_packetloss_threshold>1</ping_packetloss_threshold>
<ping_rttavg_threshold>15</ping_rttavg_threshold>
@@ -195,6 +198,7 @@
<class>Ping</class>
<desc>Ping: 100pings in 20sec</desc>
<id>idefix</id>
<svr_id>ltebox-nepes</svr_id>
<ping_args>-c 100 -i 0.2 %cn_ip%</ping_args>
<ping_packetloss_threshold>1</ping_packetloss_threshold>
<ping_rttavg_threshold>15</ping_rttavg_threshold>
+4 -13
View File
@@ -25,23 +25,14 @@
<htmlTabName>EPC-Closure</htmlTabName>
<htmlTabIcon>log-out</htmlTabIcon>
<TestCaseRequestedList>
060000 060001 060002
060000
</TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList>
<testCase id="060000">
<class>Terminate_HSS</class>
<desc>Terminate HSS</desc>
</testCase>
<testCase id="060001">
<class>Terminate_MME</class>
<desc>Terminate MME</desc>
</testCase>
<testCase id="060002">
<class>Terminate_SPGW</class>
<desc>Terminate SPGW</desc>
<class>UndeployCoreNetwork</class>
<desc>Terminate EPC</desc>
<cn_id>ltebox-nano</cn_id>
</testCase>
</testCaseList>
+4 -13
View File
@@ -25,24 +25,15 @@
<htmlTabName>EPC-Start</htmlTabName>
<htmlTabIcon>log-in</htmlTabIcon>
<TestCaseRequestedList>
000100 000101 000102
000100
</TestCaseRequestedList>
<TestCaseExclusionList>
</TestCaseExclusionList>
<testCase id="000100">
<class>Initialize_HSS</class>
<desc>Initialize HSS</desc>
</testCase>
<testCase id="000101">
<class>Initialize_MME</class>
<desc>Initialize MME</desc>
</testCase>
<testCase id="000102">
<class>Initialize_SPGW</class>
<desc>Initialize SPGW</desc>
<class>DeployCoreNetwork</class>
<desc>Initialize EPC</desc>
<cn_id>ltebox-nano</cn_id>
</testCase>
</testCaseList>
+4 -13
View File
@@ -25,23 +25,14 @@
<htmlTabName>EPC-Closure</htmlTabName>
<htmlTabIcon>log-out</htmlTabIcon>
<TestCaseRequestedList>
060000 060001 060002
060000
</TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList>
<testCase id="060000">
<class>Terminate_HSS</class>
<desc>Terminate HSS</desc>
</testCase>
<testCase id="060001">
<class>Terminate_MME</class>
<desc>Terminate MME</desc>
</testCase>
<testCase id="060002">
<class>Terminate_SPGW</class>
<desc>Terminate SPGW</desc>
<class>UndeployCoreNetwork</class>
<desc>Terminate EPC</desc>
<cn_id>ltebox-nepes</cn_id>
</testCase>
</testCaseList>
+4 -13
View File
@@ -25,24 +25,15 @@
<htmlTabName>EPC-Start</htmlTabName>
<htmlTabIcon>log-in</htmlTabIcon>
<TestCaseRequestedList>
000100 000101 000102
000100
</TestCaseRequestedList>
<TestCaseExclusionList>
</TestCaseExclusionList>
<testCase id="000100">
<class>Initialize_HSS</class>
<desc>Initialize HSS</desc>
</testCase>
<testCase id="000101">
<class>Initialize_MME</class>
<desc>Initialize MME</desc>
</testCase>
<testCase id="000102">
<class>Initialize_SPGW</class>
<desc>Initialize SPGW</desc>
<class>DeployCoreNetwork</class>
<desc>Start EPC</desc>
<cn_id>ltebox-nepes</cn_id>
</testCase>
</testCaseList>