Ejemplo n.º 1
0
 def test_single_pv_is_matched_by_uuid(self, volumes, monkeypatch):
     FooVolume = api.Volume(
         lv_name='foo', lv_path='/dev/vg/foo',
         lv_uuid='1111', lv_tags="ceph.type=data")
     volumes.append(FooVolume)
     monkeypatch.setattr(api, 'Volumes', lambda: volumes)
     assert api.get_lv(lv_uuid='1111') == FooVolume
Ejemplo n.º 2
0
 def test_single_lv_is_matched_by_uuid(self, volumes, monkeypatch):
     FooVolume = api.Volume(
         lv_name='foo', lv_path='/dev/vg/foo',
         lv_uuid='1111', lv_tags="ceph.type=data")
     volumes.append(FooVolume)
     monkeypatch.setattr(api, 'Volumes', lambda: volumes)
     assert api.get_lv(lv_uuid='1111') == FooVolume
Ejemplo n.º 3
0
 def test_nothing_is_passed_in(self):
     # so we return a None
     assert api.get_lv() is None