- "sudo salt --out yaml 'ctl*' pillar.get _param:openstack_control_address | \
- awk '{print \$2; exit}'") &> /dev/null
+ "sudo salt 'cfg*' pillar.get _param:openstack_control_address --out text| \
+ cut -f2 -d' '")
+ ipmi_index=$(ssh 2>/dev/null ${fuel_ctl_ssh_options} "${ssh_user}@${INSTALLER_IP}" \
+ "sudo salt 'ctl*' network.ip_addrs cidr=${fuel_ctl_ip} --out text | grep ${fuel_ctl_ip} | cut -c 5")
+ organization="$(cut -d'-' -f1 <<< "${NODE_NAME}")"
+ pod_name="$(cut -d'-' -f2 <<< "${NODE_NAME}")"
+ pdf_file=${pharos_repo}/labs/${organization}/${pod_name}.yaml
+ ipmiIp=$(cat ${pdf_file} | shyaml get-value nodes.$[ipmi_index-1].remote_management.address)
+ ipmiIp="$(cut -d'/' -f1 <<< "${ipmiIp}")"
+ ipmiPass=$(cat ${pdf_file} | shyaml get-value nodes.$[ipmi_index-1].remote_management.pass)
+ ipmiUser=$(cat ${pdf_file} | shyaml get-value nodes.$[ipmi_index-1].remote_management.user)
+ [[ $ipmiUser == ENC* ]] && ipmiUser=$(eyaml decrypt -s ${ipmiUser//[[:blank:]]/})
+ [[ $ipmiPass == ENC* ]] && ipmiPass=$(eyaml decrypt -s ${ipmiPass//[[:blank:]]/})
+