diff --git a/LibOneM2M/OneM2M_Functions.ttcn b/LibOneM2M/OneM2M_Functions.ttcn index 288a6ce28eb1ced6e4ec8c516aeb9e21512e40b2..7331db284876d9a703d36a2b1566bff7558d51b0 100644 --- a/LibOneM2M/OneM2M_Functions.ttcn +++ b/LibOneM2M/OneM2M_Functions.ttcn @@ -1844,7 +1844,8 @@ module OneM2M_Functions { var ResponsePrimitive v_responsePrimitive; var integer v_resourceIndex := -1; - p_requestPrimitive.from_ := PX_CSE1_ID; + //p_requestPrimitive.from_ := PX_CSE1_ID; + p_requestPrimitive.from_ := f_getOriginator(vc_remoteCseIndex, e_cse); mccPort.send(f_getMsgOutPrimitive(m_request(valueof(p_requestPrimitive)))); tc_ac.start; @@ -4345,7 +4346,7 @@ module OneM2M_Functions { * @param p_timestamp Given timestamp * @return Year */ - function f_getYear(charstring p_timestamp) runs on Tester return charstring { + function f_getYear(charstring p_timestamp) runs on Tester return integer { var charstring v_year := ""; var integer i; @@ -4353,7 +4354,7 @@ module OneM2M_Functions { for(i := 0; i <= 3; i := i+1){ v_year := v_year & p_timestamp[i]; } - return v_year; + return str2int(v_year); } // end f_getYear @@ -4362,7 +4363,7 @@ module OneM2M_Functions { * @param p_timestamp Given timestamp * @return Year */ - function f_getMonth(charstring p_timestamp) runs on Tester return charstring { + function f_getMonth(charstring p_timestamp) runs on Tester return integer { var charstring v_month := ""; var integer i; @@ -4372,7 +4373,7 @@ module OneM2M_Functions { v_month := v_month & p_timestamp[i]; } } - return v_month; + return str2int(v_month); } // end f_getYear diff --git a/LibOneM2M/OneM2M_Templates.ttcn b/LibOneM2M/OneM2M_Templates.ttcn index 6b6bbbf0db9f6f58a07f73a848a7f25603a8ff40..169facf5e9ef7d8aa1980f88ba04bc4201f2b0fe 100644 --- a/LibOneM2M/OneM2M_Templates.ttcn +++ b/LibOneM2M/OneM2M_Templates.ttcn @@ -3456,7 +3456,7 @@ module OneM2M_Templates { nodeLink := omit, triggerReferenceNumber := omit, e2eSecInfo := omit, - supportedReleaseVersions := omit,//M + supportedReleaseVersions := omit,//O choice := omit } @@ -3679,7 +3679,7 @@ module OneM2M_Templates { requestReachability := ?,//M contentSerialization := *,//O e2eSecInfo:= *, //O - supportedReleaseVersions := omit,//M + supportedReleaseVersions := ?,//M choice := *//O }; diff --git a/OneM2M_PermutationFunctions.ttcn b/OneM2M_PermutationFunctions.ttcn index f34ee631d27741f17dfe60cfbe57f618903a6ed8..6881aa0fdb8dfcb53c13ad3f7ed5bfd4699c1f37 100644 --- a/OneM2M_PermutationFunctions.ttcn +++ b/OneM2M_PermutationFunctions.ttcn @@ -4221,7 +4221,7 @@ module OneM2M_PermutationFunctions { alt { [] mcaPort.receive(mw_response(mw_responsePrimitive(int2000, p_contentResponse))) -> value v_response { tc_ac.stop; - setverdict(pass, __SCOPE__ & ": No child resources provided with RC set to " & int2str(enum2int(v_request.resultContent))); + setverdict(pass, __SCOPE__ & ": Attributes and child resources provided with RC set to " & int2str(enum2int(v_request.resultContent))); } [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(p_contentResponse))) -> value v_response { tc_ac.stop; @@ -4291,7 +4291,7 @@ module OneM2M_PermutationFunctions { alt { [] mcaPort.receive(mw_response(mw_responsePrimitive(int2000, p_contentResponse))) -> value v_response { tc_ac.stop; - setverdict(pass, __SCOPE__ & ": No child resources provided with RC set to " & int2str(enum2int(v_request.resultContent))); + setverdict(pass, __SCOPE__ & ": Attributes and child resources reference provided with RC set to " & int2str(enum2int(v_request.resultContent))); } [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(p_contentResponse))) -> value v_response { tc_ac.stop; @@ -4360,7 +4360,7 @@ module OneM2M_PermutationFunctions { alt { [] mcaPort.receive(mw_response(mw_responsePrimitive(int2000, p_contentResponse))) -> value v_response { tc_ac.stop; - setverdict(pass, __SCOPE__ & ": No child resources provided with RC set to " & int2str(enum2int(v_request.resultContent))); + setverdict(pass, __SCOPE__ & ": Only child resources references provided with RC set to " & int2str(enum2int(v_request.resultContent))); } [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(p_contentResponse))) -> value v_response { tc_ac.stop; @@ -4423,13 +4423,13 @@ module OneM2M_PermutationFunctions { // Test Body v_request := valueof(m_retrieve(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_resourceIndex))); - v_request.resultContent := int6;//Child resource references + v_request.resultContent := int8;//Child resources mcaPort.send(f_getMsgOutPrimitive(m_request(v_request))); tc_ac.start; alt { [] mcaPort.receive(mw_response(mw_responsePrimitive(int2000, p_contentResponse))) -> value v_response { tc_ac.stop; - setverdict(pass, __SCOPE__ & ": No child resources provided with RC set to " & int2str(enum2int(v_request.resultContent))); + setverdict(pass, __SCOPE__ & ": Only child resources provided with RC set to " & int2str(enum2int(v_request.resultContent))); } [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(p_contentResponse))) -> value v_response { tc_ac.stop; @@ -6691,7 +6691,7 @@ module OneM2M_PermutationFunctions { // Preamble v_createRequest := f_getCreateRequestPrimitive(int1, m_createAcpBase, -1); v_currentTime := fx_generateTimestamp(); - v_accessControlRule.accessControlContexts_list := {{{"* * * * " & f_getMonth(v_currentTime) & " *"}, omit, omit}}; + v_accessControlRule.accessControlContexts_list := {{{"* * * * " & int2str(f_getMonth(v_currentTime)) & " *"}, omit, omit}}; v_createRequest.primitiveContent.accessControlPolicy.privileges.accessControlRule_list := {v_accessControlRule}; vc_acpAuxIndex := f_cse_createResource(int1, v_createRequest); // CSE child resource @@ -6739,7 +6739,7 @@ module OneM2M_PermutationFunctions { function f_CSE_SEC_ACP_006(template RequestPrimitive p_requestPrimitive, in ResponseStatusCode p_responseStatusCode) runs on AeSimu{ // Local variables var MsgIn v_response; - var charstring v_month; + var integer v_month; var charstring v_currentTime; var integer v_aeIndex := -1; var RequestPrimitive v_createRequest; @@ -6756,12 +6756,12 @@ module OneM2M_PermutationFunctions { v_createRequest := f_getCreateRequestPrimitive(int1, m_createAcpBase, -1); v_currentTime := fx_generateTimestamp(); v_month := f_getMonth(v_currentTime); - if(v_month =="12") { - v_month := "1"; + if(v_month == 12) { + v_month := 1; } else { - v_month := int2char(char2int(v_month) + 1); + v_month := v_month + 1; } - v_accessControlRule.accessControlContexts_list := {{{"* * * * " & v_month & " *"}, omit, omit}}; + v_accessControlRule.accessControlContexts_list := {{{"* * * * " & int2str(v_month) & " *"}, omit, omit}}; v_createRequest.primitiveContent.accessControlPolicy.privileges.accessControlRule_list := {v_accessControlRule}; vc_acpAuxIndex := f_cse_createResource(int1, v_createRequest); // CSE child resource diff --git a/OneM2M_Testcases_CSE_Release_1.ttcn b/OneM2M_Testcases_CSE_Release_1.ttcn index fcb7a87999ae5ef940a9310b59a620f2379863b3..98a49782041b28a6e72c7e6657c18b82bace27b5 100644 --- a/OneM2M_Testcases_CSE_Release_1.ttcn +++ b/OneM2M_Testcases_CSE_Release_1.ttcn @@ -10684,6 +10684,7 @@ module OneM2M_Testcases_CSE_Release_1 { function f_CSE_DIS_005() runs on AeSimu { // Local variables + var RequestPrimitive v_requestPrimitive := m_createContainerBase; var integer v_aeIndex := -1; var integer v_resourceIndex := -1; var RequestPrimitive v_request; @@ -10703,11 +10704,13 @@ module OneM2M_Testcases_CSE_Release_1 { // Test adapter configuration // Preamble - v_acpAuxIndex := f_cse_preamble_createAcpAux(-, int31);//c_CRUDN) + v_acpAuxIndex := f_cse_preamble_createAcpAux(-, int61);//c_CRUDN) - v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[v_acpAuxIndex].resource)});//AE1 is registred; + v_aeIndex := f_cse_preamble_registerAe();//AE1 is registred; - v_resourceIndex := f_cse_createResource(c_containerResourceType, m_createContainerBase, v_aeIndex); + v_requestPrimitive := f_setAcpId(v_requestPrimitive, {f_getResourceId(vc_resourcesList[v_acpAuxIndex].resource)}); + + v_resourceIndex := f_cse_createResource(c_containerResourceType, v_requestPrimitive, v_aeIndex); v_childResourceIndex := f_cse_createResource(c_containerResourceType, m_createContainerBase, v_resourceIndex); v_request := valueof(m_retrieveFilterUsageOption(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_resourceIndex), int1)); mcaPort.send(f_getMsgOutPrimitive(m_request(v_request))); @@ -11001,12 +11004,12 @@ module OneM2M_Testcases_CSE_Release_1 { alt { [] mcaPort.receive(mw_response(mw_responseDiscovery)) -> value v_response { tc_ac.stop; - if(ispresent(v_response.primitive.responsePrimitive.primitiveContent)){ - setverdict(fail, __SCOPE__ & ": Content is not empty"); + if(lengthof(v_response.primitive.responsePrimitive.primitiveContent.uRIList) != 0) { + setverdict(fail, __SCOPE__ & ": URI List is not empty"); } else { - setverdict(pass, __SCOPE__ & ": Content is empty"); + setverdict(pass, __SCOPE__ & ": URI List is empty"); } } [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) { diff --git a/OneM2M_Testcases_CSE_Release_2.ttcn b/OneM2M_Testcases_CSE_Release_2.ttcn index 55c3c21741bbcc7155fe0ddb7a75eba4fb16de9f..373fd0c0bef2f716c4b808deaf34e369219d756d 100644 --- a/OneM2M_Testcases_CSE_Release_2.ttcn +++ b/OneM2M_Testcases_CSE_Release_2.ttcn @@ -12583,6 +12583,8 @@ module OneM2M_Testcases_CSE_Release_2 { vc_cse1.start(f_cse_notifyProcedure_notify(v_req2)); + v_req2.from_ := PX_CSE1_ID; + tc_ac.start; alt { [] mcaPort.receive(mw_response(mw_responsePollingResponse(v_req2))) -> value v_resp1 {