From 345db34583ac4989308a740b17db67bc828b293b Mon Sep 17 00:00:00 2001 From: sanjeev Date: Fri, 22 May 2015 18:52:40 +0530 Subject: [PATCH] CLOUDSTACK-8507: Added code to install httpd package inside vm if not found This closes #287 --- test/integration/component/test_vpc_network_pfrules.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/integration/component/test_vpc_network_pfrules.py b/test/integration/component/test_vpc_network_pfrules.py index e49642b427c..3f3f988f254 100644 --- a/test/integration/component/test_vpc_network_pfrules.py +++ b/test/integration/component/test_vpc_network_pfrules.py @@ -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")