Introduce SALT_VERSION var

As we plan to move to salt 2017.7 and at the same time
we need to check 2016.3 as well (and upgrdae path), introduce
new var SALT_VERSION with default value 2016.3

Also update repo path to salt from mirror mirantis and clened up
commented hacks

Reelated: PROD-19373

Change-Id: I3c327aa4b6369750f5bdabe1b96cb52ab5770f03
diff --git a/tcp_tests/templates/virtual-mcp-ocata-ceph-offline/run_test.sh b/tcp_tests/templates/virtual-mcp-ocata-ceph-offline/run_test.sh
index a26ac65..4ceccb4 100755
--- a/tcp_tests/templates/virtual-mcp-ocata-ceph-offline/run_test.sh
+++ b/tcp_tests/templates/virtual-mcp-ocata-ceph-offline/run_test.sh
@@ -12,6 +12,8 @@
 export LAB_CONFIG_NAME=virtual-mcp-ocata-ceph-offline
 export CLUSTER_NAME=virtual-mcp-ocata-ovs-ceph-local
 export REPOSITORY_SUITE=stable
+export DISTROS_CODENAME=xenial
+export SALT_VERSION=2016.3
 
 export TEST_GROUP=test_ocata_ceph_all_ovs_install
 export RUN_TEMPEST=true
@@ -32,6 +34,8 @@
 export SALT_FORMULAS_REPO=https://gerrit.mcp.mirantis.local.test/salt-formulas
 export FORMULA_REPOSITORY="deb [arch=amd64] http://apt.mirantis.local.test/ubuntu-xenial ${REPOSITORY_SUITE} salt extra"
 export FORMULA_GPG="http://apt.mirantis.local.test/public.gpg"
+export SALT_REPOSITORY = "deb [arch=amd64] http://mirror.mirantis.local.test/" + REPOSITORY_SUITE+ "/saltstack-" + SALT_VERSION+ "/${DISTRIB_CODENAME} ${DISTRIB_CODENAME} main"
+
 export SALT_REPOSITORY="deb [arch=amd64] http://apt.mirantis.local.test/ubuntu-xenial/ ${REPOSITORY_SUITE} salt/2016.3 main"
 export SALT_GPG="http://apt.mirantis.local.test/public.gpg"
 export UBUNTU_REPOSITORY="deb http://mirror.mcp.mirantis.local.test/ubuntu xenial main universe restricted"
diff --git a/tcp_tests/templates/virtual-mcp-ocata-ceph-offline/salt.yaml b/tcp_tests/templates/virtual-mcp-ocata-ceph-offline/salt.yaml
index 533c98e..2efd2c7 100644
--- a/tcp_tests/templates/virtual-mcp-ocata-ceph-offline/salt.yaml
+++ b/tcp_tests/templates/virtual-mcp-ocata-ceph-offline/salt.yaml
@@ -79,20 +79,6 @@
 
 {{ SHARED.MACRO_BOOTSTRAP_ALL_MINIONS() }}
 
-- description: Hack gtw node
-  cmd: salt 'gtw*' cmd.run "ip addr del {{ IPV4_NET_CONTROL_PREFIX }}.110/24 dev ens4; ip addr flush dev ens4";
-  node_name: {{ HOSTNAME_CFG01 }}
-  retry: {count: 1, delay: 10}
-  skip_fail: false
+{{SHARED.MACRO_CHECK_SALT_VERSION_SERVICES_ON_CFG()}}
 
-- description: Hack cmp01 node
-  cmd: salt 'cmp01*' cmd.run "ip addr del {{ IPV4_NET_CONTROL_PREFIX }}.105/24 dev ens4; ip addr flush dev ens4";
-  node_name: {{ HOSTNAME_CFG01 }}
-  retry: {count: 1, delay: 10}
-  skip_fail: false
-
-- description: Hack cmp02 node
-  cmd: salt 'cmp02*' cmd.run "ip addr del {{ IPV4_NET_CONTROL_PREFIX }}.106/24 dev ens4; ip addr flush dev ens4";
-  node_name: {{ HOSTNAME_CFG01 }}
-  retry: {count: 1, delay: 10}
-  skip_fail: false
+{{SHARED.MACRO_CHECK_SALT_VERSION_ON_NODES()}}
diff --git a/tcp_tests/templates/virtual-mcp-ocata-ceph-offline/underlay--user-data-apt01.yaml b/tcp_tests/templates/virtual-mcp-ocata-ceph-offline/underlay--user-data-apt01.yaml
index 0c06c6b..69772ac 100644
--- a/tcp_tests/templates/virtual-mcp-ocata-ceph-offline/underlay--user-data-apt01.yaml
+++ b/tcp_tests/templates/virtual-mcp-ocata-ceph-offline/underlay--user-data-apt01.yaml
@@ -55,8 +55,8 @@
    - which wget >/dev/null || (apt-get update; apt-get install -y wget);
    - echo "deb [arch=amd64] http://apt.mirantis.com/xenial {{ REPOSITORY_SUITE }} salt extra" > /etc/apt/sources.list.d/mcp_salt.list;
    - wget -O - http://apt.mirantis.com/public.gpg | apt-key add -;
-   - echo "deb http://repo.saltstack.com/apt/ubuntu/16.04/amd64/2016.3 xenial main" > /etc/apt/sources.list.d/saltstack.list;
-   - wget -O - https://repo.saltstack.com/apt/ubuntu/16.04/amd64/2016.3/SALTSTACK-GPG-KEY.pub | apt-key add -;
+   - echo "deb http://repo.saltstack.com/apt/ubuntu/16.04/amd64/{{ SALT_VERSION }} xenial main" > /etc/apt/sources.list.d/saltstack.list;
+   - wget -O - https://repo.saltstack.com/apt/ubuntu/16.04/amd64/{{ SALT_VERSION }}/SALTSTACK-GPG-KEY.pub | apt-key add -;
 
    - eatmydata apt-get clean && apt-get update