If OS_REGION_NAME is set in the environment, pass it to the API/CLI
along with the other credentials. This allows selecting a non-default
region for multi-region clouds.
Change-Id: I19ed33fe1428b97b6aa526fc19b6b592e1a11ca9
Closes-Bug: 1540535
Signed-off-by: Simon Leinen <simon.leinen@gmail.com>
listorphans.py lists orphaned Neutron objects. 'Orphans' in this
context are objects which OpenStack knows about and manages but which do
not have a valid project (tenant) ID.
The previous version was very inefficient in that for every object being
checked, it would do a discrete Keystone API call to see if the
associated tenant ID was valid or not. For an installation of any
reasonable size, i.e one with 100s of Neutron routers, this method was
particularly slow.
The script has been updated to first build a list of all tenant IDs, and
then for every Neutron object check project ownership validity against
this list instead.
Output has also changed slightly to print out a list of discovered
orphans, simplifying workflow e.g when piping to another command which
cleans up these objects.
Closes-Bug: #1515300
Change-Id: I72ca84fe48beb623d43ee446a32ea1bb30730bcc
listorphans.py lists certain 'orphaned' objects - routers, floating IPs,
subnets, and networks - present in Neutron. Orphans in this context are
objects that exist but whose project ID is no longer valid, e.g tenants
that have been deleted.
Change-Id: I41ea6f115d0b7a1a84e7f23005d333d39b800beb