Commit 1b71c75a60ff54eda2d1f437b226c3652f8877ab

Authored by Miguel Angel Reina Ortega
1 parent e3ff8d1f

Fix #44

Signed-off-by: reinaortega <miguelangel.reinaortega@etsi.org>
... ... @@ -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,9 +79,12 @@ 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 90  
... ... @@ -102,13 +106,16 @@ module OneM2M_PermutationFunctions {
102 106 [] mcaPortIn.receive(mw_request(mw_createContainer(-,v_utRequest.requestPrimitive.to_))) -> value (v_request) {
103 107 tc_ac.stop;
104 108 setverdict(pass, __SCOPE__, " : Container creation request received successfuly");
105   -
106   - v_responsePrimitive := valueof(m_responsePrimitive(int2001, v_request.primitive.requestPrimitive.requestIdentifier, omit));
  109 + v_parentIndex := f_getResourceIndex(v_request.primitive.requestPrimitive.to_);
  110 + v_resource := f_ae_generateLocalResource(v_request.primitive.requestPrimitive.primitiveContent, v_parentIndex, v_request.primitive.requestPrimitive.resourceType);
  111 + v_resourceIndex := f_setLocalResource(v_resource, v_request.primitive.requestPrimitive.resourceType, v_parentIndex);
  112 + v_responsePrimitive := valueof(m_responsePrimitive(int2001, v_request.primitive.requestPrimitive.requestIdentifier, vc_localResourcesList[v_resourceIndex].resource));
107 113 mcaPortIn.send(m_response(v_responsePrimitive));
108 114 }
109 115 [] mcaPortIn.receive(mw_request(?)) {
110 116 tc_ac.stop;
111 117 setverdict(fail, __SCOPE__, " : Error while creating container");
  118 + mcaPortIn.send(m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit))));
112 119 stop;
113 120 }
114 121 [] tc_ac.timeout {
... ... @@ -130,7 +137,7 @@ module OneM2M_PermutationFunctions {
130 137 var ResponsePrimitive v_responsePrimitive;
131 138 var template UtTriggerPrimitive v_utRequest := m_utUpdateContainer;
132 139 var UtTriggerAckPrimitive v_trigger_response;
133   - var integer v_auxInteger;
  140 + var integer v_resourceIndex;
134 141 var PrimitiveContent v_localResource;
135 142 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 143  
... ... @@ -144,22 +151,24 @@ module OneM2M_PermutationFunctions {
144 151  
145 152 //Send Trigger Message
146 153 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);
  154 + v_resourceIndex := f_setLocalResource(v_localResource, int3, vc_cSEBaseIndex);
  155 + v_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(v_resourceIndex, e_nonHierarchical, p_primitiveScope);
149 156 f_sendUtPrimitive(v_utRequest,v_action);
150 157  
151 158 tc_ac.start;
152 159 alt {
153   - [] mcaPortIn.receive(mw_request(mw_updateContainer(-,v_utRequest.requestPrimitive.to_))) -> value (v_request) {
  160 + [] mcaPortIn.receive(mw_request(mw_updateContainer(-,v_utRequest.requestPrimitive.to_))) -> value v_request {
154 161 tc_ac.stop;
155 162 setverdict(pass, __SCOPE__, " : Container update request received successfuly");
156   -
157   - v_responsePrimitive := valueof(m_responsePrimitive(int2004, v_request.primitive.requestPrimitive.requestIdentifier, omit));
  163 + v_resourceIndex := f_getResourceIndex(v_request.primitive.requestPrimitive.to_);
  164 + f_cse_updateLocalResource(v_resourceIndex, v_request.primitive.requestPrimitive.primitiveContent);
  165 + v_responsePrimitive := valueof(m_responsePrimitive(int2004, v_request.primitive.requestPrimitive.requestIdentifier, vc_localResourcesList[v_resourceIndex].resource));
158 166 mcaPortIn.send(m_response(v_responsePrimitive));
159 167 }
160 168 [] mcaPortIn.receive(mw_request(?)) {
161 169 tc_ac.stop;
162 170 setverdict(fail, __SCOPE__, " : Error while updating container");
  171 + mcaPortIn.send(m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit))));
163 172 stop;
164 173 }
165 174 [] tc_ac.timeout {
... ... @@ -176,7 +185,7 @@ module OneM2M_PermutationFunctions {
176 185 var ResponsePrimitive v_responsePrimitive;
177 186 var template UtTriggerPrimitive v_utRequest := m_utUpdateContainer;
178 187 var UtTriggerAckPrimitive v_trigger_response;
179   - var integer v_auxInteger;
  188 + var integer v_resourceIndex := -1;
180 189 var PrimitiveContent v_localResource;
181 190 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 191  
... ... @@ -189,8 +198,8 @@ module OneM2M_PermutationFunctions {
189 198  
190 199 //Send Trigger Message
191 200 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);
  201 + v_resourceIndex := f_setLocalResource(v_localResource, int3, vc_cSEBaseIndex);
  202 + v_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(v_resourceIndex, e_hierarchical, p_primitiveScope);
194 203 f_sendUtPrimitive(v_utRequest,v_action);
195 204  
196 205 tc_ac.start;
... ... @@ -198,13 +207,15 @@ module OneM2M_PermutationFunctions {
198 207 [] mcaPortIn.receive(mw_request(mw_updateContainer(-,v_utRequest.requestPrimitive.to_))) -> value (v_request) {
199 208 tc_ac.stop;
200 209 setverdict(pass, __SCOPE__, " : Container update request received successfuly");
201   -
202   - v_responsePrimitive := valueof(m_responsePrimitive(int2004, v_request.primitive.requestPrimitive.requestIdentifier, omit));
  210 + v_resourceIndex := f_getResourceIndex(v_request.primitive.requestPrimitive.to_);
  211 + f_cse_updateLocalResource(v_resourceIndex, v_request.primitive.requestPrimitive.primitiveContent);
  212 + v_responsePrimitive := valueof(m_responsePrimitive(int2004, v_request.primitive.requestPrimitive.requestIdentifier, vc_localResourcesList[v_resourceIndex].resource));
203 213 mcaPortIn.send(m_response(v_responsePrimitive));
204 214 }
205 215 [] mcaPortIn.receive(mw_request(?)) {
206 216 tc_ac.stop;
207 217 setverdict(fail, __SCOPE__, " : Error while updating container");
  218 + mcaPortIn.send(m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit))));
208 219 stop;
209 220 }
210 221 [] tc_ac.timeout {
... ... @@ -227,7 +238,7 @@ module OneM2M_PermutationFunctions {
227 238 var template UtTriggerPrimitive v_utRequestTemplate;
228 239 var UtTriggerPrimitive v_utRequest;
229 240 var UtTriggerAckPrimitive v_trigger_response;
230   - var integer v_auxInteger;
  241 + var integer v_resourceIndex := -1;
231 242 var PrimitiveContent v_localResource;
232 243 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 244  
... ... @@ -240,8 +251,8 @@ module OneM2M_PermutationFunctions {
240 251  
241 252 //Send Trigger Message
242 253 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));
  254 + v_resourceIndex := f_setLocalResource(v_localResource, int3, vc_cSEBaseIndex);
  255 + v_utRequestTemplate := m_utRetrieve(f_getLocalResourceAddress(v_resourceIndex, e_nonHierarchical, p_primitiveScope));
245 256 f_sendUtPrimitive(v_utRequestTemplate,v_action);
246 257 v_utRequest := valueof(v_utRequestTemplate);
247 258  
... ... @@ -250,13 +261,14 @@ module OneM2M_PermutationFunctions {
250 261 [] mcaPortIn.receive(mw_request(mw_retrieve(v_utRequest.requestPrimitive.to_))) -> value (v_request) {
251 262 tc_ac.stop;
252 263 setverdict(pass, __SCOPE__, " : Container retrieve request received successfuly");
253   -
254   - v_responsePrimitive := valueof(m_responsePrimitive(int2000, v_request.primitive.requestPrimitive.requestIdentifier, omit));
  264 + v_resourceIndex := f_getResourceIndex(v_request.primitive.requestPrimitive.to_);
  265 + v_responsePrimitive := valueof(m_responsePrimitive(int2000, v_request.primitive.requestPrimitive.requestIdentifier, vc_localResourcesList[v_resourceIndex].resource));
255 266 mcaPortIn.send(m_response(v_responsePrimitive));
256 267 }
257 268 [] mcaPortIn.receive(mw_request(?)) {
258 269 tc_ac.stop;
259 270 setverdict(fail, __SCOPE__, " : Error while retrieving container");
  271 + mcaPortIn.send(m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit))));
260 272 stop;
261 273 }
262 274 [] tc_ac.timeout {
... ... @@ -274,7 +286,7 @@ module OneM2M_PermutationFunctions {
274 286 var template UtTriggerPrimitive v_utRequestTemplate;
275 287 var UtTriggerPrimitive v_utRequest;
276 288 var UtTriggerAckPrimitive v_trigger_response;
277   - var integer v_auxInteger;
  289 + var integer v_resourceIndex := -1;
278 290 var PrimitiveContent v_localResource;
279 291 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 292  
... ... @@ -287,8 +299,8 @@ module OneM2M_PermutationFunctions {
287 299  
288 300 //Send Trigger Message
289 301 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));
  302 + v_resourceIndex := f_setLocalResource(v_localResource, int3, vc_cSEBaseIndex);
  303 + v_utRequestTemplate := m_utRetrieve(f_getLocalResourceAddress(v_resourceIndex, e_hierarchical, p_primitiveScope));
292 304 v_utRequest := valueof(v_utRequestTemplate);
293 305 f_sendUtPrimitive(v_utRequest,v_action);
294 306  
... ... @@ -297,13 +309,14 @@ module OneM2M_PermutationFunctions {
297 309 [] mcaPortIn.receive(mw_request(mw_retrieve(v_utRequest.requestPrimitive.to_))) -> value (v_request) {
298 310 tc_ac.stop;
299 311 setverdict(pass, __SCOPE__, " : Container retrieve request received successfuly");
300   -
301   - v_responsePrimitive := valueof(m_responsePrimitive(int2000, v_request.primitive.requestPrimitive.requestIdentifier, omit));
  312 + v_resourceIndex := f_getResourceIndex(v_request.primitive.requestPrimitive.to_);
  313 + v_responsePrimitive := valueof(m_responsePrimitive(int2000, v_request.primitive.requestPrimitive.requestIdentifier, vc_localResourcesList[v_resourceIndex].resource));
302 314 mcaPortIn.send(m_response(v_responsePrimitive));
303 315 }
304 316 [] mcaPortIn.receive(mw_request(?)) {
305 317 tc_ac.stop;
306 318 setverdict(fail, __SCOPE__, " : Error while retrieving container");
  319 + mcaPortIn.send(m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit))));
307 320 stop;
308 321 }
309 322 [] tc_ac.timeout {
... ... @@ -347,13 +360,13 @@ module OneM2M_PermutationFunctions {
347 360 [] mcaPortIn.receive(mw_request(mw_delete(v_utRequest.requestPrimitive.to_))) -> value (v_request) {
348 361 tc_ac.stop;
349 362 setverdict(pass, __SCOPE__, " : Container update request received successfuly");
350   -
351 363 v_responsePrimitive := valueof(m_responsePrimitive(int2004, v_request.primitive.requestPrimitive.requestIdentifier, omit));
352 364 mcaPortIn.send(m_response(v_responsePrimitive));
353 365 }
354 366 [] mcaPortIn.receive(mw_request(?)) {
355 367 tc_ac.stop;
356 368 setverdict(fail, __SCOPE__, " : Error while updating container");
  369 + mcaPortIn.send(m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit))));
357 370 stop;
358 371 }
359 372 [] tc_ac.timeout {
... ... @@ -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,8 +455,10 @@ 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));
  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));
444 462  
445 463 //send back responsePrimitive
446 464 mcaPortIn.send(m_response(v_responsePrimitive));
... ... @@ -448,6 +466,7 @@ module OneM2M_PermutationFunctions {
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,9 +517,10 @@ 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));
  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));
501 524  
502 525 //send back responsePrimitive
503 526 mcaPortIn.send(m_response(v_responsePrimitive));
... ... @@ -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;
  692 + var integer v_resourceIndex := -1;
666 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,18 @@ 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 +
737 765 //send back responsePrimitive
738 766 mcaPortIn.send(m_response(v_responsePrimitive));
739 767 }
740 768 [] mcaPortIn.receive {
741 769 tc_ac.stop;
742 770 setverdict(fail, __SCOPE__, " : Subscription creation request is rejected due to not including the optional attribute!");
  771 + mcaPortIn.send(m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit))));
743 772 }
744 773 [] tc_ac.timeout{
745 774 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,16 +1979,15 @@ 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   - var PrimitiveContent v_localResource;
1978   - var integer v_auxInteger := -1;
1979 1986 var universal charstring v_action := __SCOPE__ & ": Please, send a valid AE Registration CREATE Request";
1980 1987  
1981 1988 f_cf03Up();
1982 1989  
1983 1990 //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 1991 v_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress();
1987 1992 f_sendUtPrimitive(v_utRequest,v_action);
1988 1993  
... ... @@ -1991,26 +1996,30 @@ module OneM2M_Testcases_AE_Release_1 {
1991 1996 [] mcaPortIn.receive(mw_request(mw_createAe)) -> value v_request {
1992 1997 tc_ac.stop;
1993 1998 setverdict(pass, __SCOPE__, " : AE registration request is accepted!!");
1994   - v_responsePrimitive := valueof(m_responsePrimitive(int2001, v_request.primitive.requestPrimitive.requestIdentifier, omit));
1995   -
  1999 + v_parentIndex := f_getResourceIndex(v_request.primitive.requestPrimitive.to_);
  2000 + v_resource := f_ae_generateLocalResource(v_request.primitive.requestPrimitive.primitiveContent, v_parentIndex, v_request.primitive.requestPrimitive.resourceType);
  2001 + v_resourceIndex := f_setLocalResource(v_resource, v_request.primitive.requestPrimitive.resourceType, v_parentIndex);
  2002 + v_responsePrimitive := valueof(m_responsePrimitive(int2001, v_request.primitive.requestPrimitive.requestIdentifier, vc_localResourcesList[v_resourceIndex].resource));
  2003 +
1996 2004 //send back responsePrimitive
1997 2005 mcaPortIn.send(m_response(v_responsePrimitive));
1998 2006 }
1999 2007 [] mcaPortIn.receive(mw_request(mw_createAe(*,?,m_contentCreateAe_Invalid))) -> value v_request {
2000 2008 tc_ac.stop;
2001 2009 setverdict(inconc, __SCOPE__, " : AE registration request is rejected due to not including mandatory attributes!!");
2002   - stop;
  2010 + mcaPortIn.send(m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit))));
2003 2011 }
2004 2012 [] tc_ac.timeout{
2005 2013 setverdict(inconc, __SCOPE__, " : Timeout due to no response received from requested SUT!");
2006   - stop;
2007 2014 }
2008 2015  
2009 2016 }
2010 2017  
  2018 + f_checkCseSimuStatus();
  2019 +
2011 2020 //create Subscription
2012 2021 v_utRequest := m_utCreateSubscription;
2013   - v_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(v_auxInteger);
  2022 + v_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(v_resourceIndex);
2014 2023 v_action := "Please, send a valid CREATE request for Subscription";
2015 2024 f_sendUtPrimitive(v_utRequest,v_action);
2016 2025  
... ... @@ -2019,25 +2028,28 @@ module OneM2M_Testcases_AE_Release_1 {
2019 2028 [] mcaPortIn.receive(mw_request(mw_createSubscription)) -> value v_request {
2020 2029 tc_ac.stop;
2021 2030 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   -
  2031 + v_parentIndex := f_getResourceIndex(v_request.primitive.requestPrimitive.to_);
  2032 + v_resource := f_ae_generateLocalResource(v_request.primitive.requestPrimitive.primitiveContent, v_parentIndex, v_request.primitive.requestPrimitive.resourceType);
  2033 + v_resourceIndex := f_setLocalResource(v_resource, v_request.primitive.requestPrimitive.resourceType, v_parentIndex);
  2034 + v_responsePrimitive := valueof(m_responsePrimitive(int2001, v_request.primitive.requestPrimitive.requestIdentifier, vc_localResourcesList[v_resourceIndex].resource));
  2035 +
2026 2036 //send back responsePrimitive
2027 2037 mcaPortIn.send(m_response(v_responsePrimitive));
2028 2038 }
2029 2039 [] mcaPortIn.receive {
2030 2040 tc_ac.stop;
2031 2041 setverdict(inconc, __SCOPE__, " : Subscription creation request is rejected due to not including mandatory attributes!!");
  2042 + mcaPortIn.send(m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit))));
2032 2043 }
2033 2044 [] tc_ac.timeout{
2034 2045 setverdict(inconc, __SCOPE__, " : Timeout due to no response received from requested SUT!");
2035 2046 }
2036 2047 }
2037 2048  
2038   -
  2049 + f_checkCseSimuStatus();
  2050 +
2039 2051 //Test behavior
2040   - mcaPortIn.send(m_request(m_notify(f_getLocalResourceAddress(v_auxInteger))));
  2052 + mcaPortIn.send(m_request(m_notify(f_getLocalResourceAddress(v_resourceIndex))));
2041 2053  
2042 2054 tc_ac.start;
2043 2055 alt{
... ... @@ -2078,14 +2090,14 @@ module OneM2M_Testcases_AE_Release_1 {
2078 2090 var MsgIn v_request;
2079 2091 var ResponsePrimitive v_responsePrimitive;
2080 2092 var PrimitiveContent v_localResource;
2081   - var integer v_auxInteger := -1;
  2093 + var integer v_parentIndex := -1;
  2094 + var integer v_resourceIndex := -1;
  2095 + var PrimitiveContent v_resource;
2082 2096 var universal charstring v_action := __SCOPE__ & ": Please, send a valid AE Registration CREATE Request";
2083 2097  
2084 2098 f_cf03Up();
2085 2099  
2086 2100 //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 2101 v_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress();
2090 2102 f_sendUtPrimitive(v_utRequest,v_action);
2091 2103 tc_ac.start;
... ... @@ -2093,26 +2105,30 @@ module OneM2M_Testcases_AE_Release_1 {
2093 2105 [] mcaPortIn.receive(mw_request(mw_createAe)) -> value v_request {
2094 2106 tc_ac.stop;
2095 2107 setverdict(pass, __SCOPE__, " : AE registration request is accepted!!");
2096   - v_responsePrimitive := valueof(m_responsePrimitive(int2001, v_request.primitive.requestPrimitive.requestIdentifier, omit));
2097   -
  2108 + v_parentIndex := f_getResourceIndex(v_request.primitive.requestPrimitive.to_);
  2109 + v_resource := f_ae_generateLocalResource(v_request.primitive.requestPrimitive.primitiveContent, v_parentIndex, v_request.primitive.requestPrimitive.resourceType);
  2110 + v_resourceIndex := f_setLocalResource(v_resource, v_request.primitive.requestPrimitive.resourceType, v_parentIndex);
  2111 + v_responsePrimitive := valueof(m_responsePrimitive(int2001, v_request.primitive.requestPrimitive.requestIdentifier, vc_localResourcesList[v_resourceIndex].resource));
  2112 +
2098 2113 //send back responsePrimitive
2099 2114 mcaPortIn.send(m_response(v_responsePrimitive));
2100 2115 }
2101 2116 [] mcaPortIn.receive(mw_request(mw_createAe(*,?,m_contentCreateAe_Invalid))) -> value v_request {
2102 2117 tc_ac.stop;
2103 2118 setverdict(inconc, __SCOPE__, " : AE registration request is rejected due to not including mandatory attributes!!");
2104   - stop;
  2119 + mcaPortIn.send(m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit))));
2105 2120 }
2106 2121 [] tc_ac.timeout{
2107 2122 setverdict(inconc, __SCOPE__, " : Timeout due to no response received from requested SUT!");
2108   - stop;
2109 2123 }
2110 2124  
2111 2125 }
2112   -
  2126 +
  2127 + f_checkCseSimuStatus();
  2128 +
2113 2129 //create Subscription
2114 2130 v_utRequest := m_utCreateSubscription;
2115   - v_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(v_auxInteger);
  2131 + v_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(v_resourceIndex);
2116 2132 v_action := "Please, send a valid CREATE request for Subscription";
2117 2133 f_sendUtPrimitive(v_utRequest,v_action);
2118 2134  
... ... @@ -2121,23 +2137,26 @@ module OneM2M_Testcases_AE_Release_1 {
2121 2137 [] mcaPortIn.receive(mw_request(mw_createSubscription)) -> value v_request {
2122 2138 tc_ac.stop;
2123 2139 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   -
  2140 + v_parentIndex := f_getResourceIndex(v_request.primitive.requestPrimitive.to_);
  2141 + v_resource := f_ae_generateLocalResource(v_request.primitive.requestPrimitive.primitiveContent, v_parentIndex, v_request.primitive.requestPrimitive.resourceType);
  2142 + v_resourceIndex := f_setLocalResource(v_resource, v_request.primitive.requestPrimitive.resourceType, v_parentIndex);
  2143 + v_responsePrimitive := valueof(m_responsePrimitive(int2001, v_request.primitive.requestPrimitive.requestIdentifier, vc_localResourcesList[v_resourceIndex].resource));
  2144 +
2128 2145 //send back responsePrimitive
2129 2146 mcaPortIn.send(m_response(v_responsePrimitive));
2130 2147 }
2131 2148 [] mcaPortIn.receive {
2132 2149 tc_ac.stop;
2133 2150 setverdict(inconc, __SCOPE__, " : Subscription creation request is rejected due to not including mandatory attributes!!");
  2151 + mcaPortIn.send(m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit))));
2134 2152 }
2135 2153 [] tc_ac.timeout{
2136 2154 setverdict(inconc, __SCOPE__, " : Timeout due to no response received from requested SUT!");
2137 2155 }
2138 2156 }
2139 2157  
2140   -
  2158 + f_checkCseSimuStatus();
  2159 +
2141 2160 //Test behavior
2142 2161 mcaPortIn.send(m_request(m_notifyAggregatedNotification));
2143 2162  
... ...