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