Commit Graph

8 Commits

Author SHA1 Message Date
Sean McGinnis 537bc74d55
Retire repo and note new content in openstack/osops
Change-Id: I8a36e470dfcf2e5db0a702d371b98cd94082bb4d
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-09-14 09:08:50 -05:00
mathieu 507e2cb80b Fix missed variable rename 'object'
Change-Id: I93d72ce8da31f1f3544be3bd4a5e4926a23af61e
Closes-Bug: #1745041
2018-01-23 17:14:00 -05:00
Robert Putt 0b0d2ad937 Refactoring Neutron Orphan Scripts
Changes include:
 - Flake8 compliance
 - Python 3 compatibility
 - Remove usage of Python keywords for variables
 - Addition of usage instructions
 - Addition of requirements file

Change-Id: Ibedc4678af8e5f3c38c7b693a8c5559232de8cd8
2017-03-03 18:07:37 +00:00
Simon Leinen 495b081f7f Region support for Neutron scripts
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>
2016-02-01 20:19:59 +01:00
Nick Jones f243b8c739 Address performance issues with listorphans.py script
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
2015-11-11 21:35:04 +00:00
Kurt Payne feb571c985 Add a dry-run flag. Fix inconsistency with 'list' and 'delete' orphans
Closes-Bug: #1501965

Change-Id: If9b6af6397512c6e55aaf1116b3788d23a4f3551
2015-10-02 10:49:27 -07:00
Nick Jones d221811d03 Initial commit of listorphans.py script
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
2015-09-30 10:20:04 +01:00
Aaron Rosen 70fbf8e9d4 Add delete_orphan_floatingips script
This script is useful to cleanup floatingips that are not
mapped to any neutron ports.
2015-03-24 13:20:04 -07:00