def get_file_system_snap(self, name=None, snap_id=None): return VNXFsSnap.get(cli=self._file_cli, name=name, snap_id=snap_id)
def create_snap(self, name, pool=None): if pool is None and self.pools: pool = self.pools[0] return VNXFsSnap.create(cli=self._cli, name=name, fs=self, pool=pool)
def f(): VNXFsSnap.create(t_nas(), 'Tan_Manual_CheckPoint', 228, 61)
def test_remove(self): snap = VNXFsSnap(name='test', cli=t_nas()) resp = snap.remove() assert_that(resp.is_ok(), equal_to(True))
def test_get_by_id(self): snap = VNXFsSnap(snap_id=230, cli=t_nas()) self.verify_snap_230(snap)
def test_create(self): snap = VNXFsSnap.create(t_nas(), 'test', 222, 61) assert_that(snap.name, equal_to('test')) assert_that(snap.fs_id, equal_to(222)) assert_that(snap.snap_id, equal_to(242))
def test_get_by_id_not_found(self): snap = VNXFsSnap(snap_id=111, cli=t_nas()) assert_that(snap.existed, equal_to(False))
def test_get_by_name_not_found(self): snap = VNXFsSnap(name='aaa', cli=t_nas()) assert_that(snap.existed, equal_to(False))
def test_get_by_name(self): snap = VNXFsSnap(name='ESA', cli=t_nas()) self.verify_snap_230(snap)
def test_get_all(self): snap_list = VNXFsSnap.get(t_nas()) snap = next(snap for snap in snap_list if snap.snap_id == 230) self.verify_snap_230(snap)