From e6099585074f6f55defbdac302f35fd6c260ad92 Mon Sep 17 00:00:00 2001 From: Egor Kotko Date: Thu, 5 May 2016 18:46:21 +0200 Subject: [PATCH] Change the parameter Change giving to method (parse_pcs_status_xml) parameter from remote to ip address Change-Id: Idda3a5912445b4fb46dee69a2ee166284462db8f Closes-bug: #1570943 (cherry picked from commit cd328ac3e09751bb6b81caf9301634f873910be7) --- system_test/actions/strength_actions.py | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/system_test/actions/strength_actions.py b/system_test/actions/strength_actions.py index e3184b2bc..e7a258d65 100644 --- a/system_test/actions/strength_actions.py +++ b/system_test/actions/strength_actions.py @@ -135,11 +135,13 @@ class FillRootActions(object): self.primary_controller_fqdn = str( self.fuel_web.fqdn(self.primary_controller)) + primary_ctrl = \ + self.primary_controller.get_ip_address_by_network_name('admin') + pcs_status = parse_pcs_status_xml(primary_ctrl) + with self.fuel_web.get_ssh_for_node( self.primary_controller.name) as remote: - pcs_status = parse_pcs_status_xml(remote) - root_free = run_on_remote_get_results( remote, 'cibadmin --query --scope status')['stdout_str'] @@ -269,7 +271,12 @@ class FillRootActions(object): logger.info( "Checking for 'running_resources " "attribute have '0' value") - pcs_status = parse_pcs_status_xml(remote) + + primary_ctrl = \ + self.primary_controller.get_ip_address_by_network_name( + 'admin') + pcs_status = parse_pcs_status_xml(primary_ctrl) + pcs_attribs = get_pcs_nodes(pcs_status) return pcs_attribs[self.primary_controller_fqdn][ 'resources_running'] == '0' @@ -343,7 +350,12 @@ class FillRootActions(object): "have {} value on node {}".format( self.slave_node_running_resources, self.primary_controller_fqdn)) - pcs_status = parse_pcs_status_xml(remote) + + primary_ctrl = \ + self.primary_controller.get_ip_address_by_network_name( + 'admin') + pcs_status = parse_pcs_status_xml(primary_ctrl) + pcs_attribs = get_pcs_nodes(pcs_status) return pcs_attribs[self.primary_controller_fqdn][ 'resources_running'] == self.slave_node_running_resources