summaryrefslogtreecommitdiffstats
path: root/deploy/adapters/ansible/roles/config-controller/templates/controller.j2
diff options
context:
space:
mode:
authorHarry Huang <huangxiangyu5@huawei.com>2017-08-23 15:05:02 +0800
committerHarry Huang <huangxiangyu5@huawei.com>2017-09-01 16:31:01 +0800
commit3bc3a8828c3ceefedd08e1767ae6e3bf2df9ac22 (patch)
tree7413e99b2d9ddbadc782a5e9f68a6f1ba35570b1 /deploy/adapters/ansible/roles/config-controller/templates/controller.j2
parent292985dab007c3ee1c3481c985871a3483d9f7bc (diff)
Support multiple physnet mapping
JIRA: COMPASS-559 1. support multiple mapping in provider_net_mappings of network.yml and create corresponding ovs bridges 2. support seperate config in sys_intf_mappings of network.yml 3. remove linux bridges in compute nodes for ovs port binding convenience 4. support openstack vlan tenant network 5. modify odl and odl_sfc roles to use configurable provider mapping 6. remove some hard coding Change-Id: Ib57484ce60d029f89c647fd5baf2c7af37c85d0b Signed-off-by: Harry Huang <huangxiangyu5@huawei.com>
Diffstat (limited to 'deploy/adapters/ansible/roles/config-controller/templates/controller.j2')
-rwxr-xr-xdeploy/adapters/ansible/roles/config-controller/templates/controller.j224
1 files changed, 12 insertions, 12 deletions
diff --git a/deploy/adapters/ansible/roles/config-controller/templates/controller.j2 b/deploy/adapters/ansible/roles/config-controller/templates/controller.j2
index 2aeb9a04..4e444eca 100755
--- a/deploy/adapters/ansible/roles/config-controller/templates/controller.j2
+++ b/deploy/adapters/ansible/roles/config-controller/templates/controller.j2
@@ -10,35 +10,35 @@ auto eth0
iface eth0 inet manual
# external interface
-{% set intf_external = sys_intf_mappings["external"]["interface"] %}
-{% if sys_intf_mappings["external"]["vlan_tag"] != "None" %}
-{% set intf_external = intf_external + '.' + sys_intf_mappings["external"]["vlan_tag"]|string %}
+{% set intf_external = contr_sys_mappings["external"]["interface"] %}
+{% if contr_sys_mappings["external"]["vlan_tag"] | int %}
+{% set intf_external = intf_external + '.' + contr_sys_mappings["external"]["vlan_tag"]|string %}
{% endif %}
auto {{ intf_external }}
iface {{ intf_external }} inet manual
-{% if sys_intf_mappings["external"]["vlan_tag"] != "None" %}
+{% if contr_sys_mappings["external"]["vlan_tag"] | int %}
vlan-raw-device {{ intf_external }}
{% endif %}
# tenant interface
-{% set intf_tenant = sys_intf_mappings["tenant"]["interface"] %}
-{% if sys_intf_mappings["tenant"]["interface"] != "None" %}
-{% set intf_tenant = intf_tenant + '.' + sys_intf_mappings["tenant"]["vlan_tag"]|string %}
+{% set intf_tenant = contr_sys_mappings["tenant"]["interface"] %}
+{% if contr_sys_mappings["tenant"]["vlan_tag"] | int %}
+{% set intf_tenant = intf_tenant + '.' + contr_sys_mappings["tenant"]["vlan_tag"]|string %}
{% endif %}
auto {{ intf_tenant }}
iface {{ intf_tenant }} inet manual
-{% if sys_intf_mappings["tenant"]["interface"] != "None" %}
+{% if contr_sys_mappings["tenant"]["vlan_tag"] | int %}
vlan-raw-device {{ intf_tenant }}
{% endif %}
# storage interface
-{% set intf_storage = sys_intf_mappings["storage"]["interface"] %}
-{% if sys_intf_mappings["storage"]["interface"] != "None" %}
-{% set intf_storage = intf_storage + '.' + sys_intf_mappings["storage"]["vlan_tag"]|string %}
+{% set intf_storage = contr_sys_mappings["storage"]["interface"] %}
+{% if contr_sys_mappings["storage"]["vlan_tag"] | int %}
+{% set intf_storage = intf_storage + '.' + contr_sys_mappings["storage"]["vlan_tag"]|string %}
{% endif %}
auto {{ intf_storage }}
iface {{ intf_storage }} inet manual
-{% if sys_intf_mappings["storage"]["interface"] != "None" %}
+{% if contr_sys_mappings["storage"]["vlan_tag"] | int %}
vlan-raw-device {{ intf_storage }}
{% endif %}