Change the parameter

Change giving to method (parse_pcs_status_xml)
parameter from remote to ip address

Change-Id: Idda3a5912445b4fb46dee69a2ee166284462db8f
Closes-bug: #1570943
This commit is contained in:
Egor Kotko 2016-05-05 18:46:21 +02:00
parent bacf0c2f9c
commit cd328ac3e0
1 changed files with 16 additions and 4 deletions

View File

@ -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