Esempio n. 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))
Esempio n. 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))
Esempio n. 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
Esempio n. 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
Esempio n. 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
Esempio n. 6
0
 def test_get_by_name(self):
     dm = VNXVdm.get(name='VDM_ESA', cli=t_nas())
     self.verify_vdm_2(dm)
Esempio n. 7
0
 def f():
     dm = VNXVdm(name='myvdm', cli=t_nas())
     dm.detach_nfs_interface('1.1.1.3-0')
Esempio n. 8
0
 def test_attach_interface_success(self):
     dm = VNXVdm(name='myvdm', cli=t_nas())
     dm.attach_nfs_interface('1.1.1.1-0')
Esempio n. 9
0
 def f():
     dm = VNXVdm(vdm_id=5, cli=t_nas())
     dm.delete()
Esempio n. 10
0
 def f():
     dm = VNXVdm(vdm_id=5, cli=t_nas())
     dm.delete()
Esempio n. 11
0
 def test_get_by_name(self):
     dm = VNXVdm.get(name='VDM_ESA', cli=t_nas())
     self.verify_vdm_2(dm)
Esempio n. 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))
Esempio n. 13
0
 def test_get_by_id_2(self):
     dm = VNXVdm(vdm_id=2, cli=t_nas())
     self.verify_vdm_2(dm)
Esempio n. 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)
Esempio n. 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))
Esempio n. 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)
Esempio n. 17
0
 def test_detach_interface(self):
     dm = VNXVdm(name='myvdm', cli=t_nas())
     dm.detach_nfs_interface('1.1.1.1-0')
Esempio n. 18
0
 def f():
     dm = VNXVdm(name='myvdm', cli=t_nas())
     dm.detach_nfs_interface('1.1.1.3-0')
Esempio n. 19
0
 def f():
     dm = VNXVdm(vdm_id=5, cli=t_nas())
     dm.remove()
Esempio n. 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))
Esempio n. 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))
Esempio n. 22
0
 def f():
     VNXVdm.create(t_nas(), 3, 'myVdm')
Esempio n. 23
0
 def f():
     VNXVdm.create(t_nas(), 3, 'myVdm')
Esempio n. 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))
Esempio n. 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))
Esempio n. 26
0
 def test_attach_interface_success(self):
     dm = VNXVdm(name='myvdm', cli=t_nas())
     dm.attach_nfs_interface('1.1.1.1-0')
Esempio n. 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))