예제 #1
0
 def f():
     host_config = NfsHostConfig(root_hosts=['1.1.1.1', '2.2.2.2'],
                                 ro_hosts=['3.3.3.3'],
                                 rw_hosts=['4.4.4.4', '5.5.5.5'],
                                 access_hosts=['6.6.6.6'])
     mover = self.get_mover_1()
     share = VNXNfsShare(cli=t_nas(), mover=mover, path='/not_found')
     share.modify(ro=False, host_config=host_config)
예제 #2
0
 def f():
     host_config = NfsHostConfig(
         root_hosts=['1.1.1.1', '2.2.2.2'],
         ro_hosts=['3.3.3.3'],
         rw_hosts=['4.4.4.4', '5.5.5.5'],
         access_hosts=['6.6.6.6'])
     mover = self.get_mover_1()
     share = VNXNfsShare(cli=t_nas(), mover=mover, path='/not_found')
     share.modify(ro=False, host_config=host_config)
예제 #3
0
 def test_create_success(self):
     mover = self.get_mover_1()
     share = VNXNfsShare.create(cli=t_nas(), mover=mover, path='/EEE')
     assert_that(share.path, equal_to('/EEE'))
     assert_that(share.mover_id, equal_to(1))
     assert_that(share.existed, equal_to(True))
     assert_that(share.fs_id, equal_to(243))
예제 #4
0
 def test_create_success(self):
     mover = self.get_mover_1()
     share = VNXNfsShare.create(cli=t_nas(), mover=mover, path='/EEE')
     assert_that(share.path, equal_to('/EEE'))
     assert_that(share.mover_id, equal_to(1))
     assert_that(share.existed, equal_to(True))
     assert_that(share.fs_id, equal_to(243))
예제 #5
0
 def test_create_with_host_config(self):
     mover = self.get_mover_1()
     host_config = NfsHostConfig(
         root_hosts=['1.1.1.1', '2.2.2.2'],
         ro_hosts=['3.3.3.3'],
         rw_hosts=['4.4.4.4', '5.5.5.5'],
         access_hosts=['6.6.6.6'])
     share = VNXNfsShare.create(cli=t_nas(), mover=mover, path='/FFF',
                                host_config=host_config)
     assert_that(share.fs_id, equal_to(247))
     assert_that(share.path, equal_to('/FFF'))
     assert_that(share.existed, equal_to(True))
     assert_that(share.access_hosts, has_item('6.6.6.6'))
예제 #6
0
 def test_create_with_host_config(self):
     mover = self.get_mover_1()
     host_config = NfsHostConfig(root_hosts=['1.1.1.1', '2.2.2.2'],
                                 ro_hosts=['3.3.3.3'],
                                 rw_hosts=['4.4.4.4', '5.5.5.5'],
                                 access_hosts=['6.6.6.6'])
     share = VNXNfsShare.create(cli=t_nas(),
                                mover=mover,
                                path='/FFF',
                                host_config=host_config)
     assert_that(share.fs_id, equal_to(247))
     assert_that(share.path, equal_to('/FFF'))
     assert_that(share.existed, equal_to(True))
     assert_that(share.access_hosts, has_item('6.6.6.6'))
예제 #7
0
 def test_get_share_by_mover_id(self):
     mover = self.get_mover_1()
     shares = VNXNfsShare.get(t_nas(), mover=mover)
     assert_that(len(shares), equal_to(24))
     share = next(s for s in shares if s.path == '/EEE')
     self.verify_share_eee(share)
예제 #8
0
 def test_get_share_by_path_success(self):
     path = '/EEE'
     shares = VNXNfsShare.get(t_nas(), path=path)
     assert_that(len(shares), equal_to(1))
     share = next(s for s in shares if s.path == path)
     self.verify_share_eee(share)
예제 #9
0
 def test_mover_property(self):
     mover = self.get_mover_1()
     share = VNXNfsShare.get(cli=t_nas(), mover=mover, path='/EEE')
     mover = share.mover
     assert_that(mover.existed, equal_to(True))
     assert_that(mover.role, equal_to('primary'))
예제 #10
0
 def test_deny_hosts(self):
     mover = self.get_mover_1()
     share = VNXNfsShare(cli=t_nas(), mover=mover, path='/minjie_fs2')
     resp = share.deny_access('1.1.1.1', '2.2.2.2')
     assert_that(resp.is_ok(), equal_to(True))
예제 #11
0
 def test_mover_property(self):
     mover = self.get_mover_1()
     share = VNXNfsShare(cli=t_nas(), mover=mover, path='/EEE')
     mover = share.mover
     assert_that(mover.existed, equal_to(True))
     assert_that(mover.role, equal_to('primary'))
예제 #12
0
 def test_modify_success(self):
     host_config = NfsHostConfig(access_hosts=['7.7.7.7'])
     mover = self.get_mover_1()
     share = VNXNfsShare(cli=t_nas(), mover=mover, path='/EEE')
     resp = share.modify(ro=True, host_config=host_config)
     assert_that(resp.is_ok(), equal_to(True))
예제 #13
0
 def test_delete_success(self):
     mover = self.get_mover_1()
     share = VNXNfsShare(cli=t_nas(), mover=mover, path='/EEE')
     resp = share.delete()
     assert_that(resp.is_ok(), equal_to(True))
예제 #14
0
 def test_get_share_by_mover_id(self):
     mover = self.get_mover_1()
     shares = VNXNfsShare.get(t_nas(), mover=mover)
     assert_that(len(shares), equal_to(24))
     share = next(s for s in shares if s.path == '/EEE')
     self.verify_share_eee(share)
예제 #15
0
 def test_get_share_by_path(self):
     path = '/EEE'
     shares = VNXNfsShare.get(t_nas(), path=path)
     assert_that(len(shares), equal_to(1))
     share = next(s for s in shares if s.path == path)
     self.verify_share_eee(share)
예제 #16
0
 def test_get_all_share(self):
     shares = VNXNfsShare.get(t_nas())
     assert_that(len(shares), equal_to(26))
     share = next(s for s in shares if s.path == '/EEE')
     self.verify_share_eee(share)
예제 #17
0
 def test_deny_hosts(self):
     mover = self.get_mover_1()
     share = VNXNfsShare(cli=t_nas(), mover=mover, path='/minjie_fs2')
     resp = share.deny_access('1.1.1.1', '2.2.2.2')
     assert_that(resp.is_ok(), equal_to(True))
예제 #18
0
 def test_fs_property(self):
     mover = self.get_mover_1()
     share = VNXNfsShare.get(cli=t_nas(), mover=mover, path='/EEE')
     fs = share.fs
     assert_that(fs.existed, equal_to(True))
     assert_that(fs.fs_id, equal_to(243))
예제 #19
0
 def test_remove_success(self):
     mover = self.get_mover_1()
     share = VNXNfsShare(cli=t_nas(), mover=mover, path='/EEE')
     resp = share.remove()
     assert_that(resp.is_ok(), equal_to(True))
예제 #20
0
 def f():
     mover = self.get_mover_1()
     share = VNXNfsShare(cli=t_nas(), mover=mover, path='/not_found')
     share.remove()
예제 #21
0
 def test_modify_success(self):
     host_config = NfsHostConfig(access_hosts=['7.7.7.7'])
     mover = self.get_mover_1()
     share = VNXNfsShare(cli=t_nas(), mover=mover, path='/EEE')
     resp = share.modify(ro=True, host_config=host_config)
     assert_that(resp.is_ok(), equal_to(True))
예제 #22
0
 def test_fs_property(self):
     mover = self.get_mover_1()
     share = VNXNfsShare(cli=t_nas(), mover=mover, path='/EEE')
     fs = share.fs
     assert_that(fs.existed, equal_to(True))
     assert_that(fs.fs_id, equal_to(243))
예제 #23
0
 def get_nfs_share(self, mover=None, path=None):
     return VNXNfsShare.get(cli=self._file_cli, mover=mover, path=path)
예제 #24
0
 def f():
     mover = self.get_mover_1()
     VNXNfsShare.create(cli=t_nas(), mover=mover, path='/invalid')
예제 #25
0
 def f():
     mover = self.get_mover_1()
     share = VNXNfsShare(cli=t_nas(), mover=mover, path='/not_found')
     share.delete()
예제 #26
0
 def f():
     mover = self.get_mover_1()
     VNXNfsShare.create(cli=t_nas(), mover=mover, path='/invalid')
예제 #27
0
 def test_get_all_share(self):
     shares = VNXNfsShare.get(t_nas())
     assert_that(len(shares), equal_to(26))
     share = next(s for s in shares if s.path == '/EEE')
     self.verify_share_eee(share)
예제 #28
0
파일: system.py 프로젝트: crook/storops
 def get_nfs_share(self, mover=None, path=None):
     return VNXNfsShare.get(cli=self._file_cli, mover=mover, path=path)
예제 #29
0
 def f():
     path = '/EEE'
     shares = VNXNfsShare.get(t_nas(), path=path)
     assert_that(len(shares), equal_to(1))