Provider Resource Attributes forced to string type
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Heat |
Fix Released
|
Medium
|
Tomas Sedovic |
Bug Description
Provider Resources seem to be unable to return anything other than strings. Even lists and Maps (JSON) are converted to strings and cannot be passed to other resources as those types.
In Provider resource (template):
...
outputs:
network_list: [ { network: public } ]
In Provider consumer (template):
provider:
type: My::Provider
properties: ...
server:
type: OS::Nova::Server
properties:
networks: { get_attr [ provider, network_list ] }
This leads to the following error in heat-engine.log:
[-] CREATE : Server "server" Stack "test" [1597403e-
2014-03-26 12:17:32.239 7092 TRACE heat.engine.
2014-03-26 12:17:32.239 7092 TRACE heat.engine.
2014-03-26 12:17:32.239 7092 TRACE heat.engine.
2014-03-26 12:17:32.239 7092 TRACE heat.engine.
2014-03-26 12:17:32.239 7092 TRACE heat.engine.
2014-03-26 12:17:32.239 7092 TRACE heat.engine.
I have also tried this (ouputting a map and wrapping in list when used):
In Provider resource (template):
...
outputs:
network_obj: { network: public }
In Provider consumer (template):
provider:
type: My::Provider
properties: ...
server:
type: OS::Nova::Server
properties:
networks: [ { get_attr [ provider, network_obj ] } ]
This leads to the following error:
2014-03-26 12:22:41.107 7092 ERROR heat.engine.
2014-03-26 12:22:41.107 7092 TRACE heat.engine.
2014-03-26 12:22:41.107 7092 TRACE heat.engine.
2014-03-26 12:22:41.107 7092 TRACE heat.engine.
2014-03-26 12:22:41.107 7092 TRACE heat.engine.
2014-03-26 12:22:41.107 7092 TRACE heat.engine.
2014-03-26 12:22:41.107 7092 TRACE heat.engine.
Lastly, I tried to encapsulate the list in a map and returning the map and dereferencing:
In Provider resource (template):
...
outputs:
network_list_obj: { list: [ { network: public } ] }
In Provider consumer (template):
provider:
type: My::Provider
properties: ...
server:
type: OS::Nova::Server
properties:
networks: { get_attr [ provider, network_list_obj, list ] }
This leads to this error (which I don't understand, TBH):
2014-03-26 12:27:23.745 7092 ERROR heat.engine.
2014-03-26 12:27:23.745 7092 TRACE heat.engine.
2014-03-26 12:27:23.745 7092 TRACE heat.engine.
2014-03-26 12:27:23.745 7092 TRACE heat.engine.
2014-03-26 12:27:23.745 7092 TRACE heat.engine.
2014-03-26 12:27:23.745 7092 TRACE heat.engine.
2014-03-26 12:27:23.745 7092 TRACE heat.engine.
2014-03-26 12:27:23.745 7092 TRACE heat.engine.
2014-03-26 12:27:23.745 7092 TRACE heat.engine.
2014-03-26 12:27:23.745 7092 TRACE heat.engine.
2014-03-26 12:27:23.745 7092 TRACE heat.engine.
2014-03-26 12:27:23.745 7092 TRACE heat.engine.
2014-03-26 12:27:23.745 7092 TRACE heat.engine.
2014-03-26 12:27:23.745 7092 TRACE heat.engine.
2014-03-26 12:27:23.745 7092 TRACE heat.engine.
2014-03-26 12:27:23.745 7092 TRACE heat.engine.
2014-03-26 12:27:23.745 7092 TRACE heat.engine.
2014-03-26 12:27:23.745 7092 TRACE heat.engine.
2014-03-26 12:27:23.745 7092 TRACE heat.engine.
2014-03-26 12:27:23.745 7092 TRACE heat.engine.
2014-03-26 12:27:23.745 7092 TRACE heat.engine.
I would expect that any attribute/output should be recognized for a valid type (string, number, json/map, list, etc.)
Changed in heat: | |
status: | New → Triaged |
importance: | Undecided → Medium |
Changed in heat: | |
assignee: | nobody → Steven Hardy (shardy) |
Changed in heat: | |
assignee: | Steven Hardy (shardy) → nobody |
Changed in heat: | |
milestone: | none → juno-3 |
Changed in heat: | |
assignee: | nobody → Tomas Sedovic (tsedovic) |
Changed in heat: | |
milestone: | juno-3 → juno-2 |
Changed in heat: | |
status: | Fix Committed → Fix Released |
Changed in heat: | |
milestone: | juno-2 → 2014.2 |
Fix proposed to branch: master /review. openstack. org/107621
Review: https:/