Allow to set address-related parameters in interface arguments
There is a fixed list of allowed parameters that can be set
as interface parameters to override the values from cluster model.
List of allowed parameters can be found in the file:
{# roles #}/_linux_network_interface
Example for single_address, control_network_netmask and control_vlan:
kvm01.mcp11-ovs-dpdk.local:
reclass_storage_name: infra_kvm_node01
roles:
- infra_kvm
- linux_system_codename_xenial
interfaces:
ens3:
role: single_dhcp
ens4:
role: single_vlan_ctl
single_address: 1.2.3.4
control_network_netmask: 255.255.252.0
control_vlan: 1234
Change-Id: I52f1250a3af510275d7741a1717a04be348778b8
diff --git "a/\173\043 interfaces \043\175/bond0_ab_contrail" "b/\173\043 interfaces \043\175/bond0_ab_contrail"
index 8de76d6..df44060 100644
--- "a/\173\043 interfaces \043\175/bond0_ab_contrail"
+++ "b/\173\043 interfaces \043\175/bond0_ab_contrail"
@@ -4,9 +4,8 @@
{#- Requirements: #}
{#- _param:tenant_vlan #}
{#- _param:tenant_address #}
-{#- _param:tenant_netmask #}
+{#- _param:tenant_network_netmask #}
{#- _param:tenant_network_gateway #}
-
# {{ interfaces_role }}
{%- for interface_name, interface in interfaces.items() %}
{{ interface_name }}:
@@ -60,4 +59,4 @@
use_interfaces:
- bond0
require_interfaces:
- - bond0
+ - bond0
\ No newline at end of file
diff --git "a/\173\043 interfaces \043\175/bond0_ab_ctl_contrail" "b/\173\043 interfaces \043\175/bond0_ab_ctl_contrail"
index dfee7cd..d555010 100644
--- "a/\173\043 interfaces \043\175/bond0_ab_ctl_contrail"
+++ "b/\173\043 interfaces \043\175/bond0_ab_ctl_contrail"
@@ -7,11 +7,10 @@
{#- _param:control_network_netmask #}
{#- _param:tenant_vlan #}
{#- _param:tenant_address #}
-{#- _param:tenant_netmask #}
+{#- _param:tenant_network_netmask #}
{#- _param:tenant_network_gateway #}
{#- _param:_param:dns_server01 #}
{#- _param:_param:dns_server02 #}
-
# {{ interfaces_role }}
{%- for interface_name, interface in interfaces.items() %}
{{ interface_name }}:
@@ -85,4 +84,4 @@
use_interfaces:
- bond0
require_interfaces:
- - bond0
+ - bond0
\ No newline at end of file
diff --git "a/\173\043 interfaces \043\175/bond0_ab_dvr_vlan_ctl_prv_floating" "b/\173\043 interfaces \043\175/bond0_ab_dvr_vlan_ctl_prv_floating"
index a4f891d..cbc1232 100644
--- "a/\173\043 interfaces \043\175/bond0_ab_dvr_vlan_ctl_prv_floating"
+++ "b/\173\043 interfaces \043\175/bond0_ab_dvr_vlan_ctl_prv_floating"
@@ -7,7 +7,6 @@
{#- _param:single_address #}
{#- _param:control_network_netmask #}
{#- _param:control_vlan #}
-
# {{ interfaces_role }}
{%- for interface_name, interface in interfaces.items() %}
{{ interface_name }}:
@@ -62,4 +61,4 @@
type: ovs_port
port_type: patch
bridge: br-prv
- peer: floating-to-prv
+ peer: floating-to-prv
\ No newline at end of file
diff --git "a/\173\043 interfaces \043\175/bond0_ab_dvr_vxlan_ctl_mesh_floating" "b/\173\043 interfaces \043\175/bond0_ab_dvr_vxlan_ctl_mesh_floating"
index 265aba8..c113f14 100644
--- "a/\173\043 interfaces \043\175/bond0_ab_dvr_vxlan_ctl_mesh_floating"
+++ "b/\173\043 interfaces \043\175/bond0_ab_dvr_vxlan_ctl_mesh_floating"
@@ -10,7 +10,6 @@
{#- _param:tenant_address #}
{#- _param:tenant_netmask #}
{#- _param:tenant_vlan #}
-
# {{ interfaces_role }}
{%- for interface_name, interface in interfaces.items() %}
{{ interface_name }}:
@@ -60,4 +59,4 @@
address: ${_param:_esc}{_param:tenant_address}
netmask: ${_param:_esc}{_param:tenant_network_netmask}
require_interfaces:
- - br-floating
+ - br-floating
\ No newline at end of file
diff --git "a/\173\043 interfaces \043\175/bond0_ab_nondvr_vlan_ctl_prv" "b/\173\043 interfaces \043\175/bond0_ab_nondvr_vlan_ctl_prv"
index 53cdb09..2287752 100644
--- "a/\173\043 interfaces \043\175/bond0_ab_nondvr_vlan_ctl_prv"
+++ "b/\173\043 interfaces \043\175/bond0_ab_nondvr_vlan_ctl_prv"
@@ -6,7 +6,6 @@
{#- _param:single_address #}
{#- _param:control_network_netmask #}
{#- _param:control_vlan #}
-
# {{ interfaces_role }}
{%- for interface_name, interface in interfaces.items() %}
{{ interface_name }}:
@@ -46,4 +45,4 @@
proto: static
type: ovs_port
require_interfaces:
- - br-prv
+ - br-prv
\ No newline at end of file
diff --git "a/\173\043 interfaces \043\175/bond0_ab_nondvr_vxlan_ctl_mesh" "b/\173\043 interfaces \043\175/bond0_ab_nondvr_vxlan_ctl_mesh"
index 42dbfca..bf3efd0 100644
--- "a/\173\043 interfaces \043\175/bond0_ab_nondvr_vxlan_ctl_mesh"
+++ "b/\173\043 interfaces \043\175/bond0_ab_nondvr_vxlan_ctl_mesh"
@@ -9,7 +9,6 @@
{#- _param:tenant_address #}
{#- _param:tenant_netmask #}
{#- _param:tenant_vlan #}
-
# {{ interfaces_role }}
{%- for interface_name, interface in interfaces.items() %}
{{ interface_name }}:
@@ -73,4 +72,4 @@
use_interfaces:
- bond0
require_interfaces:
- - bond0
+ - bond0
\ No newline at end of file
diff --git "a/\173\043 interfaces \043\175/bond0_ab_ovs_vlan_ctl" "b/\173\043 interfaces \043\175/bond0_ab_ovs_vlan_ctl"
index d6bbd72..c136ab9 100644
--- "a/\173\043 interfaces \043\175/bond0_ab_ovs_vlan_ctl"
+++ "b/\173\043 interfaces \043\175/bond0_ab_ovs_vlan_ctl"
@@ -6,7 +6,6 @@
{#- _param:single_address #}
{#- _param:control_network_netmask #}
{#- _param:control_vlan #}
-
# {{ interfaces_role }}
{%- for interface_name, interface in interfaces.items() %}
{{ interface_name }}:
@@ -50,4 +49,4 @@
use_interfaces:
- bond0
require_interfaces:
- - bond0
+ - bond0
\ No newline at end of file
diff --git "a/\173\043 interfaces \043\175/bond0_ab_ovs_vlan_ctl_prv" "b/\173\043 interfaces \043\175/bond0_ab_ovs_vlan_ctl_prv"
index 3cba8de..eb3826e 100644
--- "a/\173\043 interfaces \043\175/bond0_ab_ovs_vlan_ctl_prv"
+++ "b/\173\043 interfaces \043\175/bond0_ab_ovs_vlan_ctl_prv"
@@ -6,7 +6,6 @@
{#- _param:single_address #}
{#- _param:control_network_netmask #}
{#- _param:control_vlan #}
-
# {{ interfaces_role }}
{%- for interface_name, interface in interfaces.items() %}
{{ interface_name }}:
@@ -46,4 +45,4 @@
proto: static
type: ovs_port
require_interfaces:
- - br-prv
+ - br-prv
\ No newline at end of file
diff --git "a/\173\043 interfaces \043\175/bond0_ab_ovs_vxlan_ctl_mesh" "b/\173\043 interfaces \043\175/bond0_ab_ovs_vxlan_ctl_mesh"
index 2aea73d..5ec9ddc 100644
--- "a/\173\043 interfaces \043\175/bond0_ab_ovs_vxlan_ctl_mesh"
+++ "b/\173\043 interfaces \043\175/bond0_ab_ovs_vxlan_ctl_mesh"
@@ -9,7 +9,6 @@
{#- _param:tenant_address #}
{#- _param:tenant_netmask #}
{#- _param:tenant_vlan #}
-
# {{ interfaces_role }}
{%- for interface_name, interface in interfaces.items() %}
{{ interface_name }}:
@@ -59,4 +58,4 @@
address: ${_param:_esc}{_param:tenant_address}
netmask: ${_param:_esc}{_param:tenant_network_netmask}
require_interfaces:
- - br-ten
+ - br-ten
\ No newline at end of file
diff --git "a/\173\043 interfaces \043\175/bond1_ab_ovs_floating" "b/\173\043 interfaces \043\175/bond1_ab_ovs_floating"
index 9df5f46..f85af26 100644
--- "a/\173\043 interfaces \043\175/bond1_ab_ovs_floating"
+++ "b/\173\043 interfaces \043\175/bond1_ab_ovs_floating"
@@ -5,7 +5,6 @@
{#- _param:?addr #}
{#- _param:?mask #}
{#- _param:?vlan #}
-
# {{ interfaces_role }}
{%- for interface_name, interface in interfaces.items() %}
{{ interface_name }}:
@@ -35,4 +34,4 @@
{%- endfor %}
br-floating:
enabled: true
- type: ovs_bridge
+ type: ovs_bridge
\ No newline at end of file
diff --git "a/\173\043 interfaces \043\175/bond2_dpdk_prv" "b/\173\043 interfaces \043\175/bond2_dpdk_prv"
index 39bc013..57822bc 100644
--- "a/\173\043 interfaces \043\175/bond2_dpdk_prv"
+++ "b/\173\043 interfaces \043\175/bond2_dpdk_prv"
@@ -2,8 +2,7 @@
{#- br-prv (OVS bridge) #}
{#- Requirements: #}
{#- _param:tenant_address #}
-{#- _param:tenant_netmask #}
-
+{#- _param:tenant_network_netmask #}
# {{ interfaces_role }}
{%- for interface_name, interface in interfaces.items() %}
{{ interface_name }}:
@@ -23,5 +22,5 @@
br-prv:
address: ${_param:_esc}{_param:tenant_address}
enabled: true
- netmask: ${_param:_esc}{_param:tenant_netmask}
- type: dpdk_ovs_bridge
+ netmask: ${_param:_esc}{_param:tenant_network_netmask}
+ type: dpdk_ovs_bridge
\ No newline at end of file
diff --git "a/\173\043 interfaces \043\175/single_ctl" "b/\173\043 interfaces \043\175/single_ctl"
index ce54ed7..8f16b93 100644
--- "a/\173\043 interfaces \043\175/single_ctl"
+++ "b/\173\043 interfaces \043\175/single_ctl"
@@ -7,7 +7,6 @@
{#- _param:control_network_netmask #}
{#- _param:dns_server01 #}
{#- _param:dns_server02 #}
-
# {{ interfaces_role }}
{%- set interface_name = interfaces.keys()[0] %}
{{ interface_name }}:
@@ -28,4 +27,4 @@
use_interfaces:
- {{ interface_name }}
require_interfaces:
- - {{ interface_name }}
+ - {{ interface_name }}
\ No newline at end of file
diff --git "a/\173\043 interfaces \043\175/single_dhcp" "b/\173\043 interfaces \043\175/single_dhcp"
index 87315e0..a7160e1 100644
--- "a/\173\043 interfaces \043\175/single_dhcp"
+++ "b/\173\043 interfaces \043\175/single_dhcp"
@@ -1,7 +1,6 @@
{#- Management (admin) network with DHCP #}
{#- Provides: #}
{#- <interface_name> + DHCP address #}
-
# {{ interfaces_role }}
{%- set interface_name = interfaces.keys()[0] %}
{{ interface_name }}:
diff --git "a/\173\043 interfaces \043\175/single_mgm" "b/\173\043 interfaces \043\175/single_mgm"
index a0de958..78b0ca1 100644
--- "a/\173\043 interfaces \043\175/single_mgm"
+++ "b/\173\043 interfaces \043\175/single_mgm"
@@ -7,7 +7,6 @@
{#- _param:deploy_network_gateway #}
{#- _param:dns_server01 #}
{#- _param:dns_server02 #}
-
# {{ interfaces_role }}
{%- set interface_name = interfaces.keys()[0] %}
{{ interface_name }}:
@@ -27,4 +26,4 @@
proto: static
type: bridge
use_interfaces:
- - {{ interface_name }}
+ - {{ interface_name }}
\ No newline at end of file
diff --git "a/\173\043 interfaces \043\175/single_mgm_dhcp" "b/\173\043 interfaces \043\175/single_mgm_dhcp"
index fd2bf66..df607f5 100644
--- "a/\173\043 interfaces \043\175/single_mgm_dhcp"
+++ "b/\173\043 interfaces \043\175/single_mgm_dhcp"
@@ -1,7 +1,6 @@
{#- Management (admin) network. For nodes where deploy address provided by DHCP server #}
{#- Provides: #}
{#- br_mgm (linux bridge) + DHCP address #}
-
# {{ interfaces_role }}
{%- set interface_name = interfaces.keys()[0] %}
{{ interface_name }}:
@@ -15,4 +14,4 @@
proto: dhcp
type: bridge
use_interfaces:
- - {{ interface_name }}
+ - {{ interface_name }}
\ No newline at end of file
diff --git "a/\173\043 interfaces \043\175/single_vlan_ctl" "b/\173\043 interfaces \043\175/single_vlan_ctl"
index 2b899a2..c0e5a60 100644
--- "a/\173\043 interfaces \043\175/single_vlan_ctl"
+++ "b/\173\043 interfaces \043\175/single_vlan_ctl"
@@ -8,7 +8,6 @@
{#- _param:control_vlan #}
{#- _param:dns_server01 #}
{#- _param:dns_server02 #}
-
# {{ interfaces_role }}
{%- set interface_name = interfaces.keys()[0] %}
{{ interface_name }}:
@@ -38,4 +37,4 @@
use_interfaces:
- {{ interface_name }}
require_interfaces:
- - {{ interface_name }}
+ - {{ interface_name }}
\ No newline at end of file