Add ability to see deleted and active records.

Fixes bug #900564

Changes `Context`.`read_deleted` from a bool to an enum string with values
"yes" (can read deleted records), "no" (cannot read deleted records), and
"only" (can only see deleted records, for backwards compatibility).

Change-Id: Ic81db3664c33f23f751b73973782efb06fce90d9
This commit is contained in:
Rick Harris
2011-12-07 16:06:31 -06:00
parent ac28241bca
commit 609af56b7c

View File

@@ -129,8 +129,7 @@ def get_instance_id_from_name_label(name_label, template):
def find_orphaned_instances(session, verbose=False):
"""Find and return a list of orphaned instances."""
ctxt = context.get_admin_context()
ctxt.read_deleted = True
ctxt = context.get_admin_context(read_deleted="only")
orphaned_instances = []