diff options
| author | Rick Harris <rconradharris@gmail.com> | 2011-12-07 16:06:31 -0600 |
|---|---|---|
| committer | Rick Harris <rconradharris@gmail.com> | 2011-12-07 16:06:31 -0600 |
| commit | c40ee5cfe75e8b1209dc53fc7eb2097812efa54e (patch) | |
| tree | 657bd8f5a633bd69b9eba0649e513486bbb91306 /tools | |
| parent | c3b7cce8101548428b64abb23ab88482bc79c36e (diff) | |
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
Diffstat (limited to 'tools')
| -rwxr-xr-x | tools/xenserver/vm_vdi_cleaner.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/tools/xenserver/vm_vdi_cleaner.py b/tools/xenserver/vm_vdi_cleaner.py index 24553fd75..6b9213e40 100755 --- a/tools/xenserver/vm_vdi_cleaner.py +++ b/tools/xenserver/vm_vdi_cleaner.py @@ -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 = [] |
