0

如何使用 Heat Rest Api 获取输出数据。

例如。

heat output-show <stack-name> <keyword-name>

我想使用rest api来获取这个..

4

1 回答 1

0

不知何故,我设法使用rest api来查询这个-

ks_client = Keystone_Client(**cred)
heat_endpoint = ks_client.service_catalog.url_for(service_type='orchestration', endpoint_type='publicURL')
heatclient = Heat_Client('1', heat_endpoint, token=ks_client.auth_token)
output = heatclient.stacks.get(stack_id='08615c01-86cc-4843-acec-d43126081241')

现在输出是我的堆栈的元数据,它是字典类型。获取栈的输出值。

print(output[0]['output_value'])
于 2016-08-04T07:54:07.483 回答