Commit 5f2b11102a2d4e25468adcb7364b0960dbc86ebb

Authored by Miguel Angel Reina Ortega
1 parent 51480bf1

Improvements and fixes for:

TC_CSE_REG_CRE_001
TC_CSE_REG_CRE_004
TC_CSE_REG_CRE_005
TC_CSE_REG_CRE_009
TC_CSE_REG_CRE_011
f_CSE_REG_CRE_013
TC_CSE_REG_CRE_016
TC_CSE_REG_CRE_023

New function for update procedure of announced resource

Signed-off-by: Miguel Angel Reina Ortega <miguelangel.reinaortega@etsi.org>
... ... @@ -14,6 +14,7 @@
14 14 module OneM2M_Functions {
15 15  
16 16 import from XSD all;
  17 + import from LibCommon_Time all;
17 18 import from OneM2M_Templates all;
18 19 import from OneM2M_Types all;
19 20 import from OneM2M_TypesAndValues all;
... ... @@ -779,11 +780,9 @@ module OneM2M_Functions {
779 780  
780 781 for(i := lengthof(vc_resourcesIndexToBeDeleted) -1; i >=0; i := i - 1) {
781 782  
782   - v_resourceAddress := f_getResourceAddress(vc_resourcesIndexToBeDeleted[i], e_nonHierarchical);
  783 + v_resourceAddress := f_getResourceAddress(vc_resourcesIndexToBeDeleted[i]);
783 784  
784 785 v_request := valueof(m_delete(v_resourceAddress, f_getOriginator(vc_resourcesIndexToBeDeleted[i],false)));
785   -
786   - v_request.from_ := PX_SUPER_CSE_ID;
787 786  
788 787 mccPort.send(m_request(v_request));
789 788  
... ... @@ -856,6 +855,37 @@ module OneM2M_Functions {
856 855 return v_resourceIndex;
857 856  
858 857 }
  858 +
  859 + /**
  860 + * @desc Message exchange for the update of an announced resource
  861 + * @param p_requestPrimitive UPDATE request primitive to be used
  862 + * @verdict
  863 + */
  864 + function f_cse_updateAnnouncedResource(in RequestPrimitive p_requestPrimitive) runs on CseSimu {
  865 +
  866 + mccPort.send(m_request(p_requestPrimitive));
  867 + tc_ac.start;
  868 + alt {
  869 + [] mccPort.receive(mw_response(mw_responsePrimitiveOK)) -> value vc_response {
  870 + tc_ac.stop;
  871 + setverdict(pass, __SCOPE__&":INFO: Attribute of announced resource updated successfuly");
  872 + }
  873 + [] mccPort.receive(mw_response(mw_responsePrimitiveKO)) -> value vc_response {
  874 + tc_ac.stop;
  875 + setverdict(inconc, __SCOPE__&":INFO: Error while updating announced resource");
  876 + }
  877 + [] mccPort.receive{
  878 + tc_ac.stop;
  879 + setverdict(inconc, __SCOPE__&":INFO: Unexpected message received");
  880 + }
  881 + [] tc_ac.timeout {
  882 + setverdict(inconc, __SCOPE__&":INFO: No answer while updating announced resource");
  883 + }
  884 + }
  885 +
  886 + f_checkCseSimuStatus();
  887 +
  888 + }// end f_cse_updateAnnouncedResource
859 889  
860 890 /**
861 891 * @desc Creation of the auxiliar ACP resource
... ... @@ -1190,7 +1220,7 @@ module OneM2M_Functions {
1190 1220 tc_ac.stop;
1191 1221 setverdict(pass, __SCOPE__&":INFO: Resource type " & int2str(enum2int(p_resourceType)) & " created successfuly");
1192 1222 f_checkAttributesToBeSaved(p_resourceType, v_request, vc_response.primitive.responsePrimitive);
1193   - v_resourceIndex := f_setResource(vc_response.primitive.responsePrimitive.primitiveContent, p_resourceType, vc_remoteCseIndex);
  1223 + v_resourceIndex := f_setResource(vc_response.primitive.responsePrimitive.primitiveContent, f_getAnnouncedResourceType(p_resourceType), vc_remoteCseIndex);
1194 1224 }
1195 1225 [] mccPort.receive(mw_response(mw_responsePrimitiveKO)) {
1196 1226 tc_ac.stop;
... ... @@ -1770,7 +1800,7 @@ module OneM2M_Functions {
1770 1800 v_response.primitiveContent.remoteCSE := vc_localResourcesList[vc_localRemoteCseIndex].resource.remoteCSE;
1771 1801 mccPortIn.send(m_response(v_response));
1772 1802  
1773   - v_resourceIndex := f_setResource(m_primitiveContentRemoteCSE(m_contentMyRemoteCSEResource), int16, -1);
  1803 + v_resourceIndex := f_setResource(valueof(m_primitiveContentRemoteCSE(m_contentMyRemoteCSEResource)), int16, -1);
1774 1804 }
1775 1805 [] mccPortIn.receive {
1776 1806 tc_ac.stop;
... ... @@ -1782,6 +1812,9 @@ module OneM2M_Functions {
1782 1812 }
1783 1813  
1784 1814 f_checkCseSimuStatus();
  1815 +
  1816 + //In order for the IUT to perform some actions
  1817 + f_sleep(10.0);
1785 1818  
1786 1819 return v_resourceIndex;
1787 1820  
... ... @@ -2213,7 +2246,7 @@ module OneM2M_Functions {
2213 2246  
2214 2247 p_request.requestIdentifier := valueof(p_request.requestIdentifier) & f_rnd(1, 1000000);
2215 2248  
2216   - if(p_resourceType != int2) {
  2249 + if((p_resourceType != int2) and (p_resourceType != int10002)) {
2217 2250 if(p_resourceType == int16) {
2218 2251 p_request.from_ := PX_CSE1_ID;
2219 2252 } else {
... ... @@ -2224,6 +2257,7 @@ module OneM2M_Functions {
2224 2257 }
2225 2258 }
2226 2259 }
  2260 +
2227 2261 p_request.to_ := f_getResourceAddress(p_parentIndex);
2228 2262  
2229 2263 if (p_resourceType == int1) {//AccessControlPolicy
... ... @@ -2348,9 +2382,15 @@ module OneM2M_Functions {
2348 2382  
2349 2383 p_request.requestIdentifier := valueof(p_request.requestIdentifier) & f_rnd(1, 1000000);
2350 2384  
2351   - p_request.from_ := f_getOriginator(p_resourceIndex);
2352   -
2353   - p_request.to_ := f_getResourceAddress(p_resourceIndex);
  2385 + if(p_resourceType != int10002) {
  2386 + p_request.from_ := f_getOriginator(p_resourceIndex);
  2387 +
  2388 + p_request.to_ := f_getResourceAddress(p_resourceIndex);
  2389 + } else {
  2390 + p_request.from_ := PX_CSE1_ID & "/" & f_getResourceId(vc_resourcesList[p_resourceIndex].resource);
  2391 +
  2392 + p_request.to_ := f_getResourceAddress(p_resourceIndex, -, e_spRelative);
  2393 + }
2354 2394  
2355 2395 if (p_resourceType == int3) {//Container
2356 2396  
... ... @@ -2410,6 +2450,9 @@ module OneM2M_Functions {
2410 2450 if(ischosen(p_contentResource.aE)) {
2411 2451 return f_resourceIdCleaner(p_contentResource.aE.resourceID);
2412 2452 }
  2453 + if(ischosen(p_contentResource.aEAnnc)) {
  2454 + return f_resourceIdCleaner(p_contentResource.aEAnnc.resourceID);
  2455 + }
2413 2456 if(ischosen(p_contentResource.serviceSubscribedAppRule)) {
2414 2457 return f_resourceIdCleaner(p_contentResource.serviceSubscribedAppRule.resourceID);
2415 2458 }
... ... @@ -2470,6 +2513,9 @@ module OneM2M_Functions {
2470 2513 if(ischosen(p_contentResource.aE)) {
2471 2514 return p_contentResource.aE.resourceName;
2472 2515 }
  2516 + if(ischosen(p_contentResource.aEAnnc)) {
  2517 + return p_contentResource.aEAnnc.resourceName;
  2518 + }
2473 2519 if(ischosen(p_contentResource.serviceSubscribedAppRule)) {
2474 2520 return p_contentResource.serviceSubscribedAppRule.resourceName;
2475 2521 }
... ...
... ... @@ -32,8 +32,7 @@ module OneM2M_Pics {
32 32  
33 33 modulepar boolean PICS_ACP_LBL := true;
34 34 modulepar boolean PICS_ACP_AT := true;
35   - modulepar boolean PICS_ACP_ET := true;
36   -
  35 +
37 36 //AE optional attributes
38 37  
39 38 modulepar boolean PICS_AE_LBL := true;
... ... @@ -98,7 +97,6 @@ module OneM2M_Pics {
98 97 modulepar boolean PICS_SUB_NEC := true;
99 98 modulepar boolean PICS_SUB_SU := true;
100 99 modulepar boolean PICS_SUB_LBL := true;
101   - modulepar boolean PICS_SUB_ET := true;
102 100 modulepar boolean PICS_SUB_GPI := true;
103 101 modulepar boolean PICS_SUB_BN := true;
104 102 modulepar boolean PICS_SUB_RL := true;
... ...
... ... @@ -134,24 +134,11 @@ module OneM2M_Pixits {
134 134  
135 135 group ExecutionParameters {
136 136  
137   - modulepar boolean PX_DELETE_CREATED_RESOURCES := true;
138   -
139   - modulepar XSD.AnyURI PX_RESOURCE_TO_BE_DELETED := "/ae_test";
140   -
141 137 modulepar XSD.IDREFS PX_RESOURCES_TO_BE_DELETED := {"MyAe"};
142 138  
143 139 modulepar boolean PX_RUN_POSTAMBLE := true;
144   -
145   -
146 140 }
147 141  
148   -
149   -
150   -
151   -
152   -
153   -
154   - modulepar boolean PX_USE_RESOURCE_ID_AS_ORIGINATOR := true;
155 142  
156 143 //for checking whether the locationPolicy creation request is originated from a ASN-AE
157 144 //NOTE: Apply to Device-based location request, and this requires Test System (TS) to activate ASN-AE mode to test IUT
... ...
... ... @@ -407,7 +407,6 @@ module OneM2M_Templates {
407 407 requestIdentifier := "m_updateAe",
408 408 primitiveContent:= {aE := m_contentUpdateAe}
409 409 };
410   -
411 410  
412 411 /**
413 412 * @desc Reception template for update Ae resource
... ... @@ -511,15 +510,10 @@ module OneM2M_Templates {
511 510 primitiveContent := {remoteCSE := m_contentUpdateRemoteCSE}
512 511 }
513 512  
514   - template (value) RequestPrimitive m_updateAE modifies m_update := {
515   - requestIdentifier := "m_updateAE",
516   - primitiveContent := {aE := m_contentUpdateAe}
517   - }
518   -
519   - 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:= {
  513 + template (value) RequestPrimitive m_updateAEAnncBase modifies m_update:= {
520 514 requestIdentifier := testcasename() & "-m_updateAEAnnc",
521 515 resourceType := int10002,
522   - primitiveContent := {aEAnnc := m_contentUpdateAEAnnc(p_appId,p_stemId)}
  516 + primitiveContent := {aEAnnc := m_contentUpdateAEAnnc}
523 517 };
524 518 }//end group Update
525 519  
... ... @@ -1255,7 +1249,7 @@ module OneM2M_Templates {
1255 1249 lastModifiedTime := omit,//NP
1256 1250 labels := p_labels,//O
1257 1251 accessControlPolicyIDs := p_accessControlPolicyIds,//O
1258   - expirationTime := omit,//O
  1252 + expirationTime := "20301231T012345",//O
1259 1253 link := p_link,//M TODO Put the right value
1260 1254 appName := omit,//O
1261 1255 app_ID := p_appId,//M
... ... @@ -2398,7 +2392,7 @@ module OneM2M_Templates {
2398 2392 choice := omit
2399 2393 }
2400 2394  
2401   - template (value) AEAnnc_optional m_contentUpdateAEAnnc (template (omit) XSD.ID p_appId := omit, template (omit) XSD.ID p_stemId := omit) := {
  2395 + template (value) AEAnnc_optional m_contentUpdateAEAnnc := {
2402 2396 resourceName := omit,
2403 2397 resourceType := omit,
2404 2398 resourceID := omit,
... ... @@ -2410,7 +2404,7 @@ module OneM2M_Templates {
2410 2404 expirationTime := omit,
2411 2405 link := omit,
2412 2406 appName := omit,
2413   - app_ID := p_appId,
  2407 + app_ID := omit,
2414 2408 aE_ID := omit,
2415 2409 pointOfAccess := omit,
2416 2410 ontologyRef := omit,
... ... @@ -2870,6 +2864,7 @@ module OneM2M_Templates {
2870 2864 template RemoteCSE_optional m_contentMyRemoteCSEResource modifies m_contentRemoteCSE_allOmit := {
2871 2865 resourceName := PX_CSE1_NAME,//M
2872 2866 resourceType := int16,//M
  2867 + resourceID := PX_CSE1_RESOURCE_ID,//M
2873 2868 pointOfAccess := {PX_CSE1_ADDRESS},//O
2874 2869 cSEBase := PX_CSE1_NAME,//M
2875 2870 cSE_ID := PX_CSE1_ID,//M
... ...
... ... @@ -1329,17 +1329,17 @@ module OneM2M_PermutationFunctions {
1329 1329 [] mccPort.receive(mw_response(mw_responsePrimitive(int2001, f_getTemplateFromPrimitiveContent(v_request.primitiveContent)))) -> value v_response {
1330 1330 tc_ac.stop;
1331 1331 setverdict(pass, __SCOPE__ & ": Accepted creation for resource type remoteCSE containing attribute " & p_optionalAttribute.name);
1332   - f_setResource(v_request.primitiveContent,int16);
  1332 + f_setResource(v_response.primitive.responsePrimitive.primitiveContent,int16);
1333 1333 }
1334 1334 [] mccPort.receive(mw_response(mw_responsePrimitiveOK(f_getTemplateFromPrimitiveContent(v_request.primitiveContent)))) -> value v_response {
1335 1335 tc_ac.stop;
1336 1336 setverdict(fail, __SCOPE__ & ": Wrong response status code in the response");
1337   - f_setResource(v_request.primitiveContent,int16);
  1337 + f_setResource(v_response.primitive.responsePrimitive.primitiveContent,int16);
1338 1338 }
1339 1339 [] mccPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
1340 1340 tc_ac.stop;
1341 1341 setverdict(fail, __SCOPE__ & ": Accepted creation for resource type remoteCSE without containing attribute " & p_optionalAttribute.name);
1342   - f_setResource(v_request.primitiveContent,int16);
  1342 + f_setResource(v_response.primitive.responsePrimitive.primitiveContent,int16);
1343 1343 }
1344 1344 [] mccPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
1345 1345 tc_ac.stop;
... ... @@ -1410,8 +1410,8 @@ module OneM2M_PermutationFunctions {
1410 1410 var ResponsePrimitive v_responsePrimitive;
1411 1411  
1412 1412 //Test control
1413   - if(not(PICS_MN_CSE)) {
1414   - setverdict(inconc, __SCOPE__ & ": IUT shall be MN-CSE to run this test case");
  1413 + if(not(PICS_MN_CSE or PICS_ASN_CSE)) {
  1414 + setverdict(inconc, __SCOPE__ & ": IUT shall be MN-CSE or ASN-CSE to run this test case");
1415 1415 stop;
1416 1416 }
1417 1417  
... ...
... ... @@ -20,43 +20,15 @@ module OneM2M_TestControl_ASN_profile {
20 20 control {
21 21  
22 22 //CE_GEN_00001
23   - if(PICS_PRIMITIVE_SCOPE_CSE_RELATIVE and PICS_UNSTRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT) {execute (TC_CSE_GEN_CRE_001_CSR());}
24   - if(PICS_PRIMITIVE_SCOPE_SP_RELATIVE and PICS_UNSTRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT) {execute (TC_CSE_GEN_CRE_001_SPR());}
25   - if(PICS_PRIMITIVE_SCOPE_ABSOLUTE and PICS_UNSTRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT) {execute (TC_CSE_GEN_CRE_001_ABS());}
26   - if(PICS_PRIMITIVE_SCOPE_CSE_RELATIVE and PICS_UNSTRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT) {execute (TC_CSE_GEN_RET_001_CSR());}
27   - if(PICS_PRIMITIVE_SCOPE_SP_RELATIVE and PICS_UNSTRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT) {execute (TC_CSE_GEN_RET_001_SPR());}
28   - if(PICS_PRIMITIVE_SCOPE_ABSOLUTE and PICS_UNSTRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT) {execute (TC_CSE_GEN_RET_001_ABS());}
29   - if(PICS_PRIMITIVE_SCOPE_CSE_RELATIVE and PICS_UNSTRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT) {execute (TC_CSE_GEN_UPD_001_CSR());}
30   - if(PICS_PRIMITIVE_SCOPE_SP_RELATIVE and PICS_UNSTRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT) {execute (TC_CSE_GEN_UPD_001_SPR());}
31   - if(PICS_PRIMITIVE_SCOPE_ABSOLUTE and PICS_UNSTRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT) {execute (TC_CSE_GEN_UPD_001_ABS());}
32   - if(PICS_PRIMITIVE_SCOPE_CSE_RELATIVE and PICS_UNSTRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT) {execute (TC_CSE_GEN_DEL_001_CSR());}
33   - if(PICS_PRIMITIVE_SCOPE_SP_RELATIVE and PICS_UNSTRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT) {execute (TC_CSE_GEN_DEL_001_SPR());}
34   - if(PICS_PRIMITIVE_SCOPE_ABSOLUTE and PICS_UNSTRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT) {execute (TC_CSE_GEN_DEL_001_ABS());}
35   - if(PICS_PRIMITIVE_SCOPE_CSE_RELATIVE and PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT) {execute (TC_CSE_GEN_CRE_002_CSR());}
36   - if(PICS_PRIMITIVE_SCOPE_SP_RELATIVE and PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT) {execute (TC_CSE_GEN_CRE_002_SPR());}
37   - if(PICS_PRIMITIVE_SCOPE_ABSOLUTE and PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT) {execute (TC_CSE_GEN_CRE_002_ABS());}
38   - if(PICS_PRIMITIVE_SCOPE_CSE_RELATIVE and PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT) {execute (TC_CSE_GEN_RET_002_CSR());}
39   - if(PICS_PRIMITIVE_SCOPE_SP_RELATIVE and PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT) {execute (TC_CSE_GEN_RET_002_SPR());}
40   - if(PICS_PRIMITIVE_SCOPE_ABSOLUTE and PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT) {execute (TC_CSE_GEN_RET_002_ABS());}
41   - if(PICS_PRIMITIVE_SCOPE_CSE_RELATIVE and PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT) {execute (TC_CSE_GEN_UPD_002_CSR());}
42   - if(PICS_PRIMITIVE_SCOPE_SP_RELATIVE and PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT) {execute (TC_CSE_GEN_UPD_002_SPR());}
43   - if(PICS_PRIMITIVE_SCOPE_ABSOLUTE and PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT) {execute (TC_CSE_GEN_UPD_002_ABS());}
44   - if(PICS_PRIMITIVE_SCOPE_CSE_RELATIVE and PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT) {execute (TC_CSE_GEN_DEL_002_CSR());}
45   - if(PICS_PRIMITIVE_SCOPE_SP_RELATIVE and PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT) {execute (TC_CSE_GEN_DEL_002_SPR());}
46   - if(PICS_PRIMITIVE_SCOPE_ABSOLUTE and PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT) {execute (TC_CSE_GEN_DEL_002_ABS());}
47   -
  23 +
48 24 //CE_GEN_00002
49 25  
50 26 //CE_REG_00005
51   - if(true) {execute (TC_CSE_REG_CRE_024());}
52   - if(true) {execute (TC_CSE_DMR_RET_013_CSR());}
53   - if(true) {execute (TC_CSE_REG_CRE_026_POA());}
  27 + if(PICS_ASN_CSE) {execute (TC_CSE_REG_CRE_024());}
  28 + if(PICS_CSR_POA) {execute (TC_CSE_REG_CRE_026_POA());}
54 29  
55 30 //CE_DMR_00002
56   - if(true) {execute (TC_CSE_DMR_CRE_001_CIN_CNT());}
57   - if(true) {execute (TC_CSE_DMR_RET_001_CIN());}
58   - if(true) {execute (TC_CSE_DMR_UPD_011());}
59   - if(true) {execute (TC_CSE_DMR_DEL_001_CIN());}
  31 +
60 32  
61 33 }
62 34  
... ...
... ... @@ -377,7 +377,7 @@ module OneM2M_Testcases_CSE_Release_1 {
377 377 group Create{
378 378  
379 379 /**
380   - * @desc Check that the IUT accepts an AE registration (allowed App-ID, C-AE-ID-STEM not provided by AE)
  380 + * @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.
381 381 *
382 382 */
383 383 testcase TC_CSE_REG_CRE_001() runs on AeSimu system CseSystem {
... ... @@ -386,7 +386,8 @@ module OneM2M_Testcases_CSE_Release_1 {
386 386 var RequestPrimitive v_request;
387 387 var integer v_cseBaseIndex := -1;
388 388 var ResourceType v_resourceType := int2;
389   -
  389 + var charstring v_action := __SCOPE__ & ": Please, make sure that the following AE-ID is allowed to register: " & PX_ALLOWED_C_AE_IDS[0];
  390 +
390 391 //Test control
391 392 if(not(PICS_IN_CSE)) {
392 393 setverdict(inconc, __SCOPE__ & ": IUT shall be IN-CSE to run this test case");
... ... @@ -397,9 +398,11 @@ module OneM2M_Testcases_CSE_Release_1 {
397 398 f_cf01Up();
398 399  
399 400 //Preamble
400   -
  401 + action(v_action);
  402 + f_sleepIgnoreDef(30.0);
  403 +
401 404 //Test Body
402   - v_request := valueof(m_createAe(PX_APP_ID, omit, "S-AE-ID-STEM"));
  405 + v_request := valueof(m_createAe(PX_APP_ID, omit, f_getResourceAddress(-1, -, e_spRelative) & "/" & PX_ALLOWED_C_AE_IDS[0]));
403 406  
404 407 v_request := f_getCreateRequestPrimitive(v_resourceType, v_request, -1);
405 408  
... ... @@ -510,6 +513,7 @@ module OneM2M_Testcases_CSE_Release_1 {
510 513 var RequestPrimitive v_request;
511 514 var integer v_cseBaseIndex := -1;
512 515 var ResourceType v_resourceType := int2;
  516 + 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];
513 517  
514 518 //Test control
515 519  
... ... @@ -520,6 +524,8 @@ module OneM2M_Testcases_CSE_Release_1 {
520 524 //vc_remoteCseIndex := f_cse_registrationRemoteCse(mw_createRemoteCSE);
521 525 //TODO: create serviceSubscribedProfile, Node, and serviceSubscribedAppRule
522 526 //v_cseBaseIndex := f_cse_preamble_createServiceSubscribedProfile({"C*"}); //c_CRUDNDi);
  527 + action(v_action);
  528 + f_sleepIgnoreDef(30.0);
523 529  
524 530 //Test Body
525 531 //v_request := valueof(m_createAe(PX_APP_ID, omit, "C-AE-ID-STEM"));
... ... @@ -573,11 +579,11 @@ module OneM2M_Testcases_CSE_Release_1 {
573 579  
574 580 tc_ac.start;
575 581 alt{
576   - []mccPortIn.receive(mw_request(mw_createAEAnnc(f_getResourceAddress(-1,e_hierarchical, e_spRelative) & "/S", "CSE_ID", -))){
  582 + [] mccPortIn.receive(mw_request(mw_createAEAnnc(f_getResourceAddress(-1,e_hierarchical, e_spRelative) & "/S", "CSE_ID", -))){
577 583 tc_ac.stop;
578 584 setverdict(pass, __SCOPE__ & ": AE creation redirected.");
579 585 }
580   - []mccPortIn.receive(mw_request(mw_createAEAnnc(f_getResourceAddress(-1,e_hierarchical, e_absolute) & "/S", "CSE_ID", -))){
  586 + [] mccPortIn.receive(mw_request(mw_createAEAnnc(f_getResourceAddress(-1,e_hierarchical, e_absolute) & "/S", "CSE_ID", -))){
581 587 tc_ac.stop;
582 588 setverdict(pass, __SCOPE__ & ": AE creation redirected.");
583 589 }
... ... @@ -796,15 +802,20 @@ module OneM2M_Testcases_CSE_Release_1 {
796 802 //Preambule
797 803  
798 804 vc_remoteCseIndex := f_cse_registerRemoteCse(m_createRemoteCSEBase);
799   -
800   - v_aeAnncIndex := f_cse_announceResource(int2, m_createAEAnnc(-, "/" & "SAE1", PX_APP_ID, PX_CSE1_ID & "/" & "SAE1"));
  805 +
  806 + //Create AEAnnc
  807 + v_aeAnncIndex := f_cse_announceResource(int2, m_createAEAnnc(-, PX_CSE1_ID & "/" & "S", PX_APP_ID, PX_CSE1_ID & "/" & "S"));
  808 +
  809 + //Update AEAnnc to simulate deregistration of AE
  810 + v_request := f_getUpdateRequestPrimitive(f_getAnnouncedResourceType(int2),v_aeAnncIndex, valueof(m_updateAEAnncBase));//TODO
  811 + //v_request.primitiveContent.aEAnnc.link := "";//TODO To fix when base specs are fixed
  812 +
  813 + f_cse_updateAnnouncedResource(v_request);
801 814  
802 815 //Test Body
803   - v_request := valueof(m_updateAEAnnc(-, -, -, PX_APP_ID, -)); //TODO to double check all parameters
  816 + v_request := valueof(m_updateAEAnncBase);
804 817  
805 818 v_request := f_getUpdateRequestPrimitive(f_getAnnouncedResourceType(int2),v_aeAnncIndex, v_request);//TODO
806   - v_request.from_ := f_getResourceAddress(-1,e_hierarchical, e_absolute) & "/S";
807   - v_request.primitiveContent.aEAnnc.app_ID := PX_APP_ID;
808 819 v_request.primitiveContent.aEAnnc.labels := {"Credential-ID:None"};
809 820  
810 821 mccPort.send(m_request(v_request));
... ... @@ -948,11 +959,6 @@ module OneM2M_Testcases_CSE_Release_1 {
948 959 setverdict(fail, __SCOPE__ & "Resource ID not set correctly.");
949 960 }
950 961  
951   - if(f_isScopeSpRelative(v_response.primitive.responsePrimitive.primitiveContent.aE.aE_ID)){
952   - setverdict(pass, __SCOPE__ & "AE ID set correctly.");
953   - } else {
954   - setverdict(fail, __SCOPE__ & "AE ID not set correctly.");
955   - }
956 962 }
957 963 [] mcaPort.receive(mw_response(mw_responsePrimitiveInverse(int2001))) -> value v_response{
958 964 tc_ac.stop;
... ... @@ -1075,15 +1081,17 @@ module OneM2M_Testcases_CSE_Release_1 {
1075 1081 var RequestPrimitive v_request;
1076 1082 var integer v_cseBaseIndex := -1;
1077 1083 var ResourceType v_resourceType := int2;
1078   -
  1084 + var charstring v_action := __SCOPE__ & ": Please, make sure that the following AppId is not allowed to register: " & PX_APP_ID;
  1085 +
1079 1086 //Test control
1080 1087  
1081 1088 // Test component configuration
1082 1089 f_cf01Up();
1083 1090  
1084   - //Preambule
1085   - v_cseBaseIndex := f_cse_preamble_createServiceSubscribedAppRule(-);//c_CRUDNDi);
1086   -
  1091 + //Preamble
  1092 + action(v_action);
  1093 + f_sleepIgnoreDef(30.0);
  1094 +
1087 1095 // Test Body
1088 1096 v_request := valueof(m_createAe(PX_APP_ID, omit, omit));
1089 1097  
... ... @@ -1459,10 +1467,10 @@ module OneM2M_Testcases_CSE_Release_1 {
1459 1467 // Test adapter configuration
1460 1468  
1461 1469 // Preamble
1462   - v_aeIndex := f_cse_preamble_registerAeWithId("C-AE-ID-STEM");//c_CRUDNDi);
  1470 + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
1463 1471  
1464 1472 //Test Body
1465   - v_request := valueof(m_createAe(PX_APP_ID, omit, "C-AE-ID-STEM"));
  1473 + v_request := valueof(m_createAe(PX_APP_ID, omit, vc_resourcesList[v_aeIndex].resource.aE.aE_ID));
1466 1474  
1467 1475 v_request := f_getCreateRequestPrimitive(v_resourceType, v_request, -1);
1468 1476  
... ... @@ -1502,8 +1510,8 @@ module OneM2M_Testcases_CSE_Release_1 {
1502 1510 var charstring v_action := __SCOPE__ & ": Please, send a CSE registration request with attributes multiplicity equals to 1";
1503 1511  
1504 1512 //Test control
1505   - if(not(PICS_MN_CSE)) {
1506   - setverdict(inconc, __SCOPE__ & ": IUT shall be MN-CSE to run this test case");
  1513 + if(not(PICS_MN_CSE or PICS_ASN_CSE)) {
  1514 + setverdict(inconc, __SCOPE__ & ": IUT shall be MN-CSE or ASN-CSE to run this test case");
1507 1515 stop;
1508 1516 }
1509 1517  
... ... @@ -2085,7 +2093,7 @@ module OneM2M_Testcases_CSE_Release_1 {
2085 2093 }
2086 2094  
2087 2095 } else if (PICS_MN_CSE) {
2088   - vc_remoteCseIndex := f_cse_registrationRemoteCse(m_createRemoteCSEBase);
  2096 + vc_remoteCseIndex := f_cse_registrationRemoteCse(mw_createRemoteCSEBase);
2089 2097  
2090 2098 v_contentResponse.remoteCSE := mw_contentRemoteCSEBase;
2091 2099  
... ... @@ -6262,7 +6270,7 @@ module OneM2M_Testcases_CSE_Release_1 {
6262 6270 testcase TC_CSE_DMR_UPD_015_AE_LBL() runs on Tester system CseSystem {
6263 6271 var AeSimu v_ae1 := AeSimu.create("AE1") alive;
6264 6272 var Labels v_labels := {"MyLabel"};
6265   - var template RequestPrimitive v_updateRequest := m_updateAE;
  6273 + var template RequestPrimitive v_updateRequest := m_updateAeBase;
6266 6274 var ResponsePrimitive v_responsePrimitive;
6267 6275 var PrimitiveContent v_primitiveContentRetrieveResource;
6268 6276  
... ... @@ -6295,7 +6303,7 @@ module OneM2M_Testcases_CSE_Release_1 {
6295 6303  
6296 6304 testcase TC_CSE_DMR_UPD_015_AE_ACPI() runs on Tester system CseSystem {
6297 6305 var AeSimu v_ae1 := AeSimu.create("AE1") alive;
6298   - var template RequestPrimitive v_updateRequest := m_updateAE;
  6306 + var template RequestPrimitive v_updateRequest := m_updateAeBase;
6299 6307 var RequestPrimitive v_updateRequestPrimitive;
6300 6308 var ResponsePrimitive v_responsePrimitive;
6301 6309 var PrimitiveContent v_primitiveContentRetrieveResource;
... ... @@ -6330,7 +6338,7 @@ module OneM2M_Testcases_CSE_Release_1 {
6330 6338 testcase TC_CSE_DMR_UPD_015_AE_APN() runs on Tester system CseSystem {
6331 6339 var AeSimu v_ae1 := AeSimu.create("AE1") alive;
6332 6340 var XSD.String v_appName := "MyAppName";
6333   - var template RequestPrimitive v_updateRequest := m_updateAE;
  6341 + var template RequestPrimitive v_updateRequest := m_updateAeBase;
6334 6342 var ResponsePrimitive v_responsePrimitive;
6335 6343 var PrimitiveContent v_primitiveContentRetrieveResource;
6336 6344  
... ... @@ -6363,7 +6371,7 @@ module OneM2M_Testcases_CSE_Release_1 {
6363 6371 testcase TC_CSE_DMR_UPD_015_AE_POA() runs on Tester system CseSystem {
6364 6372 var AeSimu v_ae1 := AeSimu.create("AE1") alive;
6365 6373 var PoaList v_poaList := {"http://" & PX_AE2_ADDRESS & "/"};
6366   - var template RequestPrimitive v_updateRequest := m_updateAE;
  6374 + var template RequestPrimitive v_updateRequest := m_updateAeBase;
6367 6375 var ResponsePrimitive v_responsePrimitive;
6368 6376 var PrimitiveContent v_primitiveContentRetrieveResource;
6369 6377  
... ... @@ -6873,7 +6881,7 @@ module OneM2M_Testcases_CSE_Release_1 {
6873 6881 testcase TC_CSE_DMR_UPD_016_AE_ET() runs on Tester system CseSystem {
6874 6882 var AeSimu v_ae1 := AeSimu.create("AE1") alive;
6875 6883 var Timestamp v_expirationTime := "21001231T012345";
6876   - var template RequestPrimitive v_updateRequest := m_updateAE;
  6884 + var template RequestPrimitive v_updateRequest := m_updateAeBase;
6877 6885 var ResponsePrimitive v_responsePrimitive;
6878 6886 var PrimitiveContent v_primitiveContentRetrieveResource;
6879 6887  
... ... @@ -6907,7 +6915,7 @@ module OneM2M_Testcases_CSE_Release_1 {
6907 6915 testcase TC_CSE_DMR_UPD_016_AE_RR() runs on Tester system CseSystem {
6908 6916 var AeSimu v_ae1 := AeSimu.create("AE1") alive;
6909 6917 var XSD.Boolean v_requestReachability := true;
6910   - var template RequestPrimitive v_updateRequest := m_updateAE;
  6918 + var template RequestPrimitive v_updateRequest := m_updateAeBase;
6911 6919 var ResponsePrimitive v_responsePrimitive;
6912 6920 var PrimitiveContent v_primitiveContentRetrieveResource;
6913 6921  
... ...
... ... @@ -4161,7 +4161,7 @@ module OneM2M_Testcases_CSE_Release_2 {
4161 4161 testcase TC_CSE_DMR_UPD_015_AE_OR() runs on Tester system CseSystem {
4162 4162 var AeSimu v_ae1 := AeSimu.create("AE1") alive;
4163 4163 var XSD.AnyURI v_ontoLogyRef := "MyOntologyRef";
4164   - var template RequestPrimitive v_updateRequest := m_updateAE;
  4164 + var template RequestPrimitive v_updateRequest := m_updateAeBase;
4165 4165 var ResponsePrimitive v_responsePrimitive;
4166 4166 var PrimitiveContent v_primitiveContentRetrieveResource;
4167 4167  
... ...