Commit 047f7330e4efcc4a767a8b32213dada3c6fe121e

Authored by Miguel Angel Reina Ortega
1 parent c170c6e4

Cleanup of test component variables according to TST-2018-0147

Signed-off-by: reinaortega <miguelangel.reinaortega@etsi.org>
... ... @@ -423,13 +423,41 @@ module OneM2M_Functions {
423 423 * @param p_tester AeSimu component
424 424 * @param p_resourceIndex Index of resource to be retrieved
425 425 */
426   - function f_getResource(in Tester p_component, in integer p_resourceIndex := -1) runs on Tester return integer {
  426 + function f_getResourceFromAeSimu(in AeSimu p_component, in integer p_resourceIndex := -1) runs on Tester return integer {
427 427 var MyResource v_resource;
428 428 var integer v_resourceIndex := -1;
429 429  
430 430 f_connectInfoPort(p_component);
  431 +
  432 + p_component.start(f_sendResourceAeSimu(p_resourceIndex));
  433 +
  434 + alt {
  435 + []infoPort.receive(mw_resource) -> value v_resource {
  436 + v_resourceIndex := f_setResource(v_resource.resource, v_resource.resourceType, v_resource.parentIndex, false);
  437 + }
  438 + }
431 439  
432   - p_component.start(f_sendResource(p_resourceIndex));
  440 + p_component.done;
  441 + f_disconnectInfoPort(p_component);
  442 +
  443 + return v_resourceIndex;
  444 +
  445 + }
  446 +
  447 +
  448 + /**
  449 + * @desc Getting a specific resource from an CseSimu component
  450 + * @param p_tester AeSimu component
  451 + * @param p_resourceIndex Index of resource to be retrieved
  452 + */
  453 + function f_getResourceFromCseSimu(in CseSimu p_component, in integer p_resourceIndex := -1) runs on Tester return integer {
  454 + var MyResource v_resource;
  455 + var integer v_resourceIndex := -1;
  456 +
  457 + f_connectInfoPort(p_component);
  458 +
  459 + p_component.start(f_sendResourceCseSimu(p_resourceIndex));
  460 +
433 461 alt {
434 462 []infoPort.receive(mw_resource) -> value v_resource {
435 463 v_resourceIndex := f_setResource(v_resource.resource, v_resource.resourceType, v_resource.parentIndex, false);
... ... @@ -586,7 +614,7 @@ module OneM2M_Functions {
586 614 * @desc Sending of a specific resource through InfoPort
587 615 * @param p_resourceIndex Index of resource to be sent
588 616 */
589   - function f_sendResource(in integer p_resourceIndex) runs on Tester {
  617 + function f_sendResourceAeSimu(in integer p_resourceIndex) runs on AeSimu {
590 618  
591 619 if(p_resourceIndex == -1) {
592 620 infoPort.send(vc_resourcesList[vc_aeAuxIndex]); //TODO To send Ae or RemoteCSE depending on the component type
... ... @@ -597,6 +625,20 @@ module OneM2M_Functions {
597 625 }
598 626  
599 627 /**
  628 + * @desc Sending of a specific resource through InfoPort
  629 + * @param p_resourceIndex Index of resource to be sent
  630 + */
  631 + function f_sendResourceCseSimu(in integer p_resourceIndex) runs on CseSimu {
  632 +
  633 + if(p_resourceIndex == -1) {
  634 + infoPort.send(vc_resourcesList[vc_remoteCseIndex]); //TODO To send Ae or RemoteCSE depending on the component type
  635 + } else {
  636 + infoPort.send(vc_resourcesList[p_resourceIndex]);
  637 + }
  638 +
  639 + }
  640 +
  641 + /**
600 642 * @desc Sending of the latest resource through InfoPort
601 643 */
602 644 function f_sendLatestResource() runs on Tester {
... ... @@ -731,7 +773,7 @@ module OneM2M_Functions {
731 773 }
732 774  
733 775 if(vc_acpAuxIndex != -1) {
734   - vc_resourcesIndexToBeDeleted := {vc_acpAuxIndex};
  776 + vc_resourcesIndexToBeDeleted := {vc_acpAuxIndex};//TODO Not needed
735 777 v_request := valueof(m_createAe(p_appId, {f_getResourceId(vc_resourcesList[vc_acpAuxIndex].resource)}, -));
736 778  
737 779 //TODO Test, to be removed
... ... @@ -834,7 +876,7 @@ module OneM2M_Functions {
834 876 vc_ae2.start(f_cse_createResource_withAcpAux(int2, m_createAe(PX_APP_ID, -, PX_AE2_ID_STEM, c_defaultAE2Name, {f_getCompletePoA("HTTP", PX_AE2_ADDRESS, "")}), -1)); // AE2 is registred
835 877 f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2);
836 878  
837   - p_ae2Index := f_getResource(vc_ae2);
  879 + p_ae2Index := f_getResourceFromAeSimu(vc_ae2);
838 880 if(ischosen(p_createRequestPrimitive.primitiveContent.subscription)){ //this condition is necessary for Subscription TCs where notification URI is set in m_createSubscriptionAdvanced
839 881 p_createRequestPrimitive.primitiveContent.subscription.notificationURI := {f_getResourceAddress(p_ae2Index)};
840 882 }
... ... @@ -1128,7 +1170,8 @@ module OneM2M_Functions {
1128 1170 * @return Internal resource index of the created auxiliar ACP resource
1129 1171 * @verdict
1130 1172 */
1131   - function f_cse_createAccessControlPolicyAux(in template (value) XSD.String p_acpName := c_acpAuxName, in template (value) ListOfURIs p_acor := PX_ACOR, in template (value) AccessControlOperations p_allowedOperations := int63) runs on AeSimu return integer{ var RequestPrimitive v_request;
  1173 + function f_cse_createAccessControlPolicyAux(in template (value) XSD.String p_acpName := c_acpAuxName, in template (value) ListOfURIs p_acor := PX_ACOR, in template (value) AccessControlOperations p_allowedOperations := int63) runs on AeSimu return integer{
  1174 + var RequestPrimitive v_request;
1132 1175 var integer v_acpAuxIndex := -1;
1133 1176  
1134 1177 v_request := valueof(m_createAcpAux(p_acpName := p_acpName, p_acor := p_acor, p_allowedOperations := p_allowedOperations));
... ... @@ -1780,6 +1823,10 @@ module OneM2M_Functions {
1780 1823 tc_ac.stop;
1781 1824 setverdict(fail, __SCOPE__ & ": Error, Non expected notification received");
1782 1825 }
  1826 + [] mcaPortIn.receive(mw_request(mw_notifyResponsePrimitive(?))) -> value vc_request {
  1827 + tc_ac.stop;
  1828 + setverdict(fail, __SCOPE__ & ": Error, Non expected notification received");
  1829 + }
1783 1830 [] tc_ac.timeout {
1784 1831 setverdict(pass, __SCOPE__ & ": No notification received");
1785 1832 }
... ... @@ -3702,8 +3749,8 @@ module OneM2M_Functions {
3702 3749 }
3703 3750 } else if (p_resourceType == int9) {//group
3704 3751 if(match(valueof(p_request.primitiveContent.group_.memberIDs), v_defaultListOfURIs )){
3705   - if ((p_parentIndex == -1) and (isbound(vc_aeAuxIndex))){
3706   - p_request.primitiveContent.group_.memberIDs := {f_getResourceId(vc_resourcesList[vc_aeAuxIndex].resource)};
  3752 + if (p_parentIndex == -1){
  3753 + p_request.primitiveContent.group_.memberIDs := {};
3707 3754 }else{
3708 3755 p_request.primitiveContent.group_.memberIDs := {f_getResourceId(vc_resourcesList[p_parentIndex].resource)};
3709 3756 }
... ... @@ -3731,7 +3778,7 @@ module OneM2M_Functions {
3731 3778 //subscriberURI
3732 3779 if(ispresent(p_request.primitiveContent.subscription.subscriberURI)) {
3733 3780 if(match(valueof(p_request.primitiveContent.subscription.subscriberURI), "NotInitialized" )){
3734   - p_request.primitiveContent.subscription.subscriberURI := f_getResourceAddress(vc_aeAuxIndex);
  3781 + p_request.primitiveContent.subscription.subscriberURI := valueof(p_request.from_);
3735 3782 }
3736 3783 }
3737 3784 //accessControlPolicyIds
... ...
... ... @@ -35,14 +35,12 @@ module OneM2M_TestSystem {
35 35 var TestSystemRole vc_testSystemRole;
36 36 var MyResourcesList vc_resourcesList;
37 37 var IntegerList vc_resourcesIndexToBeDeleted := {};
38   - var integer vc_aeAuxIndex := -1;//TODO To be removed
39   - var integer vc_remoteCseIndex := -1;
40 38 var integer vc_acpAuxIndex := -1;
41   - var AccessControlPolicy_optional vc_acpAux;
42 39 var MsgIn vc_request;
43 40 var MsgIn vc_response;
44 41 var default vc_aeSimu := null;
45 42 var default vc_cseSimu := null;
  43 + var PrimitiveContent vc_primitiveContentRetrievedResource;
46 44 };
47 45  
48 46 type component AeSimu extends Tester {
... ... @@ -51,10 +49,11 @@ module OneM2M_TestSystem {
51 49 port OneM2MPort mcaPortIn;
52 50  
53 51 //global variables
54   - var PrimitiveContent vc_primitiveContentRetrievedResource;
  52 + //var PrimitiveContent vc_primitiveContentRetrievedResource;
55 53  
56 54 var CseSimu vc_cse1;//For CF02 when AeSimu is master
57 55 var boolean vc_auxiliaryAe2Up := false;
  56 + var integer vc_aeAuxIndex := -1;//Specific to AeSimu
58 57 };
59 58  
60 59 type component CseSimu extends Tester {
... ... @@ -69,6 +68,7 @@ module OneM2M_TestSystem {
69 68 var integer vc_localRemoteCseIndex := -1;
70 69 var integer vc_cSEBaseIndex := -1; //Index of the CSEBase resource of the Tester inside vc_localResourcesList
71 70 var CseTypeID vc_cseType; //cseType of the simulated CSE. IN =1, MN = 2
  71 + var integer vc_remoteCseIndex := -1;//Specific to CseSimu
72 72 };
73 73  
74 74 type component InCseSimu extends CseSimu {
... ...
... ... @@ -7281,7 +7281,7 @@ group OptionalResourceTypes {
7281 7281 MemberType memberType optional,
7282 7282 XSD.NonNegativeInteger currentNrOfMembers optional,
7283 7283 XSD.PositiveInteger maxNrOfMembers optional,
7284   - ListOfURIs memberIDs optional,
  7284 + record length(0 .. infinity) of XSD.AnyURI memberIDs optional,//TODO A list that can be empty
7285 7285 ListOfURIs membersAccessControlPolicyIDs optional,
7286 7286 XSD.Boolean memberTypeValidated optional,
7287 7287 ConsistencyStrategy consistencyStrategy optional,
... ...
... ... @@ -1920,7 +1920,7 @@ module OneM2M_PermutationFunctions {
1920 1920 vc_ae2.start(f_cse_createResource_withAcpAux(int2, m_createAe(PX_APP_ID, -, PX_AE2_ID_STEM, c_defaultAE2Name, v_poaList), -1)); // AE2 is registred
1921 1921 f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2);
1922 1922  
1923   - v_ae2Index := f_getResource(vc_ae2);
  1923 + v_ae2Index := f_getResourceFromAeSimu(vc_ae2);
1924 1924 p_parentRequestPrimitive.primitiveContent.subscription.notificationURI := {f_getResourceAddress(v_ae2Index)};
1925 1925 vc_ae2.start(f_cse_notifyProcedure_subscriptionVerificationHandler());
1926 1926 }
... ... @@ -1957,7 +1957,7 @@ module OneM2M_PermutationFunctions {
1957 1957 f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2);
1958 1958 vc_ae2.start(f_cse_createResource_withAcpAux(int2, m_createAe(PX_APP_ID, -, PX_AE2_ID_STEM, c_defaultAE2Name, v_poaList), -1)); // AE2 is registred
1959 1959 f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2);
1960   - v_ae2Index := f_getResource(vc_ae2);
  1960 + v_ae2Index := f_getResourceFromAeSimu(vc_ae2);
1961 1961 p_requestPrimitive.primitiveContent.subscription.notificationURI := {f_getResourceAddress(v_ae2Index)};
1962 1962 vc_ae2.start(f_cse_notifyProcedure_subscriptionVerificationHandler());
1963 1963 }
... ... @@ -2031,7 +2031,7 @@ module OneM2M_PermutationFunctions {
2031 2031 f_cseSimu_checkComponentDoneAndGetVerdict(vc_ae1);
2032 2032 vc_ae1.start(f_cse_createResource_withAcpAux(int2, m_createAe(PX_APP_ID, -, PX_AE1_ID_STEM, "MyAe", v_poaList), -1)); // AE1 is registered
2033 2033 f_cseSimu_checkComponentDoneAndGetVerdict(vc_ae1);
2034   - v_ae1Index := f_getResource(vc_ae1);
  2034 + v_ae1Index := f_getResourceFromAeSimu(vc_ae1);
2035 2035 p_requestPrimitive.primitiveContent.subscription.notificationURI := {f_getResourceAddress(v_ae1Index)};
2036 2036 vc_ae1.start(f_cse_notifyProcedure_subscriptionVerificationHandler());
2037 2037 }
... ... @@ -5277,8 +5277,6 @@ module OneM2M_PermutationFunctions {
5277 5277 var RequestPrimitive v_requestUpdatePrimitive;
5278 5278 var integer v_parentIndex := -1;
5279 5279 var integer v_aeIndex := -1;
5280   - var integer v_resourceIndex;
5281   - var integer v_aEAnncIndex := -1;
5282 5280 var integer v_latestResourceIndex;
5283 5281 var ResponsePrimitive v_responsePrimitive;
5284 5282 var template RequestPrimitive v_create := m_createAe(PX_APP_ID, omit, omit);
... ... @@ -5301,7 +5299,9 @@ module OneM2M_PermutationFunctions {
5301 5299 f_cse_announcementProcedure_createHandler(mw_createAEAnnc(-, -, -));
5302 5300 v_ae1.done;
5303 5301  
5304   - v_ae1.start(f_cse_createResource(p_resourceType, p_requestCreatePrimitive, vc_aeAuxIndex));
  5302 + v_aeIndex:= f_getLatestResourceIndex(v_ae1);
  5303 +
  5304 + v_ae1.start(f_cse_createResource(p_resourceType, p_requestCreatePrimitive, v_aeIndex));
5305 5305 v_ae1.done;
5306 5306  
5307 5307 v_latestResourceIndex := f_getLatestResourceIndex(v_ae1);
... ... @@ -5344,8 +5344,6 @@ module OneM2M_PermutationFunctions {
5344 5344 var RequestPrimitive v_requestUpdatePrimitive;
5345 5345 var integer v_parentIndex := -1;
5346 5346 var integer v_aeIndex := -1;
5347   - var integer v_resourceIndex;
5348   - var integer v_aEAnncIndex := -1;
5349 5347 var integer v_latestResourceIndex;
5350 5348 var ResponsePrimitive v_responsePrimitive;
5351 5349 var template RequestPrimitive v_create := m_createAe(PX_APP_ID, omit, omit);
... ... @@ -5368,8 +5366,10 @@ module OneM2M_PermutationFunctions {
5368 5366 v_ae1.start(f_cse_createResource(int2,v_create));
5369 5367 f_cse_announcementProcedure_createHandler(mw_createAEAnnc(-, -, -));
5370 5368 v_ae1.done;
  5369 +
  5370 + v_aeIndex := f_getLatestResourceIndex(v_ae1);
5371 5371  
5372   - v_ae1.start(f_cse_createResource(p_resourceType, p_requestCreatePrimitive, vc_aeAuxIndex));
  5372 + v_ae1.start(f_cse_createResource(p_resourceType, p_requestCreatePrimitive, v_aeIndex));
5373 5373 f_cse_announcementProcedure_createHandler(p_createRequestAnnc);
5374 5374 v_ae1.done;
5375 5375  
... ... @@ -7910,8 +7910,6 @@ module OneM2M_PermutationFunctions {
7910 7910 var RequestPrimitive v_requestUpdatePrimitive;
7911 7911 var integer v_parentIndex := -1;
7912 7912 var integer v_aeIndex := -1;
7913   - var integer v_resourceIndex;
7914   - var integer v_aEAnncIndex := -1;
7915 7913 var integer v_latestResourceIndex;
7916 7914 var ResponsePrimitive v_responsePrimitive;
7917 7915 var template RequestPrimitive v_create := m_createAe(PX_APP_ID, omit, omit);
... ... @@ -7934,8 +7932,10 @@ module OneM2M_PermutationFunctions {
7934 7932 v_ae1.start(f_cse_createResource(int2,v_create));
7935 7933 f_cse_announcementProcedure_createHandler(mw_createAEAnnc(-, -, -));
7936 7934 v_ae1.done;
7937   -
7938   - v_ae1.start(f_cse_createResource(p_resourceType, p_requestCreatePrimitive, vc_aeAuxIndex));
  7935 +
  7936 + v_aeIndex:= f_getLatestResourceIndex(v_ae1);
  7937 +
  7938 + v_ae1.start(f_cse_createResource(p_resourceType, p_requestCreatePrimitive, v_aeIndex));
7939 7939 v_ae1.done;
7940 7940  
7941 7941 v_latestResourceIndex := f_getLatestResourceIndex(v_ae1);
... ... @@ -8003,7 +8003,9 @@ module OneM2M_PermutationFunctions {
8003 8003 f_cse_announcementProcedure_createHandler(mw_createAEAnnc(-, -, -));
8004 8004 v_ae1.done;
8005 8005  
8006   - v_ae1.start(f_cse_createResource(p_resourceType, p_requestCreatePrimitive, vc_aeAuxIndex));
  8006 + v_aeIndex:= f_getLatestResourceIndex(v_ae1);
  8007 +
  8008 + v_ae1.start(f_cse_createResource(p_resourceType, p_requestCreatePrimitive, v_aeIndex));
8007 8009 f_cse_announcementProcedure_createHandler(p_createRequestAnnc);
8008 8010 v_ae1.done;
8009 8011  
... ... @@ -8126,8 +8128,8 @@ module OneM2M_PermutationFunctions {
8126 8128 f_cse_registerRemoteCse(m_createRemoteCSEBase);
8127 8129  
8128 8130 //Preamble
8129   -
8130   - v_ae1.start(f_cse_createResource(p_resourceType, p_requestCreatePrimitive, vc_aeAuxIndex));
  8131 +
  8132 + v_ae1.start(f_cse_createResource(p_resourceType, p_requestCreatePrimitive, v_aeIndex));
8131 8133 v_ae1.done;
8132 8134  
8133 8135 v_latestResourceIndex := f_getLatestResourceIndex(v_ae1);
... ... @@ -8150,8 +8152,6 @@ module OneM2M_PermutationFunctions {
8150 8152 var RequestPrimitive v_requestUpdatePrimitive;
8151 8153 var integer v_parentIndex := -1;
8152 8154 var integer v_aeIndex := -1;
8153   - var integer v_resourceIndex;
8154   - var integer v_aEAnncIndex := -1;
8155 8155 var integer v_latestResourceIndex;
8156 8156 var ResponsePrimitive v_responsePrimitive;
8157 8157 var template RequestPrimitive v_create := m_createAe(PX_APP_ID, omit, omit);
... ... @@ -8175,7 +8175,9 @@ module OneM2M_PermutationFunctions {
8175 8175 f_cse_announcementProcedure_createHandler(mw_createAEAnnc(-, -, -));
8176 8176 v_ae1.done;
8177 8177  
8178   - v_ae1.start(f_cse_createResource(p_resourceType, p_requestCreatePrimitive, vc_aeAuxIndex));
  8178 + v_aeIndex:= f_getLatestResourceIndex(v_ae1);
  8179 +
  8180 + v_ae1.start(f_cse_createResource(p_resourceType, p_requestCreatePrimitive, v_aeIndex));
8179 8181 f_cse_announcementProcedure_createHandler(p_createRequestAnnc);
8180 8182 v_ae1.done;
8181 8183  
... ... @@ -8217,8 +8219,6 @@ module OneM2M_PermutationFunctions {
8217 8219 var RequestPrimitive v_requestUpdatePrimitive;
8218 8220 var integer v_parentIndex := -1;
8219 8221 var integer v_aeIndex := -1;
8220   - var integer v_resourceIndex;
8221   - var integer v_aEAnncIndex := -1;
8222 8222 var integer v_latestResourceIndex;
8223 8223 var ResponsePrimitive v_responsePrimitive;
8224 8224 var template RequestPrimitive v_create := m_createAe(PX_APP_ID, omit, omit);
... ... @@ -8242,7 +8242,9 @@ module OneM2M_PermutationFunctions {
8242 8242 f_cse_announcementProcedure_createHandler(mw_createAEAnnc(-, -, -));
8243 8243 v_ae1.done;
8244 8244  
8245   - v_ae1.start(f_cse_createResource(p_resourceType, p_requestCreatePrimitive, vc_aeAuxIndex));
  8245 + v_aeIndex:= f_getLatestResourceIndex(v_ae1);
  8246 +
  8247 + v_ae1.start(f_cse_createResource(p_resourceType, p_requestCreatePrimitive, v_aeIndex));
8246 8248 f_cse_announcementProcedure_createHandler(p_createRequestAnnc);
8247 8249 v_ae1.done;
8248 8250  
... ... @@ -8278,8 +8280,6 @@ module OneM2M_PermutationFunctions {
8278 8280 var RequestPrimitive v_requestUpdatePrimitive;
8279 8281 var integer v_parentIndex := -1;
8280 8282 var integer v_aeIndex := -1;
8281   - var integer v_resourceIndex;
8282   - var integer v_aEAnncIndex := -1;
8283 8283 var integer v_latestResourceIndex;
8284 8284 var ResponsePrimitive v_responsePrimitive;
8285 8285 var template RequestPrimitive v_create := m_createAe(PX_APP_ID, omit, omit);
... ... @@ -8303,7 +8303,9 @@ module OneM2M_PermutationFunctions {
8303 8303 f_cse_announcementProcedure_createHandler(mw_createAEAnnc(-, -, -));
8304 8304 v_ae1.done;
8305 8305  
8306   - v_ae1.start(f_cse_createResource(p_resourceType, p_requestCreatePrimitive, vc_aeAuxIndex));
  8306 + v_aeIndex:= f_getLatestResourceIndex(v_ae1);
  8307 +
  8308 + v_ae1.start(f_cse_createResource(p_resourceType, p_requestCreatePrimitive, v_aeIndex));
8307 8309 f_cse_announcementProcedure_createHandler(p_createRequestAnnc);
8308 8310 v_ae1.done;
8309 8311  
... ... @@ -8402,8 +8404,6 @@ module OneM2M_PermutationFunctions {
8402 8404 var RequestPrimitive v_requestUpdatePrimitive;
8403 8405 var integer v_parentIndex := -1;
8404 8406 var integer v_aeIndex := -1;
8405   - var integer v_resourceIndex;
8406   - var integer v_aEAnncIndex := -1;
8407 8407 var integer v_latestResourceIndex;
8408 8408 var ResponsePrimitive v_responsePrimitive;
8409 8409 var template RequestPrimitive v_create := m_createAe(PX_APP_ID, omit, omit);
... ... @@ -8427,7 +8427,9 @@ module OneM2M_PermutationFunctions {
8427 8427 f_cse_announcementProcedure_createHandler(mw_createAEAnnc(-, -, -));
8428 8428 v_ae1.done;
8429 8429  
8430   - v_ae1.start(f_cse_createResource(p_resourceType, p_requestCreatePrimitive, vc_aeAuxIndex));
  8430 + v_aeIndex:= f_getLatestResourceIndex(v_ae1);
  8431 +
  8432 + v_ae1.start(f_cse_createResource(p_resourceType, p_requestCreatePrimitive, v_aeIndex));
8431 8433 f_cse_announcementProcedure_createHandler(p_createRequestAnnc);
8432 8434 v_ae1.done;
8433 8435  
... ... @@ -8469,8 +8471,6 @@ module OneM2M_PermutationFunctions {
8469 8471 var RequestPrimitive v_requestUpdatePrimitive;
8470 8472 var integer v_parentIndex := -1;
8471 8473 var integer v_aeIndex := -1;
8472   - var integer v_resourceIndex;
8473   - var integer v_aEAnncIndex := -1;
8474 8474 var integer v_latestResourceIndex;
8475 8475 var ResponsePrimitive v_responsePrimitive;
8476 8476 var template RequestPrimitive v_create := m_createAe(PX_APP_ID, omit, omit);
... ... @@ -8494,7 +8494,9 @@ module OneM2M_PermutationFunctions {
8494 8494 f_cse_announcementProcedure_createHandler(mw_createAEAnnc(-, -, -));
8495 8495 v_ae1.done;
8496 8496  
8497   - v_ae1.start(f_cse_createResource(p_resourceType, p_requestCreatePrimitive, vc_aeAuxIndex));
  8497 + v_aeIndex:= f_getLatestResourceIndex(v_ae1);
  8498 +
  8499 + v_ae1.start(f_cse_createResource(p_resourceType, p_requestCreatePrimitive, v_aeIndex));
8498 8500 f_cse_announcementProcedure_createHandler(p_createRequestAnnc);
8499 8501 v_ae1.done;
8500 8502  
... ... @@ -8536,8 +8538,6 @@ module OneM2M_PermutationFunctions {
8536 8538 var RequestPrimitive v_requestUpdatePrimitive;
8537 8539 var integer v_parentIndex := -1;
8538 8540 var integer v_aeIndex := -1;
8539   - var integer v_resourceIndex;
8540   - var integer v_aEAnncIndex := -1;
8541 8541 var integer v_latestResourceIndex;
8542 8542 var ResponsePrimitive v_responsePrimitive;
8543 8543 var template RequestPrimitive v_create := m_createAe(PX_APP_ID, omit, omit);
... ... @@ -8561,7 +8561,9 @@ module OneM2M_PermutationFunctions {
8561 8561 f_cse_announcementProcedure_createHandler(mw_createAEAnnc(-, -, -));
8562 8562 v_ae1.done;
8563 8563  
8564   - v_ae1.start(f_cse_createResource(p_resourceType, p_requestCreatePrimitive, vc_aeAuxIndex));
  8564 + v_aeIndex:= f_getLatestResourceIndex(v_ae1);
  8565 +
  8566 + v_ae1.start(f_cse_createResource(p_resourceType, p_requestCreatePrimitive, v_aeIndex));
8565 8567 f_cse_announcementProcedure_createHandler(p_createRequestAnnc);
8566 8568 v_ae1.done;
8567 8569  
... ... @@ -8602,8 +8604,6 @@ module OneM2M_PermutationFunctions {
8602 8604 var RequestPrimitive v_requestUpdatePrimitive;
8603 8605 var integer v_parentIndex := -1;
8604 8606 var integer v_aeIndex := -1;
8605   - var integer v_resourceIndex;
8606   - var integer v_aEAnncIndex := -1;
8607 8607 var integer v_latestResourceIndex;
8608 8608 var ResponsePrimitive v_responsePrimitive;
8609 8609 var template RequestPrimitive v_create := m_createAe(PX_APP_ID, omit, omit);
... ... @@ -8627,7 +8627,9 @@ module OneM2M_PermutationFunctions {
8627 8627 f_cse_announcementProcedure_createHandler(mw_createAEAnnc(-, -, -));
8628 8628 v_ae1.done;
8629 8629  
8630   - v_ae1.start(f_cse_createResource(p_resourceType, p_requestCreatePrimitive, vc_aeAuxIndex));
  8630 + v_aeIndex:= f_getLatestResourceIndex(v_ae1);
  8631 +
  8632 + v_ae1.start(f_cse_createResource(p_resourceType, p_requestCreatePrimitive, v_aeIndex));
8631 8633 f_cse_announcementProcedure_createHandler(p_createRequestAnnc);
8632 8634 v_ae1.done;
8633 8635  
... ... @@ -8865,7 +8867,6 @@ module OneM2M_PermutationFunctions {
8865 8867 var integer v_parentIndex := -1;
8866 8868 var integer v_aeIndex := -1;
8867 8869 var integer v_latestResourceIndex;
8868   - var integer v_aEAnncIndex := -1;
8869 8870 var ResponsePrimitive v_responsePrimitive;
8870 8871 var template RequestPrimitive v_create := m_createAe(PX_APP_ID, omit, omit);
8871 8872 v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
... ... @@ -8888,7 +8889,9 @@ module OneM2M_PermutationFunctions {
8888 8889 f_cse_announcementProcedure_createHandler(mw_createAEAnnc(-, -, -));
8889 8890 v_ae1.done;
8890 8891  
8891   - v_ae1.start(f_cse_createResource(p_resourceType, p_requestCreatePrimitive, vc_aeAuxIndex));
  8892 + v_aeIndex:= f_getLatestResourceIndex(v_ae1);
  8893 +
  8894 + v_ae1.start(f_cse_createResource(p_resourceType, p_requestCreatePrimitive, v_aeIndex));
8892 8895 f_cse_announcementProcedure_createHandler(p_createRequestAnnc);
8893 8896 v_ae1.done;
8894 8897  
... ... @@ -8953,7 +8956,7 @@ module OneM2M_PermutationFunctions {
8953 8956 vc_ae2.start(f_cse_createResource(int2, m_createAe(PX_APP_ID, {f_getResourceId(vc_resourcesList[v_acpAuxIndex].resource)}, PX_AE2_ID_STEM, c_defaultAE2Name, -), -1)); // AE2 is registred
8954 8957 f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2);
8955 8958  
8956   - v_aeIndex2 := f_getResource(vc_ae2);
  8959 + v_aeIndex2 := f_getResourceFromAeSimu(vc_ae2);
8957 8960  
8958 8961 v_resourceIndex := f_cse_createResource(int15, m_createPollingChannelBase, v_aeIndex1);
8959 8962  
... ... @@ -9650,7 +9653,7 @@ module OneM2M_PermutationFunctions {
9650 9653  
9651 9654 f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2);
9652 9655  
9653   - v_ae2Index := f_getResource(vc_ae2);
  9656 + v_ae2Index := f_getResourceFromAeSimu(vc_ae2);
9654 9657  
9655 9658 if(ispresent(p_parentRequestPrimitive)) {
9656 9659 v_resourceIndex := f_cse_createResource(valueof(p_parentRequestPrimitive.resourceType), p_parentRequestPrimitive, v_aeIndex);
... ...
... ... @@ -1424,7 +1424,7 @@ module OneM2M_Testcases_CSE_Release_1 {
1424 1424 tc_ac.stop;
1425 1425 setverdict(pass, __SCOPE__ & ": Resource type remoteCSE created successfully");
1426 1426 f_checkAttributesToBeSaved(int16, v_request, v_response.primitive.responsePrimitive);
1427   - vc_aeAuxIndex := f_setResource(v_response.primitive.responsePrimitive.primitiveContent, int16);
  1427 + vc_remoteCseIndex := f_setResource(v_response.primitive.responsePrimitive.primitiveContent, int16);
1428 1428 }
1429 1429 [] mccPort.receive(mw_response(mw_responsePrimitiveOK)) {
1430 1430 tc_ac.stop;
... ... @@ -1490,7 +1490,7 @@ module OneM2M_Testcases_CSE_Release_1 {
1490 1490 tc_ac.stop;
1491 1491 setverdict(pass, __SCOPE__ & ": Resource type remoteCSE created successfully");
1492 1492 f_checkAttributesToBeSaved(int16, v_request, v_response.primitive.responsePrimitive);
1493   - vc_aeAuxIndex := f_setResource(v_response.primitive.responsePrimitive.primitiveContent, int16);
  1493 + vc_remoteCseIndex := f_setResource(v_response.primitive.responsePrimitive.primitiveContent, int16);
1494 1494 }
1495 1495 [] mccPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
1496 1496 tc_ac.stop;
... ...
... ... @@ -12967,7 +12967,7 @@ module OneM2M_Testcases_CSE_Release_2 {
12967 12967  
12968 12968 v_aeIndex := f_getLatestResourceIndex(vc_ae1);
12969 12969  
12970   - v_aeIndexForResourceAddress := f_getResource(vc_ae1);
  12970 + v_aeIndexForResourceAddress := f_getResourceFromAeSimu(vc_ae1);
12971 12971  
12972 12972 vc_ae1.start(f_cse_createResource(int15, m_createPollingChannelBase, v_aeIndex));//PollingChannel is created;
12973 12973 f_cseSimu_checkComponentDoneAndGetVerdict(vc_ae1);
... ...