diff --git a/LibOneM2M/OneM2M_Functions.ttcn b/LibOneM2M/OneM2M_Functions.ttcn index 3b342bef2faf51de5272e466753abb71d7b63591..3138f585b33864616533fcda01e86aab701d6cc9 100644 --- a/LibOneM2M/OneM2M_Functions.ttcn +++ b/LibOneM2M/OneM2M_Functions.ttcn @@ -7,7 +7,7 @@ * * @author oneM2M * @version $URL: https://forge.etsi.org/svn/oneM2M/trunk/ttcn/LibOneM2M/OneM2M_Functions.ttcn $ - * $Id: OneM2M_Functions.ttcn 248 2017-03-29 13:59:41Z reinaortega $ + * $Id: OneM2M_Functions.ttcn 296 2017-06-02 13:16:50Z reinaortega $ * @desc Module containing functions for oneM2M * */ @@ -175,8 +175,8 @@ module OneM2M_Functions { [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { tc_ac.stop; setverdict(pass,__SCOPE__&":INFO: Application registered successfuly"); - if(ischosen(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].AE_optional)) { - vc_aeAux := v_response.primitive.responsePrimitive.primitiveContent.any_1[0].AE_optional; + if(ischosen(v_response.primitive.responsePrimitive.primitiveContent.aE_optional)) { + vc_aeAux := v_response.primitive.responsePrimitive.primitiveContent.aE_optional; f_checkAttributesToBeSaved(int2, v_request, v_response.primitive.responsePrimitive); @@ -246,8 +246,8 @@ module OneM2M_Functions { [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { tc_ac.stop; setverdict(pass, __SCOPE__&": INFO: Application registered successfuly"); - if(ischosen(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].AE_optional)) { - vc_aeAux := v_response.primitive.responsePrimitive.primitiveContent.any_1[0].AE_optional; + if(ischosen(v_response.primitive.responsePrimitive.primitiveContent.aE_optional)) { + vc_aeAux := v_response.primitive.responsePrimitive.primitiveContent.aE_optional; v_aeAuxIndex := f_setResource(v_response.primitive.responsePrimitive.primitiveContent); vc_resourcesIndexToBeDeleted := vc_resourcesIndexToBeDeleted & {v_aeAuxIndex}; @@ -281,7 +281,6 @@ module OneM2M_Functions { } - //Added by @Naum function f_cse_preamble_createServiceSubscribedAppRule(in template ListOfM2MID p_allowedAEs := {""}) runs on CseTester return integer {//c_CRUDNDi var integer v_serviceSubscribedAppRuleIndex := -1; @@ -295,9 +294,9 @@ module OneM2M_Functions { function f_cse_preamble_subscriptionVerification(out CseTester p_notifyHandler,in integer p_aeIndex, inout integer p_ae2Index, inout template RequestPrimitive p_createRequestPrimitive,in ResourceType p_resourceType ) runs on CseTester { 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 - 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_ae2Index := f_cse_createResource(int2, m_createAe(PX_APP_ID, -, PX_AE2_ID_STEM, "MyAe2", {"http://" & PX_AE2_ADDRESS & "/"}), -1); // AE2 is registred + if(ischosen(p_createRequestPrimitive.primitiveContent.subscription_optional)){ //this condition is necessary for Subscription TCs where notification URI is set in m_createSubscriptionAdvanced + p_createRequestPrimitive.primitiveContent.subscription_optional.notificationURI := {f_getResourceAddress(p_ae2Index)}; } p_notifyHandler.start(f_subscriptionVerificationHandler(f_getResourceAddress(p_aeIndex))); } @@ -324,12 +323,13 @@ module OneM2M_Functions { v_request := valueof(m_deleteRequest(v_resourceAddress)); - //Not needed any longer: PX_SUPER_USER should be able to do all operations -// if(PX_FROM_IS_AE_ID){ -// if(ischosen(vc_resourcesList[vc_resourcesIndexToBeDeleted[i]].resource.any_1[0].AE_optional)) { -// v_request.from_ := vc_resourcesList[vc_resourcesIndexToBeDeleted[i]].resource.any_1[0].AE_optional.aE_ID; -// } -// } + //For deletion of AEs, priority is to use AE-ID in From parameter + //For other resources PX_SUPER_USER should be able to do DELETE operation + if(PX_FROM_IS_AE_ID){ + if(ischosen(vc_resourcesList[vc_resourcesIndexToBeDeleted[i]].resource.aE_optional)) { + v_request.from_ := vc_resourcesList[vc_resourcesIndexToBeDeleted[i]].resource.aE_optional.aE_ID; + } + } mcaPort.send(m_request(v_request)); @@ -488,8 +488,8 @@ module OneM2M_Functions { v_acpAuxIndex := f_cse_createAccessControlPolicyAux(p_acpName := c_acpAuxName);//"MyAcp_2" v_request := valueof(m_createContainerBase); - v_request.primitiveContent.any_1[0].Container_optional.accessControlPolicyIDs := {f_getResourceId(vc_resourcesList[v_acpAuxIndex].resource)}; - v_request.primitiveContent.any_1[0].Container_optional.resourceName := "MyContainerAux"; + v_request.primitiveContent.container_optional.accessControlPolicyIDs := {f_getResourceId(vc_resourcesList[v_acpAuxIndex].resource)}; + v_request.primitiveContent.container_optional.resourceName := "MyContainerAux"; v_containerResourceIndex := f_cse_createResource(int3, v_request, p_parentIndex); @@ -604,7 +604,7 @@ module OneM2M_Functions { v_request.to_ := f_getResourceAddress(vc_acpAuxIndex); v_request.from_ := f_getOriginator(vc_acpAuxIndex); - v_request.primitiveContent.any_1[0].AccessControlPolicy_optional.privileges.accessControlRule_list := { + v_request.primitiveContent.accessControlPolicy_optional.privileges.accessControlRule_list := { { accessControlOriginators := PX_ACOR, //{"admin:admin"} accessControlOperations := valueof(p_allowedOperations), @@ -670,7 +670,7 @@ module OneM2M_Functions { } //end f_cse_resourceAnnouncementHandler - function f_subscriptionVerificationHandler(in XSD.ID p_creator, in ResponseStatusCode p_responseStatusCode := int2001) runs on CseTester { + function f_subscriptionVerificationHandler(in XSD.ID p_creator, in ResponseStatusCode p_responseStatusCode := int2000) runs on CseTester { // Local variables var MsgIn v_response; var ResponsePrimitive v_responsePrimitive; @@ -680,7 +680,7 @@ module OneM2M_Functions { map(self:mcaPort, system:mcaPort); map(self:acPort, system:acPort); - v_notificationResponse.any_1 := {{Notification := valueof(m_contentNotification_allOmit)}}; + v_notificationResponse := {notification := valueof(m_contentNotification_allOmit)}; v_notificationRequest.verificationRequest := true; //v_notificationRequest.creator := p_creator; TODO To check what address format is to be expected @@ -697,7 +697,8 @@ module OneM2M_Functions { [] mcaPort.receive(mw_request(mw_notify(v_notificationRequest))) -> value v_response { tc_ac.stop; setverdict(pass, testcasename() & ": Notification received"); - mcaPort.send(m_response(v_responsePrimitive)); + v_responsePrimitive.requestIdentifier := v_response.primitive.requestPrimitive.requestIdentifier; + mcaPort.send(m_httpResponse(v_responsePrimitive)); } [] mcaPort.receive(mw_request(mw_notify(mw_contentNotification(?)))) -> value v_response { tc_ac.stop; @@ -722,51 +723,59 @@ module OneM2M_Functions { function f_checkAttributesToBeSaved (ResourceType p_resourceType, RequestPrimitive p_request, inout ResponsePrimitive p_response) { select (p_resourceType) { case (int1) { - if(isvalue(p_response.primitiveContent.any_1[0].AccessControlPolicy_optional) and - not(ispresent(p_response.primitiveContent.any_1[0].AccessControlPolicy_optional.resourceName))) { - p_response.primitiveContent.any_1[0].AccessControlPolicy_optional.resourceName := p_request.primitiveContent.any_1[0].AccessControlPolicy_optional.resourceName; + if(isvalue(p_response.primitiveContent.accessControlPolicy_optional) and + not(ispresent(p_response.primitiveContent.accessControlPolicy_optional.resourceName))) { + p_response.primitiveContent.accessControlPolicy_optional.resourceName := p_request.primitiveContent.accessControlPolicy_optional.resourceName; + log(__SCOPE__ & ": Info: resourceName not returned. Using the one provided in the request: " & p_request.primitiveContent.accessControlPolicy_optional.resourceName) } } case (int2) { - if(isvalue(p_response.primitiveContent.any_1[0].AE_optional) and - not(ispresent(p_response.primitiveContent.any_1[0].AE_optional.resourceName))) { - p_response.primitiveContent.any_1[0].AE_optional.resourceName := p_request.primitiveContent.any_1[0].AE_optional.resourceName; + if(isvalue(p_response.primitiveContent.aE_optional) and + not(ispresent(p_response.primitiveContent.aE_optional.resourceName))) { + p_response.primitiveContent.aE_optional.resourceName := p_request.primitiveContent.aE_optional.resourceName; + log(__SCOPE__ & ": Info: resourceName not returned. Using the one provided in the request: " & p_request.primitiveContent.aE_optional.resourceName) } } case (int3) { - if(isvalue(p_response.primitiveContent.any_1[0].Container_optional) and - not(ispresent(p_response.primitiveContent.any_1[0].Container_optional.resourceName))) { - p_response.primitiveContent.any_1[0].Container_optional.resourceName := p_request.primitiveContent.any_1[0].Container_optional.resourceName; + if(isvalue(p_response.primitiveContent.container_optional) and + not(ispresent(p_response.primitiveContent.container_optional.resourceName))) { + p_response.primitiveContent.container_optional.resourceName := p_request.primitiveContent.container_optional.resourceName; + log(__SCOPE__ & ": Info: resourceName not returned. Using the one provided in the request: " & p_request.primitiveContent.container_optional.resourceName) } } case (int4) { - if(isvalue(p_response.primitiveContent.any_1[0].ContentInstance_optional) and - not(ispresent(p_response.primitiveContent.any_1[0].ContentInstance_optional.resourceName))) { - p_response.primitiveContent.any_1[0].ContentInstance_optional.resourceName := p_request.primitiveContent.any_1[0].ContentInstance_optional.resourceName; + if(isvalue(p_response.primitiveContent.contentInstance_optional) and + not(ispresent(p_response.primitiveContent.contentInstance_optional.resourceName))) { + p_response.primitiveContent.contentInstance_optional.resourceName := p_request.primitiveContent.contentInstance_optional.resourceName; + log(__SCOPE__ & ": Info: resourceName not returned. Using the one provided in the request: " & p_request.primitiveContent.contentInstance_optional.resourceName) } } case (int15) { - if (isvalue(p_response.primitiveContent.any_1[0].PollingChannel_optional) and - not(ispresent(p_response.primitiveContent.any_1[0].PollingChannel_optional.resourceName))) { - p_response.primitiveContent.any_1[0].PollingChannel_optional.resourceName := p_request.primitiveContent.any_1[0].PollingChannel_optional.resourceName; + if (isvalue(p_response.primitiveContent.pollingChannel_optional) and + not(ispresent(p_response.primitiveContent.pollingChannel_optional.resourceName))) { + p_response.primitiveContent.pollingChannel_optional.resourceName := p_request.primitiveContent.pollingChannel_optional.resourceName; + log(__SCOPE__ & ": Info: resourceName not returned. Using the one provided in the request: " & p_request.primitiveContent.pollingChannel_optional.resourceName) } } case (int18) { - if (isvalue(p_response.primitiveContent.any_1[0].Schedule_optional) and - not(ispresent(p_response.primitiveContent.any_1[0].Schedule_optional.resourceName))) { - p_response.primitiveContent.any_1[0].Schedule_optional.resourceName := p_request.primitiveContent.any_1[0].Schedule_optional.resourceName; + if (isvalue(p_response.primitiveContent.schedule_optional) and + not(ispresent(p_response.primitiveContent.schedule_optional.resourceName))) { + p_response.primitiveContent.schedule_optional.resourceName := p_request.primitiveContent.schedule_optional.resourceName; + log(__SCOPE__ & ": Info: resourceName not returned. Using the one provided in the request: " & p_request.primitiveContent.schedule_optional.resourceName) } } case (int23) { - if (isvalue(p_response.primitiveContent.any_1[0].Subscription_optional) and - not(ispresent(p_response.primitiveContent.any_1[0].Subscription_optional.resourceName))) { - p_response.primitiveContent.any_1[0].Subscription_optional.resourceName := p_request.primitiveContent.any_1[0].Subscription_optional.resourceName; + if (isvalue(p_response.primitiveContent.subscription_optional) and + not(ispresent(p_response.primitiveContent.subscription_optional.resourceName))) { + p_response.primitiveContent.subscription_optional.resourceName := p_request.primitiveContent.subscription_optional.resourceName; + log(__SCOPE__ & ": Info: resourceName not returned. Using the one provided in the request: " & p_request.primitiveContent.subscription_optional.resourceName) } } case (int9) { - if (isvalue(p_response.primitiveContent.any_1[0].Group_optional) and - not(ispresent(p_response.primitiveContent.any_1[0].Group_optional.resourceName))) { - p_response.primitiveContent.any_1[0].Group_optional.resourceName := p_request.primitiveContent.any_1[0].Group_optional.resourceName; + if (isvalue(p_response.primitiveContent.group_optional) and + not(ispresent(p_response.primitiveContent.group_optional.resourceName))) { + p_response.primitiveContent.group_optional.resourceName := p_request.primitiveContent.group_optional.resourceName; + log(__SCOPE__ & ": Info: resourceName not returned. Using the one provided in the request: " & p_request.primitiveContent.group_optional.resourceName) } } case else { @@ -783,24 +792,24 @@ module OneM2M_Functions { 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) + if (ischosen(p_primitiveContent.aE_optional)){ + if(ischosen(p_requestPrimitive.primitiveContent.notification.notificationEvent.representation.resource)) { + v_matchResult := match(p_requestPrimitive.primitiveContent.notification.notificationEvent.representation.resource.AE_optional, p_primitiveContent.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.notification.notificationEvent.representation.responsePrimitive)) { + v_matchResult :=match(p_requestPrimitive.primitiveContent.notification.notificationEvent.representation.responsePrimitive.primitiveContent.aE_optional, p_primitiveContent.aE_optional) } - else if (ischosen(p_requestPrimitive.primitiveContent.any_1[0].AggregatedNotification)) { + else if (ischosen(p_requestPrimitive.primitiveContent.aggregatedNotification)) { v_matchResult := true; - v_numberOfAggregatedNotification := lengthof(p_requestPrimitive.primitiveContent.any_1[0].AggregatedNotification.notification_list); + v_numberOfAggregatedNotification := lengthof(p_requestPrimitive.primitiveContent.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))){ + if(ischosen(p_requestPrimitive.primitiveContent.aggregatedNotification.notification_list[i].notificationEvent.representation.resource)) { + if(not (match(p_requestPrimitive.primitiveContent.aggregatedNotification.notification_list[i].notificationEvent.representation.resource.AE_optional, p_primitiveContent.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))){ + else if(ischosen(p_requestPrimitive.primitiveContent.aggregatedNotification.notification_list[i].notificationEvent.representation.responsePrimitive)) { + if(not (match(p_requestPrimitive.primitiveContent.aggregatedNotification.notification_list[i].notificationEvent.representation.responsePrimitive.primitiveContent.aE_optional, p_primitiveContent.aE_optional))){ v_matchResult := false; } } @@ -812,12 +821,12 @@ module OneM2M_Functions { } - 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) + if (ischosen(p_primitiveContent.container_optional)){ + if(ischosen(p_requestPrimitive.primitiveContent.notification.notificationEvent.representation.resource)) { + v_matchResult := match(p_requestPrimitive.primitiveContent.notification.notificationEvent.representation.resource.Container_optional, p_primitiveContent.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) + else if(ischosen(p_requestPrimitive.primitiveContent.notification.notificationEvent.representation.responsePrimitive)) { + v_matchResult := match(p_requestPrimitive.primitiveContent.notification.notificationEvent.representation.responsePrimitive.primitiveContent.container_optional, p_primitiveContent.container_optional) } } @@ -906,7 +915,7 @@ module OneM2M_Functions { function f_ae_preamble_registerAe() runs on AeTester return integer { var MsgIn v_request; - var Contents[-] v_modifiedResource; + var PrimitiveContent v_modifiedResource; var integer v_resourceIndex, v_parentIndex; var RequestPrimitive v_rp; @@ -919,7 +928,7 @@ module OneM2M_Functions { v_parentIndex := f_getResourceIndex(v_rp.to_); v_resourceIndex := f_ae_createResource(v_rp.primitiveContent, v_parentIndex, v_rp.resourceType, v_modifiedResource); if(v_resourceIndex != -1) { - mcaPort.send(m_response(m_responsePrimitive_content(int2001, v_rp.requestIdentifier, {any_1 := {v_modifiedResource}}))); + mcaPort.send(m_response(m_responsePrimitive_content(int2001, v_rp.requestIdentifier, v_modifiedResource))); setverdict(pass, __SCOPE__&":INFO: Application registered successfuly"); } else { @@ -951,14 +960,14 @@ module OneM2M_Functions { * @param p_modifiedResource Assigned and/or modified fields * @return Internal resource index of the saved resource or -1 */ - function f_ae_createResource(in PrimitiveContent p_resource, in integer p_parentIndex, in ResourceType p_resourceType, out Contents[-] p_modifiedResource) runs on AeTester return integer { + function f_ae_createResource(in PrimitiveContent p_resource, in integer p_parentIndex, in ResourceType p_resourceType, out PrimitiveContent p_modifiedResource) runs on AeTester return integer { var integer v_resourceIndex; // AE TODO To review the code (use of indexes, generation of value for certain attributes, etc..) if(p_resourceType == int2 and ispresent(p_resource)) { - if(ischosen(p_resource.any_1[0].AE_optional)){ - var AE_optional v_ae := p_resource.any_1[0].AE_optional; + if(ischosen(p_resource.aE_optional)){ + var AE_optional v_ae := p_resource.aE_optional; var AE_optional v_aeModified; v_resourceIndex := lengthof(vc_resourcesList) - 1; @@ -978,8 +987,8 @@ module OneM2M_Functions { v_aeModified.aE_ID := v_ae.aE_ID; v_aeModified.resourceName := v_ae.resourceName; - p_resource.any_1[0].AE_optional := v_ae; - p_modifiedResource.AE_optional := v_aeModified; + p_resource.aE_optional := v_ae; + p_modifiedResource.aE_optional := v_aeModified; return f_setResource(p_resource, p_parentIndex); } @@ -1023,7 +1032,7 @@ module OneM2M_Functions { altstep a_ae_cf03() runs on AeTester { var MsgIn v_request; - var Contents[-] v_modifiedResource; + var PrimitiveContent v_modifiedResource; var integer v_resourceIndex, v_parentIndex; var RequestPrimitive v_rp; @@ -1032,7 +1041,7 @@ module OneM2M_Functions { v_parentIndex := f_getResourceIndex(v_rp.to_); v_resourceIndex := f_ae_createResource(v_rp.primitiveContent, v_parentIndex, v_rp.resourceType, v_modifiedResource); if(v_resourceIndex != -1) { - mcaPort.send(m_response(m_responsePrimitive_content(int2001, v_rp.requestIdentifier, {any_1 := {v_modifiedResource}}))); + mcaPort.send(m_response(m_responsePrimitive_content(int2001, v_rp.requestIdentifier, v_modifiedResource))); } else { mcaPort.send(m_response(m_responsePrimitive(int5000, v_request.primitive.requestPrimitive.requestIdentifier))); @@ -1072,26 +1081,26 @@ module OneM2M_Functions { } if (p_resourceType == int9) {//group - if(match(valueof(p_request.primitiveContent.any_1[0].Group_optional.memberIDs), v_defaultListOfURIs )){ - p_request.primitiveContent.any_1[0].Group_optional.memberIDs := {f_getResourceAddress(p_parentIndex)}; + if(match(valueof(p_request.primitiveContent.group_optional.memberIDs), v_defaultListOfURIs )){ + p_request.primitiveContent.group_optional.memberIDs := {f_getResourceAddress(p_parentIndex)}; } } if(p_resourceType == int3){//container //when a container is created by hosting cse for storing location information, the container is seen as a location container if(PX_IS_LOC_CONTAINER){ - p_request.primitiveContent.any_1[0].Container_optional.locationID := f_getResourceId(vc_resourcesList[p_parentIndex].resource);//resourceID of the locationPolicy + p_request.primitiveContent.container_optional.locationID := f_getResourceId(vc_resourcesList[p_parentIndex].resource);//resourceID of the locationPolicy } - if(ispresent(p_request.primitiveContent.any_1[0].Container_optional.accessControlPolicyIDs)) { - if(match(valueof(p_request.primitiveContent.any_1[0].Container_optional.accessControlPolicyIDs), v_defaultAcpIDs )){ - p_request.primitiveContent.any_1[0].Container_optional.accessControlPolicyIDs := {f_getResourceId(vc_resourcesList[vc_acpAuxIndex].resource)}; + if(ispresent(p_request.primitiveContent.container_optional.accessControlPolicyIDs)) { + if(match(valueof(p_request.primitiveContent.container_optional.accessControlPolicyIDs), v_defaultAcpIDs )){ + p_request.primitiveContent.container_optional.accessControlPolicyIDs := {f_getResourceId(vc_resourcesList[vc_acpAuxIndex].resource)}; } } } if (p_resourceType == int15) {//pollingChannel - if(ischosen(vc_resourcesList[p_parentIndex].resource.any_1[0].AE_optional)) { - p_request.from_ := vc_resourcesList[p_parentIndex].resource.any_1[0].AE_optional.aE_ID; + if(ischosen(vc_resourcesList[p_parentIndex].resource.aE_optional)) { + p_request.from_ := vc_resourcesList[p_parentIndex].resource.aE_optional.aE_ID; } } @@ -1099,18 +1108,26 @@ module OneM2M_Functions { } if (p_resourceType == int23) {//subscription - if(match(valueof(p_request.primitiveContent.any_1[0].Subscription_optional.notificationURI), v_defaultListOfURIs )){ - p_request.primitiveContent.any_1[0].Subscription_optional.notificationURI := {f_getResourceAddress(p_parentIndex)}; + //notificationURI + if(match(valueof(p_request.primitiveContent.subscription_optional.notificationURI), v_defaultListOfURIs )){ + p_request.primitiveContent.subscription_optional.notificationURI := {f_getResourceAddress(p_parentIndex)}; + } + //creator attribute + if(ispresent(p_request.primitiveContent.subscription_optional.creator)) { + p_request.primitiveContent.subscription_optional.creator := f_getCreator(p_parentIndex); + } + //accessControlPolicyIds + if(ispresent(p_request.primitiveContent.subscription_optional.accessControlPolicyIDs)) { + if(match(valueof(p_request.primitiveContent.subscription_optional.accessControlPolicyIDs), v_defaultAcpIDs )){ + p_request.primitiveContent.subscription_optional.accessControlPolicyIDs := {f_getResourceId(vc_resourcesList[vc_acpAuxIndex].resource)}; + } + } + } + if (p_resourceType == int4) {//contentInstance + //creator attribute + if(ispresent(p_request.primitiveContent.contentInstance_optional.creator)) { + p_request.primitiveContent.contentInstance_optional.creator := f_getCreator(p_parentIndex); } - /*if(PX_FROM_IS_AE_ID) { - if(PX_UNSTRUCTURED){ - p_request.primitiveContent.any_1[0].Subscription_optional.notificationURI := {vc_aeAux.aE_ID}; - } else { - p_request.primitiveContent.any_1[0].Subscription_optional.notificationURI := {PX_CSE_ID & "/" & vc_aeAux.aE_ID}; - } - } else { - p_request.primitiveContent.any_1[0].Subscription_optional.notificationURI := {"/" & PX_CSE_NAME & "/" & PX_AEAUX_NAME};//c_aeAuxName - }*/ } return valueof(p_request); @@ -1207,32 +1224,32 @@ module OneM2M_Functions { */ function f_getResourceId(PrimitiveContent p_contentResource) return XSD.ID { - if(ischosen(p_contentResource.any_1[0].AccessControlPolicy_optional)) { - return f_resourceIdCleaner(p_contentResource.any_1[0].AccessControlPolicy_optional.resourceID); + if(ischosen(p_contentResource.accessControlPolicy_optional)) { + return f_resourceIdCleaner(p_contentResource.accessControlPolicy_optional.resourceID); } - if(ischosen(p_contentResource.any_1[0].Container_optional)) { - return f_resourceIdCleaner(p_contentResource.any_1[0].Container_optional.resourceID); + if(ischosen(p_contentResource.container_optional)) { + return f_resourceIdCleaner(p_contentResource.container_optional.resourceID); } - if(ischosen(p_contentResource.any_1[0].ContentInstance_optional)) { - return f_resourceIdCleaner(p_contentResource.any_1[0].ContentInstance_optional.resourceID); + if(ischosen(p_contentResource.contentInstance_optional)) { + return f_resourceIdCleaner(p_contentResource.contentInstance_optional.resourceID); } - if(ischosen(p_contentResource.any_1[0].Schedule_optional)) { - return f_resourceIdCleaner(p_contentResource.any_1[0].Schedule_optional.resourceID); + if(ischosen(p_contentResource.schedule_optional)) { + return f_resourceIdCleaner(p_contentResource.schedule_optional.resourceID); } - if(ischosen(p_contentResource.any_1[0].PollingChannel_optional)) { - return f_resourceIdCleaner(p_contentResource.any_1[0].PollingChannel_optional.resourceID); + if(ischosen(p_contentResource.pollingChannel_optional)) { + return f_resourceIdCleaner(p_contentResource.pollingChannel_optional.resourceID); } - if(ischosen(p_contentResource.any_1[0].Subscription_optional)) { - return f_resourceIdCleaner(p_contentResource.any_1[0].Subscription_optional.resourceID); + if(ischosen(p_contentResource.subscription_optional)) { + return f_resourceIdCleaner(p_contentResource.subscription_optional.resourceID); } - if(ischosen(p_contentResource.any_1[0].Group_optional)) { - return f_resourceIdCleaner(p_contentResource.any_1[0].Group_optional.resourceID); + if(ischosen(p_contentResource.group_optional)) { + return f_resourceIdCleaner(p_contentResource.group_optional.resourceID); } - if(ischosen(p_contentResource.any_1[0].AE_optional)) { - return f_resourceIdCleaner(p_contentResource.any_1[0].AE_optional.resourceID); + if(ischosen(p_contentResource.aE_optional)) { + return f_resourceIdCleaner(p_contentResource.aE_optional.resourceID); } - if(ischosen(p_contentResource.any_1[0].ServiceSubscribedAppRule_optional)) { - return f_resourceIdCleaner(p_contentResource.any_1[0].ServiceSubscribedAppRule_optional.resourceID); + if(ischosen(p_contentResource.serviceSubscribedAppRule_optional)) { + return f_resourceIdCleaner(p_contentResource.serviceSubscribedAppRule_optional.resourceID); } log(""&__SCOPE__&":WARNING: Primitive Content Kind not implemented"); @@ -1248,32 +1265,32 @@ module OneM2M_Functions { */ function f_getResourceName(PrimitiveContent p_contentResource) return XSD.ID { - if(ischosen(p_contentResource.any_1[0].AccessControlPolicy_optional)) { - return p_contentResource.any_1[0].AccessControlPolicy_optional.resourceName; + if(ischosen(p_contentResource.accessControlPolicy_optional)) { + return p_contentResource.accessControlPolicy_optional.resourceName; } - if(ischosen(p_contentResource.any_1[0].Container_optional)) { - return p_contentResource.any_1[0].Container_optional.resourceName; + if(ischosen(p_contentResource.container_optional)) { + return p_contentResource.container_optional.resourceName; } - if(ischosen(p_contentResource.any_1[0].ContentInstance_optional)) { - return p_contentResource.any_1[0].ContentInstance_optional.resourceName; + if(ischosen(p_contentResource.contentInstance_optional)) { + return p_contentResource.contentInstance_optional.resourceName; } - if(ischosen(p_contentResource.any_1[0].Schedule_optional)) { - return p_contentResource.any_1[0].Schedule_optional.resourceName; + if(ischosen(p_contentResource.schedule_optional)) { + return p_contentResource.schedule_optional.resourceName; } - if(ischosen(p_contentResource.any_1[0].PollingChannel_optional)) { - return p_contentResource.any_1[0].PollingChannel_optional.resourceName; + if(ischosen(p_contentResource.pollingChannel_optional)) { + return p_contentResource.pollingChannel_optional.resourceName; } - if(ischosen(p_contentResource.any_1[0].Subscription_optional)) { - return p_contentResource.any_1[0].Subscription_optional.resourceName; + if(ischosen(p_contentResource.subscription_optional)) { + return p_contentResource.subscription_optional.resourceName; } - if(ischosen(p_contentResource.any_1[0].Group_optional)) { - return p_contentResource.any_1[0].Group_optional.resourceName; + if(ischosen(p_contentResource.group_optional)) { + return p_contentResource.group_optional.resourceName; } - if(ischosen(p_contentResource.any_1[0].AE_optional)) { - return p_contentResource.any_1[0].AE_optional.resourceName; + if(ischosen(p_contentResource.aE_optional)) { + return p_contentResource.aE_optional.resourceName; } - if(ischosen(p_contentResource.any_1[0].ServiceSubscribedAppRule_optional)) { - return p_contentResource.any_1[0].ServiceSubscribedAppRule_optional.resourceName; + if(ischosen(p_contentResource.serviceSubscribedAppRule_optional)) { + return p_contentResource.serviceSubscribedAppRule_optional.resourceName; } log(__SCOPE__&":WARNING: Primitive Content Kind not implemented"); @@ -1294,8 +1311,8 @@ module OneM2M_Functions { } if(PX_FROM_IS_AE_ID) { - if(ischosen(vc_resourcesList[p_targetResourceIndex].resource.any_1[0].AE_optional)) { - return vc_resourcesList[p_targetResourceIndex].resource.any_1[0].AE_optional.aE_ID; + if(ischosen(vc_resourcesList[p_targetResourceIndex].resource.aE_optional)) { + return vc_resourcesList[p_targetResourceIndex].resource.aE_optional.aE_ID; } else { return f_getOriginator(vc_resourcesList[p_targetResourceIndex].parentIndex); } @@ -1303,6 +1320,26 @@ module OneM2M_Functions { return PX_SUPER_USER; } } + + /** + * @desc Resolution of the creator attribute for a given resource + * @param p_targetResourceIndex Internal resource index of the given resource + * @return AE-ID or CSE-ID of the entity creating the given resource + * @verdict + */ + function f_getCreator(integer p_targetResourceIndex := -1) runs on CseTester return XSD.ID { + + if(p_targetResourceIndex == -1) { + return PX_CSE_ID; + } + + if(ischosen(vc_resourcesList[p_targetResourceIndex].resource.aE_optional)) { + return vc_resourcesList[p_targetResourceIndex].resource.aE_optional.aE_ID; + } else { + return f_getCreator(vc_resourcesList[p_targetResourceIndex].parentIndex); + } + + } /** * @desc Return of a index of a specific attribute from an attributeList by attributeName @@ -1323,6 +1360,26 @@ module OneM2M_Functions { return -1; } + + /** + * @desc Resolution of the announcement target CSE PoA + * @param p_protocolBinding Protocol Binding + * @param p_announcementTargetAddress Announcement Target Address + * @param p_announcementTargetResource Announcement Target Resource + * @return p_annoucementTargetPoA Announcemenet Target PoA + */ + function f_getAnnouncementTargetPoA(in charstring p_protocolBinding := PX_PROTOCOL_BINDING, in charstring p_announcementTargetAddress := PX_CSE1_ADDRESS, charstring p_announcementTargetResource := "/CseBaseTester" ) return charstring { + + if(p_protocolBinding == "HTTP") { + return "http://" & p_announcementTargetAddress & "/" & p_announcementTargetResource; + } else if (p_protocolBinding == "COAP") { + return "coap://" & p_announcementTargetAddress & "/" & p_announcementTargetResource; + } else if (p_protocolBinding == "MQTT") { + return "mqtt://" & PX_SUT_ADDRESS & "/" & p_announcementTargetResource;//TODO + } else { + return "ws://" & p_announcementTargetAddress & "/" & p_announcementTargetResource; + } + } /** @@ -1424,23 +1481,23 @@ module OneM2M_Functions { */ function f_setAcpId(template RequestPrimitive p_requestPrimitive, template AcpType p_accessControlPolicyIDs) runs on CseTester return RequestPrimitive{ - if (ischosen(p_requestPrimitive.primitiveContent.any_1[0].AE_optional)){ - p_requestPrimitive.primitiveContent.any_1[0].AE_optional.accessControlPolicyIDs := p_accessControlPolicyIDs; + if (ischosen(p_requestPrimitive.primitiveContent.aE_optional)){ + p_requestPrimitive.primitiveContent.aE_optional.accessControlPolicyIDs := p_accessControlPolicyIDs; } - else if (ischosen(p_requestPrimitive.primitiveContent.any_1[0].Container_optional)){ - p_requestPrimitive.primitiveContent.any_1[0].Container_optional.accessControlPolicyIDs := p_accessControlPolicyIDs; + else if (ischosen(p_requestPrimitive.primitiveContent.container_optional)){ + p_requestPrimitive.primitiveContent.container_optional.accessControlPolicyIDs := p_accessControlPolicyIDs; } - else if (ischosen(p_requestPrimitive.primitiveContent.any_1[0].Group_optional)){ - p_requestPrimitive.primitiveContent.any_1[0].Group_optional.accessControlPolicyIDs := p_accessControlPolicyIDs; + else if (ischosen(p_requestPrimitive.primitiveContent.group_optional)){ + p_requestPrimitive.primitiveContent.group_optional.accessControlPolicyIDs := p_accessControlPolicyIDs; } - else if (ischosen(p_requestPrimitive.primitiveContent.any_1[0].ServiceSubscribedAppRule_optional)){ - p_requestPrimitive.primitiveContent.any_1[0].ServiceSubscribedAppRule_optional.accessControlPolicyIDs := p_accessControlPolicyIDs; + else if (ischosen(p_requestPrimitive.primitiveContent.serviceSubscribedAppRule_optional)){ + p_requestPrimitive.primitiveContent.serviceSubscribedAppRule_optional.accessControlPolicyIDs := p_accessControlPolicyIDs; } - else if (ischosen(p_requestPrimitive.primitiveContent.any_1[0].Subscription_optional)){ - p_requestPrimitive.primitiveContent.any_1[0].Subscription_optional.accessControlPolicyIDs := p_accessControlPolicyIDs; + else if (ischosen(p_requestPrimitive.primitiveContent.subscription_optional)){ + p_requestPrimitive.primitiveContent.subscription_optional.accessControlPolicyIDs := p_accessControlPolicyIDs; } - else if (ischosen(p_requestPrimitive.primitiveContent.any_1[0].LocationPolicy_optional)){ - p_requestPrimitive.primitiveContent.any_1[0].LocationPolicy_optional.accessControlPolicyIDs := p_accessControlPolicyIDs; + else if (ischosen(p_requestPrimitive.primitiveContent.locationPolicy_optional)){ + p_requestPrimitive.primitiveContent.locationPolicy_optional.accessControlPolicyIDs := p_accessControlPolicyIDs; } return valueof(p_requestPrimitive); } @@ -1452,8 +1509,8 @@ module OneM2M_Functions { */ function f_getAeId(integer p_targetResourceIndex := -1) runs on AeTester return XSD.ID { - if(ischosen(vc_resourcesList[p_targetResourceIndex].resource.any_1[0].AE_optional)) { - return vc_resourcesList[p_targetResourceIndex].resource.any_1[0].AE_optional.aE_ID; + if(ischosen(vc_resourcesList[p_targetResourceIndex].resource.aE_optional)) { + return vc_resourcesList[p_targetResourceIndex].resource.aE_optional.aE_ID; } log("f_getAeId: WARNING: p_targetResourceIndex does not refer to AE resource"); @@ -1475,7 +1532,6 @@ module OneM2M_Functions { */ function f_checkCseTesterStatus() runs on CseTester { - log(getverdict()); if (getverdict != pass) { f_cse_postamble_deleteResources(); // Tear down @@ -1560,232 +1616,232 @@ module OneM2M_Functions { function f_getTemplateFromPrimitiveContent (in template PrimitiveContent p_primitiveContent) return template PrimitiveContent{ var template PrimitiveContent v_primitiveContent := omit; - if(ischosen(p_primitiveContent.any_1[0].Container_optional)){ // Container - v_primitiveContent.any_1 := {{Container_optional := mw_contentContainerBase}}; + if(ischosen(p_primitiveContent.container_optional)){ // Container + v_primitiveContent := {container_optional := mw_contentContainerBase}; - if(ispresent(p_primitiveContent.any_1[0].Container_optional.labels)){ - v_primitiveContent.any_1[0].Container_optional.labels := ?; + if(ispresent(p_primitiveContent.container_optional.labels)){ + v_primitiveContent.container_optional.labels := ?; } - if(ispresent(p_primitiveContent.any_1[0].Container_optional.accessControlPolicyIDs)){ - v_primitiveContent.any_1[0].Container_optional.accessControlPolicyIDs := ?; + if(ispresent(p_primitiveContent.container_optional.accessControlPolicyIDs)){ + v_primitiveContent.container_optional.accessControlPolicyIDs := ?; } - if(ispresent(p_primitiveContent.any_1[0].Container_optional.dynamicAuthorizationConsultationIDs)){ - v_primitiveContent.any_1[0].Container_optional.dynamicAuthorizationConsultationIDs := ?; + if(ispresent(p_primitiveContent.container_optional.dynamicAuthorizationConsultationIDs)){ + v_primitiveContent.container_optional.dynamicAuthorizationConsultationIDs := ?; } - if(ispresent(p_primitiveContent.any_1[0].Container_optional.announceTo)){ - v_primitiveContent.any_1[0].Container_optional.announceTo := ?; + if(ispresent(p_primitiveContent.container_optional.announceTo)){ + v_primitiveContent.container_optional.announceTo := ?; } - if(ispresent(p_primitiveContent.any_1[0].Container_optional.announcedAttribute)){ - v_primitiveContent.any_1[0].Container_optional.announcedAttribute := ?; + if(ispresent(p_primitiveContent.container_optional.announcedAttribute)){ + v_primitiveContent.container_optional.announcedAttribute := ?; } - if(ispresent(p_primitiveContent.any_1[0].Container_optional.creator)){ - v_primitiveContent.any_1[0].Container_optional.creator := ?; + if(ispresent(p_primitiveContent.container_optional.creator)){ + v_primitiveContent.container_optional.creator := ?; } - if(ispresent(p_primitiveContent.any_1[0].Container_optional.maxNrOfInstances)){ - v_primitiveContent.any_1[0].Container_optional.maxNrOfInstances := ?; + if(ispresent(p_primitiveContent.container_optional.maxNrOfInstances)){ + v_primitiveContent.container_optional.maxNrOfInstances := ?; } - if(ispresent(p_primitiveContent.any_1[0].Container_optional.maxByteSize)){ - v_primitiveContent.any_1[0].Container_optional.maxByteSize := ?; + if(ispresent(p_primitiveContent.container_optional.maxByteSize)){ + v_primitiveContent.container_optional.maxByteSize := ?; } - if(ispresent(p_primitiveContent.any_1[0].Container_optional.maxInstanceAge)){ - v_primitiveContent.any_1[0].Container_optional.maxInstanceAge := ?; + if(ispresent(p_primitiveContent.container_optional.maxInstanceAge)){ + v_primitiveContent.container_optional.maxInstanceAge := ?; } - if(ispresent(p_primitiveContent.any_1[0].Container_optional.locationID)){ - v_primitiveContent.any_1[0].Container_optional.locationID := ?; + if(ispresent(p_primitiveContent.container_optional.locationID)){ + v_primitiveContent.container_optional.locationID := ?; } - if(ispresent(p_primitiveContent.any_1[0].Container_optional.ontologyRef)){ - v_primitiveContent.any_1[0].Container_optional.ontologyRef := ?; + if(ispresent(p_primitiveContent.container_optional.ontologyRef)){ + v_primitiveContent.container_optional.ontologyRef := ?; } - if(ispresent(p_primitiveContent.any_1[0].Container_optional.disableRetrieval)){ - v_primitiveContent.any_1[0].Container_optional.disableRetrieval := ?; + if(ispresent(p_primitiveContent.container_optional.disableRetrieval)){ + v_primitiveContent.container_optional.disableRetrieval := ?; } } - else if(ischosen(p_primitiveContent.any_1[0].AE_optional)){ // AE - v_primitiveContent.any_1 := {{AE_optional := mw_contentAeBase}}; + else if(ischosen(p_primitiveContent.aE_optional)){ // AE + v_primitiveContent := {aE_optional := mw_contentAeBase}; - if(ispresent(p_primitiveContent.any_1[0].AE_optional.labels)){ - v_primitiveContent.any_1[0].AE_optional.labels := ?; + if(ispresent(p_primitiveContent.aE_optional.labels)){ + v_primitiveContent.aE_optional.labels := ?; } - if(ispresent(p_primitiveContent.any_1[0].AE_optional.accessControlPolicyIDs)){ - v_primitiveContent.any_1[0].AE_optional.accessControlPolicyIDs := ?; + if(ispresent(p_primitiveContent.aE_optional.accessControlPolicyIDs)){ + v_primitiveContent.aE_optional.accessControlPolicyIDs := ?; } - if(ispresent(p_primitiveContent.any_1[0].AE_optional.dynamicAuthorizationConsultationIDs)){ - v_primitiveContent.any_1[0].AE_optional.dynamicAuthorizationConsultationIDs := ?; + if(ispresent(p_primitiveContent.aE_optional.dynamicAuthorizationConsultationIDs)){ + v_primitiveContent.aE_optional.dynamicAuthorizationConsultationIDs := ?; } - if(ispresent(p_primitiveContent.any_1[0].AE_optional.announceTo)){ - v_primitiveContent.any_1[0].AE_optional.announceTo := ?; + if(ispresent(p_primitiveContent.aE_optional.announceTo)){ + v_primitiveContent.aE_optional.announceTo := ?; } - if(ispresent(p_primitiveContent.any_1[0].AE_optional.announcedAttribute)){ - v_primitiveContent.any_1[0].AE_optional.announcedAttribute := ?; + if(ispresent(p_primitiveContent.aE_optional.announcedAttribute)){ + v_primitiveContent.aE_optional.announcedAttribute := ?; } - if(ispresent(p_primitiveContent.any_1[0].AE_optional.appName)){ - v_primitiveContent.any_1[0].AE_optional.appName := ?; + if(ispresent(p_primitiveContent.aE_optional.appName)){ + v_primitiveContent.aE_optional.appName := ?; } - if(ispresent(p_primitiveContent.any_1[0].AE_optional.pointOfAccess)){ - v_primitiveContent.any_1[0].AE_optional.pointOfAccess := ?; + if(ispresent(p_primitiveContent.aE_optional.pointOfAccess)){ + v_primitiveContent.aE_optional.pointOfAccess := ?; } - if(ispresent(p_primitiveContent.any_1[0].AE_optional.ontologyRef)){ - v_primitiveContent.any_1[0].AE_optional.ontologyRef := ?; + if(ispresent(p_primitiveContent.aE_optional.ontologyRef)){ + v_primitiveContent.aE_optional.ontologyRef := ?; } - if(ispresent(p_primitiveContent.any_1[0].AE_optional.nodeLink)){ - v_primitiveContent.any_1[0].AE_optional.nodeLink := ?; + if(ispresent(p_primitiveContent.aE_optional.nodeLink)){ + v_primitiveContent.aE_optional.nodeLink := ?; } - if(ispresent(p_primitiveContent.any_1[0].AE_optional.contentSerialization)){ - v_primitiveContent.any_1[0].AE_optional.contentSerialization := ?; + if(ispresent(p_primitiveContent.aE_optional.contentSerialization)){ + v_primitiveContent.aE_optional.contentSerialization := ?; } - if(ispresent(p_primitiveContent.any_1[0].AE_optional.e2eSecInfo)){ - v_primitiveContent.any_1[0].AE_optional.e2eSecInfo := ?; + if(ispresent(p_primitiveContent.aE_optional.e2eSecInfo)){ + v_primitiveContent.aE_optional.e2eSecInfo := ?; } } - else if(ischosen(p_primitiveContent.any_1[0].AccessControlPolicy_optional)){ // ACP - v_primitiveContent.any_1 := {{AccessControlPolicy_optional := mw_contentAcpBase}}; + else if(ischosen(p_primitiveContent.accessControlPolicy_optional)){ // ACP + v_primitiveContent := {accessControlPolicy_optional := mw_contentAcpBase}; - if(ispresent(p_primitiveContent.any_1[0].AccessControlPolicy_optional.labels)){ - v_primitiveContent.any_1[0].AccessControlPolicy_optional.labels := ?; + if(ispresent(p_primitiveContent.accessControlPolicy_optional.labels)){ + v_primitiveContent.accessControlPolicy_optional.labels := ?; } - if(ispresent(p_primitiveContent.any_1[0].AccessControlPolicy_optional.announceTo)){ - v_primitiveContent.any_1[0].AccessControlPolicy_optional.announceTo := ?; + if(ispresent(p_primitiveContent.accessControlPolicy_optional.announceTo)){ + v_primitiveContent.accessControlPolicy_optional.announceTo := ?; } } - else if(ischosen(p_primitiveContent.any_1[0].ContentInstance_optional)){ // ContentInstance - v_primitiveContent.any_1 := {{ContentInstance_optional := mw_contentContentInstanceBase}}; + else if(ischosen(p_primitiveContent.contentInstance_optional)){ // ContentInstance + v_primitiveContent := {contentInstance_optional := mw_contentContentInstanceBase}; - if(ispresent(p_primitiveContent.any_1[0].ContentInstance_optional.labels)){ - v_primitiveContent.any_1[0].ContentInstance_optional.labels := ?; + if(ispresent(p_primitiveContent.contentInstance_optional.labels)){ + v_primitiveContent.contentInstance_optional.labels := ?; } - if(ispresent(p_primitiveContent.any_1[0].ContentInstance_optional.announceTo)){ - v_primitiveContent.any_1[0].ContentInstance_optional.announceTo := ?; + if(ispresent(p_primitiveContent.contentInstance_optional.announceTo)){ + v_primitiveContent.contentInstance_optional.announceTo := ?; } - if(ispresent(p_primitiveContent.any_1[0].ContentInstance_optional.announcedAttribute)){ - v_primitiveContent.any_1[0].ContentInstance_optional.announcedAttribute := ?; + if(ispresent(p_primitiveContent.contentInstance_optional.announcedAttribute)){ + v_primitiveContent.contentInstance_optional.announcedAttribute := ?; } - if(ispresent(p_primitiveContent.any_1[0].ContentInstance_optional.creator)){ - v_primitiveContent.any_1[0].ContentInstance_optional.creator := ?; + if(ispresent(p_primitiveContent.contentInstance_optional.creator)){ + v_primitiveContent.contentInstance_optional.creator := ?; } - if(ispresent(p_primitiveContent.any_1[0].ContentInstance_optional.contentInfo)){ - v_primitiveContent.any_1[0].ContentInstance_optional.contentInfo := ?; + if(ispresent(p_primitiveContent.contentInstance_optional.contentInfo)){ + v_primitiveContent.contentInstance_optional.contentInfo := ?; } - if(ispresent(p_primitiveContent.any_1[0].ContentInstance_optional.contentRef)){ - v_primitiveContent.any_1[0].ContentInstance_optional.contentRef := ?; + if(ispresent(p_primitiveContent.contentInstance_optional.contentRef)){ + v_primitiveContent.contentInstance_optional.contentRef := ?; } - if(ispresent(p_primitiveContent.any_1[0].ContentInstance_optional.ontologyRef)){ - v_primitiveContent.any_1[0].ContentInstance_optional.ontologyRef := ?; + if(ispresent(p_primitiveContent.contentInstance_optional.ontologyRef)){ + v_primitiveContent.contentInstance_optional.ontologyRef := ?; } } - else if(ischosen(p_primitiveContent.any_1[0].Group_optional)){ // Group - v_primitiveContent.any_1 := {{Group_optional := mw_contentGroupBase}}; + else if(ischosen(p_primitiveContent.group_optional)){ // Group + v_primitiveContent := {group_optional := mw_contentGroupBase}; - if(ispresent(p_primitiveContent.any_1[0].Group_optional.labels)){ - v_primitiveContent.any_1[0].Group_optional.labels := ?; + if(ispresent(p_primitiveContent.group_optional.labels)){ + v_primitiveContent.group_optional.labels := ?; } - if(ispresent(p_primitiveContent.any_1[0].Group_optional.accessControlPolicyIDs)){ - v_primitiveContent.any_1[0].Group_optional.accessControlPolicyIDs := ?; + if(ispresent(p_primitiveContent.group_optional.accessControlPolicyIDs)){ + v_primitiveContent.group_optional.accessControlPolicyIDs := ?; } - if(ispresent(p_primitiveContent.any_1[0].Group_optional.dynamicAuthorizationConsultationIDs)){ - v_primitiveContent.any_1[0].Group_optional.dynamicAuthorizationConsultationIDs := ?; + if(ispresent(p_primitiveContent.group_optional.dynamicAuthorizationConsultationIDs)){ + v_primitiveContent.group_optional.dynamicAuthorizationConsultationIDs := ?; } - if(ispresent(p_primitiveContent.any_1[0].Group_optional.announceTo)){ - v_primitiveContent.any_1[0].Group_optional.announceTo := ?; + if(ispresent(p_primitiveContent.group_optional.announceTo)){ + v_primitiveContent.group_optional.announceTo := ?; } - if(ispresent(p_primitiveContent.any_1[0].Group_optional.announcedAttribute)){ - v_primitiveContent.any_1[0].Group_optional.announcedAttribute := ?; + if(ispresent(p_primitiveContent.group_optional.announcedAttribute)){ + v_primitiveContent.group_optional.announcedAttribute := ?; } - if(ispresent(p_primitiveContent.any_1[0].Group_optional.creator)){ - v_primitiveContent.any_1[0].Group_optional.creator := ?; + if(ispresent(p_primitiveContent.group_optional.creator)){ + v_primitiveContent.group_optional.creator := ?; } - if(ispresent(p_primitiveContent.any_1[0].Group_optional.membersAccessControlPolicyIDs)){ - v_primitiveContent.any_1[0].Group_optional.membersAccessControlPolicyIDs := ?; + if(ispresent(p_primitiveContent.group_optional.membersAccessControlPolicyIDs)){ + v_primitiveContent.group_optional.membersAccessControlPolicyIDs := ?; } - if(ispresent(p_primitiveContent.any_1[0].Group_optional.memberTypeValidated)){ - v_primitiveContent.any_1[0].Group_optional.memberTypeValidated := ?; + if(ispresent(p_primitiveContent.group_optional.memberTypeValidated)){ + v_primitiveContent.group_optional.memberTypeValidated := ?; } - if(ispresent(p_primitiveContent.any_1[0].Group_optional.consistencyStrategy)){ - v_primitiveContent.any_1[0].Group_optional.consistencyStrategy := ?; + if(ispresent(p_primitiveContent.group_optional.consistencyStrategy)){ + v_primitiveContent.group_optional.consistencyStrategy := ?; } - if(ispresent(p_primitiveContent.any_1[0].Group_optional.groupName)){ - v_primitiveContent.any_1[0].Group_optional.groupName := ?; + if(ispresent(p_primitiveContent.group_optional.groupName)){ + v_primitiveContent.group_optional.groupName := ?; } } - else if(ischosen(p_primitiveContent.any_1[0].PollingChannel_optional)){ // PollingChannel - v_primitiveContent.any_1 := {{PollingChannel_optional := mw_contentPollingChannelBase}}; + else if(ischosen(p_primitiveContent.pollingChannel_optional)){ // PollingChannel + v_primitiveContent := {pollingChannel_optional := mw_contentPollingChannelBase}; - if(ispresent(p_primitiveContent.any_1[0].PollingChannel_optional.labels)){ - v_primitiveContent.any_1[0].PollingChannel_optional.labels := ?; + if(ispresent(p_primitiveContent.pollingChannel_optional.labels)){ + v_primitiveContent.pollingChannel_optional.labels := ?; } } - else if(ischosen(p_primitiveContent.any_1[0].Schedule_optional)){ // Schedule - v_primitiveContent.any_1 := {{Schedule_optional := mw_contentScheduleBase}}; + else if(ischosen(p_primitiveContent.schedule_optional)){ // Schedule + v_primitiveContent := {schedule_optional := mw_contentScheduleBase}; - if(ispresent(p_primitiveContent.any_1[0].Schedule_optional.labels)){ - v_primitiveContent.any_1[0].Schedule_optional.labels := ?; + if(ispresent(p_primitiveContent.schedule_optional.labels)){ + v_primitiveContent.schedule_optional.labels := ?; } - if(ispresent(p_primitiveContent.any_1[0].Schedule_optional.announceTo)){ - v_primitiveContent.any_1[0].Schedule_optional.announceTo := ?; + if(ispresent(p_primitiveContent.schedule_optional.announceTo)){ + v_primitiveContent.schedule_optional.announceTo := ?; } - if(ispresent(p_primitiveContent.any_1[0].Schedule_optional.announcedAttribute)){ - v_primitiveContent.any_1[0].Schedule_optional.announcedAttribute := ?; + if(ispresent(p_primitiveContent.schedule_optional.announcedAttribute)){ + v_primitiveContent.schedule_optional.announcedAttribute := ?; } } - else if(ischosen(p_primitiveContent.any_1[0].Subscription_optional)){ // Schedule - v_primitiveContent.any_1 := {{Subscription_optional := mw_contentSubscriptionBase}}; + else if(ischosen(p_primitiveContent.subscription_optional)){ // Schedule + v_primitiveContent := {subscription_optional := mw_contentSubscriptionBase}; - if(ispresent(p_primitiveContent.any_1[0].Subscription_optional.labels)){ - v_primitiveContent.any_1[0].Subscription_optional.labels := ?; + if(ispresent(p_primitiveContent.subscription_optional.labels)){ + v_primitiveContent.subscription_optional.labels := ?; } - if(ispresent(p_primitiveContent.any_1[0].Subscription_optional.accessControlPolicyIDs)){ - v_primitiveContent.any_1[0].Subscription_optional.accessControlPolicyIDs := ?; + if(ispresent(p_primitiveContent.subscription_optional.accessControlPolicyIDs)){ + v_primitiveContent.subscription_optional.accessControlPolicyIDs := ?; } - if(ispresent(p_primitiveContent.any_1[0].Subscription_optional.dynamicAuthorizationConsultationIDs)){ - v_primitiveContent.any_1[0].Subscription_optional.dynamicAuthorizationConsultationIDs := ?; + if(ispresent(p_primitiveContent.subscription_optional.dynamicAuthorizationConsultationIDs)){ + v_primitiveContent.subscription_optional.dynamicAuthorizationConsultationIDs := ?; } - if(ispresent(p_primitiveContent.any_1[0].Subscription_optional.creator)){ - v_primitiveContent.any_1[0].Subscription_optional.creator := ?; + if(ispresent(p_primitiveContent.subscription_optional.creator)){ + v_primitiveContent.subscription_optional.creator := ?; } - if(ispresent(p_primitiveContent.any_1[0].Subscription_optional.eventNotificationCriteria)){ - v_primitiveContent.any_1[0].Subscription_optional.eventNotificationCriteria := ?; + if(ispresent(p_primitiveContent.subscription_optional.eventNotificationCriteria)){ + v_primitiveContent.subscription_optional.eventNotificationCriteria := ?; } - if(ispresent(p_primitiveContent.any_1[0].Subscription_optional.expirationCounter)){ - v_primitiveContent.any_1[0].Subscription_optional.expirationCounter := ?; + if(ispresent(p_primitiveContent.subscription_optional.expirationCounter)){ + v_primitiveContent.subscription_optional.expirationCounter := ?; } - if(ispresent(p_primitiveContent.any_1[0].Subscription_optional.groupID)){ - v_primitiveContent.any_1[0].Subscription_optional.groupID := ?; + if(ispresent(p_primitiveContent.subscription_optional.groupID)){ + v_primitiveContent.subscription_optional.groupID := ?; } - if(ispresent(p_primitiveContent.any_1[0].Subscription_optional.notificationForwardingURI)){ - v_primitiveContent.any_1[0].Subscription_optional.notificationForwardingURI := ?; + if(ispresent(p_primitiveContent.subscription_optional.notificationForwardingURI)){ + v_primitiveContent.subscription_optional.notificationForwardingURI := ?; } - if(ispresent(p_primitiveContent.any_1[0].Subscription_optional.batchNotify)){ - v_primitiveContent.any_1[0].Subscription_optional.batchNotify := ?; + if(ispresent(p_primitiveContent.subscription_optional.batchNotify)){ + v_primitiveContent.subscription_optional.batchNotify := ?; } - if(ispresent(p_primitiveContent.any_1[0].Subscription_optional.rateLimit)){ - v_primitiveContent.any_1[0].Subscription_optional.rateLimit := ?; + if(ispresent(p_primitiveContent.subscription_optional.rateLimit)){ + v_primitiveContent.subscription_optional.rateLimit := ?; } - if(ispresent(p_primitiveContent.any_1[0].Subscription_optional.preSubscriptionNotify)){ - v_primitiveContent.any_1[0].Subscription_optional.preSubscriptionNotify := ?; + if(ispresent(p_primitiveContent.subscription_optional.preSubscriptionNotify)){ + v_primitiveContent.subscription_optional.preSubscriptionNotify := ?; } - if(ispresent(p_primitiveContent.any_1[0].Subscription_optional.pendingNotification)){ - v_primitiveContent.any_1[0].Subscription_optional.pendingNotification := ?; + if(ispresent(p_primitiveContent.subscription_optional.pendingNotification)){ + v_primitiveContent.subscription_optional.pendingNotification := ?; } - if(ispresent(p_primitiveContent.any_1[0].Subscription_optional.notificationStoragePriority)){ - v_primitiveContent.any_1[0].Subscription_optional.notificationStoragePriority := ?; + if(ispresent(p_primitiveContent.subscription_optional.notificationStoragePriority)){ + v_primitiveContent.subscription_optional.notificationStoragePriority := ?; } - if(ispresent(p_primitiveContent.any_1[0].Subscription_optional.latestNotify)){ - v_primitiveContent.any_1[0].Subscription_optional.latestNotify := ?; + if(ispresent(p_primitiveContent.subscription_optional.latestNotify)){ + v_primitiveContent.subscription_optional.latestNotify := ?; } - if(ispresent(p_primitiveContent.any_1[0].Subscription_optional.notificationContentType)){ - v_primitiveContent.any_1[0].Subscription_optional.notificationContentType := ?; + if(ispresent(p_primitiveContent.subscription_optional.notificationContentType)){ + v_primitiveContent.subscription_optional.notificationContentType := ?; } - if(ispresent(p_primitiveContent.any_1[0].Subscription_optional.notificationEventCat)){ - v_primitiveContent.any_1[0].Subscription_optional.notificationEventCat := ?; + if(ispresent(p_primitiveContent.subscription_optional.notificationEventCat)){ + v_primitiveContent.subscription_optional.notificationEventCat := ?; } - if(ispresent(p_primitiveContent.any_1[0].Subscription_optional.subscriberURI)){ - v_primitiveContent.any_1[0].Subscription_optional.subscriberURI := ?; + if(ispresent(p_primitiveContent.subscription_optional.subscriberURI)){ + v_primitiveContent.subscription_optional.subscriberURI := ?; } } return v_primitiveContent; diff --git a/LibOneM2M/OneM2M_Pixits.ttcn b/LibOneM2M/OneM2M_Pixits.ttcn index 3890959f47f6f51f02fb3786e92f8930999c68e0..7fa2d172c41675d5530d927e0374f633f6ccda35 100644 --- a/LibOneM2M/OneM2M_Pixits.ttcn +++ b/LibOneM2M/OneM2M_Pixits.ttcn @@ -7,7 +7,7 @@ * * @author oneM2M * @version $URL: https://forge.etsi.org/svn/oneM2M/trunk/ttcn/LibOneM2M/OneM2M_Pixits.ttcn $ - * $Id: OneM2M_Pixits.ttcn 247 2017-03-27 17:09:55Z reinaortega $ + * $Id: OneM2M_Pixits.ttcn 288 2017-05-19 07:18:08Z reinaortega $ * @desc Module containing Pixits for oneM2M * */ @@ -25,8 +25,12 @@ module OneM2M_Pixits { modulepar XSD.IDREFS PX_RESOURCES_TO_BE_DELETED := {"/ae_test", "/MyAcp"}; modulepar charstring PX_SUT_ADDRESS := "127.0.0.1:8080"; + + modulepar charstring PX_AE1_ADDRESS := "127.0.0.1:3131"; + + modulepar charstring PX_AE2_ADDRESS := "127.0.0.1:3132"; - modulepar charstring PX_TESTER_ADDRESS := "127.0.0.1:3131"; + modulepar charstring PX_CSE1_ADDRESS := "127.0.0.1:3141"; modulepar charstring PX_XML_NAMESPACE := "m2m=""http://www.onem2m.org/xml/protocols"""; @@ -36,11 +40,11 @@ module OneM2M_Pixits { modulepar XSD.ID PX_CSE_RESOURCE_ID := "cseResourceId"; - modulepar XSD.AnyURI PX_URI_CSE := "in-name";//TODO to be deleted - modulepar boolean PX_UNSTRUCTURED := false; - modulepar XSD.ID PX_AE_ID_STEM := ""; + modulepar XSD.ID PX_AE1_ID_STEM := ""; + + modulepar XSD.ID PX_AE2_ID_STEM := ""; modulepar XSD.ID PX_SUPER_USER := "admin:admin"; @@ -57,13 +61,12 @@ module OneM2M_Pixits { modulepar charstring PX_PROTOCOL_BINDING := "HTTP"; modulepar boolean PX_FROM_IS_AE_ID := true; - //@Martin + //for checking whether the locationPolicy creation request is originated from a ASN-AE //NOTE: Apply to Device-based location request, and this requires Test System (TS) to activate ASN-AE mode to test IUT modulepar boolean PX_IUT_IS_ASN_CSE := false; //default //set it to true when running Device-based location testcases modulepar boolean PX_IUT_IS_MN_CSE := false; //default //set it to true when running Share-based location testcases - //@Martin //constant parameters for LOC modulepar XSD.Token PX_LOCATION_TARGET_ID := "{LOCATION-TARGET-ID}"; //SUPPOSE TO BE RECEIVED FROM LOCATION SERVER modulepar XSD.AnyURI PX_LOCATION_SERVER_ADDRESS := "{LOCATION-SERVER-ADDRESS}"; diff --git a/LibOneM2M/OneM2M_Templates.ttcn b/LibOneM2M/OneM2M_Templates.ttcn index 146405c04f7f10d90b562376dadf2ce56fddf96f..a07537276eb3b41b1efaf1f48ac1923efe7cf1ec 100644 --- a/LibOneM2M/OneM2M_Templates.ttcn +++ b/LibOneM2M/OneM2M_Templates.ttcn @@ -7,7 +7,7 @@ * * @author oneM2M * @version $URL: https://forge.etsi.org/svn/oneM2M/trunk/ttcn/LibOneM2M/OneM2M_Templates.ttcn $ - * $Id: OneM2M_Templates.ttcn 251 2017-03-31 12:26:42Z reinaortega $ + * $Id: OneM2M_Templates.ttcn 297 2017-06-02 14:21:45Z reinaortega $ * @desc Module containing templates for oneM2M * */ @@ -63,7 +63,20 @@ module OneM2M_Templates { serialization := PX_SERIALIZATION, forcedFields := p_forcedFields }; - //Added by @Naum + + /** + * @desc Base template for response sending operations + * @param p_responsePrimitive + */ + template (value) MsgOut m_httpResponse(in template (value) ResponsePrimitive p_responsePrimitive, in template (omit) AttributeAux_list p_forcedFields := omit) := { + primitive := { responsePrimitive := p_responsePrimitive}, + host := PX_SUT_ADDRESS, + xmlNamespace := PX_XML_NAMESPACE, + protocolBinding := "HTTP", + serialization := PX_SERIALIZATION, + forcedFields := p_forcedFields + }; + template MsgIn mw_request(in template (present) RequestPrimitive p_requestPrimitive) := { primitive := { requestPrimitive := p_requestPrimitive} }; @@ -81,35 +94,6 @@ module OneM2M_Templates { group RequestPrimitives { group Retrieve { - - /** - * @desc - */ - template (value) RequestPrimitive m_retrieveCseBase := { - operation := int2, - to_ := PX_URI_CSE,//c_uri_cse,//@Martin - from_ := "admin:admin", - requestIdentifier := "m_retrieveCseBase" & f_rnd(1, 1000000), - resourceType := omit, - primitiveContent := omit, - roleIDs := omit, - originatingTimestamp := omit, - requestExpirationTimestamp := omit, - resultExpirationTimestamp := omit, - operationExecutionTime := omit, - responseType := omit, - resultPersistence := omit, - resultContent := omit, - eventCategory := omit, - deliveryAggregation := omit, - groupRequestIdentifier := omit, - filterCriteria := omit, - discoveryResultType := omit, - tokens := omit, - tokenIDs := omit, - localTokenIDs := omit, - tokenRequestIndicator := omit - }; /** * @desc Base RETRIEVE request primitive @@ -185,9 +169,7 @@ module OneM2M_Templates { from_ := p_originator, requestIdentifier := "m_retrieveResourceAttributeContentOption" & f_rnd(1, 1000000), resourceType := omit, - primitiveContent := { - any_1 := {{AttributeList := p_attributeList}} - }, + primitiveContent := {attributeList := p_attributeList}, roleIDs := omit, originatingTimestamp := omit, requestExpirationTimestamp := omit, @@ -290,95 +272,75 @@ module OneM2M_Templates { * @desc Base UPDATE request primitive for Ae resource */ template (value) RequestPrimitive m_updateAeBase modifies m_update:= { - from_ := PX_AE_ID_STEM, requestIdentifier := "m_updateAe" & f_rnd(1, 1000000), - primitiveContent:= { - any_1 := {{AE_optional := m_contentUpdateAe}} - } + primitiveContent:= {aE_optional := m_contentUpdateAe} }; /** * @desc Base UPDATE request primitive for Container resource */ template (value) RequestPrimitive m_updateContainerBase modifies m_update:= { - from_ := PX_AE_ID_STEM, requestIdentifier := "m_updateContainer" & f_rnd(1, 1000000), - primitiveContent:= { - any_1 := {{Container_optional := m_contentUpdateContainer}} - } + primitiveContent:= {container_optional := m_contentUpdateContainer} + }; + + /** + * @desc Base UPDATE request primitive for ContentInstance resource + */ + template (value) RequestPrimitive m_updateContentInstanceBase modifies m_update:= { + requestIdentifier := "m_updateContentInstance" & f_rnd(1, 1000000), + primitiveContent:= {contentInstance_optional := m_contentUpdateContentInstance} }; /** * @desc Base UPDATE request primitive for AccessControlPolicy resource */ template (value) RequestPrimitive m_updateAcpBase modifies m_update := { - from_ := PX_AE_ID_STEM, requestIdentifier := "m_updateAcp" & f_rnd(1, 1000000), - primitiveContent:= { - any_1 := {{AccessControlPolicy_optional := m_contentUpdateAcp}} - } + primitiveContent:= {accessControlPolicy_optional := m_contentUpdateAcp} }; template (value) RequestPrimitive m_updateAcpPrivileges(in template(omit) SetOfAcrs p_privileges := omit, in template(omit) SetOfAcrs p_selfPrivileges := omit) modifies m_update := { - from_ := PX_AE_ID_STEM, requestIdentifier := "m_updateAcp" & f_rnd(1, 1000000), - primitiveContent:= { - any_1 := {{AccessControlPolicy_optional := m_contentUpdateAcpPrivileges(p_privileges, p_selfPrivileges)}} - } + primitiveContent:= {accessControlPolicy_optional := m_contentUpdateAcpPrivileges(p_privileges, p_selfPrivileges)} }; /** * @desc Base UPDATE request primitive for Group resource */ template (value) RequestPrimitive m_updateGroupBase modifies m_update := { - from_ := PX_AE_ID_STEM, requestIdentifier := "m_updateGroup" & f_rnd(1, 1000000), - primitiveContent:= { - any_1 := {{Group_optional := m_contentUpdateGroup}} - } + primitiveContent:= {group_optional := m_contentUpdateGroup} }; /** * @desc Base UPDATE request primitive for Schedule resource */ template (value) RequestPrimitive m_updateScheduleBase modifies m_update := { - from_ := PX_AE_ID_STEM, requestIdentifier := "m_updateSchedule" & f_rnd(1, 1000000), - primitiveContent:= { - any_1 := {{Schedule_optional := m_contentUpdateSchedule}} - } + primitiveContent:= {schedule_optional := m_contentUpdateSchedule} }; /** * @desc Base UPDATE request primitive for PollingChannel resource */ template (value) RequestPrimitive m_updatePollingChannelBase modifies m_update := { - from_ := PX_AE_ID_STEM, requestIdentifier := "m_updatePollingChannel" & f_rnd(1, 1000000), - primitiveContent:= { - any_1 := {{PollingChannel_optional := m_contentUpdatePollingChannel}} - } + primitiveContent:= {pollingChannel_optional := m_contentUpdatePollingChannel} }; /** * @desc Base UPDATE request primitive for Subscription resource */ template (value) RequestPrimitive m_updateSubscriptionBase modifies m_update := { - from_ := PX_AE_ID_STEM, requestIdentifier := "m_updateSubscription" & f_rnd(1, 1000000), - primitiveContent:= { - any_1 := {{Subscription_optional := m_contentUpdateSubscription}} - } + primitiveContent:= {subscription_optional := m_contentUpdateSubscription} }; - //@Martin - template (value) RequestPrimitive m_updateLocationPolicy(XSD.ID p_locResourceAddress, in template (omit) AcpType p_accessControlPolicyIds, in template (omit) XSD.Duration p_locationUpdatePeriod) modifies m_update := { + template (value) RequestPrimitive m_updateLocationPolicy(XSD.ID p_locResourceAddress, in template (omit) AcpType p_accessControlPolicyIds, in template (omit) XSD.Duration p_locationUpdatePeriod) modifies m_update := { to_ := p_locResourceAddress, - from_ := PX_AE_ID_STEM, //AE originator id e.g. requestIdentifier := "m_updateLocationPolicy", - primitiveContent := { - any_1 := {{ LocationPolicy_optional := m_contentUpdateLocationPolicy(p_accessControlPolicyIds, p_locationUpdatePeriod) }} - } + primitiveContent := {locationPolicy_optional := m_contentUpdateLocationPolicy(p_accessControlPolicyIds, p_locationUpdatePeriod)} }; }//end group Update @@ -421,9 +383,7 @@ module OneM2M_Templates { from_ := p_from, requestIdentifier := ?, resourceType := ?, - primitiveContent := { - any_1 := ? - }, + primitiveContent := ?, roleIDs := *, originatingTimestamp := *, requestExpirationTimestamp := *, @@ -457,9 +417,7 @@ module OneM2M_Templates { from_ := p_from,//PX_AE_ID_STEM,//TODO We should use omit, "s", or "c" requestIdentifier := testcasename() & "-m_createAEAnnc" & f_rnd(1, 1000000), resourceType := int10002, - primitiveContent := { - any_1 := {{AEAnnc_optional := m_contentCreateAEAnnc({"Credential-ID:None"}, p_accessControlPolicyIds, p_appId, valueof(p_to) & "/" & p_stemId)}} - } + primitiveContent := {aEAnnc_optional := m_contentCreateAEAnnc({"Credential-ID:None"}, p_accessControlPolicyIds, p_appId, valueof(p_to) & "/" & p_stemId)} }; /** @@ -467,19 +425,14 @@ module OneM2M_Templates { */ template RequestPrimitive mw_createAEAnnc(template (omit) XSD.ID p_from := omit, template (omit) XSD.ID p_to := omit, template (omit) AcpType p_accessControlPolicyIds := omit) modifies mw_create := { resourceType := int10002, - primitiveContent := { - any_1 := {{AEAnnc_optional := mw_contentCreateAEAnnc({"Credential-ID:None"}, p_accessControlPolicyIds)}} - } + primitiveContent := {aEAnnc_optional := mw_contentCreateAEAnnc({"Credential-ID:None"}, p_accessControlPolicyIds)} }; - //Added by @Naum template (value) RequestPrimitive m_createAe(XSD.ID p_appId, template (omit) AcpType p_accessControlPolicyIds := omit,template (omit) XSD.ID p_from := omit, template (omit) ResourceName p_resourceName := c_aeAuxName, in template (omit) PoaList p_poaList := omit) modifies m_create := { from_ := p_from,//PX_AE_ID_STEM,//TODO We should use omit, "s", or "c" requestIdentifier := testcasename() & "-m_createAe" & f_rnd(1, 1000000), resourceType := int2, - primitiveContent := { - any_1 := {{AE_optional := m_contentCreateAe(p_accessControlPolicyIds,p_resourceName, p_appId, p_poaList)}} - } + primitiveContent := {aE_optional := m_contentCreateAe(p_accessControlPolicyIds,p_resourceName, p_appId, p_poaList)} }; /** @@ -487,18 +440,14 @@ module OneM2M_Templates { */ template RequestPrimitive mw_createAe(template XSD.ID p_from := *, template XSD.ID p_to := ?) modifies mw_create := { resourceType := int2, - primitiveContent := { - any_1 := {{AE_optional := ?}} - } + primitiveContent := {aE_optional := ?} }; template (value) RequestPrimitive m_createAeAux(template (omit) AcpType p_accessControlPolicyIds := omit, in template (omit) PoaList p_poaList) modifies m_create := { - from_ := PX_AE_ID_STEM,//TODO We should use omit, "s", or "c"//@Martin + from_ := PX_AE1_ID_STEM,//TODO We should use omit, "s", or "c" requestIdentifier := testcasename() & "-m_createAe" & f_rnd(1, 1000000), resourceType := int2, - primitiveContent := { - any_1 := {{AE_optional := m_contentCreateAe(p_accessControlPolicyIds, c_aeAuxName, -, p_poaList)}} - } + primitiveContent := {aE_optional := m_contentCreateAe(p_accessControlPolicyIds, c_aeAuxName, -, p_poaList)} }; /** @@ -507,19 +456,15 @@ module OneM2M_Templates { template (value) RequestPrimitive m_createAcpBase modifies m_create := { requestIdentifier := testcasename() & "-m_createAcp" & f_rnd(1, 1000000), resourceType := int1, - primitiveContent := { - any_1 := {{AccessControlPolicy_optional := m_contentCreateAcp ()}} - } + primitiveContent := {accessControlPolicy_optional := m_contentCreateAcp ()} }; template (value) RequestPrimitive m_createAcp(XSD.ID p_parentResourceAddress, in template (omit) XSD.String p_name := c_defaultAccessControlPolicyResourceName, in template (value) ListOfURIs p_acor := PX_ACOR, in template (value) AccessControlOperations p_allowedOperations := int63) modifies m_create := { to_ := p_parentResourceAddress, - from_ := PX_AE_ID_STEM, + from_ := PX_SUPER_USER, requestIdentifier := testcasename() & "-m_createAcp" & f_rnd(1, 1000000), resourceType := int1, - primitiveContent := { - any_1 := {{AccessControlPolicy_optional := m_contentCreateAcp (p_name, p_acor, p_allowedOperations)}} - } + primitiveContent := {accessControlPolicy_optional := m_contentCreateAcp (p_name, p_acor, p_allowedOperations)} }; /** @@ -529,9 +474,7 @@ module OneM2M_Templates { to_ := p_to, from_ := p_from, resourceType := int10002, - primitiveContent := { - any_1 := {{AccessControlPolicyAnnc_optional := mw_contentCreateAcpAnnc(-)}} - } + primitiveContent := {accessControlPolicyAnnc_optional := mw_contentCreateAcpAnnc(-)} }; @@ -542,19 +485,14 @@ module OneM2M_Templates { from_ := PX_SUPER_USER, requestIdentifier := testcasename() & "-m_createAcpAux" & f_rnd(1, 1000000), resourceType := int1, - primitiveContent := { - any_1 := {{AccessControlPolicy_optional := m_contentCreateAcp (p_acpName, p_acor, p_allowedOperations)}} - } + primitiveContent := {accessControlPolicy_optional := m_contentCreateAcp (p_acpName, p_acor, p_allowedOperations)} }; - //Added by @Naum template (value) RequestPrimitive m_createCSEBase (in ServiceSubscribedAppRule p_serviceSubscribedAppRule) modifies m_create := { - from_ := PX_AE_ID_STEM, + from_ := PX_SUPER_USER, requestIdentifier := testcasename() & "-m_createCSE" & f_rnd(1, 1000000), resourceType := int1,//FIXME Is this the value for CSEBase? In any case, this template is not used at all - primitiveContent := { - any_1 := {{CSEBase_optional := m_contentCreateCSEBase (p_serviceSubscribedAppRule)}} - } + primitiveContent := {cSEBase_optional := m_contentCreateCSEBase (p_serviceSubscribedAppRule)} }; @@ -564,20 +502,21 @@ module OneM2M_Templates { template (value) RequestPrimitive m_createContainerBase modifies m_create := { requestIdentifier := testcasename() & "-m_createContainer" & f_rnd(1, 1000000), resourceType := int3, - primitiveContent := { - - any_1 := {{Container_optional := m_contentCreateContainer}} - } + primitiveContent := {container_optional := m_contentCreateContainer} + }; + + /** + * @desc CREATE request primitive for Container resource wiht no resourceName provided + */ + template (value) RequestPrimitive m_createContainer_noResourceName modifies m_createContainerBase := { + primitiveContent := {container_optional := m_contentCreateContainer(omit)} }; template (value) RequestPrimitive m_createContainer(XSD.ID p_parentResourceAddress, in template (omit) XSD.String p_resourceName := c_defaultContainerResourceName) modifies m_create := { to_ := p_parentResourceAddress, - from_ := PX_AE_ID_STEM, requestIdentifier := testcasename() & "-m_createContainer" & f_rnd(1, 1000000), resourceType := int3, - primitiveContent := { - any_1 := {{Container_optional := m_contentCreateContainer(p_resourceName)}} - } + primitiveContent := {container_optional := m_contentCreateContainer(p_resourceName)} }; /** @@ -585,29 +524,23 @@ module OneM2M_Templates { */ template RequestPrimitive mw_createContainer(template XSD.ID p_from := *, template XSD.ID p_to := ?) modifies mw_create := { resourceType := int3, - primitiveContent := { - any_1 := {{Container_optional := ?}} - } + primitiveContent := {container_optional := ?} }; /** - * @desc Reception template for CREATE ContainerAnnc + * @desc Base Reception template for CREATE ContainerAnnc */ - template RequestPrimitive mw_createContainerAnnc(template XSD.ID p_from := *, template XSD.ID p_to := ?) modifies mw_create := { + template RequestPrimitive mw_createContainerAnncBase(template XSD.ID p_from := *, template XSD.ID p_to := ?) modifies mw_create := { resourceType := int10003, - primitiveContent := { - any_1 := {{ContainerAnnc_optional := ?}} - } - }; + primitiveContent := {containerAnnc_optional := mw_contentCreateContainerAnncBase} + }; /** * @desc Reception template for CREATE FlexContainer */ template RequestPrimitive mw_createFlexContainer(template XSD.ID p_from := *, template XSD.ID p_to := ?) modifies mw_create := { resourceType := int28, - primitiveContent := { - any_1 := {{FlexContainer_optional := ?}} - } + primitiveContent := {flexContainer_optional := ?} }; /** @@ -615,9 +548,7 @@ module OneM2M_Templates { */ template RequestPrimitive mw_createGenericIwkOpInstance(template XSD.ID p_from := *, template XSD.ID p_to := ?) modifies mw_create := { resourceType := int28, // FIXME: not found in TS004 - primitiveContent := { - any_1 := {{GenericInterworkingOperationInstance_optional := ?}} - } + primitiveContent := {genericInterworkingOperationInstance_optional := ?} }; /** @@ -626,10 +557,14 @@ module OneM2M_Templates { template (value) RequestPrimitive m_createContentInstanceBase modifies m_create := { requestIdentifier := testcasename() & "-m_createContentInstance" & f_rnd(1, 1000000), resourceType := int4, - primitiveContent := { - - any_1 := {{ContentInstance_optional := m_contentCreateContentInstance}} - } + primitiveContent := {contentInstance_optional := m_contentCreateContentInstance} + }; + + /** + * @desc CREATE request primitive for Content Instance resource with no resourceName provided + */ + template (value) RequestPrimitive m_createContentInstance_noResourceName modifies m_createContentInstanceBase := { + primitiveContent := {contentInstance_optional := m_contentCreateContentInstance(omit)} }; template (value) RequestPrimitive m_createContentInstance(XSD.ID p_parentResourceAddress, XSD.String p_primitiveContent) modifies m_create := { @@ -637,9 +572,7 @@ module OneM2M_Templates { from_ := "admin:admin", requestIdentifier := testcasename() & "-m_createContentInstance" & f_rnd(1, 1000000), resourceType := int4, - primitiveContent := { - any_1 := {{ContentInstance_optional := m_contentCreateContentInstance(p_primitiveContent)}} - } + primitiveContent := {contentInstance_optional := m_contentCreateContentInstance(p_primitiveContent)} }; /** @@ -647,9 +580,15 @@ module OneM2M_Templates { */ template RequestPrimitive mw_createContentInstanceAnnc(template XSD.ID p_from := *, template XSD.ID p_to := ?) modifies mw_create := { resourceType := int10014, - primitiveContent := { - any_1 := {{ContentInstanceAnnc_optional := ?}} - } + primitiveContent := {contentInstanceAnnc_optional := ?} + }; + + /** + * @desc Base Reception template for CREATE ContentInstanceAnnc + */ + template RequestPrimitive mw_createContentInstanceAnncBase(template XSD.ID p_from := *, template XSD.ID p_to := ?) modifies mw_create := { + resourceType := int10014, + primitiveContent := {contentInstanceAnnc_optional := mw_contentCreateContentInstanceAnncBase} }; @@ -659,9 +598,7 @@ module OneM2M_Templates { template (value) RequestPrimitive m_createGroupBase modifies m_create := { requestIdentifier := testcasename() & "-m_createGroup" & f_rnd(1, 1000000), resourceType := int9, - primitiveContent := { - any_1 := {{Group_optional := m_contentCreateGroup (1, {"NotInitialized"}, omit, omit)}} //TODO: p_resourceId - } + primitiveContent := {group_optional := m_contentCreateGroup (1, {"NotInitialized"}, omit, omit)} //TODO: p_resourceId }; template (value) RequestPrimitive m_createGroup(in template (value) XSD.NonNegativeInteger p_maxNrOfMembers, @@ -673,9 +610,7 @@ module OneM2M_Templates { in template (omit) XSD.String p_name := "MyGroup") modifies m_create := { requestIdentifier := testcasename() & "-m_createGroup" & f_rnd(1, 1000000), resourceType := int9, - primitiveContent := { - any_1 := {{Group_optional := m_contentCreateGroup (p_maxNrOfMembers, p_memberIds, p_accessControlPolicyIds, p_memberType, p_consistencyStrategy, p_membersAccessControlPolicyIDs, p_name)}} //TODO: p_resourceId - } + primitiveContent := {group_optional := m_contentCreateGroup (p_maxNrOfMembers, p_memberIds, p_accessControlPolicyIds, p_memberType, p_consistencyStrategy, p_membersAccessControlPolicyIDs, p_name)} //TODO: p_resourceId }; /** @@ -683,10 +618,16 @@ module OneM2M_Templates { */ template RequestPrimitive mw_createGroupAnnc(template XSD.ID p_from := *, template XSD.ID p_to := ?) modifies mw_create := { resourceType := int10009, - primitiveContent := { - any_1 := {{GroupAnnc_optional := ?}} - } + primitiveContent := {groupAnnc_optional := ?} }; + + /** + * @desc Base Reception template for CREATE GroupAnnc + */ + template RequestPrimitive mw_createGroupAnncBase(template XSD.ID p_from := *, template XSD.ID p_to := ?) modifies mw_create := { + resourceType := int10009, + primitiveContent := {groupAnnc_optional := mw_contentCreateGroupAnncBase} + }; /** * @desc Base CREATE request primitive for MgmtObj resource @@ -694,9 +635,7 @@ module OneM2M_Templates { template (value) RequestPrimitive m_createMgmtObjBase modifies m_create := { requestIdentifier := testcasename() & "-m_createMgmtObj" & f_rnd(1, 1000000), resourceType := int13, - primitiveContent := { - any_1 := {{MgmtObj_optional := m_contentCreateMgmtObj (-,-)}} - } + primitiveContent := {mgmtResource_optional := m_contentCreateMgmtObj (-,-)} }; /** @@ -705,9 +644,7 @@ module OneM2M_Templates { template (value) RequestPrimitive m_createMgmtObj modifies m_create := { requestIdentifier := testcasename() & "-m_createMgmtObj" & f_rnd(1, 1000000), resourceType := int13, - primitiveContent := { - any_1 := {{MgmtObj_optional := m_contentCreateMgmtObj (-, -)}} - } + primitiveContent := {mgmtResource_optional := m_contentCreateMgmtObj (-, -)} }; /** @@ -715,9 +652,15 @@ module OneM2M_Templates { */ template RequestPrimitive mw_createMgmtObjAnnc(template XSD.ID p_from := *, template XSD.ID p_to := ?) modifies mw_create := { resourceType := int10013, - primitiveContent := { - any_1 := {{MgmtObjAnnc_optional := ?}} - } + primitiveContent := {announcedMgmtResource_optional := ?} + }; + + /** + * @desc Base Reception template for CREATE MgmtObjAnnc + */ + template RequestPrimitive mw_createMgmtObjAnncBase(template XSD.ID p_from := *, template XSD.ID p_to := ?) modifies mw_create := { + resourceType := int10013, + primitiveContent := {announcedMgmtResource_optional := mw_contentCreateMgmtObjAnncBase} }; /** @@ -726,9 +669,7 @@ module OneM2M_Templates { template (value) RequestPrimitive m_createNodeBase modifies m_create := { requestIdentifier := testcasename() & "-m_createNode" & f_rnd(1, 1000000), resourceType := int14, - primitiveContent := { - any_1 := {{Node_optional := m_contentCreateNode(-, -, -) }} - } + primitiveContent := {node_optional := m_contentCreateNode(-, -, -) } }; /** @@ -737,9 +678,7 @@ module OneM2M_Templates { template (value) RequestPrimitive m_createNode modifies m_create := { requestIdentifier := testcasename() & "-m_createNode" & f_rnd(1, 1000000), resourceType := int14, - primitiveContent := { - any_1 := {{Node_optional := m_contentCreateNode(-,-,-) }} - } + primitiveContent := {node_optional := m_contentCreateNode(-,-,-) } }; /** @@ -747,9 +686,7 @@ module OneM2M_Templates { */ template RequestPrimitive mw_createNodeAnnc(template XSD.ID p_from := *, template XSD.ID p_to := ?) modifies mw_create := { resourceType := int10014, - primitiveContent := { - any_1 := {{NodeAnnc_optional := ?}} - } + primitiveContent := {nodeAnnc_optional := ?} }; /** @@ -758,9 +695,7 @@ module OneM2M_Templates { template (value) RequestPrimitive m_createPollingChannelBase modifies m_create := { requestIdentifier := testcasename() & "-m_createPollingChannel" & f_rnd(1, 1000000), resourceType := int15, - primitiveContent := { - any_1 := {{PollingChannel_optional := m_contentCreatePollingChannel (-)}} - } + primitiveContent := {pollingChannel_optional := m_contentCreatePollingChannel (-)} }; template (value) RequestPrimitive m_createPollingChannel(XSD.ID p_parentResourceAddress, in template (value)XSD.ID p_originatorId) modifies m_create := { @@ -768,9 +703,7 @@ module OneM2M_Templates { from_ := p_originatorId, requestIdentifier := testcasename() & "-m_createPollingChannel" & f_rnd(1, 1000000), resourceType := int15, - primitiveContent := { - any_1 := {{PollingChannel_optional := m_contentCreatePollingChannel ()}} - } + primitiveContent := {pollingChannel_optional := m_contentCreatePollingChannel ()} }; /** @@ -779,19 +712,14 @@ module OneM2M_Templates { template (value) RequestPrimitive m_createScheduleBase modifies m_create := { requestIdentifier := testcasename() & "-m_createSchedule" & f_rnd(1, 1000000), resourceType := int18, - primitiveContent := { - any_1 := {{Schedule_optional := m_contentCreateSchedule ({{"0,0,0 1 2,1,1,*"}})}} - } + primitiveContent := {schedule_optional := m_contentCreateSchedule ({{"0 0 0,1,2 1 1 * *"}})} }; 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, - from_ := PX_AE_ID_STEM, requestIdentifier := testcasename() & "-m_createSchedule" & f_rnd(1, 1000000), resourceType := int18, - primitiveContent := { - any_1 := {{Schedule_optional := m_contentCreateSchedule (p_scheduleElement, p_name)}} - } + primitiveContent := {schedule_optional := m_contentCreateSchedule (p_scheduleElement, p_name)} }; /** @@ -799,19 +727,21 @@ module OneM2M_Templates { */ template RequestPrimitive mw_createScheduleAnnc(template XSD.ID p_from := *, template XSD.ID p_to := ?) modifies mw_create := { resourceType := int10018, - primitiveContent := { - any_1 := {{ScheduleAnnc_optional := ?}} - } + primitiveContent := {scheduleAnnc_optional := ?} + }; + + /** + * @desc Base Reception template for CREATE ScheduleAnnc + */ + template RequestPrimitive mw_createScheduleAnncBase(template XSD.ID p_from := *, template XSD.ID p_to := ?) modifies mw_create := { + resourceType := int10018, + primitiveContent := {scheduleAnnc_optional := mw_contentCreateScheduleAnncBase} }; - //Added by @Naum template (value) RequestPrimitive m_createServiceSubscribedAppRule (in ListOfM2MID p_applicableCredIDs, in ListOfM2MID p_allowedAppIDs, in ListOfM2MID p_allowedAEs) modifies m_create := { - from_ := PX_AE_ID_STEM, requestIdentifier := testcasename() & "-m_createServiceSubscribedAppRule" & f_rnd(1, 1000000), resourceType := int19,//FIXME Is this the correct value? - primitiveContent := { - any_1 := {{ServiceSubscribedAppRule_optional := m_contentCreateServiceSubscribedAppRule (p_applicableCredIDs, p_allowedAppIDs, p_allowedAEs)}} - } + primitiveContent := {serviceSubscribedAppRule_optional := m_contentCreateServiceSubscribedAppRule (p_applicableCredIDs, p_allowedAppIDs, p_allowedAEs)} }; @@ -821,19 +751,14 @@ module OneM2M_Templates { template (value) RequestPrimitive m_createSubscriptionBase modifies m_create := { requestIdentifier := testcasename() & "-m_createSubscription" & f_rnd(1, 1000000), resourceType := int23, - primitiveContent := { - any_1 := {{Subscription_optional := m_contentCreateSubscription ({"NotInitialized"})}} - } + primitiveContent := {subscription_optional := m_contentCreateSubscription ({"NotInitialized"})} }; template (value) RequestPrimitive m_createSubscription(XSD.ID p_parentResourceAddress, in template (omit) XSD.String p_name, in template (value) ListOfURIs p_notificationURI := {"NotInitialized"}) modifies m_create := { to_ := p_parentResourceAddress, - from_ := PX_AE_ID_STEM, requestIdentifier := testcasename() & "-m_createSubscription" & f_rnd(1, 1000000), resourceType := int23, - primitiveContent := { - any_1 := {{Subscription_optional := m_contentCreateSubscription (p_notificationURI, p_name)}} - } + primitiveContent := {subscription_optional := m_contentCreateSubscription (p_notificationURI, p_name)} }; template (value) RequestPrimitive m_createSubscriptionAdvanced( XSD.ID p_parentResourceAddress, @@ -845,19 +770,14 @@ module OneM2M_Templates { in template (omit) XSD.Boolean p_latestNotify := omit, in template (omit) XSD.AnyURI p_subscriberURI := omit, in template (omit) NotificationContentType p_notificationContentType := int1) modifies m_createSubscription := { - primitiveContent := { - any_1 := {{Subscription_optional := m_contentCreateSubscriptionAdvanced (p_notificationURI, p_name, p_eventNotificationCriteria, p_expirationCounter, p_batchNotify, p_latestNotify, p_subscriberURI, p_notificationContentType)}} - } + primitiveContent := {subscription_optional := m_contentCreateSubscriptionAdvanced (p_notificationURI, p_name, p_eventNotificationCriteria, p_expirationCounter, p_batchNotify, p_latestNotify, p_subscriberURI, p_notificationContentType)} }; - //@Martin template (value) RequestPrimitive m_createLocationPolicy(in template (value) LocationSource p_locationSource, in template (omit) AcpType p_accessControlPolicyIds, in template (omit) XSD.Duration p_locationUpdatePeriod, in template (omit) NodeID p_locationTargetID, in template (omit) XSD.AnyURI p_locationServerAddress) modifies m_create := { requestIdentifier := testcasename() & "-m_createLocationPolicy" & f_rnd(1, 1000000), //the requestIdentifier is supposed to be set similar as "C190XX7T/001" by prepending the AE-ID-Stem and slash(‘/’) in front of it resourceType := int10, - primitiveContent := { - any_1 := {{ LocationPolicy_optional := m_contentCreateLocationPolicy(p_locationSource, p_accessControlPolicyIds, p_locationUpdatePeriod, p_locationTargetID, p_locationServerAddress) }} - }, + primitiveContent := {locationPolicy_optional := m_contentCreateLocationPolicy(p_locationSource, p_accessControlPolicyIds, p_locationUpdatePeriod, p_locationTargetID, p_locationServerAddress) }, resultContent := int1//default }; @@ -866,16 +786,20 @@ module OneM2M_Templates { */ template RequestPrimitive mw_createLocationPolicyAnnc(template XSD.ID p_from := *, template XSD.ID p_to := ?) modifies mw_create := { resourceType := int10010, - primitiveContent := { - any_1 := {{LocationPolicyAnnc_optional := ?}} - } - }; - //@Martin + primitiveContent := {locationPolicyAnnc_optional := ?} + }; + + /** + * @desc Base Reception template for CREATE LocationPolicyAnnc + */ + template RequestPrimitive mw_createLocationPolicyAnncBase(template XSD.ID p_from := *, template XSD.ID p_to := ?) modifies mw_create := { + resourceType := int10010, + primitiveContent := {locationPolicyAnnc_optional := mw_contentCreateLocationPolicyAnncBase} + }; + template (value) RequestPrimitive m_createNotification(in template (value) Representation p_resourcePresentation, in template (omit)NotificationEventType p_notifEventType, in template (omit) XSD.AnyURI p_subscriptionReference, in template (omit) XSD.AnyURI p_notifForwardingURI) modifies m_create := { requestIdentifier := testcasename() & "-m_createNotification" & f_rnd(1, 1000000), - primitiveContent := { - any_1 := {{ Notification := m_contentCreateNotification(p_resourcePresentation, p_notifEventType, p_subscriptionReference, p_notifForwardingURI)}} - }, + primitiveContent := {notification := m_contentCreateNotification(p_resourcePresentation, p_notifEventType, p_subscriptionReference, p_notifForwardingURI)}, resultContent := int1 //default }; @@ -885,9 +809,7 @@ module OneM2M_Templates { */ template RequestPrimitive mw_createSemanticDescriptor(template XSD.ID p_from := *, template XSD.ID p_to := ?, template SemanticDescriptor_optional p_semanticDescriptor := mw_contentCreateSemanticDescriptor) modifies mw_create := { resourceType := int24, - primitiveContent := { - any_1 := {{SemanticDescriptor_optional := p_semanticDescriptor}} - } + primitiveContent := {semanticDescriptor_optional := p_semanticDescriptor} }; }//end group Create @@ -921,33 +843,6 @@ module OneM2M_Templates { }; - template (value) RequestPrimitive m_delete(XSD.ID p_resourceAddress) := { - operation := int4, - to_ := p_resourceAddress, - from_ := PX_AE_ID_STEM, - requestIdentifier := testcasename() & "-m_deleteAe" & f_rnd(1, 1000000), - resourceType := omit, - primitiveContent := omit, - roleIDs := omit, - originatingTimestamp := omit, - requestExpirationTimestamp := omit, - resultExpirationTimestamp := omit, - operationExecutionTime := omit, - responseType := omit, - resultPersistence := omit, - resultContent := omit, - eventCategory := omit, - deliveryAggregation := omit, - groupRequestIdentifier := omit, - filterCriteria := omit, - discoveryResultType := omit, - tokens := omit, - tokenIDs := omit, - localTokenIDs := omit, - tokenRequestIndicator := omit - - }; - }//end group Delete group Notify { @@ -961,7 +856,7 @@ module OneM2M_Templates { from_ := *, requestIdentifier := ?, resourceType := *, - primitiveContent := { any_1 := {{ Notification := mw_contentNotificationBase}} }, + primitiveContent := {notification := mw_contentNotificationBase}, roleIDs := *, originatingTimestamp := *, requestExpirationTimestamp := *, @@ -990,7 +885,7 @@ module OneM2M_Templates { from_ := *, requestIdentifier := ?, resourceType := *, - primitiveContent := { any_1 := {{ AggregatedNotification := ?}} }, + primitiveContent := { aggregatedNotification := ?}, roleIDs := *, originatingTimestamp := *, requestExpirationTimestamp := *, @@ -1015,9 +910,7 @@ module OneM2M_Templates { */ template RequestPrimitive mw_notify(in template Notification p_notification) modifies mw_notifyBase := { - primitiveContent := { - any_1 := {{ Notification := p_notification}} - } + primitiveContent := {notification := p_notification} }; @@ -1173,7 +1066,6 @@ module OneM2M_Templates { accessControlObjectDetails_list := {} } - //added by @Naum template (value) CSEBase_optional m_contentCreateCSEBase (in template (value) ServiceSubscribedAppRule p_serviceSubscribedAppRule) := { resourceName := omit, resourceType := omit, @@ -1231,15 +1123,43 @@ module OneM2M_Templates { memberTypeValidated := omit,//NP consistencyStrategy := p_consistencyStrategy,//O groupName := omit,//O + semanticSupportIndicator := omit,//O choice := omit//NP }; + /** + * @desc Base reception template of primitiveContent for CREATE operation for GroupAnnc resource + */ + template GroupAnnc_optional mw_contentCreateGroupAnncBase := { + resourceName := omit,//NA M + resourceType := omit,//NA M + resourceID := omit,//NA M + parentID := omit,//NA M + creationTime := omit,//NA M + lastModifiedTime := omit,//NA M + labels := ?,//MA + accessControlPolicyIDs := ?,//MA + expirationTime := ?,//MA M + link := ?, + dynamicAuthorizationConsultationIDs := *, //OA + memberType := *, //OA + currentNrOfMembers := *, //OA + maxNrOfMembers := *, //OA + memberIDs := *, //OA + membersAccessControlPolicyIDs := *, //OA + memberTypeValidated := *, //OA + consistencyStrategy := *, //OA + groupName := *, //OA + semanticSupportIndicator := *,//OA + choice := omit //NA + }; + /** * @desc Base primitiveContent for CREATE operation for MgmtObj resource * @param p_name Resource name * @param p_accessControlPolicyIds ACP IDs for the AE */ - template (value) MgmtObj_optional m_contentCreateMgmtObj (in template (omit) AcpType p_accessControlPolicyIds := omit, in template (omit) XSD.String p_name := c_defaultMgmtObjResourceName) := { + template (value) MgmtResource_optional m_contentCreateMgmtObj (in template (omit) AcpType p_accessControlPolicyIds := omit, in template (omit) XSD.String p_name := c_defaultMgmtObjResourceName) := { resourceName := p_name,//O resourceType := omit,//NP @@ -1259,6 +1179,27 @@ module OneM2M_Templates { description := omit//O }; + /** + * @desc Base reception template of primitiveContent for CREATE operation for MgmtObjAnnc resource + */ + template AnnouncedMgmtResource_optional mw_contentCreateMgmtObjAnncBase := { + resourceName := omit,//NA M + resourceType := omit,//NA M + resourceID := omit,//NA M + parentID := omit,//NA M + creationTime := omit,//NA M + lastModifiedTime := omit,//NA M + labels := ?,//MA + accessControlPolicyIDs := ?,//MA + expirationTime := ?,//MA M + link := ?, + dynamicAuthorizationConsultationIDs := *, //OA + mgmtDefinition := ?, //MA + objectIDs := *, //OA + objectPaths := *, //OA + description := * //OA + }; + /** * @desc Base primitiveContent for CREATE operation for Node resource * @param p_name Resource name @@ -1280,6 +1221,7 @@ module OneM2M_Templates { announcedAttribute := omit,//O nodeID := p_nodeId,//M hostedCSELink := omit,//O + mgmtClientAddress := omit,//O choice := omit//O }; @@ -1319,7 +1261,23 @@ module OneM2M_Templates { announcedAttribute := omit,//O scheduleElement := p_scheduleElement,//M choice := omit//NP - }; + }; + + /** + * @desc Base reception template of primitiveContent for CREATE operation for ScheduleAnnc resource + */ + template ScheduleAnnc_optional mw_contentCreateScheduleAnncBase := { + resourceName := omit,//NA M + resourceType := omit,//NA M + resourceID := omit,//NA M + parentID := omit,//NA M + creationTime := omit,//NA M + lastModifiedTime := omit,//NA M + labels := ?,//MA + expirationTime := ?,//MA M + link := ?, + scheduleElement := * //OA + }; template (value) ServiceSubscribedAppRule_optional m_contentCreateServiceSubscribedAppRule (in ListOfM2MID p_applicableCredIDs, in ListOfM2MID p_allowedAppIDs, in ListOfM2MID p_allowedAEs) := { resourceName := omit,//TODO TS-0004 7.4.29.1 2 Missing attribute @@ -1335,6 +1293,7 @@ module OneM2M_Templates { applicableCredIDs := p_applicableCredIDs,//O allowedApp_IDs := p_allowedAppIDs,//O allowedAEs := p_allowedAEs,//O + allowedRole_IDs := omit,//O choice := omit //O } @@ -1390,7 +1349,7 @@ module OneM2M_Templates { subscriberURI := p_subscriberURI//O }; - template (value) EventNotificationCriteria m_eventNotificationCriteria ( in EventNotificationCriteria.notificationEventType_list p_notificationEventType_list := {}, in EventNotificationCriteria.attribute p_attribute_list := {}) := { //the parameter should be a list of NotificationEventTypeEventType + template (value) EventNotificationCriteria m_eventNotificationCriteria ( in EventNotificationCriteria.notificationEventType_list p_notificationEventType_list := {}, template (omit) EventNotificationCriteria.attribute p_attribute_list := omit) := { //the parameter should be a list of NotificationEventTypeEventType createdBefore := omit, createdAfter := omit, modifiedSince := omit, @@ -1402,7 +1361,7 @@ module OneM2M_Templates { sizeAbove := omit, sizeBelow := omit, operationMonitor_list := {}, - attribute := p_attribute_list, // TODO this list should be able to be omited see 9.6.8 + attribute := p_attribute_list, notificationEventType_list := p_notificationEventType_list,// TODO this list should be able to be omited see 9.6.8 (TS0001) missingData := omit }; @@ -1420,8 +1379,8 @@ module OneM2M_Templates { * @desc Base primitiveContent for CREATE operation for ContentInstance resource * @param p_primitiveContent Content for the ContentInstance */ - template (value) ContentInstance_optional m_contentCreateContentInstance(XSD.String p_primitiveContent := "NotInitializedValue") := { - resourceName := c_defaultContentInstanceResourceName,//O + template (value) ContentInstance_optional m_contentCreateContentInstance(in template (omit) XSD.String p_name := c_defaultContentInstanceResourceName, XSD.String p_primitiveContent := "AnyValue") := { + resourceName := p_name,//O resourceType := omit,//NP resourceID := omit,//NP parentID := omit,//NP @@ -1437,11 +1396,29 @@ module OneM2M_Templates { contentSize := omit,//NP contentRef := omit, //O ontologyRef := omit,//O - content := { - embed_values := {p_primitiveContent}, - attr := omit, - elem_list := {} - }, //M + content := p_primitiveContent,//M + choice := omit //O + }; + + /** + * @desc Base primitiveContent for CREATE operation for ContentInstanceAnnc resource + * @param p_primitiveContent Content for the ContentInstanceAnnc + */ + template ContentInstanceAnnc_optional mw_contentCreateContentInstanceAnncBase := { + resourceName := omit,//NA M + resourceType := omit,//NA M + resourceID := omit,//NA M + parentID := omit,//NA M + creationTime := omit,//NA M + lastModifiedTime := omit,//NA M + labels := ?,//MA + expirationTime := omit,//O NA + link := omit, //O NA + stateTag := *,// OA + contentInfo := *,//OA + contentSize := *,//OA + ontologyRef := *,//OA + content := *, //OA choice := omit //O }; @@ -1475,7 +1452,33 @@ module OneM2M_Templates { choice := omit//NP }; - //@Martin + /** + * @desc Base reception template of primitiveContent for CREATE operation for ContainerAnnc resource + */ + template ContainerAnnc_optional mw_contentCreateContainerAnncBase := { + resourceName := omit,//NA M + resourceType := omit,//NA M + resourceID := omit,//NA M + parentID := omit,//NA M + creationTime := omit,//NA M + lastModifiedTime := omit,//NA M + labels := ?,//MA M + accessControlPolicyIDs := ?,//MA + expirationTime := ?,//MA M + link := ?, //M + dynamicAuthorizationConsultationIDs := *, //OA + stateTag := *, //OA + maxNrOfInstances := *, //OA + maxByteSize := *, //OA + maxInstanceAge := *, //OA + currentNrOfInstances := *, //OA + currentByteSize := *, //OA + locationID := *, //OA + ontologyRef := *, //OA + disableRetrieval := *, //OA + choice := omit //NA + }; + template (value) LocationPolicy_optional m_contentCreateLocationPolicy (in template (value) LocationSource p_locationSource, in template (omit) AcpType p_accessControlPolicyIds, in template (value) XSD.Duration p_locationUpdatePeriod, in template (value) NodeID p_locationTargetID, in template (value) XSD.AnyURI p_locationServerAddress) := { resourceName := c_defaultLocationPolicyResourceName, //O resourceType := omit, //NP @@ -1490,7 +1493,7 @@ module OneM2M_Templates { announceTo := omit, //O announcedAttribute := omit, //O locationSource := p_locationSource, //M - locationUpdatePeriod := p_locationUpdatePeriod, //O + locationUpdatePeriod := {p_locationUpdatePeriod}, //O locationTargetID := p_locationTargetID, //O locationServer := p_locationServerAddress,//O locationContainerID := omit, //NP @@ -1500,7 +1503,30 @@ module OneM2M_Templates { }; - //@Martin + /** + * @desc Base reception template of primitiveContent for CREATE operation for LocationPolicyAnnc resource + */ + template LocationPolicyAnnc_optional mw_contentCreateLocationPolicyAnncBase := { + resourceName := omit,//NA M + resourceType := omit,//NA M + resourceID := omit,//NA M + parentID := omit,//NA M + creationTime := omit,//NA M + lastModifiedTime := omit,//NA M + labels := ?,//MA + accessControlPolicyIDs := ?,//MA + expirationTime := ?,//MA M + link := ?, + dynamicAuthorizationConsultationIDs := *, //OA + locationSource := *, //OA + locationUpdatePeriod := *, //OA + locationTargetID := *, //OA + locationServer := *, //OA + locationContainerID := *, //OA + locationContainerName := *, //OA + locationStatus := * //OA + }; + template (value) Notification m_contentCreateNotification (in template (value) Representation p_resourcePresentation, in template (omit) NotificationEventType p_notifEventType, in template (omit) XSD.AnyURI p_subReference, @@ -1635,6 +1661,7 @@ module OneM2M_Templates { memberTypeValidated := omit,//NP consistencyStrategy := omit,//NP groupName := omit,//O + semanticSupportIndicator := omit,//O choice := omit//NP }; @@ -1732,8 +1759,31 @@ module OneM2M_Templates { choice := omit//NP }; - //@Martin - template (value) LocationPolicy_optional m_contentUpdateLocationPolicy (in template (omit) AcpType p_accessControlPolicyIds, in template (value) XSD.Duration p_locationUpdatePeriod) := { + /** + * @desc Base primitiveContent for UPDATE operation for ContentInstance resource + */ + template (value) ContentInstance_optional m_contentUpdateContentInstance := { + resourceName := omit,//O + 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 + stateTag := omit,//NP + creator := omit,//O + contentInfo := omit,//O + contentSize := omit,//NP + contentRef := omit, //O + ontologyRef := omit,//O + content := omit, //M + choice := omit //O + }; + + template (value) LocationPolicy_optional m_contentUpdateLocationPolicy (in template (omit) AcpType p_accessControlPolicyIds, in template (value) XSD.Duration p_locationUpdatePeriod) := { resourceName := omit,//NP resourceType := omit,//NP resourceID := omit,//NP @@ -1747,7 +1797,7 @@ module OneM2M_Templates { announceTo := omit,//O announcedAttribute := omit,//O locationSource := omit,//NP - locationUpdatePeriod := p_locationUpdatePeriod, //O + locationUpdatePeriod := {p_locationUpdatePeriod}, //O locationTargetID := omit, //NP locationServer := omit, //NP locationContainerID := omit, //NP @@ -1922,6 +1972,10 @@ module OneM2M_Templates { template AccessControlPolicy_optional mw_contentAcp_rc7 modifies mw_contentAcpBase := { } + + template AccessControlPolicy_optional mw_contentAcp_rc8 modifies m_contentAcp_allOmit := { + choice := {childResource_list := ?} //O + } template Group_optional mw_contentGroupBase := { resourceName := ?,//M @@ -1945,6 +1999,7 @@ module OneM2M_Templates { memberTypeValidated := *,//O consistencyStrategy := *,//O groupName := *,//O + semanticSupportIndicator := *,//O choice := *//O }; @@ -1970,6 +2025,7 @@ module OneM2M_Templates { memberTypeValidated := *,//M consistencyStrategy := *,//O groupName := *,//O + semanticSupportIndicator := *,//O choice := *//O } @@ -1995,6 +2051,7 @@ module OneM2M_Templates { memberTypeValidated := omit,//M consistencyStrategy := omit,//O groupName := omit,//O + semanticSupportIndicator := omit,//O choice := omit//O } @@ -2039,12 +2096,17 @@ module OneM2M_Templates { memberTypeValidated := omit,//M consistencyStrategy := omit,//O groupName := omit,//O + semanticSupportIndicator := omit,//O choice := {childResource_list := ?}//O } template Group_optional mw_contentGroup_rc7 modifies mw_contentGroupBase := { } + + template Group_optional mw_contentGroup_rc8 modifies m_contentGroup_allOmit := { + choice := {childResource_list := ?} //O + } template PollingChannel_optional mw_contentPollingChannelBase := { resourceName := ?,//M @@ -2188,6 +2250,10 @@ module OneM2M_Templates { template Schedule_optional mw_contentSchedule_rc7 modifies mw_contentScheduleBase := { } + + template Schedule_optional mw_contentSchedule_rc8 modifies m_contentSchedule_allOmit := { + choice := {childResource_list := ?} //O + } template Subscription_optional mw_contentSubscriptionBase := { resourceName := ?,//M @@ -2325,6 +2391,10 @@ module OneM2M_Templates { template Subscription_optional mw_contentSubscription_rc7 modifies mw_contentSubscriptionBase := { } + + template Subscription_optional mw_contentSubscription_rc8 modifies m_contentSubscription_allOmit := { + choice := {childResource_list := ?} //O + } template ContentInstance_optional mw_contentContentInstanceBase := { resourceName := ?,//M @@ -2475,6 +2545,10 @@ module OneM2M_Templates { } + template Container_optional mw_contentContainer_rc8 modifies m_contentContainer_allOmit := { + choice := {childResource_list := ?} //O + } + template Notification m_contentNotification_allOmit := { notificationEvent:= omit, verificationRequest := omit, diff --git a/LibOneM2M/OneM2M_Types.ttcn b/LibOneM2M/OneM2M_Types.ttcn index 8bd912ab55244f67f918ebd937d56a2367d49d4d..21733ae31aff069b39063b3cd2521f6a2f8c9f37 100644 --- a/LibOneM2M/OneM2M_Types.ttcn +++ b/LibOneM2M/OneM2M_Types.ttcn @@ -7,7 +7,7 @@ * * @author oneM2M * @version $URL: https://forge.etsi.org/svn/oneM2M/trunk/ttcn/LibOneM2M/OneM2M_Types.ttcn $ - * $Id: OneM2M_Types.ttcn 238 2017-03-23 17:39:11Z reinaortega $ + * $Id: OneM2M_Types.ttcn 297 2017-06-02 14:21:45Z reinaortega $ * @desc OneM2M data types module * */ @@ -15,77 +15,6 @@ module OneM2M_Types { import from XSD all; -/* ****************************************** - * oneM2M Abstract Service Primitives - * ****************************************** -*/ - /** - * @desc Type for the oneM2M primitives exchange - * @member primitive oneM2M primitive - * @member host IP Address of the destination - * @member xmlNamespace XML Namespace to be used - * @member protocolBinding Protocol binding to be used - * @member serialization Serialization to be used - * @member forcedFields Attributes that need to be processed differently by the test adapter: - * - empty fields (for instance, for attribute deletion), i.e. <labels></labels> -> value_ to be omitted - * - invalid values, i.e. <maxNrOfInstances>-1</maxNrOfInstances> - */ - type record MsgOut { - union { - RequestPrimitive requestPrimitive, - ResponsePrimitive responsePrimitive - } primitive, - charstring host optional, - charstring xmlNamespace optional, - charstring protocolBinding optional, - charstring serialization optional, - AttributeAux_list forcedFields optional - } - with { - encode "" - } - - /** - * @desc Type for the oneM2M primitives exchange - * @member primitive oneM2M primitive - */ - type record MsgIn { - union { - RequestPrimitive requestPrimitive, - ResponsePrimitive responsePrimitive - } primitive - } - with { - encode "" - } - - type record AcRequestPrimitive { - charstring event, - anytype data - } - with { - encode "adapter"; - } - - type record AcResponsePrimitive { - charstring event, - anytype data - } - with { - encode "adapter"; - } - - type record AttributeAux { - XSD.NCName name, - charstring value_ optional - }; - - type record of AttributeAux AttributeAux_list; - -/* ********************************** -* oneM2M Resource primitives -* *********************************** -*/ type record AccessControlPolicy { @@ -1095,9 +1024,9 @@ type record CmdhDefEcValue XSD.PositiveInteger order, EventCat defEcValue, ListOfM2MID requestOrigin, - XSD.AnyType requestContext optional, + XSD.AnySimpleType requestContext optional,//FIXME Use AnySimpleType instead XSD.Boolean requestContextNotification optional, - XSD.AnyType requestCharacteristics optional + XSD.AnySimpleType requestCharacteristics optional //FIXME Use AnySimpleType instead } with { variant "name as uncapitalized"; @@ -1164,9 +1093,9 @@ type record CmdhLimits XSD.String description optional, XSD.PositiveInteger order, ListOfM2MID requestOrigin, - XSD.AnyType requestContext, + XSD.AnySimpleType requestContext,//FIXME Use AnySimpleType instead XSD.Boolean requestContextNotification optional, - XSD.AnyType requestCharacteristics, + XSD.AnySimpleType requestCharacteristics,//FIXME Use AnySimpleType instead ListOfEventCat limitsEventCategory, ListOfMinMax limitsRequestExpTime, ListOfMinMax limitsResultExpTime, @@ -1244,7 +1173,7 @@ type record CmdhNwAccessRule XSD.NonNegativeInteger minReqVolume, XSD.NonNegativeInteger spreadingWaitTime, BackOffParameters backOffParameters, - XSD.AnyType otherConditions, + XSD.AnySimpleType otherConditions,//FIXME Use AnySimpleType instead MgmtLinkRef mgmtLink } with { @@ -1489,7 +1418,7 @@ with { }; -type XSD.String ContentInfo //FIXME To be fixed (pattern "[\w/!#$\^_.+\q{0, 0, 0, 38}&\-]+((:[0-2])#(0,1))+((:[0-5])#(0,1))") TODO To verify pattern +type XSD.String ContentInfo //FIXME To be fixed (pattern "[\w/!#$\^_.+\q{0, 0, 0, 38}&\-]+((:[0-2])#(0,1))+((:[0-5])#(0,1))") with { variant "name as uncapitalized"; }; @@ -1690,26 +1619,59 @@ with { variant (localTokenIDs) "list"; }; - -type record of anytype Contents; // FIXME added by AMB, necessary for Codec - -type record PrimitiveContent -{ - Contents any_1 - /*record of union { - XSD.String elem, - XSD.String elem_1 - } choice_list*/ +//FIXME Use this type instead type record PrimitiveContent +type union PrimitiveContent { + //TS-0004 - 7.5.2-1 & 7.5.2-2 Common elements to request/response content + //ResourceTypes + AEAnnc_optional aEAnnc_optional, + AE_optional aE_optional, + AccessControlPolicy_optional accessControlPolicy_optional, + AccessControlPolicyAnnc_optional accessControlPolicyAnnc_optional, + ContentInstance_optional contentInstance_optional, + ContentInstanceAnnc_optional contentInstanceAnnc_optional, + Container_optional container_optional, + ContainerAnnc_optional containerAnnc_optional, + FlexContainerResource_optional flexContainer_optional, + CSEBase_optional cSEBase_optional, + Group_optional group_optional, + GroupAnnc_optional groupAnnc_optional, + LocationPolicy_optional locationPolicy_optional, + LocationPolicyAnnc_optional locationPolicyAnnc_optional, + MgmtResource_optional mgmtResource_optional,//MgmtResource + AnnouncedMgmtResource_optional announcedMgmtResource_optional,//AnnouncedMgmtResource + Node_optional node_optional, + NodeAnnc_optional nodeAnnc_optional, + PollingChannel_optional pollingChannel_optional, + Schedule_optional schedule_optional, + ScheduleAnnc_optional scheduleAnnc_optional, + ServiceSubscribedAppRule_optional serviceSubscribedAppRule_optional, + Subscription_optional subscription_optional, + SemanticDescriptor_optional semanticDescriptor_optional, + GenericInterworkingOperationInstance_optional genericInterworkingOperationInstance_optional, + //SecurityInfo + SecurityInfo securityInfo, + //TS-0004 - 7.5.2-1 Elements used for request content + Notification notification, + AggregatedNotification aggregatedNotification, + AttributeList attributeList, + ResponsePrimitive responsePrimitive, + //TS-0004 - 7.5.2-2 Elements used for response content + Resource resource, + URIList uRIList, + ResourceRefList resourceRefList, + AggregatedResponse aggregatedResponse, + URI uRI, + DebugInfo debugInfo, + //Invalid types + AE_update_invalid aE_update_invalid, + ACP_update_invalid aCP_update_invalid, + Container_update_invalid container_update_invalid, + Group_update_invalid group_update_invalid, + PollingChannel_update_invalid pollingChannel_update_invalid, + Schedule_update_invalid schedule_update_invalid, + Subscription_update_invalid subscription_update_invalid, + LocationPolicy_update_invalid locationPolicy_update_invalid } -with { - variant "name as uncapitalized"; - //variant (choice_list) "untagged"; - //variant (choice_list[-]) "untagged"; - //variant (choice_list[-].elem) "anyElement from 'http://www.onem2m.org/xml/protocols'"; - //variant (choice_list[-].elem_1) "name as 'elem'"; - //variant (choice_list[-].elem_1) "anyElement except unqualified, 'http://www.onem2m.org/xml/protocols'"; -}; - type record FilterCriteria { @@ -1752,7 +1714,7 @@ with { type record Attribute { XSD.NCName name, - XSD.AnyType value_ + XSD.AnySimpleType value_ //FIXME Use AnySimpleType instead } with { variant "name as uncapitalized"; @@ -1789,7 +1751,7 @@ with { type record AnyArgType { XSD.NCName name, - XSD.AnyType value_ + XSD.AnySimpleType value_ //FIXME Use AnySimpleType instead } with { variant "name as uncapitalized"; @@ -1977,7 +1939,7 @@ type record AccessControlRule record of ScheduleEntry accessControlWindow_list, record { record length(1 .. infinity) of Ipv4 ipv4Addresses optional,//FIXME It must be optional - record length(1 .. infinity) of Ipv6 ipv6Addresses optional//FIXME It must be optional + record length(1 .. infinity) of Ipv6 ipv6Addresses optional //FIXME It must be optional } accessControlIpAddresses optional, LocationRegion accessControlLocationRegion optional } accessControlContexts_list, @@ -2902,7 +2864,7 @@ type record ContentInstance XSD.NonNegativeInteger contentSize, ContentRef contentRef optional, XSD.AnyURI ontologyRef optional, - XSD.AnyType content, + XSD.AnySimpleType content, //FIXME Use AnySimpleType instead union { record length(1 .. infinity) of ChildResourceRef childResource_list, record length(1 .. infinity) of SemanticDescriptor semanticDescriptor_list @@ -2936,7 +2898,7 @@ type record ContentInstanceAnnc ContentInfo contentInfo optional, XSD.NonNegativeInteger contentSize optional, XSD.AnyURI ontologyRef optional, - XSD.AnyType content optional, + XSD.AnySimpleType content optional,//FIXME Use AnySimpleType instead union { record length(1 .. infinity) of ChildResourceRef childResource_list, record length(1 .. infinity) of SemanticDescriptor semanticDescriptor_list @@ -3388,7 +3350,8 @@ type enumerated ResultContent int5(5), int6(6), int7(7), - int8(8) + int8(8), + int9(9) } with { variant "useNumber"; @@ -3433,6 +3396,7 @@ type enumerated ResponseStatusCode int4113(4113), int4114(4114), int4115(4115), + int4116(4116), int5000(5000), int5001(5001), int5103(5103), @@ -4498,6 +4462,7 @@ type record Group XSD.Boolean memberTypeValidated optional, ConsistencyStrategy consistencyStrategy optional, XSD.String groupName optional, + XSD.Boolean semanticSupportIndicator optional, union { record length(1 .. infinity) of ChildResourceRef childResource_list, record length(1 .. infinity) of union { @@ -4513,6 +4478,8 @@ with { variant (announcedAttribute) "list"; //variant (memberTypeValidated) "text 'true' as '1'"; //variant (memberTypeValidated) "text 'false' as '0'"; + //variant (semanticSupportIndicator) "text 'true' as '1'"; + //variant (semanticSupportIndicator) "text 'false' as '0'"; variant (choice) "untagged"; variant (choice.childResource_list) "untagged"; variant (choice.childResource_list[-]) "name as 'childResource'"; @@ -4542,6 +4509,7 @@ type record GroupAnnc XSD.Boolean memberTypeValidated optional, ConsistencyStrategy consistencyStrategy optional, XSD.String groupName optional, + XSD.Boolean semanticSupportIndicator optional, union { record length(1 .. infinity) of ChildResourceRef childResource_list, record length(1 .. infinity) of union { @@ -4558,6 +4526,8 @@ with { variant (memberIDs) "list"; //variant (memberTypeValidated) "text 'true' as '1'"; //variant (memberTypeValidated) "text 'false' as '0'"; + //variant (semanticSupportIndicator) "text 'true' as '1'"; + //variant (semanticSupportIndicator) "text 'false' as '0'"; variant (choice) "untagged"; variant (choice.childResource_list) "untagged"; variant (choice.childResource_list[-]) "name as 'childResource'"; @@ -4800,6 +4770,7 @@ type record Node record length(1 .. infinity) of XSD.NCName announcedAttribute, NodeID nodeID, XSD.ID hostedCSELink optional, + XSD.String mgmtClientAddress optional, union { record length(1 .. infinity) of ChildResourceRef childResource_list, record length(1 .. infinity) of union { @@ -4849,6 +4820,7 @@ type record NodeAnnc ListOfURIs dynamicAuthorizationConsultationIDs optional, NodeID nodeID, XSD.ID hostedCSELink optional, + XSD.String mgmtClientAddress optional, union { record length(1 .. infinity) of ChildResourceRef childResource_list, record length(1 .. infinity) of union { @@ -4982,7 +4954,7 @@ type union Representation { type record Notification_1 { record { - //XSD.AnyType representation optional, To be exchanged by Representation + //XSD.AnyType representation optional, Use Representation instead Representation representation optional, record { Operation operation optional, @@ -5340,8 +5312,8 @@ type record RequestPrimitive FilterCriteria filterCriteria optional, DiscResType discoveryResultType optional, record length(1 .. infinity) of DynAuthJWT tokens optional,//TODO it must be optional - record length(1 .. infinity) of TokenID tokenIDs optional,//TODO it must be optional - record length(1 .. infinity) of XSD.NCName localTokenIDs optional,//TODO it must be optional + record length(1 .. infinity) of TokenID tokenIDs optional, + record length(1 .. infinity) of XSD.NCName localTokenIDs optional, XSD.Boolean tokenRequestIndicator optional } with { @@ -6253,8 +6225,6 @@ type record TimeSeries XSD.NonNegativeInteger missingDataCurrentNr optional, XSD.NonNegativeInteger missingDataDetectTimer optional, XSD.AnyURI ontologyRef optional, - XSD.AnyURI latest, - XSD.AnyURI oldest, union { record length(1 .. infinity) of ChildResourceRef childResource_list, record length(1 .. infinity) of union { @@ -6468,1020 +6438,1064 @@ with { variant (choice.choice_list[-].scheduleAnnc_list) "untagged"; variant (choice.choice_list[-].scheduleAnnc_list[-]) "name as 'scheduleAnnc'"; }; - -/* Additional types */ - -group OptionalResourceTypes { - - //Added by @Naum - type record AEAnnc_optional - { - XSD.NCName resourceName optional, - ResourceType resourceType optional, - XSD.ID resourceID optional, - NhURI parentID optional, - Timestamp creationTime optional, - Timestamp lastModifiedTime optional, - Labels labels optional, - AcpType accessControlPolicyIDs optional, - Timestamp expirationTime optional, - ListOfURIs dynamicAuthorizationConsultationIDs optional, - XSD.AnyURI link optional, - XSD.String appName optional, - XSD.String app_ID optional, - XSD.ID aE_ID optional, - PoaList pointOfAccess optional, - XSD.AnyURI ontologyRef optional, - XSD.AnyURI nodeLink optional, - XSD.Boolean requestReachability optional, - Serializations contentSerialization optional, - E2eSecInfo e2eSecInfo optional, - union { - record length(1 .. infinity) of ChildResourceRef childResource_list, - record length(1 .. infinity) of union { - Container container, - ContainerAnnc containerAnnc, - Group group_, - GroupAnnc groupAnnc, - AccessControlPolicy accessControlPolicy, - AccessControlPolicyAnnc accessControlPolicyAnnc, - Subscription subscription, - ScheduleAnnc scheduleAnnc, - SemanticDescriptor semanticDescriptor, - TimeSeries timeSeries, - TimeSeriesAnnc timeSeriesAnnc, - TrafficPatternAnnc trafficPatternAnnc, - Sg_flexContainerResource_group sg_flexContainerResource, - Sg_announcedFlexContainerResource_group sg_announcedFlexContainerResource - } choice_list - } choice optional - } - with { - variant "element"; - variant (resourceName) "attribute"; - variant (app_ID) "name as 'App-ID'"; - variant (aE_ID) "name as 'AE-ID'"; - //variant (requestReachability) "text 'true' as '1'"; - //variant (requestReachability) "text 'false' as '0'"; - variant (choice) "untagged"; - variant (choice.childResource_list) "untagged"; - variant (choice.childResource_list[-]) "name as 'childResource'"; - variant (choice.choice_list) "untagged"; - variant (choice.choice_list[-]) "untagged"; - variant (choice.choice_list[-].group_) "name as 'group'"; - }; - - type record AE_optional - { - XSD.NCName resourceName optional, - ResourceType resourceType optional, - XSD.ID resourceID optional, - NhURI parentID optional, - Timestamp creationTime optional, - Timestamp lastModifiedTime optional, - Labels labels optional, - AcpType accessControlPolicyIDs optional, - Timestamp expirationTime optional, - ListOfURIs dynamicAuthorizationConsultationIDs optional, - ListOfURIs announceTo optional, - record length(1 .. infinity) of XSD.NCName announcedAttribute optional, - XSD.String appName optional, - XSD.String app_ID optional, - XSD.ID aE_ID optional, - PoaList pointOfAccess optional, - XSD.AnyURI ontologyRef optional, - XSD.AnyURI nodeLink optional, - XSD.Boolean requestReachability optional, - Serializations contentSerialization optional, - E2eSecInfo e2eSecInfo optional, +/* ****************************************** + * oneM2M Abstract Service Primitives + * ****************************************** +*/ + /** + * @desc Type for the oneM2M primitives exchange + * @member primitive oneM2M primitive + * @member host IP Address of the destination + * @member xmlNamespace XML Namespace to be used + * @member protocolBinding Protocol binding to be used + * @member serialization Serialization to be used + * @member forcedFields Attributes that need to be processed differently by the test adapter: + * - empty fields (for instance, for attribute deletion), i.e. <labels></labels> -> value_ to be omitted + * - invalid values, i.e. <maxNrOfInstances>-1</maxNrOfInstances> + */ + type record MsgOut { union { - record length(1 .. infinity) of ChildResourceRef childResource_list, - record length(1 .. infinity) of union { - Container container, - Group group_, - AccessControlPolicy accessControlPolicy, - Subscription subscription, - PollingChannel pollingChannel, - Schedule schedule, - SemanticDescriptor semanticDescriptor, - TimeSeries timeSeries, - TrafficPattern trafficPattern, - Sg_flexContainerResource_group sg_flexContainerResource - } choice_list - } choice optional + RequestPrimitive requestPrimitive, + ResponsePrimitive responsePrimitive + } primitive, + charstring host optional, + charstring xmlNamespace optional, + charstring protocolBinding optional, + charstring serialization optional, + AttributeAux_list forcedFields optional } with { - variant "element"; - variant (resourceName) "attribute"; - variant (announcedAttribute) "list"; - variant (app_ID) "name as 'App-ID'"; - variant (aE_ID) "name as 'AE-ID'"; - //variant (requestReachability) "text 'true' as '1'"; - //variant (requestReachability) "text 'false' as '0'"; - variant (choice) "untagged"; - variant (choice.childResource_list) "untagged"; - variant (choice.childResource_list[-]) "name as 'childResource'"; - variant (choice.choice_list) "untagged"; - variant (choice.choice_list[-]) "untagged"; - variant (choice.choice_list[-].group_) "name as 'group'"; - - // long->short conversion XML - variant "name as 'ae'"; - //variant (resourceName) "name as 'rn'"; - variant (resourceType) "name as 'ty'"; - variant (resourceID) "name as 'ri'"; - variant (parentID) "name as 'pi'"; - variant (creationTime) "name as 'ct'"; - variant (lastModifiedTime) "name as 'lt'"; - variant (labels) "name as 'lbl'"; - variant (accessControlPolicyIDs) "name as 'acpi'"; - variant (expirationTime) "name as 'et'"; - variant (dynamicAuthorizationConsultationIDs) "name as 'daci'"; - variant (announceTo) "name as 'at'"; - variant (announcedAttribute) "name as 'aa'"; - variant (appName) "name as 'apn'"; - variant (app_ID) "name as 'api'"; - variant (aE_ID) "name as 'aei'"; - variant (pointOfAccess) "name as 'poa'"; - variant (ontologyRef) "name as 'or'"; - variant (nodeLink) "name as 'nl'"; - variant (requestReachability) "name as 'rr'"; - variant (contentSerialization) "name as 'csz'"; - variant (e2eSecInfo) "name as 'esi'"; - variant (choice.childResource_list[-]) "name as 'cr'"; - variant (choice.choice_list[-].container) "name as 'cnt'"; - variant (choice.choice_list[-].group_) "name as 'grp'"; - variant (choice.choice_list[-].accessControlPolicy) "name as 'acp'"; - variant (choice.choice_list[-].subscription) "name as 'sub'"; - variant (choice.choice_list[-].pollingChannel) "name as 'pch'"; - variant (choice.choice_list[-].schedule) "name as 'sch'"; - - // long->short conversion JSON - //variant (resourceName) "JSON:name as rn"; - variant (resourceType) "JSON:name as ty"; - variant (resourceID) "JSON:name as ri"; - variant (parentID) "JSON:name as pi"; - variant (creationTime) "JSON:name as ct"; - variant (lastModifiedTime) "JSON:name as lt"; - variant (labels) "JSON:name as lbl"; - variant (accessControlPolicyIDs) "JSON:name as acpi"; - variant (expirationTime) "JSON:name as et"; - variant (dynamicAuthorizationConsultationIDs) "JSON:name as daci"; - variant (announceTo) "JSON:name as at"; - variant (announcedAttribute) "JSON:name as aa"; - variant (appName) "JSON:name as apn"; - variant (app_ID) "JSON:name as api"; - variant (aE_ID) "JSON:name as aei"; - variant (pointOfAccess) "JSON:name as poa"; - variant (ontologyRef) "JSON:name as or"; - variant (nodeLink) "JSON:name as nl"; - variant (requestReachability) "JSON:name as rr"; - variant (contentSerialization) "JSON:name as csz"; - variant (e2eSecInfo) "JSON:name as esi"; - variant (choice.childResource_list) "JSON:name as cr"; - variant (choice.choice_list[-].container) "JSON:name as cnt"; - variant (choice.choice_list[-].group_) "JSON:name as grp"; - variant (choice.choice_list[-].accessControlPolicy) "JSON:name as acp"; - variant (choice.choice_list[-].subscription) "JSON:name as sub"; - variant (choice.choice_list[-].pollingChannel) "JSON:name as pch"; - variant (choice.choice_list[-].schedule) "JSON:name as sch"; - }; - - type record AccessControlPolicy_optional - { - XSD.NCName resourceName optional, - ResourceType resourceType optional, - XSD.ID resourceID optional, - NhURI parentID optional, - Timestamp creationTime optional, - Timestamp lastModifiedTime optional, - Labels labels optional, - Timestamp expirationTime optional, - ListOfURIs announceTo optional, - record length(1 .. infinity) of XSD.NCName announcedAttribute optional, - SetOfAcrs privileges optional, - SetOfAcrs selfPrivileges optional, - union { - record length(1 .. infinity) of ChildResourceRef childResource_list, - record length(1 .. infinity) of Subscription subscription_list - } choice optional + encode "" } - with { - variant "name as uncapitalized"; - variant "element"; - variant (resourceName) "attribute"; - variant (announcedAttribute) "list"; - variant (choice) "untagged"; - variant (choice.childResource_list) "untagged"; - variant (choice.childResource_list[-]) "name as 'childResource'"; - variant (choice.subscription_list) "untagged"; - variant (choice.subscription_list[-]) "name as 'subscription'"; - }; - type record AccessControlPolicyAnnc_optional - { - ResourceName resourceName optional, - ResourceType resourceType optional, - XSD.ID resourceID optional, - NhURI parentID optional, - Timestamp creationTime optional, - Timestamp lastModifiedTime optional, - Labels labels optional, - Timestamp expirationTime optional, - XSD.AnyURI link optional, - SetOfAcrs privileges optional, - SetOfAcrs selfPrivileges optional, + /** + * @desc Type for the oneM2M primitives exchange + * @member primitive oneM2M primitive + */ + type record MsgIn { union { - record length(1 .. infinity) of ChildResourceRef childResource_list, - record length(1 .. infinity) of Subscription subscription_list - } choice optional + RequestPrimitive requestPrimitive, + ResponsePrimitive responsePrimitive + } primitive } with { - variant "name as uncapitalized"; - variant "element"; - variant (resourceName) "attribute"; - variant (choice) "untagged"; - variant (choice.childResource_list) "untagged"; - variant (choice.childResource_list[-]) "name as 'childResource'"; - variant (choice.subscription_list) "untagged"; - variant (choice.subscription_list[-]) "name as 'subscription'"; - }; + encode "" + } - - - type record ContentInstance_optional - { - XSD.NCName resourceName optional, - ResourceType resourceType optional, - XSD.ID resourceID optional, - NhURI parentID optional, - Timestamp creationTime optional, - Timestamp lastModifiedTime optional, - Labels labels optional, - Timestamp expirationTime optional, - ListOfURIs announceTo optional, - record length(1 .. infinity) of XSD.NCName announcedAttribute optional, - XSD.NonNegativeInteger stateTag optional, - XSD.ID creator optional, - ContentInfo contentInfo optional, - XSD.NonNegativeInteger contentSize optional, - ContentRef contentRef optional, - XSD.AnyURI ontologyRef optional, - XSD.AnyType content optional, - union { - record length(1 .. infinity) of ChildResourceRef childResource_list, - record length(1 .. infinity) of SemanticDescriptor semanticDescriptor_list - } choice optional + type record AcRequestPrimitive { + charstring event, + anytype data } with { - variant "name as uncapitalized"; - variant "element"; - variant (resourceName) "attribute"; - variant (announcedAttribute) "list"; - }; - - type record Container_optional - { - XSD.NCName resourceName optional, - ResourceType resourceType optional, - XSD.ID resourceID optional, - NhURI parentID optional, - Timestamp creationTime optional, - Timestamp lastModifiedTime optional, - Labels labels optional, - AcpType accessControlPolicyIDs optional, - Timestamp expirationTime optional, - ListOfURIs dynamicAuthorizationConsultationIDs optional, - ListOfURIs announceTo optional, - record length(1 .. infinity) of XSD.NCName announcedAttribute optional, - XSD.NonNegativeInteger stateTag optional, - XSD.ID creator optional, - XSD.NonNegativeInteger maxNrOfInstances optional, - XSD.NonNegativeInteger maxByteSize optional, - XSD.NonNegativeInteger maxInstanceAge optional, - XSD.NonNegativeInteger currentNrOfInstances optional, - XSD.NonNegativeInteger currentByteSize optional, - XSD.AnyURI locationID optional, - XSD.AnyURI ontologyRef optional, - XSD.Boolean disableRetrieval optional, - union { - record length(1 .. infinity) of ChildResourceRef childResource_list, - record length(1 .. infinity) of union { - ContentInstance contentInstance, - Container container, - Subscription subscription, - SemanticDescriptor semanticDescriptor, - Sg_flexContainerResource_group sg_flexContainerResource - } choice_list - } choice optional + encode "adapter"; } - with { - variant "name as uncapitalized"; - variant "element"; - variant (resourceName) "attribute"; - variant (announcedAttribute) "list"; - variant (choice) "untagged"; - variant (choice.childResource_list) "untagged"; - variant (choice.childResource_list[-]) "name as 'childResource'"; - variant (choice.choice_list) "untagged"; - variant (choice.choice_list[-]) "untagged"; - }; - - type record ContainerAnnc_optional - { - ResourceName resourceName optional, - ResourceType resourceType optional, - XSD.ID resourceID optional, - NhURI parentID optional, - Timestamp creationTime optional, - Timestamp lastModifiedTime optional, - Labels labels optional, - AcpType accessControlPolicyIDs optional, - Timestamp expirationTime optional, - XSD.AnyURI link optional, - ListOfURIs dynamicAuthorizationConsultationIDs optional, - XSD.NonNegativeInteger stateTag optional, - XSD.NonNegativeInteger maxNrOfInstances optional, - XSD.NonNegativeInteger maxByteSize optional, - XSD.NonNegativeInteger maxInstanceAge optional, - XSD.NonNegativeInteger currentNrOfInstances optional, - XSD.NonNegativeInteger currentByteSize optional, - XSD.AnyURI locationID optional, - XSD.AnyURI ontologyRef optional, - XSD.Boolean disableRetrieval optional, - union { - record length(1 .. infinity) of ChildResourceRef childResource_list, - record length(1 .. infinity) of union { - ContentInstance contentInstance, - ContentInstanceAnnc contentInstanceAnnc, - Container container, - ContainerAnnc containerAnnc, - Subscription subscription, - SemanticDescriptor semanticDescriptor, - SemanticDescriptorAnnc semanticDescriptorAnnc, - Sg_flexContainerResource_group sg_flexContainerResource, - Sg_announcedFlexContainerResource_group sg_announcedFlexContainerResource - } choice_list - } choice optional - } - with { - variant "name as uncapitalized"; - variant "element"; - variant (resourceName) "attribute"; - //variant (disableRetrieval) "text 'true' as '1'"; - //variant (disableRetrieval) "text 'false' as '0'"; - variant (choice) "untagged"; - variant (choice.childResource_list) "untagged"; - variant (choice.childResource_list[-]) "name as 'childResource'"; - variant (choice.choice_list) "untagged"; - variant (choice.choice_list[-]) "untagged"; - }; - - - type record FlexContainer_optional - { - ResourceName resourceName optional, - ResourceType resourceType optional, - XSD.ID resourceID optional, - NhURI parentID optional, - Timestamp creationTime optional, - Timestamp lastModifiedTime optional, - Labels labels optional, - AcpType accessControlPolicyIDs optional, - Timestamp expirationTime optional, - ListOfURIs dynamicAuthorizationConsultationIDs optional, - ListOfURIs announceTo optional, - ListOfNCNames announcedAttribute optional, - XSD.NonNegativeInteger stateTag optional, - XSD.ID creator optional, - XSD.AnyURI containerDefinition optional, - XSD.AnyURI ontologyRef optional - } - with { - variant "name as uncapitalized"; - variant (resourceName) "attribute"; - }; - - type record ContentInstanceAnnc_optional - { - ResourceName resourceName optional, - ResourceType resourceType optional, - XSD.ID resourceID optional, - NhURI parentID optional, - Timestamp creationTime optional, - Timestamp lastModifiedTime optional, - Labels labels optional, - Timestamp expirationTime optional, - XSD.AnyURI link optional, - XSD.NonNegativeInteger stateTag optional, - ContentInfo contentInfo optional, - XSD.NonNegativeInteger contentSize optional, - XSD.AnyURI ontologyRef optional, - XSD.AnyType content optional, - union { - record length(1 .. infinity) of ChildResourceRef childResource_list, - record length(1 .. infinity) of SemanticDescriptor semanticDescriptor_list - } choice optional - } - with { - variant "name as uncapitalized"; - variant "element"; - variant (resourceName) "attribute"; - variant (choice) "untagged"; - variant (choice.childResource_list) "untagged"; - variant (choice.childResource_list[-]) "name as 'childResource'"; - variant (choice.semanticDescriptor_list) "untagged"; - variant (choice.semanticDescriptor_list[-]) "name as 'semanticDescriptor'"; - }; - - //added by @Naum - type record CSEBase_optional - { - XSD.NCName resourceName optional, - ResourceType resourceType optional, - XSD.ID resourceID optional, - NhURI parentID optional, - Timestamp creationTime optional, - Timestamp lastModifiedTime optional, - Labels labels optional, - AcpType accessControlPolicyIDs optional, - CseTypeID cseType optional, - XSD.ID cSE_ID optional, - record of ResourceType supportedResourceType optional, - PoaList pointOfAccess optional, - XSD.AnyURI nodeLink optional, - E2eSecInfo e2eSecInfo optional, - union { - record length(1 .. infinity) of ChildResourceRef childResource_list, - record length(1 .. infinity) of union { - RemoteCSE remoteCSE, - RemoteCSEAnnc remoteCSEAnnc, - Node node, - AE aE, - Container container, - Group group_, - AccessControlPolicy accessControlPolicy, - Subscription subscription, - MgmtCmd mgmtCmd, - LocationPolicy locationPolicy, - StatsConfig statsConfig, - StatsCollect statsCollect, - Request request, - Delivery delivery, - Schedule schedule, - M2mServiceSubscriptionProfile m2mServiceSubscriptionProfile, - ServiceSubscribedAppRule serviceSubscribedAppRule, - Role role, - XSD.Token token, - Sg_flexContainerResource_group sg_flexContainerResource - } choice_list - } choice optional + type record AcResponsePrimitive { + charstring event, + anytype data } with { - variant "element"; - variant (resourceName) "attribute"; - variant (cSE_ID) "name as 'CSE-ID'"; - variant (supportedResourceType) "list"; - variant (choice) "untagged"; - variant (choice.childResource_list) "untagged"; - variant (choice.childResource_list[-]) "name as 'childResource'"; - variant (choice.choice_list) "untagged"; - variant (choice.choice_list[-]) "untagged"; - variant (choice.choice_list[-].aE) "name as capitalized"; - variant (choice.choice_list[-].group_) "name as 'group'"; - }; - - - type record Group_optional - { - XSD.NCName resourceName optional, - ResourceType resourceType optional, - XSD.ID resourceID optional, - NhURI parentID optional, - Timestamp creationTime optional, - Timestamp lastModifiedTime optional, - Labels labels optional, - AcpType accessControlPolicyIDs optional, - Timestamp expirationTime optional, - ListOfURIs dynamicAuthorizationConsultationIDs optional, - ListOfURIs announceTo optional, - record length(1 .. infinity) of XSD.NCName announcedAttribute optional, - XSD.ID creator optional, - MemberType memberType optional, - XSD.PositiveInteger currentNrOfMembers optional, - XSD.PositiveInteger maxNrOfMembers optional, - ListOfURIs memberIDs optional, - ListOfURIs membersAccessControlPolicyIDs optional, - XSD.Boolean memberTypeValidated optional, - ConsistencyStrategy consistencyStrategy optional, - XSD.String groupName optional, - union { - record length(1 .. infinity) of ChildResourceRef childResource_list, - record length(1 .. infinity) of union { - Subscription subscription, - SemanticDescriptor semanticDescriptor - } choice_list - } choice optional + encode "adapter"; } - with { - variant "name as uncapitalized"; - variant "element"; - variant (resourceName) "attribute"; - variant (announcedAttribute) "list"; - //variant (memberTypeValidated) "text 'true' as '1'"; - //variant (memberTypeValidated) "text 'false' as '0'"; - variant (choice) "untagged"; - variant (choice.childResource_list) "untagged"; - variant (choice.choice_list) "untagged"; - variant (choice.childResource_list[-]) "name as 'childResource'"; - variant (choice.choice_list[-]) "name as 'choice'"; - variant (choice.choice_list[-].subscription) "name as 'subscription'"; - variant (choice.choice_list[-].semanticDescriptor) "name as 'semanticDescriptor'"; - }; - type record LocationPolicyAnnc_optional - { - ResourceName resourceName optional, - ResourceType resourceType optional, - XSD.ID resourceID optional, - NhURI parentID optional, - Timestamp creationTime optional, - Timestamp lastModifiedTime optional, - Labels labels optional, - AcpType accessControlPolicyIDs optional, - Timestamp expirationTime optional, - XSD.AnyURI link optional, - ListOfURIs dynamicAuthorizationConsultationIDs optional, - LocationSource locationSource optional, - ListOfDuration locationUpdatePeriod optional, - NodeID locationTargetID optional, - XSD.AnyURI locationServer optional, - XSD.AnyURI locationContainerID optional, - XSD.String locationContainerName optional, - XSD.String locationStatus optional - } - with { - variant "name as uncapitalized"; - variant "element"; - variant (resourceName) "attribute"; + type record AttributeAux { + XSD.NCName name, + charstring value_ optional }; - type record MgmtObj_optional //MgmtResource - { - ResourceName resourceName optional, - ResourceType resourceType optional, - XSD.ID resourceID optional, - NhURI parentID optional, - Timestamp creationTime optional, - Timestamp lastModifiedTime optional, - Labels labels optional, - AcpType accessControlPolicyIDs optional, - Timestamp expirationTime optional, - ListOfURIs dynamicAuthorizationConsultationIDs optional, - ListOfURIs announceTo optional, - record length(1 .. infinity) of XSD.NCName announcedAttribute optional, - MgmtDefinition mgmtDefinition optional, - ListOfURIs objectIDs optional, - ListOfURIs objectPaths optional, - XSD.String description optional - } - with { - variant "name as uncapitalized"; - variant (resourceName) "attribute"; - variant (announcedAttribute) "list"; - }; + type record of AttributeAux AttributeAux_list; + +/* ********************************** +* oneM2M Resource primitives +* *********************************** +*/ - type record MgmtObjAnnc_optional//AnnouncedMgmtResource - { - ResourceName resourceName optional, - ResourceType resourceType optional, - XSD.ID resourceID optional, - NhURI parentID optional, - Timestamp creationTime optional, - Timestamp lastModifiedTime optional, - Labels labels optional, - AcpType accessControlPolicyIDs optional, - Timestamp expirationTime optional, - XSD.AnyURI link optional, - ListOfURIs dynamicAuthorizationConsultationIDs optional, - MgmtDefinition mgmtDefinition optional, - ListOfURIs objectIDs optional, - ListOfURIs objectPaths optional, - XSD.String description optional - } - with { - variant "name as uncapitalized"; - variant (resourceName) "attribute"; - }; + +/* Additional types */ + +group OptionalResourceTypes { - type record Node_optional - { - ResourceName resourceName optional, - ResourceType resourceType optional, - XSD.ID resourceID optional, - NhURI parentID optional, - Timestamp creationTime optional, - Timestamp lastModifiedTime optional, - Labels labels optional, - AcpType accessControlPolicyIDs optional, - Timestamp expirationTime optional, - ListOfURIs dynamicAuthorizationConsultationIDs optional, - ListOfURIs announceTo optional, - record length(1 .. infinity) of XSD.NCName announcedAttribute optional, - NodeID nodeID optional, - XSD.ID hostedCSELink optional, - union { - record length(1 .. infinity) of ChildResourceRef childResource_list, - record length(1 .. infinity) of union { - Memory memory, - Battery battery, - AreaNwkInfo areaNwkInfo, - AreaNwkDeviceInfo areaNwkDeviceInfo, - Firmware firmware, - Software software, - DeviceInfo deviceInfo, - DeviceCapability deviceCapability, - Reboot reboot, - EventLog eventLog, - CmdhPolicy cmdhPolicy, - ActiveCmdhPolicy activeCmdhPolicy, - Subscription subscription, - SemanticDescriptor semanticDescriptor, - TrafficPattern trafficPattern - } choice_list - } choice optional - } - with { - variant "name as uncapitalized"; - variant "element"; - variant (resourceName) "attribute"; - variant (announcedAttribute) "list"; - variant (choice) "untagged"; - variant (choice.childResource_list) "untagged"; - variant (choice.childResource_list[-]) "name as 'childResource'"; - variant (choice.choice_list) "untagged"; - variant (choice.choice_list[-]) "untagged"; - }; + type record AccessControlPolicy_optional +{ + ResourceName resourceName optional, + ResourceType resourceType optional, + XSD.ID resourceID optional, + NhURI parentID optional, + Timestamp creationTime optional, + Timestamp lastModifiedTime optional, + Labels labels optional, + Timestamp expirationTime optional, + ListOfURIs announceTo optional, + record length(1 .. infinity) of XSD.NCName announcedAttribute optional, + SetOfAcrs privileges optional, + SetOfAcrs selfPrivileges optional, + union { + record length(1 .. infinity) of ChildResourceRef childResource_list, + record length(1 .. infinity) of Subscription subscription_list + } choice optional +} +with { + variant "name as uncapitalized"; + variant "element"; + variant (resourceName) "attribute"; + variant (announcedAttribute) "list"; + variant (choice) "untagged"; + variant (choice.childResource_list) "untagged"; + variant (choice.childResource_list[-]) "name as 'childResource'"; + variant (choice.subscription_list) "untagged"; + variant (choice.subscription_list[-]) "name as 'subscription'"; +}; + +type record AccessControlPolicyAnnc_optional +{ + ResourceName resourceName optional, + ResourceType resourceType optional, + XSD.ID resourceID optional, + NhURI parentID optional, + Timestamp creationTime optional, + Timestamp lastModifiedTime optional, + Labels labels optional, + Timestamp expirationTime optional, + XSD.AnyURI link optional, + SetOfAcrs privileges optional, + SetOfAcrs selfPrivileges optional, + union { + record length(1 .. infinity) of ChildResourceRef childResource_list, + record length(1 .. infinity) of Subscription subscription_list + } choice optional +} +with { + variant "name as uncapitalized"; + variant "element"; + variant (resourceName) "attribute"; + variant (choice) "untagged"; + variant (choice.childResource_list) "untagged"; + variant (choice.childResource_list[-]) "name as 'childResource'"; + variant (choice.subscription_list) "untagged"; + variant (choice.subscription_list[-]) "name as 'subscription'"; +}; + +type record AE_optional +{ + ResourceName resourceName optional, + ResourceType resourceType optional, + XSD.ID resourceID optional, + NhURI parentID optional, + Timestamp creationTime optional, + Timestamp lastModifiedTime optional, + Labels labels optional, + AcpType accessControlPolicyIDs optional, + Timestamp expirationTime optional, + ListOfURIs dynamicAuthorizationConsultationIDs optional, + ListOfURIs announceTo optional, + record length(1 .. infinity) of XSD.NCName announcedAttribute optional, + XSD.String appName optional, + XSD.String app_ID optional, + XSD.ID aE_ID optional, + PoaList pointOfAccess optional, + XSD.AnyURI ontologyRef optional, + XSD.AnyURI nodeLink optional, + XSD.Boolean requestReachability optional, + Serializations contentSerialization optional, + E2eSecInfo e2eSecInfo optional, + union { + record length(1 .. infinity) of ChildResourceRef childResource_list, + record length(1 .. infinity) of union { + Container container, + Group group_, + AccessControlPolicy accessControlPolicy, + Subscription subscription, + PollingChannel pollingChannel, + Schedule schedule, + SemanticDescriptor semanticDescriptor, + TimeSeries timeSeries, + TrafficPattern trafficPattern, + Sg_flexContainerResource_group sg_flexContainerResource + } choice_list + } choice optional +} +with { + variant "element"; + variant (resourceName) "attribute"; + variant (announcedAttribute) "list"; + variant (app_ID) "name as 'App-ID'"; + variant (aE_ID) "name as 'AE-ID'"; + //variant (requestReachability) "text 'true' as '1'"; + //variant (requestReachability) "text 'false' as '0'"; + variant (choice) "untagged"; + variant (choice.childResource_list) "untagged"; + variant (choice.childResource_list[-]) "name as 'childResource'"; + variant (choice.choice_list) "untagged"; + variant (choice.choice_list[-]) "untagged"; + variant (choice.choice_list[-].group_) "name as 'group'"; +}; + +type record AEAnnc_optional +{ + ResourceName resourceName optional, + ResourceType resourceType optional, + XSD.ID resourceID optional, + NhURI parentID optional, + Timestamp creationTime optional, + Timestamp lastModifiedTime optional, + Labels labels optional, + AcpType accessControlPolicyIDs optional, + Timestamp expirationTime optional, + XSD.AnyURI link optional, + ListOfURIs dynamicAuthorizationConsultationIDs optional, + XSD.String appName optional, + XSD.String app_ID optional, + XSD.ID aE_ID optional, + PoaList pointOfAccess optional, + XSD.AnyURI ontologyRef optional, + XSD.AnyURI nodeLink optional, + XSD.Boolean requestReachability optional, + Serializations contentSerialization optional, + E2eSecInfo e2eSecInfo optional, + union { + record length(1 .. infinity) of ChildResourceRef childResource_list, + record length(1 .. infinity) of union { + Container container, + ContainerAnnc containerAnnc, + Group group_, + GroupAnnc groupAnnc, + AccessControlPolicy accessControlPolicy, + AccessControlPolicyAnnc accessControlPolicyAnnc, + Subscription subscription, + ScheduleAnnc scheduleAnnc, + SemanticDescriptor semanticDescriptor, + TimeSeries timeSeries, + TimeSeriesAnnc timeSeriesAnnc, + TrafficPatternAnnc trafficPatternAnnc, + Sg_flexContainerResource_group sg_flexContainerResource, + Sg_announcedFlexContainerResource_group sg_announcedFlexContainerResource + } choice_list + } choice optional +} +with { + variant "element"; + variant (resourceName) "attribute"; + variant (app_ID) "name as 'App-ID'"; + variant (aE_ID) "name as 'AE-ID'"; + //variant (requestReachability) "text 'true' as '1'"; + //variant (requestReachability) "text 'false' as '0'"; + variant (choice) "untagged"; + variant (choice.childResource_list) "untagged"; + variant (choice.childResource_list[-]) "name as 'childResource'"; + variant (choice.choice_list) "untagged"; + variant (choice.choice_list[-]) "untagged"; + variant (choice.choice_list[-].group_) "name as 'group'"; +}; + +type record MgmtResource_optional +{ + ResourceName resourceName optional, + ResourceType resourceType optional, + XSD.ID resourceID optional, + NhURI parentID optional, + Timestamp creationTime optional, + Timestamp lastModifiedTime optional, + Labels labels optional, + AcpType accessControlPolicyIDs optional, + Timestamp expirationTime optional, + ListOfURIs dynamicAuthorizationConsultationIDs optional, + ListOfURIs announceTo optional, + record length(1 .. infinity) of XSD.NCName announcedAttribute optional, + MgmtDefinition mgmtDefinition optional, + ListOfURIs objectIDs optional, + ListOfURIs objectPaths optional, + XSD.String description optional +} +with { + variant "name as uncapitalized"; + variant (resourceName) "attribute"; + variant (announcedAttribute) "list"; +}; + +type record AnnouncedMgmtResource_optional +{ + ResourceName resourceName optional, + ResourceType resourceType optional, + XSD.ID resourceID optional, + NhURI parentID optional, + Timestamp creationTime optional, + Timestamp lastModifiedTime optional, + Labels labels optional, + AcpType accessControlPolicyIDs optional, + Timestamp expirationTime optional, + XSD.AnyURI link optional, + ListOfURIs dynamicAuthorizationConsultationIDs optional, + MgmtDefinition mgmtDefinition optional, + ListOfURIs objectIDs optional, + ListOfURIs objectPaths optional, + XSD.String description optional +} +with { + variant "name as uncapitalized"; + variant (resourceName) "attribute"; +}; + +type record FlexContainerResource_optional +{ + ResourceName resourceName optional, + ResourceType resourceType optional, + XSD.ID resourceID optional, + NhURI parentID optional, + Timestamp creationTime optional, + Timestamp lastModifiedTime optional, + Labels labels optional, + AcpType accessControlPolicyIDs optional, + Timestamp expirationTime optional, + ListOfURIs dynamicAuthorizationConsultationIDs optional, + ListOfURIs announceTo optional, + ListOfNCNames announcedAttribute optional, + XSD.NonNegativeInteger stateTag optional, + XSD.ID creator optional, + XSD.AnyURI containerDefinition optional, + XSD.AnyURI ontologyRef optional +} +with { + variant "name as uncapitalized"; + variant (resourceName) "attribute"; +}; + +type record AnnouncedFlexContainerResource_optional +{ + ResourceName resourceName optional, + ResourceType resourceType optional, + XSD.ID resourceID optional, + NhURI parentID optional, + Timestamp creationTime optional, + Timestamp lastModifiedTime optional, + Labels labels optional, + AcpType accessControlPolicyIDs optional, + Timestamp expirationTime optional, + XSD.AnyURI link optional, + ListOfURIs dynamicAuthorizationConsultationIDs optional, + XSD.NonNegativeInteger stateTag optional, + XSD.AnyURI containerDefinition optional, + XSD.AnyURI ontologyRef optional +} +with { + variant "name as uncapitalized"; + variant (resourceName) "attribute"; +}; + +type record Container_optional +{ + ResourceName resourceName optional, + ResourceType resourceType optional, + XSD.ID resourceID optional, + NhURI parentID optional, + Timestamp creationTime optional, + Timestamp lastModifiedTime optional, + Labels labels optional, + AcpType accessControlPolicyIDs optional, + Timestamp expirationTime optional, + ListOfURIs dynamicAuthorizationConsultationIDs optional, + ListOfURIs announceTo optional, + record length(1 .. infinity) of XSD.NCName announcedAttribute optional, + XSD.NonNegativeInteger stateTag optional, + XSD.ID creator optional, + XSD.NonNegativeInteger maxNrOfInstances optional, + XSD.NonNegativeInteger maxByteSize optional, + XSD.NonNegativeInteger maxInstanceAge optional, + XSD.NonNegativeInteger currentNrOfInstances optional, + XSD.NonNegativeInteger currentByteSize optional, + XSD.AnyURI locationID optional, + XSD.AnyURI ontologyRef optional, + XSD.Boolean disableRetrieval optional, + union { + record length(1 .. infinity) of ChildResourceRef childResource_list, + record length(1 .. infinity) of union { + ContentInstance contentInstance, + Container container, + Subscription subscription, + SemanticDescriptor semanticDescriptor, + Sg_flexContainerResource_group sg_flexContainerResource + } choice_list + } choice optional +} +with { + variant "name as uncapitalized"; + variant "element"; + variant (resourceName) "attribute"; + variant (announcedAttribute) "list"; + //variant (disableRetrieval) "text 'true' as '1'"; + //variant (disableRetrieval) "text 'false' as '0'"; + variant (choice) "untagged"; + variant (choice.childResource_list) "untagged"; + variant (choice.childResource_list[-]) "name as 'childResource'"; + variant (choice.choice_list) "untagged"; + variant (choice.choice_list[-]) "untagged"; +}; + +type record ContainerAnnc_optional +{ + ResourceName resourceName optional, + ResourceType resourceType optional, + XSD.ID resourceID optional, + NhURI parentID optional, + Timestamp creationTime optional, + Timestamp lastModifiedTime optional, + Labels labels optional, + AcpType accessControlPolicyIDs optional, + Timestamp expirationTime optional, + XSD.AnyURI link optional, + ListOfURIs dynamicAuthorizationConsultationIDs optional, + XSD.NonNegativeInteger stateTag optional, + XSD.NonNegativeInteger maxNrOfInstances optional, + XSD.NonNegativeInteger maxByteSize optional, + XSD.NonNegativeInteger maxInstanceAge optional, + XSD.NonNegativeInteger currentNrOfInstances optional, + XSD.NonNegativeInteger currentByteSize optional, + XSD.AnyURI locationID optional, + XSD.AnyURI ontologyRef optional, + XSD.Boolean disableRetrieval optional, + union { + record length(1 .. infinity) of ChildResourceRef childResource_list, + record length(1 .. infinity) of union { + ContentInstance contentInstance, + ContentInstanceAnnc contentInstanceAnnc, + Container container, + ContainerAnnc containerAnnc, + Subscription subscription, + SemanticDescriptor semanticDescriptor, + SemanticDescriptorAnnc semanticDescriptorAnnc, + Sg_flexContainerResource_group sg_flexContainerResource, + Sg_announcedFlexContainerResource_group sg_announcedFlexContainerResource + } choice_list + } choice optional +} +with { + variant "name as uncapitalized"; + variant "element"; + variant (resourceName) "attribute"; + //variant (disableRetrieval) "text 'true' as '1'"; + //variant (disableRetrieval) "text 'false' as '0'"; + variant (choice) "untagged"; + variant (choice.childResource_list) "untagged"; + variant (choice.childResource_list[-]) "name as 'childResource'"; + variant (choice.choice_list) "untagged"; + variant (choice.choice_list[-]) "untagged"; +}; + +type record ContentInstance_optional +{ + ResourceName resourceName optional, + ResourceType resourceType optional, + XSD.ID resourceID optional, + NhURI parentID optional, + Timestamp creationTime optional, + Timestamp lastModifiedTime optional, + Labels labels optional, + Timestamp expirationTime optional, + ListOfURIs announceTo optional, + record length(1 .. infinity) of XSD.NCName announcedAttribute optional, + XSD.NonNegativeInteger stateTag optional, + XSD.ID creator optional, + ContentInfo contentInfo optional, + XSD.NonNegativeInteger contentSize optional, + ContentRef contentRef optional, + XSD.AnyURI ontologyRef optional, + XSD.AnySimpleType content optional, + union { + record length(1 .. infinity) of ChildResourceRef childResource_list, + record length(1 .. infinity) of SemanticDescriptor semanticDescriptor_list + } choice optional +} +with { + variant "name as uncapitalized"; + variant "element"; + variant (resourceName) "attribute"; + variant (announcedAttribute) "list"; + variant (choice) "untagged"; + variant (choice.childResource_list) "untagged"; + variant (choice.childResource_list[-]) "name as 'childResource'"; + variant (choice.semanticDescriptor_list) "untagged"; + variant (choice.semanticDescriptor_list[-]) "name as 'semanticDescriptor'"; +}; + +type record ContentInstanceAnnc_optional +{ + ResourceName resourceName optional, + ResourceType resourceType optional, + XSD.ID resourceID optional, + NhURI parentID optional, + Timestamp creationTime optional, + Timestamp lastModifiedTime optional, + Labels labels optional, + Timestamp expirationTime optional, + XSD.AnyURI link optional, + XSD.NonNegativeInteger stateTag optional, + ContentInfo contentInfo optional, + XSD.NonNegativeInteger contentSize optional, + XSD.AnyURI ontologyRef optional, + XSD.AnySimpleType content optional, + union { + record length(1 .. infinity) of ChildResourceRef childResource_list, + record length(1 .. infinity) of SemanticDescriptor semanticDescriptor_list + } choice optional +} +with { + variant "name as uncapitalized"; + variant "element"; + variant (resourceName) "attribute"; + variant (choice) "untagged"; + variant (choice.childResource_list) "untagged"; + variant (choice.childResource_list[-]) "name as 'childResource'"; + variant (choice.semanticDescriptor_list) "untagged"; + variant (choice.semanticDescriptor_list[-]) "name as 'semanticDescriptor'"; +}; + +type record CSEBase_optional +{ + ResourceName resourceName optional, + ResourceType resourceType optional, + XSD.ID resourceID optional, + NhURI parentID optional, + Timestamp creationTime optional, + Timestamp lastModifiedTime optional, + Labels labels optional, + AcpType accessControlPolicyIDs optional, + CseTypeID cseType optional, + XSD.ID cSE_ID optional, + record of ResourceType supportedResourceType optional, + PoaList pointOfAccess optional, + XSD.AnyURI nodeLink optional, + E2eSecInfo e2eSecInfo optional, + union { + record length(1 .. infinity) of ChildResourceRef childResource_list, + record length(1 .. infinity) of union { + RemoteCSE remoteCSE, + RemoteCSEAnnc remoteCSEAnnc, + Node node, + AE aE, + Container container, + Group group_, + AccessControlPolicy accessControlPolicy, + Subscription subscription, + MgmtCmd mgmtCmd, + LocationPolicy locationPolicy, + StatsConfig statsConfig, + StatsCollect statsCollect, + Request request, + Delivery delivery, + Schedule schedule, + M2mServiceSubscriptionProfile m2mServiceSubscriptionProfile, + ServiceSubscribedAppRule serviceSubscribedAppRule, + Role role, + XSD.Token token, + Sg_flexContainerResource_group sg_flexContainerResource + } choice_list + } choice optional +} +with { + variant "element"; + variant (resourceName) "attribute"; + variant (cSE_ID) "name as 'CSE-ID'"; + variant (supportedResourceType) "list"; + variant (choice) "untagged"; + variant (choice.childResource_list) "untagged"; + variant (choice.childResource_list[-]) "name as 'childResource'"; + variant (choice.choice_list) "untagged"; + variant (choice.choice_list[-]) "untagged"; + variant (choice.choice_list[-].aE) "name as capitalized"; + variant (choice.choice_list[-].group_) "name as 'group'"; +}; + +type record GenericInterworkingOperationInstance_optional +{ + ResourceName resourceName optional, + ResourceType resourceType optional, + XSD.ID resourceID optional, + NhURI parentID optional, + Timestamp creationTime optional, + Timestamp lastModifiedTime optional, + Labels labels optional, + AcpType accessControlPolicyIDs optional, + Timestamp expirationTime optional, + ListOfURIs dynamicAuthorizationConsultationIDs optional, + ListOfURIs announceTo optional, + ListOfNCNames announcedAttribute optional, + XSD.NonNegativeInteger stateTag optional, + XSD.ID creator optional, + XSD.AnyURI containerDefinition optional, + XSD.AnyURI ontologyRef optional, + XSD.String operationName optional, + XSD.String operationState optional, + ListOfDataLinks inputDataPointLinks optional, + ListOfDataLinks outputDataPointLinks optional, + ListOfDataLinks inputLinks optional, + ListOfDataLinks outputLinks optional, + union { + record length(1 .. infinity) of ChildResourceRef childResource_list, + record length(1 .. infinity) of union { + SemanticDescriptor semanticDescriptor, + Subscription subscription + } choice_list + } choice optional +} +with { + variant "name as uncapitalized"; + variant "element"; + variant (resourceName) "attribute"; + variant (choice) "untagged"; + variant (choice.childResource_list) "untagged"; + variant (choice.childResource_list[-]) "name as 'childResource'"; + variant (choice.choice_list) "untagged"; + variant (choice.choice_list[-]) "untagged"; +}; + +type record Group_optional +{ + ResourceName resourceName optional, + ResourceType resourceType optional, + XSD.ID resourceID optional, + NhURI parentID optional, + Timestamp creationTime optional, + Timestamp lastModifiedTime optional, + Labels labels optional, + AcpType accessControlPolicyIDs optional, + Timestamp expirationTime optional, + ListOfURIs dynamicAuthorizationConsultationIDs optional, + ListOfURIs announceTo optional, + record length(1 .. infinity) of XSD.NCName announcedAttribute optional, + XSD.ID creator optional, + MemberType memberType optional, + XSD.NonNegativeInteger currentNrOfMembers optional, + XSD.PositiveInteger maxNrOfMembers optional, + ListOfURIs memberIDs optional, + ListOfURIs membersAccessControlPolicyIDs optional, + XSD.Boolean memberTypeValidated optional, + ConsistencyStrategy consistencyStrategy optional, + XSD.String groupName optional, + XSD.Boolean semanticSupportIndicator optional, + union { + record length(1 .. infinity) of ChildResourceRef childResource_list, + record length(1 .. infinity) of union { + Subscription subscription, + SemanticDescriptor semanticDescriptor + } choice_list + } choice optional +} +with { + variant "name as uncapitalized"; + variant "element"; + variant (resourceName) "attribute"; + variant (announcedAttribute) "list"; + //variant (memberTypeValidated) "text 'true' as '1'"; + //variant (memberTypeValidated) "text 'false' as '0'"; + //variant (semanticSupportIndicator) "text 'true' as '1'"; + //variant (semanticSupportIndicator) "text 'false' as '0'"; + variant (choice) "untagged"; + variant (choice.childResource_list) "untagged"; + variant (choice.childResource_list[-]) "name as 'childResource'"; + variant (choice.choice_list) "untagged"; + variant (choice.choice_list[-]) "untagged"; +}; + +type record GroupAnnc_optional +{ + ResourceName resourceName optional, + ResourceType resourceType optional, + XSD.ID resourceID optional, + NhURI parentID optional, + Timestamp creationTime optional, + Timestamp lastModifiedTime optional, + Labels labels optional, + AcpType accessControlPolicyIDs optional, + Timestamp expirationTime optional, + XSD.AnyURI link optional, + ListOfURIs dynamicAuthorizationConsultationIDs optional, + MemberType memberType optional, + XSD.NonNegativeInteger currentNrOfMembers optional, + XSD.PositiveInteger maxNrOfMembers optional, + record of XSD.AnyURI memberIDs optional, + ListOfURIs membersAccessControlPolicyIDs optional, + XSD.Boolean memberTypeValidated optional, + ConsistencyStrategy consistencyStrategy optional, + XSD.String groupName optional, + XSD.Boolean semanticSupportIndicator optional, + union { + record length(1 .. infinity) of ChildResourceRef childResource_list, + record length(1 .. infinity) of union { + Subscription subscription, + SemanticDescriptor semanticDescriptor, + SemanticDescriptorAnnc semanticDescriptorAnnc + } choice_list + } choice optional +} +with { + variant "name as uncapitalized"; + variant "element"; + variant (resourceName) "attribute"; + variant (memberIDs) "list"; + //variant (memberTypeValidated) "text 'true' as '1'"; + //variant (memberTypeValidated) "text 'false' as '0'"; + //variant (semanticSupportIndicator) "text 'true' as '1'"; + //variant (semanticSupportIndicator) "text 'false' as '0'"; + variant (choice) "untagged"; + variant (choice.childResource_list) "untagged"; + variant (choice.childResource_list[-]) "name as 'childResource'"; + variant (choice.choice_list) "untagged"; + variant (choice.choice_list[-]) "untagged"; +}; + +type record LocationPolicy_optional +{ + ResourceName resourceName optional, + ResourceType resourceType optional, + XSD.ID resourceID optional, + NhURI parentID optional, + Timestamp creationTime optional, + Timestamp lastModifiedTime optional, + Labels labels optional, + AcpType accessControlPolicyIDs optional, + Timestamp expirationTime optional, + ListOfURIs dynamicAuthorizationConsultationIDs optional, + ListOfURIs announceTo optional, + record length(1 .. infinity) of XSD.NCName announcedAttribute optional, + LocationSource locationSource optional, + ListOfDuration locationUpdatePeriod optional, + NodeID locationTargetID optional, + XSD.AnyURI locationServer optional, + XSD.AnyURI locationContainerID optional, + XSD.String locationContainerName optional, + XSD.String locationStatus optional, + union { + record length(1 .. infinity) of ChildResourceRef childResource_list, + record length(1 .. infinity) of union { + Subscription subscription + } choice_list + } choice optional +} +with { + variant "name as uncapitalized"; + variant "element"; + variant (resourceName) "attribute"; + variant (announcedAttribute) "list"; + variant (choice) "untagged"; + variant (choice.childResource_list) "untagged"; + variant (choice.childResource_list[-]) "name as 'childResource'"; + variant (choice.choice_list) "untagged"; + variant (choice.choice_list[-]) "untagged"; +}; + +type record LocationPolicyAnnc_optional +{ + ResourceName resourceName optional, + ResourceType resourceType optional, + XSD.ID resourceID optional, + NhURI parentID optional, + Timestamp creationTime optional, + Timestamp lastModifiedTime optional, + Labels labels optional, + AcpType accessControlPolicyIDs optional, + Timestamp expirationTime optional, + XSD.AnyURI link optional, + ListOfURIs dynamicAuthorizationConsultationIDs optional, + LocationSource locationSource optional, + ListOfDuration locationUpdatePeriod optional, + NodeID locationTargetID optional, + XSD.AnyURI locationServer optional, + XSD.AnyURI locationContainerID optional, + XSD.String locationContainerName optional, + XSD.String locationStatus optional +} +with { + variant "name as uncapitalized"; + variant "element"; + variant (resourceName) "attribute"; +}; + +type record Node_optional +{ + ResourceName resourceName optional, + ResourceType resourceType optional, + XSD.ID resourceID optional, + NhURI parentID optional, + Timestamp creationTime optional, + Timestamp lastModifiedTime optional, + Labels labels optional, + AcpType accessControlPolicyIDs optional, + Timestamp expirationTime optional, + ListOfURIs dynamicAuthorizationConsultationIDs optional, + ListOfURIs announceTo optional, + record length(1 .. infinity) of XSD.NCName announcedAttribute optional, + NodeID nodeID optional, + XSD.ID hostedCSELink optional, + XSD.String mgmtClientAddress optional, + union { + record length(1 .. infinity) of ChildResourceRef childResource_list, + record length(1 .. infinity) of union { + Memory memory, + Battery battery, + AreaNwkInfo areaNwkInfo, + AreaNwkDeviceInfo areaNwkDeviceInfo, + Firmware firmware, + Software software, + DeviceInfo deviceInfo, + DeviceCapability deviceCapability, + Reboot reboot, + EventLog eventLog, + CmdhPolicy cmdhPolicy, + ActiveCmdhPolicy activeCmdhPolicy, + Subscription subscription, + SemanticDescriptor semanticDescriptor, + TrafficPattern trafficPattern + } choice_list + } choice optional +} +with { + variant "name as uncapitalized"; + variant "element"; + variant (resourceName) "attribute"; + variant (announcedAttribute) "list"; + variant (choice) "untagged"; + variant (choice.childResource_list) "untagged"; + variant (choice.childResource_list[-]) "name as 'childResource'"; + variant (choice.choice_list) "untagged"; + variant (choice.choice_list[-]) "untagged"; +}; + +type record NodeAnnc_optional +{ + ResourceName resourceName optional, + ResourceType resourceType optional, + XSD.ID resourceID optional, + NhURI parentID optional, + Timestamp creationTime optional, + Timestamp lastModifiedTime optional, + Labels labels optional, + AcpType accessControlPolicyIDs optional, + Timestamp expirationTime optional, + XSD.AnyURI link optional, + ListOfURIs dynamicAuthorizationConsultationIDs optional, + NodeID nodeID optional, + XSD.ID hostedCSELink optional, + XSD.String mgmtClientAddress optional, + union { + record length(1 .. infinity) of ChildResourceRef childResource_list, + record length(1 .. infinity) of union { + MemoryAnnc memoryAnnc, + BatteryAnnc batteryAnnc, + AreaNwkInfoAnnc areaNwkInfoAnnc, + AreaNwkDeviceInfoAnnc areaNwkDeviceInfoAnnc, + FirmwareAnnc firmwareAnnc, + SoftwareAnnc softwareAnnc, + DeviceInfoAnnc deviceInfoAnnc, + DeviceCapabilityAnnc deviceCapabilityAnnc, + RebootAnnc rebootAnnc, + EventLogAnnc eventLogAnnc, + Subscription subscription, + SemanticDescriptor semanticDescriptor, + SemanticDescriptorAnnc semanticDescriptorAnnc, + TrafficPatternAnnc trafficPatternAnnc + } choice_list + } choice optional +} +with { + variant "name as uncapitalized"; + variant "element"; + variant (resourceName) "attribute"; + variant (choice) "untagged"; + variant (choice.childResource_list) "untagged"; + variant (choice.childResource_list[-]) "name as 'childResource'"; + variant (choice.choice_list) "untagged"; + variant (choice.choice_list[-]) "untagged"; +}; + +type record PollingChannel_optional +{ + ResourceName resourceName optional, + ResourceType resourceType optional, + XSD.ID resourceID optional, + NhURI parentID optional, + Timestamp creationTime optional, + Timestamp lastModifiedTime optional, + Labels labels optional, + Timestamp expirationTime optional +} +with { + variant "name as uncapitalized"; + variant "element"; + variant (resourceName) "attribute"; +}; +type record Schedule_optional +{ + ResourceName resourceName optional, + ResourceType resourceType optional, + XSD.ID resourceID optional, + NhURI parentID optional, + Timestamp creationTime optional, + Timestamp lastModifiedTime optional, + Labels labels optional, + Timestamp expirationTime optional, + ListOfURIs announceTo optional, + record length(1 .. infinity) of XSD.NCName announcedAttribute optional, + ScheduleEntries scheduleElement optional, + union { + record length(1 .. infinity) of ChildResourceRef childResource_list, + record length(1 .. infinity) of union { + Subscription subscription + } choice_list + } choice optional +} +with { + variant "name as uncapitalized"; + variant "element"; + variant (resourceName) "attribute"; + variant (announcedAttribute) "list"; + variant (choice) "untagged"; + variant (choice.childResource_list) "untagged"; + variant (choice.childResource_list[-]) "name as 'childResource'"; + variant (choice.choice_list) "untagged"; + variant (choice.choice_list[-]) "untagged"; +}; - type record NodeAnnc_optional - { - ResourceName resourceName optional, - ResourceType resourceType optional, - XSD.ID resourceID optional, - NhURI parentID optional, - Timestamp creationTime optional, - Timestamp lastModifiedTime optional, - Labels labels optional, - AcpType accessControlPolicyIDs optional, - Timestamp expirationTime optional, - XSD.AnyURI link optional, - ListOfURIs dynamicAuthorizationConsultationIDs optional, - NodeID nodeID optional, - XSD.ID hostedCSELink optional, - union { - record length(1 .. infinity) of ChildResourceRef childResource_list, - record length(1 .. infinity) of union { - MemoryAnnc memoryAnnc, - BatteryAnnc batteryAnnc, - AreaNwkInfoAnnc areaNwkInfoAnnc, - AreaNwkDeviceInfoAnnc areaNwkDeviceInfoAnnc, - FirmwareAnnc firmwareAnnc, - SoftwareAnnc softwareAnnc, - DeviceInfoAnnc deviceInfoAnnc, - DeviceCapabilityAnnc deviceCapabilityAnnc, - RebootAnnc rebootAnnc, - EventLogAnnc eventLogAnnc, - Subscription subscription, - SemanticDescriptor semanticDescriptor, - SemanticDescriptorAnnc semanticDescriptorAnnc, - TrafficPatternAnnc trafficPatternAnnc - } choice_list - } choice optional - } - with { - variant "name as uncapitalized"; - variant "element"; - variant (resourceName) "attribute"; - variant (choice) "untagged"; - variant (choice.childResource_list) "untagged"; - variant (choice.childResource_list[-]) "name as 'childResource'"; - variant (choice.choice_list) "untagged"; - variant (choice.choice_list[-]) "untagged"; - }; - - type record PollingChannel_optional - { - XSD.NCName resourceName optional, - ResourceType resourceType optional, - XSD.ID resourceID optional, - NhURI parentID optional, - Timestamp creationTime optional, - Timestamp lastModifiedTime optional, - Labels labels optional, - Timestamp expirationTime optional - } - with { - variant "name as uncapitalized"; - variant "element"; - variant (resourceName) "attribute"; - }; - - type record Schedule_optional - { - XSD.NCName resourceName optional, - ResourceType resourceType optional, - XSD.ID resourceID optional, - NhURI parentID optional, - Timestamp creationTime optional, - Timestamp lastModifiedTime optional, - Labels labels optional, - Timestamp expirationTime optional, - ListOfURIs announceTo optional, - record length(1 .. infinity) of XSD.NCName announcedAttribute optional, - ScheduleEntries scheduleElement optional, - union { - record length(1 .. infinity) of ChildResourceRef childResource_list, - record length(1 .. infinity) of union { - Subscription subscription - } choice_list - } choice optional - } - with { - variant "name as uncapitalized"; - variant "element"; - variant (resourceName) "attribute"; - variant (announcedAttribute) "list"; - variant (choice) "untagged"; - variant (choice.childResource_list) "untagged"; - variant (choice.childResource_list[-]) "name as 'childResource'"; - variant (choice.choice_list) "untagged"; - variant (choice.choice_list[-]) "untagged"; - }; - - //Added by @Naum - type record ServiceSubscribedAppRule_optional - { - XSD.NCName resourceName optional, - ResourceType resourceType optional, - XSD.ID resourceID optional, - NhURI parentID optional, - Timestamp creationTime optional, - Timestamp lastModifiedTime optional, - Labels labels optional, - AcpType accessControlPolicyIDs optional, - Timestamp expirationTime optional, - ListOfURIs dynamicAuthorizationConsultationIDs optional, - ListOfM2MID applicableCredIDs optional, - ListOfM2MID allowedApp_IDs optional, - ListOfM2MID allowedAEs optional, - union { - record length(1 .. infinity) of ChildResourceRef childResource_list, - record length(1 .. infinity) of Subscription subscription_list - } choice optional - } - with { - variant "name as uncapitalized"; - variant "element"; - variant (resourceName) "attribute"; - variant (allowedApp_IDs) "name as 'allowedApp-IDs'"; - variant (choice) "untagged"; - variant (choice.childResource_list) "untagged"; - variant (choice.childResource_list[-]) "name as 'childResource'"; - variant (choice.subscription_list) "untagged"; - variant (choice.subscription_list[-]) "name as 'subscription'"; - }; - - type record Subscription_optional - { - XSD.NCName resourceName optional, - ResourceType resourceType optional, - XSD.ID resourceID optional, - NhURI parentID optional, - Timestamp creationTime optional, - Timestamp lastModifiedTime optional, - Labels labels optional, - AcpType accessControlPolicyIDs optional, - Timestamp expirationTime optional, - ListOfURIs dynamicAuthorizationConsultationIDs optional, - XSD.ID creator optional, - EventNotificationCriteria eventNotificationCriteria optional, - XSD.PositiveInteger expirationCounter optional, - ListOfURIs notificationURI optional, - XSD.AnyURI groupID optional, - XSD.AnyURI notificationForwardingURI optional, - BatchNotify batchNotify optional, - RateLimit rateLimit optional, - XSD.PositiveInteger preSubscriptionNotify optional, - PendingNotification pendingNotification optional, - XSD.PositiveInteger notificationStoragePriority optional, - XSD.Boolean latestNotify optional, - NotificationContentType notificationContentType optional, - EventCat notificationEventCat optional, - XSD.AnyURI subscriberURI optional, - union { - record length(1 .. infinity) of ChildResourceRef childResource_list, - record length(1 .. infinity) of union { - Schedule schedule, - NotificationTargetMgmtPolicyRef notificationTargetMgmtPolicyRef - } choice_list - } choice optional - } - with { - variant "name as uncapitalized"; - variant "element"; - variant (resourceName) "attribute"; - //variant (latestNotify) "text 'true' as '1'"; - //variant (latestNotify) "text 'false' as '0'"; - variant (choice) "untagged"; - }; - - type record GroupAnnc_optional - { - ResourceName resourceName optional, - ResourceType resourceType optional, - XSD.ID resourceID optional, - NhURI parentID optional, - Timestamp creationTime optional, - Timestamp lastModifiedTime optional, - Labels labels optional, - AcpType accessControlPolicyIDs optional, - Timestamp expirationTime optional, - XSD.AnyURI link optional, - ListOfURIs dynamicAuthorizationConsultationIDs optional, - MemberType memberType optional, - XSD.NonNegativeInteger currentNrOfMembers optional, - XSD.PositiveInteger maxNrOfMembers optional, - record of XSD.AnyURI memberIDs optional, - ListOfURIs membersAccessControlPolicyIDs optional, - XSD.Boolean memberTypeValidated optional, - ConsistencyStrategy consistencyStrategy optional, - XSD.String groupName optional, - union { - record length(1 .. infinity) of ChildResourceRef childResource_list, - record length(1 .. infinity) of union { - Subscription subscription, - SemanticDescriptor semanticDescriptor, - SemanticDescriptorAnnc semanticDescriptorAnnc - } choice_list - } choice optional - } - with { - variant "name as uncapitalized"; - variant "element"; - variant (resourceName) "attribute"; - variant (memberIDs) "list"; - //variant (memberTypeValidated) "text 'true' as '1'"; - //variant (memberTypeValidated) "text 'false' as '0'"; - variant (choice) "untagged"; - variant (choice.childResource_list) "untagged"; - variant (choice.childResource_list[-]) "name as 'childResource'"; - variant (choice.choice_list) "untagged"; - variant (choice.choice_list[-]) "untagged"; - }; - - //@Martin - type record LocationPolicy_optional - { - XSD.NCName resourceName optional, - ResourceType resourceType optional, - XSD.ID resourceID optional, - NhURI parentID optional, - Timestamp creationTime optional, - Timestamp lastModifiedTime optional, - Labels labels optional, - AcpType accessControlPolicyIDs optional, - Timestamp expirationTime optional, - ListOfURIs dynamicAuthorizationConsultationIDs optional, - ListOfURIs announceTo optional, - record length(1 .. infinity) of XSD.NCName announcedAttribute optional, - LocationSource locationSource optional, - XSD.Duration locationUpdatePeriod optional, - NodeID locationTargetID optional, - XSD.AnyURI locationServer optional, - XSD.AnyURI locationContainerID optional, - XSD.String locationContainerName optional, - XSD.String locationStatus optional, - union { - record length(1 .. infinity) of ChildResourceRef childResource_list, - record length(1 .. infinity) of union { - Subscription subscription - } choice_list - } choice optional - } - with { - variant "name as uncapitalized"; - variant "element"; - variant (resourceName) "attribute"; - variant (announcedAttribute) "list"; - variant (choice) "untagged"; - variant (choice.childResource_list) "untagged"; - variant (choice.childResource_list[-]) "name as 'childResource'"; - variant (choice.choice_list) "untagged"; - variant (choice.choice_list[-]) "untagged"; - }; - - type record ScheduleAnnc_optional - { - ResourceName resourceName optional, - ResourceType resourceType optional, - XSD.ID resourceID optional, - NhURI parentID optional, - Timestamp creationTime optional, - Timestamp lastModifiedTime optional, - Labels labels optional, - Timestamp expirationTime optional, - XSD.AnyURI link optional, - ScheduleEntries scheduleElement optional - } - with { - variant "name as uncapitalized"; - variant "element"; - variant (resourceName) "attribute"; - }; - - type record SemanticDescriptor_optional { - XSD.NCName resourceName optional, - ResourceType resourceType optional, - XSD.ID resourceID optional, - NhURI parentID optional, - Timestamp creationTime optional, - Timestamp lastModifiedTime optional, - Labels labels optional, - AcpType accessControlPolicyIDs optional, - Timestamp expirationTime optional, - ListOfURIs dynamicAuthorizationConsultationIDs optional, - ListOfURIs announceTo optional, - record length(1 .. infinity) of XSD.NCName announcedAttribute optional, - XSD.ID creator optional, - DescriptorRepresentation descriptorRepresentation optional, - Sparql semanticOpExec optional, - XSD.Base64Binary descriptor optional, - XSD.AnyURI ontologyRef optional, - ListOfURIs relatedSemantics optional, - union { - record length(1 .. infinity) of ChildResourceRef childResource_list, - record length(1 .. infinity) of Subscription subscription_list - } choice optional - } - with { - variant "name as uncapitalized"; - variant "element"; - variant (resourceName) "attribute"; - variant (announcedAttribute) "list"; - variant (choice) "untagged"; - variant (choice.childResource_list) "untagged"; - variant (choice.childResource_list[-]) "name as 'childResource'"; - variant (choice.subscription_list) "untagged"; - variant (choice.subscription_list[-]) "name as 'subscription'"; - }; - - type record GenericInterworkingOperationInstance_optional - { - ResourceName resourceName optional, - ResourceType resourceType optional, - XSD.ID resourceID optional, - NhURI parentID optional, - Timestamp creationTime optional, - Timestamp lastModifiedTime optional, - Labels labels optional, - AcpType accessControlPolicyIDs optional, - Timestamp expirationTime optional, - ListOfURIs dynamicAuthorizationConsultationIDs optional, - ListOfURIs announceTo optional, - ListOfNCNames announcedAttribute optional, - XSD.NonNegativeInteger stateTag optional, - XSD.ID creator optional, - XSD.AnyURI containerDefinition optional, - XSD.AnyURI ontologyRef optional, - XSD.String operationName optional, - XSD.String operationState optional, - ListOfDataLinks inputDataPointLinks optional, - ListOfDataLinks outputDataPointLinks optional, - ListOfDataLinks inputLinks optional, - ListOfDataLinks outputLinks optional, - union { - record length(1 .. infinity) of ChildResourceRef childResource_list, - record length(1 .. infinity) of union { - SemanticDescriptor semanticDescriptor, - Subscription subscription - } choice_list - } choice optional - } - with { - variant "name as uncapitalized"; - variant "element"; - variant (resourceName) "attribute"; - variant (choice) "untagged"; - variant (choice.childResource_list) "untagged"; - variant (choice.childResource_list[-]) "name as 'childResource'"; - variant (choice.choice_list) "untagged"; - variant (choice.choice_list[-]) "untagged"; - }; - -}//end group +type record ScheduleAnnc_optional +{ + ResourceName resourceName optional, + ResourceType resourceType optional, + XSD.ID resourceID optional, + NhURI parentID optional, + Timestamp creationTime optional, + Timestamp lastModifiedTime optional, + Labels labels optional, + Timestamp expirationTime optional, + XSD.AnyURI link optional, + ScheduleEntries scheduleElement optional +} +with { + variant "name as uncapitalized"; + variant "element"; + variant (resourceName) "attribute"; +}; + +type record SemanticDescriptor_optional +{ + ResourceName resourceName optional, + ResourceType resourceType optional, + XSD.ID resourceID optional, + NhURI parentID optional, + Timestamp creationTime optional, + Timestamp lastModifiedTime optional, + Labels labels optional, + AcpType accessControlPolicyIDs optional, + Timestamp expirationTime optional, + ListOfURIs dynamicAuthorizationConsultationIDs optional, + ListOfURIs announceTo optional, + record length(1 .. infinity) of XSD.NCName announcedAttribute optional, + XSD.ID creator optional, + DescriptorRepresentation descriptorRepresentation optional, + Sparql semanticOpExec optional, + XSD.Base64Binary descriptor optional, + XSD.AnyURI ontologyRef optional, + ListOfURIs relatedSemantics optional, + union { + record length(1 .. infinity) of ChildResourceRef childResource_list, + record length(1 .. infinity) of Subscription subscription_list + } choice optional +} +with { + variant "name as uncapitalized"; + variant "element"; + variant (resourceName) "attribute"; + variant (announcedAttribute) "list"; + variant (choice) "untagged"; + variant (choice.childResource_list) "untagged"; + variant (choice.childResource_list[-]) "name as 'childResource'"; + variant (choice.subscription_list) "untagged"; + variant (choice.subscription_list[-]) "name as 'subscription'"; +}; + +type record ServiceSubscribedAppRule_optional +{ + ResourceName resourceName optional, + ResourceType resourceType optional, + XSD.ID resourceID optional, + NhURI parentID optional, + Timestamp creationTime optional, + Timestamp lastModifiedTime optional, + Labels labels optional, + AcpType accessControlPolicyIDs optional, + Timestamp expirationTime optional, + ListOfURIs dynamicAuthorizationConsultationIDs optional, + ListOfM2MID applicableCredIDs optional, + ListOfM2MID allowedApp_IDs optional, + ListOfM2MID allowedAEs optional, + record length(1 .. infinity) of RoleID allowedRole_IDs optional, + union { + record length(1 .. infinity) of ChildResourceRef childResource_list, + record length(1 .. infinity) of Subscription subscription_list + } choice optional +} +with { + variant "name as uncapitalized"; + variant "element"; + variant (resourceName) "attribute"; + variant (allowedApp_IDs) "name as 'allowedApp-IDs'"; + variant (allowedRole_IDs) "name as 'allowedRole-IDs'"; + variant (allowedRole_IDs) "list"; + variant (choice) "untagged"; + variant (choice.childResource_list) "untagged"; + variant (choice.childResource_list[-]) "name as 'childResource'"; + variant (choice.subscription_list) "untagged"; + variant (choice.subscription_list[-]) "name as 'subscription'"; +}; + +type record Subscription_optional +{ + ResourceName resourceName optional, + ResourceType resourceType optional, + XSD.ID resourceID optional, + NhURI parentID optional, + Timestamp creationTime optional, + Timestamp lastModifiedTime optional, + Labels labels optional, + AcpType accessControlPolicyIDs optional, + Timestamp expirationTime optional, + ListOfURIs dynamicAuthorizationConsultationIDs optional, + XSD.ID creator optional, + EventNotificationCriteria eventNotificationCriteria optional, + XSD.PositiveInteger expirationCounter optional, + ListOfURIs notificationURI optional, + XSD.AnyURI groupID optional, + XSD.AnyURI notificationForwardingURI optional, + BatchNotify batchNotify optional, + RateLimit rateLimit optional, + XSD.PositiveInteger preSubscriptionNotify optional, + PendingNotification pendingNotification optional, + XSD.PositiveInteger notificationStoragePriority optional, + XSD.Boolean latestNotify optional, + NotificationContentType notificationContentType optional, + EventCat notificationEventCat optional, + XSD.AnyURI subscriberURI optional, + union { + record length(1 .. infinity) of ChildResourceRef childResource_list, + record length(1 .. infinity) of union { + Schedule schedule, + NotificationTargetMgmtPolicyRef notificationTargetMgmtPolicyRef + } choice_list + } choice optional +} +with { + variant "name as uncapitalized"; + variant "element"; + variant (resourceName) "attribute"; + //variant (latestNotify) "text 'true' as '1'"; + //variant (latestNotify) "text 'false' as '0'"; + variant (choice) "untagged"; + variant (choice.childResource_list) "untagged"; + variant (choice.childResource_list[-]) "name as 'childResource'"; + variant (choice.choice_list) "untagged"; + variant (choice.choice_list[-]) "untagged"; +}; + +}//end group OptionalResourceTypes group InvalidTypes { @@ -7585,7 +7599,6 @@ group InvalidTypes { EventCat notificationEventCat optional } - //@Martin type record LocationPolicy_update_invalid { Timestamp creationTime optional,//invalid field to be used for BI tests Timestamp lastModifiedTime optional,//invalid field to be used for BI tests diff --git a/LibOneM2M/OneM2M_TypesAndValues.ttcn b/LibOneM2M/OneM2M_TypesAndValues.ttcn index 121a4892234dcc5cec8a2346234f2526a0e06901..c64e3cf1cbe3ccbfecc2e78208599fa253409310 100644 --- a/LibOneM2M/OneM2M_TypesAndValues.ttcn +++ b/LibOneM2M/OneM2M_TypesAndValues.ttcn @@ -7,7 +7,7 @@ * * @author oneM2M * @version $URL: https://forge.etsi.org/svn/oneM2M/trunk/ttcn/LibOneM2M/OneM2M_TypesAndValues.ttcn $ - * $Id: OneM2M_TypesAndValues.ttcn 249 2017-03-30 12:24:57Z reinaortega $ + * $Id: OneM2M_TypesAndValues.ttcn 287 2017-05-19 06:59:12Z reinaortega $ * @desc Module containing types and values for oneM2M * */ @@ -16,10 +16,7 @@ module OneM2M_TypesAndValues { import from XSD all; import from OneM2M_Types all; - /* Constants */ - const charstring c_uri_cse := "/~/in-cse/"; - const charstring c_cse_name := "in-cse"; - + /* Constants */ const XSD.String c_defaultResourceName := "MyResource"; const XSD.String c_defaultGroupResourceName := "MyGroupResource"; const XSD.String c_defaultAccessControlPolicyResourceName := "MyAccessControlPolicyResource"; @@ -35,6 +32,8 @@ module OneM2M_TypesAndValues { const XSD.ID c_aeAuxName := "MyAe"; const XSD.String c_acpAuxName := "MyAcp"; const charstring c_invalid_location_update_period := "-PT30M10S" ;//duration set to invalid value (minus value) + const XSD.ID c_resourceShortNameLatest := "la"; //<latest> + const XSD.ID c_resourceShortNameOldest := "ol"; //<oldest> //AccessControlOperations const XSD.Integer c_C := 1; diff --git a/OneM2M_TestControl.ttcn b/OneM2M_TestControl.ttcn index a8b69c2aa4dafac7726cbe8a8d87a6014d1dc3cf..5f23afed323e688ea103e21f31833b867a77ce55 100644 --- a/OneM2M_TestControl.ttcn +++ b/OneM2M_TestControl.ttcn @@ -7,7 +7,7 @@ * * @author oneM2M * @version $URL: https://forge.etsi.org/svn/oneM2M/trunk/ttcn/OneM2M_TestControl.ttcn $ - * $Id: OneM2M_TestControl.ttcn 246 2017-03-27 17:07:30Z reinaortega $ + * $Id: OneM2M_TestControl.ttcn 254 2017-05-02 15:55:08Z reinaortega $ * @desc Test control module for oneM2M * */ @@ -187,21 +187,25 @@ module OneM2M_TestControl { execute(TC_CSE_DMR_DEL_BV_004_05()); execute(TC_CSE_DMR_DEL_BV_004_06()); execute(TC_CSE_DMR_DEL_BV_005()); + execute(TC_CSE_DMR_DEL_BV_007()); + execute(TC_CSE_DMR_DEL_BO_008()); + execute(TC_CSE_DMR_DEL_BV_009()); + execute(TC_CSE_DMR_DEL_BO_010()); execute(TC_CSE_LOC_BV_001()); execute(TC_CSE_LOC_BV_002()); - execute(TC_CSE_LOC_BO_001()); - execute(TC_CSE_LOC_BO_002()); - execute(TC_CSE_LOC_BI_001()); - execute(TC_CSE_LOC_BV_003()); - execute(TC_CSE_LOC_BV_004()); - execute(TC_CSE_LOC_BV_005()); - execute(TC_CSE_LOC_BV_006_01()); - execute(TC_CSE_LOC_BV_006_02()); - execute(TC_CSE_LOC_BV_006_03()); + execute(TC_CSE_LOC_BO_003()); + execute(TC_CSE_LOC_BO_004()); + execute(TC_CSE_LOC_BI_005()); + execute(TC_CSE_LOC_BV_006()); + execute(TC_CSE_LOC_BV_007()); + execute(TC_CSE_LOC_BV_008()); + execute(TC_CSE_LOC_BV_009_01()); + execute(TC_CSE_LOC_BV_009_02()); + execute(TC_CSE_LOC_BV_009_03()); //execute(TC_CSE_LOC_BV_007()); //execute(TC_CSE_LOC_BV_008()); - execute(TC_CSE_LOC_BV_009()); - execute(TC_CSE_LOC_BV_010()); + execute(TC_CSE_LOC_BV_012()); + execute(TC_CSE_LOC_BV_013()); execute(TC_CSE_GMG_BV_001()); execute(TC_CSE_GMG_BV_002()); execute(TC_CSE_GMG_BV_003()); diff --git a/OneM2M_Testcases.ttcn b/OneM2M_Testcases.ttcn index bb71ecbec1ffcb338cb6994e1589294a960610b6..c4f6a3b1d2eb582cd4677be255d535f8581a9869 100644 --- a/OneM2M_Testcases.ttcn +++ b/OneM2M_Testcases.ttcn @@ -7,7 +7,7 @@ * * @author oneM2M * @version $URL: https://forge.etsi.org/svn/oneM2M/trunk/ttcn/OneM2M_Testcases.ttcn $ - * $Id: OneM2M_Testcases.ttcn 251 2017-03-31 12:26:42Z reinaortega $ + * $Id: OneM2M_Testcases.ttcn 297 2017-06-02 14:21:45Z reinaortega $ * @desc Module containing test cases for oneM2M * */ @@ -31,39 +31,6 @@ module OneM2M_Testcases { group helpingTestCases {//These are not part of the test suite, just for verification purposes - testcase TC_DELETE_AE() runs on CseTester system CseSystem { - - timer t_ac := 5.0; - map(self:mcaPort, system:mcaPort); - - mcaPort.send(m_request(m_deleteRequest(PX_URI_CSE & PX_CSE_NAME & "/" & PX_RESOURCE_TO_BE_DELETED))); - t_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) { - t_ac.stop; - log("Postamble: Resource deleted"); - setverdict(pass); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { - t_ac.stop; - log("Postamble: Error while deleting resource"); - setverdict(fail); - } - [] mcaPort.receive { - t_ac.stop; - log("Postamble: Unexpected message received"); - setverdict(inconc); - } - [] t_ac.timeout { - log("Postamble: No answer while deleting resource"); - setverdict(inconc); - } - } - - unmap(self:mcaPort, system:mcaPort); - stop; - } - testcase TC_DELETE_RESOURCES() runs on CseTester system CseSystem { timer t_ac := 5.0; @@ -141,7 +108,7 @@ module OneM2M_Testcases { alt { [] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) { tc_ac.stop; - setverdict(pass, testcasename() & ": AE successfuly created."); + setverdict(pass, testcasename() & ": AE successfully created."); } [] mcaPort.receive(mw_response(mw_responsePrimitiveInverse(int2001))) -> value v_response{ tc_ac.stop; @@ -183,7 +150,7 @@ module OneM2M_Testcases { alt { [] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) { tc_ac.stop; - setverdict(pass, testcasename() & ": AE successfuly created."); + setverdict(pass, testcasename() & ": AE successfully created."); } [] mcaPort.receive(mw_response(mw_responsePrimitiveInverse(int2001))) -> value v_response{ tc_ac.stop; @@ -213,7 +180,7 @@ module OneM2M_Testcases { f_cf01Up(); //Preambule - v_cseBaseIndex := f_cse_preamble_createServiceSubscribedAppRule(omit);//c_CRUDNDi); + v_cseBaseIndex := f_cse_preamble_createServiceSubscribedAppRule(-);//c_CRUDNDi); // Test Body v_request := valueof(m_createAe(PX_APP_ID, omit, omit)); @@ -255,7 +222,7 @@ module OneM2M_Testcases { f_cf01Up(); //Preambule - v_cseBaseIndex := f_cse_preamble_createServiceSubscribedAppRule(omit);//c_CRUDNDi); + v_cseBaseIndex := f_cse_preamble_createServiceSubscribedAppRule(-);//c_CRUDNDi); //Test Body v_request := valueof(m_createAe(PX_APP_ID, omit, "C-AE-ID-STEM")); @@ -477,7 +444,7 @@ module OneM2M_Testcases { v_cseBaseIndex := f_cse_preamble_createServiceSubscribedAppRule({"S"});//c_CRUDNDi); //Test Body - v_request := valueof(m_responsePrimitive(int2001, "To_be_defined", {any_1 := {{AEAnnc_optional := m_contentCreateAEAnnc({"Credential-ID:None"}, omit, PX_APP_ID, "/CSE_ID/S-AE-ID-STEM")}}})); + v_request := valueof(m_responsePrimitive(int2001, "To_be_defined", {aEAnnc_optional := m_contentCreateAEAnnc({"Credential-ID:None"}, omit, PX_APP_ID, "/CSE_ID/S-AE-ID-STEM")})); mccPort.send(m_response(v_request)); tc_ac.start; @@ -562,7 +529,7 @@ module OneM2M_Testcases { } [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { tc_ac.stop; - setverdict(fail, testcasename() & ": Error, Result content set to 0 is impossible for a retrieve request "); + setverdict(fail, testcasename() & ": Error, Result content set to " & int2str(enum2int(p_resultContent)) & " is impossible for a retrieve request "); } [] tc_ac.timeout { setverdict(inconc, testcasename() & ": No answer while retrieving resource"); @@ -585,64 +552,66 @@ module OneM2M_Testcases { // Local variables var template PrimitiveContent v_contentResponse; - v_contentResponse.any_1[0].Container_optional := mw_contentContainer_rc1; + v_contentResponse.container_optional := mw_contentContainer_rc1; - f_CSE_DMR_BV_002(int3, m_createContainerBase, v_contentResponse);//Container + f_CSE_DMR_BV_002(int3, m_createContainerBase, v_contentResponse, int3, m_createContainerBase);//Container } testcase TC_CSE_DMR_BV_002_02() runs on CseTester system CseSystem { // Local variables var template PrimitiveContent v_contentResponse; - v_contentResponse.any_1[0].Group_optional := mw_contentGroup_rc1; + v_contentResponse.group_optional := mw_contentGroup_rc1; - f_CSE_DMR_BV_002(int9, m_createGroupBase, v_contentResponse);//Group + f_CSE_DMR_BV_002(int9, m_createGroupBase, v_contentResponse, int23, m_createSubscriptionBase);//Group } testcase TC_CSE_DMR_BV_002_03() runs on CseTester system CseSystem { // Local variables var template PrimitiveContent v_contentResponse; - v_contentResponse.any_1[0].AccessControlPolicy_optional := mw_contentAcp_rc1; + v_contentResponse.accessControlPolicy_optional := mw_contentAcp_rc1; - f_CSE_DMR_BV_002(int1, m_createAcpBase,v_contentResponse);//AccessControlPolicy + f_CSE_DMR_BV_002(int1, m_createAcpBase,v_contentResponse, int23, m_createSubscriptionBase);//AccessControlPolicy } testcase TC_CSE_DMR_BV_002_04() runs on CseTester system CseSystem { // Local variables var template PrimitiveContent v_contentResponse; - v_contentResponse.any_1[0].Schedule_optional := mw_contentSchedule_rc1; + v_contentResponse.schedule_optional := mw_contentSchedule_rc1; - f_CSE_DMR_BV_002(int18, m_createScheduleBase, v_contentResponse);//Schedule + f_CSE_DMR_BV_002(int18, m_createScheduleBase, v_contentResponse, int23, m_createSubscriptionBase);//Schedule } testcase TC_CSE_DMR_BV_002_05() runs on CseTester system CseSystem { // Local variables var template PrimitiveContent v_contentResponse; - v_contentResponse.any_1[0].PollingChannel_optional := mw_contentPollingChannelBase;//FIXME + v_contentResponse.pollingChannel_optional := mw_contentPollingChannelBase; - f_CSE_DMR_BV_002(int15, m_createPollingChannelBase, v_contentResponse);//PollingChannel + f_CSE_DMR_BV_002(int15, m_createPollingChannelBase, v_contentResponse, omit, omit);//PollingChannel } testcase TC_CSE_DMR_BV_002_06() runs on CseTester system CseSystem { // Local variables var template PrimitiveContent v_contentResponse; - v_contentResponse.any_1[0].Subscription_optional := mw_contentSubscription_rc1; + v_contentResponse.subscription_optional := mw_contentSubscription_rc1; - f_CSE_DMR_BV_002(int23, m_createSubscriptionBase, v_contentResponse);//Subscription + f_CSE_DMR_BV_002(int23, m_createSubscriptionBase, v_contentResponse, int18, m_createScheduleBase);//Subscription } - function f_CSE_DMR_BV_002(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, template PrimitiveContent p_contentResponse) runs on CseTester { + function f_CSE_DMR_BV_002(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, template PrimitiveContent p_contentResponse, template ResourceType p_childResourceType, template RequestPrimitive p_childRequestPrimitive) runs on CseTester { // Local variables var MsgIn v_response; var RequestPrimitive v_request; - + var CseTester v_notifyHandler; var integer v_aeIndex := -1; + var integer v_ae2Index := -1; var integer v_resourceIndex := -1; + var integer v_childResourceIndex := -1; // Test control @@ -654,8 +623,20 @@ module OneM2M_Testcases { // Preamble v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive, v_aeIndex); - + if(isvalue(p_childResourceType)) { + if(valueof(p_childResourceType) == int23) { + f_cse_preamble_subscriptionVerification(v_notifyHandler, v_aeIndex, v_ae2Index, p_childRequestPrimitive, valueof(p_childResourceType)); + } else { + f_cse_preamble_subscriptionVerification(v_notifyHandler, v_aeIndex, v_ae2Index, p_requestPrimitive, valueof(p_resourceType)); + } + } + + v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive, v_aeIndex); + + if(p_resourceType != int15) { + v_childResourceIndex := f_cse_createResource(valueof(p_childResourceType), p_childRequestPrimitive, v_resourceIndex); + } + // Test Body v_request := valueof(m_retrieveResource(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_resourceIndex))); v_request.resultContent := int1;//Attributes @@ -664,11 +645,11 @@ module OneM2M_Testcases { alt { [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(p_contentResponse))) -> value v_response { tc_ac.stop; - setverdict(pass, testcasename() & ": No child resources provided with RC set to 1"); + setverdict(pass, testcasename() & ": No child resources provided with RC set to " & int2str(enum2int(v_request.resultContent))); } [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { tc_ac.stop; - setverdict(fail, testcasename() & ": Child resources provided with RC set to 1"); + setverdict(fail, testcasename() & ": Child resources provided with RC set to " & int2str(enum2int(v_request.resultContent))); } [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { tc_ac.stop; @@ -696,64 +677,66 @@ module OneM2M_Testcases { // Local variables var template PrimitiveContent v_contentResponse; - v_contentResponse.any_1[0].Container_optional := mw_contentContainer_rc4; + v_contentResponse.container_optional := mw_contentContainer_rc4; - f_CSE_DMR_BV_003(int3, m_createContainerBase, v_contentResponse);//Container + f_CSE_DMR_BV_003(int3, m_createContainerBase, v_contentResponse, int3, m_createContainerBase);//Container } testcase TC_CSE_DMR_BV_003_02() runs on CseTester system CseSystem { // Local variables var template PrimitiveContent v_contentResponse; - v_contentResponse.any_1[0].Group_optional := mw_contentGroup_rc4; + v_contentResponse.group_optional := mw_contentGroup_rc4; - f_CSE_DMR_BV_003(int9, m_createGroupBase, v_contentResponse);//Group + f_CSE_DMR_BV_003(int9, m_createGroupBase, v_contentResponse, int23, m_createSubscriptionBase);//Group } testcase TC_CSE_DMR_BV_003_03() runs on CseTester system CseSystem { // Local variables var template PrimitiveContent v_contentResponse; - v_contentResponse.any_1[0].AccessControlPolicy_optional := mw_contentAcp_rc4; + v_contentResponse.accessControlPolicy_optional := mw_contentAcp_rc4; - f_CSE_DMR_BV_003(int1, m_createAcpBase,v_contentResponse);//AccessControlPolicy + f_CSE_DMR_BV_003(int1, m_createAcpBase,v_contentResponse, int23, m_createSubscriptionBase);//AccessControlPolicy } testcase TC_CSE_DMR_BV_003_04() runs on CseTester system CseSystem { // Local variables var template PrimitiveContent v_contentResponse; - v_contentResponse.any_1[0].Schedule_optional := mw_contentSchedule_rc4; + v_contentResponse.schedule_optional := mw_contentSchedule_rc4; - f_CSE_DMR_BV_003(int18, m_createScheduleBase, v_contentResponse);//Schedule + f_CSE_DMR_BV_003(int18, m_createScheduleBase, v_contentResponse, int23, m_createSubscriptionBase);//Schedule } testcase TC_CSE_DMR_BV_003_05() runs on CseTester system CseSystem { // Local variables var template PrimitiveContent v_contentResponse; - v_contentResponse.any_1[0].PollingChannel_optional := mw_contentPollingChannelBase;//FIXME + v_contentResponse.pollingChannel_optional := mw_contentPollingChannelBase; - f_CSE_DMR_BV_003(int15, m_createPollingChannelBase, v_contentResponse);//PollingChannel + f_CSE_DMR_BV_003(int15, m_createPollingChannelBase, v_contentResponse, omit, omit);//PollingChannel } testcase TC_CSE_DMR_BV_003_06() runs on CseTester system CseSystem { // Local variables var template PrimitiveContent v_contentResponse; - v_contentResponse.any_1[0].Subscription_optional := mw_contentSubscription_rc4; + v_contentResponse.subscription_optional := mw_contentSubscription_rc4; - f_CSE_DMR_BV_003(int23, m_createSubscriptionBase, v_contentResponse);//Subscription + f_CSE_DMR_BV_003(int23, m_createSubscriptionBase, v_contentResponse, int18, m_createScheduleBase);//Subscription } - function f_CSE_DMR_BV_003(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, template PrimitiveContent p_contentResponse) runs on CseTester { + function f_CSE_DMR_BV_003(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, template PrimitiveContent p_contentResponse, template ResourceType p_childResourceType, template RequestPrimitive p_childRequestPrimitive) runs on CseTester { // Local variables var MsgIn v_response; var RequestPrimitive v_request; - + var CseTester v_notifyHandler; var integer v_aeIndex := -1; + var integer v_ae2Index := -1; var integer v_resourceIndex := -1; + var integer v_childResourceIndex := -1; // Test control @@ -764,9 +747,21 @@ module OneM2M_Testcases { // Preamble v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - - v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive, v_aeIndex); - + + if(isvalue(p_childResourceType)) { + if(valueof(p_childResourceType) == int23) { + f_cse_preamble_subscriptionVerification(v_notifyHandler, v_aeIndex, v_ae2Index, p_childRequestPrimitive, valueof(p_childResourceType)); + } else { + f_cse_preamble_subscriptionVerification(v_notifyHandler, v_aeIndex, v_ae2Index, p_requestPrimitive, valueof(p_resourceType)); + } + } + + v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive, v_aeIndex); + + if(p_resourceType != int15) { + v_childResourceIndex := f_cse_createResource(valueof(p_childResourceType), p_childRequestPrimitive, v_resourceIndex); + } + // Test Body v_request := valueof(m_retrieveResource(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_resourceIndex))); v_request.resultContent := int4;//Attributes and child resources @@ -775,11 +770,11 @@ module OneM2M_Testcases { alt { [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(p_contentResponse))) -> value v_response { tc_ac.stop; - setverdict(pass, testcasename() & ": No child resources provided with RC set to 1"); + setverdict(pass, testcasename() & ": No child resources provided with RC set to " & int2str(enum2int(v_request.resultContent))); } [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { tc_ac.stop; - setverdict(fail, testcasename() & ": Child resources provided with RC set to 1"); + setverdict(fail, testcasename() & ": Child resources provided with RC set to " & int2str(enum2int(v_request.resultContent))); } [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { tc_ac.stop; @@ -806,64 +801,66 @@ module OneM2M_Testcases { // Local variables var template PrimitiveContent v_contentResponse; - v_contentResponse.any_1[0].Container_optional := mw_contentContainer_rc5; + v_contentResponse.container_optional := mw_contentContainer_rc5; - f_CSE_DMR_BV_004(int3, m_createContainerBase, v_contentResponse);//Container + f_CSE_DMR_BV_004(int3, m_createContainerBase, v_contentResponse, int3, m_createContainerBase);//Container } testcase TC_CSE_DMR_BV_004_02() runs on CseTester system CseSystem { // Local variables var template PrimitiveContent v_contentResponse; - v_contentResponse.any_1[0].Group_optional := mw_contentGroup_rc5; + v_contentResponse.group_optional := mw_contentGroup_rc5; - f_CSE_DMR_BV_004(int9, m_createGroupBase, v_contentResponse);//Group + f_CSE_DMR_BV_004(int9, m_createGroupBase, v_contentResponse, int23, m_createSubscriptionBase);//Group } testcase TC_CSE_DMR_BV_004_03() runs on CseTester system CseSystem { // Local variables var template PrimitiveContent v_contentResponse; - v_contentResponse.any_1[0].AccessControlPolicy_optional := mw_contentAcp_rc5; + v_contentResponse.accessControlPolicy_optional := mw_contentAcp_rc5; - f_CSE_DMR_BV_004(int1, m_createAcpBase,v_contentResponse);//AccessControlPolicy + f_CSE_DMR_BV_004(int1, m_createAcpBase,v_contentResponse, int23, m_createSubscriptionBase);//AccessControlPolicy } testcase TC_CSE_DMR_BV_004_04() runs on CseTester system CseSystem { // Local variables var template PrimitiveContent v_contentResponse; - v_contentResponse.any_1[0].Schedule_optional := mw_contentSchedule_rc5; + v_contentResponse.schedule_optional := mw_contentSchedule_rc5; - f_CSE_DMR_BV_004(int18, m_createScheduleBase, v_contentResponse);//Schedule + f_CSE_DMR_BV_004(int18, m_createScheduleBase, v_contentResponse, int23, m_createSubscriptionBase);//Schedule } testcase TC_CSE_DMR_BV_004_05() runs on CseTester system CseSystem { // Local variables var template PrimitiveContent v_contentResponse; - v_contentResponse.any_1[0].PollingChannel_optional := mw_contentPollingChannelBase;//FIXME + v_contentResponse.pollingChannel_optional := mw_contentPollingChannelBase; - f_CSE_DMR_BV_004(int15, m_createPollingChannelBase, v_contentResponse);//PollingChannel + f_CSE_DMR_BV_004(int15, m_createPollingChannelBase, v_contentResponse, omit, omit);//PollingChannel } testcase TC_CSE_DMR_BV_004_06() runs on CseTester system CseSystem { // Local variables var template PrimitiveContent v_contentResponse; - v_contentResponse.any_1[0].Subscription_optional := mw_contentSubscription_rc5; + v_contentResponse.subscription_optional := mw_contentSubscription_rc5; - f_CSE_DMR_BV_004(int23, m_createSubscriptionBase, v_contentResponse);//Subscription + f_CSE_DMR_BV_004(int23, m_createSubscriptionBase, v_contentResponse, int18, m_createScheduleBase);//Subscription } - function f_CSE_DMR_BV_004(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, template PrimitiveContent p_contentResponse) runs on CseTester { + function f_CSE_DMR_BV_004(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, template PrimitiveContent p_contentResponse, template ResourceType p_childResourceType, template RequestPrimitive p_childRequestPrimitive) runs on CseTester { // Local variables var MsgIn v_response; var RequestPrimitive v_request; - + var CseTester v_notifyHandler; var integer v_aeIndex := -1; + var integer v_ae2Index := -1; var integer v_resourceIndex := -1; + var integer v_childResourceIndex := -1; // Test control @@ -874,8 +871,20 @@ module OneM2M_Testcases { // Preamble v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - + + if(isvalue(p_childResourceType)) { + if(valueof(p_childResourceType) == int23) { + f_cse_preamble_subscriptionVerification(v_notifyHandler, v_aeIndex, v_ae2Index, p_childRequestPrimitive, valueof(p_childResourceType)); + } else { + f_cse_preamble_subscriptionVerification(v_notifyHandler, v_aeIndex, v_ae2Index, p_requestPrimitive, valueof(p_resourceType)); + } + } + v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive, v_aeIndex); + + if(p_resourceType != int15) { + v_childResourceIndex := f_cse_createResource(valueof(p_childResourceType), p_childRequestPrimitive, v_resourceIndex); + } // Test Body v_request := valueof(m_retrieveResource(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_resourceIndex))); @@ -885,11 +894,11 @@ module OneM2M_Testcases { alt { [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(p_contentResponse))) -> value v_response { tc_ac.stop; - setverdict(pass, testcasename() & ": No child resources provided with RC set to 1"); + setverdict(pass, testcasename() & ": No child resources provided with RC set to " & int2str(enum2int(v_request.resultContent))); } [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { tc_ac.stop; - setverdict(fail, testcasename() & ": Child resources provided with RC set to 1"); + setverdict(fail, testcasename() & ": Child resources provided with RC set to " & int2str(enum2int(v_request.resultContent))); } [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { tc_ac.stop; @@ -916,64 +925,66 @@ module OneM2M_Testcases { // Local variables var template PrimitiveContent v_contentResponse; - v_contentResponse.any_1[0].Container_optional := mw_contentContainer_rc6; + v_contentResponse.container_optional := mw_contentContainer_rc6; - f_CSE_DMR_BV_005(int3, m_createContainerBase, v_contentResponse);//Container + f_CSE_DMR_BV_005(int3, m_createContainerBase, v_contentResponse, int3, m_createContainerBase);//Container } testcase TC_CSE_DMR_BV_005_02() runs on CseTester system CseSystem { // Local variables var template PrimitiveContent v_contentResponse; - v_contentResponse.any_1[0].Group_optional := mw_contentGroup_rc6; + v_contentResponse.group_optional := mw_contentGroup_rc6; - f_CSE_DMR_BV_005(int9, m_createGroupBase, v_contentResponse);//Group + f_CSE_DMR_BV_005(int9, m_createGroupBase, v_contentResponse, int23, m_createSubscriptionBase);//Group } testcase TC_CSE_DMR_BV_005_03() runs on CseTester system CseSystem { // Local variables var template PrimitiveContent v_contentResponse; - v_contentResponse.any_1[0].AccessControlPolicy_optional := mw_contentAcp_rc6; + v_contentResponse.accessControlPolicy_optional := mw_contentAcp_rc6; - f_CSE_DMR_BV_005(int1, m_createAcpBase,v_contentResponse);//AccessControlPolicy + f_CSE_DMR_BV_005(int1, m_createAcpBase,v_contentResponse, int23, m_createSubscriptionBase);//AccessControlPolicy } testcase TC_CSE_DMR_BV_005_04() runs on CseTester system CseSystem { // Local variables var template PrimitiveContent v_contentResponse; - v_contentResponse.any_1[0].Schedule_optional := mw_contentSchedule_rc6; + v_contentResponse.schedule_optional := mw_contentSchedule_rc6; - f_CSE_DMR_BV_005(int18, m_createScheduleBase, v_contentResponse);//Schedule + f_CSE_DMR_BV_005(int18, m_createScheduleBase, v_contentResponse, int23, m_createSubscriptionBase);//Schedule } testcase TC_CSE_DMR_BV_005_05() runs on CseTester system CseSystem { // Local variables var template PrimitiveContent v_contentResponse; - v_contentResponse.any_1[0].PollingChannel_optional := mw_contentPollingChannelBase;//FIXME + v_contentResponse.pollingChannel_optional := mw_contentPollingChannelBase; - f_CSE_DMR_BV_005(int15, m_createPollingChannelBase, v_contentResponse);//PollingChannel + f_CSE_DMR_BV_005(int15, m_createPollingChannelBase, v_contentResponse, omit, omit);//PollingChannel } testcase TC_CSE_DMR_BV_005_06() runs on CseTester system CseSystem { // Local variables var template PrimitiveContent v_contentResponse; - v_contentResponse.any_1[0].Subscription_optional := mw_contentSubscription_rc6; + v_contentResponse.subscription_optional := mw_contentSubscription_rc6; - f_CSE_DMR_BV_005(int23, m_createSubscriptionBase, v_contentResponse);//Subscription + f_CSE_DMR_BV_005(int23, m_createSubscriptionBase, v_contentResponse, int18, m_createScheduleBase);//Subscription } - function f_CSE_DMR_BV_005(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, template PrimitiveContent p_contentResponse) runs on CseTester { + function f_CSE_DMR_BV_005(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, template PrimitiveContent p_contentResponse, template ResourceType p_childResourceType, template RequestPrimitive p_childRequestPrimitive) runs on CseTester { // Local variables var MsgIn v_response; var RequestPrimitive v_request; - + var CseTester v_notifyHandler; var integer v_aeIndex := -1; + var integer v_ae2Index := -1; var integer v_resourceIndex := -1; + var integer v_childResourceIndex := -1; // Test control @@ -984,8 +995,20 @@ module OneM2M_Testcases { // Preamble v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - + + if(isvalue(p_childResourceType)) { + if(valueof(p_childResourceType) == int23) { + f_cse_preamble_subscriptionVerification(v_notifyHandler, v_aeIndex, v_ae2Index, p_childRequestPrimitive, valueof(p_childResourceType)); + } else { + f_cse_preamble_subscriptionVerification(v_notifyHandler, v_aeIndex, v_ae2Index, p_requestPrimitive, valueof(p_resourceType)); + } + } + v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive, v_aeIndex); + + if(p_resourceType != int15) { + v_childResourceIndex := f_cse_createResource(valueof(p_childResourceType), p_childRequestPrimitive, v_resourceIndex); + } // Test Body v_request := valueof(m_retrieveResource(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_resourceIndex))); @@ -995,11 +1018,11 @@ module OneM2M_Testcases { alt { [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(p_contentResponse))) -> value v_response { tc_ac.stop; - setverdict(pass, testcasename() & ": No child resources provided with RC set to 1"); + setverdict(pass, testcasename() & ": No child resources provided with RC set to " & int2str(enum2int(v_request.resultContent))); } [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { tc_ac.stop; - setverdict(fail, testcasename() & ": Child resources provided with RC set to 1"); + setverdict(fail, testcasename() & ": Child resources provided with RC set to " & int2str(enum2int(v_request.resultContent))); } [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { tc_ac.stop; @@ -1019,6 +1042,130 @@ module OneM2M_Testcases { }//end f_CSE_DMR_BV_005 } // end g_CSE_DMR_BV_005 + + group g_CSE_DMR_BV_006 { + + testcase TC_CSE_DMR_BV_006_01() runs on CseTester system CseSystem { + // Local variables + var template PrimitiveContent v_contentResponse; + + v_contentResponse.container_optional := mw_contentContainer_rc8; + + f_CSE_DMR_BV_006(int3, m_createContainerBase, v_contentResponse, int3, m_createContainerBase);//Container + } + + testcase TC_CSE_DMR_BV_006_02() runs on CseTester system CseSystem { + // Local variables + var template PrimitiveContent v_contentResponse; + + v_contentResponse.group_optional := mw_contentGroup_rc8; + + f_CSE_DMR_BV_006(int9, m_createGroupBase, v_contentResponse, int23, m_createSubscriptionBase);//Group + } + + testcase TC_CSE_DMR_BV_006_03() runs on CseTester system CseSystem { + // Local variables + var template PrimitiveContent v_contentResponse; + + v_contentResponse.accessControlPolicy_optional := mw_contentAcp_rc8; + + f_CSE_DMR_BV_006(int1, m_createAcpBase,v_contentResponse, int23, m_createSubscriptionBase);//AccessControlPolicy + } + + testcase TC_CSE_DMR_BV_006_04() runs on CseTester system CseSystem { + // Local variables + var template PrimitiveContent v_contentResponse; + + v_contentResponse.schedule_optional := mw_contentSchedule_rc8; + + f_CSE_DMR_BV_006(int18, m_createScheduleBase, v_contentResponse, int23, m_createSubscriptionBase);//Schedule + } + + testcase TC_CSE_DMR_BV_006_05() runs on CseTester system CseSystem { + // Local variables + var template PrimitiveContent v_contentResponse; + + v_contentResponse.pollingChannel_optional := mw_contentPollingChannelBase; + + f_CSE_DMR_BV_006(int15, m_createPollingChannelBase, v_contentResponse, omit, omit);//PollingChannel + } + + testcase TC_CSE_DMR_BV_006_06() runs on CseTester system CseSystem { + // Local variables + var template PrimitiveContent v_contentResponse; + + v_contentResponse.subscription_optional := mw_contentSubscription_rc8; + + f_CSE_DMR_BV_006(int23, m_createSubscriptionBase, v_contentResponse, int18, m_createScheduleBase);//Subscription + } + + function f_CSE_DMR_BV_006(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, template PrimitiveContent p_contentResponse, template ResourceType p_childResourceType, template RequestPrimitive p_childRequestPrimitive) runs on CseTester { + + // Local variables + var MsgIn v_response; + var RequestPrimitive v_request; + var CseTester v_notifyHandler; + var integer v_aeIndex := -1; + var integer v_ae2Index := -1; + var integer v_resourceIndex := -1; + var integer v_childResourceIndex := -1; + + // Test control + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + + if(isvalue(p_childResourceType)) { + if(valueof(p_childResourceType) == int23) { + f_cse_preamble_subscriptionVerification(v_notifyHandler, v_aeIndex, v_ae2Index, p_childRequestPrimitive, valueof(p_childResourceType)); + } else { + f_cse_preamble_subscriptionVerification(v_notifyHandler, v_aeIndex, v_ae2Index, p_requestPrimitive, valueof(p_resourceType)); + } + } + + v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive, v_aeIndex); + + if(p_resourceType != int15) { + v_childResourceIndex := f_cse_createResource(valueof(p_childResourceType), p_childRequestPrimitive, v_resourceIndex); + } + + // Test Body + v_request := valueof(m_retrieveResource(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_resourceIndex))); + v_request.resultContent := int6;//Child resource references + mcaPort.send(m_request(v_request)); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(p_contentResponse))) -> value v_response { + tc_ac.stop; + setverdict(pass, testcasename() & ": No child resources provided with RC set to " & int2str(enum2int(v_request.resultContent))); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + tc_ac.stop; + setverdict(fail, testcasename() & ": Child resources provided with RC set to " & int2str(enum2int(v_request.resultContent))); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { + tc_ac.stop; + setverdict(fail, testcasename() & ": Error while retrieving resource"); + } + [] tc_ac.timeout { + setverdict(inconc, testcasename() & ": No answer while retrieving resource"); + } + } + + // Postamble + f_cse_postamble_deleteResources(); + + // Tear down + f_cf01Down(); + + }//end f_CSE_DMR_BV_006 + + } // end g_CSE_DMR_BV_006 group Create { @@ -1040,13 +1187,13 @@ module OneM2M_Testcases { } v_sizeResourceTypeList := lengthof(v_requestPrimitivematrix); - v_createRequest.primitiveContent.any_1[0].Container_optional.resourceName := omit; + v_createRequest.primitiveContent.container_optional.resourceName := omit; for (i := 0; i<v_sizeResourceTypeList; i := i+1){ v_responsePrimitive := f_CSE_DMR_CRE_BV_001(int3, v_createRequest, v_requestPrimitivematrix[i], v_notifyHandler); log(v_responsePrimitive); if(getverdict == pass){ - if(not ispresent(v_responsePrimitive.primitiveContent.any_1[0].Container_optional.resourceName)){ + if(not ispresent(v_responsePrimitive.primitiveContent.container_optional.resourceName)){ setverdict(fail, testcasename(), ": Error, resourceName attribute not provided"); } } @@ -1069,13 +1216,13 @@ module OneM2M_Testcases { } v_sizeResourceTypeList := lengthof(v_requestPrimitivematrix); - v_createRequest.primitiveContent.any_1[0].Group_optional.resourceName := omit; + v_createRequest.primitiveContent.group_optional.resourceName := omit; for (i := 0; i<v_sizeResourceTypeList; i := i+1){ - v_responsePrimitive := f_CSE_DMR_CRE_BV_001(int3, v_createRequest, v_requestPrimitivematrix[i],v_notifyHandler); + v_responsePrimitive := f_CSE_DMR_CRE_BV_001(int9, v_createRequest, v_requestPrimitivematrix[i],v_notifyHandler); log(v_responsePrimitive); if(getverdict == pass){ - if(not ispresent(v_responsePrimitive.primitiveContent.any_1[0].Group_optional.resourceName)){ + if(not ispresent(v_responsePrimitive.primitiveContent.group_optional.resourceName)){ setverdict(fail, testcasename(), ": Error, resourceName attribute not provided"); } } @@ -1098,12 +1245,12 @@ module OneM2M_Testcases { } v_sizeResourceTypeList := lengthof(v_requestPrimitivematrix); - v_createRequest.primitiveContent.any_1[0].AccessControlPolicy_optional.resourceName := omit; + v_createRequest.primitiveContent.accessControlPolicy_optional.resourceName := omit; for (i := 0; i<v_sizeResourceTypeList; i := i+1){ v_responsePrimitive := f_CSE_DMR_CRE_BV_001(int1, v_createRequest, v_requestPrimitivematrix[i], v_notifyHandler);//AccessControlPolicy if(getverdict == pass){ - if(not ispresent(v_responsePrimitive.primitiveContent.any_1[0].AccessControlPolicy_optional.resourceName)){ + if(not ispresent(v_responsePrimitive.primitiveContent.accessControlPolicy_optional.resourceName)){ setverdict(fail, testcasename(), ": Error, resourceName attribute not provided"); } } @@ -1127,13 +1274,13 @@ module OneM2M_Testcases { } v_sizeResourceTypeList := lengthof(v_requestPrimitivematrix); - v_createRequest.primitiveContent.any_1[0].Schedule_optional.resourceName := omit; + v_createRequest.primitiveContent.schedule_optional.resourceName := omit; for (i := 0; i<v_sizeResourceTypeList; i := i+1){ v_responsePrimitive := f_CSE_DMR_CRE_BV_001(int18, v_createRequest, v_requestPrimitivematrix[i], v_notifyHandler);//Schedule if(getverdict == pass){ - if(not ispresent(v_responsePrimitive.primitiveContent.any_1[0].Schedule_optional.resourceName)){ + if(not ispresent(v_responsePrimitive.primitiveContent.schedule_optional.resourceName)){ setverdict(fail, testcasename(), ": Error, resourceName attribute not provided"); } } @@ -1155,12 +1302,12 @@ module OneM2M_Testcases { } v_sizeResourceTypeList := lengthof(v_requestPrimitivematrix); - v_createRequest.primitiveContent.any_1[0].PollingChannel_optional.resourceName := omit; + v_createRequest.primitiveContent.pollingChannel_optional.resourceName := omit; for (i := 0; i<v_sizeResourceTypeList; i := i+1){ v_responsePrimitive := f_CSE_DMR_CRE_BV_001(int15, v_createRequest, v_requestPrimitivematrix[i], v_notifyHandler);//PollingChannel if(getverdict == pass){ - if(not ispresent(v_responsePrimitive.primitiveContent.any_1[0].PollingChannel_optional.resourceName)){ + if(not ispresent(v_responsePrimitive.primitiveContent.pollingChannel_optional.resourceName)){ setverdict(fail, testcasename(), ": Error, resourceName attribute not provided"); } } @@ -1192,12 +1339,12 @@ module OneM2M_Testcases { } v_sizeResourceTypeList := lengthof(v_requestPrimitivematrix); - v_createRequest.primitiveContent.any_1[0].Subscription_optional.resourceName := omit; + v_createRequest.primitiveContent.subscription_optional.resourceName := omit; for (i := 0; i<v_sizeResourceTypeList; i := i+1){ v_responsePrimitive := f_CSE_DMR_CRE_BV_001(int23, v_createRequest, v_requestPrimitivematrix[i], v_notifyHandler);//Subscription if(getverdict == pass){ - if(not ispresent(v_responsePrimitive.primitiveContent.any_1[0].Subscription_optional.resourceName)){ + if(not ispresent(v_responsePrimitive.primitiveContent.subscription_optional.resourceName)){ setverdict(fail, testcasename(), ": Error, resourceName attribute not provided"); } } @@ -1214,7 +1361,7 @@ module OneM2M_Testcases { var integer v_parentIndex := -1; var integer v_resourceIndex := -1; var integer v_ae2Index := -1; - var PoaList v_poaList := {"http://" & PX_TESTER_ADDRESS & "/"}; + var PoaList v_poaList := {"http://" & PX_AE2_ADDRESS & "/"}; // Test control @@ -1227,8 +1374,8 @@ module OneM2M_Testcases { for (i := 0; i<v_sizeResourceTypeList; i := i+1){ if(match(int23, p_requestPrimitiveList[i].resourceType)){ - v_ae2Index := f_cse_createResource(int2, m_createAe(PX_APP_ID, -, PX_AE_ID_STEM, "MyAe2", v_poaList), -1); // AE2 is registred - p_requestPrimitiveList[i].primitiveContent.any_1[0].Subscription_optional.notificationURI := {f_getResourceAddress(v_ae2Index)}; + v_ae2Index := f_cse_createResource(int2, m_createAe(PX_APP_ID, -, PX_AE2_ID_STEM, "MyAe2", v_poaList), -1); // AE2 is registred + p_requestPrimitiveList[i].primitiveContent.subscription_optional.notificationURI := {f_getResourceAddress(v_ae2Index)}; p_notifyHandler.start(f_subscriptionVerificationHandler(f_getResourceAddress(v_parentIndex))); } v_parentIndex := f_cse_createResource(p_requestPrimitiveList[i].resourceType, p_requestPrimitiveList[i], v_parentIndex); @@ -1237,8 +1384,8 @@ module OneM2M_Testcases { // Test Body 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 - p_requestPrimitive.primitiveContent.any_1[0].Subscription_optional.notificationURI := {f_getResourceAddress(v_ae2Index)}; + v_ae2Index := f_cse_createResource(int2, m_createAe(PX_APP_ID, -, PX_AE2_ID_STEM, "MyAe2", v_poaList), -1); // AE2 is registred + p_requestPrimitive.primitiveContent.subscription_optional.notificationURI := {f_getResourceAddress(v_ae2Index)}; p_notifyHandler.start(f_subscriptionVerificationHandler(f_getResourceAddress(v_parentIndex))); } @@ -1249,7 +1396,7 @@ module OneM2M_Testcases { alt { [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { tc_ac.stop; - setverdict(pass, testcasename() & ": Resource type " & int2str(enum2int(p_resourceType)) & " created successfuly"); + setverdict(pass, testcasename() & ": Resource type " & int2str(enum2int(p_resourceType)) & " created successfully"); v_resourceIndex := f_setResource(v_response.primitive.responsePrimitive.primitiveContent, v_parentIndex); if (v_sizeResourceTypeList == 0){ vc_resourcesIndexToBeDeleted := vc_resourcesIndexToBeDeleted & {v_resourceIndex}; @@ -1291,10 +1438,10 @@ module OneM2M_Testcases { 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)){ + if(not ispresent(v_responsePrimitive.primitiveContent.container_optional.resourceName)){ setverdict(fail, testcasename(), ": Error, resourceName attribute not provided"); } else { - if(v_responsePrimitive.primitiveContent.any_1[0].Container_optional.resourceName != c_defaultContainerResourceName){ + if(v_responsePrimitive.primitiveContent.container_optional.resourceName != c_defaultContainerResourceName){ setverdict(fail, testcasename(), ": Error, resourceName attribute not correct"); } } @@ -1308,10 +1455,10 @@ module OneM2M_Testcases { v_responsePrimitive := f_CSE_DMR_CRE_BV_002(int9, m_createGroupBase);//group if(getverdict == pass){ - if(not ispresent(v_responsePrimitive.primitiveContent.any_1[0].Group_optional.resourceName)){ + if(not ispresent(v_responsePrimitive.primitiveContent.group_optional.resourceName)){ setverdict(fail, testcasename(), ": Error, resourceName attribute not provided"); } else { - if(v_responsePrimitive.primitiveContent.any_1[0].Group_optional.resourceName != c_defaultGroupResourceName){ + if(v_responsePrimitive.primitiveContent.group_optional.resourceName != c_defaultGroupResourceName){ setverdict(fail, testcasename(), ": Error, resourceName attribute not correct"); } } @@ -1325,10 +1472,10 @@ module OneM2M_Testcases { v_responsePrimitive := f_CSE_DMR_CRE_BV_002(int1, m_createAcpBase );//accessControlPolicy if(getverdict == pass){ - if(not ispresent(v_responsePrimitive.primitiveContent.any_1[0].AccessControlPolicy_optional.resourceName)){ + if(not ispresent(v_responsePrimitive.primitiveContent.accessControlPolicy_optional.resourceName)){ setverdict(fail, testcasename(), ": Error, resourceName attribute not provided"); } else { - if(v_responsePrimitive.primitiveContent.any_1[0].AccessControlPolicy_optional.resourceName != c_defaultAccessControlPolicyResourceName){ + if(v_responsePrimitive.primitiveContent.accessControlPolicy_optional.resourceName != c_defaultAccessControlPolicyResourceName){ setverdict(fail, testcasename(), ": Error, resourceName attribute not correct"); } } @@ -1342,10 +1489,10 @@ module OneM2M_Testcases { v_responsePrimitive := f_CSE_DMR_CRE_BV_002(int18, m_createScheduleBase);//Schedule if(getverdict == pass){ - if(not ispresent(v_responsePrimitive.primitiveContent.any_1[0].Schedule_optional.resourceName)){ + if(not ispresent(v_responsePrimitive.primitiveContent.schedule_optional.resourceName)){ setverdict(fail, testcasename(), ": Error, resourceName attribute not provided"); } else { - if(v_responsePrimitive.primitiveContent.any_1[0].Schedule_optional.resourceName != c_defaultScheduleResourceName){ + if(v_responsePrimitive.primitiveContent.schedule_optional.resourceName != c_defaultScheduleResourceName){ setverdict(fail, testcasename(), ": Error, resourceName attribute not correct"); } } @@ -1358,10 +1505,10 @@ module OneM2M_Testcases { v_responsePrimitive := f_CSE_DMR_CRE_BV_002(int15, m_createPollingChannelBase);//Pollingchannel if(getverdict == pass){ - if(not ispresent(v_responsePrimitive.primitiveContent.any_1[0].PollingChannel_optional.resourceName)){ + if(not ispresent(v_responsePrimitive.primitiveContent.pollingChannel_optional.resourceName)){ setverdict(fail, testcasename(), ": Error, resourceName attribute not provided"); } else { - if(v_responsePrimitive.primitiveContent.any_1[0].PollingChannel_optional.resourceName != c_defaultPollingChannelResourceName){ + if(v_responsePrimitive.primitiveContent.pollingChannel_optional.resourceName != c_defaultPollingChannelResourceName){ setverdict(fail, testcasename(), ": Error, resourceName attribute not correct"); } } @@ -1375,10 +1522,10 @@ module OneM2M_Testcases { v_responsePrimitive := f_CSE_DMR_CRE_BV_002(int23, m_createSubscriptionBase);//Subscription if(getverdict == pass){ - if(not ispresent(v_responsePrimitive.primitiveContent.any_1[0].Subscription_optional.resourceName)){ + if(not ispresent(v_responsePrimitive.primitiveContent.subscription_optional.resourceName)){ setverdict(fail, testcasename(), ": Error, resourceName attribute not provided"); } else { - if(v_responsePrimitive.primitiveContent.any_1[0].Subscription_optional.resourceName != c_defaultSubscriptionResourceName){ + if(v_responsePrimitive.primitiveContent.subscription_optional.resourceName != c_defaultSubscriptionResourceName){ setverdict(fail, testcasename(), ": Error, resourceName attribute not correct"); } } @@ -1414,7 +1561,7 @@ module OneM2M_Testcases { alt { [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { tc_ac.stop; - setverdict(pass, testcasename() & ": Resource type " & int2str(enum2int(p_resourceType)) & " created successfuly"); + setverdict(pass, testcasename() & ": Resource type " & int2str(enum2int(p_resourceType)) & " created successfully"); } [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { tc_ac.stop; @@ -1602,11 +1749,7 @@ module OneM2M_Testcases { v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[v_acpAuxIndex].resource)}, -); // Test Body - if(p_resourceType == int15) { - v_request := valueof(m_createPollingChannel(f_getResourceAddress(v_aeIndex), PX_AE_ID_STEM)); - } else { - v_request := f_getCreateRequestPrimitive(p_resourceType, p_requestPrimitive, v_aeIndex); - } + v_request := f_getCreateRequestPrimitive(p_resourceType, p_requestPrimitive, v_aeIndex); mcaPort.send(m_request(v_request)); tc_ac.start; @@ -1643,42 +1786,39 @@ module OneM2M_Testcases { testcase TC_CSE_DMR_CRE_BV_005_01() runs on CseTester system CseSystem { // Local variables var template RequestPrimitive v_createRequest := m_createContainerBase; - var ResponsePrimitive v_responsePrimitive; var AttributeAux v_invalidAttribute; - v_createRequest.primitiveContent.any_1[0].Container_optional.maxNrOfInstances := 0; + v_createRequest.primitiveContent.container_optional.maxNrOfInstances := 0; v_invalidAttribute := {name := "maxNrOfInstances", value_ := "-1"}; - v_responsePrimitive := f_CSE_DMR_CRE_BV_005(int3, v_createRequest, v_invalidAttribute); + f_CSE_DMR_CRE_BV_005(int3, v_createRequest, v_invalidAttribute); } testcase TC_CSE_DMR_CRE_BV_005_02() runs on CseTester system CseSystem { // Local variables var template RequestPrimitive v_createRequest := m_createContainerBase; - var ResponsePrimitive v_responsePrimitive; var AttributeAux v_invalidAttribute; - v_createRequest.primitiveContent.any_1[0].Container_optional.maxByteSize := 0; + v_createRequest.primitiveContent.container_optional.maxByteSize := 0; v_invalidAttribute := {name := "maxByteSize", value_ := "-1"}; - v_responsePrimitive := f_CSE_DMR_CRE_BV_005(int3, v_createRequest, v_invalidAttribute); + f_CSE_DMR_CRE_BV_005(int3, v_createRequest, v_invalidAttribute); } testcase TC_CSE_DMR_CRE_BV_005_03() runs on CseTester system CseSystem { // Local variables var template RequestPrimitive v_createRequest := m_createContainerBase; - var ResponsePrimitive v_responsePrimitive; var AttributeAux v_invalidAttribute; - v_createRequest.primitiveContent.any_1[0].Container_optional.maxInstanceAge := 0; + v_createRequest.primitiveContent.container_optional.maxInstanceAge := 0; v_invalidAttribute := {name := "maxInstanceAge", value_ := "-1"}; - v_responsePrimitive := f_CSE_DMR_CRE_BV_005(int3, v_createRequest, v_invalidAttribute); + f_CSE_DMR_CRE_BV_005(int3, v_createRequest, v_invalidAttribute); } - function f_CSE_DMR_CRE_BV_005(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, in AttributeAux p_invalidAttribute) runs on CseTester return ResponsePrimitive { + function f_CSE_DMR_CRE_BV_005(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, in AttributeAux p_invalidAttribute) runs on CseTester { // Local variables var MsgIn v_response; @@ -1704,13 +1844,17 @@ module OneM2M_Testcases { [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { tc_ac.stop; setverdict(pass, testcasename() & ": Creation rejected for resource type " & int2str(enum2int(p_resourceType)) & " containing an invalid value for attribute " & p_invalidAttribute.name); - } + } [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { tc_ac.stop; setverdict(fail, testcasename() & ": Accepted creation of resource type " & int2str(enum2int(p_resourceType)) & " containing an invalid value for attribute" & p_invalidAttribute.name); } + [] mcaPort.receive { + tc_ac.stop; + setverdict(fail, testcasename() & ": Incorrect value received"); + } [] tc_ac.timeout { - setverdict(inconc, testcasename() & ": No answer while creating resource type " & int2str(enum2int(p_resourceType))); + setverdict(fail, testcasename() & ": No answer while creating resource type " & int2str(enum2int(p_resourceType))); } } @@ -1719,10 +1863,7 @@ module OneM2M_Testcases { // Tear down f_cf01Down(); - - - return v_response.primitive.responsePrimitive; - + }//end f_CSE_DMR_CRE_BV_005 }// end group g_CSE_DMR_CRE_BV_005 @@ -1737,7 +1878,7 @@ module OneM2M_Testcases { v_responsePrimitive := f_CSE_DMR_CRE_BV_006(int3, v_createRequest); if(getverdict == pass){ - if(not ispresent(v_responsePrimitive.primitiveContent.any_1[0].Container_optional.maxNrOfInstances)){ + if(not ispresent(v_responsePrimitive.primitiveContent.container_optional.maxNrOfInstances)){ setverdict(fail, testcasename(), ": Error, maxNrOfInstances attribute not provided"); } } @@ -1751,7 +1892,7 @@ module OneM2M_Testcases { v_responsePrimitive := f_CSE_DMR_CRE_BV_006(int3, v_createRequest); if(getverdict == pass){ - if(not ispresent(v_responsePrimitive.primitiveContent.any_1[0].Container_optional.maxByteSize)){ + if(not ispresent(v_responsePrimitive.primitiveContent.container_optional.maxByteSize)){ setverdict(fail, testcasename(), ": Error, maxByteSize attribute not provided"); } } @@ -1766,7 +1907,7 @@ module OneM2M_Testcases { v_responsePrimitive := f_CSE_DMR_CRE_BV_006(int3, v_createRequest); if(getverdict == pass){ - if(not ispresent(v_responsePrimitive.primitiveContent.any_1[0].Container_optional.maxInstanceAge)){ + if(not ispresent(v_responsePrimitive.primitiveContent.container_optional.maxInstanceAge)){ setverdict(fail, testcasename(), ": Error, maxInstanceAge attribute not provided"); } } @@ -1840,7 +1981,7 @@ module OneM2M_Testcases { // Preamble v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - v_createRequest.primitiveContent.any_1[0].Container_optional.maxNrOfInstances := c_maxNumberOfInstances; + v_createRequest.primitiveContent.container_optional.maxNrOfInstances := c_maxNumberOfInstances; v_containerIndex := f_cse_createResource(int3, v_createRequest, v_aeIndex); @@ -1897,12 +2038,12 @@ module OneM2M_Testcases { // Preamble v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - v_createRequest.primitiveContent.any_1[0].Container_optional.maxByteSize := c_maxByteSize; + v_createRequest.primitiveContent.container_optional.maxByteSize := c_maxByteSize; v_containerIndex := f_cse_createResource(int3, v_createRequest, v_aeIndex); // Test Body - v_request := f_getCreateRequestPrimitive(int4, m_createContentInstance(f_getResourceAddress(v_containerIndex), "MyValue"), v_aeIndex); + v_request := f_getCreateRequestPrimitive(int4, m_createContentInstanceBase, v_containerIndex); mcaPort.send(m_request(v_request)); tc_ac.start; @@ -1959,19 +2100,19 @@ module OneM2M_Testcases { v_containerIndex := f_cse_createResource(int3, v_createRequest, v_aeIndex); - v_contentInstanceIndex := f_cse_createResource(int4, m_createContentInstance(f_getResourceAddress(v_containerIndex), "MyValue"), v_containerIndex); + v_contentInstanceIndex := f_cse_createResource(int4, m_createContentInstanceBase, v_containerIndex); // Test Body mcaPort.send(m_request(m_retrieveResource(f_getResourceAddress(v_containerIndex), f_getOriginator(v_containerIndex)))); - v_contentResponse.any_1[0].Container_optional := mw_contentContainerBase; + v_contentResponse.container_optional := mw_contentContainerBase; tc_ac.start; alt { [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(v_contentResponse))) -> value v_response { tc_ac.stop; setverdict(pass, testcasename() & ": Response OK for retrieving"); - if(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Container_optional.stateTag == vc_resourcesList[v_containerIndex].resource.any_1[0].Container_optional.stateTag + 1) { + if(v_response.primitive.responsePrimitive.primitiveContent.container_optional.stateTag == vc_resourcesList[v_containerIndex].resource.container_optional.stateTag + 1) { setverdict(pass, testcasename() & ": stateTag attribute increased after creation of contentInstance resource"); } else { setverdict(fail, testcasename() & ": stateTag attribute not incremented correctly after creation of contentInstance resource"); @@ -2004,12 +2145,11 @@ module OneM2M_Testcases { testcase TC_CSE_DMR_CRE_BI_010() runs on CseTester system CseSystem { // Local variables - var template RequestPrimitive v_createRequest := m_createContentInstanceBase; + var template RequestPrimitive v_createRequest := m_createContainerBase; var MsgIn v_response; var RequestPrimitive v_request; var integer v_aeIndex := -1; var integer v_containerIndex := -1; - const XSD.NCName c_contentInstanceName := "la"; // Test control @@ -2024,9 +2164,9 @@ module OneM2M_Testcases { v_containerIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex); // Test Body - v_createRequest.primitiveContent.any_1[0].ContentInstance_optional.resourceName := c_contentInstanceName; + v_createRequest.primitiveContent.container_optional.resourceName := c_resourceShortNameLatest; - v_request := f_getCreateRequestPrimitive(int4, v_createRequest, v_containerIndex); + v_request := f_getCreateRequestPrimitive(int3, v_createRequest, v_containerIndex); mcaPort.send(m_request(v_request)); tc_ac.start; @@ -2035,12 +2175,16 @@ module OneM2M_Testcases { tc_ac.stop; setverdict(pass, testcasename() & ": Not allowed to create a contentInstance resource named 'la'"); } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { + tc_ac.stop; + setverdict(fail, testcasename() & ": Rejected creation of contentInstance named 'la' with wrong ResponseStatusCode"); + } [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { tc_ac.stop; setverdict(fail, testcasename() & ": Accepted creation of contentInstance named 'la'"); } [] tc_ac.timeout { - setverdict(inconc, testcasename() & ": No answer while creating resource type 4"); + setverdict(fail, testcasename() & ": No answer while creating resource type 4"); } } @@ -2058,12 +2202,11 @@ module OneM2M_Testcases { testcase TC_CSE_DMR_CRE_BI_011() runs on CseTester system CseSystem { // Local variables - var template RequestPrimitive v_createRequest := m_createContentInstanceBase; + var template RequestPrimitive v_createRequest := m_createContainerBase; var MsgIn v_response; var RequestPrimitive v_request; var integer v_aeIndex := -1; var integer v_containerIndex := -1; - const XSD.NCName c_contentInstanceName := "ol"; // Test control @@ -2078,9 +2221,9 @@ module OneM2M_Testcases { v_containerIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex); // Test Body - v_createRequest.primitiveContent.any_1[0].ContentInstance_optional.resourceName := c_contentInstanceName; + v_createRequest.primitiveContent.container_optional.resourceName := c_resourceShortNameOldest; - v_request := f_getCreateRequestPrimitive(int4, v_createRequest, v_containerIndex); + v_request := f_getCreateRequestPrimitive(int3, v_createRequest, v_containerIndex); mcaPort.send(m_request(v_request)); tc_ac.start; @@ -2207,7 +2350,7 @@ module OneM2M_Testcases { // Local variables var template PrimitiveContent v_contentResponse; - v_contentResponse.any_1[0].URI := mw_contentContainer_rc2; + v_contentResponse.uRI := mw_contentContainer_rc2; f_CSE_DMR_CRE_BV_013(int3, m_createContainerBase, v_contentResponse);//Container } @@ -2216,7 +2359,7 @@ module OneM2M_Testcases { // Local variables var template PrimitiveContent v_contentResponse; - v_contentResponse.any_1[0].URI := mw_contentGroup_rc2; + v_contentResponse.uRI := mw_contentGroup_rc2; f_CSE_DMR_CRE_BV_013(int9, m_createGroupBase, v_contentResponse);//Group } @@ -2225,7 +2368,7 @@ module OneM2M_Testcases { // Local variables var template PrimitiveContent v_contentResponse; - v_contentResponse.any_1[0].URI := mw_contentAcp_rc2; + v_contentResponse.uRI := mw_contentAcp_rc2; f_CSE_DMR_CRE_BV_013(int1, m_createAcpBase,v_contentResponse);//AccessControlPolicy } @@ -2234,7 +2377,7 @@ module OneM2M_Testcases { // Local variables var template PrimitiveContent v_contentResponse; - v_contentResponse.any_1[0].URI := mw_contentSchedule_rc2; + v_contentResponse.uRI := mw_contentSchedule_rc2; f_CSE_DMR_CRE_BV_013(int18, m_createScheduleBase, v_contentResponse);//Schedule } @@ -2243,7 +2386,7 @@ module OneM2M_Testcases { // Local variables var template PrimitiveContent v_contentResponse; - v_contentResponse.any_1[0].URI := mw_contentPollingChannel_rc2; + v_contentResponse.uRI := mw_contentPollingChannel_rc2; f_CSE_DMR_CRE_BV_013(int15, m_createPollingChannelBase, v_contentResponse);//PollingChannel } @@ -2252,7 +2395,7 @@ module OneM2M_Testcases { // Local variables var template PrimitiveContent v_contentResponse; - v_contentResponse.any_1[0].URI := mw_contentSubscription_rc2; + v_contentResponse.uRI := mw_contentSubscription_rc2; f_CSE_DMR_CRE_BV_013(int23, m_createSubscriptionBase, v_contentResponse);//Subscription } @@ -2314,7 +2457,7 @@ module OneM2M_Testcases { // Local variables var template PrimitiveContent v_contentResponse; - v_contentResponse.any_1[0].Resource := mw_contentContainer_rc3; + v_contentResponse.resource := mw_contentContainer_rc3; f_CSE_DMR_CRE_BV_014(int3, m_createContainerBase, v_contentResponse);//Container } @@ -2323,7 +2466,7 @@ module OneM2M_Testcases { // Local variables var template PrimitiveContent v_contentResponse; - v_contentResponse.any_1[0].Resource := mw_contentGroup_rc3; + v_contentResponse.resource := mw_contentGroup_rc3; f_CSE_DMR_CRE_BV_014(int9, m_createGroupBase, v_contentResponse);//Group } @@ -2332,7 +2475,7 @@ module OneM2M_Testcases { // Local variables var template PrimitiveContent v_contentResponse; - v_contentResponse.any_1[0].Resource := mw_contentAcp_rc3; + v_contentResponse.resource := mw_contentAcp_rc3; f_CSE_DMR_CRE_BV_014(int1, m_createAcpBase,v_contentResponse);//AccessControlPolicy } @@ -2341,7 +2484,7 @@ module OneM2M_Testcases { // Local variables var template PrimitiveContent v_contentResponse; - v_contentResponse.any_1[0].Resource := mw_contentSchedule_rc3; + v_contentResponse.resource := mw_contentSchedule_rc3; f_CSE_DMR_CRE_BV_014(int18, m_createScheduleBase, v_contentResponse);//Schedule } @@ -2350,7 +2493,7 @@ module OneM2M_Testcases { // Local variables var template PrimitiveContent v_contentResponse; - v_contentResponse.any_1[0].Resource := mw_contentPollingChannel_rc3; + v_contentResponse.resource := mw_contentPollingChannel_rc3; f_CSE_DMR_CRE_BV_014(int15, m_createPollingChannelBase, v_contentResponse);//PollingChannel } @@ -2359,7 +2502,7 @@ module OneM2M_Testcases { // Local variables var template PrimitiveContent v_contentResponse; - v_contentResponse.any_1[0].Resource := mw_contentSubscription_rc3; + v_contentResponse.resource := mw_contentSubscription_rc3; f_CSE_DMR_CRE_BV_014(int23, m_createSubscriptionBase, v_contentResponse);//Subscription } @@ -2420,374 +2563,341 @@ module OneM2M_Testcases { testcase TC_CSE_DMR_CRE_BV_015_01() runs on CseTester system CseSystem { // Local variables var template RequestPrimitive v_createRequest := m_createContainerBase; - var ResponsePrimitive v_responsePrimitive; const AttributeAux c_optionalAttribute := {"accessControlPolicyIDs", omit}; - v_createRequest.primitiveContent.any_1[0].Container_optional.accessControlPolicyIDs := {"NotInitialized"}; + v_createRequest.primitiveContent.container_optional.accessControlPolicyIDs := {"NotInitialized"}; - v_responsePrimitive := f_CSE_DMR_CRE_BV_015(int3, v_createRequest, c_optionalAttribute); + f_CSE_DMR_CRE_BV_015(int3, v_createRequest, c_optionalAttribute); } testcase TC_CSE_DMR_CRE_BV_015_02() runs on CseTester system CseSystem { // Local variables var template RequestPrimitive v_createRequest := m_createContainerBase; - var ResponsePrimitive v_responsePrimitive; const AttributeAux c_optionalAttribute := {"expirationTime", omit}; - v_createRequest.primitiveContent.any_1[0].Container_optional.expirationTime := "20301231T012345"; + v_createRequest.primitiveContent.container_optional.expirationTime := "20301231T012345"; - v_responsePrimitive := f_CSE_DMR_CRE_BV_015(int3, v_createRequest, c_optionalAttribute); + f_CSE_DMR_CRE_BV_015(int3, v_createRequest, c_optionalAttribute); } testcase TC_CSE_DMR_CRE_BV_015_03() runs on CseTester system CseSystem { // Local variables var template RequestPrimitive v_createRequest := m_createContainerBase; - var ResponsePrimitive v_responsePrimitive; const AttributeAux c_optionalAttribute := {"labels", omit}; - v_createRequest.primitiveContent.any_1[0].Container_optional.labels := {"MyLabel"}; + v_createRequest.primitiveContent.container_optional.labels := {"MyLabel"}; - v_responsePrimitive := f_CSE_DMR_CRE_BV_015(int3, v_createRequest, c_optionalAttribute); + f_CSE_DMR_CRE_BV_015(int3, v_createRequest, c_optionalAttribute); } testcase TC_CSE_DMR_CRE_BV_015_04() runs on CseTester system CseSystem { // Local variables var template RequestPrimitive v_createRequest := m_createContainerBase; - var ResponsePrimitive v_responsePrimitive; const AttributeAux c_optionalAttribute := {"maxNrOfInstances", omit}; - v_createRequest.primitiveContent.any_1[0].Container_optional.maxNrOfInstances := 0; + v_createRequest.primitiveContent.container_optional.maxNrOfInstances := 0; - v_responsePrimitive := f_CSE_DMR_CRE_BV_015(int3, v_createRequest, c_optionalAttribute); + f_CSE_DMR_CRE_BV_015(int3, v_createRequest, c_optionalAttribute); } testcase TC_CSE_DMR_CRE_BV_015_05() runs on CseTester system CseSystem { // Local variables var template RequestPrimitive v_createRequest := m_createContainerBase; - var ResponsePrimitive v_responsePrimitive; const AttributeAux c_optionalAttribute := {"maxByteSize", omit}; - v_createRequest.primitiveContent.any_1[0].Container_optional.maxByteSize := 0; + v_createRequest.primitiveContent.container_optional.maxByteSize := 0; - v_responsePrimitive := f_CSE_DMR_CRE_BV_015(int3, v_createRequest, c_optionalAttribute); + f_CSE_DMR_CRE_BV_015(int3, v_createRequest, c_optionalAttribute); } testcase TC_CSE_DMR_CRE_BV_015_06() runs on CseTester system CseSystem { // Local variables var template RequestPrimitive v_createRequest := m_createContainerBase; - var ResponsePrimitive v_responsePrimitive; const AttributeAux c_optionalAttribute := {"maxInstanceAge", omit}; - v_createRequest.primitiveContent.any_1[0].Container_optional.maxInstanceAge := 0; + v_createRequest.primitiveContent.container_optional.maxInstanceAge := 0; - v_responsePrimitive := f_CSE_DMR_CRE_BV_015(int3, v_createRequest, c_optionalAttribute); + f_CSE_DMR_CRE_BV_015(int3, v_createRequest, c_optionalAttribute); } testcase TC_CSE_DMR_CRE_BV_015_07() runs on CseTester system CseSystem { // Local variables var template RequestPrimitive v_createRequest := m_createContainerBase; - var ResponsePrimitive v_responsePrimitive; const AttributeAux c_optionalAttribute := {"ontologyRef", omit}; - v_createRequest.primitiveContent.any_1[0].Container_optional.ontologyRef := "MyOntologyRef"; + v_createRequest.primitiveContent.container_optional.ontologyRef := "MyOntologyRef"; - v_responsePrimitive := f_CSE_DMR_CRE_BV_015(int3, v_createRequest, c_optionalAttribute); + f_CSE_DMR_CRE_BV_015(int3, v_createRequest, c_optionalAttribute); } testcase TC_CSE_DMR_CRE_BV_015_08() runs on CseTester system CseSystem {//TODO // Local variables var template RequestPrimitive v_createRequest := m_createContentInstanceBase; - var ResponsePrimitive v_responsePrimitive; const AttributeAux c_optionalAttribute := {"expirationTime", omit}; - v_createRequest.primitiveContent.any_1[0].ContentInstance_optional.expirationTime := "20301231T012345"; + v_createRequest.primitiveContent.contentInstance_optional.expirationTime := "20301231T012345"; - v_responsePrimitive := f_CSE_DMR_CRE_BV_015(int4, v_createRequest, c_optionalAttribute); + f_CSE_DMR_CRE_BV_015(int4, v_createRequest, c_optionalAttribute); } testcase TC_CSE_DMR_CRE_BV_015_09() runs on CseTester system CseSystem {//TODO // Local variables var template RequestPrimitive v_createRequest := m_createContentInstanceBase; - var ResponsePrimitive v_responsePrimitive; const AttributeAux c_optionalAttribute := {"labels", omit}; - v_createRequest.primitiveContent.any_1[0].ContentInstance_optional.labels := {"MyLabel"}; + v_createRequest.primitiveContent.contentInstance_optional.labels := {"MyLabel"}; - v_responsePrimitive := f_CSE_DMR_CRE_BV_015(int4, v_createRequest, c_optionalAttribute); + f_CSE_DMR_CRE_BV_015(int4, v_createRequest, c_optionalAttribute); } testcase TC_CSE_DMR_CRE_BV_015_10() runs on CseTester system CseSystem {//TODO // Local variables var template RequestPrimitive v_createRequest := m_createContentInstanceBase; - var ResponsePrimitive v_responsePrimitive; const AttributeAux c_optionalAttribute := {"creator", omit}; - v_createRequest.primitiveContent.any_1[0].ContentInstance_optional.creator := "MyCreator"; + v_createRequest.primitiveContent.contentInstance_optional.creator := "MyCreator"; - v_responsePrimitive := f_CSE_DMR_CRE_BV_015(int4, v_createRequest, c_optionalAttribute); + f_CSE_DMR_CRE_BV_015(int4, v_createRequest, c_optionalAttribute); } testcase TC_CSE_DMR_CRE_BV_015_11() runs on CseTester system CseSystem {//TODO // Local variables var template RequestPrimitive v_createRequest := m_createContentInstanceBase; - var ResponsePrimitive v_responsePrimitive; const AttributeAux c_optionalAttribute := {"contentInfo", omit}; - v_createRequest.primitiveContent.any_1[0].ContentInstance_optional.contentInfo := "MyContentInfo"; + v_createRequest.primitiveContent.contentInstance_optional.contentInfo := "MyContentInfo"; - v_responsePrimitive := f_CSE_DMR_CRE_BV_015(int4, v_createRequest, c_optionalAttribute); + f_CSE_DMR_CRE_BV_015(int4, v_createRequest, c_optionalAttribute); } testcase TC_CSE_DMR_CRE_BV_015_12() runs on CseTester system CseSystem {//TODO // Local variables var template RequestPrimitive v_createRequest := m_createContentInstanceBase; - var ResponsePrimitive v_responsePrimitive; const AttributeAux c_optionalAttribute := {"ontologyRef", omit}; - v_createRequest.primitiveContent.any_1[0].ContentInstance_optional.ontologyRef := "MyOntologyRef"; + v_createRequest.primitiveContent.contentInstance_optional.ontologyRef := "MyOntologyRef"; - v_responsePrimitive := f_CSE_DMR_CRE_BV_015(int4, v_createRequest, c_optionalAttribute); + f_CSE_DMR_CRE_BV_015(int4, v_createRequest, c_optionalAttribute); } testcase TC_CSE_DMR_CRE_BV_015_13() runs on CseTester system CseSystem { // Local variables var template RequestPrimitive v_createRequest := m_createAcpBase; - var ResponsePrimitive v_responsePrimitive; const AttributeAux c_optionalAttribute := {"expirationTime", omit}; - v_createRequest.primitiveContent.any_1[0].AccessControlPolicy_optional.expirationTime := "20301231T012345"; + v_createRequest.primitiveContent.accessControlPolicy_optional.expirationTime := "20301231T012345"; - v_responsePrimitive := f_CSE_DMR_CRE_BV_015(int1, v_createRequest, c_optionalAttribute); + f_CSE_DMR_CRE_BV_015(int1, v_createRequest, c_optionalAttribute); } testcase TC_CSE_DMR_CRE_BV_015_14() runs on CseTester system CseSystem { // Local variables var template RequestPrimitive v_createRequest := m_createAcpBase; - var ResponsePrimitive v_responsePrimitive; const AttributeAux c_optionalAttribute := {"labels", omit}; - v_createRequest.primitiveContent.any_1[0].AccessControlPolicy_optional.labels := {"MyLabel"}; + v_createRequest.primitiveContent.accessControlPolicy_optional.labels := {"MyLabel"}; - v_responsePrimitive := f_CSE_DMR_CRE_BV_015(int1, v_createRequest, c_optionalAttribute); + f_CSE_DMR_CRE_BV_015(int1, v_createRequest, c_optionalAttribute); } testcase TC_CSE_DMR_CRE_BV_015_15() runs on CseTester system CseSystem { // Local variables var template RequestPrimitive v_createRequest := m_createSubscriptionBase; - var ResponsePrimitive v_responsePrimitive; const AttributeAux c_optionalAttribute := {"accessControlPolicyIDs", omit}; - v_createRequest.primitiveContent.any_1[0].Subscription_optional.accessControlPolicyIDs := {"NotInitialized"}; + v_createRequest.primitiveContent.subscription_optional.accessControlPolicyIDs := {"NotInitialized"}; - v_responsePrimitive := f_CSE_DMR_CRE_BV_015(int3, v_createRequest, c_optionalAttribute); + f_CSE_DMR_CRE_BV_015(int23, v_createRequest, c_optionalAttribute); } testcase TC_CSE_DMR_CRE_BV_015_16() runs on CseTester system CseSystem { // Local variables var template RequestPrimitive v_createRequest := m_createSubscriptionBase; - var ResponsePrimitive v_responsePrimitive; const AttributeAux c_optionalAttribute := {"expirationTime", omit}; - v_createRequest.primitiveContent.any_1[0].Subscription_optional.expirationTime := "20301231T012345"; + v_createRequest.primitiveContent.subscription_optional.expirationTime := "20301231T012345"; - v_responsePrimitive := f_CSE_DMR_CRE_BV_015(int3, v_createRequest, c_optionalAttribute); + f_CSE_DMR_CRE_BV_015(int23, v_createRequest, c_optionalAttribute); } testcase TC_CSE_DMR_CRE_BV_015_17() runs on CseTester system CseSystem { // Local variables var template RequestPrimitive v_createRequest := m_createSubscriptionBase; - var ResponsePrimitive v_responsePrimitive; const AttributeAux c_optionalAttribute := {"labels", omit}; - v_createRequest.primitiveContent.any_1[0].Subscription_optional.labels := {"MyLabel"}; + v_createRequest.primitiveContent.subscription_optional.labels := {"MyLabel"}; - v_responsePrimitive := f_CSE_DMR_CRE_BV_015(int3, v_createRequest, c_optionalAttribute); + f_CSE_DMR_CRE_BV_015(int23, v_createRequest, c_optionalAttribute); } testcase TC_CSE_DMR_CRE_BV_015_18() runs on CseTester system CseSystem { // Local variables var template RequestPrimitive v_createRequest := m_createSubscriptionBase; - var ResponsePrimitive v_responsePrimitive; const AttributeAux c_optionalAttribute := {"eventNotificationCriteria", omit}; - v_createRequest.primitiveContent.any_1[0].Subscription_optional.eventNotificationCriteria := valueof(m_eventNotificationCriteria({int1}, -)); + v_createRequest.primitiveContent.subscription_optional.eventNotificationCriteria := valueof(m_eventNotificationCriteria({int1}, -)); - v_responsePrimitive := f_CSE_DMR_CRE_BV_015(int3, v_createRequest, c_optionalAttribute); + f_CSE_DMR_CRE_BV_015(int23, v_createRequest, c_optionalAttribute); } testcase TC_CSE_DMR_CRE_BV_015_19() runs on CseTester system CseSystem { // Local variables var template RequestPrimitive v_createRequest := m_createSubscriptionBase; - var ResponsePrimitive v_responsePrimitive; const AttributeAux c_optionalAttribute := {"expirationCounter", omit}; - v_createRequest.primitiveContent.any_1[0].Subscription_optional.expirationCounter := 1; + v_createRequest.primitiveContent.subscription_optional.expirationCounter := 1; - v_responsePrimitive := f_CSE_DMR_CRE_BV_015(int3, v_createRequest, c_optionalAttribute); + f_CSE_DMR_CRE_BV_015(int23, v_createRequest, c_optionalAttribute); } testcase TC_CSE_DMR_CRE_BV_015_20() runs on CseTester system CseSystem { // Local variables var template RequestPrimitive v_createRequest := m_createSubscriptionBase; - var ResponsePrimitive v_responsePrimitive; const AttributeAux c_optionalAttribute := {"groupID", omit}; - v_createRequest.primitiveContent.any_1[0].Subscription_optional.groupID := "MyGroupID"; + v_createRequest.primitiveContent.subscription_optional.groupID := "MyGroupID"; - v_responsePrimitive := f_CSE_DMR_CRE_BV_015(int3, v_createRequest, c_optionalAttribute); + f_CSE_DMR_CRE_BV_015(int23, v_createRequest, c_optionalAttribute); } testcase TC_CSE_DMR_CRE_BV_015_21() runs on CseTester system CseSystem { // Local variables var template RequestPrimitive v_createRequest := m_createSubscriptionBase; - var ResponsePrimitive v_responsePrimitive; const AttributeAux c_optionalAttribute := {"notificationForwardingURI", omit}; - v_createRequest.primitiveContent.any_1[0].Subscription_optional.notificationForwardingURI := "MyForwardingURI"; + v_createRequest.primitiveContent.subscription_optional.notificationForwardingURI := "MyForwardingURI"; - v_responsePrimitive := f_CSE_DMR_CRE_BV_015(int3, v_createRequest, c_optionalAttribute); + f_CSE_DMR_CRE_BV_015(int23, v_createRequest, c_optionalAttribute); } testcase TC_CSE_DMR_CRE_BV_015_22() runs on CseTester system CseSystem { // Local variables var template RequestPrimitive v_createRequest := m_createSubscriptionBase; - var ResponsePrimitive v_responsePrimitive; const AttributeAux c_optionalAttribute := {"batchNotify", omit}; - v_createRequest.primitiveContent.any_1[0].Subscription_optional.batchNotify := {0, "PT1S"}; + v_createRequest.primitiveContent.subscription_optional.batchNotify := {0, "PT1S"}; - v_responsePrimitive := f_CSE_DMR_CRE_BV_015(int3, v_createRequest, c_optionalAttribute); + f_CSE_DMR_CRE_BV_015(int23, v_createRequest, c_optionalAttribute); } testcase TC_CSE_DMR_CRE_BV_015_23() runs on CseTester system CseSystem { // Local variables var template RequestPrimitive v_createRequest := m_createSubscriptionBase; - var ResponsePrimitive v_responsePrimitive; const AttributeAux c_optionalAttribute := {"rateLimit", omit}; - v_createRequest.primitiveContent.any_1[0].Subscription_optional.rateLimit := {0, omit}; + v_createRequest.primitiveContent.subscription_optional.rateLimit := {0, omit}; - v_responsePrimitive := f_CSE_DMR_CRE_BV_015(int3, v_createRequest, c_optionalAttribute); + f_CSE_DMR_CRE_BV_015(int23, v_createRequest, c_optionalAttribute); } testcase TC_CSE_DMR_CRE_BV_015_24() runs on CseTester system CseSystem { // Local variables var template RequestPrimitive v_createRequest := m_createSubscriptionBase; - var ResponsePrimitive v_responsePrimitive; const AttributeAux c_optionalAttribute := {"preSubscriptionNotify", omit}; - v_createRequest.primitiveContent.any_1[0].Subscription_optional.preSubscriptionNotify := 1; + v_createRequest.primitiveContent.subscription_optional.preSubscriptionNotify := 1; - v_responsePrimitive := f_CSE_DMR_CRE_BV_015(int3, v_createRequest, c_optionalAttribute); + f_CSE_DMR_CRE_BV_015(int23, v_createRequest, c_optionalAttribute); } testcase TC_CSE_DMR_CRE_BV_015_25() runs on CseTester system CseSystem { // Local variables var template RequestPrimitive v_createRequest := m_createSubscriptionBase; - var ResponsePrimitive v_responsePrimitive; const AttributeAux c_optionalAttribute := {"pendingNotification", omit}; - v_createRequest.primitiveContent.any_1[0].Subscription_optional.pendingNotification := int1; + v_createRequest.primitiveContent.subscription_optional.pendingNotification := int1; - v_responsePrimitive := f_CSE_DMR_CRE_BV_015(int3, v_createRequest, c_optionalAttribute); + f_CSE_DMR_CRE_BV_015(int23, v_createRequest, c_optionalAttribute); } testcase TC_CSE_DMR_CRE_BV_015_26() runs on CseTester system CseSystem { // Local variables var template RequestPrimitive v_createRequest := m_createSubscriptionBase; - var ResponsePrimitive v_responsePrimitive; const AttributeAux c_optionalAttribute := {"notificationStoragePriority", omit}; - v_createRequest.primitiveContent.any_1[0].Subscription_optional.notificationStoragePriority := 1; + v_createRequest.primitiveContent.subscription_optional.notificationStoragePriority := 1; - v_responsePrimitive := f_CSE_DMR_CRE_BV_015(int3, v_createRequest, c_optionalAttribute); + f_CSE_DMR_CRE_BV_015(int23, v_createRequest, c_optionalAttribute); } testcase TC_CSE_DMR_CRE_BV_015_27() runs on CseTester system CseSystem { // Local variables var template RequestPrimitive v_createRequest := m_createSubscriptionBase; - var ResponsePrimitive v_responsePrimitive; const AttributeAux c_optionalAttribute := {"latestNotify", omit}; - v_createRequest.primitiveContent.any_1[0].Subscription_optional.latestNotify := true; + v_createRequest.primitiveContent.subscription_optional.latestNotify := true; - v_responsePrimitive := f_CSE_DMR_CRE_BV_015(int3, v_createRequest, c_optionalAttribute); + f_CSE_DMR_CRE_BV_015(int23, v_createRequest, c_optionalAttribute); } testcase TC_CSE_DMR_CRE_BV_015_28() runs on CseTester system CseSystem { // Local variables var template RequestPrimitive v_createRequest := m_createSubscriptionBase; - var ResponsePrimitive v_responsePrimitive; const AttributeAux c_optionalAttribute := {"notificationContentType", omit}; - v_createRequest.primitiveContent.any_1[0].Subscription_optional.notificationContentType := int1; + v_createRequest.primitiveContent.subscription_optional.notificationContentType := int1; - v_responsePrimitive := f_CSE_DMR_CRE_BV_015(int3, v_createRequest, c_optionalAttribute); + f_CSE_DMR_CRE_BV_015(int23, v_createRequest, c_optionalAttribute); } testcase TC_CSE_DMR_CRE_BV_015_29() runs on CseTester system CseSystem { // Local variables var template RequestPrimitive v_createRequest := m_createSubscriptionBase; - var ResponsePrimitive v_responsePrimitive; const AttributeAux c_optionalAttribute := {"notificationEventCat", omit}; - v_createRequest.primitiveContent.any_1[0].Subscription_optional.notificationEventCat := {alt_1 := 100}; + v_createRequest.primitiveContent.subscription_optional.notificationEventCat := {alt_1 := 100}; - v_responsePrimitive := f_CSE_DMR_CRE_BV_015(int3, v_createRequest, c_optionalAttribute); + f_CSE_DMR_CRE_BV_015(int23, v_createRequest, c_optionalAttribute); } testcase TC_CSE_DMR_CRE_BV_015_30() runs on CseTester system CseSystem { // Local variables var template RequestPrimitive v_createRequest := m_createSubscriptionBase; - var ResponsePrimitive v_responsePrimitive; const AttributeAux c_optionalAttribute := {"creator", omit}; - v_createRequest.primitiveContent.any_1[0].Subscription_optional.creator := "MyCreator"; + v_createRequest.primitiveContent.subscription_optional.creator := "MyCreator"; - v_responsePrimitive := f_CSE_DMR_CRE_BV_015(int3, v_createRequest, c_optionalAttribute); + f_CSE_DMR_CRE_BV_015(int23, v_createRequest, c_optionalAttribute); } testcase TC_CSE_DMR_CRE_BV_015_31() runs on CseTester system CseSystem { // Local variables var template RequestPrimitive v_createRequest := m_createSubscriptionBase; - var ResponsePrimitive v_responsePrimitive; const AttributeAux c_optionalAttribute := {"subscriberURI", omit}; - v_createRequest.primitiveContent.any_1[0].Subscription_optional.subscriberURI := "MySubscriberURI"; + v_createRequest.primitiveContent.subscription_optional.subscriberURI := "MySubscriberURI"; - v_responsePrimitive := f_CSE_DMR_CRE_BV_015(int3, v_createRequest, c_optionalAttribute); + f_CSE_DMR_CRE_BV_015(int23, v_createRequest, c_optionalAttribute); } - - - function f_CSE_DMR_CRE_BV_015(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, in AttributeAux p_optionalAttribute) runs on CseTester return ResponsePrimitive { + function f_CSE_DMR_CRE_BV_015(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, in AttributeAux p_optionalAttribute) runs on CseTester { // Local variables var MsgIn v_response; @@ -2795,6 +2905,8 @@ module OneM2M_Testcases { var integer v_containerIndex := -1; var integer v_parentIndex := -1; var integer v_acpAuxIndex := -1; + var CseTester v_notifyHandler; + var integer v_ae2Index := -1; const XSD.NCName c_accessControlPolicyIDs := "accessControlPolicyIDs"; // Test control @@ -2817,6 +2929,9 @@ module OneM2M_Testcases { v_parentIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + f_cse_preamble_subscriptionVerification(v_notifyHandler, v_parentIndex, v_ae2Index, p_requestPrimitive, p_resourceType); + + if(p_resourceType == int4) { v_containerIndex := f_cse_createResource(int3, m_createContainerBase, v_parentIndex); v_parentIndex := v_containerIndex; @@ -2832,12 +2947,16 @@ module OneM2M_Testcases { tc_ac.stop; setverdict(pass, testcasename() & ": Accepted creation for resource type " & int2str(enum2int(p_resourceType)) & " containing attribute " & p_optionalAttribute.name); } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK())) -> value v_response { + tc_ac.stop; + setverdict(fail, testcasename() & ": Accepted creation for resource type " & int2str(enum2int(p_resourceType)) & " without containing attribute " & p_optionalAttribute.name); + } [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { tc_ac.stop; setverdict(fail, testcasename() & ": Rejected creation of resource type " & int2str(enum2int(p_resourceType)) & " containing attribute" & p_optionalAttribute.name); } [] tc_ac.timeout { - setverdict(inconc, testcasename() & ": No answer while creating resource type " & int2str(enum2int(p_resourceType))); + setverdict(fail, testcasename() & ": No answer while creating resource type " & int2str(enum2int(p_resourceType))); } } @@ -2846,10 +2965,7 @@ module OneM2M_Testcases { // Tear down f_cf01Down(); - - - return v_response.primitive.responsePrimitive; - + }//end f_CSE_DMR_CRE_BV_015 }// end group g_CSE_DMR_CRE_BV_015 @@ -2861,7 +2977,7 @@ module OneM2M_Testcases { var template RequestPrimitive v_createRequest := m_createAcpBase; var ResponsePrimitive v_responsePrimitive; - v_createRequest.primitiveContent.any_1[0].AccessControlPolicy_optional.announceTo := {PX_TESTER_ADDRESS & "/CseBaseTester"}; + v_createRequest.primitiveContent.accessControlPolicy_optional.announceTo := {f_getAnnouncementTargetPoA()}; f_CSE_DMR_CRE_BV_016(int1, v_createRequest, mw_createAccessControlPolicyAnnc);//AccessControlPolicy } @@ -2871,9 +2987,9 @@ module OneM2M_Testcases { var template RequestPrimitive v_createRequest := m_createContainerBase; var ResponsePrimitive v_responsePrimitive; - v_createRequest.primitiveContent.any_1[0].Container_optional.announceTo := {PX_TESTER_ADDRESS}; + v_createRequest.primitiveContent.container_optional.announceTo := {f_getAnnouncementTargetPoA()}; - f_CSE_DMR_CRE_BV_016(int3, v_createRequest, mw_createContainerAnnc);//Container + f_CSE_DMR_CRE_BV_016(int3, v_createRequest, mw_createContainerAnncBase);//Container } testcase TC_CSE_DMR_CRE_BV_016_03() runs on CseTester system CseSystem { @@ -2881,9 +2997,9 @@ module OneM2M_Testcases { var template RequestPrimitive v_createRequest := m_createContentInstanceBase; var ResponsePrimitive v_responsePrimitive; - v_createRequest.primitiveContent.any_1[0].ContentInstance_optional.announceTo := {PX_TESTER_ADDRESS & "/CseBaseTester"}; + v_createRequest.primitiveContent.contentInstance_optional.announceTo := {f_getAnnouncementTargetPoA()}; - f_CSE_DMR_CRE_BV_016(int4, v_createRequest, mw_createContentInstanceAnnc);//ContentInstance + f_CSE_DMR_CRE_BV_016(int4, v_createRequest, mw_createContentInstanceAnncBase);//ContentInstance } testcase TC_CSE_DMR_CRE_BV_016_04() runs on CseTester system CseSystem { @@ -2891,9 +3007,9 @@ module OneM2M_Testcases { var template RequestPrimitive v_createRequest := m_createGroupBase; var ResponsePrimitive v_responsePrimitive; - v_createRequest.primitiveContent.any_1[0].Group_optional.announceTo := {PX_TESTER_ADDRESS & "/CseBaseTester"}; + v_createRequest.primitiveContent.group_optional.announceTo := {f_getAnnouncementTargetPoA()}; - f_CSE_DMR_CRE_BV_016(int9, v_createRequest, mw_createGroupAnnc);//Group + f_CSE_DMR_CRE_BV_016(int9, v_createRequest, mw_createGroupAnncBase);//Group } testcase TC_CSE_DMR_CRE_BV_016_05() runs on CseTester system CseSystem { @@ -2901,9 +3017,9 @@ module OneM2M_Testcases { var template RequestPrimitive v_createRequest := m_createLocationPolicy(int1, omit, omit, omit, omit); var ResponsePrimitive v_responsePrimitive; - v_createRequest.primitiveContent.any_1[0].LocationPolicy_optional.announceTo := {PX_TESTER_ADDRESS & "/CseBaseTester"}; + v_createRequest.primitiveContent.locationPolicy_optional.announceTo := {f_getAnnouncementTargetPoA()}; - f_CSE_DMR_CRE_BV_016(int10, v_createRequest, mw_createLocationPolicyAnnc);//LocationPolicy + f_CSE_DMR_CRE_BV_016(int10, v_createRequest, mw_createLocationPolicyAnncBase);//LocationPolicy } testcase TC_CSE_DMR_CRE_BV_016_06() runs on CseTester system CseSystem { @@ -2911,9 +3027,9 @@ module OneM2M_Testcases { var template RequestPrimitive v_createRequest := m_createMgmtObjBase; var ResponsePrimitive v_responsePrimitive; - v_createRequest.primitiveContent.any_1[0].MgmtObj_optional.announceTo := {PX_TESTER_ADDRESS & "/CseBaseTester"}; + v_createRequest.primitiveContent.mgmtResource_optional.announceTo := {f_getAnnouncementTargetPoA()}; - f_CSE_DMR_CRE_BV_016(int13, v_createRequest, mw_createMgmtObjAnnc);//MgmtObj + f_CSE_DMR_CRE_BV_016(int13, v_createRequest, mw_createMgmtObjAnncBase);//MgmtObj } testcase TC_CSE_DMR_CRE_BV_016_07() runs on CseTester system CseSystem { @@ -2921,7 +3037,7 @@ module OneM2M_Testcases { var template RequestPrimitive v_createRequest := m_createNodeBase; var ResponsePrimitive v_responsePrimitive; - v_createRequest.primitiveContent.any_1[0].Node_optional.announceTo := {PX_TESTER_ADDRESS & "/CseBaseTester"}; + v_createRequest.primitiveContent.node_optional.announceTo := {f_getAnnouncementTargetPoA()}; f_CSE_DMR_CRE_BV_016(int14, v_createRequest, mw_createNodeAnnc);//Node } @@ -2931,9 +3047,9 @@ module OneM2M_Testcases { var template RequestPrimitive v_createRequest := m_createScheduleBase; var ResponsePrimitive v_responsePrimitive; - v_createRequest.primitiveContent.any_1[0].Schedule_optional.announceTo := {PX_TESTER_ADDRESS & "/CseBaseTester"}; + v_createRequest.primitiveContent.schedule_optional.announceTo := {f_getAnnouncementTargetPoA()}; - f_CSE_DMR_CRE_BV_016(int18, v_createRequest, mw_createScheduleAnnc);//Schedule + f_CSE_DMR_CRE_BV_016(int18, v_createRequest, mw_createScheduleAnncBase);//Schedule } function f_CSE_DMR_CRE_BV_016(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, template RequestPrimitive p_requestAnnc) runs on CseTester { @@ -2947,7 +3063,7 @@ module OneM2M_Testcases { // Test control // Test component configuration - f_cf01Up(); + f_cf02Up(); // Test adapter configuration @@ -2986,46 +3102,274 @@ module OneM2M_Testcases { f_cse_postamble_deleteResources(); // Tear down - f_cf01Down(); + f_cf02Down(); }//end f_CSE_DMR_CRE_BV_016 } // end g_CSE_DMR_CRE_BV_016 - }//end group Create - - group Retrieve { - - group g_CSE_DMR_RET_BV_001 { - - testcase TC_CSE_DMR_RET_BV_001_01() runs on CseTester system CseSystem { + group g_CSE_DMR_CRE_BV_017 { + + testcase TC_CSE_DMR_CRE_BV_017_01() runs on CseTester system CseSystem { // Local variables - var ResponsePrimitive v_responsePrimitive; - var template PrimitiveContent v_contentResponse; - - v_contentResponse.any_1[0].Container_optional := mw_contentContainer_rc1; - - v_responsePrimitive := f_CSE_DMR_RET_BV_001(int3, m_createContainerBase, v_contentResponse);//Container + var template RequestPrimitive v_createRequest := m_createContainerBase; + var RequestPrimitive v_requestPrimitive; + var XSD.NonNegativeInteger maxByteSize := 512; //Correct value? Shall be indicated in TP? + + v_createRequest.primitiveContent.container_optional.announceTo := {f_getAnnouncementTargetPoA()}; + v_createRequest.primitiveContent.container_optional.maxByteSize := maxByteSize; + v_createRequest.primitiveContent.container_optional.announcedAttribute := {"maxByteSize"}; //Correct value? Shall be indicated in TP? + + v_requestPrimitive := f_CSE_DMR_CRE_BV_017(int3, v_createRequest, mw_createContainerAnncBase());//Container + if(getverdict == pass){ + //Check if maxByteSize attribute has been announced + if (ispresent(v_requestPrimitive.primitiveContent.containerAnnc_optional.maxByteSize)){ + if(v_requestPrimitive.primitiveContent.containerAnnc_optional.maxByteSize != maxByteSize){ + setverdict(fail, testcasename() & ": Error: Value of maxByteSize has not been announced successfully"); + }else{ + setverdict(pass, testcasename() & ": Value of maxByteSize has been announced successfully"); + } + }else{ + setverdict(fail, testcasename() & ": Error: maxByteSize has not been announced"); + } + } } - - testcase TC_CSE_DMR_RET_BV_001_02() runs on CseTester system CseSystem { + + testcase TC_CSE_DMR_CRE_BV_017_02() runs on CseTester system CseSystem { // Local variables - var ResponsePrimitive v_responsePrimitive; - var template PrimitiveContent v_contentResponse; - - v_contentResponse.any_1[0].Group_optional := mw_contentGroup_rc1; - - v_responsePrimitive := f_CSE_DMR_RET_BV_001(int9, m_createGroupBase, v_contentResponse);//Group + var template RequestPrimitive v_createRequest := m_createContentInstanceBase; + var RequestPrimitive v_requestPrimitive; + var XSD.NonNegativeInteger contentSize := 512; //Correct value? Shall be indicated in TP? + + v_createRequest.primitiveContent.contentInstance_optional.announceTo := {f_getAnnouncementTargetPoA()}; + v_createRequest.primitiveContent.contentInstance_optional.contentSize := contentSize; + v_createRequest.primitiveContent.contentInstance_optional.announcedAttribute := {"contentSize"}; //Correct value? Shall be indicated in TP? + + v_requestPrimitive := f_CSE_DMR_CRE_BV_017(int4, v_createRequest, mw_createContentInstanceAnncBase());//ContentInstance + if(getverdict == pass){ + //Check if contentSize attribute has been announced + if (ispresent(v_requestPrimitive.primitiveContent.contentInstanceAnnc_optional.contentSize)){ + if(v_requestPrimitive.primitiveContent.contentInstanceAnnc_optional.contentSize != contentSize){ + setverdict(fail, testcasename() & ": Error: Value of contentSize has not been announced successfully"); + }else{ + setverdict(pass, testcasename() & ": Value of contentSize has been announced successfully"); + } + }else{ + setverdict(fail, testcasename() & ": Error: contentSize has not been announced"); + } + } } - - testcase TC_CSE_DMR_RET_BV_001_03() runs on CseTester system CseSystem { + + testcase TC_CSE_DMR_CRE_BV_017_03() runs on CseTester system CseSystem { // Local variables - var ResponsePrimitive v_responsePrimitive; - var template PrimitiveContent v_contentResponse; + var template RequestPrimitive v_createRequest := m_createGroupBase; + var RequestPrimitive v_requestPrimitive; + var XSD.PositiveInteger maxNrOfMembers := 10; //Correct value? Shall be indicated in TP? + + v_createRequest.primitiveContent.group_optional.announceTo := {f_getAnnouncementTargetPoA()}; + v_createRequest.primitiveContent.group_optional.maxNrOfMembers := maxNrOfMembers; + v_createRequest.primitiveContent.group_optional.announcedAttribute := {"maxNrOfMembers"}; //Correct value? Shall be indicated in TP? + + v_requestPrimitive := f_CSE_DMR_CRE_BV_017(int9, v_createRequest, mw_createGroupAnncBase());//Group + + if(getverdict == pass){ + //Check if maxNrOfMembers attribute has been announced + if (ispresent(v_requestPrimitive.primitiveContent.groupAnnc_optional.maxNrOfMembers)){ + if(v_requestPrimitive.primitiveContent.groupAnnc_optional.maxNrOfMembers != maxNrOfMembers){ + setverdict(fail, testcasename() & ": Error: Value of maxNrOfMembers has not been announced successfully"); + }else{ + setverdict(pass, testcasename() & ": Value of maxNrOfMembers has been announced successfully"); + } + }else{ + setverdict(fail, testcasename() & ": Error: maxNrOfMembers has not been announced"); + } + } + } + + testcase TC_CSE_DMR_CRE_BV_017_04() runs on CseTester system CseSystem { + // Local variables + var template RequestPrimitive v_createRequest := m_createLocationPolicy(int1, omit, omit, omit, omit); + var RequestPrimitive v_requestPrimitive; + var LocationSource locationSource := int1;//Network-based //Correct value? Shall be indicated in TP? + + v_createRequest.primitiveContent.locationPolicy_optional.announceTo := {f_getAnnouncementTargetPoA()}; + v_createRequest.primitiveContent.locationPolicy_optional.locationSource := locationSource; + v_createRequest.primitiveContent.locationPolicy_optional.announcedAttribute := {"locationSource"}; //Correct value? Shall be indicated in TP? + + v_requestPrimitive := f_CSE_DMR_CRE_BV_017(int10, v_createRequest, mw_createLocationPolicyAnncBase());//LocationPolicy + + if(getverdict == pass){ + //Check if locationSource attribute has been announced + if (ispresent(v_requestPrimitive.primitiveContent.locationPolicyAnnc_optional.locationSource)){ + if(v_requestPrimitive.primitiveContent.locationPolicyAnnc_optional.locationSource != locationSource){ + setverdict(fail, testcasename() & ": Error: Value of locationSource has not been announced successfully"); + }else{ + setverdict(pass, testcasename() & ": Value of locationSource has been announced successfully"); + } + }else{ + setverdict(fail, testcasename() & ": Error: locationSource has not been announced"); + } + } + } + + testcase TC_CSE_DMR_CRE_BV_017_05() runs on CseTester system CseSystem { + // Local variables + var template RequestPrimitive v_createRequest := m_createMgmtObjBase; + var RequestPrimitive v_requestPrimitive; + var XSD.String description := "Description of mgmtObj"; //Correct value? Shall be indicated in TP? + + v_createRequest.primitiveContent.mgmtResource_optional.announceTo := {f_getAnnouncementTargetPoA()}; + v_createRequest.primitiveContent.mgmtResource_optional.description := description; + v_createRequest.primitiveContent.mgmtResource_optional.announcedAttribute := {"description"}; //Correct value? Shall be indicated in TP? + + v_requestPrimitive := f_CSE_DMR_CRE_BV_017(int13, v_createRequest, mw_createMgmtObjAnncBase());//MgmtObj + + if(getverdict == pass){ + //Check if description attribute has been announced + if (ispresent(v_requestPrimitive.primitiveContent.announcedMgmtResource_optional.description)){ + if(v_requestPrimitive.primitiveContent.announcedMgmtResource_optional.description != description){ + setverdict(fail, testcasename() & ": Error: Value of description has not been announced successfully"); + }else{ + setverdict(pass, testcasename() & ": Value of description has been announced successfully"); + } + }else{ + setverdict(fail, testcasename() & ": Error: description has not been announced"); + } + } + } + + testcase TC_CSE_DMR_CRE_BV_017_06() runs on CseTester system CseSystem { + // Local variables + var template RequestPrimitive v_createRequest := m_createNodeBase; + var RequestPrimitive v_requestPrimitive; + + v_createRequest.primitiveContent.node_optional.announceTo := {f_getAnnouncementTargetPoA()}; + + //TODO node to be done. hostedCSELink attribute (OA) to be added!!! + + v_requestPrimitive := f_CSE_DMR_CRE_BV_017(int14, v_createRequest, mw_createNodeAnnc);//Node + } + + testcase TC_CSE_DMR_CRE_BV_017_07() runs on CseTester system CseSystem { + // Local variables + var template RequestPrimitive v_createRequest := m_createScheduleBase; + var RequestPrimitive v_requestPrimitive; + var ScheduleEntries scheduleElement := {{"0,0,0 1 2,1,1,*"}}; + + v_createRequest.primitiveContent.schedule_optional.announceTo := {f_getAnnouncementTargetPoA()}; + v_createRequest.primitiveContent.schedule_optional.scheduleElement := scheduleElement; //Correct value? Shall be indicated in TP? + v_createRequest.primitiveContent.schedule_optional.announcedAttribute := {"scheduleElement"}; //Correct value? Shall be indicated in TP? + + v_requestPrimitive := f_CSE_DMR_CRE_BV_017(int18, v_createRequest, mw_createScheduleAnncBase());//Schedule + + if(getverdict == pass){ + //Check if scheduleElement attribute has been announced + if (ispresent(v_requestPrimitive.primitiveContent.scheduleAnnc_optional.scheduleElement)){ + if(v_requestPrimitive.primitiveContent.scheduleAnnc_optional.scheduleElement != scheduleElement){ + setverdict(fail, testcasename() & ": Error: Value of scheduleElement has not been announced successfully"); + }else{ + setverdict(pass, testcasename() & ": Value of scheduleElement has been announced successfully"); + } + }else{ + setverdict(fail, testcasename() & ": Error: scheduleElement has not been announced"); + } + } + } + + function f_CSE_DMR_CRE_BV_017(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, template RequestPrimitive p_requestAnnc) runs on CseTester return RequestPrimitive{ + + // Local variables + var MsgIn v_anncRequest; + var RequestPrimitive v_request; + var integer v_parentIndex := -1; + var integer v_containerIndex := -1; + + // Test control + + // Test component configuration + f_cf02Up(); + + // Test adapter configuration + + // Preamble + v_parentIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + + if(p_resourceType == int4) { + v_containerIndex := f_cse_createResource(int3, m_createContainerBase, v_parentIndex); + v_parentIndex := v_containerIndex; + } + + // Test Body + v_request := f_getCreateRequestPrimitive(p_resourceType, p_requestPrimitive, v_parentIndex); + + mcaPort.send(m_request(v_request)); + tc_ac.start; + alt { + [] mccPort.receive(mw_request(p_requestAnnc)) -> value v_anncRequest { + tc_ac.stop; + setverdict(pass, testcasename() & ": No content provided with RC set to 0"); + } + [] mccPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_anncRequest { + tc_ac.stop; + setverdict(fail, testcasename() & ": Content provided with RC set to 0"); + } + [] mccPort.receive(mw_response(mw_responsePrimitiveKO)) { + tc_ac.stop; + setverdict(fail, testcasename() & ": Error while creating resource"); + } + [] tc_ac.timeout { + setverdict(inconc, testcasename() & ": No answer while creating resource"); + } + } + + // Postamble + f_cse_postamble_deleteResources(); + + // Tear down + f_cf02Down(); + + return v_anncRequest.primitive.requestPrimitive; + + }//end f_CSE_DMR_CRE_BV_017 + + } // end g_CSE_DMR_CRE_BV_017 + + }//end group Create + + group Retrieve { + + group g_CSE_DMR_RET_BV_001 { + + testcase TC_CSE_DMR_RET_BV_001_01() runs on CseTester system CseSystem { + // Local variables + var ResponsePrimitive v_responsePrimitive; + var template PrimitiveContent v_contentResponse; - v_contentResponse.any_1[0].AccessControlPolicy_optional := mw_contentAcp_rc1; + v_contentResponse.container_optional := mw_contentContainer_rc1; + + v_responsePrimitive := f_CSE_DMR_RET_BV_001(int3, m_createContainerBase, v_contentResponse);//Container + + } + + testcase TC_CSE_DMR_RET_BV_001_02() runs on CseTester system CseSystem { + // Local variables + var ResponsePrimitive v_responsePrimitive; + var template PrimitiveContent v_contentResponse; + + v_contentResponse.group_optional := mw_contentGroup_rc1; + + v_responsePrimitive := f_CSE_DMR_RET_BV_001(int9, m_createGroupBase, v_contentResponse);//Group + + } + + testcase TC_CSE_DMR_RET_BV_001_03() runs on CseTester system CseSystem { + // Local variables + var ResponsePrimitive v_responsePrimitive; + var template PrimitiveContent v_contentResponse; + + v_contentResponse.accessControlPolicy_optional := mw_contentAcp_rc1; v_responsePrimitive := f_CSE_DMR_RET_BV_001(int1, m_createAcpBase, v_contentResponse);//AccessControlPolicy @@ -3036,7 +3380,7 @@ module OneM2M_Testcases { var ResponsePrimitive v_responsePrimitive; var template PrimitiveContent v_contentResponse; - v_contentResponse.any_1[0].Schedule_optional := mw_contentSchedule_rc1; + v_contentResponse.schedule_optional := mw_contentSchedule_rc1; v_responsePrimitive := f_CSE_DMR_RET_BV_001(int18, m_createScheduleBase, v_contentResponse);//Schedule @@ -3047,7 +3391,7 @@ module OneM2M_Testcases { var ResponsePrimitive v_responsePrimitive; var template PrimitiveContent v_contentResponse; - v_contentResponse.any_1[0].PollingChannel_optional := mw_contentPollingChannelBase; + v_contentResponse.pollingChannel_optional := mw_contentPollingChannelBase; v_responsePrimitive := f_CSE_DMR_RET_BV_001(int15, m_createPollingChannelBase, v_contentResponse);//PollingChannel @@ -3058,7 +3402,7 @@ module OneM2M_Testcases { var ResponsePrimitive v_responsePrimitive; var template PrimitiveContent v_contentResponse; - v_contentResponse.any_1[0].Subscription_optional := mw_contentSubscription_rc1; + v_contentResponse.subscription_optional := mw_contentSubscription_rc1; v_responsePrimitive := f_CSE_DMR_RET_BV_001(int23, m_createSubscriptionBase, v_contentResponse);//Subscription @@ -3197,7 +3541,7 @@ module OneM2M_Testcases { // Local variables var template RequestPrimitive v_requestPrimitive := m_createAcpBase; - v_requestPrimitive.primitiveContent.any_1[0].AccessControlPolicy_optional.selfPrivileges.accessControlRule_list[0].accessControlOperations := int61; + v_requestPrimitive.primitiveContent.accessControlPolicy_optional.selfPrivileges.accessControlRule_list[0].accessControlOperations := int61; f_CSE_DMR_RET_BO_003(int1, v_requestPrimitive);//AccessControlPolicy } @@ -3293,8 +3637,8 @@ module OneM2M_Testcases { // Local variables var template PrimitiveContent v_contentResponse; - v_contentResponse.any_1[0].Container_optional := m_contentContainer_allOmit; - v_contentResponse.any_1[0].Container_optional.parentID := ?; + v_contentResponse.container_optional := m_contentContainer_allOmit; + v_contentResponse.container_optional.parentID := ?; f_CSE_DMR_RET_BV_004(int3, m_createContainerBase, v_contentResponse);//Container } @@ -3303,8 +3647,8 @@ module OneM2M_Testcases { // Local variables var template PrimitiveContent v_contentResponse; - v_contentResponse.any_1[0].Group_optional := m_contentGroup_allOmit; - v_contentResponse.any_1[0].Group_optional.parentID := ?; + v_contentResponse.group_optional := m_contentGroup_allOmit; + v_contentResponse.group_optional.parentID := ?; f_CSE_DMR_RET_BV_004(int9, m_createGroupBase, v_contentResponse);//Group } @@ -3313,8 +3657,8 @@ module OneM2M_Testcases { // Local variables var template PrimitiveContent v_contentResponse; - v_contentResponse.any_1[0].AccessControlPolicy_optional := m_contentAcp_allOmit; - v_contentResponse.any_1[0].AccessControlPolicy_optional.parentID := ?; + v_contentResponse.accessControlPolicy_optional := m_contentAcp_allOmit; + v_contentResponse.accessControlPolicy_optional.parentID := ?; f_CSE_DMR_RET_BV_004(int1, m_createAcpBase, v_contentResponse);//AccessControlPolicy } @@ -3323,8 +3667,8 @@ module OneM2M_Testcases { // Local variables var template PrimitiveContent v_contentResponse; - v_contentResponse.any_1[0].Schedule_optional := m_contentSchedule_allOmit; - v_contentResponse.any_1[0].Schedule_optional.parentID := ?; + v_contentResponse.schedule_optional := m_contentSchedule_allOmit; + v_contentResponse.schedule_optional.parentID := ?; f_CSE_DMR_RET_BV_004(int18, m_createScheduleBase,v_contentResponse);//Schedule } @@ -3333,8 +3677,8 @@ module OneM2M_Testcases { // Local variables var template PrimitiveContent v_contentResponse; - v_contentResponse.any_1[0].PollingChannel_optional := m_contentPollingChannel_allOmit; - v_contentResponse.any_1[0].PollingChannel_optional.parentID := ?; + v_contentResponse.pollingChannel_optional := m_contentPollingChannel_allOmit; + v_contentResponse.pollingChannel_optional.parentID := ?; f_CSE_DMR_RET_BV_004(int15, m_createPollingChannelBase, v_contentResponse);//PollingChannel } @@ -3343,8 +3687,8 @@ module OneM2M_Testcases { // Local variables var template PrimitiveContent v_contentResponse; - v_contentResponse.any_1[0].Subscription_optional := m_contentSubscription_allOmit; - v_contentResponse.any_1[0].Subscription_optional.parentID := ?; + v_contentResponse.subscription_optional := m_contentSubscription_allOmit; + v_contentResponse.subscription_optional.parentID := ?; f_CSE_DMR_RET_BV_004(int23, m_createSubscriptionBase, v_contentResponse);//Subscription } @@ -3381,7 +3725,7 @@ module OneM2M_Testcases { alt { [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(p_contentResponse))) -> value v_response { tc_ac.stop; - setverdict(pass, testcasename() & ": Requested attribute retrieved successfuly"); + setverdict(pass, testcasename() & ": Requested attribute retrieved successfully"); } [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { tc_ac.stop; @@ -3413,8 +3757,8 @@ module OneM2M_Testcases { // Local variables var template PrimitiveContent v_contentResponse; - v_contentResponse.any_1[0].Container_optional := m_contentContainer_allOmit; - v_contentResponse.any_1[0].Container_optional.parentID := ?; + v_contentResponse.container_optional := m_contentContainer_allOmit; + v_contentResponse.container_optional.parentID := ?; f_CSE_DMR_RET_BV_005(int3, m_createContainerBase, v_contentResponse);//Container } @@ -3423,8 +3767,8 @@ module OneM2M_Testcases { // Local variables var template PrimitiveContent v_contentResponse; - v_contentResponse.any_1[0].Group_optional := m_contentGroup_allOmit; - v_contentResponse.any_1[0].Group_optional.parentID := ?; + v_contentResponse.group_optional := m_contentGroup_allOmit; + v_contentResponse.group_optional.parentID := ?; f_CSE_DMR_RET_BV_005(int9, m_createGroupBase, v_contentResponse);//Group } @@ -3433,8 +3777,8 @@ module OneM2M_Testcases { // Local variables var template PrimitiveContent v_contentResponse; - v_contentResponse.any_1[0].AccessControlPolicy_optional := m_contentAcp_allOmit; - v_contentResponse.any_1[0].AccessControlPolicy_optional.parentID := ?; + v_contentResponse.accessControlPolicy_optional := m_contentAcp_allOmit; + v_contentResponse.accessControlPolicy_optional.parentID := ?; f_CSE_DMR_RET_BV_005(int1, m_createAcpBase, v_contentResponse);//AccessControlPolicy } @@ -3443,8 +3787,8 @@ module OneM2M_Testcases { // Local variables var template PrimitiveContent v_contentResponse; - v_contentResponse.any_1[0].Schedule_optional := m_contentSchedule_allOmit; - v_contentResponse.any_1[0].Schedule_optional.parentID := ?; + v_contentResponse.schedule_optional := m_contentSchedule_allOmit; + v_contentResponse.schedule_optional.parentID := ?; f_CSE_DMR_RET_BV_005(int18, m_createScheduleBase, v_contentResponse);//Schedule } @@ -3453,8 +3797,8 @@ module OneM2M_Testcases { // Local variables var template PrimitiveContent v_contentResponse; - v_contentResponse.any_1[0].PollingChannel_optional := m_contentPollingChannel_allOmit; - v_contentResponse.any_1[0].PollingChannel_optional.parentID := ?; + v_contentResponse.pollingChannel_optional := m_contentPollingChannel_allOmit; + v_contentResponse.pollingChannel_optional.parentID := ?; f_CSE_DMR_RET_BV_005(int15, m_createPollingChannelBase, v_contentResponse);//PollingChannel } @@ -3463,8 +3807,8 @@ module OneM2M_Testcases { // Local variables var template PrimitiveContent v_contentResponse; - v_contentResponse.any_1[0].Subscription_optional := m_contentSubscription_allOmit; - v_contentResponse.any_1[0].Subscription_optional.parentID := ?; + v_contentResponse.subscription_optional := m_contentSubscription_allOmit; + v_contentResponse.subscription_optional.parentID := ?; f_CSE_DMR_RET_BV_005(int23, m_createSubscriptionBase, v_contentResponse);//Subscription } @@ -3501,7 +3845,7 @@ module OneM2M_Testcases { alt { [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(p_contentResponse))) -> value v_response { tc_ac.stop; - setverdict(pass, testcasename() & ": Requested attribute retrieved successfuly"); + setverdict(pass, testcasename() & ": Requested attribute retrieved successfully"); } [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { tc_ac.stop; @@ -3533,9 +3877,9 @@ module OneM2M_Testcases { // Local variables var template PrimitiveContent v_contentResponse; - v_contentResponse.any_1[0].Container_optional := m_contentContainer_allOmit; - v_contentResponse.any_1[0].Container_optional.parentID := ?; - v_contentResponse.any_1[0].Container_optional.creationTime := ?; + v_contentResponse.container_optional := m_contentContainer_allOmit; + v_contentResponse.container_optional.parentID := ?; + v_contentResponse.container_optional.creationTime := ?; f_CSE_DMR_RET_BV_006(int3, m_createContainerBase, v_contentResponse);//Container } @@ -3544,9 +3888,9 @@ module OneM2M_Testcases { // Local variables var template PrimitiveContent v_contentResponse; - v_contentResponse.any_1[0].Group_optional := m_contentGroup_allOmit; - v_contentResponse.any_1[0].Group_optional.parentID := ?; - v_contentResponse.any_1[0].Group_optional.creationTime := ?; + v_contentResponse.group_optional := m_contentGroup_allOmit; + v_contentResponse.group_optional.parentID := ?; + v_contentResponse.group_optional.creationTime := ?; f_CSE_DMR_RET_BV_006(int9, m_createGroupBase, v_contentResponse);//Group } @@ -3555,9 +3899,9 @@ module OneM2M_Testcases { // Local variables var template PrimitiveContent v_contentResponse; - v_contentResponse.any_1[0].AccessControlPolicy_optional := m_contentAcp_allOmit; - v_contentResponse.any_1[0].AccessControlPolicy_optional.parentID := ?; - v_contentResponse.any_1[0].AccessControlPolicy_optional.creationTime := ?; + v_contentResponse.accessControlPolicy_optional := m_contentAcp_allOmit; + v_contentResponse.accessControlPolicy_optional.parentID := ?; + v_contentResponse.accessControlPolicy_optional.creationTime := ?; f_CSE_DMR_RET_BV_006(int1, m_createAcpBase, v_contentResponse);//AccessControlPolicy } @@ -3566,9 +3910,9 @@ module OneM2M_Testcases { // Local variables var template PrimitiveContent v_contentResponse; - v_contentResponse.any_1[0].Schedule_optional := m_contentSchedule_allOmit; - v_contentResponse.any_1[0].Schedule_optional.parentID := ?; - v_contentResponse.any_1[0].Schedule_optional.creationTime := ?; + v_contentResponse.schedule_optional := m_contentSchedule_allOmit; + v_contentResponse.schedule_optional.parentID := ?; + v_contentResponse.schedule_optional.creationTime := ?; f_CSE_DMR_RET_BV_006(int18, m_createScheduleBase, v_contentResponse);//Schedule } @@ -3577,9 +3921,9 @@ module OneM2M_Testcases { // Local variables var template PrimitiveContent v_contentResponse; - v_contentResponse.any_1[0].PollingChannel_optional := m_contentPollingChannel_allOmit; - v_contentResponse.any_1[0].PollingChannel_optional.parentID := ?; - v_contentResponse.any_1[0].PollingChannel_optional.creationTime := ?; + v_contentResponse.pollingChannel_optional := m_contentPollingChannel_allOmit; + v_contentResponse.pollingChannel_optional.parentID := ?; + v_contentResponse.pollingChannel_optional.creationTime := ?; f_CSE_DMR_RET_BV_006(int15, m_createPollingChannelBase, v_contentResponse);//PollingChannel } @@ -3588,9 +3932,9 @@ module OneM2M_Testcases { // Local variables var template PrimitiveContent v_contentResponse; - v_contentResponse.any_1[0].Subscription_optional := m_contentSubscription_allOmit; - v_contentResponse.any_1[0].Subscription_optional.parentID := ?; - v_contentResponse.any_1[0].Subscription_optional.creationTime := ?; + v_contentResponse.subscription_optional := m_contentSubscription_allOmit; + v_contentResponse.subscription_optional.parentID := ?; + v_contentResponse.subscription_optional.creationTime := ?; f_CSE_DMR_RET_BV_006(int23, m_createSubscriptionBase, v_contentResponse);//Subscription } @@ -3628,7 +3972,7 @@ module OneM2M_Testcases { alt { [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(p_contentResponse))) -> value v_response { tc_ac.stop; - setverdict(pass, testcasename() & ": Requested attributes retrieved successfuly"); + setverdict(pass, testcasename() & ": Requested attributes retrieved successfully"); } [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { tc_ac.stop; @@ -3844,76 +4188,301 @@ module OneM2M_Testcases { }//end f_CSE_DMR_RET_BO_008 } // end f_CSE_DMR_RET_BO_008 + + group g_CSE_DMR_RET_BO_009{ + + testcase TC_CSE_DMR_RET_BO_009() runs on CseTester system CseSystem { + // Local variables + var RequestPrimitive v_request; + var integer v_aeIndex := -1; + var integer v_containerIndex := -1; + var integer v_resourceIndex := -1; + + // Test control + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + + v_containerIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex); + + // Test Body + mcaPort.send(m_request(m_retrieveResource(f_getResourceAddress(v_containerIndex) & "/" & c_resourceShortNameLatest, f_getOriginator(v_containerIndex)))); + + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int4004))){ + tc_ac.stop; + setverdict(pass, testcasename() & ": Resource not found"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { + tc_ac.stop; + setverdict(fail, testcasename() & ": Error while retrieving resource"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) { + tc_ac.stop; + setverdict(fail, testcasename() & ": Error while retrieving resource"); + } + [] tc_ac.timeout { + setverdict(inconc, testcasename() & ": No answer while retrieving resource"); + } + } + + // Postamble + f_cse_postamble_deleteResources(); + + // Tear down + f_cf01Down(); + + }//end TC_CSE_DMR_RET_BO_009 + + } // end group g_CSE_DMR_RET_BO_009 + + group g_CSE_DMR_RET_BV_010{ + + testcase TC_CSE_DMR_RET_BV_010() runs on CseTester system CseSystem { + // Local variables + var RequestPrimitive v_request; + var integer v_aeIndex := -1; + var integer v_containerIndex := -1; + var integer v_contentInstanceIndex1 := -1; + var integer v_contentInstanceIndex2 := -1; + var template PrimitiveContent v_contentResponse; + + // Test control + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + + v_containerIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex); + + v_contentInstanceIndex1 := f_cse_createResource(int4, m_createContentInstance_noResourceName, v_containerIndex); + + v_contentInstanceIndex2 := f_cse_createResource(int4, m_createContentInstance_noResourceName, v_containerIndex); + + v_contentResponse.contentInstance_optional := mw_contentContentInstanceBase; + v_contentResponse.contentInstance_optional.resourceName := vc_resourcesList[v_contentInstanceIndex1].resource.contentInstance_optional.resourceName; + + // Test Body + mcaPort.send(m_request(m_retrieveResource(f_getResourceAddress(v_containerIndex) & "/" & c_resourceShortNameOldest, f_getOriginator(v_containerIndex)))); + + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(v_contentResponse))){ + tc_ac.stop; + setverdict(pass, testcasename() & ": resourceName attribute of <oldest> resource retrieved successfully"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)){ + tc_ac.stop; + setverdict(fail, testcasename() & ": Error, resourceName attribute of <oldest> resource value not expected"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)){ + tc_ac.stop; + setverdict(fail, testcasename() & ": Error while retrieving <oldest> resource"); + } + [] tc_ac.timeout { + setverdict(inconc, testcasename() & ": No answer while retrieving <oldest> resource"); + } + } + + // Postamble + f_cse_postamble_deleteResources(); + + // Tear down + f_cf01Down(); + + }//end TC_CSE_DMR_RET_BV_010 + + } // end group g_CSE_DMR_RET_BV_010 + + group g_CSE_DMR_RET_BO_011{ + + testcase TC_CSE_DMR_RET_BO_011() runs on CseTester system CseSystem { + // Local variables + var RequestPrimitive v_request; + var integer v_aeIndex := -1; + var integer v_containerIndex := -1; + var integer v_resourceIndex := -1; + + // Test control + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + + v_containerIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex); + + // Test Body + mcaPort.send(m_request(m_retrieveResource(f_getResourceAddress(v_containerIndex) & "/" & c_resourceShortNameOldest, f_getOriginator(v_containerIndex)))); + + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int4004))){ + tc_ac.stop; + setverdict(pass, testcasename() & ": Resource not found"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { + tc_ac.stop; + setverdict(fail, testcasename() & ": Error while retrieving resource"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) { + tc_ac.stop; + setverdict(fail, testcasename() & ": Error while retrieving resource"); + } + [] tc_ac.timeout { + setverdict(inconc, testcasename() & ": No answer while retrieving resource"); + } + } + + // Postamble + f_cse_postamble_deleteResources(); + + // Tear down + f_cf01Down(); + + }//end TC_CSE_DMR_RET_BO_011 + + } // end group g_CSE_DMR_RET_BO_011 + + group g_CSE_DMR_RET_BV_012{ + + testcase TC_CSE_DMR_RET_BV_012() runs on CseTester system CseSystem { + // Local variables + var RequestPrimitive v_request; + var integer v_aeIndex := -1; + var integer v_containerIndex := -1; + var integer v_contentInstanceIndex1 := -1; + var integer v_contentInstanceIndex2 := -1; + var template PrimitiveContent v_contentResponse; + + // Test control + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + + v_containerIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex); + + v_contentInstanceIndex1 := f_cse_createResource(int4, m_createContentInstance_noResourceName, v_containerIndex); + + v_contentInstanceIndex2 := f_cse_createResource(int4, m_createContentInstance_noResourceName, v_containerIndex); + + v_contentResponse.contentInstance_optional := mw_contentContentInstanceBase; + v_contentResponse.contentInstance_optional.resourceName := vc_resourcesList[v_contentInstanceIndex2].resource.contentInstance_optional.resourceName; + + + // Test Body + mcaPort.send(m_request(m_retrieveResource(f_getResourceAddress(v_containerIndex) & "/" & c_resourceShortNameLatest, f_getOriginator(v_containerIndex)))); + + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(v_contentResponse))){ + tc_ac.stop; + setverdict(pass, testcasename() & ": resourceName attribute of <latest> resource retrieved successfully"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)){ + tc_ac.stop; + setverdict(fail, testcasename() & ": Error, resourceName attribute of <latest> resource value not expected"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)){ + tc_ac.stop; + setverdict(fail, testcasename() & ": Error while retrieving <latest> resource"); + } + [] tc_ac.timeout { + setverdict(inconc, testcasename() & ": No answer while retrieving <latest> resource"); + } + } + + // Postamble + f_cse_postamble_deleteResources(); + + // Tear down + f_cf01Down(); + + }//end TC_CSE_DMR_RET_BV_012 + + } // end group g_CSE_DMR_RET_BV_012 group g_CSE_DMR_RET_BV_013 { testcase TC_CSE_DMR_RET_BV_013_01() runs on CseTester system CseSystem { // Local variables - var ResponsePrimitive v_responsePrimitive; var template PrimitiveContent v_contentResponse; - v_contentResponse.any_1[0].AccessControlPolicy_optional := mw_contentAcp_rc1; + v_contentResponse.accessControlPolicy_optional := mw_contentAcp_rc1; - v_responsePrimitive := f_CSE_DMR_RET_BV_013(int1, m_createAcpBase, v_contentResponse);//AccessControlPolicy + f_CSE_DMR_RET_BV_013(int1, m_createAcpBase, v_contentResponse);//AccessControlPolicy } testcase TC_CSE_DMR_RET_BV_013_02() runs on CseTester system CseSystem { // Local variables - var ResponsePrimitive v_responsePrimitive; var template PrimitiveContent v_contentResponse; - v_contentResponse.any_1[0].AE_optional := mw_contentAeBase; + v_contentResponse.aE_optional := mw_contentAeBase; - v_responsePrimitive := f_CSE_DMR_RET_BV_013(int2, m_createAe(PX_APP_ID), v_contentResponse);//AE + f_CSE_DMR_RET_BV_013(int2, m_createAe(PX_APP_ID), v_contentResponse);//AE } testcase TC_CSE_DMR_RET_BV_013_03() runs on CseTester system CseSystem { // Local variables - var ResponsePrimitive v_responsePrimitive; var template PrimitiveContent v_contentResponse; - v_contentResponse.any_1[0].Container_optional := mw_contentContainer_rc1; + v_contentResponse.container_optional := mw_contentContainer_rc1; - v_responsePrimitive := f_CSE_DMR_RET_BV_013(int3, m_createContainerBase, v_contentResponse);//Container + f_CSE_DMR_RET_BV_013(int3, m_createContainerBase, v_contentResponse);//Container } testcase TC_CSE_DMR_RET_BV_013_05() runs on CseTester system CseSystem { // Local variables - var ResponsePrimitive v_responsePrimitive; var template PrimitiveContent v_contentResponse; - v_contentResponse.any_1[0].Group_optional := mw_contentGroup_rc1; + v_contentResponse.group_optional := mw_contentGroup_rc1; - v_responsePrimitive := f_CSE_DMR_RET_BV_013(int9, m_createGroupBase, v_contentResponse);//Group + f_CSE_DMR_RET_BV_013(int9, m_createGroupBase, v_contentResponse);//Group } testcase TC_CSE_DMR_RET_BV_013_11() runs on CseTester system CseSystem { // Local variables - var ResponsePrimitive v_responsePrimitive; var template PrimitiveContent v_contentResponse; - v_contentResponse.any_1[0].Schedule_optional := mw_contentSchedule_rc1; + v_contentResponse.schedule_optional := mw_contentSchedule_rc1; - v_responsePrimitive := f_CSE_DMR_RET_BV_013(int18, m_createScheduleBase, v_contentResponse);//Schedule + f_CSE_DMR_RET_BV_013(int18, m_createScheduleBase, v_contentResponse);//Schedule } testcase TC_CSE_DMR_RET_BV_013_14() runs on CseTester system CseSystem { // Local variables - var ResponsePrimitive v_responsePrimitive; var template PrimitiveContent v_contentResponse; - v_contentResponse.any_1[0].Subscription_optional := mw_contentSubscription_rc1; + v_contentResponse.subscription_optional := mw_contentSubscription_rc1; - v_responsePrimitive := f_CSE_DMR_RET_BV_013(int23, m_createSubscriptionBase, v_contentResponse);//Subscription + f_CSE_DMR_RET_BV_013(int23, m_createSubscriptionBase, v_contentResponse);//Subscription } - function f_CSE_DMR_RET_BV_013(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, template PrimitiveContent p_contentResponse) runs on CseTester return ResponsePrimitive { + function f_CSE_DMR_RET_BV_013(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, template PrimitiveContent p_contentResponse) runs on CseTester { // Local variables var MsgIn v_response; @@ -3955,7 +4524,7 @@ module OneM2M_Testcases { setverdict(fail, testcasename() & ": Error while retrieving resource"); } [] tc_ac.timeout { - setverdict(inconc, testcasename() & ": No answer while retrieving resource"); + setverdict(fail, testcasename() & ": No answer while retrieving resource"); } } @@ -3965,8 +4534,6 @@ module OneM2M_Testcases { // Tear down f_cf01Down(); - return v_response.primitive.responsePrimitive; - }//end f_CSE_DMR_RET_BV_013 } // end g_CSE_DMR_RET_BV_013 @@ -3977,7 +4544,7 @@ module OneM2M_Testcases { // Local variables var template RequestPrimitive v_requestPrimitive := m_createAcpBase; - v_requestPrimitive.primitiveContent.any_1[0].AccessControlPolicy_optional.selfPrivileges.accessControlRule_list[0].accessControlOperations := int61; + v_requestPrimitive.primitiveContent.accessControlPolicy_optional.selfPrivileges.accessControlRule_list[0].accessControlOperations := int61; f_CSE_DMR_RET_BO_014(int1, v_requestPrimitive);//AccessControlPolicy } @@ -4084,8 +4651,8 @@ module OneM2M_Testcases { // Local variables var template PrimitiveContent v_contentResponse; - v_contentResponse.any_1[0].AccessControlPolicy_optional := m_contentAcp_allOmit; - v_contentResponse.any_1[0].AccessControlPolicy_optional.parentID := ?; + v_contentResponse.accessControlPolicy_optional := m_contentAcp_allOmit; + v_contentResponse.accessControlPolicy_optional.parentID := ?; f_CSE_DMR_RET_BV_015(int1, m_createAcpBase, v_contentResponse);//AccessControlPolicy } @@ -4094,8 +4661,8 @@ module OneM2M_Testcases { // Local variables var template PrimitiveContent v_contentResponse; - v_contentResponse.any_1[0].AE_optional := m_contentAe_allOmit; - v_contentResponse.any_1[0].AE_optional.parentID := ?; + v_contentResponse.aE_optional := m_contentAe_allOmit; + v_contentResponse.aE_optional.parentID := ?; f_CSE_DMR_RET_BV_015(int2, m_createAe(PX_APP_ID), v_contentResponse);//AE } @@ -4104,8 +4671,8 @@ module OneM2M_Testcases { // Local variables var template PrimitiveContent v_contentResponse; - v_contentResponse.any_1[0].Container_optional := m_contentContainer_allOmit; - v_contentResponse.any_1[0].Container_optional.parentID := ?; + v_contentResponse.container_optional := m_contentContainer_allOmit; + v_contentResponse.container_optional.parentID := ?; f_CSE_DMR_RET_BV_015(int3, m_createContainerBase, v_contentResponse);//Container } @@ -4114,8 +4681,8 @@ module OneM2M_Testcases { // Local variables var template PrimitiveContent v_contentResponse; - v_contentResponse.any_1[0].Group_optional := m_contentGroup_allOmit; - v_contentResponse.any_1[0].Group_optional.parentID := ?; + v_contentResponse.group_optional := m_contentGroup_allOmit; + v_contentResponse.group_optional.parentID := ?; f_CSE_DMR_RET_BV_015(int9, m_createGroupBase, v_contentResponse);//Group } @@ -4124,8 +4691,8 @@ module OneM2M_Testcases { // Local variables var template PrimitiveContent v_contentResponse; - v_contentResponse.any_1[0].Schedule_optional := m_contentSchedule_allOmit; - v_contentResponse.any_1[0].Schedule_optional.parentID := ?; + v_contentResponse.schedule_optional := m_contentSchedule_allOmit; + v_contentResponse.schedule_optional.parentID := ?; f_CSE_DMR_RET_BV_015(int18, m_createScheduleBase,v_contentResponse);//Schedule } @@ -4134,8 +4701,8 @@ module OneM2M_Testcases { // Local variables var template PrimitiveContent v_contentResponse; - v_contentResponse.any_1[0].Subscription_optional := m_contentSubscription_allOmit; - v_contentResponse.any_1[0].Subscription_optional.parentID := ?; + v_contentResponse.subscription_optional := m_contentSubscription_allOmit; + v_contentResponse.subscription_optional.parentID := ?; f_CSE_DMR_RET_BV_015(int23, m_createSubscriptionBase, v_contentResponse);//Subscription } @@ -4172,7 +4739,7 @@ module OneM2M_Testcases { alt { [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(p_contentResponse))) -> value v_response { tc_ac.stop; - setverdict(pass, testcasename() & ": Requested attribute retrieved successfuly"); + setverdict(pass, testcasename() & ": Requested attribute retrieved successfully"); } [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { tc_ac.stop; @@ -4204,8 +4771,8 @@ module OneM2M_Testcases { // Local variables var template PrimitiveContent v_contentResponse; - v_contentResponse.any_1[0].AccessControlPolicy_optional := m_contentAcp_allOmit; - v_contentResponse.any_1[0].AccessControlPolicy_optional.parentID := ?; + v_contentResponse.accessControlPolicy_optional := m_contentAcp_allOmit; + v_contentResponse.accessControlPolicy_optional.parentID := ?; f_CSE_DMR_RET_BV_016(int1, m_createAcpBase, v_contentResponse);//AccessControlPolicy } @@ -4214,8 +4781,8 @@ module OneM2M_Testcases { // Local variables var template PrimitiveContent v_contentResponse; - v_contentResponse.any_1[0].AE_optional := m_contentAe_allOmit; - v_contentResponse.any_1[0].AE_optional.parentID := ?; + v_contentResponse.aE_optional := m_contentAe_allOmit; + v_contentResponse.aE_optional.parentID := ?; f_CSE_DMR_RET_BV_016(int2, m_createAe(PX_APP_ID), v_contentResponse);//AE } @@ -4224,8 +4791,8 @@ module OneM2M_Testcases { // Local variables var template PrimitiveContent v_contentResponse; - v_contentResponse.any_1[0].Container_optional := m_contentContainer_allOmit; - v_contentResponse.any_1[0].Container_optional.parentID := ?; + v_contentResponse.container_optional := m_contentContainer_allOmit; + v_contentResponse.container_optional.parentID := ?; f_CSE_DMR_RET_BV_016(int3, m_createContainerBase, v_contentResponse);//Container } @@ -4234,8 +4801,8 @@ module OneM2M_Testcases { // Local variables var template PrimitiveContent v_contentResponse; - v_contentResponse.any_1[0].Group_optional := m_contentGroup_allOmit; - v_contentResponse.any_1[0].Group_optional.parentID := ?; + v_contentResponse.group_optional := m_contentGroup_allOmit; + v_contentResponse.group_optional.parentID := ?; f_CSE_DMR_RET_BV_016(int9, m_createGroupBase, v_contentResponse);//Group } @@ -4244,8 +4811,8 @@ module OneM2M_Testcases { // Local variables var template PrimitiveContent v_contentResponse; - v_contentResponse.any_1[0].Schedule_optional := m_contentSchedule_allOmit; - v_contentResponse.any_1[0].Schedule_optional.parentID := ?; + v_contentResponse.schedule_optional := m_contentSchedule_allOmit; + v_contentResponse.schedule_optional.parentID := ?; f_CSE_DMR_RET_BV_016(int18, m_createScheduleBase, v_contentResponse);//Schedule } @@ -4254,8 +4821,8 @@ module OneM2M_Testcases { // Local variables var template PrimitiveContent v_contentResponse; - v_contentResponse.any_1[0].Subscription_optional := m_contentSubscription_allOmit; - v_contentResponse.any_1[0].Subscription_optional.parentID := ?; + v_contentResponse.subscription_optional := m_contentSubscription_allOmit; + v_contentResponse.subscription_optional.parentID := ?; f_CSE_DMR_RET_BV_016(int23, m_createSubscriptionBase, v_contentResponse);//Subscription } @@ -4292,7 +4859,7 @@ module OneM2M_Testcases { alt { [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(p_contentResponse))) -> value v_response { tc_ac.stop; - setverdict(pass, testcasename() & ": Requested attribute retrieved successfuly"); + setverdict(pass, testcasename() & ": Requested attribute retrieved successfully"); } [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { tc_ac.stop; @@ -4324,9 +4891,9 @@ module OneM2M_Testcases { // Local variables var template PrimitiveContent v_contentResponse; - v_contentResponse.any_1[0].AccessControlPolicy_optional := m_contentAcp_allOmit; - v_contentResponse.any_1[0].AccessControlPolicy_optional.parentID := ?; - v_contentResponse.any_1[0].AccessControlPolicy_optional.creationTime := ?; + v_contentResponse.accessControlPolicy_optional := m_contentAcp_allOmit; + v_contentResponse.accessControlPolicy_optional.parentID := ?; + v_contentResponse.accessControlPolicy_optional.creationTime := ?; f_CSE_DMR_RET_BV_017(int1, m_createAcpBase, v_contentResponse);//AccessControlPolicy } @@ -4335,9 +4902,9 @@ module OneM2M_Testcases { // Local variables var template PrimitiveContent v_contentResponse; - v_contentResponse.any_1[0].AE_optional := m_contentAe_allOmit; - v_contentResponse.any_1[0].AE_optional.parentID := ?; - v_contentResponse.any_1[0].AE_optional.creationTime := ?; + v_contentResponse.aE_optional := m_contentAe_allOmit; + v_contentResponse.aE_optional.parentID := ?; + v_contentResponse.aE_optional.creationTime := ?; f_CSE_DMR_RET_BV_017(int2, m_createAe(PX_APP_ID), v_contentResponse);//AE } @@ -4346,9 +4913,9 @@ module OneM2M_Testcases { // Local variables var template PrimitiveContent v_contentResponse; - v_contentResponse.any_1[0].Container_optional := m_contentContainer_allOmit; - v_contentResponse.any_1[0].Container_optional.parentID := ?; - v_contentResponse.any_1[0].Container_optional.creationTime := ?; + v_contentResponse.container_optional := m_contentContainer_allOmit; + v_contentResponse.container_optional.parentID := ?; + v_contentResponse.container_optional.creationTime := ?; f_CSE_DMR_RET_BV_017(int3, m_createContainerBase, v_contentResponse);//Container } @@ -4357,9 +4924,9 @@ module OneM2M_Testcases { // Local variables var template PrimitiveContent v_contentResponse; - v_contentResponse.any_1[0].Group_optional := m_contentGroup_allOmit; - v_contentResponse.any_1[0].Group_optional.parentID := ?; - v_contentResponse.any_1[0].Group_optional.creationTime := ?; + v_contentResponse.group_optional := m_contentGroup_allOmit; + v_contentResponse.group_optional.parentID := ?; + v_contentResponse.group_optional.creationTime := ?; f_CSE_DMR_RET_BV_017(int9, m_createGroupBase, v_contentResponse);//Group } @@ -4368,9 +4935,9 @@ module OneM2M_Testcases { // Local variables var template PrimitiveContent v_contentResponse; - v_contentResponse.any_1[0].Schedule_optional := m_contentSchedule_allOmit; - v_contentResponse.any_1[0].Schedule_optional.parentID := ?; - v_contentResponse.any_1[0].Schedule_optional.creationTime := ?; + v_contentResponse.schedule_optional := m_contentSchedule_allOmit; + v_contentResponse.schedule_optional.parentID := ?; + v_contentResponse.schedule_optional.creationTime := ?; f_CSE_DMR_RET_BV_017(int18, m_createScheduleBase, v_contentResponse);//Schedule } @@ -4379,9 +4946,9 @@ module OneM2M_Testcases { // Local variables var template PrimitiveContent v_contentResponse; - v_contentResponse.any_1[0].Subscription_optional := m_contentSubscription_allOmit; - v_contentResponse.any_1[0].Subscription_optional.parentID := ?; - v_contentResponse.any_1[0].Subscription_optional.creationTime := ?; + v_contentResponse.subscription_optional := m_contentSubscription_allOmit; + v_contentResponse.subscription_optional.parentID := ?; + v_contentResponse.subscription_optional.creationTime := ?; f_CSE_DMR_RET_BV_017(int23, m_createSubscriptionBase, v_contentResponse);//Subscription } @@ -4419,7 +4986,7 @@ module OneM2M_Testcases { alt { [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(p_contentResponse))) -> value v_response { tc_ac.stop; - setverdict(pass, testcasename() & ": Requested attributes retrieved successfuly"); + setverdict(pass, testcasename() & ": Requested attributes retrieved successfully"); } [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { tc_ac.stop; @@ -4649,8 +5216,8 @@ module OneM2M_Testcases { var template RequestPrimitive v_createRequest := m_createContainerBase; var template RequestPrimitive v_updateRequest := m_updateContainerBase; - v_createRequest.primitiveContent.any_1[0].Container_optional.labels := v_labels_1; - v_updateRequest.primitiveContent.any_1[0].Container_optional.labels := v_labels_2; + v_createRequest.primitiveContent.container_optional.labels := v_labels_1; + v_updateRequest.primitiveContent.container_optional.labels := v_labels_2; v_responsePrimitive := f_CSE_DMR_UPD_BV_001(int3, v_createRequest, v_updateRequest);//Container @@ -4658,8 +5225,8 @@ module OneM2M_Testcases { if(getverdict == pass){ //Check attribute 1 if(ispresent(v_responsePrimitive.primitiveContent)) { - if(ischosen(v_responsePrimitive.primitiveContent.any_1[0].Container_optional)) { - if(v_responsePrimitive.primitiveContent.any_1[0].Container_optional.labels != v_labels_2){ + if(ischosen(v_responsePrimitive.primitiveContent.container_optional)) { + if(v_responsePrimitive.primitiveContent.container_optional.labels != v_labels_2){ setverdict(fail, testcasename() & ": Error: Labels attribute not updated correctly") } } @@ -4675,16 +5242,16 @@ module OneM2M_Testcases { var template RequestPrimitive v_updateRequest := m_updateGroupBase; var ResponsePrimitive v_responsePrimitive; - v_createRequest.primitiveContent.any_1[0].Group_optional.labels := v_labels_1; - v_updateRequest.primitiveContent.any_1[0].Group_optional.labels := v_labels_2; + v_createRequest.primitiveContent.group_optional.labels := v_labels_1; + v_updateRequest.primitiveContent.group_optional.labels := v_labels_2; v_responsePrimitive := f_CSE_DMR_UPD_BV_001(int9, v_createRequest, v_updateRequest);//Group if(getverdict == pass){ //Check attribute 1 if(ispresent(v_responsePrimitive.primitiveContent)) { - if(ischosen(v_responsePrimitive.primitiveContent.any_1[0].Group_optional)) { - if(v_responsePrimitive.primitiveContent.any_1[0].Group_optional.labels != v_labels_2){ + if(ischosen(v_responsePrimitive.primitiveContent.group_optional)) { + if(v_responsePrimitive.primitiveContent.group_optional.labels != v_labels_2){ setverdict(fail, testcasename() & ": Error: Labels attribute not updated correctly") } } @@ -4700,16 +5267,16 @@ module OneM2M_Testcases { var template RequestPrimitive v_updateRequest := m_updateAcpBase; var ResponsePrimitive v_responsePrimitive; - v_createRequest.primitiveContent.any_1[0].AccessControlPolicy_optional.labels := v_labels_1; - v_updateRequest.primitiveContent.any_1[0].AccessControlPolicy_optional.labels := v_labels_2; + v_createRequest.primitiveContent.accessControlPolicy_optional.labels := v_labels_1; + v_updateRequest.primitiveContent.accessControlPolicy_optional.labels := v_labels_2; v_responsePrimitive := f_CSE_DMR_UPD_BV_001(int1, v_createRequest, v_updateRequest);//ACP if(getverdict == pass){ //Check attribute 1 if(ispresent(v_responsePrimitive.primitiveContent)) { - if(ischosen(v_responsePrimitive.primitiveContent.any_1[0].AccessControlPolicy)) { - if(v_responsePrimitive.primitiveContent.any_1[0].AccessControlPolicy_optional.labels != v_labels_2){ + if(ischosen(v_responsePrimitive.primitiveContent.accessControlPolicy_optional)) { + if(v_responsePrimitive.primitiveContent.accessControlPolicy_optional.labels != v_labels_2){ setverdict(fail, testcasename() & ": Error: Labels attribute not updated correctly") } } @@ -4726,16 +5293,16 @@ module OneM2M_Testcases { var template RequestPrimitive v_updateRequest := m_updateScheduleBase; var ResponsePrimitive v_responsePrimitive; - v_createRequest.primitiveContent.any_1[0].Schedule_optional.labels := v_labels_1; - v_updateRequest.primitiveContent.any_1[0].Schedule_optional.labels := v_labels_2; + v_createRequest.primitiveContent.schedule_optional.labels := v_labels_1; + v_updateRequest.primitiveContent.schedule_optional.labels := v_labels_2; v_responsePrimitive := f_CSE_DMR_UPD_BV_001(int18, v_createRequest, v_updateRequest);//Schedule if(getverdict == pass){ //Check attribute 1 if(ispresent(v_responsePrimitive.primitiveContent)) { - if(ischosen(v_responsePrimitive.primitiveContent.any_1[0].Schedule_optional)) { - if(v_responsePrimitive.primitiveContent.any_1[0].Schedule_optional.labels != v_labels_2){ + if(ischosen(v_responsePrimitive.primitiveContent.schedule_optional)) { + if(v_responsePrimitive.primitiveContent.schedule_optional.labels != v_labels_2){ setverdict(fail, testcasename() & ": Error: Labels attribute not updated correctly") } } @@ -4752,16 +5319,16 @@ module OneM2M_Testcases { var template RequestPrimitive v_updateRequest := m_updatePollingChannelBase; var ResponsePrimitive v_responsePrimitive; - v_createRequest.primitiveContent.any_1[0].PollingChannel_optional.labels := v_labels_1; - v_updateRequest.primitiveContent.any_1[0].PollingChannel_optional.labels := v_labels_2; + v_createRequest.primitiveContent.pollingChannel_optional.labels := v_labels_1; + v_updateRequest.primitiveContent.pollingChannel_optional.labels := v_labels_2; v_responsePrimitive := f_CSE_DMR_UPD_BV_001(int15, v_createRequest, v_updateRequest);//PollingChannel if(getverdict == pass){ //Check attribute 1 if(ispresent(v_responsePrimitive.primitiveContent)) { - if(ischosen(v_responsePrimitive.primitiveContent.any_1[0].PollingChannel_optional)) { - if(v_responsePrimitive.primitiveContent.any_1[0].PollingChannel_optional.labels != v_labels_2){ + if(ischosen(v_responsePrimitive.primitiveContent.pollingChannel_optional)) { + if(v_responsePrimitive.primitiveContent.pollingChannel_optional.labels != v_labels_2){ setverdict(fail, testcasename() & ": Error: Labels attribute not updated correctly") } } @@ -4777,16 +5344,16 @@ module OneM2M_Testcases { var template RequestPrimitive v_updateRequest := m_updateSubscriptionBase; var ResponsePrimitive v_responsePrimitive; - v_createRequest.primitiveContent.any_1[0].Subscription_optional.labels := v_labels_1; - v_updateRequest.primitiveContent.any_1[0].Subscription_optional.labels := v_labels_2; + v_createRequest.primitiveContent.subscription_optional.labels := v_labels_1; + v_updateRequest.primitiveContent.subscription_optional.labels := v_labels_2; v_responsePrimitive := f_CSE_DMR_UPD_BV_001(int23, v_createRequest, v_updateRequest);//Subscription if(getverdict == pass){ //Check attribute 1 if(ispresent(v_responsePrimitive.primitiveContent)) { - if(ischosen(v_responsePrimitive.primitiveContent.any_1[0].Subscription_optional)) { - if(v_responsePrimitive.primitiveContent.any_1[0].Subscription_optional.labels != v_labels_2){ + if(ischosen(v_responsePrimitive.primitiveContent.subscription_optional)) { + if(v_responsePrimitive.primitiveContent.subscription_optional.labels != v_labels_2){ setverdict(fail, testcasename() & ": Error: Labels attribute not updated correctly") } } @@ -4827,7 +5394,7 @@ module OneM2M_Testcases { alt { [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { tc_ac.stop; - setverdict(pass, testcasename() & ": Attribute of resource type " & int2str(enum2int(p_resourceType)) & " updated successfuly"); + setverdict(pass, testcasename() & ": Attribute of resource type " & int2str(enum2int(p_resourceType)) & " updated successfully"); } [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { tc_ac.stop; @@ -4858,15 +5425,15 @@ module OneM2M_Testcases { var template RequestPrimitive v_updateRequest := m_updateContainerBase; var ResponsePrimitive v_responsePrimitive; - v_updateRequest.primitiveContent.any_1[0].Container_optional.labels := v_labels_1; + v_updateRequest.primitiveContent.container_optional.labels := v_labels_1; v_responsePrimitive := f_CSE_DMR_UPD_BV_002(int3, m_createContainerBase, v_updateRequest);//Container if(getverdict == pass){ //Check attribute 1 if(ispresent(v_responsePrimitive.primitiveContent)) { - if(ischosen(v_responsePrimitive.primitiveContent.any_1[0].Container_optional)) { - if(v_responsePrimitive.primitiveContent.any_1[0].Container_optional.labels != v_labels_1){ + if(ischosen(v_responsePrimitive.primitiveContent.container_optional)) { + if(v_responsePrimitive.primitiveContent.container_optional.labels != v_labels_1){ setverdict(fail, testcasename() & ": Error: Labels attribute not updated correctly") } } @@ -4880,15 +5447,15 @@ module OneM2M_Testcases { var template RequestPrimitive v_updateRequest := m_updateGroupBase; var ResponsePrimitive v_responsePrimitive; - v_updateRequest.primitiveContent.any_1[0].Group_optional.labels := v_labels_1; + v_updateRequest.primitiveContent.group_optional.labels := v_labels_1; v_responsePrimitive := f_CSE_DMR_UPD_BV_002(int9, m_createGroupBase, v_updateRequest);//Group if(getverdict == pass){ //Check attribute 1 if(ispresent(v_responsePrimitive.primitiveContent)) { - if(ischosen(v_responsePrimitive.primitiveContent.any_1[0].Group_optional)) { - if(v_responsePrimitive.primitiveContent.any_1[0].Group_optional.labels != v_labels_1){ + if(ischosen(v_responsePrimitive.primitiveContent.group_optional)) { + if(v_responsePrimitive.primitiveContent.group_optional.labels != v_labels_1){ setverdict(fail, testcasename() & ": Error: Labels attribute not updated correctly") } } @@ -4902,15 +5469,15 @@ module OneM2M_Testcases { var template RequestPrimitive v_updateRequest := m_updateAcpBase; var ResponsePrimitive v_responsePrimitive; - v_updateRequest.primitiveContent.any_1[0].AccessControlPolicy_optional.labels := v_labels_1; + v_updateRequest.primitiveContent.accessControlPolicy_optional.labels := v_labels_1; v_responsePrimitive := f_CSE_DMR_UPD_BV_002(int1, m_createAcpBase,v_updateRequest);//AccessControlPolicy if(getverdict == pass){ //Check attribute 1 if(ispresent(v_responsePrimitive.primitiveContent)) { - if(ischosen(v_responsePrimitive.primitiveContent.any_1[0].AccessControlPolicy_optional)) { - if(v_responsePrimitive.primitiveContent.any_1[0].AccessControlPolicy_optional.labels != v_labels_1){ + if(ischosen(v_responsePrimitive.primitiveContent.accessControlPolicy_optional)) { + if(v_responsePrimitive.primitiveContent.accessControlPolicy_optional.labels != v_labels_1){ setverdict(fail, testcasename() & ": Error: Labels attribute not updated correctly") } } @@ -4924,15 +5491,15 @@ module OneM2M_Testcases { var template RequestPrimitive v_updateRequest := m_updateScheduleBase; var ResponsePrimitive v_responsePrimitive; - v_updateRequest.primitiveContent.any_1[0].Schedule_optional.labels := v_labels_1; + v_updateRequest.primitiveContent.schedule_optional.labels := v_labels_1; v_responsePrimitive := f_CSE_DMR_UPD_BV_002(int18, m_createScheduleBase,v_updateRequest);//Schedule if(getverdict == pass){ //Check attribute 1 if(ispresent(v_responsePrimitive.primitiveContent)) { - if(ischosen(v_responsePrimitive.primitiveContent.any_1[0].Schedule_optional)) { - if(v_responsePrimitive.primitiveContent.any_1[0].Schedule_optional.labels != v_labels_1){ + if(ischosen(v_responsePrimitive.primitiveContent.schedule_optional)) { + if(v_responsePrimitive.primitiveContent.schedule_optional.labels != v_labels_1){ setverdict(fail, testcasename() & ": Error: Labels attribute not updated correctly") } } @@ -4946,15 +5513,15 @@ module OneM2M_Testcases { var template RequestPrimitive v_updateRequest := m_updatePollingChannelBase; var ResponsePrimitive v_responsePrimitive; - v_updateRequest.primitiveContent.any_1[0].PollingChannel_optional.labels := v_labels_1; + v_updateRequest.primitiveContent.pollingChannel_optional.labels := v_labels_1; v_responsePrimitive := f_CSE_DMR_UPD_BV_002(int15, m_createPollingChannelBase,v_updateRequest);//PollingChannel if(getverdict == pass){ //Check attribute 1 if(ispresent(v_responsePrimitive.primitiveContent)) { - if(ischosen(v_responsePrimitive.primitiveContent.any_1[0].PollingChannel_optional)) { - if(v_responsePrimitive.primitiveContent.any_1[0].PollingChannel_optional.labels != v_labels_1){ + if(ischosen(v_responsePrimitive.primitiveContent.pollingChannel_optional)) { + if(v_responsePrimitive.primitiveContent.pollingChannel_optional.labels != v_labels_1){ setverdict(fail, testcasename() & ": Error: Labels attribute not updated correctly") } } @@ -4968,15 +5535,15 @@ module OneM2M_Testcases { var template RequestPrimitive v_updateRequest := m_updateSubscriptionBase; var ResponsePrimitive v_responsePrimitive; - v_updateRequest.primitiveContent.any_1[0].Subscription_optional.labels := v_labels_1; + v_updateRequest.primitiveContent.subscription_optional.labels := v_labels_1; v_responsePrimitive := f_CSE_DMR_UPD_BV_002(int23, m_createSubscriptionBase,v_updateRequest);//Subscription if(getverdict == pass){ //Check attribute 1 if(ispresent(v_responsePrimitive.primitiveContent)) { - if(ischosen(v_responsePrimitive.primitiveContent.any_1[0].Subscription_optional)) { - if(v_responsePrimitive.primitiveContent.any_1[0].Subscription_optional.labels != v_labels_1){ + if(ischosen(v_responsePrimitive.primitiveContent.subscription_optional)) { + if(v_responsePrimitive.primitiveContent.subscription_optional.labels != v_labels_1){ setverdict(fail, testcasename() & ": Error: Labels attribute not updated correctly") } } @@ -5016,7 +5583,7 @@ module OneM2M_Testcases { alt { [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { tc_ac.stop; - setverdict(pass, testcasename() & ": Attribute of resource type " & int2str(enum2int(p_resourceType)) & " updated successfuly"); + setverdict(pass, testcasename() & ": Attribute of resource type " & int2str(enum2int(p_resourceType)) & " updated successfully"); } [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { tc_ac.stop; @@ -5050,8 +5617,8 @@ module OneM2M_Testcases { var template RequestPrimitive v_createRequest := m_createContainerBase; var template RequestPrimitive v_updateRequest := m_updateContainerBase; - v_createRequest.primitiveContent.any_1[0].Container_optional.labels := v_labels_1; - v_updateRequest.primitiveContent.any_1[0].Container_optional.labels := v_labels_2; + v_createRequest.primitiveContent.container_optional.labels := v_labels_1; + v_updateRequest.primitiveContent.container_optional.labels := v_labels_2; v_nullFields := {{"labels", omit}}; @@ -5060,9 +5627,9 @@ module OneM2M_Testcases { if(getverdict == pass){ //Check attribute 1 if(ispresent(v_responsePrimitive.primitiveContent)) { - if(ischosen(v_responsePrimitive.primitiveContent.any_1[0].Container_optional)) { - if(ispresent(v_responsePrimitive.primitiveContent.any_1[0].Container_optional.labels)){ - if(not(match(v_responsePrimitive.primitiveContent.any_1[0].Container_optional.labels,{""}))) { + if(ischosen(v_responsePrimitive.primitiveContent.container_optional)) { + if(ispresent(v_responsePrimitive.primitiveContent.container_optional.labels)){ + if(not(match(v_responsePrimitive.primitiveContent.container_optional.labels,{""}))) { setverdict(fail, testcasename() & ": Error: Labels attribute not deleted correctly"); } } @@ -5080,8 +5647,8 @@ module OneM2M_Testcases { var template RequestPrimitive v_createRequest := m_createGroupBase; var template RequestPrimitive v_updateRequest := m_updateGroupBase; - v_createRequest.primitiveContent.any_1[0].Group_optional.labels := v_labels_1; - v_updateRequest.primitiveContent.any_1[0].Group_optional.labels := v_labels_2; + v_createRequest.primitiveContent.group_optional.labels := v_labels_1; + v_updateRequest.primitiveContent.group_optional.labels := v_labels_2; v_nullFields := {{"labels", omit}}; @@ -5090,8 +5657,8 @@ module OneM2M_Testcases { if(getverdict == pass){ //Check attribute 1 if(ispresent(v_responsePrimitive.primitiveContent)) { - if(ischosen(v_responsePrimitive.primitiveContent.any_1[0].Group_optional)) { - if(ispresent(v_responsePrimitive.primitiveContent.any_1[0].Group_optional.labels)){ + if(ischosen(v_responsePrimitive.primitiveContent.group_optional)) { + if(ispresent(v_responsePrimitive.primitiveContent.group_optional.labels)){ setverdict(fail, testcasename() & ": Error: Labels attribute not deleted correctly") } } @@ -5108,8 +5675,8 @@ module OneM2M_Testcases { var template RequestPrimitive v_createRequest := m_createAcpBase; var template RequestPrimitive v_updateRequest := m_updateAcpBase; - v_createRequest.primitiveContent.any_1[0].AccessControlPolicy_optional.labels := v_labels_1; - v_updateRequest.primitiveContent.any_1[0].AccessControlPolicy_optional.labels := v_labels_2; + v_createRequest.primitiveContent.accessControlPolicy_optional.labels := v_labels_1; + v_updateRequest.primitiveContent.accessControlPolicy_optional.labels := v_labels_2; v_nullFields := {{"labels", omit}}; @@ -5118,8 +5685,8 @@ module OneM2M_Testcases { if(getverdict == pass){ //Check attribute 1 if(ispresent(v_responsePrimitive.primitiveContent)) { - if(ischosen(v_responsePrimitive.primitiveContent.any_1[0].AccessControlPolicy_optional)) { - if(ispresent(v_responsePrimitive.primitiveContent.any_1[0].AccessControlPolicy_optional.labels)){ + if(ischosen(v_responsePrimitive.primitiveContent.accessControlPolicy_optional)) { + if(ispresent(v_responsePrimitive.primitiveContent.accessControlPolicy_optional.labels)){ setverdict(fail, testcasename() & ": Error: Labels attribute not deleted correctly") } } @@ -5136,8 +5703,8 @@ module OneM2M_Testcases { var template RequestPrimitive v_createRequest := m_createScheduleBase; var template RequestPrimitive v_updateRequest := m_updateScheduleBase; - v_createRequest.primitiveContent.any_1[0].Schedule_optional.labels := v_labels_1; - v_updateRequest.primitiveContent.any_1[0].Schedule_optional.labels := v_labels_2; + v_createRequest.primitiveContent.schedule_optional.labels := v_labels_1; + v_updateRequest.primitiveContent.schedule_optional.labels := v_labels_2; v_nullFields := {{"labels", omit}}; @@ -5146,8 +5713,8 @@ module OneM2M_Testcases { if(getverdict == pass){ //Check attribute 1 if(ispresent(v_responsePrimitive.primitiveContent)) { - if(ischosen(v_responsePrimitive.primitiveContent.any_1[0].Schedule_optional)) { - if(ispresent(v_responsePrimitive.primitiveContent.any_1[0].Schedule_optional.labels)){ + if(ischosen(v_responsePrimitive.primitiveContent.schedule_optional)) { + if(ispresent(v_responsePrimitive.primitiveContent.schedule_optional.labels)){ setverdict(fail, testcasename() & ": Error: Labels attribute not deleted correctly") } } @@ -5164,8 +5731,8 @@ module OneM2M_Testcases { var template RequestPrimitive v_createRequest := m_createPollingChannelBase; var template RequestPrimitive v_updateRequest := m_updatePollingChannelBase; - v_createRequest.primitiveContent.any_1[0].PollingChannel_optional.labels := v_labels_1; - v_updateRequest.primitiveContent.any_1[0].PollingChannel_optional.labels := v_labels_2; + v_createRequest.primitiveContent.pollingChannel_optional.labels := v_labels_1; + v_updateRequest.primitiveContent.pollingChannel_optional.labels := v_labels_2; v_nullFields := {{"labels", omit}}; @@ -5174,8 +5741,8 @@ module OneM2M_Testcases { if(getverdict == pass){ //Check attribute 1 if(ispresent(v_responsePrimitive.primitiveContent)) { - if(ischosen(v_responsePrimitive.primitiveContent.any_1[0].PollingChannel_optional)) { - if(ispresent(v_responsePrimitive.primitiveContent.any_1[0].PollingChannel_optional.labels)){ + if(ischosen(v_responsePrimitive.primitiveContent.pollingChannel_optional)) { + if(ispresent(v_responsePrimitive.primitiveContent.pollingChannel_optional.labels)){ setverdict(fail, testcasename() & ": Error: Labels attribute not deleted correctly") } } @@ -5192,8 +5759,8 @@ module OneM2M_Testcases { var template RequestPrimitive v_createRequest := m_createSubscriptionBase; var template RequestPrimitive v_updateRequest := m_updateSubscriptionBase; - v_createRequest.primitiveContent.any_1[0].Subscription_optional.labels := v_labels_1; - v_updateRequest.primitiveContent.any_1[0].Subscription_optional.labels := v_labels_2; + v_createRequest.primitiveContent.subscription_optional.labels := v_labels_1; + v_updateRequest.primitiveContent.subscription_optional.labels := v_labels_2; v_nullFields := {{"labels", omit}}; @@ -5202,8 +5769,8 @@ module OneM2M_Testcases { if(getverdict == pass){ //Check attribute 1 if(ispresent(v_responsePrimitive.primitiveContent)) { - if(ischosen(v_responsePrimitive.primitiveContent.any_1[0].Subscription_optional)) { - if(ispresent(v_responsePrimitive.primitiveContent.any_1[0].Subscription_optional.labels)){ + if(ischosen(v_responsePrimitive.primitiveContent.subscription_optional)) { + if(ispresent(v_responsePrimitive.primitiveContent.subscription_optional.labels)){ setverdict(fail, testcasename() & ": Error: Labels attribute not deleted correctly") } } @@ -5245,7 +5812,7 @@ module OneM2M_Testcases { alt { [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { tc_ac.stop; - setverdict(pass, testcasename() & ": Attribute of resource type " & int2str(enum2int(p_resourceType)) & " updated successfuly"); + setverdict(pass, testcasename() & ": Attribute of resource type " & int2str(enum2int(p_resourceType)) & " updated successfully"); } [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { tc_ac.stop; @@ -5279,10 +5846,10 @@ module OneM2M_Testcases { var ResponsePrimitive v_responsePrimitive; var AttributeAux_list v_nullFields; - v_createRequest.primitiveContent.any_1[0].Container_optional.labels := v_labels_1;//Attribute 3 - v_updateRequest.primitiveContent.any_1[0].Container_optional.expirationTime := "20301231T012345";//Attribute 1 - v_updateRequest.primitiveContent.any_1[0].Container_optional.maxNrOfInstances := 5;//Attribute 2 - v_updateRequest.primitiveContent.any_1[0].Container_optional.labels := v_labels_2;//Attribute 3 + v_createRequest.primitiveContent.container_optional.labels := v_labels_1;//Attribute 3 + v_updateRequest.primitiveContent.container_optional.expirationTime := "20301231T012345";//Attribute 1 + v_updateRequest.primitiveContent.container_optional.maxNrOfInstances := 5;//Attribute 2 + v_updateRequest.primitiveContent.container_optional.labels := v_labels_2;//Attribute 3 v_nullFields := {{"labels", omit}}; @@ -5290,17 +5857,17 @@ module OneM2M_Testcases { if(getverdict == pass){ if(ispresent(v_responsePrimitive.primitiveContent)) { - if(ischosen(v_responsePrimitive.primitiveContent.any_1[0].Container_optional)) { + if(ischosen(v_responsePrimitive.primitiveContent.container_optional)) { //Check attribute 1 - if(v_responsePrimitive.primitiveContent.any_1[0].Container_optional.expirationTime != valueof(v_updateRequest.primitiveContent.any_1[0].Container_optional.expirationTime)){ + if(v_responsePrimitive.primitiveContent.container_optional.expirationTime != valueof(v_updateRequest.primitiveContent.container_optional.expirationTime)){ setverdict(fail, testcasename() & ": Error: Expiration Time attribute not updated correctly") } //Check attribute 2 - if(v_responsePrimitive.primitiveContent.any_1[0].Container_optional.maxNrOfInstances != valueof(v_updateRequest.primitiveContent.any_1[0].Container_optional.maxNrOfInstances)){ + if(v_responsePrimitive.primitiveContent.container_optional.maxNrOfInstances != valueof(v_updateRequest.primitiveContent.container_optional.maxNrOfInstances)){ setverdict(fail, testcasename() & ": Error: MaxNrOfInstances attribute not updated correctly") } //Check attribute 3 - if(ispresent(v_responsePrimitive.primitiveContent.any_1[0].Container_optional.labels)){ + if(ispresent(v_responsePrimitive.primitiveContent.container_optional.labels)){ setverdict(fail, testcasename() & ": Error: Labels attribute not deleted correctly") } } @@ -5319,10 +5886,10 @@ module OneM2M_Testcases { var template RequestPrimitive v_updateRequest := m_updateGroupBase; var ResponsePrimitive v_responsePrimitive; - v_createRequest.primitiveContent.any_1[0].Group_optional.labels := v_labels_1;//Attribute 3 - v_updateRequest.primitiveContent.any_1[0].Group_optional.expirationTime := "20301231T012345";//Attribute 1 - v_updateRequest.primitiveContent.any_1[0].Group_optional.groupName:= v_groupName_1;//Attribute 2 - v_updateRequest.primitiveContent.any_1[0].Group_optional.labels := v_labels_2;//Attribute 3 + v_createRequest.primitiveContent.group_optional.labels := v_labels_1;//Attribute 3 + v_updateRequest.primitiveContent.group_optional.expirationTime := "20301231T012345";//Attribute 1 + v_updateRequest.primitiveContent.group_optional.groupName:= v_groupName_1;//Attribute 2 + v_updateRequest.primitiveContent.group_optional.labels := v_labels_2;//Attribute 3 v_nullFields := {{"labels", omit}}; @@ -5330,17 +5897,17 @@ module OneM2M_Testcases { if(getverdict == pass){ if(ispresent(v_responsePrimitive.primitiveContent)) { - if(ischosen(v_responsePrimitive.primitiveContent.any_1[0].Group_optional)) { + if(ischosen(v_responsePrimitive.primitiveContent.group_optional)) { //Check attribute 1 - if(not match(v_responsePrimitive.primitiveContent.any_1[0].Group_optional.groupName, valueof(v_updateRequest.primitiveContent.any_1[0].Group_optional.groupName))){ + if(not match(v_responsePrimitive.primitiveContent.group_optional.groupName, valueof(v_updateRequest.primitiveContent.group_optional.groupName))){ setverdict(fail, testcasename() & ": Error: groupName attribute not updated correctly") } //Check attribute 2 - if(not match(v_responsePrimitive.primitiveContent.any_1[0].Group_optional.expirationTime, valueof(v_updateRequest.primitiveContent.any_1[0].Group_optional.expirationTime))){ + if(not match(v_responsePrimitive.primitiveContent.group_optional.expirationTime, valueof(v_updateRequest.primitiveContent.group_optional.expirationTime))){ setverdict(fail, testcasename() & ": Error: expirationTime attribute not updated correctly") } //Check attribute 3 - if(ispresent(v_responsePrimitive.primitiveContent.any_1[0].Group_optional.labels)){ + if(ispresent(v_responsePrimitive.primitiveContent.group_optional.labels)){ setverdict(fail, testcasename() & ": Error: Labels attribute not deleted correctly") } } @@ -5368,10 +5935,10 @@ module OneM2M_Testcases { var template RequestPrimitive v_updateRequest := m_updateAcpBase; var ResponsePrimitive v_responsePrimitive; - v_createRequest.primitiveContent.any_1[0].AccessControlPolicy_optional.labels := v_labels_1;//Attribute 3 - v_updateRequest.primitiveContent.any_1[0].AccessControlPolicy_optional.privileges := v_privileges_2; //Attribute 1 - v_updateRequest.primitiveContent.any_1[0].AccessControlPolicy_optional.announceTo := {PX_URI_CSE};//Attribute 2 - v_updateRequest.primitiveContent.any_1[0].AccessControlPolicy_optional.labels := v_labels_2;//Attribute 3 + v_createRequest.primitiveContent.accessControlPolicy_optional.labels := v_labels_1;//Attribute 3 + v_updateRequest.primitiveContent.accessControlPolicy_optional.privileges := v_privileges_2; //Attribute 1 + v_updateRequest.primitiveContent.accessControlPolicy_optional.announceTo := {f_getAnnouncementTargetPoA()};//Attribute 2 + v_updateRequest.primitiveContent.accessControlPolicy_optional.labels := v_labels_2;//Attribute 3 v_nullFields := {{"labels", omit}}; @@ -5379,17 +5946,17 @@ module OneM2M_Testcases { if(getverdict == pass){ if(ispresent(v_responsePrimitive.primitiveContent)) { - if(ischosen(v_responsePrimitive.primitiveContent.any_1[0].AccessControlPolicy_optional)) { + if(ischosen(v_responsePrimitive.primitiveContent.accessControlPolicy_optional)) { //Check attribute 1 - if(not match(v_responsePrimitive.primitiveContent.any_1[0].AccessControlPolicy_optional.privileges.accessControlRule_list[0].accessControlOperations, v_privileges_2.accessControlRule_list[0].accessControlOperations)){ + if(not match(v_responsePrimitive.primitiveContent.accessControlPolicy_optional.privileges.accessControlRule_list[0].accessControlOperations, v_privileges_2.accessControlRule_list[0].accessControlOperations)){ setverdict(fail, testcasename() & ": Error: Privileges attribute not updated correctly") } //Check attribute 2 - if(not match(v_responsePrimitive.primitiveContent.any_1[0].AccessControlPolicy_optional.announceTo, valueof(v_updateRequest.primitiveContent.any_1[0].AccessControlPolicy_optional.announceTo))){ + if(not match(v_responsePrimitive.primitiveContent.accessControlPolicy_optional.announceTo, valueof(v_updateRequest.primitiveContent.accessControlPolicy_optional.announceTo))){ setverdict(fail, testcasename() & ": Error: Announce_to attribute not updated correctly") } //Check attribute 3 - if(ispresent(v_responsePrimitive.primitiveContent.any_1[0].AccessControlPolicy_optional.labels)){ + if(ispresent(v_responsePrimitive.primitiveContent.accessControlPolicy_optional.labels)){ setverdict(fail, testcasename() & ": Error: Labels attribute not deleted correctly") } } @@ -5406,10 +5973,10 @@ module OneM2M_Testcases { var template RequestPrimitive v_updateRequest := m_updateScheduleBase; var ResponsePrimitive v_responsePrimitive; - v_createRequest.primitiveContent.any_1[0].Schedule_optional.scheduleElement := {{"0,0,0 1 2,1,1,*"}};//Attribute 1 - v_updateRequest.primitiveContent.any_1[0].Schedule_optional.scheduleElement := {{"1,1,1 1 2,1,1,*"}}; //Attribute 1 - v_updateRequest.primitiveContent.any_1[0].Schedule_optional.announceTo := {PX_URI_CSE};//Attribute 2 - v_updateRequest.primitiveContent.any_1[0].Schedule_optional.labels := v_labels_2;//Attribute 3 + v_createRequest.primitiveContent.schedule_optional.scheduleElement := {{"0,0,0 1 2,1,1,*"}};//Attribute 1 + v_updateRequest.primitiveContent.schedule_optional.scheduleElement := {{"1,1,1 1 2,1,1,*"}}; //Attribute 1 + v_updateRequest.primitiveContent.schedule_optional.announceTo := {f_getAnnouncementTargetPoA()};//Attribute 2 + v_updateRequest.primitiveContent.schedule_optional.labels := v_labels_2;//Attribute 3 v_nullFields := {{"labels", omit}}; @@ -5417,17 +5984,17 @@ module OneM2M_Testcases { if(getverdict == pass){ if(ispresent(v_responsePrimitive.primitiveContent)) { - if(ischosen(v_responsePrimitive.primitiveContent.any_1[0].Schedule_optional)) { + if(ischosen(v_responsePrimitive.primitiveContent.schedule_optional)) { //Check attribute 1 - if(v_responsePrimitive.primitiveContent.any_1[0].Schedule_optional.scheduleElement != valueof(v_updateRequest.primitiveContent.any_1[0].Schedule_optional.scheduleElement)){ + if(v_responsePrimitive.primitiveContent.schedule_optional.scheduleElement != valueof(v_updateRequest.primitiveContent.schedule_optional.scheduleElement)){ setverdict(fail, testcasename() & ": Error: Expiration Time attribute not updated correctly") } //Check attribute 2 - if(v_responsePrimitive.primitiveContent.any_1[0].Schedule_optional.announceTo != valueof(v_updateRequest.primitiveContent.any_1[0].Schedule_optional.announceTo)){ + if(v_responsePrimitive.primitiveContent.schedule_optional.announceTo != valueof(v_updateRequest.primitiveContent.schedule_optional.announceTo)){ setverdict(fail, testcasename() & ": Error: MaxNrOfInstances attribute not updated correctly") } //Check attribute 3 - if(ispresent(v_responsePrimitive.primitiveContent.any_1[0].Schedule_optional.labels)){ + if(ispresent(v_responsePrimitive.primitiveContent.schedule_optional.labels)){ setverdict(fail, testcasename() & ": Error: Labels attribute not deleted correctly") } } @@ -5445,10 +6012,10 @@ module OneM2M_Testcases { var template RequestPrimitive v_updateRequest := m_updatePollingChannelBase; var ResponsePrimitive v_responsePrimitive; - v_createRequest.primitiveContent.any_1[0].PollingChannel_optional.labels := v_labels_1;//Attribute 3 + v_createRequest.primitiveContent.pollingChannel_optional.labels := v_labels_1;//Attribute 3 //No Attribute 1 - //v_updateRequest.primitiveContent.any_1[0].PollingChannel_optional.accessControlPolicyIDs := v_acp;//Attribute 2 TODO Find another alternative for Attribute 2 - v_updateRequest.primitiveContent.any_1[0].PollingChannel_optional.labels := v_labels_2;//Attribute 3 + //v_updateRequest.primitiveContent.pollingChannel_optional.accessControlPolicyIDs := v_acp;//Attribute 2 TODO Find another alternative for Attribute 2 + v_updateRequest.primitiveContent.pollingChannel_optional.labels := v_labels_2;//Attribute 3 v_nullFields := {{"labels", omit}}; @@ -5456,15 +6023,15 @@ module OneM2M_Testcases { if(getverdict == pass){ if(ispresent(v_responsePrimitive.primitiveContent)) { - if(ischosen(v_responsePrimitive.primitiveContent.any_1[0].PollingChannel_optional)) { + if(ischosen(v_responsePrimitive.primitiveContent.pollingChannel_optional)) { //Check attribute 1 //Check attribute 2 TODO once another alternative is found, activate this checking - /*if(not match(v_responsePrimitive.primitiveContent.any_1[0].PollingChannel_optional.accessControlPolicyIDs, valueof(v_updateRequest.primitiveContent.any_1[0].PollingChannel_optional.accessControlPolicyIDs))){ + /*if(not match(v_responsePrimitive.primitiveContent.pollingChannel_optional.accessControlPolicyIDs, valueof(v_updateRequest.primitiveContent.pollingChannel_optional.accessControlPolicyIDs))){ setverdict(fail, testcasename() & ": Error: ACPI attribute not added correctly") }*/ //Check attribute 3 - if(ispresent(v_responsePrimitive.primitiveContent.any_1[0].PollingChannel_optional.labels)){ + if(ispresent(v_responsePrimitive.primitiveContent.pollingChannel_optional.labels)){ setverdict(fail, testcasename() & ": Error: Labels attribute not deleted correctly") } } @@ -5480,10 +6047,10 @@ module OneM2M_Testcases { var template RequestPrimitive v_updateRequest := m_updateSubscriptionBase; var ResponsePrimitive v_responsePrimitive; - v_createRequest.primitiveContent.any_1[0].Subscription_optional.expirationCounter := 10;//Attribute 3 - v_updateRequest.primitiveContent.any_1[0].Subscription_optional.expirationTime := "20301231T012345";//Attribute 1 - v_updateRequest.primitiveContent.any_1[0].Subscription_optional.labels := v_labels_1;//Attribute 2 - v_updateRequest.primitiveContent.any_1[0].Subscription_optional.expirationCounter := 5;//Attribute 3 + v_createRequest.primitiveContent.subscription_optional.expirationCounter := 10;//Attribute 3 + v_updateRequest.primitiveContent.subscription_optional.expirationTime := "20301231T012345";//Attribute 1 + v_updateRequest.primitiveContent.subscription_optional.labels := v_labels_1;//Attribute 2 + v_updateRequest.primitiveContent.subscription_optional.expirationCounter := 5;//Attribute 3 v_nullFields := {{"expirationCounter", omit}}; @@ -5491,17 +6058,17 @@ module OneM2M_Testcases { if(getverdict == pass){ if(ispresent(v_responsePrimitive.primitiveContent)) { - if(ischosen(v_responsePrimitive.primitiveContent.any_1[0].Subscription_optional)) { + if(ischosen(v_responsePrimitive.primitiveContent.subscription_optional)) { //Check attribute 1 - if(not match(v_responsePrimitive.primitiveContent.any_1[0].Subscription_optional.labels, valueof(v_updateRequest.primitiveContent.any_1[0].Subscription_optional.labels))){ + if(not match(v_responsePrimitive.primitiveContent.subscription_optional.labels, valueof(v_updateRequest.primitiveContent.subscription_optional.labels))){ setverdict(fail, testcasename() & ": Error: Labels attribute not updated correctly") } //Check attribute 2 - if(not match(v_responsePrimitive.primitiveContent.any_1[0].Subscription_optional.expirationTime, valueof(v_updateRequest.primitiveContent.any_1[0].Subscription_optional.expirationTime))){ + if(not match(v_responsePrimitive.primitiveContent.subscription_optional.expirationTime, valueof(v_updateRequest.primitiveContent.subscription_optional.expirationTime))){ setverdict(fail, testcasename() & ": Error: expirationTime attribute not updated correctly") } //Check attribute 3 - if(ispresent(v_responsePrimitive.primitiveContent.any_1[0].Subscription_optional.expirationCounter)){ + if(ispresent(v_responsePrimitive.primitiveContent.subscription_optional.expirationCounter)){ setverdict(fail, testcasename() & ": Error: expirationCounter attribute not deleted correctly") } } @@ -5541,7 +6108,7 @@ module OneM2M_Testcases { alt { [] mcaPort.receive(mw_response(mw_responsePrimitiveOK())) -> value v_response { tc_ac.stop; - setverdict(pass, testcasename() & ": Attribute of resource type " & int2str(enum2int(p_resourceType)) & " updated successfuly"); + setverdict(pass, testcasename() & ": Attribute of resource type " & int2str(enum2int(p_resourceType)) & " updated successfully"); } [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { tc_ac.stop; @@ -5571,9 +6138,9 @@ module OneM2M_Testcases { var XSD.PositiveInteger v_expirationCounter := 1; var template RequestPrimitive v_updateRequest := m_updateContainerBase; - v_updateRequest.primitiveContent.any_1 := {{Container_update_invalid := m_contentUpdateContainer_invalid}}; + v_updateRequest.primitiveContent := {container_update_invalid := m_contentUpdateContainer_invalid}; - v_updateRequest.primitiveContent.any_1[0].Container_update_invalid.expirationCounter := v_expirationCounter; + v_updateRequest.primitiveContent.container_update_invalid.expirationCounter := v_expirationCounter; f_CSE_DMR_UPD_BI_005(int3, m_createContainerBase, v_updateRequest);//Container } @@ -5583,9 +6150,9 @@ module OneM2M_Testcases { var XSD.PositiveInteger v_expirationCounter := 1; var template RequestPrimitive v_updateRequest := m_updateGroupBase; - v_updateRequest.primitiveContent.any_1 := {{Group_update_invalid := m_contentUpdateGroup_invalid}}; + v_updateRequest.primitiveContent := {group_update_invalid := m_contentUpdateGroup_invalid}; - v_updateRequest.primitiveContent.any_1[0].Group_update_invalid.expirationCounter := v_expirationCounter; + v_updateRequest.primitiveContent.group_update_invalid.expirationCounter := v_expirationCounter; f_CSE_DMR_UPD_BI_005(int9, m_createGroupBase, v_updateRequest);//Group } @@ -5595,9 +6162,9 @@ module OneM2M_Testcases { var XSD.PositiveInteger v_expirationCounter := 1; var template RequestPrimitive v_updateRequest := m_updateAcpBase; - v_updateRequest.primitiveContent.any_1 := {{ACP_update_invalid := m_contentUpdateAcp_invalid}}; + v_updateRequest.primitiveContent := {aCP_update_invalid := m_contentUpdateAcp_invalid}; - v_updateRequest.primitiveContent.any_1[0].ACP_update_invalid.expirationCounter := v_expirationCounter; + v_updateRequest.primitiveContent.aCP_update_invalid.expirationCounter := v_expirationCounter; f_CSE_DMR_UPD_BI_005(int1, m_createAcpBase, v_updateRequest);//AccessControlPolicy } @@ -5607,9 +6174,9 @@ module OneM2M_Testcases { var XSD.PositiveInteger v_expirationCounter := 1; var template RequestPrimitive v_updateRequest := m_updateScheduleBase; - v_updateRequest.primitiveContent.any_1 := {{Schedule_update_invalid := m_contentUpdateSchedule_invalid}}; + v_updateRequest.primitiveContent := {schedule_update_invalid := m_contentUpdateSchedule_invalid}; - v_updateRequest.primitiveContent.any_1[0].Schedule_update_invalid.expirationCounter := v_expirationCounter; + v_updateRequest.primitiveContent.schedule_update_invalid.expirationCounter := v_expirationCounter; f_CSE_DMR_UPD_BI_005(int18, m_createScheduleBase, v_updateRequest);//Schedule } @@ -5619,9 +6186,9 @@ module OneM2M_Testcases { var XSD.PositiveInteger v_expirationCounter := 1; var template RequestPrimitive v_updateRequest := m_updatePollingChannelBase; - v_updateRequest.primitiveContent.any_1 := {{PollingChannel_update_invalid := m_contentUpdatePollingChannel_invalid}}; + v_updateRequest.primitiveContent := {pollingChannel_update_invalid := m_contentUpdatePollingChannel_invalid}; - v_updateRequest.primitiveContent.any_1[0].PollingChannel_update_invalid.expirationCounter := v_expirationCounter; + v_updateRequest.primitiveContent.pollingChannel_update_invalid.expirationCounter := v_expirationCounter; f_CSE_DMR_UPD_BI_005(int15, m_createPollingChannelBase, v_updateRequest);//PollingChannel } @@ -5631,9 +6198,9 @@ module OneM2M_Testcases { var XSD.NonNegativeInteger v_maxNrOfInstances := 5; var template RequestPrimitive v_updateRequest := m_updateSubscriptionBase; - v_updateRequest.primitiveContent.any_1 := {{Subscription_update_invalid := m_contentUpdateSubscription_invalid}}; + v_updateRequest.primitiveContent := {subscription_update_invalid := m_contentUpdateSubscription_invalid}; - v_updateRequest.primitiveContent.any_1[0].Subscription_update_invalid.maxNrOfInstances := v_maxNrOfInstances; + v_updateRequest.primitiveContent.subscription_update_invalid.maxNrOfInstances := v_maxNrOfInstances; f_CSE_DMR_UPD_BI_005(int23, m_createSubscriptionBase, v_updateRequest);//Subscription } @@ -5697,7 +6264,7 @@ module OneM2M_Testcases { var Labels v_labels_1 := {"VALUE_1"}; var template RequestPrimitive v_updateRequest := m_updateContainerBase; - v_updateRequest.primitiveContent.any_1[0].Container_optional.labels := v_labels_1; + v_updateRequest.primitiveContent.container_optional.labels := v_labels_1; f_CSE_DMR_UPD_BO_006(int3, m_createContainerBase, v_updateRequest);//Container } @@ -5707,7 +6274,7 @@ module OneM2M_Testcases { var Labels v_labels_1 := {"VALUE_1"}; var template RequestPrimitive v_updateRequest := m_updateGroupBase; - v_updateRequest.primitiveContent.any_1[0].Group_optional.labels := v_labels_1; + v_updateRequest.primitiveContent.group_optional.labels := v_labels_1; f_CSE_DMR_UPD_BO_006(int9, m_createGroupBase, v_updateRequest);//Group } @@ -5718,9 +6285,9 @@ module OneM2M_Testcases { var template RequestPrimitive v_updateRequest := m_updateAcpBase; var template RequestPrimitive v_requestPrimitive := m_createAcpBase; - v_requestPrimitive.primitiveContent.any_1[0].AccessControlPolicy_optional.selfPrivileges.accessControlRule_list[0].accessControlOperations := int59; + v_requestPrimitive.primitiveContent.accessControlPolicy_optional.selfPrivileges.accessControlRule_list[0].accessControlOperations := int59; - v_updateRequest.primitiveContent.any_1[0].AccessControlPolicy_optional.labels := v_labels_1; + v_updateRequest.primitiveContent.accessControlPolicy_optional.labels := v_labels_1; f_CSE_DMR_UPD_BO_006(int1, v_requestPrimitive, v_updateRequest);//AccessControlPolicy } @@ -5730,7 +6297,7 @@ module OneM2M_Testcases { var Labels v_labels_1 := {"VALUE_1"}; var template RequestPrimitive v_updateRequest := m_updateScheduleBase; - v_updateRequest.primitiveContent.any_1[0].Schedule_optional.labels := v_labels_1; + v_updateRequest.primitiveContent.schedule_optional.labels := v_labels_1; f_CSE_DMR_UPD_BO_006(int18, m_createScheduleBase, v_updateRequest);//Schedule } @@ -5740,7 +6307,7 @@ module OneM2M_Testcases { var Labels v_labels_1 := {"VALUE_1"}; var template RequestPrimitive v_updateRequest := m_updatePollingChannelBase; - v_updateRequest.primitiveContent.any_1[0].PollingChannel_optional.labels := v_labels_1; + v_updateRequest.primitiveContent.pollingChannel_optional.labels := v_labels_1; f_CSE_DMR_UPD_BO_006(int15, m_createPollingChannelBase, v_updateRequest);//PollingChannel } @@ -5750,7 +6317,7 @@ module OneM2M_Testcases { var Labels v_labels_1 := {"VALUE_1"}; var template RequestPrimitive v_updateRequest := m_updateSubscriptionBase; - v_updateRequest.primitiveContent.any_1[0].Subscription_optional.labels := v_labels_1; + v_updateRequest.primitiveContent.subscription_optional.labels := v_labels_1; f_CSE_DMR_UPD_BO_006(int23, m_createSubscriptionBase, v_updateRequest);//Subscription } @@ -5827,8 +6394,8 @@ module OneM2M_Testcases { var Timestamp v_creationTime := "20001231T012345"; var template RequestPrimitive v_updateRequest := m_updateContainerBase; - v_updateRequest.primitiveContent.any_1 := {{Container_update_invalid := m_contentUpdateContainer_invalid}}; - v_updateRequest.primitiveContent.any_1[0].Container_update_invalid.creationTime := v_creationTime; + v_updateRequest.primitiveContent := {container_update_invalid := m_contentUpdateContainer_invalid}; + v_updateRequest.primitiveContent.container_update_invalid.creationTime := v_creationTime; f_CSE_DMR_UPD_BO_007(int3, m_createContainerBase, v_updateRequest);//Container } @@ -5838,8 +6405,8 @@ module OneM2M_Testcases { var Timestamp v_creationTime := "20001231T012345"; var template RequestPrimitive v_updateRequest := m_updateGroupBase; - v_updateRequest.primitiveContent.any_1 := {{Group_update_invalid := m_contentUpdateGroup_invalid}}; - v_updateRequest.primitiveContent.any_1[0].Group_update_invalid.creationTime := v_creationTime; + v_updateRequest.primitiveContent := {group_update_invalid := m_contentUpdateGroup_invalid}; + v_updateRequest.primitiveContent.group_update_invalid.creationTime := v_creationTime; f_CSE_DMR_UPD_BO_007(int9, m_createGroupBase, v_updateRequest);//Group } @@ -5849,8 +6416,8 @@ module OneM2M_Testcases { var Timestamp v_creationTime := "20001231T012345"; var template RequestPrimitive v_updateRequest := m_updateAcpBase; - v_updateRequest.primitiveContent.any_1 := {{ACP_update_invalid := m_contentUpdateAcp_invalid}}; - v_updateRequest.primitiveContent.any_1[0].ACP_update_invalid.creationTime := v_creationTime; + v_updateRequest.primitiveContent := {aCP_update_invalid := m_contentUpdateAcp_invalid}; + v_updateRequest.primitiveContent.aCP_update_invalid.creationTime := v_creationTime; f_CSE_DMR_UPD_BO_007(int1, m_createAcpBase, v_updateRequest);//AccessControlPolicy } @@ -5860,8 +6427,8 @@ module OneM2M_Testcases { var Timestamp v_creationTime := "20001231T012345"; var template RequestPrimitive v_updateRequest := m_updateScheduleBase; - v_updateRequest.primitiveContent.any_1 := {{Schedule_update_invalid := m_contentUpdateSchedule_invalid}}; - v_updateRequest.primitiveContent.any_1[0].Schedule_update_invalid.creationTime := v_creationTime; + v_updateRequest.primitiveContent := {schedule_update_invalid := m_contentUpdateSchedule_invalid}; + v_updateRequest.primitiveContent.schedule_update_invalid.creationTime := v_creationTime; f_CSE_DMR_UPD_BO_007(int18, m_createScheduleBase, v_updateRequest);//Schedule } @@ -5871,8 +6438,8 @@ module OneM2M_Testcases { var Timestamp v_creationTime := "20001231T012345"; var template RequestPrimitive v_updateRequest := m_updatePollingChannelBase; - v_updateRequest.primitiveContent.any_1 := {{PollingChannel_update_invalid := m_contentUpdatePollingChannel_invalid}}; - v_updateRequest.primitiveContent.any_1[0].PollingChannel_update_invalid.creationTime := v_creationTime; + v_updateRequest.primitiveContent := {pollingChannel_update_invalid := m_contentUpdatePollingChannel_invalid}; + v_updateRequest.primitiveContent.pollingChannel_update_invalid.creationTime := v_creationTime; f_CSE_DMR_UPD_BO_007(int15, m_createPollingChannelBase, v_updateRequest);//PollingChannel } @@ -5882,8 +6449,8 @@ module OneM2M_Testcases { var Timestamp v_creationTime := "20001231T012345"; var template RequestPrimitive v_updateRequest := m_updateSubscriptionBase; - v_updateRequest.primitiveContent.any_1 := {{Subscription_update_invalid := m_contentUpdateSubscription_invalid}}; - v_updateRequest.primitiveContent.any_1[0].Subscription_update_invalid.creationTime := v_creationTime; + v_updateRequest.primitiveContent := {subscription_update_invalid := m_contentUpdateSubscription_invalid}; + v_updateRequest.primitiveContent.subscription_update_invalid.creationTime := v_creationTime; f_CSE_DMR_UPD_BO_007(int23, m_createSubscriptionBase, v_updateRequest);//Subscription } @@ -5955,7 +6522,7 @@ module OneM2M_Testcases { v_nullFields := {{"expirationTime", omit}}; - v_updateRequest.primitiveContent.any_1[0].Container_optional.expirationTime := v_expirationTime; + v_updateRequest.primitiveContent.container_optional.expirationTime := v_expirationTime; f_CSE_DMR_UPD_BO_008(int3, m_createContainerBase, v_updateRequest, v_nullFields);//Container } @@ -5968,7 +6535,7 @@ module OneM2M_Testcases { v_nullFields := {{"expirationTime", omit}}; - v_updateRequest.primitiveContent.any_1[0].Group_optional.expirationTime := v_expirationTime; + v_updateRequest.primitiveContent.group_optional.expirationTime := v_expirationTime; f_CSE_DMR_UPD_BO_008(int9, m_createGroupBase, v_updateRequest, v_nullFields);//Group } @@ -5981,7 +6548,7 @@ module OneM2M_Testcases { v_nullFields := {{"expirationTime", omit}}; - v_updateRequest.primitiveContent.any_1[0].AccessControlPolicy_optional.expirationTime := v_expirationTime; + v_updateRequest.primitiveContent.accessControlPolicy_optional.expirationTime := v_expirationTime; f_CSE_DMR_UPD_BO_008(int1, m_createAcpBase, v_updateRequest, v_nullFields);//AccessControlPolicy } @@ -5994,7 +6561,7 @@ module OneM2M_Testcases { v_nullFields := {{"expirationTime", omit}}; - v_updateRequest.primitiveContent.any_1[0].Schedule_optional.expirationTime := v_expirationTime; + v_updateRequest.primitiveContent.schedule_optional.expirationTime := v_expirationTime; f_CSE_DMR_UPD_BO_008(int18, m_createScheduleBase, v_updateRequest, v_nullFields);//Schedule } @@ -6007,7 +6574,7 @@ module OneM2M_Testcases { v_nullFields := {{"expirationTime", omit}}; - v_updateRequest.primitiveContent.any_1[0].PollingChannel_optional.expirationTime := v_expirationTime; + v_updateRequest.primitiveContent.pollingChannel_optional.expirationTime := v_expirationTime; f_CSE_DMR_UPD_BO_008(int15, m_createPollingChannelBase, v_updateRequest, v_nullFields);//PollingChannel } @@ -6020,7 +6587,7 @@ module OneM2M_Testcases { v_nullFields := {{"expirationTime", omit}}; - v_updateRequest.primitiveContent.any_1[0].Subscription_optional.expirationTime := v_expirationTime; + v_updateRequest.primitiveContent.subscription_optional.expirationTime := v_expirationTime; f_CSE_DMR_UPD_BO_008(int23, m_createSubscriptionBase, v_updateRequest, v_nullFields);//Subscription } @@ -6090,7 +6657,7 @@ module OneM2M_Testcases { var integer v_containerIndex := -1; 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; + v_updateRequest.primitiveContent.container_optional.labels := v_labels_1; // Test control @@ -6105,7 +6672,7 @@ module OneM2M_Testcases { v_containerIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex); // Test Body - if(ispresent(vc_resourcesList[v_containerIndex].resource.any_1[0].Container_optional.stateTag)) { + if(ispresent(vc_resourcesList[v_containerIndex].resource.container_optional.stateTag)) { v_updateRequest := f_getUpdateRequestPrimitive(int3, v_containerIndex, v_updateRequest); f_cse_updateResource(v_updateRequest); @@ -6116,7 +6683,7 @@ module OneM2M_Testcases { alt { [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { tc_ac.stop; - if(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Container_optional.stateTag == 1) { //(Create and Delete) + if(v_response.primitive.responsePrimitive.primitiveContent.container_optional.stateTag == 1) { //(Create and Delete) setverdict(pass, testcasename() & ": The stateTag attribute is incremented"); } else{ @@ -6143,9 +6710,196 @@ module OneM2M_Testcases { // Tear down f_cf01Down(); - }//end TC_CSE_DMR_UPD_BV_009 + }//end TC_CSE_DMR_UPD_BV_010 - } // end group g_CSE_DMR_UPD_BV_009 + } // end group g_CSE_DMR_UPD_BV_010 + + group g_CSE_DMR_UPD_BV_011{ + + testcase TC_CSE_DMR_UPD_BV_011() runs on CseTester system CseSystem { + // Local variables + var MsgIn v_response; + var RequestPrimitive v_request; + var integer v_aeIndex := -1; + var integer v_containerIndex := -1; + var integer v_contentInstanceIndex := -1; + var template RequestPrimitive v_updateRequest := m_updateContentInstanceBase; + var Labels v_labels:= {"LABEL"}; + + v_updateRequest.primitiveContent.contentInstance_optional.labels := v_labels; + + // Test control + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + + v_containerIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex); + + v_contentInstanceIndex := f_cse_createResource(int4, m_createContentInstanceBase, v_containerIndex); + + //Test Body + v_request := f_getUpdateRequestPrimitive(int4, v_contentInstanceIndex, v_updateRequest); + + mcaPort.send(m_request(v_request)); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int4005))) -> value v_response { + tc_ac.stop; + setverdict(pass, testcasename() & ": Not allowed to update a contentInstance with error OPERATION_NOT_ALLOWED"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { + tc_ac.stop; + setverdict(fail, testcasename() & ": Not allowed to update a contentInstance with a wrong error code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + tc_ac.stop; + setverdict(fail, testcasename() & ": Accepted update of contentInstance"); + } + [] tc_ac.timeout { + setverdict(inconc, testcasename() & ": No answer while updating contentInstance"); + } + } + + // Postamble + f_cse_postamble_deleteResources(); + + // Tear down + f_cf01Down(); + + }//end TC_CSE_DMR_UPD_BV_011 + + } // end group g_CSE_DMR_UPD_BV_011 + + group g_CSE_DMR_UPD_BI_012{ + + testcase TC_CSE_DMR_UPD_BI_012() runs on CseTester system CseSystem { + // Local variables + var MsgIn v_response; + var RequestPrimitive v_request; + var integer v_aeIndex := -1; + var integer v_containerIndex := -1; + var integer v_contentInstanceIndex := -1; + var template RequestPrimitive v_updateRequest := m_updateContentInstanceBase; + var Labels v_labels := {"LABEL"}; + + v_updateRequest.primitiveContent.contentInstance_optional.labels := v_labels; + + // Test control + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + + v_containerIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex); + + v_contentInstanceIndex := f_cse_createResource(int4, m_createContentInstanceBase, v_containerIndex); + + //Test Body + v_request := f_getUpdateRequestPrimitive(int4, v_containerIndex, v_updateRequest); + + v_request.to_ := v_request.to_ & "/" & c_resourceShortNameLatest; //<latest> + + mcaPort.send(m_request(v_request)); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int4005))) -> value v_response { + tc_ac.stop; + setverdict(pass, testcasename() & ": Not allowed to update a latest resource with error OPERATION_NOT_ALLOWED"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { + tc_ac.stop; + setverdict(fail, testcasename() & ": Not allowed to update a latest resource with a wrong error code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + tc_ac.stop; + setverdict(fail, testcasename() & ": Accepted update of a latest resource"); + } + [] tc_ac.timeout { + setverdict(inconc, testcasename() & ": No answer while updating a latest resource"); + } + } + + // Postamble + f_cse_postamble_deleteResources(); + + // Tear down + f_cf01Down(); + + }//end TC_CSE_DMR_UPD_BI_012 + + } // end group g_CSE_DMR_UPD_BI_012 + + group g_CSE_DMR_UPD_BI_013{ + + testcase TC_CSE_DMR_UPD_BI_013() runs on CseTester system CseSystem { + // Local variables + var MsgIn v_response; + var RequestPrimitive v_request; + var integer v_aeIndex := -1; + var integer v_containerIndex := -1; + var integer v_contentInstanceIndex := -1; + var template RequestPrimitive v_updateRequest := m_updateContentInstanceBase; + var Labels v_labels:= {"LABEL"}; + + v_updateRequest.primitiveContent.contentInstance_optional.labels := v_labels; + + // Test control + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + + v_containerIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex); + + v_contentInstanceIndex := f_cse_createResource(int4, m_createContentInstanceBase, v_containerIndex); + + //Test Body + v_request := f_getUpdateRequestPrimitive(int4, v_containerIndex, v_updateRequest); + + v_request.to_ := v_request.to_ & "/" & c_resourceShortNameOldest; //<oldest> + + mcaPort.send(m_request(v_request)); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int4005))) -> value v_response { + tc_ac.stop; + setverdict(pass, testcasename() & ": Not allowed to update an oldest resource with error OPERATION_NOT_ALLOWED"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { + tc_ac.stop; + setverdict(fail, testcasename() & ": Not allowed to update an oldest resource with a wrong error code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + tc_ac.stop; + setverdict(fail, testcasename() & ": Accepted update of an oldest resource"); + } + [] tc_ac.timeout { + setverdict(inconc, testcasename() & ": No answer while updating an oldest resource"); + } + } + + // Postamble + f_cse_postamble_deleteResources(); + + // Tear down + f_cf01Down(); + + }//end TC_CSE_DMR_UPD_BI_013 + + } // end group g_CSE_DMR_UPD_BI_013 }//end group Update @@ -6226,7 +6980,7 @@ module OneM2M_Testcases { alt { [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { tc_ac.stop; - setverdict(pass, testcasename() & ": Resource" & int2str(enum2int(p_resourceType)) & " deleted successfuly"); + setverdict(pass, testcasename() & ": Resource" & int2str(enum2int(p_resourceType)) & " deleted successfully"); } [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { tc_ac.stop; @@ -6329,7 +7083,7 @@ module OneM2M_Testcases { alt { [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { tc_ac.stop; - setverdict(pass, testcasename() & ": Attribute of resource type int1 (Acp) updated successfuly"); + setverdict(pass, testcasename() & ": Attribute of resource type int1 (Acp) updated successfully"); } [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { tc_ac.stop; @@ -6342,7 +7096,7 @@ module OneM2M_Testcases { //Adjustments for ACP resource type if(p_resourceType == int1) { - p_createRequestPrimitive.primitiveContent.any_1[0].AccessControlPolicy_optional.selfPrivileges.accessControlRule_list := {v_accessControlRule_2};//{v_accessControlRule_1,v_accessControlRule_2}; + p_createRequestPrimitive.primitiveContent.accessControlPolicy_optional.selfPrivileges.accessControlRule_list := {v_accessControlRule_2};//{v_accessControlRule_1,v_accessControlRule_2}; } else { f_setAcpId(p_createRequestPrimitive, {f_getResourceId(vc_resourcesList[v_acpAuxIndex].resource)}); v_setOfArcs.accessControlRule_list := {v_accessControlRule_1, v_accessControlRule_2}; @@ -6518,7 +7272,7 @@ module OneM2M_Testcases { alt { [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { tc_ac.stop; - setverdict(pass, testcasename() & ":Resource type " & int2str(enum2int(p_resourceType)) & " delete successfuly"); + setverdict(pass, testcasename() & ":Resource type " & int2str(enum2int(p_resourceType)) & " delete successfully"); } [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { tc_ac.stop; @@ -6582,7 +7336,7 @@ module OneM2M_Testcases { v_resourceIndex := f_cse_createResource(c_containerResourceType, m_createContainerBase, v_aeIndex); - if(ispresent(vc_resourcesList[v_resourceIndex].resource.any_1[0].Container_optional.stateTag)) { + if(ispresent(vc_resourcesList[v_resourceIndex].resource.container_optional.stateTag)) { v_childResourceIndex := f_cse_createResource(c_containerResourceType, m_createContainerBase, v_resourceIndex); @@ -6594,7 +7348,7 @@ module OneM2M_Testcases { alt { [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { tc_ac.stop; - setverdict(pass, testcasename() & ": Resource type " & int2str(enum2int(c_containerResourceType)) & " delete successfuly"); + setverdict(pass, testcasename() & ": Resource type " & int2str(enum2int(c_containerResourceType)) & " delete successfully"); } [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { tc_ac.stop; @@ -6613,7 +7367,7 @@ module OneM2M_Testcases { alt { [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { tc_ac.stop; - if(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Container_optional.stateTag == 2) { //(Create and Delete) + if(v_response.primitive.responsePrimitive.primitiveContent.container_optional.stateTag == 2) { //(Create and Delete) setverdict(pass, testcasename() & ": The stateTag attribute is incremented"); } else{ @@ -6637,22 +7391,155 @@ module OneM2M_Testcases { // Postamble f_cse_postamble_deleteResources(); - // Tear down - f_cf01Down(); + // Tear down + f_cf01Down(); + + }//end f_CSE_DMR_DEL_BV_005 + } // end group g_CSE_DMR_DEL_BV_005 + + group g_CSE_DMR_DEL_BV_006{ + + testcase TC_CSE_DMR_DEL_BV_006() runs on CseTester system CseSystem { + // Local variables + var MsgIn v_response; + var RequestPrimitive v_request; + var integer v_aeIndex := -1; + var integer v_containerIndex := -1; + var integer v_contentInstanceIndex := -1; + var PrimitiveContent v_attributesContainer, v_attributesContainer_afterDeletion; + + // Test control + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + + v_containerIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex); + + v_contentInstanceIndex := f_cse_createResource(int4, m_createContentInstanceBase, v_containerIndex); + + v_attributesContainer := f_cse_retrieveResource(v_containerIndex); + + if(not(ispresent(v_attributesContainer.container_optional.currentNrOfInstances))) { + setverdict(fail, testcasename() & ": Error the currentNrOfInstances attribute is empty"); + f_checkCseTesterStatus(); + } + + // Test Body + f_cse_deleteResource(valueof(m_deleteRequest(f_getResourceAddress(v_contentInstanceIndex)))); + + v_attributesContainer_afterDeletion := f_cse_retrieveResource(v_containerIndex); + + if(not(ispresent(v_attributesContainer.container_optional.currentNrOfInstances))) { + setverdict(fail, testcasename() & ": Error the currentNrOfInstances attribute is empty"); + f_checkCseTesterStatus(); + } + + if((v_attributesContainer.container_optional.currentNrOfInstances > v_attributesContainer_afterDeletion.container_optional.currentNrOfInstances) and + (v_attributesContainer.container_optional.currentByteSize > v_attributesContainer_afterDeletion.container_optional.currentByteSize)) { + setverdict(pass, testcasename() & ": The currentNrOfInstances and currentByteSize attributes are decreased"); + } else { + setverdict(fail, testcasename() & ": currentNrOfInstances and/or currentByteSize attributes are not decreased"); + } + + // Postamble + f_cse_postamble_deleteResources(); + + // Tear down + f_cf01Down(); + + }//end f_CSE_DMR_DEL_BV_006 + } // end group g_CSE_DMR_DEL_BV_006 + + group g_CSE_DMR_DEL_BV_007{ + + testcase TC_CSE_DMR_DEL_BV_007() runs on CseTester system CseSystem { + // Local variables + var MsgIn v_response; + var RequestPrimitive v_request; + var integer v_aeIndex := -1; + var integer v_containerIndex := -1; + var integer v_contentInstanceIndex_1 := -1; + var integer v_contentInstanceIndex_2 := -1; + const ResourceType c_containerResourceType := int3; + + // Test control + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + + v_containerIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex); + + v_contentInstanceIndex_1 := f_cse_createResource(int4, m_createContentInstance_noResourceName, v_containerIndex); + v_contentInstanceIndex_2 := f_cse_createResource(int4, m_createContentInstance_noResourceName, v_containerIndex); + + // Test Body + v_request := valueof(m_deleteRequest(f_getResourceAddress(v_containerIndex) & "/la")); + + mcaPort.send(m_request(v_request)); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + tc_ac.stop; + setverdict(pass, testcasename() & ": Resource type " & int2str(enum2int(c_containerResourceType)) & " deleted successfuly"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { + tc_ac.stop; + setverdict(fail, testcasename() & ": Error while deleting resource type " & int2str(enum2int(c_containerResourceType))); + } + [] tc_ac.timeout { + setverdict(inconc, testcasename() & ": No answer while deleting resource type " & int2str(enum2int(c_containerResourceType))); + } + } + + f_checkCseTesterStatus(); + + mcaPort.send(m_request(m_retrieveResource((f_getResourceAddress(v_contentInstanceIndex_2)), f_getOriginator(v_contentInstanceIndex_2)))); + + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + tc_ac.stop; + setverdict(fail, testcasename() & ": Resource type" & int2str(enum2int(c_containerResourceType)) & " has already been deleted"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { + tc_ac.stop; + setverdict(pass, testcasename() & ": Error while retrieving resource attributes as" & int2str(enum2int(c_containerResourceType)) & " has been deleted"); + } + [] tc_ac.timeout { + setverdict(fail, testcasename() & ": No answer while retrieving resource attributes"); + } + } + + // Postamble + f_cse_postamble_deleteResources(); + + // Tear down + f_cf01Down(); - }//end f_CSE_DMR_DEL_BV_005 - } // end group g_CSE_DMR_DEL_BV_005 - - group g_CSE_DMR_DEL_BV_006{ + }//end f_CSE_DMR_DEL_BV_007 + } // end group g_CSE_DMR_DEL_BV_007 + + group g_CSE_DMR_DEL_BO_008{ - testcase TC_CSE_DMR_DEL_BV_006() runs on CseTester system CseSystem { + testcase TC_CSE_DMR_DEL_BO_008() runs on CseTester system CseSystem { // Local variables var MsgIn v_response; var RequestPrimitive v_request; var integer v_aeIndex := -1; var integer v_containerIndex := -1; - var integer v_contentInstanceIndex := -1; - var PrimitiveContent v_attributesContainer, v_attributesContainer_afterDeletion; + var integer v_contentInstanceIndex := -1; + const ResourceType c_containerResourceType := int4; + // Test control @@ -6665,32 +7552,98 @@ module OneM2M_Testcases { v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); v_containerIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex); - - v_contentInstanceIndex := f_cse_createResource(int4, m_createContentInstanceBase, v_containerIndex); - - v_attributesContainer := f_cse_retrieveResource(v_containerIndex); - - if(not(ispresent(v_attributesContainer.any_1[0].Container_optional.currentNrOfInstances))) { - setverdict(fail, testcasename() & ": Error the currentNrOfInstances attribute is empty"); - f_checkCseTesterStatus(); - } // Test Body - f_cse_deleteResource(valueof(m_deleteRequest(f_getResourceAddress(v_contentInstanceIndex)))); - - v_attributesContainer_afterDeletion := f_cse_retrieveResource(v_containerIndex); + v_request := valueof(m_deleteRequest(f_getResourceAddress(v_containerIndex) & "/la")); + mcaPort.send(m_request(v_request)); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int4004))) -> value v_response { + tc_ac.stop; + setverdict(pass, testcasename() & ": Resource type " & int2str(enum2int(c_containerResourceType)) & " NOT FOUND"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + tc_ac.stop; + setverdict(fail, testcasename() & ": Resource type " & int2str(enum2int(c_containerResourceType)) & " has not been created"); + } + [] tc_ac.timeout { + setverdict(fail, testcasename() & ": No answer while deleting resource type " & int2str(enum2int(c_containerResourceType))); + } + } - if(not(ispresent(v_attributesContainer.any_1[0].Container_optional.currentNrOfInstances))) { - setverdict(fail, testcasename() & ": Error the currentNrOfInstances attribute is empty"); - f_checkCseTesterStatus(); - } + // Postamble + f_cse_postamble_deleteResources(); + + // Tear down + f_cf01Down(); + + }//end f_CSE_DMR_DEL_BO_008 + } // end group g_CSE_DMR_DEL_BO_008 + + group g_CSE_DMR_DEL_BV_009{ + + testcase TC_CSE_DMR_DEL_BV_009() runs on CseTester system CseSystem { + // Local variables + var MsgIn v_response; + var RequestPrimitive v_request; + var integer v_aeIndex := -1; + var integer v_containerIndex := -1; + var integer v_contentInstanceIndex_1 := -1; + var integer v_contentInstanceIndex_2 := -1; + const ResourceType c_containerResourceType := int3; + + // Test control + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - if((v_attributesContainer.any_1[0].Container_optional.currentNrOfInstances > v_attributesContainer_afterDeletion.any_1[0].Container_optional.currentNrOfInstances) and - (v_attributesContainer.any_1[0].Container_optional.currentByteSize > v_attributesContainer_afterDeletion.any_1[0].Container_optional.currentByteSize)) { - setverdict(pass, testcasename() & ": The currentNrOfInstances and currentByteSize attributes are decreased"); - } else { - setverdict(fail, testcasename() & ": currentNrOfInstances and/or currentByteSize attributes are not decreased"); - } + v_containerIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex); + + v_contentInstanceIndex_1 := f_cse_createResource(int4, m_createContentInstance_noResourceName, v_containerIndex); + v_contentInstanceIndex_2 := f_cse_createResource(int4, m_createContentInstance_noResourceName, v_containerIndex); + + // Test Body + v_request := valueof(m_deleteRequest(f_getResourceAddress(v_containerIndex) & "/ol")); + + mcaPort.send(m_request(v_request)); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + tc_ac.stop; + setverdict(pass, testcasename() & ": Resource type " & int2str(enum2int(c_containerResourceType)) & " deleted successfuly"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { + tc_ac.stop; + setverdict(fail, testcasename() & ": Error while deleting resource type " & int2str(enum2int(c_containerResourceType))); + } + [] tc_ac.timeout { + setverdict(inconc, testcasename() & ": No answer while deleting resource type " & int2str(enum2int(c_containerResourceType))); + } + } + + f_checkCseTesterStatus(); + + mcaPort.send(m_request(m_retrieveResource((f_getResourceAddress(v_contentInstanceIndex_1)), f_getOriginator(v_contentInstanceIndex_1)))); + + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + tc_ac.stop; + setverdict(fail, testcasename() & ": Resource type" & int2str(enum2int(c_containerResourceType)) & "has already been deleted"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { + tc_ac.stop; + setverdict(pass, testcasename() & ": Error while retrieving resource attributes as" & int2str(enum2int(c_containerResourceType)) & " has been deleted"); + } + [] tc_ac.timeout { + setverdict(inconc, testcasename() & ": No answer while retrieving resource attributes"); + } + } // Postamble f_cse_postamble_deleteResources(); @@ -6698,14 +7651,63 @@ module OneM2M_Testcases { // Tear down f_cf01Down(); - }//end f_CSE_DMR_DEL_BV_006 - } // end group g_CSE_DMR_DEL_BV_006 + }//end f_CSE_DMR_DEL_BV_009 + } // end group g_CSE_DMR_DEL_BV_009 + + group g_CSE_DMR_DEL_BO_010{ + + testcase TC_CSE_DMR_DEL_BO_010() runs on CseTester system CseSystem { + // Local variables + var MsgIn v_response; + var RequestPrimitive v_request; + var integer v_aeIndex := -1; + var integer v_containerIndex := -1; + var integer v_contentInstanceIndex := -1; + const ResourceType c_containerResourceType := int4; + + + // Test control + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + + v_containerIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex); + + // Test Body + v_request := valueof(m_deleteRequest(f_getResourceAddress(v_containerIndex) & "/ol")); + mcaPort.send(m_request(v_request)); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int4004))) -> value v_response { + tc_ac.stop; + setverdict(pass, testcasename() & ": Resource type" & int2str(enum2int(c_containerResourceType)) & " NOT FOUND"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + tc_ac.stop; + setverdict(fail, testcasename() & ": Resource type" & int2str(enum2int(c_containerResourceType)) & " has not been created"); + } + [] tc_ac.timeout { + setverdict(fail, testcasename() & ": No answer while deleting resource type " & int2str(enum2int(c_containerResourceType))); + } + } + + // Postamble + f_cse_postamble_deleteResources(); + + // Tear down + f_cf01Down(); + }//end f_CSE_DMR_DEL_BO_010 + } // end group g_CSE_DMR_DEL_BO_010 }//end group Delete }//end group Data_Management_and_Repository - //@Martin group Location { group g_CSE_LOC_BV_001{ @@ -6783,7 +7785,7 @@ module OneM2M_Testcases { alt { [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { tc_ac.stop; - setverdict(pass, testcasename() & ": Resource locationPolicy is created successfuly with response status code: " & int2str(enum2int(v_response.primitive.responsePrimitive.responseStatusCode))&"!"); + setverdict(pass, testcasename() & ": Resource locationPolicy is created successfully with response status code: " & int2str(enum2int(v_response.primitive.responsePrimitive.responseStatusCode))&"!"); } [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { tc_ac.stop; @@ -6805,9 +7807,9 @@ module OneM2M_Testcases { }//end group g_CSE_LOC_BV_002 - group g_CSE_LOC_BO_001{ + group g_CSE_LOC_BO_003{ - testcase TC_CSE_LOC_BO_001() runs on CseTester system CseSystem {//the originator has no privileges to create a locationPolicy resource!! + testcase TC_CSE_LOC_BO_003() runs on CseTester system CseSystem {//the originator has no privileges to create a locationPolicy resource!! var integer v_aeAuxIndex := -1; var integer v_acpAuxIndex := -1; @@ -6859,12 +7861,12 @@ module OneM2M_Testcases { f_cf01Down(); - } // end testcase TC_CSE_LOC_BO_001 + } // end testcase TC_CSE_LOC_BO_003 - }//end group g_CSE_LOC_BO_001 + }//end group g_CSE_LOC_BO_003 - group g_CSE_LOC_BO_002{ - testcase TC_CSE_LOC_BO_002() runs on CseTester system CseSystem { + group g_CSE_LOC_BO_004{ + testcase TC_CSE_LOC_BO_004() runs on CseTester system CseSystem { var integer v_aeAuxIndex := -1; var LocationSource v_locationSource := int1;//Netwok-based @@ -6906,14 +7908,14 @@ module OneM2M_Testcases { // Tear down f_cf01Down(); - }// end testcase TC_CSE_LOC_BO_002 + }// end testcase TC_CSE_LOC_BO_004 - }//end group g_CSE_LOC_BO_002 + }//end group g_CSE_LOC_BO_004 - group g_CSE_LOC_BI_001{ + group g_CSE_LOC_BI_005{ - testcase TC_CSE_LOC_BI_001() runs on CseTester system CseSystem {//reject an invalid update request with invalid attribtue locationUpdatePeriod + testcase TC_CSE_LOC_BI_005() runs on CseTester system CseSystem {//reject an invalid update request with invalid attribtue locationUpdatePeriod var integer v_aeAuxIndex := -1; var integer v_locPolicyResourceIndex := -1; @@ -6961,13 +7963,13 @@ module OneM2M_Testcases { // Tear down f_cf01Down(); - }//end testcase TC_CSE_LOC_BI_001 + }//end testcase TC_CSE_LOC_BI_005 - }//end group g_CSE_LOC_BI_001 + }//end group g_CSE_LOC_BI_005 - group g_CSE_LOC_BV_003 { + group g_CSE_LOC_BV_006 { - testcase TC_CSE_LOC_BV_003() runs on CseTester system CseSystem{ + testcase TC_CSE_LOC_BV_006() runs on CseTester system CseSystem{ //TO RETRIEVE a <container> resource that has created in cse and linked with a <locationPolicy> resource (network-based case) var integer v_aeAuxIndex := -1; @@ -6998,7 +8000,7 @@ module OneM2M_Testcases { alt{ [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response{ tc_ac.stop; - if(not ispresent(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Container_optional.locationID)){ + if(not ispresent(v_response.primitive.responsePrimitive.primitiveContent.container_optional.locationID)){ setverdict(fail, testcasename() & "No locationID is included in the response!"); }else{ setverdict(pass, testcasename() & "Container resource associated with locationPolicy resource is successfully retrieved with locationID included in the response!"); @@ -7024,13 +8026,13 @@ module OneM2M_Testcases { // Tear down f_cf01Down(); - }//end testcase TC_CSE_LOC_BV_003 + }//end testcase TC_CSE_LOC_BV_006 - }//end group g_CSE_LOC_BV_003 + }//end group g_CSE_LOC_BV_006 - group g_CSE_LOC_BV_004 { + group g_CSE_LOC_BV_007 { - testcase TC_CSE_LOC_BV_004() runs on CseTester system CseSystem{ + testcase TC_CSE_LOC_BV_007() runs on CseTester system CseSystem{ //TO create a <locationPolicy> resource with locationSource set to Device-based var integer v_aeAuxIndex := -1; @@ -7055,7 +8057,7 @@ module OneM2M_Testcases { alt { [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { tc_ac.stop; - setverdict(pass, testcasename() & ": Resource locationPolicy is created successfuly with response status code: " & int2str(enum2int(v_response.primitive.responsePrimitive.responseStatusCode))&"!"); + setverdict(pass, testcasename() & ": Resource locationPolicy is created successfully with response status code: " & int2str(enum2int(v_response.primitive.responsePrimitive.responseStatusCode))&"!"); } [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { tc_ac.stop; @@ -7073,13 +8075,13 @@ module OneM2M_Testcases { // Tear down f_cf01Down(); - }//end testcase TC_CSE_LOC_BV_004 + }//end testcase TC_CSE_LOC_BV_007 - }//end group g_CSE_LOC_BV_004 + }//end group g_CSE_LOC_BV_007 - group g_CSE_LOC_BV_005 { + group g_CSE_LOC_BV_008 { - testcase TC_CSE_LOC_BV_005() runs on CseTester system CseSystem{ + testcase TC_CSE_LOC_BV_008() runs on CseTester system CseSystem{ //TO create a <locationPolicy> resource with locationSource set to Share-based var integer v_aeAuxIndex := -1; @@ -7104,7 +8106,7 @@ module OneM2M_Testcases { alt { [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { tc_ac.stop; - setverdict(pass, testcasename() & ": Resource locationPolicy is created successfuly with response status code: " & int2str(enum2int(v_response.primitive.responsePrimitive.responseStatusCode))&"!"); + setverdict(pass, testcasename() & ": Resource locationPolicy is created successfully with response status code: " & int2str(enum2int(v_response.primitive.responsePrimitive.responseStatusCode))&"!"); } [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { tc_ac.stop; @@ -7122,13 +8124,13 @@ module OneM2M_Testcases { // Tear down f_cf01Down(); - }//end testcase TC_CSE_LOC_BV_005 + }//end testcase TC_CSE_LOC_BV_008 - }//end group g_CSE_LOC_BV_005 + }//end group g_CSE_LOC_BV_008 - group g_CSE_LOC_BV_006 { + group g_CSE_LOC_BV_009 { - testcase TC_CSE_LOC_BV_006_01() runs on CseTester system CseSystem{ + testcase TC_CSE_LOC_BV_009_01() runs on CseTester system CseSystem{ //TO NOTIFY a location information var integer v_aeAuxIndex := -1; @@ -7164,7 +8166,7 @@ module OneM2M_Testcases { alt{ [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response{ tc_ac.stop; - if(not ispresent(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Notification.notificationEvent)){ + if(not ispresent(v_response.primitive.responsePrimitive.primitiveContent.notification.notificationEvent)){ setverdict(fail, testcasename() & "No NotificationEvent is included in the response!"); }else{ setverdict(pass, testcasename() & "Location information is successfully sent!"); @@ -7190,9 +8192,9 @@ module OneM2M_Testcases { // Tear down f_cf01Down(); - }//end testcase TC_CSE_LOC_BV_006_01 + }//end testcase TC_CSE_LOC_BV_009_01 - testcase TC_CSE_LOC_BV_006_02() runs on CseTester system CseSystem{ + testcase TC_CSE_LOC_BV_009_02() runs on CseTester system CseSystem{ //TO NOTIFY a location information var integer v_aeAuxIndex := -1; @@ -7227,7 +8229,7 @@ module OneM2M_Testcases { alt{ [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response{ tc_ac.stop; - if(not ispresent(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Notification.notificationEvent)){ + if(not ispresent(v_response.primitive.responsePrimitive.primitiveContent.notification.notificationEvent)){ setverdict(fail, testcasename() & "No NotificationEvent is included in the response!"); }else{ setverdict(pass, testcasename() & "Location information is successfully sent!"); @@ -7253,9 +8255,9 @@ module OneM2M_Testcases { // Tear down f_cf01Down(); - }//end testcase TC_CSE_LOC_BV_006_02 + }//end testcase TC_CSE_LOC_BV_009_02 - testcase TC_CSE_LOC_BV_006_03() runs on CseTester system CseSystem{ + testcase TC_CSE_LOC_BV_009_03() runs on CseTester system CseSystem{ //TO NOTIFY a location information var integer v_aeAuxIndex := -1; @@ -7289,7 +8291,7 @@ module OneM2M_Testcases { alt{ [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response{ tc_ac.stop; - if(not ispresent(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Notification.notificationEvent)){ + if(not ispresent(v_response.primitive.responsePrimitive.primitiveContent.notification.notificationEvent)){ setverdict(fail, testcasename() & "No NotificationEvent is included in the response!"); }else{ setverdict(pass, testcasename() & "Location information is successfully sent!"); @@ -7315,8 +8317,8 @@ module OneM2M_Testcases { // Tear down f_cf01Down(); - }//end testcase TC_CSE_LOC_BV_006_03 - }//end group g_CSE_LOC_BV_006 + }//end testcase TC_CSE_LOC_BV_009_03 + }//end group g_CSE_LOC_BV_009 /*group g_CSE_LOC_BV_007 { testcase TC_CSE_LOC_BV_007() runs on CseTester system CseSystem{ @@ -7331,8 +8333,8 @@ module OneM2M_Testcases { }//end group g_CSE_LOC_BV_008 */ - group g_CSE_LOC_BV_009 { - testcase TC_CSE_LOC_BV_009() runs on CseTester system CseSystem{ + group g_CSE_LOC_BV_012 { + testcase TC_CSE_LOC_BV_012() runs on CseTester system CseSystem{ //To CREATE a <subscription> resource as a child resource of the created <container> var integer v_aeAuxIndex := -1; @@ -7383,12 +8385,12 @@ module OneM2M_Testcases { // Tear down f_cf01Down(); - }//end testcase TC_CSE_LOC_BV_009 - }//end group g_CSE_LOC_BV_009 + }//end testcase TC_CSE_LOC_BV_012 + }//end group g_CSE_LOC_BV_012 - group g_CSE_LOC_BV_010 { + group g_CSE_LOC_BV_013 { - testcase TC_CSE_LOC_BV_010() runs on CseTester system CseSystem{ + testcase TC_CSE_LOC_BV_013() runs on CseTester system CseSystem{ //TO RETRIEVE a <locationPolicy> resource that has created in cse var integer v_aeAuxIndex := -1; @@ -7416,7 +8418,7 @@ module OneM2M_Testcases { alt{ [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response{ tc_ac.stop; - if(not ispresent(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].LocationPolicy_optional.locationContainerID)){ + if(not ispresent(v_response.primitive.responsePrimitive.primitiveContent.locationPolicy_optional.locationContainerID)){ setverdict(fail, testcasename() & "No locationContainerID is included in the response!"); }else{ setverdict(pass, testcasename() & "LocationPolicy resource is successfully retrieved with locationContainerID included in the response!"); @@ -7443,9 +8445,9 @@ module OneM2M_Testcases { // Tear down f_cf01Down(); - }//end testcase TC_CSE_LOC_BV_010 + }//end testcase TC_CSE_LOC_BV_013 - }//end group g_CSE_LOC_BV_010 + }//end group g_CSE_LOC_BV_013 }//end group Location @@ -7481,8 +8483,8 @@ module OneM2M_Testcases { // Preamble v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - v_containerIndex_1 := f_cse_createResource(int3, m_createContainerBase, v_aeIndex); // AE child resource - v_containerIndex_2 := f_cse_createResource(int3, m_createContainerBase, v_aeIndex); // AE child resource + v_containerIndex_1 := f_cse_createResource(int3, m_createContainer_noResourceName, v_aeIndex); // AE child resource + v_containerIndex_2 := f_cse_createResource(int3, m_createContainer_noResourceName, v_aeIndex); // AE child resource v_memberIDs := {f_getResourceId(vc_resourcesList[v_containerIndex_1].resource), f_getResourceId(vc_resourcesList[v_containerIndex_2].resource)}; @@ -7554,7 +8556,7 @@ module OneM2M_Testcases { v_aeIndex := f_cse_preamble_registerAe(-, -); //c_CRUDNDi v_acpIndex := f_cse_createResource(int1, v_createAcp, v_aeIndex); // AE child resource - v_containerCreateRequest.primitiveContent.any_1[0].Container_optional.accessControlPolicyIDs := {f_getResourceId(vc_resourcesList[v_acpIndex].resource)}; + v_containerCreateRequest.primitiveContent.container_optional.accessControlPolicyIDs := {f_getResourceId(vc_resourcesList[v_acpIndex].resource)}; v_containerIndex := f_cse_createResource(int3, v_containerCreateRequest, v_aeIndex); // AE child resource v_createRequest := m_createGroup(1, {f_getResourceId(vc_resourcesList[v_containerIndex].resource)}, omit, int3); @@ -7606,7 +8608,7 @@ module OneM2M_Testcases { var integer v_acpIndex := -1; var integer v_groupIndex := -1; var RequestPrimitive v_request; - var template RequestPrimitive v_containerCreateRequest := m_createContainer("NotInitialized", "MyContainer2"); + var template RequestPrimitive v_containerCreateRequest := m_createContainer_noResourceName; var template RequestPrimitive v_updateRequest := m_updateGroupBase; var template RequestPrimitive v_createAcp := m_createAcp("NotInitialized", "MyACP", -, int61); //c_CUDNDi @@ -7624,12 +8626,12 @@ module OneM2M_Testcases { // Preamble v_aeIndex := f_cse_preamble_registerAe(-, -); //c_CRUDNDi v_acpIndex := f_cse_createResource(int1, v_createAcp, v_aeIndex); // AE child resource - v_containerCreateRequest.primitiveContent.any_1[0].Container_optional.accessControlPolicyIDs := {f_getResourceId(vc_resourcesList[v_acpIndex].resource)}; - v_containerIndex_1 := f_cse_createResource(int3, m_createContainer("NotInitialized", "MyContainer1"), v_aeIndex); // AE child resource - v_containerIndex_2 := f_cse_createResource(int3, v_containerCreateRequest, v_aeIndex); // AE child resource + v_containerCreateRequest.primitiveContent.container_optional.accessControlPolicyIDs := {f_getResourceId(vc_resourcesList[v_acpIndex].resource)}; + v_containerIndex_1 := f_cse_createResource(int3, m_createContainer_noResourceName, v_aeIndex); // AE child resource + v_containerIndex_2 := f_cse_createResource(int3, m_createContainer_noResourceName, v_aeIndex); // AE child resource v_groupIndex := f_cse_createResource(int9, m_createGroup(2, {f_getResourceId(vc_resourcesList[v_containerIndex_1].resource)}, omit, int3), v_aeIndex); - v_updateRequest.primitiveContent.any_1[0].Group_optional.memberIDs := {f_getResourceId(vc_resourcesList[v_containerIndex_2].resource)}; + v_updateRequest.primitiveContent.group_optional.memberIDs := {f_getResourceId(vc_resourcesList[v_containerIndex_2].resource)}; v_request := f_getUpdateRequestPrimitive(int9, v_groupIndex, v_updateRequest); // creating group // Test Body @@ -7697,12 +8699,12 @@ module OneM2M_Testcases { alt { [] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) -> value v_response { tc_ac.stop; - setverdict(pass, testcasename() & ": Resource created successfuly"); + setverdict(pass, testcasename() & ": Resource created successfully"); - if(not match({v_memberID}, v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Group_optional.memberIDs)){ + if(not match({v_memberID}, v_response.primitive.responsePrimitive.primitiveContent.group_optional.memberIDs)){ setverdict(fail, testcasename(), ": Error, presence of duplicate member IDs "); } - if(lengthof(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Group_optional.memberIDs) != 1) { + if(lengthof(v_response.primitive.responsePrimitive.primitiveContent.group_optional.memberIDs) != 1) { setverdict(fail, testcasename() & ": Error, wrong number of memberIDs attribute"); } } @@ -7756,12 +8758,12 @@ module OneM2M_Testcases { alt { [] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) -> value v_response { tc_ac.stop; - setverdict(pass, testcasename() & ": Resource created successfuly"); - if(not ispresent(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Group_optional.memberTypeValidated)){ + setverdict(pass, testcasename() & ": Resource created successfully"); + if(not ispresent(v_response.primitive.responsePrimitive.primitiveContent.group_optional.memberTypeValidated)){ setverdict(fail, testcasename(), ": Error, memberTypeValidated attribute not provided"); } else { - if(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Group_optional.memberTypeValidated == false){ + if(v_response.primitive.responsePrimitive.primitiveContent.group_optional.memberTypeValidated == false){ setverdict(fail, testcasename(), ": Error, memberTypeValidated attribute not correct"); } } @@ -7816,23 +8818,23 @@ module OneM2M_Testcases { alt { [] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) -> value v_response { tc_ac.stop; - setverdict(pass, testcasename() & ": Resource created successfuly"); + setverdict(pass, testcasename() & ": Resource created successfully"); // check for memberTypeValidated - if(not ispresent(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Group_optional.memberTypeValidated)){ + if(not ispresent(v_response.primitive.responsePrimitive.primitiveContent.group_optional.memberTypeValidated)){ setverdict(fail, testcasename(), ": Error, memberTypeValidated attribute not provided"); } else { - if(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Group_optional.memberTypeValidated != false){ + if(v_response.primitive.responsePrimitive.primitiveContent.group_optional.memberTypeValidated != false){ setverdict(fail, testcasename(), ": Error, memberTypeValidated attribute not correct"); } } // check for memberType (MIXED) - if(not ispresent(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Group_optional.memberType)){ + if(not ispresent(v_response.primitive.responsePrimitive.primitiveContent.group_optional.memberType)){ setverdict(fail, testcasename(), ": Error, memberType attribute not provided"); } else { - if(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Group_optional.memberType != int0){ //Mixed is int0 in release 2 and int24 in release 1 + if(v_response.primitive.responsePrimitive.primitiveContent.group_optional.memberType != int0){ //Mixed is int0 in release 2 and int24 in release 1 setverdict(fail, testcasename(), ": Error, memberType attribute not correct"); } } @@ -7855,13 +8857,74 @@ module OneM2M_Testcases { } } // end group g_CSE_GMG_BV_006 + // Test objective: + // Check that the IUT handles unsuccessful validation of the resource type during the creation of the + // group resource when memberType attribute is not ‘mixed’ and the consistencyStrategy attribute is + // ABANDON_GROUP. + group g_CSE_GMG_BV_007 { + + testcase TC_CSE_GMG_BV_007() runs on CseTester system CseSystem { + //Local variables + var MsgIn v_response; + var RequestPrimitive v_createRequest; + var integer v_aeIndex := -1; + var integer v_containerIndex := -1; + var integer v_groupIndex := -1; + var ListOfURIs v_memberIDs; + + // Test control + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + v_aeIndex := f_cse_preamble_registerAe(); //c_CRUDNDi + v_containerIndex := f_cse_createResource(int3, m_createContainer("NotInitialized", "MyContainer"), v_aeIndex); + v_groupIndex := f_cse_createResource(int9, m_createGroupBase, v_aeIndex); + v_memberIDs := {f_getResourceId(vc_resourcesList[v_groupIndex].resource), f_getResourceId(vc_resourcesList[v_containerIndex].resource)}; + v_createRequest := valueof(m_createGroup(2, v_memberIDs, omit, int3, int2)); //Member type is set to container and consistencyStrategy is set to ABANDON GROUP + v_createRequest := f_getCreateRequestPrimitive(int9, v_createRequest, v_aeIndex); + + // Test Body + mcaPort.send(m_request(v_createRequest)); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int6011))) -> value v_response { + tc_ac.stop; + setverdict(pass, testcasename() & ": unsuccessful validation of the resource type during the creation of the group"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) { + tc_ac.stop; + setverdict(fail, testcasename() & ": Error create succesfull while the operation should be aborted"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { + tc_ac.stop; + setverdict(fail, testcasename() & ": Error while creating resource"); + } + [] tc_ac.timeout { + setverdict(inconc, testcasename() & ": No answer while creating resource"); + } + } + + // Postamble + f_cse_postamble_deleteResources(); + + // Tear down + f_cf01Down(); + + } + + } // end group g_CSE_GMG_BV_007 + // Test objective: // Check that the IUT handles unsuccessful validation of the resource type during the creation of the // group resource when memberType attribute is not ‘mixed’ and the consistencyStrategy attribute is // ABANDON_MEMBER,. - group g_CSE_GMG_BV_007 { + group g_CSE_GMG_BV_008 { - testcase TC_CSE_GMG_BV_007() runs on CseTester system CseSystem { + testcase TC_CSE_GMG_BV_008() runs on CseTester system CseSystem { //Local variables var MsgIn v_response; var RequestPrimitive v_createRequest; @@ -7891,22 +8954,22 @@ module OneM2M_Testcases { alt { [] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) -> value v_response { tc_ac.stop; - setverdict(pass, testcasename() & ": Resource created successfuly"); + setverdict(pass, testcasename() & ": Resource created successfully"); // check for memberTypeValidated - if(not ispresent(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Group_optional.memberTypeValidated)){ + if(not ispresent(v_response.primitive.responsePrimitive.primitiveContent.group_optional.memberTypeValidated)){ setverdict(fail, testcasename(), ": Error, memberTypeValidated attribute not provided"); } else { - if(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Group_optional.memberTypeValidated == false){ + if(v_response.primitive.responsePrimitive.primitiveContent.group_optional.memberTypeValidated == false){ setverdict(fail, testcasename(), ": Error, memberTypeValidated attribute not correct"); } } // check for membersId - if(not ispresent(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Group_optional.memberIDs)){ + if(not ispresent(v_response.primitive.responsePrimitive.primitiveContent.group_optional.memberIDs)){ setverdict(fail, testcasename(), ": Error, memberIDs attribute not provided"); } else { - if(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Group_optional.memberIDs[0] != f_getResourceAddress(v_containerIndex)){ + if(v_response.primitive.responsePrimitive.primitiveContent.group_optional.memberIDs[0] != f_getResourceAddress(v_containerIndex)){ setverdict(fail, testcasename(), ": Error, memberIDs attribute not correct"); } } @@ -7928,67 +8991,6 @@ module OneM2M_Testcases { } - } // end group g_CSE_GMG_BV_007 - - // Test objective: - // Check that the IUT handles unsuccessful validation of the resource type during the creation of the - // group resource when memberType attribute is not ‘mixed’ and the consistencyStrategy attribute is - // ABANDON_GROUP. - group g_CSE_GMG_BV_008 { - - testcase TC_CSE_GMG_BV_008() runs on CseTester system CseSystem { - //Local variables - var MsgIn v_response; - var RequestPrimitive v_createRequest; - var integer v_aeIndex := -1; - var integer v_containerIndex := -1; - var integer v_groupIndex := -1; - var ListOfURIs v_memberIDs; - - // Test control - - // Test component configuration - f_cf01Up(); - - // Test adapter configuration - - // Preamble - v_aeIndex := f_cse_preamble_registerAe(); //c_CRUDNDi - v_containerIndex := f_cse_createResource(int3, m_createContainer("NotInitialized", "MyContainer"), v_aeIndex); - v_groupIndex := f_cse_createResource(int9, m_createGroupBase, v_aeIndex); - v_memberIDs := {f_getResourceId(vc_resourcesList[v_groupIndex].resource), f_getResourceId(vc_resourcesList[v_containerIndex].resource)}; - v_createRequest := valueof(m_createGroup(2, v_memberIDs, omit, int3, int2)); //Member type is set to container and consistencyStrategy is set to ABANDON GROUP - v_createRequest := f_getCreateRequestPrimitive(int9, v_createRequest, v_aeIndex); - - // Test Body - mcaPort.send(m_request(v_createRequest)); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int6011))) -> value v_response { - tc_ac.stop; - setverdict(pass, testcasename() & ": unsuccessful validation of the resource type during the creation of the group"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) { - tc_ac.stop; - setverdict(fail, testcasename() & ": Error create succesfull while the operation should be aborted"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { - tc_ac.stop; - setverdict(fail, testcasename() & ": Error while creating resource"); - } - [] tc_ac.timeout { - setverdict(inconc, testcasename() & ": No answer while creating resource"); - } - } - - // Postamble - f_cse_postamble_deleteResources(); - - // Tear down - f_cf01Down(); - - } - } // end group g_CSE_GMG_BV_008 // Test objective: @@ -8015,13 +9017,13 @@ module OneM2M_Testcases { // Preamble v_aeIndex := f_cse_preamble_registerAe(); //c_CRUDNDi - v_containerIndex_1 := f_cse_createResource(int3, m_createContainer("NotInitialized", "MyContainer1"), v_aeIndex); // AE child resource - v_containerIndex_2 := f_cse_createResource(int3, m_createContainer("NotInitialized", "MyContainer2"), v_aeIndex); // AE child resource + v_containerIndex_1 := f_cse_createResource(int3, m_createContainer_noResourceName, v_aeIndex); // AE child resource + v_containerIndex_2 := f_cse_createResource(int3, m_createContainer_noResourceName, v_aeIndex); // AE child resource v_memberId_1 := f_getResourceId(vc_resourcesList[v_containerIndex_1].resource); v_memberId_2 := f_getResourceId(vc_resourcesList[v_containerIndex_2].resource); v_groupIndex := f_cse_createResource(int9, m_createGroup(2, {v_memberId_1, v_memberId_2}, omit, int3), v_aeIndex); // AE child resource - v_updateRequest.primitiveContent.any_1[0].Group_optional.memberIDs := {v_memberId_2, v_memberId_2}; + v_updateRequest.primitiveContent.group_optional.memberIDs := {v_memberId_2, v_memberId_2}; v_updateRequest := f_getUpdateRequestPrimitive(int9, v_groupIndex, v_updateRequest); //Test Body @@ -8033,14 +9035,14 @@ module OneM2M_Testcases { setverdict(pass, testcasename() & ": update successful"); // check for membersId - if(not ispresent(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Group_optional.memberIDs)){ + if(not ispresent(v_response.primitive.responsePrimitive.primitiveContent.group_optional.memberIDs)){ setverdict(fail, testcasename(), ": Error, memberIDs attribute not provided"); } else { - if(lengthof(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Group_optional.memberIDs) != 1) { + if(lengthof(v_response.primitive.responsePrimitive.primitiveContent.group_optional.memberIDs) != 1) { setverdict(fail, testcasename() & ": Error, wrong number of memberIDs attribute"); } - if(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Group_optional.memberIDs[0] != v_memberId_2){ + if(v_response.primitive.responsePrimitive.primitiveContent.group_optional.memberIDs[0] != v_memberId_2){ setverdict(fail, testcasename(), ": Error, memberIDs attribute not correct"); } } @@ -8083,11 +9085,11 @@ module OneM2M_Testcases { // Preamble v_aeIndex := f_cse_preamble_registerAe(); //c_CRUDNDi - v_containerIndex_1 := f_cse_createResource(int3, m_createContainer("NotInitialized", "MyContainer1"), v_aeIndex); // AE child resource - v_containerIndex_2 := f_cse_createResource(int3, m_createContainer("NotInitialized", "MyContainer2"), v_aeIndex); // AE child resource + v_containerIndex_1 := f_cse_createResource(int3, m_createContainer_noResourceName, v_aeIndex); // AE child resource + v_containerIndex_2 := f_cse_createResource(int3, m_createContainer_noResourceName, v_aeIndex); // AE child resource v_groupIndex := f_cse_createResource(int9, m_createGroup(2, {f_getResourceId(vc_resourcesList[v_containerIndex_1].resource)}, omit, int3), v_aeIndex); - v_updateRequest.primitiveContent.any_1[0].Group_optional.memberIDs := {f_getResourceId(vc_resourcesList[v_containerIndex_2].resource)}; + v_updateRequest.primitiveContent.group_optional.memberIDs := {f_getResourceId(vc_resourcesList[v_containerIndex_2].resource)}; v_updateRequest := f_getUpdateRequestPrimitive(int9, v_groupIndex, v_updateRequest); // Test Body @@ -8098,11 +9100,11 @@ module OneM2M_Testcases { tc_ac.stop; setverdict(pass, testcasename() & ": update successful"); - if(not ispresent(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Group_optional.memberTypeValidated)) { + if(not ispresent(v_response.primitive.responsePrimitive.primitiveContent.group_optional.memberTypeValidated)) { setverdict(fail, testcasename(), ": Error, memberTypeValidated attribute not provided"); } else { - if(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Group_optional.memberTypeValidated == false) { + if(v_response.primitive.responsePrimitive.primitiveContent.group_optional.memberTypeValidated == false) { setverdict(fail, testcasename(), ": Error, memberTypeValidated wrong value"); } } @@ -8154,7 +9156,7 @@ module OneM2M_Testcases { v_memberId_2 := f_getResourceId(vc_resourcesList[v_subGroupIndex].resource); v_groupIndex := f_cse_createResource(int9, m_createGroup(2, {v_memberId_1}, omit, int3, int3), v_aeIndex); //Member type is set to Container (int3) and consistencyStrategy is set to MIXED (int3) - v_updateRequest.primitiveContent.any_1[0].Group_optional.memberIDs := {v_memberId_1, v_memberId_2}; + v_updateRequest.primitiveContent.group_optional.memberIDs := {v_memberId_1, v_memberId_2}; v_updateRequest := f_getUpdateRequestPrimitive(int9, v_groupIndex, v_updateRequest); // Test Body @@ -8166,21 +9168,21 @@ module OneM2M_Testcases { setverdict(pass, testcasename() & ": update successful"); //memberTypeValidated attribute set to FALSE - if(not ispresent(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Group_optional.memberTypeValidated)) { + if(not ispresent(v_response.primitive.responsePrimitive.primitiveContent.group_optional.memberTypeValidated)) { setverdict(fail, testcasename(), ": Error, memberTypeValidated attribute not provided"); } else { - if(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Group_optional.memberTypeValidated != false) { + if(v_response.primitive.responsePrimitive.primitiveContent.group_optional.memberTypeValidated != false) { setverdict(fail, testcasename(), ": Error, memberTypeValidated must be FALSE"); } } //memberType attribute set to MIXED - if(not ispresent(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Group_optional.memberType)) { + if(not ispresent(v_response.primitive.responsePrimitive.primitiveContent.group_optional.memberType)) { setverdict(fail, testcasename(), ": Error, memberType attribute not provided"); } else { - if(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Group_optional.memberType != int0) { //Mixed is int0 in release 2 and int24 in release 1 + if(v_response.primitive.responsePrimitive.primitiveContent.group_optional.memberType != int0) { //Mixed is int0 in release 2 and int24 in release 1 setverdict(fail, testcasename(), ": Error, memberType was not set to MIXED"); } } @@ -8232,7 +9234,7 @@ module OneM2M_Testcases { v_memberId_2 := f_getResourceId(vc_resourcesList[v_subGroupIndex].resource); v_groupIndex := f_cse_createResource(int9, m_createGroup(2, {v_memberId_1}, omit, int3, omit), v_aeIndex); //Member type is set to Container (int3) and consistencyStrategy is set to ABANDON MEMBER (default value) - v_updateRequest.primitiveContent.any_1[0].Group_optional.memberIDs := {v_memberId_2, v_memberId_1}; + v_updateRequest.primitiveContent.group_optional.memberIDs := {v_memberId_2, v_memberId_1}; v_updateRequest := f_getUpdateRequestPrimitive(int9, v_groupIndex, v_updateRequest); //Test Body @@ -8245,24 +9247,24 @@ module OneM2M_Testcases { setverdict(pass, testcasename() & ": update successful"); //memberTypeValidated attribute set to TRUE - if(not ispresent(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Group_optional.memberTypeValidated)) { + if(not ispresent(v_response.primitive.responsePrimitive.primitiveContent.group_optional.memberTypeValidated)) { setverdict(fail, testcasename(), ": Error, memberTypeValidated attribute not provided"); } else { - if(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Group_optional.memberTypeValidated != true) { + if(v_response.primitive.responsePrimitive.primitiveContent.group_optional.memberTypeValidated != true) { setverdict(fail, testcasename(), ": Error, memberTypeValidated must be TRUE"); } } //memberIDs attribute set to v_memberID1 - if(not ispresent(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Group_optional.memberIDs)){ + if(not ispresent(v_response.primitive.responsePrimitive.primitiveContent.group_optional.memberIDs)){ setverdict(fail, testcasename(), ": Error, memberIDs attribute not provided"); } else { - if(lengthof(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Group_optional.memberIDs) != 1) { + if(lengthof(v_response.primitive.responsePrimitive.primitiveContent.group_optional.memberIDs) != 1) { setverdict(fail, testcasename() & ": Error, wrong number of memberIDs attribute"); } - if(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Group_optional.memberIDs[0] != v_memberId_1){ + if(v_response.primitive.responsePrimitive.primitiveContent.group_optional.memberIDs[0] != v_memberId_1){ setverdict(fail, testcasename(), ": Error, memberIDs attribute not correct"); } } @@ -8313,7 +9315,7 @@ module OneM2M_Testcases { v_memberId_2 := f_getResourceId(vc_resourcesList[v_subGroupIndex].resource); v_groupIndex := f_cse_createResource(int9, m_createGroup(2, {v_memberId_1}, omit, int3, int2), v_aeIndex); //Member type is set to Container(int3) and consistencyStrategy is set to ABANDON GROUP (default value) - v_updateRequest.primitiveContent.any_1[0].Group_optional.memberIDs := {v_memberId_2, v_memberId_1}; + v_updateRequest.primitiveContent.group_optional.memberIDs := {v_memberId_2, v_memberId_1}; v_updateRequest := f_getUpdateRequestPrimitive(int9, v_groupIndex, v_updateRequest); //Test Body @@ -8373,9 +9375,9 @@ module OneM2M_Testcases { // Preamble v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - v_containerIndex_1 := f_cse_createResource(int3, m_createContainerBase, v_aeIndex); // AE child resource - v_containerIndex_2 := f_cse_createResource(int3, m_createContainerBase, v_aeIndex); // AE child resource - v_containerIndex_3 := f_cse_createResource(int3, m_createContainerBase, v_aeIndex); // AE child resource + v_containerIndex_1 := f_cse_createResource(int3, m_createContainer_noResourceName, v_aeIndex); // AE child resource + v_containerIndex_2 := f_cse_createResource(int3, m_createContainer_noResourceName, v_aeIndex); // AE child resource + v_containerIndex_3 := f_cse_createResource(int3, m_createContainer_noResourceName, v_aeIndex); // AE child resource v_memberIDs := {f_getResourceId(vc_resourcesList[v_containerIndex_1].resource), f_getResourceId(vc_resourcesList[v_containerIndex_2].resource)}; @@ -8386,7 +9388,7 @@ module OneM2M_Testcases { //Test Body v_request := f_getUpdateRequestPrimitive(int9, v_groupIndex, v_updateRequest); v_memberIDs := v_memberIDs & {f_getResourceId(vc_resourcesList[v_containerIndex_3].resource)}; - v_request.primitiveContent.any_1[0].Group_optional.memberIDs := v_memberIDs; + v_request.primitiveContent.group_optional.memberIDs := v_memberIDs; mcaPort.send(m_request(v_request)); tc_ac.start; @@ -8426,7 +9428,7 @@ module OneM2M_Testcases { var ListOfURIs v_memberIDs; var XSD.PositiveInteger v_maxNrOfMembers:= 1; - v_updateRequest.primitiveContent.any_1[0].Group_optional.maxNrOfMembers := v_maxNrOfMembers; + v_updateRequest.primitiveContent.group_optional.maxNrOfMembers := v_maxNrOfMembers; // Test control @@ -8437,8 +9439,8 @@ module OneM2M_Testcases { // Preamble v_aeIndex := f_cse_preamble_registerAe(-, -); //c_CRUDNDi - v_containerIndex_1 := f_cse_createResource(int3, m_createContainer("NotInitialized", "MyContainer1"), v_aeIndex); // AE child resource - v_containerIndex_2 := f_cse_createResource(int3, m_createContainer("NotInitialized", "MyContainer2"), v_aeIndex); // AE child resource + v_containerIndex_1 := f_cse_createResource(int3, m_createContainer_noResourceName, v_aeIndex); // AE child resource + v_containerIndex_2 := f_cse_createResource(int3, m_createContainer_noResourceName, v_aeIndex); // AE child resource v_memberIDs := {f_getResourceId(vc_resourcesList[v_containerIndex_1].resource), f_getResourceId(vc_resourcesList[v_containerIndex_2].resource)}; v_groupIndex := f_cse_createResource(int9, m_createGroup(2, v_memberIDs, omit, int3), v_aeIndex); @@ -8509,10 +9511,10 @@ module OneM2M_Testcases { // TODO: -> register IUT to the remoteCSE v_createRequest := f_getCreateRequestPrimitive(c_ResourceTypeGroup, v_createRequest, v_aeIndex); - v_createRequest.primitiveContent.any_1[0].Group_optional := m_contentCreateGroup(1, {c_memberResourceAddress1}, omit); - v_createRequest.primitiveContent.any_1[0].Group_optional.memberType := c_memberType1; - v_createRequest.primitiveContent.any_1[0].Group_optional.memberTypeValidated := true; - v_createRequest.primitiveContent.any_1[0].Group_optional.consistencyStrategy := c_consistentcyStrategy; + v_createRequest.primitiveContent.group_optional := m_contentCreateGroup(1, {c_memberResourceAddress1}, omit); + v_createRequest.primitiveContent.group_optional.memberType := c_memberType1; + v_createRequest.primitiveContent.group_optional.memberTypeValidated := true; + v_createRequest.primitiveContent.group_optional.consistencyStrategy := c_consistentcyStrategy; v_groupIndex := f_cse_createResource(c_ResourceTypeGroup, v_createRequest, v_aeIndex); // TODO: -> do the resources actually need to be created? @@ -8527,7 +9529,7 @@ module OneM2M_Testcases { //Test Body v_request := f_getUpdateRequestPrimitive(c_ResourceTypeGroup, v_groupIndex, v_updateRequest); // v_request.to_ := c_targetResourceAddress; - v_createRequest.primitiveContent.any_1[0].Group_optional := m_contentCreateGroup(2, {c_memberResourceAddress1, c_memberResourceAddress2}, omit); + v_createRequest.primitiveContent.group_optional := m_contentCreateGroup(2, {c_memberResourceAddress1, c_memberResourceAddress2}, omit); mcaPort.send(m_request(v_request)); tc_ac.start; @@ -8535,14 +9537,14 @@ module OneM2M_Testcases { [] mcaPort.receive(mw_response(mw_responsePrimitive(int2004))) -> value v_response { tc_ac.stop; - if(not ispresent(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Group_optional.memberTypeValidated)) { + if(not ispresent(v_response.primitive.responsePrimitive.primitiveContent.group_optional.memberTypeValidated)) { setverdict(fail, testcasename(), ": Error, memberTypeValidated attribute not provided"); } else { - if(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Group_optional.memberTypeValidated == false) { - if(lengthof(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Group_optional.memberIDs) != 2) { + if(v_response.primitive.responsePrimitive.primitiveContent.group_optional.memberTypeValidated == false) { + if(lengthof(v_response.primitive.responsePrimitive.primitiveContent.group_optional.memberIDs) != 2) { setverdict(fail, testcasename() & ": Error, wrong number of memberIDs attribute"); } else { - if(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Group_optional.memberIDs[0] == c_memberResourceAddress1 and v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Group_optional.memberIDs[1] == c_memberResourceAddress2) { + if(v_response.primitive.responsePrimitive.primitiveContent.group_optional.memberIDs[0] == c_memberResourceAddress1 and v_response.primitive.responsePrimitive.primitiveContent.group_optional.memberIDs[1] == c_memberResourceAddress2) { setverdict(pass, testcasename() & ": update successful"); } else { setverdict(fail, testcasename(), ": Error, wrong memberIDs"); @@ -8608,10 +9610,10 @@ module OneM2M_Testcases { //v_remoteCSEIndex := ... v_createRequest := f_getCreateRequestPrimitive(c_ResourceTypeGroup, v_createRequest, v_aeIndex); - v_createRequest.primitiveContent.any_1[0].Group_optional := m_contentCreateGroup(2, {c_memberResourceAddress1, c_memberResourceAddress2}, omit); - v_createRequest.primitiveContent.any_1[0].Group_optional.memberType := c_memberType1; - v_createRequest.primitiveContent.any_1[0].Group_optional.memberTypeValidated := false; - v_createRequest.primitiveContent.any_1[0].Group_optional.consistencyStrategy := c_consistentcyStrategy; + v_createRequest.primitiveContent.group_optional := m_contentCreateGroup(2, {c_memberResourceAddress1, c_memberResourceAddress2}, omit); + v_createRequest.primitiveContent.group_optional.memberType := c_memberType1; + v_createRequest.primitiveContent.group_optional.memberTypeValidated := false; + v_createRequest.primitiveContent.group_optional.consistencyStrategy := c_consistentcyStrategy; v_groupIndex := f_cse_createResource(c_ResourceTypeGroup, v_createRequest, v_aeIndex); // TODO: -> the AE having a subscription to c_targetResourceAddress @@ -8666,7 +9668,7 @@ module OneM2M_Testcases { testcase TC_CSE_GMG_BV_018_02() runs on CseTester system CseSystem { //Update var template RequestPrimitive v_updateRequest := m_updateContainerBase; var Labels v_labels_1:= {"VALUE_1"}; - v_updateRequest.primitiveContent.any_1[0].Container_optional.labels := v_labels_1; + v_updateRequest.primitiveContent.container_optional.labels := v_labels_1; f_CSE_GMG_BV_018(v_updateRequest); }//end TC_CSE_GMG_BV_018_02 @@ -8705,8 +9707,8 @@ module OneM2M_Testcases { // Preamble v_aeIndex := f_cse_preamble_registerAe(-, -); //c_CRUDNDi v_acpIndex := f_cse_createResource(int1, v_createAcp, v_aeIndex); // AE child resource - v_containerIndex_1 := f_cse_createResource(int3, m_createContainer("NotInitialized", "MyContainer1"), v_aeIndex); // AE child resource - v_containerIndex_2 := f_cse_createResource(int3, m_createContainer("NotInitialized", "MyContainer2"), v_aeIndex); // AE child resource + v_containerIndex_1 := f_cse_createResource(int3, m_createContainer_noResourceName, v_aeIndex); // AE child resource + v_containerIndex_2 := f_cse_createResource(int3, m_createContainer_noResourceName, v_aeIndex); // AE child resource v_memberIDs := {f_getResourceId(vc_resourcesList[v_containerIndex_1].resource), f_getResourceId(vc_resourcesList[v_containerIndex_2].resource)}; v_membersAcpIds := {f_getResourceId(vc_resourcesList[v_acpIndex].resource)}; v_groupIndex := f_cse_createResource(int9, m_createGroup(2, v_memberIDs, omit, int3, -, v_membersAcpIds), v_aeIndex); // AE child resource @@ -8723,12 +9725,12 @@ module OneM2M_Testcases { tc_ac.stop; setverdict(pass, testcasename() & ": creation successfull by using fanOutPoint in group resource"); - if(not ispresent(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].AggregatedResponse.responsePrimitive_list)){ + if(not ispresent(v_response.primitive.responsePrimitive.primitiveContent.aggregatedResponse.responsePrimitive_list)){ setverdict(fail, testcasename(), ": Error, aggregatedResponse attribute not provided"); } else { - for(i:=0; i<lengthof(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].AggregatedResponse.responsePrimitive_list); i := i+1){ - if(not match(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].AggregatedResponse.responsePrimitive_list[i], mw_responsePrimitiveOK)){ + for(i:=0; i<lengthof(v_response.primitive.responsePrimitive.primitiveContent.aggregatedResponse.responsePrimitive_list); i := i+1){ + if(not match(v_response.primitive.responsePrimitive.primitiveContent.aggregatedResponse.responsePrimitive_list[i], mw_responsePrimitiveOK)){ setverdict(fail, testcasename(), ": Error, one responsePrimitve of aggregatedResponse_list is not successful"); } } @@ -8762,7 +9764,7 @@ module OneM2M_Testcases { testcase TC_CSE_GMG_BO_019_02() runs on CseTester system CseSystem { //Update var template RequestPrimitive v_updateRequest := m_updateContainerBase; var Labels v_labels_1:= {"VALUE_1"}; - v_updateRequest.primitiveContent.any_1[0].Container_optional.labels := v_labels_1; + v_updateRequest.primitiveContent.container_optional.labels := v_labels_1; f_CSE_GMG_BO_019(v_updateRequest, int59);//c_CRDNDi }//end TC_CSE_GMG_BO_019_02 @@ -8800,8 +9802,8 @@ module OneM2M_Testcases { // Preamble v_aeIndex := f_cse_preamble_registerAe(-, -); //c_CRUDNDi v_acpIndex := f_cse_createResource(int1, v_createAcp, v_aeIndex); // AE child resource - v_containerIndex_1 := f_cse_createResource(int3, m_createContainer("NotInitialized", "MyContainer1"), v_aeIndex); // AE child resource - v_containerIndex_2 := f_cse_createResource(int3, m_createContainer("NotInitialized", "MyContainer2"), v_aeIndex); // AE child resource + v_containerIndex_1 := f_cse_createResource(int3, m_createContainer_noResourceName, v_aeIndex); // AE child resource + v_containerIndex_2 := f_cse_createResource(int3, m_createContainer_noResourceName, v_aeIndex); // AE child resource v_memberIDs := {f_getResourceId(vc_resourcesList[v_containerIndex_1].resource), f_getResourceId(vc_resourcesList[v_containerIndex_2].resource)}; v_membersAcpIds := {f_getResourceId(vc_resourcesList[v_acpIndex].resource)}; v_groupIndex := f_cse_createResource(int9, m_createGroup(2, v_memberIDs, omit, int3, -, v_membersAcpIds), v_aeIndex); // AE child resource @@ -8854,7 +9856,7 @@ module OneM2M_Testcases { testcase TC_CSE_GMG_BV_020_02() runs on CseTester system CseSystem { //Update var template RequestPrimitive v_updateRequest := m_updateContainerBase; var Labels v_labels_1:= {"VALUE_1"}; - v_updateRequest.primitiveContent.any_1[0].Container_optional.labels := v_labels_1; + v_updateRequest.primitiveContent.container_optional.labels := v_labels_1; f_CSE_GMG_BV_020(v_updateRequest); }//end TC_CSE_GMG_BV_020_02 @@ -8893,8 +9895,8 @@ module OneM2M_Testcases { // Preamble v_aeIndex := f_cse_preamble_registerAe(-, -); //c_CRUDNDi v_acpIndex := f_cse_createResource(int1, v_createAcp, v_aeIndex); // AE child resource - v_containerIndex_1 := f_cse_createResource(int3, m_createContainer("NotInitialized", "MyContainer1"), v_aeIndex); // AE child resource - v_containerIndex_2 := f_cse_createResource(int3, m_createContainer("NotInitialized", "MyContainer2"), v_aeIndex); // AE child resource + v_containerIndex_1 := f_cse_createResource(int3, m_createContainer_noResourceName, v_aeIndex); // AE child resource + v_containerIndex_2 := f_cse_createResource(int3, m_createContainer_noResourceName, v_aeIndex); // AE child resource v_memberIDs := {f_getResourceId(vc_resourcesList[v_containerIndex_1].resource), f_getResourceId(vc_resourcesList[v_containerIndex_2].resource)}; v_acpIDs := {f_getResourceId(vc_resourcesList[v_acpIndex].resource)}; v_groupIndex := f_cse_createResource(int9, m_createGroup(2, v_memberIDs, v_acpIDs, int3), v_aeIndex); // AE child resource @@ -8911,12 +9913,12 @@ module OneM2M_Testcases { tc_ac.stop; setverdict(pass, testcasename() & ": creation successfull by using fanOutPoint in group resource"); - if(not ispresent(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].AggregatedResponse.responsePrimitive_list)){ + if(not ispresent(v_response.primitive.responsePrimitive.primitiveContent.aggregatedResponse.responsePrimitive_list)){ setverdict(fail, testcasename(), ": Error, aggregatedResponse attribute not provided"); } else { - for(i:=0; i<lengthof(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].AggregatedResponse.responsePrimitive_list); i := i+1){ - if(not match(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].AggregatedResponse.responsePrimitive_list[i], mw_responsePrimitiveOK)){ + for(i:=0; i<lengthof(v_response.primitive.responsePrimitive.primitiveContent.aggregatedResponse.responsePrimitive_list); i := i+1){ + if(not match(v_response.primitive.responsePrimitive.primitiveContent.aggregatedResponse.responsePrimitive_list[i], mw_responsePrimitiveOK)){ setverdict(fail, testcasename(), ": Error, one responsePrimitve of aggregatedResponse_list is not successful"); } } @@ -8950,7 +9952,7 @@ module OneM2M_Testcases { testcase TC_CSE_GMG_BO_021_02() runs on CseTester system CseSystem { //Update var template RequestPrimitive v_updateRequest := m_updateContainerBase; var Labels v_labels_1:= {"VALUE_1"}; - v_updateRequest.primitiveContent.any_1[0].Container_optional.labels := v_labels_1; + v_updateRequest.primitiveContent.container_optional.labels := v_labels_1; f_CSE_GMG_BO_021(v_updateRequest, int59);//c_CRDNDi }//end TC_CSE_GMG_BO_021_02 @@ -8988,8 +9990,8 @@ module OneM2M_Testcases { // Preamble v_aeIndex := f_cse_preamble_registerAe(-, -); //c_CRUDNDi v_acpIndex := f_cse_createResource(int1, v_createAcp, v_aeIndex); // AE child resource - v_containerIndex_1 := f_cse_createResource(int3, m_createContainer("NotInitialized", "MyContainer1"), v_aeIndex); // AE child resource - v_containerIndex_2 := f_cse_createResource(int3, m_createContainer("NotInitialized", "MyContainer2"), v_aeIndex); // AE child resource + v_containerIndex_1 := f_cse_createResource(int3, m_createContainer_noResourceName, v_aeIndex); // AE child resource + v_containerIndex_2 := f_cse_createResource(int3, m_createContainer_noResourceName, v_aeIndex); // AE child resource v_memberIDs := {f_getResourceId(vc_resourcesList[v_containerIndex_1].resource), f_getResourceId(vc_resourcesList[v_containerIndex_2].resource)}; v_acpIDs := {f_getResourceId(vc_resourcesList[v_acpIndex].resource)}; v_groupIndex := f_cse_createResource(int9, m_createGroup(2, v_memberIDs, v_acpIDs, int3), v_aeIndex); // AE child resource @@ -9037,7 +10039,7 @@ module OneM2M_Testcases { testcase TC_CSE_GMG_BV_022_01() runs on CseTester system CseSystem { //Create var template PrimitiveContent v_contentResponse; - v_contentResponse.any_1[0].Container_optional := mw_contentContainer_rc1; + v_contentResponse.container_optional := mw_contentContainer_rc1; f_CSE_GMG_BV_022(m_createContainerBase, v_contentResponse); }//end TC_CSE_GMG_BV_022_01 @@ -9046,23 +10048,23 @@ module OneM2M_Testcases { var template RequestPrimitive v_updateRequest := m_updateAeBase; var template PrimitiveContent v_contentResponse; var Labels v_labels_1:= {"VALUE_1"}; - v_contentResponse.any_1[0].AE_optional := m_contentAe_allOmit; - v_contentResponse.any_1[0].AE_optional.labels := ?; - v_updateRequest.primitiveContent.any_1[0].AE_optional.labels := v_labels_1; + v_contentResponse.aE_optional := m_contentAe_allOmit; + v_contentResponse.aE_optional.labels := ?; + v_updateRequest.primitiveContent.aE_optional.labels := v_labels_1; f_CSE_GMG_BV_022(v_updateRequest, v_contentResponse); }//end TC_CSE_GMG_BV_022_02 testcase TC_CSE_GMG_BV_022_03() runs on CseTester system CseSystem { //Retrieve var template PrimitiveContent v_contentResponse; - v_contentResponse.any_1[0].AE_optional := mw_contentAeBase; + v_contentResponse.aE_optional := mw_contentAeBase; f_CSE_GMG_BV_022(m_retrieveResource("Temporary", "Temporary"), v_contentResponse); }//end TC_CSE_GMG_BV_022_03 testcase TC_CSE_GMG_BV_022_04() runs on CseTester system CseSystem { //Delete var template PrimitiveContent v_contentResponse; - v_contentResponse.any_1[0].AE_optional := mw_contentAeBase;// TODO see with wath should it be matched + v_contentResponse.aE_optional := mw_contentAeBase;// TODO see with wath should it be matched f_CSE_GMG_BV_022(m_deleteRequest("Temporary"), v_contentResponse); }//end TC_CSE_GMG_BV_022_04 @@ -9088,7 +10090,7 @@ module OneM2M_Testcases { // Preamble v_aeIndex_1 := f_cse_preamble_registerAe(-, -); //c_CRUDNDi - v_aeIndex_2 := f_cse_createResource(int2, m_createAe(PX_APP_ID, -, PX_AE_ID_STEM, "MyAe2", omit), -1); // AE2 is registred + v_aeIndex_2 := f_cse_createResource(int2, m_createAe(PX_APP_ID, -, PX_AE2_ID_STEM, "MyAe2", omit), -1); // AE2 is registred v_memberIDs := {f_getResourceId(vc_resourcesList[v_aeIndex_1].resource), f_getResourceId(vc_resourcesList[v_aeIndex_2].resource)}; v_groupIndex := f_cse_createResource(int9, m_createGroup(2, v_memberIDs, omit, int2), -1); @@ -9104,16 +10106,16 @@ module OneM2M_Testcases { tc_ac.stop; setverdict(pass, testcasename() & ": creation successfull by using fanOutPoint in group resource"); - if(not ispresent(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].AggregatedResponse.responsePrimitive_list)){ + if(not ispresent(v_response.primitive.responsePrimitive.primitiveContent.aggregatedResponse.responsePrimitive_list)){ setverdict(fail, testcasename(), ": Error, aggregatedResponse attribute not provided"); } else{ - if(lengthof(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].AggregatedResponse.responsePrimitive_list) != c_numberOfResponsePrimitive){ + if(lengthof(v_response.primitive.responsePrimitive.primitiveContent.aggregatedResponse.responsePrimitive_list) != c_numberOfResponsePrimitive){ setverdict(fail, testcasename(), ": Error, length of aggregatedResponse is not valid"); } else{ for(i:=0; i<c_numberOfResponsePrimitive; i:=i+1){ - if(not match(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].AggregatedResponse.responsePrimitive_list[i].primitiveContent, p_contentResponse)){ + if(not match(v_response.primitive.responsePrimitive.primitiveContent.aggregatedResponse.responsePrimitive_list[i].primitiveContent, p_contentResponse)){ setverdict(fail, testcasename(), ": Error, aggregatedResponse doesn't match with template expected"); } } @@ -9155,7 +10157,7 @@ module OneM2M_Testcases { var template RequestPrimitive v_createAcp := m_createAcp("NotInitialized", "MyACP", -, -); var template PrimitiveContent v_contentResponse; - v_contentResponse.any_1[0].ContentInstance_optional := mw_contentContentInstanceBase; + v_contentResponse.contentInstance_optional := mw_contentContentInstanceBase; // Test control if(not(PICS_ACP_SUPPORT)) { @@ -9170,10 +10172,10 @@ module OneM2M_Testcases { // Preamble v_aeIndex_1 := f_cse_preamble_registerAe(-, -); //c_CRUDNDi - v_aeIndex_2 := f_cse_createResource(int2, m_createAe(PX_APP_ID, -, PX_AE_ID_STEM, "MyAe2", omit), -1); // AE2 is registred + v_aeIndex_2 := f_cse_createResource(int2, m_createAe(PX_APP_ID, -, PX_AE2_ID_STEM, "MyAe2", omit), -1); // AE2 is registred v_acpIndex := f_cse_createResource(int1, v_createAcp, -1); // AE child resource - v_containerIndex_1 := f_cse_createResource(int3, m_createContainer("NotInitialized", "myCon"), v_aeIndex_1); // AE1 child resource - v_containerIndex_2 := f_cse_createResource(int3, m_createContainer("NotInitialized", "myCon"), v_aeIndex_2); // AE2 child resource + v_containerIndex_1 := f_cse_createResource(int3, m_createContainer_noResourceName, v_aeIndex_1); // AE1 child resource + v_containerIndex_2 := f_cse_createResource(int3, m_createContainer_noResourceName, v_aeIndex_2); // AE2 child resource v_memberIDs := {f_getResourceId(vc_resourcesList[v_aeIndex_1].resource), f_getResourceId(vc_resourcesList[v_aeIndex_2].resource)}; v_membersAcpIds := {f_getResourceId(vc_resourcesList[v_acpIndex].resource)}; v_groupIndex := f_cse_createResource(int9, m_createGroup(2, v_memberIDs, omit, int2, -, v_membersAcpIds), -1); @@ -9190,16 +10192,16 @@ module OneM2M_Testcases { tc_ac.stop; setverdict(pass, testcasename() & ": creation successfull by using fanOutPoint in group resource"); - if(not ispresent(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].AggregatedResponse.responsePrimitive_list)){ + if(not ispresent(v_response.primitive.responsePrimitive.primitiveContent.aggregatedResponse.responsePrimitive_list)){ setverdict(fail, testcasename(), ": Error, aggregatedResponse attribute not provided"); } else{ - if(lengthof(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].AggregatedResponse.responsePrimitive_list) != c_numberOfResponsePrimitive){ + if(lengthof(v_response.primitive.responsePrimitive.primitiveContent.aggregatedResponse.responsePrimitive_list) != c_numberOfResponsePrimitive){ setverdict(fail, testcasename(), ": Error, length of aggregatedResponse is not valid"); } else{ for(i:=0; i<c_numberOfResponsePrimitive; i:=i+1){ - if(not match(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].AggregatedResponse.responsePrimitive_list[i].primitiveContent, v_contentResponse)){ + if(not match(v_response.primitive.responsePrimitive.primitiveContent.aggregatedResponse.responsePrimitive_list[i].primitiveContent, v_contentResponse)){ setverdict(fail, testcasename(), ": Error, aggregatedResponse doesn't match with template expected"); } } @@ -9241,7 +10243,7 @@ module OneM2M_Testcases { var template PrimitiveContent v_contentResponse; var XSD.AnyURI v_fanoutPointAddress; - v_contentResponse.any_1[0].Container_optional := mw_contentContainerBase; + v_contentResponse.container_optional := mw_contentContainerBase; // Test control if(not(PICS_ACP_SUPPORT)) { @@ -9256,10 +10258,10 @@ module OneM2M_Testcases { // Preamble v_aeIndex_1 := f_cse_preamble_registerAe(-, -); //c_CRUDNDi - v_aeIndex_2 := f_cse_createResource(int2, m_createAe(PX_APP_ID, -, PX_AE_ID_STEM, "MyAe2", omit), -1); // AE2 is registred + v_aeIndex_2 := f_cse_createResource(int2, m_createAe(PX_APP_ID, -, PX_AE2_ID_STEM, "MyAe2", omit), -1); // AE2 is registred v_acpIndex := f_cse_createResource(int1, v_createAcp, -1); // AE child resource - v_containerIndex_1 := f_cse_createResource(int3, m_createContainer("NotInitialized", "myCon"), v_aeIndex_1); // AE1 child resource - v_containerIndex_2 := f_cse_createResource(int3, m_createContainer("NotInitialized", "myCon"), v_aeIndex_2); // AE2 child resource + v_containerIndex_1 := f_cse_createResource(int3, m_createContainer_noResourceName, v_aeIndex_1); // AE1 child resource + v_containerIndex_2 := f_cse_createResource(int3, m_createContainer_noResourceName, v_aeIndex_2); // AE2 child resource v_memberIDs := {f_getResourceId(vc_resourcesList[v_aeIndex_1].resource), f_getResourceId(vc_resourcesList[v_aeIndex_2].resource)}; v_membersAcpIds := {f_getResourceId(vc_resourcesList[v_acpIndex].resource)}; v_groupIndex := f_cse_createResource(int9, m_createGroup(2, v_memberIDs, omit, int2, -, v_membersAcpIds), -1); @@ -9274,16 +10276,16 @@ module OneM2M_Testcases { tc_ac.stop; setverdict(pass, testcasename() & ": creation successfull by using fanOutPoint in group resource"); - if(not ispresent(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].AggregatedResponse.responsePrimitive_list)){ + if(not ispresent(v_response.primitive.responsePrimitive.primitiveContent.aggregatedResponse.responsePrimitive_list)){ setverdict(fail, testcasename(), ": Error, aggregatedResponse attribute not provided"); } else{ - if(lengthof(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].AggregatedResponse.responsePrimitive_list) != c_numberOfResponsePrimitive){ + if(lengthof(v_response.primitive.responsePrimitive.primitiveContent.aggregatedResponse.responsePrimitive_list) != c_numberOfResponsePrimitive){ setverdict(fail, testcasename(), ": Error, length of aggregatedResponse is not valid"); } else{ for(i:=0; i<c_numberOfResponsePrimitive; i:=i+1){ - if(not match(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].AggregatedResponse.responsePrimitive_list[i].primitiveContent, v_contentResponse)){ + if(not match(v_response.primitive.responsePrimitive.primitiveContent.aggregatedResponse.responsePrimitive_list[i].primitiveContent, v_contentResponse)){ setverdict(fail, testcasename(), ": Error, aggregatedResponse doesn't match with template expected"); } } @@ -9646,7 +10648,7 @@ module OneM2M_Testcases { var template RequestPrimitive v_createRequest := m_createSubscriptionBase; var RequestPrimitive v_request; - v_createRequest.primitiveContent.any_1[0].Subscription_optional.resourceName := omit; + v_createRequest.primitiveContent.subscription_optional.resourceName := omit; // Test control // Test component configuration @@ -9726,7 +10728,7 @@ module OneM2M_Testcases { mcaPort.send(m_request(v_request)); tc_ac.start; alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int5105))) -> value v_response { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int4103))) -> value v_response { tc_ac.stop; setverdict(pass, testcasename() & ": No privilege for subscribing to the resource"); } @@ -9773,7 +10775,7 @@ module OneM2M_Testcases { v_aeIndex := f_cse_preamble_registerAe();//c_CUDNDi); v_request := f_getCreateRequestPrimitive(int23, v_createRequest, v_aeIndex);//Subscription - //v_request.primitiveContent.any_1[0].Subscription_optional.notificationURI := {"Not Initialized"}; + //v_request.primitiveContent.subscription_optional.notificationURI := {"Not Initialized"}; // Test Body mcaPort.send(m_request(v_request)); @@ -9826,10 +10828,10 @@ 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); + v_ae2Index := f_cse_createResource(int2, m_createAe(PX_APP_ID, -, PX_AE2_ID_STEM, "MyAe2", {f_getAnnouncementTargetPoA("HTTP", PX_AE2_ADDRESS, "")}), -1); v_request := f_getCreateRequestPrimitive(int23, v_createRequest, v_aeIndex);//Subscription - v_request.primitiveContent.any_1[0].Subscription_optional.notificationURI := {f_getResourceAddress(v_ae2Index)}; + v_request.primitiveContent.subscription_optional.notificationURI := {f_getResourceAddress(v_ae2Index)}; notifyHandler.start(f_subscriptionVerificationHandler(f_getResourceAddress(v_aeIndex), int4101)); @@ -9885,10 +10887,10 @@ 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); + v_ae2Index := f_cse_createResource(int2, m_createAe(PX_APP_ID, -, PX_AE2_ID_STEM, "MyAe2", {f_getAnnouncementTargetPoA("HTTP", PX_AE2_ADDRESS, "")})); v_request := f_getCreateRequestPrimitive(int23, v_createRequest, v_aeIndex);//Subscription - v_request.primitiveContent.any_1[0].Subscription_optional.notificationURI := {f_getResourceAddress(v_ae2Index)}; + v_request.primitiveContent.subscription_optional.notificationURI := {f_getResourceAddress(v_ae2Index)}; notifyHandler.start(f_subscriptionVerificationHandler(f_getResourceAddress(v_aeIndex), int5205)); @@ -9939,8 +10941,8 @@ module OneM2M_Testcases { var CseTester v_notifyHandler; var integer v_ae2Index := -1; - v_updateRequest.primitiveContent.any_1[0].AE_optional.labels := v_labels_1; - v_contentResponse.any_1[0].AE_optional := mw_contentAeBase; // all attributes expected + v_updateRequest.primitiveContent.aE_optional.labels := v_labels_1; + v_contentResponse.aE_optional := mw_contentAeBase; // all attributes expected // Test control @@ -10011,7 +11013,7 @@ module OneM2M_Testcases { var CseTester v_notifyHandler; var integer v_ae2Index := -1; - v_contentResponse.any_1[0].Container_optional := mw_contentContainer_rc1; // all attributes expected + v_contentResponse.container_optional := mw_contentContainer_rc1; // all attributes expected // Test control // Test component configuration @@ -10024,7 +11026,7 @@ module OneM2M_Testcases { f_cse_preamble_subscriptionVerification(v_notifyHandler, v_aeIndex, v_ae2Index, v_createRequest, int23); - v_createRequest := m_createSubscriptionAdvanced(f_getResourceAddress(v_aeIndex), -, {f_getResourceAddress(v_ae2Index)}, m_eventNotificationCriteria({int3}, -)); // TODO this field is initialised 2 time with parent adress resource (here and in f_cse_createResource) + v_createRequest := m_createSubscriptionAdvanced(f_getResourceAddress(v_aeIndex), -, {f_getResourceAddress(v_ae2Index)}, m_eventNotificationCriteria({int3}, -)); v_resourceIndex := f_cse_createResource(int23, v_createRequest, v_aeIndex);//Subscription @@ -10081,7 +11083,7 @@ module OneM2M_Testcases { var CseTester v_notifyHandler; var integer v_ae2Index := -1; - v_contentResponse.any_1[0].AE_optional := mw_contentAeBase; // all attributes expected + v_contentResponse.aE_optional := mw_contentAeBase; // all attributes expected // Test control @@ -10148,7 +11150,7 @@ module OneM2M_Testcases { alt { [] mcaPort.receive(mw_request(mw_notify(mw_contentNotification(?)))) -> value v_response { tc_ac.stop; - if(not(match(v_response.primitive.requestPrimitive.primitiveContent.any_1[0].Notification.subscriptionDeletion, true))) { + if(not(match(v_response.primitive.requestPrimitive.primitiveContent.notification.subscriptionDeletion, true))) { setverdict(fail, testcasename() & ": subscriptionDeletion attribute have to be set to TRUE"); } if(f_check_notificationContent(v_response.primitive.requestPrimitive, p_primitiveContent)){ @@ -10190,7 +11192,7 @@ module OneM2M_Testcases { var CseTester v_notifyHandler; var integer v_ae2Index := -1; - v_contentResponse.any_1[0].Container_optional := mw_contentContainer_rc1; // all attributes expected in notification + v_contentResponse.container_optional := mw_contentContainer_rc1; // all attributes expected in notification // Test component configuration f_cf01Up(); @@ -10221,7 +11223,7 @@ module OneM2M_Testcases { alt { [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { tc_ac.stop; - setverdict(pass, testcasename() & ": Container resource deleted successfuly"); + setverdict(pass, testcasename() & ": Container resource deleted successfully"); } [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { tc_ac.stop; @@ -10271,9 +11273,9 @@ module OneM2M_Testcases { var CseTester v_notifyHandler; var integer v_ae2Index := -1; - v_updateRequest.primitiveContent.any_1[0].AE_optional.labels := v_labels_1; - v_contentResponse.any_1[0].AE_optional := m_contentAe_allOmit; // only modified attribute expected - v_contentResponse.any_1[0].AE_optional.labels := ?; + v_updateRequest.primitiveContent.aE_optional.labels := v_labels_1; + v_contentResponse.aE_optional := m_contentAe_allOmit; // only modified attribute expected + v_contentResponse.aE_optional.labels := ?; // Test control @@ -10305,7 +11307,7 @@ module OneM2M_Testcases { alt { [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { tc_ac.stop; - setverdict(pass, testcasename() & ": Attribute of resource type int2 (Ae) updated successfuly"); + setverdict(pass, testcasename() & ": Attribute of resource type int2 (Ae) updated successfully"); } [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { @@ -10347,9 +11349,9 @@ module OneM2M_Testcases { var CseTester v_notifyHandler; var integer v_ae2Index := -1; - v_updateRequest.primitiveContent.any_1[0].AE_optional.labels := v_labels_1; - v_contentResponse.any_1[0].AE_optional := m_contentAe_allOmit; // only modified attribute expected - v_contentResponse.any_1[0].AE_optional.resourceID := ?; + v_updateRequest.primitiveContent.aE_optional.labels := v_labels_1; + v_contentResponse.aE_optional := m_contentAe_allOmit; // only modified attribute expected + v_contentResponse.aE_optional.resourceID := ?; // Test control @@ -10379,7 +11381,7 @@ module OneM2M_Testcases { alt { [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { tc_ac.stop; - setverdict(pass, testcasename() & ": Attribute of resource type int2 (Ae) updated successfuly"); + setverdict(pass, testcasename() & ": Attribute of resource type int2 (Ae) updated successfully"); } [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { tc_ac.stop; @@ -10418,9 +11420,9 @@ module OneM2M_Testcases { var CseTester v_notifyHandler; var integer v_ae2Index := -1; - v_updateRequest.primitiveContent.any_1[0].AE_optional.labels := v_labels_1; - v_contentResponse.any_1[0].AE_optional := mw_contentAeBase; // all attributes expected - v_retrieveContentResponse.any_1[0].Subscription_optional := mw_contentSubscription_rc1; + v_updateRequest.primitiveContent.aE_optional.labels := v_labels_1; + v_contentResponse.aE_optional := mw_contentAeBase; // all attributes expected + v_retrieveContentResponse.subscription_optional := mw_contentSubscription_rc1; // Test control @@ -10457,7 +11459,7 @@ module OneM2M_Testcases { alt { [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(v_retrieveContentResponse))) -> value v_response { tc_ac.stop; - if(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Subscription_optional.expirationCounter == 2 ){ + if(v_response.primitive.responsePrimitive.primitiveContent.subscription_optional.expirationCounter == 2 ){ setverdict(pass, testcasename() & ": expirationCounter has been successfully decreased by one"); } else{ @@ -10504,8 +11506,8 @@ module OneM2M_Testcases { var CseTester v_notifyHandler; var integer v_ae2Index := -1; - v_updateRequest.primitiveContent.any_1[0].AE_optional.labels := v_labels_1; - v_contentResponse.any_1[0].AE_optional := mw_contentAeBase; // all attributes expected + v_updateRequest.primitiveContent.aE_optional.labels := v_labels_1; + v_contentResponse.aE_optional := mw_contentAeBase; // all attributes expected // Test control @@ -10584,8 +11586,8 @@ module OneM2M_Testcases { var CseTester v_notifyHandler; var integer v_ae2Index := -1; - v_updateRequest.primitiveContent.any_1[0].AE_optional.labels := v_labels_1; - v_contentResponse.any_1[0].AE_optional := mw_contentAeBase; // all attributes expected + v_updateRequest.primitiveContent.aE_optional.labels := v_labels_1; + v_contentResponse.aE_optional := mw_contentAeBase; // all attributes expected // Test control @@ -10617,7 +11619,7 @@ module OneM2M_Testcases { alt { [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { tc_ac.stop; - setverdict(pass, testcasename() & ": Attribute of resource type int2 (Ae) updated successfuly"); + setverdict(pass, testcasename() & ": Attribute of resource type int2 (Ae) updated successfully"); } [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { tc_ac.stop; @@ -10659,7 +11661,7 @@ module OneM2M_Testcases { var CseTester v_notifyHandler; var integer v_ae2Index := -1; - v_updateRequest.primitiveContent.any_1[0].AE_optional.labels := v_labels_1; + v_updateRequest.primitiveContent.aE_optional.labels := v_labels_1; // Test control @@ -10691,7 +11693,7 @@ module OneM2M_Testcases { alt { [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { tc_ac.stop; - setverdict(pass, testcasename() & ": Attribute of resource type int2 (Ae) updated successfuly"); + setverdict(pass, testcasename() & ": Attribute of resource type int2 (Ae) updated successfully"); } [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { tc_ac.stop; @@ -10777,7 +11779,7 @@ module OneM2M_Testcases { alt { [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { tc_ac.stop; - setverdict(pass, testcasename() & ": Subscription resource deleted successfuly"); + setverdict(pass, testcasename() & ": Subscription resource deleted successfully"); } [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { tc_ac.stop; @@ -10855,7 +11857,7 @@ module OneM2M_Testcases { var CseTester v_notifyHandler; var integer v_ae2Index := -1; - v_contentResponse.any_1[0].AE_optional := mw_contentAeBase; // all attributes expected + v_contentResponse.aE_optional := mw_contentAeBase; // all attributes expected // Test control @@ -10880,15 +11882,15 @@ module OneM2M_Testcases { // Test Body v_notifyHandler.start(f_CSE_SUB_BV_018(v_contentResponse, numberOfAggregatedNotification)); // check that no notification is received - v_updateRequest.primitiveContent.any_1[0].AE_optional.labels := v_labels_1; + v_updateRequest.primitiveContent.aE_optional.labels := v_labels_1; v_request:= f_getUpdateRequestPrimitive(int2, v_aeIndex, v_updateRequest); // Update request 1 f_cse_updateResource(v_request); - v_updateRequest.primitiveContent.any_1[0].AE_optional.labels := v_labels_2; + v_updateRequest.primitiveContent.aE_optional.labels := v_labels_2; v_request:= f_getUpdateRequestPrimitive(int2, v_aeIndex, v_updateRequest); // Update request 2 f_cse_updateResource(v_request); - v_updateRequest.primitiveContent.any_1[0].AE_optional.labels := v_labels_3; + v_updateRequest.primitiveContent.aE_optional.labels := v_labels_3; v_request:= f_getUpdateRequestPrimitive(int2, v_aeIndex, v_updateRequest); // Update request 3 f_cse_updateResource(v_request); @@ -10913,7 +11915,7 @@ module OneM2M_Testcases { alt { [] 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(p_numberOfAggregatedNotification == lengthof(v_response.primitive.requestPrimitive.primitiveContent.aggregatedNotification.notification_list)){ if(f_check_notificationContent(v_response.primitive.requestPrimitive, p_primitiveContent)){ setverdict(pass, testcasename() & ": Notification received"); } @@ -10958,7 +11960,7 @@ module OneM2M_Testcases { var CseTester v_notifyHandler; var integer v_ae2Index := -1; - v_contentResponse.any_1[0].AE_optional := mw_contentAeBase; // all attributes expected + v_contentResponse.aE_optional := mw_contentAeBase; // all attributes expected // Test control @@ -10983,11 +11985,11 @@ module OneM2M_Testcases { // Test Body v_notifyHandler.start(f_CSE_SUB_BV_018(v_contentResponse, 2)); // check that no notification is received - v_updateRequest.primitiveContent.any_1[0].AE_optional.labels := v_labels_1; + v_updateRequest.primitiveContent.aE_optional.labels := v_labels_1; v_request:= f_getUpdateRequestPrimitive(int2, v_aeIndex, v_updateRequest); // Update request 1 f_cse_updateResource(v_request); - v_updateRequest.primitiveContent.any_1[0].AE_optional.labels := v_labels_2; + v_updateRequest.primitiveContent.aE_optional.labels := v_labels_2; v_request:= f_getUpdateRequestPrimitive(int2, v_aeIndex, v_updateRequest); // Update request 2 f_cse_updateResource(v_request); @@ -11021,7 +12023,7 @@ module OneM2M_Testcases { var CseTester v_notifyHandler; var integer v_ae2Index := -1; - v_contentResponse.any_1[0].AE_optional := mw_contentAeBase; // all attributes expected + v_contentResponse.aE_optional := mw_contentAeBase; // all attributes expected // Test control @@ -11050,15 +12052,15 @@ module OneM2M_Testcases { // Test Body 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_updateRequest.primitiveContent.aE_optional.labels := v_labels_1; v_request:= f_getUpdateRequestPrimitive(int2, v_aeIndex, v_updateRequest); // Update request 1 f_cse_updateResource(v_request); - v_updateRequest.primitiveContent.any_1[0].AE_optional.labels := v_labels_2; + v_updateRequest.primitiveContent.aE_optional.labels := v_labels_2; v_request:= f_getUpdateRequestPrimitive(int2, v_aeIndex, v_updateRequest); // Update request 2 f_cse_updateResource(v_request); - v_updateRequest.primitiveContent.any_1[0].AE_optional.labels := v_labels_3; + v_updateRequest.primitiveContent.aE_optional.labels := v_labels_3; v_request:= f_getUpdateRequestPrimitive(int2, v_aeIndex, v_updateRequest); // Update request 3 f_cse_updateResource(v_request); @@ -11101,12 +12103,12 @@ module OneM2M_Testcases { // Preamble v_aeIndex := f_cse_preamble_registerAe(-, -); // Only use for setting the ACR_2's accessControlOriginators attribute to AE_ID - v_createRequest.primitiveContent.any_1[0].AccessControlPolicy_optional.privileges.accessControlRule_list := {v_accessControlRule_1,v_accessControlRule_2}; - v_createRequest.primitiveContent.any_1[0].AccessControlPolicy_optional.privileges.accessControlRule_list[1].accessControlOriginators := {f_getOriginator(v_aeIndex)}; + v_createRequest.primitiveContent.accessControlPolicy_optional.privileges.accessControlRule_list := {v_accessControlRule_1,v_accessControlRule_2}; + v_createRequest.primitiveContent.accessControlPolicy_optional.privileges.accessControlRule_list[1].accessControlOriginators := {f_getOriginator(v_aeIndex)}; - v_contentResponse.any_1[0].AccessControlPolicy_optional := mw_contentAcp_rc1; - v_contentResponse.any_1[0].AccessControlPolicy_optional.privileges.accessControlRule_list := {v_accessControlRule_1,v_accessControlRule_2};// TODO To handle reverse order of acrs - v_contentResponse.any_1[0].AccessControlPolicy_optional.privileges.accessControlRule_list[1].accessControlOriginators := {f_getOriginator(v_aeIndex)}; + v_contentResponse.accessControlPolicy_optional := mw_contentAcp_rc1; + v_contentResponse.accessControlPolicy_optional.privileges.accessControlRule_list := {v_accessControlRule_1,v_accessControlRule_2};// TODO To handle reverse order of acrs + v_contentResponse.accessControlPolicy_optional.privileges.accessControlRule_list[1].accessControlOriginators := {f_getOriginator(v_aeIndex)}; // Test Body v_acpIndex := f_cse_createResource(int1, v_createRequest); // CSE child resource @@ -11163,12 +12165,12 @@ module OneM2M_Testcases { // Preamble v_aeIndex := f_cse_preamble_registerAe(-, -); // Only use for setting the ACR_2's accessControlOriginators attribute to AE_ID - v_createRequest.primitiveContent.any_1[0].AccessControlPolicy_optional.selfPrivileges.accessControlRule_list := {v_accessControlRule_1,v_accessControlRule_2}; - v_createRequest.primitiveContent.any_1[0].AccessControlPolicy_optional.selfPrivileges.accessControlRule_list[1].accessControlOriginators := {f_getOriginator(v_aeIndex)}; + v_createRequest.primitiveContent.accessControlPolicy_optional.selfPrivileges.accessControlRule_list := {v_accessControlRule_1,v_accessControlRule_2}; + v_createRequest.primitiveContent.accessControlPolicy_optional.selfPrivileges.accessControlRule_list[1].accessControlOriginators := {f_getOriginator(v_aeIndex)}; - v_contentResponse.any_1[0].AccessControlPolicy_optional := mw_contentAcp_rc1; - v_contentResponse.any_1[0].AccessControlPolicy_optional.selfPrivileges.accessControlRule_list := {v_accessControlRule_1,v_accessControlRule_2};//TODO To handle reverse order of acrs - v_contentResponse.any_1[0].AccessControlPolicy_optional.selfPrivileges.accessControlRule_list[1].accessControlOriginators := {f_getOriginator(v_aeIndex)}; + v_contentResponse.accessControlPolicy_optional := mw_contentAcp_rc1; + v_contentResponse.accessControlPolicy_optional.selfPrivileges.accessControlRule_list := {v_accessControlRule_1,v_accessControlRule_2};//TODO To handle reverse order of acrs + v_contentResponse.accessControlPolicy_optional.selfPrivileges.accessControlRule_list[1].accessControlOriginators := {f_getOriginator(v_aeIndex)}; // Test Body v_acpIndex := f_cse_createResource(int1, v_createRequest); // CSE child resource @@ -11213,7 +12215,7 @@ module OneM2M_Testcases { testcase TC_CSE_SEC_ACP_BV_003_02() runs on CseTester system CseSystem { //Update var template RequestPrimitive v_updateRequest := m_updateAeBase; var Labels v_labels_1:= {"VALUE_1"}; - v_updateRequest.primitiveContent.any_1[0].AE_optional.labels := v_labels_1; + v_updateRequest.primitiveContent.aE_optional.labels := v_labels_1; f_CSE_SEC_ACP_BV_003(v_updateRequest); }//end TC_CSE_SEC_ACP_BV_003_02 @@ -11283,7 +12285,7 @@ module OneM2M_Testcases { alt { [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { tc_ac.stop; - log(testcasename() & ": Attribute of resource type ACP updated successfuly"); + log(testcasename() & ": Attribute of resource type ACP updated successfully"); } [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { tc_ac.stop; @@ -11312,7 +12314,7 @@ module OneM2M_Testcases { testcase TC_CSE_SEC_ACP_BV_004_02() runs on CseTester system CseSystem { //Update var template RequestPrimitive v_updateRequest := m_updateAeBase; var Labels v_labels_1:= {"VALUE_1"}; - v_updateRequest.primitiveContent.any_1[0].AE_optional.labels := v_labels_1; + v_updateRequest.primitiveContent.aE_optional.labels := v_labels_1; f_CSE_SEC_ACP_BV_004(v_updateRequest); }//end TC_CSE_SEC_ACP_BV_004_02 @@ -11387,7 +12389,7 @@ module OneM2M_Testcases { testcase TC_CSE_SEC_ACP_BV_011_02() runs on CseTester system CseSystem { //Update var template RequestPrimitive v_updateRequest := m_updateContainerBase; var Labels v_labels_1:= {"VALUE_1"}; - v_updateRequest.primitiveContent.any_1[0].Container_optional.labels := v_labels_1; + v_updateRequest.primitiveContent.container_optional.labels := v_labels_1; f_CSE_SEC_ACP_BV_011(v_updateRequest); }//end TC_CSE_SEC_ACP_BV_011_02 @@ -11459,7 +12461,7 @@ module OneM2M_Testcases { testcase TC_CSE_SEC_ACP_BO_012_02() runs on CseTester system CseSystem { //Update var template RequestPrimitive v_updateRequest := m_updateContainerBase; var Labels v_labels_1:= {"VALUE_1"}; - v_updateRequest.primitiveContent.any_1[0].Container_optional.labels := v_labels_1; + v_updateRequest.primitiveContent.container_optional.labels := v_labels_1; f_CSE_SEC_ACP_BO_012(v_updateRequest, int62); //TODO Fix p_acor }//end TC_CSE_SEC_ACP_BO_012_02 @@ -11549,7 +12551,7 @@ module OneM2M_Testcases { testcase TC_CSE_SEC_ACP_BO_013_02() runs on CseTester system CseSystem { //Update var template RequestPrimitive v_updateRequest := m_updateAeBase; var Labels v_labels_1:= {"VALUE_1"}; - v_updateRequest.primitiveContent.any_1[0].AE_optional.labels := v_labels_1; + v_updateRequest.primitiveContent.aE_optional.labels := v_labels_1; f_CSE_SEC_ACP_BO_013(v_updateRequest); }//end TC_CSE_SEC_ACP_BO_013_02 @@ -11635,7 +12637,7 @@ module OneM2M_Testcases { testcase TC_CSE_SEC_ACP_BV_014_02() runs on CseTester system CseSystem { //Update var template RequestPrimitive v_updateRequest := m_updateAeBase; var Labels v_labels_1:= {"VALUE_1"}; - v_updateRequest.primitiveContent.any_1[0].AE_optional.labels := v_labels_1; + v_updateRequest.primitiveContent.aE_optional.labels := v_labels_1; f_CSE_SEC_ACP_BV_014(v_updateRequest); }//end TC_CSE_SEC_ACP_BV_014_02 @@ -11755,7 +12757,7 @@ module OneM2M_Testcases { f_cse_updateResource(v_updateRequest); // Test Body - v_updateRequest.primitiveContent.any_1[0].AE_optional.accessControlPolicyIDs := {f_getResourceId(vc_resourcesList[v_acpIndex2].resource)}; + v_updateRequest.primitiveContent.aE_optional.accessControlPolicyIDs := {f_getResourceId(vc_resourcesList[v_acpIndex2].resource)}; v_updateRequest := f_getUpdateRequestPrimitive(int1, v_aeIndex, v_updateRequest); mcaPort.send(m_request(v_updateRequest)); @@ -11826,7 +12828,7 @@ module OneM2M_Testcases { f_cse_updateResource(v_updateRequest); // Test Body - v_updateRequest.primitiveContent.any_1[0].AE_optional.accessControlPolicyIDs := {f_getResourceId(vc_resourcesList[v_acpIndex2].resource)}; + v_updateRequest.primitiveContent.aE_optional.accessControlPolicyIDs := {f_getResourceId(vc_resourcesList[v_acpIndex2].resource)}; v_updateRequest := f_getUpdateRequestPrimitive(int1, v_aeIndex, v_updateRequest); mcaPort.send(m_request(v_updateRequest)); diff --git a/Requirements collection/TST-Requirements_collection.xlsx b/Requirements collection/TST-Requirements_collection.xlsx index a2cf07abf2ea20434b30248f2f45d4ee31bfc1f8..7d04d1de7cd2829cd2f796259575a4ee7d948f67 100644 Binary files a/Requirements collection/TST-Requirements_collection.xlsx and b/Requirements collection/TST-Requirements_collection.xlsx differ