cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mc...@apache.org
Subject [13/50] [abbrv] git commit: updated refs/heads/rbac to 2ef4d52
Date Fri, 01 Nov 2013 00:21:24 GMT
CLOUDSTACK-4772: modify the script to get_process_status for vmware deployment

Signed-off-by: SrikanteswaraRao Talluri <talluri@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/3223fcf6
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/3223fcf6
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/3223fcf6

Branch: refs/heads/rbac
Commit: 3223fcf672d0bf4cadc6cdfa1b92dbe04cad11f1
Parents: f1683d0
Author: SrikanteswaraRao Talluri <talluri@apache.org>
Authored: Wed Oct 30 01:40:33 2013 +0530
Committer: SrikanteswaraRao Talluri <talluri@apache.org>
Committed: Wed Oct 30 01:46:26 2013 +0530

----------------------------------------------------------------------
 test/integration/component/test_routers.py | 54 ++++++++++++++++---------
 test/integration/smoke/test_routers.py     | 15 +++----
 2 files changed, 42 insertions(+), 27 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3223fcf6/test/integration/component/test_routers.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_routers.py b/test/integration/component/test_routers.py
index 396c54e..8706a1e 100644
--- a/test/integration/component/test_routers.py
+++ b/test/integration/component/test_routers.py
@@ -1110,7 +1110,7 @@ class TestRouterStopCreateFW(cloudstackTestCase):
         self.cleanup = []
         return
 
-    @attr(tags = ["advanced", "advancedns"])
+    @attr(tags = ["advanced", "advancedns","test"])
     def test_01_RouterStopCreateFW(self):
         """Test router stop create Firewall rule
         """
@@ -1249,25 +1249,39 @@ class TestRouterStopCreateFW(cloudstackTestCase):
                         "Check for list hosts response return valid data"
                         )
         host = hosts[0]
+        host.user, host.passwd = get_host_credentials(self.config, host.ipaddress)
+
         # For DNS and DHCP check 'dnsmasq' process status
-        try:
-            host.user, host.passwd = get_host_credentials(self.config, host.ipaddress)
-            result = get_process_status(
-                host.ipaddress,
-                22,
-                host.user,
-                host.passwd,
-                router.linklocalip,
-                'iptables -t nat -L'
-            )
-            self.debug("iptables -t nat -L: %s" % result)
-            self.debug("Public IP: %s" % public_ip.ipaddress)
-            res = str(result)
-            self.assertEqual(
-                res.count(str(public_ip.ipaddress)),
-                1,
-                "Check public IP address"
+        if self.apiclient.hypervisor.lower() == 'vmware':
+               result = get_process_status(
+                               self.apiclient.connection.mgtSvr,
+                               22,
+                               self.apiclient.connection.user,
+                               self.apiclient.connection.passwd,
+                               router.linklocalip,
+                               'iptables -t nat -L',
+                                hypervisor=self.apiclient.hypervisor
+                               )
+        else:
+            try:
+                result = get_process_status(
+                    host.ipaddress,
+                    22,
+                    host.user,
+                    host.passwd,
+                    router.linklocalip,
+                    'iptables -t nat -L'
+                )
+            except KeyError:
+                self.skipTest("Provide a marvin config file with host credentials to run
%s" % self._testMethodName)
+
+        self.debug("iptables -t nat -L: %s" % result)
+        self.debug("Public IP: %s" % public_ip.ipaddress)
+        res = str(result)
+        self.assertEqual(
+            res.count(str(public_ip.ipaddress)),
+            1,
+            "Check public IP address"
             )
-        except KeyError:
-            self.skipTest("Provide a marvin config file with host credentials to run %s"
% self._testMethodName)
+
         return

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3223fcf6/test/integration/smoke/test_routers.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_routers.py b/test/integration/smoke/test_routers.py
index 0268666..0f32e27 100644
--- a/test/integration/smoke/test_routers.py
+++ b/test/integration/smoke/test_routers.py
@@ -201,16 +201,17 @@ class TestRouterServices(cloudstackTestCase):
                                     router.linklocalip,
                                     "service dnsmasq status"
                                     )
-                res = str(result)
-                self.debug("Dnsmasq process status: %s" % res)
 
-                self.assertEqual(
-                                res.count("running"),
-                                1,
-                                "Check dnsmasq service is running or not"
-                        )
             except KeyError:
                 self.skipTest("Marvin configuration has no host credentials to check router
services")
+        res = str(result)
+        self.debug("Dnsmasq process status: %s" % res)
+
+        self.assertEqual(
+            res.count("running"),
+            1,
+            "Check dnsmasq service is running or not"
+        )
         return
 
 


Mime
View raw message