Add Basic Connectivity tests for paire leaf pod
Change-Id: Ie2c7529629893462e9567700354368380188ef8b
diff --git a/TestON/drivers/common/cli/networkdriver.py b/TestON/drivers/common/cli/networkdriver.py
index 6d46c1e..6b02e09 100755
--- a/TestON/drivers/common/cli/networkdriver.py
+++ b/TestON/drivers/common/cli/networkdriver.py
@@ -786,23 +786,12 @@
"""
Returns IP address of the host
"""
- cmd = "ifconfig %s" % iface if iface else ""
- response = self.runCmdOnHost( host, cmd )
- pattern = ''
- if proto == 'IPV4':
- pattern = "inet\s(\d+\.\d+\.\d+\.\d+)\s\snetmask"
+ hostComponent = self.hosts[ host ]
+ if hostComponent:
+ return hostComponent.getIPAddress( iface=iface, proto=proto )
else:
- pattern = "inet6\s([\w,:]*)/\d+\s\sprefixlen"
- ipAddressSearch = re.search( pattern, response )
- if not ipAddressSearch:
+ main.log.warn( self.name + ": Could not find host with short name '%s'" % host )
return None
- main.log.info(
- self.name +
- ": IP-Address of Host " +
- host +
- " is " +
- ipAddressSearch.group( 1 ) )
- return ipAddressSearch.group( 1 )
def getLinkRandom( self, timeout=60, nonCut=True, excludeNodes=[], skipLinks=[] ):
"""