diff --git a/LibOneM2M/OneM2M_Functions.ttcn b/LibOneM2M/OneM2M_Functions.ttcn index 06820fe7131f6fe8283e2f312b22fa587bf9c17b..2e4aca7cd9b7a0e1618b245edd876bb609d7505f 100644 --- a/LibOneM2M/OneM2M_Functions.ttcn +++ b/LibOneM2M/OneM2M_Functions.ttcn @@ -97,7 +97,7 @@ module OneM2M_Functions { /** * @desc Ports mapping and default behaviour activation for Config 02 */ - function f_cf02Up(in CseTypeID p_cseType := int2) runs on AeSimu system CseSystem { + function f_cf02Up(in CseTypeID p_cseType := int2, in boolean p_auxiliaryAe2Required := false) runs on AeSimu system CseSystem { // Variables var charstring v_binding; @@ -127,6 +127,15 @@ module OneM2M_Functions { vc_aeSimu := activate(a_cse_cf02_ae1()); vc_cse1.start(f_cf02UpCse1(p_cseType)); vc_cse1.done; + + // Initialize AE2 + if(p_auxiliaryAe2Required) { + vc_auxiliaryAe2Up := p_auxiliaryAe2Required; + vc_ae2 := AeSimu.create("AE2") alive; + vc_ae2.start(f_cf02UpAe2()); + vc_ae2.done; + f_connectInfoPort(vc_ae2); + } // Connect f_connectInfoPort(vc_cse1); @@ -289,6 +298,35 @@ module OneM2M_Functions { } // end f_cf02UpAe1 + /** + @desc Ports mapping and default behaviour activation for Config 2 on the auxiliary AE2 + */ + function f_cf02UpAe2() runs on AeSimu system CseSystem { + + // Variables + var charstring v_binding; + var charstring v_binding_in; + var charstring v_host; + + //Initialization of component variables + vc_config := e_cf02; + vc_testSystemRole := e_ae; + vc_aeSimuDesc := PX_TS_AE2; + + // Map + map(self:mcaPort, system:mcaPort) param (vc_aeSimuDesc.mcaPort); + map(self:mcaPortIn, system:mcaPortIn) param (vc_aeSimuDesc.mcaPortIn); + map(self:acPort, system:acPort); + + f_setProtocolBinding(vc_aeSimuDesc.mcaPort, vc_aeSimuDesc.mcaPortIn, v_binding, v_host, v_binding_in); + + vc_myInterfaces[enum2int(valueof(InterfaceIds:e_mcaPort))] := { e_mcaPort, v_host, v_binding, vc_aeSimuDesc.mcaPort.serialization }; + vc_myInterfaces[enum2int(valueof(InterfaceIds:e_mcaPortIn))] := { e_mcaPortIn, v_host, v_binding_in, vc_aeSimuDesc.mcaPortIn.serialization }; + + //Initialze the IUT + + } // end f_cf02UpAe2 + /** * @desc Ports mapping and default behaviour activation for Config 03 */ @@ -950,6 +988,8 @@ module OneM2M_Functions { function f_getRequestPrimitive(in Tester p_component) runs on Tester return RequestPrimitive { var RequestPrimitive v_request; + f_connectInfoPort(p_component); + p_component.start(f_sendRequestPrimitive()); alt { []infoPort.receive(mw_requestPrimitiveforInfoPort) -> value v_request { @@ -958,6 +998,8 @@ module OneM2M_Functions { p_component.done; + f_disconnectInfoPort(p_component); + return v_request; } @@ -1504,7 +1546,7 @@ module OneM2M_Functions { if(vc_acpIndex != -1) { vc_resourcesIndexToBeDeleted := {vc_acpIndex};//TODO Not needed - v_request := valueof(m_createAe(p_appId, {f_getResourceId(vc_resourcesList[vc_acpIndex].resource)}, -)); + v_request := valueof(m_createAe(p_appId, {f_getResourceAddress(vc_acpIndex)}, -)); //Set CSEBase IUT as target v_request.to_ := f_getResourceAddress(); @@ -1963,7 +2005,7 @@ module OneM2M_Functions { * @return Internal resource index of the created resource * @verdict */ - function f_cse_createResource(in ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive := m_create, integer p_parentIndex := -1, in XSD.ID p_m2mServiceUser := "") runs on AeSimu return integer { + function f_cse_createResource(in ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive := m_create, integer p_parentIndex := -1, in template (omit) XSD.ID p_m2mServiceUser := omit) runs on AeSimu return integer { var RequestPrimitive v_request; var integer v_resourceIndex := -1; @@ -1989,7 +2031,7 @@ module OneM2M_Functions { } } else if (p_resourceType == int9) { //Check that group members are correctly in the group - if(not(match(v_request.primitiveContent.group_.memberIDs, vc_response.primitive.responsePrimitive.primitiveContent.group_.memberIDs))) { + if(lengthof(v_request.primitiveContent.group_.memberIDs) != vc_response.primitive.responsePrimitive.primitiveContent.group_.currentNrOfMembers) { setverdict(inconc, __SCOPE__&":INFO: Wrong number of members in group"); } } @@ -2048,6 +2090,9 @@ module OneM2M_Functions { function f_cse_createAccessControlPolicyAux(in template (value) XSD.String p_acpName := c_defaultAcpResourceName, in template (value) ListOfURIs p_acor := PX_ACOR, in template (value) AccessControlOperations p_allowedOperations := int63) runs on AeSimu { var RequestPrimitive v_request; + //Activate defaults when running on a PTC + f_cse_activateDefaults_ae(); + v_request := valueof(m_createAcp(p_acpName, p_acor, p_allowedOperations)); v_request := f_getCreateRequestPrimitive(int1, v_request, -1); @@ -2449,7 +2494,6 @@ module OneM2M_Functions { v_request := valueof(m_createTimeSeriesInstanceBase); v_request.primitiveContent.timeSeriesInstance.resourceName := "MyTimeSeriesInstance" & int2str(p_timeSeriesInstanceNumber); v_request.primitiveContent.timeSeriesInstance.dataGenerationTime := {alt_ := fx_generateTimestamp()}; - v_request.primitiveContent.timeSeriesInstance.dataGenerationTime.alt_ := v_request.primitiveContent.timeSeriesInstance.dataGenerationTime.alt_ & ",1234"; v_resourceIndex := f_cse_createResource(int30, v_request, p_timeSeriesResourceIndex); i := i + 1; @@ -2728,8 +2772,7 @@ module OneM2M_Functions { else{ setverdict(fail, __SCOPE__ & ": Notification received but the content doesn't match"); } - } - else { + } else { setverdict(fail, __SCOPE__ & ": Number of Notification in Aggregatednotification isn't right"); } //Send response in any case @@ -2757,12 +2800,12 @@ module OneM2M_Functions { } [] tc_ac.timeout { if(v_notificationsReceived == 0) { - setverdict(fail, __SCOPE__ & ": No notification received"); + setverdict(fail, __SCOPE__ & ": No notification received"); } else { setverdict(fail, __SCOPE__ & ": Not received the expected number of notifications"); + } } } - } } //end f_cse_notifyProcedure_aggregatedNotificationHandler @@ -3316,7 +3359,7 @@ module OneM2M_Functions { //Activate defaults when running on a PTC f_cse_activateDefaults_cse1(); - + p_utRequest.requestPrimitive.to_ := f_getResourceAddress(); f_cse_sendUtPrimitive_cseSimu(p_utRequest, p_action); tc_ac.start; @@ -3422,6 +3465,7 @@ module OneM2M_Functions { } f_checkCseSimuStatus(); + } }// end f_cse_updateResourceHandler @@ -4117,6 +4161,16 @@ module OneM2M_Functions { if(v_myResource.group_.memberType != int0) { v_myResource.group_.memberTypeValidated := true;//Set initially to TRUE } + if(v_myResource.group_.memberIDs == {"NotInitialized"}) { + v_myResource.group_.memberIDs := {}; + } + v_myResource.group_.currentNrOfMembers := lengthof(v_myResource.group_.memberIDs); + if(lengthof(v_myResource.group_.memberIDs) == 0) { + v_myResource.group_.memberTypeValidated := false; + } + if(not(ispresent(p_resource.group_.semanticSupportIndicator))) { + v_myResource.group_.semanticSupportIndicator := false;//Set initially to TRUE + } } } else if(p_resourceType == int15 and ispresent(p_resource)) { //PollingChannel if(ischosen(p_resource.pollingChannel)){ @@ -4139,7 +4193,7 @@ module OneM2M_Functions { v_myResource.timeSeries.resourceID := "ts" & int2str(v_resourceIndex); if(not(ispresent(p_resource.timeSeries.resourceName))) { v_myResource.timeSeries.resourceName := "timeSeries" & int2str(v_resourceIndex); - } + } v_myResource.timeSeries.resourceType := p_resourceType; v_myResource.timeSeries.parentID := f_getResourceId(vc_localResourcesList[p_parentIndex].resource); v_myResource.timeSeries.creationTime := fx_generateTimestamp(); @@ -4150,7 +4204,7 @@ module OneM2M_Functions { v_myResource.timeSeries.currentNrOfInstances := 0; v_myResource.timeSeries.currentByteSize := 0; v_myResource.timeSeries.missingDataDetect := false; - } + } } else if(p_resourceType == int30 and ispresent(p_resource)) { //TimeSeriesInstance if(ischosen(p_resource.timeSeriesInstance)){ v_myResource.timeSeriesInstance := valueof(p_resource.timeSeriesInstance); @@ -4542,8 +4596,6 @@ module OneM2M_Functions { f_send(e_mccPortIn, m_response(vc_response.primitive.responsePrimitive)); } - - }//end group CseSimuFunctions group CseAltstepFunctions { @@ -4551,29 +4603,7 @@ module OneM2M_Functions { * @desc Cse altstep for config 01 */ altstep a_cse_cf01() runs on AeSimu { - var MsgIn v_request; - var ResponsePrimitive v_responsePrimitive; - - [] mcaPort.receive { - log(__SCOPE__&": WARNING: Unexpected message received"); - repeat; - } - [] mcaPortIn.receive(mw_request(mw_notifyNotification(mw_contentNotification(?)))) -> value v_request { - //Send response - v_responsePrimitive := valueof(m_responseNotification(int2000, omit)); - v_responsePrimitive.requestIdentifier := v_request.primitive.requestPrimitive.requestIdentifier; - f_send(e_mcaPortIn, m_response(v_responsePrimitive)); - log(__SCOPE__&": WARNING: Unexpected Notification message received"); - repeat; - } - [] mcaPortIn.receive(mw_request(mw_notifyNotification(mw_contentNotificationVerification))) -> value v_request { - //Send response - v_responsePrimitive := valueof(m_responseNotification(int2000, omit)); - v_responsePrimitive.requestIdentifier := v_request.primitive.requestPrimitive.requestIdentifier; - f_send(e_mcaPortIn, m_response(v_responsePrimitive)); - log(__SCOPE__&": WARNING: Unexpected Notification for Subscription Verification message received"); - repeat; - } + [] a_cse_aeSimu(); } /** @@ -5513,7 +5543,7 @@ module OneM2M_Functions { * @return Created CREATE request primitive * @verdict */ - function f_getCreateRequestPrimitive(in ResourceType p_resourceType, template RequestPrimitive p_request := m_create, integer p_parentIndex, in template XSD.ID p_m2mServiceUser := omit) runs on Tester return RequestPrimitive { + function f_getCreateRequestPrimitive(in ResourceType p_resourceType, template RequestPrimitive p_request := m_create, integer p_parentIndex, in template (omit) XSD.ID p_m2mServiceUser := omit) runs on Tester return RequestPrimitive { var template ListOfURIs v_defaultListOfURIs := {"NotInitialized"}; var template AcpType v_defaultAcpIDs := {"NotInitialized"}; var template Timestamp v_defaultTimestamp := "00000101T000000"; @@ -5544,7 +5574,7 @@ module OneM2M_Functions { } if(ispresent(p_request.primitiveContent.container.accessControlPolicyIDs)) { if((match(valueof(p_request.primitiveContent.container.accessControlPolicyIDs), v_defaultAcpIDs )) and (isbound(vc_acpIndex))){ - p_request.primitiveContent.container.accessControlPolicyIDs := {f_getResourceId(vc_resourcesList[vc_acpIndex].resource)}; + p_request.primitiveContent.container.accessControlPolicyIDs := {f_getResourceAddress(vc_acpIndex)}; } } } else if (p_resourceType == int4) {//contentInstance @@ -5585,7 +5615,7 @@ module OneM2M_Functions { //accessControlPolicyIds if(ispresent(p_request.primitiveContent.subscription.accessControlPolicyIDs)) { if(match(valueof(p_request.primitiveContent.subscription.accessControlPolicyIDs), v_defaultAcpIDs )){ - p_request.primitiveContent.subscription.accessControlPolicyIDs := {f_getResourceId(vc_resourcesList[vc_acpIndex].resource)}; + p_request.primitiveContent.subscription.accessControlPolicyIDs := {f_getResourceAddress(vc_acpIndex)}; } } } else if(p_resourceType == int29){//timeSeries @@ -5594,6 +5624,18 @@ module OneM2M_Functions { p_request.primitiveContent.timeSeries.accessControlPolicyIDs := {f_getResourceId(vc_resourcesList[vc_acpIndex].resource)}; } } + if(ispresent(p_request.primitiveContent.timeSeries.missingDataDetect)) { + if(valueof(p_request.primitiveContent.timeSeries.missingDataDetect) == true ) { + if(not ispresent(p_request.primitiveContent.timeSeries.missingDataDetectTimer)) { + //TODO Uncommnent when periodicIntervalDelta is added to types + //if(ispresent(p_request.primitiveContent.timeSeries.periodicIntervalDelta)) { + // p_request.primitiveContent.timeSeries.missingDataDetectTimer := p_request.primitiveContent.timeSeries.periodicIntervalDelta * 2; + //} else { + // p_request.primitiveContent.timeSeries.missingDataDetectTimer := 500; + //} + } + } + } } else if(p_resourceType == int30){//timeSeriesInstance if(ispresent(p_request.primitiveContent.timeSeriesInstance.dataGenerationTime)) { if((match(valueof(p_request.primitiveContent.timeSeriesInstance.dataGenerationTime), v_defaultAbsRelTimestamp))){ @@ -6144,6 +6186,10 @@ module OneM2M_Functions { v_cleanedURI := f_resourceIdCleaner(p_receivedURI); + if (v_cleanedURI == "-") { + v_cleanedURI := f_getResourceName(vc_localResourcesList[vc_cSEBaseIndex].resource); + } + if (f_isHierarchical(p_receivedURI)) { log("Hierarchical method: " & v_cleanedURI); @@ -6784,7 +6830,7 @@ module OneM2M_Functions { function f_setExpirationTime(PrimitiveContent p_resource, PrimitiveContent p_originalResource) runs on Tester return PrimitiveContent { if (ischosen(p_resource.aEAnnc)){ - p_resource.aEAnnc.expirationTime := p_resource.aE.expirationTime; + p_resource.aEAnnc.expirationTime := p_originalResource.aE.expirationTime; } else if (ischosen(p_resource.accessControlPolicyAnnc)){ p_resource.accessControlPolicyAnnc.expirationTime := p_originalResource.accessControlPolicy.expirationTime; diff --git a/LibOneM2M/OneM2M_Templates.ttcn b/LibOneM2M/OneM2M_Templates.ttcn index d382c14b18344534fcd2972767b45f774852738f..642ae574a1e3f17dd46c5f0a16b5ae6ba3c45471 100644 --- a/LibOneM2M/OneM2M_Templates.ttcn +++ b/LibOneM2M/OneM2M_Templates.ttcn @@ -1623,7 +1623,7 @@ module OneM2M_Templates { template (value) RequestPrimitive m_createGroupAnncBase modifies m_create := { requestIdentifier := testcasename() & "-m_createGroupAnnc", resourceType := int10009, - primitiveContent := {groupAnnc := m_contentCreateGroupAnnc (1, {"NotInitialized"}, omit, omit)} //TODO: p_resourceId + primitiveContent := {groupAnnc := m_contentCreateGroupAnnc (omit, omit, omit, omit)} //TODO: p_resourceId }; template (value) RequestPrimitive m_createGroup(in template (value) XSD.NonNegativeInteger p_maxNrOfMembers, @@ -3069,13 +3069,13 @@ module OneM2M_Templates { eventCategory := *, deliveryAggregation := *, groupRequestIdentifier := *, - filterCriteria := *, - desiredIdentifierResultType := *, + filterCriteria := omit, + desiredIdentifierResultType := omit, tokens := *, tokenIDs := *, localTokenIDs := *, tokenRequestIndicator := *, - groupRequestTargetMembers := *, + groupRequestTargetMembers := omit, groupSomecastTargetNumber := omit, authorSignIndicator := omit, authorSigns := omit, @@ -3771,8 +3771,8 @@ module OneM2M_Templates { * @param p_accessControlPolicyIds ACP IDs for the GroupAnnc * @param p_name Resource name */ - template (value) GroupAnnc_optional m_contentCreateGroupAnnc ( in template (value) XSD.PositiveInteger p_maxNrOfMembers, - in template (value) ListOfURIs p_memberIds, + template (value) GroupAnnc_optional m_contentCreateGroupAnnc ( in template (omit) XSD.PositiveInteger p_maxNrOfMembers, + in template (omit) ListOfURIs p_memberIds, in template (omit) AcpType p_accessControlPolicyIds, in template (omit) MemberType p_memberType := omit, in template (omit) ConsistencyStrategy p_consistencyStrategy := omit, @@ -5128,7 +5128,7 @@ module OneM2M_Templates { announceSyncType := omit,//O stateTag := omit,//NP creator := omit,//O - contentInfo := "text/strings:0",//O + contentInfo := "application/text:1",//O contentSize := omit,//NP contentRef := omit, //O ontologyRef := omit,//O @@ -5413,7 +5413,7 @@ module OneM2M_Templates { multicastCapability := omit,//O externalGroupID := omit,//O triggerEnable := omit,//O - activityPatternElements := omit,//O + activityPatternElements := omit,//Ovalue enableTimeCompensation := omit,//O choice := omit//O }; @@ -8948,9 +8948,7 @@ module OneM2M_Templates { choice := {childResource_list := ?} //O } - template AccessControlPolicy_optional mw_contentAcp_rc6 modifies mw_contentAcp_allOmit := { - choice := {childResource_list := ?} //O - } + template ResourceRefList mw_contentAcp_rc6 := {resourceRef_list := ? };//O template AccessControlPolicy_optional mw_contentAcp_rc7 modifies mw_contentAcpBase := { @@ -9093,9 +9091,7 @@ module OneM2M_Templates { choice := {childResource_list := ?} //O } - template Group_optional mw_contentGroup_rc6 modifies mw_contentGroup_allOmit := { - choice := {childResource_list := ?} //O - } + template ResourceRefList mw_contentGroup_rc6 := {resourceRef_list := ? };//O template Group_optional mw_contentGroup_rc7 modifies mw_contentGroupBase := { @@ -9210,16 +9206,18 @@ module OneM2M_Templates { } template PollingChannel_optional mw_contentPollingChannel_rc5 modifies mw_contentPollingChannelBase := { - } - - template PollingChannel_optional mw_contentPollingChannel_rc6 modifies mw_contentPollingChannel_allOmit := { choice := {childResource_list := ?} //O } - template PollingChannel_optional mw_contentPollingChannel_rc8 modifies mw_contentPollingChannel_allOmit := { - choice := {choice_list := ?} //O - } + template ResourceRefList mw_contentPollingChannel_rc6 := {resourceRef_list := ? };//O + + //Temporarily pollingChannel resource with child resources will contain nothing as no child resource can be used + //template PollingChannel_optional mw_contentPollingChannel_rc8 modifies mw_contentPollingChannel_allOmit := { + // choice := {choice_list := ?} //O + //} + template PollingChannel_optional mw_contentPollingChannel_rc8 := mw_contentPollingChannel_allOmit; + template (value) RemoteCSE_optional m_contentRemoteCSE_allOmit := { resourceName := omit,//M resourceType := omit,//M @@ -9428,9 +9426,7 @@ module OneM2M_Templates { choice := {childResource_list := ?} //O } - template Schedule_optional mw_contentSchedule_rc6 modifies mw_contentSchedule_allOmit := { - choice := {childResource_list := ?} //O - } + template ResourceRefList mw_contentSchedule_rc6 := {resourceRef_list := ? };//O template Schedule_optional mw_contentSchedule_rc7 modifies mw_contentScheduleBase := { @@ -9639,9 +9635,7 @@ module OneM2M_Templates { choice := {childResource_list := ?} //O } - template Subscription_optional mw_contentSubscription_rc6 modifies mw_contentSubscription_allOmit := { - choice := {childResource_list := ?} //O - } + template ResourceRefList mw_contentSubscription_rc6 := {resourceRef_list := ? };//O template Subscription_optional mw_contentSubscription_rc7 modifies mw_contentSubscriptionBase := { @@ -9854,9 +9848,8 @@ module OneM2M_Templates { choice := {childResource_list := ?} //O } - template Container_optional mw_contentContainer_rc6 modifies mw_contentContainer_allOmit := { - choice := {childResource_list := ?} //O - } + template ResourceRefList mw_contentContainer_rc6 := {resourceRef_list := ? };//O + template Container_optional mw_contentContainer_rc7 modifies mw_contentContainerBase := { @@ -9910,6 +9903,7 @@ module OneM2M_Templates { template (value) Notification m_contentNotification_subscriptionVerification(XSD.ID p_creator) modifies m_contentNotification_allOmit:= { verificationRequest := true, + subscriptionReference := "MySubscription", creator := p_creator }; @@ -10117,9 +10111,7 @@ module OneM2M_Templates { choice := {childResource_list := ?} //O } - template TimeSeries_optional mw_contentTimeSeries_rc6 modifies mw_contentTimeSeries_allOmit := { - choice := {childResource_list := ?} //O - } + template ResourceRefList mw_contentTimeSeries_rc6 := {resourceRef_list := ? };//O template TimeSeries_optional mw_contentTimeSeries_rc8 modifies mw_contentTimeSeries_allOmit := { choice := {choice_list := ?} //O diff --git a/OneM2M_PermutationFunctions.ttcn b/OneM2M_PermutationFunctions.ttcn index 1d076fb2fe402792a513c7558c51781d573bda08..a42e93f4070390a99d387d2746c799ade1dfc296 100644 --- a/OneM2M_PermutationFunctions.ttcn +++ b/OneM2M_PermutationFunctions.ttcn @@ -1542,7 +1542,7 @@ module OneM2M_PermutationFunctions { v_resourceIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex); - v_groupRequest.primitiveContent.group_.memberIDs := {f_getResourceId(vc_resourcesList[v_resourceIndex].resource)}; + v_groupRequest.primitiveContent.group_.memberIDs := {f_getResourceAddress(v_resourceIndex)}; v_groupIndex := f_cse_createResource(int9, v_groupRequest, v_aeIndex); @@ -1783,7 +1783,7 @@ module OneM2M_PermutationFunctions { v_resourceIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex); - v_groupRequest.primitiveContent.group_.memberIDs := {f_getResourceId(vc_resourcesList[v_resourceIndex].resource)}; + v_groupRequest.primitiveContent.group_.memberIDs := {f_getResourceAddress(v_resourceIndex)}; v_groupIndex := f_cse_createResource(int9, v_groupRequest, v_aeIndex); @@ -2040,7 +2040,7 @@ module OneM2M_PermutationFunctions { v_resourceIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex); - v_groupRequest.primitiveContent.group_.memberIDs := {f_getResourceId(vc_resourcesList[v_resourceIndex].resource)}; + v_groupRequest.primitiveContent.group_.memberIDs := {f_getResourceAddress(v_resourceIndex)}; v_groupIndex := f_cse_createResource(int9, v_groupRequest, v_aeIndex); @@ -2290,7 +2290,7 @@ module OneM2M_PermutationFunctions { v_resourceIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex); - v_groupRequest.primitiveContent.group_.memberIDs := {f_getResourceId(vc_resourcesList[v_resourceIndex].resource)}; + v_groupRequest.primitiveContent.group_.memberIDs := {f_getResourceAddress(v_resourceIndex)}; v_groupIndex := f_cse_createResource(int9, v_groupRequest, v_aeIndex); @@ -3123,7 +3123,7 @@ module OneM2M_PermutationFunctions { if(match(int23, p_parentRequestPrimitive.resourceType)){ f_cse_preamble_subscriptionVerification(v_ae2Index, v_parentRequestPrimitive, int23, -); } - if(ischosen(p_parentRequestPrimitive.primitiveContent.group_)){ + if(ischosen(p_parentRequestPrimitive.primitiveContent.group_)) { f_cse_preamble_registerAe(); } v_parentIndex := f_cse_createResource(valueof(v_parentRequestPrimitive.resourceType), v_parentRequestPrimitive, v_parentIndex); @@ -3439,7 +3439,7 @@ module OneM2M_PermutationFunctions { f_cse_createAccessControlPolicyAux(-, -, int60);//c_UDNDi); } - v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[vc_acpIndex].resource)}, -); + v_aeIndex := f_cse_preamble_registerAe({f_getResourceAddress(vc_acpIndex)}, -); // Test Body if(p_resourceType != int18) { @@ -3921,11 +3921,20 @@ module OneM2M_PermutationFunctions { alt { [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { tc_ac.stop; - if(v_response.primitive.responsePrimitive.primitiveContent.container.currentByteSize == 8) { //Default content: "AnyValue" (8 bytes length) - setverdict(pass, __SCOPE__ & ": CurrentByteSize attribute in content resource is incremented successfully"); - } - else{ - setverdict(fail, __SCOPE__ & ": CurrentByteSize attribute in content resource not incremented successfully"); + if(p_parentResourceType == int3){ + if(v_response.primitive.responsePrimitive.primitiveContent.container.currentByteSize == 8) { //Default content: "AnyValue" (8 bytes length) + setverdict(pass, __SCOPE__ & ": CurrentByteSize attribute in content resource is incremented successfully"); + } + else{ + setverdict(fail, __SCOPE__ & ": CurrentByteSize attribute in content resource not incremented successfully"); + } + } else if(p_parentResourceType == int29){ + if(v_response.primitive.responsePrimitive.primitiveContent.timeSeries.currentByteSize == 8) { //Default content: "AnyValue" (8 bytes length) + setverdict(pass, __SCOPE__ & ": CurrentByteSize attribute in content resource is incremented successfully"); + } + else{ + setverdict(fail, __SCOPE__ & ": CurrentByteSize attribute in content resource not incremented successfully"); + } } } [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { @@ -4312,6 +4321,7 @@ module OneM2M_PermutationFunctions { var RequestPrimitive v_request; var integer v_parentIndex := -1; var integer v_resourceIndex := -1; + var integer v_originalResourceIndex := -1; var integer v_aEAnncIndex := -1; // Test control @@ -4326,6 +4336,27 @@ module OneM2M_PermutationFunctions { v_aEAnncIndex := f_cse_createResource_cseSimu(int10002, m_createAEAnnc(-, vc_cseSimuDesc.cseId, omit, -), vc_remoteCseIndex); //AEAnnnc under RemoteCSE + //Create original resource locally if resource type is an announced variant + if (p_resourceType == int10001) { + v_originalResourceIndex := f_generateAndSetLocalResource(m_primitiveContentAccessControlPolicy(m_contentCreateAcp), -, int1); + } else if(p_resourceType == int10002) { + v_originalResourceIndex := f_generateAndSetLocalResource(m_primitiveContentAe(m_contentCreateAe(omit, -, PX_TS_AE1.appId, omit)), -, int2); + } else if (p_resourceType == int10003) { + v_originalResourceIndex := f_generateAndSetLocalResource(m_primitiveContentContainer(m_contentCreateContainer), -, int3); + } else if (p_resourceType == int10004) { + v_originalResourceIndex := f_generateAndSetLocalResource(m_primitiveContentContentInstance(m_contentCreateContentInstance), -, int4); + } else if (p_resourceType == int10009) { + v_originalResourceIndex := f_generateAndSetLocalResource(m_primitiveContentGroup(m_contentCreateGroup(1, {"NotInitialized"}, omit, -, -, -, -, -)), -, int9); + } else if (p_resourceType == int10029) { + v_originalResourceIndex := f_generateAndSetLocalResource(m_primitiveContentTimeSeries(m_contentCreateTimeSeries), -, int29); + } else if (p_resourceType == int10030) { + v_originalResourceIndex := f_generateAndSetLocalResource(m_primitiveContentTimeSeriesInstance(m_contentCreateTimeSeriesInstance), -, int30); + } + if(v_originalResourceIndex != -1) { + p_requestPrimitive.primitiveContent := f_setLink(valueof(p_requestPrimitive.primitiveContent), f_getLocalResourceAddress(v_originalResourceIndex, -, e_spRelative)); + p_requestPrimitive.primitiveContent := f_setExpirationTime(valueof(p_requestPrimitive.primitiveContent), vc_localResourcesList[v_originalResourceIndex].resource); + } + // Test Body v_request := f_getCreateRequestPrimitive(p_resourceType, p_requestPrimitive, v_aEAnncIndex); @@ -4398,6 +4429,12 @@ module OneM2M_PermutationFunctions { vc_cse1.start(f_cse_announcementProcedure_createHandler()); v_parentIndex := f_cse_createResource(int3, v_create, v_aeIndex); f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1); + } else if(p_resourceType == int30) { + v_create := m_createTimeSeriesBase; + v_create.primitiveContent.timeSeries.announceTo := {PX_TS_CSE1.cseId}; + vc_cse1.start(f_cse_announcementProcedure_createHandler()); + v_parentIndex := f_cse_createResource(int29, v_create, v_aeIndex); + f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1); } else if (p_resourceType != int18) { v_parentIndex := v_aeIndex; } @@ -4435,6 +4472,7 @@ module OneM2M_PermutationFunctions { vc_cse1.start(f_cse_registerRemoteCse(m_createRemoteCSE_poa(-, -, -, -, -, {f_getLocalPoA()}))); f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1); + vc_cse1.start(f_cse_announcementProcedure_createHandler(mw_createAEAnnc(-, -, -))); v_aeIndex := f_cse_createResource(int2,v_create); f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1); @@ -4445,6 +4483,12 @@ module OneM2M_PermutationFunctions { vc_cse1.start(f_cse_announcementProcedure_createHandler()); v_parentIndex := f_cse_createResource(int3, v_create, v_aeIndex); f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1); + } else if(p_resourceType == int30) { + v_create := m_createTimeSeriesBase; + v_create.primitiveContent.timeSeries.announceTo := {PX_TS_CSE1.cseId}; + vc_cse1.start(f_cse_announcementProcedure_createHandler()); + v_parentIndex := f_cse_createResource(int29, v_create, v_aeIndex); + f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1); } else if (p_resourceType != int18) { v_parentIndex := v_aeIndex; } @@ -4560,7 +4604,7 @@ module OneM2M_PermutationFunctions { // Preamble if(p_resourceType != int1) { f_cse_createAccessControlPolicyAux(-, -, int61);//c_CRUDNDi) - p_requestPrimitive := f_setAcpId(p_requestPrimitive, {f_getResourceId(vc_resourcesList[vc_acpIndex].resource)}); + p_requestPrimitive := f_setAcpId(p_requestPrimitive, {f_getResourceAddress(vc_acpIndex)}); } v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi; @@ -6211,7 +6255,7 @@ module OneM2M_PermutationFunctions { // Test control // Test component configuration - f_cf01Up(true); + f_cf02Up(-, true); // Test adapter configuration @@ -6291,8 +6335,8 @@ module OneM2M_PermutationFunctions { f_cse_preamble_subscriptionVerification(v_ae2Index, p_createRequestPrimitive, p_resourceType); if(p_resourceType != int1) { - p_createRequestPrimitive := f_setAcpId(p_createRequestPrimitive,{f_getResourceId(vc_resourcesList[vc_acpIndex].resource)});//c_CRDNDi); - } + p_createRequestPrimitive := f_setAcpId(p_createRequestPrimitive,{f_getResourceAddress(vc_acpIndex)});//c_CRDNDi); + } if(p_resourceType != int18) { v_parentIndex := v_aeIndex;//For resources that can have AE resource as parent } @@ -6646,9 +6690,10 @@ module OneM2M_PermutationFunctions { v_acp1Index := f_cse_createResource(int1, m_createAcp("MyAcp1"), vc_aeIndex); v_acp2Index := f_cse_createResource(int1, m_createAcp("MyAcp2"), vc_aeIndex); - p_createRequestPrimitive := f_setAcpId(p_createRequestPrimitive,{f_getResourceId(vc_resourcesList[v_acp1Index].resource)}); - p_updateRequestPrimitive := f_setAcpId(p_updateRequestPrimitive,{f_getResourceId(vc_resourcesList[v_acp2Index].resource)}); - + p_createRequestPrimitive := f_setAcpId(p_createRequestPrimitive,{f_getResourceAddress(v_acp1Index)}); + p_updateRequestPrimitive := f_setAcpId(p_updateRequestPrimitive,{f_getResourceAddress(v_acp2Index)}); + + infoPort.send(f_getResourceAddress(lengthof(vc_resourcesList)-1, e_nonHierarchical)) to mtc; } v_resourceIndex := f_cse_createResource(p_resourceType, p_createRequestPrimitive, vc_aeIndex); @@ -6840,7 +6885,7 @@ module OneM2M_PermutationFunctions { v_ae2Index := f_getResourceFromAeSimu(vc_ae2); if(ispresent(v_request.primitiveContent.group_.memberIDs)) { - v_request.primitiveContent.group_.memberIDs := {f_getResourceId(vc_resourcesList[v_ae2Index].resource)}; + v_request.primitiveContent.group_.memberIDs := {f_getResourceAddress(v_ae2Index)}; } } @@ -6908,17 +6953,24 @@ module OneM2M_PermutationFunctions { // Test adapter configuration // Register the CSE - f_cse_registerRemoteCse(m_createRemoteCSEBase); - + f_cse_registerRemoteCse(m_createRemoteCSE_poa(-, -, -, -, -, {f_getLocalPoA()})); + //Preamble vc_ae1.start(f_cse_createResource(int2,v_create)); f_cse_announcementProcedure_createHandler(mw_createAEAnnc(-, -, -)); f_cseSimu_checkComponentDoneAndGetVerdict(vc_ae1); - + v_aeIndex:= f_getLatestResourceIndex(vc_ae1); - if(p_resourceType != int18) { + if (p_resourceType == int30) { + v_create := m_createTimeSeriesBase; + v_create.primitiveContent.timeSeries.announceTo := {vc_cseSimuDesc.cseId}; + vc_ae1.start(f_cse_createResource(int29, v_create, v_aeIndex)); + f_cse_announcementProcedure_createHandler(); + f_cseSimu_checkComponentDoneAndGetVerdict(vc_ae1); + v_parentIndex:= f_getLatestResourceIndex(vc_ae1); + } else if(p_resourceType != int18) { v_parentIndex := v_aeIndex;//For resources that can have AE resource as parent } @@ -6977,7 +7029,7 @@ module OneM2M_PermutationFunctions { // Test adapter configuration // Register the CSE - f_cse_registerRemoteCse(m_createRemoteCSEBase); + f_cse_registerRemoteCse(m_createRemoteCSE_poa(-, -, -, -, -, {f_getLocalPoA()})); //Preamble @@ -6996,7 +7048,7 @@ module OneM2M_PermutationFunctions { f_cseSimu_checkComponentDoneAndGetVerdict(vc_ae1); v_latestResourceIndex := f_getLatestResourceIndex(vc_ae1); - p_updateRequestAnnc.to_ := f_getLocalResourceAddress(lengthof(vc_localResourcesList)-1); + //p_updateRequestAnnc.to_ := f_getLocalResourceAddress(lengthof(vc_localResourcesList)-1); // Test Body vc_ae1.start(f_cse_updateResource(p_resourceType, v_latestResourceIndex, p_requestUpdatePrimitive)); @@ -7007,10 +7059,8 @@ module OneM2M_PermutationFunctions { tc_ac.stop; setverdict(pass, __SCOPE__ & ":INFO: Announcement received"); - v_responsePrimitive := valueof(m_responsePrimitive(int2004,v_request.primitive.requestPrimitive.requestIdentifier)); - v_responsePrimitive.from_ := vc_cseSimuDesc.cseId; - v_responsePrimitive.to_ := v_request.primitive.requestPrimitive.from_; - f_send(e_mccPortIn, m_response(v_responsePrimitive)); + f_processUpdateRequestPrimitive(v_request.primitive.requestPrimitive, -, lengthof(vc_localResourcesList)-1); + f_send(e_mccPortIn, m_response(vc_response.primitive.responsePrimitive)); } [] tc_ac.timeout { setverdict(fail, __SCOPE__ & ":ERROR: No announcement received"); @@ -7328,6 +7378,7 @@ module OneM2M_PermutationFunctions { var integer v_containerIndex := -1; var integer v_resourceIndex := -1; var integer v_ae2Index := -1; + var integer v_timeSeriesIndex := -1; // Test control @@ -7344,6 +7395,9 @@ module OneM2M_PermutationFunctions { if(p_resourceType == int4) { v_containerIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex); v_parentIndex := v_containerIndex; + } else if(p_resourceType == int30) { + v_timeSeriesIndex := f_cse_createResource(int29, m_createTimeSeriesBase, v_aeIndex); + v_parentIndex := v_timeSeriesIndex; } else if(p_resourceType != int18) { v_parentIndex := v_aeIndex;//For resources that can have AE resource as parent } @@ -7427,7 +7481,7 @@ module OneM2M_PermutationFunctions { if(p_resourceType == int1) { p_createRequestPrimitive.primitiveContent.accessControlPolicy.selfPrivileges.accessControlRule_list := {m_createAcr({f_getResourceId(vc_resourcesList[v_aeIndex].resource)}, int55)}; } else { - p_createRequestPrimitive := f_setAcpId(p_createRequestPrimitive, {f_getResourceId(vc_resourcesList[vc_acpIndex].resource)}); + p_createRequestPrimitive := f_setAcpId(p_createRequestPrimitive, {f_getResourceAddress(vc_acpIndex)}); } //Creation of resource @@ -8216,8 +8270,8 @@ module OneM2M_PermutationFunctions { v_acpIndex := f_cse_createResource(int1, v_createAcp, 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_memberIDs := {f_getResourceAddress(v_containerIndex_1), f_getResourceAddress(v_containerIndex_2)}; + v_membersAcpIds := {f_getResourceAddress(v_acpIndex)}; v_groupIndex := f_cse_createResource(int9, m_createGroup(2, v_memberIDs, omit, int3, -, v_membersAcpIds, -), v_aeIndex); // AE child resource p_requestPrimitive.to_ := f_getResourceAddress(v_groupIndex) & "/fopt"; @@ -8291,8 +8345,8 @@ module OneM2M_PermutationFunctions { v_acpIndex := f_cse_createResource(int1, v_createAcp, 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_memberIDs := {f_getResourceAddress(v_containerIndex_1), f_getResourceAddress(v_containerIndex_2)}; + v_membersAcpIds := {f_getResourceAddress(v_acpIndex)}; v_groupIndex := f_cse_createResource(int9, m_createGroup(2, v_memberIDs, omit, int3, -, v_membersAcpIds), v_aeIndex); // AE child resource p_requestPrimitive.to_ := f_getResourceAddress(v_groupIndex) & "/fopt"; @@ -8356,9 +8410,12 @@ module OneM2M_PermutationFunctions { v_acpIndex := f_cse_createResource(int1, v_createAcp, 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_memberIDs := {f_getResourceAddress(v_containerIndex_1), f_getResourceAddress(v_containerIndex_2)}; + v_acpIds := {f_getResourceAddress(v_acpIndex)}; v_groupIndex := f_cse_createResource(int9, m_createGroup(2, v_memberIDs, v_acpIds, int3, -, -), v_aeIndex); // AE child resource + + p_requestPrimitive.to_ := f_getResourceAddress(v_groupIndex) & "/fopt"; + p_requestPrimitive.from_ := f_getOriginator(v_groupIndex); p_requestPrimitive.to_ := f_getResourceAddress(v_groupIndex) & "/fopt"; p_requestPrimitive.from_ := f_getOriginator(v_groupIndex); @@ -8431,8 +8488,8 @@ module OneM2M_PermutationFunctions { v_acpIndex := f_cse_createResource(int1, v_createAcp, 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_memberIDs := {f_getResourceAddress(v_containerIndex_1), f_getResourceAddress(v_containerIndex_2)}; + v_acpIDs := {f_getResourceAddress(v_acpIndex)}; v_groupIndex := f_cse_createResource(int9, m_createGroup(2, v_memberIDs, v_acpIDs, int3), v_aeIndex); // AE child resource p_requestPrimitive.to_ := f_getResourceAddress(v_groupIndex) & "/fopt"; @@ -8493,8 +8550,8 @@ module OneM2M_PermutationFunctions { // Preamble v_acpIndex := f_cse_createResource(int1, v_createAcp, -); // AE child resource - - v_acpIds := {f_getResourceId(vc_resourcesList[v_acpIndex].resource)}; + + v_acpIds := {f_getResourceAddress(v_acpIndex)}; v_aeIndex_1 := f_cse_preamble_registerAe(v_acpIds, -); //c_CRUDNDi @@ -8506,7 +8563,7 @@ module OneM2M_PermutationFunctions { v_aeIndex_2 := f_getLatestResource(vc_ae2); - v_memberIDs := {f_getResourceId(vc_resourcesList[v_aeIndex_1].resource), f_getResourceId(vc_resourcesList[v_aeIndex_2].resource)}; + v_memberIDs := {f_getResourceAddress(v_aeIndex_1), f_getResourceAddress(v_aeIndex_2)}; v_groupIndex := f_cse_createResource(int9, m_createGroup(2, v_memberIDs, omit, int2, -, v_acpIds), v_aeIndex_1); // AE child resource p_requestPrimitive.to_ := f_getResourceAddress(v_groupIndex) & "/fopt"; @@ -8585,7 +8642,7 @@ module OneM2M_PermutationFunctions { // Preamble v_acpIndex := f_cse_createResource(int1, v_createAcp, -); // AE child resource - v_acpIds := {f_getResourceId(vc_resourcesList[v_acpIndex].resource)}; + v_acpIds := {f_getResourceAddress(v_acpIndex)}; v_aeIndex_1 := f_cse_preamble_registerAe(v_acpIds, -); //c_CRUDNDi @@ -8605,9 +8662,10 @@ module OneM2M_PermutationFunctions { v_createContainerInAE2 := f_setAcpId(v_createContainerInAE2, v_acpIds); vc_ae2.start(f_cse_createResource(int3, v_createContainerInAE2, v_aeIndex_2)); f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2); - - v_memberIDs := {f_getResourceId(vc_resourcesList[v_aeIndex_1].resource), f_getResourceId(vc_resourcesList[v_ae2LocalIndex].resource)}; - //v_membersAcpIds := {f_getResourceId(vc_resourcesList[v_acpIndex].resource)}; + + + v_memberIDs := {f_getResourceAddress(v_aeIndex_1), f_getResourceAddress(v_ae2LocalIndex)}; + //v_membersAcpIds := {f_getResourceAddress(v_acpIndex)}; v_groupIndex := f_cse_createResource(int9, m_createGroup(2, v_memberIDs, omit, int2, -, v_acpIds, -), v_aeIndex_1); p_requestPrimitive.to_ := f_getResourceAddress(v_groupIndex) & "/" & c_resourceShortNameFanOutPoint & "/" & c_defaultContainerResourceName; @@ -11306,8 +11364,8 @@ module OneM2M_PermutationFunctions { // Preamble v_acpIndex := f_cse_createResource(int1, v_createRequest); // CSE child resource - v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[v_acpIndex].resource)}, -); - + v_aeIndex := f_cse_preamble_registerAe({f_getResourceAddress(v_acpIndex)}, -); + vc_ae2.start(f_cse_createResource(int2, m_createAe(PX_TS_AE2.appId, -, PX_TS_AE2.aeIdStem, c_defaultAe2ResourceName, -), -1)); // AE2 is registred f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2); @@ -11375,7 +11433,7 @@ module OneM2M_PermutationFunctions { v_acpIndex1 := f_cse_createResource(int1, m_createAcp("MyAcp1")); // CSE child resource v_acpIndex2 := f_cse_createResource(int1, m_createAcp("MyAcp2")); // CSE child resource - v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[v_acpIndex1].resource), f_getResourceId(vc_resourcesList[v_acpIndex2].resource)}, -); + v_aeIndex := f_cse_preamble_registerAe({f_getResourceAddress(v_acpIndex1), f_getResourceAddress(v_acpIndex2)}, -); v_accessControlRule_1 := valueof(m_createAcr({f_getOriginator(v_aeIndex)}, int3)); // c_CR v_setOfArcs.accessControlRule_list := {v_accessControlRule_1}; @@ -11440,8 +11498,8 @@ module OneM2M_PermutationFunctions { v_createRequest := valueof(m_createAcp( -, {"testDomain"}, -)); v_acpIndex := f_cse_createResource(int1, v_createRequest); // CSE child resource - v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[v_acpIndex].resource)}, -); - + v_aeIndex := f_cse_preamble_registerAe({f_getResourceAddress(v_acpIndex)}, -); + // Test Body p_requestPrimitive.to_ := f_getResourceAddress(v_aeIndex); p_requestPrimitive.from_ := "testDomain"; @@ -11514,7 +11572,7 @@ module OneM2M_PermutationFunctions { v_createRequest := f_getCreateRequestPrimitive(int1, m_createAcpBase, -1); v_acpIndex := f_cse_createResource(int1, v_createRequest); // CSE child resource - v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[v_acpIndex].resource)}, -); + v_aeIndex := f_cse_preamble_registerAe({f_getResourceAddress(v_acpIndex)}, -); vc_ae2.start(f_cse_createResource(int2, m_createAe(PX_TS_AE2.appId, -, PX_TS_AE2.aeIdStem, c_defaultAe2ResourceName, -), -1)); // AE2 is registred f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2); @@ -11576,7 +11634,7 @@ module OneM2M_PermutationFunctions { v_createRequest.primitiveContent.accessControlPolicy.privileges.accessControlRule_list := {v_accessControlRule}; vc_acpIndex := f_cse_createResource(int1, v_createRequest); // CSE child resource - v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[vc_acpIndex].resource)}, -); + v_aeIndex := f_cse_preamble_registerAe({f_getResourceAddress(vc_acpIndex)}, -); // Test Body p_requestPrimitive.to_ := f_getResourceAddress(v_aeIndex); @@ -11645,7 +11703,7 @@ module OneM2M_PermutationFunctions { v_createRequest.primitiveContent.accessControlPolicy.privileges.accessControlRule_list := {v_accessControlRule}; vc_acpIndex := f_cse_createResource(int1, v_createRequest); // CSE child resource - v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[vc_acpIndex].resource)}, -); + v_aeIndex := f_cse_preamble_registerAe({f_getResourceAddress(vc_acpIndex)}, -); // Test Body p_requestPrimitive.to_ := f_getResourceAddress(v_aeIndex); @@ -11707,7 +11765,7 @@ module OneM2M_PermutationFunctions { v_acpIndex := f_cse_createResource(int1, v_createRequest); // CSE child resource //TODO How to indicate the location of the Originator (AE1)? - v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[v_acpIndex].resource)}, -); + v_aeIndex := f_cse_preamble_registerAe({f_getResourceAddress(v_acpIndex)}, -); // Test Body p_requestPrimitive.to_ := f_getResourceAddress(v_aeIndex); @@ -11764,7 +11822,7 @@ module OneM2M_PermutationFunctions { v_acpIndex := f_cse_createResource(int1, v_createRequest); // CSE child resource //TODO How to indicate the location of the Originator (AE1)? - v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[v_acpIndex].resource)}, -); + v_aeIndex := f_cse_preamble_registerAe({f_getResourceAddress(v_acpIndex)}, -); // Test Body p_requestPrimitive.to_ := f_getResourceAddress(v_aeIndex); @@ -11819,8 +11877,8 @@ module OneM2M_PermutationFunctions { v_createRequest.primitiveContent.accessControlPolicy.privileges.accessControlRule_list := {v_accessControlRule}; vc_acpIndex := f_cse_createResource(int1, v_createRequest); // CSE child resource - v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[vc_acpIndex].resource)}, {f_getLocalPoA(vc_aeSimuDesc.mcaPortIn)}); - + v_aeIndex := f_cse_preamble_registerAe({f_getResourceAddress(vc_acpIndex)}, {f_getLocalPoA(vc_aeSimuDesc.mcaPortIn)}); + // Test Body p_requestPrimitive.to_ := f_getResourceAddress(v_aeIndex); p_requestPrimitive.from_ := f_getOriginator(v_aeIndex); @@ -11879,7 +11937,7 @@ module OneM2M_PermutationFunctions { v_createRequest.primitiveContent.accessControlPolicy.privileges.accessControlRule_list := {v_accessControlRule}; vc_acpIndex := f_cse_createResource(int1, v_createRequest); // CSE child resource - v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[vc_acpIndex].resource)}, {f_getLocalPoA(vc_aeSimuDesc.mcaPortIn)}); + v_aeIndex := f_cse_preamble_registerAe({f_getResourceAddress(vc_acpIndex)}, {f_getLocalPoA(vc_aeSimuDesc.mcaPortIn)}); // Test Body p_requestPrimitive.to_ := f_getResourceAddress(v_aeIndex); @@ -11990,7 +12048,7 @@ module OneM2M_PermutationFunctions { // Preamble v_acpIndex := f_cse_createResource(int1, v_createRequest); // CSE child resource - v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[v_acpIndex].resource)}, -); + v_aeIndex := f_cse_preamble_registerAe({f_getResourceAddress(v_acpIndex)}, -); v_containerIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex); v_accessControlRule_1 := valueof(m_createAcr({PX_SUPER_AE_ID}, int63)); @@ -12035,136 +12093,152 @@ module OneM2M_PermutationFunctions { } //end f_CSE_SEC_ACP_012 - function f_CSE_SEC_ACP_015(template RequestPrimitive p_request, in ResponseStatusCode p_responseStatusCode) runs on AeSimu system CseSystem { - // Local variables - var integer v_aeIndex := -1; - var integer v_acpIndex := -1; - var integer v_groupIndex := -1; - var XSD.AnyURI v_ae2ResourceAddress; - var template RequestPrimitive v_groupRequest := m_createGroup(1, -, omit, int2, -, -, -); - var template RequestPrimitive v_createRequest := valueof(m_createAcpBase); + function f_CSE_SEC_ACP_015(template RequestPrimitive p_request, in ResponseStatusCode p_responseStatusCode) runs on AeSimu system CseSystem { + // Local variables + var integer v_aeIndex := -1; + var integer v_ae2Index := -1; + var integer v_acpIndex := -1; + var integer v_groupIndex := -1; + var XSD.AnyURI v_ae2ResourceAddress; + var template RequestPrimitive v_groupRequest := m_createGroup(1, -, omit, int2, -, -, -); + var template RequestPrimitive v_createRequest := valueof(m_createAcpBase); + var template RequestPrimitive v_updateRequest := m_updateAeBase; - // Test control + // Test control - // Test component configuration - f_cf01Up(true); + // Test component configuration + f_cf01Up(true); - // Test adapter configuration + // Test adapter configuration - // Preamble - v_aeIndex := f_cse_preamble_registerAe(-, -); + // Preamble + v_aeIndex := f_cse_preamble_registerAe(-, -); + + vc_ae2.start(f_cse_createResource(int2, m_createAe(PX_TS_AE2.appId, -, PX_TS_AE2.aeIdStem, c_defaultAe2ResourceName, omit), -1)); // AE2 is registred + f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2); - v_groupRequest.primitiveContent.group_.memberIDs := {f_getResourceId(vc_resourcesList[v_aeIndex].resource)}; + v_ae2ResourceAddress := f_getLatestResourceAddress(vc_ae2, e_nonHierarchical, e_cseRelative); + v_ae2Index := f_getLatestResourceIndex(vc_ae2); - v_groupIndex := f_cse_createResource(int9, v_groupRequest, -); + v_groupRequest.primitiveContent.group_.memberIDs := {f_getResourceAddress(v_aeIndex)}; - v_createRequest := m_createAcp(-, {f_getResourceId(vc_resourcesList[v_groupIndex].resource)} , -); + v_groupIndex := f_cse_createResource(int9, v_groupRequest, -); - v_acpIndex := f_cse_createResource(int1, v_createRequest, -); + v_createRequest := m_createAcp(-, {v_ae2ResourceAddress, f_getResourceAddress(v_groupIndex, e_nonHierarchical, e_cseRelative)} , -); - vc_ae2.start(f_cse_createResource(int2, m_createAe(PX_TS_AE2.appId, {f_getResourceId(vc_resourcesList[v_acpIndex].resource)}, PX_TS_AE2.aeIdStem, c_defaultAe2ResourceName, omit), -1)); // AE2 is registred - f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2); + v_acpIndex := f_cse_createResource(int1, v_createRequest, -); - v_ae2ResourceAddress := f_getLatestResourceAddress(vc_ae2); - - // Test Body - p_request.to_ := v_ae2ResourceAddress; - p_request.from_ := f_getOriginator(v_aeIndex); - - f_send(e_mcaPort, m_request(valueof(p_request))); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(p_responseStatusCode))) -> value vc_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Successful operation on AE"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value vc_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value vc_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error while operation on resource AE"); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while executing operation on resource AE"); + v_updateRequest.primitiveContent.aE.accessControlPolicyIDs := {f_getResourceAddress(v_acpIndex)}; + vc_ae2.start(f_cse_updateResource(int2, v_ae2Index, v_updateRequest)); // AE2 is updated + f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2); + + // Test Body + p_request.to_ := v_ae2ResourceAddress; + p_request.from_ := f_getOriginator(v_aeIndex); + + f_send(e_mcaPort, m_request(valueof(p_request))); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(p_responseStatusCode))) -> value vc_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Successful operation on AE"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value vc_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value vc_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while operation on resource AE"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while executing operation on resource AE"); + } } - } - //Postamble - f_cse_postamble_deleteResources(); + //Postamble + f_cse_postamble_deleteResources(); - //Tear down - f_cf01Down(); + //Tear down + f_cf01Down(); - } //end f_CSE_SEC_ACP_015 + } //end f_CSE_SEC_ACP_015 - function f_CSE_SEC_ACP_016(template RequestPrimitive p_request) runs on AeSimu system CseSystem { - // Local variables - var integer v_aeIndex := -1; - var integer v_ae3Index := -1; - var integer v_acpIndex := -1; - var integer v_groupIndex := -1; - var XSD.AnyURI v_ae2ResourceAddress; - var template RequestPrimitive v_groupRequest := m_createGroup(1, -, omit, int2, -, -, -); - var template RequestPrimitive v_createRequest := valueof(m_createAcpBase); + function f_CSE_SEC_ACP_016(template RequestPrimitive p_request) runs on AeSimu system CseSystem { + // Local variables + var integer v_aeIndex := -1; + var integer v_ae2Index := -1; + var integer v_ae3Index := -1; + var integer v_acpIndex := -1; + var integer v_groupIndex := -1; + var XSD.AnyURI v_ae2ResourceAddress; + var template RequestPrimitive v_groupRequest := m_createGroup(1, -, omit, int2, -, -, -); + var template RequestPrimitive v_createRequest := valueof(m_createAcpBase); + var template RequestPrimitive v_updateRequest := m_updateAeBase; - // Test control + // Test control - // Test component configuration - f_cf01Up(true); + // Test component configuration + f_cf01Up(true); - // Test adapter configuration + // Test adapter configuration - // Preamble - v_aeIndex := f_cse_preamble_registerAe(-, -); + // Preamble + v_aeIndex := f_cse_preamble_registerAe(-, -); - v_ae3Index := f_cse_createResource(int2, m_createAe("NMyApp3Id", -, "", "MyAe3", omit), -1); // AE3 is registred + v_ae3Index := f_cse_createResource(int2, m_createAe("NMyApp3Id", -, "", "MyAe3", omit), -1); // AE3 is registred - v_groupRequest.primitiveContent.group_.memberIDs := {f_getResourceId(vc_resourcesList[v_ae3Index].resource)}; + v_groupRequest.primitiveContent.group_.memberIDs := {f_getResourceId(vc_resourcesList[v_ae3Index].resource)}; - v_groupIndex := f_cse_createResource(int9, v_groupRequest, -); + v_groupIndex := f_cse_createResource(int9, v_groupRequest, -); - v_createRequest := m_createAcp(-, {f_getResourceId(vc_resourcesList[v_groupIndex].resource)} , -); - v_acpIndex := f_cse_createResource(int1, v_createRequest, -); + vc_ae2.start(f_cse_createResource(int2, m_createAe(PX_TS_AE2.appId, -, PX_TS_AE2.aeIdStem, c_defaultAe2ResourceName, omit), -1)); // AE2 is registred + f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2); + + v_ae2ResourceAddress := f_getLatestResourceAddress(vc_ae2, e_nonHierarchical, e_cseRelative); + v_ae2Index := f_getLatestResourceIndex(vc_ae2); - vc_ae2.start(f_cse_createResource(int2, m_createAe(PX_TS_AE2.appId, {f_getResourceId(vc_resourcesList[v_acpIndex].resource)}, PX_TS_AE2.aeIdStem, c_defaultAe2ResourceName, omit), -1)); // AE2 is registred - f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2); + v_createRequest := m_createAcp(-, {v_ae2ResourceAddress, f_getResourceAddress(v_groupIndex, e_nonHierarchical, e_cseRelative)} , -); + + v_acpIndex := f_cse_createResource(int1, v_createRequest, -); + + v_updateRequest.primitiveContent.aE.accessControlPolicyIDs := {f_getResourceAddress(v_acpIndex)}; + vc_ae2.start(f_cse_updateResource(int2, v_ae2Index, v_updateRequest)); // AE2 is updated + f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2); - v_ae2ResourceAddress := f_getLatestResourceAddress(vc_ae2); - - // Test Body - p_request.to_ := v_ae2ResourceAddress; - p_request.from_ := f_getOriginator(v_aeIndex); - f_send(e_mcaPort, m_request(valueof(p_request))); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int4103))) -> value vc_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Operation denied because of lack of right on AE"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value vc_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value vc_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error, successful operation response when having no privilege on AE"); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while executing operation on resource AE"); + // Test Body + p_request.to_ := v_ae2ResourceAddress; + p_request.from_ := f_getOriginator(v_aeIndex); + + f_send(e_mcaPort, m_request(valueof(p_request))); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int4103))) -> value vc_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Operation denied because of lack of right on AE"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value vc_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value vc_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error, successful operation response when having no privilege on AE"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while executing operation on resource AE"); + } } - } - //Postamble - f_cse_postamble_deleteResources(); + //Postamble + f_cse_postamble_deleteResources(); - //Tear down - f_cf01Down(); + //Tear down + f_cf01Down(); - } //end f_CSE_SEC_ACP_016 + } //end f_CSE_SEC_ACP_016 function f_CSE_SEC_ACP_017(template RequestPrimitive p_requestPrimitive, in ResponseStatusCode p_responseStatusCode) runs on AeSimu system CseSystem { // Local variables @@ -12407,32 +12481,13 @@ module OneM2M_PermutationFunctions { //Update of the resource so that it gets announced vc_ae1.start(f_cse_updateResource(p_resourceType, v_resourceIndex, p_updateRequest, -)); - //IUT should first create CSEBaseAnnc at the announcement target, and then, IUT announces the resource on the remoteCSEAnnc resource + //IUT should first create CSEBaseAnnc at the announcement target, and then, IUT announces the resource on the CSEBaseAnnc resource //p_createRequestAnnc.to_ := PX_TS_CSE1.cseId; vc_cse2.start(f_cse_announcementProcedure_createHandler(p_createRequestAnnc)); tc_ac.start; alt { - [] mccPortIn.receive(mw_request(mw_createAnnc(-, PX_TS_CSE2.cseId))) -> value vc_request { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ":INFO: Expected Announcement received"); - - mccPortInternal.send(vc_request.primitive.requestPrimitive); - alt { - []mccPortInternal.receive(mw_responsePrimitive(?)) -> value v_response { - } - } - f_send(e_mccPortIn, m_response(v_response)); - - //Retrieve the CSEBaseAnnc resource index - if(v_response.responseStatusCode == int2001) { - tc_ac.start; - repeat; - } else { - setverdict(fail, __SCOPE__ & ":ERROR: CSEBaseAnnc not created"); - } - } - [] mccPortIn.receive(mw_request(mw_createAnnc)) -> value vc_request { + [] mccPortIn.receive(mw_request(p_createRequestAnnc)) -> value vc_request { tc_ac.stop; setverdict(pass, __SCOPE__ & ":INFO: Announcement received"); if(f_getTargetCseId(vc_request.primitive.requestPrimitive.to_) == PX_TS_CSE2.cseId) { @@ -12452,6 +12507,25 @@ module OneM2M_PermutationFunctions { setverdict(fail, __SCOPE__ & ":ERROR: Wrong target resource address"); } } + [] mccPortIn.receive(mw_request(mw_createAnnc(-, pattern "{PX_TS_CSE2.cseId}*"))) -> value vc_request { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ":INFO: Expected Announcement received"); + + mccPortInternal.send(vc_request.primitive.requestPrimitive); + alt { + []mccPortInternal.receive(mw_responsePrimitive(?)) -> value v_response { + } + } + f_send(e_mccPortIn, m_response(v_response)); + + //Retrieve the CSEBaseAnnc resource index + if(v_response.responseStatusCode == int2001) { + tc_ac.start; + repeat; + } else { + setverdict(fail, __SCOPE__ & ":ERROR: CSEBaseAnnc not created"); + } + } [] tc_ac.timeout { setverdict(fail, __SCOPE__ & ":ERROR: No announcement received"); } @@ -12715,26 +12789,7 @@ module OneM2M_PermutationFunctions { tc_ac.start; alt { - [] mccPortIn.receive(mw_request(mw_createAnnc(-, PX_TS_CSE2.cseId))) -> value vc_request { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ":INFO: Expected Announcement received"); - - mccPortInternal.send(vc_request.primitive.requestPrimitive); - alt { - []mccPortInternal.receive(mw_responsePrimitive(?)) -> value v_response { - } - } - f_send(e_mccPortIn, m_response(v_response)); - - //Retrieve the CSEBaseAnnc resource index - if(v_response.responseStatusCode == int2001) { - tc_ac.start; - repeat; - } else { - setverdict(fail, __SCOPE__ & ":ERROR: CSEBaseAnnc not created"); - } - } - [] mccPortIn.receive(mw_request(mw_createAnnc)) -> value vc_request { + [] mccPortIn.receive(mw_request(p_createRequestAnnc)) -> value vc_request { tc_ac.stop; setverdict(pass, __SCOPE__ & ":INFO: Announcement received"); if(f_getTargetCseId(vc_request.primitive.requestPrimitive.to_) == PX_TS_CSE2.cseId) { @@ -12755,6 +12810,25 @@ module OneM2M_PermutationFunctions { setverdict(fail, __SCOPE__ & ":ERROR: Wrong target resource address"); } } + [] mccPortIn.receive(mw_request(mw_createAnnc(-, pattern "{PX_TS_CSE2.cseId}*"))) -> value vc_request { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ":INFO: Expected Announcement received"); + + mccPortInternal.send(vc_request.primitive.requestPrimitive); + alt { + []mccPortInternal.receive(mw_responsePrimitive(?)) -> value v_response { + } + } + f_send(e_mccPortIn, m_response(v_response)); + + //Retrieve the CSEBaseAnnc resource index + if(v_response.responseStatusCode == int2001) { + tc_ac.start; + repeat; + } else { + setverdict(fail, __SCOPE__ & ":ERROR: CSEBaseAnnc not created"); + } + } [] tc_ac.timeout { setverdict(fail, __SCOPE__ & ":ERROR: No announcement received"); } @@ -13045,6 +13119,10 @@ module OneM2M_PermutationFunctions { tc_ac.stop; setverdict(fail, __SCOPE__, ": Wrong response status code"); } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value vc_response { + tc_ac.stop; + setverdict(fail, __SCOPE__, ": RETRIEVE of original resource failed"); + } [] tc_ac.timeout { setverdict(fail, __SCOPE__, ": No answer while retrieving resource type " & int2str(enum2int(p_resourceType))); } @@ -13065,7 +13143,7 @@ module OneM2M_PermutationFunctions { group Update{ - function f_CSE_ANNC_UPD_001(ResourceType p_resourceType, template RequestPrimitive p_requestCreatePrimitive, template RequestPrimitive p_createRequestAnnc, template RequestPrimitive p_requestUpdatePrimitive) runs on CseSimu system CseSystem { + function f_CSE_ANNC_UPD_001(ResourceType p_resourceType, template RequestPrimitive p_requestCreatePrimitive, template RequestPrimitive p_createRequestAnnc, template RequestPrimitive p_requestUpdatePrimitive) runs on CseSimu system CseSystem { // Local variables var integer v_aEAnncIndex := -1; var integer v_aeIndex := -1; @@ -13573,6 +13651,10 @@ module OneM2M_PermutationFunctions { tc_ac.stop; setverdict(fail, __SCOPE__ & ": Error while updating container resource"); } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value vc_response { + tc_ac.stop; + setverdict(fail, __SCOPE__, ": RETRIEVE of original resource failed"); + } [] tc_ac.timeout { setverdict(fail, __SCOPE__ & ": No answer while updating resource"); } @@ -14128,9 +14210,9 @@ module OneM2M_PermutationFunctions { // Preamble f_cse_createAccessControlPolicyAux(-, -, int63);//c_CUDNDi) - v_aeIndex1 := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[vc_acpIndex].resource)}, -);//c_CRDNDi); + v_aeIndex1 := f_cse_preamble_registerAe({f_getResourceAddress(vc_acpIndex)}, -);//c_CRDNDi); - vc_ae2.start(f_cse_createResource(int2, m_createAe(PX_TS_AE2.appId, {f_getResourceId(vc_resourcesList[vc_acpIndex].resource)}, PX_TS_AE2.aeIdStem, c_defaultAe2ResourceName, -), -1)); // AE2 is registred + vc_ae2.start(f_cse_createResource(int2, m_createAe(PX_TS_AE2.appId, {f_getResourceAddress(vc_acpIndex)}, PX_TS_AE2.aeIdStem, c_defaultAe2ResourceName, -), -1)); // AE2 is registred f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2); v_aeIndex2 := f_getResourceFromAeSimu(vc_ae2); @@ -14915,7 +14997,6 @@ module OneM2M_PermutationFunctions { v_aeIndex := f_cse_preamble_registerAe(-, {f_getLocalPoA(vc_aeSimuDesc.mcaPortIn, "")});//c_CRUDNDi); f_checkAeSimuStatus(); - vc_ae2.start(f_cse_createAccessControlPolicyAux("PermissionForNotificationAcp",{"all"}, int63)); // Permissions for NOTIFY f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2); @@ -15490,10 +15571,6 @@ module OneM2M_PermutationFunctions { tc_ac.stop; setverdict(pass, __SCOPE__ & ": Resource" & int2str(enum2int(p_resourceType)) & " deleted successfully"); } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code"); - } [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { tc_ac.stop; setverdict(fail, __SCOPE__ & ": Error while deleting resource type " & int2str(enum2int(p_resourceType))); diff --git a/OneM2M_TestControl_IN_profile.ttcn b/OneM2M_TestControl_IN_profile.ttcn index 1a13f507dd5021111af069bd2ae627b7c6a7ab38..d5253ade5d4c5a53b5aa634ac5e1adb6d149a3ee 100644 --- a/OneM2M_TestControl_IN_profile.ttcn +++ b/OneM2M_TestControl_IN_profile.ttcn @@ -281,18 +281,15 @@ module OneM2M_TestControl_IN_profile { if(PICS_CNT_CR) {execute (TC_CSE_DMR_CRE_012_CNT_CR());} if(true) {execute (TC_CSE_DMR_CRE_005_MNI());} - if(true) {execute (TC_CSE_DMR_CRE_006_MNI());} if(PICS_CNT_MNI) {execute (TC_CSE_DMR_CRE_012_CNT_MNI());} if(PICS_CNT_MNI) {execute (TC_CSE_DMR_UPD_014_CNT_MNI());} if(PICS_CNT_MNI) {execute (TC_CSE_DMR_UPD_015_CNT_MNI());} if(true) {execute (TC_CSE_DMR_CRE_005_MBS());} - if(true) {execute (TC_CSE_DMR_CRE_006_MBS());} if(PICS_CNT_MBS) {execute (TC_CSE_DMR_CRE_012_CNT_MBS());} if(true) {execute (TC_CSE_DMR_CRE_013_CNT_CIN());} if(PICS_CNT_MBS) {execute (TC_CSE_DMR_UPD_014_CNT_MBS());} if(PICS_CNT_MBS) {execute (TC_CSE_DMR_UPD_015_CNT_MBS());} if(true) {execute (TC_CSE_DMR_CRE_005_MIA());} - if(true) {execute (TC_CSE_DMR_CRE_006_MIA());} if(PICS_CNT_MIA) {execute (TC_CSE_DMR_CRE_012_CNT_MIA());} if(PICS_CNT_MIA) {execute (TC_CSE_DMR_UPD_014_CNT_MIA());} if(PICS_CNT_MIA) {execute (TC_CSE_DMR_UPD_015_CNT_MIA());} diff --git a/OneM2M_TestControl_MN_profile.ttcn b/OneM2M_TestControl_MN_profile.ttcn index c52650d65cb86a48b4ae674d6832f82513bdd203..5088230865bd9cbb6bca14fce9acbe328d3234d5 100644 --- a/OneM2M_TestControl_MN_profile.ttcn +++ b/OneM2M_TestControl_MN_profile.ttcn @@ -295,18 +295,15 @@ module OneM2M_TestControl_MN_profile { if(PICS_CNT_CR) {execute (TC_CSE_DMR_CRE_012_CNT_CR());} if(true) {execute (TC_CSE_DMR_CRE_005_MNI());} - if(true) {execute (TC_CSE_DMR_CRE_006_MNI());} if(PICS_CNT_MNI) {execute (TC_CSE_DMR_CRE_012_CNT_MNI());} if(PICS_CNT_MNI) {execute (TC_CSE_DMR_UPD_014_CNT_MNI());} if(PICS_CNT_MNI) {execute (TC_CSE_DMR_UPD_015_CNT_MNI());} if(true) {execute (TC_CSE_DMR_CRE_005_MBS());} - if(true) {execute (TC_CSE_DMR_CRE_006_MBS());} if(PICS_CNT_MBS) {execute (TC_CSE_DMR_CRE_012_CNT_MBS());} if(true) {execute (TC_CSE_DMR_CRE_013_CNT_CIN());} if(PICS_CNT_MBS) {execute (TC_CSE_DMR_UPD_014_CNT_MBS());} if(PICS_CNT_MBS) {execute (TC_CSE_DMR_UPD_015_CNT_MBS());} if(true) {execute (TC_CSE_DMR_CRE_005_MIA());} - if(true) {execute (TC_CSE_DMR_CRE_006_MIA());} if(PICS_CNT_MIA) {execute (TC_CSE_DMR_CRE_012_CNT_MIA());} if(PICS_CNT_MIA) {execute (TC_CSE_DMR_UPD_014_CNT_MIA());} if(PICS_CNT_MIA) {execute (TC_CSE_DMR_UPD_015_CNT_MIA());} diff --git a/OneM2M_Testcases_CSE_Release_1.ttcn b/OneM2M_Testcases_CSE_Release_1.ttcn index a1a152fce4ea0da1cfcb81c882d2cc827b613c22..b24eb16e9ddd93068b4ec09a11e5c1d2f3fe4f70 100644 --- a/OneM2M_Testcases_CSE_Release_1.ttcn +++ b/OneM2M_Testcases_CSE_Release_1.ttcn @@ -4168,71 +4168,6 @@ module OneM2M_Testcases_CSE_Release_1 { }// end group g_CSE_DMR_CRE_005 - group g_CSE_DMR_CRE_006 { - - /** - * @desc Check that the IUT returns a default value to RW ATTRIBUTE in the response of a <container> CREATE Request where no a RW ATTRIBUTE is provided by AE - * - */ - testcase TC_CSE_DMR_CRE_006_MNI() runs on Tester system CseSystem { - // Local variables - var verdicttype v_verdict; - var template RequestPrimitive v_createRequest := m_createContainerBase; - var ResponsePrimitive v_responsePrimitive; - var AeSimu v_ae1 := AeSimu.create("AE1") alive; - - v_ae1.start(f_CSE_DMR_CRE_006(int3, v_createRequest)); - v_ae1.done -> value v_verdict; - - - - if(v_verdict == pass){ v_responsePrimitive := f_getResponsePrimitive(v_ae1); - if(not ispresent(v_responsePrimitive.primitiveContent.container.maxNrOfInstances)){ - setverdict(fail, __SCOPE__ & ": Error, maxNrOfInstances attribute not provided"); - } - } - } - - testcase TC_CSE_DMR_CRE_006_MBS() runs on Tester system CseSystem { - // Local variables - var verdicttype v_verdict; - var template RequestPrimitive v_createRequest := m_createContainerBase; - var ResponsePrimitive v_responsePrimitive; - var AeSimu v_ae1 := AeSimu.create("AE1") alive; - - v_ae1.start(f_CSE_DMR_CRE_006(int3, v_createRequest)); - v_ae1.done -> value v_verdict; - - - - if(v_verdict == pass){ v_responsePrimitive := f_getResponsePrimitive(v_ae1); - if(not ispresent(v_responsePrimitive.primitiveContent.container.maxByteSize)){ - setverdict(fail, __SCOPE__ & ": Error, maxByteSize attribute not provided"); - } - } - - } - - testcase TC_CSE_DMR_CRE_006_MIA() runs on Tester system CseSystem { - // Local variables - var verdicttype v_verdict; - var template RequestPrimitive v_createRequest := m_createContainerBase; - var ResponsePrimitive v_responsePrimitive; - var AeSimu v_ae1 := AeSimu.create("AE1") alive; - - v_ae1.start(f_CSE_DMR_CRE_006(int3, v_createRequest)); - v_ae1.done -> value v_verdict; - - - - if(v_verdict == pass){ v_responsePrimitive := f_getResponsePrimitive(v_ae1); - if(not ispresent(v_responsePrimitive.primitiveContent.container.maxInstanceAge)){ - setverdict(fail, __SCOPE__ & ": Error, maxInstanceAge attribute not provided"); - } - } - } - - }// end group g_CSE_DMR_CRE_006 group g_CSE_DMR_CRE_007 { @@ -8367,7 +8302,7 @@ module OneM2M_Testcases_CSE_Release_1 { // Preamble f_cse_createAccessControlPolicyAux(-, -, int61);//c_CUDNDi) - v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[vc_acpIndex].resource)}, -);//c_CRDNDi); + v_aeIndex := f_cse_preamble_registerAe({f_getResourceAddress(vc_acpIndex)}, -);//c_CRDNDi); v_request := f_getCreateRequestPrimitive(int23, v_createRequest, v_aeIndex);//Subscription @@ -9179,7 +9114,7 @@ module OneM2M_Testcases_CSE_Release_1 { v_acpIndex2 := f_cse_createResource(int1, v_createRequestAcp2); // CSE child resource - v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[v_acpIndex1].resource)}, -); + v_aeIndex := f_cse_preamble_registerAe({f_getResourceAddress(v_acpIndex1)}, -); v_accessControlRule_1 := valueof(m_createAcr({f_getOriginator(v_aeIndex)}, int59)); // c_CRDNDi v_accessControlRule_2 := valueof(m_createAcr({PX_SUPER_AE_ID, f_getOriginator(v_aeIndex)}, int63)); // c_CRUDNDi @@ -9190,7 +9125,7 @@ module OneM2M_Testcases_CSE_Release_1 { // Test Body v_updateRequest := valueof(m_updateAeBase); - v_updateRequest.primitiveContent.aE.accessControlPolicyIDs := {f_getResourceId(vc_resourcesList[v_acpIndex2].resource)}; + v_updateRequest.primitiveContent.aE.accessControlPolicyIDs := {f_getResourceAddress(v_acpIndex2)}; v_updateRequest := f_getUpdateRequestPrimitive(int1, v_aeIndex, v_updateRequest); f_send(e_mcaPort, m_request(v_updateRequest)); @@ -9216,7 +9151,7 @@ module OneM2M_Testcases_CSE_Release_1 { v_primitiveContentRetrievedResource := f_cse_retrieveResource(v_aeIndex); if(getverdict == pass){ if(ischosen(v_primitiveContentRetrievedResource.aE)) { - if(not match (f_resourceIdCleaner(v_primitiveContentRetrievedResource.aE.accessControlPolicyIDs[0]), v_updateRequest.primitiveContent.aE.accessControlPolicyIDs[0])){ + if(not f_compareURIs(v_acpIndex2, v_primitiveContentRetrievedResource.aE.accessControlPolicyIDs[0])){ setverdict(fail, __SCOPE__ & ": Error: Access Control policy ID attribute not updated correctly"); } } @@ -9271,7 +9206,7 @@ module OneM2M_Testcases_CSE_Release_1 { v_acpIndex2 := f_cse_createResource(int1, v_createRequestAcp2); // CSE child resource - v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[v_acpIndex1].resource)}, -); + v_aeIndex := f_cse_preamble_registerAe({f_getResourceAddress(v_acpIndex1)}, -); v_accessControlRule_1 := valueof(m_createAcr({f_getOriginator(v_aeIndex)}, int63)); // c_CRDNDi v_accessControlRule_2 := valueof(m_createAcr({PX_SUPER_AE_ID, f_getOriginator(v_aeIndex)}, int59)); // c_CRUDNDi @@ -9282,7 +9217,7 @@ module OneM2M_Testcases_CSE_Release_1 { // Test Body v_updateRequest := valueof(m_updateAeBase); - v_updateRequest.primitiveContent.aE.accessControlPolicyIDs := {f_getResourceId(vc_resourcesList[v_acpIndex2].resource)}; + v_updateRequest.primitiveContent.aE.accessControlPolicyIDs := {f_getResourceAddress(v_acpIndex2)}; v_updateRequest := f_getUpdateRequestPrimitive(int1, v_aeIndex, v_updateRequest); f_send(e_mcaPort, m_request(v_updateRequest)); @@ -10132,7 +10067,7 @@ module OneM2M_Testcases_CSE_Release_1 { v_resourceIndex := f_cse_createResource(c_containerResourceType, v_requestPrimitive, v_aeIndex); - v_requestPrimitive := f_setAcpId(v_requestPrimitive, {f_getResourceId(vc_resourcesList[vc_acpIndex].resource)}); + v_requestPrimitive := f_setAcpId(v_requestPrimitive, {f_getResourceAddress(vc_acpIndex)}); v_childResourceIndex := f_cse_createResource(c_containerResourceType, v_requestPrimitive, v_resourceIndex); v_request := valueof(m_retrieveFilterUsageOption(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_resourceIndex), int1)); @@ -10409,12 +10344,12 @@ module OneM2M_Testcases_CSE_Release_1 { // Preamble f_cse_createAccessControlPolicyAux(-, -);//c_CRUDNDi) - //v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[vc_acpIndex].resource)}); + //v_aeIndex := f_cse_preamble_registerAe({f_getResourceAddress(vc_acpIndex)}); v_aeIndex := f_cse_preamble_registerAe(); f_cse_updateAcpAuxResource(int31); //Not include DISCOVERY permission - v_createRequest.primitiveContent.container.accessControlPolicyIDs := {f_getResourceId(vc_resourcesList[vc_acpIndex].resource)}; + v_createRequest.primitiveContent.container.accessControlPolicyIDs := {f_getResourceAddress(vc_acpIndex)}; v_createRequest.primitiveContent.container.labels := v_labels; v_resourceIndex := f_cse_createResource(c_containerResourceType, v_createRequest, v_aeIndex); @@ -10645,7 +10580,7 @@ module OneM2M_Testcases_CSE_Release_1 { v_containerIndex_1 := f_cse_createResource(int3, v_createContainerRequest_1, v_aeIndex); // AE child resource v_containerIndex_2 := f_cse_createResource(int3, v_createContainerRequest_2, v_aeIndex); // AE child resource - v_memberIDs := {f_getResourceId(vc_resourcesList[v_containerIndex_1].resource), f_getResourceId(vc_resourcesList[v_containerIndex_2].resource)}; + v_memberIDs := {f_getResourceAddress(v_containerIndex_1), f_getResourceAddress(v_containerIndex_2)}; v_createRequest := valueof(m_createGroup(c_maxNrOfMembers, v_memberIDs, omit, int3)); @@ -10821,7 +10756,7 @@ module OneM2M_Testcases_CSE_Release_1 { // Preamble v_aeIndex := f_cse_preamble_registerAe(); //c_CRUDNDi. v_containerIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex); // AE child resource - v_memberID := f_getResourceId(vc_resourcesList[v_containerIndex].resource); + v_memberID := f_getResourceAddress(v_containerIndex); v_createRequest := valueof(m_createGroup(2, {v_memberID, v_memberID}, omit, int3)); v_createRequest := f_getCreateRequestPrimitive(int9, v_createRequest, v_aeIndex); @@ -10833,11 +10768,11 @@ module OneM2M_Testcases_CSE_Release_1 { tc_ac.stop; setverdict(pass, __SCOPE__ & ": Resource created successfully"); - if(not match({v_memberID}, v_response.primitive.responsePrimitive.primitiveContent.group_.memberIDs)){ - setverdict(fail, __SCOPE__ & ": Error, presence of duplicate member IDs "); - } if(lengthof(v_response.primitive.responsePrimitive.primitiveContent.group_.memberIDs) != 1) { setverdict(fail, __SCOPE__ & ": Error, wrong number of memberIDs attribute"); + } + if(not f_compareURIs(v_containerIndex, v_response.primitive.responsePrimitive.primitiveContent.group_.memberIDs[0])){ + setverdict(fail, __SCOPE__ & ": Error, presence of duplicate member IDs "); } } [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { @@ -10887,7 +10822,7 @@ module OneM2M_Testcases_CSE_Release_1 { // Preamble v_aeIndex := f_cse_preamble_registerAe(); //c_CRUDNDi v_containerIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex); // AE child resource - v_createRequest := valueof(m_createGroup(2, {f_getResourceId(vc_resourcesList[v_containerIndex].resource)}, omit, int3)); //Member type is set to Container + v_createRequest := valueof(m_createGroup(2, {f_getResourceAddress(v_containerIndex)}, omit, int3)); //Member type is set to Container v_createRequest := f_getCreateRequestPrimitive(int9, v_createRequest, v_aeIndex); // Test Body @@ -10954,7 +10889,7 @@ module OneM2M_Testcases_CSE_Release_1 { // Preamble v_aeIndex := f_cse_preamble_registerAe(); //c_CRUDNDi v_containerIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex); // AE child resource - v_createRequest := valueof(m_createGroup(2, {f_getResourceId(vc_resourcesList[v_containerIndex].resource)}, omit, int2, int3)); //Member type is set to AE and consistencyStrategy is set to MIXED + v_createRequest := valueof(m_createGroup(2, {f_getResourceAddress(v_containerIndex)}, omit, int2, int3)); //Member type is set to AE and consistencyStrategy is set to MIXED v_createRequest := f_getCreateRequestPrimitive(int9, v_createRequest, v_aeIndex); // Test Body @@ -11035,7 +10970,7 @@ module OneM2M_Testcases_CSE_Release_1 { 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_memberIDs := {f_getResourceAddress(v_groupIndex), f_getResourceAddress(v_containerIndex)}; v_createRequest := valueof(m_createGroup(2, v_memberIDs, omit, int3, int1, -, -)); //Member type is set to container and consistencyStrategy is set to ABANDON MEMBER (default value) v_createRequest := f_getCreateRequestPrimitive(int9, v_createRequest, v_aeIndex); @@ -11060,7 +10995,7 @@ module OneM2M_Testcases_CSE_Release_1 { setverdict(fail, __SCOPE__ & ": Error, memberIDs attribute not provided"); } else { - if(not match({f_getResourceId(vc_resourcesList[v_containerIndex].resource)}, v_response.primitive.responsePrimitive.primitiveContent.group_.memberIDs)){ + if(not f_compareURIs(v_containerIndex, v_response.primitive.responsePrimitive.primitiveContent.group_.memberIDs[0])){ setverdict(fail, __SCOPE__ & ": Error, memberIDs attribute not correct"); } } @@ -11117,7 +11052,7 @@ module OneM2M_Testcases_CSE_Release_1 { 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_memberIDs := {f_getResourceAddress(v_groupIndex), f_getResourceAddress(v_containerIndex)}; 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); @@ -11199,13 +11134,13 @@ module OneM2M_Testcases_CSE_Release_1 { // Preamble v_aeIndex_1 := f_cse_preamble_registerAe(-, -); //c_CRUDNDi v_acpIndex := f_cse_createResource(int1, v_createAcp, -1); // AE child resource - v_containerRequestPrimitive := f_setAcpId(v_containerRequestPrimitive, {f_getResourceId(vc_resourcesList[v_acpIndex].resource)}); + v_containerRequestPrimitive := f_setAcpId(v_containerRequestPrimitive, {f_getResourceAddress(v_acpIndex)}); v_containerIndex_1 := f_cse_createResource(int3, v_containerRequestPrimitive, v_aeIndex_1); // AE1 child resource v_containerIndex_2 := f_cse_createResource(int3, v_containerRequestPrimitive, v_aeIndex_1); // AE2 child resource v_contentInstanceIndex_1 := f_cse_createResource(int4, m_createContentInstanceBase, v_containerIndex_1); // Container_1 child resource v_contentInstanceIndex_2 := f_cse_createResource(int4, m_createContentInstanceBase, v_containerIndex_2); // Container_2 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_memberIDs := {f_getResourceAddress(v_containerIndex_1), f_getResourceAddress(v_containerIndex_2)}; + v_membersAcpIds := {f_getResourceAddress(v_acpIndex)}; v_groupIndex := f_cse_createResource(int9, m_createGroup(2, v_memberIDs, omit, int3, -, v_membersAcpIds), -1); v_fanoutPointAddress := f_getResourceAddress(v_groupIndex) & "/" & c_resourceShortNameFanOutPoint & "/" & c_resourceShortNameLatest; @@ -11314,7 +11249,7 @@ module OneM2M_Testcases_CSE_Release_1 { v_containerIndex_1 := f_cse_createResource(int3, m_createContainerBase, v_aeIndex); - v_groupIndex := f_cse_createResource(int9, m_createGroup(2, {f_getResourceId(vc_resourcesList[v_containerIndex_1].resource)}, omit, int3, -, - , -), v_aeIndex); + v_groupIndex := f_cse_createResource(int9, m_createGroup(2, {f_getResourceAddress(v_containerIndex_1)}, omit, int3, -, - , -), v_aeIndex); v_updateRequest.primitiveContent.group_.memberIDs := {v_containerAddress_2}; v_request := f_getUpdateRequestPrimitive(int9, v_groupIndex, v_updateRequest); // creating group @@ -11389,8 +11324,8 @@ module OneM2M_Testcases_CSE_Release_1 { v_aeIndex := f_cse_preamble_registerAe(); //c_CRUDNDi 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_memberId_1 := f_getResourceAddress(v_containerIndex_1); + v_memberId_2 := f_getResourceAddress(v_containerIndex_2); v_groupIndex := f_cse_createResource(int9, m_createGroup(2, {v_memberId_1, v_memberId_2}, omit, -, -, -, -), v_aeIndex); // AE child resource v_updateRequest.primitiveContent.group_.memberIDs := {v_memberId_2, v_memberId_2}; @@ -11412,7 +11347,7 @@ module OneM2M_Testcases_CSE_Release_1 { if(lengthof(v_response.primitive.responsePrimitive.primitiveContent.group_.memberIDs) != 1) { setverdict(fail, __SCOPE__ & ": Error, wrong number of memberIDs attribute"); } - if(v_response.primitive.responsePrimitive.primitiveContent.group_.memberIDs[0] != v_memberId_2){ + if(not(f_compareURIs(v_containerIndex_2, v_response.primitive.responsePrimitive.primitiveContent.group_.memberIDs[0]))){ setverdict(fail, __SCOPE__ & ": Error, memberIDs attribute not correct"); } } @@ -11429,11 +11364,13 @@ module OneM2M_Testcases_CSE_Release_1 { setverdict(fail, __SCOPE__ & ": No answer while updating resource"); } } - + + f_checkAeSimuStatus(); + v_primitiveContentRetrievedResource := f_cse_retrieveResource(v_groupIndex); if(getverdict == pass){ if(ischosen(v_primitiveContentRetrievedResource.group_)){ - if(v_primitiveContentRetrievedResource.group_.memberIDs[0] != v_memberId_2){ + if(not(f_compareURIs(v_containerIndex_2, v_primitiveContentRetrievedResource.group_.memberIDs[0]))){ setverdict(fail, __SCOPE__ & ": Error, memberIDs attribute not updated"); } } @@ -11481,9 +11418,9 @@ module OneM2M_Testcases_CSE_Release_1 { v_aeIndex := f_cse_preamble_registerAe(); //c_CRUDNDi 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_groupIndex := f_cse_createResource(int9, m_createGroup(2, {f_getResourceAddress(v_containerIndex_1)}, omit, int3, -, -, -), v_aeIndex); - v_updateRequest.primitiveContent.group_.memberIDs := {f_getResourceId(vc_resourcesList[v_containerIndex_2].resource)}; + v_updateRequest.primitiveContent.group_.memberIDs := {f_getResourceAddress(v_containerIndex_2)}; v_updateRequest := f_getUpdateRequestPrimitive(int9, v_groupIndex, v_updateRequest); // Test Body @@ -11516,6 +11453,8 @@ module OneM2M_Testcases_CSE_Release_1 { } } + f_checkAeSimuStatus(); + v_primitiveContentRetrievedResource := f_cse_retrieveResource(v_groupIndex); if(getverdict == pass){ if(ischosen(v_primitiveContentRetrievedResource.group_)){ @@ -11569,8 +11508,8 @@ module OneM2M_Testcases_CSE_Release_1 { v_aeIndex := f_cse_preamble_registerAe(); //c_CRUDNDi v_containerIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex); v_subGroupIndex := f_cse_createResource(int9, m_createGroupBase, v_aeIndex); - v_memberId_1 := f_getResourceId(vc_resourcesList[v_containerIndex].resource); - v_memberId_2 := f_getResourceId(vc_resourcesList[v_subGroupIndex].resource); + v_memberId_1 := f_getResourceAddress(v_containerIndex); + v_memberId_2 := f_getResourceAddress(v_subGroupIndex); 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.group_.memberIDs := {v_memberId_1, v_memberId_2}; @@ -11618,6 +11557,8 @@ module OneM2M_Testcases_CSE_Release_1 { } } + f_checkAeSimuStatus(); + v_primitiveContentRetrievedResource := f_cse_retrieveResource(v_groupIndex); if(getverdict == pass){ if(ischosen(v_primitiveContentRetrievedResource.group_)){ @@ -11675,8 +11616,8 @@ module OneM2M_Testcases_CSE_Release_1 { v_aeIndex := f_cse_preamble_registerAe(); //c_CRUDNDi v_containerIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex); v_subGroupIndex := f_cse_createResource(int9, m_createGroupBase, v_aeIndex); - v_memberId_1 := f_getResourceId(vc_resourcesList[v_containerIndex].resource); - v_memberId_2 := f_getResourceId(vc_resourcesList[v_subGroupIndex].resource); + v_memberId_1 := f_getResourceAddress(v_containerIndex); + v_memberId_2 := f_getResourceAddress(v_subGroupIndex); v_groupIndex := f_cse_createResource(int9, m_createGroup(2, {v_memberId_1}, omit, int3, int1), v_aeIndex); //Member type is set to Container (int3) and consistencyStrategy is set to ABANDON MEMBER (default value) v_updateRequest.primitiveContent.group_.memberIDs := {v_memberId_2, v_memberId_1}; @@ -11709,7 +11650,7 @@ module OneM2M_Testcases_CSE_Release_1 { if(lengthof(v_response.primitive.responsePrimitive.primitiveContent.group_.memberIDs) != 1) { setverdict(fail, __SCOPE__ & ": Error, wrong number of memberIDs attribute"); } - if(v_response.primitive.responsePrimitive.primitiveContent.group_.memberIDs[0] != v_memberId_1){ + if(not(f_compareURIs(v_containerIndex, v_response.primitive.responsePrimitive.primitiveContent.group_.memberIDs[0]))){ setverdict(fail, __SCOPE__ & ": Error, memberIDs attribute not correct"); } } @@ -11727,6 +11668,8 @@ module OneM2M_Testcases_CSE_Release_1 { } } + f_checkAeSimuStatus(); + v_primitiveContentRetrievedResource := f_cse_retrieveResource(v_groupIndex); if(getverdict == pass){ if(ischosen(v_primitiveContentRetrievedResource.group_)){ @@ -11734,7 +11677,7 @@ module OneM2M_Testcases_CSE_Release_1 { setverdict(fail, __SCOPE__ & ": Error, memberTypeValidated attribute not updated"); } - if(v_primitiveContentRetrievedResource.group_.memberIDs[0] != v_memberId_1){ + if(not(f_compareURIs(v_containerIndex, v_primitiveContentRetrievedResource.group_.memberIDs[0]))){ setverdict(fail, __SCOPE__ & ": Error, memberIDs attribute not correct"); } } @@ -11783,8 +11726,8 @@ module OneM2M_Testcases_CSE_Release_1 { v_aeIndex := f_cse_preamble_registerAe(); //c_CRUDNDi v_containerIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex); v_subGroupIndex := f_cse_createResource(int9, m_createGroupBase, v_aeIndex); - v_memberId_1 := f_getResourceId(vc_resourcesList[v_containerIndex].resource); - v_memberId_2 := f_getResourceId(vc_resourcesList[v_subGroupIndex].resource); + v_memberId_1 := f_getResourceAddress(v_containerIndex); + v_memberId_2 := f_getResourceAddress(v_subGroupIndex); 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.group_.memberIDs := {v_memberId_2, v_memberId_1}; @@ -11862,7 +11805,7 @@ module OneM2M_Testcases_CSE_Release_1 { 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)}; + v_memberIDs := {f_getResourceAddress(v_containerIndex_1), f_getResourceAddress(v_containerIndex_2)}; v_createRequest := valueof(m_createGroup(c_maxNrOfMembers, v_memberIDs, omit, int3)); @@ -11870,7 +11813,7 @@ module OneM2M_Testcases_CSE_Release_1 { //Test Body v_request := f_getUpdateRequestPrimitive(int9, v_groupIndex, v_updateRequest); - v_memberIDs := v_memberIDs & {f_getResourceId(vc_resourcesList[v_containerIndex_3].resource)}; + v_memberIDs := v_memberIDs & {f_getResourceAddress(v_containerIndex_3)}; v_request.primitiveContent.group_.memberIDs := v_memberIDs; f_send(e_mcaPort, m_request(v_request)); @@ -11893,6 +11836,8 @@ module OneM2M_Testcases_CSE_Release_1 { } } + f_checkAeSimuStatus(); + v_primitiveContentRetrievedResource := f_cse_retrieveResource(v_groupIndex); if(getverdict == pass){ //Check that the resource has NOT been udpated @@ -11949,7 +11894,7 @@ module OneM2M_Testcases_CSE_Release_1 { v_aeIndex := f_cse_preamble_registerAe(-, -); //c_CRUDNDi 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_memberIDs := {f_getResourceAddress(v_containerIndex_1), f_getResourceAddress(v_containerIndex_2)}; v_groupIndex := f_cse_createResource(int9, m_createGroup(2, v_memberIDs, omit, int3), v_aeIndex); v_updateRequest := f_getUpdateRequestPrimitive(int9, v_groupIndex, v_updateRequest); @@ -11975,6 +11920,8 @@ module OneM2M_Testcases_CSE_Release_1 { } } + f_checkAeSimuStatus(); + v_primitiveContentRetrievedResource := f_cse_retrieveResource(v_groupIndex); if(getverdict == pass){ //Check that the resource has NOT been udpated @@ -12049,7 +11996,7 @@ module OneM2M_Testcases_CSE_Release_1 { v_containerIndex_1 := 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_1 := f_getResourceAddress(v_containerIndex_1); v_createRequest := valueof(m_createGroup(c_maxNrOfMembers, {v_memberId_1}, omit, int3)); @@ -12092,6 +12039,8 @@ module OneM2M_Testcases_CSE_Release_1 { } } + f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1); + v_primitiveContentRetrievedResource := f_cse_retrieveResource(v_groupIndex); if(getverdict == pass){ if(ischosen(v_primitiveContentRetrievedResource.group_)){ @@ -12160,8 +12109,8 @@ module OneM2M_Testcases_CSE_Release_1 { 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_memberId_1 := f_getResourceAddress(v_containerIndex_1); + v_memberId_2 := f_getResourceAddress(v_containerIndex_2); v_createRequest := valueof(m_createGroup(c_maxNrOfMembers, {v_memberId_1, v_memberId_2}, omit, int3)); diff --git a/OneM2M_Testcases_CSE_Release_2.ttcn b/OneM2M_Testcases_CSE_Release_2.ttcn index 8f1f92d6e02b7aa447c3168bd8e31637bde41784..266a46127dd449ec0363bfe1b6d917516a897b86 100644 --- a/OneM2M_Testcases_CSE_Release_2.ttcn +++ b/OneM2M_Testcases_CSE_Release_2.ttcn @@ -699,68 +699,7 @@ module OneM2M_Testcases_CSE_Release_2 { } }// end group g_CSE_DMR_CRE_004 - - group g_CSE_DMR_CRE_006 { - - /** - * @desc Check that the IUT returns a default value to RW ATTRIBUTE in the response of a RESOURCE_TYPE resource CREATE Request where no a RW ATTRIBUTE is provided by AE - * - */ - testcase TC_CSE_DMR_CRE_006_CNT_MNI() runs on Tester system CseSystem { - // Local variables - var verdicttype v_verdict; - var template RequestPrimitive v_createRequest := m_createContainerBase; - var ResponsePrimitive v_responsePrimitive; - var AeSimu v_ae1 := AeSimu.create("AE1") alive; - - v_ae1.start(f_CSE_DMR_CRE_006(int3, v_createRequest)); - v_ae1.done -> value v_verdict; - - if(v_verdict == pass){ v_responsePrimitive := f_getResponsePrimitive(v_ae1); - if(not ispresent(v_responsePrimitive.primitiveContent.container.maxNrOfInstances)){ - setverdict(fail, __SCOPE__, ": Error, maxNrOfInstances attribute not provided"); - } - } - } - - testcase TC_CSE_DMR_CRE_006_CNT_MBS() runs on Tester system CseSystem { - // Local variables - var verdicttype v_verdict; - var template RequestPrimitive v_createRequest := m_createContainerBase; - var ResponsePrimitive v_responsePrimitive; - var AeSimu v_ae1 := AeSimu.create("AE1") alive; - - v_ae1.start(f_CSE_DMR_CRE_006(int3, v_createRequest)); - v_ae1.done -> value v_verdict; - - if(v_verdict == pass){ v_responsePrimitive := f_getResponsePrimitive(v_ae1); - if(not ispresent(v_responsePrimitive.primitiveContent.container.maxByteSize)){ - setverdict(fail, __SCOPE__, ": Error, maxByteSize attribute not provided"); - } - } - - } - - testcase TC_CSE_DMR_CRE_006_CNT_MIA() runs on Tester system CseSystem { - // Local variables - var verdicttype v_verdict; - var template RequestPrimitive v_createRequest := m_createContainerBase; - var ResponsePrimitive v_responsePrimitive; - var AeSimu v_ae1 := AeSimu.create("AE1") alive; - - - v_ae1.start(f_CSE_DMR_CRE_006(int3, v_createRequest)); - v_ae1.done -> value v_verdict; - - if(v_verdict == pass){ v_responsePrimitive := f_getResponsePrimitive(v_ae1); - if(not ispresent(v_responsePrimitive.primitiveContent.container.maxInstanceAge)){ - setverdict(fail, __SCOPE__, ": Error, maxInstanceAge attribute not provided"); - } - } - } - - }// end group g_CSE_DMR_CRE_006 - + group g_CSE_DMR_CRE_015 { /** @@ -1027,7 +966,7 @@ module OneM2M_Testcases_CSE_Release_2 { //Provided attributes should not be returned unless modified v_contentResponse.group_.resourceName := omit; v_contentResponse.group_.maxNrOfMembers := omit; - v_contentResponse.group_.memberIDs := omit; + v_contentResponse.group_.memberIDs := *; v_ae1.start(f_CSE_DMR_CRE_020(int9, m_createGroupBase, v_contentResponse));//Group v_ae1.done; @@ -3361,7 +3300,7 @@ module OneM2M_Testcases_CSE_Release_2 { f_cse_createAccessControlPolicyAux(); - v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[vc_acpIndex].resource)}, -);//AE1 is registred; + v_aeIndex := f_cse_preamble_registerAe({f_getResourceAddress(vc_acpIndex)}, -);//AE1 is registred; v_resourceIndex := f_cse_createResource(int15, m_createPollingChannelBase, v_aeIndex); @@ -3474,7 +3413,7 @@ module OneM2M_Testcases_CSE_Release_2 { f_cse_createAccessControlPolicyAux(); - v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[vc_acpIndex].resource)}, -);//AE1 is registred; + v_aeIndex := f_cse_preamble_registerAe({f_getResourceAddress(vc_acpIndex)}, -);//AE1 is registred; v_resourceIndex := f_cse_createResource(int15, m_createPollingChannelBase, v_aeIndex); @@ -3585,7 +3524,7 @@ module OneM2M_Testcases_CSE_Release_2 { f_cse_createAccessControlPolicyAux(); - v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[vc_acpIndex].resource)}, -);//AE1 is registred; + v_aeIndex := f_cse_preamble_registerAe({f_getResourceAddress(vc_acpIndex)}, -);//AE1 is registred; v_resourceIndex := f_cse_createResource(int15, m_createPollingChannelBase, v_aeIndex); @@ -3813,7 +3752,7 @@ module OneM2M_Testcases_CSE_Release_2 { f_cse_createAccessControlPolicyAux(); - v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[vc_acpIndex].resource)}, -);//AE1 is registred; + v_aeIndex := f_cse_preamble_registerAe({f_getResourceAddress(vc_acpIndex)}, -);//AE1 is registred; v_resourceIndex := f_cse_createResource(int15, m_createPollingChannelBase, v_aeIndex); diff --git a/OneM2M_Testcases_CSE_Release_3.ttcn b/OneM2M_Testcases_CSE_Release_3.ttcn index 3d167ab81b36f060d2fca7366e3bbabda2d89412..d1e870279a18a41267e76b9fb299d3c80273917c 100644 --- a/OneM2M_Testcases_CSE_Release_3.ttcn +++ b/OneM2M_Testcases_CSE_Release_3.ttcn @@ -678,68 +678,6 @@ module OneM2M_Testcases_CSE_Release_3 { }// end group g_CSE_DMR_CRE_004 - group g_CSE_DMR_CRE_006 { - - /** - * @desc Check that the IUT returns a default value to RW ATTRIBUTE in the response of a RESOURCE_TYPE resource CREATE Request where no a RW ATTRIBUTE is provided by AE - * - */ - testcase TC_CSE_DMR_CRE_006_TS_MNI() runs on Tester system CseSystem { - // Local variables - var verdicttype v_verdict; - var template RequestPrimitive v_createRequest := m_createTimeSeriesBase; - var ResponsePrimitive v_responsePrimitive; - var AeSimu v_ae1 := AeSimu.create("AE1") alive; - - - v_ae1.start(f_CSE_DMR_CRE_006(int29, v_createRequest)); - v_ae1.done -> value v_verdict; - - if(v_verdict == pass){ v_responsePrimitive := f_getResponsePrimitive(v_ae1); - if(not ispresent(v_responsePrimitive.primitiveContent.timeSeries.maxNrOfInstances)){ - setverdict(fail, __SCOPE__, ": Error, maxNrOfInstances attribute not provided"); - } - } - } - - testcase TC_CSE_DMR_CRE_006_TS_MBS() runs on Tester system CseSystem { - // Local variables - var verdicttype v_verdict; - var template RequestPrimitive v_createRequest := m_createTimeSeriesBase; - var ResponsePrimitive v_responsePrimitive; - var AeSimu v_ae1 := AeSimu.create("AE1") alive; - - - v_ae1.start(f_CSE_DMR_CRE_006(int29, v_createRequest)); - v_ae1.done -> value v_verdict; - - if(v_verdict == pass){ v_responsePrimitive := f_getResponsePrimitive(v_ae1); - if(not ispresent(v_responsePrimitive.primitiveContent.timeSeries.maxByteSize)){ - setverdict(fail, __SCOPE__, ": Error, maxByteSize attribute not provided"); - } - } - - } - - testcase TC_CSE_DMR_CRE_006_TS_MIA() runs on Tester system CseSystem { - // Local variables - var verdicttype v_verdict; - var template RequestPrimitive v_createRequest := m_createTimeSeriesBase; - var ResponsePrimitive v_responsePrimitive; - var AeSimu v_ae1 := AeSimu.create("AE1") alive; - - - v_ae1.start(f_CSE_DMR_CRE_006(int29, v_createRequest)); - v_ae1.done -> value v_verdict; - - if(v_verdict == pass){ v_responsePrimitive := f_getResponsePrimitive(v_ae1); - if(not ispresent(v_responsePrimitive.primitiveContent.timeSeries.maxInstanceAge)){ - setverdict(fail, __SCOPE__, ": Error, maxInstanceAge attribute not provided"); - } - } - } - - }// end group g_CSE_DMR_CRE_006 group g_CSE_DMR_CRE_007 { @@ -933,8 +871,7 @@ module OneM2M_Testcases_CSE_Release_3 { var template RequestPrimitive v_createRequest := m_createSubscriptionBase; const AttributeList c_optionalAttribute := {"rateLimit"}; - v_createRequest.primitiveContent.subscription.rateLimit := {0, "PT20M"}; - + v_createRequest.primitiveContent.subscription.rateLimit := {0, "PT2S"}; v_ae1.start(f_CSE_DMR_CRE_012(int23, v_createRequest, c_optionalAttribute)); v_ae1.done; @@ -1564,7 +1501,7 @@ module OneM2M_Testcases_CSE_Release_3 { var template RequestPrimitive v_createRequest := m_createTimeSeriesBase; - v_createRequest.primitiveContent.timeSeries.announceTo := {f_getLocalPoA()}; + v_createRequest.primitiveContent.timeSeries.announceTo := {PX_TS_CSE1.cseId}; v_ae1.start(f_CSE_DMR_CRE_022(int29, v_createRequest, mw_createTimeSeriesAnnc));//TimeSeries v_ae1.done; @@ -1576,7 +1513,7 @@ module OneM2M_Testcases_CSE_Release_3 { var template RequestPrimitive v_createRequest := m_createTimeSeriesInstanceBase; - v_createRequest.primitiveContent.timeSeriesInstance.announceTo := {f_getLocalPoA()}; + v_createRequest.primitiveContent.timeSeriesInstance.announceTo := {PX_TS_CSE1.cseId}; v_ae1.start(f_CSE_DMR_CRE_022(int30, v_createRequest, mw_createTimeSeriesInstanceAnnc));//TimeSeriesInstance v_ae1.done; @@ -1595,29 +1532,19 @@ module OneM2M_Testcases_CSE_Release_3 { var verdicttype v_verdict; var AeSimu v_ae1 := AeSimu.create("AE1") alive; var template RequestPrimitive v_createRequest := m_createContainerBase; + var template RequestPrimitive v_anncCreateRequest := mw_createContainerAnnc; var RequestPrimitive v_requestPrimitive; var XSD.NonNegativeInteger v_maxByteSize := 512; v_createRequest.primitiveContent.container.announceTo := {PX_TS_CSE1.cseId}; v_createRequest.primitiveContent.container.maxByteSize := v_maxByteSize; v_createRequest.primitiveContent.container.announcedAttribute := {"mbs"}; + + v_anncCreateRequest.primitiveContent.containerAnnc.maxByteSize := ?; - v_ae1.start(f_CSE_DMR_CRE_023(int3, v_createRequest, mw_createContainerAnnc()));//Container + v_ae1.start(f_CSE_DMR_CRE_023(int3, v_createRequest, v_anncCreateRequest));//Container v_ae1.done -> value v_verdict; - if(v_verdict == pass){ - //Check if maxByteSize attribute has been announced - v_requestPrimitive := f_getRequestPrimitive(v_ae1); - if (ispresent(v_requestPrimitive.primitiveContent.containerAnnc.maxByteSize)){ - if(v_requestPrimitive.primitiveContent.containerAnnc.maxByteSize != v_maxByteSize){ - setverdict(fail, __SCOPE__ & ": Error: Value of maxByteSize has not been announced successfully"); - }else{ - setverdict(pass, __SCOPE__ & ": Value of maxByteSize has been announced successfully"); - } - }else{ - setverdict(fail, __SCOPE__ & ": Error: maxByteSize has not been announced"); - } - } } testcase TC_CSE_DMR_CRE_023_CIN() runs on Tester system CseSystem { @@ -1625,29 +1552,19 @@ module OneM2M_Testcases_CSE_Release_3 { var verdicttype v_verdict; var AeSimu v_ae1 := AeSimu.create("AE1") alive; var template RequestPrimitive v_createRequest := m_createContentInstanceBase; + var template RequestPrimitive v_anncCreateRequest := mw_createContentInstanceAnnc; var RequestPrimitive v_requestPrimitive; - var XSD.NonNegativeInteger v_contentSize := 512; + var ContentInfo v_contentInfo := "application/text:1"; v_createRequest.primitiveContent.contentInstance.announceTo := {PX_TS_CSE1.cseId}; - v_createRequest.primitiveContent.contentInstance.contentSize := v_contentSize; - v_createRequest.primitiveContent.contentInstance.announcedAttribute := {"cs"}; + v_createRequest.primitiveContent.contentInstance.contentInfo := v_contentInfo; + v_createRequest.primitiveContent.contentInstance.announcedAttribute := {"cnf"}; - v_ae1.start(f_CSE_DMR_CRE_023(int4, v_createRequest, mw_createContentInstanceAnnc()));//ContentInstance + v_anncCreateRequest.primitiveContent.contentInstanceAnnc.contentInfo := ?; + + v_ae1.start(f_CSE_DMR_CRE_023(int4, v_createRequest, v_anncCreateRequest));//ContentInstance v_ae1.done -> value v_verdict; - if(v_verdict == pass){ - //Check if contentSize attribute has been announced - v_requestPrimitive := f_getRequestPrimitive(v_ae1); - if (ispresent(v_requestPrimitive.primitiveContent.contentInstanceAnnc.contentSize)){ - if(v_requestPrimitive.primitiveContent.contentInstanceAnnc.contentSize != v_contentSize){ - setverdict(fail, __SCOPE__ & ": Error: Value of contentSize has not been announced successfully"); - }else{ - setverdict(pass, __SCOPE__ & ": Value of contentSize has been announced successfully"); - } - }else{ - setverdict(fail, __SCOPE__ & ": Error: contentSize has not been announced"); - } - } } testcase TC_CSE_DMR_CRE_023_GRP() runs on Tester system CseSystem { @@ -1655,6 +1572,7 @@ module OneM2M_Testcases_CSE_Release_3 { var verdicttype v_verdict; var AeSimu v_ae1 := AeSimu.create("AE1") alive; var template RequestPrimitive v_createRequest := m_createGroupBase; + var template RequestPrimitive v_anncCreateRequest := mw_createGroupAnnc; var RequestPrimitive v_requestPrimitive; var XSD.PositiveInteger v_maxNrOfMembers := 10; @@ -1662,22 +1580,11 @@ module OneM2M_Testcases_CSE_Release_3 { v_createRequest.primitiveContent.group_.maxNrOfMembers := v_maxNrOfMembers; v_createRequest.primitiveContent.group_.announcedAttribute := {"mnm"}; - v_ae1.start(f_CSE_DMR_CRE_023(int9, v_createRequest, mw_createGroupAnnc()));//Group + v_anncCreateRequest.primitiveContent.groupAnnc.maxNrOfMembers := ?; + + v_ae1.start(f_CSE_DMR_CRE_023(int9, v_createRequest, v_anncCreateRequest));//Group v_ae1.done -> value v_verdict; - if(v_verdict == pass){ - //Check if maxNrOfMembers attribute has been announced - v_requestPrimitive := f_getRequestPrimitive(v_ae1); - if (ispresent(v_requestPrimitive.primitiveContent.groupAnnc.maxNrOfMembers)){ - if(v_requestPrimitive.primitiveContent.groupAnnc.maxNrOfMembers != v_maxNrOfMembers){ - setverdict(fail, __SCOPE__ & ": Error: Value of maxNrOfMembers has not been announced successfully"); - }else{ - setverdict(pass, __SCOPE__ & ": Value of maxNrOfMembers has been announced successfully"); - } - }else{ - setverdict(fail, __SCOPE__ & ": Error: maxNrOfMembers has not been announced"); - } - } } testcase TC_CSE_DMR_CRE_023_LCP() runs on Tester system CseSystem { @@ -1685,6 +1592,7 @@ module OneM2M_Testcases_CSE_Release_3 { var verdicttype v_verdict; var AeSimu v_ae1 := AeSimu.create("AE1") alive; var template RequestPrimitive v_createRequest := m_createLocationPolicy(int1, omit, omit, omit, omit); + var template RequestPrimitive v_anncCreateRequest := mw_createLocationPolicyAnnc; var RequestPrimitive v_requestPrimitive; var LocationSource v_locationSource := int1;//Network-based @@ -1692,22 +1600,11 @@ module OneM2M_Testcases_CSE_Release_3 { v_createRequest.primitiveContent.locationPolicy.locationSource := v_locationSource; v_createRequest.primitiveContent.locationPolicy.announcedAttribute := {"los"}; - v_ae1.start(f_CSE_DMR_CRE_023(int10, v_createRequest, mw_createLocationPolicyAnnc()));//LocationPolicy + v_anncCreateRequest.primitiveContent.locationPolicyAnnc.locationSource := ?; + + v_ae1.start(f_CSE_DMR_CRE_023(int10, v_createRequest, v_anncCreateRequest));//LocationPolicy v_ae1.done -> value v_verdict; - if(v_verdict == pass){ - //Check if locationSource attribute has been announced - v_requestPrimitive := f_getRequestPrimitive(v_ae1); - if (ispresent(v_requestPrimitive.primitiveContent.locationPolicyAnnc.locationSource)){ - if(v_requestPrimitive.primitiveContent.locationPolicyAnnc.locationSource != v_locationSource){ - setverdict(fail, __SCOPE__ & ": Error: Value of locationSource has not been announced successfully"); - }else{ - setverdict(pass, __SCOPE__ & ": Value of locationSource has been announced successfully"); - } - }else{ - setverdict(fail, __SCOPE__ & ": Error: locationSource has not been announced"); - } - } } testcase TC_CSE_DMR_CRE_023_SCH() runs on Tester system CseSystem { @@ -1715,6 +1612,7 @@ module OneM2M_Testcases_CSE_Release_3 { var verdicttype v_verdict; var AeSimu v_ae1 := AeSimu.create("AE1") alive; var template RequestPrimitive v_createRequest := m_createScheduleBase; + var template RequestPrimitive v_anncCreateRequest := mw_createScheduleAnnc; var RequestPrimitive v_requestPrimitive; var ScheduleEntries v_scheduleElement := {{"0 0 0,1,2 1 1 * *"}}; @@ -1722,22 +1620,11 @@ module OneM2M_Testcases_CSE_Release_3 { v_createRequest.primitiveContent.schedule.scheduleElement := v_scheduleElement; v_createRequest.primitiveContent.schedule.announcedAttribute := {"se"}; - v_ae1.start(f_CSE_DMR_CRE_023(int18, v_createRequest, mw_createScheduleAnnc()));//Schedule + v_anncCreateRequest.primitiveContent.scheduleAnnc.scheduleElement := ?; + + v_ae1.start(f_CSE_DMR_CRE_023(int18, v_createRequest, v_anncCreateRequest));//Schedule v_ae1.done -> value v_verdict; - if(v_verdict == pass){ - //Check if scheduleElement attribute has been announced - v_requestPrimitive := f_getRequestPrimitive(v_ae1); - if (ispresent(v_requestPrimitive.primitiveContent.scheduleAnnc.scheduleElement)){ - if(v_requestPrimitive.primitiveContent.scheduleAnnc.scheduleElement != v_scheduleElement){ - setverdict(fail, __SCOPE__ & ": Error: Value of scheduleElement has not been announced successfully"); - }else{ - setverdict(pass, __SCOPE__ & ": Value of scheduleElement has been announced successfully"); - } - }else{ - setverdict(fail, __SCOPE__ & ": Error: scheduleElement has not been announced"); - } - } } testcase TC_CSE_DMR_CRE_023_TS() runs on Tester system CseSystem { @@ -1745,6 +1632,7 @@ module OneM2M_Testcases_CSE_Release_3 { var verdicttype v_verdict; var AeSimu v_ae1 := AeSimu.create("AE1") alive; var template RequestPrimitive v_createRequest := m_createTimeSeriesBase; + var template RequestPrimitive v_anncCreateRequest := mw_createTimeSeriesAnnc; var RequestPrimitive v_requestPrimitive; var XSD.NonNegativeInteger v_maxByteSize := 512; @@ -1753,22 +1641,11 @@ module OneM2M_Testcases_CSE_Release_3 { v_createRequest.primitiveContent.timeSeries.maxByteSize := v_maxByteSize; v_createRequest.primitiveContent.timeSeries.announcedAttribute := {"mbs"}; - v_ae1.start(f_CSE_DMR_CRE_023(int29, v_createRequest, mw_createTimeSeriesAnnc()));//TimeSeries + v_anncCreateRequest.primitiveContent.timeSeriesAnnc.maxByteSize := ?; + + v_ae1.start(f_CSE_DMR_CRE_023(int29, v_createRequest, v_anncCreateRequest));//TimeSeries v_ae1.done -> value v_verdict; - if(v_verdict == pass){ - //Check if maxByteSize attribute has been announced - v_requestPrimitive := f_getRequestPrimitive(v_ae1); - if (ispresent(v_requestPrimitive.primitiveContent.timeSeriesAnnc.maxByteSize)){ - if(v_requestPrimitive.primitiveContent.timeSeriesAnnc.maxByteSize != v_maxByteSize){ - setverdict(fail, __SCOPE__ & ": Error: Value of maxByteSize has not been announced successfully"); - }else{ - setverdict(pass, __SCOPE__ & ": Value of maxByteSize has been announced successfully"); - } - }else{ - setverdict(fail, __SCOPE__ & ": Error: maxByteSize has not been announced"); - } - } } testcase TC_CSE_DMR_CRE_023_TSI() runs on Tester system CseSystem { @@ -1776,6 +1653,7 @@ module OneM2M_Testcases_CSE_Release_3 { var verdicttype v_verdict; var AeSimu v_ae1 := AeSimu.create("AE1") alive; var template RequestPrimitive v_createRequest := m_createTimeSeriesInstanceBase; + var template RequestPrimitive v_anncCreateRequest := mw_createTimeSeriesInstanceAnnc; var RequestPrimitive v_requestPrimitive; var XSD.NonNegativeInteger v_sequenceNr := 8; @@ -1784,22 +1662,11 @@ module OneM2M_Testcases_CSE_Release_3 { v_createRequest.primitiveContent.timeSeriesInstance.sequenceNr := v_sequenceNr; v_createRequest.primitiveContent.timeSeriesInstance.announcedAttribute := {"snr"}; - v_ae1.start(f_CSE_DMR_CRE_023(int30, v_createRequest, mw_createTimeSeriesInstanceAnnc()));//TimeSeriesInstance + v_anncCreateRequest.primitiveContent.timeSeriesInstanceAnnc.sequenceNr := ?; + + v_ae1.start(f_CSE_DMR_CRE_023(int30, v_createRequest, v_anncCreateRequest));//TimeSeriesInstance v_ae1.done -> value v_verdict; - if(v_verdict == pass){ - //Check if maxByteSize attribute has been announced - v_requestPrimitive := f_getRequestPrimitive(v_ae1); - if (ispresent(v_requestPrimitive.primitiveContent.timeSeriesInstanceAnnc.sequenceNr)){ - if(v_requestPrimitive.primitiveContent.timeSeriesInstanceAnnc.sequenceNr != v_sequenceNr){ - setverdict(fail, __SCOPE__ & ": Error: Value of sequenceNr has not been announced successfully"); - }else{ - setverdict(pass, __SCOPE__ & ": Value of sequenceNr has been announced successfully"); - } - }else{ - setverdict(fail, __SCOPE__ & ": Error: sequenceNr has not been announced"); - } - } } } // end g_CSE_DMR_CRE_023 @@ -3274,7 +3141,7 @@ module OneM2M_Testcases_CSE_Release_3 { // Local variables var AeSimu v_ae1 := AeSimu.create("AE1") alive; var template PrimitiveContent v_contentResponse; - v_contentResponse.pollingChannel := mw_contentPollingChannelBase; + v_contentResponse.pollingChannel := mw_contentPollingChannel_rc5; v_ae1.start(f_CSE_DMR_RET_023(int15, m_createPollingChannelBase, v_contentResponse, omit, omit));//PollingChannel v_ae1.done; @@ -3326,7 +3193,7 @@ module OneM2M_Testcases_CSE_Release_3 { // Local variables var AeSimu v_ae1 := AeSimu.create("AE1") alive; var template PrimitiveContent v_contentResponse; - v_contentResponse.container := mw_contentContainer_rc6; + v_contentResponse.resourceRefList := mw_contentContainer_rc6; v_ae1.start(f_CSE_DMR_RET_024(int3, m_createContainerBase, v_contentResponse, int3, m_createContainerBase));//Container v_ae1.done; @@ -3336,7 +3203,7 @@ module OneM2M_Testcases_CSE_Release_3 { // Local variables var AeSimu v_ae1 := AeSimu.create("AE1") alive; var template PrimitiveContent v_contentResponse; - v_contentResponse.group_ := mw_contentGroup_rc6; + v_contentResponse.resourceRefList := mw_contentGroup_rc6; v_ae1.start(f_CSE_DMR_RET_024(int9, m_createGroupBase, v_contentResponse, int23, m_createSubscriptionBase));//Group v_ae1.done; @@ -3346,7 +3213,7 @@ module OneM2M_Testcases_CSE_Release_3 { // Local variables var AeSimu v_ae1 := AeSimu.create("AE1") alive; var template PrimitiveContent v_contentResponse; - v_contentResponse.accessControlPolicy := mw_contentAcp_rc6; + v_contentResponse.resourceRefList := mw_contentAcp_rc6; v_ae1.start(f_CSE_DMR_RET_024(int1, m_createAcpBase,v_contentResponse, int23, m_createSubscriptionBase));//AccessControlPolicy v_ae1.done; @@ -3356,7 +3223,7 @@ module OneM2M_Testcases_CSE_Release_3 { // Local variables var AeSimu v_ae1 := AeSimu.create("AE1") alive; var template PrimitiveContent v_contentResponse; - v_contentResponse.subscription := mw_contentSubscription_rc6; + v_contentResponse.resourceRefList := mw_contentSubscription_rc6; v_ae1.start(f_CSE_DMR_RET_024(int23, m_createSubscriptionBase, v_contentResponse, int18, m_createScheduleBase));//Subscription v_ae1.done; @@ -3367,7 +3234,7 @@ module OneM2M_Testcases_CSE_Release_3 { var AeSimu v_ae1 := AeSimu.create("AE1") alive; var template PrimitiveContent v_contentResponse; - v_contentResponse.schedule := mw_contentSchedule_rc6; + v_contentResponse.resourceRefList := mw_contentSchedule_rc6; v_ae1.start(f_CSE_DMR_RET_024(int18, m_createScheduleBase, v_contentResponse, int23, m_createSubscriptionBase));//Schedule v_ae1.done; @@ -3379,7 +3246,7 @@ module OneM2M_Testcases_CSE_Release_3 { var AeSimu v_ae1 := AeSimu.create("AE1") alive; var template PrimitiveContent v_contentResponse; - v_contentResponse.pollingChannel := mw_contentPollingChannel_rc6; + v_contentResponse.resourceRefList := mw_contentPollingChannel_rc6; v_ae1.start(f_CSE_DMR_RET_024(int15, m_createPollingChannelBase, v_contentResponse, omit, omit));//PollingChannel v_ae1.done; @@ -3391,7 +3258,7 @@ module OneM2M_Testcases_CSE_Release_3 { var template PrimitiveContent v_contentResponse; - v_contentResponse.timeSeries := mw_contentTimeSeries_rc6; + v_contentResponse.resourceRefList := mw_contentTimeSeries_rc6; v_ae1.start(f_CSE_DMR_RET_024(int29, m_createTimeSeriesBase, v_contentResponse, int23, m_createSubscriptionBase));//TimeSeries v_ae1.done; @@ -3462,7 +3329,7 @@ module OneM2M_Testcases_CSE_Release_3 { var AeSimu v_ae1 := AeSimu.create("AE1") alive; var template PrimitiveContent v_contentResponse; - v_contentResponse.pollingChannel := mw_contentPollingChannelBase; + v_contentResponse.pollingChannel := mw_contentPollingChannel_rc8; v_ae1.start(f_CSE_DMR_RET_025(int15, m_createPollingChannelBase, v_contentResponse, omit, omit));//PollingChannel v_ae1.done; @@ -3830,7 +3697,7 @@ module OneM2M_Testcases_CSE_Release_3 { var PrimitiveContent v_primitiveContentRetrieveResource; v_createRequest.primitiveContent.accessControlPolicy.labels := v_labels_1;//Attribute 3 v_updateRequest.primitiveContent.accessControlPolicy.privileges := v_privileges_2; //Attribute 1 - v_updateRequest.primitiveContent.accessControlPolicy.announceTo := {f_getLocalPoA()};//Attribute 2 + v_updateRequest.primitiveContent.accessControlPolicy.announceTo := {PX_TS_CSE1.cseId};//Attribute 2 v_updateRequest.primitiveContent.accessControlPolicy.labels := v_labels_2;//Attribute 3 v_nullFields := {{"labels", omit}}; @@ -3848,8 +3715,8 @@ module OneM2M_Testcases_CSE_Release_3 { setverdict(fail, __SCOPE__ & ": Error: Privileges attribute not updated correctly") } //Check attribute 2 - if(not match(v_responsePrimitive.primitiveContent.accessControlPolicy.announceTo, valueof(v_updateRequest.primitiveContent.accessControlPolicy.announceTo))){ - setverdict(fail, __SCOPE__ & ": Error: Announce_to attribute not updated correctly") + if(not match(valueof(v_responsePrimitive.primitiveContent.accessControlPolicy.announceTo[0]), pattern "{PX_TS_CSE1.cseId}/*")){ + setverdict(fail, __SCOPE__ & ": Error: AnnounceTo attribute not updated correctly") } //Check attribute 3 if(ispresent(v_responsePrimitive.primitiveContent.accessControlPolicy.labels)){ @@ -3867,8 +3734,8 @@ module OneM2M_Testcases_CSE_Release_3 { setverdict(fail, __SCOPE__ & ": Error: Privileges attribute not updated correctly") } //Check attribute 2 - if(not match (v_primitiveContentRetrieveResource.accessControlPolicy.announceTo, valueof(v_updateRequest.primitiveContent.accessControlPolicy.announceTo))){ - setverdict(fail, __SCOPE__ & ": Error: Announce_to attribute not updated correctly") + if(not match (valueof(v_primitiveContentRetrieveResource.accessControlPolicy.announceTo[0]), pattern "{PX_TS_CSE1.cseId}/*")){ + setverdict(fail, __SCOPE__ & ": Error: AnnounceTo attribute not updated correctly") } //Check attribute 3 if(ispresent(v_primitiveContentRetrieveResource.accessControlPolicy.labels)){ @@ -4239,24 +4106,25 @@ module OneM2M_Testcases_CSE_Release_3 { // Local variables var verdicttype v_verdict; var AeSimu v_ae1 := AeSimu.create("AE1") alive; - var AcpType v_accessControlPolicyIDs_1 := {"NotInitialized_1"}; - var AcpType v_accessControlPolicyIDs_2 := {"NotInitialized_2"}; var template RequestPrimitive v_createRequest := m_createTimeSeriesBase; var template RequestPrimitive v_updateRequest := m_updateTimeSeriesBase; var ResponsePrimitive v_responsePrimitive; + var XSD.ID v_acpResourceAddress := ""; - - v_createRequest.primitiveContent.timeSeries.accessControlPolicyIDs := v_accessControlPolicyIDs_1; - v_updateRequest.primitiveContent.timeSeries.accessControlPolicyIDs := v_accessControlPolicyIDs_2; - - v_ae1.start(f_CSE_DMR_UPD_014(int29, v_createRequest, v_updateRequest));//TimeSeries - v_ae1.done -> value v_verdict; + v_ae1.start(f_CSE_DMR_UPD_014(int29, v_createRequest, v_updateRequest, true));//TimeSeries + alt{ + []infoPort.receive(mw_resourceAddress) -> value v_acpResourceAddress{ + repeat; + } + [] v_ae1.done -> value v_verdict { + } + } if(v_verdict == pass){ v_responsePrimitive := f_getResponsePrimitive(v_ae1); //Check attribute 1 if(ispresent(v_responsePrimitive.primitiveContent)) { if(ischosen(v_responsePrimitive.primitiveContent.timeSeries)) { - if(v_responsePrimitive.primitiveContent.timeSeries.accessControlPolicyIDs != v_accessControlPolicyIDs_2){ + if(v_responsePrimitive.primitiveContent.timeSeries.accessControlPolicyIDs != {v_acpResourceAddress}){ setverdict(fail, __SCOPE__ & ": Error: AccessControlPolicyIDs attribute not updated correctly") } } @@ -5133,7 +5001,7 @@ module OneM2M_Testcases_CSE_Release_3 { testcase TC_CSE_DMR_UPD_015_TS_PEI() runs on Tester system CseSystem { var verdicttype v_verdict; var AeSimu v_ae1 := AeSimu.create("AE1") alive; - var XSD.NonNegativeInteger v_periodicInterval := 1; + var XSD.NonNegativeInteger v_periodicInterval := 2; var template RequestPrimitive v_updateRequest := m_updateTimeSeriesBase; var ResponsePrimitive v_responsePrimitive; var PrimitiveContent v_primitiveContentRetrieveResource; @@ -5169,13 +5037,14 @@ module OneM2M_Testcases_CSE_Release_3 { var AeSimu v_ae1 := AeSimu.create("AE1") alive; var XSD.Boolean v_missingDataDetect := true; var template RequestPrimitive v_updateRequest := m_updateTimeSeriesBase; + var template RequestPrimitive v_createRequest := m_createTimeSeriesBase; var ResponsePrimitive v_responsePrimitive; var PrimitiveContent v_primitiveContentRetrieveResource; - + v_createRequest.primitiveContent.timeSeries.missingDataDetectTimer := 500;//Required when setting up missingDataDetect v_updateRequest.primitiveContent.timeSeries.missingDataDetect := v_missingDataDetect; - v_ae1.start(f_CSE_DMR_UPD_015(int29, m_createTimeSeriesBase, v_updateRequest));//TimeSeries + v_ae1.start(f_CSE_DMR_UPD_015(int29, v_createRequest, v_updateRequest));//TimeSeries v_ae1.done -> value v_verdict; if(v_verdict == pass){ v_responsePrimitive := f_getResponsePrimitive(v_ae1); @@ -5310,7 +5179,7 @@ module OneM2M_Testcases_CSE_Release_3 { testcase TC_CSE_DMR_UPD_016_TS_ET() runs on Tester system CseSystem { var verdicttype v_verdict; var AeSimu v_ae1 := AeSimu.create("AE1") alive; - var Timestamp v_expirationTime := "21001231T012345"; + var Timestamp v_expirationTime := "20301231T012345"; var template RequestPrimitive v_updateRequest := m_updateTimeSeriesBase; var ResponsePrimitive v_responsePrimitive; var PrimitiveContent v_primitiveContentRetrieveResource; @@ -5430,7 +5299,7 @@ module OneM2M_Testcases_CSE_Release_3 { v_updateRequest.primitiveContent.timeSeriesInstance.announceTo := {PX_TS_CSE1.cseId}; - v_cse1.start(f_CSE_DMR_UPD_017(int29, v_createRequest, v_createRequestAnnc, v_updateRequest));//TimeSeriesInstance + v_cse1.start(f_CSE_DMR_UPD_017(int30, v_createRequest, v_createRequestAnnc, v_updateRequest));//TimeSeriesInstance v_cse1.done; } @@ -5451,10 +5320,7 @@ module OneM2M_Testcases_CSE_Release_3 { v_createRequest.primitiveContent.container.announceTo := {PX_TS_CSE1.cseId}; v_createRequest.primitiveContent.container.maxByteSize := v_maxByteSize; - v_createRequestAnnc.primitiveContent.containerAnnc.maxByteSize := v_maxByteSize; - v_updateRequest.primitiveContent.container.announcedAttribute := {"mbs"}; - v_updateRequestAnnc.primitiveContent.containerAnnc.maxByteSize := v_maxByteSize; v_cse1.start(f_CSE_DMR_UPD_018(int3, v_createRequest, v_createRequestAnnc, v_updateRequest, v_updateRequestAnnc));//Container @@ -5468,16 +5334,13 @@ module OneM2M_Testcases_CSE_Release_3 { var template RequestPrimitive v_createRequestAnnc := mw_createGroupAnnc; var template RequestPrimitive v_updateRequest := m_updateGroupBase; var template RequestPrimitive v_updateRequestAnnc := mw_updateGroupAnnc; - var MemberType v_memberType := int3; + var MemberType v_memberType := int2; v_createRequest.primitiveContent.group_.announceTo := {PX_TS_CSE1.cseId}; v_createRequest.primitiveContent.group_.memberType := v_memberType; - v_createRequestAnnc.primitiveContent.groupAnnc.memberType := v_memberType; - v_updateRequest.primitiveContent.group_.announcedAttribute := {"mt"}; - v_updateRequestAnnc.primitiveContent.groupAnnc.memberType := v_memberType; v_cse1.start(f_CSE_DMR_UPD_018(int9, v_createRequest, v_createRequestAnnc, v_updateRequest, v_updateRequestAnnc));//Group @@ -5516,10 +5379,7 @@ module OneM2M_Testcases_CSE_Release_3 { v_createRequest.primitiveContent.timeSeries.announceTo := {PX_TS_CSE1.cseId}; v_createRequest.primitiveContent.timeSeries.maxByteSize := v_maxByteSize; - v_createRequestAnnc.primitiveContent.timeSeriesAnnc.maxByteSize := v_maxByteSize; - v_updateRequest.primitiveContent.timeSeries.announcedAttribute := {"mbs"}; - v_updateRequestAnnc.primitiveContent.timeSeriesAnnc.maxByteSize := v_maxByteSize; v_cse1.start(f_CSE_DMR_UPD_018(int29, v_createRequest, v_createRequestAnnc, v_updateRequest, v_updateRequestAnnc));//TimeSeries @@ -6121,7 +5981,7 @@ module OneM2M_Testcases_CSE_Release_3 { var AeSimu v_ae1 := AeSimu.create("AE1") alive; var template PrimitiveContent v_contentResponse; - v_contentResponse.container := mw_contentContainer_rc6; + v_contentResponse.resourceRefList := mw_contentContainer_rc6; v_ae1.start(f_CSE_DMR_DEL_016(int3, m_createContainerBase, v_contentResponse, int3, m_createContainerBase));//Container v_ae1.done; @@ -6132,7 +5992,7 @@ module OneM2M_Testcases_CSE_Release_3 { var AeSimu v_ae1 := AeSimu.create("AE1") alive; var template PrimitiveContent v_contentResponse; - v_contentResponse.group_ := mw_contentGroup_rc6; + v_contentResponse.resourceRefList := mw_contentGroup_rc6; v_ae1.start(f_CSE_DMR_DEL_016(int9, m_createGroupBase, v_contentResponse, int23, m_createSubscriptionBase));//Group v_ae1.done; @@ -6143,7 +6003,7 @@ module OneM2M_Testcases_CSE_Release_3 { var AeSimu v_ae1 := AeSimu.create("AE1") alive; var template PrimitiveContent v_contentResponse; - v_contentResponse.accessControlPolicy := mw_contentAcp_rc6; + v_contentResponse.resourceRefList := mw_contentAcp_rc6; v_ae1.start(f_CSE_DMR_DEL_016(int1, m_createAcpBase,v_contentResponse, int23, m_createSubscriptionBase));//AccessControlPolicy v_ae1.done; @@ -6154,7 +6014,7 @@ module OneM2M_Testcases_CSE_Release_3 { var AeSimu v_ae1 := AeSimu.create("AE1") alive; var template PrimitiveContent v_contentResponse; - v_contentResponse.schedule := mw_contentSchedule_rc6; + v_contentResponse.resourceRefList := mw_contentSchedule_rc6; v_ae1.start(f_CSE_DMR_DEL_016(int18, m_createScheduleBase, v_contentResponse, int23, m_createSubscriptionBase));//Schedule v_ae1.done; @@ -6166,7 +6026,7 @@ module OneM2M_Testcases_CSE_Release_3 { var AeSimu v_ae1 := AeSimu.create("AE1") alive; var template PrimitiveContent v_contentResponse; - v_contentResponse.pollingChannel := mw_contentPollingChannel_rc6; + v_contentResponse.resourceRefList := mw_contentPollingChannel_rc6; v_ae1.start(f_CSE_DMR_DEL_016(int15, m_createPollingChannelBase, v_contentResponse, omit, omit));//PollingChannel v_ae1.done; @@ -6177,7 +6037,7 @@ module OneM2M_Testcases_CSE_Release_3 { var AeSimu v_ae1 := AeSimu.create("AE1") alive; var template PrimitiveContent v_contentResponse; - v_contentResponse.subscription := mw_contentSubscription_rc6; + v_contentResponse.resourceRefList := mw_contentSubscription_rc6; v_ae1.start(f_CSE_DMR_DEL_016(int23, m_createSubscriptionBase, v_contentResponse, int18, m_createScheduleBase));//Subscription v_ae1.done; @@ -6188,7 +6048,7 @@ module OneM2M_Testcases_CSE_Release_3 { var AeSimu v_ae1 := AeSimu.create("AE1") alive; var template PrimitiveContent v_contentResponse; - v_contentResponse.timeSeries := mw_contentTimeSeries_rc6; + v_contentResponse.resourceRefList := mw_contentTimeSeries_rc6; v_ae1.start(f_CSE_DMR_DEL_016(int29, m_createTimeSeriesBase, v_contentResponse, int23, m_createSubscriptionBase));//TimeSeries v_ae1.done; @@ -8574,8 +8434,8 @@ module OneM2M_Testcases_CSE_Release_3 { vc_ae2.done; vc_auxiliaryAe2Up := true; //the IUT escapes from the “connectionless state†- v_contentResponse.aE.labels := v_labels[2]; - vc_ae2.start(f_cse_notifyProcedure_aggregatedNoficationHandler(v_contentResponse, 1)); // check if the Rx. of notification and match contents + v_contentResponse.aE.labels := v_labels[2]; + vc_ae2.start(f_cse_notifyProcedure_aggregatedNoficationHandler(v_contentResponse, 1)); // check if the Rx. of notification and match contents v_updateRequest.primitiveContent.aE.labels := v_labels[i]; f_cse_updateResource(int2, v_ae1Index, v_updateRequest); //IUT having frequently received from AE1 a valid UPDATE Request to subscribed-to resource @@ -8659,7 +8519,6 @@ module OneM2M_Testcases_CSE_Release_3 { vc_ae2.start(f_cse_notifyProcedure_aggregatedNoficationHandler(v_contentResponse, c_receivedUpdateCounter)); // check if the Rz. of notification and match contents v_updateRequest.primitiveContent.aE.labels := v_labels[i]; f_cse_updateResource(int2, v_ae1Index, v_updateRequest); //IUT having received from AE1 a NUMBER of valid UPDATE Requests to subscribed-to resource - f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2); //Postamble @@ -8700,7 +8559,6 @@ module OneM2M_Testcases_CSE_Release_3 { // Preamble f_cse_createAccessControlPolicyAux(); - v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[vc_acpIndex].resource)}, {f_getLocalPoA(vc_aeSimuDesc.mcaPortIn, "")});//c_CRUDNDi); // Test Body @@ -8832,14 +8690,14 @@ module OneM2M_Testcases_CSE_Release_3 { var integer v_resourceIndex; var template RequestPrimitive v_groupRequest; var XSD.AnyURI v_fanoutPointAddress; - var RequestPrimitive v_request; + var RequestPrimitive v_request := m_createSubscriptionBase; var template RequestPrimitive v_createRequest := m_createSubscriptionBase; var template PrimitiveContent v_contentResponse; // Test control // Test component configuration - f_cf02Up(); + f_cf01Up(true); // Test adapter configuration @@ -8848,9 +8706,9 @@ module OneM2M_Testcases_CSE_Release_3 { f_cse_preamble_subscriptionVerification(v_ae2Index, v_createRequest, int23); - v_containerIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex); + v_containerIndex := f_cse_createResource(int3, m_createContainer_noResourceName, v_aeIndex); v_memberID_1 := f_getResourceId(vc_resourcesList[v_containerIndex].resource); - v_containerIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex); + v_containerIndex := f_cse_createResource(int3, m_createContainer_noResourceName, v_aeIndex); v_memberID_2 := f_getResourceId(vc_resourcesList[v_containerIndex].resource); v_groupRequest := valueof(m_createGroup(2, {v_memberID_1, v_memberID_2}, omit, int3)); @@ -8862,7 +8720,7 @@ module OneM2M_Testcases_CSE_Release_3 { v_request.primitiveContent.subscription.notificationForwardingURI := v_fanoutPointAddress; //subscription created on these members with notificationForwardingURI attribute set identical to notificationURI - v_request.primitiveContent.group_.memberIDs := {v_memberID_1, v_memberID_2}; + //v_request.primitiveContent.group_.memberIDs := {v_memberID_1, v_memberID_2}; v_request := f_getCreateRequestPrimitive(int23, v_request, v_aeIndex);//Subscription f_send(e_mcaPort, m_request(v_request)); @@ -10797,7 +10655,10 @@ module OneM2M_Testcases_CSE_Release_3 { // Preamble v_aeIndex := f_cse_preamble_registerAe(-, -); - vc_ae2.start(f_cse_createResource(int2, m_createAe(PX_TS_AE2.appId, -, PX_TS_AE2.aeIdStem, c_defaultAe2ResourceName, omit), -1)); // AE2 is registred + vc_ae2.start(f_cse_createAccessControlPolicyAux()); + f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2); + + vc_ae2.start(f_cse_createResource_withAcpAux(int2, m_createAe(PX_TS_AE2.appId, -, PX_TS_AE2.aeIdStem, c_defaultAe2ResourceName, omit), -1)); // AE2 is registred f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2); v_ae2ResourceId := f_getLatestResourceAddress(vc_ae2, e_nonHierarchical, e_cseRelative);