[baremetal] Move VCP iface config to own yml 99/48499/7
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>
Mon, 4 Dec 2017 21:33:53 +0000 (22:33 +0100)
committerAlexandru Avadanii <Alexandru.Avadanii@enea.com>
Thu, 14 Dec 2017 21:59:35 +0000 (22:59 +0100)
- move linux.network.interface definitions to their own classes, which
  also removes the previous requirement of defining {dhcp,single}_nic
  parameters in classes that don't actually use them;
- drop now useless {dhcp,single}_nic parameters;
- expand linux_{dhcp,single}_interface macros, since they cause issues
  with reclass dict-merge while attempting to override sub-vars (i.e.
  it's not possible to set 'enabled: false' via reclass interpolation);

JIRA: FUEL-310

Change-Id: I29d921f545e761de335a60e242a4523d13b06c78
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
28 files changed:
mcp/reclass/classes/cluster/baremetal-mcp-pike-common-ha/infra/config.yml
mcp/reclass/classes/cluster/baremetal-mcp-pike-common-ha/infra/init.yml
mcp/reclass/classes/cluster/baremetal-mcp-pike-common-ha/infra/kvm.yml
mcp/reclass/classes/cluster/baremetal-mcp-pike-common-ha/infra/maas.yml
mcp/reclass/classes/cluster/baremetal-mcp-pike-common-ha/openstack_compute.yml
mcp/reclass/classes/cluster/baremetal-mcp-pike-common-ha/openstack_control.yml
mcp/reclass/classes/cluster/baremetal-mcp-pike-common-ha/openstack_database.yml
mcp/reclass/classes/cluster/baremetal-mcp-pike-common-ha/openstack_interface_vcp_biport.yml [new file with mode: 0644]
mcp/reclass/classes/cluster/baremetal-mcp-pike-common-ha/openstack_interface_vcp_triport.yml [new file with mode: 0644]
mcp/reclass/classes/cluster/baremetal-mcp-pike-common-ha/openstack_message_queue.yml
mcp/reclass/classes/cluster/baremetal-mcp-pike-common-ha/openstack_proxy.yml
mcp/reclass/classes/cluster/baremetal-mcp-pike-common-ha/openstack_telemetry.yml
mcp/reclass/classes/cluster/baremetal-mcp-pike-odl-ha/opendaylight/control.yml
mcp/reclass/classes/cluster/baremetal-mcp-pike-odl-ha/openstack/control.yml
mcp/reclass/classes/cluster/baremetal-mcp-pike-odl-ha/openstack/database.yml
mcp/reclass/classes/cluster/baremetal-mcp-pike-odl-ha/openstack/message_queue.yml
mcp/reclass/classes/cluster/baremetal-mcp-pike-odl-ha/openstack/proxy.yml
mcp/reclass/classes/cluster/baremetal-mcp-pike-odl-ha/openstack/telemetry.yml
mcp/reclass/classes/cluster/baremetal-mcp-pike-ovs-dpdk-ha/openstack/control.yml
mcp/reclass/classes/cluster/baremetal-mcp-pike-ovs-dpdk-ha/openstack/database.yml
mcp/reclass/classes/cluster/baremetal-mcp-pike-ovs-dpdk-ha/openstack/message_queue.yml
mcp/reclass/classes/cluster/baremetal-mcp-pike-ovs-dpdk-ha/openstack/proxy.yml
mcp/reclass/classes/cluster/baremetal-mcp-pike-ovs-dpdk-ha/openstack/telemetry.yml
mcp/reclass/classes/cluster/baremetal-mcp-pike-ovs-ha/openstack/control.yml
mcp/reclass/classes/cluster/baremetal-mcp-pike-ovs-ha/openstack/database.yml
mcp/reclass/classes/cluster/baremetal-mcp-pike-ovs-ha/openstack/message_queue.yml
mcp/reclass/classes/cluster/baremetal-mcp-pike-ovs-ha/openstack/proxy.yml
mcp/reclass/classes/cluster/baremetal-mcp-pike-ovs-ha/openstack/telemetry.yml

index 2003aa0..6cad47d 100644 (file)
@@ -41,8 +41,18 @@ parameters:
   linux:
     network:
       interface:
-        dhcp: ${_param:linux_dhcp_interface}
-        single: ${_param:linux_single_interface}
+        dhcp:
+          enabled: true
+          type: eth
+          proto: dhcp
+          name: ${_param:dhcp_nic}
+        single:
+          enabled: true
+          type: eth
+          proto: static
+          name: ${_param:single_nic}
+          address: ${_param:single_address}
+          netmask: 255.255.255.0
   salt:
     master:
       accept_policy: open_mode
index 4f93914..1725894 100644 (file)
@@ -47,18 +47,6 @@ parameters:
       storage:
         node:
           name: default
-    linux_dhcp_interface:
-      enabled: true
-      type: eth
-      proto: dhcp
-      name: ${_param:dhcp_nic}
-    linux_single_interface:
-      enabled: true
-      type: eth
-      proto: static
-      name: ${_param:single_nic}
-      address: ${_param:single_address}
-      netmask: 255.255.255.0
 
     # yamllint disable-line rule:line-length
     salt_api_password_hash: "$6$WV0P1shnoDh2gI/Z$22/Bcd7ffMv0jDlFpT63cAU4PiXHz9pjXwngToKwqAsgoeK4HNR3PiKaushjxp3JsQ8hNoJmAC6TxzVqfV8WH/"
index dae8ad6..f413aef 100644 (file)
@@ -32,9 +32,6 @@ parameters:
     cluster_node03_address: ${_param:infra_kvm_node03_address}
     keepalived_vip_interface: br-ctl
     keepalived_vip_virtual_router_id: 69
-    # {dhcp,single}_nic are not used, but referenced
-    dhcp_nic: ${_param:opnfv_vcp_vm_primary_interface}
-    single_nic: ${_param:opnfv_vcp_vm_secondary_interface}
   linux:
     network:
       remove_iface_files:
index 93db0ed..56cd96b 100644 (file)
@@ -23,9 +23,6 @@ parameters:
     maas_db_password: opnfv_secret
     dns_server01: ${_param:opnfv_dns_server01}
     single_address: ${_param:infra_maas_node01_deploy_address}
-    # {dhcp,single}_nic are not used, but referenced
-    dhcp_nic: ${_param:opnfv_vcp_vm_primary_interface}
-    single_nic: ${_param:opnfv_vcp_vm_secondary_interface}
   maas:
     region:
       salt_master_ip: ${_param:infra_config_deploy_address}
index 50241b4..5c077d5 100644 (file)
@@ -35,9 +35,6 @@ parameters:
     loopback_device_size: 20
     linux_system_codename: xenial
     glusterfs_version: '3.13'
-    # {dhcp,single}_nic are not used, but referenced
-    dhcp_nic: ${_param:opnfv_vcp_vm_primary_interface}
-    single_nic: ${_param:opnfv_vcp_vm_secondary_interface}
   glusterfs:
     client:
       volumes:
index 0abe365..c332542 100644 (file)
@@ -39,13 +39,6 @@ parameters:
     cluster_node03_address: ${_param:openstack_control_node03_address}
     nova_vncproxy_url: https://${_param:cluster_public_host}:6080
     glusterfs_version: '3.13'
-    dhcp_nic: ${_param:opnfv_vcp_vm_primary_interface}
-    single_nic: ${_param:opnfv_vcp_vm_secondary_interface}
-  linux:
-    network:
-      interface:
-        dhcp: ${_param:linux_dhcp_interface}
-        single: ${_param:linux_single_interface}
   nova:
     controller:
       pkgs:
index 733f3f7..17c4e1c 100644 (file)
@@ -34,10 +34,3 @@ parameters:
     cluster_node02_address: ${_param:openstack_database_node02_address}
     cluster_node03_hostname: ${_param:openstack_database_node03_hostname}
     cluster_node03_address: ${_param:openstack_database_node03_address}
-    dhcp_nic: ${_param:opnfv_vcp_vm_primary_interface}
-    single_nic: ${_param:opnfv_vcp_vm_secondary_interface}
-  linux:
-    network:
-      interface:
-        dhcp: ${_param:linux_dhcp_interface}
-        single: ${_param:linux_single_interface}
diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-pike-common-ha/openstack_interface_vcp_biport.yml b/mcp/reclass/classes/cluster/baremetal-mcp-pike-common-ha/openstack_interface_vcp_biport.yml
new file mode 100644 (file)
index 0000000..3c7f3e2
--- /dev/null
@@ -0,0 +1,27 @@
+##############################################################################
+# Copyright (c) 2017 Mirantis Inc., Enea AB and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+---
+parameters:
+  _param:
+    dhcp_nic: ${_param:opnfv_vcp_vm_primary_interface}
+    single_nic: ${_param:opnfv_vcp_vm_secondary_interface}
+  linux:
+    network:
+      interface:
+        dhcp:
+          enabled: true
+          type: eth
+          proto: dhcp
+          name: ${_param:dhcp_nic}
+        single:
+          enabled: true
+          type: eth
+          proto: static
+          name: ${_param:single_nic}
+          address: ${_param:single_address}
+          netmask: 255.255.255.0
diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-pike-common-ha/openstack_interface_vcp_triport.yml b/mcp/reclass/classes/cluster/baremetal-mcp-pike-common-ha/openstack_interface_vcp_triport.yml
new file mode 100644 (file)
index 0000000..cef2a88
--- /dev/null
@@ -0,0 +1,45 @@
+##############################################################################
+# Copyright (c) 2017 Mirantis Inc., Enea AB and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+---
+parameters:
+  _param:
+    dhcp_nic: ${_param:opnfv_vcp_vm_primary_interface}
+    single_nic: ${_param:opnfv_vcp_vm_secondary_interface}
+    control_nic: ${_param:opnfv_vcp_vm_tertiary_interface}
+  linux:
+    network:
+      interface:
+        dhcp_int:
+          enabled: true
+          type: eth
+          proto: dhcp
+          name: ${_param:dhcp_nic}
+          route:
+            mcpcontol:
+              address: ${_param:opnfv_net_mcpcontrol}
+              netmask: ${_param:opnfv_net_mcpcontrol_mask}
+              gateway: ${_param:opnfv_infra_maas_node01_deploy_address}
+        single_int:
+          enabled: true
+          type: eth
+          proto: static
+          name: ${_param:single_nic}
+          address: ${_param:single_address}
+          netmask: 255.255.255.0
+          route:
+            public:
+              address: 0.0.0.0
+              netmask: 0.0.0.0
+              gateway: ${_param:opnfv_net_public_gw}
+        control_int:
+          enabled: true
+          type: eth
+          proto: static
+          name: ${_param:control_nic}
+          address: ${_param:control_address}
+          netmask: 255.255.255.0
index 16f9de1..13f8e5a 100644 (file)
@@ -22,10 +22,3 @@ parameters:
     cluster_node02_address: ${_param:openstack_message_queue_node02_address}
     cluster_node03_hostname: ${_param:openstack_message_queue_node03_hostname}
     cluster_node03_address: ${_param:openstack_message_queue_node03_address}
-    dhcp_nic: ${_param:opnfv_vcp_vm_primary_interface}
-    single_nic: ${_param:opnfv_vcp_vm_secondary_interface}
-  linux:
-    network:
-      interface:
-        dhcp: ${_param:linux_dhcp_interface}
-        single: ${_param:linux_single_interface}
index 30efa9f..0add639 100644 (file)
@@ -28,41 +28,7 @@ parameters:
       mode: secure
     cluster_vip_address: ${_param:openstack_proxy_address}
     salt_minion_ca_host: cfg01.${_param:cluster_domain}
-    dhcp_nic: ${_param:opnfv_vcp_vm_primary_interface}
-    single_nic: ${_param:opnfv_vcp_vm_secondary_interface}
-    control_nic: ${_param:opnfv_vcp_vm_tertiary_interface}
   linux:
-    network:
-      interface:
-        dhcp_int:
-          enabled: true
-          type: eth
-          proto: dhcp
-          name: ${_param:dhcp_nic}
-          route:
-            mcpcontol:
-              address: ${_param:opnfv_net_mcpcontrol}
-              netmask: ${_param:opnfv_net_mcpcontrol_mask}
-              gateway: ${_param:opnfv_infra_maas_node01_deploy_address}
-        single_int:
-          enabled: true
-          type: eth
-          proto: static
-          name: ${_param:single_nic}
-          address: ${_param:single_address}
-          netmask: 255.255.255.0
-          route:
-            public:
-              address: 0.0.0.0
-              netmask: 0.0.0.0
-              gateway: ${_param:opnfv_net_public_gw}
-        control_int:
-          enabled: true
-          type: eth
-          proto: static
-          name: ${_param:control_nic}
-          address: ${_param:control_address}
-          netmask: 255.255.255.0
     system:
       package:
         libapache2-mod-wsgi:
index fa50bfb..94c0ce4 100644 (file)
@@ -27,13 +27,6 @@ parameters:
     cluster_node02_address: ${_param:openstack_telemetry_node02_address}
     cluster_node03_hostname: ${_param:openstack_telemetry_node03_hostname}
     cluster_node03_address: ${_param:openstack_telemetry_node03_address}
-    dhcp_nic: ${_param:opnfv_vcp_vm_primary_interface}
-    single_nic: ${_param:opnfv_vcp_vm_secondary_interface}
-  linux:
-    network:
-      interface:
-        dhcp: ${_param:linux_dhcp_interface}
-        single: ${_param:linux_single_interface}
   mongodb:
     server:
       logging:
index 3bb4266..50eb342 100644 (file)
@@ -8,16 +8,11 @@
 ---
 classes:
   - system.opendaylight.server.single
+  - cluster.baremetal-mcp-pike-common-ha.openstack_interface_vcp_biport
   - cluster.baremetal-mcp-pike-odl-ha
 parameters:
   _param:
     linux_system_codename: xenial
-    dhcp_nic: ${_param:opnfv_vcp_vm_primary_interface}
-    single_nic: ${_param:opnfv_vcp_vm_secondary_interface}
-  linux:
-    network:
-      interface:
-        single: ${_param:linux_single_interface}
   opendaylight:
     server:
       odl_bind_ip: ${_param:single_address}
index fd89a4f..2cbb8ca 100644 (file)
@@ -8,6 +8,7 @@
 ---
 classes:
   - system.neutron.control.opendaylight.cluster
+  - cluster.baremetal-mcp-pike-common-ha.openstack_interface_vcp_biport
   - cluster.baremetal-mcp-pike-common-ha.openstack_control
   - cluster.baremetal-mcp-pike-odl-ha.infra
 parameters:
index 18cc777..8585c69 100644 (file)
@@ -7,5 +7,6 @@
 ##############################################################################
 ---
 classes:
+  - cluster.baremetal-mcp-pike-common-ha.openstack_interface_vcp_biport
   - cluster.baremetal-mcp-pike-common-ha.openstack_database
   - cluster.baremetal-mcp-pike-odl-ha
index ad08365..dfe1e28 100644 (file)
@@ -7,5 +7,6 @@
 ##############################################################################
 ---
 classes:
+  - cluster.baremetal-mcp-pike-common-ha.openstack_interface_vcp_biport
   - cluster.baremetal-mcp-pike-common-ha.openstack_message_queue
   - cluster.baremetal-mcp-pike-odl-ha
index 1b32935..023ffd4 100644 (file)
@@ -7,6 +7,7 @@
 ##############################################################################
 ---
 classes:
+  - cluster.baremetal-mcp-pike-common-ha.openstack_interface_vcp_triport
   - cluster.baremetal-mcp-pike-common-ha.openstack_proxy
   - cluster.baremetal-mcp-pike-odl-ha.infra
 parameters:
index 0eed908..83d1be8 100644 (file)
@@ -7,5 +7,6 @@
 ##############################################################################
 ---
 classes:
+  - cluster.baremetal-mcp-pike-common-ha.openstack_interface_vcp_biport
   - cluster.baremetal-mcp-pike-common-ha.openstack_telemetry
   - cluster.baremetal-mcp-pike-odl-ha.infra
index a67546c..82db9be 100644 (file)
@@ -8,6 +8,7 @@
 ---
 classes:
   - system.neutron.control.openvswitch.cluster
+  - cluster.baremetal-mcp-pike-common-ha.openstack_interface_vcp_biport
   - cluster.baremetal-mcp-pike-common-ha.openstack_control
   - cluster.baremetal-mcp-pike-ovs-dpdk-ha.infra
 parameters:
index 369c9ec..86b4038 100644 (file)
@@ -7,5 +7,6 @@
 ##############################################################################
 ---
 classes:
+  - cluster.baremetal-mcp-pike-common-ha.openstack_interface_vcp_biport
   - cluster.baremetal-mcp-pike-common-ha.openstack_database
   - cluster.baremetal-mcp-pike-ovs-dpdk-ha
index a8b5d38..ad9336f 100644 (file)
@@ -7,5 +7,6 @@
 ##############################################################################
 ---
 classes:
+  - cluster.baremetal-mcp-pike-common-ha.openstack_interface_vcp_biport
   - cluster.baremetal-mcp-pike-common-ha.openstack_message_queue
   - cluster.baremetal-mcp-pike-ovs-dpdk-ha
index 92bdfe0..de960d9 100644 (file)
@@ -7,5 +7,6 @@
 ##############################################################################
 ---
 classes:
+  - cluster.baremetal-mcp-pike-common-ha.openstack_interface_vcp_triport
   - cluster.baremetal-mcp-pike-common-ha.openstack_proxy
   - cluster.baremetal-mcp-pike-ovs-dpdk-ha.infra
index cf71cd9..680efa8 100644 (file)
@@ -7,5 +7,6 @@
 ##############################################################################
 ---
 classes:
+  - cluster.baremetal-mcp-pike-common-ha.openstack_interface_vcp_biport
   - cluster.baremetal-mcp-pike-common-ha.openstack_telemetry
   - cluster.baremetal-mcp-pike-ovs-dpdk-ha.infra
index 740f632..43bec6b 100644 (file)
@@ -8,5 +8,6 @@
 ---
 classes:
   - system.neutron.control.openvswitch.cluster
+  - cluster.baremetal-mcp-pike-common-ha.openstack_interface_vcp_biport
   - cluster.baremetal-mcp-pike-common-ha.openstack_control
   - cluster.baremetal-mcp-pike-ovs-ha.infra
index e7d81e6..85f5ebc 100644 (file)
@@ -7,5 +7,6 @@
 ##############################################################################
 ---
 classes:
+  - cluster.baremetal-mcp-pike-common-ha.openstack_interface_vcp_biport
   - cluster.baremetal-mcp-pike-common-ha.openstack_database
   - cluster.baremetal-mcp-pike-ovs-ha
index 8ae6c52..745fd6f 100644 (file)
@@ -7,5 +7,6 @@
 ##############################################################################
 ---
 classes:
+  - cluster.baremetal-mcp-pike-common-ha.openstack_interface_vcp_biport
   - cluster.baremetal-mcp-pike-common-ha.openstack_message_queue
   - cluster.baremetal-mcp-pike-ovs-ha
index 2664a08..5c91f60 100644 (file)
@@ -7,5 +7,6 @@
 ##############################################################################
 ---
 classes:
+  - cluster.baremetal-mcp-pike-common-ha.openstack_interface_vcp_triport
   - cluster.baremetal-mcp-pike-common-ha.openstack_proxy
   - cluster.baremetal-mcp-pike-ovs-ha.infra
index d0aed27..c6b1119 100644 (file)
@@ -7,5 +7,6 @@
 ##############################################################################
 ---
 classes:
+  - cluster.baremetal-mcp-pike-common-ha.openstack_interface_vcp_biport
   - cluster.baremetal-mcp-pike-common-ha.openstack_telemetry
   - cluster.baremetal-mcp-pike-ovs-ha.infra