CLOUDSTACK-8507: Added code to install httpd package inside vm if not found

This closes #287
This commit is contained in:
sanjeev 2015-05-22 18:52:40 +05:30
parent d7f4498f76
commit 345db34583

View File

@ -339,6 +339,13 @@ class TestVPCNetworkPFRules(cloudstackTestCase):
time.sleep(5)
ssh_response = str(sshClient.execute("service httpd status")).lower()
self.debug("httpd service status is: %s" % ssh_response)
if "httpd: unrecognized service" in ssh_response or "inactive" in ssh_response:
ssh_res = sshClient.execute("yum install httpd -y")
if "Complete!" not in ssh_res:
raise Exception("Failed to install http server")
sshClient.execute("service httpd start")
time.sleep(5)
ssh_response = str(sshClient.execute("service httpd status")).lower()
if not "running" in ssh_response:
raise Exception("Failed to start httpd service")