aboutsummaryrefslogtreecommitdiffstats
path: root/testcases/Controllers/ONOS/Teston/CI/adapters/environment.py
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2016-04-25 09:27:21 +0200
committerCédric Ollivier <cedric.ollivier@orange.com>2016-04-25 14:22:34 +0200
commit423db209c5efe182fd1b82c2eec0df7c38dc7c8d (patch)
treeb4eabba2f645b0e1b2879d99bf377f18465de24a /testcases/Controllers/ONOS/Teston/CI/adapters/environment.py
parentf1c352869e0114a54830d46ea3407006096138e6 (diff)
Remove backslashs for line continuation
JIRA: FUNCTEST-213 Change-Id: Ia50521cf8fcf60a847aa44fe0ea59b6e64830e92 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
Diffstat (limited to 'testcases/Controllers/ONOS/Teston/CI/adapters/environment.py')
-rw-r--r--testcases/Controllers/ONOS/Teston/CI/adapters/environment.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/testcases/Controllers/ONOS/Teston/CI/adapters/environment.py b/testcases/Controllers/ONOS/Teston/CI/adapters/environment.py
index 4fc636aba..49f7f9632 100644
--- a/testcases/Controllers/ONOS/Teston/CI/adapters/environment.py
+++ b/testcases/Controllers/ONOS/Teston/CI/adapters/environment.py
@@ -136,8 +136,8 @@ class environment(connection):
print "try to connect " + str(host)
result = self.CheckSshNoPasswd(host)
if not result:
- print "ssh lgin failed,try to copy master publickey" + \
- "to agent " + str(host)
+ print ("ssh lgin failed,try to copy master publickey" +
+ "to agent " + str(host))
self.CopyPublicKey(host)
self.OnosPushKeys(handle, "onos-push-keys " + self.OCT, masterpass)
self.OnosPushKeys(handle, "onos-push-keys " + self.OC1, agentpass)
@@ -201,18 +201,18 @@ class environment(connection):
filepath = '/root/'
else:
filepath = '/home/' + self.masterusername + '/'
- filepath = filepath + "OnosSystemTest/TestON/tests/" \
- + testcase + "/" + testcase + ".topo"
+ filepath = (filepath + "OnosSystemTest/TestON/tests/" +
+ testcase + "/" + testcase + ".topo")
line = open(filepath, 'r').readlines()
lenall = len(line) - 1
for i in range(lenall - 2):
if("localhost" in line[i]) or ("OCT" in line[i]):
line[i + 1] = re.sub(">\w+", ">" + user, line[i + 1])
line[i + 2] = re.sub(">\w+", ">" + password, line[i + 2])
- if "OC1" in line[i] or "OC2" in line[i] or "OC3" in line[i] or \
- "OCN" in line[i] or "OCN2" in line[i]:
- line[i + 1] = re.sub(">\w+", ">root", line[i + 1])
- line[i + 2] = re.sub(">\w+", ">root", line[i + 2])
+ if ("OC1" in line[i] or "OC2" in line[i] or "OC3" in line[i] or
+ "OCN" in line[i] or "OCN2" in line[i]):
+ line[i + 1] = re.sub(">\w+", ">root", line[i + 1])
+ line[i + 2] = re.sub(">\w+", ">root", line[i + 2])
NewFile = open(filepath, 'w')
NewFile.writelines(line)
NewFile.close