Skip to content

Instantly share code, notes, and snippets.

@cloudnull
Last active December 31, 2015 23:29
Show Gist options
  • Save cloudnull/8060291 to your computer and use it in GitHub Desktop.
Save cloudnull/8060291 to your computer and use it in GitHub Desktop.
delete keystone endpoints in MySQL
function reset_nova_endpoint() {
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}"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment