CommaDelimitedList in $heat_outputs_path is not a list

Bug #1508859 reported by Long Quan Sha
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
Triaged
Medium
Oleksii Chuprykov

Bug Description

In my stack, I used a OS::Heat::SoftwareConfig and OS::Heat::SoftwareDeployment, I'd like to get a output with LIST format from deployement,

 config:
    type: OS::Heat::SoftwareConfig
    properties:
      config: |
        #!/bin/bash
        echo -n "c15eaa6f-d08b-412e-a2b9-1c9173e6c0dd," >>$heat_outputs_path.port_list
        echo -n "c15eaa6f-d08b-412e-a2b9-1c9173e6c0dd," >>$heat_outputs_path.port_list
      group: script
      outputs:
        - {name: port_list, type: CommaDelimitedList}

 do_config:
    type: OS::Heat::SoftwareDeployment
    properties:
      signal_transport: HEAT_SIGNAL
      config: {get_resource: api_config}
      server: {get_param: server_id}

Then I need to pass the LIST output to my resource,
 update_port:
     type: SHA::POST::Ports
     properties:
       port_list: {get_attr: [do_config, port_list]}

But I got an error:

| stack_status | CREATE_FAILED |
| stack_status_reason | Resource CREATE failed: StackValidationFailed: |
| | resources.update_port: Property error: |
| | update_port.Properties.port_list: "u'"c15eaa6f-d08b- |
| | 412e-a2b9-1c9173e6c0dd","c15eaa6f-d08b-412e- |
| | a2b9-1c9173e6c0dd",'" is not a list

am I wrong using CommaDelimitedList in $heat_outputs_path ? I output a comma delimited list in $heat_outputs_path, but it is not a LIST, can not be used as a LIST parameter for other resource.

Revision history for this message
Long Quan Sha (shalq) wrote :

sorry, the config is :

config:
    type: OS::Heat::SoftwareConfig
    properties:
      config: |
        #!/bin/bash
        echo -n "c15eaa6f-d08b-412e-a2b9-1c9173e6c0dd," >>${heat_outputs_path}.port_list
        echo -n "c15eaa6f-d08b-412e-a2b9-1c9173e6c0dd," >>$h{eat_outputs_path}.port_list
      group: script
      outputs:
        - {name: port_list, type: CommaDelimitedList}

description: updated
Revision history for this message
Peter Razumovsky (prazumovsky) wrote :

What is the type of port_list property in SHA::POST::Ports?

Changed in heat:
assignee: nobody → Peter Razumovsky (prazumovsky)
Changed in heat:
importance: Undecided → Low
Revision history for this message
Sergey Kraynev (skraynev) wrote :

Need get feedback from Steve Baker about this behavior.

Changed in heat:
status: New → Triaged
milestone: none → mitaka-1
importance: Low → High
Revision history for this message
Long Quan Sha (shalq) wrote :

        PORT_LIST: properties.Schema(
            properties.Schema.LIST,
            _('ID list of existing ports.'),
            update_allowed=True,
        ),

Changed in heat:
milestone: mitaka-1 → mitaka-2
Changed in heat:
assignee: Peter Razumovsky (prazumovsky) → Oleksii Chuprykov (ochuprykov)
Changed in heat:
milestone: mitaka-2 → mitaka-3
Changed in heat:
milestone: mitaka-3 → mitaka-rc1
Changed in heat:
importance: High → Medium
Revision history for this message
Steve Baker (steve-stevebaker) wrote :

The initial intention of the output type was that heat does no processing when it receives output values from a signal - its just a hint supplied to the hook.

However parsing the outputs based on type sounds like a reasonable enhancement. But RC1 is close so if it is not going to be proposed soon then please set the Milestone to next

Changed in heat:
milestone: mitaka-rc1 → newton-1
Thomas Herve (therve)
Changed in heat:
milestone: newton-1 → ongoing
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.