Guest User

Untitled

a guest
Feb 28th, 2016
28
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.86 KB | None | 0 0
  1. #!/usr/bin/env bash
  2. #
  3. # source openrc [username] [tenantname]
  4. #
  5. # Configure a set of credentials for $TENANT/$USERNAME:
  6. # Set OS_TENANT_NAME to override the default tenant 'demo'
  7. # Set OS_USERNAME to override the default user name 'demo'
  8. # Set ADMIN_PASSWORD to set the password for 'admin' and 'demo'
  9.  
  10. # NOTE: support for the old NOVA_* novaclient environment variables has
  11. # been removed.
  12.  
  13. if [[ -n "$1" ]]; then
  14. OS_USERNAME=$1
  15. fi
  16. if [[ -n "$2" ]]; then
  17. OS_TENANT_NAME=$2
  18. fi
  19.  
  20. # Find the other rc files
  21. RC_DIR=$(cd $(dirname "${BASH_SOURCE:-$0}") && pwd)
  22.  
  23. # Import common functions
  24. source $RC_DIR/functions
  25.  
  26. # Load local configuration
  27. source $RC_DIR/stackrc
  28.  
  29. # Load the last env variables if available
  30. if [[ -r $RC_DIR/.stackenv ]]; then
  31. source $RC_DIR/.stackenv
  32. fi
  33.  
  34. # Get some necessary configuration
  35. source $RC_DIR/lib/tls
  36.  
  37. # The introduction of Keystone to the OpenStack ecosystem has standardized the
  38. # term **tenant** as the entity that owns resources. In some places references
  39. # still exist to the original Nova term **project** for this use. Also,
  40. # **tenant_name** is preferred to **tenant_id**.
  41. export OS_TENANT_NAME=${OS_TENANT_NAME:-demo}
  42.  
  43. # In addition to the owning entity (tenant), nova stores the entity performing
  44. # the action as the **user**.
  45. export OS_USERNAME=${OS_USERNAME:-demo}
  46.  
  47. # With Keystone you pass the keystone password instead of an api key.
  48. # Recent versions of novaclient use OS_PASSWORD instead of NOVA_API_KEYs
  49. # or NOVA_PASSWORD.
  50. export OS_PASSWORD=${ADMIN_PASSWORD:-secrete}
  51.  
  52. # Don't put the key into a keyring by default. Testing for development is much
  53. # easier with this off.
  54. export OS_NO_CACHE=${OS_NO_CACHE:-1}
  55.  
  56. # Region
  57. export OS_REGION_NAME=${REGION_NAME:-RegionOne}
  58.  
  59. # Set the host API endpoint. This will default to HOST_IP if SERVICE_IP_VERSION
  60. "dev/devstack/openrc" 101L, 3694C
Add Comment
Please, Sign In to add comment