Merge "Create gre net04 and non HA router"
diff --git a/tcp_tests/templates/cookied-mcp-ocata-dop-sl2/oss.yaml b/tcp_tests/templates/cookied-mcp-ocata-dop-sl2/oss.yaml
index 5b9b09d..33ad49b 100644
--- a/tcp_tests/templates/cookied-mcp-ocata-dop-sl2/oss.yaml
+++ b/tcp_tests/templates/cookied-mcp-ocata-dop-sl2/oss.yaml
@@ -53,6 +53,20 @@
   retry: {count: 1, delay: 5}
   skip_fail: false
 
+# Elasticsearch (system service)
+#-------------------------------
+- description: Setup Elasticsearch
+  cmd: salt --hard-crash --state-output=mixed --state-verbose=False -C 'I@elasticsearch:server' state.sls elasticsearch.server -b 1
+  node_name: {{ HOSTNAME_CFG01 }}
+  retry: {count: 3, delay: 10}
+  skip_fail: false
+
+- description: Setup Elasticsearch
+  cmd: salt --hard-crash --state-output=mixed --state-verbose=False -C 'I@elasticsearch:client' state.sls elasticsearch.client
+  node_name: {{ HOSTNAME_CFG01 }}
+  retry: {count: 3, delay: 10}
+  skip_fail: false
+
 # Setup Docker Swarm
 #-------------------
 
@@ -255,23 +269,21 @@
   retry: {count: 3, delay: 10}
   skip_fail: false
 
-# Elasticsearch
+# Elasticsearch (in container, disabled until https://mirantis.jira.com/browse/PROD-15297 is not fixed)
 #--------------
-
-- description: 'Waiting for Elasticsearch to come up in container...'
-  cmd: timeout 30 salt --hard-crash --state-output=mixed --state-verbose=False -C 'I@elasticsearch:client' cmd.run
-      'export CICD_CONTROL_ADDRESS=$(salt-call --out=newline_values_only pillar.get _param:cluster_vip_address);
-       while true; do curl -sf http://${CICD_CONTROL_ADDRESS}:9200/?pretty && break; sleep 2; done'
-  node_name: {{ HOSTNAME_CFG01 }}
-  retry: {count: 3, delay: 10}
-  skip_fail: false
-
-- description: Setup Elasticsearch
-  cmd: salt --hard-crash --state-output=mixed --state-verbose=False -C 'I@elasticsearch:client' state.sls elasticsearch.client
-  node_name: {{ HOSTNAME_CFG01 }}
-  retry: {count: 3, delay: 10}
-  skip_fail: false
-
+#- description: 'Waiting for Elasticsearch to come up in container...'
+#  cmd: timeout 30 salt --hard-crash --state-output=mixed --state-verbose=False -C 'I@elasticsearch:client' cmd.run
+#      'export CICD_CONTROL_ADDRESS=$(salt-call --out=newline_values_only pillar.get _param:cluster_vip_address);
+#       while true; do curl -sf http://${CICD_CONTROL_ADDRESS}:9200/?pretty && break; sleep 2; done'
+#  node_name: {{ HOSTNAME_CFG01 }}
+#  retry: {count: 3, delay: 10}
+#  skip_fail: false
+#
+#- description: Setup Elasticsearch
+#  cmd: salt --hard-crash --state-output=mixed --state-verbose=False -C 'I@elasticsearch:client' state.sls elasticsearch.client
+#  node_name: {{ HOSTNAME_CFG01 }}
+#  retry: {count: 3, delay: 10}
+#  skip_fail: false
 
 
 # Generate docs
diff --git a/tcp_tests/templates/cookied-mcp-ocata-dop-sl2/salt-context-cookiecutter-cicd_oss.yaml b/tcp_tests/templates/cookied-mcp-ocata-dop-sl2/salt-context-cookiecutter-cicd_oss.yaml
index cd2180b..f2128d9 100644
--- a/tcp_tests/templates/cookied-mcp-ocata-dop-sl2/salt-context-cookiecutter-cicd_oss.yaml
+++ b/tcp_tests/templates/cookied-mcp-ocata-dop-sl2/salt-context-cookiecutter-cicd_oss.yaml
@@ -53,16 +53,16 @@
   infra_deploy_nic: eth0
   maas_deploy_address: 10.167.4.91
   maas_hostname: mas01
-  infra_kvm01_control_address: 10.167.4.91
+  infra_kvm01_control_address: ${_param:cicd_control_node01_address}
   infra_kvm01_deploy_address: 10.167.5.91
-  infra_kvm01_hostname: kvm01
-  infra_kvm02_control_address: 10.167.4.92
+  infra_kvm01_hostname: ${_param:cicd_control_node01_hostname}
+  infra_kvm02_control_address: ${_param:cicd_control_node02_address}
   infra_kvm02_deploy_address: 10.167.5.92
-  infra_kvm02_hostname: kvm02
-  infra_kvm03_control_address: 10.167.4.93
+  infra_kvm02_hostname: ${_param:cicd_control_node02_hostname}
+  infra_kvm03_control_address: ${_param:cicd_control_node03_address}
   infra_kvm03_deploy_address: 10.167.5.93
-  infra_kvm03_hostname: kvm03
-  infra_kvm_vip_address: 10.167.4.90
+  infra_kvm03_hostname: ${_param:cicd_control_node03_hostname}
+  infra_kvm_vip_address: ${_param:cicd_control_vip_address}
   infra_primary_first_nic: eth1
   infra_primary_second_nic: eth2
   kubernetes_enabled: 'False'
@@ -82,14 +82,14 @@
   openstack_control_node02_hostname: ctl02
   openstack_control_node03_address: 10.167.4.13
   openstack_control_node03_hostname: ctl03
-  openstack_database_address: 10.167.4.10
-  openstack_database_hostname: dbs
-  openstack_database_node01_address: 10.167.4.11
-  openstack_database_node01_hostname: dbs01
-  openstack_database_node02_address: 10.167.4.12
-  openstack_database_node02_hostname: dbs02
-  openstack_database_node03_address: 10.167.4.13
-  openstack_database_node03_hostname: dbs03
+  openstack_database_address: ${_param:openstack_control_address}
+  openstack_database_hostname: ${_param:openstack_control_hostname}
+  openstack_database_node01_address: ${_param:openstack_control_node01_address}
+  openstack_database_node01_hostname: ${_param:openstack_control_node01_hostname}
+  openstack_database_node02_address: ${_param:openstack_control_node02_address}
+  openstack_database_node02_hostname: ${_param:openstack_control_node02_hostname}
+  openstack_database_node03_address: ${_param:openstack_control_node03_address}
+  openstack_database_node03_hostname: ${_param:openstack_control_node03_hostname}
   openstack_enabled: 'True'
   openstack_gateway_node01_address: 10.167.4.224
   openstack_gateway_node01_hostname: gtw01
@@ -100,35 +100,35 @@
   openstack_gateway_node03_address: 10.167.4.226
   openstack_gateway_node03_hostname: gtw03
   openstack_gateway_node03_tenant_address: 10.167.6.8
-  openstack_message_queue_address: 10.167.4.10
-  openstack_message_queue_hostname: msg
-  openstack_message_queue_node01_address: 10.167.4.11
-  openstack_message_queue_node01_hostname: msg01
-  openstack_message_queue_node02_address: 10.167.4.12
-  openstack_message_queue_node02_hostname: msg02
-  openstack_message_queue_node03_address: 10.167.4.13
-  openstack_message_queue_node03_hostname: msg03
+  openstack_message_queue_address: ${_param:openstack_control_address}
+  openstack_message_queue_hostname: ${_param:openstack_control_hostname}
+  openstack_message_queue_node01_address: ${_param:openstack_control_node01_address}
+  openstack_message_queue_node01_hostname: ${_param:openstack_control_node01_hostname}
+  openstack_message_queue_node02_address: ${_param:openstack_control_node02_address}
+  openstack_message_queue_node02_hostname: ${_param:openstack_control_node02_hostname}
+  openstack_message_queue_node03_address: ${_param:openstack_control_node03_address}
+  openstack_message_queue_node03_hostname: ${_param:openstack_control_node03_hostname}
   openstack_network_engine: ovs
   openstack_nfv_dpdk_enabled: 'False'
   openstack_nfv_sriov_enabled: 'False'
   openstack_ovs_dvr_enabled: 'True'
   openstack_neutron_qos: 'False'
   openstack_ovs_encapsulation_type: vlan
-  openstack_ovs_encapsulation_vlan_range: 2416:2420
+  openstack_ovs_encapsulation_vlan_range: 2418:2420
   openstack_proxy_address: 10.167.4.80
   openstack_proxy_hostname: prx
   openstack_proxy_node01_address: 10.167.4.81
   openstack_proxy_node01_hostname: prx01
   openstack_proxy_node02_address: 10.167.4.82
   openstack_proxy_node02_hostname: prx02
-  openstack_telemetry_address: 10.167.4.10
-  openstack_telemetry_hostname: mdb
-  openstack_telemetry_node01_address: 10.167.4.11
-  openstack_telemetry_node01_hostname: mdb01
-  openstack_telemetry_node02_address: 10.167.4.12
-  openstack_telemetry_node02_hostname: mdb02
-  openstack_telemetry_node03_address: 10.167.4.13
-  openstack_telemetry_node03_hostname: mdb03
+  openstack_telemetry_address: ${_param:openstack_control_address}
+  openstack_telemetry_hostname: ${_param:openstack_control_hostname}
+  openstack_telemetry_node01_address: ${_param:openstack_control_node01_address}
+  openstack_telemetry_node01_hostname: ${_param:openstack_control_node01_hostname}
+  openstack_telemetry_node02_address: ${_param:openstack_control_node02_address}
+  openstack_telemetry_node02_hostname: ${_param:openstack_control_node02_hostname}
+  openstack_telemetry_node03_address: ${_param:openstack_control_node03_address}
+  openstack_telemetry_node03_hostname: ${_param:openstack_control_node03_hostname}
   openstack_benchmark_node01_hostname: bmk01
   openstack_benchmark_node01_address: 10.167.4.85
   openstack_version: ocata
@@ -139,14 +139,6 @@
   salt_master_management_address: 10.167.5.15
   stacklight_enabled: 'True'
   stacklight_version: '2'
-  stacklight_log_address: 10.167.4.70
-  stacklight_log_hostname: log
-  stacklight_log_node01_address: 10.167.4.71
-  stacklight_log_node01_hostname: log01
-  stacklight_log_node02_address: 10.167.4.72
-  stacklight_log_node02_hostname: log02
-  stacklight_log_node03_address: 10.167.4.73
-  stacklight_log_node03_hostname: log03
   stacklight_monitor_address: 10.167.4.70
   stacklight_monitor_hostname: mon
   stacklight_monitor_node01_address: 10.167.4.71
@@ -155,14 +147,22 @@
   stacklight_monitor_node02_hostname: mon02
   stacklight_monitor_node03_address: 10.167.4.73
   stacklight_monitor_node03_hostname: mon03
-  stacklight_telemetry_address: 10.167.4.70
-  stacklight_telemetry_hostname: mtr
-  stacklight_telemetry_node01_address: 10.167.4.71
-  stacklight_telemetry_node01_hostname: mtr01
-  stacklight_telemetry_node02_address: 10.167.4.72
-  stacklight_telemetry_node02_hostname: mtr02
-  stacklight_telemetry_node03_address: 10.167.4.73
-  stacklight_telemetry_node03_hostname: mtr03
+  stacklight_log_address: ${_param:stacklight_monitor_address}
+  stacklight_log_hostname: ${_param:stacklight_monitor_hostname}
+  stacklight_log_node01_address: ${_param:stacklight_monitor_node01_address}
+  stacklight_log_node01_hostname: ${_param:stacklight_monitor_node01_hostname}
+  stacklight_log_node02_address: ${_param:stacklight_monitor_node02_address}
+  stacklight_log_node02_hostname: ${_param:stacklight_monitor_node02_hostname}
+  stacklight_log_node03_address: ${_param:stacklight_monitor_node03_address}
+  stacklight_log_node03_hostname: ${_param:stacklight_monitor_node03_hostname}
+  stacklight_telemetry_address: ${_param:stacklight_monitor_address}
+  stacklight_telemetry_hostname: ${_param:stacklight_monitor_hostname}
+  stacklight_telemetry_node01_address: ${_param:stacklight_monitor_node01_address}
+  stacklight_telemetry_node01_hostname: ${_param:stacklight_monitor_node01_hostname}
+  stacklight_telemetry_node02_address: ${_param:stacklight_monitor_node02_address}
+  stacklight_telemetry_node02_hostname: ${_param:stacklight_monitor_node02_hostname}
+  stacklight_telemetry_node03_address: ${_param:stacklight_monitor_node03_address}
+  stacklight_telemetry_node03_hostname: ${_param:stacklight_monitor_node03_hostname}
   tenant_network_gateway: ''
   tenant_network_netmask: 255.255.255.0
   tenant_vlan: '20'
diff --git a/tcp_tests/templates/shared-salt.yaml b/tcp_tests/templates/shared-salt.yaml
index cb1c515..b90ed25 100644
--- a/tcp_tests/templates/shared-salt.yaml
+++ b/tcp_tests/templates/shared-salt.yaml
@@ -609,15 +609,15 @@
 {%- macro MACRO_NETWORKING_WORKAROUNDS() %}
 {#########################################}
 
-- description: '*Workaround 1/2* of the bug PROD-9576 to get bond0-connectivity *without* rebooting nodes'
-  cmd: salt-call --hard-crash --state-output=mixed --state-verbose=False cmd.run
-    "mkdir -p /tmp/PROD-9576; cd /tmp/PROD-9576; git clone https://gerrit.mcp.mirantis.net/salt-formulas/linux; cd linux;
-    git fetch https://gerrit.mcp.mirantis.net/salt-formulas/linux refs/changes/54/2354/16 && git checkout FETCH_HEAD;
-    cp -f linux/network/interface.sls /srv/salt/env/prd/linux/network/;
-    cp -f linux/map.jinja /srv/salt/env/prd/linux/;"
-  node_name: {{ HOSTNAME_CFG01 }}
-  retry: {count: 1, delay: 5}
-  skip_fail: false
+#- description: '*Workaround 1/2* of the bug PROD-9576 to get bond0-connectivity *without* rebooting nodes'
+#  cmd: salt-call --hard-crash --state-output=mixed --state-verbose=False cmd.run
+#    "mkdir -p /tmp/PROD-9576; cd /tmp/PROD-9576; git clone https://gerrit.mcp.mirantis.net/salt-formulas/linux; cd linux;
+#    git fetch https://gerrit.mcp.mirantis.net/salt-formulas/linux refs/changes/54/2354/16 && git checkout FETCH_HEAD;
+#    cp -f linux/network/interface.sls /srv/salt/env/prd/linux/network/;
+#    cp -f linux/map.jinja /srv/salt/env/prd/linux/;"
+#  node_name: {{ HOSTNAME_CFG01 }}
+#  retry: {count: 1, delay: 5}
+#  skip_fail: false
 
 - description: '*Workaround: Load bonding module before call state.linux'
   cmd: salt -C "I@linux:network:interface:*:type:bond" cmd.run 'modprobe bonding'
diff --git a/tcp_tests/tests/system/test_install_cookied_ocata.py b/tcp_tests/tests/system/test_install_cookied_ocata.py
index 3f3f208..22f4b93 100644
--- a/tcp_tests/tests/system/test_install_cookied_ocata.py
+++ b/tcp_tests/tests/system/test_install_cookied_ocata.py
@@ -51,8 +51,8 @@
 
     @pytest.mark.grab_versions
     @pytest.mark.fail_snapshot
-    def test_cookied_ocata_cicd_oss_install(self, underlay, oss_deployed,
-                                            openstack_deployed, sl_deployed,
+    def test_cookied_ocata_cicd_oss_install(self, underlay, openstack_deployed,
+                                            oss_deployed, sl_deployed,
                                             show_step):
         """Test for deploying an mcp environment and check it
         Scenario: