Commit fa20ab62cc5c44596cb4fa4e15d7fd9db0693546

Authored by Miguel Angel Reina Ortega
1 parent 656aecd4

Fix #44

Signed-off-by: reinaortega <miguelangel.reinaortega@etsi.org>
... ... @@ -1126,10 +1126,10 @@ module OneM2M_Templates {
1126 1126 /**
1127 1127 * @desc Base NOTIFY request primitive
1128 1128 */
1129   - template RequestPrimitive m_notify := {
  1129 + template RequestPrimitive m_notify(XSD.ID p_resourceAddress) := {
1130 1130 operation := int5,
1131   - to_ := "NotInitialized",
1132   - from_ := omit,
  1131 + to_ := p_resourceAddress,
  1132 + from_ := "NotInitialized",
1133 1133 requestIdentifier := testcasename() & "-m_notify" & f_rnd(1, 1000000),
1134 1134 resourceType := omit,
1135 1135 primitiveContent := {notification := m_contentCreateNotification_allOmit},
... ...
... ... @@ -37,7 +37,7 @@ module OneM2M_PermutationFunctions {
37 37 var integer v_parentIndex := -1;
38 38 var integer v_resourceIndex := -1;
39 39 var MsgIn v_request;
40   - var PrimitiveContent v_modifiedResource;
  40 + var PrimitiveContent v_resource;
41 41 var universal charstring v_action := __SCOPE__ & ": Please, send a valid CREATE Request for container containing To set to " & f_getLocalResourceAddress(0, e_nonHierarchical, p_primitiveScope);
42 42  
43 43 if(not(PICS_UNSTRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT)) {
... ... @@ -57,14 +57,15 @@ module OneM2M_PermutationFunctions {
57 57 tc_ac.stop;
58 58 setverdict(pass, __SCOPE__, " : Container creation request received successfuly");
59 59 v_parentIndex := f_getResourceIndex(v_request.primitive.requestPrimitive.to_);
60   - v_modifiedResource := f_ae_generateLocalResource(v_request.primitive.requestPrimitive.primitiveContent, v_parentIndex, v_request.primitive.requestPrimitive.resourceType);
61   - v_resourceIndex := f_setLocalResource(v_modifiedResource, v_request.primitive.requestPrimitive.resourceType, v_parentIndex);
62   - v_responsePrimitive := valueof(m_responsePrimitive(int2001, v_request.primitive.requestPrimitive.requestIdentifier, v_modifiedResource));
  60 + v_resource := f_ae_generateLocalResource(v_request.primitive.requestPrimitive.primitiveContent, v_parentIndex, v_request.primitive.requestPrimitive.resourceType);
  61 + v_resourceIndex := f_setLocalResource(v_resource, v_request.primitive.requestPrimitive.resourceType, v_parentIndex);
  62 + v_responsePrimitive := valueof(m_responsePrimitive(int2001, v_request.primitive.requestPrimitive.requestIdentifier, vc_localResourcesList[v_resourceIndex].resource));
63 63 mcaPortIn.send(m_response(v_responsePrimitive));
64 64 }
65 65 [] mcaPortIn.receive(mw_request(?)) {
66 66 tc_ac.stop;
67 67 setverdict(fail, __SCOPE__, " : Error while creating container");
  68 + mcaPortIn.send(m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit))));
68 69 stop;
69 70 }
70 71 [] tc_ac.timeout {
... ... @@ -78,12 +79,14 @@ module OneM2M_PermutationFunctions {
78 79 }
79 80 function f_AE_GEN_CRE_002(PrimitiveScope p_primitiveScope) runs on CseSimu {
80 81 var MsgIn v_request;
  82 + var Integer v_parentIndex := -1;
  83 + var Integer v_resourceIndex := -1;
81 84 var ResponsePrimitive v_responsePrimitive;
82 85 var template UtTriggerPrimitive v_utRequest := m_utCreateContainer;
83 86 var UtTriggerAckPrimitive v_trigger_response;
  87 + var PrimitiveContent v_resource;
84 88 var universal charstring v_action := __SCOPE__ & ": Please, send a valid CREATE Request for container containing To set to " & f_getLocalResourceAddress(-, e_hierarchical, p_primitiveScope);
85 89  
86   -
87 90 //Test Control
88 91 if(not(PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT)) {
89 92 setverdict(inconc, __SCOPE__, ": Structured-CSE-Relative-Resource-ID format support is required to run this test case");
... ... @@ -102,13 +105,16 @@ module OneM2M_PermutationFunctions {
102 105 [] mcaPortIn.receive(mw_request(mw_createContainer(-,v_utRequest.requestPrimitive.to_))) -> value (v_request) {
103 106 tc_ac.stop;
104 107 setverdict(pass, __SCOPE__, " : Container creation request received successfuly");
105   -
106   - v_responsePrimitive := valueof(m_responsePrimitive(int2001, v_request.primitive.requestPrimitive.requestIdentifier, omit));
  108 + v_parentIndex := f_getResourceIndex(v_request.primitive.requestPrimitive.to_);
  109 + v_resource := f_ae_generateLocalResource(v_request.primitive.requestPrimitive.primitiveContent, v_parentIndex, v_request.primitive.requestPrimitive.resourceType);
  110 + v_resourceIndex := f_setLocalResource(v_resource, v_request.primitive.requestPrimitive.resourceType, v_parentIndex);
  111 + v_responsePrimitive := valueof(m_responsePrimitive(int2001, v_request.primitive.requestPrimitive.requestIdentifier, vc_localResourcesList[v_resourceIndex].resource));
107 112 mcaPortIn.send(m_response(v_responsePrimitive));
108 113 }
109 114 [] mcaPortIn.receive(mw_request(?)) {
110 115 tc_ac.stop;
111 116 setverdict(fail, __SCOPE__, " : Error while creating container");
  117 + mcaPortIn.send(m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit))));
112 118 stop;
113 119 }
114 120 [] tc_ac.timeout {
... ... @@ -130,7 +136,7 @@ module OneM2M_PermutationFunctions {
130 136 var ResponsePrimitive v_responsePrimitive;
131 137 var template UtTriggerPrimitive v_utRequest := m_utUpdateContainer;
132 138 var UtTriggerAckPrimitive v_trigger_response;
133   - var integer v_auxInteger;
  139 + var integer v_resourceIndex;
134 140 var PrimitiveContent v_localResource;
135 141 var universal charstring v_action := __SCOPE__ & ": Please, send a valid UPDATE Request for container containing To set to " & f_getLocalResourceAddress(-, e_nonHierarchical, p_primitiveScope);
136 142  
... ... @@ -144,22 +150,24 @@ module OneM2M_PermutationFunctions {
144 150  
145 151 //Send Trigger Message
146 152 v_localResource := f_ae_generateLocalResource(valueof(m_primitiveContentContainer(m_contentCreateContainer)), vc_cSEBaseIndex, int3);
147   - v_auxInteger := f_setLocalResource(v_localResource, int3, vc_cSEBaseIndex);
148   - v_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(v_auxInteger, e_nonHierarchical, p_primitiveScope);
  153 + v_resourceIndex := f_setLocalResource(v_localResource, int3, vc_cSEBaseIndex);
  154 + v_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(v_resourceIndex, e_nonHierarchical, p_primitiveScope);
149 155 f_sendUtPrimitive(v_utRequest,v_action);
150 156  
151 157 tc_ac.start;
152 158 alt {
153   - [] mcaPortIn.receive(mw_request(mw_updateContainer(-,v_utRequest.requestPrimitive.to_))) -> value (v_request) {
  159 + [] mcaPortIn.receive(mw_request(mw_updateContainer(-,v_utRequest.requestPrimitive.to_))) -> value v_request {
154 160 tc_ac.stop;
155 161 setverdict(pass, __SCOPE__, " : Container update request received successfuly");
156   -
157   - v_responsePrimitive := valueof(m_responsePrimitive(int2004, v_request.primitive.requestPrimitive.requestIdentifier, omit));
  162 + v_resourceIndex := f_getResourceIndex(v_request.primitive.requestPrimitive.to_);
  163 + f_cse_updateLocalResource(v_resourceIndex, v_request.primitive.requestPrimitive.primitiveContent);
  164 + v_responsePrimitive := valueof(m_responsePrimitive(int2004, v_request.primitive.requestPrimitive.requestIdentifier, vc_localResourcesList[v_resourceIndex].resource));
158 165 mcaPortIn.send(m_response(v_responsePrimitive));
159 166 }
160 167 [] mcaPortIn.receive(mw_request(?)) {
161 168 tc_ac.stop;
162 169 setverdict(fail, __SCOPE__, " : Error while updating container");
  170 + mcaPortIn.send(m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit))));
163 171 stop;
164 172 }
165 173 [] tc_ac.timeout {
... ... @@ -176,7 +184,7 @@ module OneM2M_PermutationFunctions {
176 184 var ResponsePrimitive v_responsePrimitive;
177 185 var template UtTriggerPrimitive v_utRequest := m_utUpdateContainer;
178 186 var UtTriggerAckPrimitive v_trigger_response;
179   - var integer v_auxInteger;
  187 + var integer v_resourceIndex := -1;
180 188 var PrimitiveContent v_localResource;
181 189 var universal charstring v_action := __SCOPE__ & ": Please, send a valid UPDATE Request for container containing To set to " & f_getLocalResourceAddress(-, e_hierarchical, p_primitiveScope);
182 190  
... ... @@ -189,8 +197,8 @@ module OneM2M_PermutationFunctions {
189 197  
190 198 //Send Trigger Message
191 199 v_localResource := f_ae_generateLocalResource(valueof(m_primitiveContentContainer(m_contentCreateContainer)), vc_cSEBaseIndex, int3);
192   - v_auxInteger := f_setLocalResource(v_localResource, int3, vc_cSEBaseIndex);
193   - v_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(v_auxInteger, e_hierarchical, p_primitiveScope);
  200 + v_resourceIndex := f_setLocalResource(v_localResource, int3, vc_cSEBaseIndex);
  201 + v_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(v_resourceIndex, e_hierarchical, p_primitiveScope);
194 202 f_sendUtPrimitive(v_utRequest,v_action);
195 203  
196 204 tc_ac.start;
... ... @@ -198,13 +206,15 @@ module OneM2M_PermutationFunctions {
198 206 [] mcaPortIn.receive(mw_request(mw_updateContainer(-,v_utRequest.requestPrimitive.to_))) -> value (v_request) {
199 207 tc_ac.stop;
200 208 setverdict(pass, __SCOPE__, " : Container update request received successfuly");
201   -
202   - v_responsePrimitive := valueof(m_responsePrimitive(int2004, v_request.primitive.requestPrimitive.requestIdentifier, omit));
  209 + v_resourceIndex := f_getResourceIndex(v_request.primitive.requestPrimitive.to_);
  210 + f_cse_updateLocalResource(v_resourceIndex, v_request.primitive.requestPrimitive.primitiveContent);
  211 + v_responsePrimitive := valueof(m_responsePrimitive(int2004, v_request.primitive.requestPrimitive.requestIdentifier, vc_localResourcesList[v_resourceIndex].resource));
203 212 mcaPortIn.send(m_response(v_responsePrimitive));
204 213 }
205 214 [] mcaPortIn.receive(mw_request(?)) {
206 215 tc_ac.stop;
207 216 setverdict(fail, __SCOPE__, " : Error while updating container");
  217 + mcaPortIn.send(m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit))));
208 218 stop;
209 219 }
210 220 [] tc_ac.timeout {
... ... @@ -227,7 +237,7 @@ module OneM2M_PermutationFunctions {
227 237 var template UtTriggerPrimitive v_utRequestTemplate;
228 238 var UtTriggerPrimitive v_utRequest;
229 239 var UtTriggerAckPrimitive v_trigger_response;
230   - var integer v_auxInteger;
  240 + var integer v_resourceIndex := -1;
231 241 var PrimitiveContent v_localResource;
232 242 var universal charstring v_action := __SCOPE__ & ": Please, send a valid RETRIEVE Request for container containing To set to " & f_getLocalResourceAddress(-, e_nonHierarchical, p_primitiveScope);
233 243  
... ... @@ -240,8 +250,8 @@ module OneM2M_PermutationFunctions {
240 250  
241 251 //Send Trigger Message
242 252 v_localResource := f_ae_generateLocalResource(valueof(m_primitiveContentContainer(m_contentCreateContainer)), vc_cSEBaseIndex, int3);
243   - v_auxInteger := f_setLocalResource(v_localResource, int3, vc_cSEBaseIndex);
244   - v_utRequestTemplate := m_utRetrieve(f_getLocalResourceAddress(v_auxInteger, e_nonHierarchical, p_primitiveScope));
  253 + v_resourceIndex := f_setLocalResource(v_localResource, int3, vc_cSEBaseIndex);
  254 + v_utRequestTemplate := m_utRetrieve(f_getLocalResourceAddress(v_resourceIndex, e_nonHierarchical, p_primitiveScope));
245 255 f_sendUtPrimitive(v_utRequestTemplate,v_action);
246 256 v_utRequest := valueof(v_utRequestTemplate);
247 257  
... ... @@ -250,13 +260,14 @@ module OneM2M_PermutationFunctions {
250 260 [] mcaPortIn.receive(mw_request(mw_retrieve(v_utRequest.requestPrimitive.to_))) -> value (v_request) {
251 261 tc_ac.stop;
252 262 setverdict(pass, __SCOPE__, " : Container retrieve request received successfuly");
253   -
254   - v_responsePrimitive := valueof(m_responsePrimitive(int2000, v_request.primitive.requestPrimitive.requestIdentifier, omit));
  263 + v_resourceIndex := f_getResourceIndex(v_request.primitive.requestPrimitive.to_);
  264 + v_responsePrimitive := valueof(m_responsePrimitive(int2000, v_request.primitive.requestPrimitive.requestIdentifier, vc_localResourcesList[v_resourceIndex].resource));
255 265 mcaPortIn.send(m_response(v_responsePrimitive));
256 266 }
257 267 [] mcaPortIn.receive(mw_request(?)) {
258 268 tc_ac.stop;
259 269 setverdict(fail, __SCOPE__, " : Error while retrieving container");
  270 + mcaPortIn.send(m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit))));
260 271 stop;
261 272 }
262 273 [] tc_ac.timeout {
... ... @@ -274,7 +285,7 @@ module OneM2M_PermutationFunctions {
274 285 var template UtTriggerPrimitive v_utRequestTemplate;
275 286 var UtTriggerPrimitive v_utRequest;
276 287 var UtTriggerAckPrimitive v_trigger_response;
277   - var integer v_auxInteger;
  288 + var integer v_resourceIndex := -1;
278 289 var PrimitiveContent v_localResource;
279 290 var universal charstring v_action := __SCOPE__ & ": Please, send a valid RETRIEVE Request for container containing To set to " & f_getLocalResourceAddress(-, e_hierarchical, p_primitiveScope);
280 291  
... ... @@ -287,8 +298,8 @@ module OneM2M_PermutationFunctions {
287 298  
288 299 //Send Trigger Message
289 300 v_localResource := f_ae_generateLocalResource(valueof(m_primitiveContentContainer(m_contentCreateContainer)), vc_cSEBaseIndex, int3);
290   - v_auxInteger := f_setLocalResource(v_localResource, int3, vc_cSEBaseIndex);
291   - v_utRequestTemplate := m_utRetrieve(f_getLocalResourceAddress(v_auxInteger, e_hierarchical, p_primitiveScope));
  301 + v_resourceIndex := f_setLocalResource(v_localResource, int3, vc_cSEBaseIndex);
  302 + v_utRequestTemplate := m_utRetrieve(f_getLocalResourceAddress(v_resourceIndex, e_hierarchical, p_primitiveScope));
292 303 v_utRequest := valueof(v_utRequestTemplate);
293 304 f_sendUtPrimitive(v_utRequest,v_action);
294 305  
... ... @@ -297,13 +308,14 @@ module OneM2M_PermutationFunctions {
297 308 [] mcaPortIn.receive(mw_request(mw_retrieve(v_utRequest.requestPrimitive.to_))) -> value (v_request) {
298 309 tc_ac.stop;
299 310 setverdict(pass, __SCOPE__, " : Container retrieve request received successfuly");
300   -
301   - v_responsePrimitive := valueof(m_responsePrimitive(int2000, v_request.primitive.requestPrimitive.requestIdentifier, omit));
  311 + v_resourceIndex := f_getResourceIndex(v_request.primitive.requestPrimitive.to_);
  312 + v_responsePrimitive := valueof(m_responsePrimitive(int2000, v_request.primitive.requestPrimitive.requestIdentifier, vc_localResourcesList[v_resourceIndex].resource));
302 313 mcaPortIn.send(m_response(v_responsePrimitive));
303 314 }
304 315 [] mcaPortIn.receive(mw_request(?)) {
305 316 tc_ac.stop;
306 317 setverdict(fail, __SCOPE__, " : Error while retrieving container");
  318 + mcaPortIn.send(m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit))));
307 319 stop;
308 320 }
309 321 [] tc_ac.timeout {
... ... @@ -347,20 +359,21 @@ module OneM2M_PermutationFunctions {
347 359 [] mcaPortIn.receive(mw_request(mw_delete(v_utRequest.requestPrimitive.to_))) -> value (v_request) {
348 360 tc_ac.stop;
349 361 setverdict(pass, __SCOPE__, " : Container update request received successfuly");
350   -
351 362 v_responsePrimitive := valueof(m_responsePrimitive(int2004, v_request.primitive.requestPrimitive.requestIdentifier, omit));
352 363 mcaPortIn.send(m_response(v_responsePrimitive));
353 364 }
354 365 [] mcaPortIn.receive(mw_request(?)) {
355 366 tc_ac.stop;
356 367 setverdict(fail, __SCOPE__, " : Error while updating container");
  368 + mcaPortIn.send(m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit))));
357 369 stop;
358 370 }
359 371 [] tc_ac.timeout {
360 372 setverdict(fail, __SCOPE__, " : No answer while updating resource");
361 373 stop;
362 374 }
363   - }
  375 + }" &Conflicts in index. Try without --index.
  376 + "
364 377  
365 378 // Postamble
366 379 f_cf03Down();
... ... @@ -393,13 +406,13 @@ module OneM2M_PermutationFunctions {
393 406 [] mcaPortIn.receive(mw_request(mw_delete(v_utRequest.requestPrimitive.to_))) -> value (v_request) {
394 407 tc_ac.stop;
395 408 setverdict(pass, __SCOPE__, " : Container update request received successfuly");
396   -
397 409 v_responsePrimitive := valueof(m_responsePrimitive(int2004, v_request.primitive.requestPrimitive.requestIdentifier, omit));
398 410 mcaPortIn.send(m_response(v_responsePrimitive));
399 411 }
400 412 [] mcaPortIn.receive(mw_request(?)) {
401 413 tc_ac.stop;
402 414 setverdict(fail, __SCOPE__, " : Error while updating container");
  415 + mcaPortIn.send(m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit))));
403 416 stop;
404 417 }
405 418 [] tc_ac.timeout {
... ... @@ -424,6 +437,9 @@ module OneM2M_PermutationFunctions {
424 437  
425 438 //primitives for mcaPortIn
426 439 var MsgIn v_request;
  440 + var integer v_parentIndex := -1;
  441 + var integer v_resourceIndex := -1;
  442 + var PrimitiveContent v_resource;
427 443 var ResponsePrimitive v_responsePrimitive;
428 444  
429 445 f_cf03Up();
... ... @@ -439,15 +455,18 @@ module OneM2M_PermutationFunctions {
439 455 [] mcaPortIn.receive(mw_request(p_request)) -> value v_request {
440 456 tc_ac.stop;
441 457 setverdict(pass, __SCOPE__, " : AE registration request is accepted!!");
442   - //v_responsePrimitive := valueof(m_responsePrimitiveTemp(int2000, omit));
443   - v_responsePrimitive := valueof(m_responsePrimitive(int2001, v_request.primitive.requestPrimitive.requestIdentifier, omit));
444   -
  458 + v_parentIndex := f_getResourceIndex(v_request.primitive.requestPrimitive.to_);
  459 + v_resource := f_ae_generateLocalResource(v_request.primitive.requestPrimitive.primitiveContent, v_parentIndex, v_request.primitive.requestPrimitive.resourceType);
  460 + v_resourceIndex := f_setLocalResource(v_resource, v_request.primitive.requestPrimitive.resourceType, v_parentIndex);
  461 + v_responsePrimitive := valueof(m_responsePrimitive(int2001, v_request.primitive.requestPrimitive.requestIdentifier, vc_localResourcesList[v_resourceIndex].resource));
  462 +
445 463 //send back responsePrimitive
446 464 mcaPortIn.send(m_response(v_responsePrimitive));
447 465 }
448 466 [] mcaPortIn.receive(mw_request(mw_createAe(*,?,m_contentCreateAe_Invalid))) -> value v_request {
449 467 tc_ac.stop;
450 468 setverdict(fail, __SCOPE__, " : AE registration request is rejected due to not including the optional attribute!");
  469 + mcaPortIn.send(m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit))));
451 470 }
452 471 [] tc_ac.timeout{
453 472 setverdict(fail, __SCOPE__, " : Timeout due to no response received from requested SUT!");
... ... @@ -473,6 +492,9 @@ module OneM2M_PermutationFunctions {
473 492  
474 493 function f_AE_DMR_CRE_003(template UtTriggerPrimitive p_utRequest, template RequestPrimitive p_request, in universal charstring p_action) runs on CseSimu {
475 494 var MsgIn v_request;
  495 + var integer v_parentIndex := -1;
  496 + var integer v_resourceIndex := -1;
  497 + var PrimitiveContent v_resource;
476 498 var PrimitiveContent v_localResource;
477 499 var integer v_containerIndex := -1;
478 500 var ResponsePrimitive v_responsePrimitive;
... ... @@ -495,10 +517,11 @@ module OneM2M_PermutationFunctions {
495 517 [] mcaPortIn.receive(mw_request(p_request)) -> value (v_request) {
496 518 tc_ac.stop;
497 519 setverdict(pass, __SCOPE__, " : ContentInstance creation request is accepted!!");
498   -
499   - //set responseStatusCode back to SUT
500   - v_responsePrimitive := valueof(m_responsePrimitive(int2001, v_request.primitive.requestPrimitive.requestIdentifier, omit));
501   -
  520 + v_parentIndex := f_getResourceIndex(v_request.primitive.requestPrimitive.to_);
  521 + v_resource := f_ae_generateLocalResource(v_request.primitive.requestPrimitive.primitiveContent, v_parentIndex, v_request.primitive.requestPrimitive.resourceType);
  522 + v_resourceIndex := f_setLocalResource(v_resource, v_request.primitive.requestPrimitive.resourceType, v_parentIndex);
  523 + v_responsePrimitive := valueof(m_responsePrimitive(int2001, v_request.primitive.requestPrimitive.requestIdentifier, vc_localResourcesList[v_resourceIndex].resource));
  524 +
502 525 //send back responsePrimitive
503 526 mcaPortIn.send(m_response(v_responsePrimitive));
504 527 }
... ... @@ -506,6 +529,7 @@ module OneM2M_PermutationFunctions {
506 529 [] mcaPortIn.receive {
507 530 tc_ac.stop;
508 531 setverdict(fail, __SCOPE__, " : ContentInstance creation request is rejected due to not including the attribute!");
  532 + mcaPortIn.send(m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit))));
509 533 }
510 534  
511 535 [] tc_ac.timeout{
... ... @@ -518,6 +542,9 @@ module OneM2M_PermutationFunctions {
518 542 }
519 543 function f_AE_DMR_CRE_004(template UtTriggerPrimitive p_utRequest, template RequestPrimitive p_request, in universal charstring p_action) runs on CseSimu {
520 544 var MsgIn v_request;
  545 + var integer v_parentIndex := -1;
  546 + var integer v_resourceIndex := -1;
  547 + var PrimitiveContent v_resource;
521 548 var ResponsePrimitive v_responsePrimitive;
522 549  
523 550 //Test component configuration
... ... @@ -536,19 +563,19 @@ module OneM2M_PermutationFunctions {
536 563 [] mcaPortIn.receive(mw_request(p_request)) -> value (v_request) {
537 564 tc_ac.stop;
538 565 setverdict(pass, __SCOPE__, " : Container creation request is accepted!!");
539   -
540   - //set responseStatusCode back to SUT
541   - v_responsePrimitive := valueof(m_responsePrimitive(int2001, v_request.primitive.requestPrimitive.requestIdentifier, omit));
  566 + v_parentIndex := f_getResourceIndex(v_request.primitive.requestPrimitive.to_);
  567 + v_resource := f_ae_generateLocalResource(v_request.primitive.requestPrimitive.primitiveContent, v_parentIndex, v_request.primitive.requestPrimitive.resourceType);
  568 + v_resourceIndex := f_setLocalResource(v_resource, v_request.primitive.requestPrimitive.resourceType, v_parentIndex);
  569 + v_responsePrimitive := valueof(m_responsePrimitive(int2001, v_request.primitive.requestPrimitive.requestIdentifier, vc_localResourcesList[v_resourceIndex].resource));
542 570  
543 571 //send back responsePrimitive
544 572 mcaPortIn.send(m_response(v_responsePrimitive));
545 573 }
546   -
547 574 [] mcaPortIn.receive {
548 575 tc_ac.stop;
549 576 setverdict(fail, __SCOPE__, " : Container creation request is rejected due to not including the attribute!");
  577 + mcaPortIn.send(m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit))));
550 578 }
551   -
552 579 [] tc_ac.timeout{
553 580 setverdict(fail, __SCOPE__, " : Timeout due to no response received from requested SUT!");
554 581 }
... ... @@ -566,9 +593,9 @@ module OneM2M_PermutationFunctions {
566 593  
567 594 //primitives for mcaPortIn
568 595 var MsgIn v_request;
569   - var integer v_auxInteger := -1;
570   - var PrimitiveContent v_modifiedResource;
  596 + var integer v_resourceIndex := -1;
571 597 var PrimitiveContent v_localResource;
  598 + var ResponsePrimitive v_responsePrimitive;
572 599  
573 600 f_cf03Up();
574 601  
... ... @@ -576,8 +603,8 @@ module OneM2M_PermutationFunctions {
576 603  
577 604 //Send Trigger Message
578 605 v_localResource := f_ae_generateLocalResource(valueof(m_primitiveContentAe(m_contentCreateAe(omit, omit, omit, omit))), vc_cSEBaseIndex, int2);
579   - v_auxInteger := f_setLocalResource(v_localResource, int2, vc_cSEBaseIndex);
580   - p_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(v_auxInteger);
  606 + v_resourceIndex := f_setLocalResource(v_localResource, int2, vc_cSEBaseIndex);
  607 + p_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(v_resourceIndex);
581 608 f_sendUtPrimitive(p_utRequest,p_action);
582 609  
583 610 //Test behavior
... ... @@ -587,14 +614,15 @@ module OneM2M_PermutationFunctions {
587 614 [] mcaPortIn.receive(mw_request(p_expectedUpdateRequest)) -> value v_request {
588 615 tc_ac.stop;
589 616 setverdict(pass, __SCOPE__, " : AE update request is accepted!");
590   -
591   - vc_response.primitive.responsePrimitive := valueof(m_responsePrimitive(int2001, v_request.primitive.requestPrimitive.requestIdentifier, omit));
592   -
593   - mcaPortIn.send(m_response(vc_response.primitive.responsePrimitive));
  617 + v_resourceIndex := f_getResourceIndex(v_request.primitive.requestPrimitive.to_);
  618 + f_cse_updateLocalResource(v_resourceIndex, v_request.primitive.requestPrimitive.primitiveContent);
  619 + v_responsePrimitive := valueof(m_responsePrimitive(int2004, v_request.primitive.requestPrimitive.requestIdentifier, vc_localResourcesList[v_resourceIndex].resource));
  620 + mcaPortIn.send(m_response(v_responsePrimitive));
594 621 }
595 622 [] mcaPortIn.receive(mw_request(?)) -> value v_request {
596 623 tc_ac.stop;
597 624 setverdict(fail, __SCOPE__, " : AE update request is rejected due to not including the optional attribute!");
  625 + mcaPortIn.send(m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit))));
598 626 }
599 627 [] tc_ac.timeout{
600 628 setverdict(fail, __SCOPE__, " : Timeout due to no response received from requested SUT!");
... ... @@ -610,15 +638,15 @@ module OneM2M_PermutationFunctions {
610 638 var MsgIn v_request;
611 639 var ResponsePrimitive v_responsePrimitive;
612 640 var PrimitiveContent v_localResource;
613   - var integer v_auxInteger := -1;
  641 + var integer v_resourceIndex := -1;
614 642  
615 643 //Test component configuration
616 644 f_cf03Up();
617 645  
618 646 //send triggering primitive to SUT
619 647 v_localResource := f_ae_generateLocalResource(valueof(m_primitiveContentContainer(m_contentCreateContainer)), vc_cSEBaseIndex, int3);
620   - v_auxInteger := f_setLocalResource(v_localResource, int3, vc_cSEBaseIndex);
621   - p_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(v_auxInteger);
  648 + v_resourceIndex := f_setLocalResource(v_localResource, int3, vc_cSEBaseIndex);
  649 + p_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(v_resourceIndex);
622 650 f_sendUtPrimitive(p_utRequest,p_action);
623 651  
624 652 //Test behavior
... ... @@ -629,17 +657,16 @@ module OneM2M_PermutationFunctions {
629 657 [] mcaPortIn.receive(mw_request(p_request)) -> value (v_request) {
630 658 tc_ac.stop;
631 659 setverdict(pass, __SCOPE__, " : Container update request is accepted!!");
632   -
633   - //set responseStatusCode back to SUT
634   - v_responsePrimitive := valueof(m_responsePrimitive(int2004, v_request.primitive.requestPrimitive.requestIdentifier, omit));
635   -
636   - //send back responsePrimitive
  660 + v_resourceIndex := f_getResourceIndex(v_request.primitive.requestPrimitive.to_);
  661 + f_cse_updateLocalResource(v_resourceIndex, v_request.primitive.requestPrimitive.primitiveContent);
  662 + v_responsePrimitive := valueof(m_responsePrimitive(int2004, v_request.primitive.requestPrimitive.requestIdentifier, vc_localResourcesList[v_resourceIndex].resource));
637 663 mcaPortIn.send(m_response(v_responsePrimitive));
638 664 }
639 665  
640 666 [] mcaPortIn.receive {
641 667 tc_ac.stop;
642 668 setverdict(fail, __SCOPE__, " : Container update request is rejected due to not including the attribute!");
  669 + mcaPortIn.send(m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit))));
643 670 }
644 671  
645 672 [] tc_ac.timeout{
... ... @@ -662,34 +689,31 @@ module OneM2M_PermutationFunctions {
662 689 var MsgIn v_request;
663 690 var ResponsePrimitive v_responsePrimitive;
664 691 var PrimitiveContent v_localResource;
665   - var integer v_auxInteger := -1;
666   -
  692 + var integer v_resourceIndex := -1;
  693 +
667 694 //Test component configuration
668 695 f_cf03Up();
669 696  
670 697 //send triggering primitive to SUT
671 698 v_localResource := f_ae_generateLocalResource(valueof(p_primitiveContent), vc_cSEBaseIndex, p_resourceType);
672   - v_auxInteger := f_setLocalResource(v_localResource, p_resourceType, vc_cSEBaseIndex);
673   - v_utRequest := m_utRetrieve(f_getLocalResourceAddress(v_auxInteger));
  699 + v_resourceIndex := f_setLocalResource(v_localResource, p_resourceType, vc_cSEBaseIndex);
  700 + v_utRequest := m_utRetrieve(f_getLocalResourceAddress(v_resourceIndex));
674 701 f_sendUtPrimitive(v_utRequest,p_action);
675 702  
676 703 //Test behavior
677 704 tc_ac.start;
678 705 alt{
679   - [] mcaPortIn.receive(mw_request(mw_retrieve(f_getLocalResourceAddress(v_auxInteger)))) -> value v_request {
  706 + [] mcaPortIn.receive(mw_request(mw_retrieve(f_getLocalResourceAddress(v_resourceIndex)))) -> value v_request {
680 707 tc_ac.stop;
681 708 setverdict(pass, __SCOPE__, " : retrieve resource type request is accepted!!");
682   -
683   - //set responseStatusCode back to SUT
684   - v_responsePrimitive := valueof(m_responsePrimitive(int2000, v_request.primitive.requestPrimitive.requestIdentifier, omit));
685   -
686   - //send back responsePrimitive
  709 + v_resourceIndex := f_getResourceIndex(v_request.primitive.requestPrimitive.to_);
  710 + v_responsePrimitive := valueof(m_responsePrimitive(int2000, v_request.primitive.requestPrimitive.requestIdentifier, vc_localResourcesList[v_resourceIndex].resource));
687 711 mcaPortIn.send(m_response(v_responsePrimitive));
688   - tc_ac.stop;
689 712 }
690 713 [] mcaPortIn.receive {
691 714 tc_ac.stop;
692 715 setverdict(fail, __SCOPE__, " : error while retrieving resource !");
  716 + mcaPortIn.send(m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit))));
693 717 }
694 718 [] tc_ac.timeout{
695 719 setverdict(fail, __SCOPE__, " : Timeout due to no response received from requested SUT!");
... ... @@ -716,6 +740,9 @@ module OneM2M_PermutationFunctions {
716 740 function f_AE_SUB_CRE_002(template UtTriggerPrimitive p_utRequest, template RequestPrimitive p_request, in universal charstring p_action) runs on CseSimu {
717 741  
718 742 var MsgIn v_request;
  743 + var integer v_parentIndex := -1;
  744 + var integer v_resourceIndex := -1;
  745 + var PrimitiveContent v_resource;
719 746 var ResponsePrimitive v_responsePrimitive;
720 747  
721 748 f_cf03Up();
... ... @@ -730,16 +757,19 @@ module OneM2M_PermutationFunctions {
730 757 [] mcaPortIn.receive(mw_request(p_request)) -> value v_request {
731 758 tc_ac.stop;
732 759 setverdict(pass, __SCOPE__, " : Subscription creation request is accepted!");
733   -
734   - //set responseStatusCode back to SUT
735   - v_responsePrimitive := valueof(m_responsePrimitive(int2001, v_request.primitive.requestPrimitive.requestIdentifier, omit));
736   -
  760 + v_parentIndex := f_getResourceIndex(v_request.primitive.requestPrimitive.to_);
  761 + v_resource := f_ae_generateLocalResource(v_request.primitive.requestPrimitive.primitiveContent, v_parentIndex, v_request.primitive.requestPrimitive.resourceType);
  762 + v_resourceIndex := f_setLocalResource(v_resource, v_request.primitive.requestPrimitive.resourceType, v_parentIndex);
  763 + v_responsePrimitive := valueof(m_responsePrimitive(int2001, v_request.primitive.requestPrimitive.requestIdentifier, vc_localResourcesList[v_resourceIndex].resource));
  764 + " &Conflicts in index. Try without --index.
  765 + "
737 766 //send back responsePrimitive
738 767 mcaPortIn.send(m_response(v_responsePrimitive));
739 768 }
740 769 [] mcaPortIn.receive {
741 770 tc_ac.stop;
742 771 setverdict(fail, __SCOPE__, " : Subscription creation request is rejected due to not including the optional attribute!");
  772 + mcaPortIn.send(m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit))));
743 773 }
744 774 [] tc_ac.timeout{
745 775 setverdict(fail, __SCOPE__, " : Timeout due to no response received from requested SUT!");
... ...
... ... @@ -463,7 +463,9 @@ module OneM2M_Testcases_AE_Release_1 {
463 463  
464 464 //primitives for utPort
465 465 var template UtTriggerPrimitive v_utRequest := m_utCreateAe;
466   -
  466 + var integer v_parentIndex := -1;
  467 + var integer v_resourceIndex := -1;
  468 + var PrimitiveContent v_resource;
467 469  
468 470 //primitives for mcaPortIn
469 471 var MsgIn v_request;
... ... @@ -484,8 +486,10 @@ module OneM2M_Testcases_AE_Release_1 {
484 486 [] mcaPortIn.receive(mw_request(v_requestPrimitive)) -> value v_request {
485 487 tc_ac.stop;
486 488 setverdict(pass, __SCOPE__, " : AE registration request is accepted!!");
487   - //v_responsePrimitive := valueof(m_responsePrimitiveTemp(int2000, omit));
488   - v_responsePrimitive := valueof(m_responsePrimitive(int2001, v_request.primitive.requestPrimitive.requestIdentifier, omit));
  489 + v_parentIndex := f_getResourceIndex(v_request.primitive.requestPrimitive.to_);
  490 + v_resource := f_ae_generateLocalResource(v_request.primitive.requestPrimitive.primitiveContent, v_parentIndex, v_request.primitive.requestPrimitive.resourceType);
  491 + v_resourceIndex := f_setLocalResource(v_resource, v_request.primitive.requestPrimitive.resourceType, v_parentIndex);
  492 + v_responsePrimitive := valueof(m_responsePrimitive(int2001, v_request.primitive.requestPrimitive.requestIdentifier, vc_localResourcesList[v_resourceIndex].resource));
489 493  
490 494 //send back responsePrimitive
491 495 mcaPortIn.send(m_response(v_responsePrimitive));
... ... @@ -493,6 +497,7 @@ module OneM2M_Testcases_AE_Release_1 {
493 497 [] mcaPortIn.receive(mw_request(mw_createAe(*,?,m_contentCreateAe_Invalid))) -> value v_request {
494 498 tc_ac.stop;
495 499 setverdict(fail, __SCOPE__, " : AE registration request is rejected due to not including mandatory attributes!!");
  500 + mcaPortIn.send(m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit))));
496 501 }
497 502 [] tc_ac.timeout{
498 503 setverdict(fail, __SCOPE__, " : Timeout due to no response received from requested SUT!");
... ... @@ -688,9 +693,7 @@ module OneM2M_Testcases_AE_Release_1 {
688 693 [] mcaPortIn.receive(mw_request(mw_delete(v_utRequest.requestPrimitive.to_))) -> value v_request {
689 694 tc_ac.stop;
690 695 setverdict(pass, __SCOPE__, " : AE deregistration request is accepted!");
691   -
692   - //v_responsePrimitive := valueof(m_responsePrimitiveTemp(int2000, omit));
693   - v_responsePrimitive := valueof(m_responsePrimitive(int2001, v_request.primitive.requestPrimitive.requestIdentifier, omit));
  696 + v_responsePrimitive := valueof(m_responsePrimitive(int2002, v_request.primitive.requestPrimitive.requestIdentifier, omit));
694 697  
695 698 //send back responsePrimitive
696 699 mcaPortIn.send(m_response(v_responsePrimitive));
... ... @@ -698,6 +701,7 @@ module OneM2M_Testcases_AE_Release_1 {
698 701 [] mcaPortIn.receive {
699 702 tc_ac.stop;
700 703 setverdict(fail, __SCOPE__, " : Error while AE deregistration");
  704 + mcaPortIn.send(m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit))));
701 705 }
702 706 [] tc_ac.timeout{
703 707 setverdict(fail, __SCOPE__, " : Timeout due to no response received from requested SUT!");
... ... @@ -734,6 +738,9 @@ module OneM2M_Testcases_AE_Release_1 {
734 738 //variables
735 739 var template UtTriggerPrimitive v_utRequest := m_utCreateContainer;
736 740 var MsgIn v_request;
  741 + var integer v_parentIndex := -1;
  742 + var integer v_resourceIndex := -1;
  743 + var PrimitiveContent v_resource;
737 744 var template RequestPrimitive v_requestPrimitive := mw_createContainer;
738 745 var ResponsePrimitive v_responsePrimitive;
739 746 var universal charstring v_action := __SCOPE__ & ": Please, send a valid CREATE Request for container";
... ... @@ -751,9 +758,10 @@ module OneM2M_Testcases_AE_Release_1 {
751 758 [] mcaPortIn.receive(mw_request(v_requestPrimitive)) -> value v_request {
752 759 tc_ac.stop;
753 760 setverdict(pass, __SCOPE__, " : Container creation request is accepted!");
754   -
755   - //set responseStatusCode back to SUT
756   - v_responsePrimitive := valueof(m_responsePrimitive(int2001, v_request.primitive.requestPrimitive.requestIdentifier, omit));
  761 + v_parentIndex := f_getResourceIndex(v_request.primitive.requestPrimitive.to_);
  762 + v_resource := f_ae_generateLocalResource(v_request.primitive.requestPrimitive.primitiveContent, v_parentIndex, v_request.primitive.requestPrimitive.resourceType);
  763 + v_resourceIndex := f_setLocalResource(v_resource, v_request.primitive.requestPrimitive.resourceType, v_parentIndex);
  764 + v_responsePrimitive := valueof(m_responsePrimitive(int2001, v_request.primitive.requestPrimitive.requestIdentifier, vc_localResourcesList[v_resourceIndex].resource));
757 765  
758 766 //send back responsePrimitive
759 767 mcaPortIn.send(m_response(v_responsePrimitive));
... ... @@ -761,6 +769,7 @@ module OneM2M_Testcases_AE_Release_1 {
761 769 [] mcaPortIn.receive {
762 770 tc_ac.stop;
763 771 setverdict(fail, __SCOPE__, " : Container creation request is rejected due to not including mandatory attributes!!");
  772 + mcaPortIn.send(m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit))));
764 773 }
765 774 [] tc_ac.timeout{
766 775 setverdict(fail, __SCOPE__, " : Timeout due to no response received from requested SUT!");
... ... @@ -787,6 +796,9 @@ module OneM2M_Testcases_AE_Release_1 {
787 796  
788 797 var template UtTriggerPrimitive v_utRequest := m_utCreateContentInstance;
789 798 var MsgIn v_request;
  799 + var integer v_parentIndex := -1;
  800 + var integer v_resourceIndex := -1;
  801 + var PrimitiveContent v_resource;
790 802 var PrimitiveContent v_localResource;
791 803 var integer v_containerIndex := -1;
792 804 var template RequestPrimitive v_requestPrimitive := mw_createContentInstance;
... ... @@ -811,17 +823,18 @@ module OneM2M_Testcases_AE_Release_1 {
811 823 [] mcaPortIn.receive(mw_request(v_requestPrimitive)) -> value v_request {
812 824 tc_ac.stop;
813 825 setverdict(pass, __SCOPE__, " : ContentInstance creation request is accepted!!");
814   -
815   - //set responseStatusCode back to SUT
816   - v_responsePrimitive := valueof(m_responsePrimitive(int2001, v_request.primitive.requestPrimitive.requestIdentifier, omit));
  826 + v_parentIndex := f_getResourceIndex(v_request.primitive.requestPrimitive.to_);
  827 + v_resource := f_ae_generateLocalResource(v_request.primitive.requestPrimitive.primitiveContent, v_parentIndex, v_request.primitive.requestPrimitive.resourceType);
  828 + v_resourceIndex := f_setLocalResource(v_resource, v_request.primitive.requestPrimitive.resourceType, v_parentIndex);
  829 + v_responsePrimitive := valueof(m_responsePrimitive(int2001, v_request.primitive.requestPrimitive.requestIdentifier, vc_localResourcesList[v_resourceIndex].resource));
817 830  
818 831 //send back responsePrimitive
819 832 mcaPortIn.send(m_response(v_responsePrimitive));
820 833 }
821   -
822 834 [] mcaPortIn.receive {
823 835 tc_ac.stop;
824 836 setverdict(fail, __SCOPE__, " : ContentInstance creation request is rejected due to not including mandatory attributes!!");
  837 + mcaPortIn.send(m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit))));
825 838 }
826 839  
827 840 [] tc_ac.timeout{
... ... @@ -1294,7 +1307,7 @@ module OneM2M_Testcases_AE_Release_1 {
1294 1307  
1295 1308 function f_AE_DMR_RET_002() runs on CseSimu {
1296 1309  
1297   - var integer v_auxInteger := -1;
  1310 + var integer v_resourceIndex := -1;
1298 1311 var PrimitiveContent v_localResource;
1299 1312  
1300 1313 //variables
... ... @@ -1308,8 +1321,8 @@ module OneM2M_Testcases_AE_Release_1 {
1308 1321  
1309 1322 //send triggering primitive to SUT
1310 1323 v_localResource := f_ae_generateLocalResource(valueof(m_primitiveContentContainer(m_contentCreateContainer)), vc_cSEBaseIndex, int3);
1311   - v_auxInteger := f_setLocalResource(v_localResource, int3, vc_cSEBaseIndex);
1312   - v_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(v_auxInteger) & "/" & c_resourceShortNameOldest;
  1324 + v_resourceIndex := f_setLocalResource(v_localResource, int3, vc_cSEBaseIndex);
  1325 + v_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(v_resourceIndex) & "/" & c_resourceShortNameOldest;
1313 1326 f_sendUtPrimitive(v_utRequest,v_action);
1314 1327  
1315 1328 //Test behavior
... ... @@ -1318,17 +1331,14 @@ module OneM2M_Testcases_AE_Release_1 {
1318 1331 [] mcaPortIn.receive(mw_request(mw_retrieve(v_utRequest.requestPrimitive.to_ ))) -> value v_request {
1319 1332 tc_ac.stop;
1320 1333 setverdict(pass, __SCOPE__, " : retrieve attribute oldest request is accepted!");
1321   -
1322   - //set responseStatusCode back to SUT
1323   - v_responsePrimitive := valueof(m_responsePrimitive(int2000, v_request.primitive.requestPrimitive.requestIdentifier, omit));
1324   -
1325   - //send back responsePrimitive
  1334 + v_resourceIndex := f_getResourceIndex(v_request.primitive.requestPrimitive.to_);
  1335 + v_responsePrimitive := valueof(m_responsePrimitive(int2000, v_request.primitive.requestPrimitive.requestIdentifier, vc_localResourcesList[v_resourceIndex].resource));
1326 1336 mcaPortIn.send(m_response(v_responsePrimitive));
1327   - tc_ac.stop;
1328 1337 }
1329 1338 [] mcaPortIn.receive {
1330 1339 tc_ac.stop;
1331 1340 setverdict(fail, __SCOPE__, " : error while retrieving attribute !");
  1341 + mcaPortIn.send(m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit))));
1332 1342 }
1333 1343 [] tc_ac.timeout{
1334 1344 setverdict(fail, __SCOPE__, " : Timeout due to no response received from requested SUT!");
... ... @@ -1354,7 +1364,7 @@ module OneM2M_Testcases_AE_Release_1 {
1354 1364  
1355 1365 function f_AE_DMR_RET_003() runs on CseSimu {
1356 1366  
1357   - var integer v_auxInteger := -1;
  1367 + var integer v_resourceIndex := -1;
1358 1368 var PrimitiveContent v_localResource;
1359 1369  
1360 1370 //variables
... ... @@ -1368,8 +1378,8 @@ module OneM2M_Testcases_AE_Release_1 {
1368 1378  
1369 1379 //send triggering primitive to SUT
1370 1380 v_localResource := f_ae_generateLocalResource(valueof(m_primitiveContentContainer(m_contentCreateContainer)), vc_cSEBaseIndex, int3);
1371   - v_auxInteger := f_setLocalResource(v_localResource, int3, vc_cSEBaseIndex);
1372   - v_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(v_auxInteger) & "/" & c_resourceShortNameLatest;
  1381 + v_resourceIndex := f_setLocalResource(v_localResource, int3, vc_cSEBaseIndex);
  1382 + v_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(v_resourceIndex) & "/" & c_resourceShortNameLatest;
1373 1383 f_sendUtPrimitive(v_utRequest,v_action);
1374 1384  
1375 1385 //Test behavior
... ... @@ -1378,17 +1388,14 @@ module OneM2M_Testcases_AE_Release_1 {
1378 1388 [] mcaPortIn.receive(mw_request(mw_retrieve(v_utRequest.requestPrimitive.to_))) -> value v_request {
1379 1389 tc_ac.stop;
1380 1390 setverdict(pass, __SCOPE__, " : retrieve attribute latest request is accepted!!");
1381   -
1382   - //set responseStatusCode back to SUT
1383   - v_responsePrimitive := valueof(m_responsePrimitive(int2000, v_request.primitive.requestPrimitive.requestIdentifier, omit));
1384   -
1385   - //send back responsePrimitive
  1391 + v_resourceIndex := f_getResourceIndex(v_request.primitive.requestPrimitive.to_);
  1392 + v_responsePrimitive := valueof(m_responsePrimitive(int2000, v_request.primitive.requestPrimitive.requestIdentifier, vc_localResourcesList[v_resourceIndex].resource));
1386 1393 mcaPortIn.send(m_response(v_responsePrimitive));
1387   - tc_ac.stop;
1388 1394 }
1389 1395 [] mcaPortIn.receive {
1390 1396 tc_ac.stop;
1391 1397 setverdict(fail, __SCOPE__, " : error while retrieving attribute !");
  1398 + mcaPortIn.send(m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit))));
1392 1399 }
1393 1400 [] tc_ac.timeout{
1394 1401 setverdict(fail, __SCOPE__, " : Timeout due to no response received from requested SUT!");
... ... @@ -1414,7 +1421,7 @@ module OneM2M_Testcases_AE_Release_1 {
1414 1421  
1415 1422 function f_AE_DMR_RET_004() runs on CseSimu {
1416 1423  
1417   - var integer v_auxInteger := -1;
  1424 + var integer v_resourceIndex := -1;
1418 1425 var PrimitiveContent v_localResource;
1419 1426  
1420 1427 //variables
... ... @@ -1428,8 +1435,8 @@ module OneM2M_Testcases_AE_Release_1 {
1428 1435  
1429 1436 //send triggering primitive to SUT
1430 1437 v_localResource := f_ae_generateLocalResource(valueof(m_primitiveContentContainer(m_contentCreateContainer)), vc_cSEBaseIndex, int3);
1431   - v_auxInteger := f_setLocalResource(v_localResource, int3, vc_cSEBaseIndex);
1432   - v_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(v_auxInteger);
  1438 + v_resourceIndex := f_setLocalResource(v_localResource, int3, vc_cSEBaseIndex);
  1439 + v_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(v_resourceIndex);
1433 1440 f_sendUtPrimitive(v_utRequest,v_action);
1434 1441  
1435 1442 //Test behavior
... ... @@ -1438,17 +1445,14 @@ module OneM2M_Testcases_AE_Release_1 {
1438 1445 [] mcaPortIn.receive(mw_request(mw_retrieve(v_utRequest.requestPrimitive.to_))) -> value v_request {
1439 1446 tc_ac.stop;
1440 1447 setverdict(pass, __SCOPE__, " : retrieve resource type request is accepted!!");
1441   -
1442   - //set responseStatusCode back to SUT
1443   - v_responsePrimitive := valueof(m_responsePrimitive(int2000, v_request.primitive.requestPrimitive.requestIdentifier, omit));
1444   -
1445   - //send back responsePrimitive
  1448 + v_resourceIndex := f_getResourceIndex(v_request.primitive.requestPrimitive.to_);
  1449 + v_responsePrimitive := valueof(m_responsePrimitive(int2000, v_request.primitive.requestPrimitive.requestIdentifier, vc_localResourcesList[v_resourceIndex].resource));
1446 1450 mcaPortIn.send(m_response(v_responsePrimitive));
1447   - tc_ac.stop;
1448 1451 }
1449 1452 [] mcaPortIn.receive {
1450 1453 tc_ac.stop;
1451 1454 setverdict(fail, __SCOPE__, " : error while retrieving resource !");
  1455 + mcaPortIn.send(m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit))));
1452 1456 }
1453 1457 [] tc_ac.timeout{
1454 1458 setverdict(fail, __SCOPE__, " : Timeout due to no response received from requested SUT!");
... ... @@ -1474,7 +1478,7 @@ module OneM2M_Testcases_AE_Release_1 {
1474 1478  
1475 1479 function f_AE_DMR_RET_005() runs on CseSimu {
1476 1480  
1477   - var integer v_auxInteger := -1;
  1481 + var integer v_resourceIndex := -1;
1478 1482 var PrimitiveContent v_localResource;
1479 1483  
1480 1484 //variables
... ... @@ -1488,8 +1492,8 @@ module OneM2M_Testcases_AE_Release_1 {
1488 1492  
1489 1493 //send triggering primitive to SUT
1490 1494 v_localResource := f_ae_generateLocalResource(valueof(m_primitiveContentContentInstance(m_contentCreateContentInstance)), vc_cSEBaseIndex, int4);
1491   - v_auxInteger := f_setLocalResource(v_localResource, int4, vc_cSEBaseIndex);
1492   - v_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(v_auxInteger);
  1495 + v_resourceIndex := f_setLocalResource(v_localResource, int4, vc_cSEBaseIndex);
  1496 + v_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(v_resourceIndex);
1493 1497 f_sendUtPrimitive(v_utRequest,v_action);
1494 1498  
1495 1499 //Test behavior
... ... @@ -1498,17 +1502,14 @@ module OneM2M_Testcases_AE_Release_1 {
1498 1502 [] mcaPortIn.receive(mw_request(mw_retrieve(v_utRequest.requestPrimitive.to_))) -> value v_request {
1499 1503 tc_ac.stop;
1500 1504 setverdict(pass, __SCOPE__, " : retrieve resource type request is accepted!!");
1501   -
1502   - //set responseStatusCode back to SUT
1503   - v_responsePrimitive := valueof(m_responsePrimitive(int2000, v_request.primitive.requestPrimitive.requestIdentifier, omit));
1504   -
1505   - //send back responsePrimitive
  1505 + v_resourceIndex := f_getResourceIndex(v_request.primitive.requestPrimitive.to_);
  1506 + v_responsePrimitive := valueof(m_responsePrimitive(int2000, v_request.primitive.requestPrimitive.requestIdentifier, vc_localResourcesList[v_resourceIndex].resource));
1506 1507 mcaPortIn.send(m_response(v_responsePrimitive));
1507   - tc_ac.stop;
1508 1508 }
1509 1509 [] mcaPortIn.receive {
1510 1510 tc_ac.stop;
1511 1511 setverdict(fail, __SCOPE__, " : error while retrieving resource !");
  1512 + mcaPortIn.send(m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit))));
1512 1513 }
1513 1514 [] tc_ac.timeout{
1514 1515 setverdict(fail, __SCOPE__, " : Timeout due to no response received from requested SUT!");
... ... @@ -1538,7 +1539,7 @@ module OneM2M_Testcases_AE_Release_1 {
1538 1539  
1539 1540 function f_AE_DMR_DEL_001() runs on CseSimu {
1540 1541  
1541   - var integer v_auxInteger := -1;
  1542 + var integer v_resourceIndex := -1;
1542 1543 var PrimitiveContent v_localResource;
1543 1544  
1544 1545 //variables
... ... @@ -1552,8 +1553,8 @@ module OneM2M_Testcases_AE_Release_1 {
1552 1553  
1553 1554 //send triggering primitive to SUT
1554 1555 v_localResource := f_ae_generateLocalResource(valueof(m_primitiveContentContainer(m_contentCreateContainer)), vc_cSEBaseIndex, int3);
1555   - v_auxInteger := f_setLocalResource(v_localResource, int3, vc_cSEBaseIndex);
1556   - v_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(v_auxInteger) & "/" & c_resourceShortNameOldest;
  1556 + v_resourceIndex := f_setLocalResource(v_localResource, int3, vc_cSEBaseIndex);
  1557 + v_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(v_resourceIndex) & "/" & c_resourceShortNameOldest;
1557 1558 f_sendUtPrimitive(v_utRequest,v_action);
1558 1559  
1559 1560 //Test behavior
... ... @@ -1598,7 +1599,7 @@ module OneM2M_Testcases_AE_Release_1 {
1598 1599  
1599 1600 function f_AE_DMR_DEL_002() runs on CseSimu {
1600 1601  
1601   - var integer v_auxInteger := -1;
  1602 + var integer v_resourceIndex := -1;
1602 1603 var PrimitiveContent v_localResource;
1603 1604  
1604 1605 //variables
... ... @@ -1612,8 +1613,8 @@ module OneM2M_Testcases_AE_Release_1 {
1612 1613  
1613 1614 //send triggering primitive to SUT
1614 1615 v_localResource := f_ae_generateLocalResource(valueof(m_primitiveContentContainer(m_contentCreateContainer)), vc_cSEBaseIndex, int3);
1615   - v_auxInteger := f_setLocalResource(v_localResource, int3, vc_cSEBaseIndex);
1616   - v_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(v_auxInteger) & "/" & c_resourceShortNameLatest;
  1616 + v_resourceIndex := f_setLocalResource(v_localResource, int3, vc_cSEBaseIndex);
  1617 + v_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(v_resourceIndex) & "/" & c_resourceShortNameLatest;
1617 1618 f_sendUtPrimitive(v_utRequest,v_action);
1618 1619  
1619 1620 //Test behavior
... ... @@ -1658,7 +1659,7 @@ module OneM2M_Testcases_AE_Release_1 {
1658 1659  
1659 1660 function f_AE_DMR_DEL_003() runs on CseSimu {
1660 1661  
1661   - var integer v_auxInteger := -1;
  1662 + var integer v_resourceIndex := -1;
1662 1663 var PrimitiveContent v_localResource;
1663 1664  
1664 1665 //variables
... ... @@ -1672,8 +1673,8 @@ module OneM2M_Testcases_AE_Release_1 {
1672 1673  
1673 1674 //send triggering primitive to SUT
1674 1675 v_localResource := f_ae_generateLocalResource(valueof(m_primitiveContentContainer(m_contentCreateContainer)), vc_cSEBaseIndex, int3);
1675   - v_auxInteger := f_setLocalResource(v_localResource, int3, vc_cSEBaseIndex);
1676   - v_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(v_auxInteger);
  1676 + v_resourceIndex := f_setLocalResource(v_localResource, int3, vc_cSEBaseIndex);
  1677 + v_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(v_resourceIndex);
1677 1678 f_sendUtPrimitive(v_utRequest,v_action);
1678 1679  
1679 1680 //Test behavior
... ... @@ -1718,7 +1719,7 @@ module OneM2M_Testcases_AE_Release_1 {
1718 1719  
1719 1720 function f_AE_DMR_DEL_004() runs on CseSimu {
1720 1721  
1721   - var integer v_auxInteger := -1;
  1722 + var integer v_resourceIndex := -1;
1722 1723 var PrimitiveContent v_localResource;
1723 1724  
1724 1725 //variables
... ... @@ -1732,8 +1733,8 @@ module OneM2M_Testcases_AE_Release_1 {
1732 1733  
1733 1734 //send triggering primitive to SUT
1734 1735 v_localResource := f_ae_generateLocalResource(valueof(m_primitiveContentContentInstance(m_contentCreateContentInstance)), vc_cSEBaseIndex, int4);
1735   - v_auxInteger := f_setLocalResource(v_localResource, int4, vc_cSEBaseIndex);
1736   - v_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(v_auxInteger);
  1736 + v_resourceIndex := f_setLocalResource(v_localResource, int4, vc_cSEBaseIndex);
  1737 + v_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(v_resourceIndex);
1737 1738 f_sendUtPrimitive(v_utRequest,v_action);
1738 1739  
1739 1740 //Test behavior
... ... @@ -1790,6 +1791,9 @@ module OneM2M_Testcases_AE_Release_1 {
1790 1791 //variables
1791 1792 var template UtTriggerPrimitive v_utRequest := m_utCreateSubscription;
1792 1793 var MsgIn v_request;
  1794 + var integer v_parentIndex := -1;
  1795 + var integer v_resourceIndex := -1;
  1796 + var PrimitiveContent v_resource;
1793 1797 var ResponsePrimitive v_responsePrimitive;
1794 1798 var universal charstring v_action := __SCOPE__ & ": Please, send a valid subscription creation request";
1795 1799  
... ... @@ -1805,16 +1809,18 @@ module OneM2M_Testcases_AE_Release_1 {
1805 1809 [] mcaPortIn.receive(mw_request(mw_createSubscription)) -> value v_request {
1806 1810 tc_ac.stop;
1807 1811 setverdict(pass, __SCOPE__, " : Subscription creation request is accepted!");
1808   -
1809   - //set responseStatusCode back to SUT
1810   - v_responsePrimitive := valueof(m_responsePrimitive(int2001, v_request.primitive.requestPrimitive.requestIdentifier, omit));
1811   -
  1812 + v_parentIndex := f_getResourceIndex(v_request.primitive.requestPrimitive.to_);
  1813 + v_resource := f_ae_generateLocalResource(v_request.primitive.requestPrimitive.primitiveContent, v_parentIndex, v_request.primitive.requestPrimitive.resourceType);
  1814 + v_resourceIndex := f_setLocalResource(v_resource, v_request.primitive.requestPrimitive.resourceType, v_parentIndex);
  1815 + v_responsePrimitive := valueof(m_responsePrimitive(int2001, v_request.primitive.requestPrimitive.requestIdentifier, vc_localResourcesList[v_resourceIndex].resource));
  1816 +
1812 1817 //send back responsePrimitive
1813 1818 mcaPortIn.send(m_response(v_responsePrimitive));
1814 1819 }
1815 1820 [] mcaPortIn.receive {
1816 1821 tc_ac.stop;
1817 1822 setverdict(fail, __SCOPE__, " : Subscription creation request is rejected due to not including mandatory attributes!!");
  1823 + mcaPortIn.send(m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit))));
1818 1824 }
1819 1825 [] tc_ac.timeout{
1820 1826 setverdict(fail, __SCOPE__, " : Timeout due to no response received from requested SUT!");
... ... @@ -1973,6 +1979,9 @@ module OneM2M_Testcases_AE_Release_1 {
1973 1979 //variables
1974 1980 var template UtTriggerPrimitive v_utRequest := m_utCreateAe;
1975 1981 var MsgIn v_request;
  1982 + var integer v_parentIndex := -1;
  1983 + var integer v_resourceIndex := -1;
  1984 + var PrimitiveContent v_resource;
1976 1985 var ResponsePrimitive v_responsePrimitive;
1977 1986 var PrimitiveContent v_localResource;
1978 1987 var integer v_auxInteger := -1;
... ... @@ -1981,8 +1990,6 @@ module OneM2M_Testcases_AE_Release_1 {
1981 1990 f_cf03Up();
1982 1991  
1983 1992 //create Ae
1984   - v_localResource := f_ae_generateLocalResource(valueof(m_primitiveContentAe(m_contentCreateAe(omit, omit, omit, omit))), vc_cSEBaseIndex, int2);
1985   - v_auxInteger := f_setLocalResource(v_localResource, int2, vc_cSEBaseIndex);
1986 1993 v_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress();
1987 1994 f_sendUtPrimitive(v_utRequest,v_action);
1988 1995  
... ... @@ -1991,26 +1998,30 @@ module OneM2M_Testcases_AE_Release_1 {
1991 1998 [] mcaPortIn.receive(mw_request(mw_createAe)) -> value v_request {
1992 1999 tc_ac.stop;
1993 2000 setverdict(pass, __SCOPE__, " : AE registration request is accepted!!");
1994   - v_responsePrimitive := valueof(m_responsePrimitive(int2001, v_request.primitive.requestPrimitive.requestIdentifier, omit));
1995   -
  2001 + v_parentIndex := f_getResourceIndex(v_request.primitive.requestPrimitive.to_);
  2002 + v_resource := f_ae_generateLocalResource(v_request.primitive.requestPrimitive.primitiveContent, v_parentIndex, v_request.primitive.requestPrimitive.resourceType);
  2003 + v_resourceIndex := f_setLocalResource(v_resource, v_request.primitive.requestPrimitive.resourceType, v_parentIndex);
  2004 + v_responsePrimitive := valueof(m_responsePrimitive(int2001, v_request.primitive.requestPrimitive.requestIdentifier, vc_localResourcesList[v_resourceIndex].resource));
  2005 +
1996 2006 //send back responsePrimitive
1997 2007 mcaPortIn.send(m_response(v_responsePrimitive));
1998 2008 }
1999 2009 [] mcaPortIn.receive(mw_request(mw_createAe(*,?,m_contentCreateAe_Invalid))) -> value v_request {
2000 2010 tc_ac.stop;
2001 2011 setverdict(inconc, __SCOPE__, " : AE registration request is rejected due to not including mandatory attributes!!");
2002   - stop;
  2012 + mcaPortIn.send(m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit))));
2003 2013 }
2004 2014 [] tc_ac.timeout{
2005 2015 setverdict(inconc, __SCOPE__, " : Timeout due to no response received from requested SUT!");
2006   - stop;
2007 2016 }
2008 2017  
2009 2018 }
2010 2019  
  2020 + f_checkCseSimuStatus();
  2021 +
2011 2022 //create Subscription
2012 2023 v_utRequest := m_utCreateSubscription;
2013   - v_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(v_auxInteger);
  2024 + v_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(v_resourceIndex);
2014 2025 v_action := "Please, send a valid CREATE request for Subscription";
2015 2026 f_sendUtPrimitive(v_utRequest,v_action);
2016 2027  
... ... @@ -2019,25 +2030,28 @@ module OneM2M_Testcases_AE_Release_1 {
2019 2030 [] mcaPortIn.receive(mw_request(mw_createSubscription)) -> value v_request {
2020 2031 tc_ac.stop;
2021 2032 setverdict(pass, __SCOPE__, " : Subscription creation request is accepted!");
2022   -
2023   - //set responseStatusCode back to SUT
2024   - v_responsePrimitive := valueof(m_responsePrimitive(int2001, v_request.primitive.requestPrimitive.requestIdentifier, omit));
2025   -
  2033 + v_parentIndex := f_getResourceIndex(v_request.primitive.requestPrimitive.to_);
  2034 + v_resource := f_ae_generateLocalResource(v_request.primitive.requestPrimitive.primitiveContent, v_parentIndex, v_request.primitive.requestPrimitive.resourceType);
  2035 + v_resourceIndex := f_setLocalResource(v_resource, v_request.primitive.requestPrimitive.resourceType, v_parentIndex);
  2036 + v_responsePrimitive := valueof(m_responsePrimitive(int2001, v_request.primitive.requestPrimitive.requestIdentifier, vc_localResourcesList[v_resourceIndex].resource));
  2037 +
2026 2038 //send back responsePrimitive
2027 2039 mcaPortIn.send(m_response(v_responsePrimitive));
2028 2040 }
2029 2041 [] mcaPortIn.receive {
2030 2042 tc_ac.stop;
2031 2043 setverdict(inconc, __SCOPE__, " : Subscription creation request is rejected due to not including mandatory attributes!!");
  2044 + mcaPortIn.send(m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit))));
2032 2045 }
2033 2046 [] tc_ac.timeout{
2034 2047 setverdict(inconc, __SCOPE__, " : Timeout due to no response received from requested SUT!");
2035 2048 }
2036 2049 }
2037 2050  
2038   -
  2051 + f_checkCseSimuStatus();
  2052 +
2039 2053 //Test behavior
2040   - mcaPortIn.send(m_request(m_notify));
  2054 + mcaPortIn.send(m_request(m_notify(f_getLocalResourceAddress(v_resourceIndex))));
2041 2055  
2042 2056 tc_ac.start;
2043 2057 alt{
... ... @@ -2078,14 +2092,14 @@ module OneM2M_Testcases_AE_Release_1 {
2078 2092 var MsgIn v_request;
2079 2093 var ResponsePrimitive v_responsePrimitive;
2080 2094 var PrimitiveContent v_localResource;
2081   - var integer v_auxInteger := -1;
  2095 + var integer v_parentIndex := -1;
  2096 + var integer v_resourceIndex := -1;
  2097 + var PrimitiveContent v_resource;
2082 2098 var universal charstring v_action := __SCOPE__ & ": Please, send a valid AE Registration CREATE Request";
2083 2099  
2084 2100 f_cf03Up();
2085 2101  
2086 2102 //create Ae
2087   - v_localResource := f_ae_generateLocalResource(valueof(m_primitiveContentAe(m_contentCreateAe(omit, omit, omit, omit))), vc_cSEBaseIndex, int2);
2088   - v_auxInteger := f_setLocalResource(v_localResource, int2, vc_cSEBaseIndex);
2089 2103 v_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress();
2090 2104 f_sendUtPrimitive(v_utRequest,v_action);
2091 2105 tc_ac.start;
... ... @@ -2093,26 +2107,30 @@ module OneM2M_Testcases_AE_Release_1 {
2093 2107 [] mcaPortIn.receive(mw_request(mw_createAe)) -> value v_request {
2094 2108 tc_ac.stop;
2095 2109 setverdict(pass, __SCOPE__, " : AE registration request is accepted!!");
2096   - v_responsePrimitive := valueof(m_responsePrimitive(int2001, v_request.primitive.requestPrimitive.requestIdentifier, omit));
2097   -
  2110 + v_parentIndex := f_getResourceIndex(v_request.primitive.requestPrimitive.to_);
  2111 + v_resource := f_ae_generateLocalResource(v_request.primitive.requestPrimitive.primitiveContent, v_parentIndex, v_request.primitive.requestPrimitive.resourceType);
  2112 + v_resourceIndex := f_setLocalResource(v_resource, v_request.primitive.requestPrimitive.resourceType, v_parentIndex);
  2113 + v_responsePrimitive := valueof(m_responsePrimitive(int2001, v_request.primitive.requestPrimitive.requestIdentifier, vc_localResourcesList[v_resourceIndex].resource));
  2114 +
2098 2115 //send back responsePrimitive
2099 2116 mcaPortIn.send(m_response(v_responsePrimitive));
2100 2117 }
2101 2118 [] mcaPortIn.receive(mw_request(mw_createAe(*,?,m_contentCreateAe_Invalid))) -> value v_request {
2102 2119 tc_ac.stop;
2103 2120 setverdict(inconc, __SCOPE__, " : AE registration request is rejected due to not including mandatory attributes!!");
2104   - stop;
  2121 + mcaPortIn.send(m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit))));
2105 2122 }
2106 2123 [] tc_ac.timeout{
2107 2124 setverdict(inconc, __SCOPE__, " : Timeout due to no response received from requested SUT!");
2108   - stop;
2109 2125 }
2110 2126  
2111 2127 }
2112   -
  2128 +
  2129 + f_checkCseSimuStatus();
  2130 +
2113 2131 //create Subscription
2114 2132 v_utRequest := m_utCreateSubscription;
2115   - v_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(v_auxInteger);
  2133 + v_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(v_resourceIndex);
2116 2134 v_action := "Please, send a valid CREATE request for Subscription";
2117 2135 f_sendUtPrimitive(v_utRequest,v_action);
2118 2136  
... ... @@ -2121,23 +2139,26 @@ module OneM2M_Testcases_AE_Release_1 {
2121 2139 [] mcaPortIn.receive(mw_request(mw_createSubscription)) -> value v_request {
2122 2140 tc_ac.stop;
2123 2141 setverdict(pass, __SCOPE__, " : Subscription creation request is accepted!");
2124   -
2125   - //set responseStatusCode back to SUT
2126   - v_responsePrimitive := valueof(m_responsePrimitive(int2001, v_request.primitive.requestPrimitive.requestIdentifier, omit));
2127   -
  2142 + v_parentIndex := f_getResourceIndex(v_request.primitive.requestPrimitive.to_);
  2143 + v_resource := f_ae_generateLocalResource(v_request.primitive.requestPrimitive.primitiveContent, v_parentIndex, v_request.primitive.requestPrimitive.resourceType);
  2144 + v_resourceIndex := f_setLocalResource(v_resource, v_request.primitive.requestPrimitive.resourceType, v_parentIndex);
  2145 + v_responsePrimitive := valueof(m_responsePrimitive(int2001, v_request.primitive.requestPrimitive.requestIdentifier, vc_localResourcesList[v_resourceIndex].resource));
  2146 +
2128 2147 //send back responsePrimitive
2129 2148 mcaPortIn.send(m_response(v_responsePrimitive));
2130 2149 }
2131 2150 [] mcaPortIn.receive {
2132 2151 tc_ac.stop;
2133 2152 setverdict(inconc, __SCOPE__, " : Subscription creation request is rejected due to not including mandatory attributes!!");
  2153 + mcaPortIn.send(m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit))));
2134 2154 }
2135 2155 [] tc_ac.timeout{
2136 2156 setverdict(inconc, __SCOPE__, " : Timeout due to no response received from requested SUT!");
2137 2157 }
2138 2158 }
2139 2159  
2140   -
  2160 + f_checkCseSimuStatus();
  2161 +
2141 2162 //Test behavior
2142 2163 mcaPortIn.send(m_request(m_notifyAggregatedNotification));
2143 2164  
... ...