示例#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
文件: test_lun.py 项目: crook/storops
 def test_get_lun_id_str(self):
     assert_that(VNXLun.get_id('123'), equal_to(123))
示例#9
0
文件: test_lun.py 项目: crook/storops
 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
文件: test_lun.py 项目: crook/storops
 def test_get_id(self):
     l1 = VNXLun(lun_id=11)
     assert_that(VNXLun.get_id(l1), equal_to(11))
示例#11
0
文件: test_lun.py 项目: crook/storops
 def f():
     VNXLun.get_id('abc')
示例#12
0
文件: test_lun.py 项目: crook/storops
 def test_get_lun_id_int(self):
     assert_that(VNXLun.get_id(23), equal_to(23))
示例#13
0
文件: test_lun.py 项目: crook/storops
 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
文件: test_lun.py 项目: crook/storops
 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
文件: test_lun.py 项目: crook/storops
 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)))