diff --git a/LibOneM2M/OneM2M_Functions.ttcn b/LibOneM2M/OneM2M_Functions.ttcn index 6f6351081e5980c332467b78ed35c78df2d18db2..86187282d9347f51d888dd56b77003403fa881fe 100644 --- a/LibOneM2M/OneM2M_Functions.ttcn +++ b/LibOneM2M/OneM2M_Functions.ttcn @@ -46,6 +46,9 @@ module OneM2M_Functions { } // end f_cf01Up + /** + * @desc Ports mapping and default behaviour activation for Config 02 + */ function f_cf02Up() runs on CseTester { // Variables @@ -83,6 +86,26 @@ module OneM2M_Functions { //Initialze the IUT } // end f_cf03Up + + /** + * @desc Ports mapping and default behaviour activation for Config 04 + */ + function f_cf04Up() runs on CseTester { + + // Variables + vc_config := e_cf04; + + // Map + map(self:mccPort, system:mccPort); + map(self:acPort, system:acPort); + activate(a_default()); + activate(a_cse_cf04()); + + // Connect + + //Initialze the IUT + + } // end f_cf03Up /** * @desc Ports unmapping @@ -134,6 +157,15 @@ module OneM2M_Functions { unmap(self:acPort, system:acPort); } + /** + * @desc Ports unmapping for Config 04 + */ + function f_cf04Down() runs on CseTester { + + unmap(self:mccPort, system:mccPort); + unmap(self:acPort, system:acPort); + } + }//end group configFunctions group CseFunctions { @@ -757,6 +789,13 @@ module OneM2M_Functions { log(__SCOPE__ & ": Info: resourceName not returned. Using the one provided in the request: " & p_request.primitiveContent.pollingChannel_optional.resourceName) } } + case (int16) { + if (isvalue(p_response.primitiveContent.remoteCSE_optional) and + not(ispresent(p_response.primitiveContent.remoteCSE_optional.resourceName))) { + p_response.primitiveContent.remoteCSE_optional.resourceName := p_request.primitiveContent.remoteCSE_optional.resourceName; + log(__SCOPE__ & ": Info: resourceName not returned. Using the one provided in the request: " & p_request.primitiveContent.remoteCSE_optional.resourceName) + } + } case (int18) { if (isvalue(p_response.primitiveContent.schedule_optional) and not(ispresent(p_response.primitiveContent.schedule_optional.resourceName))) { @@ -867,6 +906,43 @@ module OneM2M_Functions { unmap(self:acPort, system:acPort); } //end f_cse_notifyProcedure + + function f_registerRemoteCse(in template RequestPrimitive p_requestPrimitive) runs on CseTester return integer{ + + var MsgIn v_response; + var RequestPrimitive v_request; + var integer v_resourceIndex := -1; + + v_request := f_getCreateRequestPrimitive(int16, p_requestPrimitive, -1); + + mcaPort.send(m_request(v_request)); + tc_ac.start; + alt { + [] mccPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + tc_ac.stop; + setverdict(pass, __SCOPE__&":INFO: Resource type RemoteCSE created successfuly"); + f_checkAttributesToBeSaved(int16, v_request, v_response.primitive.responsePrimitive); + v_resourceIndex := f_setResource(v_response.primitive.responsePrimitive.primitiveContent, -1); + vc_resourcesIndexToBeDeleted := vc_resourcesIndexToBeDeleted & {v_resourceIndex}; + } + [] mccPort.receive(mw_response(mw_responsePrimitiveKO)) { + tc_ac.stop; + setverdict(inconc, __SCOPE__&":INFO: Error while creating resource type RemoteCSE"); + } + [] mccPort.receive { + tc_ac.stop; + setverdict(inconc, __SCOPE__&":INFO: Unexpected message received"); + } + [] tc_ac.timeout { + setverdict(inconc, __SCOPE__&":INFO: No answer while creating resource type RemoteCSE"); + } + } + + f_checkCseTesterStatus(); + + return v_resourceIndex; + + } }//end group helpingFunctions @@ -897,7 +973,18 @@ module OneM2M_Functions { log(__SCOPE__&": WARNING: Unexpected message received"); repeat; } - } + } + + /** + * @desc Cse altstep for config 04 + */ + altstep a_cse_cf04() runs on CseTester { + + [] mccPort.receive { + log(__SCOPE__&": WARNING: Unexpected message received"); + repeat; + } + } }//end group altstepFunctions diff --git a/LibOneM2M/OneM2M_Pixits.ttcn b/LibOneM2M/OneM2M_Pixits.ttcn index da172fcf0ec453a51f84e237c65d84562462f048..5daac4820f741bd9c492131856efa18840a8bd89 100644 --- a/LibOneM2M/OneM2M_Pixits.ttcn +++ b/LibOneM2M/OneM2M_Pixits.ttcn @@ -38,6 +38,8 @@ module OneM2M_Pixits { modulepar XSD.ID PX_CSE_ID := "cseId"; + modulepar XSD.ID PX_CSE1_ID := "MyCSEId"; + modulepar XSD.ID PX_CSE_RESOURCE_ID := "cseResourceId"; modulepar XSD.ID PX_AE1_ID_STEM := ""; diff --git a/LibOneM2M/OneM2M_Templates.ttcn b/LibOneM2M/OneM2M_Templates.ttcn index 3a7681e8c549b95d77ea53a99ccb1963a57b19ba..6fae6d15d17377af000d8a8c5466e67411bb4a25 100644 --- a/LibOneM2M/OneM2M_Templates.ttcn +++ b/LibOneM2M/OneM2M_Templates.ttcn @@ -455,6 +455,15 @@ module OneM2M_Templates { primitiveContent := {container_optional := m_contentCreateContainer} }; + /** + * @desc Base CREATE request primitive for remoteCSE resource + */ + template (value) RequestPrimitive m_createRemoteCSEBase(template (omit) AcpType p_accessControlPolicyIds := omit, template (omit) ResourceName p_resourceName := c_defaultRemoteCSEResourceName, in template (omit) XSD.AnyURI p_cSEBase := PX_CSE1_ID, in template (omit) XSD.ID p_cSE_ID := PX_CSE_ID) modifies m_create := { + requestIdentifier := testcasename() & "-m_createRemoteCSE" & f_rnd(1, 1000000), + resourceType := int16, + primitiveContent := {remoteCSE_optional := m_contentCreateRemoteCSE(p_resourceName, p_accessControlPolicyIds,p_cSEBase, p_cSE_ID)} + }; + /** * @desc CREATE request primitive for Container resource wiht no resourceName provided */ @@ -1402,6 +1411,36 @@ module OneM2M_Templates { choice := omit//NP }; + /** + * @desc Base primitiveContent for CREATE operation for Container resource + * @param p_name Resource name + */ + template (value) RemoteCSE_optional m_contentCreateRemoteCSE (in template (omit) XSD.String p_name := c_defaultRemoteCSEResourceName, in template (omit) AcpType p_accessControlPolicyIds, in template (omit) XSD.AnyURI p_cSEBase := PX_CSE1_ID, in template (omit) XSD.ID p_cSE_ID := PX_CSE_ID):= { + resourceName := p_name,//O + resourceType := omit,//NP + resourceID := omit,//NP + parentID := omit,//NP + creationTime := omit,//NP + lastModifiedTime := omit,//NP + labels := omit,//O + accessControlPolicyIDs := p_accessControlPolicyIds,//O + expirationTime := omit,//O + dynamicAuthorizationConsultationIDs := omit, + announceTo := omit,//O + announcedAttribute := omit,//O + cseType := omit,//O + pointOfAccess := omit,//O + cSEBase := "/" & p_cSEBase,//M + cSE_ID := "/" & p_cSE_ID,//M + m2M_Ext_ID := omit,//O + trigger_Recipient_ID := omit,//O + requestReachability := true,//M + nodeLink := omit,//O + e2eSecInfo := omit,//O + triggerReferenceNumber := omit,//O + choice := omit//O + }; + /** * @desc Base reception template of primitiveContent for CREATE operation for ContainerAnnc resource */ @@ -2118,6 +2157,58 @@ module OneM2M_Templates { expirationTime := *//M } + template RemoteCSE_optional m_contentRemoteCSE_allOmit := { + resourceName := omit,//M + resourceType := omit,//M + resourceID := omit,//M + parentID := omit,//M + creationTime := omit,//M + lastModifiedTime := omit,//M + labels := omit,//O + accessControlPolicyIDs := omit,//O + expirationTime := omit,//M + dynamicAuthorizationConsultationIDs := omit,//O + announceTo := omit,//O + announcedAttribute := omit,//O + cseType := omit,//O + pointOfAccess := omit,//O + cSEBase := omit,//M + cSE_ID := omit,//M + m2M_Ext_ID := omit,//O + trigger_Recipient_ID := omit,//O + requestReachability := omit,//M + nodeLink := omit,//O + e2eSecInfo := omit,//O + triggerReferenceNumber := omit,//O + choice := omit//O + }; + + template RemoteCSE_optional mw_contentRemoteCSEBase := { + resourceName := ?,//M + resourceType := ?,//M + resourceID := ?,//M + parentID := ?,//M + creationTime := ?,//M + lastModifiedTime := ?,//M + labels := *,//O + accessControlPolicyIDs := *,//O + expirationTime := ?,//M + dynamicAuthorizationConsultationIDs := *,//O + announceTo := *,//O + announcedAttribute := *,//O + cseType := *,//O + pointOfAccess := *,//O + cSEBase := ?,//M + cSE_ID := ?,//M + m2M_Ext_ID := *,//O + trigger_Recipient_ID := *,//O + requestReachability := ?,//M + nodeLink := *,//O + e2eSecInfo := *,//O + triggerReferenceNumber := *,//O + choice := *//O + }; + template Schedule_optional mw_contentScheduleBase := { resourceName := ?,//M resourceType := ?,//M diff --git a/LibOneM2M/OneM2M_TestSystem.ttcn b/LibOneM2M/OneM2M_TestSystem.ttcn index c0abf03c7dcca33dad452d4771dc8ee2fb49ff66..bc28985f28291b439a68a4bbf931115c6222150e 100644 --- a/LibOneM2M/OneM2M_TestSystem.ttcn +++ b/LibOneM2M/OneM2M_TestSystem.ttcn @@ -42,6 +42,7 @@ module OneM2M_TestSystem { //global variables var AE_optional vc_aeAux;//TODO To be removed + var RemoteCSE_optional vc_remoteCSEAux;//TODO To be removed var AccessControlPolicy_optional vc_acpAux; var integer vc_acpAuxIndex := -1; diff --git a/LibOneM2M/OneM2M_Types.ttcn b/LibOneM2M/OneM2M_Types.ttcn index 33c1d9e3c27a79e19f9e5ce18bcc8d06242124f9..2e33c7aa6283de7c2ac09df12babefcf9bb3d1f5 100644 --- a/LibOneM2M/OneM2M_Types.ttcn +++ b/LibOneM2M/OneM2M_Types.ttcn @@ -1642,6 +1642,7 @@ type union PrimitiveContent { Node_optional node_optional, NodeAnnc_optional nodeAnnc_optional, PollingChannel_optional pollingChannel_optional, + RemoteCSE_optional remoteCSE_optional, Schedule_optional schedule_optional, ScheduleAnnc_optional scheduleAnnc_optional, ServiceSubscribedAppRule_optional serviceSubscribedAppRule_optional, @@ -7324,6 +7325,72 @@ with { variant (resourceName) "attribute"; }; +type record RemoteCSE_optional +{ + ResourceName resourceName optional, + ResourceType resourceType optional, + XSD.ID resourceID optional, + NhURI parentID optional, + Timestamp creationTime optional, + Timestamp lastModifiedTime optional, + Labels labels optional, + AcpType accessControlPolicyIDs optional, + Timestamp expirationTime optional, + ListOfURIs dynamicAuthorizationConsultationIDs optional, + ListOfURIs announceTo optional, + record length(1 .. infinity) of XSD.NCName announcedAttribute optional, + CseTypeID cseType optional, + PoaList pointOfAccess optional, + XSD.AnyURI cSEBase optional, + XSD.ID cSE_ID optional, + ExternalID m2M_Ext_ID optional, + TriggerRecipientID trigger_Recipient_ID optional, + XSD.Boolean requestReachability optional, + XSD.AnyURI nodeLink optional, + E2eSecInfo e2eSecInfo optional, + XSD.UnsignedInt triggerReferenceNumber optional, + union { + record length(1 .. infinity) of ChildResourceRef childResource_list, + record length(1 .. infinity) of union { + NodeAnnc nodeAnnc, + Container container, + ContainerAnnc containerAnnc, + Group group_, + GroupAnnc groupAnnc, + AccessControlPolicy accessControlPolicy, + AccessControlPolicyAnnc accessControlPolicyAnnc, + Subscription subscription, + PollingChannel pollingChannel, + Schedule schedule, + TimeSeries timeSeries, + TimeSeriesAnnc timeSeriesAnnc, + LocationPolicyAnnc locationPolicyAnnc, + AEAnnc aEAnnc, + Sg_flexContainerResource_group sg_flexContainerResource, + Sg_announcedFlexContainerResource_group sg_announcedFlexContainerResource + } choice_list + } choice optional +} +with { + variant "name as uncapitalized"; + variant "element"; + variant (resourceName) "attribute"; + variant (announcedAttribute) "list"; + variant (cSEBase) "name as capitalized"; + variant (cSE_ID) "name as 'CSE-ID'"; + variant (m2M_Ext_ID) "name as 'M2M-Ext-ID'"; + variant (trigger_Recipient_ID) "name as 'Trigger-Recipient-ID'"; + //variant (requestReachability) "text 'true' as '1'"; + //variant (requestReachability) "text 'false' as '0'"; + variant (choice) "untagged"; + variant (choice.childResource_list) "untagged"; + variant (choice.childResource_list[-]) "name as 'childResource'"; + variant (choice.choice_list) "untagged"; + variant (choice.choice_list[-]) "untagged"; + variant (choice.choice_list[-].group_) "name as 'group'"; + variant (choice.choice_list[-].aEAnnc) "name as capitalized"; +}; + type record Schedule_optional { ResourceName resourceName optional, diff --git a/LibOneM2M/OneM2M_TypesAndValues.ttcn b/LibOneM2M/OneM2M_TypesAndValues.ttcn index c64e3cf1cbe3ccbfecc2e78208599fa253409310..309d0ea654792f6bb9c7f8de8f180c0363fa662b 100644 --- a/LibOneM2M/OneM2M_TypesAndValues.ttcn +++ b/LibOneM2M/OneM2M_TypesAndValues.ttcn @@ -25,10 +25,12 @@ module OneM2M_TypesAndValues { const XSD.String c_defaultSubscriptionResourceName := "MySubscriptionResource"; const XSD.String c_defaultContentInstanceResourceName := "MyContentInstanceResource"; const XSD.String c_defaultContainerResourceName := "MyContainerResource"; + const XSD.String c_defaultRemoteCSEResourceName := "MyRemoteCSEResource"; const XSD.String c_defaultMgmtObjResourceName := "MyMgmtObjResource"; const XSD.String c_defaultAeResourceName := "MyAeResource"; const XSD.String c_defaultLocationPolicyResourceName := "MyLocationPolicyResource"; const XSD.String c_defaultNodeResourceName := "MyNodeResource"; + const XSD.String c_defaultNodeID := "MyNodeId"; const XSD.ID c_aeAuxName := "MyAe"; const XSD.String c_acpAuxName := "MyAcp"; const charstring c_invalid_location_update_period := "-PT30M10S" ;//duration set to invalid value (minus value) @@ -107,7 +109,8 @@ module OneM2M_TypesAndValues { type enumerated Configurations { e_cf01, e_cf02, - e_cf03 + e_cf03, + e_cf04 }; diff --git a/OneM2M_Testcases.ttcn b/OneM2M_Testcases.ttcn index ed3746f10f21e04277c575d9f2b3644ffe1cea08..2a82830566c1f8335ac8fa02a31d4339cc334e59 100644 --- a/OneM2M_Testcases.ttcn +++ b/OneM2M_Testcases.ttcn @@ -471,6 +471,192 @@ module OneM2M_Testcases { f_cf02Down(); } + + group Create{ + + testcase TC_CSE_REG_CRE_BV_011() runs on CseTester system CseSystem { + + // Local variables + var MsgIn v_response; + var RequestPrimitive v_request; + var RequestPrimitive v_createRequestPrimitive := m_createRemoteCSEBase; + var ResourceType v_resourceType := int16; //remoteCSE + + // Test control + + // Test component configuration + f_cf04Up(); + + // Test adapter configuration + + // Preamble + + // Test Body + v_request := f_getCreateRequestPrimitive(v_resourceType, v_createRequestPrimitive, -1); + + mccPort.send(m_request(v_request)); + tc_ac.start; + alt { + [] mccPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + tc_ac.stop; + setverdict(pass, testcasename() & ": Resource type remoteCSE created successfully"); + } + [] mccPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { + tc_ac.stop; + setverdict(fail, testcasename() & ": Error while creating resource type remoteCSE"); + } + [] tc_ac.timeout { + setverdict(inconc, testcasename() & ": No answer while creating resource type remoteCSE"); + } + } + + // Postamble + f_cse_postamble_deleteResources(); + + // Tear down + f_cf04Down(); + + }//end TC_CSE_REG_CRE_BV_011 + + testcase TC_CSE_REG_CRE_BV_012() runs on CseTester system CseSystem { + + // Local variables + var MsgIn v_response; + var RequestPrimitive v_request; + var RequestPrimitive v_createRequestPrimitive := m_createRemoteCSEBase; + var ResourceType v_resourceType := int16; //remoteCSE + + // Test control + + // Test component configuration + f_cf04Up(); + + // Test adapter configuration + + // Preamble + + // Test Body + v_request := f_getCreateRequestPrimitive(v_resourceType, v_createRequestPrimitive, -1); + + mccPort.send(m_request(v_request)); + tc_ac.start; + alt { + [] mccPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + tc_ac.stop; + setverdict(pass, testcasename() & ": Resource type remoteCSE created successfully"); + } + [] mccPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { + tc_ac.stop; + setverdict(fail, testcasename() & ": Error while creating resource type remoteCSE"); + } + [] tc_ac.timeout { + setverdict(inconc, testcasename() & ": No answer while creating resource type remoteCSE"); + } + } + + // Postamble + f_cse_postamble_deleteResources(); + + // Tear down + f_cf04Down(); + + }//end TC_CSE_REG_CRE_BV_012 + + group g_CSE_REG_CRE_BV_015{ + + testcase TC_CSE_REG_CRE_BV_015_01() runs on CseTester system CseSystem { + // Local variables + var template RequestPrimitive v_createRequest := m_createRemoteCSEBase; + const AttributeAux c_optionalAttribute := {"labels", omit}; + + v_createRequest.primitiveContent.remoteCSE_optional.labels := {"MyLabel"}; + + f_CSE_REG_CRE_BV_015(v_createRequest, c_optionalAttribute); + + } + + testcase TC_CSE_REG_CRE_BV_015_02() runs on CseTester system CseSystem { + // Local variables + var template RequestPrimitive v_createRequest := m_createRemoteCSEBase; + const AttributeAux c_optionalAttribute := {"cseType", omit}; + + v_createRequest.primitiveContent.remoteCSE_optional.cseType := int1; + + f_CSE_REG_CRE_BV_015(v_createRequest, c_optionalAttribute); + + } + + testcase TC_CSE_REG_CRE_BV_015_03() runs on CseTester system CseSystem { + // Local variables + var template RequestPrimitive v_createRequest := m_createRemoteCSEBase; + const AttributeAux c_optionalAttribute := {"pointOfAccess", omit}; + + v_createRequest.primitiveContent.remoteCSE_optional.pointOfAccess := {"http://" & PX_CSE1_ADDRESS & "/"}; + + f_CSE_REG_CRE_BV_015(v_createRequest, c_optionalAttribute); + + } + + testcase TC_CSE_REG_CRE_BV_015_04() runs on CseTester system CseSystem { + // Local variables + var template RequestPrimitive v_createRequest := m_createRemoteCSEBase; + const AttributeAux c_optionalAttribute := {"nodeLink", omit}; + + v_createRequest.primitiveContent.remoteCSE_optional.nodeLink := c_defaultNodeID; + + f_CSE_REG_CRE_BV_015(v_createRequest, c_optionalAttribute); + + } + + function f_CSE_REG_CRE_BV_015(template RequestPrimitive p_requestPrimitive, in AttributeAux p_optionalAttribute) runs on CseTester { + + // Local variables + var MsgIn v_response; + var RequestPrimitive v_request; + var ResourceType v_resourceType := int16; //remoteCSE + + // Test control + + // Test component configuration + f_cf04Up(); + + // Test adapter configuration + + // Preamble + + // Test Body + v_request := f_getCreateRequestPrimitive(v_resourceType, p_requestPrimitive, -1); + + mccPort.send(m_request(v_request)); + tc_ac.start; + alt { + [] mccPort.receive(mw_response(mw_responsePrimitiveOK(f_getTemplateFromPrimitiveContent(v_request.primitiveContent)))) -> value v_response { + tc_ac.stop; + setverdict(pass, testcasename() & ": Accepted creation for resource type remoteCSE containing attribute " & p_optionalAttribute.name); + } + [] mccPort.receive(mw_response(mw_responsePrimitiveOK())) -> value v_response { + tc_ac.stop; + setverdict(fail, testcasename() & ": Accepted creation for resource type remoteCSE without containing attribute " & p_optionalAttribute.name); + } + [] mccPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { + tc_ac.stop; + setverdict(fail, testcasename() & ": Rejected creation of resource type remoteCSE containing attribute" & p_optionalAttribute.name); + } + [] tc_ac.timeout { + setverdict(fail, testcasename() & ": No answer while creating resource type remoteCSE"); + } + } + + // Postamble + f_cse_postamble_deleteResources(); + + // Tear down + f_cf04Down(); + + }//end f_CSE_REG_CRE_BV_015 + }// end group g_CSE_REG_CRE_BV_015 + + } }//end Registration @@ -4467,6 +4653,16 @@ module OneM2M_Testcases { f_CSE_DMR_RET_BV_013(int9, m_createGroupBase, v_contentResponse);//Group } + + testcase TC_CSE_DMR_RET_BV_013_09() runs on CseTester system CseSystem { + // Local variables + var template PrimitiveContent v_contentResponse; + + v_contentResponse.remoteCSE_optional := mw_contentRemoteCSEBase; + + f_CSE_DMR_RET_BV_013(int16, m_createRemoteCSEBase, v_contentResponse);//RemoteCSE + + } testcase TC_CSE_DMR_RET_BV_013_11() runs on CseTester system CseSystem { // Local variables @@ -4499,20 +4695,28 @@ module OneM2M_Testcases { var integer v_ae2Index := -1; // Test control - - // Test component configuration - f_cf01Up(); - - // Test adapter configuration - - // Preamble - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - f_cse_preamble_subscriptionVerification(v_notifyHandler, v_aeIndex, v_ae2Index, p_requestPrimitive, p_resourceType); + //Test component configuration + f_cf02Up(); - v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive);//under the CSEBase resource - - // Test Body + //Test adapter configuration + + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + + if (p_resourceType!=int16){ //ResourceType != RemoteCSE + + f_cse_preamble_subscriptionVerification(v_notifyHandler, v_aeIndex, v_ae2Index, p_requestPrimitive, p_resourceType); + + v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive);//under the CSEBase resource + + }else{ //ResourceType = RemoteCSE + + v_resourceIndex := f_registerRemoteCse(p_requestPrimitive); + + } + + //Test Body mcaPort.send(m_request(m_retrieveResource(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_aeIndex))));//from AE ID tc_ac.start; @@ -4538,7 +4742,7 @@ module OneM2M_Testcases { f_cse_postamble_deleteResources(); // Tear down - f_cf01Down(); + f_cf02Down(); }//end f_CSE_DMR_RET_BV_013 @@ -4692,6 +4896,16 @@ module OneM2M_Testcases { f_CSE_DMR_RET_BV_015(int9, m_createGroupBase, v_contentResponse);//Group } + + testcase TC_CSE_DMR_RET_BV_015_09() runs on CseTester system CseSystem { + // Local variables + var template PrimitiveContent v_contentResponse; + + v_contentResponse.remoteCSE_optional := m_contentRemoteCSE_allOmit; + v_contentResponse.remoteCSE_optional.parentID := ?; + + f_CSE_DMR_RET_BV_015(int16, m_createRemoteCSEBase, v_contentResponse);//RemoteCSE + } testcase TC_CSE_DMR_RET_BV_015_11() runs on CseTester system CseSystem { // Local variables @@ -4725,20 +4939,26 @@ module OneM2M_Testcases { var integer v_ae2Index := -1; // Test control - - // Test component configuration - f_cf01Up(); - + + //Test component configuration + f_cf02Up(); + // Test adapter configuration - + // Preamble v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - f_cse_preamble_subscriptionVerification(v_notifyHandler, v_aeIndex, v_ae2Index, p_requestPrimitive, p_resourceType); + if (p_resourceType!=int16){ //ResourceType != RemoteCSE + + f_cse_preamble_subscriptionVerification(v_notifyHandler, v_aeIndex, v_ae2Index, p_requestPrimitive, p_resourceType); + + v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive);//under the CSEBase resource + + }else{ + v_resourceIndex := f_registerRemoteCse(p_requestPrimitive); + } - v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive);//under the CSEBase resource - - // Test Body + //Test Body mcaPort.send(m_request(m_retrieveResourceAttributeToOption(f_getResourceAddress(v_resourceIndex) & v_attribute, f_getOriginator(v_aeIndex))));//from AE ID tc_ac.start; @@ -4764,8 +4984,8 @@ module OneM2M_Testcases { f_cse_postamble_deleteResources(); // Tear down - f_cf01Down(); - + f_cf02Down(); + }//end f_CSE_DMR_RET_BV_015 } // end g_CSE_DMR_RET_BV_015 @@ -4812,6 +5032,16 @@ module OneM2M_Testcases { f_CSE_DMR_RET_BV_016(int9, m_createGroupBase, v_contentResponse);//Group } + + testcase TC_CSE_DMR_RET_BV_016_09() runs on CseTester system CseSystem { + // Local variables + var template PrimitiveContent v_contentResponse; + + v_contentResponse.remoteCSE_optional := m_contentRemoteCSE_allOmit; + v_contentResponse.remoteCSE_optional.parentID := ?; + + f_CSE_DMR_RET_BV_016(int16, m_createRemoteCSEBase, v_contentResponse);//RemoteCSE + } testcase TC_CSE_DMR_RET_BV_016_11() runs on CseTester system CseSystem { // Local variables @@ -4845,20 +5075,25 @@ module OneM2M_Testcases { var integer v_ae2Index := -1; // Test control - - // Test component configuration - f_cf01Up(); - - // Test adapter configuration - - // Preamble - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - f_cse_preamble_subscriptionVerification(v_notifyHandler, v_aeIndex, v_ae2Index, p_requestPrimitive, p_resourceType); + //Test component configuration + f_cf02Up(); + + // Test adapter configuration + + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + + if (p_resourceType!=int16){ //ResourceType != RemoteCSE + + f_cse_preamble_subscriptionVerification(v_notifyHandler, v_aeIndex, v_ae2Index, p_requestPrimitive, p_resourceType); + + v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive);//under the CSEBase resource + + }else{ + v_resourceIndex := f_registerRemoteCse(p_requestPrimitive); + } - v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive);//under the CSEBase resource - - // Test Body mcaPort.send(m_request(m_retrieveResourceAttributeContentOption(f_getResourceAddress(v_resourceIndex) , {"pi"}, f_getOriginator(v_aeIndex))));//from AE ID tc_ac.start; @@ -4884,7 +5119,7 @@ module OneM2M_Testcases { f_cse_postamble_deleteResources(); // Tear down - f_cf01Down(); + f_cf02Down(); }//end f_CSE_DMR_RET_BV_016 @@ -4936,6 +5171,17 @@ module OneM2M_Testcases { f_CSE_DMR_RET_BV_017(int9, m_createGroupBase, v_contentResponse);//Group } + + testcase TC_CSE_DMR_RET_BV_017_09() runs on CseTester system CseSystem { + // Local variables + var template PrimitiveContent v_contentResponse; + + v_contentResponse.remoteCSE_optional := m_contentRemoteCSE_allOmit; + v_contentResponse.remoteCSE_optional.parentID := ?; + v_contentResponse.remoteCSE_optional.creationTime := ?; + + f_CSE_DMR_RET_BV_017(int16, m_createRemoteCSEBase, v_contentResponse);//RemoteCSE + } testcase TC_CSE_DMR_RET_BV_017_11() runs on CseTester system CseSystem { // Local variables @@ -4971,22 +5217,27 @@ module OneM2M_Testcases { var integer v_ae2Index := -1; // Test control - - // Test component configuration - f_cf01Up(); - - // Test adapter configuration - - // Preamble - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - f_cse_preamble_subscriptionVerification(v_notifyHandler, v_aeIndex, v_ae2Index, p_requestPrimitive, p_resourceType); + //Test component configuration + f_cf02Up(); + + // Test adapter configuration + + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + + if (p_resourceType!=int16){ //ResourceType != RemoteCSE + + f_cse_preamble_subscriptionVerification(v_notifyHandler, v_aeIndex, v_ae2Index, p_requestPrimitive, p_resourceType); + + v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive);//under the CSEBase resource + + }else{ + v_resourceIndex := f_registerRemoteCse(p_requestPrimitive); + } - v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive);//under the CSEBase resource - - // Test Body mcaPort.send(m_request(m_retrieveResourceAttributeContentOption(f_getResourceAddress(v_resourceIndex) , - {"pi", "ct"}, f_getOriginator(v_aeIndex))));//from AE ID + {"pi", "ct"}, f_getOriginator(v_aeIndex))));//from AE ID tc_ac.start; alt { @@ -5011,7 +5262,7 @@ module OneM2M_Testcases { f_cse_postamble_deleteResources(); // Tear down - f_cf01Down(); + f_cf02Down(); }//end f_CSE_DMR_RET_BV_017 @@ -5043,6 +5294,12 @@ module OneM2M_Testcases { f_CSE_DMR_RET_BO_018(int9, m_createGroupBase);//Group } + + testcase TC_CSE_DMR_RET_BO_018_09() runs on CseTester system CseSystem { + // Local variables + + f_CSE_DMR_RET_BO_018(int16, m_createRemoteCSEBase);//RemoteCSE + } testcase TC_CSE_DMR_RET_BO_018_11() runs on CseTester system CseSystem { // Local variables @@ -5068,27 +5325,33 @@ module OneM2M_Testcases { var integer v_ae2Index := -1; // Test control - - // Test component configuration - f_cf01Up(); - - // Test adapter configuration - - // Preamble - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - f_cse_preamble_subscriptionVerification(v_notifyHandler, v_aeIndex, v_ae2Index, p_requestPrimitive, p_resourceType); + //Test component configuration + f_cf02Up(); + + // Test adapter configuration + + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + + if (p_resourceType!=int16){ //ResourceType != RemoteCSE + + f_cse_preamble_subscriptionVerification(v_notifyHandler, v_aeIndex, v_ae2Index, p_requestPrimitive, p_resourceType); + + v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive);//under the CSEBase resource + + }else{ + v_resourceIndex := f_registerRemoteCse(p_requestPrimitive); + } - v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive);//under the CSEBase resource - - // Test Body mcaPort.send(m_request(m_retrieveResourceAttributeContentOption(f_getResourceAddress(v_resourceIndex), - {"lbl"}, f_getOriginator(v_aeIndex))));//from AE ID + {"lbl"}, f_getOriginator(v_aeIndex))));//from AE ID tc_ac.start; alt { [] mcaPort.receive(mw_response(mw_responsePrimitive(int4004))) -> value v_response { tc_ac.stop; + setverdict(pass, testcasename() & ": Retrieved attribute does not exist"); } [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { tc_ac.stop; @@ -5107,7 +5370,7 @@ module OneM2M_Testcases { f_cse_postamble_deleteResources(); // Tear down - f_cf01Down(); + f_cf02Down(); }//end f_CSE_DMR_RET_BO_018 @@ -5137,7 +5400,13 @@ module OneM2M_Testcases { // Local variables f_CSE_DMR_RET_BO_019(int9, m_createGroupBase);//Group - } + } + + testcase TC_CSE_DMR_RET_BO_019_09() runs on CseTester system CseSystem { + // Local variables + + f_CSE_DMR_RET_BO_019(int16, m_createRemoteCSEBase);//RemoteCSE + } testcase TC_CSE_DMR_RET_BO_019_11() runs on CseTester system CseSystem { // Local variables @@ -5149,7 +5418,7 @@ module OneM2M_Testcases { // Local variables f_CSE_DMR_RET_BO_019(int23, m_createSubscriptionBase);//Subscription - } + } function f_CSE_DMR_RET_BO_019(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive) runs on CseTester { @@ -5163,27 +5432,33 @@ module OneM2M_Testcases { var integer v_ae2Index := -1; // Test control - - // Test component configuration - f_cf01Up(); - - // Test adapter configuration - - // Preamble - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - f_cse_preamble_subscriptionVerification(v_notifyHandler, v_aeIndex, v_ae2Index, p_requestPrimitive, p_resourceType); + //Test component configuration + f_cf02Up(); + + // Test adapter configuration + + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + + if (p_resourceType!=int16){ //ResourceType != RemoteCSE + + f_cse_preamble_subscriptionVerification(v_notifyHandler, v_aeIndex, v_ae2Index, p_requestPrimitive, p_resourceType); + + v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive);//under the CSEBase resource + + }else{ + v_resourceIndex := f_registerRemoteCse(p_requestPrimitive); + } - v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive);//under the CSEBase resource - - // Test Body mcaPort.send(m_request(m_retrieveResourceAttributeContentOption(f_getResourceAddress(v_resourceIndex), - {"lbl", "at"}, f_getOriginator(v_aeIndex))));//from AE ID + {"lbl", "at"}, f_getOriginator(v_aeIndex))));//from AE ID tc_ac.start; alt { [] mcaPort.receive(mw_response(mw_responsePrimitive(int4004))) -> value v_response { tc_ac.stop; + setverdict(pass, testcasename() & ": Retrieved attribute does not exist"); } [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { tc_ac.stop; @@ -5202,7 +5477,7 @@ module OneM2M_Testcases { f_cse_postamble_deleteResources(); // Tear down - f_cf01Down(); + f_cf02Down(); }//end f_CSE_DMR_RET_BO_019