More fixes for staging pod tests
- Fix error if dhcp option is missing on host config
- Ignore some more packets at start and end of traffic flow
Change-Id: I98a3757727626a0e5743a3ab8fb6690ea5047798
diff --git a/TestON/drivers/common/cli/hostdriver.py b/TestON/drivers/common/cli/hostdriver.py
index 8f3037e..e51c5d6 100644
--- a/TestON/drivers/common/cli/hostdriver.py
+++ b/TestON/drivers/common/cli/hostdriver.py
@@ -56,7 +56,7 @@
self.interfaces.append( { 'ips': [ self.options[ 'ip' ] ],
'isUp': True,
'mac': self.options[ 'mac' ],
- 'dhcp': self.options[ 'dhcp' ],
+ 'dhcp': self.options.get( 'dhcp', "False" ),
'name': self.options.get( 'interfaceName', None ) } )
try:
diff --git a/TestON/tests/USECASE/SegmentRouting/SRStaging/dependencies/SRStagingTest.py b/TestON/tests/USECASE/SegmentRouting/SRStaging/dependencies/SRStagingTest.py
index 18e1e32..db27d12 100644
--- a/TestON/tests/USECASE/SegmentRouting/SRStaging/dependencies/SRStagingTest.py
+++ b/TestON/tests/USECASE/SegmentRouting/SRStaging/dependencies/SRStagingTest.py
@@ -599,9 +599,9 @@
except Exception as e:
main.log.exception( "Error in onosDown" )
return -1
- # Remove first and last packet, sometimes there can be a long gap between these and the other packets
+ # Remove first and last packets, sometimes there can be a long gap between these and the other packets
# Then sort by time from previous packet, grab the last one and print the time from previous packet
- oneLiner = "head -n -1 | tail -n +1 | sort -u -g -k2,2 | tail -1 | cut -f2 "
+ oneLiner = "head -n -50 | tail -n +50 | sort -u -g -k2,2 | tail -1 | cut -f2 "
tsharkOptions = "-t dd -r %s -Y %s -T fields -e frame.number -e frame.time_delta -e ip.src -e ip.dst -e udp | %s" % ( filePath, packetFilter, oneLiner )
component.handle.sendline( "sudo /usr/bin/tshark %s" % tsharkOptions )
i = component.handle.expect( [ "appears to be damaged or corrupt.",