Ejemplo n.º 1
0
 def test_lun_modify_muitl_property_except_sp(self):
     lun = UnityLun(_id='sv_4', cli=t_rest())
     lun.modify(name="RestLun100", is_compression=True,
                description="Lun description")
     lun.update()
     assert_that(lun.name, equal_to('RestLun100'))
     assert_that(lun.description, equal_to('Lun description'))
Ejemplo n.º 2
0
 def test_lun_delete_async(self):
     lun = UnityLun(_id='sv_1535', cli=t_rest())
     resp = lun.delete(force_snap_delete=True, force_vvol_delete=True)
     lun.update()
     assert_that(resp.is_ok(), equal_to(True))
     assert_that(resp.job.existed, equal_to(True))
     assert_that(resp.job.state.index, equal_to(4))
Ejemplo n.º 3
0
 def test_lun_modify_muitl_property_except_sp(self):
     lun = UnityLun(_id='sv_4', cli=t_rest())
     lun.modify(name="RestLun100", is_thin=True,
                description="Lun description")
     lun.update()
     assert_that(lun.name, equal_to('RestLun100'))
     assert_that(lun.description, equal_to('Lun description'))
Ejemplo n.º 4
0
 def test_lun_delete_thinclone(self):
     lun = UnityLun(_id='sv_5604', cli=t_rest())
     resp = lun.delete(async_mode=False,
                       force_snap_delete=True,
                       force_vvol_delete=True)
     lun.update()
     assert_that(resp.is_ok(), equal_to(True))
     assert_that(resp.job.existed, equal_to(False))
Ejemplo n.º 5
0
 def test_lun_modify_host_access(self):
     host = UnityHost(_id="Host_1", cli=t_rest())
     lun = UnityLun(_id='sv_4', cli=t_rest())
     host_access = [{'host': host, 'accessMask': HostLUNAccessEnum.BOTH}]
     lun.modify(host_access=host_access)
     lun.update()
     assert_that(lun.host_access[0].host, equal_to(host))
     assert_that(lun.host_access[0].access_mask,
                 equal_to(HostLUNAccessEnum.BOTH))
Ejemplo n.º 6
0
 def test_lun_modify_host_access(self):
     host = UnityHost(_id="Host_1", cli=t_rest())
     lun = UnityLun(_id='sv_4', cli=t_rest())
     host_access = [{'host': host, 'accessMask': HostLUNAccessEnum.BOTH}]
     lun.modify(host_access=host_access)
     lun.update()
     assert_that(lun.host_access[0].host, equal_to(host))
     assert_that(lun.host_access[0].access_mask,
                 equal_to(HostLUNAccessEnum.BOTH))
Ejemplo n.º 7
0
 def test_lun_modify_sp(self):
     lun = UnityLun(_id='sv_4', cli=t_rest())
     sp = UnityStorageProcessor(_id='spb', cli=t_rest())
     lun.modify(sp=sp)
     lun.update()
     assert_that(sp.to_node_enum(), equal_to(NodeEnum.SPB))
Ejemplo n.º 8
0
 def test_lun_modify_compression_enabled(self):
     lun = UnityLun(_id='sv_18', cli=t_rest(version='4.3'))
     lun.modify(is_compression=True)
     lun.update()
     assert_that(lun.is_data_reduction_enabled, equal_to(True))
Ejemplo n.º 9
0
 def test_lun_modify_wipe_host_access(self):
     lun = UnityLun(_id='sv_4', cli=t_rest())
     resp = lun.modify(host_access=[])
     lun.update()
     assert_that(resp.is_ok(), equal_to(True))
Ejemplo n.º 10
0
 def test_lun_modify_wipe_host_access(self):
     lun = UnityLun(_id='sv_4', cli=t_rest())
     resp = lun.modify(host_access=[])
     lun.update()
     assert_that(resp.is_ok(), equal_to(True))
Ejemplo n.º 11
0
 def test_lun_modify_sp(self):
     lun = UnityLun(_id='sv_4', cli=t_rest())
     sp = UnityStorageProcessor(_id='spb', cli=t_rest())
     lun.modify(sp=sp)
     lun.update()
     assert_that(sp.to_node_enum(), equal_to(NodeEnum.SPB))
Ejemplo n.º 12
0
 def test_lun_delete(self):
     lun = UnityLun(_id='sv_4', cli=t_rest())
     resp = lun.delete(force_snap_delete=True, force_vvol_delete=True)
     lun.update()
     assert_that(resp.is_ok(), equal_to(True))
     assert_that(resp.job.existed, equal_to(False))
Ejemplo n.º 13
0
 def test_picklable(self):
     cli = t_rest()
     lun = UnityLun(_id='sv_16455', cli=cli)
     lun.update()
     lun_new = pickle.loads(pickle.dumps(lun))
     assert_that(lun_new.name, equal_to(lun.name))
Ejemplo n.º 14
0
 def test_lun_modify_dedup_enabled(self):
     lun = UnityLun(_id='sv_19', cli=t_rest(version='5.0.0'))
     lun.modify(is_advanced_dedup_enabled=True)
     lun.update()
     assert_that(lun.is_advanced_dedup_enabled, equal_to(True))