Merge "host_routes using get_attr (Composable Networks)"

This commit is contained in:
Zuul 2018-08-14 19:40:25 +00:00 committed by Gerrit Code Review
commit 69c0bd6a8b
2 changed files with 27 additions and 0 deletions

View File

@ -267,6 +267,16 @@ parameters:
If not set the nameservers configured in the ctlplane subnet's
dns_nameservers attribute will be used.
type: comma_delimited_list
{%- for network in networks %}
{{network.name}}InterfaceRoutes:
default: []
description: >
Routes for the {{network.name_lower}} network traffic.
JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}]
Unless the default is changed, the parameter is automatically resolved
from the subnet host_routes attribute.
type: json
{%- endfor %}
ServerDeletionPolicy:
description: Whether to retain or delete servers on deletion of the stack
@ -337,6 +347,11 @@ conditions:
equals:
- {get_param: [{{role.name}}IPs, '{{network.name_lower}}', {get_param: NodeIndex}]}
- ''
{{network.name_lower}}_interface_routes_set:
not:
equals:
- {get_param: {{network.name}}InterfaceRoutes}
- []
{%- endfor %}
ctlplane_subnet_cidr_set:
not:
@ -512,6 +527,11 @@ resources:
{%- for network in networks %}
{{network.name}}IpSubnet: {get_attr: [{{network.name}}Port, ip_subnet]}
{{network.name}}InterfaceRoutes:
if:
- {{network.name_lower}}_interface_routes_set
- {get_param: {{network.name}}InterfaceRoutes}
- {get_attr: [{{network.name}}Port, host_routes]}
{%- endfor %}
NetIpMap:

View File

@ -0,0 +1,7 @@
---
features:
- |
Routes specified in the ``host_routes`` attribute of neutron subnets is
passed to ``{{network.name}}InterfaceRoutes`` in network templates. (The
routes in neutron subnet's ``host_routes`` can be configured by setting the
``routes`` field in ``network_data.yaml``.)