Dynamically generate gateway external address in dvr models

Currently reclass classify command fails to generate gateway
external ip dynamically, because it's hardcoded in reclass,
this patch fixes this in the same way as it was done for OVS
models.

Change-Id: Id838d05b8bb5bba19ad1566769ffdd07bf5c0771
Related-Prod: https://mirantis.jira.com/browse/PROD-20157
diff --git a/classes/cluster/virtual-mcp-pike-dvr-ssl-barbican/infra/config.yml b/classes/cluster/virtual-mcp-pike-dvr-ssl-barbican/infra/config.yml
index bcb6b77..e8a0313 100644
--- a/classes/cluster/virtual-mcp-pike-dvr-ssl-barbican/infra/config.yml
+++ b/classes/cluster/virtual-mcp-pike-dvr-ssl-barbican/infra/config.yml
@@ -144,6 +144,8 @@
           cluster_param:
             openstack_gateway_address:
               value_template: <<node_control_ip>>
+            openstack_gateway_node01_external_address:
+              value_template: <<node_external_ip>>
         openstack_dashboard:
           expression: <<node_hostname>>__startswith__prx
           node_class:
@@ -213,7 +215,7 @@
         openstack_gateway_node01:
           params:
             tenant_address: 10.1.0.110
-            external_address: 10.16.0.110
+            external_address: ${_param:openstack_gateway_node01_external_address}
         openstack_share_node01:
           params:
             single_address: 172.16.10.130
diff --git a/classes/cluster/virtual-mcp-pike-dvr-ssl-barbican/openstack/init.yml b/classes/cluster/virtual-mcp-pike-dvr-ssl-barbican/openstack/init.yml
index 02044b0..8c13d59 100644
--- a/classes/cluster/virtual-mcp-pike-dvr-ssl-barbican/openstack/init.yml
+++ b/classes/cluster/virtual-mcp-pike-dvr-ssl-barbican/openstack/init.yml
@@ -22,6 +22,7 @@
     openstack_message_queue_node03_address: ${_param:openstack_control_node03_address}
     openstack_gateway_address: 172.16.10.110
     openstack_gateway_node01_address: ${_param:openstack_gateway_address}
+    openstack_gateway_node01_external_address: 10.16.0.110
     openstack_dns_node01_address: 172.16.10.111
     openstack_dns_node02_address: 172.16.10.112
     openstack_share_node01_address: 172.16.10.130
diff --git a/classes/cluster/virtual-mcp-pike-dvr-ssl/infra/config.yml b/classes/cluster/virtual-mcp-pike-dvr-ssl/infra/config.yml
index cba3b5c..1078e0c 100644
--- a/classes/cluster/virtual-mcp-pike-dvr-ssl/infra/config.yml
+++ b/classes/cluster/virtual-mcp-pike-dvr-ssl/infra/config.yml
@@ -135,6 +135,8 @@
           cluster_param:
             openstack_gateway_address:
               value_template: <<node_control_ip>>
+            openstack_gateway_node01_external_address:
+              value_template: <<node_external_ip>>
         openstack_dashboard:
           expression: <<node_hostname>>__startswith__prx
           node_class:
@@ -201,7 +203,7 @@
         openstack_gateway_node01:
           params:
             tenant_address: 10.1.0.110
-            external_address: 10.16.0.110
+            external_address: ${_param:openstack_gateway_node01_external_address}
         openstack_share_node01:
           params:
             single_address: 172.16.10.130
diff --git a/classes/cluster/virtual-mcp-pike-dvr-ssl/openstack/init.yml b/classes/cluster/virtual-mcp-pike-dvr-ssl/openstack/init.yml
index 0e595dc..100da01 100644
--- a/classes/cluster/virtual-mcp-pike-dvr-ssl/openstack/init.yml
+++ b/classes/cluster/virtual-mcp-pike-dvr-ssl/openstack/init.yml
@@ -22,6 +22,7 @@
     openstack_message_queue_node03_address: ${_param:openstack_control_node03_address}
     openstack_gateway_address: 172.16.10.110
     openstack_gateway_node01_address: ${_param:openstack_gateway_address}
+    openstack_gateway_node01_external_address: 10.16.0.110
     openstack_dns_node01_address: 172.16.10.111
     openstack_dns_node02_address: 172.16.10.112
     openstack_share_node01_address: 172.16.10.130
diff --git a/classes/cluster/virtual-mcp-pike-dvr/infra/config.yml b/classes/cluster/virtual-mcp-pike-dvr/infra/config.yml
index 4f54445..6683c4b 100644
--- a/classes/cluster/virtual-mcp-pike-dvr/infra/config.yml
+++ b/classes/cluster/virtual-mcp-pike-dvr/infra/config.yml
@@ -151,6 +151,8 @@
           cluster_param:
             openstack_gateway_address:
               value_template: <<node_control_ip>>
+            openstack_gateway_node01_external_address:
+              value_template: <<node_external_ip>>
         openstack_dashboard:
           expression: <<node_hostname>>__startswith__prx
           node_class:
@@ -219,7 +221,7 @@
         openstack_gateway_node01:
           params:
             tenant_address: 10.1.0.110
-            external_address: 10.16.0.110
+            external_address: ${_param:openstack_gateway_node01_external_address}
         openstack_share_node01:
           params:
             single_address: 172.16.10.130
diff --git a/classes/cluster/virtual-mcp-pike-dvr/openstack/init.yml b/classes/cluster/virtual-mcp-pike-dvr/openstack/init.yml
index 934bf8f..a2b7bb5 100644
--- a/classes/cluster/virtual-mcp-pike-dvr/openstack/init.yml
+++ b/classes/cluster/virtual-mcp-pike-dvr/openstack/init.yml
@@ -22,6 +22,7 @@
     openstack_message_queue_node03_address: ${_param:openstack_control_node03_address}
     openstack_gateway_address: 172.16.10.110
     openstack_gateway_node01_address: ${_param:openstack_gateway_address}
+    openstack_gateway_node01_external_address: 10.16.0.110
     openstack_dns_node01_address: 172.16.10.111
     openstack_dns_node02_address: 172.16.10.112
     openstack_share_node01_address: 172.16.10.130