Add support for OS_* environment vars

Add the OS_* env variables to mirror the NOVA_* vars; example:
setting OS_USERNAME will override NOVA_USERNAME in the clients and
tools, but if left unset it defaults to NOVA_USERNAME.

Adds exercises/client-env.sh to test operation of command-line
clients with only the OS_* variables set

Addresses bug 897304, http://wiki.openstack.org/CLIAuth

Change-Id: I72450153541072fe8026a82748cfcd1cf5ed31d8
diff --git a/openrc b/openrc
index 195a8fe..4c4b1d3 100644
--- a/openrc
+++ b/openrc
@@ -12,20 +12,27 @@
 # should be listening on HOST_IP.  If its running elsewhere, it can be set here
 GLANCE_HOST=${GLANCE_HOST:-$HOST_IP}
 
+# novaclient now supports the new OS_* configuration variables in addition to
+# the older NOVA_* variables.  Set them both for now...
+
 # Nova original used project_id as the *account* that owned resources (servers,
 # ip address, ...)   With the addition of Keystone we have standardized on the
 # term **tenant** as the entity that owns the resources.  **novaclient** still
 # uses the old deprecated terms project_id.  Note that this field should now be
 # set to tenant_name, not tenant_id.
 export NOVA_PROJECT_ID=${TENANT:-demo}
+export OS_TENANT_NAME=${NOVA_PROJECT_ID}
 
 # In addition to the owning entity (tenant), nova stores the entity performing
 # the action as the **user**.
 export NOVA_USERNAME=${USERNAME:-demo}
+export OS_USERNAME=${NOVA_USERNAME}
 
 # With Keystone you pass the keystone password instead of an api key.
-# The most recent versions of novaclient use NOVA_PASSWORD instead of NOVA_API_KEY
+# Recent versions of novaclient use NOVA_PASSWORD instead of NOVA_API_KEY
+# The most recent versions of novaclient use OS_PASSWORD in addition to NOVA_PASSWORD
 export NOVA_PASSWORD=${ADMIN_PASSWORD:-secrete}
+export OS_PASSWORD=${NOVA_PASSWORD}
 
 # With the addition of Keystone, to use an openstack cloud you should
 # authenticate against keystone, which returns a **Token** and **Service
@@ -36,6 +43,7 @@
 # *NOTE*: Using the 2.0 *auth api* does not mean that compute api is 2.0.  We
 # will use the 1.1 *compute api*
 export NOVA_URL=${NOVA_URL:-http://$SERVICE_HOST:5000/v2.0/}
+export OS_AUTH_URL=${NOVA_URL}
 
 # Currently novaclient needs you to specify the *compute api* version.  This
 # needs to match the config of your catalog returned by Keystone.