From f047da828a4b4c3bcb3c5ac3f992392ef9426c76 Mon Sep 17 00:00:00 2001
From: Kevin Carter <kevin.carter@rackspace.com>
Date: Mon, 17 Nov 2014 14:30:32 -0600
Subject: [PATCH] Added nova console variable

Added specific console variable to the config and provided and example of how to use the new variable.
The variable is "nova_console_endpoint" variable

Resolves Issue #409
---
 etc/rpc_deploy/user_variables.yml                             | 4 ++++
 .../openstack_service_vars/nova_spice_console_endpoint.yml    | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/etc/rpc_deploy/user_variables.yml b/etc/rpc_deploy/user_variables.yml
index 3d40ef3832..505df6ffe0 100644
--- a/etc/rpc_deploy/user_variables.yml
+++ b/etc/rpc_deploy/user_variables.yml
@@ -140,6 +140,10 @@ nova_service_password:
 nova_v3_service_password:
 nova_s3_service_password:
 
+# Uncomment "nova_console_endpoint" to define a specific nova console URI or 
+# IP address this will construct the specific proxy endpoint for the console.
+# nova_console_endpoint: console.company_domain.name
+
 
 ## RPC Support
 rpc_support_holland_password:
diff --git a/rpc_deployment/vars/openstack_service_vars/nova_spice_console_endpoint.yml b/rpc_deployment/vars/openstack_service_vars/nova_spice_console_endpoint.yml
index f5a41cb790..1a4912464e 100644
--- a/rpc_deployment/vars/openstack_service_vars/nova_spice_console_endpoint.yml
+++ b/rpc_deployment/vars/openstack_service_vars/nova_spice_console_endpoint.yml
@@ -13,6 +13,6 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-nova_html5proxy_base_url: "http://{{ external_vip_address }}:6082/spice_auto.html"
+nova_html5proxy_base_url: "http://{{ nova_console_endpoint|default(external_vip_address) }}:6082/spice_auto.html"
 nova_console_keymap: en-us
 nova_console_agent_enabled: True