示例#1
0
文件: system.py 项目: crook/storops
 def get_file_system_snap(self, name=None, snap_id=None):
     return VNXFsSnap.get(cli=self._file_cli, name=name, snap_id=snap_id)
示例#2
0
文件: fs.py 项目: thotypous/storops
 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)
示例#3
0
 def f():
     VNXFsSnap.create(t_nas(), 'Tan_Manual_CheckPoint', 228, 61)
示例#4
0
 def test_remove(self):
     snap = VNXFsSnap(name='test', cli=t_nas())
     resp = snap.remove()
     assert_that(resp.is_ok(), equal_to(True))
示例#5
0
 def test_get_by_id(self):
     snap = VNXFsSnap(snap_id=230, cli=t_nas())
     self.verify_snap_230(snap)
示例#6
0
 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))
示例#7
0
 def test_get_by_id_not_found(self):
     snap = VNXFsSnap(snap_id=111, cli=t_nas())
     assert_that(snap.existed, equal_to(False))
示例#8
0
 def test_get_by_name_not_found(self):
     snap = VNXFsSnap(name='aaa', cli=t_nas())
     assert_that(snap.existed, equal_to(False))
示例#9
0
 def test_get_by_name(self):
     snap = VNXFsSnap(name='ESA', cli=t_nas())
     self.verify_snap_230(snap)
示例#10
0
 def get_file_system_snap(self, name=None, snap_id=None):
     return VNXFsSnap.get(cli=self._file_cli, name=name, snap_id=snap_id)
示例#11
0
 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)