Beispiel #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())
Beispiel #2
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())
Beispiel #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'))
Beispiel #4
0
 def test_get_lun_by_name(self):
     lun = VNXLun(name='x', cli=t_cli())
     lun.update()
     verify_lun_0(lun)
Beispiel #5
0
 def test_get_lun_by_id(self):
     lun = VNXLun(lun_id=0, cli=t_cli())
     lun.update()
     verify_lun_0(lun)
Beispiel #6
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._get_name(), equal_to('s1'))
Beispiel #7
0
 def test_get_lun_by_name(self):
     lun = VNXLun(name='x', cli=t_cli())
     lun.update()
     verify_lun_0(lun)
Beispiel #8
0
 def test_get_lun_by_id(self):
     lun = VNXLun(lun_id=0, cli=t_cli())
     lun.update()
     verify_lun_0(lun)