Skip to content

Commit

Permalink
Resolving Issue#450
Browse files Browse the repository at this point in the history
  • Loading branch information
apoorva11029 committed Jul 11, 2016
1 parent e1dbb39 commit 8d230fe
Show file tree
Hide file tree
Showing 10 changed files with 26 additions and 26 deletions.
6 changes: 3 additions & 3 deletions scripts/python/api/tbed.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,17 +207,17 @@ def checkConnectionPair(self, fromContainers, toContainers, port, success):
return success

# Look for any error logs on all nodes
def chekForNetpluginErrors(self):
def checkForNetpluginErrors(self):
for node in self.nodes:
ret = node.chekForNetpluginErrors()
ret = node.checkForNetpluginErrors()
if ret == False and self.failOnError:
tutils.exit("Errors in log file")

# Print netplugin errors if any and exit
def errExit(self, str):
# print erros from netplugin log file
for node in self.nodes:
node.chekForNetpluginErrors()
node.checkForNetpluginErrors()

# exit the script
tutils.exit(str)
2 changes: 1 addition & 1 deletion scripts/python/api/tnode.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ def runContainer(self, imgName="ubuntu:14.04", cmdName="sh", networkName=None, s
# Return a container object
return container.Container(self, cid, cntName="")

def chekForNetpluginErrors(self):
def checkForNetpluginErrors(self):
out, err, exitCode = self.runCmd('grep "error\|fatal" /tmp/net*')
if out != [] or err != []:
print "\n\n\n\n\n\n"
Expand Down
2 changes: 1 addition & 1 deletion scripts/python/runTestCase.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@

time.sleep(15)

testbed.chekForNetpluginErrors()
testbed.checkForNetpluginErrors()

# Run single test case
testcases.tcTrigger.netmasterSwitchoverTest(testbed, numCntr, numIteration)
Expand Down
2 changes: 1 addition & 1 deletion scripts/python/sanity.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@

time.sleep(15)

testbed.chekForNetpluginErrors()
testbed.checkForNetpluginErrors()

# Run vlan tests
testcases.tcNetwork.testAddDeleteTenant(testbed, numCntr, numIteration, encap="vlan")
Expand Down
2 changes: 1 addition & 1 deletion scripts/python/testcases/tcAci.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@ def testACIMode(testbed):
api.objmodel.setFabricMode("default")

# Check for errors
testbed.chekForNetpluginErrors()
testbed.checkForNetpluginErrors()

api.tutils.info("testACIMode Test passed")
8 changes: 4 additions & 4 deletions scripts/python/testcases/tcBasic.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def startRemoveContainer(testbed, numContainer, numIter, encap="vxlan"):
cnt.remove()

# Check for errors
testbed.chekForNetpluginErrors()
testbed.checkForNetpluginErrors()

# Iteration is done
api.tutils.info("startRemoveContainer iteration " + str(iter) + " Passed")
Expand All @@ -31,7 +31,7 @@ def startRemoveContainer(testbed, numContainer, numIter, encap="vxlan"):
tenant.deleteNetwork('private')

# Check for errors
testbed.chekForNetpluginErrors()
testbed.checkForNetpluginErrors()

# Test is done
api.tutils.info("startRemoveContainer Test passed")
Expand Down Expand Up @@ -63,7 +63,7 @@ def startStopContainer(testbed, numContainer, numIter, encap="vxlan"):
testbed.pingTest(containers)

# Check for errors
testbed.chekForNetpluginErrors()
testbed.checkForNetpluginErrors()

# Iteration is done
api.tutils.info("startStopContainer iteration " + str(iter) + " Passed")
Expand All @@ -76,7 +76,7 @@ def startStopContainer(testbed, numContainer, numIter, encap="vxlan"):
tenant.deleteNetwork('private')

# Check for errors
testbed.chekForNetpluginErrors()
testbed.checkForNetpluginErrors()

# Test is done
api.tutils.info("startStopContainer Test passed")
2 changes: 1 addition & 1 deletion scripts/python/testcases/tcDockExec.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def testDockExecRepeate(testbed, numContainer, numIteration, numExec):
tenant.deletePolicy('first')

# Check for errors
testbed.chekForNetpluginErrors()
testbed.checkForNetpluginErrors()

api.tutils.info("dockExec Iteration " + str(iter) + " passed")

Expand Down
4 changes: 2 additions & 2 deletions scripts/python/testcases/tcNetwork.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def testAddDeleteNetwork(testbed, numContainer, numIter, encap="vxlan"):
tenant.deleteNetwork(netName)

# Check for errors
testbed.chekForNetpluginErrors()
testbed.checkForNetpluginErrors()

api.tutils.info("testAddDeleteNetwork Iteration " + str(iter) + " passed")

Expand Down Expand Up @@ -113,7 +113,7 @@ def testAddDeleteTenant(testbed, numContainer, numIter, encap="vxlan"):
tenant.delete()

# Check for errors
testbed.chekForNetpluginErrors()
testbed.checkForNetpluginErrors()

api.tutils.info("testAddDeleteTenant Iteration " + str(iter) + " passed")

Expand Down
10 changes: 5 additions & 5 deletions scripts/python/testcases/tcPolicy.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def testBasicPolicy(testbed, numContainer, numIter, encap="vxlan"):
tenant.deletePolicy('first')

# Check for errors
testbed.chekForNetpluginErrors()
testbed.checkForNetpluginErrors()

api.tutils.info("testBasicPolicy Iteration " + str(iter) + " passed")

Expand Down Expand Up @@ -125,7 +125,7 @@ def testPolicyAddDeleteRule(testbed, numContainer, numIter, encap="vxlan"):
api.tutils.exit("Connection succeded while expecting it to fail")

# Check for errors
testbed.chekForNetpluginErrors()
testbed.checkForNetpluginErrors()

api.tutils.info("testPolicyAddDeleteRule Iteration " + str(iter) + " Passed")

Expand All @@ -152,7 +152,7 @@ def testPolicyAddDeleteRule(testbed, numContainer, numIter, encap="vxlan"):
tenant.deleteNetwork('private')

# Check for errors
testbed.chekForNetpluginErrors()
testbed.checkForNetpluginErrors()

api.tutils.info("testPolicyAddDeleteRule Test passed")

Expand Down Expand Up @@ -220,7 +220,7 @@ def testPolicyFromEpg(testbed, numContainer, numIter, encap="vxlan"):
network.deleteGroup('common')

# Check for errors
testbed.chekForNetpluginErrors()
testbed.checkForNetpluginErrors()

api.tutils.info("testPolicyFromEpg Iteration " + str(iter) + " passed")

Expand Down Expand Up @@ -410,7 +410,7 @@ def testPolicyFeatures(testbed, encap="vxlan"):
tenant.deletePolicy('second')

# Check for errors
testbed.chekForNetpluginErrors()
testbed.checkForNetpluginErrors()

# Delete the network we created
tenant.deleteNetwork('private')
Expand Down
14 changes: 7 additions & 7 deletions scripts/python/testcases/tcTrigger.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def checkAllConnection(testbed, netContainers, networks, grpContainers, groups):
api.tutils.exit("Connection succeeded while expecting to fail")

# Check for errors
testbed.chekForNetpluginErrors()
testbed.checkForNetpluginErrors()

# remove all containers
def removeAllContainers(netContainers, grpContainers):
Expand Down Expand Up @@ -145,7 +145,7 @@ def triggerNetpluginDisconectConnect(testbed):
time.sleep(30)

# Check for errors
testbed.chekForNetpluginErrors()
testbed.checkForNetpluginErrors()

# Trigger netmaster restart
def triggerNetmasterRestart(testbed):
Expand Down Expand Up @@ -315,7 +315,7 @@ def testMultiTrigger(testbed, numIter, numTenants=1, numNetworksPerTenant=1, num
tenant.delete()

# Check for cleanup errors
testbed.chekForNetpluginErrors()
testbed.checkForNetpluginErrors()

# Done
api.tutils.info("testMultiTrigger PASSED")
Expand Down Expand Up @@ -344,7 +344,7 @@ def netmasterSwitchoverTest(testbed, numContainer, numIter, encap="vxlan"):
cnt.remove()

# Check for errors
testbed.chekForNetpluginErrors()
testbed.checkForNetpluginErrors()

# Iteration is done
api.tutils.info("netmasterSwitchoverTest iteration " + str(iter) + " Passed")
Expand All @@ -353,7 +353,7 @@ def netmasterSwitchoverTest(testbed, numContainer, numIter, encap="vxlan"):
tenant.deleteNetwork('private')

# Check for errors
testbed.chekForNetpluginErrors()
testbed.checkForNetpluginErrors()

# Test is done
api.tutils.info("netmasterSwitchoverTest Test passed")
Expand All @@ -380,7 +380,7 @@ def netpluginDisconnectTest(testbed, numContainer, numIter, encap="vxlan"):
cnt.remove()

# Check for errors
testbed.chekForNetpluginErrors()
testbed.checkForNetpluginErrors()

# Iteration is done
api.tutils.info("netpluginDisconnectTest iteration " + str(iter) + " Passed")
Expand All @@ -389,7 +389,7 @@ def netpluginDisconnectTest(testbed, numContainer, numIter, encap="vxlan"):
tenant.deleteNetwork('private')

# Check for errors
testbed.chekForNetpluginErrors()
testbed.checkForNetpluginErrors()

# Test is done
api.tutils.info("netpluginDisconnectTest Test passed")

0 comments on commit 8d230fe

Please sign in to comment.