Commit 401966c8 authored by hardy's avatar hardy

adding the support of different apn depending on CN in ue infra yaml

parent fea90899
...@@ -4,7 +4,9 @@ idefix: ...@@ -4,7 +4,9 @@ idefix:
Kind : quectel Kind : quectel
Process : Process :
Name : quectel-CM Name : quectel-CM
Cmd : /home/oaicicd/quectel-CM/quectel-CM -s oai.ipv4 -4 Cmd : /home/oaicicd/quectel-CM/quectel-CM -4 -s
Apn :
ltebox : oai.ipv4
WakeupScript : ci_ctl_qtel.py /dev/ttyUSB2 wup WakeupScript : ci_ctl_qtel.py /dev/ttyUSB2 wup
DetachScript : ci_ctl_qtel.py /dev/ttyUSB2 detach DetachScript : ci_ctl_qtel.py /dev/ttyUSB2 detach
LogStore : /media/usb-drive/ci_qlogs LogStore : /media/usb-drive/ci_qlogs
...@@ -20,7 +22,10 @@ nrmodule2_quectel: ...@@ -20,7 +22,10 @@ nrmodule2_quectel:
Kind : quectel Kind : quectel
Process : Process :
Name : quectel-CM Name : quectel-CM
Cmd : /home/nrmodule2/quectel-CM/quectel-CM -s oai -4 #oai is the dnn for OAI CN5G (hardcoded in CN) Cmd : /home/nrmodule2/quectel-CM/quectel-CM -4 -s
Apn :
OAICN5G : oai
OAI-Rel14-Docker : oai.ipv4
WakeupScript : ci_ctl_qtel.py /dev/ttyUSB7 wup WakeupScript : ci_ctl_qtel.py /dev/ttyUSB7 wup
DetachScript : ci_ctl_qtel.py /dev/ttyUSB7 detach DetachScript : ci_ctl_qtel.py /dev/ttyUSB7 detach
LogStore : /media/ci_qlogs LogStore : /media/ci_qlogs
......
...@@ -61,7 +61,7 @@ class Module_UE: ...@@ -61,7 +61,7 @@ class Module_UE:
#this method checks if the specified Process is running on the server hosting the module #this method checks if the specified Process is running on the server hosting the module
#if not it will be started #if not it will be started
def CheckCMProcess(self): def CheckCMProcess(self,CNType):
HOST=self.HostUsername+'@'+self.HostIPAddress HOST=self.HostUsername+'@'+self.HostIPAddress
COMMAND="ps aux | grep " + self.Process['Name'] + " | grep -v grep " COMMAND="ps aux | grep " + self.Process['Name'] + " | grep -v grep "
logging.debug(COMMAND) logging.debug(COMMAND)
...@@ -76,7 +76,7 @@ class Module_UE: ...@@ -76,7 +76,7 @@ class Module_UE:
logging.debug('Starting ' + self.Process['Name']) logging.debug('Starting ' + self.Process['Name'])
mySSH = sshconnection.SSHConnection() mySSH = sshconnection.SSHConnection()
mySSH.open(self.HostIPAddress, self.HostUsername, self.HostPassword) mySSH.open(self.HostIPAddress, self.HostUsername, self.HostPassword)
mySSH.command('echo $USER; echo ' + self.HostPassword + ' | nohup sudo -S ' + self.Process['Cmd'] + ' &','\$',5) mySSH.command('echo $USER; echo ' + self.HostPassword + ' | nohup sudo -S ' + self.Process['Cmd'] + ' ' + self.Process['Apn'][CNType] + ' &','\$',5)
mySSH.close() mySSH.close()
#checking the process #checking the process
time.sleep(5) time.sleep(5)
......
...@@ -388,7 +388,7 @@ class OaiCiTest(): ...@@ -388,7 +388,7 @@ class OaiCiTest():
#RH #RH
Module_UE = cls_module_ue.Module_UE(InfraUE.ci_ue_infra[self.ue_id]) Module_UE = cls_module_ue.Module_UE(InfraUE.ci_ue_infra[self.ue_id])
Module_UE.ue_trace=ue_trace Module_UE.ue_trace=ue_trace
is_module=Module_UE.CheckCMProcess() is_module=Module_UE.CheckCMProcess(EPC.Type)
if is_module: if is_module:
Module_UE.EnableTrace() Module_UE.EnableTrace()
time.sleep(5) time.sleep(5)
......
...@@ -486,7 +486,7 @@ class RANManagement(): ...@@ -486,7 +486,7 @@ class RANManagement():
monitor_file='stats_monitor.py' monitor_file='stats_monitor.py'
#mySSH.command('echo ' + lPassWord + ' | sudo -S cp ' + self.eNBSourceCodePath + '/ci-scripts/'+ monitor_file + ' ' + self.eNBSourceCodePath + '/cmake_targets/ran_build/build/.','\$', 5) #mySSH.command('echo ' + lPassWord + ' | sudo -S cp ' + self.eNBSourceCodePath + '/ci-scripts/'+ monitor_file + ' ' + self.eNBSourceCodePath + '/cmake_targets/ran_build/build/.','\$', 5)
#mySSH.command('echo $USER; nohup python3 ' + self.eNBSourceCodePath + '/cmake_targets/ran_build/build/' + monitor_file + ' 2>&1 &', '\$', 5) #mySSH.command('echo $USER; nohup python3 ' + self.eNBSourceCodePath + '/cmake_targets/ran_build/build/' + monitor_file + ' 2>&1 &', '\$', 5)
mySSH.command('echo $USER; nohup python3 ../ci-scripts/' + monitor_file + ' 2>&1 &', '\$', 5) mySSH.command('echo $USER; nohup python3 ../ci-scripts/' + monitor_file + ' 2>&1 > stats_monitor_execution.log &', '\$', 5)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment