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:
@@ -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 = []
|
||||
|
||||
|
||||
Reference in New Issue
Block a user