Enable back auto for ports network script
[fuel.git] / mcp / reclass / classes / cluster / mcp-odl-noha / openstack / compute.yml.j2
index 65792e3..5d8d26a 100644 (file)
@@ -6,11 +6,13 @@
 # http://www.apache.org/licenses/LICENSE-2.0
 ##############################################################################
 {%- import 'net_map.j2' as nm with context %}
+{%- import 'net_macros.j2' as ma with context %}
+{%- set vlan_private_start = (nm.vlan_private | string).rsplit('-')[0] %}
 ---
 classes:
   - service.neutron.compute.single
   - service.neutron.compute.opendaylight.single
-{%- if conf.MCP_DPDK_MODE %}
+{%- if '-ovs-' in conf.MCP_DEPLOY_SCENARIO %}
   - system.nova.compute.nfv.hugepages
   - system.neutron.compute.nfv.dpdk
 {%- endif %}
@@ -19,8 +21,9 @@ classes:
 parameters:
   linux:
     network:
+      ovs_nowait: false
       interface:
-{%- if conf.MCP_DPDK_MODE %}
+{%- if '-ovs-' in conf.MCP_DEPLOY_SCENARIO %}
         dpdk0:
           name: ${_param:dpdk0_name}
           pci: ${_param:dpdk0_pci}
@@ -29,14 +32,45 @@ parameters:
           bridge: br-prv
           type: dpdk_ovs_port
           n_rxq: ${_param:dpdk0_n_rxq}
+          mtu: ${_param:interface_mtu}
         br-prv:
           enabled: true
           type: dpdk_ovs_bridge
           proto: static
           address: ${_param:tenant_address}
           netmask: ${_param:opnfv_net_private_mask}
-        tenant_interface:
+        {{ nm.cmp001.nic_private }}:
           type: dpdk  # Not a meaningful type, just match 'dpdk' for filtering
+        {{ nm.cmp001.nic_public }}:
+          enabled: true
+          type: eth
+          mtu: ${_param:interface_mtu}
+          proto: manual
+        br-floating:
+          enabled: true
+          type: ovs_bridge
+          datapath_type: netdev
+          use_interfaces:
+            - float-to-ex
+        float-to-ex:
+          enabled: true
+          type: ovs_port
+          mtu: ${_param:interface_mtu}
+          bridge: br-floating
+          ovs_bridge: br-floating
+          noifupdown: true
+        br-ex:
+          enabled: true
+          type: bridge
+          address: ${_param:external_address}
+          netmask: ${_param:opnfv_net_public_mask}
+          use_interfaces:
+            - {{ ma.interface_str(nm.cmp001.nic_public, nm.vlan_public) }}
+          use_ovs_ports:
+            - float-to-ex
+          gateway: ${_param:opnfv_net_public_gw}
+          name_servers: {{ nm.dns_public }}
+          noifupdown: true
 {%- else %}
         br-mesh:
           enabled: true
@@ -45,11 +79,11 @@ parameters:
           address: ${_param:tenant_address}
           netmask: ${_param:opnfv_net_private_mask}
           use_interfaces:
-            - ${_param:tenant_interface}
-{%- endif %}
-        external_interface:
+            - {{ ma.interface_str(nm.cmp001.nic_private, vlan_private_start) }}
+        ovs_port_{{ nm.cmp001.nic_public }}:
           enabled: true
-          name: ${_param:external_interface}
+          name: {{ ma.interface_str(nm.cmp001.nic_public, nm.vlan_public) }}
+          mtu: ${_param:interface_mtu}
           proto: manual
           ovs_port_type: OVSPort
           type: ovs_port
@@ -58,11 +92,12 @@ parameters:
         br-floating:
           enabled: true
           type: ovs_bridge
-          mtu: ${_param:interface_mtu}
           proto: static
           address: ${_param:external_address}
           netmask: ${_param:opnfv_net_public_mask}
           use_interfaces:
-            - ${_param:external_interface}
+            - {{ ma.interface_str(nm.cmp001.nic_public, nm.vlan_public) }}
           gateway: ${_param:opnfv_net_public_gw}
           name_servers: {{ nm.dns_public }}
+          noifupdown: true
+{%- endif %}