more logging, copy logs, create HTML row
This commit is contained in:
@@ -53,6 +53,7 @@ amarisoft_ue_1:
|
|||||||
Config : /root/NV17-12-21/ue/config/oaicicd-ue-Ping-SATest.cfg
|
Config : /root/NV17-12-21/ue/config/oaicicd-ue-Ping-SATest.cfg
|
||||||
Duration : 60
|
Duration : 60
|
||||||
Ping : /tmp/test_ue1.log
|
Ping : /tmp/test_ue1.log
|
||||||
|
UELog : /tmp/ue1.log
|
||||||
HostIPAddress : 192.168.18.89
|
HostIPAddress : 192.168.18.89
|
||||||
HostUsername : root
|
HostUsername : root
|
||||||
HostPassword : toor
|
HostPassword : toor
|
||||||
@@ -60,6 +61,7 @@ amarisoft_ue_1:
|
|||||||
|
|
||||||
|
|
||||||
#an other scenario example
|
#an other scenario example
|
||||||
|
#notice : this will not work as such, only suggestion for multi ue scenario
|
||||||
amarisoft_ue_2:
|
amarisoft_ue_2:
|
||||||
ID: amarisoft_ue_2
|
ID: amarisoft_ue_2
|
||||||
State : enabled
|
State : enabled
|
||||||
@@ -71,7 +73,12 @@ amarisoft_ue_2:
|
|||||||
Cmd : /root/NV17-12-21/ue/lteue
|
Cmd : /root/NV17-12-21/ue/lteue
|
||||||
Config : /root/NV17-12-21/ue/config/xxxxxxx.cfg #to be updated for an other scenario
|
Config : /root/NV17-12-21/ue/config/xxxxxxx.cfg #to be updated for an other scenario
|
||||||
Duration : 60
|
Duration : 60
|
||||||
Ping : /tmp/test_ue1.log #to be updated fo an other scenario
|
Ping :
|
||||||
|
- /tmp/test_ue1.log #to be updated fo an other scenario
|
||||||
|
- /tmp/test_ue2.log #could be a list for a multi ue scenario
|
||||||
|
UELog :
|
||||||
|
- /tmp/ue1.log
|
||||||
|
- /tmp/ue1.log
|
||||||
HostIPAddress : 192.168.18.89
|
HostIPAddress : 192.168.18.89
|
||||||
HostUsername : root
|
HostUsername : root
|
||||||
HostPassword : toor
|
HostPassword : toor
|
||||||
|
|||||||
@@ -67,8 +67,14 @@ class AS_UE:
|
|||||||
def RunScenario(self):
|
def RunScenario(self):
|
||||||
mySSH = sshconnection.SSHConnection()
|
mySSH = sshconnection.SSHConnection()
|
||||||
mySSH.open(self.HostIPAddress, self.HostUsername, self.HostPassword)
|
mySSH.open(self.HostIPAddress, self.HostUsername, self.HostPassword)
|
||||||
|
|
||||||
|
logging.debug("Deleting old artifacts :")
|
||||||
|
cmd='rm -rf ' + self.Ping + ' ' + self.UELog
|
||||||
|
mySSH.command(cmd,'#',5)
|
||||||
|
logging.debug("Running scenario :")
|
||||||
cmd='echo $USER; nohup '+self.Cmd + ' ' + self.Config + ' &'
|
cmd='echo $USER; nohup '+self.Cmd + ' ' + self.Config + ' &'
|
||||||
mySSH.command(cmd,'#',5)
|
mySSH.command(cmd,'#',5)
|
||||||
|
|
||||||
mySSH.close()
|
mySSH.close()
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -469,6 +469,7 @@ class OaiCiTest():
|
|||||||
#case it is a amarisoft ue (only 1 at a time supported at the moment)
|
#case it is a amarisoft ue (only 1 at a time supported at the moment)
|
||||||
elif ue_kind == 'amarisoft':
|
elif ue_kind == 'amarisoft':
|
||||||
AS_UE = cls_amarisoft_ue.AS_UE(InfraUE.ci_ue_infra[self.ue_id])
|
AS_UE = cls_amarisoft_ue.AS_UE(InfraUE.ci_ue_infra[self.ue_id])
|
||||||
|
HTML.CreateHtmlTestRow(AS_UE.Config, 'OK', CONST.ALL_PROCESSES_OK)
|
||||||
AS_UE.RunScenario()
|
AS_UE.RunScenario()
|
||||||
AS_UE.WaitEndScenario()
|
AS_UE.WaitEndScenario()
|
||||||
AS_UE.KillASUE()
|
AS_UE.KillASUE()
|
||||||
@@ -1592,7 +1593,6 @@ class OaiCiTest():
|
|||||||
#if module, ping from module to EPC
|
#if module, ping from module to EPC
|
||||||
if self.ue_id!='':
|
if self.ue_id!='':
|
||||||
if (re.match('amarisoft', self.ue_id, re.IGNORECASE)):
|
if (re.match('amarisoft', self.ue_id, re.IGNORECASE)):
|
||||||
logging.debug("Ping analysis from amarisoft scenario")
|
|
||||||
launchFromEpc = False
|
launchFromEpc = False
|
||||||
launchFromASUE = True
|
launchFromASUE = True
|
||||||
else:
|
else:
|
||||||
@@ -1659,8 +1659,10 @@ class OaiCiTest():
|
|||||||
elif (launchFromASUE == True):
|
elif (launchFromASUE == True):
|
||||||
#ping was already executed when running scenario
|
#ping was already executed when running scenario
|
||||||
#we only need to retrieve ping log file, whose location is in the ci_ueinfra.yaml
|
#we only need to retrieve ping log file, whose location is in the ci_ueinfra.yaml
|
||||||
logging.debug("Get Ping log from AS server : " + Module_UE.Ping)
|
logging.debug("Get logs from AS server : " + Module_UE.Ping + ", " + Module_UE.UELog)
|
||||||
SSH.copyin(Module_UE.HostIPAddress, Module_UE.HostUsername, Module_UE.HostPassword, Module_UE.Ping, '.')
|
SSH.copyin(Module_UE.HostIPAddress, Module_UE.HostUsername, Module_UE.HostPassword, Module_UE.Ping, '.')
|
||||||
|
SSH.copyin(Module_UE.HostIPAddress, Module_UE.HostUsername, Module_UE.HostPassword, Module_UE.UELog, '.')
|
||||||
|
logging.debug("Ping analysis from Amarisoft scenario")
|
||||||
path,ping_log_file = os.path.split(Module_UE.Ping)
|
path,ping_log_file = os.path.split(Module_UE.Ping)
|
||||||
SSH.open(Module_UE.HostIPAddress, Module_UE.HostUsername, Module_UE.HostPassword)
|
SSH.open(Module_UE.HostIPAddress, Module_UE.HostUsername, Module_UE.HostPassword)
|
||||||
SSH.command('cat ' + Module_UE.Ping, '\#', 5)
|
SSH.command('cat ' + Module_UE.Ping, '\#', 5)
|
||||||
|
|||||||
@@ -37,7 +37,7 @@
|
|||||||
|
|
||||||
<testCase id="010000">
|
<testCase id="010000">
|
||||||
<class>Initialize_UE</class>
|
<class>Initialize_UE</class>
|
||||||
<desc>Initialize Amarisoft UE 1x</desc>
|
<desc>Run AS UE Scenario</desc>
|
||||||
<id>amarisoft_ue_1</id>
|
<id>amarisoft_ue_1</id>
|
||||||
</testCase>
|
</testCase>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user