Skip to content

Instantly share code, notes, and snippets.

@iokiwi
Last active May 29, 2020 09:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iokiwi/dd2821556a7ba6615ef4ff9fbbcc60b0 to your computer and use it in GitHub Desktop.
Save iokiwi/dd2821556a7ba6615ef4ff9fbbcc60b0 to your computer and use it in GitHub Desktop.
# Script for clearing all openstack environment variables.
#
# Usage:
# source reset.sh
# source reset.sh && source openrc.sh
echo "Resetting..."
unset OS_REGION_NAME
unset OS_AUTH_TOKEN
unset OS_AUTH_URL
unset OS_PROJECT_ID
unset OS_AUTH_TYPE
unset OS_SESSIONS_DIR
unset OS_TOKEN
unset OS_IDENTITY_API_VERSION
unset OS_PROJECT_DOMAIN_ID
unset OS_USERNAME
unset OS_USER_DOMAIN_NAME
unset OS_PROJECT_NAME
unset OS_PASSWORD
unset script_name
unset SCRIPT_SOURCE
# Doesn't work for ZSH.
unset -f debug
unset -f warning
unset -f error
unset -f success
unset -f prompt_password
unset -f prompt_mfa_passcode
unset -f parse_arguments
unset -f parse_token
unset -f get_cloud_token
echo "Current vars"
echo "----- BEGIN -----"
env | grep OS_
echo "----- END -----\n"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment