diff --git a/LibOneM2M/OneM2M_Functions.ttcn b/LibOneM2M/OneM2M_Functions.ttcn index b273af75e3b61458dafd52d429f5386302bfbf90..b4ea5b3290b2f60e7f1e55f011ea231e32ef8fa2 100644 --- a/LibOneM2M/OneM2M_Functions.ttcn +++ b/LibOneM2M/OneM2M_Functions.ttcn @@ -7,7 +7,7 @@ * * @author ETSI * @version $URL: https://forge.etsi.org/svn/oneM2M/trunk/ttcn/LibOneM2M/OneM2M_Functions.ttcn $ - * $Id: OneM2M_Functions.ttcn 164 2016-11-17 13:54:53Z carres $ + * $Id: OneM2M_Functions.ttcn 167 2016-11-18 10:54:25Z reinaortega $ * @desc Module containing functions for oneM2M * */ @@ -186,11 +186,10 @@ module OneM2M_Functions { if(p_resourceType == int23){ p_notifyHandler := CseTester.create("NotifyHandler") alive; p_ae2Index := f_cse_createResource(int2, m_createAe(PX_APP_ID, -, PX_AE_ID_STEM, "MyAe2", {"http://" & PX_TESTER_ADDRESS & "/"}), -1); // AE2 is registred - vc_resourcesIndexToBeDeleted := vc_resourcesIndexToBeDeleted & {p_ae2Index}; if(ischosen(p_createRequestPrimitive.primitiveContent.any_1[0].Subscription_optional)){ //this condition is necessary for Subscription TCs where notification URI is set in m_createSubscriptionAdvanced p_createRequestPrimitive.primitiveContent.any_1[0].Subscription_optional.notificationURI := {f_getResourceAddress(p_ae2Index)}; } - p_notifyHandler.start(f_subscription_Handler(f_getResourceAddress(p_aeIndex))); + p_notifyHandler.start(f_subscriptionVerificationHandler(f_getResourceAddress(p_aeIndex))); } } @@ -249,6 +248,19 @@ module OneM2M_Functions { */ function f_cse_postamble_default() runs on CseTester { } + + function f_is_component_done(in CseTester p_notifyHandler) runs on CseTester { + + tc_ac.start(10.0); + alt { + [] p_notifyHandler.done { + tc_ac.stop; + } + [] tc_ac.timeout { + setverdict(inconc, testcasename() & ": Notify verification not received"); + } + } + } //end f_is_component_done }//end group postambleFunctions @@ -279,6 +291,9 @@ module OneM2M_Functions { tc_ac.stop; setverdict(pass, "f_createResource: Resource type " & int2str(enum2int(p_resourceType)) & " created successfuly"); v_resourceIndex := f_setResource(v_response.primitive.responsePrimitive.primitiveContent, p_parentIndex); + if(match(int2, p_resourceType) or match(-1, p_parentIndex)) {//If created resource is an AE or created under CSEBase, it needs to be added to the resourceToBeDeleted list + vc_resourcesIndexToBeDeleted := vc_resourcesIndexToBeDeleted & {v_resourceIndex}; + } } [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { tc_ac.stop; @@ -366,6 +381,35 @@ module OneM2M_Functions { } + /** + * @desc + * @param p_requestPrimitive + * @verdict + */ + function f_cse_updateResource(in RequestPrimitive p_requestPrimitive) runs on CseTester { + var MsgIn v_response; + + mcaPort.send(m_request(p_requestPrimitive)); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + tc_ac.stop; + setverdict(pass, testcasename() & ": Attribute of resource updated successfuly"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { + tc_ac.stop; + setverdict(fail, testcasename() & ": Error while updating resource"); + } + [] mcaPort.receive{ + tc_ac.stop; + setverdict(fail, testcasename() & ": Error, unexpected message received"); + } + [] tc_ac.timeout { + setverdict(inconc, testcasename() & ": No answer while updating resource"); + } + } + }// end f_cse_updateResource + /** * @desc Update of the auxiliar ACP resource * @param p_allowedOperations New allowed operations @@ -402,6 +446,137 @@ module OneM2M_Functions { } } } + + function f_subscriptionVerificationHandler(in XSD.ID p_creator, in ResponseStatusCode v_responseStatusCode := int2001) runs on CseTester { + // Local variables + var MsgIn v_response; + var ResponsePrimitive v_responsePrimitive; + var template Notification v_notificationRequest := mw_contentNotificationBase; + var PrimitiveContent v_notificationResponse; // TODO Need to see if this parameter is required however there is a problem if it s omitted during the verification + + map(self:mcaPort, system:mcaPort); + map(self:acPort, system:acPort); + + v_notificationResponse.any_1 := {{Notification := valueof(mw_contentNotificationAllOmit)}}; + + v_notificationRequest.verificationRequest := true; + v_notificationRequest.creator := p_creator; + //v_notificationRequest.subscriptionReference := "I Don't know which URI is expected"; // TODO mandatory parameter + v_responsePrimitive := valueof(m_responseNotification(v_responseStatusCode,v_notificationResponse));//TODO No PrimitiveContent is expected + + if(v_responseStatusCode != int2001){ + v_responsePrimitive.primitiveContent := omit; + } + + tc_ac.start; + alt { + [] mcaPort.receive(mw_request(mw_notify(v_notificationRequest))) -> value v_response { + tc_ac.stop; + setverdict(pass, testcasename() & ": Notification received"); + //mcaPort.send(m_response(p_responsePrimitive)); + } + [] mcaPort.receive(mw_request(mw_notify(mw_contentNotification(?)))) -> value v_response { + tc_ac.stop; + setverdict(fail, testcasename() & ": Notification received but verificationRequest isn't set to TRUE"); + } + [] mcaPort.receive{ + tc_ac.stop; + setverdict(fail, testcasename() & ": Error, unexpected message received"); + } + [] tc_ac.timeout { + setverdict(inconc, testcasename() & ": No notification received"); + } + } + + mcaPort.send(m_response(v_responsePrimitive)); // TODO have to be deleted + + unmap(self:mcaPort, system:mcaPort); + unmap(self:acPort, system:acPort); + + } //end f_subscriptionVerificationHandler + + function f_check_notificationContent(in RequestPrimitive p_requestPrimitive, template PrimitiveContent p_primitiveContent) runs on CseTester return boolean{ + // Local variables + var boolean v_matchResult := false; + var integer i; + var integer v_numberOfAggregatedNotification; + + if (ischosen(p_primitiveContent.any_1[0].AE_optional)){ + if(ischosen(p_requestPrimitive.primitiveContent.any_1[0].Notification.notificationEvent.representation.resource)) { + v_matchResult := match(p_requestPrimitive.primitiveContent.any_1[0].Notification.notificationEvent.representation.resource.AE_optional, p_primitiveContent.any_1[0].AE_optional) + } + else if(ischosen(p_requestPrimitive.primitiveContent.any_1[0].Notification.notificationEvent.representation.responsePrimitive)) { + v_matchResult :=match(p_requestPrimitive.primitiveContent.any_1[0].Notification.notificationEvent.representation.responsePrimitive.primitiveContent.any_1[0].AE_optional, p_primitiveContent.any_1[0].AE_optional) + } + else if (ischosen(p_requestPrimitive.primitiveContent.any_1[0].AggregatedNotification)) { + v_matchResult := true; + v_numberOfAggregatedNotification := lengthof(p_requestPrimitive.primitiveContent.any_1[0].AggregatedNotification.notification_list); + for(i := 0; i< v_numberOfAggregatedNotification; i := i + 1){ + if(ischosen(p_requestPrimitive.primitiveContent.any_1[0].AggregatedNotification.notification_list[i].notificationEvent.representation.resource)) { + if(not (match(p_requestPrimitive.primitiveContent.any_1[0].AggregatedNotification.notification_list[i].notificationEvent.representation.resource.AE_optional, p_primitiveContent.any_1[0].AE_optional))){ + v_matchResult := false; + } + } + else if(ischosen(p_requestPrimitive.primitiveContent.any_1[0].AggregatedNotification.notification_list[i].notificationEvent.representation.responsePrimitive)) { + if(not (match(p_requestPrimitive.primitiveContent.any_1[0].AggregatedNotification.notification_list[i].notificationEvent.representation.responsePrimitive.primitiveContent.any_1[0].AE_optional, p_primitiveContent.any_1[0].AE_optional))){ + v_matchResult := false; + } + } + } + if (i == 0){ + v_matchResult := false; + } + } + + } + + if (ischosen(p_primitiveContent.any_1[0].Container_optional)){ + if(ischosen(p_requestPrimitive.primitiveContent.any_1[0].Notification.notificationEvent.representation.resource)) { + v_matchResult := match(p_requestPrimitive.primitiveContent.any_1[0].Notification.notificationEvent.representation.resource.Container_optional, p_primitiveContent.any_1[0].Container_optional) + } + else if(ischosen(p_requestPrimitive.primitiveContent.any_1[0].Notification.notificationEvent.representation.responsePrimitive)) { + v_matchResult := match(p_requestPrimitive.primitiveContent.any_1[0].Notification.notificationEvent.representation.responsePrimitive.primitiveContent.any_1[0].Container_optional, p_primitiveContent.any_1[0].Container_optional) + } + } + + return v_matchResult; + + } //end f_check_notificationContent + + function f_cse_notifyProcedure(template PrimitiveContent p_primitiveContent) runs on CseTester { + // Local variables + var MsgIn v_response; + + map(self:mcaPort, system:mcaPort); + map(self:acPort, system:acPort); + + tc_ac.start; + alt { + [] mcaPort.receive(mw_request(mw_notify(mw_contentNotification(?)))) -> value v_response { + tc_ac.stop; + if(f_check_notificationContent(v_response.primitive.requestPrimitive, p_primitiveContent)){ + setverdict(pass, testcasename() & ": Notification received"); + mcaPort.send(m_response(valueof(m_responseNotification(int2001)))); + } + else{ + setverdict(fail, testcasename() & ": Notification received but the content doesn't match"); + } + } + [] mcaPort.receive{ + tc_ac.stop; + setverdict(fail, testcasename() & ": Error, unexpected message received"); + } + [] tc_ac.timeout { + setverdict(inconc, testcasename() & ": No notification received"); + } + } + + + unmap(self:mcaPort, system:mcaPort); + unmap(self:acPort, system:acPort); + + } //end f_cse_notifyProcedure + }//end group helpingFunctions @@ -814,174 +989,4 @@ module OneM2M_Functions { }//end of commonFunctions - group Sylvain { - function f_subscription_Handler(in XSD.ID p_creator, in ResponseStatusCode v_responseStatusCode := int2001) runs on CseTester { - // Local variables - var MsgIn v_response; - var ResponsePrimitive v_responsePrimitive; - var template Notification v_notificationRequest := mw_contentNotificationBase; - var PrimitiveContent v_notificationResponse; // TODO Need to see if this parameter is required however there is a problem if it s omitted during the verification - - map(self:mcaPort, system:mcaPort); - map(self:acPort, system:acPort); - - v_notificationResponse.any_1 := {{Notification := valueof(mw_contentNotificationAllOmit)}}; - - v_notificationRequest.verificationRequest := true; - v_notificationRequest.creator := p_creator; - //v_notificationRequest.subscriptionReference := "I Don't know which URI is expected"; // TODO mandatory parameter - v_responsePrimitive := valueof(m_responseNotification(v_responseStatusCode,v_notificationResponse));//TODO No PrimitiveContent is expected - - if(v_responseStatusCode != int2001){ - v_responsePrimitive.primitiveContent := omit; - } - - tc_ac.start; - alt { - [] mcaPort.receive(mw_request(mw_notify(v_notificationRequest))) -> value v_response { - tc_ac.stop; - setverdict(pass, testcasename() & ": Notification received"); - //mcaPort.send(m_response(p_responsePrimitive)); - } - [] mcaPort.receive(mw_request(mw_notify(mw_contentNotification(?)))) -> value v_response { - tc_ac.stop; - setverdict(fail, testcasename() & ": Notification received but verificationRequest isn't set to TRUE"); - } - [] mcaPort.receive{ - tc_ac.stop; - setverdict(fail, testcasename() & ": Error, unexpected message received"); - } - [] tc_ac.timeout { - setverdict(inconc, testcasename() & ": No notification received"); - } - } - - mcaPort.send(m_response(v_responsePrimitive)); // TODO have to be deleted - - unmap(self:mcaPort, system:mcaPort); - unmap(self:acPort, system:acPort); - - } //end f_subscription_Handler - - function f_match_contentNotificationRequest(in RequestPrimitive p_requestPrimitive, template PrimitiveContent p_primitiveContent) runs on CseTester return boolean{ - // Local variables - var boolean v_matchResult := false; - var integer i; - var integer v_numberOfAggregatedNotification; - - if (ischosen(p_primitiveContent.any_1[0].AE_optional)){ - if(ischosen(p_requestPrimitive.primitiveContent.any_1[0].Notification.notificationEvent.representation.resource)) { - v_matchResult := match(p_requestPrimitive.primitiveContent.any_1[0].Notification.notificationEvent.representation.resource.AE_optional, p_primitiveContent.any_1[0].AE_optional) - } - else if(ischosen(p_requestPrimitive.primitiveContent.any_1[0].Notification.notificationEvent.representation.responsePrimitive)) { - v_matchResult :=match(p_requestPrimitive.primitiveContent.any_1[0].Notification.notificationEvent.representation.responsePrimitive.primitiveContent.any_1[0].AE_optional, p_primitiveContent.any_1[0].AE_optional) - } - else if (ischosen(p_requestPrimitive.primitiveContent.any_1[0].AggregatedNotification)) { - v_matchResult := true; - v_numberOfAggregatedNotification := lengthof(p_requestPrimitive.primitiveContent.any_1[0].AggregatedNotification.notification_list); - for(i := 0; i< v_numberOfAggregatedNotification; i := i + 1){ - if(ischosen(p_requestPrimitive.primitiveContent.any_1[0].AggregatedNotification.notification_list[i].notificationEvent.representation.resource)) { - if(not (match(p_requestPrimitive.primitiveContent.any_1[0].AggregatedNotification.notification_list[i].notificationEvent.representation.resource.AE_optional, p_primitiveContent.any_1[0].AE_optional))){ - v_matchResult := false; - } - } - else if(ischosen(p_requestPrimitive.primitiveContent.any_1[0].AggregatedNotification.notification_list[i].notificationEvent.representation.responsePrimitive)) { - if(not (match(p_requestPrimitive.primitiveContent.any_1[0].AggregatedNotification.notification_list[i].notificationEvent.representation.responsePrimitive.primitiveContent.any_1[0].AE_optional, p_primitiveContent.any_1[0].AE_optional))){ - v_matchResult := false; - } - } - } - if (i == 0){ - v_matchResult := false; - } - } - - } - - if (ischosen(p_primitiveContent.any_1[0].Container_optional)){ - if(ischosen(p_requestPrimitive.primitiveContent.any_1[0].Notification.notificationEvent.representation.resource)) { - v_matchResult := match(p_requestPrimitive.primitiveContent.any_1[0].Notification.notificationEvent.representation.resource.Container_optional, p_primitiveContent.any_1[0].Container_optional) - } - else if(ischosen(p_requestPrimitive.primitiveContent.any_1[0].Notification.notificationEvent.representation.responsePrimitive)) { - v_matchResult := match(p_requestPrimitive.primitiveContent.any_1[0].Notification.notificationEvent.representation.responsePrimitive.primitiveContent.any_1[0].Container_optional, p_primitiveContent.any_1[0].Container_optional) - } - } - - return v_matchResult; - - } //end f_match_contentNotificationRequest - - function f_update_attribute_request(in RequestPrimitive p_requestPrimitive) runs on CseTester { - var MsgIn v_response; - - mcaPort.send(m_request(p_requestPrimitive)); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { - tc_ac.stop; - setverdict(pass, testcasename() & ": Attribute of resource updated successfuly"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { - tc_ac.stop; - setverdict(fail, testcasename() & ": Error while updating resource"); - } - [] mcaPort.receive{ - tc_ac.stop; - setverdict(fail, testcasename() & ": Error, unexpected message received"); - } - [] tc_ac.timeout { - setverdict(inconc, testcasename() & ": No answer while updating resource"); - } - } - }// end f_update_attribute_request - - function f_match_notification_primitive(template PrimitiveContent p_primitiveContent) runs on CseTester { - // Local variables - var MsgIn v_response; - - map(self:mcaPort, system:mcaPort); - map(self:acPort, system:acPort); - - tc_ac.start; - alt { - [] mcaPort.receive(mw_request(mw_notify(mw_contentNotification(?)))) -> value v_response { - tc_ac.stop; - if(f_match_contentNotificationRequest(v_response.primitive.requestPrimitive, p_primitiveContent)){ - setverdict(pass, testcasename() & ": Notification received"); - } - else{ - setverdict(fail, testcasename() & ": Notification received but the content doesn't match"); - } - } - [] mcaPort.receive{ - tc_ac.stop; - setverdict(fail, testcasename() & ": Error, unexpected message received"); - } - [] tc_ac.timeout { - setverdict(inconc, testcasename() & ": No notification received"); - } - } - - mcaPort.send(m_response(valueof(m_responseNotification(int2001)))); - - unmap(self:mcaPort, system:mcaPort); - unmap(self:acPort, system:acPort); - - } //end f_match_notification_primitive - - function f_is_component_done(in CseTester p_notifyHandler) runs on CseTester { - tc_ac.start(10.0); - alt { - [] p_notifyHandler.done { - tc_ac.stop; - } - [] tc_ac.timeout { - setverdict(inconc, testcasename() & ": No answer while updating resource type int2 (Ae)"); - } - } - } //end f_is_component_done - } - - - } // end of module diff --git a/LibOneM2M/OneM2M_Templates.ttcn b/LibOneM2M/OneM2M_Templates.ttcn index 1c2f07dac66fce8ada00b408f4b03c9c5485e478..7142ab4e8a32721c6daba8c29928c89168f4d25a 100644 --- a/LibOneM2M/OneM2M_Templates.ttcn +++ b/LibOneM2M/OneM2M_Templates.ttcn @@ -7,7 +7,7 @@ * * @author ETSI * @version $URL: https://forge.etsi.org/svn/oneM2M/trunk/ttcn/LibOneM2M/OneM2M_Templates.ttcn $ - * $Id: OneM2M_Templates.ttcn 165 2016-11-17 14:52:31Z reinaortega $ + * $Id: OneM2M_Templates.ttcn 167 2016-11-18 10:54:25Z reinaortega $ * @desc Module containing templates for oneM2M * */ @@ -1194,20 +1194,9 @@ module OneM2M_Templates { choice := omit //NP }; - template (value) AccessControlPolicy_optional m_contentUpdateAcpPrivileges(in template(omit) SetOfAcrs p_privileges, in template(omit) SetOfAcrs p_selfPrivileges) := { - resourceName := omit,//NP - resourceType := omit,//NP - resourceID := omit,//NP - parentID := omit,//NP - creationTime := omit,//NP - lastModifiedTime := omit,//NP - labels := omit,//O - expirationTime := omit,//O - announceTo := omit,//O - announcedAttribute := omit,//O + template (value) AccessControlPolicy_optional m_contentUpdateAcpPrivileges(in template(omit) SetOfAcrs p_privileges, in template(omit) SetOfAcrs p_selfPrivileges) modifies m_contentUpdateAcp := { privileges := p_privileges,//O - selfPrivileges := p_selfPrivileges,//O - choice := omit //NP + selfPrivileges := p_selfPrivileges//O }; /** diff --git a/OneM2M_Testcases.ttcn b/OneM2M_Testcases.ttcn index 604928c7cf8dc5214e66db0d0838f0a355f62c5d..683e631c57a27a1b31da1aa7cb014aa88c0600f8 100644 --- a/OneM2M_Testcases.ttcn +++ b/OneM2M_Testcases.ttcn @@ -7,7 +7,7 @@ * * @author ETSI * @version $URL: https://forge.etsi.org/svn/oneM2M/trunk/ttcn/OneM2M_Testcases.ttcn $ - * $Id: OneM2M_Testcases.ttcn 164 2016-11-17 13:54:53Z carres $ + * $Id: OneM2M_Testcases.ttcn 167 2016-11-18 10:54:25Z reinaortega $ * @desc Module containing test cases for oneM2M * */ @@ -1087,7 +1087,7 @@ module OneM2M_Testcases { var integer v_sizeResourceTypeList; var integer i; var RequestPrimitiveMatrix v_requestPrimitivematrix; - var CseTester v_notifyHandler; + var CseTester v_notifyHandler := CseTester.create("NotifyHandler") alive;//TODO useless but need to be initialized see if we can remove it v_requestPrimitivematrix := { {}, @@ -1116,7 +1116,7 @@ module OneM2M_Testcases { var RequestPrimitiveMatrix v_requestPrimitivematrix; var integer v_sizeResourceTypeList; var integer i; - var CseTester v_notifyHandler; + var CseTester v_notifyHandler := CseTester.create("NotifyHandler") alive; //CSEBase int5, remoteCSE int16, AE int2 v_requestPrimitivematrix := { @@ -1145,7 +1145,7 @@ module OneM2M_Testcases { var integer v_sizeResourceTypeList; var integer i; var RequestPrimitiveMatrix v_requestPrimitivematrix; - var CseTester v_notifyHandler; + var CseTester v_notifyHandler := CseTester.create("NotifyHandler") alive; //CSEBase int5, remoteCSE int16, AE int2 v_requestPrimitivematrix := { @@ -1203,7 +1203,7 @@ module OneM2M_Testcases { var integer v_sizeResourceTypeList; var integer i; var RequestPrimitiveMatrix v_requestPrimitivematrix; - var CseTester v_notifyHandler; + var CseTester v_notifyHandler := CseTester.create("NotifyHandler") alive; //remoteCSE int16, AE int2 v_requestPrimitivematrix := { @@ -1269,7 +1269,6 @@ module OneM2M_Testcases { var integer i; var integer v_parentIndex := -1; var integer v_resourceIndex := -1; - var CseTester v_notifyHandler; var integer v_ae2Index := -1; var PoaList v_poaList := {"http://" & PX_TESTER_ADDRESS & "/"}; @@ -1285,23 +1284,18 @@ module OneM2M_Testcases { for (i := 0; i<v_sizeResourceTypeList; i := i+1){ if(match(p_requestPrimitiveList[i].resourceType, int23)){ v_ae2Index := f_cse_createResource(int2, m_createAe(PX_APP_ID, -, PX_AE_ID_STEM, "MyAe2", v_poaList), -1); // AE2 is registred - vc_resourcesIndexToBeDeleted := vc_resourcesIndexToBeDeleted & {v_ae2Index}; p_requestPrimitiveList[i].primitiveContent.any_1[0].Subscription_optional.notificationURI := {f_getResourceAddress(v_ae2Index)}; - p_notifyHandler.start(f_subscription_Handler(f_getResourceAddress(v_parentIndex))); + p_notifyHandler.start(f_subscriptionVerificationHandler(f_getResourceAddress(v_parentIndex))); } v_parentIndex := f_cse_createResource(p_requestPrimitiveList[i].resourceType, p_requestPrimitiveList[i], v_parentIndex); - if (i == 0){ - vc_resourcesIndexToBeDeleted := vc_resourcesIndexToBeDeleted & {v_parentIndex}; - } } // Test Body - if(match(p_requestPrimitive.resourceType, int23)){ + if(match(int23, p_requestPrimitive.resourceType)){ v_ae2Index := f_cse_createResource(int2, m_createAe(PX_APP_ID, -, PX_AE_ID_STEM, "MyAe2", v_poaList), -1); // AE2 is registred - vc_resourcesIndexToBeDeleted := vc_resourcesIndexToBeDeleted & {v_ae2Index}; p_requestPrimitive.primitiveContent.any_1[0].Subscription_optional.notificationURI := {f_getResourceAddress(v_ae2Index)}; - p_notifyHandler.start(f_subscription_Handler(f_getResourceAddress(v_parentIndex))); + p_notifyHandler.start(f_subscriptionVerificationHandler(f_getResourceAddress(v_parentIndex))); } v_request := f_getCreateRequestPrimitive(p_resourceType, p_requestPrimitive, v_parentIndex); @@ -1348,9 +1342,7 @@ module OneM2M_Testcases { // Local variables var ResponsePrimitive v_responsePrimitive; - //CSEBase int5, remoteCSE int16, AE int2, container int3, - - v_responsePrimitive := f_CSE_DMR_CRE_BV_002(int3, m_createContainerBase);//container + v_responsePrimitive := f_CSE_DMR_CRE_BV_002(int3, m_createContainerBase);//container if(getverdict == pass){ if(not ispresent(v_responsePrimitive.primitiveContent.any_1[0].Container_optional.resourceName)){ @@ -1367,8 +1359,6 @@ module OneM2M_Testcases { // Local variables var ResponsePrimitive v_responsePrimitive; - // CSEBase int5, remoteCSE int16, AE int2 - v_responsePrimitive := f_CSE_DMR_CRE_BV_002(int9, m_createGroupBase);//group if(getverdict == pass){ @@ -4006,7 +3996,7 @@ module OneM2M_Testcases { var MsgIn v_response; var integer v_aeIndex := -1; var integer v_containerIndex := -1; - var RequestPrimitive v_updateRequest := m_updateContainerBase; + var RequestPrimitive v_updateRequest := valueof(m_updateContainerBase); var Labels v_labels_1:= {"VALUE_1"}; v_updateRequest.primitiveContent.any_1[0].Container_optional.labels := v_labels_1; @@ -4026,7 +4016,7 @@ module OneM2M_Testcases { if(ispresent(vc_resourcesList[v_containerIndex].resource.any_1[0].Container_optional.stateTag)) { v_updateRequest := f_getUpdateRequestPrimitive(int3, v_containerIndex, v_updateRequest); - f_update_attribute_request(v_updateRequest); + f_cse_updateResource(v_updateRequest); mcaPort.send(m_request(m_retrieveResource(f_getResourceAddress(v_containerIndex), f_getOriginator(v_containerIndex)))); @@ -4242,7 +4232,7 @@ module OneM2M_Testcases { else{ f_setAcpId(p_createRequestPrimitive, {f_getResourceId(vc_resourcesList[v_acpAuxIndex].resource)}); v_setOfArcs.accessControlRule_list := {v_accessControlRule_1, v_accessControlRule_2}; - v_updateRequest := m_updateAcpPrivileges(v_setOfArcs, -); + v_updateRequest := valueof(m_updateAcpPrivileges(v_setOfArcs, -)); v_updateRequest := f_getUpdateRequestPrimitive(int1, vc_acpAuxIndex, v_updateRequest); mcaPort.send(m_request(v_updateRequest)); @@ -7372,12 +7362,11 @@ module OneM2M_Testcases { // Preamble v_aeIndex := f_cse_preamble_registerAe(omit,omit);//c_CUDNDi); v_ae2Index := f_cse_createResource(int2, m_createAe(PX_APP_ID, -, PX_AE_ID_STEM, "MyAe2", {"http://" & PX_TESTER_ADDRESS & "/"}), -1); - vc_resourcesIndexToBeDeleted := vc_resourcesIndexToBeDeleted & {v_ae2Index}; v_request := f_getCreateRequestPrimitive(int23, v_createRequest, v_aeIndex);//Subscription v_request.primitiveContent.any_1[0].Subscription_optional.notificationURI := {f_getResourceAddress(v_ae2Index)}; - notifyHandler.start(f_subscription_Handler(f_getResourceAddress(v_aeIndex), int4101)); + notifyHandler.start(f_subscriptionVerificationHandler(f_getResourceAddress(v_aeIndex), int4101)); mcaPort.send(m_request(v_request)); @@ -7431,12 +7420,11 @@ module OneM2M_Testcases { // Preamble v_aeIndex := f_cse_preamble_registerAe(omit,omit);//c_CUDNDi); // set poa to MTC adress v_ae2Index := f_cse_createResource(int2, m_createAe(PX_APP_ID, -, PX_AE_ID_STEM, "MyAe2", {"http://" & PX_TESTER_ADDRESS & "/"}), -1); - vc_resourcesIndexToBeDeleted := vc_resourcesIndexToBeDeleted & {v_ae2Index}; v_request := f_getCreateRequestPrimitive(int23, v_createRequest, v_aeIndex);//Subscription v_request.primitiveContent.any_1[0].Subscription_optional.notificationURI := {f_getResourceAddress(v_ae2Index)}; - notifyHandler.start(f_subscription_Handler(f_getResourceAddress(v_aeIndex), int5205)); + notifyHandler.start(f_subscriptionVerificationHandler(f_getResourceAddress(v_aeIndex), int5205)); mcaPort.send(m_request(v_request)); @@ -7503,10 +7491,12 @@ module OneM2M_Testcases { v_request:= f_getUpdateRequestPrimitive(int2, v_aeIndex, v_updateRequest); // Update request - f_is_component_done(v_notifyHandler); + if(v_notifyHandler.running) { + v_notifyHandler.stop; + }; // Test Body - v_notifyHandler.start(f_match_notification_primitive(v_contentResponse)); // check if the notification is well received and if its content matchs + v_notifyHandler.start(f_cse_notifyProcedure(v_contentResponse)); // check if the notification is well received and if its content matchs mcaPort.send(m_request(v_request)); tc_ac.start; @@ -7526,7 +7516,9 @@ module OneM2M_Testcases { [] tc_ac.timeout { setverdict(inconc, testcasename() & ": No answer while updating resource type int2 (Ae)"); } - } + }; + + f_is_component_done(v_notifyHandler); //Postamble f_cse_postamble_deleteResources(); @@ -7546,7 +7538,7 @@ module OneM2M_Testcases { var MsgIn v_response; var integer v_aeIndex := -1; var integer v_resourceIndex := -1; - var template RequestPrimitive v_createRequest; + var template RequestPrimitive v_createRequest := omit; var template PrimitiveContent v_contentResponse; var RequestPrimitive v_request; var CseTester v_notifyHandler; @@ -7574,7 +7566,7 @@ module OneM2M_Testcases { f_is_component_done(v_notifyHandler); // Test Body - v_notifyHandler.start(f_match_notification_primitive(v_contentResponse)); // check if the notification is well received and if its content matchs + v_notifyHandler.start(f_cse_notifyProcedure(v_contentResponse)); // check if the notification is well received and if its content matchs mcaPort.send(m_request(v_request)); tc_ac.start; @@ -7612,7 +7604,7 @@ module OneM2M_Testcases { var MsgIn v_response; var integer v_aeIndex := -1; var integer v_subscriptionResourceIndex := -1; - var template RequestPrimitive v_createRequest; + var template RequestPrimitive v_createRequest := omit; var template PrimitiveContent v_contentResponse; var RequestPrimitive v_deleteRequest; var CseTester v_notifyHandler; @@ -7717,7 +7709,7 @@ module OneM2M_Testcases { var integer v_aeIndex := -1; var integer v_subscriptionResourceIndex := -1; var integer v_containerResourceIndex := -1; - var template RequestPrimitive v_createRequest; + var template RequestPrimitive v_createRequest := omit; var RequestPrimitive v_deleteRequest; var template PrimitiveContent v_contentResponse; var CseTester v_notifyHandler; @@ -7745,7 +7737,7 @@ module OneM2M_Testcases { f_is_component_done(v_notifyHandler); //Test Body - v_notifyHandler.start(f_match_notification_primitive(v_contentResponse)); // check if the notification is well received and if its content matchs + v_notifyHandler.start(f_cse_notifyProcedure(v_contentResponse)); // check if the notification is well received and if its content matchs mcaPort.send(m_request(v_deleteRequest)); tc_ac.start; @@ -7794,7 +7786,7 @@ module OneM2M_Testcases { var integer v_resourceIndex := -1; var Labels v_labels_1:= {"VALUE_1"}; var template PrimitiveContent v_contentResponse; - var template RequestPrimitive v_createRequest; + var template RequestPrimitive v_createRequest := omit; var template RequestPrimitive v_updateRequest := m_updateAeBase; var RequestPrimitive v_request; var CseTester v_notifyHandler; @@ -7825,7 +7817,7 @@ module OneM2M_Testcases { f_is_component_done(v_notifyHandler); // Test Body - v_notifyHandler.start(f_match_notification_primitive(v_contentResponse)); // check if the notification is well received and if its content matchs + v_notifyHandler.start(f_cse_notifyProcedure(v_contentResponse)); // check if the notification is well received and if its content matchs mcaPort.send(m_request(v_request)); tc_ac.start; @@ -7865,7 +7857,7 @@ module OneM2M_Testcases { var integer v_aeIndex := -1; var integer v_resourceIndex := -1; var Labels v_labels_1:= {"VALUE_1"}; - var template RequestPrimitive v_createRequest; + var template RequestPrimitive v_createRequest := omit; var template PrimitiveContent v_contentResponse; var template RequestPrimitive v_updateRequest := m_updateAeBase; var RequestPrimitive v_request; @@ -7897,7 +7889,7 @@ module OneM2M_Testcases { f_is_component_done(v_notifyHandler); // Test Body - v_notifyHandler.start(f_match_notification_primitive(v_contentResponse)); // check if the notification is well received and if its content matchs + v_notifyHandler.start(f_cse_notifyProcedure(v_contentResponse)); // check if the notification is well received and if its content matchs mcaPort.send(m_request(v_request)); tc_ac.start; @@ -7936,7 +7928,7 @@ module OneM2M_Testcases { var integer v_resourceIndex := -1; var Labels v_labels_1:= {"VALUE_1"}; var template PrimitiveContent v_contentResponse; - var template RequestPrimitive v_createRequest; + var template RequestPrimitive v_createRequest := omit; var template RequestPrimitive v_updateRequest := m_updateAeBase; var RequestPrimitive v_request; var template PrimitiveContent v_retrieveContentResponse; @@ -7966,10 +7958,10 @@ module OneM2M_Testcases { f_is_component_done(v_notifyHandler); // Test Body - v_notifyHandler.start(f_match_notification_primitive(v_contentResponse)); // check if the notification is well received and if its content matchs + v_notifyHandler.start(f_cse_notifyProcedure(v_contentResponse)); // check if the notification is well received and if its content matchs v_request:= f_getUpdateRequestPrimitive(int2, v_aeIndex, v_updateRequest); // AE update request - f_update_attribute_request(v_request); // AE update + f_cse_updateResource(v_request); // AE update //TODO See if we keep this f_is_component_done, it assure that the retrieve operation is executed after having sent and received the Notification f_is_component_done(v_notifyHandler); @@ -8019,7 +8011,7 @@ module OneM2M_Testcases { var integer v_resourceIndex := -1; var Labels v_labels_1:= {"VALUE_1"}; var template PrimitiveContent v_contentResponse; - var template RequestPrimitive v_createRequest; + var template RequestPrimitive v_createRequest := omit; var template RequestPrimitive v_updateRequest := m_updateAeBase; var RequestPrimitive v_request; var CseTester v_notifyHandler; @@ -8048,10 +8040,10 @@ module OneM2M_Testcases { // Test Body - v_notifyHandler.start(f_match_notification_primitive(v_contentResponse)); // check if the notification is well received and if its content matchs + v_notifyHandler.start(f_cse_notifyProcedure(v_contentResponse)); // check if the notification is well received and if its content matchs v_request:= f_getUpdateRequestPrimitive(int2, v_aeIndex, v_updateRequest); // AE update request - f_update_attribute_request(v_request); // AE update + f_cse_updateResource(v_request); // AE update //TODO See if we keep this f_is_component_done, it assure that the retrieve operation is executed after having sent and received the Notification f_is_component_done(v_notifyHandler); @@ -8096,7 +8088,7 @@ module OneM2M_Testcases { var Attribute v_attribute := {"labels",{omit,omit,{"VALUE_1"}}};// TODO normaly value isn't expected var integer v_aeIndex := -1; var integer v_resourceIndex := -1; - var template RequestPrimitive v_createRequest; + var template RequestPrimitive v_createRequest := omit; var template PrimitiveContent v_contentResponse; var template RequestPrimitive v_updateRequest := m_updateAeBase; var RequestPrimitive v_request; @@ -8127,7 +8119,7 @@ module OneM2M_Testcases { f_is_component_done(v_notifyHandler); // Test Body - v_notifyHandler.start(f_match_notification_primitive(v_contentResponse)); // check if the notification is well received and if its content matchs + v_notifyHandler.start(f_cse_notifyProcedure(v_contentResponse)); // check if the notification is well received and if its content matchs mcaPort.send(m_request(v_request)); tc_ac.start; @@ -8168,7 +8160,7 @@ module OneM2M_Testcases { var Attribute v_attribute := {"appName",{omit,omit,{"VALUE_1"}}}; // TODO normaly value isn't expected var integer v_aeIndex := -1; var integer v_resourceIndex := -1; - var template RequestPrimitive v_createRequest; + var template RequestPrimitive v_createRequest := omit; var template RequestPrimitive v_updateRequest := m_updateAeBase; var RequestPrimitive v_request; var CseTester v_notifyHandler; @@ -8254,7 +8246,7 @@ module OneM2M_Testcases { var MsgIn v_response; var integer v_aeIndex := -1; var integer v_resourceIndex := -1; - var template RequestPrimitive v_createRequest; + var template RequestPrimitive v_createRequest := omit; var RequestPrimitive v_request; var CseTester v_notifyHandler; var integer v_ae2Index := -1; @@ -8355,7 +8347,7 @@ module OneM2M_Testcases { var Labels v_labels_3:= {"VALUE_3"}; var integer v_aeIndex := -1; var integer v_resourceIndex := -1; - var template RequestPrimitive v_createRequest; + var template RequestPrimitive v_createRequest := omit; var template PrimitiveContent v_contentResponse; var template RequestPrimitive v_updateRequest := m_updateAeBase; var RequestPrimitive v_request; @@ -8387,15 +8379,15 @@ module OneM2M_Testcases { v_updateRequest.primitiveContent.any_1[0].AE_optional.labels := v_labels_1; v_request:= f_getUpdateRequestPrimitive(int2, v_aeIndex, v_updateRequest); // Update request 1 - f_update_attribute_request(v_request); + f_cse_updateResource(v_request); v_updateRequest.primitiveContent.any_1[0].AE_optional.labels := v_labels_2; v_request:= f_getUpdateRequestPrimitive(int2, v_aeIndex, v_updateRequest); // Update request 2 - f_update_attribute_request(v_request); + f_cse_updateResource(v_request); v_updateRequest.primitiveContent.any_1[0].AE_optional.labels := v_labels_3; v_request:= f_getUpdateRequestPrimitive(int2, v_aeIndex, v_updateRequest); // Update request 3 - f_update_attribute_request(v_request); + f_cse_updateResource(v_request); //Postamble f_cse_postamble_deleteResources(); @@ -8417,7 +8409,7 @@ module OneM2M_Testcases { [] mcaPort.receive(mw_request(mw_aggregatedNotifyBase)) -> value v_response { tc_ac.stop; if(p_numberOfAggregatedNotification == lengthof(v_response.primitive.requestPrimitive.primitiveContent.any_1[0].AggregatedNotification.notification_list)){ - if(f_match_contentNotificationRequest(v_response.primitive.requestPrimitive, p_primitiveContent)){ + if(f_check_notificationContent(v_response.primitive.requestPrimitive, p_primitiveContent)){ setverdict(pass, testcasename() & ": Notification received"); } else{ @@ -8454,7 +8446,7 @@ module OneM2M_Testcases { var Labels v_labels_2:= {"VALUE_2"}; var integer v_aeIndex := -1; var integer v_resourceIndex := -1; - var template RequestPrimitive v_createRequest; + var template RequestPrimitive v_createRequest := omit; var template PrimitiveContent v_contentResponse; var template RequestPrimitive v_updateRequest := m_updateAeBase; var RequestPrimitive v_request; @@ -8486,11 +8478,11 @@ module OneM2M_Testcases { v_updateRequest.primitiveContent.any_1[0].AE_optional.labels := v_labels_1; v_request:= f_getUpdateRequestPrimitive(int2, v_aeIndex, v_updateRequest); // Update request 1 - f_update_attribute_request(v_request); + f_cse_updateResource(v_request); v_updateRequest.primitiveContent.any_1[0].AE_optional.labels := v_labels_2; v_request:= f_getUpdateRequestPrimitive(int2, v_aeIndex, v_updateRequest); // Update request 2 - f_update_attribute_request(v_request); + f_cse_updateResource(v_request); //Postamble f_cse_postamble_deleteResources(); @@ -8513,7 +8505,7 @@ module OneM2M_Testcases { var Labels v_labels_3:= {"VALUE_3"}; var integer v_aeIndex := -1; var integer v_resourceIndex := -1; - var template RequestPrimitive v_createRequest; + var template RequestPrimitive v_createRequest := omit; var template PrimitiveContent v_contentResponse; var template RequestPrimitive v_updateRequest := m_updateAeBase; var RequestPrimitive v_request; @@ -8545,19 +8537,19 @@ module OneM2M_Testcases { f_is_component_done(v_notifyHandler); // Test Body - v_notifyHandler.start(f_match_notification_primitive(v_contentResponse)); // check if the notification is well received and if its content matchs + v_notifyHandler.start(f_cse_notifyProcedure(v_contentResponse)); // check if the notification is well received and if its content matchs v_updateRequest.primitiveContent.any_1[0].AE_optional.labels := v_labels_1; v_request:= f_getUpdateRequestPrimitive(int2, v_aeIndex, v_updateRequest); // Update request 1 - f_update_attribute_request(v_request); + f_cse_updateResource(v_request); v_updateRequest.primitiveContent.any_1[0].AE_optional.labels := v_labels_2; v_request:= f_getUpdateRequestPrimitive(int2, v_aeIndex, v_updateRequest); // Update request 2 - f_update_attribute_request(v_request); + f_cse_updateResource(v_request); v_updateRequest.primitiveContent.any_1[0].AE_optional.labels := v_labels_3; v_request:= f_getUpdateRequestPrimitive(int2, v_aeIndex, v_updateRequest); // Update request 3 - f_update_attribute_request(v_request); + f_cse_updateResource(v_request); //Postamble f_cse_postamble_deleteResources(); @@ -8605,8 +8597,7 @@ module OneM2M_Testcases { // Test Body v_acpIndex := f_cse_createResource(int1, v_createRequest); // CSE child resource - vc_resourcesIndexToBeDeleted := vc_resourcesIndexToBeDeleted & {v_acpIndex}; - + mcaPort.send(m_request(m_retrieveResource(f_getResourceAddress(v_acpIndex), f_getOriginator(v_acpIndex)))); tc_ac.start; @@ -8668,8 +8659,7 @@ module OneM2M_Testcases { // Test Body v_acpIndex := f_cse_createResource(int1, v_createRequest); // CSE child resource - vc_resourcesIndexToBeDeleted := vc_resourcesIndexToBeDeleted & {v_acpIndex}; - + mcaPort.send(m_request(m_retrieveResource(f_getResourceAddress(v_acpIndex), f_getOriginator(v_acpIndex)))); tc_ac.start; @@ -8740,9 +8730,8 @@ module OneM2M_Testcases { // Test adapter configuration // Preamble - v_createRequest := m_createAcp(f_getResourceAddress(), c_defaultResourceName, {"testDomain"}); + v_createRequest := valueof(m_createAcp(f_getResourceAddress(), c_defaultResourceName, {"testDomain"})); v_acpIndex := f_cse_createResource(int1, v_createRequest); // CSE child resource - vc_resourcesIndexToBeDeleted := vc_resourcesIndexToBeDeleted & {v_acpIndex}; v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[v_acpIndex].resource)}, -); @@ -8773,7 +8762,7 @@ module OneM2M_Testcases { //Postamble v_accessControlRule_1 := valueof(m_createAcr({"*"}, int63)); v_setOfArcs.accessControlRule_list := {v_accessControlRule_1}; - v_updateRequest := m_updateAcpPrivileges(v_setOfArcs, v_setOfArcs); + v_updateRequest := valueof(m_updateAcpPrivileges(v_setOfArcs, v_setOfArcs)); v_updateRequest := f_getUpdateRequestPrimitive(int1, v_acpIndex, v_updateRequest); v_updateRequest.from_ := "testDomain"; mcaPort.send(m_request(v_updateRequest)); @@ -8839,8 +8828,7 @@ module OneM2M_Testcases { // Preamble v_createRequest := f_getCreateRequestPrimitive(int1, m_createAcpBase, -1); v_acpIndex := f_cse_createResource(int1, v_createRequest); // CSE child resource - vc_resourcesIndexToBeDeleted := vc_resourcesIndexToBeDeleted & {v_acpIndex}; - + v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[v_acpIndex].resource)}, -); // Test Body @@ -8990,15 +8978,14 @@ module OneM2M_Testcases { // Preamble v_acpIndex := f_cse_createResource(int1, v_createRequest); // CSE child resource - vc_resourcesIndexToBeDeleted := vc_resourcesIndexToBeDeleted & {v_acpIndex}; v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[v_acpIndex].resource)}, -); v_containerIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex); v_accessControlRule_1 := valueof(m_createAcr({PX_SUPER_USER, f_getOriginator(v_aeIndex)}, int63)); v_setOfArcs.accessControlRule_list := {v_accessControlRule_1}; - v_updateRequest := m_updateAcpPrivileges(v_setOfArcs, v_setOfArcs); + v_updateRequest := valueof(m_updateAcpPrivileges(v_setOfArcs, v_setOfArcs)); v_updateRequest := f_getUpdateRequestPrimitive(int1, v_acpIndex, v_updateRequest); - f_update_attribute_request(v_updateRequest); + f_cse_updateResource(v_updateRequest); // Test Body p_requestPrimitive.to_ := f_getResourceAddress(v_containerIndex); @@ -9078,14 +9065,13 @@ module OneM2M_Testcases { // Preamble v_acpIndex := f_cse_createResource(int1, v_createRequest); // CSE child resource - vc_resourcesIndexToBeDeleted := vc_resourcesIndexToBeDeleted & {v_acpIndex}; v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[v_acpIndex].resource)}, -); v_accessControlRule_1 := valueof(m_createAcr({ f_getOriginator(v_aeIndex), PX_SUPER_USER}, int63)); v_setOfArcs.accessControlRule_list := {v_accessControlRule_1}; - v_updateRequest := m_updateAcpPrivileges(v_setOfArcs, v_setOfArcs); + v_updateRequest := valueof(m_updateAcpPrivileges(v_setOfArcs, v_setOfArcs)); v_updateRequest := f_getUpdateRequestPrimitive(int1, v_acpIndex, v_updateRequest); - f_update_attribute_request(v_updateRequest); + f_cse_updateResource(v_updateRequest); // Test Body p_requestPrimitive.to_ := f_getResourceAddress(v_aeIndex); @@ -9166,23 +9152,21 @@ module OneM2M_Testcases { // Preamble v_acpIndex1 := f_cse_createResource(int1, v_createRequest); // CSE child resource - vc_resourcesIndexToBeDeleted := vc_resourcesIndexToBeDeleted & {v_acpIndex1}; v_acpIndex2 := f_cse_createResource(int1, v_createRequest); // CSE child resource - vc_resourcesIndexToBeDeleted := vc_resourcesIndexToBeDeleted & {v_acpIndex2}; - + v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[v_acpIndex1].resource), f_getResourceId(vc_resourcesList[v_acpIndex2].resource)}, -); v_accessControlRule_1 := valueof(m_createAcr({f_getOriginator(v_aeIndex)}, int3)); // c_CR v_setOfArcs.accessControlRule_list := {v_accessControlRule_1}; - v_updateRequest := m_updateAcpPrivileges(v_setOfArcs, -); + v_updateRequest := valueof(m_updateAcpPrivileges(v_setOfArcs, -)); v_updateRequest := f_getUpdateRequestPrimitive(int1, v_acpIndex1, v_updateRequest); - f_update_attribute_request(v_updateRequest); + f_cse_updateResource(v_updateRequest); v_accessControlRule_1 := valueof(m_createAcr({f_getOriginator(v_aeIndex)}, int60)); // c_UDNDi v_setOfArcs.accessControlRule_list := {v_accessControlRule_1}; - v_updateRequest := m_updateAcpPrivileges(v_setOfArcs, -); + v_updateRequest := valueof(m_updateAcpPrivileges(v_setOfArcs, -)); v_updateRequest := f_getUpdateRequestPrimitive(int1, v_acpIndex2, v_updateRequest); - f_update_attribute_request(v_updateRequest); + f_cse_updateResource(v_updateRequest); // Test Body p_requestPrimitive.to_ := f_getResourceAddress(v_aeIndex); @@ -9227,7 +9211,7 @@ module OneM2M_Testcases { var integer v_acpIndex1 := -1; var integer v_acpIndex2 := -1; var RequestPrimitive v_createRequest := valueof(m_createAcp(f_getResourceAddress(-1), omit)); - var RequestPrimitive v_updateRequest := m_updateAeBase; + var RequestPrimitive v_updateRequest := valueof(m_updateAeBase); var AccessControlRule v_accessControlRule_1; var AccessControlRule v_accessControlRule_2; var SetOfAcrs v_setOfArcs_1; @@ -9242,20 +9226,18 @@ module OneM2M_Testcases { // Preamble v_acpIndex1 := f_cse_createResource(int1, v_createRequest); // CSE child resource - vc_resourcesIndexToBeDeleted := vc_resourcesIndexToBeDeleted & {v_acpIndex1}; - + v_acpIndex2 := f_cse_createResource(int1, v_createRequest); // CSE child resource - vc_resourcesIndexToBeDeleted := vc_resourcesIndexToBeDeleted & {v_acpIndex2}; - + v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[v_acpIndex1].resource)}, -); v_accessControlRule_1 := valueof(m_createAcr({f_getOriginator(v_aeIndex)}, int59)); // c_CRUDNDi v_accessControlRule_2 := valueof(m_createAcr({PX_SUPER_USER, f_getOriginator(v_aeIndex)}, int63)); // c_CRDNDi v_setOfArcs_1.accessControlRule_list := {v_accessControlRule_1}; v_setOfArcs_2.accessControlRule_list := {v_accessControlRule_2}; - v_updateRequest := m_updateAcpPrivileges(v_setOfArcs_1, v_setOfArcs_2); + v_updateRequest := valueof(m_updateAcpPrivileges(v_setOfArcs_1, v_setOfArcs_2)); v_updateRequest := f_getUpdateRequestPrimitive(int1, v_acpIndex1, v_updateRequest); - f_update_attribute_request(v_updateRequest); + f_cse_updateResource(v_updateRequest); // Test Body v_updateRequest.primitiveContent.any_1[0].AE_optional.accessControlPolicyIDs := {f_getResourceId(vc_resourcesList[v_acpIndex2].resource)}; @@ -9300,7 +9282,7 @@ module OneM2M_Testcases { var integer v_acpIndex1 := -1; var integer v_acpIndex2 := -1; var RequestPrimitive v_createRequest := valueof(m_createAcp(f_getResourceAddress(-1), omit)); - var RequestPrimitive v_updateRequest := m_updateAeBase; + var RequestPrimitive v_updateRequest := valueof(m_updateAeBase); var AccessControlRule v_accessControlRule_1; var AccessControlRule v_accessControlRule_2; var SetOfAcrs v_setOfArcs_1; @@ -9315,20 +9297,18 @@ module OneM2M_Testcases { // Preamble v_acpIndex1 := f_cse_createResource(int1, v_createRequest); // CSE child resource - vc_resourcesIndexToBeDeleted := vc_resourcesIndexToBeDeleted & {v_acpIndex1}; - + v_acpIndex2 := f_cse_createResource(int1, v_createRequest); // CSE child resource - vc_resourcesIndexToBeDeleted := vc_resourcesIndexToBeDeleted & {v_acpIndex2}; - + v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[v_acpIndex1].resource)}, -); v_accessControlRule_1 := valueof(m_createAcr({f_getOriginator(v_aeIndex)}, int63)); // c_CRDNDi v_accessControlRule_2 := valueof(m_createAcr({PX_SUPER_USER, f_getOriginator(v_aeIndex)}, int59)); // c_CRUDNDi v_setOfArcs_1.accessControlRule_list := {v_accessControlRule_1}; v_setOfArcs_2.accessControlRule_list := {v_accessControlRule_2}; - v_updateRequest := m_updateAcpPrivileges(v_setOfArcs_1, v_setOfArcs_2); + v_updateRequest := valueof(m_updateAcpPrivileges(v_setOfArcs_1, v_setOfArcs_2)); v_updateRequest := f_getUpdateRequestPrimitive(int1, v_acpIndex1, v_updateRequest); - f_update_attribute_request(v_updateRequest); + f_cse_updateResource(v_updateRequest); // Test Body v_updateRequest.primitiveContent.any_1[0].AE_optional.accessControlPolicyIDs := {f_getResourceId(vc_resourcesList[v_acpIndex2].resource)};