Merge "Cleanup orphaned code from brick LVM"

This commit is contained in:
Jenkins 2016-03-25 17:30:12 +00:00 committed by Gerrit Code Review
commit e6e908f445
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,