CI: deploy sabox 5GC through cls_core.py, use in Ping/Iperf
- issue sabox commands from ci_infra.yaml - use for sabox-nepes (un)deployment, ping, iperf in all XML files
This commit is contained in:
@@ -105,6 +105,13 @@ ltebox-nano:
|
|||||||
sabox-nepes:
|
sabox-nepes:
|
||||||
Host: nepes
|
Host: nepes
|
||||||
NetworkScript: ip a show dev tun1
|
NetworkScript: ip a show dev tun1
|
||||||
|
Deploy:
|
||||||
|
- "sudo su -c 'screen -dm -S simulated_5g_hss /opt/hss_sim0609/start_5g_hss'"
|
||||||
|
- "sleep 1"
|
||||||
|
- "sudo /opt/ltebox/tools/start_sabox < /dev/null &> /dev/null"
|
||||||
|
- "sleep 1"
|
||||||
|
LogCollect: "cp /opt/hss_sim0609/hss.log /opt/ltebox/var/log/{amfLog.0,ngapcLog.0,ngapcommonLog.0,ngapsLog.0,xGwLog.0,upfLog.0} %%log_dir%%"
|
||||||
|
Undeploy: "sudo /opt/ltebox/tools/stop_sabox; sudo killall screen"
|
||||||
|
|
||||||
ltebox-nepes:
|
ltebox-nepes:
|
||||||
Host: nepes
|
Host: nepes
|
||||||
|
|||||||
+2
-18
@@ -252,16 +252,7 @@ class EPCManagement():
|
|||||||
mySSH = cls_cmd.getConnection(self.IPAddress)
|
mySSH = cls_cmd.getConnection(self.IPAddress)
|
||||||
html_cell = ''
|
html_cell = ''
|
||||||
if re.match('ltebox', self.Type, re.IGNORECASE):
|
if re.match('ltebox', self.Type, re.IGNORECASE):
|
||||||
logging.debug('Using the SABOX simulated HSS')
|
raise NotImplemented("use cls_corenetwork.py")
|
||||||
mySSH.command('if [ -d ' + self.SourceCodePath + '/scripts ]; then echo ' + self.Password + ' | sudo -S rm -Rf ' + self.SourceCodePath + '/scripts ; fi', '\$', 5)
|
|
||||||
mySSH.command('mkdir -p ' + self.SourceCodePath + '/scripts', '\$', 5)
|
|
||||||
mySSH.command('cd /opt/hss_sim0609', '\$', 5)
|
|
||||||
mySSH.command('echo ' + self.Password + ' | sudo -S rm -f hss.log', '\$', 5)
|
|
||||||
mySSH.command('echo ' + self.Password + ' | sudo -S echo "Starting sudo session" && sudo su -c "screen -dm -S simulated_5g_hss ./start_5g_hss"', '\$', 5)
|
|
||||||
logging.debug('Using the sabox')
|
|
||||||
mySSH.command('cd /opt/ltebox/tools', '\$', 5)
|
|
||||||
mySSH.command('echo ' + self.Password + ' | sudo -S ./start_sabox', '\$', 5)
|
|
||||||
html_cell += 'N/A\n'
|
|
||||||
elif re.match('OAICN5G', self.Type, re.IGNORECASE):
|
elif re.match('OAICN5G', self.Type, re.IGNORECASE):
|
||||||
logging.debug('Starting OAI CN5G')
|
logging.debug('Starting OAI CN5G')
|
||||||
mySSH.command('if [ -d ' + self.SourceCodePath + '/scripts ]; then echo ' + self.Password + ' | sudo -S rm -Rf ' + self.SourceCodePath + '/scripts ; fi', '\$', 5)
|
mySSH.command('if [ -d ' + self.SourceCodePath + '/scripts ]; then echo ' + self.Password + ' | sudo -S rm -Rf ' + self.SourceCodePath + '/scripts ; fi', '\$', 5)
|
||||||
@@ -464,14 +455,7 @@ class EPCManagement():
|
|||||||
mySSH = cls_cmd.getConnection(self.IPAddress)
|
mySSH = cls_cmd.getConnection(self.IPAddress)
|
||||||
message = ''
|
message = ''
|
||||||
if re.match('ltebox', self.Type, re.IGNORECASE):
|
if re.match('ltebox', self.Type, re.IGNORECASE):
|
||||||
logging.debug('Terminating SA BOX')
|
raise NotImplemented("use cls_corenetwork.py")
|
||||||
mySSH.command('cd /opt/ltebox/tools', '\$', 5)
|
|
||||||
mySSH.command('echo ' + self.Password + ' | sudo -S ./stop_sabox', '\$', 5)
|
|
||||||
time.sleep(1)
|
|
||||||
mySSH.command('cd ' + self.SourceCodePath, '\$', 5)
|
|
||||||
mySSH.command('cd scripts', '\$', 5)
|
|
||||||
time.sleep(1)
|
|
||||||
mySSH.command('echo ' + self.Password + ' | sudo -S screen -S simulated_5g_hss -X quit', '\$', 5)
|
|
||||||
elif re.match('OAICN5G', self.Type, re.IGNORECASE):
|
elif re.match('OAICN5G', self.Type, re.IGNORECASE):
|
||||||
logging.debug('OAI CN5G Collecting Log files to workspace')
|
logging.debug('OAI CN5G Collecting Log files to workspace')
|
||||||
mySSH.command('echo ' + self.Password + ' | sudo rm -rf ' + self.SourceCodePath + '/logs', '\$', 5)
|
mySSH.command('echo ' + self.Password + ' | sudo rm -rf ' + self.SourceCodePath + '/logs', '\$', 5)
|
||||||
|
|||||||
@@ -130,6 +130,7 @@
|
|||||||
<class>Ping</class>
|
<class>Ping</class>
|
||||||
<desc>Ping: 20pings in 20sec</desc>
|
<desc>Ping: 20pings in 20sec</desc>
|
||||||
<id>idefix</id>
|
<id>idefix</id>
|
||||||
|
<svr_id>sabox-nepes</svr_id>
|
||||||
<ping_args>-c 20 %cn_ip%</ping_args>
|
<ping_args>-c 20 %cn_ip%</ping_args>
|
||||||
<ping_packetloss_threshold>1</ping_packetloss_threshold>
|
<ping_packetloss_threshold>1</ping_packetloss_threshold>
|
||||||
<ping_rttavg_threshold>15</ping_rttavg_threshold>
|
<ping_rttavg_threshold>15</ping_rttavg_threshold>
|
||||||
@@ -139,6 +140,7 @@
|
|||||||
<class>Ping</class>
|
<class>Ping</class>
|
||||||
<desc>Ping: 100pings in 20sec</desc>
|
<desc>Ping: 100pings in 20sec</desc>
|
||||||
<id>idefix</id>
|
<id>idefix</id>
|
||||||
|
<svr_id>sabox-nepes</svr_id>
|
||||||
<ping_args>-c 100 -i 0.2 %cn_ip%</ping_args>
|
<ping_args>-c 100 -i 0.2 %cn_ip%</ping_args>
|
||||||
<ping_packetloss_threshold>1</ping_packetloss_threshold>
|
<ping_packetloss_threshold>1</ping_packetloss_threshold>
|
||||||
<ping_rttavg_threshold>15</ping_rttavg_threshold>
|
<ping_rttavg_threshold>15</ping_rttavg_threshold>
|
||||||
|
|||||||
@@ -131,6 +131,7 @@
|
|||||||
<class>Ping</class>
|
<class>Ping</class>
|
||||||
<desc>Ping: 50pings in 10sec</desc>
|
<desc>Ping: 50pings in 10sec</desc>
|
||||||
<id>idefix</id>
|
<id>idefix</id>
|
||||||
|
<svr_id>sabox-nepes</svr_id>
|
||||||
<ping_args>-c 20 -i 0.2 %cn_ip%</ping_args>
|
<ping_args>-c 20 -i 0.2 %cn_ip%</ping_args>
|
||||||
<ping_packetloss_threshold>1</ping_packetloss_threshold>
|
<ping_packetloss_threshold>1</ping_packetloss_threshold>
|
||||||
<ping_rttavg_threshold>25</ping_rttavg_threshold>
|
<ping_rttavg_threshold>25</ping_rttavg_threshold>
|
||||||
|
|||||||
@@ -143,6 +143,7 @@
|
|||||||
<class>Ping</class>
|
<class>Ping</class>
|
||||||
<desc>Ping: 20pings in 20sec</desc>
|
<desc>Ping: 20pings in 20sec</desc>
|
||||||
<id>idefix</id>
|
<id>idefix</id>
|
||||||
|
<svr_id>sabox-nepes</svr_id>
|
||||||
<ping_args>-c 20 %cn_ip%</ping_args>
|
<ping_args>-c 20 %cn_ip%</ping_args>
|
||||||
<ping_packetloss_threshold>1</ping_packetloss_threshold>
|
<ping_packetloss_threshold>1</ping_packetloss_threshold>
|
||||||
<ping_rttavg_threshold>25</ping_rttavg_threshold>
|
<ping_rttavg_threshold>25</ping_rttavg_threshold>
|
||||||
@@ -152,6 +153,7 @@
|
|||||||
<class>Ping</class>
|
<class>Ping</class>
|
||||||
<desc>Ping: 100pings in 20sec</desc>
|
<desc>Ping: 100pings in 20sec</desc>
|
||||||
<id>idefix</id>
|
<id>idefix</id>
|
||||||
|
<svr_id>sabox-nepes</svr_id>
|
||||||
<ping_args>-c 100 -i 0.2 %cn_ip%</ping_args>
|
<ping_args>-c 100 -i 0.2 %cn_ip%</ping_args>
|
||||||
<ping_packetloss_threshold>1</ping_packetloss_threshold>
|
<ping_packetloss_threshold>1</ping_packetloss_threshold>
|
||||||
<ping_rttavg_threshold>110</ping_rttavg_threshold>
|
<ping_rttavg_threshold>110</ping_rttavg_threshold>
|
||||||
@@ -161,6 +163,7 @@
|
|||||||
<class>Ping</class>
|
<class>Ping</class>
|
||||||
<desc>Ping: 20pings in 20sec</desc>
|
<desc>Ping: 20pings in 20sec</desc>
|
||||||
<id>idefix</id>
|
<id>idefix</id>
|
||||||
|
<svr_id>sabox-nepes</svr_id>
|
||||||
<ping_args>-c 20 %cn_ip%</ping_args>
|
<ping_args>-c 20 %cn_ip%</ping_args>
|
||||||
<ping_packetloss_threshold>1</ping_packetloss_threshold>
|
<ping_packetloss_threshold>1</ping_packetloss_threshold>
|
||||||
<ping_rttavg_threshold>110</ping_rttavg_threshold>
|
<ping_rttavg_threshold>110</ping_rttavg_threshold>
|
||||||
@@ -170,6 +173,7 @@
|
|||||||
<class>Ping</class>
|
<class>Ping</class>
|
||||||
<desc>Ping: 100pings in 20sec</desc>
|
<desc>Ping: 100pings in 20sec</desc>
|
||||||
<id>idefix</id>
|
<id>idefix</id>
|
||||||
|
<svr_id>sabox-nepes</svr_id>
|
||||||
<ping_args>-c 100 -i 0.2 %cn_ip%</ping_args>
|
<ping_args>-c 100 -i 0.2 %cn_ip%</ping_args>
|
||||||
<ping_packetloss_threshold>1</ping_packetloss_threshold>
|
<ping_packetloss_threshold>1</ping_packetloss_threshold>
|
||||||
<ping_rttavg_threshold>110</ping_rttavg_threshold>
|
<ping_rttavg_threshold>110</ping_rttavg_threshold>
|
||||||
|
|||||||
@@ -124,6 +124,7 @@
|
|||||||
<class>Ping</class>
|
<class>Ping</class>
|
||||||
<desc>Ping: 20pings in 20sec</desc>
|
<desc>Ping: 20pings in 20sec</desc>
|
||||||
<id>idefix</id>
|
<id>idefix</id>
|
||||||
|
<svr_id>sabox-nepes</svr_id>
|
||||||
<ping_args>-c 20 %cn_ip%</ping_args>
|
<ping_args>-c 20 %cn_ip%</ping_args>
|
||||||
<ping_packetloss_threshold>1</ping_packetloss_threshold>
|
<ping_packetloss_threshold>1</ping_packetloss_threshold>
|
||||||
<ping_rttavg_threshold>15</ping_rttavg_threshold>
|
<ping_rttavg_threshold>15</ping_rttavg_threshold>
|
||||||
@@ -133,6 +134,7 @@
|
|||||||
<class>Ping</class>
|
<class>Ping</class>
|
||||||
<desc>Ping: 100pings in 20sec</desc>
|
<desc>Ping: 100pings in 20sec</desc>
|
||||||
<id>idefix</id>
|
<id>idefix</id>
|
||||||
|
<svr_id>sabox-nepes</svr_id>
|
||||||
<ping_args>-c 100 -i 0.2 %cn_ip%</ping_args>
|
<ping_args>-c 100 -i 0.2 %cn_ip%</ping_args>
|
||||||
<ping_packetloss_threshold>1</ping_packetloss_threshold>
|
<ping_packetloss_threshold>1</ping_packetloss_threshold>
|
||||||
<ping_rttavg_threshold>15</ping_rttavg_threshold>
|
<ping_rttavg_threshold>15</ping_rttavg_threshold>
|
||||||
|
|||||||
@@ -30,8 +30,9 @@
|
|||||||
<TestCaseExclusionList></TestCaseExclusionList>
|
<TestCaseExclusionList></TestCaseExclusionList>
|
||||||
|
|
||||||
<testCase id="060000">
|
<testCase id="060000">
|
||||||
<class>Terminate_5GCN</class>
|
<class>UndeployCoreNetwork</class>
|
||||||
<desc>Terminate 5GC</desc>
|
<desc>Terminate 5GC</desc>
|
||||||
|
<cn_id>sabox-nepes</cn_id>
|
||||||
</testCase>
|
</testCase>
|
||||||
|
|
||||||
</testCaseList>
|
</testCaseList>
|
||||||
|
|||||||
@@ -31,8 +31,9 @@
|
|||||||
</TestCaseExclusionList>
|
</TestCaseExclusionList>
|
||||||
|
|
||||||
<testCase id="000100">
|
<testCase id="000100">
|
||||||
<class>Initialize_5GCN</class>
|
<class>DeployCoreNetwork</class>
|
||||||
<desc>Initialize 5GC</desc>
|
<desc>Initialize 5GC</desc>
|
||||||
|
<cn_id>sabox-nepes</cn_id>
|
||||||
</testCase>
|
</testCase>
|
||||||
|
|
||||||
</testCaseList>
|
</testCaseList>
|
||||||
|
|||||||
Reference in New Issue
Block a user