Skip to content

Instantly share code, notes, and snippets.

@cloudnull
Created March 11, 2014 00:00
Show Gist options
  • Save cloudnull/9476989 to your computer and use it in GitHub Desktop.
Save cloudnull/9476989 to your computer and use it in GitHub Desktop.
# Reset nova endpoints
function reset_nova_endpoint() {
set +e
echo "Resetting Nova Endpoints"
# Load the Openstack Credentials
MYSQLCRD="/root/.my.cnf"
USERNAME="$(awk -F'=' '/user/ {print $2}' ${MYSQLCRD})"
PASSWORD="$(awk -F'=' '/password/ {print $2}' ${MYSQLCRD})"
NUKECMD="delete from endpoint where region=\"RegionOne\";"
mysql -u "${USERNAME}" -p"${PASSWORD}" -o keystone -e "${NUKECMD}"
set -e
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment