Code Review
/
csit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
HC Test: add mising sudo to ODL client statup
[csit.git]
/
resources
/
libraries
/
python
/
honeycomb
/
HoneycombSetup.py
diff --git
a/resources/libraries/python/honeycomb/HoneycombSetup.py
b/resources/libraries/python/honeycomb/HoneycombSetup.py
index
4c438ff
..
bab24aa
100644
(file)
--- a/
resources/libraries/python/honeycomb/HoneycombSetup.py
+++ b/
resources/libraries/python/honeycomb/HoneycombSetup.py
@@
-255,7
+255,7
@@
class HoneycombSetup(object):
replace = '\\"restconf-binding-address\\": \\"0.0.0.0\\",'
argument = '"/{0}/c\\ {1}"'.format(find, replace)
replace = '\\"restconf-binding-address\\": \\"0.0.0.0\\",'
argument = '"/{0}/c\\ {1}"'.format(find, replace)
- path = "{0}/config/
honeycomb
.json".format(Const.REMOTE_HC_DIR)
+ path = "{0}/config/
restconf
.json".format(Const.REMOTE_HC_DIR)
command = "sed -i {0} {1}".format(argument, path)
ssh = SSH()
command = "sed -i {0} {1}".format(argument, path)
ssh = SSH()
@@
-464,7
+464,7
@@
class HoneycombSetup(object):
cmd = "cp -r {src}/*karaf_{odl_name}* {dst}".format(
src=src_path, odl_name=odl_name, dst=dst_path)
cmd = "cp -r {src}/*karaf_{odl_name}* {dst}".format(
src=src_path, odl_name=odl_name, dst=dst_path)
- ret_code, _, _ = ssh.exec_command(cmd, timeout=60)
+ ret_code, _, _ = ssh.exec_command
_sudo
(cmd, timeout=60)
if int(ret_code) != 0:
raise HoneycombError(
"Failed to copy ODL client on node {0}".format(node["host"]))
if int(ret_code) != 0:
raise HoneycombError(
"Failed to copy ODL client on node {0}".format(node["host"]))
@@
-573,8
+573,7
@@
class HoneycombSetup(object):
"odl_client/odl_netconf_connector")
try:
"odl_client/odl_netconf_connector")
try:
- status_code, _ = HTTPRequest.get(node, path, timeout=10,
- enable_logging=False)
+ HTTPRequest.get(node, path, timeout=10, enable_logging=False)
raise HoneycombError("ODL client is still running.")
except HTTPRequestError:
logger.debug("Connection refused, checking process state....")
raise HoneycombError("ODL client is still running.")
except HTTPRequestError:
logger.debug("Connection refused, checking process state....")
@@
-714,8
+713,8
@@
class HoneycombStartupConfig(object):
self.ssh.connect(node)
cmd = "echo '{config}' > /tmp/honeycomb " \
"&& chmod +x /tmp/honeycomb " \
self.ssh.connect(node)
cmd = "echo '{config}' > /tmp/honeycomb " \
"&& chmod +x /tmp/honeycomb " \
- "&& sudo mv -f /tmp/honeycomb /opt/honeycomb".
format(
-
config=self.config)
+ "&& sudo mv -f /tmp/honeycomb /opt/honeycomb".
\
+
format(
config=self.config)
self.ssh.exec_command(cmd)
def set_cpu_scheduler(self, scheduler="FIFO"):
self.ssh.exec_command(cmd)
def set_cpu_scheduler(self, scheduler="FIFO"):