Add mesh inteface to kvm nodes
Add mesh interface to kvm nodes.
Partial-fixes: MOSSUST-111
Change-Id: I381f7f5a30073dd7eea95baa86922f30553bd8ac
diff --git a/tcp_tests/templates/bm-e7-cicd-pike-odl-maas/env_add.yml b/tcp_tests/templates/bm-e7-cicd-pike-odl-maas/env_add.yml
new file mode 100644
index 0000000..5408fb4
--- /dev/null
+++ b/tcp_tests/templates/bm-e7-cicd-pike-odl-maas/env_add.yml
@@ -0,0 +1,70 @@
+parameters:
+ reclass:
+ storage:
+ node:
+ infra_kvm_node01:
+ params:
+ linux_network_interfaces:
+ br_mesh:
+ address: ${_param:_esc}{_param:tenant_address}
+ enabled: true
+ netmask: ${_param:_esc}{_param:tenant_network_netmask}
+ proto: static
+ type: bridge
+ use_interfaces:
+ - bond0.${_param:_esc}{_param:tenant_vlan}
+ require_interfaces:
+ - bond0.${_param:_esc}{_param:tenant_vlan}
+ bond0.tenant_vlan:
+ name: bond0.${_param:_esc}{_param:tenant_vlan}
+ enabled: true
+ proto: manual
+ type: vlan
+ use_interfaces:
+ - bond0
+ require_interfaces:
+ - bond0
+ infra_kvm_node02:
+ params:
+ linux_network_interfaces:
+ br_mesh:
+ address: ${_param:_esc}{_param:tenant_address}
+ enabled: true
+ netmask: ${_param:_esc}{_param:tenant_network_netmask}
+ proto: static
+ type: bridge
+ use_interfaces:
+ - bond0.${_param:_esc}{_param:tenant_vlan}
+ require_interfaces:
+ - bond0.${_param:_esc}{_param:tenant_vlan}
+ bond0.tenant_vlan:
+ name: bond0.${_param:_esc}{_param:tenant_vlan}
+ enabled: true
+ proto: manual
+ type: vlan
+ use_interfaces:
+ - bond0
+ require_interfaces:
+ - bond0
+ infra_kvm_node03:
+ params:
+ linux_network_interfaces:
+ br_mesh:
+ address: ${_param:_esc}{_param:tenant_address}
+ enabled: true
+ netmask: ${_param:_esc}{_param:tenant_network_netmask}
+ proto: static
+ type: bridge
+ use_interfaces:
+ - bond0.${_param:_esc}{_param:tenant_vlan}
+ require_interfaces:
+ - bond0.${_param:_esc}{_param:tenant_vlan}
+ bond0.tenant_vlan:
+ name: bond0.${_param:_esc}{_param:tenant_vlan}
+ enabled: true
+ proto: manual
+ type: vlan
+ use_interfaces:
+ - bond0
+ require_interfaces:
+ - bond0
diff --git a/tcp_tests/templates/bm-e7-cicd-pike-odl-maas/infra_config_nodes_add.yml b/tcp_tests/templates/bm-e7-cicd-pike-odl-maas/infra_config_nodes_add.yml
new file mode 100644
index 0000000..f4af00f
--- /dev/null
+++ b/tcp_tests/templates/bm-e7-cicd-pike-odl-maas/infra_config_nodes_add.yml
@@ -0,0 +1,13 @@
+parameters:
+ reclass:
+ storage:
+ node:
+ infra_kvm_node01:
+ params:
+ tenant_address: 10.167.12.241
+ infra_kvm_node02:
+ params:
+ tenant_address: 10.167.12.242
+ infra_kvm_node03:
+ params:
+ tenant_address: 10.167.12.243
diff --git a/tcp_tests/templates/bm-e7-cicd-pike-ovs-maas/env_add.yml b/tcp_tests/templates/bm-e7-cicd-pike-ovs-maas/env_add.yml
new file mode 100644
index 0000000..5408fb4
--- /dev/null
+++ b/tcp_tests/templates/bm-e7-cicd-pike-ovs-maas/env_add.yml
@@ -0,0 +1,70 @@
+parameters:
+ reclass:
+ storage:
+ node:
+ infra_kvm_node01:
+ params:
+ linux_network_interfaces:
+ br_mesh:
+ address: ${_param:_esc}{_param:tenant_address}
+ enabled: true
+ netmask: ${_param:_esc}{_param:tenant_network_netmask}
+ proto: static
+ type: bridge
+ use_interfaces:
+ - bond0.${_param:_esc}{_param:tenant_vlan}
+ require_interfaces:
+ - bond0.${_param:_esc}{_param:tenant_vlan}
+ bond0.tenant_vlan:
+ name: bond0.${_param:_esc}{_param:tenant_vlan}
+ enabled: true
+ proto: manual
+ type: vlan
+ use_interfaces:
+ - bond0
+ require_interfaces:
+ - bond0
+ infra_kvm_node02:
+ params:
+ linux_network_interfaces:
+ br_mesh:
+ address: ${_param:_esc}{_param:tenant_address}
+ enabled: true
+ netmask: ${_param:_esc}{_param:tenant_network_netmask}
+ proto: static
+ type: bridge
+ use_interfaces:
+ - bond0.${_param:_esc}{_param:tenant_vlan}
+ require_interfaces:
+ - bond0.${_param:_esc}{_param:tenant_vlan}
+ bond0.tenant_vlan:
+ name: bond0.${_param:_esc}{_param:tenant_vlan}
+ enabled: true
+ proto: manual
+ type: vlan
+ use_interfaces:
+ - bond0
+ require_interfaces:
+ - bond0
+ infra_kvm_node03:
+ params:
+ linux_network_interfaces:
+ br_mesh:
+ address: ${_param:_esc}{_param:tenant_address}
+ enabled: true
+ netmask: ${_param:_esc}{_param:tenant_network_netmask}
+ proto: static
+ type: bridge
+ use_interfaces:
+ - bond0.${_param:_esc}{_param:tenant_vlan}
+ require_interfaces:
+ - bond0.${_param:_esc}{_param:tenant_vlan}
+ bond0.tenant_vlan:
+ name: bond0.${_param:_esc}{_param:tenant_vlan}
+ enabled: true
+ proto: manual
+ type: vlan
+ use_interfaces:
+ - bond0
+ require_interfaces:
+ - bond0
diff --git a/tcp_tests/templates/bm-e7-cicd-pike-ovs-maas/infra_config_nodes_add.yml b/tcp_tests/templates/bm-e7-cicd-pike-ovs-maas/infra_config_nodes_add.yml
new file mode 100644
index 0000000..f4af00f
--- /dev/null
+++ b/tcp_tests/templates/bm-e7-cicd-pike-ovs-maas/infra_config_nodes_add.yml
@@ -0,0 +1,13 @@
+parameters:
+ reclass:
+ storage:
+ node:
+ infra_kvm_node01:
+ params:
+ tenant_address: 10.167.12.241
+ infra_kvm_node02:
+ params:
+ tenant_address: 10.167.12.242
+ infra_kvm_node03:
+ params:
+ tenant_address: 10.167.12.243
diff --git a/tcp_tests/templates/cookied-model-generator/salt_bm-e7-cicd-pike-odl-maas.yaml b/tcp_tests/templates/cookied-model-generator/salt_bm-e7-cicd-pike-odl-maas.yaml
index 19b4a42..be0aeef 100644
--- a/tcp_tests/templates/cookied-model-generator/salt_bm-e7-cicd-pike-odl-maas.yaml
+++ b/tcp_tests/templates/cookied-model-generator/salt_bm-e7-cicd-pike-odl-maas.yaml
@@ -94,3 +94,32 @@
node_name: {{ HOSTNAME_CFG01 }}
retry: {count: 1, delay: 5}
skip_fail: false
+
+- description: "Upload env_add.yml to cfg01.{{ DOMAIN_NAME }}"
+ upload:
+ local_path: {{ config.salt_deploy.templates_dir }}{{ LAB_CONFIG_NAME }}/
+ local_filename: env_add.yml
+ remote_path: /root/environment/
+ node_name: {{ HOSTNAME_CFG01 }}
+ retry: {count: 1, delay: 10}
+ skip_fail: false
+
+- description: "Upload infra_config_nodes_add.yml to cfg01.{{ DOMAIN_NAME }}"
+ upload:
+ local_path: {{ config.salt_deploy.templates_dir }}{{ LAB_CONFIG_NAME }}/
+ local_filename: infra_config_nodes_add.yml
+ remote_path: /root/environment/
+ node_name: {{ HOSTNAME_CFG01 }}
+ retry: {count: 1, delay: 10}
+ skip_fail: false
+
+- description: "Modify model to add interfaces to kvm nodes"
+ cmd: |
+ set -e;
+ set -x;
+ . /root/venv-reclass-tools/bin/activate;
+ reclass-tools merge-context /root/environment/env_add.yml /srv/salt/reclass/classes/environment/{{ LAB_CONFIG_NAME }}/init.yml;
+ reclass-tools merge-context /root/environment/infra_config_nodes_add.yml /srv/salt/reclass/classes/cluster/{{ LAB_CONFIG_NAME }}/infra/config/nodes.yml;
+ node_name: {{ HOSTNAME_CFG01 }}
+ retry: {count: 1, delay: 5}
+ skip_fail: false