diff --git a/LibOneM2M/OneM2M_Functions.ttcn b/LibOneM2M/OneM2M_Functions.ttcn index 9ff5e230083dbd6034d5e1e4cb80014682805bd0..a073d788cb52f636d77937f7d2152c69475a4efe 100644 --- a/LibOneM2M/OneM2M_Functions.ttcn +++ b/LibOneM2M/OneM2M_Functions.ttcn @@ -14,6 +14,7 @@ module OneM2M_Functions { import from XSD all; + import from LibCommon_Time all; import from OneM2M_Templates all; import from OneM2M_Types all; import from OneM2M_TypesAndValues all; @@ -779,11 +780,9 @@ module OneM2M_Functions { for(i := lengthof(vc_resourcesIndexToBeDeleted) -1; i >=0; i := i - 1) { - v_resourceAddress := f_getResourceAddress(vc_resourcesIndexToBeDeleted[i], e_nonHierarchical); + v_resourceAddress := f_getResourceAddress(vc_resourcesIndexToBeDeleted[i]); v_request := valueof(m_delete(v_resourceAddress, f_getOriginator(vc_resourcesIndexToBeDeleted[i],false))); - - v_request.from_ := PX_SUPER_CSE_ID; mccPort.send(m_request(v_request)); @@ -856,6 +855,37 @@ module OneM2M_Functions { return v_resourceIndex; } + + /** + * @desc Message exchange for the update of an announced resource + * @param p_requestPrimitive UPDATE request primitive to be used + * @verdict + */ + function f_cse_updateAnnouncedResource(in RequestPrimitive p_requestPrimitive) runs on CseSimu { + + mccPort.send(m_request(p_requestPrimitive)); + tc_ac.start; + alt { + [] mccPort.receive(mw_response(mw_responsePrimitiveOK)) -> value vc_response { + tc_ac.stop; + setverdict(pass, __SCOPE__&":INFO: Attribute of announced resource updated successfuly"); + } + [] mccPort.receive(mw_response(mw_responsePrimitiveKO)) -> value vc_response { + tc_ac.stop; + setverdict(inconc, __SCOPE__&":INFO: Error while updating announced resource"); + } + [] mccPort.receive{ + tc_ac.stop; + setverdict(inconc, __SCOPE__&":INFO: Unexpected message received"); + } + [] tc_ac.timeout { + setverdict(inconc, __SCOPE__&":INFO: No answer while updating announced resource"); + } + } + + f_checkCseSimuStatus(); + + }// end f_cse_updateAnnouncedResource /** * @desc Creation of the auxiliar ACP resource @@ -1190,7 +1220,7 @@ module OneM2M_Functions { tc_ac.stop; setverdict(pass, __SCOPE__&":INFO: Resource type " & int2str(enum2int(p_resourceType)) & " created successfuly"); f_checkAttributesToBeSaved(p_resourceType, v_request, vc_response.primitive.responsePrimitive); - v_resourceIndex := f_setResource(vc_response.primitive.responsePrimitive.primitiveContent, p_resourceType, vc_remoteCseIndex); + v_resourceIndex := f_setResource(vc_response.primitive.responsePrimitive.primitiveContent, f_getAnnouncedResourceType(p_resourceType), vc_remoteCseIndex); } [] mccPort.receive(mw_response(mw_responsePrimitiveKO)) { tc_ac.stop; @@ -1770,7 +1800,7 @@ module OneM2M_Functions { v_response.primitiveContent.remoteCSE := vc_localResourcesList[vc_localRemoteCseIndex].resource.remoteCSE; mccPortIn.send(m_response(v_response)); - v_resourceIndex := f_setResource(m_primitiveContentRemoteCSE(m_contentMyRemoteCSEResource), int16, -1); + v_resourceIndex := f_setResource(valueof(m_primitiveContentRemoteCSE(m_contentMyRemoteCSEResource)), int16, -1); } [] mccPortIn.receive { tc_ac.stop; @@ -1782,6 +1812,9 @@ module OneM2M_Functions { } f_checkCseSimuStatus(); + + //In order for the IUT to perform some actions + f_sleep(10.0); return v_resourceIndex; @@ -2213,7 +2246,7 @@ module OneM2M_Functions { p_request.requestIdentifier := valueof(p_request.requestIdentifier) & f_rnd(1, 1000000); - if(p_resourceType != int2) { + if((p_resourceType != int2) and (p_resourceType != int10002)) { if(p_resourceType == int16) { p_request.from_ := PX_CSE1_ID; } else { @@ -2224,6 +2257,7 @@ module OneM2M_Functions { } } } + p_request.to_ := f_getResourceAddress(p_parentIndex); if (p_resourceType == int1) {//AccessControlPolicy @@ -2348,9 +2382,15 @@ module OneM2M_Functions { p_request.requestIdentifier := valueof(p_request.requestIdentifier) & f_rnd(1, 1000000); - p_request.from_ := f_getOriginator(p_resourceIndex); - - p_request.to_ := f_getResourceAddress(p_resourceIndex); + if(p_resourceType != int10002) { + p_request.from_ := f_getOriginator(p_resourceIndex); + + p_request.to_ := f_getResourceAddress(p_resourceIndex); + } else { + p_request.from_ := PX_CSE1_ID & "/" & f_getResourceId(vc_resourcesList[p_resourceIndex].resource); + + p_request.to_ := f_getResourceAddress(p_resourceIndex, -, e_spRelative); + } if (p_resourceType == int3) {//Container @@ -2410,6 +2450,9 @@ module OneM2M_Functions { if(ischosen(p_contentResource.aE)) { return f_resourceIdCleaner(p_contentResource.aE.resourceID); } + if(ischosen(p_contentResource.aEAnnc)) { + return f_resourceIdCleaner(p_contentResource.aEAnnc.resourceID); + } if(ischosen(p_contentResource.serviceSubscribedAppRule)) { return f_resourceIdCleaner(p_contentResource.serviceSubscribedAppRule.resourceID); } @@ -2470,6 +2513,9 @@ module OneM2M_Functions { if(ischosen(p_contentResource.aE)) { return p_contentResource.aE.resourceName; } + if(ischosen(p_contentResource.aEAnnc)) { + return p_contentResource.aEAnnc.resourceName; + } if(ischosen(p_contentResource.serviceSubscribedAppRule)) { return p_contentResource.serviceSubscribedAppRule.resourceName; } diff --git a/LibOneM2M/OneM2M_Pics.ttcn b/LibOneM2M/OneM2M_Pics.ttcn index e5e472d31de077bb4ab42c69442f2033a56431e0..abdd8b751b92dc9b0c34e674787aa5f6508a59a2 100644 --- a/LibOneM2M/OneM2M_Pics.ttcn +++ b/LibOneM2M/OneM2M_Pics.ttcn @@ -32,8 +32,7 @@ module OneM2M_Pics { modulepar boolean PICS_ACP_LBL := true; modulepar boolean PICS_ACP_AT := true; - modulepar boolean PICS_ACP_ET := true; - + //AE optional attributes modulepar boolean PICS_AE_LBL := true; @@ -98,7 +97,6 @@ module OneM2M_Pics { modulepar boolean PICS_SUB_NEC := true; modulepar boolean PICS_SUB_SU := true; modulepar boolean PICS_SUB_LBL := true; - modulepar boolean PICS_SUB_ET := true; modulepar boolean PICS_SUB_GPI := true; modulepar boolean PICS_SUB_BN := true; modulepar boolean PICS_SUB_RL := true; diff --git a/LibOneM2M/OneM2M_Pixits.ttcn b/LibOneM2M/OneM2M_Pixits.ttcn index 903e3a5ef21961f1c149750cd0b812be0d04328f..f4ab4c6ce0f2ccc898efb6bd33506556ad2f14c5 100644 --- a/LibOneM2M/OneM2M_Pixits.ttcn +++ b/LibOneM2M/OneM2M_Pixits.ttcn @@ -134,24 +134,11 @@ module OneM2M_Pixits { group ExecutionParameters { - modulepar boolean PX_DELETE_CREATED_RESOURCES := true; - - modulepar XSD.AnyURI PX_RESOURCE_TO_BE_DELETED := "/ae_test"; - modulepar XSD.IDREFS PX_RESOURCES_TO_BE_DELETED := {"MyAe"}; modulepar boolean PX_RUN_POSTAMBLE := true; - - } - - - - - - - modulepar boolean PX_USE_RESOURCE_ID_AS_ORIGINATOR := true; //for checking whether the locationPolicy creation request is originated from a ASN-AE //NOTE: Apply to Device-based location request, and this requires Test System (TS) to activate ASN-AE mode to test IUT diff --git a/LibOneM2M/OneM2M_Templates.ttcn b/LibOneM2M/OneM2M_Templates.ttcn index 148ef2e9f38676f0e2cfe999bcc504f3a0f68f68..7464dadf3ffe84936846e5ca630b8205050ea75b 100644 --- a/LibOneM2M/OneM2M_Templates.ttcn +++ b/LibOneM2M/OneM2M_Templates.ttcn @@ -407,7 +407,6 @@ module OneM2M_Templates { requestIdentifier := "m_updateAe", primitiveContent:= {aE := m_contentUpdateAe} }; - /** * @desc Reception template for update Ae resource @@ -511,15 +510,10 @@ module OneM2M_Templates { primitiveContent := {remoteCSE := m_contentUpdateRemoteCSE} } - template (value) RequestPrimitive m_updateAE modifies m_update := { - requestIdentifier := "m_updateAE", - primitiveContent := {aE := m_contentUpdateAe} - } - - template (value) RequestPrimitive m_updateAEAnnc(template (omit) AcpType p_accessControlPolicyIds := omit, template (omit) XSD.ID p_to := omit, template (omit) XSD.ID p_from := omit, XSD.ID p_appId, XSD.ID p_stemId := "") modifies m_update:= { + template (value) RequestPrimitive m_updateAEAnncBase modifies m_update:= { requestIdentifier := testcasename() & "-m_updateAEAnnc", resourceType := int10002, - primitiveContent := {aEAnnc := m_contentUpdateAEAnnc(p_appId,p_stemId)} + primitiveContent := {aEAnnc := m_contentUpdateAEAnnc} }; }//end group Update @@ -1255,7 +1249,7 @@ module OneM2M_Templates { lastModifiedTime := omit,//NP labels := p_labels,//O accessControlPolicyIDs := p_accessControlPolicyIds,//O - expirationTime := omit,//O + expirationTime := "20301231T012345",//O link := p_link,//M TODO Put the right value appName := omit,//O app_ID := p_appId,//M @@ -2398,7 +2392,7 @@ module OneM2M_Templates { choice := omit } - template (value) AEAnnc_optional m_contentUpdateAEAnnc (template (omit) XSD.ID p_appId := omit, template (omit) XSD.ID p_stemId := omit) := { + template (value) AEAnnc_optional m_contentUpdateAEAnnc := { resourceName := omit, resourceType := omit, resourceID := omit, @@ -2410,7 +2404,7 @@ module OneM2M_Templates { expirationTime := omit, link := omit, appName := omit, - app_ID := p_appId, + app_ID := omit, aE_ID := omit, pointOfAccess := omit, ontologyRef := omit, @@ -2870,6 +2864,7 @@ module OneM2M_Templates { template RemoteCSE_optional m_contentMyRemoteCSEResource modifies m_contentRemoteCSE_allOmit := { resourceName := PX_CSE1_NAME,//M resourceType := int16,//M + resourceID := PX_CSE1_RESOURCE_ID,//M pointOfAccess := {PX_CSE1_ADDRESS},//O cSEBase := PX_CSE1_NAME,//M cSE_ID := PX_CSE1_ID,//M diff --git a/OneM2M_PermutationFunctions.ttcn b/OneM2M_PermutationFunctions.ttcn index 074eff3ad67aa8c9e3516d1c4ba99ebbf5725227..20f6c6f357efe2be81f46e1b8e7abd7c7ce2fee2 100644 --- a/OneM2M_PermutationFunctions.ttcn +++ b/OneM2M_PermutationFunctions.ttcn @@ -1329,17 +1329,17 @@ module OneM2M_PermutationFunctions { [] mccPort.receive(mw_response(mw_responsePrimitive(int2001, f_getTemplateFromPrimitiveContent(v_request.primitiveContent)))) -> value v_response { tc_ac.stop; setverdict(pass, __SCOPE__ & ": Accepted creation for resource type remoteCSE containing attribute " & p_optionalAttribute.name); - f_setResource(v_request.primitiveContent,int16); + f_setResource(v_response.primitive.responsePrimitive.primitiveContent,int16); } [] mccPort.receive(mw_response(mw_responsePrimitiveOK(f_getTemplateFromPrimitiveContent(v_request.primitiveContent)))) -> value v_response { tc_ac.stop; setverdict(fail, __SCOPE__ & ": Wrong response status code in the response"); - f_setResource(v_request.primitiveContent,int16); + f_setResource(v_response.primitive.responsePrimitive.primitiveContent,int16); } [] mccPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { tc_ac.stop; setverdict(fail, __SCOPE__ & ": Accepted creation for resource type remoteCSE without containing attribute " & p_optionalAttribute.name); - f_setResource(v_request.primitiveContent,int16); + f_setResource(v_response.primitive.responsePrimitive.primitiveContent,int16); } [] mccPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { tc_ac.stop; @@ -1410,8 +1410,8 @@ module OneM2M_PermutationFunctions { var ResponsePrimitive v_responsePrimitive; //Test control - if(not(PICS_MN_CSE)) { - setverdict(inconc, __SCOPE__ & ": IUT shall be MN-CSE to run this test case"); + if(not(PICS_MN_CSE or PICS_ASN_CSE)) { + setverdict(inconc, __SCOPE__ & ": IUT shall be MN-CSE or ASN-CSE to run this test case"); stop; } diff --git a/OneM2M_TestControl_ASN_profile.ttcn b/OneM2M_TestControl_ASN_profile.ttcn index 5beaa57c753b08f4738c9d426f8dc597000fcfda..6d81a4d006d690f06062bf0f0a659ef66752f9fa 100644 --- a/OneM2M_TestControl_ASN_profile.ttcn +++ b/OneM2M_TestControl_ASN_profile.ttcn @@ -20,43 +20,15 @@ module OneM2M_TestControl_ASN_profile { control { //CE_GEN_00001 - if(PICS_PRIMITIVE_SCOPE_CSE_RELATIVE and PICS_UNSTRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT) {execute (TC_CSE_GEN_CRE_001_CSR());} - if(PICS_PRIMITIVE_SCOPE_SP_RELATIVE and PICS_UNSTRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT) {execute (TC_CSE_GEN_CRE_001_SPR());} - if(PICS_PRIMITIVE_SCOPE_ABSOLUTE and PICS_UNSTRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT) {execute (TC_CSE_GEN_CRE_001_ABS());} - if(PICS_PRIMITIVE_SCOPE_CSE_RELATIVE and PICS_UNSTRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT) {execute (TC_CSE_GEN_RET_001_CSR());} - if(PICS_PRIMITIVE_SCOPE_SP_RELATIVE and PICS_UNSTRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT) {execute (TC_CSE_GEN_RET_001_SPR());} - if(PICS_PRIMITIVE_SCOPE_ABSOLUTE and PICS_UNSTRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT) {execute (TC_CSE_GEN_RET_001_ABS());} - if(PICS_PRIMITIVE_SCOPE_CSE_RELATIVE and PICS_UNSTRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT) {execute (TC_CSE_GEN_UPD_001_CSR());} - if(PICS_PRIMITIVE_SCOPE_SP_RELATIVE and PICS_UNSTRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT) {execute (TC_CSE_GEN_UPD_001_SPR());} - if(PICS_PRIMITIVE_SCOPE_ABSOLUTE and PICS_UNSTRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT) {execute (TC_CSE_GEN_UPD_001_ABS());} - if(PICS_PRIMITIVE_SCOPE_CSE_RELATIVE and PICS_UNSTRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT) {execute (TC_CSE_GEN_DEL_001_CSR());} - if(PICS_PRIMITIVE_SCOPE_SP_RELATIVE and PICS_UNSTRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT) {execute (TC_CSE_GEN_DEL_001_SPR());} - if(PICS_PRIMITIVE_SCOPE_ABSOLUTE and PICS_UNSTRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT) {execute (TC_CSE_GEN_DEL_001_ABS());} - if(PICS_PRIMITIVE_SCOPE_CSE_RELATIVE and PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT) {execute (TC_CSE_GEN_CRE_002_CSR());} - if(PICS_PRIMITIVE_SCOPE_SP_RELATIVE and PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT) {execute (TC_CSE_GEN_CRE_002_SPR());} - if(PICS_PRIMITIVE_SCOPE_ABSOLUTE and PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT) {execute (TC_CSE_GEN_CRE_002_ABS());} - if(PICS_PRIMITIVE_SCOPE_CSE_RELATIVE and PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT) {execute (TC_CSE_GEN_RET_002_CSR());} - if(PICS_PRIMITIVE_SCOPE_SP_RELATIVE and PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT) {execute (TC_CSE_GEN_RET_002_SPR());} - if(PICS_PRIMITIVE_SCOPE_ABSOLUTE and PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT) {execute (TC_CSE_GEN_RET_002_ABS());} - if(PICS_PRIMITIVE_SCOPE_CSE_RELATIVE and PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT) {execute (TC_CSE_GEN_UPD_002_CSR());} - if(PICS_PRIMITIVE_SCOPE_SP_RELATIVE and PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT) {execute (TC_CSE_GEN_UPD_002_SPR());} - if(PICS_PRIMITIVE_SCOPE_ABSOLUTE and PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT) {execute (TC_CSE_GEN_UPD_002_ABS());} - if(PICS_PRIMITIVE_SCOPE_CSE_RELATIVE and PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT) {execute (TC_CSE_GEN_DEL_002_CSR());} - if(PICS_PRIMITIVE_SCOPE_SP_RELATIVE and PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT) {execute (TC_CSE_GEN_DEL_002_SPR());} - if(PICS_PRIMITIVE_SCOPE_ABSOLUTE and PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT) {execute (TC_CSE_GEN_DEL_002_ABS());} - + //CE_GEN_00002 //CE_REG_00005 - if(true) {execute (TC_CSE_REG_CRE_024());} - if(true) {execute (TC_CSE_DMR_RET_013_CSR());} - if(true) {execute (TC_CSE_REG_CRE_026_POA());} + if(PICS_ASN_CSE) {execute (TC_CSE_REG_CRE_024());} + if(PICS_CSR_POA) {execute (TC_CSE_REG_CRE_026_POA());} //CE_DMR_00002 - if(true) {execute (TC_CSE_DMR_CRE_001_CIN_CNT());} - if(true) {execute (TC_CSE_DMR_RET_001_CIN());} - if(true) {execute (TC_CSE_DMR_UPD_011());} - if(true) {execute (TC_CSE_DMR_DEL_001_CIN());} + } diff --git a/OneM2M_Testcases_CSE_Release_1.ttcn b/OneM2M_Testcases_CSE_Release_1.ttcn index d3c1af82f2ce6644a739502fe1fb2938f8504c23..8c84d226ce3d86507e9bbe129b7028430064f1fe 100644 --- a/OneM2M_Testcases_CSE_Release_1.ttcn +++ b/OneM2M_Testcases_CSE_Release_1.ttcn @@ -377,7 +377,7 @@ module OneM2M_Testcases_CSE_Release_1 { group Create{ /** - * @desc Check that the IUT accepts an AE registration (allowed App-ID, C-AE-ID-STEM not provided by AE) + * @desc Check that the IUT accepts a create request of <AE> resource with attributes multiplicity equals to 1 and provided preprovisioned SP_relative_ AE_ID. * */ testcase TC_CSE_REG_CRE_001() runs on AeSimu system CseSystem { @@ -386,7 +386,8 @@ module OneM2M_Testcases_CSE_Release_1 { var RequestPrimitive v_request; var integer v_cseBaseIndex := -1; var ResourceType v_resourceType := int2; - + var charstring v_action := __SCOPE__ & ": Please, make sure that the following AE-ID is allowed to register: " & PX_ALLOWED_C_AE_IDS[0]; + //Test control if(not(PICS_IN_CSE)) { setverdict(inconc, __SCOPE__ & ": IUT shall be IN-CSE to run this test case"); @@ -397,9 +398,11 @@ module OneM2M_Testcases_CSE_Release_1 { f_cf01Up(); //Preamble - + action(v_action); + f_sleepIgnoreDef(30.0); + //Test Body - v_request := valueof(m_createAe(PX_APP_ID, omit, "S-AE-ID-STEM")); + v_request := valueof(m_createAe(PX_APP_ID, omit, f_getResourceAddress(-1, -, e_spRelative) & "/" & PX_ALLOWED_C_AE_IDS[0])); v_request := f_getCreateRequestPrimitive(v_resourceType, v_request, -1); @@ -510,6 +513,7 @@ module OneM2M_Testcases_CSE_Release_1 { var RequestPrimitive v_request; var integer v_cseBaseIndex := -1; var ResourceType v_resourceType := int2; + var charstring v_action := __SCOPE__ & ": Please, make sure that the following AE-ID is not allowed to register: " & PX_NOT_ALLOWED_C_AE_IDS[0]; //Test control @@ -520,6 +524,8 @@ module OneM2M_Testcases_CSE_Release_1 { //vc_remoteCseIndex := f_cse_registrationRemoteCse(mw_createRemoteCSE); //TODO: create serviceSubscribedProfile, Node, and serviceSubscribedAppRule //v_cseBaseIndex := f_cse_preamble_createServiceSubscribedProfile({"C*"}); //c_CRUDNDi); + action(v_action); + f_sleepIgnoreDef(30.0); //Test Body //v_request := valueof(m_createAe(PX_APP_ID, omit, "C-AE-ID-STEM")); @@ -573,11 +579,11 @@ module OneM2M_Testcases_CSE_Release_1 { tc_ac.start; alt{ - []mccPortIn.receive(mw_request(mw_createAEAnnc(f_getResourceAddress(-1,e_hierarchical, e_spRelative) & "/S", "CSE_ID", -))){ + [] mccPortIn.receive(mw_request(mw_createAEAnnc(f_getResourceAddress(-1,e_hierarchical, e_spRelative) & "/S", "CSE_ID", -))){ tc_ac.stop; setverdict(pass, __SCOPE__ & ": AE creation redirected."); } - []mccPortIn.receive(mw_request(mw_createAEAnnc(f_getResourceAddress(-1,e_hierarchical, e_absolute) & "/S", "CSE_ID", -))){ + [] mccPortIn.receive(mw_request(mw_createAEAnnc(f_getResourceAddress(-1,e_hierarchical, e_absolute) & "/S", "CSE_ID", -))){ tc_ac.stop; setverdict(pass, __SCOPE__ & ": AE creation redirected."); } @@ -796,15 +802,20 @@ module OneM2M_Testcases_CSE_Release_1 { //Preambule vc_remoteCseIndex := f_cse_registerRemoteCse(m_createRemoteCSEBase); - - v_aeAnncIndex := f_cse_announceResource(int2, m_createAEAnnc(-, "/" & "SAE1", PX_APP_ID, PX_CSE1_ID & "/" & "SAE1")); + + //Create AEAnnc + v_aeAnncIndex := f_cse_announceResource(int2, m_createAEAnnc(-, PX_CSE1_ID & "/" & "S", PX_APP_ID, PX_CSE1_ID & "/" & "S")); + + //Update AEAnnc to simulate deregistration of AE + v_request := f_getUpdateRequestPrimitive(f_getAnnouncedResourceType(int2),v_aeAnncIndex, valueof(m_updateAEAnncBase));//TODO + //v_request.primitiveContent.aEAnnc.link := "";//TODO To fix when base specs are fixed + + f_cse_updateAnnouncedResource(v_request); //Test Body - v_request := valueof(m_updateAEAnnc(-, -, -, PX_APP_ID, -)); //TODO to double check all parameters + v_request := valueof(m_updateAEAnncBase); v_request := f_getUpdateRequestPrimitive(f_getAnnouncedResourceType(int2),v_aeAnncIndex, v_request);//TODO - v_request.from_ := f_getResourceAddress(-1,e_hierarchical, e_absolute) & "/S"; - v_request.primitiveContent.aEAnnc.app_ID := PX_APP_ID; v_request.primitiveContent.aEAnnc.labels := {"Credential-ID:None"}; mccPort.send(m_request(v_request)); @@ -948,11 +959,6 @@ module OneM2M_Testcases_CSE_Release_1 { setverdict(fail, __SCOPE__ & "Resource ID not set correctly."); } - if(f_isScopeSpRelative(v_response.primitive.responsePrimitive.primitiveContent.aE.aE_ID)){ - setverdict(pass, __SCOPE__ & "AE ID set correctly."); - } else { - setverdict(fail, __SCOPE__ & "AE ID not set correctly."); - } } [] mcaPort.receive(mw_response(mw_responsePrimitiveInverse(int2001))) -> value v_response{ tc_ac.stop; @@ -1075,15 +1081,17 @@ module OneM2M_Testcases_CSE_Release_1 { var RequestPrimitive v_request; var integer v_cseBaseIndex := -1; var ResourceType v_resourceType := int2; - + var charstring v_action := __SCOPE__ & ": Please, make sure that the following AppId is not allowed to register: " & PX_APP_ID; + //Test control // Test component configuration f_cf01Up(); - //Preambule - v_cseBaseIndex := f_cse_preamble_createServiceSubscribedAppRule(-);//c_CRUDNDi); - + //Preamble + action(v_action); + f_sleepIgnoreDef(30.0); + // Test Body v_request := valueof(m_createAe(PX_APP_ID, omit, omit)); @@ -1459,10 +1467,10 @@ module OneM2M_Testcases_CSE_Release_1 { // Test adapter configuration // Preamble - v_aeIndex := f_cse_preamble_registerAeWithId("C-AE-ID-STEM");//c_CRUDNDi); + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); //Test Body - v_request := valueof(m_createAe(PX_APP_ID, omit, "C-AE-ID-STEM")); + v_request := valueof(m_createAe(PX_APP_ID, omit, vc_resourcesList[v_aeIndex].resource.aE.aE_ID)); v_request := f_getCreateRequestPrimitive(v_resourceType, v_request, -1); @@ -1502,8 +1510,8 @@ module OneM2M_Testcases_CSE_Release_1 { var charstring v_action := __SCOPE__ & ": Please, send a CSE registration request with attributes multiplicity equals to 1"; //Test control - if(not(PICS_MN_CSE)) { - setverdict(inconc, __SCOPE__ & ": IUT shall be MN-CSE to run this test case"); + if(not(PICS_MN_CSE or PICS_ASN_CSE)) { + setverdict(inconc, __SCOPE__ & ": IUT shall be MN-CSE or ASN-CSE to run this test case"); stop; } @@ -2085,7 +2093,7 @@ module OneM2M_Testcases_CSE_Release_1 { } } else if (PICS_MN_CSE) { - vc_remoteCseIndex := f_cse_registrationRemoteCse(m_createRemoteCSEBase); + vc_remoteCseIndex := f_cse_registrationRemoteCse(mw_createRemoteCSEBase); v_contentResponse.remoteCSE := mw_contentRemoteCSEBase; @@ -6262,7 +6270,7 @@ module OneM2M_Testcases_CSE_Release_1 { testcase TC_CSE_DMR_UPD_015_AE_LBL() runs on Tester system CseSystem { var AeSimu v_ae1 := AeSimu.create("AE1") alive; var Labels v_labels := {"MyLabel"}; - var template RequestPrimitive v_updateRequest := m_updateAE; + var template RequestPrimitive v_updateRequest := m_updateAeBase; var ResponsePrimitive v_responsePrimitive; var PrimitiveContent v_primitiveContentRetrieveResource; @@ -6295,7 +6303,7 @@ module OneM2M_Testcases_CSE_Release_1 { testcase TC_CSE_DMR_UPD_015_AE_ACPI() runs on Tester system CseSystem { var AeSimu v_ae1 := AeSimu.create("AE1") alive; - var template RequestPrimitive v_updateRequest := m_updateAE; + var template RequestPrimitive v_updateRequest := m_updateAeBase; var RequestPrimitive v_updateRequestPrimitive; var ResponsePrimitive v_responsePrimitive; var PrimitiveContent v_primitiveContentRetrieveResource; @@ -6330,7 +6338,7 @@ module OneM2M_Testcases_CSE_Release_1 { testcase TC_CSE_DMR_UPD_015_AE_APN() runs on Tester system CseSystem { var AeSimu v_ae1 := AeSimu.create("AE1") alive; var XSD.String v_appName := "MyAppName"; - var template RequestPrimitive v_updateRequest := m_updateAE; + var template RequestPrimitive v_updateRequest := m_updateAeBase; var ResponsePrimitive v_responsePrimitive; var PrimitiveContent v_primitiveContentRetrieveResource; @@ -6363,7 +6371,7 @@ module OneM2M_Testcases_CSE_Release_1 { testcase TC_CSE_DMR_UPD_015_AE_POA() runs on Tester system CseSystem { var AeSimu v_ae1 := AeSimu.create("AE1") alive; var PoaList v_poaList := {"http://" & PX_AE2_ADDRESS & "/"}; - var template RequestPrimitive v_updateRequest := m_updateAE; + var template RequestPrimitive v_updateRequest := m_updateAeBase; var ResponsePrimitive v_responsePrimitive; var PrimitiveContent v_primitiveContentRetrieveResource; @@ -6873,7 +6881,7 @@ module OneM2M_Testcases_CSE_Release_1 { testcase TC_CSE_DMR_UPD_016_AE_ET() runs on Tester system CseSystem { var AeSimu v_ae1 := AeSimu.create("AE1") alive; var Timestamp v_expirationTime := "21001231T012345"; - var template RequestPrimitive v_updateRequest := m_updateAE; + var template RequestPrimitive v_updateRequest := m_updateAeBase; var ResponsePrimitive v_responsePrimitive; var PrimitiveContent v_primitiveContentRetrieveResource; @@ -6907,7 +6915,7 @@ module OneM2M_Testcases_CSE_Release_1 { testcase TC_CSE_DMR_UPD_016_AE_RR() runs on Tester system CseSystem { var AeSimu v_ae1 := AeSimu.create("AE1") alive; var XSD.Boolean v_requestReachability := true; - var template RequestPrimitive v_updateRequest := m_updateAE; + var template RequestPrimitive v_updateRequest := m_updateAeBase; var ResponsePrimitive v_responsePrimitive; var PrimitiveContent v_primitiveContentRetrieveResource; diff --git a/OneM2M_Testcases_CSE_Release_2.ttcn b/OneM2M_Testcases_CSE_Release_2.ttcn index cc2ea9f32bc6e35a1a4846be3a04d2f4e574e76c..4cceda80f0a95292d7130fa1d6c47fc975c944bc 100644 --- a/OneM2M_Testcases_CSE_Release_2.ttcn +++ b/OneM2M_Testcases_CSE_Release_2.ttcn @@ -4161,7 +4161,7 @@ module OneM2M_Testcases_CSE_Release_2 { testcase TC_CSE_DMR_UPD_015_AE_OR() runs on Tester system CseSystem { var AeSimu v_ae1 := AeSimu.create("AE1") alive; var XSD.AnyURI v_ontoLogyRef := "MyOntologyRef"; - var template RequestPrimitive v_updateRequest := m_updateAE; + var template RequestPrimitive v_updateRequest := m_updateAeBase; var ResponsePrimitive v_responsePrimitive; var PrimitiveContent v_primitiveContentRetrieveResource;