diff --git a/LibOneM2M/OneM2M_Functions.ttcn b/LibOneM2M/OneM2M_Functions.ttcn index 65c28d7833917a14b11396c08b809346d47afe03..a9b019a0e7ad70659b5e6d4714d735a3c70c3da2 100644 --- a/LibOneM2M/OneM2M_Functions.ttcn +++ b/LibOneM2M/OneM2M_Functions.ttcn @@ -3007,7 +3007,7 @@ module OneM2M_Functions { function f_cse_retrieveChildResourceRefs_cseSimu(template(omit) ResourceTypeList p_resourceTypeList := omit, integer p_targetResourceIndex := -1, XSD.ID p_originator := PX_SUPER_CSE_ID) runs on CseSimu return URIList { var RequestPrimitive v_requestPrimitive; var URIList v_uriList := {}; - v_requestPrimitive := valueof(m_retrieveChildResourceRefs(f_getResourceAddress(p_targetResourceIndex), p_originator)); + v_requestPrimitive := valueof(m_retrieveChildResourceRefs(f_getResourceAddress(p_targetResourceIndex), p_originator, p_resourceTypeList)); f_send(e_mccPort, m_request(v_requestPrimitive)); tc_ac.start; @@ -3217,7 +3217,7 @@ module OneM2M_Functions { v_response.primitiveContent.remoteCSE := vc_localResourcesList[vc_localRemoteCseIndex].resource.remoteCSE; f_send(e_mccPortIn, m_response(v_response)); - vc_remoteCseIndex := f_setResource(valueof(m_primitiveContentRemoteCSE(m_contentMyRemoteCSEResource(f_getCompletePoA(vc_cseSimuDesc.mcaPortIn, "")))), int16, -1, false); + vc_remoteCseIndex := f_setResource(valueof(m_primitiveContentRemoteCSE(m_contentMyRemoteCSEResource(f_getCompletePoA(vc_cseSimuDesc.mcaPortIn, "")))), int16, -1, true); v_resourceIndex := vc_remoteCseIndex; v_remoteCSERegistered:=true; tc_ac.start(10.0); @@ -6585,7 +6585,7 @@ module OneM2M_Functions { v_parentIndex := f_getLocalResourceIndex(p_request.to_); vc_response.primitive.responsePrimitive := valueof(m_responsePrimitive(p_responseStatusCode,p_request.requestIdentifier)); if(v_parentIndex == -1) { - setverdict(inconc,__SCOPE__&": ERROR: Target resource not found"); + log(__SCOPE__&": ERROR: Target resource not found"); vc_response.primitive.responsePrimitive.responseStatusCode := int4004; } else { @@ -6623,7 +6623,7 @@ module OneM2M_Functions { v_targetLocalResourceIndex := f_getLocalResourceIndex(p_request.to_); vc_response.primitive.responsePrimitive := valueof(m_responsePrimitive(p_responseStatusCode,p_request.requestIdentifier)); if(v_targetLocalResourceIndex == -1) { - setverdict(inconc,__SCOPE__&": ERROR: Target resource not found"); + log(__SCOPE__&": ERROR: Target resource not found"); vc_response.primitive.responsePrimitive.responseStatusCode := int4004; } else { if(isvalue(p_expectedTargetResourceIndex)){ @@ -6659,7 +6659,7 @@ module OneM2M_Functions { v_targetLocalResourceIndex := f_getLocalResourceIndex(p_request.to_); vc_response.primitive.responsePrimitive := valueof(m_responsePrimitive(p_responseStatusCode,p_request.requestIdentifier)); if(v_targetLocalResourceIndex == -1) { - setverdict(inconc,__SCOPE__&": ERROR: Target resource not found"); + log(__SCOPE__&": ERROR: Target resource not found"); vc_response.primitive.responsePrimitive.responseStatusCode := int4004; } else { if(isvalue(p_expectedTargetResourceIndex)){ @@ -6694,7 +6694,7 @@ module OneM2M_Functions { v_targetLocalResourceIndex := f_getLocalResourceIndex(p_request.to_); vc_response.primitive.responsePrimitive := valueof(m_responsePrimitive(p_responseStatusCode,p_request.requestIdentifier)); if(v_targetLocalResourceIndex == -1) { - setverdict(inconc,__SCOPE__&": ERROR: Target resource not found"); + log(__SCOPE__&": ERROR: Target resource not found"); vc_response.primitive.responsePrimitive.responseStatusCode := int4004; } else { if(isvalue(p_expectedTargetResourceIndex)){ diff --git a/LibOneM2M/OneM2M_Templates.ttcn b/LibOneM2M/OneM2M_Templates.ttcn index b940727ebd10cfb80cadd25ddbce8781d04ec7f2..609bf4629f9e91aa7e9a6cd63a27eea2d3c04c0f 100644 --- a/LibOneM2M/OneM2M_Templates.ttcn +++ b/LibOneM2M/OneM2M_Templates.ttcn @@ -3904,7 +3904,7 @@ module OneM2M_Templates { labels := *,//O accessControlPolicyIDs := *,//O expirationTime := *,//O - dynamicAuthorizationConsultationIDs := omit, + dynamicAuthorizationConsultationIDs := *,//O announceTo := *,//O announcedAttribute := *,//O cseType := *,//O @@ -3915,16 +3915,16 @@ module OneM2M_Templates { trigger_Recipient_ID := *,//O requestReachability := ?,//M nodeLink := *,//O - triggerReferenceNumber := omit,//O - contentSerialization := omit,//O - e2eSecInfo := omit,//O - descendantCSEs := omit,//O + triggerReferenceNumber := *,//O + contentSerialization := *,//O + e2eSecInfo := *,//O + descendantCSEs := *,//O supportedReleaseVersions := {"3"}, //M - multicastCapability := omit,//O - externalGroupID := omit,//O - triggerEnable := omit,//O - activityPatternElements := omit,//O - choice := omit//O + multicastCapability := *,//O + externalGroupID := *,//O + triggerEnable := *,//O + activityPatternElements := *,//O + choice := *//O }; /** diff --git a/OneM2M_PermutationFunctions.ttcn b/OneM2M_PermutationFunctions.ttcn index 6c6ff3817d21704eba8482d18d1aeb083d1a0282..ee67277b5ef43559219a46d8465162153175cd9e 100644 --- a/OneM2M_PermutationFunctions.ttcn +++ b/OneM2M_PermutationFunctions.ttcn @@ -1995,16 +1995,16 @@ module OneM2M_PermutationFunctions { group Create{ - function f_CSE_REG_CRE_001(in XSD.ID v_aeIdStem) runs on AeSimu system CseSystem { + function f_CSE_REG_CRE_001(in XSD.ID p_aeIdStem) runs on AeSimu system CseSystem { var MsgIn v_response; var RequestPrimitive v_request; var integer v_cseBaseIndex := -1; var ResourceType v_resourceType := int2; - var universal charstring v_action := __SCOPE__ & ": Please, make sure that the following AE-ID is allowed to register: " & PX_ALLOWED_C_AE_IDS[0]; + var universal charstring v_action := __SCOPE__ & ": Please, make sure that the following AE-ID is allowed to register: " & p_aeIdStem; //Test control - if(v_aeIdStem[0] == "S") { + if(p_aeIdStem[0] == "S") { if(not(PICS_IN_CSE)) { setverdict(inconc, __SCOPE__ & ": IUT shall be IN-CSE to run this test case"); stop; @@ -2019,7 +2019,7 @@ module OneM2M_PermutationFunctions { f_sleepIgnoreDef(PX_TCONFIG_IUT); //Test Body - v_request := valueof(m_createAe(vc_aeSimuDesc.appId, omit, PX_CSE_ID & "/" & v_aeIdStem)); + v_request := valueof(m_createAe(vc_aeSimuDesc.appId, omit, PX_CSE_ID & "/" & p_aeIdStem)); v_request := f_getCreateRequestPrimitive(v_resourceType, v_request, -1); @@ -3039,6 +3039,9 @@ module OneM2M_PermutationFunctions { v_request.requestIdentifier := "Existing resource"; if(p_resourceType == int23){ + if(vc_ae2.running) { + f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2); + } vc_ae2.start(f_cse_notifyProcedure_subscriptionVerificationHandler()); } @@ -4563,7 +4566,6 @@ module OneM2M_PermutationFunctions { var integer v_aeIndex := -1; var integer v_resourceIndex := -1; var integer v_ae2Index := -1; - var integer v_acpIndex := -1; // Test control @@ -4588,7 +4590,7 @@ module OneM2M_PermutationFunctions { f_cse_createAccessControlPolicyAux(-, -, -); - p_requestPrimitive := f_setAcpId(p_requestPrimitive, {vc_resourcesList[v_acpIndex].resource.accessControlPolicy.resourceID}); + p_requestPrimitive := f_setAcpId(p_requestPrimitive, {vc_resourcesList[vc_acpIndex].resource.accessControlPolicy.resourceID}); } if (p_resourceType!=int16){ //ResourceType != RemoteCSE @@ -6945,6 +6947,10 @@ module OneM2M_PermutationFunctions { v_resourceIndex := f_cse_createResource(p_resourceType, p_createRequestPrimitive, v_parentIndex); // Test Body + if(p_resourceType == int23) { + vc_ae2.start(f_cse_notifyProcedure_noNotificationHandler()); + } + v_request := valueof(m_delete(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_resourceIndex))); f_send(e_mcaPort, m_request(v_request)); @@ -9478,9 +9484,11 @@ module OneM2M_PermutationFunctions { f_cse_updateResource(int1, v_acpIndex, v_updateRequest); // Test Body - v_request := f_getCreateRequestPrimitive(int3, p_requestPrimitive, v_containerIndex); - - f_send(e_mcaPort, m_request(valueof(v_request))); + p_requestPrimitive.to_ := f_getResourceAddress(v_containerIndex); + p_requestPrimitive.from_ := f_getOriginator(v_aeIndex); + p_requestPrimitive.requestIdentifier := valueof(p_requestPrimitive.requestIdentifier) & f_rnd(1, 1000000); + + f_send(e_mcaPort, m_request(valueof(p_requestPrimitive))); tc_ac.start; alt { [] mcaPort.receive(mw_response(mw_responsePrimitive(int4103))) -> value v_response { diff --git a/OneM2M_Testcases_CSE_Release_1.ttcn b/OneM2M_Testcases_CSE_Release_1.ttcn index c5b1f58f2dab99ff193dbc3006f3722f3a636098..4dacf939de646e7509f05b8b5e41422107103c41 100644 --- a/OneM2M_Testcases_CSE_Release_1.ttcn +++ b/OneM2M_Testcases_CSE_Release_1.ttcn @@ -8059,7 +8059,7 @@ module OneM2M_Testcases_CSE_Release_1 { alt { [] mcaPort.receive(mw_response(mw_responsePrimitive(int2002))) -> value v_response { tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Resource type " & int2str(enum2int(c_containerResourceType)) & " deleted successfuly"); + setverdict(pass, __SCOPE__ & ": Latest contentInstance deleted successfuly"); } [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { tc_ac.stop; @@ -8067,10 +8067,10 @@ module OneM2M_Testcases_CSE_Release_1 { } [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error while deleting resource type " & int2str(enum2int(c_containerResourceType))); + setverdict(fail, __SCOPE__ & ": Error while deleting latest contentInstance"); } [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while deleting resource type " & int2str(enum2int(c_containerResourceType))); + setverdict(fail, __SCOPE__ & ": No answer while deleting resource type latest contentInstance"); } } @@ -8151,7 +8151,7 @@ module OneM2M_Testcases_CSE_Release_1 { alt { [] mcaPort.receive(mw_response(mw_responsePrimitive(int2002))) -> value v_response { tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Resource type " & int2str(enum2int(c_containerResourceType)) & " deleted successfuly"); + setverdict(pass, __SCOPE__ & ": Oldest contentInstance deleted successfuly"); } [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { tc_ac.stop; @@ -8159,10 +8159,10 @@ module OneM2M_Testcases_CSE_Release_1 { } [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error while deleting resource type " & int2str(enum2int(c_containerResourceType))); + setverdict(fail, __SCOPE__ & ": Error while deleting oldest contentInstance"); } [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while deleting resource type " & int2str(enum2int(c_containerResourceType))); + setverdict(fail, __SCOPE__ & ": No answer while deleting oldest contentInstance"); } } @@ -8598,8 +8598,6 @@ module OneM2M_Testcases_CSE_Release_1 { } }; - f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2); - //Postamble f_cse_postamble_deleteResources();