Change path for astute.yaml

As astute.yaml splits for 2 parts, rename file in tests accordingly.

Change-Id: If7c6f26fe2a1835b2e0824b8a9cba261fddd709c
Related-Bug: #1660308
This commit is contained in:
Stanislaw Bogatkin 2017-01-30 15:46:37 +03:00
parent d4bd269aae
commit 62ec18011f
1 changed files with 8 additions and 2 deletions

View File

@ -2773,8 +2773,14 @@ class FuelWebClient29(object):
def get_nailgun_primary_node(self, slave, role='primary-controller'):
# returns controller or mongo that is primary in nailgun
with self.get_ssh_for_node(slave.name) as remote:
with remote.open('/etc/astute.yaml') as f:
data = yaml.safe_load(f)
try:
with remote.open('/etc/hiera/cluster.yaml') as f:
data = yaml.safe_load(f)
# TODO(sbog): remove check for astute.yaml open as LP1660308
# for fuel-library will be merged.
except IOError:
with remote.open('/etc/astute.yaml') as f:
data = yaml.safe_load(f)
nodes = data['network_metadata']['nodes']
node_name = [node['fqdn'] for node in nodes.values()
if role in node['node_roles']][0]