[lvm-devel] master - lvmdbusd: Remove sorting in db layer

tasleson tasleson at fedoraproject.org
Tue Jun 28 19:24:22 UTC 2016


Gitweb:        http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=4b337b20d47953e130edc8a456e9431eba58a778
Commit:        4b337b20d47953e130edc8a456e9431eba58a778
Parent:        e514284c65a7cffa24549a34612392731f6e06af
Author:        Tony Asleson <tasleson at redhat.com>
AuthorDate:    Mon Jun 6 15:08:20 2016 -0500
Committer:     Tony Asleson <tasleson at redhat.com>
CommitterDate: Tue Jun 28 12:09:28 2016 -0500

lvmdbusd: Remove sorting in db layer

When using the JSON this does not yield a totally sorted list as we don't
have a complete set of LVs, so remove this sort.
---
 daemons/lvmdbusd/lvmdb.py |    8 +-------
 1 files changed, 1 insertions(+), 7 deletions(-)

diff --git a/daemons/lvmdbusd/lvmdb.py b/daemons/lvmdbusd/lvmdb.py
index 5ac90e3..f070bb6 100755
--- a/daemons/lvmdbusd/lvmdb.py
+++ b/daemons/lvmdbusd/lvmdb.py
@@ -245,16 +245,10 @@ class DataStore(object):
 		# Each item item in the report is a collection of information pertaining
 		# to the vg
 		for r in _all['report']:
-			tmp_lv = []
 			# Get the lv data for this VG.
 			if 'lv' in r:
-				tmp_lv.extend(r['lv'])
-
-				# Sort them
-				sorted_tmp_lv = sorted(tmp_lv, key=lambda vk: vk['lv_name'])
-
 				# Add them to result set
-				for i in sorted_tmp_lv:
+				for i in r['lv']:
 					full_name = "%s/%s" % (i['vg_name'], i['lv_name'])
 					c_lv_full_lookup[full_name] = i['lv_uuid']
 					c_lvs[i['lv_uuid']] = i




More information about the lvm-devel mailing list