Esempio n. 1
0
 def add_image(self, sp_ip, lun_id,
               recovery_policy=VNXMirrorViewRecoveryPolicy.AUTO,
               sync_rate=VNXMirrorViewSyncRate.HIGH):
     lun_id = VNXLun.get_id(lun_id)
     self._cli.add_mirror_view_image(self._get_name(), sp_ip, lun_id,
                                     recovery_policy, sync_rate,
                                     poll=self.poll)
Esempio n. 2
0
 def f():
     VNXLun.get_id('abc')
Esempio n. 3
0
 def test_get_lun_id_int(self):
     assert_that(VNXLun.get_id(23), equal_to(23))
Esempio n. 4
0
 def test_get_lun_obj_property(self):
     lun = VNXLun(name='x', cli=t_cli())
     assert_that(VNXLun.get_id(lun), equal_to(0))
Esempio n. 5
0
 def test_get_lun_obj_member(self):
     lun = VNXLun(lun_id=12)
     assert_that(VNXLun.get_id(lun), equal_to(12))
Esempio n. 6
0
 def test_get_lun_id_str(self):
     assert_that(VNXLun.get_id('123'), equal_to(123))
Esempio n. 7
0
 def test_get_snap(self):
     lun = VNXLun(lun_id=3, cli=t_cli())
     snaps = lun.get_snap()
     assert_that(len(snaps), equal_to(2))
     for snap in snaps:
         assert_that(snap.source_luns, has_item(lun.get_id(lun)))
Esempio n. 8
0
 def test_get_lun_id_str(self):
     assert_that(VNXLun.get_id('123'), equal_to(123))
Esempio n. 9
0
 def test_get_id_with_update(self):
     m1 = VNXLun(name='m1', cli=t_cli())
     assert_that(VNXLun.get_id(m1), equal_to(4057))
Esempio n. 10
0
 def test_get_id(self):
     l1 = VNXLun(lun_id=11)
     assert_that(VNXLun.get_id(l1), equal_to(11))
Esempio n. 11
0
 def f():
     VNXLun.get_id('abc')
Esempio n. 12
0
 def test_get_lun_id_int(self):
     assert_that(VNXLun.get_id(23), equal_to(23))
Esempio n. 13
0
 def test_get_lun_obj_property(self):
     lun = VNXLun(name='x', cli=t_cli())
     assert_that(VNXLun.get_id(lun), equal_to(0))
Esempio n. 14
0
 def test_get_lun_obj_member(self):
     lun = VNXLun(lun_id=12)
     assert_that(VNXLun.get_id(lun), equal_to(12))
Esempio n. 15
0
 def test_get_id(self):
     l1 = VNXLun(lun_id=11)
     assert_that(VNXLun.get_id(l1), equal_to(11))
Esempio n. 16
0
 def test_get_id_with_update(self):
     m1 = VNXLun(name='m1', cli=t_cli())
     assert_that(VNXLun.get_id(m1), equal_to(4057))
Esempio n. 17
0
 def test_get_snap(self):
     lun = VNXLun(lun_id=3, cli=t_cli())
     snaps = lun.get_snap()
     assert_that(len(snaps), equal_to(2))
     for snap in snaps:
         assert_that(snap.source_luns, has_item(lun.get_id(lun)))