1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-10-27 10:25:13 +03:00

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.
This commit is contained in:
Tony Asleson 2016-06-06 15:08:20 -05:00
parent e514284c65
commit 4b337b20d4

View File

@ -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