From 3d369de6fe3bc415c5bda5dffecc79e02ca58993 Mon Sep 17 00:00:00 2001 From: SrikanteswaraRao Talluri Date: Thu, 4 Sep 2014 17:26:51 +0530 Subject: [PATCH] CLOUDSTACK-7388: removed host credentials in the services dict. --- .../component/maint/test_redundant_router.py | 46 +++++++++++-------- 1 file changed, 27 insertions(+), 19 deletions(-) diff --git a/test/integration/component/maint/test_redundant_router.py b/test/integration/component/maint/test_redundant_router.py index 991fc6f3fbf..1b215c3b9b3 100644 --- a/test/integration/component/maint/test_redundant_router.py +++ b/test/integration/component/maint/test_redundant_router.py @@ -94,11 +94,6 @@ class Services: }, }, }, - "host": { - "username": "root", - "password": "password", - "publicport": 22, - }, "network": { "name": "Test Network", "displaytext": "Test Network", @@ -854,15 +849,21 @@ class TestRVRInternals(cloudstackTestCase): hypervisor=self.hypervisor ) else: - result = get_process_status( - master_host.ipaddress, - self.services['host']["publicport"], - self.services['host']["username"], - self.services['host']["password"], - master_router.linklocalip, - 'ip addr show eth2' + try: + host = {} + host.user, host.passwd = get_host_credentials(self.config, master_host.ipaddress) + result = get_process_status( + master_host.ipaddress, + 22, + host.user, + host.passwd, + master_router.linklocalip, + "ip addr show eth2" ) + except KeyError: + self.skipTest("Marvin configuration has no host credentials to check router services") + res = str(result) self.debug("Command 'ip addr show eth2': %s" % result) @@ -890,14 +891,21 @@ class TestRVRInternals(cloudstackTestCase): hypervisor=self.hypervisor ) else: - result = get_process_status( - backup_host.ipaddress, - self.services['host']["publicport"], - self.services['host']["username"], - self.services['host']["password"], - backup_router.linklocalip, - 'ip addr show eth2', + try: + host = {} + host.user, host.passwd = get_host_credentials(self.config, backup_host.ipaddress) + result = get_process_status( + master_host.ipaddress, + 22, + host.user, + host.passwd, + backup_router.linklocalip, + "ip addr show eth2" ) + + except KeyError: + self.skipTest("Marvin configuration has no host credentials to check router services") + res = str(result) self.debug("Command 'ip addr show eth2': %s" % result)