From d0ff8a737111e9155fd59816afa5c4fc2b34bb4c Mon Sep 17 00:00:00 2001 From: Josh Kearney Date: Tue, 28 Jun 2011 16:54:25 -0500 Subject: Let glance handle sorting. --- nova/compute/manager.py | 5 ----- 1 file changed, 5 deletions(-) (limited to 'nova') 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 -- cgit