Beispiel #1
0
 def test_get_interfaces(self):
     dm = VNXVdm(name='VDM_ESA', cli=t_nas())
     ifs = dm.get_interfaces()
     assert_that(len(ifs), equal_to(1))
     interface = ifs[0]
     assert_that(interface.name, equal_to('10-110-24-195'))
     assert_that(interface.share_type, equal_to(VNXShareType.NFS))
Beispiel #2
0
 def test_get_interfaces(self):
     dm = VNXVdm(name='VDM_ESA', cli=t_nas())
     ifs = dm.get_interfaces()
     assert_that(len(ifs), equal_to(1))
     interface = ifs[0]
     assert_that(interface.name, equal_to('10-110-24-195'))
     assert_that(interface.share_type, equal_to(VNXShareType.NFS))
Beispiel #3
0
 def get_mover(self, name=None, mover_id=None, is_vdm=False):
     if is_vdm:
         ret = VNXVdm.get(cli=self._file_cli, name=name, vdm_id=mover_id)
     else:
         ret = VNXMover.get(cli=self._file_cli, name=name,
                            mover_id=mover_id)
     return ret
Beispiel #4
0
 def get_mover(self, name=None, mover_id=None, is_vdm=False):
     if is_vdm:
         ret = VNXVdm.get(cli=self._file_cli, name=name, vdm_id=mover_id)
     else:
         ret = VNXMover.get(cli=self._file_cli, name=name,
                            mover_id=mover_id)
     return ret
Beispiel #5
0
 def mover(self):
     if self._mover is not None:
         ret = self._mover
     elif self.is_vdm:
         ret = VNXVdm(vdm_id=self.mover_id, cli=self._cli)
     else:
         ret = VNXMover(mover_id=self.mover_id, cli=self._cli)
     return ret
Beispiel #6
0
 def test_get_by_name(self):
     dm = VNXVdm.get(name='VDM_ESA', cli=t_nas())
     self.verify_vdm_2(dm)
Beispiel #7
0
 def f():
     dm = VNXVdm(name='myvdm', cli=t_nas())
     dm.detach_nfs_interface('1.1.1.3-0')
Beispiel #8
0
 def test_attach_interface_success(self):
     dm = VNXVdm(name='myvdm', cli=t_nas())
     dm.attach_nfs_interface('1.1.1.1-0')
Beispiel #9
0
 def f():
     dm = VNXVdm(vdm_id=5, cli=t_nas())
     dm.delete()
Beispiel #10
0
 def f():
     dm = VNXVdm(vdm_id=5, cli=t_nas())
     dm.delete()
Beispiel #11
0
 def test_get_by_name(self):
     dm = VNXVdm.get(name='VDM_ESA', cli=t_nas())
     self.verify_vdm_2(dm)
Beispiel #12
0
 def test_create_vdm(self):
     dm = VNXVdm.create(t_nas(), 2, 'myVdm')
     assert_that(dm.name, equal_to('myVdm'))
     assert_that(dm.vdm_id, equal_to(3))
     assert_that(dm.mover_id, equal_to(2))
     assert_that(dm.root_fs_id, equal_to(245))
Beispiel #13
0
 def test_get_by_id_2(self):
     dm = VNXVdm(vdm_id=2, cli=t_nas())
     self.verify_vdm_2(dm)
Beispiel #14
0
 def test_get_all(self):
     vdm_list = VNXVdm.get(t_nas())
     assert_that(len(vdm_list), greater_than_or_equal_to(1))
     dm = next(dm for dm in vdm_list if dm.vdm_id == 2)
     self.verify_vdm_2(dm)
Beispiel #15
0
 def test_get_by_id_invalid(self):
     dm = VNXVdm.get(vdm_id=1, cli=t_nas())
     assert_that(dm.existed, equal_to(False))
Beispiel #16
0
 def test_get_all(self):
     vdm_list = VNXVdm.get(t_nas())
     assert_that(len(vdm_list), greater_than_or_equal_to(1))
     dm = next(dm for dm in vdm_list if dm.vdm_id == 2)
     self.verify_vdm_2(dm)
Beispiel #17
0
 def test_detach_interface(self):
     dm = VNXVdm(name='myvdm', cli=t_nas())
     dm.detach_nfs_interface('1.1.1.1-0')
Beispiel #18
0
 def f():
     dm = VNXVdm(name='myvdm', cli=t_nas())
     dm.detach_nfs_interface('1.1.1.3-0')
Beispiel #19
0
 def f():
     dm = VNXVdm(vdm_id=5, cli=t_nas())
     dm.remove()
Beispiel #20
0
 def test_get_by_id_invalid(self):
     dm = VNXVdm.get(vdm_id=1, cli=t_nas())
     assert_that(dm.existed, equal_to(False))
Beispiel #21
0
 def test_get_by_name_not_found(self):
     dm = VNXVdm(name='not_found', cli=t_nas())
     assert_that(dm.existed, equal_to(False))
Beispiel #22
0
 def f():
     VNXVdm.create(t_nas(), 3, 'myVdm')
Beispiel #23
0
 def f():
     VNXVdm.create(t_nas(), 3, 'myVdm')
Beispiel #24
0
 def test_delete_vdm(self):
     dm = VNXVdm(vdm_id=3, cli=t_nas())
     resp = dm.delete()
     assert_that(resp.is_ok(), equal_to(True))
Beispiel #25
0
 def test_create_vdm(self):
     dm = VNXVdm.create(t_nas(), 2, 'myVdm')
     assert_that(dm.name, equal_to('myVdm'))
     assert_that(dm.vdm_id, equal_to(3))
     assert_that(dm.mover_id, equal_to(2))
     assert_that(dm.root_fs_id, equal_to(245))
Beispiel #26
0
 def test_attach_interface_success(self):
     dm = VNXVdm(name='myvdm', cli=t_nas())
     dm.attach_nfs_interface('1.1.1.1-0')
Beispiel #27
0
 def test_delete_vdm(self):
     dm = VNXVdm(vdm_id=3, cli=t_nas())
     resp = dm.delete()
     assert_that(resp.is_ok(), equal_to(True))