diff --git a/LibOneM2M/OneM2M_Templates.ttcn b/LibOneM2M/OneM2M_Templates.ttcn index 90f64a5f93cf1fd2b78a30b485b192c9d2a9a365..c154949950271b00e77a607cb08de1ed801f7f62 100644 --- a/LibOneM2M/OneM2M_Templates.ttcn +++ b/LibOneM2M/OneM2M_Templates.ttcn @@ -1344,6 +1344,15 @@ module OneM2M_Templates { resourceType := int10018, primitiveContent := {scheduleAnnc := m_contentCreateScheduleAnnc (omit, {{"* * * * * * *"}})} }; + + /** + * @desc Base CREATE request primitive for Schedule resource + */ + template (value) RequestPrimitive m_createScheduleBase_subscription modifies m_create := { + requestIdentifier := testcasename() & "-m_createSchedule", + resourceType := int18, + primitiveContent := {schedule := m_contentCreateSchedule ({{"* * * * * * *"}}, "notificationSchedule")} + }; template (value) RequestPrimitive m_createSchedule(XSD.ID p_parentResourceAddress, in template (omit) XSD.String p_name, in template (value) ScheduleEntries p_scheduleElement ) modifies m_create := { to_ := p_parentResourceAddress, @@ -1393,7 +1402,7 @@ module OneM2M_Templates { primitiveContent := {subscription := m_contentCreateSubscription ({"NotInitialized"})} }; - template (value) RequestPrimitive m_createSubscription(template (omit) XSD.ID p_to := omit, in template (omit) XSD.String p_name, in template (value) ListOfURIs p_notificationURI := {"NotInitialized"}) modifies m_create := { + template (value) RequestPrimitive m_createSubscription(template (omit) XSD.ID p_to := omit, in template (omit) XSD.String p_name := c_defaultSubscriptionResourceName, in template (value) ListOfURIs p_notificationURI := {"NotInitialized"}) modifies m_create := { to_ := p_to, requestIdentifier := testcasename() & "-m_createSubscription", resourceType := int23, @@ -7165,7 +7174,7 @@ module OneM2M_Templates { notificationEvent:= omit, verificationRequest := omit, subscriptionDeletion := omit, - subscriptionReference := omit, + subscriptionReference := "NotInitialized", creator := omit, notificationForwardingURI := omit, notificationTarget := omit, @@ -7188,7 +7197,7 @@ module OneM2M_Templates { notificationEvent := *, verificationRequest := *, subscriptionDeletion := *, - subscriptionReference := *, + subscriptionReference := ?, creator := *, notificationForwardingURI := *, notificationTarget := *, @@ -7205,7 +7214,7 @@ module OneM2M_Templates { notificationEvent := *,//O verificationRequest := *,//O subscriptionDeletion := *,//O - subscriptionReference := *,//M //TODO Put it back to ? subscriptionReference is mandatory + subscriptionReference := ?,//M creator := *,//O notificationForwardingURI := *,//O notificationTarget := *, diff --git a/OneM2M_PermutationFunctions.ttcn b/OneM2M_PermutationFunctions.ttcn index 7aa1ea57a0e3223a0216039875029afb15e5f93c..f20dfdbd7bc061a6a7595251d4ace69bdb8dd816 100644 --- a/OneM2M_PermutationFunctions.ttcn +++ b/OneM2M_PermutationFunctions.ttcn @@ -3176,7 +3176,7 @@ module OneM2M_PermutationFunctions { } } - f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2); + f_checkAeSimuStatus(); //Check to see if the resource is present or not if (f_cse_isResourcePresent(v_resourceIndex)){ @@ -3324,7 +3324,7 @@ module OneM2M_PermutationFunctions { } } - f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2); + f_checkAeSimuStatus(); //Check to see if the resource is present or not if(f_cse_isResourcePresent(v_resourceIndex)){ @@ -3369,6 +3369,10 @@ module OneM2M_PermutationFunctions { } v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive, v_parentIndex); + if(vc_ae2.running) { + vc_ae2.stop; + }; + if(p_resourceType == int15) { v_request := f_getCreateRequestPrimitive(int3, m_createContainerBase, v_aeIndex); v_request.primitiveContent.container.resourceName := vc_resourcesList[v_resourceIndex].resource.pollingChannel.resourceName; @@ -3805,7 +3809,7 @@ module OneM2M_PermutationFunctions { } } - f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2); + f_checkAeSimuStatus(); //Check to see if the resource is present or not if(f_cse_isResourcePresent(v_resourceIndex)) { @@ -4568,7 +4572,7 @@ module OneM2M_PermutationFunctions { } } - f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2); + f_checkAeSimuStatus(); // Postamble f_cse_postamble_deleteResources(); @@ -6073,6 +6077,10 @@ module OneM2M_PermutationFunctions { } v_resourceIndex := f_cse_createResource(p_resourceType, p_createRequestPrimitive, v_parentIndex); + if (vc_ae2.running) { + vc_ae2.stop; + }; + // Test Body v_request := f_getUpdateRequestPrimitive(p_resourceType, v_resourceIndex, p_updateRequestPrimitive); @@ -6598,6 +6606,8 @@ module OneM2M_PermutationFunctions { } } + f_checkAeSimuStatus(); + vc_primitiveContentRetrievedResource := f_cse_retrieveResource(v_resourceIndex); // Postamble @@ -6652,7 +6662,9 @@ module OneM2M_PermutationFunctions { setverdict(fail, __SCOPE__ & ": No answer while updating resource " & int2str(enum2int(p_resourceTypeChild))); } } - + + f_checkAeSimuStatus(); + vc_primitiveContentRetrievedResource := f_cse_retrieveResource(v_childIndex); // Postamble @@ -6692,7 +6704,7 @@ module OneM2M_PermutationFunctions { p_createRequestPrimitive := f_setAcpId(p_createRequestPrimitive,{f_getResourceAddress(v_acp1Index)}); p_updateRequestPrimitive := f_setAcpId(p_updateRequestPrimitive,{f_getResourceAddress(v_acp2Index)}); - infoPort.send(f_getResourceAddress(lengthof(vc_resourcesList)-1, e_nonHierarchical)) to mtc; + //infoPort.send(f_getResourceAddress(lengthof(vc_resourcesList)-1, e_nonHierarchical)) to mtc; } v_resourceIndex := f_cse_createResource(p_resourceType, p_createRequestPrimitive, vc_aeIndex); @@ -7640,6 +7652,8 @@ module OneM2M_PermutationFunctions { } } + f_checkAeSimuStatus(); + vc_primitiveContentRetrievedResource := f_cse_retrieveResource(v_resourceIndex); // Postamble diff --git a/OneM2M_Testcases_CSE_Release_1.ttcn b/OneM2M_Testcases_CSE_Release_1.ttcn index b24eb16e9ddd93068b4ec09a11e5c1d2f3fe4f70..c3cf2caecfbdfe879a7d13db5f508330567dde17 100644 --- a/OneM2M_Testcases_CSE_Release_1.ttcn +++ b/OneM2M_Testcases_CSE_Release_1.ttcn @@ -2071,7 +2071,7 @@ module OneM2M_Testcases_CSE_Release_1 { [] mccPort.receive(mw_response(mw_responsePrimitive(int2001, v_primitiveContent))) -> value v_response { tc_ac.stop; f_checkAttributesToBeSaved(int10002, v_request, v_response.primitive.responsePrimitive); - v_aeAnncIndex := f_setResource(v_response.primitive.responsePrimitive.primitiveContent, int10002); + v_aeAnncIndex := f_setResource(v_response.primitive.responsePrimitive.primitiveContent, int10002, vc_remoteCseIndex); setverdict(pass, __SCOPE__ & ": AEAnnc successfully created."); if(v_response.primitive.responsePrimitive.primitiveContent.aEAnnc.link != vc_cseSimuDesc.cseId & "/" & PX_ALLOWED_S_AE_IDS[0]) { @@ -8528,7 +8528,9 @@ module OneM2M_Testcases_CSE_Release_1 { v_resourceIndex := f_cse_createResource(int23, v_createRequest, v_aeIndex);//Subscription - f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2); + if(vc_ae2.running) { + vc_ae2.stop; + }; // Test Body v_request:= f_getCreateRequestPrimitive(int3, m_createContainerBase, v_aeIndex); @@ -8554,6 +8556,8 @@ module OneM2M_Testcases_CSE_Release_1 { setverdict(fail, __SCOPE__ & ": No answer while creating resource type int3 (Container)"); } } + + f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2); //Postamble f_cse_postamble_deleteResources(); @@ -8606,7 +8610,9 @@ module OneM2M_Testcases_CSE_Release_1 { v_resourceIndex := f_cse_createResource(int23, v_createRequest, v_aeIndex);//Subscription - f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2); + if(vc_ae2.running) { + vc_ae2.stop; + }; // Test Body v_contentResponse.aE := mw_contentAeBase; // all attributes expected @@ -8636,6 +8642,8 @@ module OneM2M_Testcases_CSE_Release_1 { } }; + f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2); + //Postamble f_cse_postamble_deleteResources(); @@ -8691,7 +8699,9 @@ module OneM2M_Testcases_CSE_Release_1 { v_request := valueof(m_delete(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_resourceIndex))); // Subscription resource deletion request - f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2); + if(vc_ae2.running) { + vc_ae2.stop; + }; // Test Body v_notificationContent.subscriptionReference := ?; diff --git a/OneM2M_Testcases_CSE_Release_2.ttcn b/OneM2M_Testcases_CSE_Release_2.ttcn index 266a46127dd449ec0363bfe1b6d917516a897b86..317ceba4dc0e467cda5e9ff8d14aeddbdb016072 100644 --- a/OneM2M_Testcases_CSE_Release_2.ttcn +++ b/OneM2M_Testcases_CSE_Release_2.ttcn @@ -1133,7 +1133,7 @@ module OneM2M_Testcases_CSE_Release_2 { var template PrimitiveContent v_contentResponse; v_contentResponse.subscription := mw_contentSubscription_rc1; - v_ae1.start(f_CSE_DMR_RET_021(int23, m_createSubscriptionBase, v_contentResponse, int18, m_createScheduleBase));//Subscription + v_ae1.start(f_CSE_DMR_RET_021(int23, m_createSubscriptionBase, v_contentResponse, int18, m_createScheduleBase_subscription));//Subscription v_ae1.done; }