summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorTim Rozet <trozet@redhat.com>2016-06-30 21:51:13 +0000
committerGerrit Code Review <gerrit@172.30.200.206>2016-06-30 21:51:13 +0000
commit0b91edabf51d60968a20d605dd2b97f03283e06b (patch)
tree3bccbebfab1d562c71c3943a453f9f5ea1f444db /build
parent0d871d7ddce398bdfe0f18af5e2e1db4a6ac7b81 (diff)
parentd47d4a5ef7c78c3ca84450a2164ec63a5697e110 (diff)
Merge "Fixes nic template rendering"
Diffstat (limited to 'build')
-rw-r--r--build/nics-template.yaml.jinja221
1 files changed, 16 insertions, 5 deletions
diff --git a/build/nics-template.yaml.jinja2 b/build/nics-template.yaml.jinja2
index 1c51ab7f..455ae0f3 100644
--- a/build/nics-template.yaml.jinja2
+++ b/build/nics-template.yaml.jinja2
@@ -85,7 +85,7 @@ resources:
os_net_config:
network_config:
-
- {%- if vlans['private_network'] != 'native' or vlans['storage_network'] != 'native' or vlans['api_network'] != 'native' %}
+ {%- if vlans['private_network'] is number or vlans['storage_network'] is number or vlans['api_network'] is number %}
type: ovs_bridge
name: {get_input: bridge_name}
members:
@@ -94,7 +94,7 @@ resources:
name: nic1
# force the MAC address of the bridge to this interface
primary: true
- {%- if 'public_network' in enabled_networks and vlans['private_network'] != 'native' %}
+ {%- if 'public_network' in enabled_networks and vlans['private_network'] is number %}
-
type: vlan
vlan_id: {get_param: ExternalNetworkVlanID}
@@ -106,7 +106,7 @@ resources:
default: true
next_hop: {get_param: ExternalInterfaceDefaultRoute}
{%- endif %}
- {%- if 'private_network' in enabled_networks and vlans['private_network'] != 'native' %}
+ {%- if 'private_network' in enabled_networks and vlans['private_network'] is number %}
-
type: vlan
vlan_id: {get_param: TenantNetworkVlanID}
@@ -114,7 +114,7 @@ resources:
-
ip_netmask: {get_param: TenantIpSubnet}
{%- endif %}
- {%- if 'storage_network' in enabled_networks and vlans['storage_network'] != 'native' %}
+ {%- if 'storage_network' in enabled_networks and vlans['storage_network'] is number %}
-
type: vlan
vlan_id: {get_param: StorageNetworkVlanID}
@@ -122,7 +122,7 @@ resources:
-
ip_netmask: {get_param: StorageIpSubnet}
{%- endif %}
- {%- if 'api_network' in enabled_networks and vlans['api_network'] != 'native' %}
+ {%- if 'api_network' in enabled_networks and vlans['api_network'] is number %}
-
type: vlan
vlan_id: {get_param: InternalApiNetworkVlanID}
@@ -212,6 +212,17 @@ resources:
name: nic{{ nic_index }}{% set nic_index = nic_index + 1 %}
# force the MAC address of the bridge to this interface
primary: true
+ {%- if role == 'controller' %}
+ dns_servers: {get_param: DnsServers}
+ addresses:
+ -
+ ip_netmask: {get_param: ExternalIpSubnet}
+ routes:
+ -
+ default: true
+ ip_netmask: 0.0.0.0/0
+ next_hop: {get_param: ExternalInterfaceDefaultRoute}
+ {%- endif %}
{%- endif %}
{%- if 'storage_network' in enabled_networks and vlans['storage_network'] == 'native' %}
-