Cleanup orphaned code from brick LVM

There were several methods in the brick lvm code that were no longer
being used anywhere. While some of these have potential for being useful,
they are not in use and should not be sitting around the codebase waiting
for someone to need them.

This patch removes unused methods as well as their associated unit tests.

Change-Id: Ib3aba7b6b51a525855c5357e4164478f26e9ee98
This commit is contained in:
Sean McGinnis 2015-11-26 23:40:25 -06:00
parent 65a6c40b6e
commit 54bc59520f
3 changed files with 0 additions and 32 deletions

View File

@ -138,17 +138,6 @@ class LVM(executor.Executor):
cmd = ['vgcreate', self.vg_name, ','.join(pv_list)]
self._execute(*cmd, root_helper=self._root_helper, run_as_root=True)
def _get_vg_uuid(self):
cmd = LVM.LVM_CMD_PREFIX + ['vgs', '--noheadings',
'-o', 'uuid', self.vg_name]
(out, _err) = self._execute(*cmd,
root_helper=self._root_helper,
run_as_root=True)
if out is not None:
return out.split()
else:
return []
def _get_thin_pool_free_space(self, vg_name, thin_pool_name):
"""Returns available thin pool free space.
@ -352,16 +341,6 @@ class LVM(executor.Executor):
'available': float(fields[3])})
return pv_list
def get_physical_volumes(self):
"""Get all PVs associated with this instantiation (VG).
:returns: List of Dictionaries with PV info
"""
self.pv_list = self.get_all_physical_volumes(self._root_helper,
self.vg_name)
return self.pv_list
@staticmethod
def get_all_volume_groups(root_helper, vg_name=None):
"""Static method to get all VGs on a system.

View File

@ -31,9 +31,6 @@ class FakeBrickLVM(object):
def get_all_physical_volumes(vg_name=None):
return []
def get_physical_volumes(self):
return []
def update_volume_group_info(self):
pass

View File

@ -168,10 +168,6 @@ class BrickLvmTestCase(test.TestCase):
def test_vg_exists(self):
self.assertTrue(self.vg._vg_exists())
def test_get_vg_uuid(self):
self.assertEqual('kVxztV-dKpG-Rz7E-xtKY-jeju-QsYU-SLG6Z1',
self.vg._get_vg_uuid()[0])
def test_get_all_volumes(self):
out = self.vg.get_volumes()
@ -227,10 +223,6 @@ class BrickLvmTestCase(test.TestCase):
pvs = self.vg.get_all_physical_volumes('sudo')
self.assertEqual(4, len(pvs))
def test_get_physical_volumes(self):
pvs = self.vg.get_physical_volumes()
self.assertEqual(3, len(pvs))
def test_get_volume_groups(self):
self.assertEqual(3, len(self.vg.get_all_volume_groups('sudo')))
self.assertEqual(1,