예제 #1
0
 def test_property_instance_cache(self):
     m1 = VNXLun(name='m1', cli=t_cli())
     s1 = m1.attached_snapshot
     s2 = m1.attached_snapshot
     assert_that(hash(s1), equal_to(hash(s2)))
     m1.update()
     s3 = m1.attached_snapshot
     assert_that(hash(s3), is_not(equal_to(hash(s1))))
     assert_that(s1._cli, not_none())
예제 #2
0
파일: test_lun.py 프로젝트: crook/storops
 def test_property_instance_cache(self):
     m1 = VNXLun(name='m1', cli=t_cli())
     s1 = m1.attached_snapshot
     s2 = m1.attached_snapshot
     assert_that(hash(s1), equal_to(hash(s2)))
     m1.update()
     s3 = m1.attached_snapshot
     assert_that(hash(s3), is_not(equal_to(hash(s1))))
     assert_that(s1._cli, not_none())
예제 #3
0
 def test_attach_snap(self):
     m1 = VNXLun(name='m1', cli=t_cli())
     s1 = VNXSnap(name='s1', cli=t_cli())
     m1.attach_snap(s1)
     m1.update()
     assert_that(m1.attached_snapshot, equal_to('s1'))
예제 #4
0
 def test_get_lun_by_name(self):
     lun = VNXLun(name='x', cli=t_cli())
     lun.update()
     verify_lun_0(lun)
예제 #5
0
 def test_get_lun_by_id(self):
     lun = VNXLun(lun_id=0, cli=t_cli())
     lun.update()
     verify_lun_0(lun)
예제 #6
0
파일: test_lun.py 프로젝트: crook/storops
 def test_attach_snap(self):
     m1 = VNXLun(name='m1', cli=t_cli())
     s1 = VNXSnap(name='s1', cli=t_cli())
     m1.attach_snap(s1)
     m1.update()
     assert_that(m1.attached_snapshot._get_name(), equal_to('s1'))
예제 #7
0
파일: test_lun.py 프로젝트: crook/storops
 def test_get_lun_by_name(self):
     lun = VNXLun(name='x', cli=t_cli())
     lun.update()
     verify_lun_0(lun)
예제 #8
0
파일: test_lun.py 프로젝트: crook/storops
 def test_get_lun_by_id(self):
     lun = VNXLun(lun_id=0, cli=t_cli())
     lun.update()
     verify_lun_0(lun)