0

neutron router-gateway-clear was to command to use till neutron cli was deprecated:

neutron CLI is deprecated and will be removed in the future. Use openstack CLI instead.

So my question is how to perform a cleanup using the new openstack client?

sorin
  • 161,544
  • 178
  • 535
  • 806

1 Answers1

1

It seems that I was able to do this but it did involve a lot of code:

  openstack router unset --external-gateway $ROUTER
  for PORT in $(openstack port list --router $ROUTER --format=value -c ID)
  do
    openstack router remove port $ROUTER $PORT
  done
  openstack router delete $ROUTER

This became part of the osclean utility that wipes openstack projects based on resource names.

sorin
  • 161,544
  • 178
  • 535
  • 806