def test_update_lun_add_remove(self): cg = UnityConsistencyGroup.get(cli=t_rest(), _id='res_21') lun1 = UnityLun(cli=t_rest(), _id='sv_58') lun2 = UnityLun(cli=t_rest(), _id='sv_59') lun3 = UnityLun(cli=t_rest(), _id='sv_60') lun4 = UnityLun(cli=t_rest(), _id='sv_61') resp = cg.update_lun(add_luns=[lun1, lun3], remove_luns=[lun2, lun4]) assert_that(resp.is_ok(), equal_to(True))
def test_create_replicate_cg_session_without_dst_cg(self): cg = UnityConsistencyGroup.get(cli=t_rest(), _id='res_21') rs = UnityRemoteSystem.get(cli=t_rest(), _id='RS_0') lun1 = UnityLun(cli=t_rest(), _id='sv_58') lun2 = UnityLun(cli=t_rest(), _id='sv_59') luns = [lun1, lun2] rep_session = cg.replicate_cg_with_dst_resource_provisioning( 60, luns, 'pool_2', dst_cg_name=None, remote_system=rs) assert_that( rep_session.id, equal_to( '81866043753_A9221PM0010744_0604000_81378689_FNM84900101113_0000' ))
def test_create_local_replicate_cg_session(self): # Create the session in local when the remote system is empty cg = UnityConsistencyGroup.get(cli=t_rest(), _id='res_21') lun1 = UnityLun(cli=t_rest(), _id='sv_58') lun2 = UnityLun(cli=t_rest(), _id='sv_59') luns = [lun1, lun2] rep_session = cg.replicate_cg_with_dst_resource_provisioning( 60, luns, 'pool_2', dst_cg_name=cg.name, remote_system=None) assert_that( rep_session.id, equal_to( '81604378625_APM00192210744_0000_81604378629_APM00192210744_0000' ))
def test_cg_is_not_replicated(self): cg = UnityConsistencyGroup.get(cli=t_rest(), _id='res_21') result = cg.check_cg_is_replicated() assert_that(result, equal_to(None))
def test_update_lun_all_none(self): cg = UnityConsistencyGroup.get(cli=t_rest(), _id='res_21') resp = cg.update_lun() assert_that(resp.is_ok(), equal_to(True))
def test_detach_cg_not_implemented(self): cg = UnityConsistencyGroup.get(cli=t_rest(), _id='res_6') assert_that(calling(cg.detach_from), raises(NotImplementedError))
def test_replace_lun_in_cg_already_in(self): cg = UnityConsistencyGroup.get(cli=t_rest(), _id='res_6') lun1 = UnityLun(cli=t_rest(), _id='sv_3341') lun2 = UnityLun(cli=t_rest(), _id='sv_14') resp = cg.replace_lun(lun1, lun2) assert_that(resp.is_ok(), equal_to(True))