It's not possible to get network address via network id from server networks attribute

Bug #1441480 reported by Ethan Lynn
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
Medium
Ethan Lynn

Bug Description

If I using following template.

heat_template_version: 2013-05-23
parameters:
  network:
    type: string
resources:
  server:
    type: OS::Nova::Server
    properties:
      image: cirros-0.3.2-x86_64-uec
      flavor: m1.nano
      networks:
        - network: {get_param: network}
outputs:
  server_ip:
    value: {get_attr: [server, networks, {get_param: network}, 0]}

If user pass a network_id as parameter, then I can not get server_ip as output.
Is it ok to both return network_name and network_id in networks attribute?
like
{
  "7076e273-708e-4133-9b76-3e8e69504ded": [
    "10.0.0.3"
  ],
  "private": [
    "10.0.0.3"
  ]
}

Ethan Lynn (ethanlynn)
Changed in heat:
assignee: nobody → Ethan Lynn (ethanlynn)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to heat (master)

Fix proposed to branch: master
Review: https://review.openstack.org/171534

Changed in heat:
status: New → In Progress
tags: added: kilo-backport-potential
Changed in heat:
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (master)

Reviewed: https://review.openstack.org/171534
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=63fb9dba7690d0b30f6a3bc60be63849100519e1
Submitter: Jenkins
Branch: master

commit 63fb9dba7690d0b30f6a3bc60be63849100519e1
Author: Ethan Lynn <email address hidden>
Date: Wed Apr 8 17:23:14 2015 +0800

    Add network uuid to server networks attribute

    This patch will change server networks attribute to return both
    network name and network id, so that we can use
    {get_attr: [server, networks, {get_param: net_uuid}, 0]} to get
    server IP.

    Closes-Bug: #1441480
    Change-Id: I162248ba4993ca5e55c8d8f015c8252c08cc9b8c

Changed in heat:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in heat:
milestone: none → liberty-1
status: Fix Committed → Fix Released
Angus Salkeld (asalkeld)
tags: removed: kilo-backport-potential
Thierry Carrez (ttx)
Changed in heat:
milestone: liberty-1 → 5.0.0
Thomas Herve (therve)
no longer affects: heat/kilo
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.