Remove suffixes from LVM brick test vgs output
When fake_execute() is called to retrieve volume group information, the --nosuffix flag is passed but ignored. This patch honors the nosuffix flag and removes the unit suffix from the volume group sizes in the returned output. Change-Id: I45f41bc58f4ffb4bd527336c0f760350cff7c355
This commit is contained in:
parent
b9298d2517
commit
a3ebe1fbaf
@ -75,15 +75,16 @@ class BrickLvmTestCase(test.TestCase):
|
||||
data = " LVM version: 2.02.95(2) (2012-03-06)\n"
|
||||
elif 'vgs, --noheadings, -o uuid, fake-volumes' in cmd_string:
|
||||
data = " kVxztV-dKpG-Rz7E-xtKY-jeju-QsYU-SLG6Z1\n"
|
||||
elif 'vgs, --noheadings, --unit=g, -o, name,size,free,lv_count,uuid'\
|
||||
in cmd_string:
|
||||
data = " fake-volumes:10.00g:10.00g:0:"\
|
||||
elif 'vgs, --noheadings, --unit=g, ' \
|
||||
'-o, name,size,free,lv_count,uuid, ' \
|
||||
'--separator, :, --nosuffix' in cmd_string:
|
||||
data = " fake-volumes:10.00:10.00:0:"\
|
||||
"kVxztV-dKpG-Rz7E-xtKY-jeju-QsYU-SLG6Z1\n"
|
||||
if 'fake-volumes' in cmd_string:
|
||||
return (data, "")
|
||||
data += " fake-volumes-2:10.00g:10.00g:0:"\
|
||||
data += " fake-volumes-2:10.00:10.00:0:"\
|
||||
"lWyauW-dKpG-Rz7E-xtKY-jeju-QsYU-SLG7Z2\n"
|
||||
data += " fake-volumes-3:10.00g:10.00g:0:"\
|
||||
data += " fake-volumes-3:10.00:10.00:0:"\
|
||||
"mXzbuX-dKpG-Rz7E-xtKY-jeju-QsYU-SLG8Z3\n"
|
||||
elif 'lvs, --noheadings, --unit=g, -o, vg_name,name,size'\
|
||||
in cmd_string:
|
||||
|
Loading…
Reference in New Issue
Block a user