def f(): mover = self.get_mover_1() VNXCifsShare.create(t_nas(), 'test_zhuanc', 'CIFS', mover, path='/test_zhuanc')
def test_get_by_mover(self): mover = self.get_mover_1() shares = VNXCifsShare.get(cli=t_nas(), mover=mover) for share in shares: assert_that(share.mover.get_mover_id(), equal_to(mover.get_mover_id())) assert_that(share.mover.is_vdm, equal_to(mover.is_vdm))
def test_get_by_mover(self): mover = self.get_mover_1() shares = VNXCifsShare.get(cli=t_nas(), mover=mover) for share in shares: assert_that(share.mover.get_mover_id(), equal_to(mover.get_mover_id())) assert_that(share.mover.is_vdm, equal_to(mover.is_vdm))
def f(): share = VNXCifsShare(name='yyy', mover=self.get_mover_1(), cli=t_nas()) share.remove('CIFS')
def test_remove_success(self): share = VNXCifsShare(name='zzz', mover=self.get_mover_1(), cli=t_nas()) resp = share.remove() assert_that(resp.is_ok(), equal_to(True))
def get_cifs_share(self, name=None, mover=None, server_name=None): return VNXCifsShare.get( self._file_cli, name=name, mover=mover, server_name=server_name)
def test_get_by_share_name(self): shares = VNXCifsShare.get(cli=t_nas(), name='zhuanc_cifs_100g') assert_that(len(shares), equal_to(1)) self.verify_share_zhuanc(shares[0])
def test_delete_success(self): share = VNXCifsShare(name='zzz', mover=self.get_mover_1(), cli=t_nas()) resp = share.delete() assert_that(resp.is_ok(), equal_to(True))
def f(): mover = self.get_mover_1() VNXCifsShare.create(t_nas(), 'test_zhuanc', 'CIFS', mover, path='/test_zhuanc')
def test_get_not_found(self): mover = self.get_mover_1() cifs = VNXCifsShare.get(name='not_exists', mover=mover, cli=t_nas()) assert_that(cifs.existed, equal_to(False))
def test_get_cifs_share(self): mover = self.get_mover_1() share = VNXCifsShare.get(name='zhuanc_cifs_100g', mover=mover, cli=t_nas()) self.verify_share_zhuanc(share)
def test_get_by_share_name(self): shares = VNXCifsShare.get(cli=t_nas(), name='zhuanc_cifs_100g') assert_that(len(shares), equal_to(1)) self.verify_share_zhuanc(shares[0])
def test_get_all(self): shares = VNXCifsShare.get(cli=t_nas()) assert_that(len(shares), equal_to(16)) share = next(s for s in shares if s.name == 'zhuanc_cifs_100g') self.verify_share_zhuanc(share)
def f(): share = VNXCifsShare(name='yyy', mover=self.get_mover_1(), cli=t_nas()) share.delete('CIFS')
def test_get_cifs_share(self): mover = self.get_mover_1() share = VNXCifsShare(name='zhuanc_cifs_100g', mover=mover, cli=t_nas()) self.verify_share_zhuanc(share)
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'))
def test_get_not_found(self): mover = self.get_mover_1() cifs = VNXCifsShare(name='not_exists', mover=mover, cli=t_nas()) assert_that(cifs.existed, equal_to(False))
def test_get_all(self): shares = VNXCifsShare.get(cli=t_nas()) assert_that(len(shares), equal_to(16)) share = next(s for s in shares if s.name == 'zhuanc_cifs_100g') self.verify_share_zhuanc(share)
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'))
def get_cifs_share(self, name=None, mover=None, server_name=None): return VNXCifsShare.get(self._file_cli, name=name, mover=mover, server_name=server_name)