cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t..@apache.org
Subject git commit: updated refs/heads/4.2-forward to 2575ded
Date Sat, 31 Aug 2013 07:22:08 GMT
Updated Branches:
  refs/heads/4.2-forward 21a44e3ed -> 2575ded3f


get host credentials from marvin configuration for ssvm test


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

Branch: refs/heads/4.2-forward
Commit: 2575ded3f32e7c27315c5701bbc4fdbc44615080
Parents: 21a44e3
Author: Prasanna Santhanam <tsp@apache.org>
Authored: Sat Aug 31 12:50:00 2013 +0530
Committer: Prasanna Santhanam <tsp@apache.org>
Committed: Sat Aug 31 12:51:53 2013 +0530

----------------------------------------------------------------------
 test/integration/smoke/test_ssvm.py | 63 ++++++++++++++++++--------------
 1 file changed, 35 insertions(+), 28 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2575ded3/test/integration/smoke/test_ssvm.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_ssvm.py b/test/integration/smoke/test_ssvm.py
index 6893472..9fa59a9 100644
--- a/test/integration/smoke/test_ssvm.py
+++ b/test/integration/smoke/test_ssvm.py
@@ -37,11 +37,6 @@ class Services:
 
     def __init__(self):
         self.services = {
-                      "host": {
-                               "username": 'root', # Credentials for SSH
-                               "password": 'password',
-                               "publicport": 22,
-                               },
                        "sleep": 60,
                        "timeout": 10,
                       }
@@ -346,14 +341,18 @@ class TestSSVMs(cloudstackTestCase):
                                 hypervisor=self.apiclient.hypervisor
                                 )
         else:
-            result = get_process_status(
-                                host.ipaddress,
-                                self.services['host']["publicport"],
-                                self.services['host']["username"],
-                                self.services['host']["password"],
-                                ssvm.linklocalip,
-                                "/usr/local/cloud/systemvm/ssvm-check.sh |grep -e ERROR -e
WARNING -e FAIL"
+            try:
+                host.user, host.passwd = get_host_credentials(self.config, host.ipaddress)
+                result = get_process_status(
+                                    host.ipaddress,
+                                    22,
+                                    host.user,
+                                    host.passwd,
+                                    ssvm.linklocalip,
+                                    "/usr/local/cloud/systemvm/ssvm-check.sh |grep -e ERROR
-e WARNING -e FAIL"
                                 )
+            except KeyError:
+                self.skipTest("Marvin configuration has no host credentials to check router
services")
         res = str(result)
         self.debug("SSVM script output: %s" % res)
 
@@ -382,14 +381,18 @@ class TestSSVMs(cloudstackTestCase):
                                 hypervisor=self.apiclient.hypervisor
                                 )
         else:
-            result = get_process_status(
-                                host.ipaddress,
-                                self.services['host']["publicport"],
-                                self.services['host']["username"],
-                                self.services['host']["password"],
-                                ssvm.linklocalip,
-                                "service cloud status"
-                                )
+            try:
+                host.user, host.passwd = get_host_credentials(self.config, host.ipaddress)
+                result = get_process_status(
+                                    host.ipaddress,
+                                    22,
+                                    host.user,
+                                    host.passwd,
+                                    ssvm.linklocalip,
+                                    "service cloud status"
+                                    )
+            except KeyError:
+                self.skipTest("Marvin configuration has no host credentials to check router
services")
         res = str(result)
         self.debug("Cloud Process status: %s" % res)
         # cloud.com service (type=secstorage) is running: process id: 2346
@@ -462,14 +465,18 @@ class TestSSVMs(cloudstackTestCase):
                                 hypervisor=self.apiclient.hypervisor
                                 )
         else:
-            result = get_process_status(
-                                host.ipaddress,
-                                self.services['host']["publicport"],
-                                self.services['host']["username"],
-                                self.services['host']["password"],
-                                cpvm.linklocalip,
-                                "service cloud status"
-                                )
+            try:
+                host.user, host.passwd = get_host_credentials(self.config, host.ipaddress)
+                result = get_process_status(
+                                    host.ipaddress,
+                                    22,
+                                    host.user,
+                                    host.passwd,
+                                    cpvm.linklocalip,
+                                    "service cloud status"
+                                    )
+            except KeyError:
+                self.skipTest("Marvin configuration has no host credentials to check router
services")
         res = str(result)
         self.debug("Cloud Process status: %s" % res)
         self.assertEqual(


Mime
View raw message