summaryrefslogtreecommitdiffstats
path: root/nova
diff options
context:
space:
mode:
authorJosh Kearney <josh@jk0.org>2011-06-28 16:54:25 -0500
committerJosh Kearney <josh@jk0.org>2011-06-28 16:54:25 -0500
commitd0ff8a737111e9155fd59816afa5c4fc2b34bb4c (patch)
treeb13bbf63311e6a484c35d4e6d83d3871a79052de /nova
parent2916aa40f6dc0b06217ff7d3750ecdd3bb03e4fd (diff)
downloadnova-d0ff8a737111e9155fd59816afa5c4fc2b34bb4c.tar.gz
nova-d0ff8a737111e9155fd59816afa5c4fc2b34bb4c.tar.xz
nova-d0ff8a737111e9155fd59816afa5c4fc2b34bb4c.zip
Let glance handle sorting.
Diffstat (limited to 'nova')
-rw-r--r--nova/compute/manager.py5
1 files changed, 0 insertions, 5 deletions
diff --git a/nova/compute/manager.py b/nova/compute/manager.py
index fdb231e9e..f81e793fe 100644
--- a/nova/compute/manager.py
+++ b/nova/compute/manager.py
@@ -43,7 +43,6 @@ import time
import functools
from eventlet import greenthread
-from operator import itemgetter
from nova import exception
from nova import flags
@@ -570,10 +569,6 @@ class ComputeManager(manager.SchedulerDependentManager):
LOG.debug(_("Found %(num_images)d images (rotation: %(rotation)d)"
% locals()))
if num_images > rotation:
- # TODO(jk0): Use db-level sorting in glance when it hits trunk.
- # Sort oldest (by created_at) to end of list
- images.sort(key=itemgetter('created_at'), reverse=True)
-
# NOTE(sirp): this deletes all backups that exceed the rotation
# limit
excess = len(images) - rotation