Merge "Deploy all the components at once in CICD jobs"
diff --git a/tcp_tests/managers/runtestmanager.py b/tcp_tests/managers/runtestmanager.py
index 50f934e..8e70e58 100644
--- a/tcp_tests/managers/runtestmanager.py
+++ b/tcp_tests/managers/runtestmanager.py
@@ -87,6 +87,15 @@
                     'openstack_public_neutron_subnet_allocation_end':
                         public_allocation_end,
                     'tempest_test_target': self.target_name.encode("ascii"),
+                    'glance_image_cirros_location':
+                        'http://cz8133.bud.mirantis.net:8099'
+                        '/cirros-0.3.5-x86_64-disk.img',
+                    'glance_image_fedora_location':
+                        'http://cz8133.bud.mirantis.net:8099'
+                        '/Fedora-Cloud-Base-27-1.6.x86_64.qcow2',
+                    'glance_image_manila_location':
+                        'http://cz8133.bud.mirantis.net:8099'
+                        '/manila-service-image-master.qcow2',
                 },
                 'neutron': {
                     'client': {
diff --git a/tcp_tests/templates/cookied-bm-mcp-pike-k8s-contrail/k8s.yaml b/tcp_tests/templates/cookied-bm-mcp-pike-k8s-contrail/k8s.yaml
index 308051a..326d20e 100644
--- a/tcp_tests/templates/cookied-bm-mcp-pike-k8s-contrail/k8s.yaml
+++ b/tcp_tests/templates/cookied-bm-mcp-pike-k8s-contrail/k8s.yaml
@@ -131,7 +131,7 @@
 
 - description: Run Kubernetes master setup
   cmd: salt --hard-crash --state-output=mixed --state-verbose=False
-     -C 'I@kubernetes:master and *01*' state.sls kubernetes.master.setup
+     -C 'I@kubernetes:master' state.sls kubernetes.master.setup
   node_name: {{ HOSTNAME_CFG01 }}
   retry: {count: 1, delay: 5}
   skip_fail: false
diff --git a/tcp_tests/templates/cookied-bm-mcp-pike-k8s-contrail/salt-context-cookiecutter-k8s-contrail.yaml b/tcp_tests/templates/cookied-bm-mcp-pike-k8s-contrail/salt-context-cookiecutter-k8s-contrail.yaml
index 0699684..53bf0bb 100644
--- a/tcp_tests/templates/cookied-bm-mcp-pike-k8s-contrail/salt-context-cookiecutter-k8s-contrail.yaml
+++ b/tcp_tests/templates/cookied-bm-mcp-pike-k8s-contrail/salt-context-cookiecutter-k8s-contrail.yaml
@@ -187,7 +187,6 @@
   stacklight_log_node02_hostname: log02
   stacklight_log_node03_address: 10.167.8.63
   stacklight_log_node03_hostname: log03
-  stacklight_long_term_storage_type: influxdb
   stacklight_monitor_address: 10.167.8.70
   stacklight_monitor_hostname: mon
   stacklight_monitor_node01_address: 10.167.8.71
diff --git a/tcp_tests/templates/cookied-cicd-pike-dpdk/salt.yaml b/tcp_tests/templates/cookied-cicd-pike-dpdk/salt.yaml
index 4cb437b..47fa2ea 100644
--- a/tcp_tests/templates/cookied-cicd-pike-dpdk/salt.yaml
+++ b/tcp_tests/templates/cookied-cicd-pike-dpdk/salt.yaml
@@ -18,24 +18,14 @@
   retry: {count: 1, delay: 10}
   skip_fail: false
 
-- description: "Workaround for PROD-18834: Pre-install linux-headers package"
-  cmd: salt 'cmp*' cmd.run "apt-get install -y linux-headers-$(uname -r)";
+- description: "Workaround to avoid reboot cmp nodes: bring OVS interfaces UP (PROD-24343)"
+  cmd: |
+    salt 'cmp*' cmd.run "ifup br-prv";
+    salt 'cmp*' cmd.run "ip l set up br-floating";
   node_name: {{ HOSTNAME_CFG01 }}
   retry: {count: 1, delay: 10}
   skip_fail: false
 
-- description: "Workaround for PROD-17975: Pre-install ovs packages to update alternatives to DPDK"
-  cmd: |
-    set -ex;
-    salt --hard-crash --state-output=mixed --state-verbose=False -C 'I@linux:system' state.sls linux.system.repo
-    salt 'cmp*' cmd.run "apt-get install -y openvswitch-switch openvswitch-switch-dpdk";
-    salt 'cmp*' cmd.run "service openvswitch-switch stop";
-    salt 'cmp*' cmd.run "rm -f /var/lib/openvswitch/*";
-    salt 'cmp*' cmd.run "update-alternatives --remove ovs-vswitchd /usr/lib/openvswitch-switch/ovs-vswitchd";
-    salt 'cmp*' cmd.run "service openvswitch-switch start";
-  node_name: {{ HOSTNAME_CFG01 }}
-  retry: {count: 1, delay: 10}
-  skip_fail: false
 
 {{SHARED.MACRO_CHECK_SALT_VERSION_SERVICES_ON_CFG()}}
 
diff --git a/tcp_tests/templates/cookied-mcp-mitaka-dvr/salt.yaml b/tcp_tests/templates/cookied-mcp-mitaka-dvr/salt.yaml
index b965d0f..25ada5f 100644
--- a/tcp_tests/templates/cookied-mcp-mitaka-dvr/salt.yaml
+++ b/tcp_tests/templates/cookied-mcp-mitaka-dvr/salt.yaml
@@ -24,7 +24,7 @@
 
 {%- if OVERRIDES != '' %}
 {%- for param in OVERRIDES.splitlines() %}
-{%- set key, value = param.replace(' ','').split(':') %}
+{%- set key, value = param.replace(' ','').split(':', 1) %}
 - description: Override cluster parameters
   cmd: |
     salt-call reclass.cluster_meta_set name='{{ key }}' value='{{ value }}' file_name='{{OVERRIDES_FILENAME}}'
diff --git a/tcp_tests/templates/cookied-mcp-mitaka-ovs/salt.yaml b/tcp_tests/templates/cookied-mcp-mitaka-ovs/salt.yaml
index 3f3def3..e71451b 100644
--- a/tcp_tests/templates/cookied-mcp-mitaka-ovs/salt.yaml
+++ b/tcp_tests/templates/cookied-mcp-mitaka-ovs/salt.yaml
@@ -24,7 +24,7 @@
 
 {%- if OVERRIDES != '' %}
 {%- for param in OVERRIDES.splitlines() %}
-{%- set key, value = param.replace(' ','').split(':') %}
+{%- set key, value = param.replace(' ','').split(':', 1) %}
 - description: Override cluster parameters
   cmd: |
     salt-call reclass.cluster_meta_set name='{{ key }}' value='{{ value }}' file_name='{{OVERRIDES_FILENAME}}'
diff --git a/tcp_tests/templates/cookied-mcp-newton-dvr/salt.yaml b/tcp_tests/templates/cookied-mcp-newton-dvr/salt.yaml
index d869571..8592287 100644
--- a/tcp_tests/templates/cookied-mcp-newton-dvr/salt.yaml
+++ b/tcp_tests/templates/cookied-mcp-newton-dvr/salt.yaml
@@ -24,7 +24,7 @@
 
 {%- if OVERRIDES != '' %}
 {%- for param in OVERRIDES.splitlines() %}
-{%- set key, value = param.replace(' ','').split(':') %}
+{%- set key, value = param.replace(' ','').split(':', 1) %}
 - description: Override cluster parameters
   cmd: |
     salt-call reclass.cluster_meta_set name='{{ key }}' value='{{ value }}' file_name='{{OVERRIDES_FILENAME}}'
diff --git a/tcp_tests/templates/cookied-mcp-newton-ovs/salt.yaml b/tcp_tests/templates/cookied-mcp-newton-ovs/salt.yaml
index 496da5b..4d41eda 100644
--- a/tcp_tests/templates/cookied-mcp-newton-ovs/salt.yaml
+++ b/tcp_tests/templates/cookied-mcp-newton-ovs/salt.yaml
@@ -24,7 +24,7 @@
 
 {%- if OVERRIDES != '' %}
 {%- for param in OVERRIDES.splitlines() %}
-{%- set key, value = param.replace(' ','').split(':') %}
+{%- set key, value = param.replace(' ','').split(':', 1) %}
 - description: Override cluster parameters
   cmd: |
     salt-call reclass.cluster_meta_set name='{{ key }}' value='{{ value }}' file_name='{{OVERRIDES_FILENAME}}'
diff --git a/tcp_tests/templates/virtual-mcp-ocata-dvr/salt.yaml b/tcp_tests/templates/virtual-mcp-ocata-dvr/salt.yaml
index e7e32a6..97868d6 100644
--- a/tcp_tests/templates/virtual-mcp-ocata-dvr/salt.yaml
+++ b/tcp_tests/templates/virtual-mcp-ocata-dvr/salt.yaml
@@ -24,7 +24,7 @@
 
 {%- if OVERRIDES != '' %}
 {%- for param in OVERRIDES.splitlines() %}
-{%- set key, value = param.replace(' ','').split(':') %}
+{%- set key, value = param.replace(' ','').split(':', 1) %}
 - description: Override cluster parameters
   cmd: |
     salt-call reclass.cluster_meta_set name='{{ key }}' value='{{ value }}' file_name='{{OVERRIDES_FILENAME}}'
diff --git a/tcp_tests/templates/virtual-mcp-ocata-ovs/salt.yaml b/tcp_tests/templates/virtual-mcp-ocata-ovs/salt.yaml
index 3a3ed3a..c2bd3d7 100644
--- a/tcp_tests/templates/virtual-mcp-ocata-ovs/salt.yaml
+++ b/tcp_tests/templates/virtual-mcp-ocata-ovs/salt.yaml
@@ -24,7 +24,7 @@
 
 {%- if OVERRIDES != '' %}
 {%- for param in OVERRIDES.splitlines() %}
-{%- set key, value = param.replace(' ','').split(':') %}
+{%- set key, value = param.replace(' ','').split(':', 1) %}
 - description: Override cluster parameters
   cmd: |
     salt-call reclass.cluster_meta_set name='{{ key }}' value='{{ value }}' file_name='{{OVERRIDES_FILENAME}}'
diff --git a/tcp_tests/templates/virtual-mcp-sl-os/salt.yaml b/tcp_tests/templates/virtual-mcp-sl-os/salt.yaml
index 2bf4bb3..a1b2c92 100644
--- a/tcp_tests/templates/virtual-mcp-sl-os/salt.yaml
+++ b/tcp_tests/templates/virtual-mcp-sl-os/salt.yaml
@@ -21,7 +21,7 @@
 
 {%- if OVERRIDES != '' %}
 {%- for param in OVERRIDES.splitlines() %}
-{%- set key, value = param.replace(' ','').split(':') %}
+{%- set key, value = param.replace(' ','').split(':', 1) %}
 - description: Override cluster parameters
   cmd: |
     salt-call reclass.cluster_meta_set name='{{ key }}' value='{{ value }}' file_name='{{OVERRIDES_FILENAME}}'
diff --git a/tcp_tests/templates/virtual-mcp-trusty/salt.yaml b/tcp_tests/templates/virtual-mcp-trusty/salt.yaml
index 7213162..ab04cfb 100644
--- a/tcp_tests/templates/virtual-mcp-trusty/salt.yaml
+++ b/tcp_tests/templates/virtual-mcp-trusty/salt.yaml
@@ -22,7 +22,7 @@
 
 {%- if OVERRIDES != '' %}
 {%- for param in OVERRIDES.splitlines() %}
-{%- set key, value = param.replace(' ','').split(':') %}
+{%- set key, value = param.replace(' ','').split(':', 1) %}
 - description: Override cluster parameters
   cmd: |
     salt-call reclass.cluster_meta_set name='{{ key }}' value='{{ value }}' file_name='{{OVERRIDES_FILENAME}}'
diff --git a/tcp_tests/tests/system/test_calico.py b/tcp_tests/tests/system/test_calico.py
index ca5c116..6399eb3 100644
--- a/tcp_tests/tests/system/test_calico.py
+++ b/tcp_tests/tests/system/test_calico.py
@@ -107,9 +107,7 @@
         assert len(first_node_ips) > 0, "Couldn't find first k8s node IP!"
         first_node_names = [name for name in underlay.node_names()
                             if name.startswith(first_node.name)]
-        assert len(first_node_names) == 1, "Couldn't find first k8s node " \
-                                           "hostname in SSH config!"
-        first_node_name = first_node_names.pop()
+        first_node_name = first_node_names[0]
 
         target_pod_ip = None
 
diff --git a/tcp_tests/tests/system/test_k8s_actions.py b/tcp_tests/tests/system/test_k8s_actions.py
index 2fddde6..be234d1 100644
--- a/tcp_tests/tests/system/test_k8s_actions.py
+++ b/tcp_tests/tests/system/test_k8s_actions.py
@@ -222,7 +222,7 @@
         show_step(1)
 
         # Find out calico and flannel networks
-        tgt_k8s_control = "I@kubernetes:control:enabled:True"
+        tgt_k8s_control = "I@kubernetes:master"
 
         flannel_pillar = salt_deployed.get_pillar(
             tgt=tgt_k8s_control,