MCPcopy Create free account
hub / github.com/apache/cloudstack / stopAgentOnHost

Method stopAgentOnHost

test/integration/component/test_host_ha.py:276–285  ·  view source on GitHub ↗
(self, hostIp, timeout)

Source from the content-addressed store, hash-verified

274 return
275
276 def stopAgentOnHost(self, hostIp, timeout):
277 srcFile = os.path.dirname(os.path.realpath(__file__)) + "/test_host_ha.sh"
278 if not(os.path.isfile(srcFile)):
279 self.logger.debug("File %s not found" % srcFile)
280 raise unittest.SkipTest("Script file %s required for HA not found" % srcFile)
281
282 ssh = SshClient(hostIp, 22, self.hostConfig["username"], self.hostConfig["password"])
283 ssh.scp(srcFile, "/root/test_host_ha.sh")
284 ssh.execute("nohup sh /root/test_host_ha.sh -t %s -d agent > /dev/null 2>&1 &\n" % timeout)
285 return
286
287 @attr(
288 tags=[

Callers 1

Calls 4

scpMethod · 0.95
executeMethod · 0.95
SshClientClass · 0.85
debugMethod · 0.80

Tested by

no test coverage detected