Commit 09c3597b authored by Robert Schmidt's avatar Robert Schmidt

Only check T tracer if EPC has been defined

parent f3241cd4
...@@ -383,17 +383,19 @@ class RANManagement(): ...@@ -383,17 +383,19 @@ class RANManagement():
# If tracer options is on, running tshark on EPC side and capture traffic b/ EPC and eNB # If tracer options is on, running tshark on EPC side and capture traffic b/ EPC and eNB
localEpcIpAddr = EPC.IPAddress if EPC.IPAddress != "none":
localEpcUserName = EPC.UserName localEpcIpAddr = EPC.IPAddress
localEpcPassword = EPC.Password localEpcUserName = EPC.UserName
mySSH.open(localEpcIpAddr, localEpcUserName, localEpcPassword) localEpcPassword = EPC.Password
eth_interface = 'any' mySSH.open(localEpcIpAddr, localEpcUserName, localEpcPassword)
fltr = 'sctp' eth_interface = 'any'
logging.debug('\u001B[1m Launching tshark on interface ' + eth_interface + ' with filter "' + fltr + '"\u001B[0m') fltr = 'sctp'
self.epcPcapFile = 'enb_' + self.testCase_id + '_s1log.pcap' logging.debug('\u001B[1m Launching tshark on interface ' + eth_interface + ' with filter "' + fltr + '"\u001B[0m')
mySSH.command('echo ' + localEpcPassword + ' | sudo -S rm -f /tmp/' + self.epcPcapFile , '\$', 5) self.epcPcapFile = 'enb_' + self.testCase_id + '_s1log.pcap'
mySSH.command('echo $USER; nohup sudo tshark -f "host ' + lIpAddr +'" -i ' + eth_interface + ' -f "' + fltr + '" -w /tmp/' + self.epcPcapFile + ' > /tmp/tshark.log 2>&1 &', localEpcUserName, 5) mySSH.command('echo ' + localEpcPassword + ' | sudo -S rm -f /tmp/' + self.epcPcapFile , '\$', 5)
mySSH.close() mySSH.command('echo $USER; nohup sudo tshark -f "host ' + lIpAddr +'" -i ' + eth_interface + ' -f "' + fltr + '" -w /tmp/' + self.epcPcapFile + ' > /tmp/tshark.log 2>&1 &', localEpcUserName, 5)
mySSH.close()
mySSH.open(lIpAddr, lUserName, lPassWord) mySSH.open(lIpAddr, lUserName, lPassWord)
mySSH.command('cd ' + lSourcePath, '\$', 5) mySSH.command('cd ' + lSourcePath, '\$', 5)
# Initialize_eNB_args usually start with -O and followed by the location in repository # Initialize_eNB_args usually start with -O and followed by the location in repository
......
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