Пример #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)
Пример #2
0
 def f():
     VNXLun.get_id('abc')
Пример #3
0
 def test_get_lun_id_int(self):
     assert_that(VNXLun.get_id(23), equal_to(23))
Пример #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))
Пример #5
0
 def test_get_lun_obj_member(self):
     lun = VNXLun(lun_id=12)
     assert_that(VNXLun.get_id(lun), equal_to(12))
Пример #6
0
 def test_get_lun_id_str(self):
     assert_that(VNXLun.get_id('123'), equal_to(123))
Пример #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)))
Пример #8
0
 def test_get_lun_id_str(self):
     assert_that(VNXLun.get_id('123'), equal_to(123))
Пример #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))
Пример #10
0
 def test_get_id(self):
     l1 = VNXLun(lun_id=11)
     assert_that(VNXLun.get_id(l1), equal_to(11))
Пример #11
0
 def f():
     VNXLun.get_id('abc')
Пример #12
0
 def test_get_lun_id_int(self):
     assert_that(VNXLun.get_id(23), equal_to(23))
Пример #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))
Пример #14
0
 def test_get_lun_obj_member(self):
     lun = VNXLun(lun_id=12)
     assert_that(VNXLun.get_id(lun), equal_to(12))
Пример #15
0
 def test_get_id(self):
     l1 = VNXLun(lun_id=11)
     assert_that(VNXLun.get_id(l1), equal_to(11))
Пример #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))
Пример #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)))