summaryrefslogtreecommitdiffstats
path: root/deploy/adapters/ansible/roles/config-compute
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-compute
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-compute')
-rw-r--r--deploy/adapters/ansible/roles/config-compute/templates/compute.j224
1 files changed, 12 insertions, 12 deletions
diff --git a/deploy/adapters/ansible/roles/config-compute/templates/compute.j2 b/deploy/adapters/ansible/roles/config-compute/templates/compute.j2
index c53708ec..b23550f9 100644
--- a/deploy/adapters/ansible/roles/config-compute/templates/compute.j2
+++ b/deploy/adapters/ansible/roles/config-compute/templates/compute.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 = compu_sys_mappings["external"]["interface"] %}
+{% if compu_sys_mappings["external"]["vlan_tag"] | int %}
+{% set intf_external = intf_external + '.' + compu_sys_mappings["external"]["vlan_tag"]|string %}
{% endif %}
auto {{ intf_external }}
iface {{ intf_external }} inet manual
-{% if sys_intf_mappings["external"]["vlan_tag"] != "None" %}
+{% if compu_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 = compu_sys_mappings["tenant"]["interface"] %}
+{% if compu_sys_mappings["tenant"]["vlan_tag"] | int %}
+{% set intf_tenant = intf_tenant + '.' + compu_sys_mappings["tenant"]["vlan_tag"]|string %}
{% endif %}
auto {{ intf_tenant }}
iface {{ intf_tenant }} inet manual
-{% if sys_intf_mappings["tenant"]["interface"] != "None" %}
+{% if compu_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 = compu_sys_mappings["storage"]["interface"] %}
+{% if compu_sys_mappings["storage"]["vlan_tag"] | int %}
+{% set intf_storage = intf_storage + '.' + compu_sys_mappings["storage"]["vlan_tag"]|string %}
{% endif %}
auto {{ intf_storage }}
iface {{ intf_storage }} inet manual
-{% if sys_intf_mappings["storage"]["interface"] != "None" %}
+{% if compu_sys_mappings["storage"]["vlan_tag"] | int %}
vlan-raw-device {{ intf_storage }}
{% endif %}