From f0bc5e460a47b247feb4c47a0a685bdcd99bbf9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Harald=20Jens=C3=A5s?= Date: Tue, 3 Jul 2018 13:33:30 +0200 Subject: [PATCH] Add subnet host_routes to output of OS::TripleO::*::Ports::Port Adds the host_routes on the neutron ports subnet to the output of the Tripleo Ports template. This will allow use of get_attr in the role to pass routes for a subnet to NetworkConfig. Partial: blueprint tripleo-routed-networks-templates Change-Id: I46896153ea59ae0a6a8dff0208de2b0d168927ae --- network/ports/ctlplane_vip.yaml | 4 ++++ network/ports/noop.yaml | 3 +++ network/ports/port.j2 | 5 ++++- network/ports/vip.yaml | 4 ++++ network/ports/vip_v6.yaml | 4 ++++ .../os-tripleo-ports-output-hostroutes-3c710bd9f5641101.yaml | 5 +++++ 6 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 releasenotes/notes/os-tripleo-ports-output-hostroutes-3c710bd9f5641101.yaml diff --git a/network/ports/ctlplane_vip.yaml b/network/ports/ctlplane_vip.yaml index 8290f556ee..51934104f8 100644 --- a/network/ports/ctlplane_vip.yaml +++ b/network/ports/ctlplane_vip.yaml @@ -70,3 +70,7 @@ outputs: - - {get_attr: [VipPort, fixed_ips, 0, ip_address]} - '/' - {str_split: ['/', {get_attr: [VipPort, subnets, 0, cidr]}, 1]} + host_routes: + description: Host routes of the ports subnet + value: + get_attr: [VipPort, subnets, 0, host_routes] diff --git a/network/ports/noop.yaml b/network/ports/noop.yaml index 8d63101458..c9569f5362 100644 --- a/network/ports/noop.yaml +++ b/network/ports/noop.yaml @@ -61,3 +61,6 @@ outputs: - - {get_param: ControlPlaneIP} - '/' - {get_param: ControlPlaneSubnetCidr} + host_routes: # Here for compatibility + description: Host routes of the ports subnet + value: [] diff --git a/network/ports/port.j2 b/network/ports/port.j2 index 9723daa6e2..079646d95f 100644 --- a/network/ports/port.j2 +++ b/network/ports/port.j2 @@ -91,4 +91,7 @@ outputs: - - {get_attr: [{{network.name}}Port, fixed_ips, 0, ip_address]} - '/' - {str_split: ['/', {get_attr: [{{network.name}}Port, subnets, 0, cidr]}, 1]} - + host_routes: + description: Host routes of the ports subnet + value: + get_attr: [{{network.name}}Port, subnets, 0, host_routes] diff --git a/network/ports/vip.yaml b/network/ports/vip.yaml index 71e0fe28ae..0b29ac22a6 100644 --- a/network/ports/vip.yaml +++ b/network/ports/vip.yaml @@ -78,3 +78,7 @@ outputs: - - {get_attr: [VipPort, fixed_ips, 0, ip_address]} - '/' - {str_split: ['/', {get_attr: [VipPort, subnets, 0, cidr]}, 1]} + host_routes: + description: Host routes of the ports subnet + value: + get_attr: [VipPort, subnets, 0, host_routes] diff --git a/network/ports/vip_v6.yaml b/network/ports/vip_v6.yaml index 8c97df530d..a6042c6fee 100644 --- a/network/ports/vip_v6.yaml +++ b/network/ports/vip_v6.yaml @@ -83,3 +83,7 @@ outputs: - - {get_attr: [VipPort, fixed_ips, 0, ip_address]} - '/' - {str_split: ['/', {get_attr: [VipPort, subnets, 0, cidr]}, 1]} + host_routes: + description: Host routes of the ports subnet + value: + get_attr: [VipPort, subnets, 0, host_routes] diff --git a/releasenotes/notes/os-tripleo-ports-output-hostroutes-3c710bd9f5641101.yaml b/releasenotes/notes/os-tripleo-ports-output-hostroutes-3c710bd9f5641101.yaml new file mode 100644 index 0000000000..e450775986 --- /dev/null +++ b/releasenotes/notes/os-tripleo-ports-output-hostroutes-3c710bd9f5641101.yaml @@ -0,0 +1,5 @@ +--- +features: + - | + Adds ``host_routes`` of the ports neutron subnet to output of + ``OS::TripleO::{{role.name}}::Ports::{{network.name}}Port`` resources.