Fix getting stack ip for heatclient > 1.5.1
heatclient with verstion <=1.5.1 returns value in '""' when calling
'heat output-show' while newer versions returns value without '""'
Use 'openstack stack output show' instead which produce the same output
for all heatclient versions.
Change-Id: I15677826d89b7db28268bf075e644ae20785836b
diff --git a/src/com/mirantis/mk/Openstack.groovy b/src/com/mirantis/mk/Openstack.groovy
index 8236ff3..fdaf014 100644
--- a/src/com/mirantis/mk/Openstack.groovy
+++ b/src/com/mirantis/mk/Openstack.groovy
@@ -264,10 +264,10 @@
* @param path Optional path to the custom virtualenv
*/
def getHeatStackOutputParam(env, name, outputParam, path = null) {
- cmd = "heat output-show ${name} ${outputParam}"
+ cmd = "openstack stack output show ${name} ${outputParam} -f value -c output_value"
output = runOpenstackCommand(cmd, env, path)
echo("${cmd}: ${output}")
- return "${output}".substring(1, output.length()-1)
+ return "${output}"
}
/**