Merge "[mitaka,newton,ocata] Use shared-salt for install_docker_on_gtw"
diff --git a/tcp_tests/templates/cookied-mcp-mitaka-dvr/openstack.yaml b/tcp_tests/templates/cookied-mcp-mitaka-dvr/openstack.yaml
index b3c533d..b335251 100644
--- a/tcp_tests/templates/cookied-mcp-mitaka-dvr/openstack.yaml
+++ b/tcp_tests/templates/cookied-mcp-mitaka-dvr/openstack.yaml
@@ -9,6 +9,7 @@
 {% set OVERRIDE_POLICY = os_env('OVERRIDE_POLICY', '') %}
 
 {% import 'shared-openstack.yaml' as SHARED_OPENSTACK with context %}
+{% import 'shared-salt.yaml' as SHARED with context %}
 
 # Install OpenStack control services
 
@@ -172,11 +173,7 @@
   retry: {count: 1, delay: 30}
   skip_fail: false
 
-- description: Install docker.io on gtw
-  cmd: salt-call cmd.run 'apt-get install docker.io -y'
-  node_name: {{ HOSTNAME_GTW01 }}
-  retry: {count: 1, delay: 30}
-  skip_fail: false
+{{ SHARED.INSTALL_DOCKER_ON_GTW() }}
 
 - description: create rc file on cfg
   cmd: scp ctl01:/root/keystonercv3 /root
@@ -189,9 +186,3 @@
   node_name: {{ HOSTNAME_CFG01 }}
   retry: {count: 1, delay: 30}
   skip_fail: false
-
-- description: Set floating ip address on br-floating
-  cmd: ifconfig br-floating {{ IPV4_NET_EXTERNAL_PREFIX }}.110/24
-  node_name: {{ HOSTNAME_GTW01 }}
-  retry: {count: 1, delay: 30}
-  skip_fail: false
diff --git a/tcp_tests/templates/cookied-mcp-mitaka-ovs/openstack.yaml b/tcp_tests/templates/cookied-mcp-mitaka-ovs/openstack.yaml
index eade071..6672997 100644
--- a/tcp_tests/templates/cookied-mcp-mitaka-ovs/openstack.yaml
+++ b/tcp_tests/templates/cookied-mcp-mitaka-ovs/openstack.yaml
@@ -7,6 +7,7 @@
 {% from 'shared-salt.yaml' import IPV4_NET_TENANT_PREFIX with context %}
 
 {% import 'shared-openstack.yaml' as SHARED_OPENSTACK with context %}
+{% import 'shared-salt.yaml' as SHARED with context %}
 
 # Deploy nginx before openstack services (PROD-22740)
 - description: Deploy nginx proxy
@@ -194,17 +195,7 @@
   retry: {count: 1, delay: 30}
   skip_fail: false
 
-- description: Install docker.io on gtw
-  cmd: salt-call cmd.run 'apt-get install docker.io -y'
-  node_name: {{ HOSTNAME_GTW01 }}
-  retry: {count: 1, delay: 30}
-  skip_fail: false
-
-- description: Enable forward policy
-  cmd: iptables --policy FORWARD ACCEPT
-  node_name: {{ HOSTNAME_GTW01 }}
-  retry: {count: 1, delay: 30}
-  skip_fail: false
+{{ SHARED.INSTALL_DOCKER_ON_GTW() }}
 
 - description: create rc file on cfg
   cmd: scp ctl01:/root/keystonercv3 /root
diff --git a/tcp_tests/templates/cookied-mcp-newton-dvr/openstack.yaml b/tcp_tests/templates/cookied-mcp-newton-dvr/openstack.yaml
index e298fcf..7260beb 100644
--- a/tcp_tests/templates/cookied-mcp-newton-dvr/openstack.yaml
+++ b/tcp_tests/templates/cookied-mcp-newton-dvr/openstack.yaml
@@ -9,6 +9,7 @@
 {% set OVERRIDE_POLICY = os_env('OVERRIDE_POLICY', '') %}
 
 {% import 'shared-openstack.yaml' as SHARED_OPENSTACK with context %}
+{% import 'shared-salt.yaml' as SHARED with context %}
 
 # Install OpenStack control services
 
@@ -172,17 +173,7 @@
   retry: {count: 1, delay: 30}
   skip_fail: false
 
-- description: Install docker.io on gtw
-  cmd: salt-call cmd.run 'apt-get install docker.io -y'
-  node_name: {{ HOSTNAME_GTW01 }}
-  retry: {count: 1, delay: 30}
-  skip_fail: false
-
-- description: Enable forward policy
-  cmd: iptables --policy FORWARD ACCEPT
-  node_name: {{ HOSTNAME_GTW01 }}
-  retry: {count: 1, delay: 30}
-  skip_fail: false
+{{ SHARED.INSTALL_DOCKER_ON_GTW() }}
 
 - description: create rc file on cfg
   cmd: scp ctl01:/root/keystonercv3 /root
diff --git a/tcp_tests/templates/cookied-mcp-newton-ovs/openstack.yaml b/tcp_tests/templates/cookied-mcp-newton-ovs/openstack.yaml
index 52c0fdb..04871da 100644
--- a/tcp_tests/templates/cookied-mcp-newton-ovs/openstack.yaml
+++ b/tcp_tests/templates/cookied-mcp-newton-ovs/openstack.yaml
@@ -7,6 +7,7 @@
 {% from 'shared-salt.yaml' import IPV4_NET_TENANT_PREFIX with context %}
 
 {% import 'shared-openstack.yaml' as SHARED_OPENSTACK with context %}
+{% import 'shared-salt.yaml' as SHARED with context %}
 
 # Deploy nginx before openstack services (PROD-22740)
 - description: Deploy nginx proxy
@@ -194,17 +195,7 @@
   retry: {count: 1, delay: 30}
   skip_fail: false
 
-- description: Install docker.io on gtw
-  cmd: salt-call cmd.run 'apt-get install docker.io -y'
-  node_name: {{ HOSTNAME_GTW01 }}
-  retry: {count: 1, delay: 30}
-  skip_fail: false
-
-- description: Enable forward policy
-  cmd: iptables --policy FORWARD ACCEPT
-  node_name: {{ HOSTNAME_GTW01 }}
-  retry: {count: 1, delay: 30}
-  skip_fail: false
+{{ SHARED.INSTALL_DOCKER_ON_GTW() }}
 
 - description: create rc file on cfg
   cmd: scp ctl01:/root/keystonercv3 /root
diff --git a/tcp_tests/templates/cookied-mcp-ocata-dvr/openstack.yaml b/tcp_tests/templates/cookied-mcp-ocata-dvr/openstack.yaml
index acb9ef5..1e6fbd8 100644
--- a/tcp_tests/templates/cookied-mcp-ocata-dvr/openstack.yaml
+++ b/tcp_tests/templates/cookied-mcp-ocata-dvr/openstack.yaml
@@ -9,6 +9,7 @@
 {% set OVERRIDE_POLICY = os_env('OVERRIDE_POLICY', '') %}
 
 {% import 'shared-openstack.yaml' as SHARED_OPENSTACK with context %}
+{% import 'shared-salt.yaml' as SHARED with context %}
 
 # Install OpenStack control services
 
@@ -172,17 +173,7 @@
   retry: {count: 1, delay: 30}
   skip_fail: false
 
-- description: Install docker.io on gtw
-  cmd: salt-call cmd.run 'apt-get install docker.io -y'
-  node_name: {{ HOSTNAME_GTW01 }}
-  retry: {count: 1, delay: 30}
-  skip_fail: false
-
-- description: Enable forward policy
-  cmd: iptables --policy FORWARD ACCEPT
-  node_name: {{ HOSTNAME_GTW01 }}
-  retry: {count: 1, delay: 30}
-  skip_fail: false
+{{ SHARED.INSTALL_DOCKER_ON_GTW() }}
 
 - description: create rc file on cfg
   cmd: scp ctl01:/root/keystonercv3 /root
diff --git a/tcp_tests/templates/cookied-mcp-ocata-ovs/openstack.yaml b/tcp_tests/templates/cookied-mcp-ocata-ovs/openstack.yaml
index 8bc9c93..4072632 100644
--- a/tcp_tests/templates/cookied-mcp-ocata-ovs/openstack.yaml
+++ b/tcp_tests/templates/cookied-mcp-ocata-ovs/openstack.yaml
@@ -7,6 +7,7 @@
 {% from 'shared-salt.yaml' import IPV4_NET_TENANT_PREFIX with context %}
 
 {% import 'shared-openstack.yaml' as SHARED_OPENSTACK with context %}
+{% import 'shared-salt.yaml' as SHARED with context %}
 
 # Deploy nginx before openstack services (PROD-22740)
 - description: Deploy nginx proxy
@@ -148,17 +149,7 @@
   retry: {count: 1, delay: 30}
   skip_fail: false
 
-- description: Install docker.io on gtw
-  cmd: salt-call cmd.run 'apt-get install docker.io -y'
-  node_name: {{ HOSTNAME_GTW01 }}
-  retry: {count: 1, delay: 30}
-  skip_fail: false
-
-- description: Enable forward policy
-  cmd: iptables --policy FORWARD ACCEPT
-  node_name: {{ HOSTNAME_GTW01 }}
-  retry: {count: 1, delay: 30}
-  skip_fail: false
+{{ SHARED.INSTALL_DOCKER_ON_GTW() }}
 
 - description: create rc file on cfg
   cmd: scp ctl01:/root/keystonercv3 /root