From 711f7ef711772fd5aaafe4f2bb37d9351c3dd5d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Harald=20Jens=C3=A5s?= Date: Mon, 17 Sep 2018 17:29:30 +0200 Subject: [PATCH] Add host_routes to port_from_pool.j2 Add the host_routes as output of the fake neutron ports created by legacy predictable IPs templates. Closes-Bug: #1792968 Change-Id: Ie330635fa551d8406a1bf082c89f7c58d82088d6 --- network/ports/port_from_pool.j2 | 3 +++ .../fix-port-from-pool-host-routes-7fcc4d00cb11603d.yaml | 8 ++++++++ 2 files changed, 11 insertions(+) create mode 100644 releasenotes/notes/fix-port-from-pool-host-routes-7fcc4d00cb11603d.yaml diff --git a/network/ports/port_from_pool.j2 b/network/ports/port_from_pool.j2 index 1fa2f97a29..588315b834 100644 --- a/network/ports/port_from_pool.j2 +++ b/network/ports/port_from_pool.j2 @@ -78,4 +78,7 @@ outputs: - - {get_param: [IPPool, {get_param: {{network.name}}NetName}, {get_param: NodeIndex}]} - '/' - {str_split: ['/', {get_param: {{network.name}}NetCidr}, 1]} + host_routes: + description: Host routes of the ports subnet + value: {{network.routes|default([])}} diff --git a/releasenotes/notes/fix-port-from-pool-host-routes-7fcc4d00cb11603d.yaml b/releasenotes/notes/fix-port-from-pool-host-routes-7fcc4d00cb11603d.yaml new file mode 100644 index 0000000000..bd2bc69599 --- /dev/null +++ b/releasenotes/notes/fix-port-from-pool-host-routes-7fcc4d00cb11603d.yaml @@ -0,0 +1,8 @@ +--- +fixes: + - | + Fixes an issue in the legacy port_from_pool templates for predictable IP + addressing. Prior to this fix using these tamplates would fail with the + following error: **Referenced Attribute (%network_name%%Port host_routes) + is incorrect.** (Bug: `1792968 + `_.)