You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by wi...@apache.org on 2013/09/03 13:09:38 UTC
[33/50] [abbrv] git commit: updated refs/heads/disk-cache to 72f2f12
get host credentials from marvin configuration for ssvm test
(cherry picked from commit 6371d3b98c56784e4a3588c2546be18aa79cb595)
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/fb7eb061
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/fb7eb061
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/fb7eb061
Branch: refs/heads/disk-cache
Commit: fb7eb0619800602aa06fd81e9f946f8a42b5b605
Parents: e826956
Author: Prasanna Santhanam <ts...@apache.org>
Authored: Sat Aug 31 12:50:00 2013 +0530
Committer: Prasanna Santhanam <ts...@apache.org>
Committed: Sat Aug 31 12:50:58 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/fb7eb061/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(