def f(): VNXFileSystem.create(t_nas(), 'test18', size_kb=1, pool=0, mover=1, is_vdm=True)
def test_create_filesystem(self): ret = VNXFileSystem.create(t_nas(), 'test14', size_kb=1024 * 5, pool=61, mover=1) assert_that(ret, instance_of(VNXFileSystem))
def test_get(self): fs = VNXFileSystem('fs_src0', cli=t_nas()) self.verify_fs_src0(fs)
def f(): fs = VNXFileSystem.get(name='fs_src0', cli=t_nas()) assert_that(fs.existed, equal_to(False))
def test_create_fs_snap(self): fs = VNXFileSystem(cli=t_nas(), fs_id=222) snap = fs.create_snap('test', pool=61) assert_that(snap.name, equal_to('test')) assert_that(snap.fs_id, equal_to(222)) assert_that(snap.existed, equal_to(True))
def test_extend_fs(self): fs = VNXFileSystem(cli=t_nas(), fs_id=243) resp = fs.extend(1024 * 4) assert_that(resp.is_ok(), equal_to(True))
def f(): VNXFileSystem.create(t_nas(), 'test15', size_kb=1024**2 * 5, pool=59, mover=1)
def get_file_system(self, name=None, fs_id=None): return VNXFileSystem.get(cli=self._file_cli, name=name, fs_id=fs_id)
def f(): VNXFileSystem.create(t_nas(), 'test13', size_kb=1024 * 5, pool=61, mover=6)
def f(): VNXFileSystem.create(t_nas(), 'test15', size_kb=1024 ** 2 * 5, pool=59, mover=1)
def f(): VNXFileSystem.create(t_nas(), 'test16', size_kb=1, pool=59, mover=1)
def create(cls, cli, path, fs, mover): fs_id = VNXFileSystem.get_id(fs) resp = cli.create_fs_mp(path, fs_id, mover.get_mover_id(), mover.is_vdm) resp.raise_if_err() return VNXFsMountPoint(mover, path, cli)
def f(): fs = VNXFileSystem(fs_id=99, cli=t_nas()) fs.delete()
def test_clz_get_all(self): fs_list = VNXFileSystem.get(cli=t_nas()) assert_that(len(fs_list), equal_to(25))
def test_get_not_found(self): fs = VNXFileSystem('abc', cli=t_nas()) assert_that(fs._get_name(), equal_to('abc')) assert_that(fs.existed, equal_to(False))
def filesystem(self): return VNXFileSystem(fs_id=self.fs_id, cli=self._cli)
def f(): VNXFileSystem.create(t_nas(), 'EG_TEST_POOL', size_kb=1024 * 2 * 5, pool=32, mover=1)
def test_clz_get_fs(self): fs = VNXFileSystem.get(name='fs_src0', cli=t_nas()) self.verify_fs_src0(fs)
def f(): fs = VNXFileSystem(cli=t_nas(), fs_id=243) fs.extend(1024 * 2)
def f(): fs = VNXFileSystem(fs_id=99, cli=t_nas()) fs.remove()
def test_clz_get_fs_success(self): fs = VNXFileSystem.get(name='fs_src0', cli=t_nas()) self.verify_fs_src0(fs)
def test_remove_fs_success(self): fs = VNXFileSystem(fs_id=98, cli=t_nas()) resp = fs.remove() assert_that(resp.is_ok(), equal_to(True))
def test_get_by_id(self): fs = VNXFileSystem(fs_id=27, cli=t_nas()) assert_that(fs.existed, equal_to(True)) assert_that(fs.volume, equal_to(125))
def test_delete_fs_success(self): fs = VNXFileSystem(fs_id=98, cli=t_nas()) resp = fs.delete() assert_that(resp.is_ok(), equal_to(True))
def test_create_success(self): fs = VNXFileSystem(name='zzz', cli=t_nas()) mover = self.get_mover_1() share = VNXCifsShare.create(t_nas(), fs, 'CIFS', mover) assert_that(share.path, equal_to('\zzz'))