diff --git a/LibOneM2M/OneM2M_Functions.ttcn b/LibOneM2M/OneM2M_Functions.ttcn index bacfc8472ce24825992283bdf30ca767a50eacb0..b6170c3abc5dc8ea0338cfe3dfd7c0d3cd7ac7ce 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))) { @@ -958,6 +997,49 @@ module OneM2M_Functions { return false; } } + + /** + * @desc Registration of Test System (simulating a CSE) to the CSE IUT (creation of remoteCSE) + * @param p_requestPrimitive Template request primitive + * @return Internal resource index of the created resource + */ + function f_cse_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 @@ -987,7 +1069,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 5bf72c72c3318e38aa27628a4b7a5b9584f36289..ccea65b56d26a6d1b9de3c99c4b76ac18f04b016 100644 --- a/LibOneM2M/OneM2M_Templates.ttcn +++ b/LibOneM2M/OneM2M_Templates.ttcn @@ -7,7 +7,7 @@ * * @author oneM2M * @version $URL: https://oldforge.etsi.org/svn/oneM2M/trunk/ttcn/LibOneM2M/OneM2M_Templates.ttcn $ - * $Id: OneM2M_Templates.ttcn 299 2017-06-20 12:36:36Z reinaortega $ + * $Id: OneM2M_Templates.ttcn 305 2017-06-20 13:56:26Z reinaortega $ * @desc Module containing templates for oneM2M * */ @@ -559,6 +559,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 */ @@ -1584,6 +1593,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 */ @@ -2407,6 +2446,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 1c457afc31abeb257e3f48c7dff8545703fd52bf..b78a04b9cafdb1fbe2452f088c99820565c458c5 100644 --- a/LibOneM2M/OneM2M_Types.ttcn +++ b/LibOneM2M/OneM2M_Types.ttcn @@ -7,7 +7,7 @@ * * @author oneM2M * @version $URL: https://oldforge.etsi.org/svn/oneM2M/trunk/ttcn/LibOneM2M/OneM2M_Types.ttcn $ - * $Id: OneM2M_Types.ttcn 298 2017-06-14 07:11:13Z reinaortega $ + * $Id: OneM2M_Types.ttcn 305 2017-06-20 13:56:26Z reinaortega $ * @desc OneM2M data types module * */ @@ -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, StatsConfig_optional statsConfig_optional, @@ -7327,6 +7328,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 a393a8d4af226408f31ab6491169860a97b4a5ed..594e25427c1d548fb9dfaf3c9cae95a6ae986a37 100644 --- a/LibOneM2M/OneM2M_TypesAndValues.ttcn +++ b/LibOneM2M/OneM2M_TypesAndValues.ttcn @@ -6,8 +6,8 @@ * All rights reserved. * * @author oneM2M - * @version $URL: https://forge.etsi.org/svn/oneM2M/trunk/ttcn/LibOneM2M/OneM2M_TypesAndValues.ttcn $ - * $Id: OneM2M_TypesAndValues.ttcn 287 2017-05-19 06:59:12Z reinaortega $ + * @version $URL: https://oldforge.etsi.org/svn/oneM2M/trunk/ttcn/LibOneM2M/OneM2M_TypesAndValues.ttcn $ + * $Id: OneM2M_TypesAndValues.ttcn 305 2017-06-20 13:56:26Z reinaortega $ * @desc Module containing types and values for oneM2M * */ @@ -25,11 +25,13 @@ 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_defaultMgmtCmdResourceName := "MyMgmtCmdResource"; 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.String c_defaultStatsConfigResourceName := "MyStatsConfigResource"; const XSD.String c_defaultStatsCollectResourceName := "MyStatsCollectResource"; const XSD.String c_defaultm2mServiceSubscriptionProfileResourceName := "Mym2mServiceSubscriptionProfileResource"; @@ -112,7 +114,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 17f1ac7ada57a5228051a5926ac7335d1dcece8a..33874864f38e599c624cba96c5171e635f37e399 100644 --- a/OneM2M_Testcases.ttcn +++ b/OneM2M_Testcases.ttcn @@ -7,7 +7,7 @@ * * @author oneM2M * @version $URL: https://oldforge.etsi.org/svn/oneM2M/trunk/ttcn/OneM2M_Testcases.ttcn $ - * $Id: OneM2M_Testcases.ttcn 299 2017-06-20 12:36:36Z reinaortega $ + * $Id: OneM2M_Testcases.ttcn 305 2017-06-20 13:56:26Z reinaortega $ * @desc Module containing test cases for oneM2M * */ @@ -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(fail, 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(fail, 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 @@ -1134,7 +1320,7 @@ module OneM2M_Testcases { v_childResourceIndex := f_cse_createResource(valueof(p_childResourceType), p_childRequestPrimitive, v_resourceIndex); } - // Test Body + // Test Bodyi v_request := valueof(m_retrieveResource(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_resourceIndex))); v_request.resultContent := int6;//Child resource references mcaPort.send(m_request(v_request)); @@ -4679,6 +4865,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 @@ -4711,20 +4907,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_cse_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; @@ -4750,7 +4954,7 @@ module OneM2M_Testcases { f_cse_postamble_deleteResources(); // Tear down - f_cf01Down(); + f_cf02Down(); }//end f_CSE_DMR_RET_BV_013 @@ -4904,6 +5108,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 @@ -4937,20 +5151,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_cse_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; @@ -4976,8 +5196,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 @@ -5024,6 +5244,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 @@ -5057,20 +5287,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_cse_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; @@ -5096,7 +5331,7 @@ module OneM2M_Testcases { f_cse_postamble_deleteResources(); // Tear down - f_cf01Down(); + f_cf02Down(); }//end f_CSE_DMR_RET_BV_016 @@ -5148,6 +5383,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 @@ -5183,22 +5429,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_cse_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 { @@ -5223,7 +5474,7 @@ module OneM2M_Testcases { f_cse_postamble_deleteResources(); // Tear down - f_cf01Down(); + f_cf02Down(); }//end f_CSE_DMR_RET_BV_017 @@ -5255,6 +5506,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 @@ -5280,27 +5537,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_cse_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; @@ -5319,7 +5582,7 @@ module OneM2M_Testcases { f_cse_postamble_deleteResources(); // Tear down - f_cf01Down(); + f_cf02Down(); }//end f_CSE_DMR_RET_BO_018 @@ -5349,7 +5612,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 @@ -5361,7 +5630,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 { @@ -5375,27 +5644,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_cse_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; @@ -5414,7 +5689,7 @@ module OneM2M_Testcases { f_cse_postamble_deleteResources(); // Tear down - f_cf01Down(); + f_cf02Down(); }//end f_CSE_DMR_RET_BO_019